@spaceinvoices/react-ui 0.4.0 → 0.4.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/cli/dist/index.js +1 -1
- package/package.json +1 -1
- package/registry.json +0 -29
- package/src/components/entities/furs-settings-form/sections/premises-management-section.tsx +1 -0
- package/src/components/entities/furs-settings-form/sections/register-premise-dialog.tsx +44 -32
- package/src/generate-schemas.ts +13 -1
- package/src/generated/schemas/advanceinvoice.ts +79 -187
- package/src/generated/schemas/creditnote.ts +60 -86
- package/src/generated/schemas/customadvanceinvoice.ts +70 -97
- package/src/generated/schemas/customcreditnote.ts +70 -97
- package/src/generated/schemas/customestimate.ts +68 -97
- package/src/generated/schemas/custominvoice.ts +70 -97
- package/src/generated/schemas/estimate.ts +67 -172
- package/src/generated/schemas/invoice.ts +79 -187
- package/src/generated/schemas/registerfursrealestatepremise_body.ts +11 -7
- package/src/generated/schemas/renderadvanceinvoicepreview_body.ts +61 -157
- package/src/generated/schemas/rendercreditnotepreview_body.ts +61 -157
- package/src/generated/schemas/renderestimatepreview_body.ts +61 -157
- package/src/generated/schemas/renderinvoicepreview_body.ts +61 -157
|
@@ -15,6 +15,56 @@ const LineDiscount = z.object({
|
|
|
15
15
|
});
|
|
16
16
|
|
|
17
17
|
|
|
18
|
+
// Dependency schema for rendercreditnotepreview_body
|
|
19
|
+
const DocumentItemTax = z
|
|
20
|
+
.object({
|
|
21
|
+
rate: z.number(),
|
|
22
|
+
tax_id: z.string(),
|
|
23
|
+
classification: z.string(),
|
|
24
|
+
reverse_charge: z.boolean(),
|
|
25
|
+
amount: z.number(),
|
|
26
|
+
})
|
|
27
|
+
.partial();
|
|
28
|
+
|
|
29
|
+
|
|
30
|
+
// Dependency schema for rendercreditnotepreview_body
|
|
31
|
+
const DocumentEntity = z
|
|
32
|
+
.object({
|
|
33
|
+
name: z.union([z.string(), z.null()]),
|
|
34
|
+
email: z.union([z.string(), z.null()]),
|
|
35
|
+
address: z.union([z.string(), z.null()]),
|
|
36
|
+
address_2: z.union([z.string(), z.null()]),
|
|
37
|
+
post_code: z.union([z.string(), z.null()]),
|
|
38
|
+
city: z.union([z.string(), z.null()]),
|
|
39
|
+
state: z.union([z.string(), z.null()]),
|
|
40
|
+
country: z.union([z.string(), z.null()]),
|
|
41
|
+
country_code: z.union([z.string(), z.null()]),
|
|
42
|
+
tax_number: z.union([z.string(), z.null()]),
|
|
43
|
+
tax_number_2: z.union([z.string(), z.null()]),
|
|
44
|
+
company_number: z.union([z.string(), z.null()]),
|
|
45
|
+
bank_account: z.union([
|
|
46
|
+
z
|
|
47
|
+
.object({
|
|
48
|
+
type: z
|
|
49
|
+
.enum(["iban", "us_domestic", "uk_domestic", "other"])
|
|
50
|
+
.default("iban"),
|
|
51
|
+
name: z.string(),
|
|
52
|
+
bank_name: z.string(),
|
|
53
|
+
iban: z.string(),
|
|
54
|
+
account_number: z.string(),
|
|
55
|
+
bic: z.string(),
|
|
56
|
+
routing_number: z.string(),
|
|
57
|
+
sort_code: z.string(),
|
|
58
|
+
})
|
|
59
|
+
.partial()
|
|
60
|
+
.passthrough(),
|
|
61
|
+
z.null(),
|
|
62
|
+
]),
|
|
63
|
+
})
|
|
64
|
+
.partial()
|
|
65
|
+
.passthrough();
|
|
66
|
+
|
|
67
|
+
|
|
18
68
|
// Dependency schema for rendercreditnotepreview_body
|
|
19
69
|
const CompleteCreditNotePreview = z.object({
|
|
20
70
|
is_draft: z.boolean().optional(),
|
|
@@ -22,84 +72,17 @@ const CompleteCreditNotePreview = z.object({
|
|
|
22
72
|
.string()
|
|
23
73
|
.regex(/^\d{4}-\d{2}-\d{2}(T\d{2}:\d{2}:\d{2}(\.\d{3})?Z?)?$/)
|
|
24
74
|
.optional(),
|
|
25
|
-
issuer:
|
|
26
|
-
.object({
|
|
27
|
-
name: z.union([z.string(), z.null()]),
|
|
28
|
-
email: z.union([z.string(), z.null()]),
|
|
29
|
-
address: z.union([z.string(), z.null()]),
|
|
30
|
-
address_2: z.union([z.string(), z.null()]),
|
|
31
|
-
post_code: z.union([z.string(), z.null()]),
|
|
32
|
-
city: z.union([z.string(), z.null()]),
|
|
33
|
-
state: z.union([z.string(), z.null()]),
|
|
34
|
-
country: z.union([z.string(), z.null()]),
|
|
35
|
-
country_code: z.union([z.string(), z.null()]),
|
|
36
|
-
tax_number: z.union([z.string(), z.null()]),
|
|
37
|
-
tax_number_2: z.union([z.string(), z.null()]),
|
|
38
|
-
company_number: z.union([z.string(), z.null()]),
|
|
39
|
-
bank_account: z.union([
|
|
40
|
-
z
|
|
41
|
-
.object({
|
|
42
|
-
type: z
|
|
43
|
-
.enum(["iban", "us_domestic", "uk_domestic", "other"])
|
|
44
|
-
.default("iban"),
|
|
45
|
-
name: z.string(),
|
|
46
|
-
bank_name: z.string(),
|
|
47
|
-
iban: z.string(),
|
|
48
|
-
account_number: z.string(),
|
|
49
|
-
bic: z.string(),
|
|
50
|
-
routing_number: z.string(),
|
|
51
|
-
sort_code: z.string(),
|
|
52
|
-
})
|
|
53
|
-
.partial()
|
|
54
|
-
.passthrough(),
|
|
55
|
-
z.null(),
|
|
56
|
-
]),
|
|
57
|
-
})
|
|
58
|
-
.partial()
|
|
59
|
-
.passthrough()
|
|
60
|
-
.optional(),
|
|
75
|
+
issuer: DocumentEntity.optional(),
|
|
61
76
|
customer_id: z.union([z.string(), z.null()]).optional(),
|
|
62
|
-
customer:
|
|
63
|
-
.union([
|
|
77
|
+
customer: DocumentEntity.and(
|
|
78
|
+
z.union([
|
|
64
79
|
z
|
|
65
|
-
.object({
|
|
66
|
-
name: z.union([z.string(), z.null()]),
|
|
67
|
-
email: z.union([z.string(), z.null()]),
|
|
68
|
-
address: z.union([z.string(), z.null()]),
|
|
69
|
-
address_2: z.union([z.string(), z.null()]),
|
|
70
|
-
post_code: z.union([z.string(), z.null()]),
|
|
71
|
-
city: z.union([z.string(), z.null()]),
|
|
72
|
-
state: z.union([z.string(), z.null()]),
|
|
73
|
-
country: z.union([z.string(), z.null()]),
|
|
74
|
-
country_code: z.union([z.string(), z.null()]),
|
|
75
|
-
tax_number: z.union([z.string(), z.null()]),
|
|
76
|
-
tax_number_2: z.union([z.string(), z.null()]),
|
|
77
|
-
company_number: z.union([z.string(), z.null()]),
|
|
78
|
-
bank_account: z.union([
|
|
79
|
-
z
|
|
80
|
-
.object({
|
|
81
|
-
type: z
|
|
82
|
-
.enum(["iban", "us_domestic", "uk_domestic", "other"])
|
|
83
|
-
.default("iban"),
|
|
84
|
-
name: z.string(),
|
|
85
|
-
bank_name: z.string(),
|
|
86
|
-
iban: z.string(),
|
|
87
|
-
account_number: z.string(),
|
|
88
|
-
bic: z.string(),
|
|
89
|
-
routing_number: z.string(),
|
|
90
|
-
sort_code: z.string(),
|
|
91
|
-
})
|
|
92
|
-
.partial()
|
|
93
|
-
.passthrough(),
|
|
94
|
-
z.null(),
|
|
95
|
-
]),
|
|
96
|
-
save_customer: z.boolean().default(true),
|
|
97
|
-
})
|
|
80
|
+
.object({ save_customer: z.boolean().default(true) })
|
|
98
81
|
.partial()
|
|
99
82
|
.passthrough(),
|
|
100
83
|
z.null(),
|
|
101
84
|
])
|
|
102
|
-
|
|
85
|
+
).optional(),
|
|
103
86
|
note: z.union([z.string(), z.null()]).optional(),
|
|
104
87
|
payment_terms: z.union([z.string(), z.null()]).optional(),
|
|
105
88
|
tax_clause: z.union([z.string(), z.null()]).optional(),
|
|
@@ -117,19 +100,7 @@ const CompleteCreditNotePreview = z.object({
|
|
|
117
100
|
gross_price: z.number().optional(),
|
|
118
101
|
quantity: z.number().gte(-140737488355328).lte(140737488355327),
|
|
119
102
|
unit: z.union([z.string(), z.null()]).optional(),
|
|
120
|
-
taxes: z
|
|
121
|
-
.array(
|
|
122
|
-
z
|
|
123
|
-
.object({
|
|
124
|
-
rate: z.number(),
|
|
125
|
-
tax_id: z.string(),
|
|
126
|
-
classification: z.string(),
|
|
127
|
-
reverse_charge: z.boolean(),
|
|
128
|
-
amount: z.number(),
|
|
129
|
-
})
|
|
130
|
-
.partial()
|
|
131
|
-
)
|
|
132
|
-
.optional(),
|
|
103
|
+
taxes: z.array(DocumentItemTax).optional(),
|
|
133
104
|
discounts: z.array(LineDiscount).max(5).optional(),
|
|
134
105
|
metadata: z
|
|
135
106
|
.union([
|
|
@@ -189,84 +160,17 @@ const PartialCreditNotePreview = z.object({
|
|
|
189
160
|
.string()
|
|
190
161
|
.regex(/^\d{4}-\d{2}-\d{2}(T\d{2}:\d{2}:\d{2}(\.\d{3})?Z?)?$/)
|
|
191
162
|
.optional(),
|
|
192
|
-
issuer:
|
|
193
|
-
.object({
|
|
194
|
-
name: z.union([z.string(), z.null()]),
|
|
195
|
-
email: z.union([z.string(), z.null()]),
|
|
196
|
-
address: z.union([z.string(), z.null()]),
|
|
197
|
-
address_2: z.union([z.string(), z.null()]),
|
|
198
|
-
post_code: z.union([z.string(), z.null()]),
|
|
199
|
-
city: z.union([z.string(), z.null()]),
|
|
200
|
-
state: z.union([z.string(), z.null()]),
|
|
201
|
-
country: z.union([z.string(), z.null()]),
|
|
202
|
-
country_code: z.union([z.string(), z.null()]),
|
|
203
|
-
tax_number: z.union([z.string(), z.null()]),
|
|
204
|
-
tax_number_2: z.union([z.string(), z.null()]),
|
|
205
|
-
company_number: z.union([z.string(), z.null()]),
|
|
206
|
-
bank_account: z.union([
|
|
207
|
-
z
|
|
208
|
-
.object({
|
|
209
|
-
type: z
|
|
210
|
-
.enum(["iban", "us_domestic", "uk_domestic", "other"])
|
|
211
|
-
.default("iban"),
|
|
212
|
-
name: z.string(),
|
|
213
|
-
bank_name: z.string(),
|
|
214
|
-
iban: z.string(),
|
|
215
|
-
account_number: z.string(),
|
|
216
|
-
bic: z.string(),
|
|
217
|
-
routing_number: z.string(),
|
|
218
|
-
sort_code: z.string(),
|
|
219
|
-
})
|
|
220
|
-
.partial()
|
|
221
|
-
.passthrough(),
|
|
222
|
-
z.null(),
|
|
223
|
-
]),
|
|
224
|
-
})
|
|
225
|
-
.partial()
|
|
226
|
-
.passthrough()
|
|
227
|
-
.optional(),
|
|
163
|
+
issuer: DocumentEntity.optional(),
|
|
228
164
|
customer_id: z.union([z.string(), z.null()]).optional(),
|
|
229
|
-
customer:
|
|
230
|
-
.union([
|
|
165
|
+
customer: DocumentEntity.and(
|
|
166
|
+
z.union([
|
|
231
167
|
z
|
|
232
|
-
.object({
|
|
233
|
-
name: z.union([z.string(), z.null()]),
|
|
234
|
-
email: z.union([z.string(), z.null()]),
|
|
235
|
-
address: z.union([z.string(), z.null()]),
|
|
236
|
-
address_2: z.union([z.string(), z.null()]),
|
|
237
|
-
post_code: z.union([z.string(), z.null()]),
|
|
238
|
-
city: z.union([z.string(), z.null()]),
|
|
239
|
-
state: z.union([z.string(), z.null()]),
|
|
240
|
-
country: z.union([z.string(), z.null()]),
|
|
241
|
-
country_code: z.union([z.string(), z.null()]),
|
|
242
|
-
tax_number: z.union([z.string(), z.null()]),
|
|
243
|
-
tax_number_2: z.union([z.string(), z.null()]),
|
|
244
|
-
company_number: z.union([z.string(), z.null()]),
|
|
245
|
-
bank_account: z.union([
|
|
246
|
-
z
|
|
247
|
-
.object({
|
|
248
|
-
type: z
|
|
249
|
-
.enum(["iban", "us_domestic", "uk_domestic", "other"])
|
|
250
|
-
.default("iban"),
|
|
251
|
-
name: z.string(),
|
|
252
|
-
bank_name: z.string(),
|
|
253
|
-
iban: z.string(),
|
|
254
|
-
account_number: z.string(),
|
|
255
|
-
bic: z.string(),
|
|
256
|
-
routing_number: z.string(),
|
|
257
|
-
sort_code: z.string(),
|
|
258
|
-
})
|
|
259
|
-
.partial()
|
|
260
|
-
.passthrough(),
|
|
261
|
-
z.null(),
|
|
262
|
-
]),
|
|
263
|
-
save_customer: z.boolean().default(true),
|
|
264
|
-
})
|
|
168
|
+
.object({ save_customer: z.boolean().default(true) })
|
|
265
169
|
.partial()
|
|
266
170
|
.passthrough(),
|
|
267
171
|
z.null(),
|
|
268
172
|
])
|
|
269
|
-
|
|
173
|
+
).optional(),
|
|
270
174
|
note: z.union([z.string(), z.null()]).optional(),
|
|
271
175
|
payment_terms: z.union([z.string(), z.null()]).optional(),
|
|
272
176
|
tax_clause: z.union([z.string(), z.null()]).optional(),
|
|
@@ -15,6 +15,56 @@ const LineDiscount = z.object({
|
|
|
15
15
|
});
|
|
16
16
|
|
|
17
17
|
|
|
18
|
+
// Dependency schema for renderestimatepreview_body
|
|
19
|
+
const DocumentItemTax = z
|
|
20
|
+
.object({
|
|
21
|
+
rate: z.number(),
|
|
22
|
+
tax_id: z.string(),
|
|
23
|
+
classification: z.string(),
|
|
24
|
+
reverse_charge: z.boolean(),
|
|
25
|
+
amount: z.number(),
|
|
26
|
+
})
|
|
27
|
+
.partial();
|
|
28
|
+
|
|
29
|
+
|
|
30
|
+
// Dependency schema for renderestimatepreview_body
|
|
31
|
+
const DocumentEntity = z
|
|
32
|
+
.object({
|
|
33
|
+
name: z.union([z.string(), z.null()]),
|
|
34
|
+
email: z.union([z.string(), z.null()]),
|
|
35
|
+
address: z.union([z.string(), z.null()]),
|
|
36
|
+
address_2: z.union([z.string(), z.null()]),
|
|
37
|
+
post_code: z.union([z.string(), z.null()]),
|
|
38
|
+
city: z.union([z.string(), z.null()]),
|
|
39
|
+
state: z.union([z.string(), z.null()]),
|
|
40
|
+
country: z.union([z.string(), z.null()]),
|
|
41
|
+
country_code: z.union([z.string(), z.null()]),
|
|
42
|
+
tax_number: z.union([z.string(), z.null()]),
|
|
43
|
+
tax_number_2: z.union([z.string(), z.null()]),
|
|
44
|
+
company_number: z.union([z.string(), z.null()]),
|
|
45
|
+
bank_account: z.union([
|
|
46
|
+
z
|
|
47
|
+
.object({
|
|
48
|
+
type: z
|
|
49
|
+
.enum(["iban", "us_domestic", "uk_domestic", "other"])
|
|
50
|
+
.default("iban"),
|
|
51
|
+
name: z.string(),
|
|
52
|
+
bank_name: z.string(),
|
|
53
|
+
iban: z.string(),
|
|
54
|
+
account_number: z.string(),
|
|
55
|
+
bic: z.string(),
|
|
56
|
+
routing_number: z.string(),
|
|
57
|
+
sort_code: z.string(),
|
|
58
|
+
})
|
|
59
|
+
.partial()
|
|
60
|
+
.passthrough(),
|
|
61
|
+
z.null(),
|
|
62
|
+
]),
|
|
63
|
+
})
|
|
64
|
+
.partial()
|
|
65
|
+
.passthrough();
|
|
66
|
+
|
|
67
|
+
|
|
18
68
|
// Dependency schema for renderestimatepreview_body
|
|
19
69
|
const CompleteEstimatePreview = z.object({
|
|
20
70
|
is_draft: z.boolean().optional(),
|
|
@@ -22,84 +72,17 @@ const CompleteEstimatePreview = z.object({
|
|
|
22
72
|
.string()
|
|
23
73
|
.regex(/^\d{4}-\d{2}-\d{2}(T\d{2}:\d{2}:\d{2}(\.\d{3})?Z?)?$/)
|
|
24
74
|
.optional(),
|
|
25
|
-
issuer:
|
|
26
|
-
.object({
|
|
27
|
-
name: z.union([z.string(), z.null()]),
|
|
28
|
-
email: z.union([z.string(), z.null()]),
|
|
29
|
-
address: z.union([z.string(), z.null()]),
|
|
30
|
-
address_2: z.union([z.string(), z.null()]),
|
|
31
|
-
post_code: z.union([z.string(), z.null()]),
|
|
32
|
-
city: z.union([z.string(), z.null()]),
|
|
33
|
-
state: z.union([z.string(), z.null()]),
|
|
34
|
-
country: z.union([z.string(), z.null()]),
|
|
35
|
-
country_code: z.union([z.string(), z.null()]),
|
|
36
|
-
tax_number: z.union([z.string(), z.null()]),
|
|
37
|
-
tax_number_2: z.union([z.string(), z.null()]),
|
|
38
|
-
company_number: z.union([z.string(), z.null()]),
|
|
39
|
-
bank_account: z.union([
|
|
40
|
-
z
|
|
41
|
-
.object({
|
|
42
|
-
type: z
|
|
43
|
-
.enum(["iban", "us_domestic", "uk_domestic", "other"])
|
|
44
|
-
.default("iban"),
|
|
45
|
-
name: z.string(),
|
|
46
|
-
bank_name: z.string(),
|
|
47
|
-
iban: z.string(),
|
|
48
|
-
account_number: z.string(),
|
|
49
|
-
bic: z.string(),
|
|
50
|
-
routing_number: z.string(),
|
|
51
|
-
sort_code: z.string(),
|
|
52
|
-
})
|
|
53
|
-
.partial()
|
|
54
|
-
.passthrough(),
|
|
55
|
-
z.null(),
|
|
56
|
-
]),
|
|
57
|
-
})
|
|
58
|
-
.partial()
|
|
59
|
-
.passthrough()
|
|
60
|
-
.optional(),
|
|
75
|
+
issuer: DocumentEntity.optional(),
|
|
61
76
|
customer_id: z.union([z.string(), z.null()]).optional(),
|
|
62
|
-
customer:
|
|
63
|
-
.union([
|
|
77
|
+
customer: DocumentEntity.and(
|
|
78
|
+
z.union([
|
|
64
79
|
z
|
|
65
|
-
.object({
|
|
66
|
-
name: z.union([z.string(), z.null()]),
|
|
67
|
-
email: z.union([z.string(), z.null()]),
|
|
68
|
-
address: z.union([z.string(), z.null()]),
|
|
69
|
-
address_2: z.union([z.string(), z.null()]),
|
|
70
|
-
post_code: z.union([z.string(), z.null()]),
|
|
71
|
-
city: z.union([z.string(), z.null()]),
|
|
72
|
-
state: z.union([z.string(), z.null()]),
|
|
73
|
-
country: z.union([z.string(), z.null()]),
|
|
74
|
-
country_code: z.union([z.string(), z.null()]),
|
|
75
|
-
tax_number: z.union([z.string(), z.null()]),
|
|
76
|
-
tax_number_2: z.union([z.string(), z.null()]),
|
|
77
|
-
company_number: z.union([z.string(), z.null()]),
|
|
78
|
-
bank_account: z.union([
|
|
79
|
-
z
|
|
80
|
-
.object({
|
|
81
|
-
type: z
|
|
82
|
-
.enum(["iban", "us_domestic", "uk_domestic", "other"])
|
|
83
|
-
.default("iban"),
|
|
84
|
-
name: z.string(),
|
|
85
|
-
bank_name: z.string(),
|
|
86
|
-
iban: z.string(),
|
|
87
|
-
account_number: z.string(),
|
|
88
|
-
bic: z.string(),
|
|
89
|
-
routing_number: z.string(),
|
|
90
|
-
sort_code: z.string(),
|
|
91
|
-
})
|
|
92
|
-
.partial()
|
|
93
|
-
.passthrough(),
|
|
94
|
-
z.null(),
|
|
95
|
-
]),
|
|
96
|
-
save_customer: z.boolean().default(true),
|
|
97
|
-
})
|
|
80
|
+
.object({ save_customer: z.boolean().default(true) })
|
|
98
81
|
.partial()
|
|
99
82
|
.passthrough(),
|
|
100
83
|
z.null(),
|
|
101
84
|
])
|
|
102
|
-
|
|
85
|
+
).optional(),
|
|
103
86
|
note: z.union([z.string(), z.null()]).optional(),
|
|
104
87
|
payment_terms: z.union([z.string(), z.null()]).optional(),
|
|
105
88
|
tax_clause: z.union([z.string(), z.null()]).optional(),
|
|
@@ -119,19 +102,7 @@ const CompleteEstimatePreview = z.object({
|
|
|
119
102
|
gross_price: z.number().optional(),
|
|
120
103
|
quantity: z.number().gte(-140737488355328).lte(140737488355327),
|
|
121
104
|
unit: z.union([z.string(), z.null()]).optional(),
|
|
122
|
-
taxes: z
|
|
123
|
-
.array(
|
|
124
|
-
z
|
|
125
|
-
.object({
|
|
126
|
-
rate: z.number(),
|
|
127
|
-
tax_id: z.string(),
|
|
128
|
-
classification: z.string(),
|
|
129
|
-
reverse_charge: z.boolean(),
|
|
130
|
-
amount: z.number(),
|
|
131
|
-
})
|
|
132
|
-
.partial()
|
|
133
|
-
)
|
|
134
|
-
.optional(),
|
|
105
|
+
taxes: z.array(DocumentItemTax).optional(),
|
|
135
106
|
discounts: z.array(LineDiscount).max(5).optional(),
|
|
136
107
|
metadata: z
|
|
137
108
|
.union([
|
|
@@ -159,84 +130,17 @@ const PartialEstimatePreview = z.object({
|
|
|
159
130
|
.string()
|
|
160
131
|
.regex(/^\d{4}-\d{2}-\d{2}(T\d{2}:\d{2}:\d{2}(\.\d{3})?Z?)?$/)
|
|
161
132
|
.optional(),
|
|
162
|
-
issuer:
|
|
163
|
-
.object({
|
|
164
|
-
name: z.union([z.string(), z.null()]),
|
|
165
|
-
email: z.union([z.string(), z.null()]),
|
|
166
|
-
address: z.union([z.string(), z.null()]),
|
|
167
|
-
address_2: z.union([z.string(), z.null()]),
|
|
168
|
-
post_code: z.union([z.string(), z.null()]),
|
|
169
|
-
city: z.union([z.string(), z.null()]),
|
|
170
|
-
state: z.union([z.string(), z.null()]),
|
|
171
|
-
country: z.union([z.string(), z.null()]),
|
|
172
|
-
country_code: z.union([z.string(), z.null()]),
|
|
173
|
-
tax_number: z.union([z.string(), z.null()]),
|
|
174
|
-
tax_number_2: z.union([z.string(), z.null()]),
|
|
175
|
-
company_number: z.union([z.string(), z.null()]),
|
|
176
|
-
bank_account: z.union([
|
|
177
|
-
z
|
|
178
|
-
.object({
|
|
179
|
-
type: z
|
|
180
|
-
.enum(["iban", "us_domestic", "uk_domestic", "other"])
|
|
181
|
-
.default("iban"),
|
|
182
|
-
name: z.string(),
|
|
183
|
-
bank_name: z.string(),
|
|
184
|
-
iban: z.string(),
|
|
185
|
-
account_number: z.string(),
|
|
186
|
-
bic: z.string(),
|
|
187
|
-
routing_number: z.string(),
|
|
188
|
-
sort_code: z.string(),
|
|
189
|
-
})
|
|
190
|
-
.partial()
|
|
191
|
-
.passthrough(),
|
|
192
|
-
z.null(),
|
|
193
|
-
]),
|
|
194
|
-
})
|
|
195
|
-
.partial()
|
|
196
|
-
.passthrough()
|
|
197
|
-
.optional(),
|
|
133
|
+
issuer: DocumentEntity.optional(),
|
|
198
134
|
customer_id: z.union([z.string(), z.null()]).optional(),
|
|
199
|
-
customer:
|
|
200
|
-
.union([
|
|
135
|
+
customer: DocumentEntity.and(
|
|
136
|
+
z.union([
|
|
201
137
|
z
|
|
202
|
-
.object({
|
|
203
|
-
name: z.union([z.string(), z.null()]),
|
|
204
|
-
email: z.union([z.string(), z.null()]),
|
|
205
|
-
address: z.union([z.string(), z.null()]),
|
|
206
|
-
address_2: z.union([z.string(), z.null()]),
|
|
207
|
-
post_code: z.union([z.string(), z.null()]),
|
|
208
|
-
city: z.union([z.string(), z.null()]),
|
|
209
|
-
state: z.union([z.string(), z.null()]),
|
|
210
|
-
country: z.union([z.string(), z.null()]),
|
|
211
|
-
country_code: z.union([z.string(), z.null()]),
|
|
212
|
-
tax_number: z.union([z.string(), z.null()]),
|
|
213
|
-
tax_number_2: z.union([z.string(), z.null()]),
|
|
214
|
-
company_number: z.union([z.string(), z.null()]),
|
|
215
|
-
bank_account: z.union([
|
|
216
|
-
z
|
|
217
|
-
.object({
|
|
218
|
-
type: z
|
|
219
|
-
.enum(["iban", "us_domestic", "uk_domestic", "other"])
|
|
220
|
-
.default("iban"),
|
|
221
|
-
name: z.string(),
|
|
222
|
-
bank_name: z.string(),
|
|
223
|
-
iban: z.string(),
|
|
224
|
-
account_number: z.string(),
|
|
225
|
-
bic: z.string(),
|
|
226
|
-
routing_number: z.string(),
|
|
227
|
-
sort_code: z.string(),
|
|
228
|
-
})
|
|
229
|
-
.partial()
|
|
230
|
-
.passthrough(),
|
|
231
|
-
z.null(),
|
|
232
|
-
]),
|
|
233
|
-
save_customer: z.boolean().default(true),
|
|
234
|
-
})
|
|
138
|
+
.object({ save_customer: z.boolean().default(true) })
|
|
235
139
|
.partial()
|
|
236
140
|
.passthrough(),
|
|
237
141
|
z.null(),
|
|
238
142
|
])
|
|
239
|
-
|
|
143
|
+
).optional(),
|
|
240
144
|
note: z.union([z.string(), z.null()]).optional(),
|
|
241
145
|
payment_terms: z.union([z.string(), z.null()]).optional(),
|
|
242
146
|
tax_clause: z.union([z.string(), z.null()]).optional(),
|