@flexprice/sdk 2.1.49-dev.2 → 2.1.49-dev.20
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/billingterm-instalment.md +1 -0
- package/docs/sdk/models/commitment-response.md +0 -1
- package/docs/sdk/models/create-commitment-request.md +0 -1
- 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/payment-response.md +33 -32
- package/docs/sdk/models/usage-analytic-instalment.md +24 -0
- package/docs/sdk/models/webhook-dto-payment.md +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/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-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/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/index.d.ts +1 -0
- package/esm/sdk/models/index.d.ts.map +1 -1
- package/esm/sdk/models/index.js +1 -0
- package/esm/sdk/models/index.js.map +1 -1
- 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/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/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/jsr.json +1 -1
- package/package.json +2 -2
- package/src/lib/config.ts +4 -3
- package/src/sdk/models/billingterm-instalment.ts +6 -0
- package/src/sdk/models/commitment-response.ts +0 -2
- package/src/sdk/models/create-commitment-request.ts +0 -3
- 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/index.ts +1 -0
- package/src/sdk/models/payment-response.ts +6 -0
- package/src/sdk/models/usage-analytic-instalment.ts +66 -0
- package/src/sdk/models/webhook-dto-payment.ts +3 -0
|
@@ -0,0 +1,66 @@
|
|
|
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
|
+
|
|
12
|
+
export type UsageAnalyticInstalment = {
|
|
13
|
+
amount?: string | undefined;
|
|
14
|
+
commitmentId?: string | undefined;
|
|
15
|
+
currency?: string | undefined;
|
|
16
|
+
id?: string | undefined;
|
|
17
|
+
invoiceId?: string | undefined;
|
|
18
|
+
invoiceLabel?: string | undefined;
|
|
19
|
+
/**
|
|
20
|
+
* when the invoice billing it was finalized
|
|
21
|
+
*/
|
|
22
|
+
invoicedAt?: Date | undefined;
|
|
23
|
+
servicePeriodEnd?: Date | undefined;
|
|
24
|
+
servicePeriodStart?: Date | undefined;
|
|
25
|
+
subscriptionId?: string | undefined;
|
|
26
|
+
};
|
|
27
|
+
|
|
28
|
+
/** @internal */
|
|
29
|
+
export const UsageAnalyticInstalment$inboundSchema: z.ZodMiniType<
|
|
30
|
+
UsageAnalyticInstalment,
|
|
31
|
+
unknown
|
|
32
|
+
> = z.pipe(
|
|
33
|
+
z.object({
|
|
34
|
+
amount: types.optional(types.string()),
|
|
35
|
+
commitment_id: types.optional(types.string()),
|
|
36
|
+
currency: types.optional(types.string()),
|
|
37
|
+
id: types.optional(types.string()),
|
|
38
|
+
invoice_id: types.optional(types.string()),
|
|
39
|
+
invoice_label: types.optional(types.string()),
|
|
40
|
+
invoiced_at: types.optional(types.date()),
|
|
41
|
+
service_period_end: types.optional(types.date()),
|
|
42
|
+
service_period_start: types.optional(types.date()),
|
|
43
|
+
subscription_id: types.optional(types.string()),
|
|
44
|
+
}),
|
|
45
|
+
z.transform((v) => {
|
|
46
|
+
return remap$(v, {
|
|
47
|
+
"commitment_id": "commitmentId",
|
|
48
|
+
"invoice_id": "invoiceId",
|
|
49
|
+
"invoice_label": "invoiceLabel",
|
|
50
|
+
"invoiced_at": "invoicedAt",
|
|
51
|
+
"service_period_end": "servicePeriodEnd",
|
|
52
|
+
"service_period_start": "servicePeriodStart",
|
|
53
|
+
"subscription_id": "subscriptionId",
|
|
54
|
+
});
|
|
55
|
+
}),
|
|
56
|
+
);
|
|
57
|
+
|
|
58
|
+
export function usageAnalyticInstalmentFromJSON(
|
|
59
|
+
jsonString: string,
|
|
60
|
+
): SafeParseResult<UsageAnalyticInstalment, SDKValidationError> {
|
|
61
|
+
return safeParse(
|
|
62
|
+
jsonString,
|
|
63
|
+
(x) => UsageAnalyticInstalment$inboundSchema.parse(JSON.parse(x)),
|
|
64
|
+
`Failed to parse 'UsageAnalyticInstalment' from JSON`,
|
|
65
|
+
);
|
|
66
|
+
}
|
|
@@ -23,6 +23,7 @@ import { SDKValidationError } from "./sdk-validation-error.js";
|
|
|
23
23
|
|
|
24
24
|
export type WebhookDtoPayment = {
|
|
25
25
|
amount?: string | undefined;
|
|
26
|
+
connectionId?: string | undefined;
|
|
26
27
|
currency?: string | undefined;
|
|
27
28
|
destinationId?: string | undefined;
|
|
28
29
|
destinationType?: PaymentDestinationType | undefined;
|
|
@@ -45,6 +46,7 @@ export const WebhookDtoPayment$inboundSchema: z.ZodMiniType<
|
|
|
45
46
|
> = z.pipe(
|
|
46
47
|
z.object({
|
|
47
48
|
amount: types.optional(types.string()),
|
|
49
|
+
connection_id: types.optional(types.string()),
|
|
48
50
|
currency: types.optional(types.string()),
|
|
49
51
|
destination_id: types.optional(types.string()),
|
|
50
52
|
destination_type: types.optional(PaymentDestinationType$inboundSchema),
|
|
@@ -61,6 +63,7 @@ export const WebhookDtoPayment$inboundSchema: z.ZodMiniType<
|
|
|
61
63
|
}),
|
|
62
64
|
z.transform((v) => {
|
|
63
65
|
return remap$(v, {
|
|
66
|
+
"connection_id": "connectionId",
|
|
64
67
|
"destination_id": "destinationId",
|
|
65
68
|
"destination_type": "destinationType",
|
|
66
69
|
"error_message": "errorMessage",
|