@moovio/sdk 0.22.21 → 0.23.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/README.md +53 -61
- package/bin/mcp-server.js +1503 -1185
- package/bin/mcp-server.js.map +43 -41
- package/examples/package-lock.json +4 -4
- package/jsr.json +1 -1
- package/lib/config.d.ts +3 -3
- package/lib/config.js +3 -3
- package/lib/config.js.map +1 -1
- package/mcp-server/mcp-server.js +1 -1
- package/mcp-server/mcp-server.js.map +1 -1
- package/mcp-server/server.d.ts.map +1 -1
- package/mcp-server/server.js +1 -3
- package/mcp-server/server.js.map +1 -1
- package/models/components/createinvoicelineitem.d.ts +7 -3
- package/models/components/createinvoicelineitem.d.ts.map +1 -1
- package/models/components/createinvoicelineitem.js +3 -2
- package/models/components/createinvoicelineitem.js.map +1 -1
- package/models/components/createinvoicelineitemimage.d.ts +23 -0
- package/models/components/createinvoicelineitemimage.d.ts.map +1 -0
- package/models/components/createinvoicelineitemimage.js +58 -0
- package/models/components/createinvoicelineitemimage.js.map +1 -0
- package/models/components/createinvoicelineitemimagevalidationerror.d.ts +17 -0
- package/models/components/createinvoicelineitemimagevalidationerror.d.ts.map +1 -0
- package/models/components/createinvoicelineitemimagevalidationerror.js +58 -0
- package/models/components/createinvoicelineitemimagevalidationerror.js.map +1 -0
- package/models/components/createinvoicelineitemoption.d.ts +4 -3
- package/models/components/createinvoicelineitemoption.d.ts.map +1 -1
- package/models/components/createinvoicelineitemoption.js +3 -2
- package/models/components/createinvoicelineitemoption.js.map +1 -1
- package/models/components/createinvoicelineitemoptionvalidationerror.d.ts +7 -0
- package/models/components/createinvoicelineitemoptionvalidationerror.d.ts.map +1 -1
- package/models/components/createinvoicelineitemoptionvalidationerror.js +5 -0
- package/models/components/createinvoicelineitemoptionvalidationerror.js.map +1 -1
- package/models/components/createinvoicelineitemvalidationerror.d.ts +7 -0
- package/models/components/createinvoicelineitemvalidationerror.d.ts.map +1 -1
- package/models/components/createinvoicelineitemvalidationerror.js +5 -0
- package/models/components/createinvoicelineitemvalidationerror.js.map +1 -1
- package/models/components/createpaymentlinklineitem.d.ts +10 -2
- package/models/components/createpaymentlinklineitem.d.ts.map +1 -1
- package/models/components/createpaymentlinklineitem.js.map +1 -1
- package/models/components/createpaymentlinklineitemoption.d.ts +6 -1
- package/models/components/createpaymentlinklineitemoption.d.ts.map +1 -1
- package/models/components/createpaymentlinklineitemoption.js.map +1 -1
- package/models/components/createscheduledtransferlineitem.d.ts +4 -1
- package/models/components/createscheduledtransferlineitem.d.ts.map +1 -1
- package/models/components/createscheduledtransferlineitem.js.map +1 -1
- package/models/components/createtransferlineitem.d.ts +4 -1
- package/models/components/createtransferlineitem.d.ts.map +1 -1
- package/models/components/createtransferlineitem.js.map +1 -1
- package/models/components/incurredfee.d.ts +22 -1
- package/models/components/incurredfee.d.ts.map +1 -1
- package/models/components/incurredfee.js.map +1 -1
- package/models/components/index.d.ts +3 -1
- package/models/components/index.d.ts.map +1 -1
- package/models/components/index.js +3 -1
- package/models/components/index.js.map +1 -1
- package/models/components/invoicelineitem.d.ts +4 -1
- package/models/components/invoicelineitem.d.ts.map +1 -1
- package/models/components/invoicelineitem.js.map +1 -1
- package/models/components/invoicelineitemimagevalidationerror.d.ts +17 -0
- package/models/components/invoicelineitemimagevalidationerror.d.ts.map +1 -0
- package/{mcp-server/tools/feePlansListPartnerPricing.js → models/components/invoicelineitemimagevalidationerror.js} +20 -27
- package/models/components/invoicelineitemimagevalidationerror.js.map +1 -0
- package/models/components/invoicelineitemoptionvalidationerror.d.ts +7 -0
- package/models/components/invoicelineitemoptionvalidationerror.d.ts.map +1 -1
- package/models/components/invoicelineitemoptionvalidationerror.js +5 -0
- package/models/components/invoicelineitemoptionvalidationerror.js.map +1 -1
- package/models/components/invoicelineitemvalidationerror.d.ts +7 -0
- package/models/components/invoicelineitemvalidationerror.d.ts.map +1 -1
- package/models/components/invoicelineitemvalidationerror.js +5 -0
- package/models/components/invoicelineitemvalidationerror.js.map +1 -1
- package/models/components/residual.d.ts +31 -7
- package/models/components/residual.d.ts.map +1 -1
- package/models/components/residual.js +0 -2
- package/models/components/residual.js.map +1 -1
- package/models/operations/getresidual.d.ts +3 -0
- package/models/operations/getresidual.d.ts.map +1 -1
- package/models/operations/getresidual.js.map +1 -1
- package/models/operations/index.d.ts +0 -1
- package/models/operations/index.d.ts.map +1 -1
- package/models/operations/index.js +0 -1
- package/models/operations/index.js.map +1 -1
- package/models/operations/listresidualfees.d.ts +3 -0
- package/models/operations/listresidualfees.d.ts.map +1 -1
- package/models/operations/listresidualfees.js.map +1 -1
- package/package.json +4 -4
- package/sdk/feeplans.d.ts +0 -7
- package/sdk/feeplans.d.ts.map +1 -1
- package/sdk/feeplans.js +0 -10
- package/sdk/feeplans.js.map +1 -1
- package/src/lib/config.ts +3 -3
- package/src/mcp-server/mcp-server.ts +1 -1
- package/src/mcp-server/server.ts +1 -3
- package/src/models/components/createinvoicelineitem.ts +14 -5
- package/src/models/components/createinvoicelineitemimage.ts +57 -0
- package/src/models/components/createinvoicelineitemimagevalidationerror.ts +61 -0
- package/src/models/components/createinvoicelineitemoption.ts +11 -5
- package/src/models/components/createinvoicelineitemoptionvalidationerror.ts +16 -0
- package/src/models/components/createinvoicelineitemvalidationerror.ts +16 -0
- package/src/models/components/createpaymentlinklineitem.ts +10 -2
- package/src/models/components/createpaymentlinklineitemoption.ts +6 -1
- package/src/models/components/createscheduledtransferlineitem.ts +4 -1
- package/src/models/components/createtransferlineitem.ts +4 -1
- package/src/models/components/incurredfee.ts +22 -1
- package/src/models/components/index.ts +3 -1
- package/src/models/components/invoicelineitem.ts +4 -1
- package/src/models/components/invoicelineitemimagevalidationerror.ts +54 -0
- package/src/models/components/invoicelineitemoptionvalidationerror.ts +14 -0
- package/src/models/components/invoicelineitemvalidationerror.ts +14 -0
- package/src/models/components/residual.ts +31 -9
- package/src/models/operations/getresidual.ts +3 -0
- package/src/models/operations/index.ts +0 -1
- package/src/models/operations/listresidualfees.ts +3 -0
- package/src/sdk/feeplans.ts +0 -18
- package/funcs/feePlansListPartnerPricing.d.ts +0 -17
- package/funcs/feePlansListPartnerPricing.d.ts.map +0 -1
- package/funcs/feePlansListPartnerPricing.js +0 -129
- package/funcs/feePlansListPartnerPricing.js.map +0 -1
- package/mcp-server/tools/feePlansListPartnerPricing.d.ts +0 -8
- package/mcp-server/tools/feePlansListPartnerPricing.d.ts.map +0 -1
- package/mcp-server/tools/feePlansListPartnerPricing.js.map +0 -1
- package/models/components/partnerpricing.d.ts +0 -59
- package/models/components/partnerpricing.d.ts.map +0 -1
- package/models/components/partnerpricing.js +0 -78
- package/models/components/partnerpricing.js.map +0 -1
- package/models/operations/listpartnerpricing.d.ts +0 -69
- package/models/operations/listpartnerpricing.d.ts.map +0 -1
- package/models/operations/listpartnerpricing.js +0 -114
- package/models/operations/listpartnerpricing.js.map +0 -1
- package/src/funcs/feePlansListPartnerPricing.ts +0 -184
- package/src/mcp-server/tools/feePlansListPartnerPricing.ts +0 -38
- package/src/models/components/partnerpricing.ts +0 -124
- package/src/models/operations/listpartnerpricing.ts +0 -182
|
@@ -1,184 +0,0 @@
|
|
|
1
|
-
/*
|
|
2
|
-
* Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.
|
|
3
|
-
*/
|
|
4
|
-
|
|
5
|
-
import { MoovCore } from "../core.js";
|
|
6
|
-
import { encodeFormQuery, 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 { MoovError } from "../models/errors/mooverror.js";
|
|
21
|
-
import { ResponseValidationError } from "../models/errors/responsevalidationerror.js";
|
|
22
|
-
import { SDKValidationError } from "../models/errors/sdkvalidationerror.js";
|
|
23
|
-
import * as operations from "../models/operations/index.js";
|
|
24
|
-
import { APICall, APIPromise } from "../types/async.js";
|
|
25
|
-
import { Result } from "../types/fp.js";
|
|
26
|
-
|
|
27
|
-
/**
|
|
28
|
-
* List all partner pricing plans available for use by an account.
|
|
29
|
-
*
|
|
30
|
-
* To access this endpoint using an [access token](https://docs.moov.io/api/authentication/access-tokens/)
|
|
31
|
-
* you'll need to specify the `/accounts/{accountID}/profile.read` scope.
|
|
32
|
-
*/
|
|
33
|
-
export function feePlansListPartnerPricing(
|
|
34
|
-
client: MoovCore,
|
|
35
|
-
request: operations.ListPartnerPricingRequest,
|
|
36
|
-
options?: RequestOptions,
|
|
37
|
-
): APIPromise<
|
|
38
|
-
Result<
|
|
39
|
-
operations.ListPartnerPricingResponse,
|
|
40
|
-
| MoovError
|
|
41
|
-
| ResponseValidationError
|
|
42
|
-
| ConnectionError
|
|
43
|
-
| RequestAbortedError
|
|
44
|
-
| RequestTimeoutError
|
|
45
|
-
| InvalidRequestError
|
|
46
|
-
| UnexpectedClientError
|
|
47
|
-
| SDKValidationError
|
|
48
|
-
>
|
|
49
|
-
> {
|
|
50
|
-
return new APIPromise($do(
|
|
51
|
-
client,
|
|
52
|
-
request,
|
|
53
|
-
options,
|
|
54
|
-
));
|
|
55
|
-
}
|
|
56
|
-
|
|
57
|
-
async function $do(
|
|
58
|
-
client: MoovCore,
|
|
59
|
-
request: operations.ListPartnerPricingRequest,
|
|
60
|
-
options?: RequestOptions,
|
|
61
|
-
): Promise<
|
|
62
|
-
[
|
|
63
|
-
Result<
|
|
64
|
-
operations.ListPartnerPricingResponse,
|
|
65
|
-
| MoovError
|
|
66
|
-
| ResponseValidationError
|
|
67
|
-
| ConnectionError
|
|
68
|
-
| RequestAbortedError
|
|
69
|
-
| RequestTimeoutError
|
|
70
|
-
| InvalidRequestError
|
|
71
|
-
| UnexpectedClientError
|
|
72
|
-
| SDKValidationError
|
|
73
|
-
>,
|
|
74
|
-
APICall,
|
|
75
|
-
]
|
|
76
|
-
> {
|
|
77
|
-
const parsed = safeParse(
|
|
78
|
-
request,
|
|
79
|
-
(value) => operations.ListPartnerPricingRequest$outboundSchema.parse(value),
|
|
80
|
-
"Input validation failed",
|
|
81
|
-
);
|
|
82
|
-
if (!parsed.ok) {
|
|
83
|
-
return [parsed, { status: "invalid" }];
|
|
84
|
-
}
|
|
85
|
-
const payload = parsed.value;
|
|
86
|
-
const body = null;
|
|
87
|
-
|
|
88
|
-
const pathParams = {
|
|
89
|
-
accountID: encodeSimple("accountID", payload.accountID, {
|
|
90
|
-
explode: false,
|
|
91
|
-
charEncoding: "percent",
|
|
92
|
-
}),
|
|
93
|
-
};
|
|
94
|
-
|
|
95
|
-
const path = pathToFunc("/accounts/{accountID}/partner-pricing")(pathParams);
|
|
96
|
-
|
|
97
|
-
const query = encodeFormQuery({
|
|
98
|
-
"planIDs": payload.planIDs,
|
|
99
|
-
}, { explode: false });
|
|
100
|
-
|
|
101
|
-
const headers = new Headers(compactMap({
|
|
102
|
-
Accept: "application/json",
|
|
103
|
-
"X-Moov-Version": encodeSimple(
|
|
104
|
-
"X-Moov-Version",
|
|
105
|
-
client._options.xMoovVersion,
|
|
106
|
-
{ explode: false, charEncoding: "none" },
|
|
107
|
-
),
|
|
108
|
-
}));
|
|
109
|
-
|
|
110
|
-
const securityInput = await extractSecurity(client._options.security);
|
|
111
|
-
const requestSecurity = resolveGlobalSecurity(securityInput);
|
|
112
|
-
|
|
113
|
-
const context = {
|
|
114
|
-
options: client._options,
|
|
115
|
-
baseURL: options?.serverURL ?? client._baseURL ?? "",
|
|
116
|
-
operationID: "listPartnerPricing",
|
|
117
|
-
oAuth2Scopes: null,
|
|
118
|
-
|
|
119
|
-
resolvedSecurity: requestSecurity,
|
|
120
|
-
|
|
121
|
-
securitySource: client._options.security,
|
|
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: ["401", "403", "429", "4XX", "500", "504", "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
|
-
operations.ListPartnerPricingResponse,
|
|
161
|
-
| MoovError
|
|
162
|
-
| ResponseValidationError
|
|
163
|
-
| ConnectionError
|
|
164
|
-
| RequestAbortedError
|
|
165
|
-
| RequestTimeoutError
|
|
166
|
-
| InvalidRequestError
|
|
167
|
-
| UnexpectedClientError
|
|
168
|
-
| SDKValidationError
|
|
169
|
-
>(
|
|
170
|
-
M.json(200, operations.ListPartnerPricingResponse$inboundSchema, {
|
|
171
|
-
hdrs: true,
|
|
172
|
-
key: "Result",
|
|
173
|
-
}),
|
|
174
|
-
M.fail([401, 403, 429]),
|
|
175
|
-
M.fail([500, 504]),
|
|
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
|
-
}
|
|
@@ -1,38 +0,0 @@
|
|
|
1
|
-
/*
|
|
2
|
-
* Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.
|
|
3
|
-
*/
|
|
4
|
-
|
|
5
|
-
import { feePlansListPartnerPricing } from "../../funcs/feePlansListPartnerPricing.js";
|
|
6
|
-
import * as operations from "../../models/operations/index.js";
|
|
7
|
-
import { formatResult, ToolDefinition } from "../tools.js";
|
|
8
|
-
|
|
9
|
-
const args = {
|
|
10
|
-
request: operations.ListPartnerPricingRequest$inboundSchema,
|
|
11
|
-
};
|
|
12
|
-
|
|
13
|
-
export const tool$feePlansListPartnerPricing: ToolDefinition<typeof args> = {
|
|
14
|
-
name: "fee-plans-list-partner-pricing",
|
|
15
|
-
description: `List all partner pricing plans available for use by an account.
|
|
16
|
-
|
|
17
|
-
To access this endpoint using an [access token](https://docs.moov.io/api/authentication/access-tokens/)
|
|
18
|
-
you'll need to specify the \`/accounts/{accountID}/profile.read\` scope.`,
|
|
19
|
-
args,
|
|
20
|
-
tool: async (client, args, ctx) => {
|
|
21
|
-
const [result, apiCall] = await feePlansListPartnerPricing(
|
|
22
|
-
client,
|
|
23
|
-
args.request,
|
|
24
|
-
{ fetchOptions: { signal: ctx.signal } },
|
|
25
|
-
).$inspect();
|
|
26
|
-
|
|
27
|
-
if (!result.ok) {
|
|
28
|
-
return {
|
|
29
|
-
content: [{ type: "text", text: result.error.message }],
|
|
30
|
-
isError: true,
|
|
31
|
-
};
|
|
32
|
-
}
|
|
33
|
-
|
|
34
|
-
const value = result.value.result;
|
|
35
|
-
|
|
36
|
-
return formatResult(value, apiCall);
|
|
37
|
-
},
|
|
38
|
-
};
|
|
@@ -1,124 +0,0 @@
|
|
|
1
|
-
/*
|
|
2
|
-
* Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.
|
|
3
|
-
*/
|
|
4
|
-
|
|
5
|
-
import * as z from "zod/v3";
|
|
6
|
-
import { safeParse } from "../../lib/schemas.js";
|
|
7
|
-
import { Result as SafeParseResult } from "../../types/fp.js";
|
|
8
|
-
import { SDKValidationError } from "../errors/sdkvalidationerror.js";
|
|
9
|
-
import {
|
|
10
|
-
BillableFee,
|
|
11
|
-
BillableFee$inboundSchema,
|
|
12
|
-
BillableFee$Outbound,
|
|
13
|
-
BillableFee$outboundSchema,
|
|
14
|
-
} from "./billablefee.js";
|
|
15
|
-
import {
|
|
16
|
-
CardAcquiringModel,
|
|
17
|
-
CardAcquiringModel$inboundSchema,
|
|
18
|
-
CardAcquiringModel$outboundSchema,
|
|
19
|
-
} from "./cardacquiringmodel.js";
|
|
20
|
-
import {
|
|
21
|
-
MinimumCommitment,
|
|
22
|
-
MinimumCommitment$inboundSchema,
|
|
23
|
-
MinimumCommitment$Outbound,
|
|
24
|
-
MinimumCommitment$outboundSchema,
|
|
25
|
-
} from "./minimumcommitment.js";
|
|
26
|
-
import {
|
|
27
|
-
MonthlyPlatformFee,
|
|
28
|
-
MonthlyPlatformFee$inboundSchema,
|
|
29
|
-
MonthlyPlatformFee$Outbound,
|
|
30
|
-
MonthlyPlatformFee$outboundSchema,
|
|
31
|
-
} from "./monthlyplatformfee.js";
|
|
32
|
-
|
|
33
|
-
export type PartnerPricing = {
|
|
34
|
-
planID: string;
|
|
35
|
-
/**
|
|
36
|
-
* The name of the partner pricing plan.
|
|
37
|
-
*/
|
|
38
|
-
name: string;
|
|
39
|
-
/**
|
|
40
|
-
* A description of the fee plan.
|
|
41
|
-
*/
|
|
42
|
-
description?: string | undefined;
|
|
43
|
-
/**
|
|
44
|
-
* The decimal-formatted numerical string of the revenue split for partner.
|
|
45
|
-
*
|
|
46
|
-
* @remarks
|
|
47
|
-
*
|
|
48
|
-
* For example, 2.25% is '2.25'.
|
|
49
|
-
*/
|
|
50
|
-
revenueShare: string;
|
|
51
|
-
/**
|
|
52
|
-
* Specifies the card processing pricing model
|
|
53
|
-
*/
|
|
54
|
-
cardAcquiringModel: CardAcquiringModel;
|
|
55
|
-
billableFees: Array<BillableFee>;
|
|
56
|
-
/**
|
|
57
|
-
* The minimum spending amount that must be met in the billing period. If actual usage is below the minimum amount, account is charged the difference.
|
|
58
|
-
*/
|
|
59
|
-
minimumCommitment: MinimumCommitment;
|
|
60
|
-
/**
|
|
61
|
-
* Fixed recurring amount paid in the billing period regardless of usage.
|
|
62
|
-
*/
|
|
63
|
-
monthlyPlatformFee: MonthlyPlatformFee;
|
|
64
|
-
createdAt: Date;
|
|
65
|
-
};
|
|
66
|
-
|
|
67
|
-
/** @internal */
|
|
68
|
-
export const PartnerPricing$inboundSchema: z.ZodType<
|
|
69
|
-
PartnerPricing,
|
|
70
|
-
z.ZodTypeDef,
|
|
71
|
-
unknown
|
|
72
|
-
> = z.object({
|
|
73
|
-
planID: z.string(),
|
|
74
|
-
name: z.string(),
|
|
75
|
-
description: z.string().optional(),
|
|
76
|
-
revenueShare: z.string(),
|
|
77
|
-
cardAcquiringModel: CardAcquiringModel$inboundSchema,
|
|
78
|
-
billableFees: z.array(BillableFee$inboundSchema),
|
|
79
|
-
minimumCommitment: MinimumCommitment$inboundSchema,
|
|
80
|
-
monthlyPlatformFee: MonthlyPlatformFee$inboundSchema,
|
|
81
|
-
createdAt: z.string().datetime({ offset: true }).transform(v => new Date(v)),
|
|
82
|
-
});
|
|
83
|
-
/** @internal */
|
|
84
|
-
export type PartnerPricing$Outbound = {
|
|
85
|
-
planID: string;
|
|
86
|
-
name: string;
|
|
87
|
-
description?: string | undefined;
|
|
88
|
-
revenueShare: string;
|
|
89
|
-
cardAcquiringModel: string;
|
|
90
|
-
billableFees: Array<BillableFee$Outbound>;
|
|
91
|
-
minimumCommitment: MinimumCommitment$Outbound;
|
|
92
|
-
monthlyPlatformFee: MonthlyPlatformFee$Outbound;
|
|
93
|
-
createdAt: string;
|
|
94
|
-
};
|
|
95
|
-
|
|
96
|
-
/** @internal */
|
|
97
|
-
export const PartnerPricing$outboundSchema: z.ZodType<
|
|
98
|
-
PartnerPricing$Outbound,
|
|
99
|
-
z.ZodTypeDef,
|
|
100
|
-
PartnerPricing
|
|
101
|
-
> = z.object({
|
|
102
|
-
planID: z.string(),
|
|
103
|
-
name: z.string(),
|
|
104
|
-
description: z.string().optional(),
|
|
105
|
-
revenueShare: z.string(),
|
|
106
|
-
cardAcquiringModel: CardAcquiringModel$outboundSchema,
|
|
107
|
-
billableFees: z.array(BillableFee$outboundSchema),
|
|
108
|
-
minimumCommitment: MinimumCommitment$outboundSchema,
|
|
109
|
-
monthlyPlatformFee: MonthlyPlatformFee$outboundSchema,
|
|
110
|
-
createdAt: z.date().transform(v => v.toISOString()),
|
|
111
|
-
});
|
|
112
|
-
|
|
113
|
-
export function partnerPricingToJSON(partnerPricing: PartnerPricing): string {
|
|
114
|
-
return JSON.stringify(PartnerPricing$outboundSchema.parse(partnerPricing));
|
|
115
|
-
}
|
|
116
|
-
export function partnerPricingFromJSON(
|
|
117
|
-
jsonString: string,
|
|
118
|
-
): SafeParseResult<PartnerPricing, SDKValidationError> {
|
|
119
|
-
return safeParse(
|
|
120
|
-
jsonString,
|
|
121
|
-
(x) => PartnerPricing$inboundSchema.parse(JSON.parse(x)),
|
|
122
|
-
`Failed to parse 'PartnerPricing' from JSON`,
|
|
123
|
-
);
|
|
124
|
-
}
|
|
@@ -1,182 +0,0 @@
|
|
|
1
|
-
/*
|
|
2
|
-
* Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.
|
|
3
|
-
*/
|
|
4
|
-
|
|
5
|
-
import * as z from "zod/v3";
|
|
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 components from "../components/index.js";
|
|
10
|
-
import { SDKValidationError } from "../errors/sdkvalidationerror.js";
|
|
11
|
-
|
|
12
|
-
export type ListPartnerPricingGlobals = {
|
|
13
|
-
/**
|
|
14
|
-
* Specify an API version.
|
|
15
|
-
*
|
|
16
|
-
* @remarks
|
|
17
|
-
*
|
|
18
|
-
* API versioning follows the format `vYYYY.QQ.BB`, where
|
|
19
|
-
* - `YYYY` is the year
|
|
20
|
-
* - `QQ` is the two-digit month for the first month of the quarter (e.g., 01, 04, 07, 10)
|
|
21
|
-
* - `BB` is the build number, starting at `.01`, for subsequent builds in the same quarter.
|
|
22
|
-
* - For example, `v2024.01.00` is the initial release of the first quarter of 2024.
|
|
23
|
-
*
|
|
24
|
-
* The `latest` version represents the most recent development state. It may include breaking changes and should be treated as a beta release.
|
|
25
|
-
* When no version is specified, the API defaults to `v2024.01.00`.
|
|
26
|
-
*/
|
|
27
|
-
xMoovVersion?: string | undefined;
|
|
28
|
-
};
|
|
29
|
-
|
|
30
|
-
export type ListPartnerPricingRequest = {
|
|
31
|
-
accountID: string;
|
|
32
|
-
/**
|
|
33
|
-
* A comma-separated list of plan IDs to filter the results by.
|
|
34
|
-
*/
|
|
35
|
-
planIDs?: Array<string> | undefined;
|
|
36
|
-
};
|
|
37
|
-
|
|
38
|
-
export type ListPartnerPricingResponse = {
|
|
39
|
-
headers: { [k: string]: Array<string> };
|
|
40
|
-
result: Array<components.PartnerPricing>;
|
|
41
|
-
};
|
|
42
|
-
|
|
43
|
-
/** @internal */
|
|
44
|
-
export const ListPartnerPricingGlobals$inboundSchema: z.ZodType<
|
|
45
|
-
ListPartnerPricingGlobals,
|
|
46
|
-
z.ZodTypeDef,
|
|
47
|
-
unknown
|
|
48
|
-
> = z.object({
|
|
49
|
-
"X-Moov-Version": z.string().optional(),
|
|
50
|
-
}).transform((v) => {
|
|
51
|
-
return remap$(v, {
|
|
52
|
-
"X-Moov-Version": "xMoovVersion",
|
|
53
|
-
});
|
|
54
|
-
});
|
|
55
|
-
/** @internal */
|
|
56
|
-
export type ListPartnerPricingGlobals$Outbound = {
|
|
57
|
-
"X-Moov-Version"?: string | undefined;
|
|
58
|
-
};
|
|
59
|
-
|
|
60
|
-
/** @internal */
|
|
61
|
-
export const ListPartnerPricingGlobals$outboundSchema: z.ZodType<
|
|
62
|
-
ListPartnerPricingGlobals$Outbound,
|
|
63
|
-
z.ZodTypeDef,
|
|
64
|
-
ListPartnerPricingGlobals
|
|
65
|
-
> = z.object({
|
|
66
|
-
xMoovVersion: z.string().optional(),
|
|
67
|
-
}).transform((v) => {
|
|
68
|
-
return remap$(v, {
|
|
69
|
-
xMoovVersion: "X-Moov-Version",
|
|
70
|
-
});
|
|
71
|
-
});
|
|
72
|
-
|
|
73
|
-
export function listPartnerPricingGlobalsToJSON(
|
|
74
|
-
listPartnerPricingGlobals: ListPartnerPricingGlobals,
|
|
75
|
-
): string {
|
|
76
|
-
return JSON.stringify(
|
|
77
|
-
ListPartnerPricingGlobals$outboundSchema.parse(listPartnerPricingGlobals),
|
|
78
|
-
);
|
|
79
|
-
}
|
|
80
|
-
export function listPartnerPricingGlobalsFromJSON(
|
|
81
|
-
jsonString: string,
|
|
82
|
-
): SafeParseResult<ListPartnerPricingGlobals, SDKValidationError> {
|
|
83
|
-
return safeParse(
|
|
84
|
-
jsonString,
|
|
85
|
-
(x) => ListPartnerPricingGlobals$inboundSchema.parse(JSON.parse(x)),
|
|
86
|
-
`Failed to parse 'ListPartnerPricingGlobals' from JSON`,
|
|
87
|
-
);
|
|
88
|
-
}
|
|
89
|
-
|
|
90
|
-
/** @internal */
|
|
91
|
-
export const ListPartnerPricingRequest$inboundSchema: z.ZodType<
|
|
92
|
-
ListPartnerPricingRequest,
|
|
93
|
-
z.ZodTypeDef,
|
|
94
|
-
unknown
|
|
95
|
-
> = z.object({
|
|
96
|
-
accountID: z.string(),
|
|
97
|
-
planIDs: z.array(z.string()).optional(),
|
|
98
|
-
});
|
|
99
|
-
/** @internal */
|
|
100
|
-
export type ListPartnerPricingRequest$Outbound = {
|
|
101
|
-
accountID: string;
|
|
102
|
-
planIDs?: Array<string> | undefined;
|
|
103
|
-
};
|
|
104
|
-
|
|
105
|
-
/** @internal */
|
|
106
|
-
export const ListPartnerPricingRequest$outboundSchema: z.ZodType<
|
|
107
|
-
ListPartnerPricingRequest$Outbound,
|
|
108
|
-
z.ZodTypeDef,
|
|
109
|
-
ListPartnerPricingRequest
|
|
110
|
-
> = z.object({
|
|
111
|
-
accountID: z.string(),
|
|
112
|
-
planIDs: z.array(z.string()).optional(),
|
|
113
|
-
});
|
|
114
|
-
|
|
115
|
-
export function listPartnerPricingRequestToJSON(
|
|
116
|
-
listPartnerPricingRequest: ListPartnerPricingRequest,
|
|
117
|
-
): string {
|
|
118
|
-
return JSON.stringify(
|
|
119
|
-
ListPartnerPricingRequest$outboundSchema.parse(listPartnerPricingRequest),
|
|
120
|
-
);
|
|
121
|
-
}
|
|
122
|
-
export function listPartnerPricingRequestFromJSON(
|
|
123
|
-
jsonString: string,
|
|
124
|
-
): SafeParseResult<ListPartnerPricingRequest, SDKValidationError> {
|
|
125
|
-
return safeParse(
|
|
126
|
-
jsonString,
|
|
127
|
-
(x) => ListPartnerPricingRequest$inboundSchema.parse(JSON.parse(x)),
|
|
128
|
-
`Failed to parse 'ListPartnerPricingRequest' from JSON`,
|
|
129
|
-
);
|
|
130
|
-
}
|
|
131
|
-
|
|
132
|
-
/** @internal */
|
|
133
|
-
export const ListPartnerPricingResponse$inboundSchema: z.ZodType<
|
|
134
|
-
ListPartnerPricingResponse,
|
|
135
|
-
z.ZodTypeDef,
|
|
136
|
-
unknown
|
|
137
|
-
> = z.object({
|
|
138
|
-
Headers: z.record(z.array(z.string())).default({}),
|
|
139
|
-
Result: z.array(components.PartnerPricing$inboundSchema),
|
|
140
|
-
}).transform((v) => {
|
|
141
|
-
return remap$(v, {
|
|
142
|
-
"Headers": "headers",
|
|
143
|
-
"Result": "result",
|
|
144
|
-
});
|
|
145
|
-
});
|
|
146
|
-
/** @internal */
|
|
147
|
-
export type ListPartnerPricingResponse$Outbound = {
|
|
148
|
-
Headers: { [k: string]: Array<string> };
|
|
149
|
-
Result: Array<components.PartnerPricing$Outbound>;
|
|
150
|
-
};
|
|
151
|
-
|
|
152
|
-
/** @internal */
|
|
153
|
-
export const ListPartnerPricingResponse$outboundSchema: z.ZodType<
|
|
154
|
-
ListPartnerPricingResponse$Outbound,
|
|
155
|
-
z.ZodTypeDef,
|
|
156
|
-
ListPartnerPricingResponse
|
|
157
|
-
> = z.object({
|
|
158
|
-
headers: z.record(z.array(z.string())),
|
|
159
|
-
result: z.array(components.PartnerPricing$outboundSchema),
|
|
160
|
-
}).transform((v) => {
|
|
161
|
-
return remap$(v, {
|
|
162
|
-
headers: "Headers",
|
|
163
|
-
result: "Result",
|
|
164
|
-
});
|
|
165
|
-
});
|
|
166
|
-
|
|
167
|
-
export function listPartnerPricingResponseToJSON(
|
|
168
|
-
listPartnerPricingResponse: ListPartnerPricingResponse,
|
|
169
|
-
): string {
|
|
170
|
-
return JSON.stringify(
|
|
171
|
-
ListPartnerPricingResponse$outboundSchema.parse(listPartnerPricingResponse),
|
|
172
|
-
);
|
|
173
|
-
}
|
|
174
|
-
export function listPartnerPricingResponseFromJSON(
|
|
175
|
-
jsonString: string,
|
|
176
|
-
): SafeParseResult<ListPartnerPricingResponse, SDKValidationError> {
|
|
177
|
-
return safeParse(
|
|
178
|
-
jsonString,
|
|
179
|
-
(x) => ListPartnerPricingResponse$inboundSchema.parse(JSON.parse(x)),
|
|
180
|
-
`Failed to parse 'ListPartnerPricingResponse' from JSON`,
|
|
181
|
-
);
|
|
182
|
-
}
|