@fleetless/contracts 6.4.0 → 7.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.
Files changed (37) hide show
  1. package/CHANGELOG.md +42 -0
  2. package/artifacts/openapi.json +5805 -1805
  3. package/artifacts/routes.json +104 -17
  4. package/artifacts/schema/addon-catalogue-entry.schema.json +1 -15
  5. package/artifacts/schema/billing-address.schema.json +7 -1
  6. package/artifacts/schema/billing-change-request.schema.json +9 -0
  7. package/artifacts/schema/billing-change-response.schema.json +2219 -625
  8. package/artifacts/schema/billing-details-update.schema.json +70 -0
  9. package/artifacts/schema/billing-details.schema.json +27 -3
  10. package/artifacts/schema/billing-view.schema.json +56 -24
  11. package/artifacts/schema/checkout-request.schema.json +90 -154
  12. package/artifacts/schema/checkout-response.schema.json +531 -17
  13. package/artifacts/schema/invoice-pay-request.schema.json +16 -0
  14. package/artifacts/schema/payment-method-change-request.schema.json +7 -0
  15. package/artifacts/schema/plan-catalogue-entry.schema.json +1 -15
  16. package/artifacts/schema/plan-prices.schema.json +1 -15
  17. package/artifacts/schema/purchase-billing-details.schema.json +111 -0
  18. package/artifacts/schema/purchase-conflict-details.schema.json +582 -0
  19. package/artifacts/schema/purchase-hold-reason.schema.json +9 -0
  20. package/artifacts/schema/purchase-intent-confirm-request.schema.json +40 -0
  21. package/artifacts/schema/purchase-intent-lookup-query.schema.json +56 -0
  22. package/artifacts/schema/purchase-intent-response.schema.json +1554 -0
  23. package/artifacts/schema/purchase-operation-key.schema.json +7 -0
  24. package/artifacts/schema/purchase-operation.schema.json +11 -0
  25. package/artifacts/schema/purchase-quote.schema.json +43 -0
  26. package/artifacts/schema/purchase-refusal-rule.schema.json +13 -0
  27. package/artifacts/schema/vat-decision.schema.json +77 -0
  28. package/artifacts/schema/vat-id-check-response.schema.json +111 -25
  29. package/artifacts/schema/vies-pending-reason.schema.json +9 -0
  30. package/dist/billing.d.ts +1128 -75
  31. package/dist/billing.js +174 -66
  32. package/dist/index.d.ts +2 -0
  33. package/dist/index.js +1 -0
  34. package/dist/plans.d.ts +4 -9
  35. package/dist/plans.js +4 -7
  36. package/dist/routes.js +62 -64
  37. package/package.json +2 -2
package/dist/billing.d.ts CHANGED
@@ -1,6 +1,6 @@
1
1
  // SPDX-License-Identifier: Apache-2.0
2
2
  import { z } from 'zod';
3
- import { type AddonKey, type OrgAddons, type PlanCurrency, type PlanId } from './plans.js';
3
+ import { type AddonKey, type OrgAddons, type PlanId } from './plans.js';
4
4
  /**
5
5
  * Countries, VAT and the money math for billing through Mollie
6
6
  * (fleetless/fleetless#104).
@@ -22,8 +22,8 @@ export declare const SELLER_COUNTRY = "DE";
22
22
  export declare const DE_VAT_RATE_PERCENT = 19;
23
23
  /** Whether `country` is one of the 27 EU member states. */
24
24
  export declare function isEuCountry(country: string): boolean;
25
- /** EUR in the EU, USD elsewhere. */
26
- export declare function currencyForCountry(country: string): PlanCurrency;
25
+ /** All new purchase prices are EUR, independent of the billing country. */
26
+ export declare function currencyForCountry(_country: string): 'eur';
27
27
  /** Who is paying: a company (may hold a VAT ID) or a person (a full name, never a VAT ID). */
28
28
  export declare const payerKind: z.ZodEnum<{
29
29
  company: "company";
@@ -47,41 +47,61 @@ export declare const vatTreatment: z.ZodEnum<{
47
47
  outside_eu: "outside_eu";
48
48
  }>;
49
49
  export type VatTreatment = z.infer<typeof vatTreatment>;
50
- /**
51
- * Why `vatFor` refused a payer: `eu_person` (a person outside Germany, in
52
- * another EU country), `vat_id_required` (a company in another EU country
53
- * gave no VAT ID) or `vat_id_invalid` (VIES said the given VAT ID is
54
- * invalid).
55
- */
50
+ /** A refusal of a new paid purchase, never a restriction on free Basic. */
56
51
  export declare const payerRefusalRule: z.ZodEnum<{
57
- eu_person: "eu_person";
52
+ company_required: "company_required";
58
53
  vat_id_required: "vat_id_required";
59
54
  vat_id_invalid: "vat_id_invalid";
60
55
  }>;
61
56
  export type PayerRefusalRule = z.infer<typeof payerRefusalRule>;
62
- /** What `vatFor` decides: allowed with a treatment and rate, or refused with a rule. */
63
- export type VatDecision = {
64
- allowed: true;
65
- treatment: VatTreatment;
66
- rate_percent: number;
57
+ export declare const viesPendingReason: z.ZodEnum<{
58
+ vies_unavailable: "vies_unavailable";
59
+ vies_unverified: "vies_unverified";
60
+ vies_identifier_missing: "vies_identifier_missing";
61
+ }>;
62
+ export type ViesPendingReason = z.infer<typeof viesPendingReason>;
63
+ /** Internal decision input; the complete direct response stays in protected Finance storage. */
64
+ export type ViesVerdict = {
65
+ status: 'valid';
66
+ requestIdentifier?: string | null;
67
67
  } | {
68
- allowed: false;
69
- rule: PayerRefusalRule;
68
+ status: 'invalid' | 'unavailable' | 'unverified';
70
69
  };
70
+ export declare const vatDecision: z.ZodDiscriminatedUnion<[z.ZodObject<{
71
+ state: z.ZodLiteral<"eligible">;
72
+ treatment: z.ZodEnum<{
73
+ de_standard: "de_standard";
74
+ reverse_charge: "reverse_charge";
75
+ outside_eu: "outside_eu";
76
+ }>;
77
+ rate_percent: z.ZodNumber;
78
+ }, z.core.$strict>, z.ZodObject<{
79
+ state: z.ZodLiteral<"pending">;
80
+ reason: z.ZodEnum<{
81
+ vies_unavailable: "vies_unavailable";
82
+ vies_unverified: "vies_unverified";
83
+ vies_identifier_missing: "vies_identifier_missing";
84
+ }>;
85
+ }, z.core.$strict>, z.ZodObject<{
86
+ state: z.ZodLiteral<"refused">;
87
+ rule: z.ZodEnum<{
88
+ company_required: "company_required";
89
+ vat_id_required: "vat_id_required";
90
+ vat_id_invalid: "vat_id_invalid";
91
+ }>;
92
+ }, z.core.$strict>], "state">;
93
+ export type VatDecision = z.infer<typeof vatDecision>;
71
94
  /**
72
- * Who may pay, and the VAT they pay. `vatIdValid`: `null` = no VAT ID
73
- * given; `true` = VIES valid **or unverified** (VIES unreachable is
74
- * accepted); `false` = VIES said invalid.
75
- *
76
- * Germany is unconditional — company or person, VAT ID optional, 19 %
77
- * regardless of whether a given ID checks out. A German VAT ID's validity
78
- * never gates checkout, only the renewal sweep later (dunning);
79
- * `vatFor` only ever prices the charge in hand.
95
+ * New paid purchase VAT classification. `vies: null` means no VAT ID;
96
+ * unverified/unavailable means an ID was supplied but has no definitive evidence.
97
+ * Only a direct, current-buyer VIES verdict with an identifier permits reverse charge.
98
+ * Cloud separately validates complete purchase details and the current email policy,
99
+ * and binds the evidence to the buyer and quote under its charge lock.
80
100
  */
81
101
  export declare function vatFor(input: {
82
102
  kind: PayerKind;
83
103
  country: string;
84
- vatIdValid: boolean | null;
104
+ vies: ViesVerdict | null;
85
105
  }): VatDecision;
86
106
  /** VIES's member-state code: `EL` for `GR`, the country otherwise. */
87
107
  export declare function viesCountry(country: string): string;
@@ -103,7 +123,7 @@ export declare function periodNetCents(input: {
103
123
  plan: PlanId;
104
124
  addons: OrgAddons;
105
125
  cycle: BillingCycle;
106
- currency: PlanCurrency;
126
+ currency: 'eur';
107
127
  }): number;
108
128
  /** `Math.round(priceCents * remainingDays / periodDays)` — the one rounding every proration in this module uses. */
109
129
  export declare function prorateCents(priceCents: number, remainingDays: number, periodDays: number): number;
@@ -151,7 +171,7 @@ export interface BillingState {
151
171
  export declare function changeNetCents(input: {
152
172
  from: BillingState;
153
173
  to: BillingState;
154
- currency: PlanCurrency;
174
+ currency: 'eur';
155
175
  periodStart: Date;
156
176
  periodEnd: Date;
157
177
  now: Date;
@@ -167,7 +187,7 @@ export interface QuoteLine {
167
187
  export interface CheckoutQuote extends ChargeAmounts {
168
188
  lines: QuoteLine[];
169
189
  rate_percent: number;
170
- currency: PlanCurrency;
190
+ currency: 'eur';
171
191
  cycle: BillingCycle;
172
192
  }
173
193
  /**
@@ -184,20 +204,21 @@ export declare function checkoutQuote(input: {
184
204
  plan: 'plus' | 'pro';
185
205
  addons: OrgAddons;
186
206
  cycle: BillingCycle;
187
- currency: PlanCurrency;
207
+ currency: 'eur';
188
208
  rate_percent: number;
189
209
  }): CheckoutQuote;
190
210
  /** Dunning after a failed renewal: retries on these days after the charge's due date. */
191
211
  export declare const BILLING_RETRY_DAYS: readonly [3, 7];
192
212
  /** The day, after the charge's due date, the org is locked when still unpaid. */
193
213
  export declare const BILLING_LOCK_DAY = 14;
194
- /** A billing address. `country` gates VAT (`vatFor`) and currency (`currencyForCountry`). */
214
+ /** Historical address read and owner edit shape; purchase validation is stricter. */
195
215
  export declare const billingAddress: z.ZodObject<{
196
216
  line1: z.ZodString;
197
217
  line2: z.ZodNullable<z.ZodString>;
198
218
  postal_code: z.ZodString;
199
219
  city: z.ZodString;
200
220
  country: z.ZodString;
221
+ state: z.ZodOptional<z.ZodString>;
201
222
  }, z.core.$strict>;
202
223
  export type BillingAddress = z.infer<typeof billingAddress>;
203
224
  /**
@@ -212,12 +233,14 @@ export declare const billingDetails: z.ZodDiscriminatedUnion<[z.ZodObject<{
212
233
  kind: z.ZodLiteral<"company">;
213
234
  company_name: z.ZodString;
214
235
  vat_id: z.ZodNullable<z.ZodString>;
236
+ tax_id: z.ZodOptional<z.ZodNullable<z.ZodString>>;
215
237
  address: z.ZodObject<{
216
238
  line1: z.ZodString;
217
239
  line2: z.ZodNullable<z.ZodString>;
218
240
  postal_code: z.ZodString;
219
241
  city: z.ZodString;
220
242
  country: z.ZodString;
243
+ state: z.ZodOptional<z.ZodString>;
221
244
  }, z.core.$strict>;
222
245
  invoice_email: z.ZodEmail;
223
246
  }, z.core.$strict>, z.ZodObject<{
@@ -229,19 +252,41 @@ export declare const billingDetails: z.ZodDiscriminatedUnion<[z.ZodObject<{
229
252
  postal_code: z.ZodString;
230
253
  city: z.ZodString;
231
254
  country: z.ZodString;
255
+ state: z.ZodOptional<z.ZodString>;
232
256
  }, z.core.$strict>;
233
257
  invoice_email: z.ZodEmail;
234
258
  }, z.core.$strict>], "kind">;
235
259
  export type BillingDetails = z.infer<typeof billingDetails>;
236
- /**
237
- * `POST /api/billing/checkout`'s body: the plan and cycle to buy — Basic is
238
- * free and never checked out — optional add-ons (Pro only; named on `plus`,
239
- * or without `planFeature.addons`, is `400 validation_error`), the payer,
240
- * and the terms and withdrawal confirmations: `accept_terms` is
241
- * always required; `accept_withdrawal` is required for a person and refused
242
- * for a company, which has no consumer right of withdrawal to confirm.
243
- */
260
+ /** New paid write shape. Historical payer reads keep using `billingDetails`. */
261
+ export declare const purchaseBillingDetails: z.ZodObject<{
262
+ kind: z.ZodLiteral<"company">;
263
+ company_name: z.ZodString;
264
+ vat_id: z.ZodNullable<z.ZodString>;
265
+ tax_id: z.ZodOptional<z.ZodNullable<z.ZodString>>;
266
+ address: z.ZodObject<{
267
+ line1: z.ZodString;
268
+ line2: z.ZodNullable<z.ZodString>;
269
+ postal_code: z.ZodString;
270
+ city: z.ZodString;
271
+ country: z.ZodString;
272
+ state: z.ZodOptional<z.ZodString>;
273
+ }, z.core.$strict>;
274
+ invoice_email: z.ZodEmail;
275
+ }, z.core.$strict>;
276
+ export type PurchaseBillingDetails = z.infer<typeof purchaseBillingDetails>;
277
+ /** Generate before POST, persist across reloads; unique within the authenticated org. */
278
+ export declare const purchaseOperationKey: z.ZodUUID;
279
+ export declare const purchaseOperation: z.ZodEnum<{
280
+ checkout: "checkout";
281
+ paid_change: "paid_change";
282
+ invoice_payment: "invoice_payment";
283
+ payment_method_invoice: "payment_method_invoice";
284
+ mandate_setup: "mandate_setup";
285
+ }>;
286
+ export type PurchaseOperation = z.infer<typeof purchaseOperation>;
287
+ /** Starting a checkout records an intent; only confirming its current quote may create a payment. */
244
288
  export declare const checkoutRequest: z.ZodObject<{
289
+ operation_key: z.ZodUUID;
245
290
  plan: z.ZodEnum<{
246
291
  plus: "plus";
247
292
  pro: "pro";
@@ -257,40 +302,439 @@ export declare const checkoutRequest: z.ZodObject<{
257
302
  app_user_packs: z.ZodOptional<z.ZodNumber>;
258
303
  live_video_packs: z.ZodOptional<z.ZodNumber>;
259
304
  }, z.core.$strict>>;
260
- billing: z.ZodDiscriminatedUnion<[z.ZodObject<{
305
+ billing: z.ZodObject<{
261
306
  kind: z.ZodLiteral<"company">;
262
307
  company_name: z.ZodString;
263
308
  vat_id: z.ZodNullable<z.ZodString>;
309
+ tax_id: z.ZodOptional<z.ZodNullable<z.ZodString>>;
264
310
  address: z.ZodObject<{
265
311
  line1: z.ZodString;
266
312
  line2: z.ZodNullable<z.ZodString>;
267
313
  postal_code: z.ZodString;
268
314
  city: z.ZodString;
269
315
  country: z.ZodString;
316
+ state: z.ZodOptional<z.ZodString>;
270
317
  }, z.core.$strict>;
271
318
  invoice_email: z.ZodEmail;
272
- }, z.core.$strict>, z.ZodObject<{
273
- kind: z.ZodLiteral<"person">;
274
- full_name: z.ZodString;
275
- address: z.ZodObject<{
276
- line1: z.ZodString;
277
- line2: z.ZodNullable<z.ZodString>;
278
- postal_code: z.ZodString;
279
- city: z.ZodString;
280
- country: z.ZodString;
281
- }, z.core.$strict>;
282
- invoice_email: z.ZodEmail;
283
- }, z.core.$strict>], "kind">;
319
+ }, z.core.$strict>;
284
320
  accept_terms: z.ZodLiteral<true>;
285
- accept_withdrawal: z.ZodOptional<z.ZodLiteral<true>>;
286
321
  }, z.core.$strict>;
287
322
  export type CheckoutRequest = z.infer<typeof checkoutRequest>;
288
- /** `POST /api/billing/checkout`'s answer: where to send the caller's browser. */
289
- export declare const checkoutResponse: z.ZodObject<{
290
- checkout_id: z.ZodUUID;
291
- checkout_url: z.ZodURL;
292
- }, z.core.$strip>;
323
+ /** Current amount to confirm. Issued USD invoices must be held, never relabelled EUR. */
324
+ export declare const purchaseQuote: z.ZodObject<{
325
+ currency: z.ZodLiteral<"eur">;
326
+ net_cents: z.ZodNumber;
327
+ vat_cents: z.ZodNumber;
328
+ gross_cents: z.ZodNumber;
329
+ rate_percent: z.ZodNumber;
330
+ }, z.core.$strict>;
331
+ export type PurchaseQuote = z.infer<typeof purchaseQuote>;
332
+ export declare const purchaseHoldReason: z.ZodEnum<{
333
+ legacy_usd_invoice: "legacy_usd_invoice";
334
+ legacy_payer_unresolved: "legacy_payer_unresolved";
335
+ mandate_policy_unresolved: "mandate_policy_unresolved";
336
+ }>;
337
+ export declare const purchaseRefusalRule: z.ZodEnum<{
338
+ company_required: "company_required";
339
+ vat_id_required: "vat_id_required";
340
+ vat_id_invalid: "vat_id_invalid";
341
+ tax_id_required: "tax_id_required";
342
+ us_state_required: "us_state_required";
343
+ public_email_domain: "public_email_domain";
344
+ invoice_not_open: "invoice_not_open";
345
+ }>;
346
+ /** Public owner read. No unpaid state can contain a provider redirect. */
347
+ export declare const purchaseIntent: z.ZodDiscriminatedUnion<[z.ZodObject<{
348
+ state: z.ZodLiteral<"awaiting_vies">;
349
+ reason: z.ZodEnum<{
350
+ vies_unavailable: "vies_unavailable";
351
+ vies_unverified: "vies_unverified";
352
+ vies_identifier_missing: "vies_identifier_missing";
353
+ }>;
354
+ next_attempt_at: z.ZodISODateTime;
355
+ intent_id: z.ZodUUID;
356
+ operation_key: z.ZodUUID;
357
+ operation: z.ZodEnum<{
358
+ checkout: "checkout";
359
+ paid_change: "paid_change";
360
+ invoice_payment: "invoice_payment";
361
+ payment_method_invoice: "payment_method_invoice";
362
+ }>;
363
+ invoice_id: z.ZodOptional<z.ZodUUID>;
364
+ }, z.core.$strict>, z.ZodObject<{
365
+ state: z.ZodLiteral<"eligible">;
366
+ quote: z.ZodObject<{
367
+ currency: z.ZodLiteral<"eur">;
368
+ net_cents: z.ZodNumber;
369
+ vat_cents: z.ZodNumber;
370
+ gross_cents: z.ZodNumber;
371
+ rate_percent: z.ZodNumber;
372
+ }, z.core.$strict>;
373
+ quote_revision: z.ZodString;
374
+ buyer_fingerprint: z.ZodString;
375
+ intent_id: z.ZodUUID;
376
+ operation_key: z.ZodUUID;
377
+ operation: z.ZodEnum<{
378
+ checkout: "checkout";
379
+ paid_change: "paid_change";
380
+ invoice_payment: "invoice_payment";
381
+ payment_method_invoice: "payment_method_invoice";
382
+ }>;
383
+ invoice_id: z.ZodOptional<z.ZodUUID>;
384
+ }, z.core.$strict>, z.ZodObject<{
385
+ operation: z.ZodEnum<{
386
+ checkout: "checkout";
387
+ paid_change: "paid_change";
388
+ invoice_payment: "invoice_payment";
389
+ payment_method_invoice: "payment_method_invoice";
390
+ mandate_setup: "mandate_setup";
391
+ }>;
392
+ state: z.ZodLiteral<"held">;
393
+ reason: z.ZodEnum<{
394
+ legacy_usd_invoice: "legacy_usd_invoice";
395
+ legacy_payer_unresolved: "legacy_payer_unresolved";
396
+ mandate_policy_unresolved: "mandate_policy_unresolved";
397
+ }>;
398
+ original_amount: z.ZodOptional<z.ZodObject<{
399
+ currency: z.ZodEnum<{
400
+ eur: "eur";
401
+ usd: "usd";
402
+ }>;
403
+ gross_cents: z.ZodNumber;
404
+ }, z.core.$strict>>;
405
+ intent_id: z.ZodUUID;
406
+ operation_key: z.ZodUUID;
407
+ invoice_id: z.ZodOptional<z.ZodUUID>;
408
+ }, z.core.$strict>, z.ZodObject<{
409
+ state: z.ZodLiteral<"invalid_vat_id">;
410
+ field: z.ZodLiteral<"billing.vat_id">;
411
+ rule: z.ZodLiteral<"vat_id_invalid">;
412
+ intent_id: z.ZodUUID;
413
+ operation_key: z.ZodUUID;
414
+ operation: z.ZodEnum<{
415
+ checkout: "checkout";
416
+ paid_change: "paid_change";
417
+ invoice_payment: "invoice_payment";
418
+ payment_method_invoice: "payment_method_invoice";
419
+ }>;
420
+ invoice_id: z.ZodOptional<z.ZodUUID>;
421
+ }, z.core.$strict>, z.ZodObject<{
422
+ state: z.ZodLiteral<"refused">;
423
+ field: z.ZodString;
424
+ rule: z.ZodEnum<{
425
+ company_required: "company_required";
426
+ vat_id_required: "vat_id_required";
427
+ vat_id_invalid: "vat_id_invalid";
428
+ tax_id_required: "tax_id_required";
429
+ us_state_required: "us_state_required";
430
+ public_email_domain: "public_email_domain";
431
+ invoice_not_open: "invoice_not_open";
432
+ }>;
433
+ intent_id: z.ZodUUID;
434
+ operation_key: z.ZodUUID;
435
+ operation: z.ZodEnum<{
436
+ checkout: "checkout";
437
+ paid_change: "paid_change";
438
+ invoice_payment: "invoice_payment";
439
+ payment_method_invoice: "payment_method_invoice";
440
+ }>;
441
+ invoice_id: z.ZodOptional<z.ZodUUID>;
442
+ }, z.core.$strict>, z.ZodObject<{
443
+ state: z.ZodLiteral<"payment_started">;
444
+ payment_id: z.ZodUUID;
445
+ payment: z.ZodDiscriminatedUnion<[z.ZodObject<{
446
+ kind: z.ZodLiteral<"hosted">;
447
+ checkout_id: z.ZodUUID;
448
+ checkout_url: z.ZodURL;
449
+ }, z.core.$strict>, z.ZodObject<{
450
+ kind: z.ZodLiteral<"mandate">;
451
+ }, z.core.$strict>], "kind">;
452
+ intent_id: z.ZodUUID;
453
+ operation_key: z.ZodUUID;
454
+ operation: z.ZodEnum<{
455
+ checkout: "checkout";
456
+ paid_change: "paid_change";
457
+ invoice_payment: "invoice_payment";
458
+ payment_method_invoice: "payment_method_invoice";
459
+ }>;
460
+ invoice_id: z.ZodOptional<z.ZodUUID>;
461
+ }, z.core.$strict>], "state">;
462
+ export type PurchaseIntent = z.infer<typeof purchaseIntent>;
463
+ /** Shared by checkout, invoice payment and method change. Mandate-only setup remains held. */
464
+ export declare const checkoutResponse: z.ZodDiscriminatedUnion<[z.ZodObject<{
465
+ state: z.ZodLiteral<"awaiting_vies">;
466
+ reason: z.ZodEnum<{
467
+ vies_unavailable: "vies_unavailable";
468
+ vies_unverified: "vies_unverified";
469
+ vies_identifier_missing: "vies_identifier_missing";
470
+ }>;
471
+ next_attempt_at: z.ZodISODateTime;
472
+ intent_id: z.ZodUUID;
473
+ operation_key: z.ZodUUID;
474
+ operation: z.ZodEnum<{
475
+ checkout: "checkout";
476
+ paid_change: "paid_change";
477
+ invoice_payment: "invoice_payment";
478
+ payment_method_invoice: "payment_method_invoice";
479
+ }>;
480
+ invoice_id: z.ZodOptional<z.ZodUUID>;
481
+ }, z.core.$strict>, z.ZodObject<{
482
+ state: z.ZodLiteral<"eligible">;
483
+ quote: z.ZodObject<{
484
+ currency: z.ZodLiteral<"eur">;
485
+ net_cents: z.ZodNumber;
486
+ vat_cents: z.ZodNumber;
487
+ gross_cents: z.ZodNumber;
488
+ rate_percent: z.ZodNumber;
489
+ }, z.core.$strict>;
490
+ quote_revision: z.ZodString;
491
+ buyer_fingerprint: z.ZodString;
492
+ intent_id: z.ZodUUID;
493
+ operation_key: z.ZodUUID;
494
+ operation: z.ZodEnum<{
495
+ checkout: "checkout";
496
+ paid_change: "paid_change";
497
+ invoice_payment: "invoice_payment";
498
+ payment_method_invoice: "payment_method_invoice";
499
+ }>;
500
+ invoice_id: z.ZodOptional<z.ZodUUID>;
501
+ }, z.core.$strict>, z.ZodObject<{
502
+ operation: z.ZodEnum<{
503
+ checkout: "checkout";
504
+ paid_change: "paid_change";
505
+ invoice_payment: "invoice_payment";
506
+ payment_method_invoice: "payment_method_invoice";
507
+ mandate_setup: "mandate_setup";
508
+ }>;
509
+ state: z.ZodLiteral<"held">;
510
+ reason: z.ZodEnum<{
511
+ legacy_usd_invoice: "legacy_usd_invoice";
512
+ legacy_payer_unresolved: "legacy_payer_unresolved";
513
+ mandate_policy_unresolved: "mandate_policy_unresolved";
514
+ }>;
515
+ original_amount: z.ZodOptional<z.ZodObject<{
516
+ currency: z.ZodEnum<{
517
+ eur: "eur";
518
+ usd: "usd";
519
+ }>;
520
+ gross_cents: z.ZodNumber;
521
+ }, z.core.$strict>>;
522
+ intent_id: z.ZodUUID;
523
+ operation_key: z.ZodUUID;
524
+ invoice_id: z.ZodOptional<z.ZodUUID>;
525
+ }, z.core.$strict>, z.ZodObject<{
526
+ state: z.ZodLiteral<"invalid_vat_id">;
527
+ field: z.ZodLiteral<"billing.vat_id">;
528
+ rule: z.ZodLiteral<"vat_id_invalid">;
529
+ intent_id: z.ZodUUID;
530
+ operation_key: z.ZodUUID;
531
+ operation: z.ZodEnum<{
532
+ checkout: "checkout";
533
+ paid_change: "paid_change";
534
+ invoice_payment: "invoice_payment";
535
+ payment_method_invoice: "payment_method_invoice";
536
+ }>;
537
+ invoice_id: z.ZodOptional<z.ZodUUID>;
538
+ }, z.core.$strict>, z.ZodObject<{
539
+ state: z.ZodLiteral<"refused">;
540
+ field: z.ZodString;
541
+ rule: z.ZodEnum<{
542
+ company_required: "company_required";
543
+ vat_id_required: "vat_id_required";
544
+ vat_id_invalid: "vat_id_invalid";
545
+ tax_id_required: "tax_id_required";
546
+ us_state_required: "us_state_required";
547
+ public_email_domain: "public_email_domain";
548
+ invoice_not_open: "invoice_not_open";
549
+ }>;
550
+ intent_id: z.ZodUUID;
551
+ operation_key: z.ZodUUID;
552
+ operation: z.ZodEnum<{
553
+ checkout: "checkout";
554
+ paid_change: "paid_change";
555
+ invoice_payment: "invoice_payment";
556
+ payment_method_invoice: "payment_method_invoice";
557
+ }>;
558
+ invoice_id: z.ZodOptional<z.ZodUUID>;
559
+ }, z.core.$strict>, z.ZodObject<{
560
+ state: z.ZodLiteral<"payment_started">;
561
+ payment_id: z.ZodUUID;
562
+ payment: z.ZodDiscriminatedUnion<[z.ZodObject<{
563
+ kind: z.ZodLiteral<"hosted">;
564
+ checkout_id: z.ZodUUID;
565
+ checkout_url: z.ZodURL;
566
+ }, z.core.$strict>, z.ZodObject<{
567
+ kind: z.ZodLiteral<"mandate">;
568
+ }, z.core.$strict>], "kind">;
569
+ intent_id: z.ZodUUID;
570
+ operation_key: z.ZodUUID;
571
+ operation: z.ZodEnum<{
572
+ checkout: "checkout";
573
+ paid_change: "paid_change";
574
+ invoice_payment: "invoice_payment";
575
+ payment_method_invoice: "payment_method_invoice";
576
+ }>;
577
+ invoice_id: z.ZodOptional<z.ZodUUID>;
578
+ }, z.core.$strict>], "state">;
293
579
  export type CheckoutResponse = z.infer<typeof checkoutResponse>;
580
+ /** Lookup needs one identity, plus the expected operation; a mismatch discloses nothing. */
581
+ export declare const purchaseIntentLookupQuery: z.ZodObject<{
582
+ operation_key: z.ZodOptional<z.ZodUUID>;
583
+ intent_id: z.ZodOptional<z.ZodUUID>;
584
+ operation: z.ZodEnum<{
585
+ checkout: "checkout";
586
+ paid_change: "paid_change";
587
+ invoice_payment: "invoice_payment";
588
+ payment_method_invoice: "payment_method_invoice";
589
+ mandate_setup: "mandate_setup";
590
+ }>;
591
+ }, z.core.$strict>;
592
+ export type PurchaseIntentLookupQuery = z.infer<typeof purchaseIntentLookupQuery>;
593
+ export declare const purchaseIntentConfirmRequest: z.ZodObject<{
594
+ quote_revision: z.ZodString;
595
+ buyer_fingerprint: z.ZodString;
596
+ operation_key: z.ZodUUID;
597
+ operation: z.ZodEnum<{
598
+ checkout: "checkout";
599
+ paid_change: "paid_change";
600
+ invoice_payment: "invoice_payment";
601
+ payment_method_invoice: "payment_method_invoice";
602
+ }>;
603
+ }, z.core.$strict>;
604
+ export type PurchaseIntentConfirmRequest = z.infer<typeof purchaseIntentConfirmRequest>;
605
+ /** `409 target_state_conflict` details. Stale confirmation returns the new owner-visible intent. */
606
+ export declare const purchaseConflictDetails: z.ZodDiscriminatedUnion<[z.ZodObject<{
607
+ field: z.ZodLiteral<"operation_key">;
608
+ rule: z.ZodLiteral<"operation_key_reused">;
609
+ }, z.core.$strict>, z.ZodObject<{
610
+ field: z.ZodLiteral<"intent">;
611
+ rule: z.ZodEnum<{
612
+ invoice_not_open: "invoice_not_open";
613
+ stale_quote: "stale_quote";
614
+ buyer_changed: "buyer_changed";
615
+ not_eligible: "not_eligible";
616
+ }>;
617
+ current_intent: z.ZodDiscriminatedUnion<[z.ZodObject<{
618
+ state: z.ZodLiteral<"awaiting_vies">;
619
+ reason: z.ZodEnum<{
620
+ vies_unavailable: "vies_unavailable";
621
+ vies_unverified: "vies_unverified";
622
+ vies_identifier_missing: "vies_identifier_missing";
623
+ }>;
624
+ next_attempt_at: z.ZodISODateTime;
625
+ intent_id: z.ZodUUID;
626
+ operation_key: z.ZodUUID;
627
+ operation: z.ZodEnum<{
628
+ checkout: "checkout";
629
+ paid_change: "paid_change";
630
+ invoice_payment: "invoice_payment";
631
+ payment_method_invoice: "payment_method_invoice";
632
+ }>;
633
+ invoice_id: z.ZodOptional<z.ZodUUID>;
634
+ }, z.core.$strict>, z.ZodObject<{
635
+ state: z.ZodLiteral<"eligible">;
636
+ quote: z.ZodObject<{
637
+ currency: z.ZodLiteral<"eur">;
638
+ net_cents: z.ZodNumber;
639
+ vat_cents: z.ZodNumber;
640
+ gross_cents: z.ZodNumber;
641
+ rate_percent: z.ZodNumber;
642
+ }, z.core.$strict>;
643
+ quote_revision: z.ZodString;
644
+ buyer_fingerprint: z.ZodString;
645
+ intent_id: z.ZodUUID;
646
+ operation_key: z.ZodUUID;
647
+ operation: z.ZodEnum<{
648
+ checkout: "checkout";
649
+ paid_change: "paid_change";
650
+ invoice_payment: "invoice_payment";
651
+ payment_method_invoice: "payment_method_invoice";
652
+ }>;
653
+ invoice_id: z.ZodOptional<z.ZodUUID>;
654
+ }, z.core.$strict>, z.ZodObject<{
655
+ operation: z.ZodEnum<{
656
+ checkout: "checkout";
657
+ paid_change: "paid_change";
658
+ invoice_payment: "invoice_payment";
659
+ payment_method_invoice: "payment_method_invoice";
660
+ mandate_setup: "mandate_setup";
661
+ }>;
662
+ state: z.ZodLiteral<"held">;
663
+ reason: z.ZodEnum<{
664
+ legacy_usd_invoice: "legacy_usd_invoice";
665
+ legacy_payer_unresolved: "legacy_payer_unresolved";
666
+ mandate_policy_unresolved: "mandate_policy_unresolved";
667
+ }>;
668
+ original_amount: z.ZodOptional<z.ZodObject<{
669
+ currency: z.ZodEnum<{
670
+ eur: "eur";
671
+ usd: "usd";
672
+ }>;
673
+ gross_cents: z.ZodNumber;
674
+ }, z.core.$strict>>;
675
+ intent_id: z.ZodUUID;
676
+ operation_key: z.ZodUUID;
677
+ invoice_id: z.ZodOptional<z.ZodUUID>;
678
+ }, z.core.$strict>, z.ZodObject<{
679
+ state: z.ZodLiteral<"invalid_vat_id">;
680
+ field: z.ZodLiteral<"billing.vat_id">;
681
+ rule: z.ZodLiteral<"vat_id_invalid">;
682
+ intent_id: z.ZodUUID;
683
+ operation_key: z.ZodUUID;
684
+ operation: z.ZodEnum<{
685
+ checkout: "checkout";
686
+ paid_change: "paid_change";
687
+ invoice_payment: "invoice_payment";
688
+ payment_method_invoice: "payment_method_invoice";
689
+ }>;
690
+ invoice_id: z.ZodOptional<z.ZodUUID>;
691
+ }, z.core.$strict>, z.ZodObject<{
692
+ state: z.ZodLiteral<"refused">;
693
+ field: z.ZodString;
694
+ rule: z.ZodEnum<{
695
+ company_required: "company_required";
696
+ vat_id_required: "vat_id_required";
697
+ vat_id_invalid: "vat_id_invalid";
698
+ tax_id_required: "tax_id_required";
699
+ us_state_required: "us_state_required";
700
+ public_email_domain: "public_email_domain";
701
+ invoice_not_open: "invoice_not_open";
702
+ }>;
703
+ intent_id: z.ZodUUID;
704
+ operation_key: z.ZodUUID;
705
+ operation: z.ZodEnum<{
706
+ checkout: "checkout";
707
+ paid_change: "paid_change";
708
+ invoice_payment: "invoice_payment";
709
+ payment_method_invoice: "payment_method_invoice";
710
+ }>;
711
+ invoice_id: z.ZodOptional<z.ZodUUID>;
712
+ }, z.core.$strict>, z.ZodObject<{
713
+ state: z.ZodLiteral<"payment_started">;
714
+ payment_id: z.ZodUUID;
715
+ payment: z.ZodDiscriminatedUnion<[z.ZodObject<{
716
+ kind: z.ZodLiteral<"hosted">;
717
+ checkout_id: z.ZodUUID;
718
+ checkout_url: z.ZodURL;
719
+ }, z.core.$strict>, z.ZodObject<{
720
+ kind: z.ZodLiteral<"mandate">;
721
+ }, z.core.$strict>], "kind">;
722
+ intent_id: z.ZodUUID;
723
+ operation_key: z.ZodUUID;
724
+ operation: z.ZodEnum<{
725
+ checkout: "checkout";
726
+ paid_change: "paid_change";
727
+ invoice_payment: "invoice_payment";
728
+ payment_method_invoice: "payment_method_invoice";
729
+ }>;
730
+ invoice_id: z.ZodOptional<z.ZodUUID>;
731
+ }, z.core.$strict>], "state">;
732
+ }, z.core.$strict>], "rule">;
733
+ export type PurchaseConflictDetails = z.infer<typeof purchaseConflictDetails>;
734
+ export declare const invoicePayRequest: z.ZodObject<{
735
+ operation_key: z.ZodUUID;
736
+ }, z.core.$strict>;
737
+ export type InvoicePayRequest = z.infer<typeof invoicePayRequest>;
294
738
  /** `GET /api/billing/checkout/:id`'s answer: the return page's poll. */
295
739
  export declare const checkoutStatus: z.ZodObject<{
296
740
  checkout_id: z.ZodUUID;
@@ -317,8 +761,9 @@ export type CheckoutStatus = z.infer<typeof checkoutStatus>;
317
761
  /** VIES's answer to a VAT-ID check: `unverified` when VIES could not be reached in time. */
318
762
  export declare const vatIdStatus: z.ZodEnum<{
319
763
  valid: "valid";
320
- unverified: "unverified";
321
764
  invalid: "invalid";
765
+ unavailable: "unavailable";
766
+ unverified: "unverified";
322
767
  }>;
323
768
  export type VatIdStatus = z.infer<typeof vatIdStatus>;
324
769
  /** `POST /api/billing/vat-id/check`'s body: the VAT-ID-on-blur check the checkout and `PATCH /api/billing/details` both use. */
@@ -327,16 +772,32 @@ export declare const vatIdCheckRequest: z.ZodObject<{
327
772
  vat_id: z.ZodString;
328
773
  }, z.core.$strict>;
329
774
  export type VatIdCheckRequest = z.infer<typeof vatIdCheckRequest>;
330
- /** `POST /api/billing/vat-id/check`'s answer. */
331
- export declare const vatIdCheckResponse: z.ZodObject<{
775
+ export declare const vatIdCheckResponse: z.ZodDiscriminatedUnion<[z.ZodObject<{
776
+ state: z.ZodLiteral<"eligible">;
777
+ status: z.ZodLiteral<"valid">;
778
+ vat_id: z.ZodString;
779
+ name: z.ZodNullable<z.ZodString>;
780
+ }, z.core.$strict>, z.ZodObject<{
781
+ state: z.ZodLiteral<"refused">;
782
+ status: z.ZodLiteral<"invalid">;
783
+ rule: z.ZodLiteral<"vat_id_invalid">;
784
+ vat_id: z.ZodString;
785
+ name: z.ZodNullable<z.ZodString>;
786
+ }, z.core.$strict>, z.ZodObject<{
787
+ state: z.ZodLiteral<"pending">;
332
788
  status: z.ZodEnum<{
333
789
  valid: "valid";
790
+ unavailable: "unavailable";
334
791
  unverified: "unverified";
335
- invalid: "invalid";
792
+ }>;
793
+ reason: z.ZodEnum<{
794
+ vies_unavailable: "vies_unavailable";
795
+ vies_unverified: "vies_unverified";
796
+ vies_identifier_missing: "vies_identifier_missing";
336
797
  }>;
337
798
  vat_id: z.ZodString;
338
799
  name: z.ZodNullable<z.ZodString>;
339
- }, z.core.$strip>;
800
+ }, z.core.$strict>], "state">;
340
801
  export type VatIdCheckResponse = z.infer<typeof vatIdCheckResponse>;
341
802
  /**
342
803
  * `POST /api/billing/change`'s body: the **absolute** target state, never a
@@ -348,6 +809,7 @@ export type VatIdCheckResponse = z.infer<typeof vatIdCheckResponse>;
348
809
  * `.refine()` has no JSON Schema rendering.
349
810
  */
350
811
  export declare const billingChangeRequest: z.ZodObject<{
812
+ operation_key: z.ZodUUID;
351
813
  plan: z.ZodOptional<z.ZodEnum<{
352
814
  plus: "plus";
353
815
  pro: "pro";
@@ -370,8 +832,18 @@ export declare const billingCancelRequest: z.ZodObject<{
370
832
  reason: z.ZodOptional<z.ZodString>;
371
833
  }, z.core.$strict>;
372
834
  export type BillingCancelRequest = z.infer<typeof billingCancelRequest>;
373
- /** `PATCH /api/billing/details`'s body: the invoice email and the VAT ID, the two fields an owner edits after checkout. */
835
+ /** Owner corrections; Cloud revalidates the complete merged buyer before any later charge. */
374
836
  export declare const billingDetailsUpdate: z.ZodObject<{
837
+ company_name: z.ZodOptional<z.ZodString>;
838
+ address: z.ZodOptional<z.ZodObject<{
839
+ line1: z.ZodString;
840
+ line2: z.ZodNullable<z.ZodString>;
841
+ postal_code: z.ZodString;
842
+ city: z.ZodString;
843
+ country: z.ZodString;
844
+ state: z.ZodOptional<z.ZodString>;
845
+ }, z.core.$strict>>;
846
+ tax_id: z.ZodOptional<z.ZodNullable<z.ZodString>>;
375
847
  invoice_email: z.ZodOptional<z.ZodEmail>;
376
848
  vat_id: z.ZodOptional<z.ZodNullable<z.ZodString>>;
377
849
  }, z.core.$strict>;
@@ -388,6 +860,7 @@ export declare const paymentMethodKind: z.ZodEnum<{
388
860
  export type PaymentMethodKind = z.infer<typeof paymentMethodKind>;
389
861
  /** `POST /api/billing/payment-method`'s body. */
390
862
  export declare const paymentMethodChangeRequest: z.ZodObject<{
863
+ operation_key: z.ZodUUID;
391
864
  method: z.ZodEnum<{
392
865
  card: "card";
393
866
  paypal: "paypal";
@@ -458,12 +931,14 @@ export declare const billingAccount: z.ZodObject<{
458
931
  kind: z.ZodLiteral<"company">;
459
932
  company_name: z.ZodString;
460
933
  vat_id: z.ZodNullable<z.ZodString>;
934
+ tax_id: z.ZodOptional<z.ZodNullable<z.ZodString>>;
461
935
  address: z.ZodObject<{
462
936
  line1: z.ZodString;
463
937
  line2: z.ZodNullable<z.ZodString>;
464
938
  postal_code: z.ZodString;
465
939
  city: z.ZodString;
466
940
  country: z.ZodString;
941
+ state: z.ZodOptional<z.ZodString>;
467
942
  }, z.core.$strict>;
468
943
  invoice_email: z.ZodEmail;
469
944
  }, z.core.$strict>, z.ZodObject<{
@@ -475,22 +950,24 @@ export declare const billingAccount: z.ZodObject<{
475
950
  postal_code: z.ZodString;
476
951
  city: z.ZodString;
477
952
  country: z.ZodString;
953
+ state: z.ZodOptional<z.ZodString>;
478
954
  }, z.core.$strict>;
479
955
  invoice_email: z.ZodEmail;
480
956
  }, z.core.$strict>], "kind">;
481
957
  vat_id_status: z.ZodNullable<z.ZodEnum<{
482
958
  valid: "valid";
483
- unverified: "unverified";
484
959
  invalid: "invalid";
960
+ unavailable: "unavailable";
961
+ unverified: "unverified";
485
962
  }>>;
486
- vat: z.ZodObject<{
963
+ vat: z.ZodNullable<z.ZodObject<{
487
964
  treatment: z.ZodEnum<{
488
965
  de_standard: "de_standard";
489
966
  reverse_charge: "reverse_charge";
490
967
  outside_eu: "outside_eu";
491
968
  }>;
492
969
  rate_percent: z.ZodNumber;
493
- }, z.core.$strip>;
970
+ }, z.core.$strip>>;
494
971
  currency: z.ZodEnum<{
495
972
  eur: "eur";
496
973
  usd: "usd";
@@ -544,12 +1021,14 @@ export declare const billingView: z.ZodObject<{
544
1021
  kind: z.ZodLiteral<"company">;
545
1022
  company_name: z.ZodString;
546
1023
  vat_id: z.ZodNullable<z.ZodString>;
1024
+ tax_id: z.ZodOptional<z.ZodNullable<z.ZodString>>;
547
1025
  address: z.ZodObject<{
548
1026
  line1: z.ZodString;
549
1027
  line2: z.ZodNullable<z.ZodString>;
550
1028
  postal_code: z.ZodString;
551
1029
  city: z.ZodString;
552
1030
  country: z.ZodString;
1031
+ state: z.ZodOptional<z.ZodString>;
553
1032
  }, z.core.$strict>;
554
1033
  invoice_email: z.ZodEmail;
555
1034
  }, z.core.$strict>, z.ZodObject<{
@@ -561,22 +1040,24 @@ export declare const billingView: z.ZodObject<{
561
1040
  postal_code: z.ZodString;
562
1041
  city: z.ZodString;
563
1042
  country: z.ZodString;
1043
+ state: z.ZodOptional<z.ZodString>;
564
1044
  }, z.core.$strict>;
565
1045
  invoice_email: z.ZodEmail;
566
1046
  }, z.core.$strict>], "kind">;
567
1047
  vat_id_status: z.ZodNullable<z.ZodEnum<{
568
1048
  valid: "valid";
569
- unverified: "unverified";
570
1049
  invalid: "invalid";
1050
+ unavailable: "unavailable";
1051
+ unverified: "unverified";
571
1052
  }>>;
572
- vat: z.ZodObject<{
1053
+ vat: z.ZodNullable<z.ZodObject<{
573
1054
  treatment: z.ZodEnum<{
574
1055
  de_standard: "de_standard";
575
1056
  reverse_charge: "reverse_charge";
576
1057
  outside_eu: "outside_eu";
577
1058
  }>;
578
1059
  rate_percent: z.ZodNumber;
579
- }, z.core.$strip>;
1060
+ }, z.core.$strip>>;
580
1061
  currency: z.ZodEnum<{
581
1062
  eur: "eur";
582
1063
  usd: "usd";
@@ -663,8 +1144,7 @@ export declare const billingView: z.ZodObject<{
663
1144
  }, z.core.$strip>>;
664
1145
  }, z.core.$strip>;
665
1146
  export type BillingView = z.infer<typeof billingView>;
666
- /** `POST /api/billing/change`'s answer: the billing view afterwards, and what was charged right now, if anything. */
667
- export declare const billingChangeResponse: z.ZodObject<{
1147
+ export declare const billingChangeResponse: z.ZodUnion<readonly [z.ZodObject<{
668
1148
  billing: z.ZodObject<{
669
1149
  available: z.ZodBoolean;
670
1150
  account: z.ZodNullable<z.ZodObject<{
@@ -672,12 +1152,14 @@ export declare const billingChangeResponse: z.ZodObject<{
672
1152
  kind: z.ZodLiteral<"company">;
673
1153
  company_name: z.ZodString;
674
1154
  vat_id: z.ZodNullable<z.ZodString>;
1155
+ tax_id: z.ZodOptional<z.ZodNullable<z.ZodString>>;
675
1156
  address: z.ZodObject<{
676
1157
  line1: z.ZodString;
677
1158
  line2: z.ZodNullable<z.ZodString>;
678
1159
  postal_code: z.ZodString;
679
1160
  city: z.ZodString;
680
1161
  country: z.ZodString;
1162
+ state: z.ZodOptional<z.ZodString>;
681
1163
  }, z.core.$strict>;
682
1164
  invoice_email: z.ZodEmail;
683
1165
  }, z.core.$strict>, z.ZodObject<{
@@ -689,22 +1171,308 @@ export declare const billingChangeResponse: z.ZodObject<{
689
1171
  postal_code: z.ZodString;
690
1172
  city: z.ZodString;
691
1173
  country: z.ZodString;
1174
+ state: z.ZodOptional<z.ZodString>;
692
1175
  }, z.core.$strict>;
693
1176
  invoice_email: z.ZodEmail;
694
1177
  }, z.core.$strict>], "kind">;
695
1178
  vat_id_status: z.ZodNullable<z.ZodEnum<{
696
1179
  valid: "valid";
697
- unverified: "unverified";
698
1180
  invalid: "invalid";
1181
+ unavailable: "unavailable";
1182
+ unverified: "unverified";
699
1183
  }>>;
700
- vat: z.ZodObject<{
1184
+ vat: z.ZodNullable<z.ZodObject<{
701
1185
  treatment: z.ZodEnum<{
702
1186
  de_standard: "de_standard";
703
1187
  reverse_charge: "reverse_charge";
704
1188
  outside_eu: "outside_eu";
705
1189
  }>;
706
1190
  rate_percent: z.ZodNumber;
1191
+ }, z.core.$strip>>;
1192
+ currency: z.ZodEnum<{
1193
+ eur: "eur";
1194
+ usd: "usd";
1195
+ }>;
1196
+ cycle: z.ZodEnum<{
1197
+ monthly: "monthly";
1198
+ yearly: "yearly";
1199
+ }>;
1200
+ status: z.ZodEnum<{
1201
+ active: "active";
1202
+ pending: "pending";
1203
+ canceled: "canceled";
1204
+ past_due: "past_due";
1205
+ }>;
1206
+ period_starts_at: z.ZodNullable<z.ZodISODateTime>;
1207
+ period_ends_at: z.ZodNullable<z.ZodISODateTime>;
1208
+ next_charge: z.ZodNullable<z.ZodObject<{
1209
+ at: z.ZodISODateTime;
1210
+ net_cents: z.ZodNumber;
1211
+ vat_cents: z.ZodNumber;
1212
+ gross_cents: z.ZodNumber;
1213
+ }, z.core.$strip>>;
1214
+ scheduled: z.ZodObject<{
1215
+ cycle: z.ZodNullable<z.ZodEnum<{
1216
+ monthly: "monthly";
1217
+ yearly: "yearly";
1218
+ }>>;
1219
+ addons: z.ZodNullable<z.ZodObject<{
1220
+ seats: z.ZodNumber;
1221
+ robots: z.ZodNumber;
1222
+ apps: z.ZodNumber;
1223
+ app_user_packs: z.ZodNumber;
1224
+ live_video_packs: z.ZodNumber;
1225
+ }, z.core.$strip>>;
707
1226
  }, z.core.$strip>;
1227
+ dunning: z.ZodNullable<z.ZodObject<{
1228
+ invoice_id: z.ZodUUID;
1229
+ gross_cents: z.ZodNumber;
1230
+ due_at: z.ZodISODateTime;
1231
+ next_retry_at: z.ZodNullable<z.ZodISODateTime>;
1232
+ lock_at: z.ZodISODateTime;
1233
+ failure: z.ZodNullable<z.ZodString>;
1234
+ }, z.core.$strip>>;
1235
+ }, z.core.$strip>>;
1236
+ payment_method: z.ZodNullable<z.ZodDiscriminatedUnion<[z.ZodObject<{
1237
+ kind: z.ZodLiteral<"card">;
1238
+ brand: z.ZodString;
1239
+ last4: z.ZodString;
1240
+ expires: z.ZodString;
1241
+ }, z.core.$strip>, z.ZodObject<{
1242
+ kind: z.ZodLiteral<"applepay">;
1243
+ brand: z.ZodString;
1244
+ last4: z.ZodString;
1245
+ expires: z.ZodString;
1246
+ }, z.core.$strip>, z.ZodObject<{
1247
+ kind: z.ZodLiteral<"paypal">;
1248
+ account: z.ZodString;
1249
+ }, z.core.$strip>], "kind">>;
1250
+ payment_method_options: z.ZodArray<z.ZodObject<{
1251
+ method: z.ZodEnum<{
1252
+ card: "card";
1253
+ paypal: "paypal";
1254
+ applepay: "applepay";
1255
+ }>;
1256
+ pays_invoice: z.ZodBoolean;
1257
+ }, z.core.$strip>>;
1258
+ invoices: z.ZodArray<z.ZodObject<{
1259
+ id: z.ZodUUID;
1260
+ number: z.ZodString;
1261
+ issued_at: z.ZodISODateTime;
1262
+ status: z.ZodEnum<{
1263
+ paid: "paid";
1264
+ open: "open";
1265
+ uncollectible: "uncollectible";
1266
+ }>;
1267
+ currency: z.ZodEnum<{
1268
+ eur: "eur";
1269
+ usd: "usd";
1270
+ }>;
1271
+ net_cents: z.ZodNumber;
1272
+ vat_rate_percent: z.ZodNumber;
1273
+ vat_cents: z.ZodNumber;
1274
+ gross_cents: z.ZodNumber;
1275
+ }, z.core.$strip>>;
1276
+ }, z.core.$strip>;
1277
+ charged: z.ZodNullable<z.ZodObject<{
1278
+ id: z.ZodUUID;
1279
+ number: z.ZodString;
1280
+ issued_at: z.ZodISODateTime;
1281
+ status: z.ZodEnum<{
1282
+ paid: "paid";
1283
+ open: "open";
1284
+ uncollectible: "uncollectible";
1285
+ }>;
1286
+ currency: z.ZodEnum<{
1287
+ eur: "eur";
1288
+ usd: "usd";
1289
+ }>;
1290
+ net_cents: z.ZodNumber;
1291
+ vat_rate_percent: z.ZodNumber;
1292
+ vat_cents: z.ZodNumber;
1293
+ gross_cents: z.ZodNumber;
1294
+ }, z.core.$strip>>;
1295
+ }, z.core.$strict>, z.ZodObject<{
1296
+ intent: z.ZodDiscriminatedUnion<[z.ZodObject<{
1297
+ state: z.ZodLiteral<"awaiting_vies">;
1298
+ reason: z.ZodEnum<{
1299
+ vies_unavailable: "vies_unavailable";
1300
+ vies_unverified: "vies_unverified";
1301
+ vies_identifier_missing: "vies_identifier_missing";
1302
+ }>;
1303
+ next_attempt_at: z.ZodISODateTime;
1304
+ intent_id: z.ZodUUID;
1305
+ operation_key: z.ZodUUID;
1306
+ operation: z.ZodEnum<{
1307
+ checkout: "checkout";
1308
+ paid_change: "paid_change";
1309
+ invoice_payment: "invoice_payment";
1310
+ payment_method_invoice: "payment_method_invoice";
1311
+ }>;
1312
+ invoice_id: z.ZodOptional<z.ZodUUID>;
1313
+ }, z.core.$strict>, z.ZodObject<{
1314
+ state: z.ZodLiteral<"eligible">;
1315
+ quote: z.ZodObject<{
1316
+ currency: z.ZodLiteral<"eur">;
1317
+ net_cents: z.ZodNumber;
1318
+ vat_cents: z.ZodNumber;
1319
+ gross_cents: z.ZodNumber;
1320
+ rate_percent: z.ZodNumber;
1321
+ }, z.core.$strict>;
1322
+ quote_revision: z.ZodString;
1323
+ buyer_fingerprint: z.ZodString;
1324
+ intent_id: z.ZodUUID;
1325
+ operation_key: z.ZodUUID;
1326
+ operation: z.ZodEnum<{
1327
+ checkout: "checkout";
1328
+ paid_change: "paid_change";
1329
+ invoice_payment: "invoice_payment";
1330
+ payment_method_invoice: "payment_method_invoice";
1331
+ }>;
1332
+ invoice_id: z.ZodOptional<z.ZodUUID>;
1333
+ }, z.core.$strict>, z.ZodObject<{
1334
+ operation: z.ZodEnum<{
1335
+ checkout: "checkout";
1336
+ paid_change: "paid_change";
1337
+ invoice_payment: "invoice_payment";
1338
+ payment_method_invoice: "payment_method_invoice";
1339
+ mandate_setup: "mandate_setup";
1340
+ }>;
1341
+ state: z.ZodLiteral<"held">;
1342
+ reason: z.ZodEnum<{
1343
+ legacy_usd_invoice: "legacy_usd_invoice";
1344
+ legacy_payer_unresolved: "legacy_payer_unresolved";
1345
+ mandate_policy_unresolved: "mandate_policy_unresolved";
1346
+ }>;
1347
+ original_amount: z.ZodOptional<z.ZodObject<{
1348
+ currency: z.ZodEnum<{
1349
+ eur: "eur";
1350
+ usd: "usd";
1351
+ }>;
1352
+ gross_cents: z.ZodNumber;
1353
+ }, z.core.$strict>>;
1354
+ intent_id: z.ZodUUID;
1355
+ operation_key: z.ZodUUID;
1356
+ invoice_id: z.ZodOptional<z.ZodUUID>;
1357
+ }, z.core.$strict>, z.ZodObject<{
1358
+ state: z.ZodLiteral<"invalid_vat_id">;
1359
+ field: z.ZodLiteral<"billing.vat_id">;
1360
+ rule: z.ZodLiteral<"vat_id_invalid">;
1361
+ intent_id: z.ZodUUID;
1362
+ operation_key: z.ZodUUID;
1363
+ operation: z.ZodEnum<{
1364
+ checkout: "checkout";
1365
+ paid_change: "paid_change";
1366
+ invoice_payment: "invoice_payment";
1367
+ payment_method_invoice: "payment_method_invoice";
1368
+ }>;
1369
+ invoice_id: z.ZodOptional<z.ZodUUID>;
1370
+ }, z.core.$strict>, z.ZodObject<{
1371
+ state: z.ZodLiteral<"refused">;
1372
+ field: z.ZodString;
1373
+ rule: z.ZodEnum<{
1374
+ company_required: "company_required";
1375
+ vat_id_required: "vat_id_required";
1376
+ vat_id_invalid: "vat_id_invalid";
1377
+ tax_id_required: "tax_id_required";
1378
+ us_state_required: "us_state_required";
1379
+ public_email_domain: "public_email_domain";
1380
+ invoice_not_open: "invoice_not_open";
1381
+ }>;
1382
+ intent_id: z.ZodUUID;
1383
+ operation_key: z.ZodUUID;
1384
+ operation: z.ZodEnum<{
1385
+ checkout: "checkout";
1386
+ paid_change: "paid_change";
1387
+ invoice_payment: "invoice_payment";
1388
+ payment_method_invoice: "payment_method_invoice";
1389
+ }>;
1390
+ invoice_id: z.ZodOptional<z.ZodUUID>;
1391
+ }, z.core.$strict>, z.ZodObject<{
1392
+ state: z.ZodLiteral<"payment_started">;
1393
+ payment_id: z.ZodUUID;
1394
+ payment: z.ZodDiscriminatedUnion<[z.ZodObject<{
1395
+ kind: z.ZodLiteral<"hosted">;
1396
+ checkout_id: z.ZodUUID;
1397
+ checkout_url: z.ZodURL;
1398
+ }, z.core.$strict>, z.ZodObject<{
1399
+ kind: z.ZodLiteral<"mandate">;
1400
+ }, z.core.$strict>], "kind">;
1401
+ intent_id: z.ZodUUID;
1402
+ operation_key: z.ZodUUID;
1403
+ operation: z.ZodEnum<{
1404
+ checkout: "checkout";
1405
+ paid_change: "paid_change";
1406
+ invoice_payment: "invoice_payment";
1407
+ payment_method_invoice: "payment_method_invoice";
1408
+ }>;
1409
+ invoice_id: z.ZodOptional<z.ZodUUID>;
1410
+ }, z.core.$strict>], "state">;
1411
+ }, z.core.$strict>, z.ZodObject<{
1412
+ intent: z.ZodObject<{
1413
+ state: z.ZodLiteral<"payment_started">;
1414
+ payment_id: z.ZodUUID;
1415
+ payment: z.ZodDiscriminatedUnion<[z.ZodObject<{
1416
+ kind: z.ZodLiteral<"hosted">;
1417
+ checkout_id: z.ZodUUID;
1418
+ checkout_url: z.ZodURL;
1419
+ }, z.core.$strict>, z.ZodObject<{
1420
+ kind: z.ZodLiteral<"mandate">;
1421
+ }, z.core.$strict>], "kind">;
1422
+ intent_id: z.ZodUUID;
1423
+ operation_key: z.ZodUUID;
1424
+ operation: z.ZodEnum<{
1425
+ checkout: "checkout";
1426
+ paid_change: "paid_change";
1427
+ invoice_payment: "invoice_payment";
1428
+ payment_method_invoice: "payment_method_invoice";
1429
+ }>;
1430
+ invoice_id: z.ZodOptional<z.ZodUUID>;
1431
+ }, z.core.$strict>;
1432
+ billing: z.ZodObject<{
1433
+ available: z.ZodBoolean;
1434
+ account: z.ZodNullable<z.ZodObject<{
1435
+ payer: z.ZodDiscriminatedUnion<[z.ZodObject<{
1436
+ kind: z.ZodLiteral<"company">;
1437
+ company_name: z.ZodString;
1438
+ vat_id: z.ZodNullable<z.ZodString>;
1439
+ tax_id: z.ZodOptional<z.ZodNullable<z.ZodString>>;
1440
+ address: z.ZodObject<{
1441
+ line1: z.ZodString;
1442
+ line2: z.ZodNullable<z.ZodString>;
1443
+ postal_code: z.ZodString;
1444
+ city: z.ZodString;
1445
+ country: z.ZodString;
1446
+ state: z.ZodOptional<z.ZodString>;
1447
+ }, z.core.$strict>;
1448
+ invoice_email: z.ZodEmail;
1449
+ }, z.core.$strict>, z.ZodObject<{
1450
+ kind: z.ZodLiteral<"person">;
1451
+ full_name: z.ZodString;
1452
+ address: z.ZodObject<{
1453
+ line1: z.ZodString;
1454
+ line2: z.ZodNullable<z.ZodString>;
1455
+ postal_code: z.ZodString;
1456
+ city: z.ZodString;
1457
+ country: z.ZodString;
1458
+ state: z.ZodOptional<z.ZodString>;
1459
+ }, z.core.$strict>;
1460
+ invoice_email: z.ZodEmail;
1461
+ }, z.core.$strict>], "kind">;
1462
+ vat_id_status: z.ZodNullable<z.ZodEnum<{
1463
+ valid: "valid";
1464
+ invalid: "invalid";
1465
+ unavailable: "unavailable";
1466
+ unverified: "unverified";
1467
+ }>>;
1468
+ vat: z.ZodNullable<z.ZodObject<{
1469
+ treatment: z.ZodEnum<{
1470
+ de_standard: "de_standard";
1471
+ reverse_charge: "reverse_charge";
1472
+ outside_eu: "outside_eu";
1473
+ }>;
1474
+ rate_percent: z.ZodNumber;
1475
+ }, z.core.$strip>>;
708
1476
  currency: z.ZodEnum<{
709
1477
  eur: "eur";
710
1478
  usd: "usd";
@@ -808,5 +1576,290 @@ export declare const billingChangeResponse: z.ZodObject<{
808
1576
  vat_cents: z.ZodNumber;
809
1577
  gross_cents: z.ZodNumber;
810
1578
  }, z.core.$strip>>;
811
- }, z.core.$strip>;
1579
+ }, z.core.$strict>]>;
812
1580
  export type BillingChangeResponse = z.infer<typeof billingChangeResponse>;
1581
+ /** Confirmation/lookup recovers the same payment, and the resulting view for a paid change. */
1582
+ export declare const purchaseIntentResponse: z.ZodUnion<readonly [z.ZodDiscriminatedUnion<[z.ZodObject<{
1583
+ state: z.ZodLiteral<"awaiting_vies">;
1584
+ reason: z.ZodEnum<{
1585
+ vies_unavailable: "vies_unavailable";
1586
+ vies_unverified: "vies_unverified";
1587
+ vies_identifier_missing: "vies_identifier_missing";
1588
+ }>;
1589
+ next_attempt_at: z.ZodISODateTime;
1590
+ intent_id: z.ZodUUID;
1591
+ operation_key: z.ZodUUID;
1592
+ operation: z.ZodEnum<{
1593
+ checkout: "checkout";
1594
+ paid_change: "paid_change";
1595
+ invoice_payment: "invoice_payment";
1596
+ payment_method_invoice: "payment_method_invoice";
1597
+ }>;
1598
+ invoice_id: z.ZodOptional<z.ZodUUID>;
1599
+ }, z.core.$strict>, z.ZodObject<{
1600
+ state: z.ZodLiteral<"eligible">;
1601
+ quote: z.ZodObject<{
1602
+ currency: z.ZodLiteral<"eur">;
1603
+ net_cents: z.ZodNumber;
1604
+ vat_cents: z.ZodNumber;
1605
+ gross_cents: z.ZodNumber;
1606
+ rate_percent: z.ZodNumber;
1607
+ }, z.core.$strict>;
1608
+ quote_revision: z.ZodString;
1609
+ buyer_fingerprint: z.ZodString;
1610
+ intent_id: z.ZodUUID;
1611
+ operation_key: z.ZodUUID;
1612
+ operation: z.ZodEnum<{
1613
+ checkout: "checkout";
1614
+ paid_change: "paid_change";
1615
+ invoice_payment: "invoice_payment";
1616
+ payment_method_invoice: "payment_method_invoice";
1617
+ }>;
1618
+ invoice_id: z.ZodOptional<z.ZodUUID>;
1619
+ }, z.core.$strict>, z.ZodObject<{
1620
+ operation: z.ZodEnum<{
1621
+ checkout: "checkout";
1622
+ paid_change: "paid_change";
1623
+ invoice_payment: "invoice_payment";
1624
+ payment_method_invoice: "payment_method_invoice";
1625
+ mandate_setup: "mandate_setup";
1626
+ }>;
1627
+ state: z.ZodLiteral<"held">;
1628
+ reason: z.ZodEnum<{
1629
+ legacy_usd_invoice: "legacy_usd_invoice";
1630
+ legacy_payer_unresolved: "legacy_payer_unresolved";
1631
+ mandate_policy_unresolved: "mandate_policy_unresolved";
1632
+ }>;
1633
+ original_amount: z.ZodOptional<z.ZodObject<{
1634
+ currency: z.ZodEnum<{
1635
+ eur: "eur";
1636
+ usd: "usd";
1637
+ }>;
1638
+ gross_cents: z.ZodNumber;
1639
+ }, z.core.$strict>>;
1640
+ intent_id: z.ZodUUID;
1641
+ operation_key: z.ZodUUID;
1642
+ invoice_id: z.ZodOptional<z.ZodUUID>;
1643
+ }, z.core.$strict>, z.ZodObject<{
1644
+ state: z.ZodLiteral<"invalid_vat_id">;
1645
+ field: z.ZodLiteral<"billing.vat_id">;
1646
+ rule: z.ZodLiteral<"vat_id_invalid">;
1647
+ intent_id: z.ZodUUID;
1648
+ operation_key: z.ZodUUID;
1649
+ operation: z.ZodEnum<{
1650
+ checkout: "checkout";
1651
+ paid_change: "paid_change";
1652
+ invoice_payment: "invoice_payment";
1653
+ payment_method_invoice: "payment_method_invoice";
1654
+ }>;
1655
+ invoice_id: z.ZodOptional<z.ZodUUID>;
1656
+ }, z.core.$strict>, z.ZodObject<{
1657
+ state: z.ZodLiteral<"refused">;
1658
+ field: z.ZodString;
1659
+ rule: z.ZodEnum<{
1660
+ company_required: "company_required";
1661
+ vat_id_required: "vat_id_required";
1662
+ vat_id_invalid: "vat_id_invalid";
1663
+ tax_id_required: "tax_id_required";
1664
+ us_state_required: "us_state_required";
1665
+ public_email_domain: "public_email_domain";
1666
+ invoice_not_open: "invoice_not_open";
1667
+ }>;
1668
+ intent_id: z.ZodUUID;
1669
+ operation_key: z.ZodUUID;
1670
+ operation: z.ZodEnum<{
1671
+ checkout: "checkout";
1672
+ paid_change: "paid_change";
1673
+ invoice_payment: "invoice_payment";
1674
+ payment_method_invoice: "payment_method_invoice";
1675
+ }>;
1676
+ invoice_id: z.ZodOptional<z.ZodUUID>;
1677
+ }, z.core.$strict>, z.ZodObject<{
1678
+ state: z.ZodLiteral<"payment_started">;
1679
+ payment_id: z.ZodUUID;
1680
+ payment: z.ZodDiscriminatedUnion<[z.ZodObject<{
1681
+ kind: z.ZodLiteral<"hosted">;
1682
+ checkout_id: z.ZodUUID;
1683
+ checkout_url: z.ZodURL;
1684
+ }, z.core.$strict>, z.ZodObject<{
1685
+ kind: z.ZodLiteral<"mandate">;
1686
+ }, z.core.$strict>], "kind">;
1687
+ intent_id: z.ZodUUID;
1688
+ operation_key: z.ZodUUID;
1689
+ operation: z.ZodEnum<{
1690
+ checkout: "checkout";
1691
+ paid_change: "paid_change";
1692
+ invoice_payment: "invoice_payment";
1693
+ payment_method_invoice: "payment_method_invoice";
1694
+ }>;
1695
+ invoice_id: z.ZodOptional<z.ZodUUID>;
1696
+ }, z.core.$strict>], "state">, z.ZodObject<{
1697
+ intent: z.ZodObject<{
1698
+ state: z.ZodLiteral<"payment_started">;
1699
+ payment_id: z.ZodUUID;
1700
+ payment: z.ZodDiscriminatedUnion<[z.ZodObject<{
1701
+ kind: z.ZodLiteral<"hosted">;
1702
+ checkout_id: z.ZodUUID;
1703
+ checkout_url: z.ZodURL;
1704
+ }, z.core.$strict>, z.ZodObject<{
1705
+ kind: z.ZodLiteral<"mandate">;
1706
+ }, z.core.$strict>], "kind">;
1707
+ intent_id: z.ZodUUID;
1708
+ operation_key: z.ZodUUID;
1709
+ operation: z.ZodEnum<{
1710
+ checkout: "checkout";
1711
+ paid_change: "paid_change";
1712
+ invoice_payment: "invoice_payment";
1713
+ payment_method_invoice: "payment_method_invoice";
1714
+ }>;
1715
+ invoice_id: z.ZodOptional<z.ZodUUID>;
1716
+ }, z.core.$strict>;
1717
+ billing: z.ZodObject<{
1718
+ available: z.ZodBoolean;
1719
+ account: z.ZodNullable<z.ZodObject<{
1720
+ payer: z.ZodDiscriminatedUnion<[z.ZodObject<{
1721
+ kind: z.ZodLiteral<"company">;
1722
+ company_name: z.ZodString;
1723
+ vat_id: z.ZodNullable<z.ZodString>;
1724
+ tax_id: z.ZodOptional<z.ZodNullable<z.ZodString>>;
1725
+ address: z.ZodObject<{
1726
+ line1: z.ZodString;
1727
+ line2: z.ZodNullable<z.ZodString>;
1728
+ postal_code: z.ZodString;
1729
+ city: z.ZodString;
1730
+ country: z.ZodString;
1731
+ state: z.ZodOptional<z.ZodString>;
1732
+ }, z.core.$strict>;
1733
+ invoice_email: z.ZodEmail;
1734
+ }, z.core.$strict>, z.ZodObject<{
1735
+ kind: z.ZodLiteral<"person">;
1736
+ full_name: z.ZodString;
1737
+ address: z.ZodObject<{
1738
+ line1: z.ZodString;
1739
+ line2: z.ZodNullable<z.ZodString>;
1740
+ postal_code: z.ZodString;
1741
+ city: z.ZodString;
1742
+ country: z.ZodString;
1743
+ state: z.ZodOptional<z.ZodString>;
1744
+ }, z.core.$strict>;
1745
+ invoice_email: z.ZodEmail;
1746
+ }, z.core.$strict>], "kind">;
1747
+ vat_id_status: z.ZodNullable<z.ZodEnum<{
1748
+ valid: "valid";
1749
+ invalid: "invalid";
1750
+ unavailable: "unavailable";
1751
+ unverified: "unverified";
1752
+ }>>;
1753
+ vat: z.ZodNullable<z.ZodObject<{
1754
+ treatment: z.ZodEnum<{
1755
+ de_standard: "de_standard";
1756
+ reverse_charge: "reverse_charge";
1757
+ outside_eu: "outside_eu";
1758
+ }>;
1759
+ rate_percent: z.ZodNumber;
1760
+ }, z.core.$strip>>;
1761
+ currency: z.ZodEnum<{
1762
+ eur: "eur";
1763
+ usd: "usd";
1764
+ }>;
1765
+ cycle: z.ZodEnum<{
1766
+ monthly: "monthly";
1767
+ yearly: "yearly";
1768
+ }>;
1769
+ status: z.ZodEnum<{
1770
+ active: "active";
1771
+ pending: "pending";
1772
+ canceled: "canceled";
1773
+ past_due: "past_due";
1774
+ }>;
1775
+ period_starts_at: z.ZodNullable<z.ZodISODateTime>;
1776
+ period_ends_at: z.ZodNullable<z.ZodISODateTime>;
1777
+ next_charge: z.ZodNullable<z.ZodObject<{
1778
+ at: z.ZodISODateTime;
1779
+ net_cents: z.ZodNumber;
1780
+ vat_cents: z.ZodNumber;
1781
+ gross_cents: z.ZodNumber;
1782
+ }, z.core.$strip>>;
1783
+ scheduled: z.ZodObject<{
1784
+ cycle: z.ZodNullable<z.ZodEnum<{
1785
+ monthly: "monthly";
1786
+ yearly: "yearly";
1787
+ }>>;
1788
+ addons: z.ZodNullable<z.ZodObject<{
1789
+ seats: z.ZodNumber;
1790
+ robots: z.ZodNumber;
1791
+ apps: z.ZodNumber;
1792
+ app_user_packs: z.ZodNumber;
1793
+ live_video_packs: z.ZodNumber;
1794
+ }, z.core.$strip>>;
1795
+ }, z.core.$strip>;
1796
+ dunning: z.ZodNullable<z.ZodObject<{
1797
+ invoice_id: z.ZodUUID;
1798
+ gross_cents: z.ZodNumber;
1799
+ due_at: z.ZodISODateTime;
1800
+ next_retry_at: z.ZodNullable<z.ZodISODateTime>;
1801
+ lock_at: z.ZodISODateTime;
1802
+ failure: z.ZodNullable<z.ZodString>;
1803
+ }, z.core.$strip>>;
1804
+ }, z.core.$strip>>;
1805
+ payment_method: z.ZodNullable<z.ZodDiscriminatedUnion<[z.ZodObject<{
1806
+ kind: z.ZodLiteral<"card">;
1807
+ brand: z.ZodString;
1808
+ last4: z.ZodString;
1809
+ expires: z.ZodString;
1810
+ }, z.core.$strip>, z.ZodObject<{
1811
+ kind: z.ZodLiteral<"applepay">;
1812
+ brand: z.ZodString;
1813
+ last4: z.ZodString;
1814
+ expires: z.ZodString;
1815
+ }, z.core.$strip>, z.ZodObject<{
1816
+ kind: z.ZodLiteral<"paypal">;
1817
+ account: z.ZodString;
1818
+ }, z.core.$strip>], "kind">>;
1819
+ payment_method_options: z.ZodArray<z.ZodObject<{
1820
+ method: z.ZodEnum<{
1821
+ card: "card";
1822
+ paypal: "paypal";
1823
+ applepay: "applepay";
1824
+ }>;
1825
+ pays_invoice: z.ZodBoolean;
1826
+ }, z.core.$strip>>;
1827
+ invoices: z.ZodArray<z.ZodObject<{
1828
+ id: z.ZodUUID;
1829
+ number: z.ZodString;
1830
+ issued_at: z.ZodISODateTime;
1831
+ status: z.ZodEnum<{
1832
+ paid: "paid";
1833
+ open: "open";
1834
+ uncollectible: "uncollectible";
1835
+ }>;
1836
+ currency: z.ZodEnum<{
1837
+ eur: "eur";
1838
+ usd: "usd";
1839
+ }>;
1840
+ net_cents: z.ZodNumber;
1841
+ vat_rate_percent: z.ZodNumber;
1842
+ vat_cents: z.ZodNumber;
1843
+ gross_cents: z.ZodNumber;
1844
+ }, z.core.$strip>>;
1845
+ }, z.core.$strip>;
1846
+ charged: z.ZodNullable<z.ZodObject<{
1847
+ id: z.ZodUUID;
1848
+ number: z.ZodString;
1849
+ issued_at: z.ZodISODateTime;
1850
+ status: z.ZodEnum<{
1851
+ paid: "paid";
1852
+ open: "open";
1853
+ uncollectible: "uncollectible";
1854
+ }>;
1855
+ currency: z.ZodEnum<{
1856
+ eur: "eur";
1857
+ usd: "usd";
1858
+ }>;
1859
+ net_cents: z.ZodNumber;
1860
+ vat_rate_percent: z.ZodNumber;
1861
+ vat_cents: z.ZodNumber;
1862
+ gross_cents: z.ZodNumber;
1863
+ }, z.core.$strip>>;
1864
+ }, z.core.$strict>]>;
1865
+ export type PurchaseIntentResponse = z.infer<typeof purchaseIntentResponse>;