chargebee 3.25.0-beta.1 → 3.26.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 (171) hide show
  1. package/CHANGELOG.md +103 -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 +121 -3
  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 +121 -3
  16. package/esm/resources/webhook/eventType.js +2 -0
  17. package/package.json +1 -4
  18. package/types/core.d.ts +24 -6
  19. package/types/index.d.ts +8 -17
  20. package/types/resources/Content.d.ts +4 -1
  21. package/types/resources/CreditNote.d.ts +1 -0
  22. package/types/resources/Customer.d.ts +14 -4
  23. package/types/resources/Estimate.d.ts +14 -4
  24. package/types/resources/Event.d.ts +2 -0
  25. package/types/resources/Gift.d.ts +23 -6
  26. package/types/resources/GrantBlock.d.ts +59 -0
  27. package/types/resources/HostedPage.d.ts +6 -1
  28. package/types/resources/Invoice.d.ts +14 -5
  29. package/types/resources/LedgerAccountBalance.d.ts +50 -0
  30. package/types/resources/LedgerOperation.d.ts +141 -0
  31. package/types/resources/OmnichannelSubscription.d.ts +8 -0
  32. package/types/resources/OmnichannelSubscriptionItem.d.ts +1 -0
  33. package/types/resources/PaymentIntent.d.ts +35 -10
  34. package/types/resources/PaymentSource.d.ts +7 -2
  35. package/types/resources/PromotionalGrant.d.ts +37 -0
  36. package/types/resources/Purchase.d.ts +7 -2
  37. package/types/resources/Subscription.d.ts +49 -14
  38. package/types/resources/WebhookEvent.d.ts +22 -4
  39. package/cjs/chargebeeZodValidationError.js +0 -18
  40. package/cjs/schema/addon.schema.js +0 -153
  41. package/cjs/schema/address.schema.js +0 -35
  42. package/cjs/schema/alert.schema.js +0 -38
  43. package/cjs/schema/attached_item.schema.js +0 -58
  44. package/cjs/schema/business_entity.schema.js +0 -46
  45. package/cjs/schema/card.schema.js +0 -165
  46. package/cjs/schema/comment.schema.js +0 -69
  47. package/cjs/schema/coupon.schema.js +0 -209
  48. package/cjs/schema/coupon_code.schema.js +0 -14
  49. package/cjs/schema/coupon_set.schema.js +0 -28
  50. package/cjs/schema/credit_note.schema.js +0 -288
  51. package/cjs/schema/currency.schema.js +0 -32
  52. package/cjs/schema/customer.schema.js +0 -986
  53. package/cjs/schema/customer_entitlement.schema.js +0 -14
  54. package/cjs/schema/differential_price.schema.js +0 -68
  55. package/cjs/schema/entitlement.schema.js +0 -27
  56. package/cjs/schema/entitlement_override.schema.js +0 -33
  57. package/cjs/schema/estimate.schema.js +0 -1525
  58. package/cjs/schema/export.schema.js +0 -1545
  59. package/cjs/schema/feature.schema.js +0 -37
  60. package/cjs/schema/gift.schema.js +0 -277
  61. package/cjs/schema/hosted_page.schema.js +0 -1649
  62. package/cjs/schema/in_app_subscription.schema.js +0 -68
  63. package/cjs/schema/index.js +0 -80
  64. package/cjs/schema/invoice.schema.js +0 -1467
  65. package/cjs/schema/item.schema.js +0 -91
  66. package/cjs/schema/item_entitlement.schema.js +0 -45
  67. package/cjs/schema/item_family.schema.js +0 -21
  68. package/cjs/schema/item_price.schema.js +0 -190
  69. package/cjs/schema/non_subscription.schema.js +0 -28
  70. package/cjs/schema/offer_event.schema.js +0 -13
  71. package/cjs/schema/offer_fulfillment.schema.js +0 -20
  72. package/cjs/schema/omnichannel_one_time_order.schema.js +0 -26
  73. package/cjs/schema/omnichannel_subscription.schema.js +0 -89
  74. package/cjs/schema/omnichannel_subscription_item.schema.js +0 -13
  75. package/cjs/schema/order.schema.js +0 -273
  76. package/cjs/schema/payment_intent.schema.js +0 -117
  77. package/cjs/schema/payment_schedule_scheme.schema.js +0 -20
  78. package/cjs/schema/payment_source.schema.js +0 -358
  79. package/cjs/schema/payment_voucher.schema.js +0 -57
  80. package/cjs/schema/personalized_offer.schema.js +0 -28
  81. package/cjs/schema/plan.schema.js +0 -225
  82. package/cjs/schema/portal_session.schema.js +0 -22
  83. package/cjs/schema/price_variant.schema.js +0 -36
  84. package/cjs/schema/pricing_page_session.schema.js +0 -135
  85. package/cjs/schema/promotional_credit.schema.js +0 -78
  86. package/cjs/schema/purchase.schema.js +0 -272
  87. package/cjs/schema/quote.schema.js +0 -1557
  88. package/cjs/schema/ramp.schema.js +0 -209
  89. package/cjs/schema/recorded_purchase.schema.js +0 -32
  90. package/cjs/schema/resource_migration.schema.js +0 -14
  91. package/cjs/schema/site_migration_detail.schema.js +0 -81
  92. package/cjs/schema/subscription.schema.js +0 -2993
  93. package/cjs/schema/subscription_entitlement.schema.js +0 -25
  94. package/cjs/schema/time_machine.schema.js +0 -17
  95. package/cjs/schema/transaction.schema.js +0 -70
  96. package/cjs/schema/unbilled_charge.schema.js +0 -113
  97. package/cjs/schema/usage.schema.js +0 -93
  98. package/cjs/schema/usage_charge.schema.js +0 -17
  99. package/cjs/schema/usage_event.schema.js +0 -28
  100. package/cjs/schema/usage_file.schema.js +0 -13
  101. package/cjs/schema/usage_summary.schema.js +0 -17
  102. package/cjs/schema/virtual_bank_account.schema.js +0 -43
  103. package/cjs/schema/webhook_endpoint.schema.js +0 -504
  104. package/cjs/validationLoader.js +0 -59
  105. package/esm/chargebeeZodValidationError.js +0 -14
  106. package/esm/schema/addon.schema.js +0 -150
  107. package/esm/schema/address.schema.js +0 -32
  108. package/esm/schema/alert.schema.js +0 -35
  109. package/esm/schema/attached_item.schema.js +0 -55
  110. package/esm/schema/business_entity.schema.js +0 -43
  111. package/esm/schema/card.schema.js +0 -162
  112. package/esm/schema/comment.schema.js +0 -66
  113. package/esm/schema/coupon.schema.js +0 -206
  114. package/esm/schema/coupon_code.schema.js +0 -11
  115. package/esm/schema/coupon_set.schema.js +0 -25
  116. package/esm/schema/credit_note.schema.js +0 -285
  117. package/esm/schema/currency.schema.js +0 -29
  118. package/esm/schema/customer.schema.js +0 -983
  119. package/esm/schema/customer_entitlement.schema.js +0 -11
  120. package/esm/schema/differential_price.schema.js +0 -65
  121. package/esm/schema/entitlement.schema.js +0 -24
  122. package/esm/schema/entitlement_override.schema.js +0 -30
  123. package/esm/schema/estimate.schema.js +0 -1522
  124. package/esm/schema/export.schema.js +0 -1542
  125. package/esm/schema/feature.schema.js +0 -34
  126. package/esm/schema/gift.schema.js +0 -274
  127. package/esm/schema/hosted_page.schema.js +0 -1646
  128. package/esm/schema/in_app_subscription.schema.js +0 -65
  129. package/esm/schema/index.js +0 -64
  130. package/esm/schema/invoice.schema.js +0 -1464
  131. package/esm/schema/item.schema.js +0 -88
  132. package/esm/schema/item_entitlement.schema.js +0 -42
  133. package/esm/schema/item_family.schema.js +0 -18
  134. package/esm/schema/item_price.schema.js +0 -187
  135. package/esm/schema/non_subscription.schema.js +0 -25
  136. package/esm/schema/offer_event.schema.js +0 -10
  137. package/esm/schema/offer_fulfillment.schema.js +0 -17
  138. package/esm/schema/omnichannel_one_time_order.schema.js +0 -23
  139. package/esm/schema/omnichannel_subscription.schema.js +0 -86
  140. package/esm/schema/omnichannel_subscription_item.schema.js +0 -10
  141. package/esm/schema/order.schema.js +0 -270
  142. package/esm/schema/payment_intent.schema.js +0 -114
  143. package/esm/schema/payment_schedule_scheme.schema.js +0 -17
  144. package/esm/schema/payment_source.schema.js +0 -355
  145. package/esm/schema/payment_voucher.schema.js +0 -54
  146. package/esm/schema/personalized_offer.schema.js +0 -25
  147. package/esm/schema/plan.schema.js +0 -222
  148. package/esm/schema/portal_session.schema.js +0 -19
  149. package/esm/schema/price_variant.schema.js +0 -33
  150. package/esm/schema/pricing_page_session.schema.js +0 -132
  151. package/esm/schema/promotional_credit.schema.js +0 -75
  152. package/esm/schema/purchase.schema.js +0 -269
  153. package/esm/schema/quote.schema.js +0 -1554
  154. package/esm/schema/ramp.schema.js +0 -206
  155. package/esm/schema/recorded_purchase.schema.js +0 -29
  156. package/esm/schema/resource_migration.schema.js +0 -11
  157. package/esm/schema/site_migration_detail.schema.js +0 -78
  158. package/esm/schema/subscription.schema.js +0 -2990
  159. package/esm/schema/subscription_entitlement.schema.js +0 -22
  160. package/esm/schema/time_machine.schema.js +0 -14
  161. package/esm/schema/transaction.schema.js +0 -67
  162. package/esm/schema/unbilled_charge.schema.js +0 -110
  163. package/esm/schema/usage.schema.js +0 -90
  164. package/esm/schema/usage_charge.schema.js +0 -14
  165. package/esm/schema/usage_event.schema.js +0 -25
  166. package/esm/schema/usage_file.schema.js +0 -10
  167. package/esm/schema/usage_summary.schema.js +0 -14
  168. package/esm/schema/virtual_bank_account.schema.js +0 -40
  169. package/esm/schema/webhook_endpoint.schema.js +0 -501
  170. package/esm/validationLoader.js +0 -56
  171. package/types/resources/QuoteEntitlement.d.ts +0 -16
@@ -1,91 +0,0 @@
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;
@@ -1,45 +0,0 @@
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;
@@ -1,21 +0,0 @@
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;
@@ -1,190 +0,0 @@
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;
@@ -1,28 +0,0 @@
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;
@@ -1,13 +0,0 @@
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;
@@ -1,20 +0,0 @@
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;
@@ -1,26 +0,0 @@
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;
@@ -1,89 +0,0 @@
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;
@@ -1,13 +0,0 @@
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;