chargebee 3.34.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.
- package/CHANGELOG.md +172 -0
- package/cjs/environment.js +1 -1
- package/cjs/resources/api_endpoints.js +174 -2
- package/cjs/resources/webhook/eventType.js +23 -1
- package/cjs/schema/business_entity.schema.js +28 -2
- package/cjs/schema/collections_payment_promise.schema.js +43 -0
- package/cjs/schema/comment.schema.js +2 -0
- package/cjs/schema/coupon.schema.js +1 -1
- package/cjs/schema/credit_note.schema.js +1 -0
- package/cjs/schema/credit_unit.schema.js +2 -2
- package/cjs/schema/einvoice.schema.js +2 -2
- package/cjs/schema/entitlement.schema.js +4 -4
- package/cjs/schema/estimate.schema.js +4 -4
- package/cjs/schema/event.schema.js +104 -4
- package/cjs/schema/export.schema.js +7 -7
- package/cjs/schema/hosted_page.schema.js +2 -2
- package/cjs/schema/index.js +3 -0
- package/cjs/schema/invoice.schema.js +24 -4
- package/cjs/schema/item.schema.js +1 -1
- package/cjs/schema/item_family.schema.js +1 -1
- package/cjs/schema/item_price.schema.js +1 -1
- package/cjs/schema/ledger_account_balance.schema.js +11 -2
- package/cjs/schema/ledger_operation.schema.js +2 -2
- package/cjs/schema/omnichannel_one_time_order.schema.js +12 -4
- package/cjs/schema/omnichannel_subscription.schema.js +18 -10
- package/cjs/schema/payment_source.schema.js +15 -0
- package/cjs/schema/price_ramp.schema.js +88 -0
- package/cjs/schema/price_variant.schema.js +1 -1
- package/cjs/schema/purchase.schema.js +6 -0
- package/cjs/schema/quote.schema.js +6 -6
- package/cjs/schema/ramp.schema.js +10 -6
- package/cjs/schema/retry_segment.schema.js +12 -0
- package/cjs/schema/subscription.schema.js +4 -4
- package/cjs/schema/usage.schema.js +5 -0
- package/cjs/schema/usage_summary.schema.js +1 -0
- package/cjs/schema/webhook_endpoint.schema.js +46 -2
- package/esm/environment.js +1 -1
- package/esm/resources/api_endpoints.js +174 -2
- package/esm/resources/webhook/eventType.js +23 -1
- package/esm/schema/business_entity.schema.js +27 -1
- package/esm/schema/collections_payment_promise.schema.js +40 -0
- package/esm/schema/comment.schema.js +2 -0
- package/esm/schema/coupon.schema.js +1 -1
- package/esm/schema/credit_note.schema.js +1 -0
- package/esm/schema/credit_unit.schema.js +2 -2
- package/esm/schema/einvoice.schema.js +2 -2
- package/esm/schema/entitlement.schema.js +4 -4
- package/esm/schema/estimate.schema.js +4 -4
- package/esm/schema/event.schema.js +104 -4
- package/esm/schema/export.schema.js +7 -7
- package/esm/schema/hosted_page.schema.js +2 -2
- package/esm/schema/index.js +3 -0
- package/esm/schema/invoice.schema.js +23 -3
- package/esm/schema/item.schema.js +1 -1
- package/esm/schema/item_family.schema.js +1 -1
- package/esm/schema/item_price.schema.js +1 -1
- package/esm/schema/ledger_account_balance.schema.js +10 -1
- package/esm/schema/ledger_operation.schema.js +2 -2
- package/esm/schema/omnichannel_one_time_order.schema.js +12 -4
- package/esm/schema/omnichannel_subscription.schema.js +18 -10
- package/esm/schema/payment_source.schema.js +15 -0
- package/esm/schema/price_ramp.schema.js +85 -0
- package/esm/schema/price_variant.schema.js +1 -1
- package/esm/schema/purchase.schema.js +6 -0
- package/esm/schema/quote.schema.js +6 -6
- package/esm/schema/ramp.schema.js +10 -6
- package/esm/schema/retry_segment.schema.js +9 -0
- package/esm/schema/subscription.schema.js +4 -4
- package/esm/schema/usage.schema.js +5 -0
- package/esm/schema/usage_summary.schema.js +1 -0
- package/esm/schema/webhook_endpoint.schema.js +46 -2
- package/package.json +1 -1
- package/types/core.d.ts +53 -68
- package/types/index.d.ts +22 -1
- package/types/resources/BusinessEntity.d.ts +52 -0
- package/types/resources/Citation.d.ts +13 -0
- package/types/resources/CollectionsDispute.d.ts +24 -0
- package/types/resources/CollectionsPaymentPromise.d.ts +93 -0
- package/types/resources/CollectionsReminderSequence.d.ts +35 -0
- package/types/resources/Comment.d.ts +2 -1
- package/types/resources/Content.d.ts +18 -1
- package/types/resources/CreditNote.d.ts +1 -0
- package/types/resources/CustomData.d.ts +14 -0
- package/types/resources/DraftEstimate.d.ts +13 -0
- package/types/resources/DraftRequest.d.ts +45 -0
- package/types/resources/EmailAttachment.d.ts +16 -0
- package/types/resources/EmailConversation.d.ts +18 -0
- package/types/resources/EmailLog.d.ts +1 -0
- package/types/resources/EmailMessage.d.ts +40 -0
- package/types/resources/Event.d.ts +23 -1
- package/types/resources/Execution.d.ts +12 -0
- package/types/resources/GatewayPaymentMethodToken.d.ts +2 -2
- package/types/resources/GroupByAttribute.d.ts +15 -0
- package/types/resources/GroupByRecommendation.d.ts +10 -0
- package/types/resources/Invoice.d.ts +15 -0
- package/types/resources/ItemPrice.d.ts +1 -0
- package/types/resources/LedgerAccountBalance.d.ts +19 -0
- package/types/resources/Meter.d.ts +1 -0
- package/types/resources/MeteredFeature.d.ts +1 -0
- package/types/resources/OmnichannelOneTimeOrder.d.ts +5 -1
- package/types/resources/OmnichannelSubscription.d.ts +6 -1
- package/types/resources/OmnichannelSubscriptionItem.d.ts +4 -1
- package/types/resources/PaymentSchedule.d.ts +1 -1
- package/types/resources/PaymentScheduleEstimate.d.ts +1 -1
- package/types/resources/PaymentSource.d.ts +19 -0
- package/types/resources/PreferenceVariant.d.ts +10 -0
- package/types/resources/PriceRamp.d.ts +113 -0
- package/types/resources/PrivateNote.d.ts +18 -0
- package/types/resources/Purchase.d.ts +6 -0
- package/types/resources/Ramp.d.ts +6 -0
- package/types/resources/RampInterval.d.ts +12 -0
- package/types/resources/RecordedPurchase.d.ts +5 -1
- package/types/resources/RetrySegment.d.ts +36 -0
- package/types/resources/Transaction.d.ts +4 -0
- package/types/resources/Usage.d.ts +6 -0
- package/types/resources/UsageSummary.d.ts +2 -0
- package/types/resources/WebhookEvent.d.ts +149 -5
- package/types/resources/AppliedBusinessRule.d.ts +0 -15
|
@@ -1707,6 +1707,19 @@ export const Endpoints = {
|
|
|
1707
1707
|
isIdempotent: true,
|
|
1708
1708
|
},
|
|
1709
1709
|
],
|
|
1710
|
+
[
|
|
1711
|
+
'removePaymentScheduleScheme',
|
|
1712
|
+
'POST',
|
|
1713
|
+
'/invoices',
|
|
1714
|
+
'/remove_payment_schedule_scheme',
|
|
1715
|
+
true,
|
|
1716
|
+
null,
|
|
1717
|
+
false,
|
|
1718
|
+
{},
|
|
1719
|
+
{
|
|
1720
|
+
isIdempotent: true,
|
|
1721
|
+
},
|
|
1722
|
+
],
|
|
1710
1723
|
[
|
|
1711
1724
|
'paymentSchedules',
|
|
1712
1725
|
'GET',
|
|
@@ -3566,7 +3579,9 @@ export const Endpoints = {
|
|
|
3566
3579
|
false,
|
|
3567
3580
|
null,
|
|
3568
3581
|
false,
|
|
3569
|
-
{
|
|
3582
|
+
{
|
|
3583
|
+
attributes: 1,
|
|
3584
|
+
},
|
|
3570
3585
|
{
|
|
3571
3586
|
isIdempotent: true,
|
|
3572
3587
|
},
|
|
@@ -4278,6 +4293,50 @@ export const Endpoints = {
|
|
|
4278
4293
|
],
|
|
4279
4294
|
['list', 'GET', '/differential_prices', null, false, null, false, {}, {}],
|
|
4280
4295
|
],
|
|
4296
|
+
priceRamp: [
|
|
4297
|
+
[
|
|
4298
|
+
'create',
|
|
4299
|
+
'POST',
|
|
4300
|
+
'/price_ramps',
|
|
4301
|
+
null,
|
|
4302
|
+
false,
|
|
4303
|
+
null,
|
|
4304
|
+
false,
|
|
4305
|
+
{},
|
|
4306
|
+
{
|
|
4307
|
+
isIdempotent: true,
|
|
4308
|
+
},
|
|
4309
|
+
],
|
|
4310
|
+
['retrieve', 'GET', '/price_ramps', null, true, null, false, {}, {}],
|
|
4311
|
+
[
|
|
4312
|
+
'update',
|
|
4313
|
+
'POST',
|
|
4314
|
+
'/price_ramps',
|
|
4315
|
+
null,
|
|
4316
|
+
true,
|
|
4317
|
+
null,
|
|
4318
|
+
false,
|
|
4319
|
+
{},
|
|
4320
|
+
{
|
|
4321
|
+
isIdempotent: true,
|
|
4322
|
+
},
|
|
4323
|
+
],
|
|
4324
|
+
[
|
|
4325
|
+
'delete',
|
|
4326
|
+
'POST',
|
|
4327
|
+
'/price_ramps',
|
|
4328
|
+
'/delete',
|
|
4329
|
+
true,
|
|
4330
|
+
null,
|
|
4331
|
+
false,
|
|
4332
|
+
{},
|
|
4333
|
+
{
|
|
4334
|
+
isIdempotent: true,
|
|
4335
|
+
},
|
|
4336
|
+
],
|
|
4337
|
+
['list', 'GET', '/price_ramps', null, false, null, false, {}, {}],
|
|
4338
|
+
],
|
|
4339
|
+
rampInterval: [],
|
|
4281
4340
|
configuration: [
|
|
4282
4341
|
['list', 'GET', '/configurations', null, false, null, false, {}, {}],
|
|
4283
4342
|
],
|
|
@@ -4623,6 +4682,34 @@ export const Endpoints = {
|
|
|
4623
4682
|
],
|
|
4624
4683
|
],
|
|
4625
4684
|
businessEntity: [
|
|
4685
|
+
[
|
|
4686
|
+
'create',
|
|
4687
|
+
'POST',
|
|
4688
|
+
'/business_entities',
|
|
4689
|
+
null,
|
|
4690
|
+
false,
|
|
4691
|
+
null,
|
|
4692
|
+
false,
|
|
4693
|
+
{},
|
|
4694
|
+
{
|
|
4695
|
+
isIdempotent: true,
|
|
4696
|
+
},
|
|
4697
|
+
],
|
|
4698
|
+
['list', 'GET', '/business_entities', null, false, null, false, {}, {}],
|
|
4699
|
+
['retrieve', 'GET', '/business_entities', null, true, null, false, {}, {}],
|
|
4700
|
+
[
|
|
4701
|
+
'update',
|
|
4702
|
+
'POST',
|
|
4703
|
+
'/business_entities',
|
|
4704
|
+
null,
|
|
4705
|
+
true,
|
|
4706
|
+
null,
|
|
4707
|
+
false,
|
|
4708
|
+
{},
|
|
4709
|
+
{
|
|
4710
|
+
isIdempotent: true,
|
|
4711
|
+
},
|
|
4712
|
+
],
|
|
4626
4713
|
[
|
|
4627
4714
|
'createTransfers',
|
|
4628
4715
|
'POST',
|
|
@@ -5004,7 +5091,12 @@ export const Endpoints = {
|
|
|
5004
5091
|
],
|
|
5005
5092
|
omnichannelOneTimeOrderItem: [],
|
|
5006
5093
|
rule: [['retrieve', 'GET', '/rules', null, true, null, false, {}, {}]],
|
|
5094
|
+
retrySegment: [
|
|
5095
|
+
['retrieve', 'GET', '/retry_segments', null, true, null, false, {}, {}],
|
|
5096
|
+
],
|
|
5007
5097
|
meter: [['list', 'GET', '/meters', null, false, null, false, {}, {}]],
|
|
5098
|
+
groupByAttribute: [],
|
|
5099
|
+
groupByRecommendation: [],
|
|
5008
5100
|
usageEvent: [
|
|
5009
5101
|
[
|
|
5010
5102
|
'create',
|
|
@@ -5088,6 +5180,7 @@ export const Endpoints = {
|
|
|
5088
5180
|
],
|
|
5089
5181
|
],
|
|
5090
5182
|
customDataSchema: [],
|
|
5183
|
+
customData: [],
|
|
5091
5184
|
usageFile: [
|
|
5092
5185
|
[
|
|
5093
5186
|
'uploadUrl',
|
|
@@ -5345,7 +5438,6 @@ export const Endpoints = {
|
|
|
5345
5438
|
],
|
|
5346
5439
|
applyRule: [],
|
|
5347
5440
|
appliedRule: [],
|
|
5348
|
-
appliedBusinessRule: [],
|
|
5349
5441
|
businessRuleset: [
|
|
5350
5442
|
[
|
|
5351
5443
|
'create',
|
|
@@ -5461,6 +5553,10 @@ export const Endpoints = {
|
|
|
5461
5553
|
['retrieve', 'GET', '/business_rulesets', null, true, null, false, {}, {}],
|
|
5462
5554
|
],
|
|
5463
5555
|
businessRulesetRule: [],
|
|
5556
|
+
draftRequest: [],
|
|
5557
|
+
citation: [],
|
|
5558
|
+
execution: [],
|
|
5559
|
+
draftEstimate: [],
|
|
5464
5560
|
usageSummary: [
|
|
5465
5561
|
[
|
|
5466
5562
|
'retrieveUsageSummaryForSubscription',
|
|
@@ -5566,6 +5662,71 @@ export const Endpoints = {
|
|
|
5566
5662
|
{},
|
|
5567
5663
|
],
|
|
5568
5664
|
],
|
|
5665
|
+
collectionsPaymentPromise: [
|
|
5666
|
+
[
|
|
5667
|
+
'retrieve',
|
|
5668
|
+
'GET',
|
|
5669
|
+
'/collections_payment_promises',
|
|
5670
|
+
null,
|
|
5671
|
+
true,
|
|
5672
|
+
null,
|
|
5673
|
+
false,
|
|
5674
|
+
{},
|
|
5675
|
+
{},
|
|
5676
|
+
],
|
|
5677
|
+
[
|
|
5678
|
+
'listCollectionsPaymentPromises',
|
|
5679
|
+
'GET',
|
|
5680
|
+
'/collections_payment_promises',
|
|
5681
|
+
null,
|
|
5682
|
+
false,
|
|
5683
|
+
null,
|
|
5684
|
+
false,
|
|
5685
|
+
{},
|
|
5686
|
+
{},
|
|
5687
|
+
],
|
|
5688
|
+
[
|
|
5689
|
+
'createCollectionsPaymentPromise',
|
|
5690
|
+
'POST',
|
|
5691
|
+
'/collections_payment_promises',
|
|
5692
|
+
null,
|
|
5693
|
+
false,
|
|
5694
|
+
null,
|
|
5695
|
+
false,
|
|
5696
|
+
{},
|
|
5697
|
+
{},
|
|
5698
|
+
],
|
|
5699
|
+
[
|
|
5700
|
+
'updateCollectionsPaymentPromise',
|
|
5701
|
+
'POST',
|
|
5702
|
+
'/collections_payment_promises',
|
|
5703
|
+
null,
|
|
5704
|
+
true,
|
|
5705
|
+
null,
|
|
5706
|
+
false,
|
|
5707
|
+
{},
|
|
5708
|
+
{
|
|
5709
|
+
isIdempotent: true,
|
|
5710
|
+
},
|
|
5711
|
+
],
|
|
5712
|
+
[
|
|
5713
|
+
'cancel',
|
|
5714
|
+
'POST',
|
|
5715
|
+
'/collections_payment_promises',
|
|
5716
|
+
'/cancel',
|
|
5717
|
+
true,
|
|
5718
|
+
null,
|
|
5719
|
+
false,
|
|
5720
|
+
{},
|
|
5721
|
+
{},
|
|
5722
|
+
],
|
|
5723
|
+
],
|
|
5724
|
+
collectionsDispute: [],
|
|
5725
|
+
collectionsReminderSequence: [],
|
|
5726
|
+
emailConversation: [],
|
|
5727
|
+
emailMessage: [],
|
|
5728
|
+
privateNote: [],
|
|
5729
|
+
emailAttachment: [],
|
|
5569
5730
|
ledgerAccountBalance: [
|
|
5570
5731
|
[
|
|
5571
5732
|
'listLedgerAccountBalances',
|
|
@@ -5578,6 +5739,17 @@ export const Endpoints = {
|
|
|
5578
5739
|
{},
|
|
5579
5740
|
{},
|
|
5580
5741
|
],
|
|
5742
|
+
[
|
|
5743
|
+
'updateOverdraftLimit',
|
|
5744
|
+
'POST',
|
|
5745
|
+
'/ledger_account_balances',
|
|
5746
|
+
'/update_overdraft_limit',
|
|
5747
|
+
false,
|
|
5748
|
+
null,
|
|
5749
|
+
false,
|
|
5750
|
+
{},
|
|
5751
|
+
{},
|
|
5752
|
+
],
|
|
5581
5753
|
],
|
|
5582
5754
|
ledgerOperation: [
|
|
5583
5755
|
[
|
|
@@ -23,7 +23,6 @@ export var WebhookEventType;
|
|
|
23
23
|
WebhookEventType["BusinessRuleDeleted"] = "business_rule_deleted";
|
|
24
24
|
WebhookEventType["BusinessRuleReleased"] = "business_rule_released";
|
|
25
25
|
WebhookEventType["BusinessRuleUpdated"] = "business_rule_updated";
|
|
26
|
-
WebhookEventType["BusinessRulesApplied"] = "business_rules_applied";
|
|
27
26
|
WebhookEventType["BusinessRulesetActivated"] = "business_ruleset_activated";
|
|
28
27
|
WebhookEventType["BusinessRulesetCreated"] = "business_ruleset_created";
|
|
29
28
|
WebhookEventType["BusinessRulesetDeactivated"] = "business_ruleset_deactivated";
|
|
@@ -34,6 +33,22 @@ export var WebhookEventType;
|
|
|
34
33
|
WebhookEventType["CardExpired"] = "card_expired";
|
|
35
34
|
WebhookEventType["CardExpiryReminder"] = "card_expiry_reminder";
|
|
36
35
|
WebhookEventType["CardUpdated"] = "card_updated";
|
|
36
|
+
WebhookEventType["ChargebackInitiated"] = "chargeback_initiated";
|
|
37
|
+
WebhookEventType["ChargebackLost"] = "chargeback_lost";
|
|
38
|
+
WebhookEventType["ChargebackWon"] = "chargeback_won";
|
|
39
|
+
WebhookEventType["CollectionsDisputeCreated"] = "collections_dispute_created";
|
|
40
|
+
WebhookEventType["CollectionsDisputeResolved"] = "collections_dispute_resolved";
|
|
41
|
+
WebhookEventType["CollectionsDisputeUpdated"] = "collections_dispute_updated";
|
|
42
|
+
WebhookEventType["CollectionsDisputeWithdrawn"] = "collections_dispute_withdrawn";
|
|
43
|
+
WebhookEventType["CollectionsPaymentPromiseBroken"] = "collections_payment_promise_broken";
|
|
44
|
+
WebhookEventType["CollectionsPaymentPromiseCancelled"] = "collections_payment_promise_cancelled";
|
|
45
|
+
WebhookEventType["CollectionsPaymentPromiseCreated"] = "collections_payment_promise_created";
|
|
46
|
+
WebhookEventType["CollectionsPaymentPromiseFulfilled"] = "collections_payment_promise_fulfilled";
|
|
47
|
+
WebhookEventType["CollectionsPaymentPromiseUpdated"] = "collections_payment_promise_updated";
|
|
48
|
+
WebhookEventType["CollectionsReminderSequenceCompleted"] = "collections_reminder_sequence_completed";
|
|
49
|
+
WebhookEventType["CollectionsReminderSequenceCreated"] = "collections_reminder_sequence_created";
|
|
50
|
+
WebhookEventType["CollectionsReminderSequencePaused"] = "collections_reminder_sequence_paused";
|
|
51
|
+
WebhookEventType["CollectionsReminderSequenceResumed"] = "collections_reminder_sequence_resumed";
|
|
37
52
|
WebhookEventType["ContractTermCancelled"] = "contract_term_cancelled";
|
|
38
53
|
WebhookEventType["ContractTermCompleted"] = "contract_term_completed";
|
|
39
54
|
WebhookEventType["ContractTermCreated"] = "contract_term_created";
|
|
@@ -65,6 +80,7 @@ export var WebhookEventType;
|
|
|
65
80
|
WebhookEventType["DunningUpdated"] = "dunning_updated";
|
|
66
81
|
WebhookEventType["EinvoiceCreated"] = "einvoice_created";
|
|
67
82
|
WebhookEventType["EinvoiceUpdated"] = "einvoice_updated";
|
|
83
|
+
WebhookEventType["EmailMessageReceived"] = "email_message_received";
|
|
68
84
|
WebhookEventType["EntitlementOverridesAutoRemoved"] = "entitlement_overrides_auto_removed";
|
|
69
85
|
WebhookEventType["EntitlementOverridesRemoved"] = "entitlement_overrides_removed";
|
|
70
86
|
WebhookEventType["EntitlementOverridesUpdated"] = "entitlement_overrides_updated";
|
|
@@ -152,6 +168,7 @@ export var WebhookEventType;
|
|
|
152
168
|
WebhookEventType["PaymentRefunded"] = "payment_refunded";
|
|
153
169
|
WebhookEventType["PaymentScheduleSchemeCreated"] = "payment_schedule_scheme_created";
|
|
154
170
|
WebhookEventType["PaymentScheduleSchemeDeleted"] = "payment_schedule_scheme_deleted";
|
|
171
|
+
WebhookEventType["PaymentSchedulesCancelled"] = "payment_schedules_cancelled";
|
|
155
172
|
WebhookEventType["PaymentSchedulesCreated"] = "payment_schedules_created";
|
|
156
173
|
WebhookEventType["PaymentSchedulesUpdated"] = "payment_schedules_updated";
|
|
157
174
|
WebhookEventType["PaymentSourceAdded"] = "payment_source_added";
|
|
@@ -167,9 +184,13 @@ export var WebhookEventType;
|
|
|
167
184
|
WebhookEventType["PlanCreated"] = "plan_created";
|
|
168
185
|
WebhookEventType["PlanDeleted"] = "plan_deleted";
|
|
169
186
|
WebhookEventType["PlanUpdated"] = "plan_updated";
|
|
187
|
+
WebhookEventType["PriceRampCreated"] = "price_ramp_created";
|
|
188
|
+
WebhookEventType["PriceRampDeleted"] = "price_ramp_deleted";
|
|
189
|
+
WebhookEventType["PriceRampUpdated"] = "price_ramp_updated";
|
|
170
190
|
WebhookEventType["PriceVariantCreated"] = "price_variant_created";
|
|
171
191
|
WebhookEventType["PriceVariantDeleted"] = "price_variant_deleted";
|
|
172
192
|
WebhookEventType["PriceVariantUpdated"] = "price_variant_updated";
|
|
193
|
+
WebhookEventType["PrivateNoteAdded"] = "private_note_added";
|
|
173
194
|
WebhookEventType["ProductCreated"] = "product_created";
|
|
174
195
|
WebhookEventType["ProductDeleted"] = "product_deleted";
|
|
175
196
|
WebhookEventType["ProductUpdated"] = "product_updated";
|
|
@@ -180,6 +201,7 @@ export var WebhookEventType;
|
|
|
180
201
|
WebhookEventType["QuoteDeleted"] = "quote_deleted";
|
|
181
202
|
WebhookEventType["QuoteUpdated"] = "quote_updated";
|
|
182
203
|
WebhookEventType["RecordPurchaseFailed"] = "record_purchase_failed";
|
|
204
|
+
WebhookEventType["RefundFailed"] = "refund_failed";
|
|
183
205
|
WebhookEventType["RefundInitiated"] = "refund_initiated";
|
|
184
206
|
WebhookEventType["RuleCreated"] = "rule_created";
|
|
185
207
|
WebhookEventType["RuleDeleted"] = "rule_deleted";
|
|
@@ -1,7 +1,33 @@
|
|
|
1
1
|
// Generated Zod schemas: BusinessEntity
|
|
2
|
-
// Actions: createTransfers, getTransfers
|
|
2
|
+
// Actions: create, list, update, createTransfers, getTransfers
|
|
3
3
|
// Do not edit manually – regenerate via sdk-generator
|
|
4
4
|
import { z } from 'zod';
|
|
5
|
+
//BusinessEntity.create
|
|
6
|
+
const CreateBusinessEntityBodySchema = z.looseObject({
|
|
7
|
+
name: z.string().max(100),
|
|
8
|
+
status: z.enum(['active', 'inactive']),
|
|
9
|
+
});
|
|
10
|
+
export { CreateBusinessEntityBodySchema };
|
|
11
|
+
//BusinessEntity.list
|
|
12
|
+
const ListBusinessEntityNameSchema = z.object({
|
|
13
|
+
is: z.string().min(1).optional(),
|
|
14
|
+
is_not: z.string().min(1).optional(),
|
|
15
|
+
starts_with: z.string().min(1).optional(),
|
|
16
|
+
is_present: z.enum(['true', 'false']).optional(),
|
|
17
|
+
});
|
|
18
|
+
const ListBusinessEntityBodySchema = z.looseObject({
|
|
19
|
+
limit: z.number().int().min(1).max(100).optional(),
|
|
20
|
+
offset: z.string().max(1000).optional(),
|
|
21
|
+
include_deleted: z.boolean().default(false).optional(),
|
|
22
|
+
name: ListBusinessEntityNameSchema.optional(),
|
|
23
|
+
});
|
|
24
|
+
export { ListBusinessEntityBodySchema };
|
|
25
|
+
//BusinessEntity.update
|
|
26
|
+
const UpdateBusinessEntityBodySchema = z.looseObject({
|
|
27
|
+
name: z.string().max(100).optional(),
|
|
28
|
+
status: z.enum(['active', 'inactive']).optional(),
|
|
29
|
+
});
|
|
30
|
+
export { UpdateBusinessEntityBodySchema };
|
|
5
31
|
//BusinessEntity.createTransfers
|
|
6
32
|
const CreateTransfersBusinessEntityBodySchema = z.looseObject({
|
|
7
33
|
active_resource_ids: z.array(z.string().max(50).optional()),
|
|
@@ -0,0 +1,40 @@
|
|
|
1
|
+
// Generated Zod schemas: CollectionsPaymentPromise
|
|
2
|
+
// Actions: listCollectionsPaymentPromises, createCollectionsPaymentPromise, updateCollectionsPaymentPromise
|
|
3
|
+
// Do not edit manually – regenerate via sdk-generator
|
|
4
|
+
import { z } from 'zod';
|
|
5
|
+
//CollectionsPaymentPromise.listCollectionsPaymentPromises
|
|
6
|
+
const ListCollectionsPaymentPromisesCollectionsPaymentPromiseCustomerIdSchema = z.object({
|
|
7
|
+
is: z.string().min(1).optional(),
|
|
8
|
+
});
|
|
9
|
+
const ListCollectionsPaymentPromisesCollectionsPaymentPromiseInvoiceIdSchema = z.object({
|
|
10
|
+
is: z.string().min(1).optional(),
|
|
11
|
+
});
|
|
12
|
+
const ListCollectionsPaymentPromisesCollectionsPaymentPromiseStatusSchema = z.object({
|
|
13
|
+
is: z.enum(['active', 'fulfilled', 'broken', 'cancelled']).optional(),
|
|
14
|
+
});
|
|
15
|
+
const ListCollectionsPaymentPromisesCollectionsPaymentPromiseBodySchema = z.looseObject({
|
|
16
|
+
limit: z.number().int().min(1).max(100).optional(),
|
|
17
|
+
offset: z.string().max(1000).optional(),
|
|
18
|
+
customer_id: ListCollectionsPaymentPromisesCollectionsPaymentPromiseCustomerIdSchema.optional(),
|
|
19
|
+
invoice_id: ListCollectionsPaymentPromisesCollectionsPaymentPromiseInvoiceIdSchema.optional(),
|
|
20
|
+
status: ListCollectionsPaymentPromisesCollectionsPaymentPromiseStatusSchema.optional(),
|
|
21
|
+
});
|
|
22
|
+
export { ListCollectionsPaymentPromisesCollectionsPaymentPromiseBodySchema };
|
|
23
|
+
//CollectionsPaymentPromise.createCollectionsPaymentPromise
|
|
24
|
+
const CreateCollectionsPaymentPromiseCollectionsPaymentPromiseBodySchema = z.looseObject({
|
|
25
|
+
customer_id: z.string().max(100),
|
|
26
|
+
invoice_id: z.string().max(100).optional(),
|
|
27
|
+
amount: z.number().int(),
|
|
28
|
+
currency_code: z.string().max(3).optional(),
|
|
29
|
+
promised_on: z.number().int(),
|
|
30
|
+
reason: z.string().max(500).optional(),
|
|
31
|
+
promised_by: z.string().max(254).optional(),
|
|
32
|
+
});
|
|
33
|
+
export { CreateCollectionsPaymentPromiseCollectionsPaymentPromiseBodySchema };
|
|
34
|
+
//CollectionsPaymentPromise.updateCollectionsPaymentPromise
|
|
35
|
+
const UpdateCollectionsPaymentPromiseCollectionsPaymentPromiseBodySchema = z.looseObject({
|
|
36
|
+
promised_on: z.number().int().optional(),
|
|
37
|
+
reason: z.string().max(500).optional(),
|
|
38
|
+
promised_by: z.string().max(254).optional(),
|
|
39
|
+
});
|
|
40
|
+
export { UpdateCollectionsPaymentPromiseCollectionsPaymentPromiseBodySchema };
|
|
@@ -20,6 +20,7 @@ const CreateCommentBodySchema = z.looseObject({
|
|
|
20
20
|
'item',
|
|
21
21
|
'item_price',
|
|
22
22
|
'price_variant',
|
|
23
|
+
'task',
|
|
23
24
|
]),
|
|
24
25
|
entity_id: z.string().max(100),
|
|
25
26
|
notes: z.string().max(1000),
|
|
@@ -57,6 +58,7 @@ const ListCommentBodySchema = z.looseObject({
|
|
|
57
58
|
'item',
|
|
58
59
|
'item_price',
|
|
59
60
|
'price_variant',
|
|
61
|
+
'task',
|
|
60
62
|
])
|
|
61
63
|
.optional(),
|
|
62
64
|
entity_id: z.string().max(100).optional(),
|
|
@@ -256,8 +256,8 @@ const ListCouponCurrencyCodeSchema = z.object({
|
|
|
256
256
|
not_in: z.string().regex(RegExp('^\\[(.*)(,.*)*\\]$')).optional(),
|
|
257
257
|
});
|
|
258
258
|
const ListCouponApplicableItemPriceIdsSchema = z.object({
|
|
259
|
-
is: z.string().min(1).optional(),
|
|
260
259
|
in: z.string().regex(RegExp('^\\[(.*)(,.*)*\\]$')).optional(),
|
|
260
|
+
is: z.string().min(1).optional(),
|
|
261
261
|
});
|
|
262
262
|
const ListCouponBodySchema = z.looseObject({
|
|
263
263
|
limit: z.number().int().min(1).max(100).optional(),
|
|
@@ -505,6 +505,7 @@ const ImportCreditNoteCreditNoteBodySchema = z.looseObject({
|
|
|
505
505
|
currency_code: z.string().max(3).optional(),
|
|
506
506
|
create_reason_code: z.string().max(100),
|
|
507
507
|
date: z.number().int(),
|
|
508
|
+
customer_notes: z.string().max(2000).optional(),
|
|
508
509
|
status: z.enum(['adjusted', 'refunded', 'refund_due', 'voided']).optional(),
|
|
509
510
|
total: z.number().int().min(0).optional(),
|
|
510
511
|
refunded_at: z.number().int().optional(),
|
|
@@ -4,12 +4,12 @@
|
|
|
4
4
|
import { z } from 'zod';
|
|
5
5
|
//CreditUnit.list
|
|
6
6
|
const ListCreditUnitStatusSchema = z.object({
|
|
7
|
-
is: z.enum(['active', 'archived']).optional(),
|
|
8
7
|
in: z.enum(['active', 'archived']).optional(),
|
|
8
|
+
is: z.enum(['active', 'archived']).optional(),
|
|
9
9
|
});
|
|
10
10
|
const ListCreditUnitIdSchema = z.object({
|
|
11
|
-
is: z.string().min(1).optional(),
|
|
12
11
|
in: z.string().regex(RegExp('^\\[(.*)(,.*)*\\]$')).optional(),
|
|
12
|
+
is: z.string().min(1).optional(),
|
|
13
13
|
});
|
|
14
14
|
const ListCreditUnitBodySchema = z.looseObject({
|
|
15
15
|
limit: z.number().int().min(1).max(100).optional(),
|
|
@@ -4,12 +4,12 @@
|
|
|
4
4
|
import { z } from 'zod';
|
|
5
5
|
//Einvoice.listEinvoices
|
|
6
6
|
const ListEinvoicesEinvoiceIdSchema = z.object({
|
|
7
|
-
is: z.string().min(1).optional(),
|
|
8
7
|
in: z.string().regex(RegExp('^\\[(.*)(,.*)*\\]$')).optional(),
|
|
8
|
+
is: z.string().min(1).optional(),
|
|
9
9
|
});
|
|
10
10
|
const ListEinvoicesEinvoiceReferenceIdSchema = z.object({
|
|
11
|
-
is: z.string().min(1).optional(),
|
|
12
11
|
in: z.string().regex(RegExp('^\\[(.*)(,.*)*\\]$')).optional(),
|
|
12
|
+
is: z.string().min(1).optional(),
|
|
13
13
|
});
|
|
14
14
|
const ListEinvoicesEinvoiceUpdatedAtSchema = z.object({
|
|
15
15
|
after: z.string().regex(RegExp('^\\d{10}$')).optional(),
|
|
@@ -4,20 +4,20 @@
|
|
|
4
4
|
import { z } from 'zod';
|
|
5
5
|
//Entitlement.list
|
|
6
6
|
const ListEntitlementFeatureIdSchema = z.object({
|
|
7
|
-
is: z.string().min(1).optional(),
|
|
8
7
|
in: z.string().regex(RegExp('^\\[(.*)(,.*)*\\]$')).optional(),
|
|
8
|
+
is: z.string().min(1).optional(),
|
|
9
9
|
});
|
|
10
10
|
const ListEntitlementEntityTypeSchema = z.object({
|
|
11
|
-
|
|
11
|
+
in: z
|
|
12
12
|
.enum(['plan', 'addon', 'charge', 'plan_price', 'addon_price'])
|
|
13
13
|
.optional(),
|
|
14
|
-
|
|
14
|
+
is: z
|
|
15
15
|
.enum(['plan', 'addon', 'charge', 'plan_price', 'addon_price'])
|
|
16
16
|
.optional(),
|
|
17
17
|
});
|
|
18
18
|
const ListEntitlementEntityIdSchema = z.object({
|
|
19
|
-
is: z.string().min(1).optional(),
|
|
20
19
|
in: z.string().regex(RegExp('^\\[(.*)(,.*)*\\]$')).optional(),
|
|
20
|
+
is: z.string().min(1).optional(),
|
|
21
21
|
});
|
|
22
22
|
const ListEntitlementBodySchema = z.looseObject({
|
|
23
23
|
limit: z.number().int().min(1).max(100).optional(),
|
|
@@ -281,7 +281,7 @@ const CreateSubItemEstimateEstimateSubscriptionItemsSchema = z.object({
|
|
|
281
281
|
billing_cycles: z.array(z.number().int().min(0).optional()).optional(),
|
|
282
282
|
trial_end: z.array(z.number().int().optional()).optional(),
|
|
283
283
|
service_period_days: z
|
|
284
|
-
.array(z.number().int().min(1).max(
|
|
284
|
+
.array(z.number().int().min(1).max(4000).optional())
|
|
285
285
|
.optional(),
|
|
286
286
|
charge_on_event: z
|
|
287
287
|
.array(z
|
|
@@ -547,7 +547,7 @@ const CreateSubItemForCustomerEstimateEstimateSubscriptionItemsSchema = z.object
|
|
|
547
547
|
billing_cycles: z.array(z.number().int().min(0).optional()).optional(),
|
|
548
548
|
trial_end: z.array(z.number().int().optional()).optional(),
|
|
549
549
|
service_period_days: z
|
|
550
|
-
.array(z.number().int().min(1).max(
|
|
550
|
+
.array(z.number().int().min(1).max(4000).optional())
|
|
551
551
|
.optional(),
|
|
552
552
|
charge_on_event: z
|
|
553
553
|
.array(z
|
|
@@ -832,7 +832,7 @@ const UpdateSubscriptionForItemsEstimateSubscriptionItemsSchema = z.object({
|
|
|
832
832
|
billing_cycles: z.array(z.number().int().min(0).optional()).optional(),
|
|
833
833
|
trial_end: z.array(z.number().int().optional()).optional(),
|
|
834
834
|
service_period_days: z
|
|
835
|
-
.array(z.number().int().min(1).max(
|
|
835
|
+
.array(z.number().int().min(1).max(4000).optional())
|
|
836
836
|
.optional(),
|
|
837
837
|
charge_on_event: z
|
|
838
838
|
.array(z
|
|
@@ -1020,7 +1020,7 @@ const CancelSubscriptionForItemsEstimateSubscriptionItemsSchema = z.object({
|
|
|
1020
1020
|
unit_price: z.array(z.number().int().min(0).optional()).optional(),
|
|
1021
1021
|
unit_price_in_decimal: z.array(z.string().max(39).optional()).optional(),
|
|
1022
1022
|
service_period_days: z
|
|
1023
|
-
.array(z.number().int().min(1).max(
|
|
1023
|
+
.array(z.number().int().min(1).max(4000).optional())
|
|
1024
1024
|
.optional(),
|
|
1025
1025
|
});
|
|
1026
1026
|
const CancelSubscriptionForItemsEstimateBodySchema = z.looseObject({
|