chargebee 3.35.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 +65 -0
- package/cjs/environment.js +1 -1
- package/cjs/resources/api_endpoints.js +56 -0
- package/cjs/resources/webhook/eventType.js +2 -0
- 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 +16 -5
- package/cjs/schema/business_rule.schema.js +2 -2
- package/cjs/schema/business_ruleset.schema.js +2 -2
- package/cjs/schema/comment.schema.js +15 -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 +496 -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 +33 -4
- package/cjs/schema/entitlement_override.schema.js +17 -1
- package/cjs/schema/estimate.schema.js +581 -36
- package/cjs/schema/event.schema.js +1282 -633
- 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 +562 -66
- package/cjs/schema/index.js +3 -0
- package/cjs/schema/invoice.schema.js +821 -121
- 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_operation.schema.js +42 -15
- package/cjs/schema/metered_feature.schema.js +10 -1
- package/cjs/schema/omnichannel_one_time_order.schema.js +32 -2
- package/cjs/schema/omnichannel_subscription.schema.js +136 -30
- 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 +360 -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 +79 -14
- 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 +204 -12
- package/cjs/schema/quote.schema.js +901 -81
- package/cjs/schema/quote_entitlement.schema.js +6 -2
- package/cjs/schema/ramp.schema.js +238 -24
- package/cjs/schema/site_migration_detail.schema.js +50 -16
- package/cjs/schema/subscription.schema.js +998 -169
- 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 +55 -12
- package/cjs/schema/usage_event.schema.js +13 -1
- package/cjs/schema/virtual_bank_account.schema.js +42 -10
- package/cjs/schema/webhook_endpoint.schema.js +4 -0
- package/esm/environment.js +1 -1
- package/esm/resources/api_endpoints.js +56 -0
- package/esm/resources/webhook/eventType.js +2 -0
- 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 +16 -5
- package/esm/schema/business_rule.schema.js +2 -2
- package/esm/schema/business_ruleset.schema.js +2 -2
- package/esm/schema/comment.schema.js +15 -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 +496 -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 +33 -4
- package/esm/schema/entitlement_override.schema.js +17 -1
- package/esm/schema/estimate.schema.js +581 -36
- package/esm/schema/event.schema.js +1282 -633
- 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 +562 -66
- package/esm/schema/index.js +3 -0
- package/esm/schema/invoice.schema.js +821 -121
- 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_operation.schema.js +42 -15
- package/esm/schema/metered_feature.schema.js +10 -1
- package/esm/schema/omnichannel_one_time_order.schema.js +32 -2
- package/esm/schema/omnichannel_subscription.schema.js +136 -30
- 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 +360 -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 +79 -14
- 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 +204 -12
- package/esm/schema/quote.schema.js +901 -81
- package/esm/schema/quote_entitlement.schema.js +6 -2
- package/esm/schema/ramp.schema.js +238 -24
- package/esm/schema/site_migration_detail.schema.js +50 -16
- package/esm/schema/subscription.schema.js +998 -169
- 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 +55 -12
- package/esm/schema/usage_event.schema.js +13 -1
- package/esm/schema/virtual_bank_account.schema.js +42 -10
- package/esm/schema/webhook_endpoint.schema.js +4 -0
- package/package.json +1 -1
- package/types/core.d.ts +10 -6
- package/types/index.d.ts +8 -1
- package/types/resources/BillingLineItem.d.ts +10 -0
- package/types/resources/BillingMetadata.d.ts +9 -0
- package/types/resources/Content.d.ts +5 -0
- package/types/resources/Discount.d.ts +1 -0
- package/types/resources/DraftRequest.d.ts +1 -1
- package/types/resources/Estimate.d.ts +3 -0
- package/types/resources/Event.d.ts +2 -0
- 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/HostedPage.d.ts +18 -0
- package/types/resources/Invoice.d.ts +4 -0
- package/types/resources/OrganizationDetail.d.ts +84 -0
- package/types/resources/Subscription.d.ts +3 -0
- package/types/resources/Usage.d.ts +1 -0
- package/types/resources/WebhookEvent.d.ts +10 -0
|
@@ -7,11 +7,21 @@ exports.UpdateCreditUnitBodySchema = exports.CreateCreditUnitBodySchema = export
|
|
|
7
7
|
const zod_1 = require("zod");
|
|
8
8
|
//CreditUnit.list
|
|
9
9
|
const ListCreditUnitStatusSchema = zod_1.z.object({
|
|
10
|
-
in: zod_1.z
|
|
10
|
+
in: zod_1.z
|
|
11
|
+
.union([
|
|
12
|
+
zod_1.z.array(zod_1.z.enum(['active', 'archived']).optional()),
|
|
13
|
+
zod_1.z.enum(['active', 'archived']),
|
|
14
|
+
])
|
|
15
|
+
.optional(),
|
|
11
16
|
is: zod_1.z.enum(['active', 'archived']).optional(),
|
|
12
17
|
});
|
|
13
18
|
const ListCreditUnitIdSchema = zod_1.z.object({
|
|
14
|
-
in: zod_1.z
|
|
19
|
+
in: zod_1.z
|
|
20
|
+
.union([
|
|
21
|
+
zod_1.z.array(zod_1.z.string().optional()),
|
|
22
|
+
zod_1.z.string().regex(RegExp('^\\[(.*)(,.*)*\\]$')),
|
|
23
|
+
])
|
|
24
|
+
.optional(),
|
|
15
25
|
is: zod_1.z.string().min(1).optional(),
|
|
16
26
|
});
|
|
17
27
|
const ListCreditUnitBodySchema = zod_1.z.looseObject({
|
|
@@ -335,12 +335,23 @@ const CreateCustomerPaymentIntentSchema = zod_1.z.object({
|
|
|
335
335
|
gw_payment_method_id: zod_1.z.string().max(65000).optional(),
|
|
336
336
|
additional_information: CreateCustomerAdditionalInformationSchema.optional(),
|
|
337
337
|
});
|
|
338
|
+
const CreateCustomerEntityIdentifiersItemSchema = zod_1.z.object({
|
|
339
|
+
id: zod_1.z.string().max(40).optional(),
|
|
340
|
+
scheme: zod_1.z.string().max(50).optional(),
|
|
341
|
+
value: zod_1.z.string().max(50).optional(),
|
|
342
|
+
standard: zod_1.z.string().max(50).optional(),
|
|
343
|
+
});
|
|
338
344
|
const CreateCustomerEntityIdentifiersSchema = zod_1.z.object({
|
|
339
345
|
id: zod_1.z.array(zod_1.z.string().max(40).optional()).optional(),
|
|
340
346
|
scheme: zod_1.z.array(zod_1.z.string().max(50).optional()).optional(),
|
|
341
347
|
value: zod_1.z.array(zod_1.z.string().max(50).optional()).optional(),
|
|
342
348
|
standard: zod_1.z.array(zod_1.z.string().max(50).optional()).optional(),
|
|
343
349
|
});
|
|
350
|
+
const CreateCustomerTaxProvidersFieldsItemSchema = zod_1.z.object({
|
|
351
|
+
provider_name: zod_1.z.string().max(50).optional(),
|
|
352
|
+
field_id: zod_1.z.string().max(50).optional(),
|
|
353
|
+
field_value: zod_1.z.string().max(50).optional(),
|
|
354
|
+
});
|
|
344
355
|
const CreateCustomerTaxProvidersFieldsSchema = zod_1.z.object({
|
|
345
356
|
provider_name: zod_1.z.array(zod_1.z.string().max(50).optional()).optional(),
|
|
346
357
|
field_id: zod_1.z.array(zod_1.z.string().max(50).optional()).optional(),
|
|
@@ -429,8 +440,18 @@ const CreateCustomerBodySchema = zod_1.z.looseObject({
|
|
|
429
440
|
payment_method: CreateCustomerPaymentMethodSchema.optional(),
|
|
430
441
|
payment_intent: CreateCustomerPaymentIntentSchema.optional(),
|
|
431
442
|
billing_address: CreateCustomerBillingAddressSchema.optional(),
|
|
432
|
-
entity_identifiers:
|
|
433
|
-
|
|
443
|
+
entity_identifiers: zod_1.z
|
|
444
|
+
.union([
|
|
445
|
+
zod_1.z.array(CreateCustomerEntityIdentifiersItemSchema.optional()),
|
|
446
|
+
CreateCustomerEntityIdentifiersSchema,
|
|
447
|
+
])
|
|
448
|
+
.optional(),
|
|
449
|
+
tax_providers_fields: zod_1.z
|
|
450
|
+
.union([
|
|
451
|
+
zod_1.z.array(CreateCustomerTaxProvidersFieldsItemSchema.optional()),
|
|
452
|
+
CreateCustomerTaxProvidersFieldsSchema,
|
|
453
|
+
])
|
|
454
|
+
.optional(),
|
|
434
455
|
});
|
|
435
456
|
exports.CreateCustomerBodySchema = CreateCustomerBodySchema;
|
|
436
457
|
//Customer.list
|
|
@@ -438,62 +459,108 @@ const ListCustomerIdSchema = zod_1.z.object({
|
|
|
438
459
|
is: zod_1.z.string().min(1).optional(),
|
|
439
460
|
is_not: zod_1.z.string().min(1).optional(),
|
|
440
461
|
starts_with: zod_1.z.string().min(1).optional(),
|
|
441
|
-
in: zod_1.z
|
|
442
|
-
|
|
462
|
+
in: zod_1.z
|
|
463
|
+
.union([
|
|
464
|
+
zod_1.z.array(zod_1.z.string().optional()),
|
|
465
|
+
zod_1.z.string().regex(RegExp('^\\[(.*)(,.*)*\\]$')),
|
|
466
|
+
])
|
|
467
|
+
.optional(),
|
|
468
|
+
not_in: zod_1.z
|
|
469
|
+
.union([
|
|
470
|
+
zod_1.z.array(zod_1.z.string().optional()),
|
|
471
|
+
zod_1.z.string().regex(RegExp('^\\[(.*)(,.*)*\\]$')),
|
|
472
|
+
])
|
|
473
|
+
.optional(),
|
|
443
474
|
});
|
|
444
475
|
const ListCustomerFirstNameSchema = zod_1.z.object({
|
|
445
476
|
is: zod_1.z.string().min(1).optional(),
|
|
446
477
|
is_not: zod_1.z.string().min(1).optional(),
|
|
447
478
|
starts_with: zod_1.z.string().min(1).optional(),
|
|
448
|
-
is_present: zod_1.z.enum(['true', 'false']).optional(),
|
|
479
|
+
is_present: zod_1.z.union([zod_1.z.boolean(), zod_1.z.enum(['true', 'false'])]).optional(),
|
|
449
480
|
});
|
|
450
481
|
const ListCustomerLastNameSchema = zod_1.z.object({
|
|
451
482
|
is: zod_1.z.string().min(1).optional(),
|
|
452
483
|
is_not: zod_1.z.string().min(1).optional(),
|
|
453
484
|
starts_with: zod_1.z.string().min(1).optional(),
|
|
454
|
-
is_present: zod_1.z.enum(['true', 'false']).optional(),
|
|
485
|
+
is_present: zod_1.z.union([zod_1.z.boolean(), zod_1.z.enum(['true', 'false'])]).optional(),
|
|
455
486
|
});
|
|
456
487
|
const ListCustomerEmailSchema = zod_1.z.object({
|
|
457
488
|
is: zod_1.z.string().min(1).optional(),
|
|
458
489
|
is_not: zod_1.z.string().min(1).optional(),
|
|
459
490
|
starts_with: zod_1.z.string().min(1).optional(),
|
|
460
|
-
is_present: zod_1.z.enum(['true', 'false']).optional(),
|
|
491
|
+
is_present: zod_1.z.union([zod_1.z.boolean(), zod_1.z.enum(['true', 'false'])]).optional(),
|
|
461
492
|
});
|
|
462
493
|
const ListCustomerCompanySchema = zod_1.z.object({
|
|
463
494
|
is: zod_1.z.string().min(1).optional(),
|
|
464
495
|
is_not: zod_1.z.string().min(1).optional(),
|
|
465
496
|
starts_with: zod_1.z.string().min(1).optional(),
|
|
466
|
-
is_present: zod_1.z.enum(['true', 'false']).optional(),
|
|
497
|
+
is_present: zod_1.z.union([zod_1.z.boolean(), zod_1.z.enum(['true', 'false'])]).optional(),
|
|
467
498
|
});
|
|
468
499
|
const ListCustomerPhoneSchema = zod_1.z.object({
|
|
469
500
|
is: zod_1.z.string().min(1).optional(),
|
|
470
501
|
is_not: zod_1.z.string().min(1).optional(),
|
|
471
502
|
starts_with: zod_1.z.string().min(1).optional(),
|
|
472
|
-
is_present: zod_1.z.enum(['true', 'false']).optional(),
|
|
503
|
+
is_present: zod_1.z.union([zod_1.z.boolean(), zod_1.z.enum(['true', 'false'])]).optional(),
|
|
473
504
|
});
|
|
474
505
|
const ListCustomerAutoCollectionSchema = zod_1.z.object({
|
|
475
506
|
is: zod_1.z.enum(['on', 'off']).optional(),
|
|
476
507
|
is_not: zod_1.z.enum(['on', 'off']).optional(),
|
|
477
|
-
in: zod_1.z
|
|
478
|
-
|
|
508
|
+
in: zod_1.z
|
|
509
|
+
.union([zod_1.z.array(zod_1.z.enum(['on', 'off']).optional()), zod_1.z.enum(['on', 'off'])])
|
|
510
|
+
.optional(),
|
|
511
|
+
not_in: zod_1.z
|
|
512
|
+
.union([zod_1.z.array(zod_1.z.enum(['on', 'off']).optional()), zod_1.z.enum(['on', 'off'])])
|
|
513
|
+
.optional(),
|
|
479
514
|
});
|
|
480
515
|
const ListCustomerTaxabilitySchema = zod_1.z.object({
|
|
481
516
|
is: zod_1.z.enum(['taxable', 'exempt', 'zero_rated']).optional(),
|
|
482
517
|
is_not: zod_1.z.enum(['taxable', 'exempt', 'zero_rated']).optional(),
|
|
483
|
-
in: zod_1.z
|
|
484
|
-
|
|
518
|
+
in: zod_1.z
|
|
519
|
+
.union([
|
|
520
|
+
zod_1.z.array(zod_1.z.enum(['taxable', 'exempt', 'zero_rated']).optional()),
|
|
521
|
+
zod_1.z.enum(['taxable', 'exempt', 'zero_rated']),
|
|
522
|
+
])
|
|
523
|
+
.optional(),
|
|
524
|
+
not_in: zod_1.z
|
|
525
|
+
.union([
|
|
526
|
+
zod_1.z.array(zod_1.z.enum(['taxable', 'exempt', 'zero_rated']).optional()),
|
|
527
|
+
zod_1.z.enum(['taxable', 'exempt', 'zero_rated']),
|
|
528
|
+
])
|
|
529
|
+
.optional(),
|
|
485
530
|
});
|
|
486
531
|
const ListCustomerCreatedAtSchema = zod_1.z.object({
|
|
487
|
-
after: zod_1.z
|
|
488
|
-
|
|
489
|
-
|
|
490
|
-
|
|
532
|
+
after: zod_1.z
|
|
533
|
+
.union([zod_1.z.number().int(), zod_1.z.string().regex(RegExp('^\\d{10}$'))])
|
|
534
|
+
.optional(),
|
|
535
|
+
before: zod_1.z
|
|
536
|
+
.union([zod_1.z.number().int(), zod_1.z.string().regex(RegExp('^\\d{10}$'))])
|
|
537
|
+
.optional(),
|
|
538
|
+
on: zod_1.z
|
|
539
|
+
.union([zod_1.z.number().int(), zod_1.z.string().regex(RegExp('^\\d{10}$'))])
|
|
540
|
+
.optional(),
|
|
541
|
+
between: zod_1.z
|
|
542
|
+
.union([
|
|
543
|
+
zod_1.z.array(zod_1.z.number().int().optional()).min(2).max(2),
|
|
544
|
+
zod_1.z.string().regex(RegExp('^\\[\\d{10},\\d{10}\\]$')),
|
|
545
|
+
])
|
|
546
|
+
.optional(),
|
|
491
547
|
});
|
|
492
548
|
const ListCustomerUpdatedAtSchema = zod_1.z.object({
|
|
493
|
-
after: zod_1.z
|
|
494
|
-
|
|
495
|
-
|
|
496
|
-
|
|
549
|
+
after: zod_1.z
|
|
550
|
+
.union([zod_1.z.number().int(), zod_1.z.string().regex(RegExp('^\\d{10}$'))])
|
|
551
|
+
.optional(),
|
|
552
|
+
before: zod_1.z
|
|
553
|
+
.union([zod_1.z.number().int(), zod_1.z.string().regex(RegExp('^\\d{10}$'))])
|
|
554
|
+
.optional(),
|
|
555
|
+
on: zod_1.z
|
|
556
|
+
.union([zod_1.z.number().int(), zod_1.z.string().regex(RegExp('^\\d{10}$'))])
|
|
557
|
+
.optional(),
|
|
558
|
+
between: zod_1.z
|
|
559
|
+
.union([
|
|
560
|
+
zod_1.z.array(zod_1.z.number().int().optional()).min(2).max(2),
|
|
561
|
+
zod_1.z.string().regex(RegExp('^\\[\\d{10},\\d{10}\\]$')),
|
|
562
|
+
])
|
|
563
|
+
.optional(),
|
|
497
564
|
});
|
|
498
565
|
const ListCustomerOfflinePaymentMethodSchema = zod_1.z.object({
|
|
499
566
|
is: zod_1.z
|
|
@@ -531,48 +598,96 @@ const ListCustomerOfflinePaymentMethodSchema = zod_1.z.object({
|
|
|
531
598
|
])
|
|
532
599
|
.optional(),
|
|
533
600
|
in: zod_1.z
|
|
534
|
-
.
|
|
535
|
-
|
|
536
|
-
|
|
537
|
-
|
|
538
|
-
|
|
539
|
-
|
|
540
|
-
|
|
541
|
-
|
|
542
|
-
|
|
543
|
-
|
|
544
|
-
|
|
545
|
-
|
|
546
|
-
|
|
547
|
-
|
|
601
|
+
.union([
|
|
602
|
+
zod_1.z.array(zod_1.z
|
|
603
|
+
.enum([
|
|
604
|
+
'no_preference',
|
|
605
|
+
'cash',
|
|
606
|
+
'check',
|
|
607
|
+
'bank_transfer',
|
|
608
|
+
'ach_credit',
|
|
609
|
+
'sepa_credit',
|
|
610
|
+
'boleto',
|
|
611
|
+
'us_automated_bank_transfer',
|
|
612
|
+
'eu_automated_bank_transfer',
|
|
613
|
+
'uk_automated_bank_transfer',
|
|
614
|
+
'jp_automated_bank_transfer',
|
|
615
|
+
'mx_automated_bank_transfer',
|
|
616
|
+
'custom',
|
|
617
|
+
])
|
|
618
|
+
.optional()),
|
|
619
|
+
zod_1.z.enum([
|
|
620
|
+
'no_preference',
|
|
621
|
+
'cash',
|
|
622
|
+
'check',
|
|
623
|
+
'bank_transfer',
|
|
624
|
+
'ach_credit',
|
|
625
|
+
'sepa_credit',
|
|
626
|
+
'boleto',
|
|
627
|
+
'us_automated_bank_transfer',
|
|
628
|
+
'eu_automated_bank_transfer',
|
|
629
|
+
'uk_automated_bank_transfer',
|
|
630
|
+
'jp_automated_bank_transfer',
|
|
631
|
+
'mx_automated_bank_transfer',
|
|
632
|
+
'custom',
|
|
633
|
+
]),
|
|
548
634
|
])
|
|
549
635
|
.optional(),
|
|
550
636
|
not_in: zod_1.z
|
|
551
|
-
.
|
|
552
|
-
|
|
553
|
-
|
|
554
|
-
|
|
555
|
-
|
|
556
|
-
|
|
557
|
-
|
|
558
|
-
|
|
559
|
-
|
|
560
|
-
|
|
561
|
-
|
|
562
|
-
|
|
563
|
-
|
|
564
|
-
|
|
637
|
+
.union([
|
|
638
|
+
zod_1.z.array(zod_1.z
|
|
639
|
+
.enum([
|
|
640
|
+
'no_preference',
|
|
641
|
+
'cash',
|
|
642
|
+
'check',
|
|
643
|
+
'bank_transfer',
|
|
644
|
+
'ach_credit',
|
|
645
|
+
'sepa_credit',
|
|
646
|
+
'boleto',
|
|
647
|
+
'us_automated_bank_transfer',
|
|
648
|
+
'eu_automated_bank_transfer',
|
|
649
|
+
'uk_automated_bank_transfer',
|
|
650
|
+
'jp_automated_bank_transfer',
|
|
651
|
+
'mx_automated_bank_transfer',
|
|
652
|
+
'custom',
|
|
653
|
+
])
|
|
654
|
+
.optional()),
|
|
655
|
+
zod_1.z.enum([
|
|
656
|
+
'no_preference',
|
|
657
|
+
'cash',
|
|
658
|
+
'check',
|
|
659
|
+
'bank_transfer',
|
|
660
|
+
'ach_credit',
|
|
661
|
+
'sepa_credit',
|
|
662
|
+
'boleto',
|
|
663
|
+
'us_automated_bank_transfer',
|
|
664
|
+
'eu_automated_bank_transfer',
|
|
665
|
+
'uk_automated_bank_transfer',
|
|
666
|
+
'jp_automated_bank_transfer',
|
|
667
|
+
'mx_automated_bank_transfer',
|
|
668
|
+
'custom',
|
|
669
|
+
]),
|
|
565
670
|
])
|
|
566
671
|
.optional(),
|
|
567
672
|
});
|
|
568
673
|
const ListCustomerAutoCloseInvoicesSchema = zod_1.z.object({
|
|
569
|
-
is: zod_1.z.enum(['true', 'false']).optional(),
|
|
674
|
+
is: zod_1.z.union([zod_1.z.boolean(), zod_1.z.enum(['true', 'false'])]).optional(),
|
|
570
675
|
});
|
|
571
676
|
const ListCustomerChannelSchema = zod_1.z.object({
|
|
572
677
|
is: zod_1.z.enum(['web', 'app_store', 'play_store']).optional(),
|
|
573
678
|
is_not: zod_1.z.enum(['web', 'app_store', 'play_store']).optional(),
|
|
574
|
-
in: zod_1.z
|
|
575
|
-
|
|
679
|
+
in: zod_1.z
|
|
680
|
+
.union([
|
|
681
|
+
zod_1.z.array(zod_1.z.enum(['web', 'app_store', 'play_store']).optional()),
|
|
682
|
+
zod_1.z.enum(['web', 'app_store', 'play_store']),
|
|
683
|
+
])
|
|
684
|
+
.optional(),
|
|
685
|
+
not_in: zod_1.z
|
|
686
|
+
.union([
|
|
687
|
+
zod_1.z.array(zod_1.z.enum(['web', 'app_store', 'play_store']).optional()),
|
|
688
|
+
zod_1.z.enum(['web', 'app_store', 'play_store']),
|
|
689
|
+
])
|
|
690
|
+
.optional(),
|
|
576
691
|
});
|
|
577
692
|
const ListCustomerBusinessEntityIdSchema = zod_1.z.object({
|
|
578
693
|
is: zod_1.z.string().min(1).optional(),
|
|
@@ -625,6 +740,11 @@ const ListCustomerBodySchema = zod_1.z.looseObject({
|
|
|
625
740
|
exports.ListCustomerBodySchema = ListCustomerBodySchema;
|
|
626
741
|
//Customer.update
|
|
627
742
|
const UpdateCustomerMetaDataSchema = zod_1.z.looseObject({});
|
|
743
|
+
const UpdateCustomerTaxProvidersFieldsItemSchema = zod_1.z.object({
|
|
744
|
+
provider_name: zod_1.z.string().max(50).optional(),
|
|
745
|
+
field_id: zod_1.z.string().max(50).optional(),
|
|
746
|
+
field_value: zod_1.z.string().max(50).optional(),
|
|
747
|
+
});
|
|
628
748
|
const UpdateCustomerTaxProvidersFieldsSchema = zod_1.z.object({
|
|
629
749
|
provider_name: zod_1.z.array(zod_1.z.string().max(50).optional()).optional(),
|
|
630
750
|
field_id: zod_1.z.array(zod_1.z.string().max(50).optional()).optional(),
|
|
@@ -696,7 +816,12 @@ const UpdateCustomerBodySchema = zod_1.z.looseObject({
|
|
|
696
816
|
meta_data: UpdateCustomerMetaDataSchema.optional(),
|
|
697
817
|
fraud_flag: zod_1.z.enum(['safe', 'fraudulent']).optional(),
|
|
698
818
|
consolidated_invoicing: zod_1.z.boolean().optional(),
|
|
699
|
-
tax_providers_fields:
|
|
819
|
+
tax_providers_fields: zod_1.z
|
|
820
|
+
.union([
|
|
821
|
+
zod_1.z.array(UpdateCustomerTaxProvidersFieldsItemSchema.optional()),
|
|
822
|
+
UpdateCustomerTaxProvidersFieldsSchema,
|
|
823
|
+
])
|
|
824
|
+
.optional(),
|
|
700
825
|
});
|
|
701
826
|
exports.UpdateCustomerBodySchema = UpdateCustomerBodySchema;
|
|
702
827
|
//Customer.updatePaymentMethod
|
|
@@ -863,6 +988,13 @@ const UpdateBillingInfoCustomerBillingAddressSchema = zod_1.z.object({
|
|
|
863
988
|
.enum(['not_validated', 'valid', 'partially_valid', 'invalid'])
|
|
864
989
|
.optional(),
|
|
865
990
|
});
|
|
991
|
+
const UpdateBillingInfoCustomerEntityIdentifiersItemSchema = zod_1.z.object({
|
|
992
|
+
id: zod_1.z.string().max(40).optional(),
|
|
993
|
+
scheme: zod_1.z.string().max(50).optional(),
|
|
994
|
+
value: zod_1.z.string().max(50).optional(),
|
|
995
|
+
operation: zod_1.z.enum(['create', 'update', 'delete']).optional(),
|
|
996
|
+
standard: zod_1.z.string().max(50).optional(),
|
|
997
|
+
});
|
|
866
998
|
const UpdateBillingInfoCustomerEntityIdentifiersSchema = zod_1.z.object({
|
|
867
999
|
id: zod_1.z.array(zod_1.z.string().max(40).optional()).optional(),
|
|
868
1000
|
scheme: zod_1.z.array(zod_1.z.string().max(50).optional()).optional(),
|
|
@@ -872,6 +1004,11 @@ const UpdateBillingInfoCustomerEntityIdentifiersSchema = zod_1.z.object({
|
|
|
872
1004
|
.optional(),
|
|
873
1005
|
standard: zod_1.z.array(zod_1.z.string().max(50).optional()).optional(),
|
|
874
1006
|
});
|
|
1007
|
+
const UpdateBillingInfoCustomerTaxProvidersFieldsItemSchema = zod_1.z.object({
|
|
1008
|
+
provider_name: zod_1.z.string().max(50).optional(),
|
|
1009
|
+
field_id: zod_1.z.string().max(50).optional(),
|
|
1010
|
+
field_value: zod_1.z.string().max(50).optional(),
|
|
1011
|
+
});
|
|
875
1012
|
const UpdateBillingInfoCustomerTaxProvidersFieldsSchema = zod_1.z.object({
|
|
876
1013
|
provider_name: zod_1.z.array(zod_1.z.string().max(50).optional()).optional(),
|
|
877
1014
|
field_id: zod_1.z.array(zod_1.z.string().max(50).optional()).optional(),
|
|
@@ -887,8 +1024,18 @@ const UpdateBillingInfoCustomerBodySchema = zod_1.z.looseObject({
|
|
|
887
1024
|
is_einvoice_enabled: zod_1.z.boolean().optional(),
|
|
888
1025
|
einvoicing_method: zod_1.z.enum(['automatic', 'manual', 'site_default']).optional(),
|
|
889
1026
|
billing_address: UpdateBillingInfoCustomerBillingAddressSchema.optional(),
|
|
890
|
-
entity_identifiers:
|
|
891
|
-
|
|
1027
|
+
entity_identifiers: zod_1.z
|
|
1028
|
+
.union([
|
|
1029
|
+
zod_1.z.array(UpdateBillingInfoCustomerEntityIdentifiersItemSchema.optional()),
|
|
1030
|
+
UpdateBillingInfoCustomerEntityIdentifiersSchema,
|
|
1031
|
+
])
|
|
1032
|
+
.optional(),
|
|
1033
|
+
tax_providers_fields: zod_1.z
|
|
1034
|
+
.union([
|
|
1035
|
+
zod_1.z.array(UpdateBillingInfoCustomerTaxProvidersFieldsItemSchema.optional()),
|
|
1036
|
+
UpdateBillingInfoCustomerTaxProvidersFieldsSchema,
|
|
1037
|
+
])
|
|
1038
|
+
.optional(),
|
|
892
1039
|
});
|
|
893
1040
|
exports.UpdateBillingInfoCustomerBodySchema = UpdateBillingInfoCustomerBodySchema;
|
|
894
1041
|
//Customer.contactsForCustomer
|
|
@@ -990,12 +1137,6 @@ const RecordExcessPaymentCustomerTransactionSchema = zod_1.z.object({
|
|
|
990
1137
|
'app_store',
|
|
991
1138
|
'play_store',
|
|
992
1139
|
'custom',
|
|
993
|
-
'tamara',
|
|
994
|
-
'qpay',
|
|
995
|
-
'blik',
|
|
996
|
-
'fpx',
|
|
997
|
-
'wero',
|
|
998
|
-
'p24',
|
|
999
1140
|
]),
|
|
1000
1141
|
reference_number: zod_1.z.string().max(100).optional(),
|
|
1001
1142
|
custom_payment_method_id: zod_1.z.string().max(50).optional(),
|
|
@@ -1181,6 +1322,10 @@ const CollectPaymentCustomerPaymentIntentSchema = zod_1.z.object({
|
|
|
1181
1322
|
reference_id: zod_1.z.string().max(65000).optional(),
|
|
1182
1323
|
additional_information: CollectPaymentCustomerAdditionalInformationSchema.optional(),
|
|
1183
1324
|
});
|
|
1325
|
+
const CollectPaymentCustomerInvoiceAllocationsItemSchema = zod_1.z.object({
|
|
1326
|
+
invoice_id: zod_1.z.string().max(50),
|
|
1327
|
+
allocation_amount: zod_1.z.number().int().min(0).optional(),
|
|
1328
|
+
});
|
|
1184
1329
|
const CollectPaymentCustomerInvoiceAllocationsSchema = zod_1.z.object({
|
|
1185
1330
|
invoice_id: zod_1.z.array(zod_1.z.string().max(50).optional()),
|
|
1186
1331
|
allocation_amount: zod_1.z.array(zod_1.z.number().int().min(0).optional()).optional(),
|
|
@@ -1195,7 +1340,12 @@ const CollectPaymentCustomerBodySchema = zod_1.z.looseObject({
|
|
|
1195
1340
|
payment_method: CollectPaymentCustomerPaymentMethodSchema.optional(),
|
|
1196
1341
|
card: CollectPaymentCustomerCardSchema.optional(),
|
|
1197
1342
|
payment_intent: CollectPaymentCustomerPaymentIntentSchema.optional(),
|
|
1198
|
-
invoice_allocations:
|
|
1343
|
+
invoice_allocations: zod_1.z
|
|
1344
|
+
.union([
|
|
1345
|
+
zod_1.z.array(CollectPaymentCustomerInvoiceAllocationsItemSchema.optional()),
|
|
1346
|
+
CollectPaymentCustomerInvoiceAllocationsSchema,
|
|
1347
|
+
])
|
|
1348
|
+
.optional(),
|
|
1199
1349
|
});
|
|
1200
1350
|
exports.CollectPaymentCustomerBodySchema = CollectPaymentCustomerBodySchema;
|
|
1201
1351
|
//Customer.delete
|
|
@@ -6,10 +6,24 @@ Object.defineProperty(exports, "__esModule", { value: true });
|
|
|
6
6
|
exports.ListDifferentialPriceBodySchema = exports.DeleteDifferentialPriceBodySchema = exports.UpdateDifferentialPriceBodySchema = exports.RetrieveDifferentialPriceBodySchema = exports.CreateDifferentialPriceBodySchema = void 0;
|
|
7
7
|
const zod_1 = require("zod");
|
|
8
8
|
//DifferentialPrice.create
|
|
9
|
+
const CreateDifferentialPriceParentPeriodsItemSchema = zod_1.z.object({
|
|
10
|
+
period_unit: zod_1.z.enum(['day', 'week', 'month', 'year']),
|
|
11
|
+
period: zod_1.z.array(zod_1.z.string().optional()).optional(),
|
|
12
|
+
});
|
|
9
13
|
const CreateDifferentialPriceParentPeriodsSchema = zod_1.z.object({
|
|
10
14
|
period_unit: zod_1.z.array(zod_1.z.enum(['day', 'week', 'month', 'year']).optional()),
|
|
11
15
|
period: zod_1.z.array(zod_1.z.array(zod_1.z.string().optional()).optional()).optional(),
|
|
12
16
|
});
|
|
17
|
+
const CreateDifferentialPriceTiersItemSchema = zod_1.z.object({
|
|
18
|
+
starting_unit: zod_1.z.number().int().min(1).optional(),
|
|
19
|
+
ending_unit: zod_1.z.number().int().optional(),
|
|
20
|
+
price: zod_1.z.number().int().min(0).optional(),
|
|
21
|
+
starting_unit_in_decimal: zod_1.z.string().max(33).optional(),
|
|
22
|
+
ending_unit_in_decimal: zod_1.z.string().max(33).optional(),
|
|
23
|
+
price_in_decimal: zod_1.z.string().max(39).optional(),
|
|
24
|
+
pricing_type: zod_1.z.enum(['per_unit', 'flat_fee', 'package']).optional(),
|
|
25
|
+
package_size: zod_1.z.number().int().min(1).optional(),
|
|
26
|
+
});
|
|
13
27
|
const CreateDifferentialPriceTiersSchema = zod_1.z.object({
|
|
14
28
|
starting_unit: zod_1.z.array(zod_1.z.number().int().min(1).optional()).optional(),
|
|
15
29
|
ending_unit: zod_1.z.array(zod_1.z.number().int().optional()).optional(),
|
|
@@ -27,8 +41,18 @@ const CreateDifferentialPriceBodySchema = zod_1.z.looseObject({
|
|
|
27
41
|
price: zod_1.z.number().int().min(0).optional(),
|
|
28
42
|
price_in_decimal: zod_1.z.string().max(39).optional(),
|
|
29
43
|
business_entity_id: zod_1.z.string().max(50).optional(),
|
|
30
|
-
parent_periods:
|
|
31
|
-
|
|
44
|
+
parent_periods: zod_1.z
|
|
45
|
+
.union([
|
|
46
|
+
zod_1.z.array(CreateDifferentialPriceParentPeriodsItemSchema.optional()),
|
|
47
|
+
CreateDifferentialPriceParentPeriodsSchema,
|
|
48
|
+
])
|
|
49
|
+
.optional(),
|
|
50
|
+
tiers: zod_1.z
|
|
51
|
+
.union([
|
|
52
|
+
zod_1.z.array(CreateDifferentialPriceTiersItemSchema.optional()),
|
|
53
|
+
CreateDifferentialPriceTiersSchema,
|
|
54
|
+
])
|
|
55
|
+
.optional(),
|
|
32
56
|
});
|
|
33
57
|
exports.CreateDifferentialPriceBodySchema = CreateDifferentialPriceBodySchema;
|
|
34
58
|
//DifferentialPrice.retrieve
|
|
@@ -37,10 +61,24 @@ const RetrieveDifferentialPriceBodySchema = zod_1.z.looseObject({
|
|
|
37
61
|
});
|
|
38
62
|
exports.RetrieveDifferentialPriceBodySchema = RetrieveDifferentialPriceBodySchema;
|
|
39
63
|
//DifferentialPrice.update
|
|
64
|
+
const UpdateDifferentialPriceParentPeriodsItemSchema = zod_1.z.object({
|
|
65
|
+
period_unit: zod_1.z.enum(['day', 'week', 'month', 'year']),
|
|
66
|
+
period: zod_1.z.array(zod_1.z.string().optional()).optional(),
|
|
67
|
+
});
|
|
40
68
|
const UpdateDifferentialPriceParentPeriodsSchema = zod_1.z.object({
|
|
41
69
|
period_unit: zod_1.z.array(zod_1.z.enum(['day', 'week', 'month', 'year']).optional()),
|
|
42
70
|
period: zod_1.z.array(zod_1.z.array(zod_1.z.string().optional()).optional()).optional(),
|
|
43
71
|
});
|
|
72
|
+
const UpdateDifferentialPriceTiersItemSchema = zod_1.z.object({
|
|
73
|
+
starting_unit: zod_1.z.number().int().min(1).optional(),
|
|
74
|
+
ending_unit: zod_1.z.number().int().optional(),
|
|
75
|
+
price: zod_1.z.number().int().min(0).optional(),
|
|
76
|
+
starting_unit_in_decimal: zod_1.z.string().max(33).optional(),
|
|
77
|
+
ending_unit_in_decimal: zod_1.z.string().max(33).optional(),
|
|
78
|
+
price_in_decimal: zod_1.z.string().max(39).optional(),
|
|
79
|
+
pricing_type: zod_1.z.enum(['per_unit', 'flat_fee', 'package']).optional(),
|
|
80
|
+
package_size: zod_1.z.number().int().min(1).optional(),
|
|
81
|
+
});
|
|
44
82
|
const UpdateDifferentialPriceTiersSchema = zod_1.z.object({
|
|
45
83
|
starting_unit: zod_1.z.array(zod_1.z.number().int().min(1).optional()).optional(),
|
|
46
84
|
ending_unit: zod_1.z.array(zod_1.z.number().int().optional()).optional(),
|
|
@@ -57,8 +95,18 @@ const UpdateDifferentialPriceBodySchema = zod_1.z.looseObject({
|
|
|
57
95
|
item_price_id: zod_1.z.string().max(100),
|
|
58
96
|
price: zod_1.z.number().int().min(0).optional(),
|
|
59
97
|
price_in_decimal: zod_1.z.string().max(39).optional(),
|
|
60
|
-
parent_periods:
|
|
61
|
-
|
|
98
|
+
parent_periods: zod_1.z
|
|
99
|
+
.union([
|
|
100
|
+
zod_1.z.array(UpdateDifferentialPriceParentPeriodsItemSchema.optional()),
|
|
101
|
+
UpdateDifferentialPriceParentPeriodsSchema,
|
|
102
|
+
])
|
|
103
|
+
.optional(),
|
|
104
|
+
tiers: zod_1.z
|
|
105
|
+
.union([
|
|
106
|
+
zod_1.z.array(UpdateDifferentialPriceTiersItemSchema.optional()),
|
|
107
|
+
UpdateDifferentialPriceTiersSchema,
|
|
108
|
+
])
|
|
109
|
+
.optional(),
|
|
62
110
|
});
|
|
63
111
|
exports.UpdateDifferentialPriceBodySchema = UpdateDifferentialPriceBodySchema;
|
|
64
112
|
//DifferentialPrice.delete
|
|
@@ -71,29 +119,69 @@ const ListDifferentialPriceItemPriceIdSchema = zod_1.z.object({
|
|
|
71
119
|
is: zod_1.z.string().min(1).optional(),
|
|
72
120
|
is_not: zod_1.z.string().min(1).optional(),
|
|
73
121
|
starts_with: zod_1.z.string().min(1).optional(),
|
|
74
|
-
in: zod_1.z
|
|
75
|
-
|
|
122
|
+
in: zod_1.z
|
|
123
|
+
.union([
|
|
124
|
+
zod_1.z.array(zod_1.z.string().optional()),
|
|
125
|
+
zod_1.z.string().regex(RegExp('^\\[(.*)(,.*)*\\]$')),
|
|
126
|
+
])
|
|
127
|
+
.optional(),
|
|
128
|
+
not_in: zod_1.z
|
|
129
|
+
.union([
|
|
130
|
+
zod_1.z.array(zod_1.z.string().optional()),
|
|
131
|
+
zod_1.z.string().regex(RegExp('^\\[(.*)(,.*)*\\]$')),
|
|
132
|
+
])
|
|
133
|
+
.optional(),
|
|
76
134
|
});
|
|
77
135
|
const ListDifferentialPriceItemIdSchema = zod_1.z.object({
|
|
78
136
|
is: zod_1.z.string().min(1).optional(),
|
|
79
137
|
is_not: zod_1.z.string().min(1).optional(),
|
|
80
138
|
starts_with: zod_1.z.string().min(1).optional(),
|
|
81
|
-
in: zod_1.z
|
|
82
|
-
|
|
139
|
+
in: zod_1.z
|
|
140
|
+
.union([
|
|
141
|
+
zod_1.z.array(zod_1.z.string().optional()),
|
|
142
|
+
zod_1.z.string().regex(RegExp('^\\[(.*)(,.*)*\\]$')),
|
|
143
|
+
])
|
|
144
|
+
.optional(),
|
|
145
|
+
not_in: zod_1.z
|
|
146
|
+
.union([
|
|
147
|
+
zod_1.z.array(zod_1.z.string().optional()),
|
|
148
|
+
zod_1.z.string().regex(RegExp('^\\[(.*)(,.*)*\\]$')),
|
|
149
|
+
])
|
|
150
|
+
.optional(),
|
|
83
151
|
});
|
|
84
152
|
const ListDifferentialPriceIdSchema = zod_1.z.object({
|
|
85
153
|
is: zod_1.z.string().min(1).optional(),
|
|
86
154
|
is_not: zod_1.z.string().min(1).optional(),
|
|
87
155
|
starts_with: zod_1.z.string().min(1).optional(),
|
|
88
|
-
in: zod_1.z
|
|
89
|
-
|
|
156
|
+
in: zod_1.z
|
|
157
|
+
.union([
|
|
158
|
+
zod_1.z.array(zod_1.z.string().optional()),
|
|
159
|
+
zod_1.z.string().regex(RegExp('^\\[(.*)(,.*)*\\]$')),
|
|
160
|
+
])
|
|
161
|
+
.optional(),
|
|
162
|
+
not_in: zod_1.z
|
|
163
|
+
.union([
|
|
164
|
+
zod_1.z.array(zod_1.z.string().optional()),
|
|
165
|
+
zod_1.z.string().regex(RegExp('^\\[(.*)(,.*)*\\]$')),
|
|
166
|
+
])
|
|
167
|
+
.optional(),
|
|
90
168
|
});
|
|
91
169
|
const ListDifferentialPriceParentItemIdSchema = zod_1.z.object({
|
|
92
170
|
is: zod_1.z.string().min(1).optional(),
|
|
93
171
|
is_not: zod_1.z.string().min(1).optional(),
|
|
94
172
|
starts_with: zod_1.z.string().min(1).optional(),
|
|
95
|
-
in: zod_1.z
|
|
96
|
-
|
|
173
|
+
in: zod_1.z
|
|
174
|
+
.union([
|
|
175
|
+
zod_1.z.array(zod_1.z.string().optional()),
|
|
176
|
+
zod_1.z.string().regex(RegExp('^\\[(.*)(,.*)*\\]$')),
|
|
177
|
+
])
|
|
178
|
+
.optional(),
|
|
179
|
+
not_in: zod_1.z
|
|
180
|
+
.union([
|
|
181
|
+
zod_1.z.array(zod_1.z.string().optional()),
|
|
182
|
+
zod_1.z.string().regex(RegExp('^\\[(.*)(,.*)*\\]$')),
|
|
183
|
+
])
|
|
184
|
+
.optional(),
|
|
97
185
|
});
|
|
98
186
|
const ListDifferentialPriceBodySchema = zod_1.z.looseObject({
|
|
99
187
|
limit: zod_1.z.number().int().min(1).max(100).optional(),
|