@timbro/invoices 0.10.3 → 0.12.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (60) hide show
  1. package/README.md +58 -2
  2. package/dist/admin.d.ts +2 -3
  3. package/dist/admin.d.ts.map +1 -1
  4. package/dist/generated/hosted/index.d.ts +3 -3
  5. package/dist/generated/hosted/index.d.ts.map +1 -1
  6. package/dist/generated/hosted/index.js +2 -2
  7. package/dist/generated/hosted/sdk.gen.d.ts +19 -1
  8. package/dist/generated/hosted/sdk.gen.d.ts.map +1 -1
  9. package/dist/generated/hosted/sdk.gen.js +225 -1
  10. package/dist/generated/hosted/types.gen.d.ts +583 -5
  11. package/dist/generated/hosted/types.gen.d.ts.map +1 -1
  12. package/dist/generated/hosted/zod-response.gen.d.ts +6678 -208
  13. package/dist/generated/hosted/zod-response.gen.d.ts.map +1 -1
  14. package/dist/generated/hosted/zod-response.gen.js +694 -207
  15. package/dist/generated/hosted/zod.gen.d.ts +1661 -14
  16. package/dist/generated/hosted/zod.gen.d.ts.map +1 -1
  17. package/dist/generated/hosted/zod.gen.js +772 -222
  18. package/dist/generated/index.d.ts +3 -3
  19. package/dist/generated/index.d.ts.map +1 -1
  20. package/dist/generated/index.js +2 -2
  21. package/dist/generated/invoice-api-contract.d.ts +186 -2
  22. package/dist/generated/invoice-api-contract.d.ts.map +1 -1
  23. package/dist/generated/invoice-api-contract.js +211 -1
  24. package/dist/generated/sdk.gen.d.ts +5 -5
  25. package/dist/generated/sdk.gen.d.ts.map +1 -1
  26. package/dist/generated/sdk.gen.js +93 -93
  27. package/dist/generated/types.gen.d.ts +288 -139
  28. package/dist/generated/types.gen.d.ts.map +1 -1
  29. package/dist/generated/zod-response.gen.d.ts +2304 -2548
  30. package/dist/generated/zod-response.gen.d.ts.map +1 -1
  31. package/dist/generated/zod-response.gen.js +179 -109
  32. package/dist/generated/zod.gen.d.ts +1252 -2188
  33. package/dist/generated/zod.gen.d.ts.map +1 -1
  34. package/dist/generated/zod.gen.js +215 -115
  35. package/dist/hosted-tenant.d.ts +9 -0
  36. package/dist/hosted-tenant.d.ts.map +1 -1
  37. package/dist/hosted-tenant.js +7 -0
  38. package/dist/index.d.ts +1 -1
  39. package/dist/index.d.ts.map +1 -1
  40. package/dist/invoice-hosted-controls.d.ts +22 -3
  41. package/dist/invoice-hosted-controls.d.ts.map +1 -1
  42. package/dist/invoice-hosted-controls.js +48 -12
  43. package/dist/invoice.d.ts +5 -0
  44. package/dist/invoice.d.ts.map +1 -1
  45. package/dist/invoice.js +1 -0
  46. package/dist/issuance-readiness.d.ts +9 -0
  47. package/dist/issuance-readiness.d.ts.map +1 -0
  48. package/dist/issuance-readiness.js +19 -0
  49. package/dist/timbro-client.d.ts +6 -8
  50. package/dist/timbro-client.d.ts.map +1 -1
  51. package/dist/timbro-client.js +3 -5
  52. package/dist/webhook-event.d.ts +392 -0
  53. package/dist/webhook-event.d.ts.map +1 -1
  54. package/package.json +3 -3
  55. package/dist/certificate-custody-readiness.d.ts +0 -6
  56. package/dist/certificate-custody-readiness.d.ts.map +0 -1
  57. package/dist/certificate-custody-readiness.js +0 -13
  58. package/dist/fiscal-numbering-readiness.d.ts +0 -6
  59. package/dist/fiscal-numbering-readiness.d.ts.map +0 -1
  60. package/dist/fiscal-numbering-readiness.js +0 -13
@@ -6,11 +6,6 @@ export const zAcceptInvitationRequest = z.strictObject({
6
6
  .refine((text) => Array.from(text).length >= 1)
7
7
  .refine((text) => Array.from(text).length <= 128),
8
8
  });
9
- export const zActiveCertificateCustodyBindingResource = z.strictObject({
10
- binding_id: z.uuid(),
11
- certificate_version: z.string().regex(/^[1-9][0-9]*$/),
12
- expected_certificate_sha256: z.string().regex(/^[0-9a-f]{64}$/),
13
- });
14
9
  /**
15
10
  * Buyer identity alternatives admitted by official conditional Type 33 and Type 34 `Comprador`.
16
11
  */
@@ -2643,17 +2638,6 @@ export const zCallerDeclaredSpecialRegimeEligibility = z.union([
2643
2638
  basis_kind: z.enum(["ratified_agreement"]),
2644
2639
  }),
2645
2640
  ]);
2646
- export const zCertificateCustodyCertificateResource = z.strictObject({
2647
- certificate_expires_at: z.iso.datetime(),
2648
- certificate_sha256: z.string().regex(/^[0-9a-f]{64}$/),
2649
- certificate_subject_serial_number: z
2650
- .string()
2651
- .regex(/^(?:[0-9]{9}|[0-9]{11}|IDCDO-(?:[0-9]{9}|[0-9]{11})|PAS[A-Z]{2}-[A-Za-z0-9]{5,20})$/),
2652
- effect_replay_retention_seconds: z
2653
- .int()
2654
- .gte(1)
2655
- .max(2147483647, { error: "Invalid value: Expected int32 to be <= 2147483647" }),
2656
- });
2657
2641
  /**
2658
2642
  * Signature algorithm pinned with a certificate-custody binding.
2659
2643
  */
@@ -2762,17 +2746,6 @@ export const zCompleteVercelInstallationRequest = z.strictObject({
2762
2746
  .regex(/^[^\p{White_Space}](?:[\s\S]*[^\p{White_Space}])?$/u)
2763
2747
  .nullable(),
2764
2748
  });
2765
- export const zCreateInvoiceDeliveryRequest = z.strictObject({
2766
- accountClaimUrl: z
2767
- .url()
2768
- .refine((text) => Array.from(text).length <= 2048)
2769
- .regex(/^https:\/\//)
2770
- .optional(),
2771
- recipientEmail: z
2772
- .email()
2773
- .refine((text) => Array.from(text).length >= 3)
2774
- .refine((text) => Array.from(text).length <= 320),
2775
- });
2776
2749
  export const zCreateOrganizationRequest = z.strictObject({
2777
2750
  legal_name: z
2778
2751
  .string()
@@ -2876,9 +2849,6 @@ export const zEngineProblem = z.strictObject({
2876
2849
  path: z.string(),
2877
2850
  });
2878
2851
  export const zEngineProtocol = z.enum(["timbro.fiscal-engine.v3"]);
2879
- export const zEnrolledCertificateCustodyBindingResource = z.strictObject({
2880
- binding_id: z.uuid(),
2881
- });
2882
2852
  /**
2883
2853
  * One e-CF document type implemented by this engine protocol revision.
2884
2854
  */
@@ -2965,7 +2935,8 @@ export const zFiscalAuthorityRoute = z.enum([
2965
2935
  "consumer_summary_reception",
2966
2936
  ]);
2967
2937
  /**
2968
- * Actor-facing buyer-delivery milestone projected from the immutable lifecycle event ledger.
2938
+ * Whether the buyer may receive the e-CF: ready once DGII received it and answered `Aceptado` or
2939
+ * `Aceptado Condicional`, projected from the immutable lifecycle event ledger.
2969
2940
  */
2970
2941
  export const zBuyerDeliveryReadinessResource = z.union([
2971
2942
  z.strictObject({
@@ -3071,29 +3042,6 @@ export const zAffectedFiscalDocumentResource = z.strictObject({
3071
3042
  issued_on: z.string().regex(/^[0-9]{2}-[0-9]{2}-[0-9]{4}$/),
3072
3043
  issuer_tax_id: z.string().regex(/^[0-9]{9}([0-9]{2})?$/),
3073
3044
  });
3074
- export const zCertificateCustodyReadiness = z.union([
3075
- z.strictObject({
3076
- environment: zFiscalEnvironment,
3077
- legal_issuer_id: z.uuid(),
3078
- organization_id: z.uuid(),
3079
- status: z.enum(["not_configured"]),
3080
- }),
3081
- z.strictObject({
3082
- binding: zEnrolledCertificateCustodyBindingResource,
3083
- environment: zFiscalEnvironment,
3084
- legal_issuer_id: z.uuid(),
3085
- organization_id: z.uuid(),
3086
- status: z.enum(["awaiting_certificate_registration"]),
3087
- }),
3088
- z.strictObject({
3089
- binding: zActiveCertificateCustodyBindingResource,
3090
- certificate: zCertificateCustodyCertificateResource,
3091
- environment: zFiscalEnvironment,
3092
- legal_issuer_id: z.uuid(),
3093
- organization_id: z.uuid(),
3094
- status: z.enum(["ready"]),
3095
- }),
3096
- ]);
3097
3045
  export const zCreateCertificateCustodyBindingRequest = z.strictObject({
3098
3046
  environment: zFiscalEnvironment,
3099
3047
  expected_signer_subject_serial_number: z
@@ -3420,7 +3368,6 @@ export const zFiscalLineWithLegalTip = z.strictObject({
3420
3368
  * Provenance strength of a fiscal-number authorization fact.
3421
3369
  */
3422
3370
  export const zFiscalNumberAuthorizationKnowledge = z.enum(["verified", "reported"]);
3423
- export const zFiscalNumberAuthorizationReadinessStatus = z.enum(["ready", "action_required"]);
3424
3371
  /**
3425
3372
  * Origin of a fiscal-number authorization fact.
3426
3373
  */
@@ -3440,16 +3387,6 @@ export const zFiscalNumberAuthorizationState = z.enum([
3440
3387
  "exhausted",
3441
3388
  "conflicting",
3442
3389
  ]);
3443
- export const zFiscalNumberAuthorizationUnavailableReason = z.enum([
3444
- "authorization_missing",
3445
- "authorization_not_active",
3446
- "authorization_not_verified",
3447
- "authorization_not_observed",
3448
- "range_exhausted",
3449
- "authorization_expiration_invalid",
3450
- "authorization_expired",
3451
- "authorization_range_overlap",
3452
- ]);
3453
3390
  /**
3454
3391
  * Caller instruction that selects how a Fiscal operation obtains its e-NCF.
3455
3392
  *
@@ -3652,7 +3589,11 @@ export const zHealthReadyResponse = z.strictObject({
3652
3589
  schema_version: z.int().gte(1).lte(2147483647).nullable(),
3653
3590
  status: zHealthStatus,
3654
3591
  });
3655
- export const zHostedCertificateImportEnvironment = z.enum(["sandbox", "production"]);
3592
+ export const zHostedCertificateImportEnvironment = z.enum([
3593
+ "sandbox",
3594
+ "certification",
3595
+ "production",
3596
+ ]);
3656
3597
  export const zHostedImportRequest = z.strictObject({
3657
3598
  certificate_p12_base64: z.string(),
3658
3599
  checkout_tenant_id: z.string(),
@@ -3667,7 +3608,11 @@ export const zHostedImportResponse = z.strictObject({
3667
3608
  object: z.string(),
3668
3609
  signer_subject_serial_number: z.string(),
3669
3610
  });
3670
- export const zHostedInvoiceCredentialEnvironment = z.enum(["sandbox", "production"]);
3611
+ export const zHostedInvoiceCredentialEnvironment = z.enum([
3612
+ "sandbox",
3613
+ "certification",
3614
+ "production",
3615
+ ]);
3671
3616
  export const zHostedInvoiceCredentialRequest = z.strictObject({
3672
3617
  checkout_tenant_id: z.string(),
3673
3618
  environment: zHostedInvoiceCredentialEnvironment,
@@ -3678,10 +3623,16 @@ export const zHostedInvoiceCredentialResponse = z.strictObject({
3678
3623
  object: z.string(),
3679
3624
  source_connection_id: z.uuid(),
3680
3625
  });
3626
+ export const zHostedReceiverUrls = z.strictObject({
3627
+ base_url: z.string(),
3628
+ commercial_approval_url: z.string(),
3629
+ reception_url: z.string(),
3630
+ });
3681
3631
  export const zHostedTenantResource = z.strictObject({
3682
3632
  hosted_tenant_binding_id: z.uuid(),
3683
3633
  legal_issuer_id: z.uuid(),
3684
3634
  organization_id: z.uuid(),
3635
+ receiver_urls: zHostedReceiverUrls,
3685
3636
  source_connection_id: z.uuid(),
3686
3637
  webhook_endpoint_id: z.uuid(),
3687
3638
  webhook_signing_secret: z.string().nullable(),
@@ -3732,6 +3683,10 @@ export const zInvoiceBuyer = z.strictObject({
3732
3683
  .regex(/^[^\p{White_Space}](?:[\s\S]*[^\p{White_Space}])?$/u),
3733
3684
  taxId: z.string().regex(/^[0-9]{9}([0-9]{2})?$/),
3734
3685
  });
3686
+ /**
3687
+ * Whether the buyer may receive the e-CF: `ready` once DGII received it and answered `Aceptado`
3688
+ * or `Aceptado Condicional`, never at signing or submission alone.
3689
+ */
3735
3690
  export const zInvoiceBuyerDeliveryReadiness = z.union([
3736
3691
  z.strictObject({
3737
3692
  status: z.enum(["notApplicable"]),
@@ -3822,7 +3777,31 @@ export const zInvoiceCreditNotePaymentTerms = z.union([
3822
3777
  }),
3823
3778
  ]);
3824
3779
  export const zInvoiceDebitNoteModificationCode = z.enum(["2", "3"]);
3780
+ export const zInvoiceDeliveryAttachmentSelection = z.strictObject({
3781
+ pdf: z.boolean().optional(),
3782
+ xml: z.boolean().optional(),
3783
+ });
3784
+ export const zCreateInvoiceDeliveryRequest = z.strictObject({
3785
+ accountClaimUrl: z
3786
+ .url()
3787
+ .refine((text) => Array.from(text).length <= 2048)
3788
+ .regex(/^https:\/\//)
3789
+ .optional(),
3790
+ attachments: zInvoiceDeliveryAttachmentSelection.optional(),
3791
+ recipientEmail: z
3792
+ .email()
3793
+ .refine((text) => Array.from(text).length >= 3)
3794
+ .refine((text) => Array.from(text).length <= 320),
3795
+ });
3796
+ /**
3797
+ * The files this email attaches beside its link.
3798
+ */
3799
+ export const zInvoiceDeliveryAttachments = z.strictObject({
3800
+ pdf: z.boolean(),
3801
+ xml: z.boolean(),
3802
+ });
3825
3803
  export const zInvoiceDeliveryResource = z.strictObject({
3804
+ attachments: zInvoiceDeliveryAttachments,
3826
3805
  createdAt: z.iso.datetime(),
3827
3806
  id: z.uuid(),
3828
3807
  invoiceId: z.uuid(),
@@ -4121,6 +4100,17 @@ export const zInvoiceReceiptAccess = z.strictObject({
4121
4100
  });
4122
4101
  export const zInvoiceReceiptCurrency = z.enum(["DOP"]);
4123
4102
  export const zInvoiceReceiptStatus = z.enum(["accepted", "acceptedWithObservations"]);
4103
+ /**
4104
+ * The signature facts DGII requires on every printed e-CF, read from the signed document.
4105
+ *
4106
+ * Print the buyer's copy after DGII accepts the Invoice; DGII sequences the printed e-CF after
4107
+ * its validation result, including the Type 32 below DOP 250,000 it validates by RFCE summary.
4108
+ */
4109
+ export const zInvoiceSignature = z.strictObject({
4110
+ securityCode: z.string().regex(/^[A-Za-z0-9+/]{6}$/),
4111
+ signedAt: z.string().regex(/^[0-9]{4}-[0-9]{2}-[0-9]{2}T[0-9]{2}:[0-9]{2}:[0-9]{2}-04:00$/),
4112
+ verificationUrl: z.url().regex(/^https:\/\/(ecf|fc)\.dgii\.gov\.do\//),
4113
+ });
4124
4114
  export const zInvoiceSource = z.strictObject({
4125
4115
  contentSha256: z.string().regex(/^[0-9a-f]{64}$/),
4126
4116
  id: z.string(),
@@ -5438,6 +5428,7 @@ export const zInvoiceType = z.enum([
5438
5428
  ]);
5439
5429
  export const zInvoiceFiscalIdentity = z.strictObject({
5440
5430
  eNcf: z.string().regex(/^E(31|32|33|34|41|43|44|45|46|47)[0-9]{10}$/),
5431
+ signature: zInvoiceSignature.nullable(),
5441
5432
  type: zInvoiceType,
5442
5433
  });
5443
5434
  export const zInvoiceWebhookEvent = z.union([
@@ -5469,6 +5460,22 @@ export const zInvoiceWebhookEvent = z.union([
5469
5460
  }),
5470
5461
  type: z.enum(["invoice.ready"]),
5471
5462
  }),
5463
+ z.strictObject({
5464
+ data: z.strictObject({
5465
+ deliveryId: z.uuid(),
5466
+ id: z.uuid(),
5467
+ sourceConnectionId: z.uuid(),
5468
+ }),
5469
+ type: z.enum(["invoice.deliverySent"]),
5470
+ }),
5471
+ z.strictObject({
5472
+ data: z.strictObject({
5473
+ deliveryId: z.uuid(),
5474
+ id: z.uuid(),
5475
+ sourceConnectionId: z.uuid(),
5476
+ }),
5477
+ type: z.enum(["invoice.deliveryFailed"]),
5478
+ }),
5472
5479
  ]);
5473
5480
  export const zInvoiceXmlReadiness = z.union([
5474
5481
  z.strictObject({
@@ -5516,6 +5523,20 @@ export const zIssuanceBlocker = z.enum([
5516
5523
  "fiscal_number_before_verified_floor",
5517
5524
  "sequence_expiration_mismatch",
5518
5525
  ]);
5526
+ export const zIssuanceReadinessReason = z.enum([
5527
+ "legal_issuer_profile_incomplete",
5528
+ "signing_certificate_missing",
5529
+ "signing_certificate_expired",
5530
+ "signing_certificate_not_yet_valid",
5531
+ "authorization_missing",
5532
+ "authorization_not_active",
5533
+ "authorization_not_verified",
5534
+ "authorization_not_observed",
5535
+ "range_exhausted",
5536
+ "authorization_expiration_invalid",
5537
+ "authorization_expired",
5538
+ "authorization_range_overlap",
5539
+ ]);
5519
5540
  export const zLedgerCounter = z.string().regex(/^(0|[1-9][0-9]*)$/);
5520
5541
  export const zCertificateCustodyCertificateVersionResource = z.strictObject({
5521
5542
  certificate_custody_certificate_version: zLedgerCounter,
@@ -5611,46 +5632,6 @@ export const zFiscalNumberAuthorizationHistoryResource = z.strictObject({
5611
5632
  environment: zFiscalEnvironment,
5612
5633
  legal_issuer_id: z.uuid(),
5613
5634
  });
5614
- export const zFiscalNumberAuthorizationSelection = z.strictObject({
5615
- authorization_id: z.uuid(),
5616
- ends_at: zLedgerCounter,
5617
- expires_on: z
5618
- .string()
5619
- .regex(/^\d{2}-\d{2}-\d{4}$/)
5620
- .nullable(),
5621
- next_available_sequence: zLedgerCounter,
5622
- remaining_capacity: z.number().gte(0),
5623
- starts_at: zLedgerCounter,
5624
- state: zFiscalNumberAuthorizationState,
5625
- verified_next_unused: zFiscalNumberAuthorizationNextUnused,
5626
- });
5627
- export const zFiscalNumberAuthorizationTypeReadiness = z.strictObject({
5628
- document_type: zElectronicFiscalDocumentType,
5629
- selected: zFiscalNumberAuthorizationSelection.nullable(),
5630
- status: zFiscalNumberAuthorizationReadinessStatus,
5631
- unavailable_reason: zFiscalNumberAuthorizationUnavailableReason.nullable(),
5632
- });
5633
- export const zFiscalNumberAuthorizationDocumentReadiness = z.strictObject({
5634
- e31: zFiscalNumberAuthorizationTypeReadiness,
5635
- e32: zFiscalNumberAuthorizationTypeReadiness,
5636
- e33: zFiscalNumberAuthorizationTypeReadiness,
5637
- e34: zFiscalNumberAuthorizationTypeReadiness,
5638
- e41: zFiscalNumberAuthorizationTypeReadiness,
5639
- e43: zFiscalNumberAuthorizationTypeReadiness,
5640
- e44: zFiscalNumberAuthorizationTypeReadiness,
5641
- e45: zFiscalNumberAuthorizationTypeReadiness,
5642
- e46: zFiscalNumberAuthorizationTypeReadiness,
5643
- e47: zFiscalNumberAuthorizationTypeReadiness,
5644
- });
5645
- export const zFiscalNumberAuthorizationReadiness = z.strictObject({
5646
- documents: zFiscalNumberAuthorizationDocumentReadiness,
5647
- effective_on: z.iso.date(),
5648
- environment: zFiscalEnvironment,
5649
- issuer_tax_id: z.string().regex(/^[0-9]{9}([0-9]{2})?$/),
5650
- legal_issuer_id: z.uuid(),
5651
- object: z.string(),
5652
- source_connection_id: z.uuid(),
5653
- });
5654
5635
  export const zLegalIssuerVerification = z.enum(["verified", "unverified"]);
5655
5636
  export const zLegalIssuer = z.strictObject({
5656
5637
  address: z
@@ -5784,6 +5765,26 @@ export const zNumberedFiscalDocument = z.strictObject({
5784
5765
  fiscal_number: z.string().regex(/^E(31|32|33|34|41|43|44|45|46|47)[0-9]{10}$/),
5785
5766
  sequence_expires_on: z.string().nullable(),
5786
5767
  });
5768
+ /**
5769
+ * The range Timbro assigns the next fiscal number of this type from.
5770
+ */
5771
+ export const zNumberingRange = z.strictObject({
5772
+ expiresOn: z.iso.date().nullable(),
5773
+ remaining: z.int().gte(1).lte(9999999999),
5774
+ });
5775
+ export const zDocumentTypeIssuanceReadiness = z.union([
5776
+ z.strictObject({
5777
+ numbering: zNumberingRange,
5778
+ status: z.enum(["ready"]),
5779
+ type: zInvoiceType,
5780
+ }),
5781
+ z.strictObject({
5782
+ numbering: zNumberingRange.nullable(),
5783
+ reasons: z.array(zIssuanceReadinessReason).min(1),
5784
+ status: z.enum(["actionRequired"]),
5785
+ type: zInvoiceType,
5786
+ }),
5787
+ ]);
5787
5788
  export const zOnboardingLegalIssuerIdentityOutcome = z.union([
5788
5789
  z.strictObject({
5789
5790
  status: z.enum(["not_started"]),
@@ -6502,6 +6503,41 @@ export const zSignedDocumentReadinessResource = z.union([
6502
6503
  status: z.enum(["ready"]),
6503
6504
  }),
6504
6505
  ]);
6506
+ /**
6507
+ * The active signing certificate, judged at the moment of the read.
6508
+ */
6509
+ export const zSigningCertificateReadiness = z.union([
6510
+ z.strictObject({
6511
+ notAfter: z.iso.datetime(),
6512
+ notBefore: z.iso.datetime(),
6513
+ sha256: z.string().regex(/^[0-9a-f]{64}$/),
6514
+ status: z.enum(["ready"]),
6515
+ }),
6516
+ z.strictObject({
6517
+ notAfter: z.iso.datetime(),
6518
+ notBefore: z.iso.datetime(),
6519
+ sha256: z.string().regex(/^[0-9a-f]{64}$/),
6520
+ status: z.enum(["expired"]),
6521
+ }),
6522
+ z.strictObject({
6523
+ notAfter: z.iso.datetime(),
6524
+ notBefore: z.iso.datetime(),
6525
+ sha256: z.string().regex(/^[0-9a-f]{64}$/),
6526
+ status: z.enum(["notYetValid"]),
6527
+ }),
6528
+ z.strictObject({
6529
+ status: z.enum(["missing"]),
6530
+ }),
6531
+ ]);
6532
+ /**
6533
+ * Whether the issuer can issue each e-CF type now in this environment.
6534
+ */
6535
+ export const zIssuanceReadiness = z.strictObject({
6536
+ certificate: zSigningCertificateReadiness,
6537
+ documentTypes: z.array(zDocumentTypeIssuanceReadiness),
6538
+ environment: zFiscalEnvironment,
6539
+ issuerTaxId: z.string().regex(/^[0-9]{9}([0-9]{2})?$/),
6540
+ });
6505
6541
  /**
6506
6542
  * Named additional taxes supported by the common Source contract.
6507
6543
  */
@@ -28949,6 +28985,36 @@ export const zInvoiceWebhookEventEnvelope = z.union([
28949
28985
  sequence: z.string().regex(/^[1-9][0-9]*$/),
28950
28986
  type: z.enum(["invoice.ready"]),
28951
28987
  }),
28988
+ z.strictObject({
28989
+ apiVersion: z.string().refine((text) => Array.from(text).length >= 1),
28990
+ data: z.strictObject({
28991
+ deliveryId: z.uuid(),
28992
+ id: z.uuid(),
28993
+ sourceConnectionId: z.uuid(),
28994
+ }),
28995
+ environment: zFiscalEnvironment,
28996
+ id: z.uuid(),
28997
+ object: zWebhookEventObject,
28998
+ occurredAt: z.iso.datetime(),
28999
+ organizationId: z.uuid(),
29000
+ sequence: z.string().regex(/^[1-9][0-9]*$/),
29001
+ type: z.enum(["invoice.deliverySent"]),
29002
+ }),
29003
+ z.strictObject({
29004
+ apiVersion: z.string().refine((text) => Array.from(text).length >= 1),
29005
+ data: z.strictObject({
29006
+ deliveryId: z.uuid(),
29007
+ id: z.uuid(),
29008
+ sourceConnectionId: z.uuid(),
29009
+ }),
29010
+ environment: zFiscalEnvironment,
29011
+ id: z.uuid(),
29012
+ object: zWebhookEventObject,
29013
+ occurredAt: z.iso.datetime(),
29014
+ organizationId: z.uuid(),
29015
+ sequence: z.string().regex(/^[1-9][0-9]*$/),
29016
+ type: z.enum(["invoice.deliveryFailed"]),
29017
+ }),
28952
29018
  ]);
28953
29019
  export const zReceptionWebhookEventEnvelope = z.union([
28954
29020
  z.strictObject({
@@ -29082,6 +29148,36 @@ export const zWebhookEventEnvelope = z.union([
29082
29148
  sequence: z.string().regex(/^[1-9][0-9]*$/),
29083
29149
  type: z.enum(["invoice.ready"]),
29084
29150
  }),
29151
+ z.strictObject({
29152
+ apiVersion: z.string().refine((text) => Array.from(text).length >= 1),
29153
+ data: z.strictObject({
29154
+ deliveryId: z.uuid(),
29155
+ id: z.uuid(),
29156
+ sourceConnectionId: z.uuid(),
29157
+ }),
29158
+ environment: zFiscalEnvironment,
29159
+ id: z.uuid(),
29160
+ object: zWebhookEventObject,
29161
+ occurredAt: z.iso.datetime(),
29162
+ organizationId: z.uuid(),
29163
+ sequence: z.string().regex(/^[1-9][0-9]*$/),
29164
+ type: z.enum(["invoice.deliverySent"]),
29165
+ }),
29166
+ z.strictObject({
29167
+ apiVersion: z.string().refine((text) => Array.from(text).length >= 1),
29168
+ data: z.strictObject({
29169
+ deliveryId: z.uuid(),
29170
+ id: z.uuid(),
29171
+ sourceConnectionId: z.uuid(),
29172
+ }),
29173
+ environment: zFiscalEnvironment,
29174
+ id: z.uuid(),
29175
+ object: zWebhookEventObject,
29176
+ occurredAt: z.iso.datetime(),
29177
+ organizationId: z.uuid(),
29178
+ sequence: z.string().regex(/^[1-9][0-9]*$/),
29179
+ type: z.enum(["invoice.deliveryFailed"]),
29180
+ }),
29085
29181
  z.strictObject({
29086
29182
  apiVersion: z.string().refine((text) => Array.from(text).length >= 1),
29087
29183
  data: z.strictObject({
@@ -29458,6 +29554,14 @@ export const zReplaceHostedInvoicePath = z.object({
29458
29554
  * The retained successor for this replacement request.
29459
29555
  */
29460
29556
  export const zReplaceHostedInvoiceResponse = zInvoiceResource;
29557
+ export const zRetrieveHostedIssuanceReadinessQuery = z.object({
29558
+ checkout_tenant_id: z.string().refine((text) => Array.from(text).length >= 1),
29559
+ environment: zFiscalEnvironment,
29560
+ });
29561
+ /**
29562
+ * Whether the hosted tenant's issuer can issue each e-CF type now in this environment.
29563
+ */
29564
+ export const zRetrieveHostedIssuanceReadinessResponse = zIssuanceReadiness;
29461
29565
  export const zListFiscalOperationsQuery = z.object({
29462
29566
  cursor: z
29463
29567
  .string()
@@ -29525,10 +29629,6 @@ export const zReadFiscalOperationTimingPath = z.object({
29525
29629
  * Every retained timing row this Fiscal operation carries, bounded per source.
29526
29630
  */
29527
29631
  export const zReadFiscalOperationTimingResponse = zFiscalOperationTimingReport;
29528
- /**
29529
- * The authenticated tenant's certificate-custody readiness resource.
29530
- */
29531
- export const zReadCertificateCustodyReadinessResponse = zCertificateCustodyReadiness;
29532
29632
  export const zCreateDirectConnectionRequestBody = zCreateDirectConnectionRequest;
29533
29633
  export const zCreateDirectConnectionRequestResponse = zDirectConnectionRequestResource;
29534
29634
  export const zCancelDirectConnectionRequestHeaders = z.object({
@@ -29560,10 +29660,6 @@ export const zRetrieveFiscalDeliveryPrintedRepresentationPath = z.object({
29560
29660
  * The verified retained printed representation PDF.
29561
29661
  */
29562
29662
  export const zRetrieveFiscalDeliveryPrintedRepresentationResponse = z.instanceof(Uint8Array);
29563
- /**
29564
- * Current central fiscal-number ranges and actionable availability for the authenticated Source connection's issuer and environment.
29565
- */
29566
- export const zReadFiscalNumberAuthorizationReadinessResponse = zFiscalNumberAuthorizationReadiness;
29567
29663
  export const zImportHostedCertificateCustodyBody = zHostedImportRequest;
29568
29664
  export const zImportHostedCertificateCustodyResponse = zHostedImportResponse;
29569
29665
  export const zIssueHostedInvoiceCredentialBody = zHostedInvoiceCredentialRequest;
@@ -29681,6 +29777,10 @@ export const zReplaceInvoicePath = z.object({
29681
29777
  * The retained successor for this replacement request.
29682
29778
  */
29683
29779
  export const zReplaceInvoiceResponse = zInvoiceResource;
29780
+ /**
29781
+ * Whether the Source connection's issuer can issue each e-CF type now, with every blocking reason.
29782
+ */
29783
+ export const zRetrieveIssuanceReadinessResponse = zIssuanceReadiness;
29684
29784
  export const zCreateOrganizationBody = zCreateOrganizationRequest;
29685
29785
  /**
29686
29786
  * The Organization exists with the caller as administrator.
@@ -1,3 +1,4 @@
1
+ import { type CertificateCustodyImportResult } from "./certificate-custody-import.ts";
1
2
  import { type CreateHostedTenantRequest, type HostedWebhookSecretRotation as GeneratedHostedWebhookSecretRotation, type ReleasedHostedTenant as GeneratedReleasedHostedTenant, type HostedTenantResource } from "./generated/index.ts";
2
3
  import { type ReadonlyCamelCase } from "./public-case.ts";
3
4
  import { type StampServerBearerTokenProvider } from "./stamp-server-http-transport.ts";
@@ -8,6 +9,13 @@ export type HostedTenantCreateCommand = {
8
9
  readonly rnc: string;
9
10
  readonly signal?: AbortSignal;
10
11
  };
12
+ export type HostedTenantCertificateImportCommand = {
13
+ readonly checkoutTenantId: string;
14
+ readonly environment: HostedTenantEnvironment;
15
+ readonly certificateP12Base64: string;
16
+ readonly password: string;
17
+ readonly signal?: AbortSignal;
18
+ };
11
19
  export type HostedTenantWebhookSecretRotationCommand = {
12
20
  readonly sourceConnectionId: string;
13
21
  readonly idempotencyKey?: string;
@@ -30,6 +38,7 @@ export type HostedTenantClientOptions = {
30
38
  };
31
39
  export type HostedTenantClient = {
32
40
  readonly create: (command: HostedTenantCreateCommand) => Promise<HostedTenant>;
41
+ readonly importCertificate: (command: HostedTenantCertificateImportCommand) => Promise<CertificateCustodyImportResult>;
33
42
  readonly release: (command: HostedTenantReleaseCommand) => Promise<HostedTenantRelease>;
34
43
  readonly rotateWebhookSecret: (command: HostedTenantWebhookSecretRotationCommand) => Promise<HostedWebhookSecretRotation>;
35
44
  };
@@ -1 +1 @@
1
- {"version":3,"file":"hosted-tenant.d.ts","sourceRoot":"","sources":["../src/hosted-tenant.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,KAAK,yBAAyB,EAG9B,KAAK,2BAA2B,IAAI,oCAAoC,EACxE,KAAK,oBAAoB,IAAI,6BAA6B,EAC1D,KAAK,oBAAoB,EAG1B,MAAM,sBAAsB,CAAC;AAI9B,OAAO,EAAE,KAAK,iBAAiB,EAAgB,MAAM,kBAAkB,CAAC;AACxE,OAAO,EAEL,KAAK,8BAA8B,EACpC,MAAM,kCAAkC,CAAC;AAE1C,MAAM,MAAM,uBAAuB,GAAG,yBAAyB,CAAC,aAAa,CAAC,CAAC;AAE/E,MAAM,MAAM,yBAAyB,GAAG;IACtC,QAAQ,CAAC,gBAAgB,EAAE,MAAM,CAAC;IACl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,OAAO,EAAE,wCAAwC,KAC9C,OAAO,CAAC,2BAA2B,CAAC,CAAC;CAC3C,CAAC;AAEF,kFAAkF;AAClF,wBAAgB,wBAAwB,CAAC,OAAO,EAAE,yBAAyB,GAAG,kBAAkB,CAyB/F"}
@@ -1,3 +1,4 @@
1
+ import { importHostedCertificateCustodyResource, } from "./certificate-custody-import.js";
1
2
  import { createHostedTenant, createHostedTenantWebhookSecretRotation, releaseHostedTenant, } from "./generated/index.js";
2
3
  import { createGeneratedOperationClient } from "./generated-operation-client.js";
3
4
  import { throwGeneratedProblem } from "./generated-problem.js";
@@ -15,6 +16,12 @@ export function createHostedTenantClient(options) {
15
16
  }));
16
17
  return {
17
18
  create: (command) => createHostedTenantResource(client, command),
19
+ importCertificate: (command) => importHostedCertificateCustodyResource(client, {
20
+ certificateP12Base64: command.certificateP12Base64,
21
+ password: command.password,
22
+ hosted: { checkoutTenantId: command.checkoutTenantId, environment: command.environment },
23
+ ...(command.signal === undefined ? {} : { signal: command.signal }),
24
+ }),
18
25
  release: (command) => releaseHostedTenantBinding(client, command),
19
26
  rotateWebhookSecret: (command) => rotateHostedTenantWebhookSecret(client, command),
20
27
  };
package/dist/index.d.ts CHANGED
@@ -3,7 +3,7 @@ export type { InvoiceCreateOptions, InvoiceDeliveryCommand, InvoiceDeliveryReadC
3
3
  export { createTimbroInvoices } from "./invoice.ts";
4
4
  export type { InvoiceErrorDetail, InvoiceFailure } from "./invoice-error.ts";
5
5
  export { InvoiceError } from "./invoice-error.ts";
6
- export type { BusinessConfigureInvoicingCommand, BusinessImportSigningCertificateCommand, BusinessIssueInvoiceKeyCommand, BusinessIssueTestInvoiceCommand, BusinessIssueTestInvoiceOptions, BusinessUpdateCommand, InvoiceHostedControls, WebhookEndpointCreateCommand, WebhookEndpointListDeliveriesCommand, WebhookEndpointListFilters, WebhookEndpointReplayCommand, } from "./invoice-hosted-controls.ts";
6
+ export type { BusinessCertification, BusinessConfigureInvoicingCommand, BusinessImportSigningCertificateCommand, BusinessIssueInvoiceKeyCommand, BusinessIssueTestInvoiceCommand, BusinessIssueTestInvoiceOptions, BusinessStartCertificationCommand, BusinessSubmitCertificationEvidenceCommand, BusinessUpdateCommand, InvoiceHostedControls, WebhookEndpointCreateCommand, WebhookEndpointListDeliveriesCommand, WebhookEndpointListFilters, WebhookEndpointReplayCommand, } from "./invoice-hosted-controls.ts";
7
7
  export type { ProblemBody, ProblemCatalogEntry, ProblemCode, ProblemFailure, PublicProblemCode, } from "./problem-contract.ts";
8
8
  export { PROBLEM_CATALOG } from "./problem-contract.ts";
9
9
  export type { CommercialResponse, ReceivedDocumentDownload, ReceivedDocumentListCommand, ReceivedDocumentPage, ReceivedDocumentRecoveryFilter, ReceivedDocumentResource, ReceivedDocumentResponseFilter, ReceivedDocumentStateFilter, ReceivedDocumentSummary, } from "./received-documents.ts";
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA,YAAY,EACV,uBAAuB,EACvB,WAAW,EACX,cAAc,EACd,cAAc,EACd,oBAAoB,EACpB,cAAc,EACd,eAAe,EACf,WAAW,GACZ,MAAM,sBAAsB,CAAC;AAC9B,YAAY,EACV,oBAAoB,EACpB,sBAAsB,EACtB,0BAA0B,EAC1B,kBAAkB,EAClB,kBAAkB,EAClB,kBAAkB,EAClB,qBAAqB,EACrB,kBAAkB,EAClB,cAAc,EACd,qBAAqB,GACtB,MAAM,cAAc,CAAC;AACtB,OAAO,EAAE,oBAAoB,EAAE,MAAM,cAAc,CAAC;AACpD,YAAY,EAAE,kBAAkB,EAAE,cAAc,EAAE,MAAM,oBAAoB,CAAC;AAC7E,OAAO,EAAE,YAAY,EAAE,MAAM,oBAAoB,CAAC;AAClD,YAAY,EACV,iCAAiC,EACjC,uCAAuC,EACvC,8BAA8B,EAC9B,+BAA+B,EAC/B,+BAA+B,EAC/B,qBAAqB,EACrB,qBAAqB,EACrB,4BAA4B,EAC5B,oCAAoC,EACpC,0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M,oBAAoB,CAAC;AAClD,YAAY,EACV,qBAAqB,EACrB,iCAAiC,EACjC,uCAAuC,EACvC,8BAA8B,EAC9B,+BAA+B,EAC/B,+BAA+B,EAC/B,iCAAiC,EACjC,0CAA0C,EAC1C,qBAAqB,EACrB,qBAAqB,EACrB,4BAA4B,EAC5B,oCAAoC,EACpC,0BAA0B,EAC1B,4BAA4B,GAC7B,MAAM,8BAA8B,CAAC;AACtC,YAAY,EACV,WAAW,EACX,mBAAmB,EACnB,WAAW,EACX,cAAc,EACd,iBAAiB,GAClB,MAAM,uBAAuB,CAAC;AAC/B,OAAO,EAAE,eAAe,EAAE,MAAM,uBAAuB,CAAC;AACxD,YAAY,EACV,kBAAkB,EAClB,wBAAwB,EACxB,2BAA2B,EAC3B,oBAAoB,EACpB,8BAA8B,EAC9B,wBAAwB,EACxB,8BAA8B,EAC9B,2BAA2B,EAC3B,uBAAuB,GACxB,MAAM,yBAAyB,CAAC;AACjC,YAAY,EACV,qBAAqB,EACrB,mBAAmB,EACnB,2BAA2B,EAC3B,oBAAoB,EACpB,qBAAqB,EACrB,wBAAwB,GACzB,MAAM,oBAAoB,CAAC;AAC5B,OAAO,EAAE,wBAAwB,EAAE,MAAM,oBAAoB,CAAC;AAC9D,YAAY,EACV,sBAAsB,EACtB,0BAA0B,EAC1B,4BAA4B,GAC7B,MAAM,2BAA2B,CAAC;AACnC,OAAO,EAAE,qBAAqB,EAAE,wBAAwB,EAAE,MAAM,2BAA2B,CAAC"}
@@ -1,5 +1,5 @@
1
- import type { ConfigureInvoicingData, CreateWebhookEndpointData, ImportSigningCertificateData, IssueInvoiceKeyData, IssueTestInvoiceData, ListWebhookDeliveriesData, ListWebhookEndpointsData, ReplayWebhookEventsData, UpdateBusinessData } from "./generated/hosted/index.ts";
2
- import { configureInvoicing as configureInvoicingOperation, createWebhookEndpoint as createWebhookEndpointOperation, importSigningCertificate as importSigningCertificateOperation, issueInvoiceKey as issueInvoiceKeyOperation, issueTestInvoice as issueTestInvoiceOperation, listWebhookDeliveries as listWebhookDeliveriesOperation, listWebhookEndpoints as listWebhookEndpointsOperation, reactivateWebhookEndpoint as reactivateWebhookEndpointOperation, replayWebhookEvents as replayWebhookEventsOperation, retrieveBusiness as retrieveBusinessOperation, retrieveWebhookEndpoint as retrieveWebhookEndpointOperation, rotateWebhookEndpointSecret as rotateWebhookEndpointSecretOperation, suspendWebhookEndpoint as suspendWebhookEndpointOperation, updateBusiness as updateBusinessOperation } from "./generated/hosted/index.ts";
1
+ import type { ConfigureInvoicingData, CreateWebhookEndpointData, ImportSigningCertificateData, IssueInvoiceKeyData, IssueTestInvoiceData, ListWebhookDeliveriesData, ListWebhookEndpointsData, ReplayWebhookEventsData, StartMerchantBusinessCertificationData, SubmitMerchantBusinessCertificationEvidenceData, UpdateBusinessData } from "./generated/hosted/index.ts";
2
+ import { configureInvoicing as configureInvoicingOperation, createWebhookEndpoint as createWebhookEndpointOperation, issueInvoiceKey as issueInvoiceKeyOperation, issueTestInvoice as issueTestInvoiceOperation, listWebhookDeliveries as listWebhookDeliveriesOperation, listWebhookEndpoints as listWebhookEndpointsOperation, reactivateWebhookEndpoint as reactivateWebhookEndpointOperation, replayWebhookEvents as replayWebhookEventsOperation, retrieveBusiness as retrieveBusinessOperation, retrieveMerchantBusinessCertification as retrieveCertificationOperation, retrieveWebhookEndpoint as retrieveWebhookEndpointOperation, rotateWebhookEndpointSecret as rotateWebhookEndpointSecretOperation, suspendWebhookEndpoint as suspendWebhookEndpointOperation, updateBusiness as updateBusinessOperation } from "./generated/hosted/index.ts";
3
3
  import type { Client } from "./generated-operation-client.ts";
4
4
  import type { InvoiceRequestOptions } from "./invoice.ts";
5
5
  type BodyOf<Data> = Data extends {
@@ -23,6 +23,13 @@ export type BusinessConfigureInvoicingCommand = BodyOf<ConfigureInvoicingData> &
23
23
  readonly idempotencyKey: string;
24
24
  };
25
25
  export type BusinessImportSigningCertificateCommand = BodyOf<ImportSigningCertificateData>;
26
+ export type BusinessCertification = SuccessBody<ReturnType<typeof retrieveCertificationOperation>, 200>;
27
+ export type BusinessStartCertificationCommand = BodyOf<StartMerchantBusinessCertificationData> & {
28
+ readonly idempotencyKey: string;
29
+ };
30
+ export type BusinessSubmitCertificationEvidenceCommand = BodyOf<SubmitMerchantBusinessCertificationEvidenceData> & {
31
+ readonly idempotencyKey: string;
32
+ };
26
33
  export type BusinessIssueTestInvoiceCommand = Partial<BodyOf<IssueTestInvoiceData>>;
27
34
  export type BusinessIssueTestInvoiceOptions = BusinessIssueTestInvoiceCommand & InvoiceRequestOptions;
28
35
  export type BusinessIssueInvoiceKeyCommand = BodyOf<IssueInvoiceKeyData> & {
@@ -38,10 +45,22 @@ export type WebhookEndpointReplayCommand = PathOf<ReplayWebhookEventsData> & Bod
38
45
  };
39
46
  export type InvoiceHostedControls = {
40
47
  readonly business: {
48
+ readonly certification: {
49
+ readonly retrieve: (options?: InvoiceRequestOptions) => Promise<BusinessCertification>;
50
+ readonly start: (command: BusinessStartCertificationCommand, options?: InvoiceRequestOptions) => Promise<BusinessCertification>;
51
+ readonly submitEvidence: (command: BusinessSubmitCertificationEvidenceCommand, options?: InvoiceRequestOptions) => Promise<BusinessCertification>;
52
+ };
41
53
  readonly retrieve: (options?: InvoiceRequestOptions) => Promise<SuccessBody<ReturnType<typeof retrieveBusinessOperation>, 200>>;
42
54
  readonly update: (command: BusinessUpdateCommand, options?: InvoiceRequestOptions) => Promise<SuccessBody<ReturnType<typeof updateBusinessOperation>, 200>>;
43
55
  readonly configureInvoicing: (command: BusinessConfigureInvoicingCommand, options?: InvoiceRequestOptions) => Promise<SuccessBody<ReturnType<typeof configureInvoicingOperation>, 201>>;
44
- readonly importSigningCertificate: (command: BusinessImportSigningCertificateCommand, options?: InvoiceRequestOptions) => Promise<SuccessBody<ReturnType<typeof importSigningCertificateOperation>, 200>>;
56
+ readonly importSigningCertificate: {
57
+ (command: Extract<BusinessImportSigningCertificateCommand, {
58
+ purpose: "certification";
59
+ }>, options?: InvoiceRequestOptions): Promise<BusinessCertification>;
60
+ (command: Extract<BusinessImportSigningCertificateCommand, {
61
+ mode: "test" | "live";
62
+ }>, options?: InvoiceRequestOptions): Promise<SuccessBody<ReturnType<typeof retrieveBusinessOperation>, 200>>;
63
+ };
45
64
  readonly issueTestInvoice: (options?: BusinessIssueTestInvoiceOptions) => Promise<SuccessBody<ReturnType<typeof issueTestInvoiceOperation>, 200>>;
46
65
  readonly issueInvoiceKey: (command: BusinessIssueInvoiceKeyCommand, options?: InvoiceRequestOptions) => Promise<SuccessBody<ReturnType<typeof issueInvoiceKeyOperation>, 201>>;
47
66
  };
@@ -1 +1 @@
1
- {"version":3,"file":"invoice-hosted-controls.d.ts","sourceRoot":"","sources":["../src/invoice-hosted-controls.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EACV,sBAAsB,EACtB,yBAAyB,EACzB,4BAA4B,EAC5B,mBAAmB,EACnB,oBAAoB,EACpB,yBAAyB,EACzB,wBAAwB,EACxB,uBAAuB,EACvB,kBAAkB,EACnB,MAAM,6BAA6B,CAAC;AACrC,OAAO,EACL,kBAAkB,IAAI,2BAA2B,EACjD,qBAAqB,IAAI,8BAA8B,EAEvD,wBAAwB,IAAI,iCAAiC,EAC7D,eAAe,IAAI,wBAAwB,EAC3C,gBAAgB,IAAI,yBAAyB,EAC7C,qBAAqB,IAAI,8BAA8B,EACvD,oBAAoB,IAAI,6BAA6B,EACrD,yBAAyB,IAAI,kCAAkC,EAC/D,mBAAmB,IAAI,4BAA4B,EACnD,gBAAgB,IAAI,yBAAyB,EAC7C,uBAAuB,IAAI,gCAAgC,EAC3D,2BAA2B,IAAI,oCAAoC,EACnE,sBAAsB,IAAI,+BAA+B,EACzD,cAAc,IAAI,uBAAuB,EAC1C,MAAM,6BAA6B,CAAC;AACrC,OAAO,KAAK,EAAE,MAAM,EAAE,MAAM,iCAAiC,CAAC;AAE9D,OAAO,KAAK,EAAE,qBAAqB,EAAE,MAAM,cAAc,CAAC;AAE1D,KAAK,MAAM,CAA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