@fleetless/contracts 17.0.0-next.1 → 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.
@@ -4,62 +4,143 @@
4
4
  {
5
5
  "oneOf": [
6
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
- "reason": {
41
- "type": "string",
42
- "enum": [
43
- "vies_unavailable",
44
- "vies_unverified",
45
- "vies_identifier_missing"
46
- ]
7
+ "oneOf": [
8
+ {
9
+ "type": "object",
10
+ "properties": {
11
+ "intent_id": {
12
+ "type": "string",
13
+ "format": "uuid",
14
+ "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)$",
15
+ "description": "Opaque persisted purchase intent identity."
16
+ },
17
+ "operation_key": {
18
+ "type": "string",
19
+ "format": "uuid",
20
+ "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)$",
21
+ "description": "Client-generated UUID persisted before the start request. Unique per org and reused only for identical input."
22
+ },
23
+ "operation": {
24
+ "type": "string",
25
+ "enum": [
26
+ "checkout",
27
+ "paid_change",
28
+ "invoice_payment",
29
+ "payment_method_invoice"
30
+ ]
31
+ },
32
+ "invoice_id": {
33
+ "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.",
34
+ "type": "string",
35
+ "format": "uuid",
36
+ "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)$"
37
+ },
38
+ "state": {
39
+ "type": "string",
40
+ "const": "awaiting_vies"
41
+ },
42
+ "next_attempt_at": {
43
+ "type": "string",
44
+ "format": "date-time",
45
+ "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))$"
46
+ },
47
+ "reason": {
48
+ "type": "string",
49
+ "const": "vies_unavailable"
50
+ },
51
+ "vies_outage": {
52
+ "type": "object",
53
+ "properties": {
54
+ "scope": {
55
+ "type": "string",
56
+ "enum": [
57
+ "member_state",
58
+ "vies"
59
+ ],
60
+ "description": "`member_state`: the VAT register of `country` does not answer VIES. `vies`: VIES itself does not answer."
61
+ },
62
+ "country": {
63
+ "type": "string",
64
+ "pattern": "^[A-Z]{2}$",
65
+ "description": "The billing address's country whose VAT ID was asked for. Greece is `GR`, never VIES's `EL`."
66
+ }
67
+ },
68
+ "required": [
69
+ "scope",
70
+ "country"
71
+ ],
72
+ "additionalProperties": false
73
+ }
74
+ },
75
+ "required": [
76
+ "intent_id",
77
+ "operation_key",
78
+ "operation",
79
+ "state",
80
+ "next_attempt_at",
81
+ "reason",
82
+ "vies_outage"
83
+ ],
84
+ "additionalProperties": false
47
85
  },
48
- "next_attempt_at": {
49
- "type": "string",
50
- "format": "date-time",
51
- "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))$"
86
+ {
87
+ "type": "object",
88
+ "properties": {
89
+ "intent_id": {
90
+ "type": "string",
91
+ "format": "uuid",
92
+ "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)$",
93
+ "description": "Opaque persisted purchase intent identity."
94
+ },
95
+ "operation_key": {
96
+ "type": "string",
97
+ "format": "uuid",
98
+ "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)$",
99
+ "description": "Client-generated UUID persisted before the start request. Unique per org and reused only for identical input."
100
+ },
101
+ "operation": {
102
+ "type": "string",
103
+ "enum": [
104
+ "checkout",
105
+ "paid_change",
106
+ "invoice_payment",
107
+ "payment_method_invoice"
108
+ ]
109
+ },
110
+ "invoice_id": {
111
+ "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.",
112
+ "type": "string",
113
+ "format": "uuid",
114
+ "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)$"
115
+ },
116
+ "state": {
117
+ "type": "string",
118
+ "const": "awaiting_vies"
119
+ },
120
+ "next_attempt_at": {
121
+ "type": "string",
122
+ "format": "date-time",
123
+ "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))$"
124
+ },
125
+ "reason": {
126
+ "type": "string",
127
+ "enum": [
128
+ "vies_unverified",
129
+ "vies_identifier_missing"
130
+ ]
131
+ }
132
+ },
133
+ "required": [
134
+ "intent_id",
135
+ "operation_key",
136
+ "operation",
137
+ "state",
138
+ "next_attempt_at",
139
+ "reason"
140
+ ],
141
+ "additionalProperties": false
52
142
  }
53
- },
54
- "required": [
55
- "intent_id",
56
- "operation_key",
57
- "operation",
58
- "state",
59
- "reason",
60
- "next_attempt_at"
61
- ],
62
- "additionalProperties": false
143
+ ]
63
144
  },
64
145
  {
65
146
  "type": "object",
@@ -387,32 +468,9 @@
387
468
  },
388
469
  "then": {
389
470
  "properties": {
390
- "state": {
391
- "enum": [
392
- "held",
393
- "payment_started"
394
- ]
395
- }
396
- }
397
- }
398
- },
399
- {
400
- "if": {
401
- "properties": {
402
- "operation": {
403
- "const": "mandate_setup"
404
- },
405
471
  "state": {
406
472
  "const": "held"
407
- }
408
- },
409
- "required": [
410
- "operation",
411
- "state"
412
- ]
413
- },
414
- "then": {
415
- "properties": {
473
+ },
416
474
  "reason": {
417
475
  "const": "mandate_policy_unresolved"
418
476
  }
@@ -489,8 +547,7 @@
489
547
  "enum": [
490
548
  "checkout",
491
549
  "invoice_payment",
492
- "payment_method_invoice",
493
- "mandate_setup"
550
+ "payment_method_invoice"
494
551
  ]
495
552
  },
496
553
  "invoice_id": {
@@ -593,32 +650,9 @@
593
650
  },
594
651
  "then": {
595
652
  "properties": {
596
- "state": {
597
- "enum": [
598
- "held",
599
- "payment_started"
600
- ]
601
- }
602
- }
603
- }
604
- },
605
- {
606
- "if": {
607
- "properties": {
608
- "operation": {
609
- "const": "mandate_setup"
610
- },
611
653
  "state": {
612
654
  "const": "held"
613
- }
614
- },
615
- "required": [
616
- "operation",
617
- "state"
618
- ]
619
- },
620
- "then": {
621
- "properties": {
655
+ },
622
656
  "reason": {
623
657
  "const": "mandate_policy_unresolved"
624
658
  }
@@ -30,26 +30,71 @@
30
30
  "additionalProperties": false
31
31
  },
32
32
  {
33
- "type": "object",
34
- "properties": {
35
- "state": {
36
- "type": "string",
37
- "const": "pending"
33
+ "oneOf": [
34
+ {
35
+ "type": "object",
36
+ "properties": {
37
+ "state": {
38
+ "type": "string",
39
+ "const": "pending"
40
+ },
41
+ "reason": {
42
+ "type": "string",
43
+ "const": "vies_unavailable"
44
+ },
45
+ "vies_outage": {
46
+ "type": "object",
47
+ "properties": {
48
+ "scope": {
49
+ "type": "string",
50
+ "enum": [
51
+ "member_state",
52
+ "vies"
53
+ ],
54
+ "description": "`member_state`: the VAT register of `country` does not answer VIES. `vies`: VIES itself does not answer."
55
+ },
56
+ "country": {
57
+ "type": "string",
58
+ "pattern": "^[A-Z]{2}$",
59
+ "description": "The billing address's country whose VAT ID was asked for. Greece is `GR`, never VIES's `EL`."
60
+ }
61
+ },
62
+ "required": [
63
+ "scope",
64
+ "country"
65
+ ],
66
+ "additionalProperties": false
67
+ }
68
+ },
69
+ "required": [
70
+ "state",
71
+ "reason",
72
+ "vies_outage"
73
+ ],
74
+ "additionalProperties": false
38
75
  },
39
- "reason": {
40
- "type": "string",
41
- "enum": [
42
- "vies_unavailable",
43
- "vies_unverified",
44
- "vies_identifier_missing"
45
- ]
76
+ {
77
+ "type": "object",
78
+ "properties": {
79
+ "state": {
80
+ "type": "string",
81
+ "const": "pending"
82
+ },
83
+ "reason": {
84
+ "type": "string",
85
+ "enum": [
86
+ "vies_unverified",
87
+ "vies_identifier_missing"
88
+ ]
89
+ }
90
+ },
91
+ "required": [
92
+ "state",
93
+ "reason"
94
+ ],
95
+ "additionalProperties": false
46
96
  }
47
- },
48
- "required": [
49
- "state",
50
- "reason"
51
- ],
52
- "additionalProperties": false
97
+ ]
53
98
  },
54
99
  {
55
100
  "type": "object",
@@ -73,50 +73,119 @@
73
73
  "additionalProperties": false
74
74
  },
75
75
  {
76
- "type": "object",
77
- "properties": {
78
- "vat_id": {
79
- "type": "string"
80
- },
81
- "name": {
82
- "anyOf": [
83
- {
76
+ "oneOf": [
77
+ {
78
+ "type": "object",
79
+ "properties": {
80
+ "vat_id": {
84
81
  "type": "string"
85
82
  },
86
- {
87
- "type": "null"
83
+ "name": {
84
+ "anyOf": [
85
+ {
86
+ "type": "string"
87
+ },
88
+ {
89
+ "type": "null"
90
+ }
91
+ ]
92
+ },
93
+ "state": {
94
+ "type": "string",
95
+ "const": "pending"
96
+ },
97
+ "status": {
98
+ "type": "string",
99
+ "enum": [
100
+ "valid",
101
+ "unverified",
102
+ "unavailable"
103
+ ]
104
+ },
105
+ "reason": {
106
+ "type": "string",
107
+ "const": "vies_unavailable"
108
+ },
109
+ "vies_outage": {
110
+ "type": "object",
111
+ "properties": {
112
+ "scope": {
113
+ "type": "string",
114
+ "enum": [
115
+ "member_state",
116
+ "vies"
117
+ ],
118
+ "description": "`member_state`: the VAT register of `country` does not answer VIES. `vies`: VIES itself does not answer."
119
+ },
120
+ "country": {
121
+ "type": "string",
122
+ "pattern": "^[A-Z]{2}$",
123
+ "description": "The billing address's country whose VAT ID was asked for. Greece is `GR`, never VIES's `EL`."
124
+ }
125
+ },
126
+ "required": [
127
+ "scope",
128
+ "country"
129
+ ],
130
+ "additionalProperties": false
88
131
  }
89
- ]
90
- },
91
- "state": {
92
- "type": "string",
93
- "const": "pending"
94
- },
95
- "status": {
96
- "type": "string",
97
- "enum": [
98
- "valid",
99
- "unverified",
100
- "unavailable"
101
- ]
132
+ },
133
+ "required": [
134
+ "vat_id",
135
+ "name",
136
+ "state",
137
+ "status",
138
+ "reason",
139
+ "vies_outage"
140
+ ],
141
+ "additionalProperties": false
102
142
  },
103
- "reason": {
104
- "type": "string",
105
- "enum": [
106
- "vies_unavailable",
107
- "vies_unverified",
108
- "vies_identifier_missing"
109
- ]
143
+ {
144
+ "type": "object",
145
+ "properties": {
146
+ "vat_id": {
147
+ "type": "string"
148
+ },
149
+ "name": {
150
+ "anyOf": [
151
+ {
152
+ "type": "string"
153
+ },
154
+ {
155
+ "type": "null"
156
+ }
157
+ ]
158
+ },
159
+ "state": {
160
+ "type": "string",
161
+ "const": "pending"
162
+ },
163
+ "status": {
164
+ "type": "string",
165
+ "enum": [
166
+ "valid",
167
+ "unverified",
168
+ "unavailable"
169
+ ]
170
+ },
171
+ "reason": {
172
+ "type": "string",
173
+ "enum": [
174
+ "vies_unverified",
175
+ "vies_identifier_missing"
176
+ ]
177
+ }
178
+ },
179
+ "required": [
180
+ "vat_id",
181
+ "name",
182
+ "state",
183
+ "status",
184
+ "reason"
185
+ ],
186
+ "additionalProperties": false
110
187
  }
111
- },
112
- "required": [
113
- "vat_id",
114
- "name",
115
- "state",
116
- "status",
117
- "reason"
118
- ],
119
- "additionalProperties": false
188
+ ]
120
189
  }
121
190
  ]
122
191
  }
@@ -0,0 +1,24 @@
1
+ {
2
+ "$schema": "https://json-schema.org/draft/2020-12/schema",
3
+ "type": "object",
4
+ "properties": {
5
+ "scope": {
6
+ "type": "string",
7
+ "enum": [
8
+ "member_state",
9
+ "vies"
10
+ ],
11
+ "description": "`member_state`: the VAT register of `country` does not answer VIES. `vies`: VIES itself does not answer."
12
+ },
13
+ "country": {
14
+ "type": "string",
15
+ "pattern": "^[A-Z]{2}$",
16
+ "description": "The billing address's country whose VAT ID was asked for. Greece is `GR`, never VIES's `EL`."
17
+ }
18
+ },
19
+ "required": [
20
+ "scope",
21
+ "country"
22
+ ],
23
+ "additionalProperties": false
24
+ }
@@ -1,28 +1,78 @@
1
1
  {
2
2
  "$schema": "https://json-schema.org/draft/2020-12/schema",
3
- "type": "object",
4
- "properties": {
5
- "field": {
6
- "type": "string",
7
- "const": "billing.vat_id"
3
+ "oneOf": [
4
+ {
5
+ "type": "object",
6
+ "properties": {
7
+ "field": {
8
+ "type": "string",
9
+ "const": "billing.vat_id"
10
+ },
11
+ "rule": {
12
+ "type": "string",
13
+ "const": "vies_unavailable"
14
+ },
15
+ "reason": {
16
+ "type": "string",
17
+ "const": "vies_unavailable"
18
+ },
19
+ "vies_outage": {
20
+ "type": "object",
21
+ "properties": {
22
+ "scope": {
23
+ "type": "string",
24
+ "enum": [
25
+ "member_state",
26
+ "vies"
27
+ ],
28
+ "description": "`member_state`: the VAT register of `country` does not answer VIES. `vies`: VIES itself does not answer."
29
+ },
30
+ "country": {
31
+ "type": "string",
32
+ "pattern": "^[A-Z]{2}$",
33
+ "description": "The billing address's country whose VAT ID was asked for. Greece is `GR`, never VIES's `EL`."
34
+ }
35
+ },
36
+ "required": [
37
+ "scope",
38
+ "country"
39
+ ],
40
+ "additionalProperties": false
41
+ }
42
+ },
43
+ "required": [
44
+ "field",
45
+ "rule",
46
+ "reason",
47
+ "vies_outage"
48
+ ],
49
+ "additionalProperties": false
8
50
  },
9
- "rule": {
10
- "type": "string",
11
- "const": "vies_unavailable"
12
- },
13
- "reason": {
14
- "type": "string",
15
- "enum": [
16
- "vies_unavailable",
17
- "vies_unverified",
18
- "vies_identifier_missing"
19
- ]
51
+ {
52
+ "type": "object",
53
+ "properties": {
54
+ "field": {
55
+ "type": "string",
56
+ "const": "billing.vat_id"
57
+ },
58
+ "rule": {
59
+ "type": "string",
60
+ "const": "vies_unavailable"
61
+ },
62
+ "reason": {
63
+ "type": "string",
64
+ "enum": [
65
+ "vies_unverified",
66
+ "vies_identifier_missing"
67
+ ]
68
+ }
69
+ },
70
+ "required": [
71
+ "field",
72
+ "rule",
73
+ "reason"
74
+ ],
75
+ "additionalProperties": false
20
76
  }
21
- },
22
- "required": [
23
- "field",
24
- "rule",
25
- "reason"
26
- ],
27
- "additionalProperties": false
77
+ ]
28
78
  }