@paygentic/sdk 0.7.1 → 0.7.3
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/README.md +17 -3
- package/dist/commonjs/funcs/customersCreateCustomerPaymentMethod.d.ts +19 -0
- package/dist/commonjs/funcs/customersCreateCustomerPaymentMethod.d.ts.map +1 -0
- package/dist/commonjs/funcs/customersCreateCustomerPaymentMethod.js +125 -0
- package/dist/commonjs/funcs/customersCreateCustomerPaymentMethod.js.map +1 -0
- package/dist/commonjs/funcs/customersListCustomerPaymentMethods.d.ts +18 -0
- package/dist/commonjs/funcs/customersListCustomerPaymentMethods.d.ts.map +1 -0
- package/dist/commonjs/funcs/customersListCustomerPaymentMethods.js +123 -0
- package/dist/commonjs/funcs/customersListCustomerPaymentMethods.js.map +1 -0
- package/dist/commonjs/funcs/invoicesV2List.js +1 -0
- package/dist/commonjs/funcs/invoicesV2List.js.map +1 -1
- package/dist/commonjs/funcs/paymentSessionsListPaymentSessions.d.ts +18 -0
- package/dist/commonjs/funcs/paymentSessionsListPaymentSessions.d.ts.map +1 -0
- package/dist/commonjs/funcs/paymentSessionsListPaymentSessions.js +127 -0
- package/dist/commonjs/funcs/paymentSessionsListPaymentSessions.js.map +1 -0
- package/dist/commonjs/funcs/profitabilityGetProfitability.d.ts +19 -0
- package/dist/commonjs/funcs/profitabilityGetProfitability.d.ts.map +1 -0
- package/dist/commonjs/funcs/profitabilityGetProfitability.js +127 -0
- package/dist/commonjs/funcs/profitabilityGetProfitability.js.map +1 -0
- package/dist/commonjs/lib/config.d.ts +2 -2
- package/dist/commonjs/lib/config.js +2 -2
- package/dist/commonjs/models/index.d.ts +6 -0
- package/dist/commonjs/models/index.d.ts.map +1 -1
- package/dist/commonjs/models/index.js +6 -0
- package/dist/commonjs/models/index.js.map +1 -1
- package/dist/commonjs/models/offsetpagination.d.ts +4 -4
- package/dist/commonjs/models/offsetpagination.d.ts.map +1 -1
- package/dist/commonjs/models/offsetpagination.js +3 -3
- package/dist/commonjs/models/offsetpagination.js.map +1 -1
- package/dist/commonjs/models/operations/createcustomerpaymentmethod.d.ts +44 -0
- package/dist/commonjs/models/operations/createcustomerpaymentmethod.d.ts.map +1 -0
- package/dist/commonjs/models/operations/createcustomerpaymentmethod.js +65 -0
- package/dist/commonjs/models/operations/createcustomerpaymentmethod.js.map +1 -0
- package/dist/commonjs/models/operations/createplan.d.ts +5 -0
- package/dist/commonjs/models/operations/createplan.d.ts.map +1 -1
- package/dist/commonjs/models/operations/createplan.js +2 -0
- package/dist/commonjs/models/operations/createplan.js.map +1 -1
- package/dist/commonjs/models/operations/getprofitability.d.ts +55 -0
- package/dist/commonjs/models/operations/getprofitability.d.ts.map +1 -0
- package/dist/commonjs/models/operations/getprofitability.js +64 -0
- package/dist/commonjs/models/operations/getprofitability.js.map +1 -0
- package/dist/commonjs/models/operations/getrevenue.d.ts +4 -4
- package/dist/commonjs/models/operations/getrevenue.d.ts.map +1 -1
- package/dist/commonjs/models/operations/getrevenue.js +4 -5
- package/dist/commonjs/models/operations/getrevenue.js.map +1 -1
- package/dist/commonjs/models/operations/index.d.ts +4 -0
- package/dist/commonjs/models/operations/index.d.ts.map +1 -1
- package/dist/commonjs/models/operations/index.js +4 -0
- package/dist/commonjs/models/operations/index.js.map +1 -1
- package/dist/commonjs/models/operations/listcustomerpaymentmethods.d.ts +35 -0
- package/dist/commonjs/models/operations/listcustomerpaymentmethods.d.ts.map +1 -0
- package/dist/commonjs/models/operations/listcustomerpaymentmethods.js +65 -0
- package/dist/commonjs/models/operations/listcustomerpaymentmethods.js.map +1 -0
- package/dist/commonjs/models/operations/listinvoices.d.ts +9 -0
- package/dist/commonjs/models/operations/listinvoices.d.ts.map +1 -1
- package/dist/commonjs/models/operations/listinvoices.js +2 -0
- package/dist/commonjs/models/operations/listinvoices.js.map +1 -1
- package/dist/commonjs/models/operations/listpaymentsessions.d.ts +36 -10
- package/dist/commonjs/models/operations/listpaymentsessions.d.ts.map +1 -1
- package/dist/commonjs/models/operations/listpaymentsessions.js +19 -4
- package/dist/commonjs/models/operations/listpaymentsessions.js.map +1 -1
- package/dist/commonjs/models/operations/updateplan.d.ts +5 -0
- package/dist/commonjs/models/operations/updateplan.d.ts.map +1 -1
- package/dist/commonjs/models/operations/updateplan.js +2 -0
- package/dist/commonjs/models/operations/updateplan.js.map +1 -1
- package/dist/commonjs/models/paymentmethod.d.ts +30 -0
- package/dist/commonjs/models/paymentmethod.d.ts.map +1 -0
- package/dist/commonjs/models/paymentmethod.js +62 -0
- package/dist/commonjs/models/paymentmethod.js.map +1 -0
- package/dist/commonjs/models/paymentsession.d.ts +53 -0
- package/dist/commonjs/models/paymentsession.d.ts.map +1 -0
- package/dist/commonjs/models/paymentsession.js +81 -0
- package/dist/commonjs/models/paymentsession.js.map +1 -0
- package/dist/commonjs/models/plan.d.ts +4 -0
- package/dist/commonjs/models/plan.d.ts.map +1 -1
- package/dist/commonjs/models/plan.js +1 -0
- package/dist/commonjs/models/plan.js.map +1 -1
- package/dist/commonjs/models/profitabilityrow.d.ts +38 -0
- package/dist/commonjs/models/profitabilityrow.d.ts.map +1 -0
- package/dist/commonjs/models/profitabilityrow.js +57 -0
- package/dist/commonjs/models/profitabilityrow.js.map +1 -0
- package/dist/commonjs/models/profitabilitysummaryresponse.d.ts +26 -0
- package/dist/commonjs/models/profitabilitysummaryresponse.d.ts.map +1 -0
- package/dist/commonjs/models/profitabilitysummaryresponse.js +54 -0
- package/dist/commonjs/models/profitabilitysummaryresponse.js.map +1 -0
- package/dist/commonjs/models/profitabilitytrend.d.ts +17 -0
- package/dist/commonjs/models/profitabilitytrend.d.ts.map +1 -0
- package/dist/commonjs/models/profitabilitytrend.js +51 -0
- package/dist/commonjs/models/profitabilitytrend.js.map +1 -0
- package/dist/commonjs/models/purchasegrantresponse.d.ts +4 -4
- package/dist/commonjs/models/purchasegrantresponse.d.ts.map +1 -1
- package/dist/commonjs/models/purchasegrantresponse.js +6 -6
- package/dist/commonjs/models/purchasegrantresponse.js.map +1 -1
- package/dist/commonjs/models/schemaspaymentsession.d.ts +68 -0
- package/dist/commonjs/models/schemaspaymentsession.d.ts.map +1 -0
- package/dist/commonjs/models/schemaspaymentsession.js +78 -0
- package/dist/commonjs/models/schemaspaymentsession.js.map +1 -0
- package/dist/commonjs/sdk/customers.d.ts +14 -0
- package/dist/commonjs/sdk/customers.d.ts.map +1 -1
- package/dist/commonjs/sdk/customers.js +20 -0
- package/dist/commonjs/sdk/customers.js.map +1 -1
- package/dist/commonjs/sdk/paymentsessions.d.ts +12 -0
- package/dist/commonjs/sdk/paymentsessions.d.ts.map +1 -0
- package/dist/commonjs/sdk/paymentsessions.js +22 -0
- package/dist/commonjs/sdk/paymentsessions.js.map +1 -0
- package/dist/commonjs/sdk/profitability.d.ts +13 -0
- package/dist/commonjs/sdk/profitability.d.ts.map +1 -0
- package/dist/commonjs/sdk/profitability.js +22 -0
- package/dist/commonjs/sdk/profitability.js.map +1 -0
- package/dist/commonjs/sdk/sdk.d.ts +6 -0
- package/dist/commonjs/sdk/sdk.d.ts.map +1 -1
- package/dist/commonjs/sdk/sdk.js +8 -0
- package/dist/commonjs/sdk/sdk.js.map +1 -1
- package/dist/esm/funcs/customersCreateCustomerPaymentMethod.d.ts +19 -0
- package/dist/esm/funcs/customersCreateCustomerPaymentMethod.d.ts.map +1 -0
- package/dist/esm/funcs/customersCreateCustomerPaymentMethod.js +89 -0
- package/dist/esm/funcs/customersCreateCustomerPaymentMethod.js.map +1 -0
- package/dist/esm/funcs/customersListCustomerPaymentMethods.d.ts +18 -0
- package/dist/esm/funcs/customersListCustomerPaymentMethods.d.ts.map +1 -0
- package/dist/esm/funcs/customersListCustomerPaymentMethods.js +87 -0
- package/dist/esm/funcs/customersListCustomerPaymentMethods.js.map +1 -0
- package/dist/esm/funcs/invoicesV2List.js +1 -0
- package/dist/esm/funcs/invoicesV2List.js.map +1 -1
- package/dist/esm/funcs/paymentSessionsListPaymentSessions.d.ts +18 -0
- package/dist/esm/funcs/paymentSessionsListPaymentSessions.d.ts.map +1 -0
- package/dist/esm/funcs/paymentSessionsListPaymentSessions.js +91 -0
- package/dist/esm/funcs/paymentSessionsListPaymentSessions.js.map +1 -0
- package/dist/esm/funcs/profitabilityGetProfitability.d.ts +19 -0
- package/dist/esm/funcs/profitabilityGetProfitability.d.ts.map +1 -0
- package/dist/esm/funcs/profitabilityGetProfitability.js +91 -0
- package/dist/esm/funcs/profitabilityGetProfitability.js.map +1 -0
- package/dist/esm/lib/config.d.ts +2 -2
- package/dist/esm/lib/config.js +2 -2
- package/dist/esm/models/index.d.ts +6 -0
- package/dist/esm/models/index.d.ts.map +1 -1
- package/dist/esm/models/index.js +6 -0
- package/dist/esm/models/index.js.map +1 -1
- package/dist/esm/models/offsetpagination.d.ts +4 -4
- package/dist/esm/models/offsetpagination.d.ts.map +1 -1
- package/dist/esm/models/offsetpagination.js +3 -3
- package/dist/esm/models/offsetpagination.js.map +1 -1
- package/dist/esm/models/operations/createcustomerpaymentmethod.d.ts +44 -0
- package/dist/esm/models/operations/createcustomerpaymentmethod.d.ts.map +1 -0
- package/dist/esm/models/operations/createcustomerpaymentmethod.js +27 -0
- package/dist/esm/models/operations/createcustomerpaymentmethod.js.map +1 -0
- package/dist/esm/models/operations/createplan.d.ts +5 -0
- package/dist/esm/models/operations/createplan.d.ts.map +1 -1
- package/dist/esm/models/operations/createplan.js +2 -0
- package/dist/esm/models/operations/createplan.js.map +1 -1
- package/dist/esm/models/operations/getprofitability.d.ts +55 -0
- package/dist/esm/models/operations/getprofitability.d.ts.map +1 -0
- package/dist/esm/models/operations/getprofitability.js +27 -0
- package/dist/esm/models/operations/getprofitability.js.map +1 -0
- package/dist/esm/models/operations/getrevenue.d.ts +4 -4
- package/dist/esm/models/operations/getrevenue.d.ts.map +1 -1
- package/dist/esm/models/operations/getrevenue.js +3 -4
- package/dist/esm/models/operations/getrevenue.js.map +1 -1
- package/dist/esm/models/operations/index.d.ts +4 -0
- package/dist/esm/models/operations/index.d.ts.map +1 -1
- package/dist/esm/models/operations/index.js +4 -0
- package/dist/esm/models/operations/index.js.map +1 -1
- package/dist/esm/models/operations/listcustomerpaymentmethods.d.ts +35 -0
- package/dist/esm/models/operations/listcustomerpaymentmethods.d.ts.map +1 -0
- package/dist/esm/models/operations/listcustomerpaymentmethods.js +27 -0
- package/dist/esm/models/operations/listcustomerpaymentmethods.js.map +1 -0
- package/dist/esm/models/operations/listinvoices.d.ts +9 -0
- package/dist/esm/models/operations/listinvoices.d.ts.map +1 -1
- package/dist/esm/models/operations/listinvoices.js +2 -0
- package/dist/esm/models/operations/listinvoices.js.map +1 -1
- package/dist/esm/models/operations/listpaymentsessions.d.ts +36 -10
- package/dist/esm/models/operations/listpaymentsessions.d.ts.map +1 -1
- package/dist/esm/models/operations/listpaymentsessions.js +18 -3
- package/dist/esm/models/operations/listpaymentsessions.js.map +1 -1
- package/dist/esm/models/operations/updateplan.d.ts +5 -0
- package/dist/esm/models/operations/updateplan.d.ts.map +1 -1
- package/dist/esm/models/operations/updateplan.js +2 -0
- package/dist/esm/models/operations/updateplan.js.map +1 -1
- package/dist/esm/models/paymentmethod.d.ts +30 -0
- package/dist/esm/models/paymentmethod.d.ts.map +1 -0
- package/dist/esm/models/paymentmethod.js +25 -0
- package/dist/esm/models/paymentmethod.js.map +1 -0
- package/dist/esm/models/paymentsession.d.ts +53 -0
- package/dist/esm/models/paymentsession.d.ts.map +1 -0
- package/dist/esm/models/paymentsession.js +44 -0
- package/dist/esm/models/paymentsession.js.map +1 -0
- package/dist/esm/models/plan.d.ts +4 -0
- package/dist/esm/models/plan.d.ts.map +1 -1
- package/dist/esm/models/plan.js +1 -0
- package/dist/esm/models/plan.js.map +1 -1
- package/dist/esm/models/profitabilityrow.d.ts +38 -0
- package/dist/esm/models/profitabilityrow.d.ts.map +1 -0
- package/dist/esm/models/profitabilityrow.js +20 -0
- package/dist/esm/models/profitabilityrow.js.map +1 -0
- package/dist/esm/models/profitabilitysummaryresponse.d.ts +26 -0
- package/dist/esm/models/profitabilitysummaryresponse.d.ts.map +1 -0
- package/dist/esm/models/profitabilitysummaryresponse.js +17 -0
- package/dist/esm/models/profitabilitysummaryresponse.js.map +1 -0
- package/dist/esm/models/profitabilitytrend.d.ts +17 -0
- package/dist/esm/models/profitabilitytrend.d.ts.map +1 -0
- package/dist/esm/models/profitabilitytrend.js +14 -0
- package/dist/esm/models/profitabilitytrend.js.map +1 -0
- package/dist/esm/models/purchasegrantresponse.d.ts +4 -4
- package/dist/esm/models/purchasegrantresponse.d.ts.map +1 -1
- package/dist/esm/models/purchasegrantresponse.js +4 -4
- package/dist/esm/models/purchasegrantresponse.js.map +1 -1
- package/dist/esm/models/schemaspaymentsession.d.ts +68 -0
- package/dist/esm/models/schemaspaymentsession.d.ts.map +1 -0
- package/dist/esm/models/schemaspaymentsession.js +41 -0
- package/dist/esm/models/schemaspaymentsession.js.map +1 -0
- package/dist/esm/sdk/customers.d.ts +14 -0
- package/dist/esm/sdk/customers.d.ts.map +1 -1
- package/dist/esm/sdk/customers.js +20 -0
- package/dist/esm/sdk/customers.js.map +1 -1
- package/dist/esm/sdk/paymentsessions.d.ts +12 -0
- package/dist/esm/sdk/paymentsessions.d.ts.map +1 -0
- package/dist/esm/sdk/paymentsessions.js +18 -0
- package/dist/esm/sdk/paymentsessions.js.map +1 -0
- package/dist/esm/sdk/profitability.d.ts +13 -0
- package/dist/esm/sdk/profitability.d.ts.map +1 -0
- package/dist/esm/sdk/profitability.js +18 -0
- package/dist/esm/sdk/profitability.js.map +1 -0
- package/dist/esm/sdk/sdk.d.ts +6 -0
- package/dist/esm/sdk/sdk.d.ts.map +1 -1
- package/dist/esm/sdk/sdk.js +8 -0
- package/dist/esm/sdk/sdk.js.map +1 -1
- package/jsr.json +1 -1
- package/package.json +1 -1
- package/src/funcs/customersCreateCustomerPaymentMethod.ts +182 -0
- package/src/funcs/customersListCustomerPaymentMethods.ts +176 -0
- package/src/funcs/invoicesV2List.ts +1 -0
- package/src/funcs/paymentSessionsListPaymentSessions.ts +183 -0
- package/src/funcs/profitabilityGetProfitability.ts +184 -0
- package/src/lib/config.ts +2 -2
- package/src/models/index.ts +6 -0
- package/src/models/offsetpagination.ts +7 -7
- package/src/models/operations/createcustomerpaymentmethod.ts +90 -0
- package/src/models/operations/createplan.ts +7 -0
- package/src/models/operations/getprofitability.ts +85 -0
- package/src/models/operations/getrevenue.ts +7 -6
- package/src/models/operations/index.ts +4 -0
- package/src/models/operations/listcustomerpaymentmethods.ts +82 -0
- package/src/models/operations/listinvoices.ts +11 -0
- package/src/models/operations/listpaymentsessions.ts +43 -12
- package/src/models/operations/updateplan.ts +7 -0
- package/src/models/paymentmethod.ts +62 -0
- package/src/models/paymentsession.ts +96 -0
- package/src/models/plan.ts +7 -0
- package/src/models/profitabilityrow.ts +68 -0
- package/src/models/profitabilitysummaryresponse.ts +53 -0
- package/src/models/profitabilitytrend.ts +39 -0
- package/src/models/purchasegrantresponse.ts +12 -9
- package/src/models/schemaspaymentsession.ts +113 -0
- package/src/sdk/customers.ts +36 -0
- package/src/sdk/paymentsessions.ts +27 -0
- package/src/sdk/profitability.ts +28 -0
- package/src/sdk/sdk.ts +12 -0
|
@@ -0,0 +1,176 @@
|
|
|
1
|
+
/*
|
|
2
|
+
* Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.
|
|
3
|
+
*/
|
|
4
|
+
|
|
5
|
+
import { PaygenticCore } from "../core.js";
|
|
6
|
+
import { encodeSimple } from "../lib/encodings.js";
|
|
7
|
+
import * as M from "../lib/matchers.js";
|
|
8
|
+
import { compactMap } from "../lib/primitives.js";
|
|
9
|
+
import { safeParse } from "../lib/schemas.js";
|
|
10
|
+
import { RequestOptions } from "../lib/sdks.js";
|
|
11
|
+
import { extractSecurity, resolveGlobalSecurity } from "../lib/security.js";
|
|
12
|
+
import { pathToFunc } from "../lib/url.js";
|
|
13
|
+
import {
|
|
14
|
+
ConnectionError,
|
|
15
|
+
InvalidRequestError,
|
|
16
|
+
RequestAbortedError,
|
|
17
|
+
RequestTimeoutError,
|
|
18
|
+
UnexpectedClientError,
|
|
19
|
+
} from "../models/errors/httpclienterrors.js";
|
|
20
|
+
import * as errors from "../models/errors/index.js";
|
|
21
|
+
import { PaygenticError } from "../models/errors/paygenticerror.js";
|
|
22
|
+
import { ResponseValidationError } from "../models/errors/responsevalidationerror.js";
|
|
23
|
+
import { SDKValidationError } from "../models/errors/sdkvalidationerror.js";
|
|
24
|
+
import * as operations from "../models/operations/index.js";
|
|
25
|
+
import { APICall, APIPromise } from "../types/async.js";
|
|
26
|
+
import { Result } from "../types/fp.js";
|
|
27
|
+
|
|
28
|
+
/**
|
|
29
|
+
* List payment methods
|
|
30
|
+
*
|
|
31
|
+
* @remarks
|
|
32
|
+
* List off-session payment methods saved for this customer.
|
|
33
|
+
*/
|
|
34
|
+
export function customersListCustomerPaymentMethods(
|
|
35
|
+
client: PaygenticCore,
|
|
36
|
+
request: operations.ListCustomerPaymentMethodsRequest,
|
|
37
|
+
options?: RequestOptions,
|
|
38
|
+
): APIPromise<
|
|
39
|
+
Result<
|
|
40
|
+
operations.ListCustomerPaymentMethodsResponse,
|
|
41
|
+
| errors.ErrorT
|
|
42
|
+
| PaygenticError
|
|
43
|
+
| ResponseValidationError
|
|
44
|
+
| ConnectionError
|
|
45
|
+
| RequestAbortedError
|
|
46
|
+
| RequestTimeoutError
|
|
47
|
+
| InvalidRequestError
|
|
48
|
+
| UnexpectedClientError
|
|
49
|
+
| SDKValidationError
|
|
50
|
+
>
|
|
51
|
+
> {
|
|
52
|
+
return new APIPromise($do(
|
|
53
|
+
client,
|
|
54
|
+
request,
|
|
55
|
+
options,
|
|
56
|
+
));
|
|
57
|
+
}
|
|
58
|
+
|
|
59
|
+
async function $do(
|
|
60
|
+
client: PaygenticCore,
|
|
61
|
+
request: operations.ListCustomerPaymentMethodsRequest,
|
|
62
|
+
options?: RequestOptions,
|
|
63
|
+
): Promise<
|
|
64
|
+
[
|
|
65
|
+
Result<
|
|
66
|
+
operations.ListCustomerPaymentMethodsResponse,
|
|
67
|
+
| errors.ErrorT
|
|
68
|
+
| PaygenticError
|
|
69
|
+
| ResponseValidationError
|
|
70
|
+
| ConnectionError
|
|
71
|
+
| RequestAbortedError
|
|
72
|
+
| RequestTimeoutError
|
|
73
|
+
| InvalidRequestError
|
|
74
|
+
| UnexpectedClientError
|
|
75
|
+
| SDKValidationError
|
|
76
|
+
>,
|
|
77
|
+
APICall,
|
|
78
|
+
]
|
|
79
|
+
> {
|
|
80
|
+
const parsed = safeParse(
|
|
81
|
+
request,
|
|
82
|
+
(value) =>
|
|
83
|
+
operations.ListCustomerPaymentMethodsRequest$outboundSchema.parse(value),
|
|
84
|
+
"Input validation failed",
|
|
85
|
+
);
|
|
86
|
+
if (!parsed.ok) {
|
|
87
|
+
return [parsed, { status: "invalid" }];
|
|
88
|
+
}
|
|
89
|
+
const payload = parsed.value;
|
|
90
|
+
const body = null;
|
|
91
|
+
|
|
92
|
+
const pathParams = {
|
|
93
|
+
id: encodeSimple("id", payload.id, {
|
|
94
|
+
explode: false,
|
|
95
|
+
charEncoding: "percent",
|
|
96
|
+
}),
|
|
97
|
+
};
|
|
98
|
+
const path = pathToFunc("/v0/customers/{id}/paymentMethods")(pathParams);
|
|
99
|
+
|
|
100
|
+
const headers = new Headers(compactMap({
|
|
101
|
+
Accept: "application/json",
|
|
102
|
+
}));
|
|
103
|
+
|
|
104
|
+
const secConfig = await extractSecurity(client._options.bearerAuth);
|
|
105
|
+
const securityInput = secConfig == null ? {} : { bearerAuth: secConfig };
|
|
106
|
+
const requestSecurity = resolveGlobalSecurity(securityInput);
|
|
107
|
+
|
|
108
|
+
const context = {
|
|
109
|
+
options: client._options,
|
|
110
|
+
baseURL: options?.serverURL ?? client._baseURL ?? "",
|
|
111
|
+
operationID: "listCustomerPaymentMethods",
|
|
112
|
+
oAuth2Scopes: null,
|
|
113
|
+
|
|
114
|
+
resolvedSecurity: requestSecurity,
|
|
115
|
+
|
|
116
|
+
securitySource: client._options.bearerAuth,
|
|
117
|
+
retryConfig: options?.retries
|
|
118
|
+
|| client._options.retryConfig
|
|
119
|
+
|| { strategy: "none" },
|
|
120
|
+
retryCodes: options?.retryCodes || ["429", "500", "502", "503", "504"],
|
|
121
|
+
};
|
|
122
|
+
|
|
123
|
+
const requestRes = client._createRequest(context, {
|
|
124
|
+
security: requestSecurity,
|
|
125
|
+
method: "GET",
|
|
126
|
+
baseURL: options?.serverURL,
|
|
127
|
+
path: path,
|
|
128
|
+
headers: headers,
|
|
129
|
+
body: body,
|
|
130
|
+
userAgent: client._options.userAgent,
|
|
131
|
+
timeoutMs: options?.timeoutMs || client._options.timeoutMs || -1,
|
|
132
|
+
}, options);
|
|
133
|
+
if (!requestRes.ok) {
|
|
134
|
+
return [requestRes, { status: "invalid" }];
|
|
135
|
+
}
|
|
136
|
+
const req = requestRes.value;
|
|
137
|
+
|
|
138
|
+
const doResult = await client._do(req, {
|
|
139
|
+
context,
|
|
140
|
+
errorCodes: ["403", "404", "4XX", "500", "5XX"],
|
|
141
|
+
retryConfig: context.retryConfig,
|
|
142
|
+
retryCodes: context.retryCodes,
|
|
143
|
+
});
|
|
144
|
+
if (!doResult.ok) {
|
|
145
|
+
return [doResult, { status: "request-error", request: req }];
|
|
146
|
+
}
|
|
147
|
+
const response = doResult.value;
|
|
148
|
+
|
|
149
|
+
const responseFields = {
|
|
150
|
+
HttpMeta: { Response: response, Request: req },
|
|
151
|
+
};
|
|
152
|
+
|
|
153
|
+
const [result] = await M.match<
|
|
154
|
+
operations.ListCustomerPaymentMethodsResponse,
|
|
155
|
+
| errors.ErrorT
|
|
156
|
+
| PaygenticError
|
|
157
|
+
| ResponseValidationError
|
|
158
|
+
| ConnectionError
|
|
159
|
+
| RequestAbortedError
|
|
160
|
+
| RequestTimeoutError
|
|
161
|
+
| InvalidRequestError
|
|
162
|
+
| UnexpectedClientError
|
|
163
|
+
| SDKValidationError
|
|
164
|
+
>(
|
|
165
|
+
M.json(200, operations.ListCustomerPaymentMethodsResponse$inboundSchema),
|
|
166
|
+
M.jsonErr([403, 404], errors.ErrorT$inboundSchema),
|
|
167
|
+
M.jsonErr(500, errors.ErrorT$inboundSchema),
|
|
168
|
+
M.fail("4XX"),
|
|
169
|
+
M.fail("5XX"),
|
|
170
|
+
)(response, req, { extraFields: responseFields });
|
|
171
|
+
if (!result.ok) {
|
|
172
|
+
return [result, { status: "complete", request: req, response }];
|
|
173
|
+
}
|
|
174
|
+
|
|
175
|
+
return [result, { status: "complete", request: req, response }];
|
|
176
|
+
}
|
|
@@ -0,0 +1,183 @@
|
|
|
1
|
+
/*
|
|
2
|
+
* Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.
|
|
3
|
+
*/
|
|
4
|
+
|
|
5
|
+
import { PaygenticCore } from "../core.js";
|
|
6
|
+
import { encodeFormQuery } from "../lib/encodings.js";
|
|
7
|
+
import * as M from "../lib/matchers.js";
|
|
8
|
+
import { compactMap } from "../lib/primitives.js";
|
|
9
|
+
import { safeParse } from "../lib/schemas.js";
|
|
10
|
+
import { RequestOptions } from "../lib/sdks.js";
|
|
11
|
+
import { extractSecurity, resolveGlobalSecurity } from "../lib/security.js";
|
|
12
|
+
import { pathToFunc } from "../lib/url.js";
|
|
13
|
+
import {
|
|
14
|
+
ConnectionError,
|
|
15
|
+
InvalidRequestError,
|
|
16
|
+
RequestAbortedError,
|
|
17
|
+
RequestTimeoutError,
|
|
18
|
+
UnexpectedClientError,
|
|
19
|
+
} from "../models/errors/httpclienterrors.js";
|
|
20
|
+
import * as errors from "../models/errors/index.js";
|
|
21
|
+
import { PaygenticError } from "../models/errors/paygenticerror.js";
|
|
22
|
+
import { ResponseValidationError } from "../models/errors/responsevalidationerror.js";
|
|
23
|
+
import { SDKValidationError } from "../models/errors/sdkvalidationerror.js";
|
|
24
|
+
import * as operations from "../models/operations/index.js";
|
|
25
|
+
import { APICall, APIPromise } from "../types/async.js";
|
|
26
|
+
import { Result } from "../types/fp.js";
|
|
27
|
+
|
|
28
|
+
/**
|
|
29
|
+
* List
|
|
30
|
+
*
|
|
31
|
+
* @remarks
|
|
32
|
+
* List payment sessions for the authenticated merchant with optional filters. Supports filtering by subscriptionId, customerId, status, and entityType. When subscriptionId is provided the result includes both the subscription's own activation session (entityType='subscription') and any session attached to invoices for that subscription (entityType='invoice').
|
|
33
|
+
*/
|
|
34
|
+
export function paymentSessionsListPaymentSessions(
|
|
35
|
+
client: PaygenticCore,
|
|
36
|
+
request?: operations.ListPaymentSessionsRequest | undefined,
|
|
37
|
+
options?: RequestOptions,
|
|
38
|
+
): APIPromise<
|
|
39
|
+
Result<
|
|
40
|
+
operations.ListPaymentSessionsResponse,
|
|
41
|
+
| errors.ErrorT
|
|
42
|
+
| PaygenticError
|
|
43
|
+
| ResponseValidationError
|
|
44
|
+
| ConnectionError
|
|
45
|
+
| RequestAbortedError
|
|
46
|
+
| RequestTimeoutError
|
|
47
|
+
| InvalidRequestError
|
|
48
|
+
| UnexpectedClientError
|
|
49
|
+
| SDKValidationError
|
|
50
|
+
>
|
|
51
|
+
> {
|
|
52
|
+
return new APIPromise($do(
|
|
53
|
+
client,
|
|
54
|
+
request,
|
|
55
|
+
options,
|
|
56
|
+
));
|
|
57
|
+
}
|
|
58
|
+
|
|
59
|
+
async function $do(
|
|
60
|
+
client: PaygenticCore,
|
|
61
|
+
request?: operations.ListPaymentSessionsRequest | undefined,
|
|
62
|
+
options?: RequestOptions,
|
|
63
|
+
): Promise<
|
|
64
|
+
[
|
|
65
|
+
Result<
|
|
66
|
+
operations.ListPaymentSessionsResponse,
|
|
67
|
+
| errors.ErrorT
|
|
68
|
+
| PaygenticError
|
|
69
|
+
| ResponseValidationError
|
|
70
|
+
| ConnectionError
|
|
71
|
+
| RequestAbortedError
|
|
72
|
+
| RequestTimeoutError
|
|
73
|
+
| InvalidRequestError
|
|
74
|
+
| UnexpectedClientError
|
|
75
|
+
| SDKValidationError
|
|
76
|
+
>,
|
|
77
|
+
APICall,
|
|
78
|
+
]
|
|
79
|
+
> {
|
|
80
|
+
const parsed = safeParse(
|
|
81
|
+
request,
|
|
82
|
+
(value) =>
|
|
83
|
+
operations.ListPaymentSessionsRequest$outboundSchema.optional().parse(
|
|
84
|
+
value,
|
|
85
|
+
),
|
|
86
|
+
"Input validation failed",
|
|
87
|
+
);
|
|
88
|
+
if (!parsed.ok) {
|
|
89
|
+
return [parsed, { status: "invalid" }];
|
|
90
|
+
}
|
|
91
|
+
const payload = parsed.value;
|
|
92
|
+
const body = null;
|
|
93
|
+
|
|
94
|
+
const path = pathToFunc("/v0/paymentSessions")();
|
|
95
|
+
|
|
96
|
+
const query = encodeFormQuery({
|
|
97
|
+
"customerId": payload?.customerId,
|
|
98
|
+
"entityType": payload?.entityType,
|
|
99
|
+
"limit": payload?.limit,
|
|
100
|
+
"merchantId": payload?.merchantId,
|
|
101
|
+
"offset": payload?.offset,
|
|
102
|
+
"status": payload?.status,
|
|
103
|
+
"subscriptionId": payload?.subscriptionId,
|
|
104
|
+
});
|
|
105
|
+
|
|
106
|
+
const headers = new Headers(compactMap({
|
|
107
|
+
Accept: "application/json",
|
|
108
|
+
}));
|
|
109
|
+
|
|
110
|
+
const secConfig = await extractSecurity(client._options.bearerAuth);
|
|
111
|
+
const securityInput = secConfig == null ? {} : { bearerAuth: secConfig };
|
|
112
|
+
const requestSecurity = resolveGlobalSecurity(securityInput);
|
|
113
|
+
|
|
114
|
+
const context = {
|
|
115
|
+
options: client._options,
|
|
116
|
+
baseURL: options?.serverURL ?? client._baseURL ?? "",
|
|
117
|
+
operationID: "listPaymentSessions",
|
|
118
|
+
oAuth2Scopes: null,
|
|
119
|
+
|
|
120
|
+
resolvedSecurity: requestSecurity,
|
|
121
|
+
|
|
122
|
+
securitySource: client._options.bearerAuth,
|
|
123
|
+
retryConfig: options?.retries
|
|
124
|
+
|| client._options.retryConfig
|
|
125
|
+
|| { strategy: "none" },
|
|
126
|
+
retryCodes: options?.retryCodes || ["429", "500", "502", "503", "504"],
|
|
127
|
+
};
|
|
128
|
+
|
|
129
|
+
const requestRes = client._createRequest(context, {
|
|
130
|
+
security: requestSecurity,
|
|
131
|
+
method: "GET",
|
|
132
|
+
baseURL: options?.serverURL,
|
|
133
|
+
path: path,
|
|
134
|
+
headers: headers,
|
|
135
|
+
query: query,
|
|
136
|
+
body: body,
|
|
137
|
+
userAgent: client._options.userAgent,
|
|
138
|
+
timeoutMs: options?.timeoutMs || client._options.timeoutMs || -1,
|
|
139
|
+
}, options);
|
|
140
|
+
if (!requestRes.ok) {
|
|
141
|
+
return [requestRes, { status: "invalid" }];
|
|
142
|
+
}
|
|
143
|
+
const req = requestRes.value;
|
|
144
|
+
|
|
145
|
+
const doResult = await client._do(req, {
|
|
146
|
+
context,
|
|
147
|
+
errorCodes: ["401", "403", "4XX", "500", "5XX"],
|
|
148
|
+
retryConfig: context.retryConfig,
|
|
149
|
+
retryCodes: context.retryCodes,
|
|
150
|
+
});
|
|
151
|
+
if (!doResult.ok) {
|
|
152
|
+
return [doResult, { status: "request-error", request: req }];
|
|
153
|
+
}
|
|
154
|
+
const response = doResult.value;
|
|
155
|
+
|
|
156
|
+
const responseFields = {
|
|
157
|
+
HttpMeta: { Response: response, Request: req },
|
|
158
|
+
};
|
|
159
|
+
|
|
160
|
+
const [result] = await M.match<
|
|
161
|
+
operations.ListPaymentSessionsResponse,
|
|
162
|
+
| errors.ErrorT
|
|
163
|
+
| PaygenticError
|
|
164
|
+
| ResponseValidationError
|
|
165
|
+
| ConnectionError
|
|
166
|
+
| RequestAbortedError
|
|
167
|
+
| RequestTimeoutError
|
|
168
|
+
| InvalidRequestError
|
|
169
|
+
| UnexpectedClientError
|
|
170
|
+
| SDKValidationError
|
|
171
|
+
>(
|
|
172
|
+
M.json(200, operations.ListPaymentSessionsResponse$inboundSchema),
|
|
173
|
+
M.jsonErr([401, 403], errors.ErrorT$inboundSchema),
|
|
174
|
+
M.jsonErr(500, errors.ErrorT$inboundSchema),
|
|
175
|
+
M.fail("4XX"),
|
|
176
|
+
M.fail("5XX"),
|
|
177
|
+
)(response, req, { extraFields: responseFields });
|
|
178
|
+
if (!result.ok) {
|
|
179
|
+
return [result, { status: "complete", request: req, response }];
|
|
180
|
+
}
|
|
181
|
+
|
|
182
|
+
return [result, { status: "complete", request: req, response }];
|
|
183
|
+
}
|
|
@@ -0,0 +1,184 @@
|
|
|
1
|
+
/*
|
|
2
|
+
* Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.
|
|
3
|
+
*/
|
|
4
|
+
|
|
5
|
+
import { PaygenticCore } from "../core.js";
|
|
6
|
+
import { encodeFormQuery } from "../lib/encodings.js";
|
|
7
|
+
import * as M from "../lib/matchers.js";
|
|
8
|
+
import { compactMap } from "../lib/primitives.js";
|
|
9
|
+
import { safeParse } from "../lib/schemas.js";
|
|
10
|
+
import { RequestOptions } from "../lib/sdks.js";
|
|
11
|
+
import { extractSecurity, resolveGlobalSecurity } from "../lib/security.js";
|
|
12
|
+
import { pathToFunc } from "../lib/url.js";
|
|
13
|
+
import {
|
|
14
|
+
ConnectionError,
|
|
15
|
+
InvalidRequestError,
|
|
16
|
+
RequestAbortedError,
|
|
17
|
+
RequestTimeoutError,
|
|
18
|
+
UnexpectedClientError,
|
|
19
|
+
} from "../models/errors/httpclienterrors.js";
|
|
20
|
+
import * as errors from "../models/errors/index.js";
|
|
21
|
+
import { PaygenticError } from "../models/errors/paygenticerror.js";
|
|
22
|
+
import { ResponseValidationError } from "../models/errors/responsevalidationerror.js";
|
|
23
|
+
import { SDKValidationError } from "../models/errors/sdkvalidationerror.js";
|
|
24
|
+
import * as models from "../models/index.js";
|
|
25
|
+
import * as operations from "../models/operations/index.js";
|
|
26
|
+
import { APICall, APIPromise } from "../types/async.js";
|
|
27
|
+
import { Result } from "../types/fp.js";
|
|
28
|
+
|
|
29
|
+
/**
|
|
30
|
+
* Get profitability summary
|
|
31
|
+
*
|
|
32
|
+
* @remarks
|
|
33
|
+
* Returns a per-customer profitability summary for a merchant over a date range. Each row aggregates revenue (from issued + paid invoices), cost (from metered cost discovery), profit, and margin. Customers are ranked by profit descending and capped at topN; the remainder is rolled into a single self-consistent 'Other' row whose revenue, cost, and profit reflect the same set of customers. Rows are inner-joined against the merchant's customer list, so orphaned meter subjects from deleted or unknown customers are dropped.
|
|
34
|
+
*/
|
|
35
|
+
export function profitabilityGetProfitability(
|
|
36
|
+
client: PaygenticCore,
|
|
37
|
+
request: operations.GetProfitabilityRequest,
|
|
38
|
+
options?: RequestOptions,
|
|
39
|
+
): APIPromise<
|
|
40
|
+
Result<
|
|
41
|
+
models.ProfitabilitySummaryResponse,
|
|
42
|
+
| errors.BadRequest
|
|
43
|
+
| errors.ErrorT
|
|
44
|
+
| PaygenticError
|
|
45
|
+
| ResponseValidationError
|
|
46
|
+
| ConnectionError
|
|
47
|
+
| RequestAbortedError
|
|
48
|
+
| RequestTimeoutError
|
|
49
|
+
| InvalidRequestError
|
|
50
|
+
| UnexpectedClientError
|
|
51
|
+
| SDKValidationError
|
|
52
|
+
>
|
|
53
|
+
> {
|
|
54
|
+
return new APIPromise($do(
|
|
55
|
+
client,
|
|
56
|
+
request,
|
|
57
|
+
options,
|
|
58
|
+
));
|
|
59
|
+
}
|
|
60
|
+
|
|
61
|
+
async function $do(
|
|
62
|
+
client: PaygenticCore,
|
|
63
|
+
request: operations.GetProfitabilityRequest,
|
|
64
|
+
options?: RequestOptions,
|
|
65
|
+
): Promise<
|
|
66
|
+
[
|
|
67
|
+
Result<
|
|
68
|
+
models.ProfitabilitySummaryResponse,
|
|
69
|
+
| errors.BadRequest
|
|
70
|
+
| errors.ErrorT
|
|
71
|
+
| PaygenticError
|
|
72
|
+
| ResponseValidationError
|
|
73
|
+
| ConnectionError
|
|
74
|
+
| RequestAbortedError
|
|
75
|
+
| RequestTimeoutError
|
|
76
|
+
| InvalidRequestError
|
|
77
|
+
| UnexpectedClientError
|
|
78
|
+
| SDKValidationError
|
|
79
|
+
>,
|
|
80
|
+
APICall,
|
|
81
|
+
]
|
|
82
|
+
> {
|
|
83
|
+
const parsed = safeParse(
|
|
84
|
+
request,
|
|
85
|
+
(value) => operations.GetProfitabilityRequest$outboundSchema.parse(value),
|
|
86
|
+
"Input validation failed",
|
|
87
|
+
);
|
|
88
|
+
if (!parsed.ok) {
|
|
89
|
+
return [parsed, { status: "invalid" }];
|
|
90
|
+
}
|
|
91
|
+
const payload = parsed.value;
|
|
92
|
+
const body = null;
|
|
93
|
+
|
|
94
|
+
const path = pathToFunc("/v0/profitability")();
|
|
95
|
+
|
|
96
|
+
const query = encodeFormQuery({
|
|
97
|
+
"bucketWidth": payload.bucketWidth,
|
|
98
|
+
"currency": payload.currency,
|
|
99
|
+
"from": payload.from,
|
|
100
|
+
"merchantId": payload.merchantId,
|
|
101
|
+
"to": payload.to,
|
|
102
|
+
"topN": payload.topN,
|
|
103
|
+
});
|
|
104
|
+
|
|
105
|
+
const headers = new Headers(compactMap({
|
|
106
|
+
Accept: "application/json",
|
|
107
|
+
}));
|
|
108
|
+
|
|
109
|
+
const secConfig = await extractSecurity(client._options.bearerAuth);
|
|
110
|
+
const securityInput = secConfig == null ? {} : { bearerAuth: secConfig };
|
|
111
|
+
const requestSecurity = resolveGlobalSecurity(securityInput);
|
|
112
|
+
|
|
113
|
+
const context = {
|
|
114
|
+
options: client._options,
|
|
115
|
+
baseURL: options?.serverURL ?? client._baseURL ?? "",
|
|
116
|
+
operationID: "getProfitability",
|
|
117
|
+
oAuth2Scopes: null,
|
|
118
|
+
|
|
119
|
+
resolvedSecurity: requestSecurity,
|
|
120
|
+
|
|
121
|
+
securitySource: client._options.bearerAuth,
|
|
122
|
+
retryConfig: options?.retries
|
|
123
|
+
|| client._options.retryConfig
|
|
124
|
+
|| { strategy: "none" },
|
|
125
|
+
retryCodes: options?.retryCodes || ["429", "500", "502", "503", "504"],
|
|
126
|
+
};
|
|
127
|
+
|
|
128
|
+
const requestRes = client._createRequest(context, {
|
|
129
|
+
security: requestSecurity,
|
|
130
|
+
method: "GET",
|
|
131
|
+
baseURL: options?.serverURL,
|
|
132
|
+
path: path,
|
|
133
|
+
headers: headers,
|
|
134
|
+
query: query,
|
|
135
|
+
body: body,
|
|
136
|
+
userAgent: client._options.userAgent,
|
|
137
|
+
timeoutMs: options?.timeoutMs || client._options.timeoutMs || -1,
|
|
138
|
+
}, options);
|
|
139
|
+
if (!requestRes.ok) {
|
|
140
|
+
return [requestRes, { status: "invalid" }];
|
|
141
|
+
}
|
|
142
|
+
const req = requestRes.value;
|
|
143
|
+
|
|
144
|
+
const doResult = await client._do(req, {
|
|
145
|
+
context,
|
|
146
|
+
errorCodes: ["400", "401", "403", "4XX", "500", "5XX"],
|
|
147
|
+
retryConfig: context.retryConfig,
|
|
148
|
+
retryCodes: context.retryCodes,
|
|
149
|
+
});
|
|
150
|
+
if (!doResult.ok) {
|
|
151
|
+
return [doResult, { status: "request-error", request: req }];
|
|
152
|
+
}
|
|
153
|
+
const response = doResult.value;
|
|
154
|
+
|
|
155
|
+
const responseFields = {
|
|
156
|
+
HttpMeta: { Response: response, Request: req },
|
|
157
|
+
};
|
|
158
|
+
|
|
159
|
+
const [result] = await M.match<
|
|
160
|
+
models.ProfitabilitySummaryResponse,
|
|
161
|
+
| errors.BadRequest
|
|
162
|
+
| errors.ErrorT
|
|
163
|
+
| PaygenticError
|
|
164
|
+
| ResponseValidationError
|
|
165
|
+
| ConnectionError
|
|
166
|
+
| RequestAbortedError
|
|
167
|
+
| RequestTimeoutError
|
|
168
|
+
| InvalidRequestError
|
|
169
|
+
| UnexpectedClientError
|
|
170
|
+
| SDKValidationError
|
|
171
|
+
>(
|
|
172
|
+
M.json(200, models.ProfitabilitySummaryResponse$inboundSchema),
|
|
173
|
+
M.jsonErr(400, errors.BadRequest$inboundSchema),
|
|
174
|
+
M.jsonErr([401, 403], errors.ErrorT$inboundSchema),
|
|
175
|
+
M.jsonErr(500, errors.ErrorT$inboundSchema),
|
|
176
|
+
M.fail("4XX"),
|
|
177
|
+
M.fail("5XX"),
|
|
178
|
+
)(response, req, { extraFields: responseFields });
|
|
179
|
+
if (!result.ok) {
|
|
180
|
+
return [result, { status: "complete", request: req, response }];
|
|
181
|
+
}
|
|
182
|
+
|
|
183
|
+
return [result, { status: "complete", request: req, response }];
|
|
184
|
+
}
|
package/src/lib/config.ts
CHANGED
|
@@ -65,7 +65,7 @@ export function serverURLFromOptions(options: SDKOptions): URL | null {
|
|
|
65
65
|
export const SDK_METADATA = {
|
|
66
66
|
language: "typescript",
|
|
67
67
|
openapiDocVersion: "0.1.0",
|
|
68
|
-
sdkVersion: "0.7.
|
|
68
|
+
sdkVersion: "0.7.3",
|
|
69
69
|
genVersion: "2.879.13",
|
|
70
|
-
userAgent: "speakeasy-sdk/typescript 0.7.
|
|
70
|
+
userAgent: "speakeasy-sdk/typescript 0.7.3 2.879.13 0.1.0 @paygentic/sdk",
|
|
71
71
|
} as const;
|
package/src/models/index.ts
CHANGED
|
@@ -40,6 +40,8 @@ export * from "./meterevent.js";
|
|
|
40
40
|
export * from "./metereventlist.js";
|
|
41
41
|
export * from "./offsetpagination.js";
|
|
42
42
|
export * from "./payment.js";
|
|
43
|
+
export * from "./paymentmethod.js";
|
|
44
|
+
export * from "./paymentsession.js";
|
|
43
45
|
export * from "./paymentsummary.js";
|
|
44
46
|
export * from "./plan.js";
|
|
45
47
|
export * from "./price.js";
|
|
@@ -47,11 +49,15 @@ export * from "./pricefeature.js";
|
|
|
47
49
|
export * from "./pricefeatureinput.js";
|
|
48
50
|
export * from "./pricepropertiesunion.js";
|
|
49
51
|
export * from "./product.js";
|
|
52
|
+
export * from "./profitabilityrow.js";
|
|
53
|
+
export * from "./profitabilitysummaryresponse.js";
|
|
54
|
+
export * from "./profitabilitytrend.js";
|
|
50
55
|
export * from "./purchasegrantrequest.js";
|
|
51
56
|
export * from "./purchasegrantresponse.js";
|
|
52
57
|
export * from "./revenuesummaryresponse.js";
|
|
53
58
|
export * from "./revenuetrendbucket.js";
|
|
54
59
|
export * from "./rulecondition.js";
|
|
60
|
+
export * from "./schemaspaymentsession.js";
|
|
55
61
|
export * from "./schemasprice.js";
|
|
56
62
|
export * from "./security.js";
|
|
57
63
|
export * from "./source.js";
|
|
@@ -12,17 +12,17 @@ import { SDKValidationError } from "./errors/sdkvalidationerror.js";
|
|
|
12
12
|
*/
|
|
13
13
|
export type OffsetPagination = {
|
|
14
14
|
/**
|
|
15
|
-
*
|
|
15
|
+
* Requested page size.
|
|
16
16
|
*/
|
|
17
|
-
limit
|
|
17
|
+
limit: number;
|
|
18
18
|
/**
|
|
19
19
|
* Number of items skipped.
|
|
20
20
|
*/
|
|
21
|
-
offset
|
|
21
|
+
offset: number;
|
|
22
22
|
/**
|
|
23
23
|
* Total number of items available.
|
|
24
24
|
*/
|
|
25
|
-
total
|
|
25
|
+
total: number;
|
|
26
26
|
};
|
|
27
27
|
|
|
28
28
|
/** @internal */
|
|
@@ -31,9 +31,9 @@ export const OffsetPagination$inboundSchema: z.ZodType<
|
|
|
31
31
|
z.ZodTypeDef,
|
|
32
32
|
unknown
|
|
33
33
|
> = z.object({
|
|
34
|
-
limit: z.number().int()
|
|
35
|
-
offset: z.number().int()
|
|
36
|
-
total: z.number().int()
|
|
34
|
+
limit: z.number().int(),
|
|
35
|
+
offset: z.number().int(),
|
|
36
|
+
total: z.number().int(),
|
|
37
37
|
});
|
|
38
38
|
|
|
39
39
|
export function offsetPaginationFromJSON(
|