chargebee 3.34.0 → 3.36.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.
- package/CHANGELOG.md +237 -0
- package/cjs/environment.js +1 -1
- package/cjs/resources/api_endpoints.js +230 -2
- package/cjs/resources/webhook/eventType.js +25 -1
- package/cjs/schema/addon.schema.js +221 -40
- package/cjs/schema/alert.schema.js +17 -2
- package/cjs/schema/alert_status.schema.js +6 -1
- package/cjs/schema/attached_item.schema.js +101 -26
- package/cjs/schema/business_entity.schema.js +43 -6
- package/cjs/schema/business_rule.schema.js +2 -2
- package/cjs/schema/business_ruleset.schema.js +2 -2
- package/cjs/schema/collections_payment_promise.schema.js +43 -0
- package/cjs/schema/comment.schema.js +17 -4
- package/cjs/schema/coupon.schema.js +218 -37
- package/cjs/schema/coupon_code.schema.js +36 -6
- package/cjs/schema/coupon_set.schema.js +108 -27
- package/cjs/schema/credit_note.schema.js +497 -105
- package/cjs/schema/credit_unit.schema.js +12 -2
- package/cjs/schema/customer.schema.js +212 -62
- package/cjs/schema/differential_price.schema.js +100 -12
- package/cjs/schema/dispute.schema.js +125 -33
- package/cjs/schema/einvoice.schema.js +27 -6
- package/cjs/schema/email_log.schema.js +15 -4
- package/cjs/schema/entitlement.schema.js +35 -6
- package/cjs/schema/entitlement_override.schema.js +17 -1
- package/cjs/schema/estimate.schema.js +585 -40
- package/cjs/schema/event.schema.js +1334 -585
- package/cjs/schema/export.schema.js +4459 -1412
- package/cjs/schema/feature.schema.js +73 -11
- package/cjs/schema/gateway_request_log.schema.js +309 -0
- package/cjs/schema/gateway_webhook_log.schema.js +257 -0
- package/cjs/schema/gift.schema.js +51 -5
- package/cjs/schema/grant_block.schema.js +45 -12
- package/cjs/schema/hosted_page.schema.js +564 -68
- package/cjs/schema/index.js +6 -0
- package/cjs/schema/invoice.schema.js +843 -123
- package/cjs/schema/item.schema.js +151 -28
- package/cjs/schema/item_entitlement.schema.js +23 -2
- package/cjs/schema/item_family.schema.js +29 -8
- package/cjs/schema/item_price.schema.js +263 -48
- package/cjs/schema/ledger_account_balance.schema.js +11 -2
- package/cjs/schema/ledger_operation.schema.js +44 -17
- package/cjs/schema/metered_feature.schema.js +10 -1
- package/cjs/schema/omnichannel_one_time_order.schema.js +42 -4
- package/cjs/schema/omnichannel_subscription.schema.js +146 -32
- package/cjs/schema/order.schema.js +233 -61
- package/cjs/schema/organization_detail.schema.js +36 -0
- package/cjs/schema/payment_schedule.schema.js +39 -8
- package/cjs/schema/payment_schedule_scheme.schema.js +37 -7
- package/cjs/schema/payment_source.schema.js +375 -148
- package/cjs/schema/payment_voucher.schema.js +33 -5
- package/cjs/schema/plan.schema.js +345 -57
- package/cjs/schema/price_ramp.schema.js +153 -0
- package/cjs/schema/price_variant.schema.js +88 -18
- package/cjs/schema/pricing_page_session.schema.js +36 -2
- package/cjs/schema/promotional_credit.schema.js +27 -6
- package/cjs/schema/purchase.schema.js +210 -12
- package/cjs/schema/quote.schema.js +907 -87
- package/cjs/schema/quote_entitlement.schema.js +6 -2
- package/cjs/schema/ramp.schema.js +242 -24
- package/cjs/schema/retry_segment.schema.js +12 -0
- package/cjs/schema/site_migration_detail.schema.js +50 -16
- package/cjs/schema/subscription.schema.js +1002 -173
- package/cjs/schema/subscription_entitlement.schema.js +9 -1
- package/cjs/schema/transaction.schema.js +780 -342
- package/cjs/schema/unbilled_charge.schema.js +141 -13
- package/cjs/schema/usage.schema.js +59 -11
- package/cjs/schema/usage_event.schema.js +13 -1
- package/cjs/schema/usage_summary.schema.js +1 -0
- package/cjs/schema/virtual_bank_account.schema.js +42 -10
- package/cjs/schema/webhook_endpoint.schema.js +50 -2
- package/esm/environment.js +1 -1
- package/esm/resources/api_endpoints.js +230 -2
- package/esm/resources/webhook/eventType.js +25 -1
- package/esm/schema/addon.schema.js +221 -40
- package/esm/schema/alert.schema.js +17 -2
- package/esm/schema/alert_status.schema.js +6 -1
- package/esm/schema/attached_item.schema.js +101 -26
- package/esm/schema/business_entity.schema.js +42 -5
- package/esm/schema/business_rule.schema.js +2 -2
- package/esm/schema/business_ruleset.schema.js +2 -2
- package/esm/schema/collections_payment_promise.schema.js +40 -0
- package/esm/schema/comment.schema.js +17 -4
- package/esm/schema/coupon.schema.js +218 -37
- package/esm/schema/coupon_code.schema.js +36 -6
- package/esm/schema/coupon_set.schema.js +108 -27
- package/esm/schema/credit_note.schema.js +497 -105
- package/esm/schema/credit_unit.schema.js +12 -2
- package/esm/schema/customer.schema.js +212 -62
- package/esm/schema/differential_price.schema.js +100 -12
- package/esm/schema/dispute.schema.js +125 -33
- package/esm/schema/einvoice.schema.js +27 -6
- package/esm/schema/email_log.schema.js +15 -4
- package/esm/schema/entitlement.schema.js +35 -6
- package/esm/schema/entitlement_override.schema.js +17 -1
- package/esm/schema/estimate.schema.js +585 -40
- package/esm/schema/event.schema.js +1334 -585
- package/esm/schema/export.schema.js +4459 -1412
- package/esm/schema/feature.schema.js +73 -11
- package/esm/schema/gateway_request_log.schema.js +306 -0
- package/esm/schema/gateway_webhook_log.schema.js +254 -0
- package/esm/schema/gift.schema.js +51 -5
- package/esm/schema/grant_block.schema.js +45 -12
- package/esm/schema/hosted_page.schema.js +564 -68
- package/esm/schema/index.js +6 -0
- package/esm/schema/invoice.schema.js +842 -122
- package/esm/schema/item.schema.js +151 -28
- package/esm/schema/item_entitlement.schema.js +23 -2
- package/esm/schema/item_family.schema.js +29 -8
- package/esm/schema/item_price.schema.js +263 -48
- package/esm/schema/ledger_account_balance.schema.js +10 -1
- package/esm/schema/ledger_operation.schema.js +44 -17
- package/esm/schema/metered_feature.schema.js +10 -1
- package/esm/schema/omnichannel_one_time_order.schema.js +42 -4
- package/esm/schema/omnichannel_subscription.schema.js +146 -32
- package/esm/schema/order.schema.js +233 -61
- package/esm/schema/organization_detail.schema.js +33 -0
- package/esm/schema/payment_schedule.schema.js +39 -8
- package/esm/schema/payment_schedule_scheme.schema.js +37 -7
- package/esm/schema/payment_source.schema.js +375 -148
- package/esm/schema/payment_voucher.schema.js +33 -5
- package/esm/schema/plan.schema.js +345 -57
- package/esm/schema/price_ramp.schema.js +150 -0
- package/esm/schema/price_variant.schema.js +88 -18
- package/esm/schema/pricing_page_session.schema.js +36 -2
- package/esm/schema/promotional_credit.schema.js +27 -6
- package/esm/schema/purchase.schema.js +210 -12
- package/esm/schema/quote.schema.js +907 -87
- package/esm/schema/quote_entitlement.schema.js +6 -2
- package/esm/schema/ramp.schema.js +242 -24
- package/esm/schema/retry_segment.schema.js +9 -0
- package/esm/schema/site_migration_detail.schema.js +50 -16
- package/esm/schema/subscription.schema.js +1002 -173
- package/esm/schema/subscription_entitlement.schema.js +9 -1
- package/esm/schema/transaction.schema.js +780 -342
- package/esm/schema/unbilled_charge.schema.js +141 -13
- package/esm/schema/usage.schema.js +59 -11
- package/esm/schema/usage_event.schema.js +13 -1
- package/esm/schema/usage_summary.schema.js +1 -0
- package/esm/schema/virtual_bank_account.schema.js +42 -10
- package/esm/schema/webhook_endpoint.schema.js +50 -2
- package/package.json +1 -1
- package/types/core.d.ts +63 -74
- package/types/index.d.ts +29 -1
- package/types/resources/BillingLineItem.d.ts +10 -0
- package/types/resources/BillingMetadata.d.ts +9 -0
- package/types/resources/BusinessEntity.d.ts +52 -0
- package/types/resources/Citation.d.ts +13 -0
- package/types/resources/CollectionsDispute.d.ts +24 -0
- package/types/resources/CollectionsPaymentPromise.d.ts +93 -0
- package/types/resources/CollectionsReminderSequence.d.ts +35 -0
- package/types/resources/Comment.d.ts +2 -1
- package/types/resources/Content.d.ts +23 -1
- package/types/resources/CreditNote.d.ts +1 -0
- package/types/resources/CustomData.d.ts +14 -0
- package/types/resources/Discount.d.ts +1 -0
- package/types/resources/DraftEstimate.d.ts +13 -0
- package/types/resources/DraftRequest.d.ts +45 -0
- package/types/resources/EmailAttachment.d.ts +16 -0
- package/types/resources/EmailConversation.d.ts +18 -0
- package/types/resources/EmailLog.d.ts +1 -0
- package/types/resources/EmailMessage.d.ts +40 -0
- package/types/resources/Estimate.d.ts +3 -0
- package/types/resources/Event.d.ts +25 -1
- package/types/resources/Execution.d.ts +12 -0
- package/types/resources/GatewayPaymentMethodToken.d.ts +2 -2
- package/types/resources/GatewayRequestLog.d.ts +82 -0
- package/types/resources/GatewayWebhookLog.d.ts +74 -0
- package/types/resources/GrantBlock.d.ts +5 -0
- package/types/resources/GroupByAttribute.d.ts +15 -0
- package/types/resources/GroupByRecommendation.d.ts +10 -0
- package/types/resources/HostedPage.d.ts +18 -0
- package/types/resources/Invoice.d.ts +19 -0
- package/types/resources/ItemPrice.d.ts +1 -0
- package/types/resources/LedgerAccountBalance.d.ts +19 -0
- package/types/resources/Meter.d.ts +1 -0
- package/types/resources/MeteredFeature.d.ts +1 -0
- package/types/resources/OmnichannelOneTimeOrder.d.ts +5 -1
- package/types/resources/OmnichannelSubscription.d.ts +6 -1
- package/types/resources/OmnichannelSubscriptionItem.d.ts +4 -1
- package/types/resources/OrganizationDetail.d.ts +84 -0
- package/types/resources/PaymentSchedule.d.ts +1 -1
- package/types/resources/PaymentScheduleEstimate.d.ts +1 -1
- package/types/resources/PaymentSource.d.ts +19 -0
- package/types/resources/PreferenceVariant.d.ts +10 -0
- package/types/resources/PriceRamp.d.ts +113 -0
- package/types/resources/PrivateNote.d.ts +18 -0
- package/types/resources/Purchase.d.ts +6 -0
- package/types/resources/Ramp.d.ts +6 -0
- package/types/resources/RampInterval.d.ts +12 -0
- package/types/resources/RecordedPurchase.d.ts +5 -1
- package/types/resources/RetrySegment.d.ts +36 -0
- package/types/resources/Subscription.d.ts +3 -0
- package/types/resources/Transaction.d.ts +4 -0
- package/types/resources/Usage.d.ts +7 -0
- package/types/resources/UsageSummary.d.ts +2 -0
- package/types/resources/WebhookEvent.d.ts +159 -5
- package/types/resources/AppliedBusinessRule.d.ts +0 -15
|
@@ -4,12 +4,22 @@
|
|
|
4
4
|
import { z } from 'zod';
|
|
5
5
|
//CreditUnit.list
|
|
6
6
|
const ListCreditUnitStatusSchema = z.object({
|
|
7
|
+
in: z
|
|
8
|
+
.union([
|
|
9
|
+
z.array(z.enum(['active', 'archived']).optional()),
|
|
10
|
+
z.enum(['active', 'archived']),
|
|
11
|
+
])
|
|
12
|
+
.optional(),
|
|
7
13
|
is: z.enum(['active', 'archived']).optional(),
|
|
8
|
-
in: z.enum(['active', 'archived']).optional(),
|
|
9
14
|
});
|
|
10
15
|
const ListCreditUnitIdSchema = z.object({
|
|
16
|
+
in: z
|
|
17
|
+
.union([
|
|
18
|
+
z.array(z.string().optional()),
|
|
19
|
+
z.string().regex(RegExp('^\\[(.*)(,.*)*\\]$')),
|
|
20
|
+
])
|
|
21
|
+
.optional(),
|
|
11
22
|
is: z.string().min(1).optional(),
|
|
12
|
-
in: z.string().regex(RegExp('^\\[(.*)(,.*)*\\]$')).optional(),
|
|
13
23
|
});
|
|
14
24
|
const ListCreditUnitBodySchema = z.looseObject({
|
|
15
25
|
limit: z.number().int().min(1).max(100).optional(),
|
|
@@ -332,12 +332,23 @@ const CreateCustomerPaymentIntentSchema = z.object({
|
|
|
332
332
|
gw_payment_method_id: z.string().max(65000).optional(),
|
|
333
333
|
additional_information: CreateCustomerAdditionalInformationSchema.optional(),
|
|
334
334
|
});
|
|
335
|
+
const CreateCustomerEntityIdentifiersItemSchema = z.object({
|
|
336
|
+
id: z.string().max(40).optional(),
|
|
337
|
+
scheme: z.string().max(50).optional(),
|
|
338
|
+
value: z.string().max(50).optional(),
|
|
339
|
+
standard: z.string().max(50).optional(),
|
|
340
|
+
});
|
|
335
341
|
const CreateCustomerEntityIdentifiersSchema = z.object({
|
|
336
342
|
id: z.array(z.string().max(40).optional()).optional(),
|
|
337
343
|
scheme: z.array(z.string().max(50).optional()).optional(),
|
|
338
344
|
value: z.array(z.string().max(50).optional()).optional(),
|
|
339
345
|
standard: z.array(z.string().max(50).optional()).optional(),
|
|
340
346
|
});
|
|
347
|
+
const CreateCustomerTaxProvidersFieldsItemSchema = z.object({
|
|
348
|
+
provider_name: z.string().max(50).optional(),
|
|
349
|
+
field_id: z.string().max(50).optional(),
|
|
350
|
+
field_value: z.string().max(50).optional(),
|
|
351
|
+
});
|
|
341
352
|
const CreateCustomerTaxProvidersFieldsSchema = z.object({
|
|
342
353
|
provider_name: z.array(z.string().max(50).optional()).optional(),
|
|
343
354
|
field_id: z.array(z.string().max(50).optional()).optional(),
|
|
@@ -426,8 +437,18 @@ const CreateCustomerBodySchema = z.looseObject({
|
|
|
426
437
|
payment_method: CreateCustomerPaymentMethodSchema.optional(),
|
|
427
438
|
payment_intent: CreateCustomerPaymentIntentSchema.optional(),
|
|
428
439
|
billing_address: CreateCustomerBillingAddressSchema.optional(),
|
|
429
|
-
entity_identifiers:
|
|
430
|
-
|
|
440
|
+
entity_identifiers: z
|
|
441
|
+
.union([
|
|
442
|
+
z.array(CreateCustomerEntityIdentifiersItemSchema.optional()),
|
|
443
|
+
CreateCustomerEntityIdentifiersSchema,
|
|
444
|
+
])
|
|
445
|
+
.optional(),
|
|
446
|
+
tax_providers_fields: z
|
|
447
|
+
.union([
|
|
448
|
+
z.array(CreateCustomerTaxProvidersFieldsItemSchema.optional()),
|
|
449
|
+
CreateCustomerTaxProvidersFieldsSchema,
|
|
450
|
+
])
|
|
451
|
+
.optional(),
|
|
431
452
|
});
|
|
432
453
|
export { CreateCustomerBodySchema };
|
|
433
454
|
//Customer.list
|
|
@@ -435,62 +456,108 @@ const ListCustomerIdSchema = z.object({
|
|
|
435
456
|
is: z.string().min(1).optional(),
|
|
436
457
|
is_not: z.string().min(1).optional(),
|
|
437
458
|
starts_with: z.string().min(1).optional(),
|
|
438
|
-
in: z
|
|
439
|
-
|
|
459
|
+
in: z
|
|
460
|
+
.union([
|
|
461
|
+
z.array(z.string().optional()),
|
|
462
|
+
z.string().regex(RegExp('^\\[(.*)(,.*)*\\]$')),
|
|
463
|
+
])
|
|
464
|
+
.optional(),
|
|
465
|
+
not_in: z
|
|
466
|
+
.union([
|
|
467
|
+
z.array(z.string().optional()),
|
|
468
|
+
z.string().regex(RegExp('^\\[(.*)(,.*)*\\]$')),
|
|
469
|
+
])
|
|
470
|
+
.optional(),
|
|
440
471
|
});
|
|
441
472
|
const ListCustomerFirstNameSchema = z.object({
|
|
442
473
|
is: z.string().min(1).optional(),
|
|
443
474
|
is_not: z.string().min(1).optional(),
|
|
444
475
|
starts_with: z.string().min(1).optional(),
|
|
445
|
-
is_present: z.enum(['true', 'false']).optional(),
|
|
476
|
+
is_present: z.union([z.boolean(), z.enum(['true', 'false'])]).optional(),
|
|
446
477
|
});
|
|
447
478
|
const ListCustomerLastNameSchema = z.object({
|
|
448
479
|
is: z.string().min(1).optional(),
|
|
449
480
|
is_not: z.string().min(1).optional(),
|
|
450
481
|
starts_with: z.string().min(1).optional(),
|
|
451
|
-
is_present: z.enum(['true', 'false']).optional(),
|
|
482
|
+
is_present: z.union([z.boolean(), z.enum(['true', 'false'])]).optional(),
|
|
452
483
|
});
|
|
453
484
|
const ListCustomerEmailSchema = z.object({
|
|
454
485
|
is: z.string().min(1).optional(),
|
|
455
486
|
is_not: z.string().min(1).optional(),
|
|
456
487
|
starts_with: z.string().min(1).optional(),
|
|
457
|
-
is_present: z.enum(['true', 'false']).optional(),
|
|
488
|
+
is_present: z.union([z.boolean(), z.enum(['true', 'false'])]).optional(),
|
|
458
489
|
});
|
|
459
490
|
const ListCustomerCompanySchema = z.object({
|
|
460
491
|
is: z.string().min(1).optional(),
|
|
461
492
|
is_not: z.string().min(1).optional(),
|
|
462
493
|
starts_with: z.string().min(1).optional(),
|
|
463
|
-
is_present: z.enum(['true', 'false']).optional(),
|
|
494
|
+
is_present: z.union([z.boolean(), z.enum(['true', 'false'])]).optional(),
|
|
464
495
|
});
|
|
465
496
|
const ListCustomerPhoneSchema = z.object({
|
|
466
497
|
is: z.string().min(1).optional(),
|
|
467
498
|
is_not: z.string().min(1).optional(),
|
|
468
499
|
starts_with: z.string().min(1).optional(),
|
|
469
|
-
is_present: z.enum(['true', 'false']).optional(),
|
|
500
|
+
is_present: z.union([z.boolean(), z.enum(['true', 'false'])]).optional(),
|
|
470
501
|
});
|
|
471
502
|
const ListCustomerAutoCollectionSchema = z.object({
|
|
472
503
|
is: z.enum(['on', 'off']).optional(),
|
|
473
504
|
is_not: z.enum(['on', 'off']).optional(),
|
|
474
|
-
in: z
|
|
475
|
-
|
|
505
|
+
in: z
|
|
506
|
+
.union([z.array(z.enum(['on', 'off']).optional()), z.enum(['on', 'off'])])
|
|
507
|
+
.optional(),
|
|
508
|
+
not_in: z
|
|
509
|
+
.union([z.array(z.enum(['on', 'off']).optional()), z.enum(['on', 'off'])])
|
|
510
|
+
.optional(),
|
|
476
511
|
});
|
|
477
512
|
const ListCustomerTaxabilitySchema = z.object({
|
|
478
513
|
is: z.enum(['taxable', 'exempt', 'zero_rated']).optional(),
|
|
479
514
|
is_not: z.enum(['taxable', 'exempt', 'zero_rated']).optional(),
|
|
480
|
-
in: z
|
|
481
|
-
|
|
515
|
+
in: z
|
|
516
|
+
.union([
|
|
517
|
+
z.array(z.enum(['taxable', 'exempt', 'zero_rated']).optional()),
|
|
518
|
+
z.enum(['taxable', 'exempt', 'zero_rated']),
|
|
519
|
+
])
|
|
520
|
+
.optional(),
|
|
521
|
+
not_in: z
|
|
522
|
+
.union([
|
|
523
|
+
z.array(z.enum(['taxable', 'exempt', 'zero_rated']).optional()),
|
|
524
|
+
z.enum(['taxable', 'exempt', 'zero_rated']),
|
|
525
|
+
])
|
|
526
|
+
.optional(),
|
|
482
527
|
});
|
|
483
528
|
const ListCustomerCreatedAtSchema = z.object({
|
|
484
|
-
after: z
|
|
485
|
-
|
|
486
|
-
|
|
487
|
-
|
|
529
|
+
after: z
|
|
530
|
+
.union([z.number().int(), z.string().regex(RegExp('^\\d{10}$'))])
|
|
531
|
+
.optional(),
|
|
532
|
+
before: z
|
|
533
|
+
.union([z.number().int(), z.string().regex(RegExp('^\\d{10}$'))])
|
|
534
|
+
.optional(),
|
|
535
|
+
on: z
|
|
536
|
+
.union([z.number().int(), z.string().regex(RegExp('^\\d{10}$'))])
|
|
537
|
+
.optional(),
|
|
538
|
+
between: z
|
|
539
|
+
.union([
|
|
540
|
+
z.array(z.number().int().optional()).min(2).max(2),
|
|
541
|
+
z.string().regex(RegExp('^\\[\\d{10},\\d{10}\\]$')),
|
|
542
|
+
])
|
|
543
|
+
.optional(),
|
|
488
544
|
});
|
|
489
545
|
const ListCustomerUpdatedAtSchema = z.object({
|
|
490
|
-
after: z
|
|
491
|
-
|
|
492
|
-
|
|
493
|
-
|
|
546
|
+
after: z
|
|
547
|
+
.union([z.number().int(), z.string().regex(RegExp('^\\d{10}$'))])
|
|
548
|
+
.optional(),
|
|
549
|
+
before: z
|
|
550
|
+
.union([z.number().int(), z.string().regex(RegExp('^\\d{10}$'))])
|
|
551
|
+
.optional(),
|
|
552
|
+
on: z
|
|
553
|
+
.union([z.number().int(), z.string().regex(RegExp('^\\d{10}$'))])
|
|
554
|
+
.optional(),
|
|
555
|
+
between: z
|
|
556
|
+
.union([
|
|
557
|
+
z.array(z.number().int().optional()).min(2).max(2),
|
|
558
|
+
z.string().regex(RegExp('^\\[\\d{10},\\d{10}\\]$')),
|
|
559
|
+
])
|
|
560
|
+
.optional(),
|
|
494
561
|
});
|
|
495
562
|
const ListCustomerOfflinePaymentMethodSchema = z.object({
|
|
496
563
|
is: z
|
|
@@ -528,48 +595,96 @@ const ListCustomerOfflinePaymentMethodSchema = z.object({
|
|
|
528
595
|
])
|
|
529
596
|
.optional(),
|
|
530
597
|
in: z
|
|
531
|
-
.
|
|
532
|
-
|
|
533
|
-
|
|
534
|
-
|
|
535
|
-
|
|
536
|
-
|
|
537
|
-
|
|
538
|
-
|
|
539
|
-
|
|
540
|
-
|
|
541
|
-
|
|
542
|
-
|
|
543
|
-
|
|
544
|
-
|
|
598
|
+
.union([
|
|
599
|
+
z.array(z
|
|
600
|
+
.enum([
|
|
601
|
+
'no_preference',
|
|
602
|
+
'cash',
|
|
603
|
+
'check',
|
|
604
|
+
'bank_transfer',
|
|
605
|
+
'ach_credit',
|
|
606
|
+
'sepa_credit',
|
|
607
|
+
'boleto',
|
|
608
|
+
'us_automated_bank_transfer',
|
|
609
|
+
'eu_automated_bank_transfer',
|
|
610
|
+
'uk_automated_bank_transfer',
|
|
611
|
+
'jp_automated_bank_transfer',
|
|
612
|
+
'mx_automated_bank_transfer',
|
|
613
|
+
'custom',
|
|
614
|
+
])
|
|
615
|
+
.optional()),
|
|
616
|
+
z.enum([
|
|
617
|
+
'no_preference',
|
|
618
|
+
'cash',
|
|
619
|
+
'check',
|
|
620
|
+
'bank_transfer',
|
|
621
|
+
'ach_credit',
|
|
622
|
+
'sepa_credit',
|
|
623
|
+
'boleto',
|
|
624
|
+
'us_automated_bank_transfer',
|
|
625
|
+
'eu_automated_bank_transfer',
|
|
626
|
+
'uk_automated_bank_transfer',
|
|
627
|
+
'jp_automated_bank_transfer',
|
|
628
|
+
'mx_automated_bank_transfer',
|
|
629
|
+
'custom',
|
|
630
|
+
]),
|
|
545
631
|
])
|
|
546
632
|
.optional(),
|
|
547
633
|
not_in: z
|
|
548
|
-
.
|
|
549
|
-
|
|
550
|
-
|
|
551
|
-
|
|
552
|
-
|
|
553
|
-
|
|
554
|
-
|
|
555
|
-
|
|
556
|
-
|
|
557
|
-
|
|
558
|
-
|
|
559
|
-
|
|
560
|
-
|
|
561
|
-
|
|
634
|
+
.union([
|
|
635
|
+
z.array(z
|
|
636
|
+
.enum([
|
|
637
|
+
'no_preference',
|
|
638
|
+
'cash',
|
|
639
|
+
'check',
|
|
640
|
+
'bank_transfer',
|
|
641
|
+
'ach_credit',
|
|
642
|
+
'sepa_credit',
|
|
643
|
+
'boleto',
|
|
644
|
+
'us_automated_bank_transfer',
|
|
645
|
+
'eu_automated_bank_transfer',
|
|
646
|
+
'uk_automated_bank_transfer',
|
|
647
|
+
'jp_automated_bank_transfer',
|
|
648
|
+
'mx_automated_bank_transfer',
|
|
649
|
+
'custom',
|
|
650
|
+
])
|
|
651
|
+
.optional()),
|
|
652
|
+
z.enum([
|
|
653
|
+
'no_preference',
|
|
654
|
+
'cash',
|
|
655
|
+
'check',
|
|
656
|
+
'bank_transfer',
|
|
657
|
+
'ach_credit',
|
|
658
|
+
'sepa_credit',
|
|
659
|
+
'boleto',
|
|
660
|
+
'us_automated_bank_transfer',
|
|
661
|
+
'eu_automated_bank_transfer',
|
|
662
|
+
'uk_automated_bank_transfer',
|
|
663
|
+
'jp_automated_bank_transfer',
|
|
664
|
+
'mx_automated_bank_transfer',
|
|
665
|
+
'custom',
|
|
666
|
+
]),
|
|
562
667
|
])
|
|
563
668
|
.optional(),
|
|
564
669
|
});
|
|
565
670
|
const ListCustomerAutoCloseInvoicesSchema = z.object({
|
|
566
|
-
is: z.enum(['true', 'false']).optional(),
|
|
671
|
+
is: z.union([z.boolean(), z.enum(['true', 'false'])]).optional(),
|
|
567
672
|
});
|
|
568
673
|
const ListCustomerChannelSchema = z.object({
|
|
569
674
|
is: z.enum(['web', 'app_store', 'play_store']).optional(),
|
|
570
675
|
is_not: z.enum(['web', 'app_store', 'play_store']).optional(),
|
|
571
|
-
in: z
|
|
572
|
-
|
|
676
|
+
in: z
|
|
677
|
+
.union([
|
|
678
|
+
z.array(z.enum(['web', 'app_store', 'play_store']).optional()),
|
|
679
|
+
z.enum(['web', 'app_store', 'play_store']),
|
|
680
|
+
])
|
|
681
|
+
.optional(),
|
|
682
|
+
not_in: z
|
|
683
|
+
.union([
|
|
684
|
+
z.array(z.enum(['web', 'app_store', 'play_store']).optional()),
|
|
685
|
+
z.enum(['web', 'app_store', 'play_store']),
|
|
686
|
+
])
|
|
687
|
+
.optional(),
|
|
573
688
|
});
|
|
574
689
|
const ListCustomerBusinessEntityIdSchema = z.object({
|
|
575
690
|
is: z.string().min(1).optional(),
|
|
@@ -622,6 +737,11 @@ const ListCustomerBodySchema = z.looseObject({
|
|
|
622
737
|
export { ListCustomerBodySchema };
|
|
623
738
|
//Customer.update
|
|
624
739
|
const UpdateCustomerMetaDataSchema = z.looseObject({});
|
|
740
|
+
const UpdateCustomerTaxProvidersFieldsItemSchema = z.object({
|
|
741
|
+
provider_name: z.string().max(50).optional(),
|
|
742
|
+
field_id: z.string().max(50).optional(),
|
|
743
|
+
field_value: z.string().max(50).optional(),
|
|
744
|
+
});
|
|
625
745
|
const UpdateCustomerTaxProvidersFieldsSchema = z.object({
|
|
626
746
|
provider_name: z.array(z.string().max(50).optional()).optional(),
|
|
627
747
|
field_id: z.array(z.string().max(50).optional()).optional(),
|
|
@@ -693,7 +813,12 @@ const UpdateCustomerBodySchema = z.looseObject({
|
|
|
693
813
|
meta_data: UpdateCustomerMetaDataSchema.optional(),
|
|
694
814
|
fraud_flag: z.enum(['safe', 'fraudulent']).optional(),
|
|
695
815
|
consolidated_invoicing: z.boolean().optional(),
|
|
696
|
-
tax_providers_fields:
|
|
816
|
+
tax_providers_fields: z
|
|
817
|
+
.union([
|
|
818
|
+
z.array(UpdateCustomerTaxProvidersFieldsItemSchema.optional()),
|
|
819
|
+
UpdateCustomerTaxProvidersFieldsSchema,
|
|
820
|
+
])
|
|
821
|
+
.optional(),
|
|
697
822
|
});
|
|
698
823
|
export { UpdateCustomerBodySchema };
|
|
699
824
|
//Customer.updatePaymentMethod
|
|
@@ -860,6 +985,13 @@ const UpdateBillingInfoCustomerBillingAddressSchema = z.object({
|
|
|
860
985
|
.enum(['not_validated', 'valid', 'partially_valid', 'invalid'])
|
|
861
986
|
.optional(),
|
|
862
987
|
});
|
|
988
|
+
const UpdateBillingInfoCustomerEntityIdentifiersItemSchema = z.object({
|
|
989
|
+
id: z.string().max(40).optional(),
|
|
990
|
+
scheme: z.string().max(50).optional(),
|
|
991
|
+
value: z.string().max(50).optional(),
|
|
992
|
+
operation: z.enum(['create', 'update', 'delete']).optional(),
|
|
993
|
+
standard: z.string().max(50).optional(),
|
|
994
|
+
});
|
|
863
995
|
const UpdateBillingInfoCustomerEntityIdentifiersSchema = z.object({
|
|
864
996
|
id: z.array(z.string().max(40).optional()).optional(),
|
|
865
997
|
scheme: z.array(z.string().max(50).optional()).optional(),
|
|
@@ -869,6 +1001,11 @@ const UpdateBillingInfoCustomerEntityIdentifiersSchema = z.object({
|
|
|
869
1001
|
.optional(),
|
|
870
1002
|
standard: z.array(z.string().max(50).optional()).optional(),
|
|
871
1003
|
});
|
|
1004
|
+
const UpdateBillingInfoCustomerTaxProvidersFieldsItemSchema = z.object({
|
|
1005
|
+
provider_name: z.string().max(50).optional(),
|
|
1006
|
+
field_id: z.string().max(50).optional(),
|
|
1007
|
+
field_value: z.string().max(50).optional(),
|
|
1008
|
+
});
|
|
872
1009
|
const UpdateBillingInfoCustomerTaxProvidersFieldsSchema = z.object({
|
|
873
1010
|
provider_name: z.array(z.string().max(50).optional()).optional(),
|
|
874
1011
|
field_id: z.array(z.string().max(50).optional()).optional(),
|
|
@@ -884,8 +1021,18 @@ const UpdateBillingInfoCustomerBodySchema = z.looseObject({
|
|
|
884
1021
|
is_einvoice_enabled: z.boolean().optional(),
|
|
885
1022
|
einvoicing_method: z.enum(['automatic', 'manual', 'site_default']).optional(),
|
|
886
1023
|
billing_address: UpdateBillingInfoCustomerBillingAddressSchema.optional(),
|
|
887
|
-
entity_identifiers:
|
|
888
|
-
|
|
1024
|
+
entity_identifiers: z
|
|
1025
|
+
.union([
|
|
1026
|
+
z.array(UpdateBillingInfoCustomerEntityIdentifiersItemSchema.optional()),
|
|
1027
|
+
UpdateBillingInfoCustomerEntityIdentifiersSchema,
|
|
1028
|
+
])
|
|
1029
|
+
.optional(),
|
|
1030
|
+
tax_providers_fields: z
|
|
1031
|
+
.union([
|
|
1032
|
+
z.array(UpdateBillingInfoCustomerTaxProvidersFieldsItemSchema.optional()),
|
|
1033
|
+
UpdateBillingInfoCustomerTaxProvidersFieldsSchema,
|
|
1034
|
+
])
|
|
1035
|
+
.optional(),
|
|
889
1036
|
});
|
|
890
1037
|
export { UpdateBillingInfoCustomerBodySchema };
|
|
891
1038
|
//Customer.contactsForCustomer
|
|
@@ -987,12 +1134,6 @@ const RecordExcessPaymentCustomerTransactionSchema = z.object({
|
|
|
987
1134
|
'app_store',
|
|
988
1135
|
'play_store',
|
|
989
1136
|
'custom',
|
|
990
|
-
'tamara',
|
|
991
|
-
'qpay',
|
|
992
|
-
'blik',
|
|
993
|
-
'fpx',
|
|
994
|
-
'wero',
|
|
995
|
-
'p24',
|
|
996
1137
|
]),
|
|
997
1138
|
reference_number: z.string().max(100).optional(),
|
|
998
1139
|
custom_payment_method_id: z.string().max(50).optional(),
|
|
@@ -1178,6 +1319,10 @@ const CollectPaymentCustomerPaymentIntentSchema = z.object({
|
|
|
1178
1319
|
reference_id: z.string().max(65000).optional(),
|
|
1179
1320
|
additional_information: CollectPaymentCustomerAdditionalInformationSchema.optional(),
|
|
1180
1321
|
});
|
|
1322
|
+
const CollectPaymentCustomerInvoiceAllocationsItemSchema = z.object({
|
|
1323
|
+
invoice_id: z.string().max(50),
|
|
1324
|
+
allocation_amount: z.number().int().min(0).optional(),
|
|
1325
|
+
});
|
|
1181
1326
|
const CollectPaymentCustomerInvoiceAllocationsSchema = z.object({
|
|
1182
1327
|
invoice_id: z.array(z.string().max(50).optional()),
|
|
1183
1328
|
allocation_amount: z.array(z.number().int().min(0).optional()).optional(),
|
|
@@ -1192,7 +1337,12 @@ const CollectPaymentCustomerBodySchema = z.looseObject({
|
|
|
1192
1337
|
payment_method: CollectPaymentCustomerPaymentMethodSchema.optional(),
|
|
1193
1338
|
card: CollectPaymentCustomerCardSchema.optional(),
|
|
1194
1339
|
payment_intent: CollectPaymentCustomerPaymentIntentSchema.optional(),
|
|
1195
|
-
invoice_allocations:
|
|
1340
|
+
invoice_allocations: z
|
|
1341
|
+
.union([
|
|
1342
|
+
z.array(CollectPaymentCustomerInvoiceAllocationsItemSchema.optional()),
|
|
1343
|
+
CollectPaymentCustomerInvoiceAllocationsSchema,
|
|
1344
|
+
])
|
|
1345
|
+
.optional(),
|
|
1196
1346
|
});
|
|
1197
1347
|
export { CollectPaymentCustomerBodySchema };
|
|
1198
1348
|
//Customer.delete
|
|
@@ -3,10 +3,24 @@
|
|
|
3
3
|
// Do not edit manually – regenerate via sdk-generator
|
|
4
4
|
import { z } from 'zod';
|
|
5
5
|
//DifferentialPrice.create
|
|
6
|
+
const CreateDifferentialPriceParentPeriodsItemSchema = z.object({
|
|
7
|
+
period_unit: z.enum(['day', 'week', 'month', 'year']),
|
|
8
|
+
period: z.array(z.string().optional()).optional(),
|
|
9
|
+
});
|
|
6
10
|
const CreateDifferentialPriceParentPeriodsSchema = z.object({
|
|
7
11
|
period_unit: z.array(z.enum(['day', 'week', 'month', 'year']).optional()),
|
|
8
12
|
period: z.array(z.array(z.string().optional()).optional()).optional(),
|
|
9
13
|
});
|
|
14
|
+
const CreateDifferentialPriceTiersItemSchema = z.object({
|
|
15
|
+
starting_unit: z.number().int().min(1).optional(),
|
|
16
|
+
ending_unit: z.number().int().optional(),
|
|
17
|
+
price: z.number().int().min(0).optional(),
|
|
18
|
+
starting_unit_in_decimal: z.string().max(33).optional(),
|
|
19
|
+
ending_unit_in_decimal: z.string().max(33).optional(),
|
|
20
|
+
price_in_decimal: z.string().max(39).optional(),
|
|
21
|
+
pricing_type: z.enum(['per_unit', 'flat_fee', 'package']).optional(),
|
|
22
|
+
package_size: z.number().int().min(1).optional(),
|
|
23
|
+
});
|
|
10
24
|
const CreateDifferentialPriceTiersSchema = z.object({
|
|
11
25
|
starting_unit: z.array(z.number().int().min(1).optional()).optional(),
|
|
12
26
|
ending_unit: z.array(z.number().int().optional()).optional(),
|
|
@@ -24,8 +38,18 @@ const CreateDifferentialPriceBodySchema = z.looseObject({
|
|
|
24
38
|
price: z.number().int().min(0).optional(),
|
|
25
39
|
price_in_decimal: z.string().max(39).optional(),
|
|
26
40
|
business_entity_id: z.string().max(50).optional(),
|
|
27
|
-
parent_periods:
|
|
28
|
-
|
|
41
|
+
parent_periods: z
|
|
42
|
+
.union([
|
|
43
|
+
z.array(CreateDifferentialPriceParentPeriodsItemSchema.optional()),
|
|
44
|
+
CreateDifferentialPriceParentPeriodsSchema,
|
|
45
|
+
])
|
|
46
|
+
.optional(),
|
|
47
|
+
tiers: z
|
|
48
|
+
.union([
|
|
49
|
+
z.array(CreateDifferentialPriceTiersItemSchema.optional()),
|
|
50
|
+
CreateDifferentialPriceTiersSchema,
|
|
51
|
+
])
|
|
52
|
+
.optional(),
|
|
29
53
|
});
|
|
30
54
|
export { CreateDifferentialPriceBodySchema };
|
|
31
55
|
//DifferentialPrice.retrieve
|
|
@@ -34,10 +58,24 @@ const RetrieveDifferentialPriceBodySchema = z.looseObject({
|
|
|
34
58
|
});
|
|
35
59
|
export { RetrieveDifferentialPriceBodySchema };
|
|
36
60
|
//DifferentialPrice.update
|
|
61
|
+
const UpdateDifferentialPriceParentPeriodsItemSchema = z.object({
|
|
62
|
+
period_unit: z.enum(['day', 'week', 'month', 'year']),
|
|
63
|
+
period: z.array(z.string().optional()).optional(),
|
|
64
|
+
});
|
|
37
65
|
const UpdateDifferentialPriceParentPeriodsSchema = z.object({
|
|
38
66
|
period_unit: z.array(z.enum(['day', 'week', 'month', 'year']).optional()),
|
|
39
67
|
period: z.array(z.array(z.string().optional()).optional()).optional(),
|
|
40
68
|
});
|
|
69
|
+
const UpdateDifferentialPriceTiersItemSchema = z.object({
|
|
70
|
+
starting_unit: z.number().int().min(1).optional(),
|
|
71
|
+
ending_unit: z.number().int().optional(),
|
|
72
|
+
price: z.number().int().min(0).optional(),
|
|
73
|
+
starting_unit_in_decimal: z.string().max(33).optional(),
|
|
74
|
+
ending_unit_in_decimal: z.string().max(33).optional(),
|
|
75
|
+
price_in_decimal: z.string().max(39).optional(),
|
|
76
|
+
pricing_type: z.enum(['per_unit', 'flat_fee', 'package']).optional(),
|
|
77
|
+
package_size: z.number().int().min(1).optional(),
|
|
78
|
+
});
|
|
41
79
|
const UpdateDifferentialPriceTiersSchema = z.object({
|
|
42
80
|
starting_unit: z.array(z.number().int().min(1).optional()).optional(),
|
|
43
81
|
ending_unit: z.array(z.number().int().optional()).optional(),
|
|
@@ -54,8 +92,18 @@ const UpdateDifferentialPriceBodySchema = z.looseObject({
|
|
|
54
92
|
item_price_id: z.string().max(100),
|
|
55
93
|
price: z.number().int().min(0).optional(),
|
|
56
94
|
price_in_decimal: z.string().max(39).optional(),
|
|
57
|
-
parent_periods:
|
|
58
|
-
|
|
95
|
+
parent_periods: z
|
|
96
|
+
.union([
|
|
97
|
+
z.array(UpdateDifferentialPriceParentPeriodsItemSchema.optional()),
|
|
98
|
+
UpdateDifferentialPriceParentPeriodsSchema,
|
|
99
|
+
])
|
|
100
|
+
.optional(),
|
|
101
|
+
tiers: z
|
|
102
|
+
.union([
|
|
103
|
+
z.array(UpdateDifferentialPriceTiersItemSchema.optional()),
|
|
104
|
+
UpdateDifferentialPriceTiersSchema,
|
|
105
|
+
])
|
|
106
|
+
.optional(),
|
|
59
107
|
});
|
|
60
108
|
export { UpdateDifferentialPriceBodySchema };
|
|
61
109
|
//DifferentialPrice.delete
|
|
@@ -68,29 +116,69 @@ const ListDifferentialPriceItemPriceIdSchema = z.object({
|
|
|
68
116
|
is: z.string().min(1).optional(),
|
|
69
117
|
is_not: z.string().min(1).optional(),
|
|
70
118
|
starts_with: z.string().min(1).optional(),
|
|
71
|
-
in: z
|
|
72
|
-
|
|
119
|
+
in: z
|
|
120
|
+
.union([
|
|
121
|
+
z.array(z.string().optional()),
|
|
122
|
+
z.string().regex(RegExp('^\\[(.*)(,.*)*\\]$')),
|
|
123
|
+
])
|
|
124
|
+
.optional(),
|
|
125
|
+
not_in: z
|
|
126
|
+
.union([
|
|
127
|
+
z.array(z.string().optional()),
|
|
128
|
+
z.string().regex(RegExp('^\\[(.*)(,.*)*\\]$')),
|
|
129
|
+
])
|
|
130
|
+
.optional(),
|
|
73
131
|
});
|
|
74
132
|
const ListDifferentialPriceItemIdSchema = z.object({
|
|
75
133
|
is: z.string().min(1).optional(),
|
|
76
134
|
is_not: z.string().min(1).optional(),
|
|
77
135
|
starts_with: z.string().min(1).optional(),
|
|
78
|
-
in: z
|
|
79
|
-
|
|
136
|
+
in: z
|
|
137
|
+
.union([
|
|
138
|
+
z.array(z.string().optional()),
|
|
139
|
+
z.string().regex(RegExp('^\\[(.*)(,.*)*\\]$')),
|
|
140
|
+
])
|
|
141
|
+
.optional(),
|
|
142
|
+
not_in: z
|
|
143
|
+
.union([
|
|
144
|
+
z.array(z.string().optional()),
|
|
145
|
+
z.string().regex(RegExp('^\\[(.*)(,.*)*\\]$')),
|
|
146
|
+
])
|
|
147
|
+
.optional(),
|
|
80
148
|
});
|
|
81
149
|
const ListDifferentialPriceIdSchema = z.object({
|
|
82
150
|
is: z.string().min(1).optional(),
|
|
83
151
|
is_not: z.string().min(1).optional(),
|
|
84
152
|
starts_with: z.string().min(1).optional(),
|
|
85
|
-
in: z
|
|
86
|
-
|
|
153
|
+
in: z
|
|
154
|
+
.union([
|
|
155
|
+
z.array(z.string().optional()),
|
|
156
|
+
z.string().regex(RegExp('^\\[(.*)(,.*)*\\]$')),
|
|
157
|
+
])
|
|
158
|
+
.optional(),
|
|
159
|
+
not_in: z
|
|
160
|
+
.union([
|
|
161
|
+
z.array(z.string().optional()),
|
|
162
|
+
z.string().regex(RegExp('^\\[(.*)(,.*)*\\]$')),
|
|
163
|
+
])
|
|
164
|
+
.optional(),
|
|
87
165
|
});
|
|
88
166
|
const ListDifferentialPriceParentItemIdSchema = z.object({
|
|
89
167
|
is: z.string().min(1).optional(),
|
|
90
168
|
is_not: z.string().min(1).optional(),
|
|
91
169
|
starts_with: z.string().min(1).optional(),
|
|
92
|
-
in: z
|
|
93
|
-
|
|
170
|
+
in: z
|
|
171
|
+
.union([
|
|
172
|
+
z.array(z.string().optional()),
|
|
173
|
+
z.string().regex(RegExp('^\\[(.*)(,.*)*\\]$')),
|
|
174
|
+
])
|
|
175
|
+
.optional(),
|
|
176
|
+
not_in: z
|
|
177
|
+
.union([
|
|
178
|
+
z.array(z.string().optional()),
|
|
179
|
+
z.string().regex(RegExp('^\\[(.*)(,.*)*\\]$')),
|
|
180
|
+
])
|
|
181
|
+
.optional(),
|
|
94
182
|
});
|
|
95
183
|
const ListDifferentialPriceBodySchema = z.looseObject({
|
|
96
184
|
limit: z.number().int().min(1).max(100).optional(),
|