chargebee 3.33.0 → 3.35.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (172) hide show
  1. package/CHANGELOG.md +362 -0
  2. package/cjs/environment.js +1 -1
  3. package/cjs/resources/api_endpoints.js +496 -3
  4. package/cjs/resources/webhook/eventType.js +36 -0
  5. package/cjs/schema/business_entity.schema.js +28 -2
  6. package/cjs/schema/business_rule.schema.js +54 -0
  7. package/cjs/schema/business_ruleset.schema.js +68 -0
  8. package/cjs/schema/card.schema.js +3 -1
  9. package/cjs/schema/collections_payment_promise.schema.js +43 -0
  10. package/cjs/schema/comment.schema.js +2 -0
  11. package/cjs/schema/coupon.schema.js +1 -1
  12. package/cjs/schema/credit_note.schema.js +11 -4
  13. package/cjs/schema/credit_unit.schema.js +2 -2
  14. package/cjs/schema/customer.schema.js +81 -10
  15. package/cjs/schema/dispute.schema.js +104 -0
  16. package/cjs/schema/einvoice.schema.js +37 -0
  17. package/cjs/schema/email_log.schema.js +28 -0
  18. package/cjs/schema/entitlement.schema.js +4 -4
  19. package/cjs/schema/estimate.schema.js +39 -10
  20. package/cjs/schema/event.schema.js +156 -0
  21. package/cjs/schema/export.schema.js +75 -19
  22. package/cjs/schema/feature.schema.js +2 -2
  23. package/cjs/schema/gift.schema.js +26 -0
  24. package/cjs/schema/hosted_page.schema.js +26 -6
  25. package/cjs/schema/index.js +9 -0
  26. package/cjs/schema/invoice.schema.js +98 -14
  27. package/cjs/schema/item.schema.js +1 -1
  28. package/cjs/schema/item_family.schema.js +1 -1
  29. package/cjs/schema/item_price.schema.js +1 -1
  30. package/cjs/schema/ledger_account_balance.schema.js +11 -2
  31. package/cjs/schema/ledger_operation.schema.js +6 -2
  32. package/cjs/schema/meter.schema.js +1 -1
  33. package/cjs/schema/metered_feature.schema.js +1 -1
  34. package/cjs/schema/omnichannel_one_time_order.schema.js +12 -4
  35. package/cjs/schema/omnichannel_subscription.schema.js +16 -8
  36. package/cjs/schema/payment_intent.schema.js +27 -0
  37. package/cjs/schema/payment_schedule.schema.js +36 -0
  38. package/cjs/schema/payment_schedule_scheme.schema.js +23 -2
  39. package/cjs/schema/payment_source.schema.js +118 -1
  40. package/cjs/schema/price_ramp.schema.js +88 -0
  41. package/cjs/schema/price_variant.schema.js +1 -1
  42. package/cjs/schema/pricing_page_session.schema.js +1 -0
  43. package/cjs/schema/promotional_grant.schema.js +2 -0
  44. package/cjs/schema/purchase.schema.js +20 -1
  45. package/cjs/schema/quote.schema.js +6 -6
  46. package/cjs/schema/ramp.schema.js +18 -6
  47. package/cjs/schema/retry_segment.schema.js +12 -0
  48. package/cjs/schema/subscription.schema.js +179 -16
  49. package/cjs/schema/transaction.schema.js +60 -2
  50. package/cjs/schema/usage.schema.js +5 -0
  51. package/cjs/schema/usage_summary.schema.js +1 -0
  52. package/cjs/schema/webhook_endpoint.schema.js +72 -0
  53. package/esm/environment.js +1 -1
  54. package/esm/resources/api_endpoints.js +496 -3
  55. package/esm/resources/webhook/eventType.js +36 -0
  56. package/esm/schema/business_entity.schema.js +27 -1
  57. package/esm/schema/business_rule.schema.js +51 -0
  58. package/esm/schema/business_ruleset.schema.js +65 -0
  59. package/esm/schema/card.schema.js +3 -1
  60. package/esm/schema/collections_payment_promise.schema.js +40 -0
  61. package/esm/schema/comment.schema.js +2 -0
  62. package/esm/schema/coupon.schema.js +1 -1
  63. package/esm/schema/credit_note.schema.js +11 -4
  64. package/esm/schema/credit_unit.schema.js +2 -2
  65. package/esm/schema/customer.schema.js +81 -10
  66. package/esm/schema/dispute.schema.js +101 -0
  67. package/esm/schema/einvoice.schema.js +34 -0
  68. package/esm/schema/email_log.schema.js +25 -0
  69. package/esm/schema/entitlement.schema.js +4 -4
  70. package/esm/schema/estimate.schema.js +39 -10
  71. package/esm/schema/event.schema.js +156 -0
  72. package/esm/schema/export.schema.js +75 -19
  73. package/esm/schema/feature.schema.js +2 -2
  74. package/esm/schema/gift.schema.js +26 -0
  75. package/esm/schema/hosted_page.schema.js +26 -6
  76. package/esm/schema/index.js +9 -0
  77. package/esm/schema/invoice.schema.js +97 -13
  78. package/esm/schema/item.schema.js +1 -1
  79. package/esm/schema/item_family.schema.js +1 -1
  80. package/esm/schema/item_price.schema.js +1 -1
  81. package/esm/schema/ledger_account_balance.schema.js +10 -1
  82. package/esm/schema/ledger_operation.schema.js +6 -2
  83. package/esm/schema/meter.schema.js +1 -1
  84. package/esm/schema/metered_feature.schema.js +1 -1
  85. package/esm/schema/omnichannel_one_time_order.schema.js +12 -4
  86. package/esm/schema/omnichannel_subscription.schema.js +16 -8
  87. package/esm/schema/payment_intent.schema.js +27 -0
  88. package/esm/schema/payment_schedule.schema.js +33 -0
  89. package/esm/schema/payment_schedule_scheme.schema.js +22 -1
  90. package/esm/schema/payment_source.schema.js +118 -1
  91. package/esm/schema/price_ramp.schema.js +85 -0
  92. package/esm/schema/price_variant.schema.js +1 -1
  93. package/esm/schema/pricing_page_session.schema.js +1 -0
  94. package/esm/schema/promotional_grant.schema.js +2 -0
  95. package/esm/schema/purchase.schema.js +20 -1
  96. package/esm/schema/quote.schema.js +6 -6
  97. package/esm/schema/ramp.schema.js +18 -6
  98. package/esm/schema/retry_segment.schema.js +9 -0
  99. package/esm/schema/subscription.schema.js +179 -16
  100. package/esm/schema/transaction.schema.js +60 -2
  101. package/esm/schema/usage.schema.js +5 -0
  102. package/esm/schema/usage_summary.schema.js +1 -0
  103. package/esm/schema/webhook_endpoint.schema.js +72 -0
  104. package/package.json +1 -1
  105. package/types/core.d.ts +135 -72
  106. package/types/index.d.ts +36 -0
  107. package/types/resources/AppliedRule.d.ts +14 -0
  108. package/types/resources/ApplyRule.d.ts +28 -0
  109. package/types/resources/BusinessEntity.d.ts +52 -0
  110. package/types/resources/BusinessRule.d.ts +161 -0
  111. package/types/resources/BusinessRuleset.d.ts +165 -0
  112. package/types/resources/BusinessRulesetRule.d.ts +9 -0
  113. package/types/resources/Card.d.ts +1 -1
  114. package/types/resources/Citation.d.ts +13 -0
  115. package/types/resources/CollectionsDispute.d.ts +24 -0
  116. package/types/resources/CollectionsPaymentPromise.d.ts +93 -0
  117. package/types/resources/CollectionsReminderSequence.d.ts +35 -0
  118. package/types/resources/Comment.d.ts +2 -1
  119. package/types/resources/Content.d.ts +26 -0
  120. package/types/resources/CreditNote.d.ts +13 -0
  121. package/types/resources/CustomData.d.ts +14 -0
  122. package/types/resources/CustomDataSchema.d.ts +15 -0
  123. package/types/resources/Customer.d.ts +42 -5
  124. package/types/resources/Dispute.d.ts +65 -0
  125. package/types/resources/DraftEstimate.d.ts +13 -0
  126. package/types/resources/DraftRequest.d.ts +45 -0
  127. package/types/resources/Einvoice.d.ts +64 -1
  128. package/types/resources/EmailAttachment.d.ts +16 -0
  129. package/types/resources/EmailConversation.d.ts +18 -0
  130. package/types/resources/EmailLog.d.ts +46 -0
  131. package/types/resources/EmailMessage.d.ts +40 -0
  132. package/types/resources/Estimate.d.ts +31 -2
  133. package/types/resources/Event.d.ts +37 -0
  134. package/types/resources/Execution.d.ts +12 -0
  135. package/types/resources/GatewayPaymentMethodToken.d.ts +2 -2
  136. package/types/resources/Gift.d.ts +28 -2
  137. package/types/resources/GrantBlock.d.ts +26 -7
  138. package/types/resources/GroupByAttribute.d.ts +15 -0
  139. package/types/resources/GroupByRecommendation.d.ts +10 -0
  140. package/types/resources/HostedPage.d.ts +11 -0
  141. package/types/resources/Invoice.d.ts +57 -4
  142. package/types/resources/ItemPrice.d.ts +1 -0
  143. package/types/resources/LedgerAccountBalance.d.ts +19 -0
  144. package/types/resources/LedgerEntry.d.ts +4 -4
  145. package/types/resources/LedgerOperation.d.ts +15 -8
  146. package/types/resources/Meter.d.ts +1 -0
  147. package/types/resources/MeteredFeature.d.ts +1 -0
  148. package/types/resources/OmnichannelOneTimeOrder.d.ts +5 -1
  149. package/types/resources/OmnichannelSubscription.d.ts +6 -1
  150. package/types/resources/OmnichannelSubscriptionItem.d.ts +9 -2
  151. package/types/resources/PaymentIntent.d.ts +72 -5
  152. package/types/resources/PaymentSchedule.d.ts +39 -2
  153. package/types/resources/PaymentScheduleEstimate.d.ts +2 -1
  154. package/types/resources/PaymentScheduleScheme.d.ts +17 -1
  155. package/types/resources/PaymentSource.d.ts +50 -2
  156. package/types/resources/PreferenceVariant.d.ts +10 -0
  157. package/types/resources/PriceRamp.d.ts +113 -0
  158. package/types/resources/PricingPageSession.d.ts +1 -0
  159. package/types/resources/PrivateNote.d.ts +18 -0
  160. package/types/resources/PromotionalGrant.d.ts +2 -0
  161. package/types/resources/Purchase.d.ts +20 -1
  162. package/types/resources/QuotedSubscription.d.ts +1 -0
  163. package/types/resources/Ramp.d.ts +18 -0
  164. package/types/resources/RampInterval.d.ts +12 -0
  165. package/types/resources/RecordedPurchase.d.ts +5 -1
  166. package/types/resources/RetrySegment.d.ts +36 -0
  167. package/types/resources/Subscription.d.ts +110 -11
  168. package/types/resources/ThirdPartyPaymentMethod.d.ts +1 -0
  169. package/types/resources/Transaction.d.ts +9 -0
  170. package/types/resources/Usage.d.ts +6 -0
  171. package/types/resources/UsageSummary.d.ts +2 -0
  172. package/types/resources/WebhookEvent.d.ts +214 -0
@@ -1,10 +1,36 @@
1
1
  "use strict";
2
2
  // Generated Zod schemas: BusinessEntity
3
- // Actions: createTransfers, getTransfers
3
+ // Actions: create, list, update, createTransfers, getTransfers
4
4
  // Do not edit manually – regenerate via sdk-generator
5
5
  Object.defineProperty(exports, "__esModule", { value: true });
6
- exports.GetTransfersBusinessEntityBodySchema = exports.CreateTransfersBusinessEntityBodySchema = void 0;
6
+ exports.GetTransfersBusinessEntityBodySchema = exports.CreateTransfersBusinessEntityBodySchema = exports.UpdateBusinessEntityBodySchema = exports.ListBusinessEntityBodySchema = exports.CreateBusinessEntityBodySchema = void 0;
7
7
  const zod_1 = require("zod");
8
+ //BusinessEntity.create
9
+ const CreateBusinessEntityBodySchema = zod_1.z.looseObject({
10
+ name: zod_1.z.string().max(100),
11
+ status: zod_1.z.enum(['active', 'inactive']),
12
+ });
13
+ exports.CreateBusinessEntityBodySchema = CreateBusinessEntityBodySchema;
14
+ //BusinessEntity.list
15
+ const ListBusinessEntityNameSchema = 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
+ is_present: zod_1.z.enum(['true', 'false']).optional(),
20
+ });
21
+ const ListBusinessEntityBodySchema = zod_1.z.looseObject({
22
+ limit: zod_1.z.number().int().min(1).max(100).optional(),
23
+ offset: zod_1.z.string().max(1000).optional(),
24
+ include_deleted: zod_1.z.boolean().default(false).optional(),
25
+ name: ListBusinessEntityNameSchema.optional(),
26
+ });
27
+ exports.ListBusinessEntityBodySchema = ListBusinessEntityBodySchema;
28
+ //BusinessEntity.update
29
+ const UpdateBusinessEntityBodySchema = zod_1.z.looseObject({
30
+ name: zod_1.z.string().max(100).optional(),
31
+ status: zod_1.z.enum(['active', 'inactive']).optional(),
32
+ });
33
+ exports.UpdateBusinessEntityBodySchema = UpdateBusinessEntityBodySchema;
8
34
  //BusinessEntity.createTransfers
9
35
  const CreateTransfersBusinessEntityBodySchema = zod_1.z.looseObject({
10
36
  active_resource_ids: zod_1.z.array(zod_1.z.string().max(50).optional()),
@@ -0,0 +1,54 @@
1
+ "use strict";
2
+ // Generated Zod schemas: BusinessRule
3
+ // Actions: create, updateDraft, list, applyRules
4
+ // Do not edit manually – regenerate via sdk-generator
5
+ Object.defineProperty(exports, "__esModule", { value: true });
6
+ exports.ApplyRulesBusinessRuleBodySchema = exports.ListBusinessRuleBodySchema = exports.UpdateDraftBusinessRuleBodySchema = exports.CreateBusinessRuleBodySchema = void 0;
7
+ const zod_1 = require("zod");
8
+ //BusinessRule.create
9
+ const CreateBusinessRuleStructuredExpressionSchema = zod_1.z.looseObject({});
10
+ const CreateBusinessRuleBodySchema = zod_1.z.looseObject({
11
+ id: zod_1.z.string().max(100).optional(),
12
+ name: zod_1.z.string().max(500),
13
+ description: zod_1.z.string().max(1000).optional(),
14
+ tags: zod_1.z.array(zod_1.z.string().optional()).optional(),
15
+ structured_expression: CreateBusinessRuleStructuredExpressionSchema,
16
+ actions_on_success: zod_1.z.array(zod_1.z.string().optional()).optional(),
17
+ });
18
+ exports.CreateBusinessRuleBodySchema = CreateBusinessRuleBodySchema;
19
+ //BusinessRule.updateDraft
20
+ const UpdateDraftBusinessRuleStructuredExpressionSchema = zod_1.z.looseObject({});
21
+ const UpdateDraftBusinessRuleBodySchema = zod_1.z.looseObject({
22
+ name: zod_1.z.string().max(500),
23
+ description: zod_1.z.string().max(1000).optional(),
24
+ tags: zod_1.z.array(zod_1.z.string().optional()).optional(),
25
+ structured_expression: UpdateDraftBusinessRuleStructuredExpressionSchema,
26
+ actions_on_success: zod_1.z.array(zod_1.z.string().optional()).optional(),
27
+ });
28
+ exports.UpdateDraftBusinessRuleBodySchema = UpdateDraftBusinessRuleBodySchema;
29
+ //BusinessRule.list
30
+ const ListBusinessRuleDraftSchema = zod_1.z.object({
31
+ is: zod_1.z.enum(['true', 'false']).optional(),
32
+ });
33
+ const ListBusinessRuleActiveSchema = zod_1.z.object({
34
+ is: zod_1.z.enum(['true', 'false']).optional(),
35
+ });
36
+ const ListBusinessRuleBodySchema = zod_1.z.looseObject({
37
+ limit: zod_1.z.number().int().min(1).max(100).optional(),
38
+ offset: zod_1.z.string().max(1000).optional(),
39
+ draft: ListBusinessRuleDraftSchema.optional(),
40
+ active: ListBusinessRuleActiveSchema.optional(),
41
+ });
42
+ exports.ListBusinessRuleBodySchema = ListBusinessRuleBodySchema;
43
+ //BusinessRule.applyRules
44
+ const ApplyRulesBusinessRuleStructuredExpressionSchema = zod_1.z.looseObject({});
45
+ const ApplyRulesBusinessRuleContextSchema = zod_1.z.looseObject({});
46
+ const ApplyRulesBusinessRuleBodySchema = zod_1.z.looseObject({
47
+ evaluate: zod_1.z.boolean().optional(),
48
+ rule_id: zod_1.z.string().optional(),
49
+ ruleset_id: zod_1.z.string().optional(),
50
+ skip_failed_rules: zod_1.z.boolean().optional(),
51
+ structured_expression: ApplyRulesBusinessRuleStructuredExpressionSchema.optional(),
52
+ context: ApplyRulesBusinessRuleContextSchema.optional(),
53
+ });
54
+ exports.ApplyRulesBusinessRuleBodySchema = ApplyRulesBusinessRuleBodySchema;
@@ -0,0 +1,68 @@
1
+ "use strict";
2
+ // Generated Zod schemas: BusinessRuleset
3
+ // Actions: create, update, addRules, removeRules, listRules, list
4
+ // Do not edit manually – regenerate via sdk-generator
5
+ Object.defineProperty(exports, "__esModule", { value: true });
6
+ exports.ListBusinessRulesetBodySchema = exports.ListRulesBusinessRulesetBodySchema = exports.RemoveRulesBusinessRulesetBodySchema = exports.AddRulesBusinessRulesetBodySchema = exports.UpdateBusinessRulesetBodySchema = exports.CreateBusinessRulesetBodySchema = void 0;
7
+ const zod_1 = require("zod");
8
+ //BusinessRuleset.create
9
+ const CreateBusinessRulesetBodySchema = zod_1.z.looseObject({
10
+ id: zod_1.z.string().max(100).optional(),
11
+ name: zod_1.z.string().max(500),
12
+ description: zod_1.z.string().max(1000).optional(),
13
+ execute_mode: zod_1.z
14
+ .enum([
15
+ 'stop_on_first_true',
16
+ 'stop_on_first_false',
17
+ 'execute_all',
18
+ 'execute_all_true',
19
+ ])
20
+ .optional(),
21
+ rules: zod_1.z.array(zod_1.z.string().optional()).optional(),
22
+ });
23
+ exports.CreateBusinessRulesetBodySchema = CreateBusinessRulesetBodySchema;
24
+ //BusinessRuleset.update
25
+ const UpdateBusinessRulesetBodySchema = zod_1.z.looseObject({
26
+ name: zod_1.z.string().max(500),
27
+ description: zod_1.z.string().max(1000).optional(),
28
+ execute_mode: zod_1.z
29
+ .enum([
30
+ 'stop_on_first_true',
31
+ 'stop_on_first_false',
32
+ 'execute_all',
33
+ 'execute_all_true',
34
+ ])
35
+ .optional(),
36
+ rules: zod_1.z.array(zod_1.z.string().optional()).optional(),
37
+ });
38
+ exports.UpdateBusinessRulesetBodySchema = UpdateBusinessRulesetBodySchema;
39
+ //BusinessRuleset.addRules
40
+ const AddRulesBusinessRulesetBodySchema = zod_1.z.looseObject({
41
+ rules: zod_1.z.array(zod_1.z.string().optional()).optional(),
42
+ });
43
+ exports.AddRulesBusinessRulesetBodySchema = AddRulesBusinessRulesetBodySchema;
44
+ //BusinessRuleset.removeRules
45
+ const RemoveRulesBusinessRulesetBodySchema = zod_1.z.looseObject({
46
+ rules: zod_1.z.array(zod_1.z.string().optional()).optional(),
47
+ });
48
+ exports.RemoveRulesBusinessRulesetBodySchema = RemoveRulesBusinessRulesetBodySchema;
49
+ //BusinessRuleset.listRules
50
+ const ListRulesBusinessRulesetActiveSchema = zod_1.z.object({
51
+ is: zod_1.z.enum(['true', 'false']).optional(),
52
+ });
53
+ const ListRulesBusinessRulesetBodySchema = zod_1.z.looseObject({
54
+ limit: zod_1.z.number().int().min(1).max(100).optional(),
55
+ offset: zod_1.z.string().max(1000).optional(),
56
+ active: ListRulesBusinessRulesetActiveSchema.optional(),
57
+ });
58
+ exports.ListRulesBusinessRulesetBodySchema = ListRulesBusinessRulesetBodySchema;
59
+ //BusinessRuleset.list
60
+ const ListBusinessRulesetActiveSchema = zod_1.z.object({
61
+ is: zod_1.z.enum(['true', 'false']).optional(),
62
+ });
63
+ const ListBusinessRulesetBodySchema = zod_1.z.looseObject({
64
+ limit: zod_1.z.number().int().min(1).max(100).optional(),
65
+ offset: zod_1.z.string().max(1000).optional(),
66
+ active: ListBusinessRulesetActiveSchema.optional(),
67
+ });
68
+ exports.ListBusinessRulesetBodySchema = ListBusinessRulesetBodySchema;
@@ -71,6 +71,7 @@ const UpdateCardForCustomerCardBodySchema = zod_1.z.looseObject({
71
71
  'tempus',
72
72
  'moyasar',
73
73
  'payway',
74
+ 'payu',
74
75
  ])
75
76
  .optional(),
76
77
  gateway_account_id: zod_1.z.string().max(50).optional(),
@@ -82,7 +83,7 @@ const UpdateCardForCustomerCardBodySchema = zod_1.z.looseObject({
82
83
  expiry_year: zod_1.z.number().int(),
83
84
  cvv: zod_1.z.string().max(520).optional(),
84
85
  preferred_scheme: zod_1.z
85
- .enum(['cartes_bancaires', 'mastercard', 'visa'])
86
+ .enum(['cartes_bancaires', 'mastercard', 'visa', 'dankort'])
86
87
  .optional(),
87
88
  billing_addr1: zod_1.z.string().max(150).optional(),
88
89
  billing_addr2: zod_1.z.string().max(150).optional(),
@@ -153,6 +154,7 @@ const SwitchGatewayForCustomerCardBodySchema = zod_1.z.looseObject({
153
154
  'tempus',
154
155
  'moyasar',
155
156
  'payway',
157
+ 'payu',
156
158
  ])
157
159
  .optional(),
158
160
  gateway_account_id: zod_1.z.string().max(50),
@@ -0,0 +1,43 @@
1
+ "use strict";
2
+ // Generated Zod schemas: CollectionsPaymentPromise
3
+ // Actions: listCollectionsPaymentPromises, createCollectionsPaymentPromise, updateCollectionsPaymentPromise
4
+ // Do not edit manually – regenerate via sdk-generator
5
+ Object.defineProperty(exports, "__esModule", { value: true });
6
+ exports.UpdateCollectionsPaymentPromiseCollectionsPaymentPromiseBodySchema = exports.CreateCollectionsPaymentPromiseCollectionsPaymentPromiseBodySchema = exports.ListCollectionsPaymentPromisesCollectionsPaymentPromiseBodySchema = void 0;
7
+ const zod_1 = require("zod");
8
+ //CollectionsPaymentPromise.listCollectionsPaymentPromises
9
+ const ListCollectionsPaymentPromisesCollectionsPaymentPromiseCustomerIdSchema = zod_1.z.object({
10
+ is: zod_1.z.string().min(1).optional(),
11
+ });
12
+ const ListCollectionsPaymentPromisesCollectionsPaymentPromiseInvoiceIdSchema = zod_1.z.object({
13
+ is: zod_1.z.string().min(1).optional(),
14
+ });
15
+ const ListCollectionsPaymentPromisesCollectionsPaymentPromiseStatusSchema = zod_1.z.object({
16
+ is: zod_1.z.enum(['active', 'fulfilled', 'broken', 'cancelled']).optional(),
17
+ });
18
+ const ListCollectionsPaymentPromisesCollectionsPaymentPromiseBodySchema = zod_1.z.looseObject({
19
+ limit: zod_1.z.number().int().min(1).max(100).optional(),
20
+ offset: zod_1.z.string().max(1000).optional(),
21
+ customer_id: ListCollectionsPaymentPromisesCollectionsPaymentPromiseCustomerIdSchema.optional(),
22
+ invoice_id: ListCollectionsPaymentPromisesCollectionsPaymentPromiseInvoiceIdSchema.optional(),
23
+ status: ListCollectionsPaymentPromisesCollectionsPaymentPromiseStatusSchema.optional(),
24
+ });
25
+ exports.ListCollectionsPaymentPromisesCollectionsPaymentPromiseBodySchema = ListCollectionsPaymentPromisesCollectionsPaymentPromiseBodySchema;
26
+ //CollectionsPaymentPromise.createCollectionsPaymentPromise
27
+ const CreateCollectionsPaymentPromiseCollectionsPaymentPromiseBodySchema = zod_1.z.looseObject({
28
+ customer_id: zod_1.z.string().max(100),
29
+ invoice_id: zod_1.z.string().max(100).optional(),
30
+ amount: zod_1.z.number().int(),
31
+ currency_code: zod_1.z.string().max(3).optional(),
32
+ promised_on: zod_1.z.number().int(),
33
+ reason: zod_1.z.string().max(500).optional(),
34
+ promised_by: zod_1.z.string().max(254).optional(),
35
+ });
36
+ exports.CreateCollectionsPaymentPromiseCollectionsPaymentPromiseBodySchema = CreateCollectionsPaymentPromiseCollectionsPaymentPromiseBodySchema;
37
+ //CollectionsPaymentPromise.updateCollectionsPaymentPromise
38
+ const UpdateCollectionsPaymentPromiseCollectionsPaymentPromiseBodySchema = zod_1.z.looseObject({
39
+ promised_on: zod_1.z.number().int().optional(),
40
+ reason: zod_1.z.string().max(500).optional(),
41
+ promised_by: zod_1.z.string().max(254).optional(),
42
+ });
43
+ exports.UpdateCollectionsPaymentPromiseCollectionsPaymentPromiseBodySchema = UpdateCollectionsPaymentPromiseCollectionsPaymentPromiseBodySchema;
@@ -23,6 +23,7 @@ const CreateCommentBodySchema = zod_1.z.looseObject({
23
23
  'item',
24
24
  'item_price',
25
25
  'price_variant',
26
+ 'task',
26
27
  ]),
27
28
  entity_id: zod_1.z.string().max(100),
28
29
  notes: zod_1.z.string().max(1000),
@@ -60,6 +61,7 @@ const ListCommentBodySchema = zod_1.z.looseObject({
60
61
  'item',
61
62
  'item_price',
62
63
  'price_variant',
64
+ 'task',
63
65
  ])
64
66
  .optional(),
65
67
  entity_id: zod_1.z.string().max(100).optional(),
@@ -259,8 +259,8 @@ const ListCouponCurrencyCodeSchema = zod_1.z.object({
259
259
  not_in: zod_1.z.string().regex(RegExp('^\\[(.*)(,.*)*\\]$')).optional(),
260
260
  });
261
261
  const ListCouponApplicableItemPriceIdsSchema = zod_1.z.object({
262
- is: zod_1.z.string().min(1).optional(),
263
262
  in: zod_1.z.string().regex(RegExp('^\\[(.*)(,.*)*\\]$')).optional(),
263
+ is: zod_1.z.string().min(1).optional(),
264
264
  });
265
265
  const ListCouponBodySchema = zod_1.z.looseObject({
266
266
  limit: zod_1.z.number().int().min(1).max(100).optional(),
@@ -95,10 +95,12 @@ const RecordRefundCreditNoteTransactionSchema = zod_1.z.object({
95
95
  'app_store',
96
96
  'play_store',
97
97
  'custom',
98
- 'dana',
99
- 'touch_n_go',
100
98
  'tamara',
101
99
  'qpay',
100
+ 'blik',
101
+ 'fpx',
102
+ 'wero',
103
+ 'p24',
102
104
  ]),
103
105
  reference_number: zod_1.z.string().max(100).optional(),
104
106
  custom_payment_method_id: zod_1.z.string().max(50).optional(),
@@ -413,6 +415,8 @@ const ImportCreditNoteCreditNoteLineItemsSchema = zod_1.z.object({
413
415
  tax9_amount: zod_1.z.array(zod_1.z.number().int().min(0).optional()).optional(),
414
416
  tax10_name: zod_1.z.array(zod_1.z.string().max(50).optional()).optional(),
415
417
  tax10_amount: zod_1.z.array(zod_1.z.number().int().min(0).optional()).optional(),
418
+ is_partial_tax_applied: zod_1.z.array(zod_1.z.boolean().optional()).optional(),
419
+ taxable_amount: zod_1.z.array(zod_1.z.number().int().min(0).optional()).optional(),
416
420
  proration_mode: zod_1.z
417
421
  .array(zod_1.z
418
422
  .enum(['reset', 'delta', 'service_period_revision', 'adjusted_term'])
@@ -484,10 +488,12 @@ const ImportCreditNoteCreditNoteLinkedRefundsSchema = zod_1.z.object({
484
488
  'app_store',
485
489
  'play_store',
486
490
  'custom',
487
- 'dana',
488
- 'touch_n_go',
489
491
  'tamara',
490
492
  'qpay',
493
+ 'blik',
494
+ 'fpx',
495
+ 'wero',
496
+ 'p24',
491
497
  ])
492
498
  .optional()),
493
499
  date: zod_1.z.array(zod_1.z.number().int().optional()),
@@ -502,6 +508,7 @@ const ImportCreditNoteCreditNoteBodySchema = zod_1.z.looseObject({
502
508
  currency_code: zod_1.z.string().max(3).optional(),
503
509
  create_reason_code: zod_1.z.string().max(100),
504
510
  date: zod_1.z.number().int(),
511
+ customer_notes: zod_1.z.string().max(2000).optional(),
505
512
  status: zod_1.z.enum(['adjusted', 'refunded', 'refund_due', 'voided']).optional(),
506
513
  total: zod_1.z.number().int().min(0).optional(),
507
514
  refunded_at: zod_1.z.number().int().optional(),
@@ -7,12 +7,12 @@ exports.UpdateCreditUnitBodySchema = exports.CreateCreditUnitBodySchema = export
7
7
  const zod_1 = require("zod");
8
8
  //CreditUnit.list
9
9
  const ListCreditUnitStatusSchema = zod_1.z.object({
10
- is: zod_1.z.enum(['active', 'archived']).optional(),
11
10
  in: zod_1.z.enum(['active', 'archived']).optional(),
11
+ is: zod_1.z.enum(['active', 'archived']).optional(),
12
12
  });
13
13
  const ListCreditUnitIdSchema = zod_1.z.object({
14
- is: zod_1.z.string().min(1).optional(),
15
14
  in: zod_1.z.string().regex(RegExp('^\\[(.*)(,.*)*\\]$')).optional(),
15
+ is: zod_1.z.string().min(1).optional(),
16
16
  });
17
17
  const ListCreditUnitBodySchema = zod_1.z.looseObject({
18
18
  limit: zod_1.z.number().int().min(1).max(100).optional(),
@@ -70,6 +70,7 @@ const CreateCustomerCardSchema = zod_1.z.object({
70
70
  'tempus',
71
71
  'moyasar',
72
72
  'payway',
73
+ 'payu',
73
74
  ])
74
75
  .optional(),
75
76
  gateway_account_id: zod_1.z.string().max(50).optional(),
@@ -81,7 +82,7 @@ const CreateCustomerCardSchema = zod_1.z.object({
81
82
  expiry_year: zod_1.z.number().int().optional(),
82
83
  cvv: zod_1.z.string().max(520).optional(),
83
84
  preferred_scheme: zod_1.z
84
- .enum(['cartes_bancaires', 'mastercard', 'visa'])
85
+ .enum(['cartes_bancaires', 'mastercard', 'visa', 'dankort'])
85
86
  .optional(),
86
87
  billing_addr1: zod_1.z.string().max(150).optional(),
87
88
  billing_addr2: zod_1.z.string().max(150).optional(),
@@ -172,6 +173,19 @@ const CreateCustomerPaymentMethodSchema = zod_1.z.object({
172
173
  'touch_n_go',
173
174
  'tamara',
174
175
  'qpay',
176
+ 'ovo',
177
+ 'momo',
178
+ 'mercado_pago',
179
+ 'nequi',
180
+ 'nupay',
181
+ 'picpay',
182
+ 'thai_qr',
183
+ 'blik',
184
+ 'fpx',
185
+ 'wero',
186
+ 'p24',
187
+ 'affirm_pay',
188
+ 'rakuten_pay',
175
189
  ])
176
190
  .optional(),
177
191
  gateway: zod_1.z
@@ -235,6 +249,7 @@ const CreateCustomerPaymentMethodSchema = zod_1.z.object({
235
249
  'tempus',
236
250
  'moyasar',
237
251
  'payway',
252
+ 'payu',
238
253
  ])
239
254
  .optional(),
240
255
  gateway_account_id: zod_1.z.string().max(50).optional(),
@@ -301,6 +316,19 @@ const CreateCustomerPaymentIntentSchema = zod_1.z.object({
301
316
  'touch_n_go',
302
317
  'tamara',
303
318
  'qpay',
319
+ 'ovo',
320
+ 'momo',
321
+ 'mercado_pago',
322
+ 'nequi',
323
+ 'nupay',
324
+ 'picpay',
325
+ 'thai_qr',
326
+ 'blik',
327
+ 'fpx',
328
+ 'wero',
329
+ 'p24',
330
+ 'affirm_pay',
331
+ 'rakuten_pay',
304
332
  ])
305
333
  .optional(),
306
334
  reference_id: zod_1.z.string().max(65000).optional(),
@@ -336,7 +364,7 @@ const CreateCustomerBodySchema = zod_1.z.looseObject({
336
364
  registered_for_gst: zod_1.z.boolean().optional(),
337
365
  is_einvoice_enabled: zod_1.z.boolean().optional(),
338
366
  einvoicing_method: zod_1.z.enum(['automatic', 'manual', 'site_default']).optional(),
339
- taxability: zod_1.z.enum(['taxable', 'exempt']).optional(),
367
+ taxability: zod_1.z.enum(['taxable', 'exempt', 'zero_rated']).optional(),
340
368
  exemption_details: zod_1.z.array(zod_1.z.string().optional()).optional(),
341
369
  customer_type: zod_1.z
342
370
  .enum(['residential', 'business', 'senior_citizen', 'industrial'])
@@ -393,6 +421,7 @@ const CreateCustomerBodySchema = zod_1.z.looseObject({
393
421
  consolidated_invoicing: zod_1.z.boolean().optional(),
394
422
  token_id: zod_1.z.string().max(40).optional(),
395
423
  business_entity_id: zod_1.z.string().max(50).optional(),
424
+ brand_id: zod_1.z.string().max(50).optional(),
396
425
  created_from_ip: zod_1.z.string().max(50).optional(),
397
426
  invoice_notes: zod_1.z.string().max(2000).optional(),
398
427
  card: CreateCustomerCardSchema.optional(),
@@ -449,10 +478,10 @@ const ListCustomerAutoCollectionSchema = zod_1.z.object({
449
478
  not_in: zod_1.z.enum(['on', 'off']).optional(),
450
479
  });
451
480
  const ListCustomerTaxabilitySchema = zod_1.z.object({
452
- is: zod_1.z.enum(['taxable', 'exempt']).optional(),
453
- is_not: zod_1.z.enum(['taxable', 'exempt']).optional(),
454
- in: zod_1.z.enum(['taxable', 'exempt']).optional(),
455
- not_in: zod_1.z.enum(['taxable', 'exempt']).optional(),
481
+ is: zod_1.z.enum(['taxable', 'exempt', 'zero_rated']).optional(),
482
+ is_not: zod_1.z.enum(['taxable', 'exempt', 'zero_rated']).optional(),
483
+ in: zod_1.z.enum(['taxable', 'exempt', 'zero_rated']).optional(),
484
+ not_in: zod_1.z.enum(['taxable', 'exempt', 'zero_rated']).optional(),
456
485
  });
457
486
  const ListCustomerCreatedAtSchema = zod_1.z.object({
458
487
  after: zod_1.z.string().regex(RegExp('^\\d{10}$')).optional(),
@@ -611,7 +640,7 @@ const UpdateCustomerBodySchema = zod_1.z.looseObject({
611
640
  auto_collection: zod_1.z.enum(['on', 'off']).optional(),
612
641
  allow_direct_debit: zod_1.z.boolean().default(false).optional(),
613
642
  net_term_days: zod_1.z.number().int().optional(),
614
- taxability: zod_1.z.enum(['taxable', 'exempt']).optional(),
643
+ taxability: zod_1.z.enum(['taxable', 'exempt', 'zero_rated']).optional(),
615
644
  exemption_details: zod_1.z.array(zod_1.z.string().optional()).optional(),
616
645
  customer_type: zod_1.z
617
646
  .enum(['residential', 'business', 'senior_citizen', 'industrial'])
@@ -727,6 +756,19 @@ const UpdatePaymentMethodCustomerPaymentMethodSchema = zod_1.z.object({
727
756
  'touch_n_go',
728
757
  'tamara',
729
758
  'qpay',
759
+ 'ovo',
760
+ 'momo',
761
+ 'mercado_pago',
762
+ 'nequi',
763
+ 'nupay',
764
+ 'picpay',
765
+ 'thai_qr',
766
+ 'blik',
767
+ 'fpx',
768
+ 'wero',
769
+ 'p24',
770
+ 'affirm_pay',
771
+ 'rakuten_pay',
730
772
  ]),
731
773
  gateway: zod_1.z
732
774
  .enum([
@@ -789,6 +831,7 @@ const UpdatePaymentMethodCustomerPaymentMethodSchema = zod_1.z.object({
789
831
  'tempus',
790
832
  'moyasar',
791
833
  'payway',
834
+ 'payu',
792
835
  ])
793
836
  .optional(),
794
837
  gateway_account_id: zod_1.z.string().max(50).optional(),
@@ -947,10 +990,12 @@ const RecordExcessPaymentCustomerTransactionSchema = zod_1.z.object({
947
990
  'app_store',
948
991
  'play_store',
949
992
  'custom',
950
- 'dana',
951
- 'touch_n_go',
952
993
  'tamara',
953
994
  'qpay',
995
+ 'blik',
996
+ 'fpx',
997
+ 'wero',
998
+ 'p24',
954
999
  ]),
955
1000
  reference_number: zod_1.z.string().max(100).optional(),
956
1001
  custom_payment_method_id: zod_1.z.string().max(50).optional(),
@@ -1019,6 +1064,19 @@ const CollectPaymentCustomerPaymentMethodSchema = zod_1.z.object({
1019
1064
  'touch_n_go',
1020
1065
  'tamara',
1021
1066
  'qpay',
1067
+ 'ovo',
1068
+ 'momo',
1069
+ 'mercado_pago',
1070
+ 'nequi',
1071
+ 'nupay',
1072
+ 'picpay',
1073
+ 'thai_qr',
1074
+ 'blik',
1075
+ 'fpx',
1076
+ 'wero',
1077
+ 'p24',
1078
+ 'affirm_pay',
1079
+ 'rakuten_pay',
1022
1080
  ])
1023
1081
  .optional(),
1024
1082
  gateway_account_id: zod_1.z.string().max(50).optional(),
@@ -1035,7 +1093,7 @@ const CollectPaymentCustomerCardSchema = zod_1.z.object({
1035
1093
  expiry_year: zod_1.z.number().int().optional(),
1036
1094
  cvv: zod_1.z.string().max(520).optional(),
1037
1095
  preferred_scheme: zod_1.z
1038
- .enum(['cartes_bancaires', 'mastercard', 'visa'])
1096
+ .enum(['cartes_bancaires', 'mastercard', 'visa', 'dankort'])
1039
1097
  .optional(),
1040
1098
  billing_addr1: zod_1.z.string().max(150).optional(),
1041
1099
  billing_addr2: zod_1.z.string().max(150).optional(),
@@ -1104,6 +1162,19 @@ const CollectPaymentCustomerPaymentIntentSchema = zod_1.z.object({
1104
1162
  'touch_n_go',
1105
1163
  'tamara',
1106
1164
  'qpay',
1165
+ 'ovo',
1166
+ 'momo',
1167
+ 'mercado_pago',
1168
+ 'nequi',
1169
+ 'nupay',
1170
+ 'picpay',
1171
+ 'thai_qr',
1172
+ 'blik',
1173
+ 'fpx',
1174
+ 'wero',
1175
+ 'p24',
1176
+ 'affirm_pay',
1177
+ 'rakuten_pay',
1107
1178
  ])
1108
1179
  .optional(),
1109
1180
  gw_payment_method_id: zod_1.z.string().max(65000).optional(),
@@ -0,0 +1,104 @@
1
+ "use strict";
2
+ // Generated Zod schemas: Dispute
3
+ // Actions: list
4
+ // Do not edit manually – regenerate via sdk-generator
5
+ Object.defineProperty(exports, "__esModule", { value: true });
6
+ exports.ListDisputeBodySchema = void 0;
7
+ const zod_1 = require("zod");
8
+ //Dispute.list
9
+ const ListDisputeIdSchema = zod_1.z.object({
10
+ is: zod_1.z.string().min(1).optional(),
11
+ is_not: zod_1.z.string().min(1).optional(),
12
+ starts_with: zod_1.z.string().min(1).optional(),
13
+ in: zod_1.z.string().regex(RegExp('^\\[(.*)(,.*)*\\]$')).optional(),
14
+ not_in: zod_1.z.string().regex(RegExp('^\\[(.*)(,.*)*\\]$')).optional(),
15
+ });
16
+ const ListDisputeStatusSchema = zod_1.z.object({
17
+ is: zod_1.z
18
+ .enum([
19
+ 'initiated',
20
+ 'funds_withdrawn',
21
+ 'in_review',
22
+ 'cancelled',
23
+ 'lost',
24
+ 'won',
25
+ ])
26
+ .optional(),
27
+ is_not: zod_1.z
28
+ .enum([
29
+ 'initiated',
30
+ 'funds_withdrawn',
31
+ 'in_review',
32
+ 'cancelled',
33
+ 'lost',
34
+ 'won',
35
+ ])
36
+ .optional(),
37
+ in: zod_1.z
38
+ .enum([
39
+ 'initiated',
40
+ 'funds_withdrawn',
41
+ 'in_review',
42
+ 'cancelled',
43
+ 'lost',
44
+ 'won',
45
+ ])
46
+ .optional(),
47
+ not_in: zod_1.z
48
+ .enum([
49
+ 'initiated',
50
+ 'funds_withdrawn',
51
+ 'in_review',
52
+ 'cancelled',
53
+ 'lost',
54
+ 'won',
55
+ ])
56
+ .optional(),
57
+ });
58
+ const ListDisputeTypeSchema = zod_1.z.object({
59
+ is: zod_1.z.enum(['chargeback', 'inquiry']).optional(),
60
+ is_not: zod_1.z.enum(['chargeback', 'inquiry']).optional(),
61
+ in: zod_1.z.enum(['chargeback', 'inquiry']).optional(),
62
+ not_in: zod_1.z.enum(['chargeback', 'inquiry']).optional(),
63
+ });
64
+ const ListDisputeCustomerIdSchema = zod_1.z.object({
65
+ is: zod_1.z.string().min(1).optional(),
66
+ is_not: zod_1.z.string().min(1).optional(),
67
+ starts_with: zod_1.z.string().min(1).optional(),
68
+ in: zod_1.z.string().regex(RegExp('^\\[(.*)(,.*)*\\]$')).optional(),
69
+ not_in: zod_1.z.string().regex(RegExp('^\\[(.*)(,.*)*\\]$')).optional(),
70
+ });
71
+ const ListDisputeTransactionIdSchema = zod_1.z.object({
72
+ is: zod_1.z.string().min(1).optional(),
73
+ is_not: zod_1.z.string().min(1).optional(),
74
+ starts_with: zod_1.z.string().min(1).optional(),
75
+ in: zod_1.z.string().regex(RegExp('^\\[(.*)(,.*)*\\]$')).optional(),
76
+ not_in: zod_1.z.string().regex(RegExp('^\\[(.*)(,.*)*\\]$')).optional(),
77
+ });
78
+ const ListDisputeAmountSchema = zod_1.z.object({
79
+ is: zod_1.z.string().regex(RegExp('^-?\\d+$')).optional(),
80
+ is_not: zod_1.z.string().regex(RegExp('^-?\\d+$')).optional(),
81
+ lt: zod_1.z.string().regex(RegExp('^-?\\d+$')).optional(),
82
+ lte: zod_1.z.string().regex(RegExp('^-?\\d+$')).optional(),
83
+ gt: zod_1.z.string().regex(RegExp('^-?\\d+$')).optional(),
84
+ gte: zod_1.z.string().regex(RegExp('^-?\\d+$')).optional(),
85
+ between: zod_1.z.string().regex(RegExp('^\\[-?\\d+,-?\\d+\\]$')).optional(),
86
+ });
87
+ const ListDisputeCreatedAtSchema = zod_1.z.object({
88
+ after: zod_1.z.string().regex(RegExp('^\\d{10}$')).optional(),
89
+ before: zod_1.z.string().regex(RegExp('^\\d{10}$')).optional(),
90
+ on: zod_1.z.string().regex(RegExp('^\\d{10}$')).optional(),
91
+ between: zod_1.z.string().regex(RegExp('^\\[\\d{10},\\d{10}\\]$')).optional(),
92
+ });
93
+ const ListDisputeBodySchema = zod_1.z.looseObject({
94
+ limit: zod_1.z.number().int().min(1).max(100).optional(),
95
+ offset: zod_1.z.string().max(1000).optional(),
96
+ id: ListDisputeIdSchema.optional(),
97
+ status: ListDisputeStatusSchema.optional(),
98
+ type: ListDisputeTypeSchema.optional(),
99
+ customer_id: ListDisputeCustomerIdSchema.optional(),
100
+ transaction_id: ListDisputeTransactionIdSchema.optional(),
101
+ amount: ListDisputeAmountSchema.optional(),
102
+ created_at: ListDisputeCreatedAtSchema.optional(),
103
+ });
104
+ exports.ListDisputeBodySchema = ListDisputeBodySchema;
@@ -0,0 +1,37 @@
1
+ "use strict";
2
+ // Generated Zod schemas: Einvoice
3
+ // Actions: listEinvoices
4
+ // Do not edit manually – regenerate via sdk-generator
5
+ Object.defineProperty(exports, "__esModule", { value: true });
6
+ exports.ListEinvoicesEinvoiceBodySchema = void 0;
7
+ const zod_1 = require("zod");
8
+ //Einvoice.listEinvoices
9
+ const ListEinvoicesEinvoiceIdSchema = zod_1.z.object({
10
+ in: zod_1.z.string().regex(RegExp('^\\[(.*)(,.*)*\\]$')).optional(),
11
+ is: zod_1.z.string().min(1).optional(),
12
+ });
13
+ const ListEinvoicesEinvoiceReferenceIdSchema = zod_1.z.object({
14
+ in: zod_1.z.string().regex(RegExp('^\\[(.*)(,.*)*\\]$')).optional(),
15
+ is: zod_1.z.string().min(1).optional(),
16
+ });
17
+ const ListEinvoicesEinvoiceUpdatedAtSchema = zod_1.z.object({
18
+ after: zod_1.z.string().regex(RegExp('^\\d{10}$')).optional(),
19
+ before: zod_1.z.string().regex(RegExp('^\\d{10}$')).optional(),
20
+ on: zod_1.z.string().regex(RegExp('^\\d{10}$')).optional(),
21
+ between: zod_1.z.string().regex(RegExp('^\\[\\d{10},\\d{10}\\]$')).optional(),
22
+ });
23
+ const ListEinvoicesEinvoiceSortBySchema = zod_1.z.looseObject({
24
+ asc: zod_1.z.enum(['updated_at']).optional(),
25
+ desc: zod_1.z.enum(['updated_at']).optional(),
26
+ });
27
+ const ListEinvoicesEinvoiceBodySchema = zod_1.z.looseObject({
28
+ limit: zod_1.z.number().int().min(1).max(100).optional(),
29
+ offset: zod_1.z.string().max(1000).optional(),
30
+ id: ListEinvoicesEinvoiceIdSchema.optional(),
31
+ reference_id: ListEinvoicesEinvoiceReferenceIdSchema.optional(),
32
+ updated_at: ListEinvoicesEinvoiceUpdatedAtSchema.optional(),
33
+ sort_by: ListEinvoicesEinvoiceSortBySchema.optional(),
34
+ invoice_id: zod_1.z.string().max(50).optional(),
35
+ credit_note_id: zod_1.z.string().max(50).optional(),
36
+ });
37
+ exports.ListEinvoicesEinvoiceBodySchema = ListEinvoicesEinvoiceBodySchema;