chargebee 3.32.0 → 3.34.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 (113) hide show
  1. package/CHANGELOG.md +196 -0
  2. package/cjs/environment.js +1 -1
  3. package/cjs/resources/api_endpoints.js +323 -2
  4. package/cjs/resources/webhook/eventType.js +14 -0
  5. package/cjs/schema/business_rule.schema.js +54 -0
  6. package/cjs/schema/business_ruleset.schema.js +68 -0
  7. package/cjs/schema/card.schema.js +3 -1
  8. package/cjs/schema/credit_note.schema.js +10 -4
  9. package/cjs/schema/customer.schema.js +81 -10
  10. package/cjs/schema/dispute.schema.js +104 -0
  11. package/cjs/schema/einvoice.schema.js +37 -0
  12. package/cjs/schema/email_log.schema.js +28 -0
  13. package/cjs/schema/estimate.schema.js +38 -9
  14. package/cjs/schema/event.schema.js +56 -0
  15. package/cjs/schema/export.schema.js +68 -12
  16. package/cjs/schema/feature.schema.js +2 -2
  17. package/cjs/schema/gift.schema.js +27 -1
  18. package/cjs/schema/hosted_page.schema.js +26 -6
  19. package/cjs/schema/index.js +6 -0
  20. package/cjs/schema/invoice.schema.js +74 -10
  21. package/cjs/schema/ledger_operation.schema.js +4 -0
  22. package/cjs/schema/meter.schema.js +1 -1
  23. package/cjs/schema/metered_feature.schema.js +1 -1
  24. package/cjs/schema/payment_intent.schema.js +27 -0
  25. package/cjs/schema/payment_schedule.schema.js +36 -0
  26. package/cjs/schema/payment_schedule_scheme.schema.js +23 -2
  27. package/cjs/schema/payment_source.schema.js +103 -1
  28. package/cjs/schema/pricing_page_session.schema.js +1 -0
  29. package/cjs/schema/promotional_grant.schema.js +2 -0
  30. package/cjs/schema/purchase.schema.js +14 -1
  31. package/cjs/schema/quote.schema.js +2 -2
  32. package/cjs/schema/ramp.schema.js +8 -0
  33. package/cjs/schema/subscription.schema.js +179 -16
  34. package/cjs/schema/transaction.schema.js +60 -2
  35. package/cjs/schema/webhook_endpoint.schema.js +28 -0
  36. package/esm/environment.js +1 -1
  37. package/esm/resources/api_endpoints.js +323 -2
  38. package/esm/resources/webhook/eventType.js +14 -0
  39. package/esm/schema/business_rule.schema.js +51 -0
  40. package/esm/schema/business_ruleset.schema.js +65 -0
  41. package/esm/schema/card.schema.js +3 -1
  42. package/esm/schema/credit_note.schema.js +10 -4
  43. package/esm/schema/customer.schema.js +81 -10
  44. package/esm/schema/dispute.schema.js +101 -0
  45. package/esm/schema/einvoice.schema.js +34 -0
  46. package/esm/schema/email_log.schema.js +25 -0
  47. package/esm/schema/estimate.schema.js +38 -9
  48. package/esm/schema/event.schema.js +56 -0
  49. package/esm/schema/export.schema.js +68 -12
  50. package/esm/schema/feature.schema.js +2 -2
  51. package/esm/schema/gift.schema.js +27 -1
  52. package/esm/schema/hosted_page.schema.js +26 -6
  53. package/esm/schema/index.js +6 -0
  54. package/esm/schema/invoice.schema.js +74 -10
  55. package/esm/schema/ledger_operation.schema.js +4 -0
  56. package/esm/schema/meter.schema.js +1 -1
  57. package/esm/schema/metered_feature.schema.js +1 -1
  58. package/esm/schema/omnichannel_subscription.schema.js +1 -1
  59. package/esm/schema/payment_intent.schema.js +27 -0
  60. package/esm/schema/payment_schedule.schema.js +33 -0
  61. package/esm/schema/payment_schedule_scheme.schema.js +22 -1
  62. package/esm/schema/payment_source.schema.js +103 -1
  63. package/esm/schema/pricing_page_session.schema.js +1 -0
  64. package/esm/schema/promotional_grant.schema.js +2 -0
  65. package/esm/schema/purchase.schema.js +14 -1
  66. package/esm/schema/quote.schema.js +2 -2
  67. package/esm/schema/ramp.schema.js +8 -0
  68. package/esm/schema/subscription.schema.js +179 -16
  69. package/esm/schema/subscription_entitlement.schema.js +2 -2
  70. package/esm/schema/transaction.schema.js +60 -2
  71. package/esm/schema/webhook_endpoint.schema.js +28 -0
  72. package/package.json +1 -1
  73. package/types/core.d.ts +86 -8
  74. package/types/index.d.ts +15 -0
  75. package/types/resources/AppliedBusinessRule.d.ts +15 -0
  76. package/types/resources/AppliedRule.d.ts +14 -0
  77. package/types/resources/ApplyRule.d.ts +28 -0
  78. package/types/resources/BusinessRule.d.ts +161 -0
  79. package/types/resources/BusinessRuleset.d.ts +165 -0
  80. package/types/resources/BusinessRulesetRule.d.ts +9 -0
  81. package/types/resources/Card.d.ts +1 -1
  82. package/types/resources/Content.d.ts +9 -0
  83. package/types/resources/Coupon.d.ts +2 -2
  84. package/types/resources/CreditNote.d.ts +12 -0
  85. package/types/resources/CustomDataSchema.d.ts +15 -0
  86. package/types/resources/Customer.d.ts +42 -5
  87. package/types/resources/Dispute.d.ts +65 -0
  88. package/types/resources/Einvoice.d.ts +64 -1
  89. package/types/resources/EmailLog.d.ts +45 -0
  90. package/types/resources/Estimate.d.ts +34 -5
  91. package/types/resources/Event.d.ts +15 -0
  92. package/types/resources/Gift.d.ts +29 -3
  93. package/types/resources/GrantBlock.d.ts +26 -7
  94. package/types/resources/HostedPage.d.ts +14 -3
  95. package/types/resources/Invoice.d.ts +42 -4
  96. package/types/resources/LedgerEntry.d.ts +4 -4
  97. package/types/resources/LedgerOperation.d.ts +15 -8
  98. package/types/resources/OmnichannelSubscriptionItem.d.ts +5 -1
  99. package/types/resources/PaymentIntent.d.ts +72 -5
  100. package/types/resources/PaymentSchedule.d.ts +38 -1
  101. package/types/resources/PaymentScheduleEstimate.d.ts +1 -0
  102. package/types/resources/PaymentScheduleScheme.d.ts +17 -1
  103. package/types/resources/PaymentSource.d.ts +31 -2
  104. package/types/resources/PricingPageSession.d.ts +1 -0
  105. package/types/resources/PromotionalGrant.d.ts +2 -0
  106. package/types/resources/Purchase.d.ts +14 -1
  107. package/types/resources/Quote.d.ts +2 -2
  108. package/types/resources/QuotedSubscription.d.ts +3 -2
  109. package/types/resources/Ramp.d.ts +12 -0
  110. package/types/resources/Subscription.d.ts +116 -17
  111. package/types/resources/ThirdPartyPaymentMethod.d.ts +1 -0
  112. package/types/resources/Transaction.d.ts +5 -0
  113. package/types/resources/WebhookEvent.d.ts +70 -0
@@ -679,6 +679,19 @@ exports.Endpoints = {
679
679
  isIdempotent: true,
680
680
  },
681
681
  ],
682
+ [
683
+ 'sendPaymentRequest',
684
+ 'POST',
685
+ '/customers',
686
+ '/send_payment_request',
687
+ true,
688
+ null,
689
+ false,
690
+ {},
691
+ {
692
+ isIdempotent: true,
693
+ },
694
+ ],
682
695
  [
683
696
  'delete',
684
697
  'POST',
@@ -1202,6 +1215,19 @@ exports.Endpoints = {
1202
1215
  {},
1203
1216
  ],
1204
1217
  ],
1218
+ emailLog: [
1219
+ [
1220
+ 'emailLogsForCustomer',
1221
+ 'GET',
1222
+ '/customers',
1223
+ '/email_logs',
1224
+ true,
1225
+ null,
1226
+ false,
1227
+ {},
1228
+ {},
1229
+ ],
1230
+ ],
1205
1231
  invoice: [
1206
1232
  [
1207
1233
  'create',
@@ -1632,6 +1658,19 @@ exports.Endpoints = {
1632
1658
  isIdempotent: true,
1633
1659
  },
1634
1660
  ],
1661
+ [
1662
+ 'sendEmail',
1663
+ 'POST',
1664
+ '/invoices',
1665
+ '/send_email',
1666
+ true,
1667
+ null,
1668
+ false,
1669
+ {},
1670
+ {
1671
+ isIdempotent: true,
1672
+ },
1673
+ ],
1635
1674
  [
1636
1675
  'delete',
1637
1676
  'POST',
@@ -1710,8 +1749,9 @@ exports.Endpoints = {
1710
1749
  ],
1711
1750
  ],
1712
1751
  paymentReferenceNumber: [],
1713
- paymentSchedule: [],
1714
- einvoice: [],
1752
+ paymentSchedule: [
1753
+ ['list', 'GET', '/payment_schedules', null, false, null, false, {}, {}],
1754
+ ],
1715
1755
  taxWithheld: [],
1716
1756
  creditNote: [
1717
1757
  [
@@ -1791,6 +1831,19 @@ exports.Endpoints = {
1791
1831
  isIdempotent: true,
1792
1832
  },
1793
1833
  ],
1834
+ [
1835
+ 'sendEmail',
1836
+ 'POST',
1837
+ '/credit_notes',
1838
+ '/send_email',
1839
+ true,
1840
+ null,
1841
+ false,
1842
+ {},
1843
+ {
1844
+ isIdempotent: true,
1845
+ },
1846
+ ],
1794
1847
  ['list', 'GET', '/credit_notes', null, false, null, false, {}, {}],
1795
1848
  [
1796
1849
  'creditNotesForCustomer',
@@ -2269,6 +2322,10 @@ exports.Endpoints = {
2269
2322
  },
2270
2323
  ],
2271
2324
  ],
2325
+ dispute: [
2326
+ ['retrieve', 'GET', '/disputes', null, true, null, false, {}, {}],
2327
+ ['list', 'GET', '/disputes', null, false, null, false, {}, {}],
2328
+ ],
2272
2329
  hostedPage: [
2273
2330
  [
2274
2331
  'checkoutNew',
@@ -4787,6 +4844,17 @@ exports.Endpoints = {
4787
4844
  {},
4788
4845
  {},
4789
4846
  ],
4847
+ [
4848
+ 'list',
4849
+ 'GET',
4850
+ '/payment_schedule_schemes',
4851
+ null,
4852
+ false,
4853
+ null,
4854
+ false,
4855
+ {},
4856
+ {},
4857
+ ],
4790
4858
  [
4791
4859
  'delete',
4792
4860
  'POST',
@@ -5022,6 +5090,7 @@ exports.Endpoints = {
5022
5090
  },
5023
5091
  ],
5024
5092
  ],
5093
+ customDataSchema: [],
5025
5094
  usageFile: [
5026
5095
  [
5027
5096
  'uploadUrl',
@@ -5046,6 +5115,10 @@ exports.Endpoints = {
5046
5115
  {},
5047
5116
  ],
5048
5117
  ],
5118
+ einvoice: [
5119
+ ['retrieve', 'GET', '/einvoices', null, true, null, false, {}, {}],
5120
+ ['listEinvoices', 'GET', '/einvoices', null, false, null, false, {}, {}],
5121
+ ],
5049
5122
  personalizedOffer: [
5050
5123
  [
5051
5124
  'personalizedOffers',
@@ -5143,6 +5216,254 @@ exports.Endpoints = {
5143
5216
  ],
5144
5217
  ['list', 'GET', '/webhook_endpoints', null, false, null, false, {}, {}],
5145
5218
  ],
5219
+ businessRule: [
5220
+ [
5221
+ 'create',
5222
+ 'POST',
5223
+ '/business_rules',
5224
+ null,
5225
+ false,
5226
+ null,
5227
+ false,
5228
+ {
5229
+ tags: 0,
5230
+ structured_expression: 0,
5231
+ actions_on_success: 0,
5232
+ },
5233
+ {
5234
+ isIdempotent: true,
5235
+ },
5236
+ ],
5237
+ [
5238
+ 'delete',
5239
+ 'POST',
5240
+ '/business_rules',
5241
+ '/delete',
5242
+ true,
5243
+ null,
5244
+ false,
5245
+ {},
5246
+ {
5247
+ isIdempotent: true,
5248
+ },
5249
+ ],
5250
+ [
5251
+ 'updateDraft',
5252
+ 'POST',
5253
+ '/business_rules',
5254
+ '/draft',
5255
+ true,
5256
+ null,
5257
+ false,
5258
+ {
5259
+ tags: 0,
5260
+ structured_expression: 0,
5261
+ actions_on_success: 0,
5262
+ },
5263
+ {
5264
+ isIdempotent: true,
5265
+ },
5266
+ ],
5267
+ ['list', 'GET', '/business_rules', null, false, null, false, {}, {}],
5268
+ ['retrieve', 'GET', '/business_rules', null, true, null, false, {}, {}],
5269
+ [
5270
+ 'retrieveDraft',
5271
+ 'GET',
5272
+ '/business_rules',
5273
+ '/draft',
5274
+ true,
5275
+ null,
5276
+ false,
5277
+ {},
5278
+ {},
5279
+ ],
5280
+ [
5281
+ 'deleteDraft',
5282
+ 'POST',
5283
+ '/business_rules',
5284
+ '/delete_draft',
5285
+ true,
5286
+ null,
5287
+ false,
5288
+ {},
5289
+ {
5290
+ isIdempotent: true,
5291
+ },
5292
+ ],
5293
+ [
5294
+ 'activateRule',
5295
+ 'POST',
5296
+ '/business_rules',
5297
+ '/activate',
5298
+ true,
5299
+ null,
5300
+ false,
5301
+ {},
5302
+ {
5303
+ isIdempotent: true,
5304
+ },
5305
+ ],
5306
+ [
5307
+ 'deactivateRule',
5308
+ 'POST',
5309
+ '/business_rules',
5310
+ '/deactivate',
5311
+ true,
5312
+ null,
5313
+ false,
5314
+ {},
5315
+ {
5316
+ isIdempotent: true,
5317
+ },
5318
+ ],
5319
+ [
5320
+ 'releaseRule',
5321
+ 'POST',
5322
+ '/business_rules',
5323
+ '/release',
5324
+ true,
5325
+ null,
5326
+ false,
5327
+ {},
5328
+ {
5329
+ isIdempotent: true,
5330
+ },
5331
+ ],
5332
+ [
5333
+ 'applyRules',
5334
+ 'POST',
5335
+ '/business_rules',
5336
+ '/apply_rules',
5337
+ false,
5338
+ null,
5339
+ false,
5340
+ {
5341
+ structured_expression: 0,
5342
+ context: 0,
5343
+ },
5344
+ {
5345
+ isIdempotent: true,
5346
+ },
5347
+ ],
5348
+ ],
5349
+ applyRule: [],
5350
+ appliedRule: [],
5351
+ appliedBusinessRule: [],
5352
+ businessRuleset: [
5353
+ [
5354
+ 'create',
5355
+ 'POST',
5356
+ '/business_rulesets',
5357
+ null,
5358
+ false,
5359
+ null,
5360
+ false,
5361
+ {
5362
+ rules: 0,
5363
+ },
5364
+ {
5365
+ isIdempotent: true,
5366
+ },
5367
+ ],
5368
+ [
5369
+ 'update',
5370
+ 'POST',
5371
+ '/business_rulesets',
5372
+ null,
5373
+ true,
5374
+ null,
5375
+ false,
5376
+ {
5377
+ rules: 0,
5378
+ },
5379
+ {
5380
+ isIdempotent: true,
5381
+ },
5382
+ ],
5383
+ [
5384
+ 'delete',
5385
+ 'POST',
5386
+ '/business_rulesets',
5387
+ '/delete',
5388
+ true,
5389
+ null,
5390
+ false,
5391
+ {},
5392
+ {
5393
+ isIdempotent: true,
5394
+ },
5395
+ ],
5396
+ [
5397
+ 'activate',
5398
+ 'POST',
5399
+ '/business_rulesets',
5400
+ '/activate',
5401
+ true,
5402
+ null,
5403
+ false,
5404
+ {},
5405
+ {
5406
+ isIdempotent: true,
5407
+ },
5408
+ ],
5409
+ [
5410
+ 'deactivate',
5411
+ 'POST',
5412
+ '/business_rulesets',
5413
+ '/deactivate',
5414
+ true,
5415
+ null,
5416
+ false,
5417
+ {},
5418
+ {
5419
+ isIdempotent: true,
5420
+ },
5421
+ ],
5422
+ [
5423
+ 'addRules',
5424
+ 'POST',
5425
+ '/business_rulesets',
5426
+ '/add_rules',
5427
+ true,
5428
+ null,
5429
+ false,
5430
+ {
5431
+ rules: 0,
5432
+ },
5433
+ {
5434
+ isIdempotent: true,
5435
+ },
5436
+ ],
5437
+ [
5438
+ 'removeRules',
5439
+ 'POST',
5440
+ '/business_rulesets',
5441
+ '/remove_rules',
5442
+ true,
5443
+ null,
5444
+ false,
5445
+ {
5446
+ rules: 0,
5447
+ },
5448
+ {
5449
+ isIdempotent: true,
5450
+ },
5451
+ ],
5452
+ [
5453
+ 'listRules',
5454
+ 'GET',
5455
+ '/business_rulesets',
5456
+ '/rules',
5457
+ true,
5458
+ null,
5459
+ false,
5460
+ {},
5461
+ {},
5462
+ ],
5463
+ ['list', 'GET', '/business_rulesets', null, false, null, false, {}, {}],
5464
+ ['retrieve', 'GET', '/business_rulesets', null, true, null, false, {}, {}],
5465
+ ],
5466
+ businessRulesetRule: [],
5146
5467
  usageSummary: [
5147
5468
  [
5148
5469
  'retrieveUsageSummaryForSubscription',
@@ -20,6 +20,18 @@ var WebhookEventType;
20
20
  WebhookEventType["BusinessEntityCreated"] = "business_entity_created";
21
21
  WebhookEventType["BusinessEntityDeleted"] = "business_entity_deleted";
22
22
  WebhookEventType["BusinessEntityUpdated"] = "business_entity_updated";
23
+ WebhookEventType["BusinessRuleActivated"] = "business_rule_activated";
24
+ WebhookEventType["BusinessRuleCreated"] = "business_rule_created";
25
+ WebhookEventType["BusinessRuleDeactivated"] = "business_rule_deactivated";
26
+ WebhookEventType["BusinessRuleDeleted"] = "business_rule_deleted";
27
+ WebhookEventType["BusinessRuleReleased"] = "business_rule_released";
28
+ WebhookEventType["BusinessRuleUpdated"] = "business_rule_updated";
29
+ WebhookEventType["BusinessRulesApplied"] = "business_rules_applied";
30
+ WebhookEventType["BusinessRulesetActivated"] = "business_ruleset_activated";
31
+ WebhookEventType["BusinessRulesetCreated"] = "business_ruleset_created";
32
+ WebhookEventType["BusinessRulesetDeactivated"] = "business_ruleset_deactivated";
33
+ WebhookEventType["BusinessRulesetDeleted"] = "business_ruleset_deleted";
34
+ WebhookEventType["BusinessRulesetUpdated"] = "business_ruleset_updated";
23
35
  WebhookEventType["CardAdded"] = "card_added";
24
36
  WebhookEventType["CardDeleted"] = "card_deleted";
25
37
  WebhookEventType["CardExpired"] = "card_expired";
@@ -54,6 +66,8 @@ var WebhookEventType;
54
66
  WebhookEventType["DifferentialPriceDeleted"] = "differential_price_deleted";
55
67
  WebhookEventType["DifferentialPriceUpdated"] = "differential_price_updated";
56
68
  WebhookEventType["DunningUpdated"] = "dunning_updated";
69
+ WebhookEventType["EinvoiceCreated"] = "einvoice_created";
70
+ WebhookEventType["EinvoiceUpdated"] = "einvoice_updated";
57
71
  WebhookEventType["EntitlementOverridesAutoRemoved"] = "entitlement_overrides_auto_removed";
58
72
  WebhookEventType["EntitlementOverridesRemoved"] = "entitlement_overrides_removed";
59
73
  WebhookEventType["EntitlementOverridesUpdated"] = "entitlement_overrides_updated";
@@ -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),
@@ -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()),