@fleetless/contracts 9.1.0 → 10.0.0

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.
Files changed (37) hide show
  1. package/CHANGELOG.md +22 -0
  2. package/artifacts/openapi.json +18597 -10329
  3. package/artifacts/routes.json +96 -16
  4. package/artifacts/schema/billing-change-response.schema.json +1527 -1727
  5. package/artifacts/schema/billing-decision-amounts.schema.json +244 -0
  6. package/artifacts/schema/billing-decision-display-request.schema.json +24 -0
  7. package/artifacts/schema/billing-decision-display-response.schema.json +3130 -0
  8. package/artifacts/schema/billing-decision-period.schema.json +550 -0
  9. package/artifacts/schema/billing-decision-snapshot.schema.json +3103 -0
  10. package/artifacts/schema/checkout-request.schema.json +3 -4
  11. package/artifacts/schema/checkout-response.schema.json +492 -402
  12. package/artifacts/schema/confirmation-proof.schema.json +6 -0
  13. package/artifacts/schema/plan-change-decision-lookup-query.schema.json +16 -0
  14. package/artifacts/schema/plan-change-decision-status-response.schema.json +543 -0
  15. package/artifacts/schema/plan-change-prepare-request.schema.json +84 -0
  16. package/artifacts/schema/plan-change-prepare-response.schema.json +3162 -0
  17. package/artifacts/schema/plan-change-request.schema.json +177 -65
  18. package/artifacts/schema/purchase-conflict-details.schema.json +94 -0
  19. package/artifacts/schema/purchase-intent-accepted-without-payment.schema.json +95 -0
  20. package/artifacts/schema/purchase-intent-confirm-request.schema.json +146 -33
  21. package/artifacts/schema/purchase-intent-draft.schema.json +449 -0
  22. package/artifacts/schema/purchase-intent-payment-started.schema.json +184 -0
  23. package/artifacts/schema/purchase-intent-response.schema.json +1235 -168
  24. package/dist/billing.d.ts +5665 -210
  25. package/dist/billing.js +224 -29
  26. package/dist/confirmation-proof.d.ts +5 -0
  27. package/dist/confirmation-proof.js +6 -0
  28. package/dist/iana-time-zones.d.ts +2 -0
  29. package/dist/iana-time-zones.js +426 -0
  30. package/dist/index.d.ts +5 -4
  31. package/dist/index.js +3 -2
  32. package/dist/plans.d.ts +125 -1
  33. package/dist/plans.js +19 -1
  34. package/dist/purchase-operation-key.d.ts +4 -0
  35. package/dist/purchase-operation-key.js +4 -0
  36. package/dist/routes.js +42 -21
  37. package/package.json +3 -1
@@ -0,0 +1,244 @@
1
+ {
2
+ "$schema": "https://json-schema.org/draft/2020-12/schema",
3
+ "type": "object",
4
+ "properties": {
5
+ "currency": {
6
+ "type": "string",
7
+ "const": "eur"
8
+ },
9
+ "quote": {
10
+ "type": "object",
11
+ "properties": {
12
+ "currency": {
13
+ "type": "string",
14
+ "const": "eur",
15
+ "description": "Every new quote is in EUR."
16
+ },
17
+ "net_cents": {
18
+ "type": "integer",
19
+ "minimum": 0,
20
+ "maximum": 9007199254740991,
21
+ "description": "Current charge excluding VAT, in cents."
22
+ },
23
+ "vat_cents": {
24
+ "type": "integer",
25
+ "minimum": 0,
26
+ "maximum": 9007199254740991,
27
+ "description": "VAT on the current charge, in cents."
28
+ },
29
+ "gross_cents": {
30
+ "type": "integer",
31
+ "minimum": 0,
32
+ "maximum": 9007199254740991,
33
+ "description": "Total to confirm, including VAT, in cents."
34
+ },
35
+ "rate_percent": {
36
+ "type": "integer",
37
+ "minimum": 0,
38
+ "maximum": 100,
39
+ "description": "VAT rate in whole percent."
40
+ }
41
+ },
42
+ "required": [
43
+ "currency",
44
+ "net_cents",
45
+ "vat_cents",
46
+ "gross_cents",
47
+ "rate_percent"
48
+ ],
49
+ "additionalProperties": false
50
+ },
51
+ "plan_net_cents": {
52
+ "type": "integer",
53
+ "minimum": 0,
54
+ "maximum": 9007199254740991
55
+ },
56
+ "addon_lines": {
57
+ "type": "array",
58
+ "items": {
59
+ "type": "object",
60
+ "properties": {
61
+ "addon": {
62
+ "type": "string",
63
+ "enum": [
64
+ "seats",
65
+ "robots",
66
+ "apps",
67
+ "app_user_packs",
68
+ "live_video_packs"
69
+ ]
70
+ },
71
+ "quantity": {
72
+ "type": "integer",
73
+ "exclusiveMinimum": 0,
74
+ "maximum": 9007199254740991
75
+ },
76
+ "net_cents": {
77
+ "type": "integer",
78
+ "minimum": 0,
79
+ "maximum": 9007199254740991
80
+ }
81
+ },
82
+ "required": [
83
+ "addon",
84
+ "quantity",
85
+ "net_cents"
86
+ ],
87
+ "additionalProperties": false
88
+ }
89
+ },
90
+ "period_net_cents": {
91
+ "type": "integer",
92
+ "minimum": 0,
93
+ "maximum": 9007199254740991
94
+ },
95
+ "period_vat_cents": {
96
+ "type": "integer",
97
+ "minimum": 0,
98
+ "maximum": 9007199254740991
99
+ },
100
+ "period_gross_cents": {
101
+ "type": "integer",
102
+ "minimum": 0,
103
+ "maximum": 9007199254740991
104
+ },
105
+ "vat_treatment": {
106
+ "type": "string",
107
+ "enum": [
108
+ "de_standard",
109
+ "reverse_charge",
110
+ "outside_eu"
111
+ ]
112
+ },
113
+ "vat_treatment_line": {
114
+ "type": "string",
115
+ "minLength": 1
116
+ },
117
+ "due_today_gross_cents": {
118
+ "type": "integer",
119
+ "minimum": 0,
120
+ "maximum": 9007199254740991
121
+ },
122
+ "prorated_net_cents": {
123
+ "anyOf": [
124
+ {
125
+ "type": "integer",
126
+ "minimum": 0,
127
+ "maximum": 9007199254740991
128
+ },
129
+ {
130
+ "type": "null"
131
+ }
132
+ ]
133
+ },
134
+ "renewal_net_cents": {
135
+ "type": "integer",
136
+ "minimum": 0,
137
+ "maximum": 9007199254740991
138
+ }
139
+ },
140
+ "required": [
141
+ "currency",
142
+ "quote",
143
+ "plan_net_cents",
144
+ "addon_lines",
145
+ "period_net_cents",
146
+ "period_vat_cents",
147
+ "period_gross_cents",
148
+ "vat_treatment",
149
+ "vat_treatment_line",
150
+ "due_today_gross_cents",
151
+ "prorated_net_cents",
152
+ "renewal_net_cents"
153
+ ],
154
+ "additionalProperties": false,
155
+ "allOf": [
156
+ {
157
+ "if": {
158
+ "properties": {
159
+ "vat_treatment": {
160
+ "const": "de_standard"
161
+ }
162
+ },
163
+ "required": [
164
+ "vat_treatment"
165
+ ]
166
+ },
167
+ "then": {
168
+ "properties": {
169
+ "quote": {
170
+ "properties": {
171
+ "rate_percent": {
172
+ "const": 19
173
+ }
174
+ }
175
+ }
176
+ }
177
+ }
178
+ },
179
+ {
180
+ "if": {
181
+ "properties": {
182
+ "vat_treatment": {
183
+ "const": "reverse_charge"
184
+ }
185
+ },
186
+ "required": [
187
+ "vat_treatment"
188
+ ]
189
+ },
190
+ "then": {
191
+ "properties": {
192
+ "quote": {
193
+ "properties": {
194
+ "rate_percent": {
195
+ "const": 0
196
+ },
197
+ "vat_cents": {
198
+ "const": 0
199
+ }
200
+ }
201
+ },
202
+ "period_vat_cents": {
203
+ "const": 0
204
+ },
205
+ "vat_treatment_line": {
206
+ "const": "Reverse charge — VAT payable by the recipient"
207
+ }
208
+ }
209
+ }
210
+ },
211
+ {
212
+ "if": {
213
+ "properties": {
214
+ "vat_treatment": {
215
+ "const": "outside_eu"
216
+ }
217
+ },
218
+ "required": [
219
+ "vat_treatment"
220
+ ]
221
+ },
222
+ "then": {
223
+ "properties": {
224
+ "quote": {
225
+ "properties": {
226
+ "rate_percent": {
227
+ "const": 0
228
+ },
229
+ "vat_cents": {
230
+ "const": 0
231
+ }
232
+ }
233
+ },
234
+ "period_vat_cents": {
235
+ "const": 0
236
+ },
237
+ "vat_treatment_line": {
238
+ "const": "Not taxable in Germany"
239
+ }
240
+ }
241
+ }
242
+ }
243
+ ]
244
+ }
@@ -0,0 +1,24 @@
1
+ {
2
+ "$schema": "https://json-schema.org/draft/2020-12/schema",
3
+ "type": "object",
4
+ "properties": {
5
+ "operation_key": {
6
+ "type": "string",
7
+ "format": "uuid",
8
+ "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)$",
9
+ "description": "Client-generated UUID persisted before the start request. Unique per org and reused only for identical input."
10
+ },
11
+ "operation": {
12
+ "type": "string",
13
+ "enum": [
14
+ "checkout",
15
+ "paid_change"
16
+ ]
17
+ }
18
+ },
19
+ "required": [
20
+ "operation_key",
21
+ "operation"
22
+ ],
23
+ "additionalProperties": false
24
+ }