chargebee 3.33.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 +190 -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 +35 -6
- 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 +26 -0
- package/cjs/schema/hosted_page.schema.js +24 -4
- 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/omnichannel_subscription.schema.js +4 -4
- 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/ramp.schema.js +8 -0
- package/cjs/schema/subscription.schema.js +175 -12
- 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 +35 -6
- 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 +26 -0
- package/esm/schema/hosted_page.schema.js +24 -4
- 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 +4 -4
- 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/ramp.schema.js +8 -0
- package/esm/schema/subscription.schema.js +175 -12
- 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/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 +31 -2
- package/types/resources/Event.d.ts +15 -0
- package/types/resources/Gift.d.ts +28 -2
- package/types/resources/GrantBlock.d.ts +26 -7
- package/types/resources/HostedPage.d.ts +11 -0
- 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/QuotedSubscription.d.ts +1 -0
- package/types/resources/Ramp.d.ts +12 -0
- package/types/resources/Subscription.d.ts +110 -11
- package/types/resources/ThirdPartyPaymentMethod.d.ts +1 -0
- package/types/resources/Transaction.d.ts +5 -0
- package/types/resources/WebhookEvent.d.ts +70 -0
|
@@ -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()),
|
|
@@ -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
|
+
is: zod_1.z.string().min(1).optional(),
|
|
11
|
+
in: zod_1.z.string().regex(RegExp('^\\[(.*)(,.*)*\\]$')).optional(),
|
|
12
|
+
});
|
|
13
|
+
const ListEinvoicesEinvoiceReferenceIdSchema = zod_1.z.object({
|
|
14
|
+
is: zod_1.z.string().min(1).optional(),
|
|
15
|
+
in: zod_1.z.string().regex(RegExp('^\\[(.*)(,.*)*\\]$')).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;
|
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
// Generated Zod schemas: EmailLog
|
|
3
|
+
// Actions: emailLogsForCustomer
|
|
4
|
+
// Do not edit manually – regenerate via sdk-generator
|
|
5
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
6
|
+
exports.EmailLogsForCustomerEmailLogBodySchema = void 0;
|
|
7
|
+
const zod_1 = require("zod");
|
|
8
|
+
//EmailLog.emailLogsForCustomer
|
|
9
|
+
const EmailLogsForCustomerEmailLogSentOnSchema = zod_1.z.object({
|
|
10
|
+
after: zod_1.z.string().regex(RegExp('^\\d{10}$')).optional(),
|
|
11
|
+
before: zod_1.z.string().regex(RegExp('^\\d{10}$')).optional(),
|
|
12
|
+
on: zod_1.z.string().regex(RegExp('^\\d{10}$')).optional(),
|
|
13
|
+
between: zod_1.z.string().regex(RegExp('^\\[\\d{10},\\d{10}\\]$')).optional(),
|
|
14
|
+
});
|
|
15
|
+
const EmailLogsForCustomerEmailLogBusinessEntityIdSchema = zod_1.z.object({
|
|
16
|
+
is: zod_1.z.string().min(1).optional(),
|
|
17
|
+
});
|
|
18
|
+
const EmailLogsForCustomerEmailLogBrandIdSchema = zod_1.z.object({
|
|
19
|
+
is: zod_1.z.string().min(1).optional(),
|
|
20
|
+
});
|
|
21
|
+
const EmailLogsForCustomerEmailLogBodySchema = 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
|
+
sent_on: EmailLogsForCustomerEmailLogSentOnSchema.optional(),
|
|
25
|
+
business_entity_id: EmailLogsForCustomerEmailLogBusinessEntityIdSchema.optional(),
|
|
26
|
+
brand_id: EmailLogsForCustomerEmailLogBrandIdSchema.optional(),
|
|
27
|
+
});
|
|
28
|
+
exports.EmailLogsForCustomerEmailLogBodySchema = EmailLogsForCustomerEmailLogBodySchema;
|