chargebee 3.25.0-beta.1 → 3.25.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 (166) hide show
  1. package/CHANGELOG.md +66 -4
  2. package/README.md +0 -39
  3. package/cjs/RequestWrapper.js +1 -28
  4. package/cjs/chargebee.cjs.js +0 -3
  5. package/cjs/chargebee.cjs.worker.js +0 -2
  6. package/cjs/createChargebee.js +0 -5
  7. package/cjs/environment.js +1 -1
  8. package/cjs/resources/api_endpoints.js +1 -2
  9. package/cjs/resources/webhook/eventType.js +2 -0
  10. package/esm/RequestWrapper.js +1 -28
  11. package/esm/chargebee.esm.js +0 -2
  12. package/esm/chargebee.esm.worker.js +0 -1
  13. package/esm/createChargebee.js +0 -5
  14. package/esm/environment.js +1 -1
  15. package/esm/resources/api_endpoints.js +1 -2
  16. package/esm/resources/webhook/eventType.js +2 -0
  17. package/package.json +1 -4
  18. package/types/core.d.ts +23 -6
  19. package/types/index.d.ts +0 -17
  20. package/types/resources/Content.d.ts +0 -1
  21. package/types/resources/Customer.d.ts +14 -4
  22. package/types/resources/Estimate.d.ts +14 -4
  23. package/types/resources/Event.d.ts +2 -0
  24. package/types/resources/Gift.d.ts +23 -6
  25. package/types/resources/HostedPage.d.ts +1 -0
  26. package/types/resources/Invoice.d.ts +14 -5
  27. package/types/resources/OmnichannelSubscription.d.ts +6 -0
  28. package/types/resources/OmnichannelSubscriptionItem.d.ts +1 -0
  29. package/types/resources/PaymentIntent.d.ts +35 -10
  30. package/types/resources/PaymentSource.d.ts +7 -2
  31. package/types/resources/Purchase.d.ts +7 -2
  32. package/types/resources/Subscription.d.ts +49 -14
  33. package/types/resources/WebhookEvent.d.ts +22 -4
  34. package/cjs/chargebeeZodValidationError.js +0 -18
  35. package/cjs/schema/addon.schema.js +0 -153
  36. package/cjs/schema/address.schema.js +0 -35
  37. package/cjs/schema/alert.schema.js +0 -38
  38. package/cjs/schema/attached_item.schema.js +0 -58
  39. package/cjs/schema/business_entity.schema.js +0 -46
  40. package/cjs/schema/card.schema.js +0 -165
  41. package/cjs/schema/comment.schema.js +0 -69
  42. package/cjs/schema/coupon.schema.js +0 -209
  43. package/cjs/schema/coupon_code.schema.js +0 -14
  44. package/cjs/schema/coupon_set.schema.js +0 -28
  45. package/cjs/schema/credit_note.schema.js +0 -288
  46. package/cjs/schema/currency.schema.js +0 -32
  47. package/cjs/schema/customer.schema.js +0 -986
  48. package/cjs/schema/customer_entitlement.schema.js +0 -14
  49. package/cjs/schema/differential_price.schema.js +0 -68
  50. package/cjs/schema/entitlement.schema.js +0 -27
  51. package/cjs/schema/entitlement_override.schema.js +0 -33
  52. package/cjs/schema/estimate.schema.js +0 -1525
  53. package/cjs/schema/export.schema.js +0 -1545
  54. package/cjs/schema/feature.schema.js +0 -37
  55. package/cjs/schema/gift.schema.js +0 -277
  56. package/cjs/schema/hosted_page.schema.js +0 -1649
  57. package/cjs/schema/in_app_subscription.schema.js +0 -68
  58. package/cjs/schema/index.js +0 -80
  59. package/cjs/schema/invoice.schema.js +0 -1467
  60. package/cjs/schema/item.schema.js +0 -91
  61. package/cjs/schema/item_entitlement.schema.js +0 -45
  62. package/cjs/schema/item_family.schema.js +0 -21
  63. package/cjs/schema/item_price.schema.js +0 -190
  64. package/cjs/schema/non_subscription.schema.js +0 -28
  65. package/cjs/schema/offer_event.schema.js +0 -13
  66. package/cjs/schema/offer_fulfillment.schema.js +0 -20
  67. package/cjs/schema/omnichannel_one_time_order.schema.js +0 -26
  68. package/cjs/schema/omnichannel_subscription.schema.js +0 -89
  69. package/cjs/schema/omnichannel_subscription_item.schema.js +0 -13
  70. package/cjs/schema/order.schema.js +0 -273
  71. package/cjs/schema/payment_intent.schema.js +0 -117
  72. package/cjs/schema/payment_schedule_scheme.schema.js +0 -20
  73. package/cjs/schema/payment_source.schema.js +0 -358
  74. package/cjs/schema/payment_voucher.schema.js +0 -57
  75. package/cjs/schema/personalized_offer.schema.js +0 -28
  76. package/cjs/schema/plan.schema.js +0 -225
  77. package/cjs/schema/portal_session.schema.js +0 -22
  78. package/cjs/schema/price_variant.schema.js +0 -36
  79. package/cjs/schema/pricing_page_session.schema.js +0 -135
  80. package/cjs/schema/promotional_credit.schema.js +0 -78
  81. package/cjs/schema/purchase.schema.js +0 -272
  82. package/cjs/schema/quote.schema.js +0 -1557
  83. package/cjs/schema/ramp.schema.js +0 -209
  84. package/cjs/schema/recorded_purchase.schema.js +0 -32
  85. package/cjs/schema/resource_migration.schema.js +0 -14
  86. package/cjs/schema/site_migration_detail.schema.js +0 -81
  87. package/cjs/schema/subscription.schema.js +0 -2993
  88. package/cjs/schema/subscription_entitlement.schema.js +0 -25
  89. package/cjs/schema/time_machine.schema.js +0 -17
  90. package/cjs/schema/transaction.schema.js +0 -70
  91. package/cjs/schema/unbilled_charge.schema.js +0 -113
  92. package/cjs/schema/usage.schema.js +0 -93
  93. package/cjs/schema/usage_charge.schema.js +0 -17
  94. package/cjs/schema/usage_event.schema.js +0 -28
  95. package/cjs/schema/usage_file.schema.js +0 -13
  96. package/cjs/schema/usage_summary.schema.js +0 -17
  97. package/cjs/schema/virtual_bank_account.schema.js +0 -43
  98. package/cjs/schema/webhook_endpoint.schema.js +0 -504
  99. package/cjs/validationLoader.js +0 -59
  100. package/esm/chargebeeZodValidationError.js +0 -14
  101. package/esm/schema/addon.schema.js +0 -150
  102. package/esm/schema/address.schema.js +0 -32
  103. package/esm/schema/alert.schema.js +0 -35
  104. package/esm/schema/attached_item.schema.js +0 -55
  105. package/esm/schema/business_entity.schema.js +0 -43
  106. package/esm/schema/card.schema.js +0 -162
  107. package/esm/schema/comment.schema.js +0 -66
  108. package/esm/schema/coupon.schema.js +0 -206
  109. package/esm/schema/coupon_code.schema.js +0 -11
  110. package/esm/schema/coupon_set.schema.js +0 -25
  111. package/esm/schema/credit_note.schema.js +0 -285
  112. package/esm/schema/currency.schema.js +0 -29
  113. package/esm/schema/customer.schema.js +0 -983
  114. package/esm/schema/customer_entitlement.schema.js +0 -11
  115. package/esm/schema/differential_price.schema.js +0 -65
  116. package/esm/schema/entitlement.schema.js +0 -24
  117. package/esm/schema/entitlement_override.schema.js +0 -30
  118. package/esm/schema/estimate.schema.js +0 -1522
  119. package/esm/schema/export.schema.js +0 -1542
  120. package/esm/schema/feature.schema.js +0 -34
  121. package/esm/schema/gift.schema.js +0 -274
  122. package/esm/schema/hosted_page.schema.js +0 -1646
  123. package/esm/schema/in_app_subscription.schema.js +0 -65
  124. package/esm/schema/index.js +0 -64
  125. package/esm/schema/invoice.schema.js +0 -1464
  126. package/esm/schema/item.schema.js +0 -88
  127. package/esm/schema/item_entitlement.schema.js +0 -42
  128. package/esm/schema/item_family.schema.js +0 -18
  129. package/esm/schema/item_price.schema.js +0 -187
  130. package/esm/schema/non_subscription.schema.js +0 -25
  131. package/esm/schema/offer_event.schema.js +0 -10
  132. package/esm/schema/offer_fulfillment.schema.js +0 -17
  133. package/esm/schema/omnichannel_one_time_order.schema.js +0 -23
  134. package/esm/schema/omnichannel_subscription.schema.js +0 -86
  135. package/esm/schema/omnichannel_subscription_item.schema.js +0 -10
  136. package/esm/schema/order.schema.js +0 -270
  137. package/esm/schema/payment_intent.schema.js +0 -114
  138. package/esm/schema/payment_schedule_scheme.schema.js +0 -17
  139. package/esm/schema/payment_source.schema.js +0 -355
  140. package/esm/schema/payment_voucher.schema.js +0 -54
  141. package/esm/schema/personalized_offer.schema.js +0 -25
  142. package/esm/schema/plan.schema.js +0 -222
  143. package/esm/schema/portal_session.schema.js +0 -19
  144. package/esm/schema/price_variant.schema.js +0 -33
  145. package/esm/schema/pricing_page_session.schema.js +0 -132
  146. package/esm/schema/promotional_credit.schema.js +0 -75
  147. package/esm/schema/purchase.schema.js +0 -269
  148. package/esm/schema/quote.schema.js +0 -1554
  149. package/esm/schema/ramp.schema.js +0 -206
  150. package/esm/schema/recorded_purchase.schema.js +0 -29
  151. package/esm/schema/resource_migration.schema.js +0 -11
  152. package/esm/schema/site_migration_detail.schema.js +0 -78
  153. package/esm/schema/subscription.schema.js +0 -2990
  154. package/esm/schema/subscription_entitlement.schema.js +0 -22
  155. package/esm/schema/time_machine.schema.js +0 -14
  156. package/esm/schema/transaction.schema.js +0 -67
  157. package/esm/schema/unbilled_charge.schema.js +0 -110
  158. package/esm/schema/usage.schema.js +0 -90
  159. package/esm/schema/usage_charge.schema.js +0 -14
  160. package/esm/schema/usage_event.schema.js +0 -25
  161. package/esm/schema/usage_file.schema.js +0 -10
  162. package/esm/schema/usage_summary.schema.js +0 -14
  163. package/esm/schema/virtual_bank_account.schema.js +0 -40
  164. package/esm/schema/webhook_endpoint.schema.js +0 -501
  165. package/esm/validationLoader.js +0 -56
  166. package/types/resources/QuoteEntitlement.d.ts +0 -16
@@ -1,88 +0,0 @@
1
- // Generated Zod schemas: Item
2
- // Actions: create, update
3
- // Do not edit manually – regenerate via sdk-generator
4
- import { z } from 'zod';
5
- //Item.create
6
- const CreateItemMetadataSchema = z.looseObject({});
7
- const CreateItemBundleConfigurationSchema = z.object({
8
- type: z.enum(['fixed']).optional(),
9
- });
10
- const CreateItemBundleItemsToAddSchema = z.object({
11
- item_id: z.array(z.string().max(100).optional()).optional(),
12
- item_type: z.array(z.enum(['plan', 'addon', 'charge']).optional()).optional(),
13
- quantity: z.array(z.number().int().min(1).optional()).optional(),
14
- price_allocation: z.array(z.number().min(0).max(100).optional()).optional(),
15
- });
16
- const CreateItemBodySchema = z.looseObject({
17
- id: z.string().max(100),
18
- name: z.string().max(100),
19
- type: z.enum(['plan', 'addon', 'charge']),
20
- description: z.string().max(2000).optional(),
21
- item_family_id: z.string().max(100),
22
- is_giftable: z.boolean().default(false).optional(),
23
- is_shippable: z.boolean().default(false).optional(),
24
- external_name: z.string().max(100).optional(),
25
- enabled_in_portal: z.boolean().default(true).optional(),
26
- redirect_url: z.string().max(500).optional(),
27
- enabled_for_checkout: z.boolean().default(true).optional(),
28
- item_applicability: z.enum(['all', 'restricted']).optional(),
29
- applicable_items: z.array(z.string().max(100).optional()).optional(),
30
- unit: z.string().max(30).optional(),
31
- gift_claim_redirect_url: z.string().max(500).optional(),
32
- included_in_mrr: z.boolean().optional(),
33
- metered: z.boolean().default(false).optional(),
34
- usage_calculation: z
35
- .enum(['sum_of_usages', 'last_usage', 'max_usage'])
36
- .optional(),
37
- is_percentage_pricing: z.boolean().default(false).optional(),
38
- metadata: CreateItemMetadataSchema.optional(),
39
- business_entity_id: z.string().max(50).optional(),
40
- bundle_configuration: CreateItemBundleConfigurationSchema.optional(),
41
- bundle_items_to_add: CreateItemBundleItemsToAddSchema.optional(),
42
- });
43
- export { CreateItemBodySchema };
44
- //Item.update
45
- const UpdateItemMetadataSchema = z.looseObject({});
46
- const UpdateItemBundleConfigurationSchema = z.object({
47
- type: z.enum(['fixed']).optional(),
48
- });
49
- const UpdateItemBundleItemsToAddSchema = z.object({
50
- item_id: z.array(z.string().max(100).optional()).optional(),
51
- item_type: z.array(z.enum(['plan', 'addon', 'charge']).optional()).optional(),
52
- quantity: z.array(z.number().int().min(1).optional()).optional(),
53
- price_allocation: z.array(z.number().min(0).max(100).optional()).optional(),
54
- });
55
- const UpdateItemBundleItemsToUpdateSchema = z.object({
56
- item_id: z.array(z.string().max(100).optional()).optional(),
57
- item_type: z.array(z.enum(['plan', 'addon', 'charge']).optional()).optional(),
58
- quantity: z.array(z.number().int().min(1).optional()).optional(),
59
- price_allocation: z.array(z.number().min(0).max(100).optional()).optional(),
60
- });
61
- const UpdateItemBundleItemsToRemoveSchema = z.object({
62
- item_id: z.array(z.string().max(100).optional()).optional(),
63
- item_type: z.array(z.enum(['plan', 'addon', 'charge']).optional()).optional(),
64
- });
65
- const UpdateItemBodySchema = z.looseObject({
66
- name: z.string().max(100).optional(),
67
- description: z.string().max(2000).optional(),
68
- is_shippable: z.boolean().default(false).optional(),
69
- external_name: z.string().max(100).optional(),
70
- item_family_id: z.string().max(100).optional(),
71
- enabled_in_portal: z.boolean().default(true).optional(),
72
- redirect_url: z.string().max(500).optional(),
73
- enabled_for_checkout: z.boolean().default(true).optional(),
74
- item_applicability: z.enum(['all', 'restricted']).optional(),
75
- clear_applicable_items: z.boolean().default(false).optional(),
76
- applicable_items: z.array(z.string().max(100).optional()).optional(),
77
- unit: z.string().max(30).optional(),
78
- gift_claim_redirect_url: z.string().max(500).optional(),
79
- metadata: UpdateItemMetadataSchema.optional(),
80
- included_in_mrr: z.boolean().optional(),
81
- status: z.enum(['active', 'archived']).optional(),
82
- is_percentage_pricing: z.boolean().default(false).optional(),
83
- bundle_configuration: UpdateItemBundleConfigurationSchema.optional(),
84
- bundle_items_to_add: UpdateItemBundleItemsToAddSchema.optional(),
85
- bundle_items_to_update: UpdateItemBundleItemsToUpdateSchema.optional(),
86
- bundle_items_to_remove: UpdateItemBundleItemsToRemoveSchema.optional(),
87
- });
88
- export { UpdateItemBodySchema };
@@ -1,42 +0,0 @@
1
- // Generated Zod schemas: ItemEntitlement
2
- // Actions: itemEntitlementsForItem, itemEntitlementsForFeature, addItemEntitlements, upsertOrRemoveItemEntitlementsForItem
3
- // Do not edit manually – regenerate via sdk-generator
4
- import { z } from 'zod';
5
- //ItemEntitlement.itemEntitlementsForItem
6
- const ItemEntitlementsForItemItemEntitlementBodySchema = z.looseObject({
7
- limit: z.number().int().min(1).max(100).optional(),
8
- offset: z.string().max(1000).optional(),
9
- include_drafts: z.boolean().default(false).optional(),
10
- embed: z.string().max(1000).optional(),
11
- });
12
- export { ItemEntitlementsForItemItemEntitlementBodySchema };
13
- //ItemEntitlement.itemEntitlementsForFeature
14
- const ItemEntitlementsForFeatureItemEntitlementBodySchema = z.looseObject({
15
- limit: z.number().int().min(1).max(100).optional(),
16
- offset: z.string().max(1000).optional(),
17
- include_drafts: z.boolean().default(false).optional(),
18
- });
19
- export { ItemEntitlementsForFeatureItemEntitlementBodySchema };
20
- //ItemEntitlement.addItemEntitlements
21
- const AddItemEntitlementsItemEntitlementItemEntitlementsSchema = z.object({
22
- item_id: z.array(z.string().max(100).optional()),
23
- item_type: z
24
- .array(z.enum(['plan', 'addon', 'charge', 'subscription', 'item']).optional())
25
- .optional(),
26
- value: z.array(z.string().max(50).optional()).optional(),
27
- });
28
- const AddItemEntitlementsItemEntitlementBodySchema = z.looseObject({
29
- action: z.enum(['upsert', 'remove']),
30
- item_entitlements: AddItemEntitlementsItemEntitlementItemEntitlementsSchema.optional(),
31
- });
32
- export { AddItemEntitlementsItemEntitlementBodySchema };
33
- //ItemEntitlement.upsertOrRemoveItemEntitlementsForItem
34
- const UpsertOrRemoveItemEntitlementsForItemItemEntitlementItemEntitlementsSchema = z.object({
35
- feature_id: z.array(z.string().max(50).optional()),
36
- value: z.array(z.string().max(50).optional()).optional(),
37
- });
38
- const UpsertOrRemoveItemEntitlementsForItemItemEntitlementBodySchema = z.looseObject({
39
- action: z.enum(['upsert', 'remove']),
40
- item_entitlements: UpsertOrRemoveItemEntitlementsForItemItemEntitlementItemEntitlementsSchema.optional(),
41
- });
42
- export { UpsertOrRemoveItemEntitlementsForItemItemEntitlementBodySchema };
@@ -1,18 +0,0 @@
1
- // Generated Zod schemas: ItemFamily
2
- // Actions: create, update
3
- // Do not edit manually – regenerate via sdk-generator
4
- import { z } from 'zod';
5
- //ItemFamily.create
6
- const CreateItemFamilyBodySchema = z.looseObject({
7
- id: z.string().max(50),
8
- name: z.string().max(50),
9
- description: z.string().max(500).optional(),
10
- business_entity_id: z.string().max(50).optional(),
11
- });
12
- export { CreateItemFamilyBodySchema };
13
- //ItemFamily.update
14
- const UpdateItemFamilyBodySchema = z.looseObject({
15
- name: z.string().max(50).optional(),
16
- description: z.string().max(500).optional(),
17
- });
18
- export { UpdateItemFamilyBodySchema };
@@ -1,187 +0,0 @@
1
- // Generated Zod schemas: ItemPrice
2
- // Actions: create, update, findApplicableItems, findApplicableItemPrices
3
- // Do not edit manually – regenerate via sdk-generator
4
- import { z } from 'zod';
5
- //ItemPrice.create
6
- const CreateItemPriceMetadataSchema = z.looseObject({});
7
- const CreateItemPriceTaxDetailSchema = z.object({
8
- tax_profile_id: z.string().max(50).optional(),
9
- avalara_tax_code: z.string().max(50).optional(),
10
- hsn_code: z.string().max(50).optional(),
11
- avalara_sale_type: z
12
- .enum(['wholesale', 'retail', 'consumed', 'vendor_use'])
13
- .optional(),
14
- avalara_transaction_type: z.number().int().optional(),
15
- avalara_service_type: z.number().int().optional(),
16
- taxjar_product_code: z.string().max(50).optional(),
17
- });
18
- const CreateItemPriceAccountingDetailSchema = z.object({
19
- sku: z.string().max(100).optional(),
20
- accounting_code: z.string().max(100).optional(),
21
- accounting_category1: z.string().max(100).optional(),
22
- accounting_category2: z.string().max(100).optional(),
23
- accounting_category3: z.string().max(100).optional(),
24
- accounting_category4: z.string().max(100).optional(),
25
- });
26
- const CreateItemPriceTiersSchema = z.object({
27
- starting_unit: z.array(z.number().int().min(1).optional()).optional(),
28
- ending_unit: z.array(z.number().int().optional()).optional(),
29
- price: z.array(z.number().int().min(0).optional()).optional(),
30
- starting_unit_in_decimal: z.array(z.string().max(33).optional()).optional(),
31
- ending_unit_in_decimal: z.array(z.string().max(33).optional()).optional(),
32
- price_in_decimal: z.array(z.string().max(39).optional()).optional(),
33
- pricing_type: z
34
- .array(z.enum(['per_unit', 'flat_fee', 'package']).optional())
35
- .optional(),
36
- package_size: z.array(z.number().int().min(1).optional()).optional(),
37
- });
38
- const CreateItemPriceTaxProvidersFieldsSchema = z.object({
39
- provider_name: z.array(z.string().max(50).optional()),
40
- field_id: z.array(z.string().max(50).optional()),
41
- field_value: z.array(z.string().max(50).optional()),
42
- });
43
- const CreateItemPriceBodySchema = z.looseObject({
44
- id: z.string().max(100),
45
- name: z.string().max(100),
46
- description: z.string().max(2000).optional(),
47
- item_id: z.string().max(100),
48
- invoice_notes: z.string().max(2000).optional(),
49
- proration_type: z
50
- .enum(['site_default', 'partial_term', 'full_term'])
51
- .optional(),
52
- external_name: z.string().max(100).optional(),
53
- currency_code: z.string().max(3).optional(),
54
- price_variant_id: z.string().max(100).optional(),
55
- is_taxable: z.boolean().default(true).optional(),
56
- free_quantity: z.number().int().min(0).optional(),
57
- free_quantity_in_decimal: z.string().max(33).optional(),
58
- metadata: CreateItemPriceMetadataSchema.optional(),
59
- show_description_in_invoices: z.boolean().default(false).optional(),
60
- show_description_in_quotes: z.boolean().default(false).optional(),
61
- usage_accumulation_reset_frequency: z
62
- .enum(['never', 'subscription_billing_frequency'])
63
- .optional(),
64
- business_entity_id: z.string().max(50).optional(),
65
- pricing_model: z
66
- .enum(['flat_fee', 'per_unit', 'tiered', 'volume', 'stairstep'])
67
- .optional(),
68
- price: z.number().int().min(0).optional(),
69
- price_in_decimal: z.string().max(39).optional(),
70
- period_unit: z.enum(['day', 'week', 'month', 'year']).optional(),
71
- period: z.number().int().min(1).optional(),
72
- trial_period_unit: z.enum(['day', 'month']).optional(),
73
- trial_period: z.number().int().min(0).optional(),
74
- shipping_period: z.number().int().min(1).optional(),
75
- shipping_period_unit: z.enum(['day', 'week', 'month', 'year']).optional(),
76
- billing_cycles: z.number().int().min(1).optional(),
77
- trial_end_action: z
78
- .enum(['site_default', 'activate_subscription', 'cancel_subscription'])
79
- .optional(),
80
- tax_detail: CreateItemPriceTaxDetailSchema.optional(),
81
- accounting_detail: CreateItemPriceAccountingDetailSchema.optional(),
82
- tiers: CreateItemPriceTiersSchema.optional(),
83
- tax_providers_fields: CreateItemPriceTaxProvidersFieldsSchema.optional(),
84
- });
85
- export { CreateItemPriceBodySchema };
86
- //ItemPrice.update
87
- const UpdateItemPriceMetadataSchema = z.looseObject({});
88
- const UpdateItemPriceTaxDetailSchema = z.object({
89
- tax_profile_id: z.string().max(50).optional(),
90
- avalara_tax_code: z.string().max(50).optional(),
91
- hsn_code: z.string().max(50).optional(),
92
- avalara_sale_type: z
93
- .enum(['wholesale', 'retail', 'consumed', 'vendor_use'])
94
- .optional(),
95
- avalara_transaction_type: z.number().int().optional(),
96
- avalara_service_type: z.number().int().optional(),
97
- taxjar_product_code: z.string().max(50).optional(),
98
- });
99
- const UpdateItemPriceAccountingDetailSchema = z.object({
100
- sku: z.string().max(100).optional(),
101
- accounting_code: z.string().max(100).optional(),
102
- accounting_category1: z.string().max(100).optional(),
103
- accounting_category2: z.string().max(100).optional(),
104
- accounting_category3: z.string().max(100).optional(),
105
- accounting_category4: z.string().max(100).optional(),
106
- });
107
- const UpdateItemPriceTiersSchema = z.object({
108
- starting_unit: z.array(z.number().int().min(1).optional()).optional(),
109
- ending_unit: z.array(z.number().int().optional()).optional(),
110
- price: z.array(z.number().int().min(0).optional()).optional(),
111
- starting_unit_in_decimal: z.array(z.string().max(33).optional()).optional(),
112
- ending_unit_in_decimal: z.array(z.string().max(33).optional()).optional(),
113
- price_in_decimal: z.array(z.string().max(39).optional()).optional(),
114
- pricing_type: z
115
- .array(z.enum(['per_unit', 'flat_fee', 'package']).optional())
116
- .optional(),
117
- package_size: z.array(z.number().int().min(1).optional()).optional(),
118
- });
119
- const UpdateItemPriceTaxProvidersFieldsSchema = z.object({
120
- provider_name: z.array(z.string().max(50).optional()),
121
- field_id: z.array(z.string().max(50).optional()),
122
- field_value: z.array(z.string().max(50).optional()),
123
- });
124
- const UpdateItemPriceBodySchema = z.looseObject({
125
- name: z.string().max(100).optional(),
126
- description: z.string().max(2000).optional(),
127
- proration_type: z
128
- .enum(['site_default', 'partial_term', 'full_term'])
129
- .optional(),
130
- price_variant_id: z.string().max(100).optional(),
131
- status: z.enum(['active', 'archived']).optional(),
132
- external_name: z.string().max(100).optional(),
133
- usage_accumulation_reset_frequency: z
134
- .enum(['never', 'subscription_billing_frequency'])
135
- .optional(),
136
- currency_code: z.string().max(3).optional(),
137
- invoice_notes: z.string().max(2000).optional(),
138
- is_taxable: z.boolean().default(true).optional(),
139
- free_quantity: z.number().int().min(0).optional(),
140
- free_quantity_in_decimal: z.string().max(33).optional(),
141
- metadata: UpdateItemPriceMetadataSchema.optional(),
142
- pricing_model: z
143
- .enum(['flat_fee', 'per_unit', 'tiered', 'volume', 'stairstep'])
144
- .optional(),
145
- price: z.number().int().min(0).optional(),
146
- price_in_decimal: z.string().max(39).optional(),
147
- period_unit: z.enum(['day', 'week', 'month', 'year']).optional(),
148
- period: z.number().int().min(1).optional(),
149
- trial_period_unit: z.enum(['day', 'month']).optional(),
150
- trial_period: z.number().int().min(0).optional(),
151
- shipping_period: z.number().int().min(1).optional(),
152
- shipping_period_unit: z.enum(['day', 'week', 'month', 'year']).optional(),
153
- billing_cycles: z.number().int().min(1).optional(),
154
- trial_end_action: z
155
- .enum(['site_default', 'activate_subscription', 'cancel_subscription'])
156
- .optional(),
157
- show_description_in_invoices: z.boolean().optional(),
158
- show_description_in_quotes: z.boolean().optional(),
159
- tax_detail: UpdateItemPriceTaxDetailSchema.optional(),
160
- accounting_detail: UpdateItemPriceAccountingDetailSchema.optional(),
161
- tiers: UpdateItemPriceTiersSchema.optional(),
162
- tax_providers_fields: UpdateItemPriceTaxProvidersFieldsSchema.optional(),
163
- });
164
- export { UpdateItemPriceBodySchema };
165
- //ItemPrice.findApplicableItems
166
- const FindApplicableItemsItemPriceSortBySchema = z.looseObject({
167
- asc: z.enum(['name', 'id', 'updated_at']).optional(),
168
- desc: z.enum(['name', 'id', 'updated_at']).optional(),
169
- });
170
- const FindApplicableItemsItemPriceBodySchema = z.looseObject({
171
- limit: z.number().int().min(1).max(100).optional(),
172
- offset: z.string().max(1000).optional(),
173
- sort_by: FindApplicableItemsItemPriceSortBySchema.optional(),
174
- });
175
- export { FindApplicableItemsItemPriceBodySchema };
176
- //ItemPrice.findApplicableItemPrices
177
- const FindApplicableItemPricesItemPriceSortBySchema = z.looseObject({
178
- asc: z.enum(['name', 'id', 'updated_at']).optional(),
179
- desc: z.enum(['name', 'id', 'updated_at']).optional(),
180
- });
181
- const FindApplicableItemPricesItemPriceBodySchema = z.looseObject({
182
- limit: z.number().int().min(1).max(100).optional(),
183
- offset: z.string().max(1000).optional(),
184
- item_id: z.string().max(100).optional(),
185
- sort_by: FindApplicableItemPricesItemPriceSortBySchema.optional(),
186
- });
187
- export { FindApplicableItemPricesItemPriceBodySchema };
@@ -1,25 +0,0 @@
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 };
@@ -1,10 +0,0 @@
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 };
@@ -1,17 +0,0 @@
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 };
@@ -1,23 +0,0 @@
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 };
@@ -1,86 +0,0 @@
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
- });
17
- const ListOmnichannelSubscriptionStatusSchema = z.object({
18
- is: z
19
- .enum([
20
- 'active',
21
- 'expired',
22
- 'cancelled',
23
- 'in_dunning',
24
- 'in_grace_period',
25
- 'paused',
26
- ])
27
- .optional(),
28
- is_not: z
29
- .enum([
30
- 'active',
31
- 'expired',
32
- 'cancelled',
33
- 'in_dunning',
34
- 'in_grace_period',
35
- 'paused',
36
- ])
37
- .optional(),
38
- in: z
39
- .enum([
40
- 'active',
41
- 'expired',
42
- 'cancelled',
43
- 'in_dunning',
44
- 'in_grace_period',
45
- 'paused',
46
- ])
47
- .optional(),
48
- not_in: z
49
- .enum([
50
- 'active',
51
- 'expired',
52
- 'cancelled',
53
- 'in_dunning',
54
- 'in_grace_period',
55
- 'paused',
56
- ])
57
- .optional(),
58
- });
59
- const ListOmnichannelSubscriptionItemIdAtSourceSchema = z.object({
60
- is: z.string().min(1).optional(),
61
- is_not: z.string().min(1).optional(),
62
- starts_with: z.string().min(1).optional(),
63
- });
64
- const ListOmnichannelSubscriptionOmnichannelSubscriptionItemSchema = z.object({
65
- status: ListOmnichannelSubscriptionStatusSchema.optional(),
66
- item_id_at_source: ListOmnichannelSubscriptionItemIdAtSourceSchema.optional(),
67
- });
68
- const ListOmnichannelSubscriptionBodySchema = z.looseObject({
69
- limit: z.number().int().min(1).max(100).optional(),
70
- offset: z.string().max(1000).optional(),
71
- source: ListOmnichannelSubscriptionSourceSchema.optional(),
72
- customer_id: ListOmnichannelSubscriptionCustomerIdSchema.optional(),
73
- omnichannel_subscription_item: ListOmnichannelSubscriptionOmnichannelSubscriptionItemSchema.optional(),
74
- });
75
- export { ListOmnichannelSubscriptionBodySchema };
76
- //OmnichannelSubscription.omnichannel_transactionsForOmnichannelSubscription
77
- const OmnichannelTransactionsforomnichannelsubscriptionOmnichannelSubscriptionBodySchema = z.looseObject({
78
- limit: z.number().int().min(1).max(100).optional(),
79
- offset: z.string().max(1000).optional(),
80
- });
81
- export { OmnichannelTransactionsforomnichannelsubscriptionOmnichannelSubscriptionBodySchema };
82
- //OmnichannelSubscription.move
83
- const MoveOmnichannelSubscriptionBodySchema = z.looseObject({
84
- to_customer_id: z.string().max(50),
85
- });
86
- export { MoveOmnichannelSubscriptionBodySchema };
@@ -1,10 +0,0 @@
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 };