chargebee 3.25.0 → 3.27.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 +44 -0
- package/README.md +39 -0
- package/cjs/RequestWrapper.js +27 -0
- package/cjs/chargebee.cjs.js +3 -0
- package/cjs/chargebee.cjs.worker.js +2 -0
- package/cjs/chargebeeZodValidationError.js +18 -0
- package/cjs/createChargebee.js +5 -0
- package/cjs/environment.js +1 -1
- package/cjs/resources/api_endpoints.js +120 -1
- package/cjs/schema/addon.schema.js +269 -0
- package/cjs/schema/address.schema.js +35 -0
- package/cjs/schema/alert.schema.js +74 -0
- package/cjs/schema/alert_status.schema.js +31 -0
- package/cjs/schema/attached_item.schema.js +144 -0
- package/cjs/schema/business_entity.schema.js +46 -0
- package/cjs/schema/card.schema.js +165 -0
- package/cjs/schema/comment.schema.js +69 -0
- package/cjs/schema/coupon.schema.js +323 -0
- package/cjs/schema/coupon_code.schema.js +49 -0
- package/cjs/schema/coupon_set.schema.js +88 -0
- package/cjs/schema/credit_note.schema.js +502 -0
- package/cjs/schema/currency.schema.js +32 -0
- package/cjs/schema/customer.schema.js +1201 -0
- package/cjs/schema/customer_entitlement.schema.js +14 -0
- package/cjs/schema/differential_price.schema.js +106 -0
- package/cjs/schema/entitlement.schema.js +54 -0
- package/cjs/schema/entitlement_override.schema.js +35 -0
- package/cjs/schema/estimate.schema.js +1535 -0
- package/cjs/schema/event.schema.js +1060 -0
- package/cjs/schema/export.schema.js +3385 -0
- package/cjs/schema/feature.schema.js +78 -0
- package/cjs/schema/gift.schema.js +293 -0
- package/cjs/schema/grant_block.schema.js +47 -0
- package/cjs/schema/hosted_page.schema.js +1777 -0
- package/cjs/schema/in_app_subscription.schema.js +68 -0
- package/cjs/schema/index.js +88 -0
- package/cjs/schema/invoice.schema.js +1685 -0
- package/cjs/schema/item.schema.js +195 -0
- package/cjs/schema/item_entitlement.schema.js +45 -0
- package/cjs/schema/item_family.schema.js +57 -0
- package/cjs/schema/item_price.schema.js +335 -0
- package/cjs/schema/ledger_account_balance.schema.js +21 -0
- package/cjs/schema/ledger_operation.schema.js +104 -0
- package/cjs/schema/meter.schema.js +13 -0
- package/cjs/schema/metered_feature.schema.js +20 -0
- package/cjs/schema/non_subscription.schema.js +28 -0
- package/cjs/schema/offer_event.schema.js +13 -0
- package/cjs/schema/offer_fulfillment.schema.js +20 -0
- package/cjs/schema/omnichannel_one_time_order.schema.js +26 -0
- package/cjs/schema/omnichannel_subscription.schema.js +122 -0
- package/cjs/schema/omnichannel_subscription_item.schema.js +13 -0
- package/cjs/schema/order.schema.js +441 -0
- package/cjs/schema/payment_intent.schema.js +127 -0
- package/cjs/schema/payment_schedule_scheme.schema.js +20 -0
- package/cjs/schema/payment_source.schema.js +630 -0
- package/cjs/schema/payment_voucher.schema.js +57 -0
- package/cjs/schema/personalized_offer.schema.js +28 -0
- package/cjs/schema/plan.schema.js +363 -0
- package/cjs/schema/portal_session.schema.js +22 -0
- package/cjs/schema/price_variant.schema.js +93 -0
- package/cjs/schema/pricing_page_session.schema.js +135 -0
- package/cjs/schema/promotional_credit.schema.js +78 -0
- package/cjs/schema/promotional_grant.schema.js +17 -0
- package/cjs/schema/purchase.schema.js +277 -0
- package/cjs/schema/quote.schema.js +1667 -0
- package/cjs/schema/ramp.schema.js +245 -0
- package/cjs/schema/recorded_purchase.schema.js +32 -0
- package/cjs/schema/resource_migration.schema.js +14 -0
- package/cjs/schema/site_migration_detail.schema.js +81 -0
- package/cjs/schema/subscription.schema.js +3344 -0
- package/cjs/schema/subscription_entitlement.schema.js +25 -0
- package/cjs/schema/time_machine.schema.js +17 -0
- package/cjs/schema/transaction.schema.js +744 -0
- package/cjs/schema/unbilled_charge.schema.js +139 -0
- package/cjs/schema/usage.schema.js +93 -0
- package/cjs/schema/usage_charge.schema.js +17 -0
- package/cjs/schema/usage_event.schema.js +28 -0
- package/cjs/schema/usage_file.schema.js +13 -0
- package/cjs/schema/usage_summary.schema.js +17 -0
- package/cjs/schema/virtual_bank_account.schema.js +71 -0
- package/cjs/schema/webhook_endpoint.schema.js +508 -0
- package/cjs/validationLoader.js +59 -0
- package/esm/RequestWrapper.js +27 -0
- package/esm/chargebee.esm.js +2 -0
- package/esm/chargebee.esm.worker.js +1 -0
- package/esm/chargebeeZodValidationError.js +14 -0
- package/esm/createChargebee.js +5 -0
- package/esm/environment.js +1 -1
- package/esm/resources/api_endpoints.js +120 -1
- package/esm/schema/addon.schema.js +266 -0
- package/esm/schema/address.schema.js +32 -0
- package/esm/schema/alert.schema.js +71 -0
- package/esm/schema/alert_status.schema.js +28 -0
- package/esm/schema/attached_item.schema.js +141 -0
- package/esm/schema/business_entity.schema.js +43 -0
- package/esm/schema/card.schema.js +162 -0
- package/esm/schema/comment.schema.js +66 -0
- package/esm/schema/coupon.schema.js +320 -0
- package/esm/schema/coupon_code.schema.js +46 -0
- package/esm/schema/coupon_set.schema.js +85 -0
- package/esm/schema/credit_note.schema.js +499 -0
- package/esm/schema/currency.schema.js +29 -0
- package/esm/schema/customer.schema.js +1198 -0
- package/esm/schema/customer_entitlement.schema.js +11 -0
- package/esm/schema/differential_price.schema.js +103 -0
- package/esm/schema/entitlement.schema.js +51 -0
- package/esm/schema/entitlement_override.schema.js +32 -0
- package/esm/schema/estimate.schema.js +1532 -0
- package/esm/schema/event.schema.js +1057 -0
- package/esm/schema/export.schema.js +3382 -0
- package/esm/schema/feature.schema.js +75 -0
- package/esm/schema/gift.schema.js +290 -0
- package/esm/schema/grant_block.schema.js +44 -0
- package/esm/schema/hosted_page.schema.js +1774 -0
- package/esm/schema/in_app_subscription.schema.js +65 -0
- package/esm/schema/index.js +72 -0
- package/esm/schema/invoice.schema.js +1682 -0
- package/esm/schema/item.schema.js +192 -0
- package/esm/schema/item_entitlement.schema.js +42 -0
- package/esm/schema/item_family.schema.js +54 -0
- package/esm/schema/item_price.schema.js +332 -0
- package/esm/schema/ledger_account_balance.schema.js +18 -0
- package/esm/schema/ledger_operation.schema.js +101 -0
- package/esm/schema/meter.schema.js +10 -0
- package/esm/schema/metered_feature.schema.js +17 -0
- package/esm/schema/non_subscription.schema.js +25 -0
- package/esm/schema/offer_event.schema.js +10 -0
- package/esm/schema/offer_fulfillment.schema.js +17 -0
- package/esm/schema/omnichannel_one_time_order.schema.js +23 -0
- package/esm/schema/omnichannel_subscription.schema.js +119 -0
- package/esm/schema/omnichannel_subscription_item.schema.js +10 -0
- package/esm/schema/order.schema.js +438 -0
- package/esm/schema/payment_intent.schema.js +124 -0
- package/esm/schema/payment_schedule_scheme.schema.js +17 -0
- package/esm/schema/payment_source.schema.js +627 -0
- package/esm/schema/payment_voucher.schema.js +54 -0
- package/esm/schema/personalized_offer.schema.js +25 -0
- package/esm/schema/plan.schema.js +360 -0
- package/esm/schema/portal_session.schema.js +19 -0
- package/esm/schema/price_variant.schema.js +90 -0
- package/esm/schema/pricing_page_session.schema.js +132 -0
- package/esm/schema/promotional_credit.schema.js +75 -0
- package/esm/schema/promotional_grant.schema.js +14 -0
- package/esm/schema/purchase.schema.js +274 -0
- package/esm/schema/quote.schema.js +1664 -0
- package/esm/schema/ramp.schema.js +242 -0
- package/esm/schema/recorded_purchase.schema.js +29 -0
- package/esm/schema/resource_migration.schema.js +11 -0
- package/esm/schema/site_migration_detail.schema.js +78 -0
- package/esm/schema/subscription.schema.js +3341 -0
- package/esm/schema/subscription_entitlement.schema.js +22 -0
- package/esm/schema/time_machine.schema.js +14 -0
- package/esm/schema/transaction.schema.js +741 -0
- package/esm/schema/unbilled_charge.schema.js +136 -0
- package/esm/schema/usage.schema.js +90 -0
- package/esm/schema/usage_charge.schema.js +14 -0
- package/esm/schema/usage_event.schema.js +25 -0
- package/esm/schema/usage_file.schema.js +10 -0
- package/esm/schema/usage_summary.schema.js +14 -0
- package/esm/schema/virtual_bank_account.schema.js +68 -0
- package/esm/schema/webhook_endpoint.schema.js +505 -0
- package/esm/validationLoader.js +56 -0
- package/package.json +4 -1
- package/types/core.d.ts +3 -0
- package/types/index.d.ts +24 -0
- package/types/resources/Content.d.ts +4 -0
- package/types/resources/CreditNote.d.ts +1 -0
- package/types/resources/GrantBlock.d.ts +59 -0
- package/types/resources/HostedPage.d.ts +5 -1
- package/types/resources/LedgerAccountBalance.d.ts +50 -0
- package/types/resources/LedgerOperation.d.ts +141 -0
- package/types/resources/OmnichannelSubscription.d.ts +2 -0
- package/types/resources/PromotionalGrant.d.ts +37 -0
|
@@ -0,0 +1,74 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
// Generated Zod schemas: Alert
|
|
3
|
+
// Actions: create, list, update, application_alertsForSubscription
|
|
4
|
+
// Do not edit manually – regenerate via sdk-generator
|
|
5
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
6
|
+
exports.ApplicationAlertsforsubscriptionAlertBodySchema = exports.UpdateAlertBodySchema = exports.ListAlertBodySchema = exports.CreateAlertBodySchema = void 0;
|
|
7
|
+
const zod_1 = require("zod");
|
|
8
|
+
//Alert.create
|
|
9
|
+
const CreateAlertThresholdSchema = zod_1.z.object({
|
|
10
|
+
mode: zod_1.z.enum(['absolute', 'percentage']),
|
|
11
|
+
value: zod_1.z.number(),
|
|
12
|
+
});
|
|
13
|
+
const CreateAlertFilterConditionsSchema = zod_1.z.object({
|
|
14
|
+
field: zod_1.z.array(zod_1.z.enum(['plan_price_id']).optional()).optional(),
|
|
15
|
+
operator: zod_1.z.array(zod_1.z.enum(['equals', 'not_equals']).optional()).optional(),
|
|
16
|
+
value: zod_1.z.array(zod_1.z.string().max(50).optional()).optional(),
|
|
17
|
+
});
|
|
18
|
+
const CreateAlertBodySchema = zod_1.z.looseObject({
|
|
19
|
+
type: zod_1.z.enum(['usage_exceeded']),
|
|
20
|
+
name: zod_1.z.string().max(50),
|
|
21
|
+
description: zod_1.z.string().max(65000).optional(),
|
|
22
|
+
metered_feature_id: zod_1.z.string().max(50),
|
|
23
|
+
subscription_id: zod_1.z.string().max(50).optional(),
|
|
24
|
+
meta: zod_1.z.string().max(65000).optional(),
|
|
25
|
+
threshold: CreateAlertThresholdSchema.optional(),
|
|
26
|
+
filter_conditions: CreateAlertFilterConditionsSchema.optional(),
|
|
27
|
+
});
|
|
28
|
+
exports.CreateAlertBodySchema = CreateAlertBodySchema;
|
|
29
|
+
//Alert.list
|
|
30
|
+
const ListAlertIdSchema = zod_1.z.object({
|
|
31
|
+
in: zod_1.z.string().regex(RegExp('^\\[(.*)(,.*)*\\]$')).optional(),
|
|
32
|
+
});
|
|
33
|
+
const ListAlertTypeSchema = zod_1.z.object({
|
|
34
|
+
is: zod_1.z.enum(['usage_exceeded']).optional(),
|
|
35
|
+
});
|
|
36
|
+
const ListAlertSubscriptionIdSchema = zod_1.z.object({
|
|
37
|
+
is: zod_1.z.string().min(1).optional(),
|
|
38
|
+
});
|
|
39
|
+
const ListAlertStatusSchema = zod_1.z.object({
|
|
40
|
+
is: zod_1.z.enum(['enabled', 'disabled']).optional(),
|
|
41
|
+
});
|
|
42
|
+
const ListAlertBodySchema = zod_1.z.looseObject({
|
|
43
|
+
limit: zod_1.z.number().int().min(1).max(100).optional(),
|
|
44
|
+
offset: zod_1.z.string().max(1000).optional(),
|
|
45
|
+
id: ListAlertIdSchema.optional(),
|
|
46
|
+
type: ListAlertTypeSchema.optional(),
|
|
47
|
+
subscription_id: ListAlertSubscriptionIdSchema.optional(),
|
|
48
|
+
status: ListAlertStatusSchema.optional(),
|
|
49
|
+
});
|
|
50
|
+
exports.ListAlertBodySchema = ListAlertBodySchema;
|
|
51
|
+
//Alert.update
|
|
52
|
+
const UpdateAlertThresholdSchema = zod_1.z.object({
|
|
53
|
+
mode: zod_1.z.enum(['absolute', 'percentage']).optional(),
|
|
54
|
+
value: zod_1.z.number().optional(),
|
|
55
|
+
});
|
|
56
|
+
const UpdateAlertBodySchema = zod_1.z.looseObject({
|
|
57
|
+
status: zod_1.z.enum(['enabled', 'disabled']).optional(),
|
|
58
|
+
threshold: UpdateAlertThresholdSchema.optional(),
|
|
59
|
+
});
|
|
60
|
+
exports.UpdateAlertBodySchema = UpdateAlertBodySchema;
|
|
61
|
+
//Alert.application_alertsForSubscription
|
|
62
|
+
const ApplicationAlertsforsubscriptionAlertStatusSchema = zod_1.z.object({
|
|
63
|
+
is: zod_1.z.enum(['enabled', 'disabled']).optional(),
|
|
64
|
+
});
|
|
65
|
+
const ApplicationAlertsforsubscriptionAlertTypeSchema = zod_1.z.object({
|
|
66
|
+
is: zod_1.z.enum(['usage_exceeded']).optional(),
|
|
67
|
+
});
|
|
68
|
+
const ApplicationAlertsforsubscriptionAlertBodySchema = zod_1.z.looseObject({
|
|
69
|
+
limit: zod_1.z.number().int().min(1).max(100).optional(),
|
|
70
|
+
offset: zod_1.z.string().max(1000).optional(),
|
|
71
|
+
status: ApplicationAlertsforsubscriptionAlertStatusSchema.optional(),
|
|
72
|
+
type: ApplicationAlertsforsubscriptionAlertTypeSchema.optional(),
|
|
73
|
+
});
|
|
74
|
+
exports.ApplicationAlertsforsubscriptionAlertBodySchema = ApplicationAlertsforsubscriptionAlertBodySchema;
|
|
@@ -0,0 +1,31 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
// Generated Zod schemas: AlertStatus
|
|
3
|
+
// Actions: alert_statusesForSubscription, alert_statusesForAlert
|
|
4
|
+
// Do not edit manually – regenerate via sdk-generator
|
|
5
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
6
|
+
exports.AlertStatusesforalertAlertStatusBodySchema = exports.AlertStatusesforsubscriptionAlertStatusBodySchema = void 0;
|
|
7
|
+
const zod_1 = require("zod");
|
|
8
|
+
//AlertStatus.alert_statusesForSubscription
|
|
9
|
+
const AlertStatusesforsubscriptionAlertStatusAlarmStatusSchema = zod_1.z.object({
|
|
10
|
+
is: zod_1.z.enum(['within_limit', 'in_alarm']).optional(),
|
|
11
|
+
});
|
|
12
|
+
const AlertStatusesforsubscriptionAlertStatusAlertIdSchema = zod_1.z.object({
|
|
13
|
+
in: zod_1.z.string().regex(RegExp('^\\[(.*)(,.*)*\\]$')).optional(),
|
|
14
|
+
});
|
|
15
|
+
const AlertStatusesforsubscriptionAlertStatusBodySchema = zod_1.z.looseObject({
|
|
16
|
+
limit: zod_1.z.number().int().min(1).max(100).optional(),
|
|
17
|
+
offset: zod_1.z.string().max(1000).optional(),
|
|
18
|
+
alarm_status: AlertStatusesforsubscriptionAlertStatusAlarmStatusSchema.optional(),
|
|
19
|
+
alert_id: AlertStatusesforsubscriptionAlertStatusAlertIdSchema.optional(),
|
|
20
|
+
});
|
|
21
|
+
exports.AlertStatusesforsubscriptionAlertStatusBodySchema = AlertStatusesforsubscriptionAlertStatusBodySchema;
|
|
22
|
+
//AlertStatus.alert_statusesForAlert
|
|
23
|
+
const AlertStatusesforalertAlertStatusAlarmStatusSchema = zod_1.z.object({
|
|
24
|
+
is: zod_1.z.enum(['within_limit', 'in_alarm']).optional(),
|
|
25
|
+
});
|
|
26
|
+
const AlertStatusesforalertAlertStatusBodySchema = zod_1.z.looseObject({
|
|
27
|
+
limit: zod_1.z.number().int().min(1).max(100).optional(),
|
|
28
|
+
offset: zod_1.z.string().max(1000).optional(),
|
|
29
|
+
alarm_status: AlertStatusesforalertAlertStatusAlarmStatusSchema.optional(),
|
|
30
|
+
});
|
|
31
|
+
exports.AlertStatusesforalertAlertStatusBodySchema = AlertStatusesforalertAlertStatusBodySchema;
|
|
@@ -0,0 +1,144 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
// Generated Zod schemas: AttachedItem
|
|
3
|
+
// Actions: create, update, retrieve, delete, list
|
|
4
|
+
// Do not edit manually – regenerate via sdk-generator
|
|
5
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
6
|
+
exports.ListAttachedItemBodySchema = exports.DeleteAttachedItemBodySchema = exports.RetrieveAttachedItemBodySchema = exports.UpdateAttachedItemBodySchema = exports.CreateAttachedItemBodySchema = void 0;
|
|
7
|
+
const zod_1 = require("zod");
|
|
8
|
+
//AttachedItem.create
|
|
9
|
+
const CreateAttachedItemBodySchema = zod_1.z.looseObject({
|
|
10
|
+
item_id: zod_1.z.string().max(100),
|
|
11
|
+
type: zod_1.z.enum(['recommended', 'mandatory', 'optional']).optional(),
|
|
12
|
+
billing_cycles: zod_1.z.number().int().min(1).optional(),
|
|
13
|
+
quantity: zod_1.z.number().int().min(1).optional(),
|
|
14
|
+
quantity_in_decimal: zod_1.z.string().max(33).optional(),
|
|
15
|
+
charge_on_event: zod_1.z
|
|
16
|
+
.enum([
|
|
17
|
+
'subscription_creation',
|
|
18
|
+
'subscription_trial_start',
|
|
19
|
+
'plan_activation',
|
|
20
|
+
'subscription_activation',
|
|
21
|
+
'contract_termination',
|
|
22
|
+
'on_demand',
|
|
23
|
+
])
|
|
24
|
+
.optional(),
|
|
25
|
+
charge_once: zod_1.z.boolean().optional(),
|
|
26
|
+
business_entity_id: zod_1.z.string().max(50).optional(),
|
|
27
|
+
});
|
|
28
|
+
exports.CreateAttachedItemBodySchema = CreateAttachedItemBodySchema;
|
|
29
|
+
//AttachedItem.update
|
|
30
|
+
const UpdateAttachedItemBodySchema = zod_1.z.looseObject({
|
|
31
|
+
parent_item_id: zod_1.z.string().max(100),
|
|
32
|
+
type: zod_1.z.enum(['recommended', 'mandatory', 'optional']).optional(),
|
|
33
|
+
billing_cycles: zod_1.z.number().int().min(1).optional(),
|
|
34
|
+
quantity: zod_1.z.number().int().min(1).optional(),
|
|
35
|
+
quantity_in_decimal: zod_1.z.string().max(33).optional(),
|
|
36
|
+
charge_on_event: zod_1.z
|
|
37
|
+
.enum([
|
|
38
|
+
'subscription_creation',
|
|
39
|
+
'subscription_trial_start',
|
|
40
|
+
'plan_activation',
|
|
41
|
+
'subscription_activation',
|
|
42
|
+
'contract_termination',
|
|
43
|
+
'on_demand',
|
|
44
|
+
])
|
|
45
|
+
.optional(),
|
|
46
|
+
charge_once: zod_1.z.boolean().optional(),
|
|
47
|
+
});
|
|
48
|
+
exports.UpdateAttachedItemBodySchema = UpdateAttachedItemBodySchema;
|
|
49
|
+
//AttachedItem.retrieve
|
|
50
|
+
const RetrieveAttachedItemBodySchema = zod_1.z.looseObject({
|
|
51
|
+
parent_item_id: zod_1.z.string().max(100),
|
|
52
|
+
});
|
|
53
|
+
exports.RetrieveAttachedItemBodySchema = RetrieveAttachedItemBodySchema;
|
|
54
|
+
//AttachedItem.delete
|
|
55
|
+
const DeleteAttachedItemBodySchema = zod_1.z.looseObject({
|
|
56
|
+
parent_item_id: zod_1.z.string().max(100),
|
|
57
|
+
});
|
|
58
|
+
exports.DeleteAttachedItemBodySchema = DeleteAttachedItemBodySchema;
|
|
59
|
+
//AttachedItem.list
|
|
60
|
+
const ListAttachedItemIdSchema = zod_1.z.object({
|
|
61
|
+
is: zod_1.z.string().min(1).optional(),
|
|
62
|
+
is_not: zod_1.z.string().min(1).optional(),
|
|
63
|
+
starts_with: zod_1.z.string().min(1).optional(),
|
|
64
|
+
in: zod_1.z.string().regex(RegExp('^\\[(.*)(,.*)*\\]$')).optional(),
|
|
65
|
+
not_in: zod_1.z.string().regex(RegExp('^\\[(.*)(,.*)*\\]$')).optional(),
|
|
66
|
+
});
|
|
67
|
+
const ListAttachedItemItemIdSchema = zod_1.z.object({
|
|
68
|
+
is: zod_1.z.string().min(1).optional(),
|
|
69
|
+
is_not: zod_1.z.string().min(1).optional(),
|
|
70
|
+
starts_with: zod_1.z.string().min(1).optional(),
|
|
71
|
+
in: zod_1.z.string().regex(RegExp('^\\[(.*)(,.*)*\\]$')).optional(),
|
|
72
|
+
not_in: zod_1.z.string().regex(RegExp('^\\[(.*)(,.*)*\\]$')).optional(),
|
|
73
|
+
});
|
|
74
|
+
const ListAttachedItemTypeSchema = zod_1.z.object({
|
|
75
|
+
is: zod_1.z.enum(['recommended', 'mandatory', 'optional']).optional(),
|
|
76
|
+
is_not: zod_1.z.enum(['recommended', 'mandatory', 'optional']).optional(),
|
|
77
|
+
in: zod_1.z.enum(['recommended', 'mandatory', 'optional']).optional(),
|
|
78
|
+
not_in: zod_1.z.enum(['recommended', 'mandatory', 'optional']).optional(),
|
|
79
|
+
});
|
|
80
|
+
const ListAttachedItemItemTypeSchema = zod_1.z.object({
|
|
81
|
+
is: zod_1.z.enum(['plan', 'addon', 'charge']).optional(),
|
|
82
|
+
is_not: zod_1.z.enum(['plan', 'addon', 'charge']).optional(),
|
|
83
|
+
in: zod_1.z.enum(['plan', 'addon', 'charge']).optional(),
|
|
84
|
+
not_in: zod_1.z.enum(['plan', 'addon', 'charge']).optional(),
|
|
85
|
+
});
|
|
86
|
+
const ListAttachedItemChargeOnEventSchema = zod_1.z.object({
|
|
87
|
+
is: zod_1.z
|
|
88
|
+
.enum([
|
|
89
|
+
'subscription_creation',
|
|
90
|
+
'subscription_trial_start',
|
|
91
|
+
'plan_activation',
|
|
92
|
+
'subscription_activation',
|
|
93
|
+
'contract_termination',
|
|
94
|
+
'on_demand',
|
|
95
|
+
])
|
|
96
|
+
.optional(),
|
|
97
|
+
is_not: zod_1.z
|
|
98
|
+
.enum([
|
|
99
|
+
'subscription_creation',
|
|
100
|
+
'subscription_trial_start',
|
|
101
|
+
'plan_activation',
|
|
102
|
+
'subscription_activation',
|
|
103
|
+
'contract_termination',
|
|
104
|
+
'on_demand',
|
|
105
|
+
])
|
|
106
|
+
.optional(),
|
|
107
|
+
in: zod_1.z
|
|
108
|
+
.enum([
|
|
109
|
+
'subscription_creation',
|
|
110
|
+
'subscription_trial_start',
|
|
111
|
+
'plan_activation',
|
|
112
|
+
'subscription_activation',
|
|
113
|
+
'contract_termination',
|
|
114
|
+
'on_demand',
|
|
115
|
+
])
|
|
116
|
+
.optional(),
|
|
117
|
+
not_in: zod_1.z
|
|
118
|
+
.enum([
|
|
119
|
+
'subscription_creation',
|
|
120
|
+
'subscription_trial_start',
|
|
121
|
+
'plan_activation',
|
|
122
|
+
'subscription_activation',
|
|
123
|
+
'contract_termination',
|
|
124
|
+
'on_demand',
|
|
125
|
+
])
|
|
126
|
+
.optional(),
|
|
127
|
+
});
|
|
128
|
+
const ListAttachedItemUpdatedAtSchema = zod_1.z.object({
|
|
129
|
+
after: zod_1.z.string().regex(RegExp('^\\d{10}$')).optional(),
|
|
130
|
+
before: zod_1.z.string().regex(RegExp('^\\d{10}$')).optional(),
|
|
131
|
+
on: zod_1.z.string().regex(RegExp('^\\d{10}$')).optional(),
|
|
132
|
+
between: zod_1.z.string().regex(RegExp('^\\[\\d{10},\\d{10}\\]$')).optional(),
|
|
133
|
+
});
|
|
134
|
+
const ListAttachedItemBodySchema = zod_1.z.looseObject({
|
|
135
|
+
limit: zod_1.z.number().int().min(1).max(100).optional(),
|
|
136
|
+
offset: zod_1.z.string().max(1000).optional(),
|
|
137
|
+
id: ListAttachedItemIdSchema.optional(),
|
|
138
|
+
item_id: ListAttachedItemItemIdSchema.optional(),
|
|
139
|
+
type: ListAttachedItemTypeSchema.optional(),
|
|
140
|
+
item_type: ListAttachedItemItemTypeSchema.optional(),
|
|
141
|
+
charge_on_event: ListAttachedItemChargeOnEventSchema.optional(),
|
|
142
|
+
updated_at: ListAttachedItemUpdatedAtSchema.optional(),
|
|
143
|
+
});
|
|
144
|
+
exports.ListAttachedItemBodySchema = ListAttachedItemBodySchema;
|
|
@@ -0,0 +1,46 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
// Generated Zod schemas: BusinessEntity
|
|
3
|
+
// Actions: createTransfers, getTransfers
|
|
4
|
+
// Do not edit manually – regenerate via sdk-generator
|
|
5
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
6
|
+
exports.GetTransfersBusinessEntityBodySchema = exports.CreateTransfersBusinessEntityBodySchema = void 0;
|
|
7
|
+
const zod_1 = require("zod");
|
|
8
|
+
//BusinessEntity.createTransfers
|
|
9
|
+
const CreateTransfersBusinessEntityBodySchema = zod_1.z.looseObject({
|
|
10
|
+
active_resource_ids: zod_1.z.array(zod_1.z.string().max(50).optional()),
|
|
11
|
+
destination_business_entity_ids: zod_1.z.array(zod_1.z.string().max(50).optional()),
|
|
12
|
+
source_business_entity_ids: zod_1.z.array(zod_1.z.string().max(50).optional()).optional(),
|
|
13
|
+
resource_types: zod_1.z.array(zod_1.z.string().max(50).optional()),
|
|
14
|
+
reason_codes: zod_1.z.array(zod_1.z.string().max(50).optional()),
|
|
15
|
+
});
|
|
16
|
+
exports.CreateTransfersBusinessEntityBodySchema = CreateTransfersBusinessEntityBodySchema;
|
|
17
|
+
//BusinessEntity.getTransfers
|
|
18
|
+
const GetTransfersBusinessEntityResourceTypeSchema = zod_1.z.object({
|
|
19
|
+
is: zod_1.z.string().min(1).optional(),
|
|
20
|
+
});
|
|
21
|
+
const GetTransfersBusinessEntityResourceIdSchema = zod_1.z.object({
|
|
22
|
+
is: zod_1.z.string().min(1).optional(),
|
|
23
|
+
});
|
|
24
|
+
const GetTransfersBusinessEntityActiveResourceIdSchema = zod_1.z.object({
|
|
25
|
+
is: zod_1.z.string().min(1).optional(),
|
|
26
|
+
});
|
|
27
|
+
const GetTransfersBusinessEntityCreatedAtSchema = zod_1.z.object({
|
|
28
|
+
after: zod_1.z.string().regex(RegExp('^\\d{10}$')).optional(),
|
|
29
|
+
before: zod_1.z.string().regex(RegExp('^\\d{10}$')).optional(),
|
|
30
|
+
on: zod_1.z.string().regex(RegExp('^\\d{10}$')).optional(),
|
|
31
|
+
between: zod_1.z.string().regex(RegExp('^\\[\\d{10},\\d{10}\\]$')).optional(),
|
|
32
|
+
});
|
|
33
|
+
const GetTransfersBusinessEntitySortBySchema = zod_1.z.looseObject({
|
|
34
|
+
asc: zod_1.z.enum(['created_at']).optional(),
|
|
35
|
+
desc: zod_1.z.enum(['created_at']).optional(),
|
|
36
|
+
});
|
|
37
|
+
const GetTransfersBusinessEntityBodySchema = zod_1.z.looseObject({
|
|
38
|
+
limit: zod_1.z.number().int().min(1).max(100).optional(),
|
|
39
|
+
offset: zod_1.z.string().max(1000).optional(),
|
|
40
|
+
resource_type: GetTransfersBusinessEntityResourceTypeSchema.optional(),
|
|
41
|
+
resource_id: GetTransfersBusinessEntityResourceIdSchema.optional(),
|
|
42
|
+
active_resource_id: GetTransfersBusinessEntityActiveResourceIdSchema.optional(),
|
|
43
|
+
created_at: GetTransfersBusinessEntityCreatedAtSchema.optional(),
|
|
44
|
+
sort_by: GetTransfersBusinessEntitySortBySchema.optional(),
|
|
45
|
+
});
|
|
46
|
+
exports.GetTransfersBusinessEntityBodySchema = GetTransfersBusinessEntityBodySchema;
|
|
@@ -0,0 +1,165 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
// Generated Zod schemas: Card
|
|
3
|
+
// Actions: updateCardForCustomer, switchGatewayForCustomer, copyCardForCustomer
|
|
4
|
+
// Do not edit manually – regenerate via sdk-generator
|
|
5
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
6
|
+
exports.CopyCardForCustomerCardBodySchema = exports.SwitchGatewayForCustomerCardBodySchema = exports.UpdateCardForCustomerCardBodySchema = void 0;
|
|
7
|
+
const zod_1 = require("zod");
|
|
8
|
+
//Card.updateCardForCustomer
|
|
9
|
+
const UpdateCardForCustomerCardCustomerSchema = zod_1.z.object({
|
|
10
|
+
vat_number: zod_1.z.string().max(20).optional(),
|
|
11
|
+
});
|
|
12
|
+
const UpdateCardForCustomerCardBodySchema = zod_1.z.looseObject({
|
|
13
|
+
gateway: zod_1.z
|
|
14
|
+
.enum([
|
|
15
|
+
'chargebee',
|
|
16
|
+
'chargebee_payments',
|
|
17
|
+
'adyen',
|
|
18
|
+
'stripe',
|
|
19
|
+
'wepay',
|
|
20
|
+
'braintree',
|
|
21
|
+
'authorize_net',
|
|
22
|
+
'paypal_pro',
|
|
23
|
+
'pin',
|
|
24
|
+
'eway',
|
|
25
|
+
'eway_rapid',
|
|
26
|
+
'worldpay',
|
|
27
|
+
'balanced_payments',
|
|
28
|
+
'beanstream',
|
|
29
|
+
'bluepay',
|
|
30
|
+
'elavon',
|
|
31
|
+
'first_data_global',
|
|
32
|
+
'hdfc',
|
|
33
|
+
'migs',
|
|
34
|
+
'nmi',
|
|
35
|
+
'ogone',
|
|
36
|
+
'paymill',
|
|
37
|
+
'paypal_payflow_pro',
|
|
38
|
+
'sage_pay',
|
|
39
|
+
'tco',
|
|
40
|
+
'wirecard',
|
|
41
|
+
'amazon_payments',
|
|
42
|
+
'paypal_express_checkout',
|
|
43
|
+
'orbital',
|
|
44
|
+
'moneris_us',
|
|
45
|
+
'moneris',
|
|
46
|
+
'bluesnap',
|
|
47
|
+
'cybersource',
|
|
48
|
+
'vantiv',
|
|
49
|
+
'checkout_com',
|
|
50
|
+
'paypal',
|
|
51
|
+
'ingenico_direct',
|
|
52
|
+
'exact',
|
|
53
|
+
'mollie',
|
|
54
|
+
'quickbooks',
|
|
55
|
+
'razorpay',
|
|
56
|
+
'global_payments',
|
|
57
|
+
'bank_of_america',
|
|
58
|
+
'ecentric',
|
|
59
|
+
'metrics_global',
|
|
60
|
+
'windcave',
|
|
61
|
+
'pay_com',
|
|
62
|
+
'ebanx',
|
|
63
|
+
'dlocal',
|
|
64
|
+
'nuvei',
|
|
65
|
+
'solidgate',
|
|
66
|
+
'paystack',
|
|
67
|
+
'jp_morgan',
|
|
68
|
+
'deutsche_bank',
|
|
69
|
+
'ezidebit',
|
|
70
|
+
'twikey',
|
|
71
|
+
'tempus',
|
|
72
|
+
'moyasar',
|
|
73
|
+
'payway',
|
|
74
|
+
])
|
|
75
|
+
.optional(),
|
|
76
|
+
gateway_account_id: zod_1.z.string().max(50).optional(),
|
|
77
|
+
tmp_token: zod_1.z.string().max(300).optional(),
|
|
78
|
+
first_name: zod_1.z.string().max(50).optional(),
|
|
79
|
+
last_name: zod_1.z.string().max(50).optional(),
|
|
80
|
+
number: zod_1.z.string().max(1500),
|
|
81
|
+
expiry_month: zod_1.z.number().int().min(1).max(12),
|
|
82
|
+
expiry_year: zod_1.z.number().int(),
|
|
83
|
+
cvv: zod_1.z.string().max(520).optional(),
|
|
84
|
+
preferred_scheme: zod_1.z
|
|
85
|
+
.enum(['cartes_bancaires', 'mastercard', 'visa'])
|
|
86
|
+
.optional(),
|
|
87
|
+
billing_addr1: zod_1.z.string().max(150).optional(),
|
|
88
|
+
billing_addr2: zod_1.z.string().max(150).optional(),
|
|
89
|
+
billing_city: zod_1.z.string().max(50).optional(),
|
|
90
|
+
billing_state_code: zod_1.z.string().max(50).optional(),
|
|
91
|
+
billing_state: zod_1.z.string().max(50).optional(),
|
|
92
|
+
billing_zip: zod_1.z.string().max(20).optional(),
|
|
93
|
+
billing_country: zod_1.z.string().max(50).optional(),
|
|
94
|
+
ip_address: zod_1.z.string().max(50).optional(),
|
|
95
|
+
customer: UpdateCardForCustomerCardCustomerSchema.optional(),
|
|
96
|
+
});
|
|
97
|
+
exports.UpdateCardForCustomerCardBodySchema = UpdateCardForCustomerCardBodySchema;
|
|
98
|
+
//Card.switchGatewayForCustomer
|
|
99
|
+
const SwitchGatewayForCustomerCardBodySchema = zod_1.z.looseObject({
|
|
100
|
+
gateway: zod_1.z
|
|
101
|
+
.enum([
|
|
102
|
+
'chargebee_payments',
|
|
103
|
+
'adyen',
|
|
104
|
+
'stripe',
|
|
105
|
+
'wepay',
|
|
106
|
+
'braintree',
|
|
107
|
+
'authorize_net',
|
|
108
|
+
'paypal_pro',
|
|
109
|
+
'pin',
|
|
110
|
+
'eway',
|
|
111
|
+
'eway_rapid',
|
|
112
|
+
'worldpay',
|
|
113
|
+
'balanced_payments',
|
|
114
|
+
'beanstream',
|
|
115
|
+
'bluepay',
|
|
116
|
+
'elavon',
|
|
117
|
+
'first_data_global',
|
|
118
|
+
'hdfc',
|
|
119
|
+
'migs',
|
|
120
|
+
'nmi',
|
|
121
|
+
'ogone',
|
|
122
|
+
'paymill',
|
|
123
|
+
'paypal_payflow_pro',
|
|
124
|
+
'sage_pay',
|
|
125
|
+
'wirecard',
|
|
126
|
+
'orbital',
|
|
127
|
+
'moneris_us',
|
|
128
|
+
'moneris',
|
|
129
|
+
'bluesnap',
|
|
130
|
+
'cybersource',
|
|
131
|
+
'vantiv',
|
|
132
|
+
'checkout_com',
|
|
133
|
+
'ingenico_direct',
|
|
134
|
+
'exact',
|
|
135
|
+
'mollie',
|
|
136
|
+
'quickbooks',
|
|
137
|
+
'razorpay',
|
|
138
|
+
'global_payments',
|
|
139
|
+
'bank_of_america',
|
|
140
|
+
'ecentric',
|
|
141
|
+
'metrics_global',
|
|
142
|
+
'windcave',
|
|
143
|
+
'pay_com',
|
|
144
|
+
'ebanx',
|
|
145
|
+
'dlocal',
|
|
146
|
+
'nuvei',
|
|
147
|
+
'solidgate',
|
|
148
|
+
'paystack',
|
|
149
|
+
'jp_morgan',
|
|
150
|
+
'deutsche_bank',
|
|
151
|
+
'ezidebit',
|
|
152
|
+
'twikey',
|
|
153
|
+
'tempus',
|
|
154
|
+
'moyasar',
|
|
155
|
+
'payway',
|
|
156
|
+
])
|
|
157
|
+
.optional(),
|
|
158
|
+
gateway_account_id: zod_1.z.string().max(50),
|
|
159
|
+
});
|
|
160
|
+
exports.SwitchGatewayForCustomerCardBodySchema = SwitchGatewayForCustomerCardBodySchema;
|
|
161
|
+
//Card.copyCardForCustomer
|
|
162
|
+
const CopyCardForCustomerCardBodySchema = zod_1.z.looseObject({
|
|
163
|
+
gateway_account_id: zod_1.z.string().max(50),
|
|
164
|
+
});
|
|
165
|
+
exports.CopyCardForCustomerCardBodySchema = CopyCardForCustomerCardBodySchema;
|
|
@@ -0,0 +1,69 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
// Generated Zod schemas: Comment
|
|
3
|
+
// Actions: create, list
|
|
4
|
+
// Do not edit manually – regenerate via sdk-generator
|
|
5
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
6
|
+
exports.ListCommentBodySchema = exports.CreateCommentBodySchema = void 0;
|
|
7
|
+
const zod_1 = require("zod");
|
|
8
|
+
//Comment.create
|
|
9
|
+
const CreateCommentBodySchema = zod_1.z.looseObject({
|
|
10
|
+
entity_type: zod_1.z.enum([
|
|
11
|
+
'customer',
|
|
12
|
+
'subscription',
|
|
13
|
+
'invoice',
|
|
14
|
+
'quote',
|
|
15
|
+
'credit_note',
|
|
16
|
+
'transaction',
|
|
17
|
+
'plan',
|
|
18
|
+
'addon',
|
|
19
|
+
'coupon',
|
|
20
|
+
'order',
|
|
21
|
+
'business_entity',
|
|
22
|
+
'item_family',
|
|
23
|
+
'item',
|
|
24
|
+
'item_price',
|
|
25
|
+
'price_variant',
|
|
26
|
+
]),
|
|
27
|
+
entity_id: zod_1.z.string().max(100),
|
|
28
|
+
notes: zod_1.z.string().max(1000),
|
|
29
|
+
added_by: zod_1.z.string().max(100).optional(),
|
|
30
|
+
});
|
|
31
|
+
exports.CreateCommentBodySchema = CreateCommentBodySchema;
|
|
32
|
+
//Comment.list
|
|
33
|
+
const ListCommentCreatedAtSchema = zod_1.z.object({
|
|
34
|
+
after: zod_1.z.string().regex(RegExp('^\\d{10}$')).optional(),
|
|
35
|
+
before: zod_1.z.string().regex(RegExp('^\\d{10}$')).optional(),
|
|
36
|
+
on: zod_1.z.string().regex(RegExp('^\\d{10}$')).optional(),
|
|
37
|
+
between: zod_1.z.string().regex(RegExp('^\\[\\d{10},\\d{10}\\]$')).optional(),
|
|
38
|
+
});
|
|
39
|
+
const ListCommentSortBySchema = zod_1.z.looseObject({
|
|
40
|
+
asc: zod_1.z.enum(['created_at']).optional(),
|
|
41
|
+
desc: zod_1.z.enum(['created_at']).optional(),
|
|
42
|
+
});
|
|
43
|
+
const ListCommentBodySchema = zod_1.z.looseObject({
|
|
44
|
+
limit: zod_1.z.number().int().min(1).max(100).optional(),
|
|
45
|
+
offset: zod_1.z.string().max(1000).optional(),
|
|
46
|
+
entity_type: zod_1.z
|
|
47
|
+
.enum([
|
|
48
|
+
'customer',
|
|
49
|
+
'subscription',
|
|
50
|
+
'invoice',
|
|
51
|
+
'quote',
|
|
52
|
+
'credit_note',
|
|
53
|
+
'transaction',
|
|
54
|
+
'plan',
|
|
55
|
+
'addon',
|
|
56
|
+
'coupon',
|
|
57
|
+
'order',
|
|
58
|
+
'business_entity',
|
|
59
|
+
'item_family',
|
|
60
|
+
'item',
|
|
61
|
+
'item_price',
|
|
62
|
+
'price_variant',
|
|
63
|
+
])
|
|
64
|
+
.optional(),
|
|
65
|
+
entity_id: zod_1.z.string().max(100).optional(),
|
|
66
|
+
created_at: ListCommentCreatedAtSchema.optional(),
|
|
67
|
+
sort_by: ListCommentSortBySchema.optional(),
|
|
68
|
+
});
|
|
69
|
+
exports.ListCommentBodySchema = ListCommentBodySchema;
|