@fleetless/contracts 16.1.0-next.2 → 17.0.0-next.2
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 +20 -25
- package/artifacts/openapi.json +540 -380
- package/artifacts/routes.json +4 -4
- package/artifacts/schema/billing-change-response.schema.json +0 -48
- package/artifacts/schema/billing-view.schema.json +0 -24
- package/artifacts/schema/checkout-response.schema.json +133 -53
- package/artifacts/schema/checkout-start-response.schema.json +73 -23
- package/artifacts/schema/purchase-conflict-details.schema.json +135 -54
- package/artifacts/schema/purchase-intent-draft.schema.json +135 -54
- package/artifacts/schema/purchase-intent-response.schema.json +135 -102
- package/artifacts/schema/vat-decision.schema.json +63 -18
- package/artifacts/schema/vat-id-check-response.schema.json +108 -39
- package/artifacts/schema/vies-outage.schema.json +24 -0
- package/artifacts/schema/vies-unavailable-details.schema.json +73 -23
- package/dist/billing.d.ts +218 -71
- package/dist/billing.js +42 -22
- package/dist/index.d.ts +2 -2
- package/dist/index.js +1 -1
- package/dist/plans.d.ts +2 -15
- package/dist/plans.js +14 -27
- package/dist/routes.js +8 -3
- package/package.json +1 -1
|
@@ -57,62 +57,143 @@
|
|
|
57
57
|
"current_intent": {
|
|
58
58
|
"oneOf": [
|
|
59
59
|
{
|
|
60
|
-
"
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
"
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
60
|
+
"oneOf": [
|
|
61
|
+
{
|
|
62
|
+
"type": "object",
|
|
63
|
+
"properties": {
|
|
64
|
+
"intent_id": {
|
|
65
|
+
"type": "string",
|
|
66
|
+
"format": "uuid",
|
|
67
|
+
"pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$",
|
|
68
|
+
"description": "Opaque persisted purchase intent identity."
|
|
69
|
+
},
|
|
70
|
+
"operation_key": {
|
|
71
|
+
"type": "string",
|
|
72
|
+
"format": "uuid",
|
|
73
|
+
"pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$",
|
|
74
|
+
"description": "Client-generated UUID persisted before the start request. Unique per org and reused only for identical input."
|
|
75
|
+
},
|
|
76
|
+
"operation": {
|
|
77
|
+
"type": "string",
|
|
78
|
+
"enum": [
|
|
79
|
+
"checkout",
|
|
80
|
+
"paid_change",
|
|
81
|
+
"invoice_payment",
|
|
82
|
+
"payment_method_invoice"
|
|
83
|
+
]
|
|
84
|
+
},
|
|
85
|
+
"invoice_id": {
|
|
86
|
+
"description": "For an invoice-paying operation, the due charge or issued invoice being paid. For a confirmed paid_change with payment_started, the charge or invoice created for that decision; when the charge was issued through Lexware (`charged` is `null`), it identifies the matching billing.charges[].id. Absent on a paid_change in any other state.",
|
|
87
|
+
"type": "string",
|
|
88
|
+
"format": "uuid",
|
|
89
|
+
"pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
|
|
90
|
+
},
|
|
91
|
+
"state": {
|
|
92
|
+
"type": "string",
|
|
93
|
+
"const": "awaiting_vies"
|
|
94
|
+
},
|
|
95
|
+
"next_attempt_at": {
|
|
96
|
+
"type": "string",
|
|
97
|
+
"format": "date-time",
|
|
98
|
+
"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))$"
|
|
99
|
+
},
|
|
100
|
+
"reason": {
|
|
101
|
+
"type": "string",
|
|
102
|
+
"const": "vies_unavailable"
|
|
103
|
+
},
|
|
104
|
+
"vies_outage": {
|
|
105
|
+
"type": "object",
|
|
106
|
+
"properties": {
|
|
107
|
+
"scope": {
|
|
108
|
+
"type": "string",
|
|
109
|
+
"enum": [
|
|
110
|
+
"member_state",
|
|
111
|
+
"vies"
|
|
112
|
+
],
|
|
113
|
+
"description": "`member_state`: the VAT register of `country` does not answer VIES. `vies`: VIES itself does not answer."
|
|
114
|
+
},
|
|
115
|
+
"country": {
|
|
116
|
+
"type": "string",
|
|
117
|
+
"pattern": "^[A-Z]{2}$",
|
|
118
|
+
"description": "The billing address's country whose VAT ID was asked for. Greece is `GR`, never VIES's `EL`."
|
|
119
|
+
}
|
|
120
|
+
},
|
|
121
|
+
"required": [
|
|
122
|
+
"scope",
|
|
123
|
+
"country"
|
|
124
|
+
],
|
|
125
|
+
"additionalProperties": false
|
|
126
|
+
}
|
|
127
|
+
},
|
|
128
|
+
"required": [
|
|
129
|
+
"intent_id",
|
|
130
|
+
"operation_key",
|
|
131
|
+
"operation",
|
|
132
|
+
"state",
|
|
133
|
+
"next_attempt_at",
|
|
134
|
+
"reason",
|
|
135
|
+
"vies_outage"
|
|
136
|
+
],
|
|
137
|
+
"additionalProperties": false
|
|
100
138
|
},
|
|
101
|
-
|
|
102
|
-
"type": "
|
|
103
|
-
"
|
|
104
|
-
|
|
139
|
+
{
|
|
140
|
+
"type": "object",
|
|
141
|
+
"properties": {
|
|
142
|
+
"intent_id": {
|
|
143
|
+
"type": "string",
|
|
144
|
+
"format": "uuid",
|
|
145
|
+
"pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$",
|
|
146
|
+
"description": "Opaque persisted purchase intent identity."
|
|
147
|
+
},
|
|
148
|
+
"operation_key": {
|
|
149
|
+
"type": "string",
|
|
150
|
+
"format": "uuid",
|
|
151
|
+
"pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$",
|
|
152
|
+
"description": "Client-generated UUID persisted before the start request. Unique per org and reused only for identical input."
|
|
153
|
+
},
|
|
154
|
+
"operation": {
|
|
155
|
+
"type": "string",
|
|
156
|
+
"enum": [
|
|
157
|
+
"checkout",
|
|
158
|
+
"paid_change",
|
|
159
|
+
"invoice_payment",
|
|
160
|
+
"payment_method_invoice"
|
|
161
|
+
]
|
|
162
|
+
},
|
|
163
|
+
"invoice_id": {
|
|
164
|
+
"description": "For an invoice-paying operation, the due charge or issued invoice being paid. For a confirmed paid_change with payment_started, the charge or invoice created for that decision; when the charge was issued through Lexware (`charged` is `null`), it identifies the matching billing.charges[].id. Absent on a paid_change in any other state.",
|
|
165
|
+
"type": "string",
|
|
166
|
+
"format": "uuid",
|
|
167
|
+
"pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
|
|
168
|
+
},
|
|
169
|
+
"state": {
|
|
170
|
+
"type": "string",
|
|
171
|
+
"const": "awaiting_vies"
|
|
172
|
+
},
|
|
173
|
+
"next_attempt_at": {
|
|
174
|
+
"type": "string",
|
|
175
|
+
"format": "date-time",
|
|
176
|
+
"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))$"
|
|
177
|
+
},
|
|
178
|
+
"reason": {
|
|
179
|
+
"type": "string",
|
|
180
|
+
"enum": [
|
|
181
|
+
"vies_unverified",
|
|
182
|
+
"vies_identifier_missing"
|
|
183
|
+
]
|
|
184
|
+
}
|
|
185
|
+
},
|
|
186
|
+
"required": [
|
|
187
|
+
"intent_id",
|
|
188
|
+
"operation_key",
|
|
189
|
+
"operation",
|
|
190
|
+
"state",
|
|
191
|
+
"next_attempt_at",
|
|
192
|
+
"reason"
|
|
193
|
+
],
|
|
194
|
+
"additionalProperties": false
|
|
105
195
|
}
|
|
106
|
-
|
|
107
|
-
"required": [
|
|
108
|
-
"intent_id",
|
|
109
|
-
"operation_key",
|
|
110
|
-
"operation",
|
|
111
|
-
"state",
|
|
112
|
-
"reason",
|
|
113
|
-
"next_attempt_at"
|
|
114
|
-
],
|
|
115
|
-
"additionalProperties": false
|
|
196
|
+
]
|
|
116
197
|
},
|
|
117
198
|
{
|
|
118
199
|
"type": "object",
|
|
@@ -2,62 +2,143 @@
|
|
|
2
2
|
"$schema": "https://json-schema.org/draft/2020-12/schema",
|
|
3
3
|
"oneOf": [
|
|
4
4
|
{
|
|
5
|
-
"
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
"
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
5
|
+
"oneOf": [
|
|
6
|
+
{
|
|
7
|
+
"type": "object",
|
|
8
|
+
"properties": {
|
|
9
|
+
"intent_id": {
|
|
10
|
+
"type": "string",
|
|
11
|
+
"format": "uuid",
|
|
12
|
+
"pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$",
|
|
13
|
+
"description": "Opaque persisted purchase intent identity."
|
|
14
|
+
},
|
|
15
|
+
"operation_key": {
|
|
16
|
+
"type": "string",
|
|
17
|
+
"format": "uuid",
|
|
18
|
+
"pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$",
|
|
19
|
+
"description": "Client-generated UUID persisted before the start request. Unique per org and reused only for identical input."
|
|
20
|
+
},
|
|
21
|
+
"operation": {
|
|
22
|
+
"type": "string",
|
|
23
|
+
"enum": [
|
|
24
|
+
"checkout",
|
|
25
|
+
"paid_change",
|
|
26
|
+
"invoice_payment",
|
|
27
|
+
"payment_method_invoice"
|
|
28
|
+
]
|
|
29
|
+
},
|
|
30
|
+
"invoice_id": {
|
|
31
|
+
"description": "For an invoice-paying operation, the due charge or issued invoice being paid. For a confirmed paid_change with payment_started, the charge or invoice created for that decision; when the charge was issued through Lexware (`charged` is `null`), it identifies the matching billing.charges[].id. Absent on a paid_change in any other state.",
|
|
32
|
+
"type": "string",
|
|
33
|
+
"format": "uuid",
|
|
34
|
+
"pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
|
|
35
|
+
},
|
|
36
|
+
"state": {
|
|
37
|
+
"type": "string",
|
|
38
|
+
"const": "awaiting_vies"
|
|
39
|
+
},
|
|
40
|
+
"next_attempt_at": {
|
|
41
|
+
"type": "string",
|
|
42
|
+
"format": "date-time",
|
|
43
|
+
"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))$"
|
|
44
|
+
},
|
|
45
|
+
"reason": {
|
|
46
|
+
"type": "string",
|
|
47
|
+
"const": "vies_unavailable"
|
|
48
|
+
},
|
|
49
|
+
"vies_outage": {
|
|
50
|
+
"type": "object",
|
|
51
|
+
"properties": {
|
|
52
|
+
"scope": {
|
|
53
|
+
"type": "string",
|
|
54
|
+
"enum": [
|
|
55
|
+
"member_state",
|
|
56
|
+
"vies"
|
|
57
|
+
],
|
|
58
|
+
"description": "`member_state`: the VAT register of `country` does not answer VIES. `vies`: VIES itself does not answer."
|
|
59
|
+
},
|
|
60
|
+
"country": {
|
|
61
|
+
"type": "string",
|
|
62
|
+
"pattern": "^[A-Z]{2}$",
|
|
63
|
+
"description": "The billing address's country whose VAT ID was asked for. Greece is `GR`, never VIES's `EL`."
|
|
64
|
+
}
|
|
65
|
+
},
|
|
66
|
+
"required": [
|
|
67
|
+
"scope",
|
|
68
|
+
"country"
|
|
69
|
+
],
|
|
70
|
+
"additionalProperties": false
|
|
71
|
+
}
|
|
72
|
+
},
|
|
73
|
+
"required": [
|
|
74
|
+
"intent_id",
|
|
75
|
+
"operation_key",
|
|
76
|
+
"operation",
|
|
77
|
+
"state",
|
|
78
|
+
"next_attempt_at",
|
|
79
|
+
"reason",
|
|
80
|
+
"vies_outage"
|
|
81
|
+
],
|
|
82
|
+
"additionalProperties": false
|
|
45
83
|
},
|
|
46
|
-
|
|
47
|
-
"type": "
|
|
48
|
-
"
|
|
49
|
-
|
|
84
|
+
{
|
|
85
|
+
"type": "object",
|
|
86
|
+
"properties": {
|
|
87
|
+
"intent_id": {
|
|
88
|
+
"type": "string",
|
|
89
|
+
"format": "uuid",
|
|
90
|
+
"pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$",
|
|
91
|
+
"description": "Opaque persisted purchase intent identity."
|
|
92
|
+
},
|
|
93
|
+
"operation_key": {
|
|
94
|
+
"type": "string",
|
|
95
|
+
"format": "uuid",
|
|
96
|
+
"pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$",
|
|
97
|
+
"description": "Client-generated UUID persisted before the start request. Unique per org and reused only for identical input."
|
|
98
|
+
},
|
|
99
|
+
"operation": {
|
|
100
|
+
"type": "string",
|
|
101
|
+
"enum": [
|
|
102
|
+
"checkout",
|
|
103
|
+
"paid_change",
|
|
104
|
+
"invoice_payment",
|
|
105
|
+
"payment_method_invoice"
|
|
106
|
+
]
|
|
107
|
+
},
|
|
108
|
+
"invoice_id": {
|
|
109
|
+
"description": "For an invoice-paying operation, the due charge or issued invoice being paid. For a confirmed paid_change with payment_started, the charge or invoice created for that decision; when the charge was issued through Lexware (`charged` is `null`), it identifies the matching billing.charges[].id. Absent on a paid_change in any other state.",
|
|
110
|
+
"type": "string",
|
|
111
|
+
"format": "uuid",
|
|
112
|
+
"pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
|
|
113
|
+
},
|
|
114
|
+
"state": {
|
|
115
|
+
"type": "string",
|
|
116
|
+
"const": "awaiting_vies"
|
|
117
|
+
},
|
|
118
|
+
"next_attempt_at": {
|
|
119
|
+
"type": "string",
|
|
120
|
+
"format": "date-time",
|
|
121
|
+
"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))$"
|
|
122
|
+
},
|
|
123
|
+
"reason": {
|
|
124
|
+
"type": "string",
|
|
125
|
+
"enum": [
|
|
126
|
+
"vies_unverified",
|
|
127
|
+
"vies_identifier_missing"
|
|
128
|
+
]
|
|
129
|
+
}
|
|
130
|
+
},
|
|
131
|
+
"required": [
|
|
132
|
+
"intent_id",
|
|
133
|
+
"operation_key",
|
|
134
|
+
"operation",
|
|
135
|
+
"state",
|
|
136
|
+
"next_attempt_at",
|
|
137
|
+
"reason"
|
|
138
|
+
],
|
|
139
|
+
"additionalProperties": false
|
|
50
140
|
}
|
|
51
|
-
|
|
52
|
-
"required": [
|
|
53
|
-
"intent_id",
|
|
54
|
-
"operation_key",
|
|
55
|
-
"operation",
|
|
56
|
-
"state",
|
|
57
|
-
"reason",
|
|
58
|
-
"next_attempt_at"
|
|
59
|
-
],
|
|
60
|
-
"additionalProperties": false
|
|
141
|
+
]
|
|
61
142
|
},
|
|
62
143
|
{
|
|
63
144
|
"type": "object",
|