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.
- package/CHANGELOG.md +196 -0
- package/cjs/environment.js +1 -1
- package/cjs/resources/api_endpoints.js +323 -2
- package/cjs/resources/webhook/eventType.js +14 -0
- package/cjs/schema/business_rule.schema.js +54 -0
- package/cjs/schema/business_ruleset.schema.js +68 -0
- package/cjs/schema/card.schema.js +3 -1
- package/cjs/schema/credit_note.schema.js +10 -4
- package/cjs/schema/customer.schema.js +81 -10
- package/cjs/schema/dispute.schema.js +104 -0
- package/cjs/schema/einvoice.schema.js +37 -0
- package/cjs/schema/email_log.schema.js +28 -0
- package/cjs/schema/estimate.schema.js +38 -9
- package/cjs/schema/event.schema.js +56 -0
- package/cjs/schema/export.schema.js +68 -12
- package/cjs/schema/feature.schema.js +2 -2
- package/cjs/schema/gift.schema.js +27 -1
- package/cjs/schema/hosted_page.schema.js +26 -6
- package/cjs/schema/index.js +6 -0
- package/cjs/schema/invoice.schema.js +74 -10
- package/cjs/schema/ledger_operation.schema.js +4 -0
- package/cjs/schema/meter.schema.js +1 -1
- package/cjs/schema/metered_feature.schema.js +1 -1
- package/cjs/schema/payment_intent.schema.js +27 -0
- package/cjs/schema/payment_schedule.schema.js +36 -0
- package/cjs/schema/payment_schedule_scheme.schema.js +23 -2
- package/cjs/schema/payment_source.schema.js +103 -1
- package/cjs/schema/pricing_page_session.schema.js +1 -0
- package/cjs/schema/promotional_grant.schema.js +2 -0
- package/cjs/schema/purchase.schema.js +14 -1
- package/cjs/schema/quote.schema.js +2 -2
- package/cjs/schema/ramp.schema.js +8 -0
- package/cjs/schema/subscription.schema.js +179 -16
- package/cjs/schema/transaction.schema.js +60 -2
- package/cjs/schema/webhook_endpoint.schema.js +28 -0
- package/esm/environment.js +1 -1
- package/esm/resources/api_endpoints.js +323 -2
- package/esm/resources/webhook/eventType.js +14 -0
- package/esm/schema/business_rule.schema.js +51 -0
- package/esm/schema/business_ruleset.schema.js +65 -0
- package/esm/schema/card.schema.js +3 -1
- package/esm/schema/credit_note.schema.js +10 -4
- package/esm/schema/customer.schema.js +81 -10
- package/esm/schema/dispute.schema.js +101 -0
- package/esm/schema/einvoice.schema.js +34 -0
- package/esm/schema/email_log.schema.js +25 -0
- package/esm/schema/estimate.schema.js +38 -9
- package/esm/schema/event.schema.js +56 -0
- package/esm/schema/export.schema.js +68 -12
- package/esm/schema/feature.schema.js +2 -2
- package/esm/schema/gift.schema.js +27 -1
- package/esm/schema/hosted_page.schema.js +26 -6
- package/esm/schema/index.js +6 -0
- package/esm/schema/invoice.schema.js +74 -10
- package/esm/schema/ledger_operation.schema.js +4 -0
- package/esm/schema/meter.schema.js +1 -1
- package/esm/schema/metered_feature.schema.js +1 -1
- package/esm/schema/omnichannel_subscription.schema.js +1 -1
- package/esm/schema/payment_intent.schema.js +27 -0
- package/esm/schema/payment_schedule.schema.js +33 -0
- package/esm/schema/payment_schedule_scheme.schema.js +22 -1
- package/esm/schema/payment_source.schema.js +103 -1
- package/esm/schema/pricing_page_session.schema.js +1 -0
- package/esm/schema/promotional_grant.schema.js +2 -0
- package/esm/schema/purchase.schema.js +14 -1
- package/esm/schema/quote.schema.js +2 -2
- package/esm/schema/ramp.schema.js +8 -0
- package/esm/schema/subscription.schema.js +179 -16
- package/esm/schema/subscription_entitlement.schema.js +2 -2
- package/esm/schema/transaction.schema.js +60 -2
- package/esm/schema/webhook_endpoint.schema.js +28 -0
- package/package.json +1 -1
- package/types/core.d.ts +86 -8
- package/types/index.d.ts +15 -0
- package/types/resources/AppliedBusinessRule.d.ts +15 -0
- package/types/resources/AppliedRule.d.ts +14 -0
- package/types/resources/ApplyRule.d.ts +28 -0
- package/types/resources/BusinessRule.d.ts +161 -0
- package/types/resources/BusinessRuleset.d.ts +165 -0
- package/types/resources/BusinessRulesetRule.d.ts +9 -0
- package/types/resources/Card.d.ts +1 -1
- package/types/resources/Content.d.ts +9 -0
- package/types/resources/Coupon.d.ts +2 -2
- package/types/resources/CreditNote.d.ts +12 -0
- package/types/resources/CustomDataSchema.d.ts +15 -0
- package/types/resources/Customer.d.ts +42 -5
- package/types/resources/Dispute.d.ts +65 -0
- package/types/resources/Einvoice.d.ts +64 -1
- package/types/resources/EmailLog.d.ts +45 -0
- package/types/resources/Estimate.d.ts +34 -5
- package/types/resources/Event.d.ts +15 -0
- package/types/resources/Gift.d.ts +29 -3
- package/types/resources/GrantBlock.d.ts +26 -7
- package/types/resources/HostedPage.d.ts +14 -3
- package/types/resources/Invoice.d.ts +42 -4
- package/types/resources/LedgerEntry.d.ts +4 -4
- package/types/resources/LedgerOperation.d.ts +15 -8
- package/types/resources/OmnichannelSubscriptionItem.d.ts +5 -1
- package/types/resources/PaymentIntent.d.ts +72 -5
- package/types/resources/PaymentSchedule.d.ts +38 -1
- package/types/resources/PaymentScheduleEstimate.d.ts +1 -0
- package/types/resources/PaymentScheduleScheme.d.ts +17 -1
- package/types/resources/PaymentSource.d.ts +31 -2
- package/types/resources/PricingPageSession.d.ts +1 -0
- package/types/resources/PromotionalGrant.d.ts +2 -0
- package/types/resources/Purchase.d.ts +14 -1
- package/types/resources/Quote.d.ts +2 -2
- package/types/resources/QuotedSubscription.d.ts +3 -2
- package/types/resources/Ramp.d.ts +12 -0
- package/types/resources/Subscription.d.ts +116 -17
- package/types/resources/ThirdPartyPaymentMethod.d.ts +1 -0
- package/types/resources/Transaction.d.ts +5 -0
- package/types/resources/WebhookEvent.d.ts +70 -0
|
@@ -676,6 +676,19 @@ export const Endpoints = {
|
|
|
676
676
|
isIdempotent: true,
|
|
677
677
|
},
|
|
678
678
|
],
|
|
679
|
+
[
|
|
680
|
+
'sendPaymentRequest',
|
|
681
|
+
'POST',
|
|
682
|
+
'/customers',
|
|
683
|
+
'/send_payment_request',
|
|
684
|
+
true,
|
|
685
|
+
null,
|
|
686
|
+
false,
|
|
687
|
+
{},
|
|
688
|
+
{
|
|
689
|
+
isIdempotent: true,
|
|
690
|
+
},
|
|
691
|
+
],
|
|
679
692
|
[
|
|
680
693
|
'delete',
|
|
681
694
|
'POST',
|
|
@@ -1199,6 +1212,19 @@ export const Endpoints = {
|
|
|
1199
1212
|
{},
|
|
1200
1213
|
],
|
|
1201
1214
|
],
|
|
1215
|
+
emailLog: [
|
|
1216
|
+
[
|
|
1217
|
+
'emailLogsForCustomer',
|
|
1218
|
+
'GET',
|
|
1219
|
+
'/customers',
|
|
1220
|
+
'/email_logs',
|
|
1221
|
+
true,
|
|
1222
|
+
null,
|
|
1223
|
+
false,
|
|
1224
|
+
{},
|
|
1225
|
+
{},
|
|
1226
|
+
],
|
|
1227
|
+
],
|
|
1202
1228
|
invoice: [
|
|
1203
1229
|
[
|
|
1204
1230
|
'create',
|
|
@@ -1629,6 +1655,19 @@ export const Endpoints = {
|
|
|
1629
1655
|
isIdempotent: true,
|
|
1630
1656
|
},
|
|
1631
1657
|
],
|
|
1658
|
+
[
|
|
1659
|
+
'sendEmail',
|
|
1660
|
+
'POST',
|
|
1661
|
+
'/invoices',
|
|
1662
|
+
'/send_email',
|
|
1663
|
+
true,
|
|
1664
|
+
null,
|
|
1665
|
+
false,
|
|
1666
|
+
{},
|
|
1667
|
+
{
|
|
1668
|
+
isIdempotent: true,
|
|
1669
|
+
},
|
|
1670
|
+
],
|
|
1632
1671
|
[
|
|
1633
1672
|
'delete',
|
|
1634
1673
|
'POST',
|
|
@@ -1707,8 +1746,9 @@ export const Endpoints = {
|
|
|
1707
1746
|
],
|
|
1708
1747
|
],
|
|
1709
1748
|
paymentReferenceNumber: [],
|
|
1710
|
-
paymentSchedule: [
|
|
1711
|
-
|
|
1749
|
+
paymentSchedule: [
|
|
1750
|
+
['list', 'GET', '/payment_schedules', null, false, null, false, {}, {}],
|
|
1751
|
+
],
|
|
1712
1752
|
taxWithheld: [],
|
|
1713
1753
|
creditNote: [
|
|
1714
1754
|
[
|
|
@@ -1788,6 +1828,19 @@ export const Endpoints = {
|
|
|
1788
1828
|
isIdempotent: true,
|
|
1789
1829
|
},
|
|
1790
1830
|
],
|
|
1831
|
+
[
|
|
1832
|
+
'sendEmail',
|
|
1833
|
+
'POST',
|
|
1834
|
+
'/credit_notes',
|
|
1835
|
+
'/send_email',
|
|
1836
|
+
true,
|
|
1837
|
+
null,
|
|
1838
|
+
false,
|
|
1839
|
+
{},
|
|
1840
|
+
{
|
|
1841
|
+
isIdempotent: true,
|
|
1842
|
+
},
|
|
1843
|
+
],
|
|
1791
1844
|
['list', 'GET', '/credit_notes', null, false, null, false, {}, {}],
|
|
1792
1845
|
[
|
|
1793
1846
|
'creditNotesForCustomer',
|
|
@@ -2266,6 +2319,10 @@ export const Endpoints = {
|
|
|
2266
2319
|
},
|
|
2267
2320
|
],
|
|
2268
2321
|
],
|
|
2322
|
+
dispute: [
|
|
2323
|
+
['retrieve', 'GET', '/disputes', null, true, null, false, {}, {}],
|
|
2324
|
+
['list', 'GET', '/disputes', null, false, null, false, {}, {}],
|
|
2325
|
+
],
|
|
2269
2326
|
hostedPage: [
|
|
2270
2327
|
[
|
|
2271
2328
|
'checkoutNew',
|
|
@@ -4784,6 +4841,17 @@ export const Endpoints = {
|
|
|
4784
4841
|
{},
|
|
4785
4842
|
{},
|
|
4786
4843
|
],
|
|
4844
|
+
[
|
|
4845
|
+
'list',
|
|
4846
|
+
'GET',
|
|
4847
|
+
'/payment_schedule_schemes',
|
|
4848
|
+
null,
|
|
4849
|
+
false,
|
|
4850
|
+
null,
|
|
4851
|
+
false,
|
|
4852
|
+
{},
|
|
4853
|
+
{},
|
|
4854
|
+
],
|
|
4787
4855
|
[
|
|
4788
4856
|
'delete',
|
|
4789
4857
|
'POST',
|
|
@@ -5019,6 +5087,7 @@ export const Endpoints = {
|
|
|
5019
5087
|
},
|
|
5020
5088
|
],
|
|
5021
5089
|
],
|
|
5090
|
+
customDataSchema: [],
|
|
5022
5091
|
usageFile: [
|
|
5023
5092
|
[
|
|
5024
5093
|
'uploadUrl',
|
|
@@ -5043,6 +5112,10 @@ export const Endpoints = {
|
|
|
5043
5112
|
{},
|
|
5044
5113
|
],
|
|
5045
5114
|
],
|
|
5115
|
+
einvoice: [
|
|
5116
|
+
['retrieve', 'GET', '/einvoices', null, true, null, false, {}, {}],
|
|
5117
|
+
['listEinvoices', 'GET', '/einvoices', null, false, null, false, {}, {}],
|
|
5118
|
+
],
|
|
5046
5119
|
personalizedOffer: [
|
|
5047
5120
|
[
|
|
5048
5121
|
'personalizedOffers',
|
|
@@ -5140,6 +5213,254 @@ export const Endpoints = {
|
|
|
5140
5213
|
],
|
|
5141
5214
|
['list', 'GET', '/webhook_endpoints', null, false, null, false, {}, {}],
|
|
5142
5215
|
],
|
|
5216
|
+
businessRule: [
|
|
5217
|
+
[
|
|
5218
|
+
'create',
|
|
5219
|
+
'POST',
|
|
5220
|
+
'/business_rules',
|
|
5221
|
+
null,
|
|
5222
|
+
false,
|
|
5223
|
+
null,
|
|
5224
|
+
false,
|
|
5225
|
+
{
|
|
5226
|
+
tags: 0,
|
|
5227
|
+
structured_expression: 0,
|
|
5228
|
+
actions_on_success: 0,
|
|
5229
|
+
},
|
|
5230
|
+
{
|
|
5231
|
+
isIdempotent: true,
|
|
5232
|
+
},
|
|
5233
|
+
],
|
|
5234
|
+
[
|
|
5235
|
+
'delete',
|
|
5236
|
+
'POST',
|
|
5237
|
+
'/business_rules',
|
|
5238
|
+
'/delete',
|
|
5239
|
+
true,
|
|
5240
|
+
null,
|
|
5241
|
+
false,
|
|
5242
|
+
{},
|
|
5243
|
+
{
|
|
5244
|
+
isIdempotent: true,
|
|
5245
|
+
},
|
|
5246
|
+
],
|
|
5247
|
+
[
|
|
5248
|
+
'updateDraft',
|
|
5249
|
+
'POST',
|
|
5250
|
+
'/business_rules',
|
|
5251
|
+
'/draft',
|
|
5252
|
+
true,
|
|
5253
|
+
null,
|
|
5254
|
+
false,
|
|
5255
|
+
{
|
|
5256
|
+
tags: 0,
|
|
5257
|
+
structured_expression: 0,
|
|
5258
|
+
actions_on_success: 0,
|
|
5259
|
+
},
|
|
5260
|
+
{
|
|
5261
|
+
isIdempotent: true,
|
|
5262
|
+
},
|
|
5263
|
+
],
|
|
5264
|
+
['list', 'GET', '/business_rules', null, false, null, false, {}, {}],
|
|
5265
|
+
['retrieve', 'GET', '/business_rules', null, true, null, false, {}, {}],
|
|
5266
|
+
[
|
|
5267
|
+
'retrieveDraft',
|
|
5268
|
+
'GET',
|
|
5269
|
+
'/business_rules',
|
|
5270
|
+
'/draft',
|
|
5271
|
+
true,
|
|
5272
|
+
null,
|
|
5273
|
+
false,
|
|
5274
|
+
{},
|
|
5275
|
+
{},
|
|
5276
|
+
],
|
|
5277
|
+
[
|
|
5278
|
+
'deleteDraft',
|
|
5279
|
+
'POST',
|
|
5280
|
+
'/business_rules',
|
|
5281
|
+
'/delete_draft',
|
|
5282
|
+
true,
|
|
5283
|
+
null,
|
|
5284
|
+
false,
|
|
5285
|
+
{},
|
|
5286
|
+
{
|
|
5287
|
+
isIdempotent: true,
|
|
5288
|
+
},
|
|
5289
|
+
],
|
|
5290
|
+
[
|
|
5291
|
+
'activateRule',
|
|
5292
|
+
'POST',
|
|
5293
|
+
'/business_rules',
|
|
5294
|
+
'/activate',
|
|
5295
|
+
true,
|
|
5296
|
+
null,
|
|
5297
|
+
false,
|
|
5298
|
+
{},
|
|
5299
|
+
{
|
|
5300
|
+
isIdempotent: true,
|
|
5301
|
+
},
|
|
5302
|
+
],
|
|
5303
|
+
[
|
|
5304
|
+
'deactivateRule',
|
|
5305
|
+
'POST',
|
|
5306
|
+
'/business_rules',
|
|
5307
|
+
'/deactivate',
|
|
5308
|
+
true,
|
|
5309
|
+
null,
|
|
5310
|
+
false,
|
|
5311
|
+
{},
|
|
5312
|
+
{
|
|
5313
|
+
isIdempotent: true,
|
|
5314
|
+
},
|
|
5315
|
+
],
|
|
5316
|
+
[
|
|
5317
|
+
'releaseRule',
|
|
5318
|
+
'POST',
|
|
5319
|
+
'/business_rules',
|
|
5320
|
+
'/release',
|
|
5321
|
+
true,
|
|
5322
|
+
null,
|
|
5323
|
+
false,
|
|
5324
|
+
{},
|
|
5325
|
+
{
|
|
5326
|
+
isIdempotent: true,
|
|
5327
|
+
},
|
|
5328
|
+
],
|
|
5329
|
+
[
|
|
5330
|
+
'applyRules',
|
|
5331
|
+
'POST',
|
|
5332
|
+
'/business_rules',
|
|
5333
|
+
'/apply_rules',
|
|
5334
|
+
false,
|
|
5335
|
+
null,
|
|
5336
|
+
false,
|
|
5337
|
+
{
|
|
5338
|
+
structured_expression: 0,
|
|
5339
|
+
context: 0,
|
|
5340
|
+
},
|
|
5341
|
+
{
|
|
5342
|
+
isIdempotent: true,
|
|
5343
|
+
},
|
|
5344
|
+
],
|
|
5345
|
+
],
|
|
5346
|
+
applyRule: [],
|
|
5347
|
+
appliedRule: [],
|
|
5348
|
+
appliedBusinessRule: [],
|
|
5349
|
+
businessRuleset: [
|
|
5350
|
+
[
|
|
5351
|
+
'create',
|
|
5352
|
+
'POST',
|
|
5353
|
+
'/business_rulesets',
|
|
5354
|
+
null,
|
|
5355
|
+
false,
|
|
5356
|
+
null,
|
|
5357
|
+
false,
|
|
5358
|
+
{
|
|
5359
|
+
rules: 0,
|
|
5360
|
+
},
|
|
5361
|
+
{
|
|
5362
|
+
isIdempotent: true,
|
|
5363
|
+
},
|
|
5364
|
+
],
|
|
5365
|
+
[
|
|
5366
|
+
'update',
|
|
5367
|
+
'POST',
|
|
5368
|
+
'/business_rulesets',
|
|
5369
|
+
null,
|
|
5370
|
+
true,
|
|
5371
|
+
null,
|
|
5372
|
+
false,
|
|
5373
|
+
{
|
|
5374
|
+
rules: 0,
|
|
5375
|
+
},
|
|
5376
|
+
{
|
|
5377
|
+
isIdempotent: true,
|
|
5378
|
+
},
|
|
5379
|
+
],
|
|
5380
|
+
[
|
|
5381
|
+
'delete',
|
|
5382
|
+
'POST',
|
|
5383
|
+
'/business_rulesets',
|
|
5384
|
+
'/delete',
|
|
5385
|
+
true,
|
|
5386
|
+
null,
|
|
5387
|
+
false,
|
|
5388
|
+
{},
|
|
5389
|
+
{
|
|
5390
|
+
isIdempotent: true,
|
|
5391
|
+
},
|
|
5392
|
+
],
|
|
5393
|
+
[
|
|
5394
|
+
'activate',
|
|
5395
|
+
'POST',
|
|
5396
|
+
'/business_rulesets',
|
|
5397
|
+
'/activate',
|
|
5398
|
+
true,
|
|
5399
|
+
null,
|
|
5400
|
+
false,
|
|
5401
|
+
{},
|
|
5402
|
+
{
|
|
5403
|
+
isIdempotent: true,
|
|
5404
|
+
},
|
|
5405
|
+
],
|
|
5406
|
+
[
|
|
5407
|
+
'deactivate',
|
|
5408
|
+
'POST',
|
|
5409
|
+
'/business_rulesets',
|
|
5410
|
+
'/deactivate',
|
|
5411
|
+
true,
|
|
5412
|
+
null,
|
|
5413
|
+
false,
|
|
5414
|
+
{},
|
|
5415
|
+
{
|
|
5416
|
+
isIdempotent: true,
|
|
5417
|
+
},
|
|
5418
|
+
],
|
|
5419
|
+
[
|
|
5420
|
+
'addRules',
|
|
5421
|
+
'POST',
|
|
5422
|
+
'/business_rulesets',
|
|
5423
|
+
'/add_rules',
|
|
5424
|
+
true,
|
|
5425
|
+
null,
|
|
5426
|
+
false,
|
|
5427
|
+
{
|
|
5428
|
+
rules: 0,
|
|
5429
|
+
},
|
|
5430
|
+
{
|
|
5431
|
+
isIdempotent: true,
|
|
5432
|
+
},
|
|
5433
|
+
],
|
|
5434
|
+
[
|
|
5435
|
+
'removeRules',
|
|
5436
|
+
'POST',
|
|
5437
|
+
'/business_rulesets',
|
|
5438
|
+
'/remove_rules',
|
|
5439
|
+
true,
|
|
5440
|
+
null,
|
|
5441
|
+
false,
|
|
5442
|
+
{
|
|
5443
|
+
rules: 0,
|
|
5444
|
+
},
|
|
5445
|
+
{
|
|
5446
|
+
isIdempotent: true,
|
|
5447
|
+
},
|
|
5448
|
+
],
|
|
5449
|
+
[
|
|
5450
|
+
'listRules',
|
|
5451
|
+
'GET',
|
|
5452
|
+
'/business_rulesets',
|
|
5453
|
+
'/rules',
|
|
5454
|
+
true,
|
|
5455
|
+
null,
|
|
5456
|
+
false,
|
|
5457
|
+
{},
|
|
5458
|
+
{},
|
|
5459
|
+
],
|
|
5460
|
+
['list', 'GET', '/business_rulesets', null, false, null, false, {}, {}],
|
|
5461
|
+
['retrieve', 'GET', '/business_rulesets', null, true, null, false, {}, {}],
|
|
5462
|
+
],
|
|
5463
|
+
businessRulesetRule: [],
|
|
5143
5464
|
usageSummary: [
|
|
5144
5465
|
[
|
|
5145
5466
|
'retrieveUsageSummaryForSubscription',
|
|
@@ -17,6 +17,18 @@ export var WebhookEventType;
|
|
|
17
17
|
WebhookEventType["BusinessEntityCreated"] = "business_entity_created";
|
|
18
18
|
WebhookEventType["BusinessEntityDeleted"] = "business_entity_deleted";
|
|
19
19
|
WebhookEventType["BusinessEntityUpdated"] = "business_entity_updated";
|
|
20
|
+
WebhookEventType["BusinessRuleActivated"] = "business_rule_activated";
|
|
21
|
+
WebhookEventType["BusinessRuleCreated"] = "business_rule_created";
|
|
22
|
+
WebhookEventType["BusinessRuleDeactivated"] = "business_rule_deactivated";
|
|
23
|
+
WebhookEventType["BusinessRuleDeleted"] = "business_rule_deleted";
|
|
24
|
+
WebhookEventType["BusinessRuleReleased"] = "business_rule_released";
|
|
25
|
+
WebhookEventType["BusinessRuleUpdated"] = "business_rule_updated";
|
|
26
|
+
WebhookEventType["BusinessRulesApplied"] = "business_rules_applied";
|
|
27
|
+
WebhookEventType["BusinessRulesetActivated"] = "business_ruleset_activated";
|
|
28
|
+
WebhookEventType["BusinessRulesetCreated"] = "business_ruleset_created";
|
|
29
|
+
WebhookEventType["BusinessRulesetDeactivated"] = "business_ruleset_deactivated";
|
|
30
|
+
WebhookEventType["BusinessRulesetDeleted"] = "business_ruleset_deleted";
|
|
31
|
+
WebhookEventType["BusinessRulesetUpdated"] = "business_ruleset_updated";
|
|
20
32
|
WebhookEventType["CardAdded"] = "card_added";
|
|
21
33
|
WebhookEventType["CardDeleted"] = "card_deleted";
|
|
22
34
|
WebhookEventType["CardExpired"] = "card_expired";
|
|
@@ -51,6 +63,8 @@ export var WebhookEventType;
|
|
|
51
63
|
WebhookEventType["DifferentialPriceDeleted"] = "differential_price_deleted";
|
|
52
64
|
WebhookEventType["DifferentialPriceUpdated"] = "differential_price_updated";
|
|
53
65
|
WebhookEventType["DunningUpdated"] = "dunning_updated";
|
|
66
|
+
WebhookEventType["EinvoiceCreated"] = "einvoice_created";
|
|
67
|
+
WebhookEventType["EinvoiceUpdated"] = "einvoice_updated";
|
|
54
68
|
WebhookEventType["EntitlementOverridesAutoRemoved"] = "entitlement_overrides_auto_removed";
|
|
55
69
|
WebhookEventType["EntitlementOverridesRemoved"] = "entitlement_overrides_removed";
|
|
56
70
|
WebhookEventType["EntitlementOverridesUpdated"] = "entitlement_overrides_updated";
|
|
@@ -0,0 +1,51 @@
|
|
|
1
|
+
// Generated Zod schemas: BusinessRule
|
|
2
|
+
// Actions: create, updateDraft, list, applyRules
|
|
3
|
+
// Do not edit manually – regenerate via sdk-generator
|
|
4
|
+
import { z } from 'zod';
|
|
5
|
+
//BusinessRule.create
|
|
6
|
+
const CreateBusinessRuleStructuredExpressionSchema = z.looseObject({});
|
|
7
|
+
const CreateBusinessRuleBodySchema = z.looseObject({
|
|
8
|
+
id: z.string().max(100).optional(),
|
|
9
|
+
name: z.string().max(500),
|
|
10
|
+
description: z.string().max(1000).optional(),
|
|
11
|
+
tags: z.array(z.string().optional()).optional(),
|
|
12
|
+
structured_expression: CreateBusinessRuleStructuredExpressionSchema,
|
|
13
|
+
actions_on_success: z.array(z.string().optional()).optional(),
|
|
14
|
+
});
|
|
15
|
+
export { CreateBusinessRuleBodySchema };
|
|
16
|
+
//BusinessRule.updateDraft
|
|
17
|
+
const UpdateDraftBusinessRuleStructuredExpressionSchema = z.looseObject({});
|
|
18
|
+
const UpdateDraftBusinessRuleBodySchema = z.looseObject({
|
|
19
|
+
name: z.string().max(500),
|
|
20
|
+
description: z.string().max(1000).optional(),
|
|
21
|
+
tags: z.array(z.string().optional()).optional(),
|
|
22
|
+
structured_expression: UpdateDraftBusinessRuleStructuredExpressionSchema,
|
|
23
|
+
actions_on_success: z.array(z.string().optional()).optional(),
|
|
24
|
+
});
|
|
25
|
+
export { UpdateDraftBusinessRuleBodySchema };
|
|
26
|
+
//BusinessRule.list
|
|
27
|
+
const ListBusinessRuleDraftSchema = z.object({
|
|
28
|
+
is: z.enum(['true', 'false']).optional(),
|
|
29
|
+
});
|
|
30
|
+
const ListBusinessRuleActiveSchema = z.object({
|
|
31
|
+
is: z.enum(['true', 'false']).optional(),
|
|
32
|
+
});
|
|
33
|
+
const ListBusinessRuleBodySchema = z.looseObject({
|
|
34
|
+
limit: z.number().int().min(1).max(100).optional(),
|
|
35
|
+
offset: z.string().max(1000).optional(),
|
|
36
|
+
draft: ListBusinessRuleDraftSchema.optional(),
|
|
37
|
+
active: ListBusinessRuleActiveSchema.optional(),
|
|
38
|
+
});
|
|
39
|
+
export { ListBusinessRuleBodySchema };
|
|
40
|
+
//BusinessRule.applyRules
|
|
41
|
+
const ApplyRulesBusinessRuleStructuredExpressionSchema = z.looseObject({});
|
|
42
|
+
const ApplyRulesBusinessRuleContextSchema = z.looseObject({});
|
|
43
|
+
const ApplyRulesBusinessRuleBodySchema = z.looseObject({
|
|
44
|
+
evaluate: z.boolean().optional(),
|
|
45
|
+
rule_id: z.string().optional(),
|
|
46
|
+
ruleset_id: z.string().optional(),
|
|
47
|
+
skip_failed_rules: z.boolean().optional(),
|
|
48
|
+
structured_expression: ApplyRulesBusinessRuleStructuredExpressionSchema.optional(),
|
|
49
|
+
context: ApplyRulesBusinessRuleContextSchema.optional(),
|
|
50
|
+
});
|
|
51
|
+
export { ApplyRulesBusinessRuleBodySchema };
|
|
@@ -0,0 +1,65 @@
|
|
|
1
|
+
// Generated Zod schemas: BusinessRuleset
|
|
2
|
+
// Actions: create, update, addRules, removeRules, listRules, list
|
|
3
|
+
// Do not edit manually – regenerate via sdk-generator
|
|
4
|
+
import { z } from 'zod';
|
|
5
|
+
//BusinessRuleset.create
|
|
6
|
+
const CreateBusinessRulesetBodySchema = z.looseObject({
|
|
7
|
+
id: z.string().max(100).optional(),
|
|
8
|
+
name: z.string().max(500),
|
|
9
|
+
description: z.string().max(1000).optional(),
|
|
10
|
+
execute_mode: z
|
|
11
|
+
.enum([
|
|
12
|
+
'stop_on_first_true',
|
|
13
|
+
'stop_on_first_false',
|
|
14
|
+
'execute_all',
|
|
15
|
+
'execute_all_true',
|
|
16
|
+
])
|
|
17
|
+
.optional(),
|
|
18
|
+
rules: z.array(z.string().optional()).optional(),
|
|
19
|
+
});
|
|
20
|
+
export { CreateBusinessRulesetBodySchema };
|
|
21
|
+
//BusinessRuleset.update
|
|
22
|
+
const UpdateBusinessRulesetBodySchema = z.looseObject({
|
|
23
|
+
name: z.string().max(500),
|
|
24
|
+
description: z.string().max(1000).optional(),
|
|
25
|
+
execute_mode: z
|
|
26
|
+
.enum([
|
|
27
|
+
'stop_on_first_true',
|
|
28
|
+
'stop_on_first_false',
|
|
29
|
+
'execute_all',
|
|
30
|
+
'execute_all_true',
|
|
31
|
+
])
|
|
32
|
+
.optional(),
|
|
33
|
+
rules: z.array(z.string().optional()).optional(),
|
|
34
|
+
});
|
|
35
|
+
export { UpdateBusinessRulesetBodySchema };
|
|
36
|
+
//BusinessRuleset.addRules
|
|
37
|
+
const AddRulesBusinessRulesetBodySchema = z.looseObject({
|
|
38
|
+
rules: z.array(z.string().optional()).optional(),
|
|
39
|
+
});
|
|
40
|
+
export { AddRulesBusinessRulesetBodySchema };
|
|
41
|
+
//BusinessRuleset.removeRules
|
|
42
|
+
const RemoveRulesBusinessRulesetBodySchema = z.looseObject({
|
|
43
|
+
rules: z.array(z.string().optional()).optional(),
|
|
44
|
+
});
|
|
45
|
+
export { RemoveRulesBusinessRulesetBodySchema };
|
|
46
|
+
//BusinessRuleset.listRules
|
|
47
|
+
const ListRulesBusinessRulesetActiveSchema = z.object({
|
|
48
|
+
is: z.enum(['true', 'false']).optional(),
|
|
49
|
+
});
|
|
50
|
+
const ListRulesBusinessRulesetBodySchema = z.looseObject({
|
|
51
|
+
limit: z.number().int().min(1).max(100).optional(),
|
|
52
|
+
offset: z.string().max(1000).optional(),
|
|
53
|
+
active: ListRulesBusinessRulesetActiveSchema.optional(),
|
|
54
|
+
});
|
|
55
|
+
export { ListRulesBusinessRulesetBodySchema };
|
|
56
|
+
//BusinessRuleset.list
|
|
57
|
+
const ListBusinessRulesetActiveSchema = z.object({
|
|
58
|
+
is: z.enum(['true', 'false']).optional(),
|
|
59
|
+
});
|
|
60
|
+
const ListBusinessRulesetBodySchema = z.looseObject({
|
|
61
|
+
limit: z.number().int().min(1).max(100).optional(),
|
|
62
|
+
offset: z.string().max(1000).optional(),
|
|
63
|
+
active: ListBusinessRulesetActiveSchema.optional(),
|
|
64
|
+
});
|
|
65
|
+
export { ListBusinessRulesetBodySchema };
|
|
@@ -68,6 +68,7 @@ const UpdateCardForCustomerCardBodySchema = z.looseObject({
|
|
|
68
68
|
'tempus',
|
|
69
69
|
'moyasar',
|
|
70
70
|
'payway',
|
|
71
|
+
'payu',
|
|
71
72
|
])
|
|
72
73
|
.optional(),
|
|
73
74
|
gateway_account_id: z.string().max(50).optional(),
|
|
@@ -79,7 +80,7 @@ const UpdateCardForCustomerCardBodySchema = z.looseObject({
|
|
|
79
80
|
expiry_year: z.number().int(),
|
|
80
81
|
cvv: z.string().max(520).optional(),
|
|
81
82
|
preferred_scheme: z
|
|
82
|
-
.enum(['cartes_bancaires', 'mastercard', 'visa'])
|
|
83
|
+
.enum(['cartes_bancaires', 'mastercard', 'visa', 'dankort'])
|
|
83
84
|
.optional(),
|
|
84
85
|
billing_addr1: z.string().max(150).optional(),
|
|
85
86
|
billing_addr2: z.string().max(150).optional(),
|
|
@@ -150,6 +151,7 @@ const SwitchGatewayForCustomerCardBodySchema = z.looseObject({
|
|
|
150
151
|
'tempus',
|
|
151
152
|
'moyasar',
|
|
152
153
|
'payway',
|
|
154
|
+
'payu',
|
|
153
155
|
])
|
|
154
156
|
.optional(),
|
|
155
157
|
gateway_account_id: z.string().max(50),
|
|
@@ -92,10 +92,12 @@ const RecordRefundCreditNoteTransactionSchema = z.object({
|
|
|
92
92
|
'app_store',
|
|
93
93
|
'play_store',
|
|
94
94
|
'custom',
|
|
95
|
-
'dana',
|
|
96
|
-
'touch_n_go',
|
|
97
95
|
'tamara',
|
|
98
96
|
'qpay',
|
|
97
|
+
'blik',
|
|
98
|
+
'fpx',
|
|
99
|
+
'wero',
|
|
100
|
+
'p24',
|
|
99
101
|
]),
|
|
100
102
|
reference_number: z.string().max(100).optional(),
|
|
101
103
|
custom_payment_method_id: z.string().max(50).optional(),
|
|
@@ -410,6 +412,8 @@ const ImportCreditNoteCreditNoteLineItemsSchema = z.object({
|
|
|
410
412
|
tax9_amount: z.array(z.number().int().min(0).optional()).optional(),
|
|
411
413
|
tax10_name: z.array(z.string().max(50).optional()).optional(),
|
|
412
414
|
tax10_amount: z.array(z.number().int().min(0).optional()).optional(),
|
|
415
|
+
is_partial_tax_applied: z.array(z.boolean().optional()).optional(),
|
|
416
|
+
taxable_amount: z.array(z.number().int().min(0).optional()).optional(),
|
|
413
417
|
proration_mode: z
|
|
414
418
|
.array(z
|
|
415
419
|
.enum(['reset', 'delta', 'service_period_revision', 'adjusted_term'])
|
|
@@ -481,10 +485,12 @@ const ImportCreditNoteCreditNoteLinkedRefundsSchema = z.object({
|
|
|
481
485
|
'app_store',
|
|
482
486
|
'play_store',
|
|
483
487
|
'custom',
|
|
484
|
-
'dana',
|
|
485
|
-
'touch_n_go',
|
|
486
488
|
'tamara',
|
|
487
489
|
'qpay',
|
|
490
|
+
'blik',
|
|
491
|
+
'fpx',
|
|
492
|
+
'wero',
|
|
493
|
+
'p24',
|
|
488
494
|
])
|
|
489
495
|
.optional()),
|
|
490
496
|
date: z.array(z.number().int().optional()),
|