chargebee 3.26.0 → 3.27.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 (163) hide show
  1. package/CHANGELOG.md +7 -0
  2. package/README.md +39 -0
  3. package/cjs/RequestWrapper.js +27 -0
  4. package/cjs/chargebee.cjs.js +3 -0
  5. package/cjs/chargebee.cjs.worker.js +2 -0
  6. package/cjs/chargebeeZodValidationError.js +18 -0
  7. package/cjs/createChargebee.js +5 -0
  8. package/cjs/environment.js +1 -1
  9. package/cjs/schema/addon.schema.js +269 -0
  10. package/cjs/schema/address.schema.js +35 -0
  11. package/cjs/schema/alert.schema.js +74 -0
  12. package/cjs/schema/alert_status.schema.js +31 -0
  13. package/cjs/schema/attached_item.schema.js +144 -0
  14. package/cjs/schema/business_entity.schema.js +46 -0
  15. package/cjs/schema/card.schema.js +165 -0
  16. package/cjs/schema/comment.schema.js +69 -0
  17. package/cjs/schema/coupon.schema.js +323 -0
  18. package/cjs/schema/coupon_code.schema.js +49 -0
  19. package/cjs/schema/coupon_set.schema.js +88 -0
  20. package/cjs/schema/credit_note.schema.js +502 -0
  21. package/cjs/schema/currency.schema.js +32 -0
  22. package/cjs/schema/customer.schema.js +1201 -0
  23. package/cjs/schema/customer_entitlement.schema.js +14 -0
  24. package/cjs/schema/differential_price.schema.js +106 -0
  25. package/cjs/schema/entitlement.schema.js +54 -0
  26. package/cjs/schema/entitlement_override.schema.js +35 -0
  27. package/cjs/schema/estimate.schema.js +1535 -0
  28. package/cjs/schema/event.schema.js +1060 -0
  29. package/cjs/schema/export.schema.js +3385 -0
  30. package/cjs/schema/feature.schema.js +78 -0
  31. package/cjs/schema/gift.schema.js +293 -0
  32. package/cjs/schema/grant_block.schema.js +47 -0
  33. package/cjs/schema/hosted_page.schema.js +1777 -0
  34. package/cjs/schema/in_app_subscription.schema.js +68 -0
  35. package/cjs/schema/index.js +88 -0
  36. package/cjs/schema/invoice.schema.js +1685 -0
  37. package/cjs/schema/item.schema.js +195 -0
  38. package/cjs/schema/item_entitlement.schema.js +45 -0
  39. package/cjs/schema/item_family.schema.js +57 -0
  40. package/cjs/schema/item_price.schema.js +335 -0
  41. package/cjs/schema/ledger_account_balance.schema.js +21 -0
  42. package/cjs/schema/ledger_operation.schema.js +104 -0
  43. package/cjs/schema/meter.schema.js +13 -0
  44. package/cjs/schema/metered_feature.schema.js +20 -0
  45. package/cjs/schema/non_subscription.schema.js +28 -0
  46. package/cjs/schema/offer_event.schema.js +13 -0
  47. package/cjs/schema/offer_fulfillment.schema.js +20 -0
  48. package/cjs/schema/omnichannel_one_time_order.schema.js +26 -0
  49. package/cjs/schema/omnichannel_subscription.schema.js +122 -0
  50. package/cjs/schema/omnichannel_subscription_item.schema.js +13 -0
  51. package/cjs/schema/order.schema.js +441 -0
  52. package/cjs/schema/payment_intent.schema.js +127 -0
  53. package/cjs/schema/payment_schedule_scheme.schema.js +20 -0
  54. package/cjs/schema/payment_source.schema.js +630 -0
  55. package/cjs/schema/payment_voucher.schema.js +57 -0
  56. package/cjs/schema/personalized_offer.schema.js +28 -0
  57. package/cjs/schema/plan.schema.js +363 -0
  58. package/cjs/schema/portal_session.schema.js +22 -0
  59. package/cjs/schema/price_variant.schema.js +93 -0
  60. package/cjs/schema/pricing_page_session.schema.js +135 -0
  61. package/cjs/schema/promotional_credit.schema.js +78 -0
  62. package/cjs/schema/promotional_grant.schema.js +17 -0
  63. package/cjs/schema/purchase.schema.js +277 -0
  64. package/cjs/schema/quote.schema.js +1667 -0
  65. package/cjs/schema/ramp.schema.js +245 -0
  66. package/cjs/schema/recorded_purchase.schema.js +32 -0
  67. package/cjs/schema/resource_migration.schema.js +14 -0
  68. package/cjs/schema/site_migration_detail.schema.js +81 -0
  69. package/cjs/schema/subscription.schema.js +3344 -0
  70. package/cjs/schema/subscription_entitlement.schema.js +25 -0
  71. package/cjs/schema/time_machine.schema.js +17 -0
  72. package/cjs/schema/transaction.schema.js +744 -0
  73. package/cjs/schema/unbilled_charge.schema.js +139 -0
  74. package/cjs/schema/usage.schema.js +93 -0
  75. package/cjs/schema/usage_charge.schema.js +17 -0
  76. package/cjs/schema/usage_event.schema.js +28 -0
  77. package/cjs/schema/usage_file.schema.js +13 -0
  78. package/cjs/schema/usage_summary.schema.js +17 -0
  79. package/cjs/schema/virtual_bank_account.schema.js +71 -0
  80. package/cjs/schema/webhook_endpoint.schema.js +508 -0
  81. package/cjs/validationLoader.js +59 -0
  82. package/esm/RequestWrapper.js +27 -0
  83. package/esm/chargebee.esm.js +2 -0
  84. package/esm/chargebee.esm.worker.js +1 -0
  85. package/esm/chargebeeZodValidationError.js +14 -0
  86. package/esm/createChargebee.js +5 -0
  87. package/esm/environment.js +1 -1
  88. package/esm/schema/addon.schema.js +266 -0
  89. package/esm/schema/address.schema.js +32 -0
  90. package/esm/schema/alert.schema.js +71 -0
  91. package/esm/schema/alert_status.schema.js +28 -0
  92. package/esm/schema/attached_item.schema.js +141 -0
  93. package/esm/schema/business_entity.schema.js +43 -0
  94. package/esm/schema/card.schema.js +162 -0
  95. package/esm/schema/comment.schema.js +66 -0
  96. package/esm/schema/coupon.schema.js +320 -0
  97. package/esm/schema/coupon_code.schema.js +46 -0
  98. package/esm/schema/coupon_set.schema.js +85 -0
  99. package/esm/schema/credit_note.schema.js +499 -0
  100. package/esm/schema/currency.schema.js +29 -0
  101. package/esm/schema/customer.schema.js +1198 -0
  102. package/esm/schema/customer_entitlement.schema.js +11 -0
  103. package/esm/schema/differential_price.schema.js +103 -0
  104. package/esm/schema/entitlement.schema.js +51 -0
  105. package/esm/schema/entitlement_override.schema.js +32 -0
  106. package/esm/schema/estimate.schema.js +1532 -0
  107. package/esm/schema/event.schema.js +1057 -0
  108. package/esm/schema/export.schema.js +3382 -0
  109. package/esm/schema/feature.schema.js +75 -0
  110. package/esm/schema/gift.schema.js +290 -0
  111. package/esm/schema/grant_block.schema.js +44 -0
  112. package/esm/schema/hosted_page.schema.js +1774 -0
  113. package/esm/schema/in_app_subscription.schema.js +65 -0
  114. package/esm/schema/index.js +72 -0
  115. package/esm/schema/invoice.schema.js +1682 -0
  116. package/esm/schema/item.schema.js +192 -0
  117. package/esm/schema/item_entitlement.schema.js +42 -0
  118. package/esm/schema/item_family.schema.js +54 -0
  119. package/esm/schema/item_price.schema.js +332 -0
  120. package/esm/schema/ledger_account_balance.schema.js +18 -0
  121. package/esm/schema/ledger_operation.schema.js +101 -0
  122. package/esm/schema/meter.schema.js +10 -0
  123. package/esm/schema/metered_feature.schema.js +17 -0
  124. package/esm/schema/non_subscription.schema.js +25 -0
  125. package/esm/schema/offer_event.schema.js +10 -0
  126. package/esm/schema/offer_fulfillment.schema.js +17 -0
  127. package/esm/schema/omnichannel_one_time_order.schema.js +23 -0
  128. package/esm/schema/omnichannel_subscription.schema.js +119 -0
  129. package/esm/schema/omnichannel_subscription_item.schema.js +10 -0
  130. package/esm/schema/order.schema.js +438 -0
  131. package/esm/schema/payment_intent.schema.js +124 -0
  132. package/esm/schema/payment_schedule_scheme.schema.js +17 -0
  133. package/esm/schema/payment_source.schema.js +627 -0
  134. package/esm/schema/payment_voucher.schema.js +54 -0
  135. package/esm/schema/personalized_offer.schema.js +25 -0
  136. package/esm/schema/plan.schema.js +360 -0
  137. package/esm/schema/portal_session.schema.js +19 -0
  138. package/esm/schema/price_variant.schema.js +90 -0
  139. package/esm/schema/pricing_page_session.schema.js +132 -0
  140. package/esm/schema/promotional_credit.schema.js +75 -0
  141. package/esm/schema/promotional_grant.schema.js +14 -0
  142. package/esm/schema/purchase.schema.js +274 -0
  143. package/esm/schema/quote.schema.js +1664 -0
  144. package/esm/schema/ramp.schema.js +242 -0
  145. package/esm/schema/recorded_purchase.schema.js +29 -0
  146. package/esm/schema/resource_migration.schema.js +11 -0
  147. package/esm/schema/site_migration_detail.schema.js +78 -0
  148. package/esm/schema/subscription.schema.js +3341 -0
  149. package/esm/schema/subscription_entitlement.schema.js +22 -0
  150. package/esm/schema/time_machine.schema.js +14 -0
  151. package/esm/schema/transaction.schema.js +741 -0
  152. package/esm/schema/unbilled_charge.schema.js +136 -0
  153. package/esm/schema/usage.schema.js +90 -0
  154. package/esm/schema/usage_charge.schema.js +14 -0
  155. package/esm/schema/usage_event.schema.js +25 -0
  156. package/esm/schema/usage_file.schema.js +10 -0
  157. package/esm/schema/usage_summary.schema.js +14 -0
  158. package/esm/schema/virtual_bank_account.schema.js +68 -0
  159. package/esm/schema/webhook_endpoint.schema.js +505 -0
  160. package/esm/validationLoader.js +56 -0
  161. package/package.json +4 -1
  162. package/types/core.d.ts +2 -0
  163. package/types/index.d.ts +16 -0
@@ -0,0 +1,104 @@
1
+ "use strict";
2
+ // Generated Zod schemas: LedgerOperation
3
+ // Actions: listLedgerOperations, capture, authorize, captureAuthorization, releaseAuthorization
4
+ // Do not edit manually – regenerate via sdk-generator
5
+ Object.defineProperty(exports, "__esModule", { value: true });
6
+ exports.ReleaseAuthorizationLedgerOperationBodySchema = exports.CaptureAuthorizationLedgerOperationBodySchema = exports.AuthorizeLedgerOperationBodySchema = exports.CaptureLedgerOperationBodySchema = exports.ListLedgerOperationsLedgerOperationBodySchema = void 0;
7
+ const zod_1 = require("zod");
8
+ //LedgerOperation.listLedgerOperations
9
+ const ListLedgerOperationsLedgerOperationSubscriptionIdSchema = zod_1.z.object({
10
+ is: zod_1.z.string().min(1).optional(),
11
+ });
12
+ const ListLedgerOperationsLedgerOperationUnitIdSchema = zod_1.z.object({
13
+ is: zod_1.z.string().min(1).optional(),
14
+ });
15
+ const ListLedgerOperationsLedgerOperationCreatedAtSchema = zod_1.z.object({
16
+ after: zod_1.z.string().regex(RegExp('^\\d{10}$')).optional(),
17
+ before: zod_1.z.string().regex(RegExp('^\\d{10}$')).optional(),
18
+ on: zod_1.z.string().regex(RegExp('^\\d{10}$')).optional(),
19
+ between: zod_1.z.string().regex(RegExp('^\\[\\d{10},\\d{10}\\]$')).optional(),
20
+ });
21
+ const ListLedgerOperationsLedgerOperationTypeSchema = zod_1.z.object({
22
+ is: zod_1.z
23
+ .enum([
24
+ 'allocation',
25
+ 'capture',
26
+ 'authorize',
27
+ 'release_authorization',
28
+ 'capture_authorization',
29
+ 'expiry',
30
+ 'void',
31
+ 'rollover',
32
+ 'adjustment',
33
+ ])
34
+ .optional(),
35
+ in: zod_1.z
36
+ .enum([
37
+ 'allocation',
38
+ 'capture',
39
+ 'authorize',
40
+ 'release_authorization',
41
+ 'capture_authorization',
42
+ 'expiry',
43
+ 'void',
44
+ 'rollover',
45
+ 'adjustment',
46
+ ])
47
+ .optional(),
48
+ });
49
+ const ListLedgerOperationsLedgerOperationSortBySchema = zod_1.z.looseObject({
50
+ asc: zod_1.z.enum(['created_at']).optional(),
51
+ desc: zod_1.z.enum(['created_at']).optional(),
52
+ });
53
+ const ListLedgerOperationsLedgerOperationBodySchema = zod_1.z.looseObject({
54
+ limit: zod_1.z.number().int().min(1).max(100).optional(),
55
+ offset: zod_1.z.string().max(1000).optional(),
56
+ subscription_id: ListLedgerOperationsLedgerOperationSubscriptionIdSchema,
57
+ unit_id: ListLedgerOperationsLedgerOperationUnitIdSchema.optional(),
58
+ created_at: ListLedgerOperationsLedgerOperationCreatedAtSchema.optional(),
59
+ type: ListLedgerOperationsLedgerOperationTypeSchema.optional(),
60
+ sort_by: ListLedgerOperationsLedgerOperationSortBySchema.optional(),
61
+ });
62
+ exports.ListLedgerOperationsLedgerOperationBodySchema = ListLedgerOperationsLedgerOperationBodySchema;
63
+ //LedgerOperation.capture
64
+ const CaptureLedgerOperationMetadataSchema = zod_1.z.looseObject({});
65
+ const CaptureLedgerOperationBodySchema = zod_1.z.looseObject({
66
+ id: zod_1.z.string().max(50).optional(),
67
+ subscription_id: zod_1.z.string().max(50),
68
+ unit_id: zod_1.z.string().max(50),
69
+ amount: zod_1.z.string().max(36),
70
+ ledger_operation_timestamp: zod_1.z.number().int(),
71
+ metadata: CaptureLedgerOperationMetadataSchema.optional(),
72
+ });
73
+ exports.CaptureLedgerOperationBodySchema = CaptureLedgerOperationBodySchema;
74
+ //LedgerOperation.authorize
75
+ const AuthorizeLedgerOperationMetadataSchema = zod_1.z.looseObject({});
76
+ const AuthorizeLedgerOperationBodySchema = zod_1.z.looseObject({
77
+ id: zod_1.z.string().max(50).optional(),
78
+ subscription_id: zod_1.z.string().max(50),
79
+ unit_id: zod_1.z.string().max(50),
80
+ amount: zod_1.z.string().max(36),
81
+ ledger_operation_timestamp: zod_1.z.number().int(),
82
+ auto_release_timestamp: zod_1.z.number().int().optional(),
83
+ metadata: AuthorizeLedgerOperationMetadataSchema.optional(),
84
+ });
85
+ exports.AuthorizeLedgerOperationBodySchema = AuthorizeLedgerOperationBodySchema;
86
+ //LedgerOperation.captureAuthorization
87
+ const CaptureAuthorizationLedgerOperationMetadataSchema = zod_1.z.looseObject({});
88
+ const CaptureAuthorizationLedgerOperationBodySchema = zod_1.z.looseObject({
89
+ authorization_id: zod_1.z.string().max(50),
90
+ id: zod_1.z.string().max(50).optional(),
91
+ amount: zod_1.z.string().max(36),
92
+ ledger_operation_timestamp: zod_1.z.number().int(),
93
+ metadata: CaptureAuthorizationLedgerOperationMetadataSchema.optional(),
94
+ });
95
+ exports.CaptureAuthorizationLedgerOperationBodySchema = CaptureAuthorizationLedgerOperationBodySchema;
96
+ //LedgerOperation.releaseAuthorization
97
+ const ReleaseAuthorizationLedgerOperationMetadataSchema = zod_1.z.looseObject({});
98
+ const ReleaseAuthorizationLedgerOperationBodySchema = zod_1.z.looseObject({
99
+ authorization_id: zod_1.z.string().max(50),
100
+ id: zod_1.z.string().max(50).optional(),
101
+ ledger_operation_timestamp: zod_1.z.number().int(),
102
+ metadata: ReleaseAuthorizationLedgerOperationMetadataSchema.optional(),
103
+ });
104
+ exports.ReleaseAuthorizationLedgerOperationBodySchema = ReleaseAuthorizationLedgerOperationBodySchema;
@@ -0,0 +1,13 @@
1
+ "use strict";
2
+ // Generated Zod schemas: Meter
3
+ // Actions: list
4
+ // Do not edit manually – regenerate via sdk-generator
5
+ Object.defineProperty(exports, "__esModule", { value: true });
6
+ exports.ListMeterBodySchema = void 0;
7
+ const zod_1 = require("zod");
8
+ //Meter.list
9
+ const ListMeterBodySchema = zod_1.z.looseObject({
10
+ limit: zod_1.z.number().int().min(1).max(100).optional(),
11
+ offset: zod_1.z.string().max(1000).optional(),
12
+ });
13
+ exports.ListMeterBodySchema = ListMeterBodySchema;
@@ -0,0 +1,20 @@
1
+ "use strict";
2
+ // Generated Zod schemas: MeteredFeature
3
+ // Actions: create
4
+ // Do not edit manually – regenerate via sdk-generator
5
+ Object.defineProperty(exports, "__esModule", { value: true });
6
+ exports.CreateMeteredFeatureBodySchema = void 0;
7
+ const zod_1 = require("zod");
8
+ //MeteredFeature.create
9
+ const CreateMeteredFeatureColumnDefinitionsSchema = zod_1.z.object({
10
+ column_name: zod_1.z.array(zod_1.z.string().max(100).optional()),
11
+ data_type: zod_1.z.array(zod_1.z.enum(['number', 'string']).optional()),
12
+ });
13
+ const CreateMeteredFeatureBodySchema = zod_1.z.looseObject({
14
+ name: zod_1.z.string().max(50),
15
+ description: zod_1.z.string().max(250).optional(),
16
+ feature_unit: zod_1.z.string().max(50),
17
+ query: zod_1.z.string().max(500),
18
+ column_definitions: CreateMeteredFeatureColumnDefinitionsSchema.optional(),
19
+ });
20
+ exports.CreateMeteredFeatureBodySchema = CreateMeteredFeatureBodySchema;
@@ -0,0 +1,28 @@
1
+ "use strict";
2
+ // Generated Zod schemas: NonSubscription
3
+ // Actions: processReceipt
4
+ // Do not edit manually – regenerate via sdk-generator
5
+ Object.defineProperty(exports, "__esModule", { value: true });
6
+ exports.ProcessReceiptNonSubscriptionBodySchema = void 0;
7
+ const zod_1 = require("zod");
8
+ //NonSubscription.processReceipt
9
+ const ProcessReceiptNonSubscriptionProductSchema = zod_1.z.object({
10
+ id: zod_1.z.string().max(96),
11
+ currency_code: zod_1.z.string().max(3),
12
+ price: zod_1.z.number().int().min(0),
13
+ type: zod_1.z.enum(['consumable', 'non_consumable', 'non_renewing_subscription']),
14
+ name: zod_1.z.string().max(96).optional(),
15
+ price_in_decimal: zod_1.z.string().max(39).optional(),
16
+ });
17
+ const ProcessReceiptNonSubscriptionCustomerSchema = zod_1.z.object({
18
+ id: zod_1.z.string().max(50).optional(),
19
+ email: zod_1.z.string().email().max(70).optional(),
20
+ first_name: zod_1.z.string().max(150).optional(),
21
+ last_name: zod_1.z.string().max(150).optional(),
22
+ });
23
+ const ProcessReceiptNonSubscriptionBodySchema = zod_1.z.looseObject({
24
+ receipt: zod_1.z.string().max(65000),
25
+ product: ProcessReceiptNonSubscriptionProductSchema.optional(),
26
+ customer: ProcessReceiptNonSubscriptionCustomerSchema.optional(),
27
+ });
28
+ exports.ProcessReceiptNonSubscriptionBodySchema = ProcessReceiptNonSubscriptionBodySchema;
@@ -0,0 +1,13 @@
1
+ "use strict";
2
+ // Generated Zod schemas: OfferEvent
3
+ // Actions: offerEvents
4
+ // Do not edit manually – regenerate via sdk-generator
5
+ Object.defineProperty(exports, "__esModule", { value: true });
6
+ exports.OfferEventsOfferEventBodySchema = void 0;
7
+ const zod_1 = require("zod");
8
+ //OfferEvent.offerEvents
9
+ const OfferEventsOfferEventBodySchema = zod_1.z.looseObject({
10
+ personalized_offer_id: zod_1.z.string().max(50),
11
+ type: zod_1.z.enum(['viewed', 'dismissed']),
12
+ });
13
+ exports.OfferEventsOfferEventBodySchema = OfferEventsOfferEventBodySchema;
@@ -0,0 +1,20 @@
1
+ "use strict";
2
+ // Generated Zod schemas: OfferFulfillment
3
+ // Actions: offerFulfillments, offerFulfillmentsUpdate
4
+ // Do not edit manually – regenerate via sdk-generator
5
+ Object.defineProperty(exports, "__esModule", { value: true });
6
+ exports.OfferFulfillmentsUpdateOfferFulfillmentBodySchema = exports.OfferFulfillmentsOfferFulfillmentBodySchema = void 0;
7
+ const zod_1 = require("zod");
8
+ //OfferFulfillment.offerFulfillments
9
+ const OfferFulfillmentsOfferFulfillmentBodySchema = zod_1.z.looseObject({
10
+ personalized_offer_id: zod_1.z.string().max(50),
11
+ option_id: zod_1.z.string().max(50),
12
+ });
13
+ exports.OfferFulfillmentsOfferFulfillmentBodySchema = OfferFulfillmentsOfferFulfillmentBodySchema;
14
+ //OfferFulfillment.offerFulfillmentsUpdate
15
+ const OfferFulfillmentsUpdateOfferFulfillmentBodySchema = zod_1.z.looseObject({
16
+ id: zod_1.z.string().max(50),
17
+ status: zod_1.z.enum(['completed', 'failed']),
18
+ failure_reason: zod_1.z.string().max(100).optional(),
19
+ });
20
+ exports.OfferFulfillmentsUpdateOfferFulfillmentBodySchema = OfferFulfillmentsUpdateOfferFulfillmentBodySchema;
@@ -0,0 +1,26 @@
1
+ "use strict";
2
+ // Generated Zod schemas: OmnichannelOneTimeOrder
3
+ // Actions: list
4
+ // Do not edit manually – regenerate via sdk-generator
5
+ Object.defineProperty(exports, "__esModule", { value: true });
6
+ exports.ListOmnichannelOneTimeOrderBodySchema = void 0;
7
+ const zod_1 = require("zod");
8
+ //OmnichannelOneTimeOrder.list
9
+ const ListOmnichannelOneTimeOrderSourceSchema = zod_1.z.object({
10
+ is: zod_1.z.enum(['apple_app_store', 'google_play_store']).optional(),
11
+ is_not: zod_1.z.enum(['apple_app_store', 'google_play_store']).optional(),
12
+ in: zod_1.z.enum(['apple_app_store', 'google_play_store']).optional(),
13
+ not_in: zod_1.z.enum(['apple_app_store', 'google_play_store']).optional(),
14
+ });
15
+ const ListOmnichannelOneTimeOrderCustomerIdSchema = zod_1.z.object({
16
+ is: zod_1.z.string().min(1).optional(),
17
+ is_not: zod_1.z.string().min(1).optional(),
18
+ starts_with: zod_1.z.string().min(1).optional(),
19
+ });
20
+ const ListOmnichannelOneTimeOrderBodySchema = zod_1.z.looseObject({
21
+ limit: zod_1.z.number().int().min(1).max(100).optional(),
22
+ offset: zod_1.z.string().max(1000).optional(),
23
+ source: ListOmnichannelOneTimeOrderSourceSchema.optional(),
24
+ customer_id: ListOmnichannelOneTimeOrderCustomerIdSchema.optional(),
25
+ });
26
+ exports.ListOmnichannelOneTimeOrderBodySchema = ListOmnichannelOneTimeOrderBodySchema;
@@ -0,0 +1,122 @@
1
+ "use strict";
2
+ // Generated Zod schemas: OmnichannelSubscription
3
+ // Actions: list, omnichannel_transactionsForOmnichannelSubscription, move
4
+ // Do not edit manually – regenerate via sdk-generator
5
+ Object.defineProperty(exports, "__esModule", { value: true });
6
+ exports.MoveOmnichannelSubscriptionBodySchema = exports.OmnichannelTransactionsforomnichannelsubscriptionOmnichannelSubscriptionBodySchema = exports.ListOmnichannelSubscriptionBodySchema = void 0;
7
+ const zod_1 = require("zod");
8
+ //OmnichannelSubscription.list
9
+ const ListOmnichannelSubscriptionSourceSchema = zod_1.z.object({
10
+ is: zod_1.z.enum(['apple_app_store', 'google_play_store']).optional(),
11
+ is_not: zod_1.z.enum(['apple_app_store', 'google_play_store']).optional(),
12
+ in: zod_1.z.enum(['apple_app_store', 'google_play_store']).optional(),
13
+ not_in: zod_1.z.enum(['apple_app_store', 'google_play_store']).optional(),
14
+ });
15
+ const ListOmnichannelSubscriptionCustomerIdSchema = zod_1.z.object({
16
+ is: zod_1.z.string().min(1).optional(),
17
+ is_not: zod_1.z.string().min(1).optional(),
18
+ starts_with: zod_1.z.string().min(1).optional(),
19
+ in: zod_1.z.string().regex(RegExp('^\\[(.*)(,.*)*\\]$')).optional(),
20
+ not_in: zod_1.z.string().regex(RegExp('^\\[(.*)(,.*)*\\]$')).optional(),
21
+ });
22
+ const ListOmnichannelSubscriptionIdSchema = zod_1.z.object({
23
+ is: zod_1.z.string().min(1).optional(),
24
+ is_not: zod_1.z.string().min(1).optional(),
25
+ starts_with: zod_1.z.string().min(1).optional(),
26
+ in: zod_1.z.string().regex(RegExp('^\\[(.*)(,.*)*\\]$')).optional(),
27
+ not_in: zod_1.z.string().regex(RegExp('^\\[(.*)(,.*)*\\]$')).optional(),
28
+ });
29
+ const ListOmnichannelSubscriptionIdAtSourceSchema = zod_1.z.object({
30
+ is: zod_1.z.string().min(1).optional(),
31
+ is_not: zod_1.z.string().min(1).optional(),
32
+ starts_with: zod_1.z.string().min(1).optional(),
33
+ in: zod_1.z.string().regex(RegExp('^\\[(.*)(,.*)*\\]$')).optional(),
34
+ not_in: zod_1.z.string().regex(RegExp('^\\[(.*)(,.*)*\\]$')).optional(),
35
+ });
36
+ const ListOmnichannelSubscriptionUpdatedAtSchema = zod_1.z.object({
37
+ after: zod_1.z.string().regex(RegExp('^\\d{10}$')).optional(),
38
+ before: zod_1.z.string().regex(RegExp('^\\d{10}$')).optional(),
39
+ });
40
+ const ListOmnichannelSubscriptionPurchasedAtSchema = zod_1.z.object({
41
+ after: zod_1.z.string().regex(RegExp('^\\d{10}$')).optional(),
42
+ before: zod_1.z.string().regex(RegExp('^\\d{10}$')).optional(),
43
+ });
44
+ const ListOmnichannelSubscriptionSortBySchema = zod_1.z.looseObject({
45
+ asc: zod_1.z.enum(['created_at', 'updated_at']).optional(),
46
+ desc: zod_1.z.enum(['created_at', 'updated_at']).optional(),
47
+ });
48
+ const ListOmnichannelSubscriptionStatusSchema = zod_1.z.object({
49
+ is: zod_1.z
50
+ .enum([
51
+ 'active',
52
+ 'expired',
53
+ 'cancelled',
54
+ 'in_dunning',
55
+ 'in_grace_period',
56
+ 'paused',
57
+ ])
58
+ .optional(),
59
+ is_not: zod_1.z
60
+ .enum([
61
+ 'active',
62
+ 'expired',
63
+ 'cancelled',
64
+ 'in_dunning',
65
+ 'in_grace_period',
66
+ 'paused',
67
+ ])
68
+ .optional(),
69
+ in: zod_1.z
70
+ .enum([
71
+ 'active',
72
+ 'expired',
73
+ 'cancelled',
74
+ 'in_dunning',
75
+ 'in_grace_period',
76
+ 'paused',
77
+ ])
78
+ .optional(),
79
+ not_in: zod_1.z
80
+ .enum([
81
+ 'active',
82
+ 'expired',
83
+ 'cancelled',
84
+ 'in_dunning',
85
+ 'in_grace_period',
86
+ 'paused',
87
+ ])
88
+ .optional(),
89
+ });
90
+ const ListOmnichannelSubscriptionItemIdAtSourceSchema = zod_1.z.object({
91
+ is: zod_1.z.string().min(1).optional(),
92
+ is_not: zod_1.z.string().min(1).optional(),
93
+ starts_with: zod_1.z.string().min(1).optional(),
94
+ });
95
+ const ListOmnichannelSubscriptionOmnichannelSubscriptionItemSchema = zod_1.z.object({
96
+ status: ListOmnichannelSubscriptionStatusSchema.optional(),
97
+ item_id_at_source: ListOmnichannelSubscriptionItemIdAtSourceSchema.optional(),
98
+ });
99
+ const ListOmnichannelSubscriptionBodySchema = zod_1.z.looseObject({
100
+ limit: zod_1.z.number().int().min(1).max(100).optional(),
101
+ offset: zod_1.z.string().max(1000).optional(),
102
+ source: ListOmnichannelSubscriptionSourceSchema.optional(),
103
+ customer_id: ListOmnichannelSubscriptionCustomerIdSchema.optional(),
104
+ id: ListOmnichannelSubscriptionIdSchema.optional(),
105
+ id_at_source: ListOmnichannelSubscriptionIdAtSourceSchema.optional(),
106
+ updated_at: ListOmnichannelSubscriptionUpdatedAtSchema.optional(),
107
+ purchased_at: ListOmnichannelSubscriptionPurchasedAtSchema.optional(),
108
+ sort_by: ListOmnichannelSubscriptionSortBySchema.optional(),
109
+ omnichannel_subscription_item: ListOmnichannelSubscriptionOmnichannelSubscriptionItemSchema.optional(),
110
+ });
111
+ exports.ListOmnichannelSubscriptionBodySchema = ListOmnichannelSubscriptionBodySchema;
112
+ //OmnichannelSubscription.omnichannel_transactionsForOmnichannelSubscription
113
+ const OmnichannelTransactionsforomnichannelsubscriptionOmnichannelSubscriptionBodySchema = zod_1.z.looseObject({
114
+ limit: zod_1.z.number().int().min(1).max(100).optional(),
115
+ offset: zod_1.z.string().max(1000).optional(),
116
+ });
117
+ exports.OmnichannelTransactionsforomnichannelsubscriptionOmnichannelSubscriptionBodySchema = OmnichannelTransactionsforomnichannelsubscriptionOmnichannelSubscriptionBodySchema;
118
+ //OmnichannelSubscription.move
119
+ const MoveOmnichannelSubscriptionBodySchema = zod_1.z.looseObject({
120
+ to_customer_id: zod_1.z.string().max(50),
121
+ });
122
+ exports.MoveOmnichannelSubscriptionBodySchema = MoveOmnichannelSubscriptionBodySchema;
@@ -0,0 +1,13 @@
1
+ "use strict";
2
+ // Generated Zod schemas: OmnichannelSubscriptionItem
3
+ // Actions: listOmniSubItemScheduleChanges
4
+ // Do not edit manually – regenerate via sdk-generator
5
+ Object.defineProperty(exports, "__esModule", { value: true });
6
+ exports.ListOmniSubItemScheduleChangesOmnichannelSubscriptionItemBodySchema = void 0;
7
+ const zod_1 = require("zod");
8
+ //OmnichannelSubscriptionItem.listOmniSubItemScheduleChanges
9
+ const ListOmniSubItemScheduleChangesOmnichannelSubscriptionItemBodySchema = zod_1.z.looseObject({
10
+ limit: zod_1.z.number().int().min(1).max(100).optional(),
11
+ offset: zod_1.z.string().max(1000).optional(),
12
+ });
13
+ exports.ListOmniSubItemScheduleChangesOmnichannelSubscriptionItemBodySchema = ListOmniSubItemScheduleChangesOmnichannelSubscriptionItemBodySchema;