Skip to content

Commit 0dbbcd3

Browse files
author
Karl Rankla
committed
chore: Update static schemas with ERP extension fields
1 parent cda0b7e commit 0dbbcd3

10 files changed

+185
-66
lines changed

static/schemas/billing_account-example.json

Lines changed: 26 additions & 24 deletions
Original file line numberDiff line numberDiff line change
@@ -21,33 +21,34 @@
2121
]
2222
},
2323
"billing_address": {
24-
"$relation_ref": [
25-
{
26-
"entity_id": "123e4567-e89b-12d3-a456-426614174000",
27-
"path": "address",
28-
"_tags": [
29-
"example"
30-
],
31-
"_id": "xHcOoJCa07eysJ1GaQeSb"
32-
}
33-
]
24+
"_tags": [
25+
"billing"
26+
],
27+
"street": "Hauptstraße",
28+
"street_number": "123",
29+
"postal_code": "50668",
30+
"city": "Cologne",
31+
"country": "DE",
32+
"additional_info": "string",
33+
"company_name": "string",
34+
"first_name": "string",
35+
"last_name": "string",
36+
"salutation": "string",
37+
"title": "string",
38+
"coordinates": "50.948484, 6.943147",
39+
"plot_of_land": "string",
40+
"plot_area": "string",
41+
"start_date": "1970-01-01",
42+
"end_date": "1970-01-01"
3443
},
3544
"payment_method": [
3645
{
37-
"_tags": [
38-
"string"
39-
],
40-
"value": {
41-
"$relation_ref": [
42-
{
43-
"entity_id": "123e4567-e89b-12d3-a456-426614174000",
44-
"path": "address",
45-
"_tags": [
46-
"example"
47-
],
48-
"_id": "xHcOoJCa07eysJ1GaQeSb"
49-
}
50-
]
46+
"type": "payment_sepa",
47+
"data": {
48+
"bank_name": "Deutsche Bank",
49+
"iban": "DE89370400440532013000",
50+
"bic_number": "DEUTDEFF",
51+
"fullname": "John Doe"
5152
}
5253
}
5354
],
@@ -61,6 +62,7 @@
6162
}
6263
]
6364
},
65+
"external_id": "string",
6466
"workflows": {
6567
"primary": {
6668
"id": "string",

static/schemas/billing_account-jsonschema.json

Lines changed: 139 additions & 42 deletions
Original file line numberDiff line numberDiff line change
@@ -66,34 +66,57 @@
6666
"description": "Billing Contact"
6767
},
6868
"billing_address": {
69-
"$ref": "#/definitions/BaseRelationRef",
69+
"$ref": "#/definitions/AddressAttribute",
7070
"description": "Billing Address"
7171
},
7272
"payment_method": {
7373
"type": "array",
7474
"items": {
7575
"type": "object",
76+
"description": "Payment method details",
7677
"properties": {
77-
"_tags": {
78-
"type": "array",
79-
"items": {
80-
"type": "string"
81-
}
78+
"type": {
79+
"type": "string",
80+
"enum": [
81+
"payment_sepa",
82+
"payment_invoice",
83+
"payment_cash"
84+
],
85+
"example": "payment_sepa"
8286
},
83-
"value": {
84-
"$ref": "#/definitions/BaseRelationRef"
87+
"data": {
88+
"type": "object",
89+
"properties": {
90+
"bank_name": {
91+
"type": "string",
92+
"example": "Deutsche Bank"
93+
},
94+
"iban": {
95+
"type": "string",
96+
"example": "DE89370400440532013000"
97+
},
98+
"bic_number": {
99+
"type": "string",
100+
"example": "DEUTDEFF"
101+
},
102+
"fullname": {
103+
"type": "string",
104+
"example": "John Doe"
105+
}
106+
}
85107
}
86-
},
87-
"required": [
88-
"value"
89-
]
108+
}
90109
},
91110
"description": "Payment Method"
92111
},
93112
"contracts": {
94113
"$ref": "#/definitions/BaseRelation",
95114
"description": "Contracts"
96115
},
116+
"external_id": {
117+
"type": "string",
118+
"description": "External ID"
119+
},
97120
"workflows": {
98121
"$ref": "#/definitions/WorkflowOverview"
99122
},
@@ -178,6 +201,110 @@
178201
}
179202
},
180203
"definitions": {
204+
"AddressAttribute": {
205+
"type": "object",
206+
"description": "Address attribute",
207+
"additionalProperties": true,
208+
"properties": {
209+
"_tags": {
210+
"type": "array",
211+
"items": {
212+
"type": "string"
213+
},
214+
"example": [
215+
"billing"
216+
]
217+
},
218+
"street": {
219+
"type": "string",
220+
"description": "The first line of the address. Typically the street address or PO Box number.",
221+
"nullable": true,
222+
"example": "Hauptstraße"
223+
},
224+
"street_number": {
225+
"type": "string",
226+
"description": "The second line of the address. Typically the number of the apartment, suite, or unit.",
227+
"nullable": true,
228+
"example": "123"
229+
},
230+
"postal_code": {
231+
"type": "string",
232+
"description": "The postal code for the address.",
233+
"nullable": true,
234+
"example": "50668"
235+
},
236+
"city": {
237+
"type": "string",
238+
"description": "The name of the city, district, village, or town.",
239+
"nullable": true,
240+
"example": "Cologne"
241+
},
242+
"country": {
243+
"type": "string",
244+
"description": "The two-letter code for the country of the address.",
245+
"nullable": true,
246+
"example": "DE"
247+
},
248+
"additional_info": {
249+
"type": "string",
250+
"description": "An additional description for the address",
251+
"nullable": true
252+
},
253+
"company_name": {
254+
"type": "string",
255+
"description": "the company name, usually used as extra delivery instructions",
256+
"nullable": true
257+
},
258+
"first_name": {
259+
"type": "string",
260+
"description": "the first name of the recipient, usually used as extra delivery instructions",
261+
"nullable": true
262+
},
263+
"last_name": {
264+
"type": "string",
265+
"description": "the last name of the recipient, usually used as extra delivery instructions",
266+
"nullable": true
267+
},
268+
"salutation": {
269+
"type": "string",
270+
"description": "the salutation of the recipient, usually used as extra delivery instructions",
271+
"nullable": true
272+
},
273+
"title": {
274+
"type": "string",
275+
"description": "the title of the recipient, usually used as extra delivery instructions",
276+
"nullable": true
277+
},
278+
"coordinates": {
279+
"type": "string",
280+
"description": "Geographical coordinates (latitude, longitude)",
281+
"nullable": true,
282+
"example": "50.948484, 6.943147"
283+
},
284+
"plot_of_land": {
285+
"type": "string",
286+
"description": "Plot of land information",
287+
"nullable": true
288+
},
289+
"plot_area": {
290+
"type": "string",
291+
"description": "Area of the plot",
292+
"nullable": true
293+
},
294+
"start_date": {
295+
"type": "string",
296+
"description": "Start date for the address",
297+
"format": "date",
298+
"nullable": true
299+
},
300+
"end_date": {
301+
"type": "string",
302+
"description": "End date for the address",
303+
"format": "date",
304+
"nullable": true
305+
}
306+
}
307+
},
181308
"BaseUUID": {
182309
"type": "string",
183310
"format": "uuid",
@@ -214,36 +341,6 @@
214341
}
215342
}
216343
},
217-
"BaseRelationRef": {
218-
"type": "object",
219-
"nullable": true,
220-
"description": "Reference to a specific property of another entity",
221-
"properties": {
222-
"$relation_ref": {
223-
"type": "array",
224-
"items": {
225-
"type": "object",
226-
"properties": {
227-
"entity_id": {
228-
"$ref": "#/definitions/BaseUUID"
229-
},
230-
"path": {
231-
"type": "string",
232-
"example": "address",
233-
"description": "The property of the entity (pointed by entity_id) to be used as the reference"
234-
},
235-
"_tags": {
236-
"$ref": "#/definitions/BaseTags"
237-
},
238-
"_id": {
239-
"type": "string",
240-
"example": "xHcOoJCa07eysJ1GaQeSb"
241-
}
242-
}
243-
}
244-
}
245-
}
246-
},
247344
"WorkflowStatus": {
248345
"type": "string",
249346
"enum": [

static/schemas/contact-example.json

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -177,6 +177,7 @@
177177
}
178178
]
179179
},
180+
"external_id": "string",
180181
"workflows": {
181182
"primary": {
182183
"id": "string",

static/schemas/contact-jsonschema.json

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -340,6 +340,10 @@
340340
"$ref": "#/definitions/BaseRelation",
341341
"description": "Contracts"
342342
},
343+
"external_id": {
344+
"type": "string",
345+
"description": "External ID"
346+
},
343347
"workflows": {
344348
"$ref": "#/definitions/WorkflowOverview"
345349
},

static/schemas/contract-example.json

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -160,6 +160,7 @@
160160
]
161161
},
162162
"last_sync_at": "2025-01-01",
163+
"external_id": "string",
163164
"workflows": {
164165
"primary": {
165166
"id": "string",

static/schemas/contract-jsonschema.json

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -375,6 +375,10 @@
375375
"example": "2025-01-01",
376376
"description": "Last Sync At"
377377
},
378+
"external_id": {
379+
"type": "string",
380+
"description": "External ID"
381+
},
378382
"workflows": {
379383
"$ref": "#/definitions/WorkflowOverview"
380384
},

static/schemas/meter-example.json

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -72,6 +72,7 @@
7272
}
7373
]
7474
},
75+
"external_id": "string",
7576
"workflows": {
7677
"primary": {
7778
"id": "string",

static/schemas/meter-jsonschema.json

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -234,6 +234,10 @@
234234
"$ref": "#/definitions/BaseRelation",
235235
"description": "Counters"
236236
},
237+
"external_id": {
238+
"type": "string",
239+
"description": "External ID"
240+
},
237241
"workflows": {
238242
"$ref": "#/definitions/WorkflowOverview"
239243
},

static/schemas/meter_counter-example.json

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -25,6 +25,7 @@
2525
}
2626
]
2727
},
28+
"external_id": "string",
2829
"_files": {
2930
"$relation": [
3031
{

static/schemas/meter_counter-jsonschema.json

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -100,6 +100,10 @@
100100
"$ref": "#/definitions/BaseRelation",
101101
"description": "Meter"
102102
},
103+
"external_id": {
104+
"type": "string",
105+
"description": "External ID"
106+
},
103107
"_files": {
104108
"$ref": "#/definitions/BaseRelation"
105109
},

0 commit comments

Comments
 (0)