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