@flexprice/sdk 2.1.47 → 2.1.48-dev.2
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/billing-term-input.md +29 -0
- package/docs/sdk/models/billing-term-kind.md +17 -0
- package/docs/sdk/models/billing-term-owner-type.md +15 -0
- package/docs/sdk/models/billing-term-split.md +17 -0
- package/docs/sdk/models/billing-term-value-type.md +19 -0
- package/docs/sdk/models/billing-terms-response.md +16 -0
- package/docs/sdk/models/billingterm-instalment.md +40 -0
- package/docs/sdk/models/billingterm-term.md +36 -0
- package/docs/sdk/models/cancellation-fee-input.md +19 -0
- package/docs/sdk/models/cancellation-fee-type.md +17 -0
- package/docs/sdk/models/commitment-response.md +3 -1
- package/docs/sdk/models/create-commitment-request.md +3 -1
- package/docs/sdk/models/get-commitment-billing-terms-request.md +17 -0
- package/docs/sdk/models/instalment-bill-trigger.md +17 -0
- package/docs/sdk/models/instalment-delivery.md +17 -0
- package/docs/sdk/models/instalment-kind.md +17 -0
- package/docs/sdk/models/instalment-status.md +17 -0
- package/docs/sdk/models/invoice-billing-reason.md +1 -1
- package/docs/sdk/models/invoice-line-item-response.md +1 -0
- package/docs/sdk/models/list-commitment-instalments-request.md +18 -0
- package/docs/sdk/models/list-instalments-response.md +15 -0
- package/docs/sdk/models/preview-commitment-billing-terms-request.md +21 -0
- package/docs/sdk/models/replace-billing-terms-request.md +17 -0
- package/docs/sdk/models/replace-commitment-billing-terms-request.md +21 -0
- package/docs/sdk/models/terminate-commitment-request.md +2 -2
- package/docs/sdk/models/trigger-commitment-instalment-request.md +20 -0
- package/docs/sdk/models/trigger-instalment-request.md +15 -0
- package/docs/sdk/models/webhook-dto-billing-instalment-webhook-payload.md +16 -0
- package/docs/sdk/models/webhook-dto-billing-terms-webhook-payload.md +18 -0
- package/docs/sdk/models/webhook-dto-invoice-line-item.md +1 -0
- package/docs/sdk/models/webhook-event-name.md +1 -1
- package/docs/sdks/commitments/README.md +384 -1
- package/docs/sdks/webhookevents/README.md +414 -0
- package/esm/funcs/commitments-get-commitment-billing-terms.d.ts +17 -0
- package/esm/funcs/commitments-get-commitment-billing-terms.d.ts.map +1 -0
- package/esm/funcs/commitments-get-commitment-billing-terms.js +91 -0
- package/esm/funcs/commitments-get-commitment-billing-terms.js.map +1 -0
- package/esm/funcs/commitments-list-commitment-instalments.d.ts +17 -0
- package/esm/funcs/commitments-list-commitment-instalments.d.ts.map +1 -0
- package/esm/funcs/commitments-list-commitment-instalments.js +96 -0
- package/esm/funcs/commitments-list-commitment-instalments.js.map +1 -0
- package/esm/funcs/commitments-preview-commitment-billing-terms.d.ts +17 -0
- package/esm/funcs/commitments-preview-commitment-billing-terms.d.ts.map +1 -0
- package/esm/funcs/commitments-preview-commitment-billing-terms.js +93 -0
- package/esm/funcs/commitments-preview-commitment-billing-terms.js.map +1 -0
- package/esm/funcs/commitments-replace-commitment-billing-terms.d.ts +17 -0
- package/esm/funcs/commitments-replace-commitment-billing-terms.d.ts.map +1 -0
- package/esm/funcs/commitments-replace-commitment-billing-terms.js +93 -0
- package/esm/funcs/commitments-replace-commitment-billing-terms.js.map +1 -0
- package/esm/funcs/commitments-terminate-commitment.d.ts +1 -1
- package/esm/funcs/commitments-terminate-commitment.js +1 -1
- package/esm/funcs/commitments-trigger-commitment-instalment.d.ts +17 -0
- package/esm/funcs/commitments-trigger-commitment-instalment.d.ts.map +1 -0
- package/esm/funcs/commitments-trigger-commitment-instalment.js +98 -0
- package/esm/funcs/commitments-trigger-commitment-instalment.js.map +1 -0
- package/esm/funcs/webhook-events-post-webhook-events-billing-instalment-cancelled.d.ts +17 -0
- package/esm/funcs/webhook-events-post-webhook-events-billing-instalment-cancelled.d.ts.map +1 -0
- package/esm/funcs/webhook-events-post-webhook-events-billing-instalment-cancelled.js +69 -0
- package/esm/funcs/webhook-events-post-webhook-events-billing-instalment-cancelled.js.map +1 -0
- package/esm/funcs/webhook-events-post-webhook-events-billing-instalment-created.d.ts +17 -0
- package/esm/funcs/webhook-events-post-webhook-events-billing-instalment-created.d.ts.map +1 -0
- package/esm/funcs/webhook-events-post-webhook-events-billing-instalment-created.js +69 -0
- package/esm/funcs/webhook-events-post-webhook-events-billing-instalment-created.js.map +1 -0
- package/esm/funcs/webhook-events-post-webhook-events-billing-instalment-invoiced.d.ts +17 -0
- package/esm/funcs/webhook-events-post-webhook-events-billing-instalment-invoiced.d.ts.map +1 -0
- package/esm/funcs/webhook-events-post-webhook-events-billing-instalment-invoiced.js +69 -0
- package/esm/funcs/webhook-events-post-webhook-events-billing-instalment-invoiced.js.map +1 -0
- package/esm/funcs/webhook-events-post-webhook-events-billing-instalment-updated.d.ts +17 -0
- package/esm/funcs/webhook-events-post-webhook-events-billing-instalment-updated.d.ts.map +1 -0
- package/esm/funcs/webhook-events-post-webhook-events-billing-instalment-updated.js +69 -0
- package/esm/funcs/webhook-events-post-webhook-events-billing-instalment-updated.js.map +1 -0
- package/esm/funcs/webhook-events-post-webhook-events-billing-terms-created.d.ts +17 -0
- package/esm/funcs/webhook-events-post-webhook-events-billing-terms-created.d.ts.map +1 -0
- package/esm/funcs/webhook-events-post-webhook-events-billing-terms-created.js +69 -0
- package/esm/funcs/webhook-events-post-webhook-events-billing-terms-created.js.map +1 -0
- package/esm/funcs/webhook-events-post-webhook-events-billing-terms-updated.d.ts +17 -0
- package/esm/funcs/webhook-events-post-webhook-events-billing-terms-updated.d.ts.map +1 -0
- package/esm/funcs/webhook-events-post-webhook-events-billing-terms-updated.js +69 -0
- package/esm/funcs/webhook-events-post-webhook-events-billing-terms-updated.js.map +1 -0
- package/esm/lib/config.d.ts +3 -3
- package/esm/lib/config.js +3 -3
- package/esm/lib/config.js.map +1 -1
- package/esm/sdk/commitments.d.ts +36 -1
- package/esm/sdk/commitments.d.ts.map +1 -1
- package/esm/sdk/commitments.js +51 -1
- package/esm/sdk/commitments.js.map +1 -1
- package/esm/sdk/models/billing-term-input.d.ts +61 -0
- package/esm/sdk/models/billing-term-input.d.ts.map +1 -0
- package/esm/sdk/models/billing-term-input.js +40 -0
- package/esm/sdk/models/billing-term-input.js.map +1 -0
- package/esm/sdk/models/billing-term-kind.d.ts +12 -0
- package/esm/sdk/models/billing-term-kind.d.ts.map +1 -0
- package/esm/sdk/models/billing-term-kind.js +13 -0
- package/esm/sdk/models/billing-term-kind.js.map +1 -0
- package/esm/sdk/models/billing-term-owner-type.d.ts +9 -0
- package/esm/sdk/models/billing-term-owner-type.d.ts.map +1 -0
- package/esm/sdk/models/billing-term-owner-type.js +10 -0
- package/esm/sdk/models/billing-term-owner-type.js.map +1 -0
- package/esm/sdk/models/billing-term-split.d.ts +12 -0
- package/esm/sdk/models/billing-term-split.d.ts.map +1 -0
- package/esm/sdk/models/billing-term-split.js +13 -0
- package/esm/sdk/models/billing-term-split.js.map +1 -0
- package/esm/sdk/models/billing-term-value-type.d.ts +19 -0
- package/esm/sdk/models/billing-term-value-type.d.ts.map +1 -0
- package/esm/sdk/models/billing-term-value-type.js +17 -0
- package/esm/sdk/models/billing-term-value-type.js.map +1 -0
- package/esm/sdk/models/billing-terms-response.d.ts +13 -0
- package/esm/sdk/models/billing-terms-response.d.ts.map +1 -0
- package/esm/sdk/models/billing-terms-response.js +22 -0
- package/esm/sdk/models/billing-terms-response.js.map +1 -0
- package/esm/sdk/models/billingterm-instalment.d.ts +43 -0
- package/esm/sdk/models/billingterm-instalment.d.ts.map +1 -0
- package/esm/sdk/models/billingterm-instalment.js +68 -0
- package/esm/sdk/models/billingterm-instalment.js.map +1 -0
- package/esm/sdk/models/billingterm-term.d.ts +55 -0
- package/esm/sdk/models/billingterm-term.d.ts.map +1 -0
- package/esm/sdk/models/billingterm-term.js +62 -0
- package/esm/sdk/models/billingterm-term.js.map +1 -0
- package/esm/sdk/models/cancellation-fee-input.d.ts +18 -0
- package/esm/sdk/models/cancellation-fee-input.d.ts.map +1 -0
- package/esm/sdk/models/cancellation-fee-input.js +14 -0
- package/esm/sdk/models/cancellation-fee-input.js.map +1 -0
- package/esm/sdk/models/cancellation-fee-type.d.ts +16 -0
- package/esm/sdk/models/cancellation-fee-type.d.ts.map +1 -0
- package/esm/sdk/models/cancellation-fee-type.js +14 -0
- package/esm/sdk/models/cancellation-fee-type.js.map +1 -0
- package/esm/sdk/models/commitment-response.d.ts +9 -1
- package/esm/sdk/models/commitment-response.d.ts.map +1 -1
- package/esm/sdk/models/commitment-response.js +7 -1
- package/esm/sdk/models/commitment-response.js.map +1 -1
- package/esm/sdk/models/create-commitment-request.d.ts +12 -0
- package/esm/sdk/models/create-commitment-request.d.ts.map +1 -1
- package/esm/sdk/models/create-commitment-request.js +6 -0
- package/esm/sdk/models/create-commitment-request.js.map +1 -1
- package/esm/sdk/models/get-commitment-billing-terms-op.d.ts +15 -0
- package/esm/sdk/models/get-commitment-billing-terms-op.d.ts.map +1 -0
- package/esm/sdk/models/get-commitment-billing-terms-op.js +12 -0
- package/esm/sdk/models/get-commitment-billing-terms-op.js.map +1 -0
- package/esm/sdk/models/index.d.ts +24 -0
- package/esm/sdk/models/index.d.ts.map +1 -1
- package/esm/sdk/models/index.js +24 -0
- package/esm/sdk/models/index.js.map +1 -1
- package/esm/sdk/models/instalment-bill-trigger.d.ts +12 -0
- package/esm/sdk/models/instalment-bill-trigger.d.ts.map +1 -0
- package/esm/sdk/models/instalment-bill-trigger.js +13 -0
- package/esm/sdk/models/instalment-bill-trigger.js.map +1 -0
- package/esm/sdk/models/instalment-delivery.d.ts +12 -0
- package/esm/sdk/models/instalment-delivery.d.ts.map +1 -0
- package/esm/sdk/models/instalment-delivery.js +13 -0
- package/esm/sdk/models/instalment-delivery.js.map +1 -0
- package/esm/sdk/models/instalment-kind.d.ts +10 -0
- package/esm/sdk/models/instalment-kind.d.ts.map +1 -0
- package/esm/sdk/models/instalment-kind.js +11 -0
- package/esm/sdk/models/instalment-kind.js.map +1 -0
- package/esm/sdk/models/instalment-status.d.ts +11 -0
- package/esm/sdk/models/instalment-status.d.ts.map +1 -0
- package/esm/sdk/models/instalment-status.js +12 -0
- package/esm/sdk/models/instalment-status.js.map +1 -0
- package/esm/sdk/models/invoice-billing-reason.d.ts +1 -0
- package/esm/sdk/models/invoice-billing-reason.d.ts.map +1 -1
- package/esm/sdk/models/invoice-billing-reason.js +1 -0
- package/esm/sdk/models/invoice-billing-reason.js.map +1 -1
- package/esm/sdk/models/invoice-line-item-response.d.ts +4 -0
- package/esm/sdk/models/invoice-line-item-response.d.ts.map +1 -1
- package/esm/sdk/models/invoice-line-item-response.js +2 -0
- package/esm/sdk/models/invoice-line-item-response.js.map +1 -1
- package/esm/sdk/models/list-commitment-instalments-op.d.ts +20 -0
- package/esm/sdk/models/list-commitment-instalments-op.d.ts.map +1 -0
- package/esm/sdk/models/list-commitment-instalments-op.js +13 -0
- package/esm/sdk/models/list-commitment-instalments-op.js.map +1 -0
- package/esm/sdk/models/list-instalments-response.d.ts +11 -0
- package/esm/sdk/models/list-instalments-response.d.ts.map +1 -0
- package/esm/sdk/models/list-instalments-response.js +15 -0
- package/esm/sdk/models/list-instalments-response.js.map +1 -0
- package/esm/sdk/models/preview-commitment-billing-terms-op.d.ts +21 -0
- package/esm/sdk/models/preview-commitment-billing-terms-op.d.ts.map +1 -0
- package/esm/sdk/models/preview-commitment-billing-terms-op.js +14 -0
- package/esm/sdk/models/preview-commitment-billing-terms-op.js.map +1 -0
- package/esm/sdk/models/replace-billing-terms-request.d.ts +13 -0
- package/esm/sdk/models/replace-billing-terms-request.d.ts.map +1 -0
- package/esm/sdk/models/replace-billing-terms-request.js +18 -0
- package/esm/sdk/models/replace-billing-terms-request.js.map +1 -0
- package/esm/sdk/models/replace-commitment-billing-terms-op.d.ts +21 -0
- package/esm/sdk/models/replace-commitment-billing-terms-op.d.ts.map +1 -0
- package/esm/sdk/models/replace-commitment-billing-terms-op.js +14 -0
- package/esm/sdk/models/replace-commitment-billing-terms-op.js.map +1 -0
- package/esm/sdk/models/terminate-commitment-request.d.ts +6 -2
- package/esm/sdk/models/terminate-commitment-request.d.ts.map +1 -1
- package/esm/sdk/models/terminate-commitment-request.js +2 -1
- package/esm/sdk/models/terminate-commitment-request.js.map +1 -1
- package/esm/sdk/models/trigger-commitment-instalment-op.d.ts +26 -0
- package/esm/sdk/models/trigger-commitment-instalment-op.d.ts.map +1 -0
- package/esm/sdk/models/trigger-commitment-instalment-op.js +20 -0
- package/esm/sdk/models/trigger-commitment-instalment-op.js.map +1 -0
- package/esm/sdk/models/trigger-instalment-request.d.ts +15 -0
- package/esm/sdk/models/trigger-instalment-request.d.ts.map +1 -0
- package/esm/sdk/models/trigger-instalment-request.js +17 -0
- package/esm/sdk/models/trigger-instalment-request.js.map +1 -0
- package/esm/sdk/models/webhook-dto-billing-instalment-webhook-payload.d.ts +13 -0
- package/esm/sdk/models/webhook-dto-billing-instalment-webhook-payload.d.ts.map +1 -0
- package/esm/sdk/models/webhook-dto-billing-instalment-webhook-payload.js +22 -0
- package/esm/sdk/models/webhook-dto-billing-instalment-webhook-payload.js.map +1 -0
- package/esm/sdk/models/webhook-dto-billing-terms-webhook-payload.d.ts +16 -0
- package/esm/sdk/models/webhook-dto-billing-terms-webhook-payload.d.ts.map +1 -0
- package/esm/sdk/models/webhook-dto-billing-terms-webhook-payload.js +28 -0
- package/esm/sdk/models/webhook-dto-billing-terms-webhook-payload.js.map +1 -0
- package/esm/sdk/models/webhook-dto-invoice-line-item.d.ts +1 -0
- package/esm/sdk/models/webhook-dto-invoice-line-item.d.ts.map +1 -1
- package/esm/sdk/models/webhook-dto-invoice-line-item.js +2 -0
- package/esm/sdk/models/webhook-dto-invoice-line-item.js.map +1 -1
- package/esm/sdk/models/webhook-event-name.d.ts +6 -0
- package/esm/sdk/models/webhook-event-name.d.ts.map +1 -1
- package/esm/sdk/models/webhook-event-name.js +6 -0
- package/esm/sdk/models/webhook-event-name.js.map +1 -1
- package/esm/sdk/webhook-events.d.ts +42 -0
- package/esm/sdk/webhook-events.d.ts.map +1 -1
- package/esm/sdk/webhook-events.js +60 -0
- package/esm/sdk/webhook-events.js.map +1 -1
- package/jsr.json +1 -1
- package/package.json +3 -3
- package/src/funcs/commitments-get-commitment-billing-terms.ts +182 -0
- package/src/funcs/commitments-list-commitment-instalments.ts +191 -0
- package/src/funcs/commitments-preview-commitment-billing-terms.ts +192 -0
- package/src/funcs/commitments-replace-commitment-billing-terms.ts +190 -0
- package/src/funcs/commitments-terminate-commitment.ts +1 -1
- package/src/funcs/commitments-trigger-commitment-instalment.ts +197 -0
- package/src/funcs/webhook-events-post-webhook-events-billing-instalment-cancelled.ts +144 -0
- package/src/funcs/webhook-events-post-webhook-events-billing-instalment-created.ts +144 -0
- package/src/funcs/webhook-events-post-webhook-events-billing-instalment-invoiced.ts +144 -0
- package/src/funcs/webhook-events-post-webhook-events-billing-instalment-updated.ts +144 -0
- package/src/funcs/webhook-events-post-webhook-events-billing-terms-created.ts +144 -0
- package/src/funcs/webhook-events-post-webhook-events-billing-terms-updated.ts +144 -0
- package/src/lib/config.ts +3 -3
- package/src/sdk/commitments.ts +101 -1
- package/src/sdk/models/billing-term-input.ts +116 -0
- package/src/sdk/models/billing-term-kind.ts +24 -0
- package/src/sdk/models/billing-term-owner-type.ts +16 -0
- package/src/sdk/models/billing-term-split.ts +24 -0
- package/src/sdk/models/billing-term-value-type.ts +31 -0
- package/src/sdk/models/billing-terms-response.ts +49 -0
- package/src/sdk/models/billingterm-instalment.ts +128 -0
- package/src/sdk/models/billingterm-term.ts +136 -0
- package/src/sdk/models/cancellation-fee-input.ts +40 -0
- package/src/sdk/models/cancellation-fee-type.ts +23 -0
- package/src/sdk/models/commitment-response.ts +22 -2
- package/src/sdk/models/create-commitment-request.ts +23 -0
- package/src/sdk/models/get-commitment-billing-terms-op.ts +35 -0
- package/src/sdk/models/index.ts +24 -0
- package/src/sdk/models/instalment-bill-trigger.ts +24 -0
- package/src/sdk/models/instalment-delivery.ts +24 -0
- package/src/sdk/models/instalment-kind.ts +19 -0
- package/src/sdk/models/instalment-status.ts +20 -0
- package/src/sdk/models/invoice-billing-reason.ts +1 -0
- package/src/sdk/models/invoice-line-item-response.ts +6 -0
- package/src/sdk/models/list-commitment-instalments-op.ts +41 -0
- package/src/sdk/models/list-instalments-response.ts +35 -0
- package/src/sdk/models/preview-commitment-billing-terms-op.ts +46 -0
- package/src/sdk/models/replace-billing-terms-request.ts +43 -0
- package/src/sdk/models/replace-commitment-billing-terms-op.ts +46 -0
- package/src/sdk/models/terminate-commitment-request.ts +11 -3
- package/src/sdk/models/trigger-commitment-instalment-op.ts +60 -0
- package/src/sdk/models/trigger-instalment-request.ts +41 -0
- package/src/sdk/models/webhook-dto-billing-instalment-webhook-payload.ts +53 -0
- package/src/sdk/models/webhook-dto-billing-terms-webhook-payload.ts +61 -0
- package/src/sdk/models/webhook-dto-invoice-line-item.ts +3 -0
- package/src/sdk/models/webhook-event-name.ts +6 -0
- package/src/sdk/webhook-events.ts +96 -0
|
@@ -4,15 +4,23 @@
|
|
|
4
4
|
|
|
5
5
|
import * as z from "zod/v4-mini";
|
|
6
6
|
import { remap as remap$ } from "../../lib/primitives.js";
|
|
7
|
+
import {
|
|
8
|
+
CancellationFeeInput,
|
|
9
|
+
CancellationFeeInput$Outbound,
|
|
10
|
+
CancellationFeeInput$outboundSchema,
|
|
11
|
+
} from "./cancellation-fee-input.js";
|
|
7
12
|
|
|
8
13
|
export type TerminateCommitmentRequest = {
|
|
9
|
-
cancellationFee?:
|
|
14
|
+
cancellationFee?: CancellationFeeInput | undefined;
|
|
15
|
+
/**
|
|
16
|
+
* EffectiveAt defaults to now; a given one must be a whole second.
|
|
17
|
+
*/
|
|
10
18
|
effectiveAt?: Date | undefined;
|
|
11
19
|
};
|
|
12
20
|
|
|
13
21
|
/** @internal */
|
|
14
22
|
export type TerminateCommitmentRequest$Outbound = {
|
|
15
|
-
cancellation_fee?:
|
|
23
|
+
cancellation_fee?: CancellationFeeInput$Outbound | undefined;
|
|
16
24
|
effective_at?: string | undefined;
|
|
17
25
|
};
|
|
18
26
|
|
|
@@ -22,7 +30,7 @@ export const TerminateCommitmentRequest$outboundSchema: z.ZodMiniType<
|
|
|
22
30
|
TerminateCommitmentRequest
|
|
23
31
|
> = z.pipe(
|
|
24
32
|
z.object({
|
|
25
|
-
cancellationFee: z.optional(
|
|
33
|
+
cancellationFee: z.optional(CancellationFeeInput$outboundSchema),
|
|
26
34
|
effectiveAt: z.optional(
|
|
27
35
|
z.pipe(z.date(), z.transform(v => v.toISOString())),
|
|
28
36
|
),
|
|
@@ -0,0 +1,60 @@
|
|
|
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 {
|
|
8
|
+
TriggerInstalmentRequest,
|
|
9
|
+
TriggerInstalmentRequest$Outbound,
|
|
10
|
+
TriggerInstalmentRequest$outboundSchema,
|
|
11
|
+
} from "./trigger-instalment-request.js";
|
|
12
|
+
|
|
13
|
+
export type TriggerCommitmentInstalmentRequest = {
|
|
14
|
+
/**
|
|
15
|
+
* Commitment ID
|
|
16
|
+
*/
|
|
17
|
+
id: string;
|
|
18
|
+
/**
|
|
19
|
+
* Instalment ID
|
|
20
|
+
*/
|
|
21
|
+
instalmentId: string;
|
|
22
|
+
/**
|
|
23
|
+
* Trigger request
|
|
24
|
+
*/
|
|
25
|
+
body?: TriggerInstalmentRequest | undefined;
|
|
26
|
+
};
|
|
27
|
+
|
|
28
|
+
/** @internal */
|
|
29
|
+
export type TriggerCommitmentInstalmentRequest$Outbound = {
|
|
30
|
+
id: string;
|
|
31
|
+
instalment_id: string;
|
|
32
|
+
body?: TriggerInstalmentRequest$Outbound | undefined;
|
|
33
|
+
};
|
|
34
|
+
|
|
35
|
+
/** @internal */
|
|
36
|
+
export const TriggerCommitmentInstalmentRequest$outboundSchema: z.ZodMiniType<
|
|
37
|
+
TriggerCommitmentInstalmentRequest$Outbound,
|
|
38
|
+
TriggerCommitmentInstalmentRequest
|
|
39
|
+
> = z.pipe(
|
|
40
|
+
z.object({
|
|
41
|
+
id: z.string(),
|
|
42
|
+
instalmentId: z.string(),
|
|
43
|
+
body: z.optional(TriggerInstalmentRequest$outboundSchema),
|
|
44
|
+
}),
|
|
45
|
+
z.transform((v) => {
|
|
46
|
+
return remap$(v, {
|
|
47
|
+
instalmentId: "instalment_id",
|
|
48
|
+
});
|
|
49
|
+
}),
|
|
50
|
+
);
|
|
51
|
+
|
|
52
|
+
export function triggerCommitmentInstalmentRequestToJSON(
|
|
53
|
+
triggerCommitmentInstalmentRequest: TriggerCommitmentInstalmentRequest,
|
|
54
|
+
): string {
|
|
55
|
+
return JSON.stringify(
|
|
56
|
+
TriggerCommitmentInstalmentRequest$outboundSchema.parse(
|
|
57
|
+
triggerCommitmentInstalmentRequest,
|
|
58
|
+
),
|
|
59
|
+
);
|
|
60
|
+
}
|
|
@@ -0,0 +1,41 @@
|
|
|
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
|
+
|
|
8
|
+
export type TriggerInstalmentRequest = {
|
|
9
|
+
/**
|
|
10
|
+
* BillOn must be a whole second.
|
|
11
|
+
*/
|
|
12
|
+
billOn?: string | undefined;
|
|
13
|
+
};
|
|
14
|
+
|
|
15
|
+
/** @internal */
|
|
16
|
+
export type TriggerInstalmentRequest$Outbound = {
|
|
17
|
+
bill_on?: string | undefined;
|
|
18
|
+
};
|
|
19
|
+
|
|
20
|
+
/** @internal */
|
|
21
|
+
export const TriggerInstalmentRequest$outboundSchema: z.ZodMiniType<
|
|
22
|
+
TriggerInstalmentRequest$Outbound,
|
|
23
|
+
TriggerInstalmentRequest
|
|
24
|
+
> = z.pipe(
|
|
25
|
+
z.object({
|
|
26
|
+
billOn: z.optional(z.string()),
|
|
27
|
+
}),
|
|
28
|
+
z.transform((v) => {
|
|
29
|
+
return remap$(v, {
|
|
30
|
+
billOn: "bill_on",
|
|
31
|
+
});
|
|
32
|
+
}),
|
|
33
|
+
);
|
|
34
|
+
|
|
35
|
+
export function triggerInstalmentRequestToJSON(
|
|
36
|
+
triggerInstalmentRequest: TriggerInstalmentRequest,
|
|
37
|
+
): string {
|
|
38
|
+
return JSON.stringify(
|
|
39
|
+
TriggerInstalmentRequest$outboundSchema.parse(triggerInstalmentRequest),
|
|
40
|
+
);
|
|
41
|
+
}
|
|
@@ -0,0 +1,53 @@
|
|
|
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 {
|
|
11
|
+
BillingtermInstalment,
|
|
12
|
+
BillingtermInstalment$inboundSchema,
|
|
13
|
+
} from "./billingterm-instalment.js";
|
|
14
|
+
import { SDKValidationError } from "./sdk-validation-error.js";
|
|
15
|
+
import {
|
|
16
|
+
WebhookEventName,
|
|
17
|
+
WebhookEventName$inboundSchema,
|
|
18
|
+
} from "./webhook-event-name.js";
|
|
19
|
+
|
|
20
|
+
export type WebhookDtoBillingInstalmentWebhookPayload = {
|
|
21
|
+
eventType?: WebhookEventName | undefined;
|
|
22
|
+
instalment?: BillingtermInstalment | undefined;
|
|
23
|
+
};
|
|
24
|
+
|
|
25
|
+
/** @internal */
|
|
26
|
+
export const WebhookDtoBillingInstalmentWebhookPayload$inboundSchema:
|
|
27
|
+
z.ZodMiniType<WebhookDtoBillingInstalmentWebhookPayload, unknown> = z.pipe(
|
|
28
|
+
z.object({
|
|
29
|
+
event_type: types.optional(WebhookEventName$inboundSchema),
|
|
30
|
+
instalment: types.optional(BillingtermInstalment$inboundSchema),
|
|
31
|
+
}),
|
|
32
|
+
z.transform((v) => {
|
|
33
|
+
return remap$(v, {
|
|
34
|
+
"event_type": "eventType",
|
|
35
|
+
});
|
|
36
|
+
}),
|
|
37
|
+
);
|
|
38
|
+
|
|
39
|
+
export function webhookDtoBillingInstalmentWebhookPayloadFromJSON(
|
|
40
|
+
jsonString: string,
|
|
41
|
+
): SafeParseResult<
|
|
42
|
+
WebhookDtoBillingInstalmentWebhookPayload,
|
|
43
|
+
SDKValidationError
|
|
44
|
+
> {
|
|
45
|
+
return safeParse(
|
|
46
|
+
jsonString,
|
|
47
|
+
(x) =>
|
|
48
|
+
WebhookDtoBillingInstalmentWebhookPayload$inboundSchema.parse(
|
|
49
|
+
JSON.parse(x),
|
|
50
|
+
),
|
|
51
|
+
`Failed to parse 'WebhookDtoBillingInstalmentWebhookPayload' from JSON`,
|
|
52
|
+
);
|
|
53
|
+
}
|
|
@@ -0,0 +1,61 @@
|
|
|
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 {
|
|
11
|
+
BillingTermOwnerType,
|
|
12
|
+
BillingTermOwnerType$inboundSchema,
|
|
13
|
+
} from "./billing-term-owner-type.js";
|
|
14
|
+
import {
|
|
15
|
+
BillingtermTerm,
|
|
16
|
+
BillingtermTerm$inboundSchema,
|
|
17
|
+
} from "./billingterm-term.js";
|
|
18
|
+
import { SDKValidationError } from "./sdk-validation-error.js";
|
|
19
|
+
import {
|
|
20
|
+
WebhookEventName,
|
|
21
|
+
WebhookEventName$inboundSchema,
|
|
22
|
+
} from "./webhook-event-name.js";
|
|
23
|
+
|
|
24
|
+
export type WebhookDtoBillingTermsWebhookPayload = {
|
|
25
|
+
billingTerms?: Array<BillingtermTerm> | undefined;
|
|
26
|
+
eventType?: WebhookEventName | undefined;
|
|
27
|
+
ownerId?: string | undefined;
|
|
28
|
+
ownerType?: BillingTermOwnerType | undefined;
|
|
29
|
+
};
|
|
30
|
+
|
|
31
|
+
/** @internal */
|
|
32
|
+
export const WebhookDtoBillingTermsWebhookPayload$inboundSchema: z.ZodMiniType<
|
|
33
|
+
WebhookDtoBillingTermsWebhookPayload,
|
|
34
|
+
unknown
|
|
35
|
+
> = z.pipe(
|
|
36
|
+
z.object({
|
|
37
|
+
billing_terms: types.optional(z.array(BillingtermTerm$inboundSchema)),
|
|
38
|
+
event_type: types.optional(WebhookEventName$inboundSchema),
|
|
39
|
+
owner_id: types.optional(types.string()),
|
|
40
|
+
owner_type: types.optional(BillingTermOwnerType$inboundSchema),
|
|
41
|
+
}),
|
|
42
|
+
z.transform((v) => {
|
|
43
|
+
return remap$(v, {
|
|
44
|
+
"billing_terms": "billingTerms",
|
|
45
|
+
"event_type": "eventType",
|
|
46
|
+
"owner_id": "ownerId",
|
|
47
|
+
"owner_type": "ownerType",
|
|
48
|
+
});
|
|
49
|
+
}),
|
|
50
|
+
);
|
|
51
|
+
|
|
52
|
+
export function webhookDtoBillingTermsWebhookPayloadFromJSON(
|
|
53
|
+
jsonString: string,
|
|
54
|
+
): SafeParseResult<WebhookDtoBillingTermsWebhookPayload, SDKValidationError> {
|
|
55
|
+
return safeParse(
|
|
56
|
+
jsonString,
|
|
57
|
+
(x) =>
|
|
58
|
+
WebhookDtoBillingTermsWebhookPayload$inboundSchema.parse(JSON.parse(x)),
|
|
59
|
+
`Failed to parse 'WebhookDtoBillingTermsWebhookPayload' from JSON`,
|
|
60
|
+
);
|
|
61
|
+
}
|
|
@@ -17,6 +17,7 @@ import { SDKValidationError } from "./sdk-validation-error.js";
|
|
|
17
17
|
export type WebhookDtoInvoiceLineItem = {
|
|
18
18
|
adjustedEntitlementQuantity?: string | undefined;
|
|
19
19
|
amount?: string | undefined;
|
|
20
|
+
billingInstalmentId?: string | undefined;
|
|
20
21
|
commitmentInfo?: CommitmentInfo | undefined;
|
|
21
22
|
currency?: string | undefined;
|
|
22
23
|
displayName?: string | undefined;
|
|
@@ -49,6 +50,7 @@ export const WebhookDtoInvoiceLineItem$inboundSchema: z.ZodMiniType<
|
|
|
49
50
|
z.object({
|
|
50
51
|
adjusted_entitlement_quantity: types.optional(types.string()),
|
|
51
52
|
amount: types.optional(types.string()),
|
|
53
|
+
billing_instalment_id: types.optional(types.string()),
|
|
52
54
|
commitment_info: types.optional(CommitmentInfo$inboundSchema),
|
|
53
55
|
currency: types.optional(types.string()),
|
|
54
56
|
display_name: types.optional(types.string()),
|
|
@@ -75,6 +77,7 @@ export const WebhookDtoInvoiceLineItem$inboundSchema: z.ZodMiniType<
|
|
|
75
77
|
z.transform((v) => {
|
|
76
78
|
return remap$(v, {
|
|
77
79
|
"adjusted_entitlement_quantity": "adjustedEntitlementQuantity",
|
|
80
|
+
"billing_instalment_id": "billingInstalmentId",
|
|
78
81
|
"commitment_info": "commitmentInfo",
|
|
79
82
|
"display_name": "displayName",
|
|
80
83
|
"entity_id": "entityId",
|
|
@@ -28,6 +28,12 @@ export const WebhookEventName = {
|
|
|
28
28
|
CommitmentCreated: "commitment.created",
|
|
29
29
|
CommitmentUpdated: "commitment.updated",
|
|
30
30
|
CommitmentTerminated: "commitment.terminated",
|
|
31
|
+
BillingTermsCreated: "billing_terms.created",
|
|
32
|
+
BillingTermsUpdated: "billing_terms.updated",
|
|
33
|
+
BillingInstalmentCreated: "billing_instalment.created",
|
|
34
|
+
BillingInstalmentUpdated: "billing_instalment.updated",
|
|
35
|
+
BillingInstalmentCancelled: "billing_instalment.cancelled",
|
|
36
|
+
BillingInstalmentInvoiced: "billing_instalment.invoiced",
|
|
31
37
|
WalletCreated: "wallet.created",
|
|
32
38
|
WalletUpdated: "wallet.updated",
|
|
33
39
|
WalletTerminated: "wallet.terminated",
|
|
@@ -2,6 +2,12 @@
|
|
|
2
2
|
* Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.
|
|
3
3
|
*/
|
|
4
4
|
|
|
5
|
+
import { webhookEventsPostWebhookEventsBillingInstalmentCancelled } from "../funcs/webhook-events-post-webhook-events-billing-instalment-cancelled.js";
|
|
6
|
+
import { webhookEventsPostWebhookEventsBillingInstalmentCreated } from "../funcs/webhook-events-post-webhook-events-billing-instalment-created.js";
|
|
7
|
+
import { webhookEventsPostWebhookEventsBillingInstalmentInvoiced } from "../funcs/webhook-events-post-webhook-events-billing-instalment-invoiced.js";
|
|
8
|
+
import { webhookEventsPostWebhookEventsBillingInstalmentUpdated } from "../funcs/webhook-events-post-webhook-events-billing-instalment-updated.js";
|
|
9
|
+
import { webhookEventsPostWebhookEventsBillingTermsCreated } from "../funcs/webhook-events-post-webhook-events-billing-terms-created.js";
|
|
10
|
+
import { webhookEventsPostWebhookEventsBillingTermsUpdated } from "../funcs/webhook-events-post-webhook-events-billing-terms-updated.js";
|
|
5
11
|
import { webhookEventsPostWebhookEventsCheckoutSessionCompleted } from "../funcs/webhook-events-post-webhook-events-checkout-session-completed.js";
|
|
6
12
|
import { webhookEventsPostWebhookEventsCheckoutSessionExpired } from "../funcs/webhook-events-post-webhook-events-checkout-session-expired.js";
|
|
7
13
|
import { webhookEventsPostWebhookEventsCheckoutSessionFailed } from "../funcs/webhook-events-post-webhook-events-checkout-session-failed.js";
|
|
@@ -73,6 +79,96 @@ import { unwrapAsync } from "../types/fp.js";
|
|
|
73
79
|
import * as models from "./models/index.js";
|
|
74
80
|
|
|
75
81
|
export class WebhookEvents extends ClientSDK {
|
|
82
|
+
/**
|
|
83
|
+
* billing_instalment.cancelled
|
|
84
|
+
*
|
|
85
|
+
* @remarks
|
|
86
|
+
* Fired when a billing instalment is cancelled. Doc-only for parsing.
|
|
87
|
+
*/
|
|
88
|
+
async postWebhookEventsBillingInstalmentCancelled(
|
|
89
|
+
options?: RequestOptions,
|
|
90
|
+
): Promise<models.WebhookDtoBillingInstalmentWebhookPayload> {
|
|
91
|
+
return unwrapAsync(webhookEventsPostWebhookEventsBillingInstalmentCancelled(
|
|
92
|
+
this,
|
|
93
|
+
options,
|
|
94
|
+
));
|
|
95
|
+
}
|
|
96
|
+
|
|
97
|
+
/**
|
|
98
|
+
* billing_instalment.created
|
|
99
|
+
*
|
|
100
|
+
* @remarks
|
|
101
|
+
* Fired when a billing instalment is added to a commitment. Doc-only for parsing.
|
|
102
|
+
*/
|
|
103
|
+
async postWebhookEventsBillingInstalmentCreated(
|
|
104
|
+
options?: RequestOptions,
|
|
105
|
+
): Promise<models.WebhookDtoBillingInstalmentWebhookPayload> {
|
|
106
|
+
return unwrapAsync(webhookEventsPostWebhookEventsBillingInstalmentCreated(
|
|
107
|
+
this,
|
|
108
|
+
options,
|
|
109
|
+
));
|
|
110
|
+
}
|
|
111
|
+
|
|
112
|
+
/**
|
|
113
|
+
* billing_instalment.invoiced
|
|
114
|
+
*
|
|
115
|
+
* @remarks
|
|
116
|
+
* Fired when the invoice carrying a billing instalment is finalized. Doc-only for parsing.
|
|
117
|
+
*/
|
|
118
|
+
async postWebhookEventsBillingInstalmentInvoiced(
|
|
119
|
+
options?: RequestOptions,
|
|
120
|
+
): Promise<models.WebhookDtoBillingInstalmentWebhookPayload> {
|
|
121
|
+
return unwrapAsync(webhookEventsPostWebhookEventsBillingInstalmentInvoiced(
|
|
122
|
+
this,
|
|
123
|
+
options,
|
|
124
|
+
));
|
|
125
|
+
}
|
|
126
|
+
|
|
127
|
+
/**
|
|
128
|
+
* billing_instalment.updated
|
|
129
|
+
*
|
|
130
|
+
* @remarks
|
|
131
|
+
* Fired when a trigger moves a billing instalment's bill date, or a voided invoice puts it back on schedule. Doc-only for parsing.
|
|
132
|
+
*/
|
|
133
|
+
async postWebhookEventsBillingInstalmentUpdated(
|
|
134
|
+
options?: RequestOptions,
|
|
135
|
+
): Promise<models.WebhookDtoBillingInstalmentWebhookPayload> {
|
|
136
|
+
return unwrapAsync(webhookEventsPostWebhookEventsBillingInstalmentUpdated(
|
|
137
|
+
this,
|
|
138
|
+
options,
|
|
139
|
+
));
|
|
140
|
+
}
|
|
141
|
+
|
|
142
|
+
/**
|
|
143
|
+
* billing_terms.created
|
|
144
|
+
*
|
|
145
|
+
* @remarks
|
|
146
|
+
* Fired when billing terms are saved with a new commitment. Doc-only for parsing.
|
|
147
|
+
*/
|
|
148
|
+
async postWebhookEventsBillingTermsCreated(
|
|
149
|
+
options?: RequestOptions,
|
|
150
|
+
): Promise<models.WebhookDtoBillingTermsWebhookPayload> {
|
|
151
|
+
return unwrapAsync(webhookEventsPostWebhookEventsBillingTermsCreated(
|
|
152
|
+
this,
|
|
153
|
+
options,
|
|
154
|
+
));
|
|
155
|
+
}
|
|
156
|
+
|
|
157
|
+
/**
|
|
158
|
+
* billing_terms.updated
|
|
159
|
+
*
|
|
160
|
+
* @remarks
|
|
161
|
+
* Fired when an edit replaces a commitment's billing terms. Doc-only for parsing.
|
|
162
|
+
*/
|
|
163
|
+
async postWebhookEventsBillingTermsUpdated(
|
|
164
|
+
options?: RequestOptions,
|
|
165
|
+
): Promise<models.WebhookDtoBillingTermsWebhookPayload> {
|
|
166
|
+
return unwrapAsync(webhookEventsPostWebhookEventsBillingTermsUpdated(
|
|
167
|
+
this,
|
|
168
|
+
options,
|
|
169
|
+
));
|
|
170
|
+
}
|
|
171
|
+
|
|
76
172
|
/**
|
|
77
173
|
* checkout.session.completed
|
|
78
174
|
*
|