chargebee 3.24.0 → 3.25.0-beta.1

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