@moovio/sdk 0.6.0 → 0.6.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 +38 -8
- package/bin/mcp-server.js +1122 -258
- package/bin/mcp-server.js.map +28 -11
- package/docs/sdks/receipts/README.md +189 -0
- package/docs/sdks/transfers/README.md +185 -0
- package/funcs/receiptsCreate.d.ts +18 -0
- package/funcs/receiptsCreate.d.ts.map +1 -0
- package/funcs/receiptsCreate.js +133 -0
- package/funcs/receiptsCreate.js.map +1 -0
- package/funcs/receiptsList.d.ts +16 -0
- package/funcs/receiptsList.d.ts.map +1 -0
- package/funcs/receiptsList.js +121 -0
- package/funcs/receiptsList.js.map +1 -0
- package/funcs/transfersCreateCancellation.d.ts +17 -0
- package/funcs/transfersCreateCancellation.d.ts.map +1 -0
- package/funcs/transfersCreateCancellation.js +128 -0
- package/funcs/transfersCreateCancellation.js.map +1 -0
- package/funcs/transfersGetCancellation.d.ts +16 -0
- package/funcs/transfersGetCancellation.d.ts.map +1 -0
- package/funcs/transfersGetCancellation.js +131 -0
- package/funcs/transfersGetCancellation.js.map +1 -0
- package/jsr.json +1 -1
- package/lib/config.d.ts +3 -3
- package/lib/config.js +3 -3
- package/mcp-server/mcp-server.js +1 -1
- package/mcp-server/server.d.ts.map +1 -1
- package/mcp-server/server.js +9 -1
- package/mcp-server/server.js.map +1 -1
- package/mcp-server/tools/receiptsCreate.d.ts +9 -0
- package/mcp-server/tools/receiptsCreate.d.ts.map +1 -0
- package/mcp-server/tools/receiptsCreate.js +66 -0
- package/mcp-server/tools/receiptsCreate.js.map +1 -0
- package/mcp-server/tools/receiptsList.d.ts +8 -0
- package/mcp-server/tools/receiptsList.d.ts.map +1 -0
- package/mcp-server/tools/receiptsList.js +65 -0
- package/mcp-server/tools/receiptsList.js.map +1 -0
- package/mcp-server/tools/transfersCreateCancellation.d.ts +8 -0
- package/mcp-server/tools/transfersCreateCancellation.d.ts.map +1 -0
- package/mcp-server/tools/transfersCreateCancellation.js +65 -0
- package/mcp-server/tools/transfersCreateCancellation.js.map +1 -0
- package/mcp-server/tools/transfersGetCancellation.d.ts +8 -0
- package/mcp-server/tools/transfersGetCancellation.d.ts.map +1 -0
- package/mcp-server/tools/transfersGetCancellation.js +65 -0
- package/mcp-server/tools/transfersGetCancellation.js.map +1 -0
- package/models/components/index.d.ts +4 -0
- package/models/components/index.d.ts.map +1 -1
- package/models/components/index.js +4 -0
- package/models/components/index.js.map +1 -1
- package/models/components/receiptkind.d.ts +31 -0
- package/models/components/receiptkind.d.ts.map +1 -0
- package/models/components/receiptkind.js +63 -0
- package/models/components/receiptkind.js.map +1 -0
- package/models/components/receiptrequest.d.ts +76 -0
- package/models/components/receiptrequest.d.ts.map +1 -0
- package/models/components/receiptrequest.js +80 -0
- package/models/components/receiptrequest.js.map +1 -0
- package/models/components/receiptresponse.d.ts +94 -0
- package/models/components/receiptresponse.d.ts.map +1 -0
- package/models/components/receiptresponse.js +90 -0
- package/models/components/receiptresponse.js.map +1 -0
- package/models/components/sentreceipt.d.ts +42 -0
- package/models/components/sentreceipt.d.ts.map +1 -0
- package/models/components/sentreceipt.js +73 -0
- package/models/components/sentreceipt.js.map +1 -0
- package/models/components/transfer.d.ts +3 -0
- package/models/components/transfer.d.ts.map +1 -1
- package/models/components/transfer.js +3 -0
- package/models/components/transfer.js.map +1 -1
- package/models/errors/index.d.ts +1 -0
- package/models/errors/index.d.ts.map +1 -1
- package/models/errors/index.js +1 -0
- package/models/errors/index.js.map +1 -1
- package/models/errors/receiptvalidationerror.d.ts +46 -0
- package/models/errors/receiptvalidationerror.d.ts.map +1 -0
- package/models/errors/receiptvalidationerror.js +98 -0
- package/models/errors/receiptvalidationerror.js.map +1 -0
- package/models/errors/transfer.d.ts +3 -0
- package/models/errors/transfer.d.ts.map +1 -1
- package/models/errors/transfer.js +4 -0
- package/models/errors/transfer.js.map +1 -1
- package/models/operations/createcancellation.d.ts +107 -0
- package/models/operations/createcancellation.d.ts.map +1 -0
- package/models/operations/createcancellation.js +147 -0
- package/models/operations/createcancellation.js.map +1 -0
- package/models/operations/createreceipts.d.ts +74 -0
- package/models/operations/createreceipts.d.ts.map +1 -0
- package/models/operations/createreceipts.js +118 -0
- package/models/operations/createreceipts.js.map +1 -0
- package/models/operations/getcancellation.d.ts +112 -0
- package/models/operations/getcancellation.d.ts.map +1 -0
- package/models/operations/getcancellation.js +149 -0
- package/models/operations/getcancellation.js.map +1 -0
- package/models/operations/index.d.ts +4 -0
- package/models/operations/index.d.ts.map +1 -1
- package/models/operations/index.js +4 -0
- package/models/operations/index.js.map +1 -1
- package/models/operations/listreceipts.d.ts +102 -0
- package/models/operations/listreceipts.d.ts.map +1 -0
- package/models/operations/listreceipts.js +145 -0
- package/models/operations/listreceipts.js.map +1 -0
- package/package.json +1 -1
- package/sdk/receipts.d.ts +20 -0
- package/sdk/receipts.d.ts.map +1 -0
- package/sdk/receipts.js +32 -0
- package/sdk/receipts.js.map +1 -0
- package/sdk/sdk.d.ts +3 -0
- package/sdk/sdk.d.ts.map +1 -1
- package/sdk/sdk.js +4 -0
- package/sdk/sdk.js.map +1 -1
- package/sdk/transfers.d.ts +14 -0
- package/sdk/transfers.d.ts.map +1 -1
- package/sdk/transfers.js +20 -0
- package/sdk/transfers.js.map +1 -1
- package/src/funcs/receiptsCreate.ts +190 -0
- package/src/funcs/receiptsList.ts +171 -0
- package/src/funcs/transfersCreateCancellation.ts +184 -0
- package/src/funcs/transfersGetCancellation.ts +183 -0
- package/src/lib/config.ts +3 -3
- package/src/mcp-server/mcp-server.ts +1 -1
- package/src/mcp-server/server.ts +9 -1
- package/src/mcp-server/tools/receiptsCreate.ts +39 -0
- package/src/mcp-server/tools/receiptsList.ts +38 -0
- package/src/mcp-server/tools/transfersCreateCancellation.ts +38 -0
- package/src/mcp-server/tools/transfersGetCancellation.ts +38 -0
- package/src/models/components/index.ts +4 -0
- package/src/models/components/receiptkind.ts +36 -0
- package/src/models/components/receiptrequest.ts +123 -0
- package/src/models/components/receiptresponse.ts +157 -0
- package/src/models/components/sentreceipt.ts +79 -0
- package/src/models/components/transfer.ts +10 -0
- package/src/models/errors/index.ts +1 -0
- package/src/models/errors/receiptvalidationerror.ts +99 -0
- package/src/models/errors/transfer.ts +6 -0
- package/src/models/operations/createcancellation.ts +229 -0
- package/src/models/operations/createreceipts.ts +161 -0
- package/src/models/operations/getcancellation.ts +236 -0
- package/src/models/operations/index.ts +4 -0
- package/src/models/operations/listreceipts.ts +222 -0
- package/src/sdk/receipts.ts +46 -0
- package/src/sdk/sdk.ts +6 -0
- package/src/sdk/transfers.ts +36 -0
|
@@ -0,0 +1,229 @@
|
|
|
1
|
+
/*
|
|
2
|
+
* Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.
|
|
3
|
+
*/
|
|
4
|
+
|
|
5
|
+
import * as z from "zod";
|
|
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 CreateCancellationGlobals = {
|
|
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
|
+
*/
|
|
26
|
+
xMoovVersion?: string | undefined;
|
|
27
|
+
};
|
|
28
|
+
|
|
29
|
+
export type CreateCancellationRequest = {
|
|
30
|
+
/**
|
|
31
|
+
* The partner's Moov account ID.
|
|
32
|
+
*/
|
|
33
|
+
accountID: string;
|
|
34
|
+
/**
|
|
35
|
+
* The transfer ID to cancel.
|
|
36
|
+
*/
|
|
37
|
+
transferID: string;
|
|
38
|
+
};
|
|
39
|
+
|
|
40
|
+
export type CreateCancellationResponse = {
|
|
41
|
+
headers: { [k: string]: Array<string> };
|
|
42
|
+
result: components.Cancellation;
|
|
43
|
+
};
|
|
44
|
+
|
|
45
|
+
/** @internal */
|
|
46
|
+
export const CreateCancellationGlobals$inboundSchema: z.ZodType<
|
|
47
|
+
CreateCancellationGlobals,
|
|
48
|
+
z.ZodTypeDef,
|
|
49
|
+
unknown
|
|
50
|
+
> = z.object({
|
|
51
|
+
"x-moov-version": z.string().default("v2024.01.00"),
|
|
52
|
+
}).transform((v) => {
|
|
53
|
+
return remap$(v, {
|
|
54
|
+
"x-moov-version": "xMoovVersion",
|
|
55
|
+
});
|
|
56
|
+
});
|
|
57
|
+
|
|
58
|
+
/** @internal */
|
|
59
|
+
export type CreateCancellationGlobals$Outbound = {
|
|
60
|
+
"x-moov-version": string;
|
|
61
|
+
};
|
|
62
|
+
|
|
63
|
+
/** @internal */
|
|
64
|
+
export const CreateCancellationGlobals$outboundSchema: z.ZodType<
|
|
65
|
+
CreateCancellationGlobals$Outbound,
|
|
66
|
+
z.ZodTypeDef,
|
|
67
|
+
CreateCancellationGlobals
|
|
68
|
+
> = z.object({
|
|
69
|
+
xMoovVersion: z.string().default("v2024.01.00"),
|
|
70
|
+
}).transform((v) => {
|
|
71
|
+
return remap$(v, {
|
|
72
|
+
xMoovVersion: "x-moov-version",
|
|
73
|
+
});
|
|
74
|
+
});
|
|
75
|
+
|
|
76
|
+
/**
|
|
77
|
+
* @internal
|
|
78
|
+
* @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
|
|
79
|
+
*/
|
|
80
|
+
export namespace CreateCancellationGlobals$ {
|
|
81
|
+
/** @deprecated use `CreateCancellationGlobals$inboundSchema` instead. */
|
|
82
|
+
export const inboundSchema = CreateCancellationGlobals$inboundSchema;
|
|
83
|
+
/** @deprecated use `CreateCancellationGlobals$outboundSchema` instead. */
|
|
84
|
+
export const outboundSchema = CreateCancellationGlobals$outboundSchema;
|
|
85
|
+
/** @deprecated use `CreateCancellationGlobals$Outbound` instead. */
|
|
86
|
+
export type Outbound = CreateCancellationGlobals$Outbound;
|
|
87
|
+
}
|
|
88
|
+
|
|
89
|
+
export function createCancellationGlobalsToJSON(
|
|
90
|
+
createCancellationGlobals: CreateCancellationGlobals,
|
|
91
|
+
): string {
|
|
92
|
+
return JSON.stringify(
|
|
93
|
+
CreateCancellationGlobals$outboundSchema.parse(createCancellationGlobals),
|
|
94
|
+
);
|
|
95
|
+
}
|
|
96
|
+
|
|
97
|
+
export function createCancellationGlobalsFromJSON(
|
|
98
|
+
jsonString: string,
|
|
99
|
+
): SafeParseResult<CreateCancellationGlobals, SDKValidationError> {
|
|
100
|
+
return safeParse(
|
|
101
|
+
jsonString,
|
|
102
|
+
(x) => CreateCancellationGlobals$inboundSchema.parse(JSON.parse(x)),
|
|
103
|
+
`Failed to parse 'CreateCancellationGlobals' from JSON`,
|
|
104
|
+
);
|
|
105
|
+
}
|
|
106
|
+
|
|
107
|
+
/** @internal */
|
|
108
|
+
export const CreateCancellationRequest$inboundSchema: z.ZodType<
|
|
109
|
+
CreateCancellationRequest,
|
|
110
|
+
z.ZodTypeDef,
|
|
111
|
+
unknown
|
|
112
|
+
> = z.object({
|
|
113
|
+
accountID: z.string(),
|
|
114
|
+
transferID: z.string(),
|
|
115
|
+
});
|
|
116
|
+
|
|
117
|
+
/** @internal */
|
|
118
|
+
export type CreateCancellationRequest$Outbound = {
|
|
119
|
+
accountID: string;
|
|
120
|
+
transferID: string;
|
|
121
|
+
};
|
|
122
|
+
|
|
123
|
+
/** @internal */
|
|
124
|
+
export const CreateCancellationRequest$outboundSchema: z.ZodType<
|
|
125
|
+
CreateCancellationRequest$Outbound,
|
|
126
|
+
z.ZodTypeDef,
|
|
127
|
+
CreateCancellationRequest
|
|
128
|
+
> = z.object({
|
|
129
|
+
accountID: z.string(),
|
|
130
|
+
transferID: z.string(),
|
|
131
|
+
});
|
|
132
|
+
|
|
133
|
+
/**
|
|
134
|
+
* @internal
|
|
135
|
+
* @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
|
|
136
|
+
*/
|
|
137
|
+
export namespace CreateCancellationRequest$ {
|
|
138
|
+
/** @deprecated use `CreateCancellationRequest$inboundSchema` instead. */
|
|
139
|
+
export const inboundSchema = CreateCancellationRequest$inboundSchema;
|
|
140
|
+
/** @deprecated use `CreateCancellationRequest$outboundSchema` instead. */
|
|
141
|
+
export const outboundSchema = CreateCancellationRequest$outboundSchema;
|
|
142
|
+
/** @deprecated use `CreateCancellationRequest$Outbound` instead. */
|
|
143
|
+
export type Outbound = CreateCancellationRequest$Outbound;
|
|
144
|
+
}
|
|
145
|
+
|
|
146
|
+
export function createCancellationRequestToJSON(
|
|
147
|
+
createCancellationRequest: CreateCancellationRequest,
|
|
148
|
+
): string {
|
|
149
|
+
return JSON.stringify(
|
|
150
|
+
CreateCancellationRequest$outboundSchema.parse(createCancellationRequest),
|
|
151
|
+
);
|
|
152
|
+
}
|
|
153
|
+
|
|
154
|
+
export function createCancellationRequestFromJSON(
|
|
155
|
+
jsonString: string,
|
|
156
|
+
): SafeParseResult<CreateCancellationRequest, SDKValidationError> {
|
|
157
|
+
return safeParse(
|
|
158
|
+
jsonString,
|
|
159
|
+
(x) => CreateCancellationRequest$inboundSchema.parse(JSON.parse(x)),
|
|
160
|
+
`Failed to parse 'CreateCancellationRequest' from JSON`,
|
|
161
|
+
);
|
|
162
|
+
}
|
|
163
|
+
|
|
164
|
+
/** @internal */
|
|
165
|
+
export const CreateCancellationResponse$inboundSchema: z.ZodType<
|
|
166
|
+
CreateCancellationResponse,
|
|
167
|
+
z.ZodTypeDef,
|
|
168
|
+
unknown
|
|
169
|
+
> = z.object({
|
|
170
|
+
Headers: z.record(z.array(z.string())),
|
|
171
|
+
Result: components.Cancellation$inboundSchema,
|
|
172
|
+
}).transform((v) => {
|
|
173
|
+
return remap$(v, {
|
|
174
|
+
"Headers": "headers",
|
|
175
|
+
"Result": "result",
|
|
176
|
+
});
|
|
177
|
+
});
|
|
178
|
+
|
|
179
|
+
/** @internal */
|
|
180
|
+
export type CreateCancellationResponse$Outbound = {
|
|
181
|
+
Headers: { [k: string]: Array<string> };
|
|
182
|
+
Result: components.Cancellation$Outbound;
|
|
183
|
+
};
|
|
184
|
+
|
|
185
|
+
/** @internal */
|
|
186
|
+
export const CreateCancellationResponse$outboundSchema: z.ZodType<
|
|
187
|
+
CreateCancellationResponse$Outbound,
|
|
188
|
+
z.ZodTypeDef,
|
|
189
|
+
CreateCancellationResponse
|
|
190
|
+
> = z.object({
|
|
191
|
+
headers: z.record(z.array(z.string())),
|
|
192
|
+
result: components.Cancellation$outboundSchema,
|
|
193
|
+
}).transform((v) => {
|
|
194
|
+
return remap$(v, {
|
|
195
|
+
headers: "Headers",
|
|
196
|
+
result: "Result",
|
|
197
|
+
});
|
|
198
|
+
});
|
|
199
|
+
|
|
200
|
+
/**
|
|
201
|
+
* @internal
|
|
202
|
+
* @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
|
|
203
|
+
*/
|
|
204
|
+
export namespace CreateCancellationResponse$ {
|
|
205
|
+
/** @deprecated use `CreateCancellationResponse$inboundSchema` instead. */
|
|
206
|
+
export const inboundSchema = CreateCancellationResponse$inboundSchema;
|
|
207
|
+
/** @deprecated use `CreateCancellationResponse$outboundSchema` instead. */
|
|
208
|
+
export const outboundSchema = CreateCancellationResponse$outboundSchema;
|
|
209
|
+
/** @deprecated use `CreateCancellationResponse$Outbound` instead. */
|
|
210
|
+
export type Outbound = CreateCancellationResponse$Outbound;
|
|
211
|
+
}
|
|
212
|
+
|
|
213
|
+
export function createCancellationResponseToJSON(
|
|
214
|
+
createCancellationResponse: CreateCancellationResponse,
|
|
215
|
+
): string {
|
|
216
|
+
return JSON.stringify(
|
|
217
|
+
CreateCancellationResponse$outboundSchema.parse(createCancellationResponse),
|
|
218
|
+
);
|
|
219
|
+
}
|
|
220
|
+
|
|
221
|
+
export function createCancellationResponseFromJSON(
|
|
222
|
+
jsonString: string,
|
|
223
|
+
): SafeParseResult<CreateCancellationResponse, SDKValidationError> {
|
|
224
|
+
return safeParse(
|
|
225
|
+
jsonString,
|
|
226
|
+
(x) => CreateCancellationResponse$inboundSchema.parse(JSON.parse(x)),
|
|
227
|
+
`Failed to parse 'CreateCancellationResponse' from JSON`,
|
|
228
|
+
);
|
|
229
|
+
}
|
|
@@ -0,0 +1,161 @@
|
|
|
1
|
+
/*
|
|
2
|
+
* Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.
|
|
3
|
+
*/
|
|
4
|
+
|
|
5
|
+
import * as z from "zod";
|
|
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 CreateReceiptsGlobals = {
|
|
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
|
+
*/
|
|
26
|
+
xMoovVersion?: string | undefined;
|
|
27
|
+
};
|
|
28
|
+
|
|
29
|
+
export type CreateReceiptsResponse = {
|
|
30
|
+
headers: { [k: string]: Array<string> };
|
|
31
|
+
result: components.ReceiptResponse;
|
|
32
|
+
};
|
|
33
|
+
|
|
34
|
+
/** @internal */
|
|
35
|
+
export const CreateReceiptsGlobals$inboundSchema: z.ZodType<
|
|
36
|
+
CreateReceiptsGlobals,
|
|
37
|
+
z.ZodTypeDef,
|
|
38
|
+
unknown
|
|
39
|
+
> = z.object({
|
|
40
|
+
"x-moov-version": z.string().default("v2024.01.00"),
|
|
41
|
+
}).transform((v) => {
|
|
42
|
+
return remap$(v, {
|
|
43
|
+
"x-moov-version": "xMoovVersion",
|
|
44
|
+
});
|
|
45
|
+
});
|
|
46
|
+
|
|
47
|
+
/** @internal */
|
|
48
|
+
export type CreateReceiptsGlobals$Outbound = {
|
|
49
|
+
"x-moov-version": string;
|
|
50
|
+
};
|
|
51
|
+
|
|
52
|
+
/** @internal */
|
|
53
|
+
export const CreateReceiptsGlobals$outboundSchema: z.ZodType<
|
|
54
|
+
CreateReceiptsGlobals$Outbound,
|
|
55
|
+
z.ZodTypeDef,
|
|
56
|
+
CreateReceiptsGlobals
|
|
57
|
+
> = z.object({
|
|
58
|
+
xMoovVersion: z.string().default("v2024.01.00"),
|
|
59
|
+
}).transform((v) => {
|
|
60
|
+
return remap$(v, {
|
|
61
|
+
xMoovVersion: "x-moov-version",
|
|
62
|
+
});
|
|
63
|
+
});
|
|
64
|
+
|
|
65
|
+
/**
|
|
66
|
+
* @internal
|
|
67
|
+
* @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
|
|
68
|
+
*/
|
|
69
|
+
export namespace CreateReceiptsGlobals$ {
|
|
70
|
+
/** @deprecated use `CreateReceiptsGlobals$inboundSchema` instead. */
|
|
71
|
+
export const inboundSchema = CreateReceiptsGlobals$inboundSchema;
|
|
72
|
+
/** @deprecated use `CreateReceiptsGlobals$outboundSchema` instead. */
|
|
73
|
+
export const outboundSchema = CreateReceiptsGlobals$outboundSchema;
|
|
74
|
+
/** @deprecated use `CreateReceiptsGlobals$Outbound` instead. */
|
|
75
|
+
export type Outbound = CreateReceiptsGlobals$Outbound;
|
|
76
|
+
}
|
|
77
|
+
|
|
78
|
+
export function createReceiptsGlobalsToJSON(
|
|
79
|
+
createReceiptsGlobals: CreateReceiptsGlobals,
|
|
80
|
+
): string {
|
|
81
|
+
return JSON.stringify(
|
|
82
|
+
CreateReceiptsGlobals$outboundSchema.parse(createReceiptsGlobals),
|
|
83
|
+
);
|
|
84
|
+
}
|
|
85
|
+
|
|
86
|
+
export function createReceiptsGlobalsFromJSON(
|
|
87
|
+
jsonString: string,
|
|
88
|
+
): SafeParseResult<CreateReceiptsGlobals, SDKValidationError> {
|
|
89
|
+
return safeParse(
|
|
90
|
+
jsonString,
|
|
91
|
+
(x) => CreateReceiptsGlobals$inboundSchema.parse(JSON.parse(x)),
|
|
92
|
+
`Failed to parse 'CreateReceiptsGlobals' from JSON`,
|
|
93
|
+
);
|
|
94
|
+
}
|
|
95
|
+
|
|
96
|
+
/** @internal */
|
|
97
|
+
export const CreateReceiptsResponse$inboundSchema: z.ZodType<
|
|
98
|
+
CreateReceiptsResponse,
|
|
99
|
+
z.ZodTypeDef,
|
|
100
|
+
unknown
|
|
101
|
+
> = z.object({
|
|
102
|
+
Headers: z.record(z.array(z.string())),
|
|
103
|
+
Result: components.ReceiptResponse$inboundSchema,
|
|
104
|
+
}).transform((v) => {
|
|
105
|
+
return remap$(v, {
|
|
106
|
+
"Headers": "headers",
|
|
107
|
+
"Result": "result",
|
|
108
|
+
});
|
|
109
|
+
});
|
|
110
|
+
|
|
111
|
+
/** @internal */
|
|
112
|
+
export type CreateReceiptsResponse$Outbound = {
|
|
113
|
+
Headers: { [k: string]: Array<string> };
|
|
114
|
+
Result: components.ReceiptResponse$Outbound;
|
|
115
|
+
};
|
|
116
|
+
|
|
117
|
+
/** @internal */
|
|
118
|
+
export const CreateReceiptsResponse$outboundSchema: z.ZodType<
|
|
119
|
+
CreateReceiptsResponse$Outbound,
|
|
120
|
+
z.ZodTypeDef,
|
|
121
|
+
CreateReceiptsResponse
|
|
122
|
+
> = z.object({
|
|
123
|
+
headers: z.record(z.array(z.string())),
|
|
124
|
+
result: components.ReceiptResponse$outboundSchema,
|
|
125
|
+
}).transform((v) => {
|
|
126
|
+
return remap$(v, {
|
|
127
|
+
headers: "Headers",
|
|
128
|
+
result: "Result",
|
|
129
|
+
});
|
|
130
|
+
});
|
|
131
|
+
|
|
132
|
+
/**
|
|
133
|
+
* @internal
|
|
134
|
+
* @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
|
|
135
|
+
*/
|
|
136
|
+
export namespace CreateReceiptsResponse$ {
|
|
137
|
+
/** @deprecated use `CreateReceiptsResponse$inboundSchema` instead. */
|
|
138
|
+
export const inboundSchema = CreateReceiptsResponse$inboundSchema;
|
|
139
|
+
/** @deprecated use `CreateReceiptsResponse$outboundSchema` instead. */
|
|
140
|
+
export const outboundSchema = CreateReceiptsResponse$outboundSchema;
|
|
141
|
+
/** @deprecated use `CreateReceiptsResponse$Outbound` instead. */
|
|
142
|
+
export type Outbound = CreateReceiptsResponse$Outbound;
|
|
143
|
+
}
|
|
144
|
+
|
|
145
|
+
export function createReceiptsResponseToJSON(
|
|
146
|
+
createReceiptsResponse: CreateReceiptsResponse,
|
|
147
|
+
): string {
|
|
148
|
+
return JSON.stringify(
|
|
149
|
+
CreateReceiptsResponse$outboundSchema.parse(createReceiptsResponse),
|
|
150
|
+
);
|
|
151
|
+
}
|
|
152
|
+
|
|
153
|
+
export function createReceiptsResponseFromJSON(
|
|
154
|
+
jsonString: string,
|
|
155
|
+
): SafeParseResult<CreateReceiptsResponse, SDKValidationError> {
|
|
156
|
+
return safeParse(
|
|
157
|
+
jsonString,
|
|
158
|
+
(x) => CreateReceiptsResponse$inboundSchema.parse(JSON.parse(x)),
|
|
159
|
+
`Failed to parse 'CreateReceiptsResponse' from JSON`,
|
|
160
|
+
);
|
|
161
|
+
}
|
|
@@ -0,0 +1,236 @@
|
|
|
1
|
+
/*
|
|
2
|
+
* Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.
|
|
3
|
+
*/
|
|
4
|
+
|
|
5
|
+
import * as z from "zod";
|
|
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 GetCancellationGlobals = {
|
|
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
|
+
*/
|
|
26
|
+
xMoovVersion?: string | undefined;
|
|
27
|
+
};
|
|
28
|
+
|
|
29
|
+
export type GetCancellationRequest = {
|
|
30
|
+
/**
|
|
31
|
+
* Moov account ID of the partner or transfer's source or destination.
|
|
32
|
+
*/
|
|
33
|
+
accountID: string;
|
|
34
|
+
/**
|
|
35
|
+
* Identifier for the transfer.
|
|
36
|
+
*/
|
|
37
|
+
transferID: string;
|
|
38
|
+
/**
|
|
39
|
+
* Identifier for the cancellation.
|
|
40
|
+
*/
|
|
41
|
+
cancellationID: string;
|
|
42
|
+
};
|
|
43
|
+
|
|
44
|
+
export type GetCancellationResponse = {
|
|
45
|
+
headers: { [k: string]: Array<string> };
|
|
46
|
+
result: components.Cancellation;
|
|
47
|
+
};
|
|
48
|
+
|
|
49
|
+
/** @internal */
|
|
50
|
+
export const GetCancellationGlobals$inboundSchema: z.ZodType<
|
|
51
|
+
GetCancellationGlobals,
|
|
52
|
+
z.ZodTypeDef,
|
|
53
|
+
unknown
|
|
54
|
+
> = z.object({
|
|
55
|
+
"x-moov-version": z.string().default("v2024.01.00"),
|
|
56
|
+
}).transform((v) => {
|
|
57
|
+
return remap$(v, {
|
|
58
|
+
"x-moov-version": "xMoovVersion",
|
|
59
|
+
});
|
|
60
|
+
});
|
|
61
|
+
|
|
62
|
+
/** @internal */
|
|
63
|
+
export type GetCancellationGlobals$Outbound = {
|
|
64
|
+
"x-moov-version": string;
|
|
65
|
+
};
|
|
66
|
+
|
|
67
|
+
/** @internal */
|
|
68
|
+
export const GetCancellationGlobals$outboundSchema: z.ZodType<
|
|
69
|
+
GetCancellationGlobals$Outbound,
|
|
70
|
+
z.ZodTypeDef,
|
|
71
|
+
GetCancellationGlobals
|
|
72
|
+
> = z.object({
|
|
73
|
+
xMoovVersion: z.string().default("v2024.01.00"),
|
|
74
|
+
}).transform((v) => {
|
|
75
|
+
return remap$(v, {
|
|
76
|
+
xMoovVersion: "x-moov-version",
|
|
77
|
+
});
|
|
78
|
+
});
|
|
79
|
+
|
|
80
|
+
/**
|
|
81
|
+
* @internal
|
|
82
|
+
* @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
|
|
83
|
+
*/
|
|
84
|
+
export namespace GetCancellationGlobals$ {
|
|
85
|
+
/** @deprecated use `GetCancellationGlobals$inboundSchema` instead. */
|
|
86
|
+
export const inboundSchema = GetCancellationGlobals$inboundSchema;
|
|
87
|
+
/** @deprecated use `GetCancellationGlobals$outboundSchema` instead. */
|
|
88
|
+
export const outboundSchema = GetCancellationGlobals$outboundSchema;
|
|
89
|
+
/** @deprecated use `GetCancellationGlobals$Outbound` instead. */
|
|
90
|
+
export type Outbound = GetCancellationGlobals$Outbound;
|
|
91
|
+
}
|
|
92
|
+
|
|
93
|
+
export function getCancellationGlobalsToJSON(
|
|
94
|
+
getCancellationGlobals: GetCancellationGlobals,
|
|
95
|
+
): string {
|
|
96
|
+
return JSON.stringify(
|
|
97
|
+
GetCancellationGlobals$outboundSchema.parse(getCancellationGlobals),
|
|
98
|
+
);
|
|
99
|
+
}
|
|
100
|
+
|
|
101
|
+
export function getCancellationGlobalsFromJSON(
|
|
102
|
+
jsonString: string,
|
|
103
|
+
): SafeParseResult<GetCancellationGlobals, SDKValidationError> {
|
|
104
|
+
return safeParse(
|
|
105
|
+
jsonString,
|
|
106
|
+
(x) => GetCancellationGlobals$inboundSchema.parse(JSON.parse(x)),
|
|
107
|
+
`Failed to parse 'GetCancellationGlobals' from JSON`,
|
|
108
|
+
);
|
|
109
|
+
}
|
|
110
|
+
|
|
111
|
+
/** @internal */
|
|
112
|
+
export const GetCancellationRequest$inboundSchema: z.ZodType<
|
|
113
|
+
GetCancellationRequest,
|
|
114
|
+
z.ZodTypeDef,
|
|
115
|
+
unknown
|
|
116
|
+
> = z.object({
|
|
117
|
+
accountID: z.string(),
|
|
118
|
+
transferID: z.string(),
|
|
119
|
+
cancellationID: z.string(),
|
|
120
|
+
});
|
|
121
|
+
|
|
122
|
+
/** @internal */
|
|
123
|
+
export type GetCancellationRequest$Outbound = {
|
|
124
|
+
accountID: string;
|
|
125
|
+
transferID: string;
|
|
126
|
+
cancellationID: string;
|
|
127
|
+
};
|
|
128
|
+
|
|
129
|
+
/** @internal */
|
|
130
|
+
export const GetCancellationRequest$outboundSchema: z.ZodType<
|
|
131
|
+
GetCancellationRequest$Outbound,
|
|
132
|
+
z.ZodTypeDef,
|
|
133
|
+
GetCancellationRequest
|
|
134
|
+
> = z.object({
|
|
135
|
+
accountID: z.string(),
|
|
136
|
+
transferID: z.string(),
|
|
137
|
+
cancellationID: z.string(),
|
|
138
|
+
});
|
|
139
|
+
|
|
140
|
+
/**
|
|
141
|
+
* @internal
|
|
142
|
+
* @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
|
|
143
|
+
*/
|
|
144
|
+
export namespace GetCancellationRequest$ {
|
|
145
|
+
/** @deprecated use `GetCancellationRequest$inboundSchema` instead. */
|
|
146
|
+
export const inboundSchema = GetCancellationRequest$inboundSchema;
|
|
147
|
+
/** @deprecated use `GetCancellationRequest$outboundSchema` instead. */
|
|
148
|
+
export const outboundSchema = GetCancellationRequest$outboundSchema;
|
|
149
|
+
/** @deprecated use `GetCancellationRequest$Outbound` instead. */
|
|
150
|
+
export type Outbound = GetCancellationRequest$Outbound;
|
|
151
|
+
}
|
|
152
|
+
|
|
153
|
+
export function getCancellationRequestToJSON(
|
|
154
|
+
getCancellationRequest: GetCancellationRequest,
|
|
155
|
+
): string {
|
|
156
|
+
return JSON.stringify(
|
|
157
|
+
GetCancellationRequest$outboundSchema.parse(getCancellationRequest),
|
|
158
|
+
);
|
|
159
|
+
}
|
|
160
|
+
|
|
161
|
+
export function getCancellationRequestFromJSON(
|
|
162
|
+
jsonString: string,
|
|
163
|
+
): SafeParseResult<GetCancellationRequest, SDKValidationError> {
|
|
164
|
+
return safeParse(
|
|
165
|
+
jsonString,
|
|
166
|
+
(x) => GetCancellationRequest$inboundSchema.parse(JSON.parse(x)),
|
|
167
|
+
`Failed to parse 'GetCancellationRequest' from JSON`,
|
|
168
|
+
);
|
|
169
|
+
}
|
|
170
|
+
|
|
171
|
+
/** @internal */
|
|
172
|
+
export const GetCancellationResponse$inboundSchema: z.ZodType<
|
|
173
|
+
GetCancellationResponse,
|
|
174
|
+
z.ZodTypeDef,
|
|
175
|
+
unknown
|
|
176
|
+
> = z.object({
|
|
177
|
+
Headers: z.record(z.array(z.string())),
|
|
178
|
+
Result: components.Cancellation$inboundSchema,
|
|
179
|
+
}).transform((v) => {
|
|
180
|
+
return remap$(v, {
|
|
181
|
+
"Headers": "headers",
|
|
182
|
+
"Result": "result",
|
|
183
|
+
});
|
|
184
|
+
});
|
|
185
|
+
|
|
186
|
+
/** @internal */
|
|
187
|
+
export type GetCancellationResponse$Outbound = {
|
|
188
|
+
Headers: { [k: string]: Array<string> };
|
|
189
|
+
Result: components.Cancellation$Outbound;
|
|
190
|
+
};
|
|
191
|
+
|
|
192
|
+
/** @internal */
|
|
193
|
+
export const GetCancellationResponse$outboundSchema: z.ZodType<
|
|
194
|
+
GetCancellationResponse$Outbound,
|
|
195
|
+
z.ZodTypeDef,
|
|
196
|
+
GetCancellationResponse
|
|
197
|
+
> = z.object({
|
|
198
|
+
headers: z.record(z.array(z.string())),
|
|
199
|
+
result: components.Cancellation$outboundSchema,
|
|
200
|
+
}).transform((v) => {
|
|
201
|
+
return remap$(v, {
|
|
202
|
+
headers: "Headers",
|
|
203
|
+
result: "Result",
|
|
204
|
+
});
|
|
205
|
+
});
|
|
206
|
+
|
|
207
|
+
/**
|
|
208
|
+
* @internal
|
|
209
|
+
* @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
|
|
210
|
+
*/
|
|
211
|
+
export namespace GetCancellationResponse$ {
|
|
212
|
+
/** @deprecated use `GetCancellationResponse$inboundSchema` instead. */
|
|
213
|
+
export const inboundSchema = GetCancellationResponse$inboundSchema;
|
|
214
|
+
/** @deprecated use `GetCancellationResponse$outboundSchema` instead. */
|
|
215
|
+
export const outboundSchema = GetCancellationResponse$outboundSchema;
|
|
216
|
+
/** @deprecated use `GetCancellationResponse$Outbound` instead. */
|
|
217
|
+
export type Outbound = GetCancellationResponse$Outbound;
|
|
218
|
+
}
|
|
219
|
+
|
|
220
|
+
export function getCancellationResponseToJSON(
|
|
221
|
+
getCancellationResponse: GetCancellationResponse,
|
|
222
|
+
): string {
|
|
223
|
+
return JSON.stringify(
|
|
224
|
+
GetCancellationResponse$outboundSchema.parse(getCancellationResponse),
|
|
225
|
+
);
|
|
226
|
+
}
|
|
227
|
+
|
|
228
|
+
export function getCancellationResponseFromJSON(
|
|
229
|
+
jsonString: string,
|
|
230
|
+
): SafeParseResult<GetCancellationResponse, SDKValidationError> {
|
|
231
|
+
return safeParse(
|
|
232
|
+
jsonString,
|
|
233
|
+
(x) => GetCancellationResponse$inboundSchema.parse(JSON.parse(x)),
|
|
234
|
+
`Failed to parse 'GetCancellationResponse' from JSON`,
|
|
235
|
+
);
|
|
236
|
+
}
|
|
@@ -11,9 +11,11 @@ export * from "./createaccesstoken.js";
|
|
|
11
11
|
export * from "./createaccount.js";
|
|
12
12
|
export * from "./createapplepaysession.js";
|
|
13
13
|
export * from "./createbrand.js";
|
|
14
|
+
export * from "./createcancellation.js";
|
|
14
15
|
export * from "./createfeeplanagreements.js";
|
|
15
16
|
export * from "./createonboardinginvite.js";
|
|
16
17
|
export * from "./createpaymentlink.js";
|
|
18
|
+
export * from "./createreceipts.js";
|
|
17
19
|
export * from "./createrepresentative.js";
|
|
18
20
|
export * from "./createreversal.js";
|
|
19
21
|
export * from "./createschedule.js";
|
|
@@ -38,6 +40,7 @@ export * from "./getavatar.js";
|
|
|
38
40
|
export * from "./getbankaccount.js";
|
|
39
41
|
export * from "./getbankaccountverification.js";
|
|
40
42
|
export * from "./getbrand.js";
|
|
43
|
+
export * from "./getcancellation.js";
|
|
41
44
|
export * from "./getcapability.js";
|
|
42
45
|
export * from "./getcard.js";
|
|
43
46
|
export * from "./getdispute.js";
|
|
@@ -95,6 +98,7 @@ export * from "./listpartnerpricing.js";
|
|
|
95
98
|
export * from "./listpartnerpricingagreements.js";
|
|
96
99
|
export * from "./listpaymentlinks.js";
|
|
97
100
|
export * from "./listpaymentmethods.js";
|
|
101
|
+
export * from "./listreceipts.js";
|
|
98
102
|
export * from "./listrefunds.js";
|
|
99
103
|
export * from "./listrepresentatives.js";
|
|
100
104
|
export * from "./listschedules.js";
|