@flexprice/sdk 2.1.49-dev.3 → 2.1.49-dev.31
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/docs/sdk/models/add-addon-request.md +13 -13
- package/docs/sdk/models/add-addon-to-subscription-request.md +11 -11
- package/docs/sdk/models/billingterm-instalment.md +1 -0
- package/docs/sdk/models/commitment-info.md +15 -12
- package/docs/sdk/models/commitment-response.md +0 -1
- package/docs/sdk/models/create-commitment-request.md +0 -1
- package/docs/sdk/models/create-customer-request.md +1 -0
- package/docs/sdk/models/create-subscription-line-item-request.md +6 -6
- package/docs/sdk/models/create-subscription-request.md +5 -4
- package/docs/sdk/models/customer-response.md +1 -0
- package/docs/sdk/models/customer.md +1 -0
- package/docs/sdk/models/get-usage-analytics-request.md +1 -1
- package/docs/sdk/models/get-usage-analytics-response.md +10 -8
- package/docs/sdk/models/grouped-invoicing-child-request.md +4 -4
- package/docs/sdk/models/invoice-payment-failure-reason.md +17 -0
- package/docs/sdk/models/payment-response.md +33 -32
- package/docs/sdk/models/price-response.md +2 -1
- package/docs/sdk/models/settings-override.md +15 -0
- package/docs/sdk/models/subscription-config-override.md +16 -0
- package/docs/sdk/models/subscription-response-v2.md +1 -0
- package/docs/sdk/models/subscription-response.md +1 -0
- package/docs/sdk/models/update-customer-request.md +1 -0
- package/docs/sdk/models/update-subscription-line-item-request.md +20 -20
- package/docs/sdk/models/update-subscription-request.md +1 -0
- package/docs/sdk/models/usage-analytic-instalment.md +24 -0
- package/docs/sdk/models/usage-analytic-point.md +3 -0
- package/docs/sdk/models/webhook-dto-invoice-payment-failed-webhook-payload.md +21 -0
- package/docs/sdk/models/webhook-dto-payment.md +1 -0
- package/docs/sdk/models/webhook-event-name.md +1 -1
- package/docs/sdks/scheduledtasks/README.md +0 -143
- package/docs/sdks/webhookevents/README.md +69 -0
- package/esm/funcs/{scheduled-tasks-schedule-update-billing-period.d.ts → webhook-events-post-webhook-events-invoice-payment-failed.d.ts} +4 -4
- package/esm/funcs/webhook-events-post-webhook-events-invoice-payment-failed.d.ts.map +1 -0
- package/esm/funcs/{scheduled-tasks-schedule-draft-finalization.js → webhook-events-post-webhook-events-invoice-payment-failed.js} +7 -10
- package/esm/funcs/webhook-events-post-webhook-events-invoice-payment-failed.js.map +1 -0
- package/esm/lib/config.d.ts +3 -3
- package/esm/lib/config.d.ts.map +1 -1
- package/esm/lib/config.js +3 -3
- package/esm/lib/config.js.map +1 -1
- package/esm/sdk/models/add-addon-request.d.ts +1 -1
- package/esm/sdk/models/add-addon-to-subscription-request.d.ts +1 -1
- package/esm/sdk/models/billingterm-instalment.d.ts +4 -0
- package/esm/sdk/models/billingterm-instalment.d.ts.map +1 -1
- package/esm/sdk/models/billingterm-instalment.js +2 -0
- package/esm/sdk/models/billingterm-instalment.js.map +1 -1
- package/esm/sdk/models/commitment-info.d.ts +15 -0
- package/esm/sdk/models/commitment-info.d.ts.map +1 -1
- package/esm/sdk/models/commitment-info.js +12 -0
- package/esm/sdk/models/commitment-info.js.map +1 -1
- package/esm/sdk/models/commitment-response.d.ts +0 -1
- package/esm/sdk/models/commitment-response.d.ts.map +1 -1
- package/esm/sdk/models/commitment-response.js +0 -1
- package/esm/sdk/models/commitment-response.js.map +1 -1
- package/esm/sdk/models/create-commitment-request.d.ts +0 -2
- package/esm/sdk/models/create-commitment-request.d.ts.map +1 -1
- package/esm/sdk/models/create-commitment-request.js +0 -1
- package/esm/sdk/models/create-commitment-request.js.map +1 -1
- package/esm/sdk/models/create-customer-request.d.ts +3 -0
- package/esm/sdk/models/create-customer-request.d.ts.map +1 -1
- package/esm/sdk/models/create-customer-request.js +2 -0
- package/esm/sdk/models/create-customer-request.js.map +1 -1
- package/esm/sdk/models/create-subscription-line-item-request.d.ts +16 -1
- package/esm/sdk/models/create-subscription-line-item-request.d.ts.map +1 -1
- package/esm/sdk/models/create-subscription-line-item-request.js.map +1 -1
- package/esm/sdk/models/create-subscription-request.d.ts +13 -1
- package/esm/sdk/models/create-subscription-request.d.ts.map +1 -1
- package/esm/sdk/models/create-subscription-request.js +2 -0
- package/esm/sdk/models/create-subscription-request.js.map +1 -1
- package/esm/sdk/models/customer-response.d.ts +2 -0
- package/esm/sdk/models/customer-response.d.ts.map +1 -1
- package/esm/sdk/models/customer-response.js +2 -0
- package/esm/sdk/models/customer-response.js.map +1 -1
- package/esm/sdk/models/customer.d.ts +2 -0
- package/esm/sdk/models/customer.d.ts.map +1 -1
- package/esm/sdk/models/customer.js +2 -0
- package/esm/sdk/models/customer.js.map +1 -1
- package/esm/sdk/models/get-usage-analytics-request.d.ts +1 -1
- package/esm/sdk/models/get-usage-analytics-response.d.ts +12 -0
- package/esm/sdk/models/get-usage-analytics-response.d.ts.map +1 -1
- package/esm/sdk/models/get-usage-analytics-response.js +4 -0
- package/esm/sdk/models/get-usage-analytics-response.js.map +1 -1
- package/esm/sdk/models/grouped-invoicing-child-request.d.ts +10 -1
- package/esm/sdk/models/grouped-invoicing-child-request.d.ts.map +1 -1
- package/esm/sdk/models/grouped-invoicing-child-request.js.map +1 -1
- package/esm/sdk/models/index.d.ts +5 -2
- package/esm/sdk/models/index.d.ts.map +1 -1
- package/esm/sdk/models/index.js +5 -2
- package/esm/sdk/models/index.js.map +1 -1
- package/esm/sdk/models/invoice-payment-failure-reason.d.ts +11 -0
- package/esm/sdk/models/invoice-payment-failure-reason.d.ts.map +1 -0
- package/esm/sdk/models/invoice-payment-failure-reason.js +12 -0
- package/esm/sdk/models/invoice-payment-failure-reason.js.map +1 -0
- package/esm/sdk/models/payment-response.d.ts +4 -0
- package/esm/sdk/models/payment-response.d.ts.map +1 -1
- package/esm/sdk/models/payment-response.js +2 -0
- package/esm/sdk/models/payment-response.js.map +1 -1
- package/esm/sdk/models/price-response.d.ts +4 -0
- package/esm/sdk/models/price-response.d.ts.map +1 -1
- package/esm/sdk/models/price-response.js +1 -0
- package/esm/sdk/models/price-response.js.map +1 -1
- package/esm/sdk/models/settings-override.d.ts +18 -0
- package/esm/sdk/models/settings-override.d.ts.map +1 -0
- package/esm/sdk/models/settings-override.js +31 -0
- package/esm/sdk/models/settings-override.js.map +1 -0
- package/esm/sdk/models/subscription-config-override.d.ts +19 -0
- package/esm/sdk/models/subscription-config-override.d.ts.map +1 -0
- package/esm/sdk/models/subscription-config-override.js +34 -0
- package/esm/sdk/models/subscription-config-override.js.map +1 -0
- package/esm/sdk/models/subscription-response-v2.d.ts +2 -0
- package/esm/sdk/models/subscription-response-v2.d.ts.map +1 -1
- package/esm/sdk/models/subscription-response-v2.js +2 -0
- package/esm/sdk/models/subscription-response-v2.js.map +1 -1
- package/esm/sdk/models/subscription-response.d.ts +2 -0
- package/esm/sdk/models/subscription-response.d.ts.map +1 -1
- package/esm/sdk/models/subscription-response.js +2 -0
- package/esm/sdk/models/subscription-response.js.map +1 -1
- package/esm/sdk/models/update-customer-request.d.ts +3 -0
- package/esm/sdk/models/update-customer-request.d.ts.map +1 -1
- package/esm/sdk/models/update-customer-request.js +2 -0
- package/esm/sdk/models/update-customer-request.js.map +1 -1
- package/esm/sdk/models/update-subscription-line-item-request.d.ts +17 -1
- package/esm/sdk/models/update-subscription-line-item-request.d.ts.map +1 -1
- package/esm/sdk/models/update-subscription-line-item-request.js.map +1 -1
- package/esm/sdk/models/update-subscription-request.d.ts +3 -0
- package/esm/sdk/models/update-subscription-request.d.ts.map +1 -1
- package/esm/sdk/models/update-subscription-request.js +2 -0
- package/esm/sdk/models/update-subscription-request.js.map +1 -1
- package/esm/sdk/models/usage-analytic-instalment.d.ts +22 -0
- package/esm/sdk/models/usage-analytic-instalment.d.ts.map +1 -0
- package/esm/sdk/models/usage-analytic-instalment.js +34 -0
- package/esm/sdk/models/usage-analytic-instalment.js.map +1 -0
- package/esm/sdk/models/usage-analytic-point.d.ts +6 -0
- package/esm/sdk/models/usage-analytic-point.d.ts.map +1 -1
- package/esm/sdk/models/usage-analytic-point.js +6 -0
- package/esm/sdk/models/usage-analytic-point.js.map +1 -1
- package/esm/sdk/models/webhook-dto-invoice-payment-failed-webhook-payload.d.ts +20 -0
- package/esm/sdk/models/webhook-dto-invoice-payment-failed-webhook-payload.d.ts.map +1 -0
- package/esm/sdk/models/webhook-dto-invoice-payment-failed-webhook-payload.js +31 -0
- package/esm/sdk/models/webhook-dto-invoice-payment-failed-webhook-payload.js.map +1 -0
- package/esm/sdk/models/webhook-dto-payment.d.ts +1 -0
- package/esm/sdk/models/webhook-dto-payment.d.ts.map +1 -1
- package/esm/sdk/models/webhook-dto-payment.js +2 -0
- package/esm/sdk/models/webhook-dto-payment.js.map +1 -1
- package/esm/sdk/models/webhook-event-name.d.ts +1 -0
- package/esm/sdk/models/webhook-event-name.d.ts.map +1 -1
- package/esm/sdk/models/webhook-event-name.js +1 -0
- package/esm/sdk/models/webhook-event-name.js.map +1 -1
- package/esm/sdk/scheduled-tasks.d.ts +0 -14
- package/esm/sdk/scheduled-tasks.d.ts.map +1 -1
- package/esm/sdk/scheduled-tasks.js +0 -20
- package/esm/sdk/scheduled-tasks.js.map +1 -1
- package/esm/sdk/webhook-events.d.ts +7 -0
- package/esm/sdk/webhook-events.d.ts.map +1 -1
- package/esm/sdk/webhook-events.js +10 -0
- package/esm/sdk/webhook-events.js.map +1 -1
- package/jsr.json +1 -1
- package/package.json +2 -2
- package/src/funcs/{scheduled-tasks-schedule-draft-finalization.ts → webhook-events-post-webhook-events-invoice-payment-failed.ts} +13 -19
- package/src/lib/config.ts +4 -3
- package/src/sdk/models/add-addon-request.ts +1 -1
- package/src/sdk/models/add-addon-to-subscription-request.ts +1 -1
- package/src/sdk/models/billingterm-instalment.ts +6 -0
- package/src/sdk/models/commitment-info.ts +29 -0
- package/src/sdk/models/commitment-response.ts +0 -2
- package/src/sdk/models/create-commitment-request.ts +0 -3
- package/src/sdk/models/create-customer-request.ts +8 -0
- package/src/sdk/models/create-subscription-line-item-request.ts +16 -1
- package/src/sdk/models/create-subscription-request.ts +18 -1
- package/src/sdk/models/customer-response.ts +6 -0
- package/src/sdk/models/customer.ts +6 -0
- package/src/sdk/models/get-usage-analytics-request.ts +1 -1
- package/src/sdk/models/get-usage-analytics-response.ts +18 -0
- package/src/sdk/models/grouped-invoicing-child-request.ts +10 -1
- package/src/sdk/models/index.ts +5 -2
- package/src/sdk/models/invoice-payment-failure-reason.ts +22 -0
- package/src/sdk/models/payment-response.ts +6 -0
- package/src/sdk/models/price-response.ts +5 -0
- package/src/sdk/models/settings-override.ts +73 -0
- package/src/sdk/models/subscription-config-override.ts +71 -0
- package/src/sdk/models/subscription-response-v2.ts +6 -0
- package/src/sdk/models/subscription-response.ts +6 -0
- package/src/sdk/models/update-customer-request.ts +8 -0
- package/src/sdk/models/update-subscription-line-item-request.ts +17 -1
- package/src/sdk/models/update-subscription-request.ts +8 -0
- package/src/sdk/models/usage-analytic-instalment.ts +66 -0
- package/src/sdk/models/usage-analytic-point.ts +13 -0
- package/src/sdk/models/webhook-dto-invoice-payment-failed-webhook-payload.ts +73 -0
- package/src/sdk/models/webhook-dto-payment.ts +3 -0
- package/src/sdk/models/webhook-event-name.ts +1 -0
- package/src/sdk/scheduled-tasks.ts +0 -34
- package/src/sdk/webhook-events.ts +16 -0
- package/docs/sdk/models/schedule-draft-finalization-response.md +0 -16
- package/docs/sdk/models/schedule-update-billing-period-request.md +0 -16
- package/docs/sdk/models/schedule-update-billing-period-response.md +0 -16
- package/esm/funcs/scheduled-tasks-schedule-draft-finalization.d.ts +0 -17
- package/esm/funcs/scheduled-tasks-schedule-draft-finalization.d.ts.map +0 -1
- package/esm/funcs/scheduled-tasks-schedule-draft-finalization.js.map +0 -1
- package/esm/funcs/scheduled-tasks-schedule-update-billing-period.d.ts.map +0 -1
- package/esm/funcs/scheduled-tasks-schedule-update-billing-period.js +0 -73
- package/esm/funcs/scheduled-tasks-schedule-update-billing-period.js.map +0 -1
- package/esm/sdk/models/schedule-draft-finalization-op.d.ts +0 -11
- package/esm/sdk/models/schedule-draft-finalization-op.d.ts.map +0 -1
- package/esm/sdk/models/schedule-draft-finalization-op.js +0 -11
- package/esm/sdk/models/schedule-draft-finalization-op.js.map +0 -1
- package/esm/sdk/models/schedule-update-billing-period-op.d.ts +0 -20
- package/esm/sdk/models/schedule-update-billing-period-op.d.ts.map +0 -1
- package/esm/sdk/models/schedule-update-billing-period-op.js +0 -16
- package/esm/sdk/models/schedule-update-billing-period-op.js.map +0 -1
- package/src/funcs/scheduled-tasks-schedule-update-billing-period.ts +0 -157
- package/src/sdk/models/schedule-draft-finalization-op.ts +0 -29
- package/src/sdk/models/schedule-update-billing-period-op.ts +0 -54
|
@@ -20,13 +20,25 @@ import {
|
|
|
20
20
|
import { SDKValidationError } from "./sdk-validation-error.js";
|
|
21
21
|
|
|
22
22
|
export type CommitmentInfo = {
|
|
23
|
+
/**
|
|
24
|
+
* Amount is the commitment amount (v1), or computed_commitment_utilized_amount + computed_true_up_amount (v2).
|
|
25
|
+
*/
|
|
23
26
|
amount?: string | undefined;
|
|
24
27
|
computedCommitmentUtilizedAmount?: string | undefined;
|
|
28
|
+
/**
|
|
29
|
+
* Usage units behind the computed amounts: usage a billing-terms commitment covers counts as utilized at no
|
|
30
|
+
*
|
|
31
|
+
* @remarks
|
|
32
|
+
* charge, and a quantity commitment's true-up counts its unused units.
|
|
33
|
+
*/
|
|
34
|
+
computedCommitmentUtilizedQuantity?: string | undefined;
|
|
25
35
|
computedOverageAmount?: string | undefined;
|
|
36
|
+
computedOverageQuantity?: string | undefined;
|
|
26
37
|
/**
|
|
27
38
|
* total_cost = computed_commitment_utilized_amount + computed_overage_amount + computed_true_up_amount
|
|
28
39
|
*/
|
|
29
40
|
computedTrueUpAmount?: string | undefined;
|
|
41
|
+
computedTrueUpQuantity?: string | undefined;
|
|
30
42
|
duration?: BillingPeriod | undefined;
|
|
31
43
|
isWindowed?: boolean | undefined;
|
|
32
44
|
overageFactor?: string | undefined;
|
|
@@ -46,8 +58,11 @@ export const CommitmentInfo$inboundSchema: z.ZodMiniType<
|
|
|
46
58
|
z.object({
|
|
47
59
|
amount: types.optional(types.string()),
|
|
48
60
|
computed_commitment_utilized_amount: types.optional(types.string()),
|
|
61
|
+
computed_commitment_utilized_quantity: types.optional(types.string()),
|
|
49
62
|
computed_overage_amount: types.optional(types.string()),
|
|
63
|
+
computed_overage_quantity: types.optional(types.string()),
|
|
50
64
|
computed_true_up_amount: types.optional(types.string()),
|
|
65
|
+
computed_true_up_quantity: types.optional(types.string()),
|
|
51
66
|
duration: types.optional(BillingPeriod$inboundSchema),
|
|
52
67
|
is_windowed: types.optional(types.boolean()),
|
|
53
68
|
overage_factor: types.optional(types.string()),
|
|
@@ -58,8 +73,12 @@ export const CommitmentInfo$inboundSchema: z.ZodMiniType<
|
|
|
58
73
|
z.transform((v) => {
|
|
59
74
|
return remap$(v, {
|
|
60
75
|
"computed_commitment_utilized_amount": "computedCommitmentUtilizedAmount",
|
|
76
|
+
"computed_commitment_utilized_quantity":
|
|
77
|
+
"computedCommitmentUtilizedQuantity",
|
|
61
78
|
"computed_overage_amount": "computedOverageAmount",
|
|
79
|
+
"computed_overage_quantity": "computedOverageQuantity",
|
|
62
80
|
"computed_true_up_amount": "computedTrueUpAmount",
|
|
81
|
+
"computed_true_up_quantity": "computedTrueUpQuantity",
|
|
63
82
|
"is_windowed": "isWindowed",
|
|
64
83
|
"overage_factor": "overageFactor",
|
|
65
84
|
"true_up_enabled": "trueUpEnabled",
|
|
@@ -70,8 +89,11 @@ export const CommitmentInfo$inboundSchema: z.ZodMiniType<
|
|
|
70
89
|
export type CommitmentInfo$Outbound = {
|
|
71
90
|
amount?: string | undefined;
|
|
72
91
|
computed_commitment_utilized_amount?: string | undefined;
|
|
92
|
+
computed_commitment_utilized_quantity?: string | undefined;
|
|
73
93
|
computed_overage_amount?: string | undefined;
|
|
94
|
+
computed_overage_quantity?: string | undefined;
|
|
74
95
|
computed_true_up_amount?: string | undefined;
|
|
96
|
+
computed_true_up_quantity?: string | undefined;
|
|
75
97
|
duration?: string | undefined;
|
|
76
98
|
is_windowed?: boolean | undefined;
|
|
77
99
|
overage_factor?: string | undefined;
|
|
@@ -88,8 +110,11 @@ export const CommitmentInfo$outboundSchema: z.ZodMiniType<
|
|
|
88
110
|
z.object({
|
|
89
111
|
amount: z.optional(z.string()),
|
|
90
112
|
computedCommitmentUtilizedAmount: z.optional(z.string()),
|
|
113
|
+
computedCommitmentUtilizedQuantity: z.optional(z.string()),
|
|
91
114
|
computedOverageAmount: z.optional(z.string()),
|
|
115
|
+
computedOverageQuantity: z.optional(z.string()),
|
|
92
116
|
computedTrueUpAmount: z.optional(z.string()),
|
|
117
|
+
computedTrueUpQuantity: z.optional(z.string()),
|
|
93
118
|
duration: z.optional(BillingPeriod$outboundSchema),
|
|
94
119
|
isWindowed: z.optional(z.boolean()),
|
|
95
120
|
overageFactor: z.optional(z.string()),
|
|
@@ -100,8 +125,12 @@ export const CommitmentInfo$outboundSchema: z.ZodMiniType<
|
|
|
100
125
|
z.transform((v) => {
|
|
101
126
|
return remap$(v, {
|
|
102
127
|
computedCommitmentUtilizedAmount: "computed_commitment_utilized_amount",
|
|
128
|
+
computedCommitmentUtilizedQuantity:
|
|
129
|
+
"computed_commitment_utilized_quantity",
|
|
103
130
|
computedOverageAmount: "computed_overage_amount",
|
|
131
|
+
computedOverageQuantity: "computed_overage_quantity",
|
|
104
132
|
computedTrueUpAmount: "computed_true_up_amount",
|
|
133
|
+
computedTrueUpQuantity: "computed_true_up_quantity",
|
|
105
134
|
isWindowed: "is_windowed",
|
|
106
135
|
overageFactor: "overage_factor",
|
|
107
136
|
trueUpEnabled: "true_up_enabled",
|
|
@@ -87,7 +87,6 @@ export type CommitmentResponse = {
|
|
|
87
87
|
tenantId?: string | undefined;
|
|
88
88
|
terminatedAt?: Date | undefined;
|
|
89
89
|
terminationInvoiceId?: string | undefined;
|
|
90
|
-
timezone?: string | undefined;
|
|
91
90
|
totalAmount?: string | undefined;
|
|
92
91
|
type?: CommitmentType | undefined;
|
|
93
92
|
updatedAt?: Date | undefined;
|
|
@@ -136,7 +135,6 @@ export const CommitmentResponse$inboundSchema: z.ZodMiniType<
|
|
|
136
135
|
tenant_id: types.optional(types.string()),
|
|
137
136
|
terminated_at: types.optional(types.date()),
|
|
138
137
|
termination_invoice_id: types.optional(types.string()),
|
|
139
|
-
timezone: types.optional(types.string()),
|
|
140
138
|
total_amount: types.optional(types.string()),
|
|
141
139
|
type: types.optional(CommitmentType$inboundSchema),
|
|
142
140
|
updated_at: types.optional(types.date()),
|
|
@@ -75,7 +75,6 @@ export type CreateCommitmentRequest = {
|
|
|
75
75
|
* SubscriptionID is required on POST /commitments and set server-side on inline commitments.
|
|
76
76
|
*/
|
|
77
77
|
subscriptionId?: string | undefined;
|
|
78
|
-
timezone?: string | undefined;
|
|
79
78
|
type: CommitmentType;
|
|
80
79
|
value?: string | undefined;
|
|
81
80
|
};
|
|
@@ -100,7 +99,6 @@ export type CreateCommitmentRequest$Outbound = {
|
|
|
100
99
|
scope: CommitmentScopeInput$Outbound;
|
|
101
100
|
start_date: string;
|
|
102
101
|
subscription_id?: string | undefined;
|
|
103
|
-
timezone?: string | undefined;
|
|
104
102
|
type: string;
|
|
105
103
|
value?: string | undefined;
|
|
106
104
|
};
|
|
@@ -129,7 +127,6 @@ export const CreateCommitmentRequest$outboundSchema: z.ZodMiniType<
|
|
|
129
127
|
scope: CommitmentScopeInput$outboundSchema,
|
|
130
128
|
startDate: z.pipe(z.date(), z.transform(v => v.toISOString())),
|
|
131
129
|
subscriptionId: z.optional(z.string()),
|
|
132
|
-
timezone: z.optional(z.string()),
|
|
133
130
|
type: CommitmentType$outboundSchema,
|
|
134
131
|
value: z.optional(z.string()),
|
|
135
132
|
}),
|
|
@@ -14,6 +14,11 @@ import {
|
|
|
14
14
|
CustomerContactPerson$Outbound,
|
|
15
15
|
CustomerContactPerson$outboundSchema,
|
|
16
16
|
} from "./customer-contact-person.js";
|
|
17
|
+
import {
|
|
18
|
+
SettingsOverride,
|
|
19
|
+
SettingsOverride$Outbound,
|
|
20
|
+
SettingsOverride$outboundSchema,
|
|
21
|
+
} from "./settings-override.js";
|
|
17
22
|
import {
|
|
18
23
|
TaxRateOverride,
|
|
19
24
|
TaxRateOverride$Outbound,
|
|
@@ -94,6 +99,7 @@ export type CreateCustomerRequest = {
|
|
|
94
99
|
* onboarding_workflow_name is given if a custom onboarding workflow is to be triggered for this customer
|
|
95
100
|
*/
|
|
96
101
|
onboardingWorkflowName?: string | undefined;
|
|
102
|
+
settings?: SettingsOverride | undefined;
|
|
97
103
|
/**
|
|
98
104
|
* skip_onboarding_workflow when true, prevents the customer onboarding workflow from being triggered
|
|
99
105
|
*
|
|
@@ -136,6 +142,7 @@ export type CreateCustomerRequest$Outbound = {
|
|
|
136
142
|
metadata?: { [k: string]: string } | undefined;
|
|
137
143
|
name: string;
|
|
138
144
|
onboarding_workflow_name?: string | undefined;
|
|
145
|
+
settings?: SettingsOverride$Outbound | undefined;
|
|
139
146
|
skip_onboarding_workflow?: boolean | undefined;
|
|
140
147
|
tax_rate_overrides?: Array<TaxRateOverride$Outbound> | undefined;
|
|
141
148
|
tax_treatment?: string | undefined;
|
|
@@ -166,6 +173,7 @@ export const CreateCustomerRequest$outboundSchema: z.ZodMiniType<
|
|
|
166
173
|
metadata: z.optional(z.record(z.string(), z.string())),
|
|
167
174
|
name: z.string(),
|
|
168
175
|
onboardingWorkflowName: z.optional(z.string()),
|
|
176
|
+
settings: z.optional(SettingsOverride$outboundSchema),
|
|
169
177
|
skipOnboardingWorkflow: z.optional(z.boolean()),
|
|
170
178
|
taxRateOverrides: z.optional(z.array(TaxRateOverride$outboundSchema)),
|
|
171
179
|
taxTreatment: z.optional(TaxTreatment$outboundSchema),
|
|
@@ -29,15 +29,30 @@ import {
|
|
|
29
29
|
|
|
30
30
|
export type CreateSubscriptionLineItemRequest = {
|
|
31
31
|
/**
|
|
32
|
-
*
|
|
32
|
+
* Deprecated: use POST /commitments instead.
|
|
33
33
|
*/
|
|
34
34
|
commitmentAmount?: number | undefined;
|
|
35
35
|
commitmentDuration?: BillingPeriod | undefined;
|
|
36
|
+
/**
|
|
37
|
+
* Deprecated: use POST /commitments instead.
|
|
38
|
+
*/
|
|
36
39
|
commitmentOverageFactor?: number | undefined;
|
|
40
|
+
/**
|
|
41
|
+
* Deprecated: use POST /commitments instead.
|
|
42
|
+
*/
|
|
37
43
|
commitmentQuantity?: number | undefined;
|
|
44
|
+
/**
|
|
45
|
+
* Deprecated: use POST /commitments instead.
|
|
46
|
+
*/
|
|
38
47
|
commitmentTimeBuckets?: Array<CommitmentBucketRequest> | undefined;
|
|
48
|
+
/**
|
|
49
|
+
* Deprecated: use POST /commitments instead.
|
|
50
|
+
*/
|
|
39
51
|
commitmentTrueUpEnabled?: boolean | undefined;
|
|
40
52
|
commitmentType?: CommitmentType | undefined;
|
|
53
|
+
/**
|
|
54
|
+
* Deprecated: use POST /commitments instead.
|
|
55
|
+
*/
|
|
41
56
|
commitmentWindowed?: boolean | undefined;
|
|
42
57
|
displayName?: string | undefined;
|
|
43
58
|
endDate?: Date | undefined;
|
|
@@ -76,6 +76,11 @@ import {
|
|
|
76
76
|
ProrationBehavior,
|
|
77
77
|
ProrationBehavior$outboundSchema,
|
|
78
78
|
} from "./proration-behavior.js";
|
|
79
|
+
import {
|
|
80
|
+
SettingsOverride,
|
|
81
|
+
SettingsOverride$Outbound,
|
|
82
|
+
SettingsOverride$outboundSchema,
|
|
83
|
+
} from "./settings-override.js";
|
|
79
84
|
import {
|
|
80
85
|
SubscriptionCouponInput,
|
|
81
86
|
SubscriptionCouponInput$Outbound,
|
|
@@ -122,6 +127,9 @@ export type CreateSubscriptionRequest = {
|
|
|
122
127
|
billingPeriodCount?: number | undefined;
|
|
123
128
|
checkout?: CheckoutParams | undefined;
|
|
124
129
|
collectionMethod?: CollectionMethod | undefined;
|
|
130
|
+
/**
|
|
131
|
+
* Deprecated: use POST /commitments instead.
|
|
132
|
+
*/
|
|
125
133
|
commitmentAmount?: string | undefined;
|
|
126
134
|
commitmentDuration?: BillingPeriod | undefined;
|
|
127
135
|
/**
|
|
@@ -141,6 +149,9 @@ export type CreateSubscriptionRequest = {
|
|
|
141
149
|
* CustomerID takes priority over ExternalCustomerID when both are provided.
|
|
142
150
|
*/
|
|
143
151
|
customerId?: string | undefined;
|
|
152
|
+
/**
|
|
153
|
+
* Deprecated: use POST /commitments instead.
|
|
154
|
+
*/
|
|
144
155
|
enableTrueUp?: boolean | undefined;
|
|
145
156
|
endDate?: Date | undefined;
|
|
146
157
|
externalCustomerId?: string | undefined;
|
|
@@ -168,7 +179,7 @@ export type CreateSubscriptionRequest = {
|
|
|
168
179
|
includePriceIds?: Array<string> | undefined;
|
|
169
180
|
inheritance?: SubscriptionInheritanceConfig | undefined;
|
|
170
181
|
/**
|
|
171
|
-
*
|
|
182
|
+
* Deprecated: use POST /commitments instead.
|
|
172
183
|
*/
|
|
173
184
|
lineItemCommitments?: { [k: string]: LineItemCommitmentConfig } | undefined;
|
|
174
185
|
/**
|
|
@@ -182,6 +193,9 @@ export type CreateSubscriptionRequest = {
|
|
|
182
193
|
lineItems?: Array<CreateSubscriptionLineItemRequest> | undefined;
|
|
183
194
|
lookupKey?: string | undefined;
|
|
184
195
|
metadata?: { [k: string]: string } | undefined;
|
|
196
|
+
/**
|
|
197
|
+
* Deprecated: use POST /commitments instead.
|
|
198
|
+
*/
|
|
185
199
|
overageFactor?: string | undefined;
|
|
186
200
|
overrideEntitlements?: Array<OverrideEntitlementRequest> | undefined;
|
|
187
201
|
/**
|
|
@@ -193,6 +207,7 @@ export type CreateSubscriptionRequest = {
|
|
|
193
207
|
phases?: Array<SubscriptionPhaseCreateRequest> | undefined;
|
|
194
208
|
planId: string;
|
|
195
209
|
prorationBehavior?: ProrationBehavior | undefined;
|
|
210
|
+
settings?: SettingsOverride | undefined;
|
|
196
211
|
startDate?: Date | undefined;
|
|
197
212
|
/**
|
|
198
213
|
* SubscriptionCoupons is the preferred way to attach coupons at creation.
|
|
@@ -258,6 +273,7 @@ export type CreateSubscriptionRequest$Outbound = {
|
|
|
258
273
|
phases?: Array<SubscriptionPhaseCreateRequest$Outbound> | undefined;
|
|
259
274
|
plan_id: string;
|
|
260
275
|
proration_behavior?: string | undefined;
|
|
276
|
+
settings?: SettingsOverride$Outbound | undefined;
|
|
261
277
|
start_date?: string | undefined;
|
|
262
278
|
subscription_coupons?: Array<SubscriptionCouponInput$Outbound> | undefined;
|
|
263
279
|
subscription_entitlement_grants?:
|
|
@@ -321,6 +337,7 @@ export const CreateSubscriptionRequest$outboundSchema: z.ZodMiniType<
|
|
|
321
337
|
phases: z.optional(z.array(SubscriptionPhaseCreateRequest$outboundSchema)),
|
|
322
338
|
planId: z.string(),
|
|
323
339
|
prorationBehavior: z.optional(ProrationBehavior$outboundSchema),
|
|
340
|
+
settings: z.optional(SettingsOverride$outboundSchema),
|
|
324
341
|
startDate: z.optional(z.pipe(z.date(), z.transform(v => v.toISOString()))),
|
|
325
342
|
subscriptionCoupons: z.optional(
|
|
326
343
|
z.array(SubscriptionCouponInput$outboundSchema),
|
|
@@ -16,6 +16,10 @@ import {
|
|
|
16
16
|
EntityIntegrationMappingResponse$inboundSchema,
|
|
17
17
|
} from "./entity-integration-mapping-response.js";
|
|
18
18
|
import { SDKValidationError } from "./sdk-validation-error.js";
|
|
19
|
+
import {
|
|
20
|
+
SettingsOverride,
|
|
21
|
+
SettingsOverride$inboundSchema,
|
|
22
|
+
} from "./settings-override.js";
|
|
19
23
|
import { Status, Status$inboundSchema } from "./status.js";
|
|
20
24
|
import { TaxTreatment, TaxTreatment$inboundSchema } from "./tax-treatment.js";
|
|
21
25
|
|
|
@@ -87,6 +91,7 @@ export type CustomerResponse = {
|
|
|
87
91
|
* Name is the name of the customer
|
|
88
92
|
*/
|
|
89
93
|
name?: string | undefined;
|
|
94
|
+
settings?: SettingsOverride | undefined;
|
|
90
95
|
status?: Status | undefined;
|
|
91
96
|
taxTreatment?: TaxTreatment | undefined;
|
|
92
97
|
tenantId?: string | undefined;
|
|
@@ -130,6 +135,7 @@ export const CustomerResponse$inboundSchema: z.ZodMiniType<
|
|
|
130
135
|
),
|
|
131
136
|
metadata: types.optional(z.record(z.string(), types.string())),
|
|
132
137
|
name: types.optional(types.string()),
|
|
138
|
+
settings: types.optional(SettingsOverride$inboundSchema),
|
|
133
139
|
status: types.optional(Status$inboundSchema),
|
|
134
140
|
tax_treatment: types.optional(TaxTreatment$inboundSchema),
|
|
135
141
|
tenant_id: types.optional(types.string()),
|
|
@@ -12,6 +12,10 @@ import {
|
|
|
12
12
|
CustomerContactPerson$inboundSchema,
|
|
13
13
|
} from "./customer-contact-person.js";
|
|
14
14
|
import { SDKValidationError } from "./sdk-validation-error.js";
|
|
15
|
+
import {
|
|
16
|
+
SettingsOverride,
|
|
17
|
+
SettingsOverride$inboundSchema,
|
|
18
|
+
} from "./settings-override.js";
|
|
15
19
|
import { Status, Status$inboundSchema } from "./status.js";
|
|
16
20
|
import { TaxTreatment, TaxTreatment$inboundSchema } from "./tax-treatment.js";
|
|
17
21
|
|
|
@@ -79,6 +83,7 @@ export type Customer = {
|
|
|
79
83
|
* Name is the name of the customer
|
|
80
84
|
*/
|
|
81
85
|
name?: string | undefined;
|
|
86
|
+
settings?: SettingsOverride | undefined;
|
|
82
87
|
status?: Status | undefined;
|
|
83
88
|
taxTreatment?: TaxTreatment | undefined;
|
|
84
89
|
tenantId?: string | undefined;
|
|
@@ -116,6 +121,7 @@ export const Customer$inboundSchema: z.ZodMiniType<Customer, unknown> = z.pipe(
|
|
|
116
121
|
id: types.optional(types.string()),
|
|
117
122
|
metadata: types.optional(z.record(z.string(), types.string())),
|
|
118
123
|
name: types.optional(types.string()),
|
|
124
|
+
settings: types.optional(SettingsOverride$inboundSchema),
|
|
119
125
|
status: types.optional(Status$inboundSchema),
|
|
120
126
|
tax_treatment: types.optional(TaxTreatment$inboundSchema),
|
|
121
127
|
tenant_id: types.optional(types.string()),
|
|
@@ -18,7 +18,7 @@ export type GetUsageAnalyticsRequest = {
|
|
|
18
18
|
breakdownBucket?: boolean | undefined;
|
|
19
19
|
endTime?: Date | undefined;
|
|
20
20
|
/**
|
|
21
|
-
* allowed values: "price", "meter", "feature", "subscription_line_item","plan","addon"
|
|
21
|
+
* allowed values: "price", "meter", "feature", "subscription_line_item","plan","addon","source","instalments"
|
|
22
22
|
*/
|
|
23
23
|
expand?: Array<string> | undefined;
|
|
24
24
|
/**
|
|
@@ -12,6 +12,10 @@ import {
|
|
|
12
12
|
CustomAnalyticItem$inboundSchema,
|
|
13
13
|
} from "./custom-analytic-item.js";
|
|
14
14
|
import { SDKValidationError } from "./sdk-validation-error.js";
|
|
15
|
+
import {
|
|
16
|
+
UsageAnalyticInstalment,
|
|
17
|
+
UsageAnalyticInstalment$inboundSchema,
|
|
18
|
+
} from "./usage-analytic-instalment.js";
|
|
15
19
|
import {
|
|
16
20
|
UsageAnalyticItem,
|
|
17
21
|
UsageAnalyticItem$inboundSchema,
|
|
@@ -20,12 +24,23 @@ import {
|
|
|
20
24
|
export type GetUsageAnalyticsResponse = {
|
|
21
25
|
currency?: string | undefined;
|
|
22
26
|
customAnalytics?: Array<CustomAnalyticItem> | undefined;
|
|
27
|
+
/**
|
|
28
|
+
* Instalments lists, with expand "instalments", the instalments invoiced in the range for the v2 commitments covering
|
|
29
|
+
*
|
|
30
|
+
* @remarks
|
|
31
|
+
* a queried meter; it is empty with property or source filters, or when no usage line runs in the range.
|
|
32
|
+
*/
|
|
33
|
+
instalments?: Array<UsageAnalyticInstalment> | undefined;
|
|
23
34
|
items?: Array<UsageAnalyticItem> | undefined;
|
|
24
35
|
subtotal?: string | undefined;
|
|
25
36
|
/**
|
|
26
37
|
* TotalCost is the final cost after discount (Subtotal - TotalDiscount)
|
|
27
38
|
*/
|
|
28
39
|
totalCost?: string | undefined;
|
|
40
|
+
/**
|
|
41
|
+
* TotalCostWithInstalments is TotalCost plus the amounts of Instalments, set when expand includes "instalments".
|
|
42
|
+
*/
|
|
43
|
+
totalCostWithInstalments?: string | undefined;
|
|
29
44
|
totalDiscount?: string | undefined;
|
|
30
45
|
};
|
|
31
46
|
|
|
@@ -37,15 +52,18 @@ export const GetUsageAnalyticsResponse$inboundSchema: z.ZodMiniType<
|
|
|
37
52
|
z.object({
|
|
38
53
|
currency: types.optional(types.string()),
|
|
39
54
|
custom_analytics: types.optional(z.array(CustomAnalyticItem$inboundSchema)),
|
|
55
|
+
instalments: types.optional(z.array(UsageAnalyticInstalment$inboundSchema)),
|
|
40
56
|
items: types.optional(z.array(UsageAnalyticItem$inboundSchema)),
|
|
41
57
|
subtotal: types.optional(types.string()),
|
|
42
58
|
total_cost: types.optional(types.string()),
|
|
59
|
+
total_cost_with_instalments: types.optional(types.string()),
|
|
43
60
|
total_discount: types.optional(types.string()),
|
|
44
61
|
}),
|
|
45
62
|
z.transform((v) => {
|
|
46
63
|
return remap$(v, {
|
|
47
64
|
"custom_analytics": "customAnalytics",
|
|
48
65
|
"total_cost": "totalCost",
|
|
66
|
+
"total_cost_with_instalments": "totalCostWithInstalments",
|
|
49
67
|
"total_discount": "totalDiscount",
|
|
50
68
|
});
|
|
51
69
|
}),
|
|
@@ -65,6 +65,9 @@ import {
|
|
|
65
65
|
|
|
66
66
|
export type GroupedInvoicingChildRequest = {
|
|
67
67
|
addons?: Array<AddAddonToSubscriptionRequest> | undefined;
|
|
68
|
+
/**
|
|
69
|
+
* Deprecated: use POST /commitments instead.
|
|
70
|
+
*/
|
|
68
71
|
commitmentAmount?: string | undefined;
|
|
69
72
|
commitmentDuration?: BillingPeriod | undefined;
|
|
70
73
|
/**
|
|
@@ -72,10 +75,13 @@ export type GroupedInvoicingChildRequest = {
|
|
|
72
75
|
*/
|
|
73
76
|
coupons?: Array<string> | undefined;
|
|
74
77
|
creditGrants?: Array<CreateCreditGrantRequest> | undefined;
|
|
78
|
+
/**
|
|
79
|
+
* Deprecated: use POST /commitments instead.
|
|
80
|
+
*/
|
|
75
81
|
enableTrueUp?: boolean | undefined;
|
|
76
82
|
externalCustomerId: string;
|
|
77
83
|
/**
|
|
78
|
-
*
|
|
84
|
+
* Deprecated: use POST /commitments instead.
|
|
79
85
|
*/
|
|
80
86
|
lineItemCommitments?: { [k: string]: LineItemCommitmentConfig } | undefined;
|
|
81
87
|
/**
|
|
@@ -86,6 +92,9 @@ export type GroupedInvoicingChildRequest = {
|
|
|
86
92
|
* LineItems are extra (non-plan) line items added at creation.
|
|
87
93
|
*/
|
|
88
94
|
lineItems?: Array<CreateSubscriptionLineItemRequest> | undefined;
|
|
95
|
+
/**
|
|
96
|
+
* Deprecated: use POST /commitments instead.
|
|
97
|
+
*/
|
|
89
98
|
overageFactor?: string | undefined;
|
|
90
99
|
overrideEntitlements?: Array<OverrideEntitlementRequest> | undefined;
|
|
91
100
|
/**
|
package/src/sdk/models/index.ts
CHANGED
|
@@ -442,6 +442,7 @@ export * from "./invoice-modify-line-item-action.js";
|
|
|
442
442
|
export * from "./invoice-modify-line-item-params.js";
|
|
443
443
|
export * from "./invoice-modify-response.js";
|
|
444
444
|
export * from "./invoice-modify-type.js";
|
|
445
|
+
export * from "./invoice-payment-failure-reason.js";
|
|
445
446
|
export * from "./invoice-preview.js";
|
|
446
447
|
export * from "./invoice-response.js";
|
|
447
448
|
export * from "./invoice-source-type.js";
|
|
@@ -657,10 +658,8 @@ export * from "./saved-payment-method.js";
|
|
|
657
658
|
export * from "./saved-payment-methods-response.js";
|
|
658
659
|
export * from "./saved-recurring-payment-details.js";
|
|
659
660
|
export * from "./saved-upi-details.js";
|
|
660
|
-
export * from "./schedule-draft-finalization-op.js";
|
|
661
661
|
export * from "./schedule-status.js";
|
|
662
662
|
export * from "./schedule-type.js";
|
|
663
|
-
export * from "./schedule-update-billing-period-op.js";
|
|
664
663
|
export * from "./scheduled-task-entity-type.js";
|
|
665
664
|
export * from "./scheduled-task-interval.js";
|
|
666
665
|
export * from "./scheduled-task-response.js";
|
|
@@ -679,6 +678,7 @@ export * from "./self-billing-portal-response.js";
|
|
|
679
678
|
export * from "./self-billing-status-response.js";
|
|
680
679
|
export * from "./self-billing-summary-response.js";
|
|
681
680
|
export * from "./service-period-custom-fields.js";
|
|
681
|
+
export * from "./settings-override.js";
|
|
682
682
|
export * from "./shape.js";
|
|
683
683
|
export * from "./sort-condition.js";
|
|
684
684
|
export * from "./sort-direction.js";
|
|
@@ -707,6 +707,7 @@ export * from "./subscription-change-request.js";
|
|
|
707
707
|
export * from "./subscription-change-type.js";
|
|
708
708
|
export * from "./subscription-change-v2-request.js";
|
|
709
709
|
export * from "./subscription-change-v2-response.js";
|
|
710
|
+
export * from "./subscription-config-override.js";
|
|
710
711
|
export * from "./subscription-coupon-input.js";
|
|
711
712
|
export * from "./subscription-entitlement-grants-response.js";
|
|
712
713
|
export * from "./subscription-entitlements-response.js";
|
|
@@ -844,6 +845,7 @@ export * from "./update-user-roles-request.js";
|
|
|
844
845
|
export * from "./update-user-roles-response.js";
|
|
845
846
|
export * from "./update-wallet-op.js";
|
|
846
847
|
export * from "./update-wallet-request.js";
|
|
848
|
+
export * from "./usage-analytic-instalment.js";
|
|
847
849
|
export * from "./usage-analytic-item.js";
|
|
848
850
|
export * from "./usage-analytic-point.js";
|
|
849
851
|
export * from "./usage-breakdown-item.js";
|
|
@@ -895,6 +897,7 @@ export * from "./webhook-dto-entitlement.js";
|
|
|
895
897
|
export * from "./webhook-dto-feature-webhook-payload.js";
|
|
896
898
|
export * from "./webhook-dto-feature.js";
|
|
897
899
|
export * from "./webhook-dto-invoice-line-item.js";
|
|
900
|
+
export * from "./webhook-dto-invoice-payment-failed-webhook-payload.js";
|
|
898
901
|
export * from "./webhook-dto-invoice-sync-webhook-payload.js";
|
|
899
902
|
export * from "./webhook-dto-invoice-webhook-payload.js";
|
|
900
903
|
export * from "./webhook-dto-invoice.js";
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
/*
|
|
2
|
+
* Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.
|
|
3
|
+
*/
|
|
4
|
+
|
|
5
|
+
import * as z from "zod/v4-mini";
|
|
6
|
+
import * as openEnums from "../../types/enums.js";
|
|
7
|
+
import { OpenEnum } from "../../types/enums.js";
|
|
8
|
+
|
|
9
|
+
export const InvoicePaymentFailureReason = {
|
|
10
|
+
PaymentMethodUnavailable: "payment_method_unavailable",
|
|
11
|
+
ProviderError: "provider_error",
|
|
12
|
+
Declined: "declined",
|
|
13
|
+
} as const;
|
|
14
|
+
export type InvoicePaymentFailureReason = OpenEnum<
|
|
15
|
+
typeof InvoicePaymentFailureReason
|
|
16
|
+
>;
|
|
17
|
+
|
|
18
|
+
/** @internal */
|
|
19
|
+
export const InvoicePaymentFailureReason$inboundSchema: z.ZodMiniType<
|
|
20
|
+
InvoicePaymentFailureReason,
|
|
21
|
+
unknown
|
|
22
|
+
> = openEnums.inboundSchema(InvoicePaymentFailureReason);
|
|
@@ -28,6 +28,10 @@ import { SDKValidationError } from "./sdk-validation-error.js";
|
|
|
28
28
|
export type PaymentResponse = {
|
|
29
29
|
amount?: string | undefined;
|
|
30
30
|
attempts?: Array<PaymentAttemptResponse> | undefined;
|
|
31
|
+
/**
|
|
32
|
+
* connection_id is the connection that took this payment; null when no gateway connection was used
|
|
33
|
+
*/
|
|
34
|
+
connectionId?: string | undefined;
|
|
31
35
|
createdAt?: Date | undefined;
|
|
32
36
|
createdBy?: string | undefined;
|
|
33
37
|
currency?: string | undefined;
|
|
@@ -66,6 +70,7 @@ export const PaymentResponse$inboundSchema: z.ZodMiniType<
|
|
|
66
70
|
z.object({
|
|
67
71
|
amount: types.optional(types.string()),
|
|
68
72
|
attempts: types.optional(z.array(PaymentAttemptResponse$inboundSchema)),
|
|
73
|
+
connection_id: types.optional(types.string()),
|
|
69
74
|
created_at: types.optional(types.date()),
|
|
70
75
|
created_by: types.optional(types.string()),
|
|
71
76
|
currency: types.optional(types.string()),
|
|
@@ -97,6 +102,7 @@ export const PaymentResponse$inboundSchema: z.ZodMiniType<
|
|
|
97
102
|
}),
|
|
98
103
|
z.transform((v) => {
|
|
99
104
|
return remap$(v, {
|
|
105
|
+
"connection_id": "connectionId",
|
|
100
106
|
"created_at": "createdAt",
|
|
101
107
|
"created_by": "createdBy",
|
|
102
108
|
"destination_id": "destinationId",
|
|
@@ -199,6 +199,10 @@ export type PriceResponse = {
|
|
|
199
199
|
type?: PriceType | undefined;
|
|
200
200
|
updatedAt?: Date | undefined;
|
|
201
201
|
updatedBy?: string | undefined;
|
|
202
|
+
/**
|
|
203
|
+
* Warnings lists defaults applied on create that the caller may want to set explicitly.
|
|
204
|
+
*/
|
|
205
|
+
warnings?: Array<string> | undefined;
|
|
202
206
|
};
|
|
203
207
|
|
|
204
208
|
/** @internal */
|
|
@@ -258,6 +262,7 @@ export const PriceResponse$inboundSchema: z.ZodMiniType<
|
|
|
258
262
|
type: types.optional(PriceType$inboundSchema),
|
|
259
263
|
updated_at: types.optional(types.date()),
|
|
260
264
|
updated_by: types.optional(types.string()),
|
|
265
|
+
warnings: types.optional(z.array(types.string())),
|
|
261
266
|
}),
|
|
262
267
|
z.transform((v) => {
|
|
263
268
|
return remap$(v, {
|
|
@@ -0,0 +1,73 @@
|
|
|
1
|
+
/*
|
|
2
|
+
* Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.
|
|
3
|
+
*/
|
|
4
|
+
|
|
5
|
+
import * as z from "zod/v4-mini";
|
|
6
|
+
import { remap as remap$ } from "../../lib/primitives.js";
|
|
7
|
+
import { safeParse } from "../../lib/schemas.js";
|
|
8
|
+
import { Result as SafeParseResult } from "../../types/fp.js";
|
|
9
|
+
import * as types from "../../types/primitives.js";
|
|
10
|
+
import { SDKValidationError } from "./sdk-validation-error.js";
|
|
11
|
+
import {
|
|
12
|
+
SubscriptionConfigOverride,
|
|
13
|
+
SubscriptionConfigOverride$inboundSchema,
|
|
14
|
+
SubscriptionConfigOverride$Outbound,
|
|
15
|
+
SubscriptionConfigOverride$outboundSchema,
|
|
16
|
+
} from "./subscription-config-override.js";
|
|
17
|
+
|
|
18
|
+
export type SettingsOverride = {
|
|
19
|
+
subscriptionConfig?: SubscriptionConfigOverride | undefined;
|
|
20
|
+
};
|
|
21
|
+
|
|
22
|
+
/** @internal */
|
|
23
|
+
export const SettingsOverride$inboundSchema: z.ZodMiniType<
|
|
24
|
+
SettingsOverride,
|
|
25
|
+
unknown
|
|
26
|
+
> = z.pipe(
|
|
27
|
+
z.object({
|
|
28
|
+
subscription_config: types.optional(
|
|
29
|
+
SubscriptionConfigOverride$inboundSchema,
|
|
30
|
+
),
|
|
31
|
+
}),
|
|
32
|
+
z.transform((v) => {
|
|
33
|
+
return remap$(v, {
|
|
34
|
+
"subscription_config": "subscriptionConfig",
|
|
35
|
+
});
|
|
36
|
+
}),
|
|
37
|
+
);
|
|
38
|
+
/** @internal */
|
|
39
|
+
export type SettingsOverride$Outbound = {
|
|
40
|
+
subscription_config?: SubscriptionConfigOverride$Outbound | undefined;
|
|
41
|
+
};
|
|
42
|
+
|
|
43
|
+
/** @internal */
|
|
44
|
+
export const SettingsOverride$outboundSchema: z.ZodMiniType<
|
|
45
|
+
SettingsOverride$Outbound,
|
|
46
|
+
SettingsOverride
|
|
47
|
+
> = z.pipe(
|
|
48
|
+
z.object({
|
|
49
|
+
subscriptionConfig: z.optional(SubscriptionConfigOverride$outboundSchema),
|
|
50
|
+
}),
|
|
51
|
+
z.transform((v) => {
|
|
52
|
+
return remap$(v, {
|
|
53
|
+
subscriptionConfig: "subscription_config",
|
|
54
|
+
});
|
|
55
|
+
}),
|
|
56
|
+
);
|
|
57
|
+
|
|
58
|
+
export function settingsOverrideToJSON(
|
|
59
|
+
settingsOverride: SettingsOverride,
|
|
60
|
+
): string {
|
|
61
|
+
return JSON.stringify(
|
|
62
|
+
SettingsOverride$outboundSchema.parse(settingsOverride),
|
|
63
|
+
);
|
|
64
|
+
}
|
|
65
|
+
export function settingsOverrideFromJSON(
|
|
66
|
+
jsonString: string,
|
|
67
|
+
): SafeParseResult<SettingsOverride, SDKValidationError> {
|
|
68
|
+
return safeParse(
|
|
69
|
+
jsonString,
|
|
70
|
+
(x) => SettingsOverride$inboundSchema.parse(JSON.parse(x)),
|
|
71
|
+
`Failed to parse 'SettingsOverride' from JSON`,
|
|
72
|
+
);
|
|
73
|
+
}
|