@fleetless/contracts 15.6.0-next.1 → 16.0.0-next.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +67 -4
- package/artifacts/openapi.json +5322 -91
- package/artifacts/routes.json +31 -8
- package/artifacts/schema/billing-change-response.schema.json +1 -57
- package/artifacts/schema/billing-decision-display-response.schema.json +405 -9
- package/artifacts/schema/billing-decision-snapshot.schema.json +405 -9
- package/artifacts/schema/checkout-draft-response.schema.json +384 -0
- package/artifacts/schema/checkout-open-details.schema.json +46 -0
- package/artifacts/schema/checkout-response.schema.json +1 -4
- package/artifacts/schema/checkout-start-response.schema.json +4081 -0
- package/artifacts/schema/plan-change-prepare-response.schema.json +405 -9
- package/artifacts/schema/purchase-conflict-details.schema.json +20 -4
- package/artifacts/schema/purchase-hold-reason.schema.json +1 -4
- package/artifacts/schema/purchase-intent-draft.schema.json +1 -4
- package/artifacts/schema/purchase-intent-response.schema.json +1 -4
- package/artifacts/schema/vies-unavailable-details.schema.json +28 -0
- package/dist/billing.d.ts +4658 -1146
- package/dist/billing.js +264 -21
- package/dist/index.d.ts +2 -2
- package/dist/index.js +1 -1
- package/dist/org-roles.d.ts +4 -4
- package/dist/routes.js +57 -10
- package/package.json +1 -1
|
@@ -0,0 +1,384 @@
|
|
|
1
|
+
{
|
|
2
|
+
"$schema": "https://json-schema.org/draft/2020-12/schema",
|
|
3
|
+
"type": "object",
|
|
4
|
+
"properties": {
|
|
5
|
+
"draft": {
|
|
6
|
+
"anyOf": [
|
|
7
|
+
{
|
|
8
|
+
"type": "object",
|
|
9
|
+
"properties": {
|
|
10
|
+
"plan": {
|
|
11
|
+
"type": "string",
|
|
12
|
+
"enum": [
|
|
13
|
+
"plus",
|
|
14
|
+
"pro"
|
|
15
|
+
],
|
|
16
|
+
"description": "The plan last chosen on the checkout page."
|
|
17
|
+
},
|
|
18
|
+
"cycle": {
|
|
19
|
+
"type": "string",
|
|
20
|
+
"enum": [
|
|
21
|
+
"monthly",
|
|
22
|
+
"yearly"
|
|
23
|
+
],
|
|
24
|
+
"description": "The cycle last chosen."
|
|
25
|
+
},
|
|
26
|
+
"billing": {
|
|
27
|
+
"type": "object",
|
|
28
|
+
"properties": {
|
|
29
|
+
"kind": {
|
|
30
|
+
"type": "string",
|
|
31
|
+
"const": "company",
|
|
32
|
+
"description": "Billed as a company."
|
|
33
|
+
},
|
|
34
|
+
"company_name": {
|
|
35
|
+
"type": "string",
|
|
36
|
+
"minLength": 1,
|
|
37
|
+
"maxLength": 200,
|
|
38
|
+
"description": "The company's legal name, printed on the invoice."
|
|
39
|
+
},
|
|
40
|
+
"vat_id": {
|
|
41
|
+
"anyOf": [
|
|
42
|
+
{
|
|
43
|
+
"type": "string",
|
|
44
|
+
"maxLength": 20
|
|
45
|
+
},
|
|
46
|
+
{
|
|
47
|
+
"type": "null"
|
|
48
|
+
}
|
|
49
|
+
],
|
|
50
|
+
"description": "The company's VAT ID, or `null` for none. Required for a new purchase in another EU country; direct VIES must confirm it with an identifier."
|
|
51
|
+
},
|
|
52
|
+
"tax_id": {
|
|
53
|
+
"description": "Free-text Tax ID. Required for a new non-EU purchase; historical records may omit it.",
|
|
54
|
+
"anyOf": [
|
|
55
|
+
{
|
|
56
|
+
"type": "string",
|
|
57
|
+
"maxLength": 100
|
|
58
|
+
},
|
|
59
|
+
{
|
|
60
|
+
"type": "null"
|
|
61
|
+
}
|
|
62
|
+
]
|
|
63
|
+
},
|
|
64
|
+
"address": {
|
|
65
|
+
"type": "object",
|
|
66
|
+
"properties": {
|
|
67
|
+
"line1": {
|
|
68
|
+
"type": "string",
|
|
69
|
+
"minLength": 1,
|
|
70
|
+
"maxLength": 200,
|
|
71
|
+
"description": "Street and number, or the first address line."
|
|
72
|
+
},
|
|
73
|
+
"line2": {
|
|
74
|
+
"anyOf": [
|
|
75
|
+
{
|
|
76
|
+
"type": "string",
|
|
77
|
+
"maxLength": 200
|
|
78
|
+
},
|
|
79
|
+
{
|
|
80
|
+
"type": "null"
|
|
81
|
+
}
|
|
82
|
+
],
|
|
83
|
+
"description": "A second address line, or `null` when there is none."
|
|
84
|
+
},
|
|
85
|
+
"postal_code": {
|
|
86
|
+
"type": "string",
|
|
87
|
+
"minLength": 1,
|
|
88
|
+
"maxLength": 20,
|
|
89
|
+
"description": "Postal or ZIP code."
|
|
90
|
+
},
|
|
91
|
+
"city": {
|
|
92
|
+
"type": "string",
|
|
93
|
+
"minLength": 1,
|
|
94
|
+
"maxLength": 100,
|
|
95
|
+
"description": "City or town."
|
|
96
|
+
},
|
|
97
|
+
"country": {
|
|
98
|
+
"type": "string",
|
|
99
|
+
"pattern": "^[A-Z]{2}$",
|
|
100
|
+
"description": "The billing country, used for purchase eligibility and VAT."
|
|
101
|
+
},
|
|
102
|
+
"state": {
|
|
103
|
+
"description": "State or region. A new US purchase requires a two-letter state code; historical addresses may omit it.",
|
|
104
|
+
"type": "string",
|
|
105
|
+
"minLength": 1,
|
|
106
|
+
"maxLength": 100
|
|
107
|
+
}
|
|
108
|
+
},
|
|
109
|
+
"required": [
|
|
110
|
+
"line1",
|
|
111
|
+
"line2",
|
|
112
|
+
"postal_code",
|
|
113
|
+
"city",
|
|
114
|
+
"country"
|
|
115
|
+
],
|
|
116
|
+
"additionalProperties": false,
|
|
117
|
+
"description": "The billing address."
|
|
118
|
+
},
|
|
119
|
+
"invoice_email": {
|
|
120
|
+
"type": "string",
|
|
121
|
+
"format": "email",
|
|
122
|
+
"pattern": "^(?!\\.)(?!.*\\.\\.)([A-Za-z0-9_'+\\-\\.]*)[A-Za-z0-9_+-]@([A-Za-z0-9][A-Za-z0-9\\-]*\\.)+[A-Za-z]{2,}$",
|
|
123
|
+
"description": "Where invoices and billing mail are sent."
|
|
124
|
+
}
|
|
125
|
+
},
|
|
126
|
+
"required": [
|
|
127
|
+
"kind",
|
|
128
|
+
"company_name",
|
|
129
|
+
"vat_id",
|
|
130
|
+
"address",
|
|
131
|
+
"invoice_email"
|
|
132
|
+
],
|
|
133
|
+
"additionalProperties": false,
|
|
134
|
+
"description": "The company details last sent to the checkout start."
|
|
135
|
+
},
|
|
136
|
+
"updated_at": {
|
|
137
|
+
"type": "string",
|
|
138
|
+
"format": "date-time",
|
|
139
|
+
"pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z))$",
|
|
140
|
+
"description": "When the draft was last saved."
|
|
141
|
+
}
|
|
142
|
+
},
|
|
143
|
+
"required": [
|
|
144
|
+
"plan",
|
|
145
|
+
"cycle",
|
|
146
|
+
"billing",
|
|
147
|
+
"updated_at"
|
|
148
|
+
],
|
|
149
|
+
"additionalProperties": false
|
|
150
|
+
},
|
|
151
|
+
{
|
|
152
|
+
"type": "null"
|
|
153
|
+
}
|
|
154
|
+
],
|
|
155
|
+
"description": "The saved checkout draft, or `null`. Deleted once the checkout is paid."
|
|
156
|
+
},
|
|
157
|
+
"prefill": {
|
|
158
|
+
"anyOf": [
|
|
159
|
+
{
|
|
160
|
+
"oneOf": [
|
|
161
|
+
{
|
|
162
|
+
"type": "object",
|
|
163
|
+
"properties": {
|
|
164
|
+
"kind": {
|
|
165
|
+
"type": "string",
|
|
166
|
+
"const": "company",
|
|
167
|
+
"description": "Billed as a company."
|
|
168
|
+
},
|
|
169
|
+
"company_name": {
|
|
170
|
+
"type": "string",
|
|
171
|
+
"minLength": 1,
|
|
172
|
+
"maxLength": 200,
|
|
173
|
+
"description": "The company's legal name, printed on the invoice."
|
|
174
|
+
},
|
|
175
|
+
"vat_id": {
|
|
176
|
+
"anyOf": [
|
|
177
|
+
{
|
|
178
|
+
"type": "string",
|
|
179
|
+
"maxLength": 20
|
|
180
|
+
},
|
|
181
|
+
{
|
|
182
|
+
"type": "null"
|
|
183
|
+
}
|
|
184
|
+
],
|
|
185
|
+
"description": "The company's VAT ID, or `null` for none. Required for a new purchase in another EU country; direct VIES must confirm it with an identifier."
|
|
186
|
+
},
|
|
187
|
+
"tax_id": {
|
|
188
|
+
"description": "Free-text Tax ID. Required for a new non-EU purchase; historical records may omit it.",
|
|
189
|
+
"anyOf": [
|
|
190
|
+
{
|
|
191
|
+
"type": "string",
|
|
192
|
+
"maxLength": 100
|
|
193
|
+
},
|
|
194
|
+
{
|
|
195
|
+
"type": "null"
|
|
196
|
+
}
|
|
197
|
+
]
|
|
198
|
+
},
|
|
199
|
+
"address": {
|
|
200
|
+
"type": "object",
|
|
201
|
+
"properties": {
|
|
202
|
+
"line1": {
|
|
203
|
+
"type": "string",
|
|
204
|
+
"minLength": 1,
|
|
205
|
+
"maxLength": 200,
|
|
206
|
+
"description": "Street and number, or the first address line."
|
|
207
|
+
},
|
|
208
|
+
"line2": {
|
|
209
|
+
"anyOf": [
|
|
210
|
+
{
|
|
211
|
+
"type": "string",
|
|
212
|
+
"maxLength": 200
|
|
213
|
+
},
|
|
214
|
+
{
|
|
215
|
+
"type": "null"
|
|
216
|
+
}
|
|
217
|
+
],
|
|
218
|
+
"description": "A second address line, or `null` when there is none."
|
|
219
|
+
},
|
|
220
|
+
"postal_code": {
|
|
221
|
+
"type": "string",
|
|
222
|
+
"minLength": 1,
|
|
223
|
+
"maxLength": 20,
|
|
224
|
+
"description": "Postal or ZIP code."
|
|
225
|
+
},
|
|
226
|
+
"city": {
|
|
227
|
+
"type": "string",
|
|
228
|
+
"minLength": 1,
|
|
229
|
+
"maxLength": 100,
|
|
230
|
+
"description": "City or town."
|
|
231
|
+
},
|
|
232
|
+
"country": {
|
|
233
|
+
"type": "string",
|
|
234
|
+
"pattern": "^[A-Z]{2}$",
|
|
235
|
+
"description": "The billing country, used for purchase eligibility and VAT."
|
|
236
|
+
},
|
|
237
|
+
"state": {
|
|
238
|
+
"description": "State or region. A new US purchase requires a two-letter state code; historical addresses may omit it.",
|
|
239
|
+
"type": "string",
|
|
240
|
+
"minLength": 1,
|
|
241
|
+
"maxLength": 100
|
|
242
|
+
}
|
|
243
|
+
},
|
|
244
|
+
"required": [
|
|
245
|
+
"line1",
|
|
246
|
+
"line2",
|
|
247
|
+
"postal_code",
|
|
248
|
+
"city",
|
|
249
|
+
"country"
|
|
250
|
+
],
|
|
251
|
+
"additionalProperties": false,
|
|
252
|
+
"description": "The billing address."
|
|
253
|
+
},
|
|
254
|
+
"invoice_email": {
|
|
255
|
+
"type": "string",
|
|
256
|
+
"format": "email",
|
|
257
|
+
"pattern": "^(?!\\.)(?!.*\\.\\.)([A-Za-z0-9_'+\\-\\.]*)[A-Za-z0-9_+-]@([A-Za-z0-9][A-Za-z0-9\\-]*\\.)+[A-Za-z]{2,}$",
|
|
258
|
+
"description": "Where invoices and billing mail are sent."
|
|
259
|
+
}
|
|
260
|
+
},
|
|
261
|
+
"required": [
|
|
262
|
+
"kind",
|
|
263
|
+
"company_name",
|
|
264
|
+
"vat_id",
|
|
265
|
+
"address",
|
|
266
|
+
"invoice_email"
|
|
267
|
+
],
|
|
268
|
+
"additionalProperties": false,
|
|
269
|
+
"description": "A company: name and an optional VAT ID, never 'full name'."
|
|
270
|
+
},
|
|
271
|
+
{
|
|
272
|
+
"type": "object",
|
|
273
|
+
"properties": {
|
|
274
|
+
"kind": {
|
|
275
|
+
"type": "string",
|
|
276
|
+
"const": "person",
|
|
277
|
+
"description": "Billed as a person."
|
|
278
|
+
},
|
|
279
|
+
"full_name": {
|
|
280
|
+
"type": "string",
|
|
281
|
+
"minLength": 1,
|
|
282
|
+
"maxLength": 200,
|
|
283
|
+
"description": "The person's full name, printed on the invoice."
|
|
284
|
+
},
|
|
285
|
+
"address": {
|
|
286
|
+
"type": "object",
|
|
287
|
+
"properties": {
|
|
288
|
+
"line1": {
|
|
289
|
+
"type": "string",
|
|
290
|
+
"minLength": 1,
|
|
291
|
+
"maxLength": 200,
|
|
292
|
+
"description": "Street and number, or the first address line."
|
|
293
|
+
},
|
|
294
|
+
"line2": {
|
|
295
|
+
"anyOf": [
|
|
296
|
+
{
|
|
297
|
+
"type": "string",
|
|
298
|
+
"maxLength": 200
|
|
299
|
+
},
|
|
300
|
+
{
|
|
301
|
+
"type": "null"
|
|
302
|
+
}
|
|
303
|
+
],
|
|
304
|
+
"description": "A second address line, or `null` when there is none."
|
|
305
|
+
},
|
|
306
|
+
"postal_code": {
|
|
307
|
+
"type": "string",
|
|
308
|
+
"minLength": 1,
|
|
309
|
+
"maxLength": 20,
|
|
310
|
+
"description": "Postal or ZIP code."
|
|
311
|
+
},
|
|
312
|
+
"city": {
|
|
313
|
+
"type": "string",
|
|
314
|
+
"minLength": 1,
|
|
315
|
+
"maxLength": 100,
|
|
316
|
+
"description": "City or town."
|
|
317
|
+
},
|
|
318
|
+
"country": {
|
|
319
|
+
"type": "string",
|
|
320
|
+
"pattern": "^[A-Z]{2}$",
|
|
321
|
+
"description": "The billing country, used for purchase eligibility and VAT."
|
|
322
|
+
},
|
|
323
|
+
"state": {
|
|
324
|
+
"description": "State or region. A new US purchase requires a two-letter state code; historical addresses may omit it.",
|
|
325
|
+
"type": "string",
|
|
326
|
+
"minLength": 1,
|
|
327
|
+
"maxLength": 100
|
|
328
|
+
}
|
|
329
|
+
},
|
|
330
|
+
"required": [
|
|
331
|
+
"line1",
|
|
332
|
+
"line2",
|
|
333
|
+
"postal_code",
|
|
334
|
+
"city",
|
|
335
|
+
"country"
|
|
336
|
+
],
|
|
337
|
+
"additionalProperties": false,
|
|
338
|
+
"description": "The billing address."
|
|
339
|
+
},
|
|
340
|
+
"invoice_email": {
|
|
341
|
+
"type": "string",
|
|
342
|
+
"format": "email",
|
|
343
|
+
"pattern": "^(?!\\.)(?!.*\\.\\.)([A-Za-z0-9_'+\\-\\.]*)[A-Za-z0-9_+-]@([A-Za-z0-9][A-Za-z0-9\\-]*\\.)+[A-Za-z]{2,}$",
|
|
344
|
+
"description": "Where invoices and billing mail are sent."
|
|
345
|
+
}
|
|
346
|
+
},
|
|
347
|
+
"required": [
|
|
348
|
+
"kind",
|
|
349
|
+
"full_name",
|
|
350
|
+
"address",
|
|
351
|
+
"invoice_email"
|
|
352
|
+
],
|
|
353
|
+
"additionalProperties": false,
|
|
354
|
+
"description": "A person: a full name, never a VAT ID — only a company can be VAT-registered."
|
|
355
|
+
}
|
|
356
|
+
]
|
|
357
|
+
},
|
|
358
|
+
{
|
|
359
|
+
"type": "null"
|
|
360
|
+
}
|
|
361
|
+
],
|
|
362
|
+
"description": "The org's earlier billing details when there is no draft, else `null`."
|
|
363
|
+
}
|
|
364
|
+
},
|
|
365
|
+
"required": [
|
|
366
|
+
"draft",
|
|
367
|
+
"prefill"
|
|
368
|
+
],
|
|
369
|
+
"additionalProperties": false,
|
|
370
|
+
"not": {
|
|
371
|
+
"properties": {
|
|
372
|
+
"draft": {
|
|
373
|
+
"type": "object"
|
|
374
|
+
},
|
|
375
|
+
"prefill": {
|
|
376
|
+
"type": "object"
|
|
377
|
+
}
|
|
378
|
+
},
|
|
379
|
+
"required": [
|
|
380
|
+
"draft",
|
|
381
|
+
"prefill"
|
|
382
|
+
]
|
|
383
|
+
}
|
|
384
|
+
}
|
|
@@ -0,0 +1,46 @@
|
|
|
1
|
+
{
|
|
2
|
+
"$schema": "https://json-schema.org/draft/2020-12/schema",
|
|
3
|
+
"type": "object",
|
|
4
|
+
"properties": {
|
|
5
|
+
"field": {
|
|
6
|
+
"type": "string",
|
|
7
|
+
"const": "billing"
|
|
8
|
+
},
|
|
9
|
+
"rule": {
|
|
10
|
+
"type": "string",
|
|
11
|
+
"const": "checkout_open"
|
|
12
|
+
},
|
|
13
|
+
"expires_at": {
|
|
14
|
+
"anyOf": [
|
|
15
|
+
{
|
|
16
|
+
"type": "string",
|
|
17
|
+
"format": "date-time",
|
|
18
|
+
"pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z))$"
|
|
19
|
+
},
|
|
20
|
+
{
|
|
21
|
+
"type": "null"
|
|
22
|
+
}
|
|
23
|
+
],
|
|
24
|
+
"description": "When the open payment expires at the provider, or `null` when unknown."
|
|
25
|
+
},
|
|
26
|
+
"checkout_url": {
|
|
27
|
+
"anyOf": [
|
|
28
|
+
{
|
|
29
|
+
"type": "string",
|
|
30
|
+
"format": "uri"
|
|
31
|
+
},
|
|
32
|
+
{
|
|
33
|
+
"type": "null"
|
|
34
|
+
}
|
|
35
|
+
],
|
|
36
|
+
"description": "Where the open payment continues, or `null` when the provider no longer offers it."
|
|
37
|
+
}
|
|
38
|
+
},
|
|
39
|
+
"required": [
|
|
40
|
+
"field",
|
|
41
|
+
"rule",
|
|
42
|
+
"expires_at",
|
|
43
|
+
"checkout_url"
|
|
44
|
+
],
|
|
45
|
+
"additionalProperties": false
|
|
46
|
+
}
|
|
@@ -199,10 +199,7 @@
|
|
|
199
199
|
"legacy_usd_invoice",
|
|
200
200
|
"legacy_payer_unresolved",
|
|
201
201
|
"mandate_policy_unresolved",
|
|
202
|
-
"
|
|
203
|
-
"lexware_contact_changed",
|
|
204
|
-
"issuer_cutover_in_progress",
|
|
205
|
-
"lexware_issuance_paused"
|
|
202
|
+
"issuer_cutover_in_progress"
|
|
206
203
|
]
|
|
207
204
|
},
|
|
208
205
|
"original_amount": {
|