@moovio/sdk 0.14.8 → 0.14.10
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 +45 -37
- package/bin/mcp-server.js +401 -163
- package/bin/mcp-server.js.map +19 -14
- package/docs/sdks/terminalapplications/README.md +102 -9
- package/examples/package-lock.json +1 -1
- package/funcs/terminalApplicationsCreateVersion.d.ts +18 -0
- package/funcs/terminalApplicationsCreateVersion.d.ts.map +1 -0
- package/funcs/terminalApplicationsCreateVersion.js +137 -0
- package/funcs/terminalApplicationsCreateVersion.js.map +1 -0
- 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 +3 -1
- package/mcp-server/server.js.map +1 -1
- package/mcp-server/tools/terminalApplicationsCreateVersion.d.ts +8 -0
- package/mcp-server/tools/terminalApplicationsCreateVersion.d.ts.map +1 -0
- package/mcp-server/tools/terminalApplicationsCreateVersion.js +65 -0
- package/mcp-server/tools/terminalApplicationsCreateVersion.js.map +1 -0
- package/models/components/accountterminalapplication.d.ts +40 -0
- package/models/components/accountterminalapplication.d.ts.map +1 -0
- package/models/components/accountterminalapplication.js +71 -0
- package/models/components/accountterminalapplication.js.map +1 -0
- package/models/components/createterminalapplication.d.ts +2 -2
- package/models/components/index.d.ts +2 -0
- package/models/components/index.d.ts.map +1 -1
- package/models/components/index.js +2 -0
- package/models/components/index.js.map +1 -1
- package/models/components/receiptrequest.d.ts +30 -5
- package/models/components/receiptrequest.d.ts.map +1 -1
- package/models/components/receiptrequest.js +24 -4
- package/models/components/receiptrequest.js.map +1 -1
- package/models/components/terminalapplication.d.ts +2 -2
- package/models/components/terminalapplicationversion.d.ts +35 -0
- package/models/components/terminalapplicationversion.d.ts.map +1 -0
- package/models/components/terminalapplicationversion.js +69 -0
- package/models/components/terminalapplicationversion.js.map +1 -0
- package/models/operations/createterminalapplicationversion.d.ts +101 -0
- package/models/operations/createterminalapplicationversion.d.ts.map +1 -0
- package/models/operations/createterminalapplicationversion.js +155 -0
- package/models/operations/createterminalapplicationversion.js.map +1 -0
- package/models/operations/getaccountterminalapplication.d.ts +2 -2
- package/models/operations/getaccountterminalapplication.d.ts.map +1 -1
- package/models/operations/getaccountterminalapplication.js +2 -2
- package/models/operations/getaccountterminalapplication.js.map +1 -1
- package/models/operations/index.d.ts +1 -0
- package/models/operations/index.d.ts.map +1 -1
- package/models/operations/index.js +1 -0
- package/models/operations/index.js.map +1 -1
- package/models/operations/linkaccountterminalapplication.d.ts +2 -2
- package/models/operations/linkaccountterminalapplication.d.ts.map +1 -1
- package/models/operations/linkaccountterminalapplication.js +2 -2
- package/models/operations/linkaccountterminalapplication.js.map +1 -1
- package/models/operations/listaccountterminalapplications.d.ts +2 -2
- package/models/operations/listaccountterminalapplications.d.ts.map +1 -1
- package/models/operations/listaccountterminalapplications.js +2 -2
- package/models/operations/listaccountterminalapplications.js.map +1 -1
- package/package.json +1 -1
- package/sdk/terminalapplications.d.ts +7 -0
- package/sdk/terminalapplications.d.ts.map +1 -1
- package/sdk/terminalapplications.js +10 -0
- package/sdk/terminalapplications.js.map +1 -1
- package/src/funcs/terminalApplicationsCreateVersion.ts +212 -0
- package/src/lib/config.ts +3 -3
- package/src/mcp-server/mcp-server.ts +1 -1
- package/src/mcp-server/server.ts +3 -1
- package/src/mcp-server/tools/terminalApplicationsCreateVersion.ts +41 -0
- package/src/models/components/accountterminalapplication.ts +79 -0
- package/src/models/components/createterminalapplication.ts +2 -2
- package/src/models/components/index.ts +2 -0
- package/src/models/components/receiptrequest.ts +35 -11
- package/src/models/components/terminalapplication.ts +2 -2
- package/src/models/components/terminalapplicationversion.ts +72 -0
- package/src/models/operations/createterminalapplicationversion.ts +266 -0
- package/src/models/operations/getaccountterminalapplication.ts +4 -4
- package/src/models/operations/index.ts +1 -0
- package/src/models/operations/linkaccountterminalapplication.ts +4 -4
- package/src/models/operations/listaccountterminalapplications.ts +4 -4
- package/src/sdk/terminalapplications.ts +18 -0
|
@@ -0,0 +1,212 @@
|
|
|
1
|
+
/*
|
|
2
|
+
* Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.
|
|
3
|
+
*/
|
|
4
|
+
|
|
5
|
+
import { MoovCore } from "../core.js";
|
|
6
|
+
import { encodeJSON, 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 { MoovError } from "../models/errors/mooverror.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
|
+
* Register a new version of a terminal application. For Android applications, this is used to register a new version code of the application.
|
|
30
|
+
*
|
|
31
|
+
* To access this endpoint using an [access token](https://docs.moov.io/api/authentication/access-tokens/)
|
|
32
|
+
* you'll need to specify the `/terminal-applications.write` scope.
|
|
33
|
+
*/
|
|
34
|
+
export function terminalApplicationsCreateVersion(
|
|
35
|
+
client: MoovCore,
|
|
36
|
+
request: operations.CreateTerminalApplicationVersionRequest,
|
|
37
|
+
options?: RequestOptions,
|
|
38
|
+
): APIPromise<
|
|
39
|
+
Result<
|
|
40
|
+
operations.CreateTerminalApplicationVersionResponse,
|
|
41
|
+
| errors.GenericError
|
|
42
|
+
| errors.TerminalApplicationError
|
|
43
|
+
| MoovError
|
|
44
|
+
| ResponseValidationError
|
|
45
|
+
| ConnectionError
|
|
46
|
+
| RequestAbortedError
|
|
47
|
+
| RequestTimeoutError
|
|
48
|
+
| InvalidRequestError
|
|
49
|
+
| UnexpectedClientError
|
|
50
|
+
| SDKValidationError
|
|
51
|
+
>
|
|
52
|
+
> {
|
|
53
|
+
return new APIPromise($do(
|
|
54
|
+
client,
|
|
55
|
+
request,
|
|
56
|
+
options,
|
|
57
|
+
));
|
|
58
|
+
}
|
|
59
|
+
|
|
60
|
+
async function $do(
|
|
61
|
+
client: MoovCore,
|
|
62
|
+
request: operations.CreateTerminalApplicationVersionRequest,
|
|
63
|
+
options?: RequestOptions,
|
|
64
|
+
): Promise<
|
|
65
|
+
[
|
|
66
|
+
Result<
|
|
67
|
+
operations.CreateTerminalApplicationVersionResponse,
|
|
68
|
+
| errors.GenericError
|
|
69
|
+
| errors.TerminalApplicationError
|
|
70
|
+
| MoovError
|
|
71
|
+
| ResponseValidationError
|
|
72
|
+
| ConnectionError
|
|
73
|
+
| RequestAbortedError
|
|
74
|
+
| RequestTimeoutError
|
|
75
|
+
| InvalidRequestError
|
|
76
|
+
| UnexpectedClientError
|
|
77
|
+
| SDKValidationError
|
|
78
|
+
>,
|
|
79
|
+
APICall,
|
|
80
|
+
]
|
|
81
|
+
> {
|
|
82
|
+
const parsed = safeParse(
|
|
83
|
+
request,
|
|
84
|
+
(value) =>
|
|
85
|
+
operations.CreateTerminalApplicationVersionRequest$outboundSchema.parse(
|
|
86
|
+
value,
|
|
87
|
+
),
|
|
88
|
+
"Input validation failed",
|
|
89
|
+
);
|
|
90
|
+
if (!parsed.ok) {
|
|
91
|
+
return [parsed, { status: "invalid" }];
|
|
92
|
+
}
|
|
93
|
+
const payload = parsed.value;
|
|
94
|
+
const body = encodeJSON("body", payload.TerminalApplicationVersion, {
|
|
95
|
+
explode: true,
|
|
96
|
+
});
|
|
97
|
+
|
|
98
|
+
const pathParams = {
|
|
99
|
+
terminalApplicationID: encodeSimple(
|
|
100
|
+
"terminalApplicationID",
|
|
101
|
+
payload.terminalApplicationID,
|
|
102
|
+
{ explode: false, charEncoding: "percent" },
|
|
103
|
+
),
|
|
104
|
+
};
|
|
105
|
+
|
|
106
|
+
const path = pathToFunc(
|
|
107
|
+
"/terminal-applications/{terminalApplicationID}/versions",
|
|
108
|
+
)(pathParams);
|
|
109
|
+
|
|
110
|
+
const headers = new Headers(compactMap({
|
|
111
|
+
"Content-Type": "application/json",
|
|
112
|
+
Accept: "application/json",
|
|
113
|
+
"x-moov-version": encodeSimple(
|
|
114
|
+
"x-moov-version",
|
|
115
|
+
client._options.xMoovVersion,
|
|
116
|
+
{ explode: false, charEncoding: "none" },
|
|
117
|
+
),
|
|
118
|
+
}));
|
|
119
|
+
|
|
120
|
+
const securityInput = await extractSecurity(client._options.security);
|
|
121
|
+
const requestSecurity = resolveGlobalSecurity(securityInput);
|
|
122
|
+
|
|
123
|
+
const context = {
|
|
124
|
+
options: client._options,
|
|
125
|
+
baseURL: options?.serverURL ?? client._baseURL ?? "",
|
|
126
|
+
operationID: "createTerminalApplicationVersion",
|
|
127
|
+
oAuth2Scopes: [],
|
|
128
|
+
|
|
129
|
+
resolvedSecurity: requestSecurity,
|
|
130
|
+
|
|
131
|
+
securitySource: client._options.security,
|
|
132
|
+
retryConfig: options?.retries
|
|
133
|
+
|| client._options.retryConfig
|
|
134
|
+
|| { strategy: "none" },
|
|
135
|
+
retryCodes: options?.retryCodes || ["429", "500", "502", "503", "504"],
|
|
136
|
+
};
|
|
137
|
+
|
|
138
|
+
const requestRes = client._createRequest(context, {
|
|
139
|
+
security: requestSecurity,
|
|
140
|
+
method: "POST",
|
|
141
|
+
baseURL: options?.serverURL,
|
|
142
|
+
path: path,
|
|
143
|
+
headers: headers,
|
|
144
|
+
body: body,
|
|
145
|
+
userAgent: client._options.userAgent,
|
|
146
|
+
timeoutMs: options?.timeoutMs || client._options.timeoutMs || -1,
|
|
147
|
+
}, options);
|
|
148
|
+
if (!requestRes.ok) {
|
|
149
|
+
return [requestRes, { status: "invalid" }];
|
|
150
|
+
}
|
|
151
|
+
const req = requestRes.value;
|
|
152
|
+
|
|
153
|
+
const doResult = await client._do(req, {
|
|
154
|
+
context,
|
|
155
|
+
errorCodes: [
|
|
156
|
+
"400",
|
|
157
|
+
"401",
|
|
158
|
+
"403",
|
|
159
|
+
"404",
|
|
160
|
+
"409",
|
|
161
|
+
"422",
|
|
162
|
+
"429",
|
|
163
|
+
"4XX",
|
|
164
|
+
"500",
|
|
165
|
+
"504",
|
|
166
|
+
"5XX",
|
|
167
|
+
],
|
|
168
|
+
retryConfig: context.retryConfig,
|
|
169
|
+
retryCodes: context.retryCodes,
|
|
170
|
+
});
|
|
171
|
+
if (!doResult.ok) {
|
|
172
|
+
return [doResult, { status: "request-error", request: req }];
|
|
173
|
+
}
|
|
174
|
+
const response = doResult.value;
|
|
175
|
+
|
|
176
|
+
const responseFields = {
|
|
177
|
+
HttpMeta: { Response: response, Request: req },
|
|
178
|
+
};
|
|
179
|
+
|
|
180
|
+
const [result] = await M.match<
|
|
181
|
+
operations.CreateTerminalApplicationVersionResponse,
|
|
182
|
+
| errors.GenericError
|
|
183
|
+
| errors.TerminalApplicationError
|
|
184
|
+
| MoovError
|
|
185
|
+
| ResponseValidationError
|
|
186
|
+
| ConnectionError
|
|
187
|
+
| RequestAbortedError
|
|
188
|
+
| RequestTimeoutError
|
|
189
|
+
| InvalidRequestError
|
|
190
|
+
| UnexpectedClientError
|
|
191
|
+
| SDKValidationError
|
|
192
|
+
>(
|
|
193
|
+
M.json(
|
|
194
|
+
200,
|
|
195
|
+
operations.CreateTerminalApplicationVersionResponse$inboundSchema,
|
|
196
|
+
{ hdrs: true, key: "Result" },
|
|
197
|
+
),
|
|
198
|
+
M.jsonErr([400, 409], errors.GenericError$inboundSchema, { hdrs: true }),
|
|
199
|
+
M.jsonErr(422, errors.TerminalApplicationError$inboundSchema, {
|
|
200
|
+
hdrs: true,
|
|
201
|
+
}),
|
|
202
|
+
M.fail([401, 403, 404, 429]),
|
|
203
|
+
M.fail([500, 504]),
|
|
204
|
+
M.fail("4XX"),
|
|
205
|
+
M.fail("5XX"),
|
|
206
|
+
)(response, req, { extraFields: responseFields });
|
|
207
|
+
if (!result.ok) {
|
|
208
|
+
return [result, { status: "complete", request: req, response }];
|
|
209
|
+
}
|
|
210
|
+
|
|
211
|
+
return [result, { status: "complete", request: req, response }];
|
|
212
|
+
}
|
package/src/lib/config.ts
CHANGED
|
@@ -73,7 +73,7 @@ export function serverURLFromOptions(options: SDKOptions): URL | null {
|
|
|
73
73
|
export const SDK_METADATA = {
|
|
74
74
|
language: "typescript",
|
|
75
75
|
openapiDocVersion: "latest",
|
|
76
|
-
sdkVersion: "0.14.
|
|
77
|
-
genVersion: "2.
|
|
78
|
-
userAgent: "speakeasy-sdk/typescript 0.14.
|
|
76
|
+
sdkVersion: "0.14.10",
|
|
77
|
+
genVersion: "2.657.1",
|
|
78
|
+
userAgent: "speakeasy-sdk/typescript 0.14.10 2.657.1 latest @moovio/sdk",
|
|
79
79
|
} as const;
|
package/src/mcp-server/server.ts
CHANGED
|
@@ -134,6 +134,7 @@ import { tool$sweepsList } from "./tools/sweepsList.js";
|
|
|
134
134
|
import { tool$sweepsListConfigs } from "./tools/sweepsListConfigs.js";
|
|
135
135
|
import { tool$sweepsUpdateConfig } from "./tools/sweepsUpdateConfig.js";
|
|
136
136
|
import { tool$terminalApplicationsCreate } from "./tools/terminalApplicationsCreate.js";
|
|
137
|
+
import { tool$terminalApplicationsCreateVersion } from "./tools/terminalApplicationsCreateVersion.js";
|
|
137
138
|
import { tool$terminalApplicationsDelete } from "./tools/terminalApplicationsDelete.js";
|
|
138
139
|
import { tool$terminalApplicationsGet } from "./tools/terminalApplicationsGet.js";
|
|
139
140
|
import { tool$terminalApplicationsList } from "./tools/terminalApplicationsList.js";
|
|
@@ -167,7 +168,7 @@ export function createMCPServer(deps: {
|
|
|
167
168
|
}) {
|
|
168
169
|
const server = new McpServer({
|
|
169
170
|
name: "Moov",
|
|
170
|
-
version: "0.14.
|
|
171
|
+
version: "0.14.10",
|
|
171
172
|
});
|
|
172
173
|
|
|
173
174
|
const client = new MoovCore({
|
|
@@ -340,6 +341,7 @@ export function createMCPServer(deps: {
|
|
|
340
341
|
tool(tool$terminalApplicationsList);
|
|
341
342
|
tool(tool$terminalApplicationsGet);
|
|
342
343
|
tool(tool$terminalApplicationsDelete);
|
|
344
|
+
tool(tool$terminalApplicationsCreateVersion);
|
|
343
345
|
|
|
344
346
|
return server;
|
|
345
347
|
}
|
|
@@ -0,0 +1,41 @@
|
|
|
1
|
+
/*
|
|
2
|
+
* Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.
|
|
3
|
+
*/
|
|
4
|
+
|
|
5
|
+
import { terminalApplicationsCreateVersion } from "../../funcs/terminalApplicationsCreateVersion.js";
|
|
6
|
+
import * as operations from "../../models/operations/index.js";
|
|
7
|
+
import { formatResult, ToolDefinition } from "../tools.js";
|
|
8
|
+
|
|
9
|
+
const args = {
|
|
10
|
+
request: operations.CreateTerminalApplicationVersionRequest$inboundSchema,
|
|
11
|
+
};
|
|
12
|
+
|
|
13
|
+
export const tool$terminalApplicationsCreateVersion: ToolDefinition<
|
|
14
|
+
typeof args
|
|
15
|
+
> = {
|
|
16
|
+
name: "terminal-applications-create-version",
|
|
17
|
+
description:
|
|
18
|
+
`Register a new version of a terminal application. For Android applications, this is used to register a new version code of the application.
|
|
19
|
+
|
|
20
|
+
To access this endpoint using an [access token](https://docs.moov.io/api/authentication/access-tokens/)
|
|
21
|
+
you'll need to specify the \`/terminal-applications.write\` scope.`,
|
|
22
|
+
args,
|
|
23
|
+
tool: async (client, args, ctx) => {
|
|
24
|
+
const [result, apiCall] = await terminalApplicationsCreateVersion(
|
|
25
|
+
client,
|
|
26
|
+
args.request,
|
|
27
|
+
{ fetchOptions: { signal: ctx.signal } },
|
|
28
|
+
).$inspect();
|
|
29
|
+
|
|
30
|
+
if (!result.ok) {
|
|
31
|
+
return {
|
|
32
|
+
content: [{ type: "text", text: result.error.message }],
|
|
33
|
+
isError: true,
|
|
34
|
+
};
|
|
35
|
+
}
|
|
36
|
+
|
|
37
|
+
const value = result.value.result;
|
|
38
|
+
|
|
39
|
+
return formatResult(value, apiCall);
|
|
40
|
+
},
|
|
41
|
+
};
|
|
@@ -0,0 +1,79 @@
|
|
|
1
|
+
/*
|
|
2
|
+
* Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.
|
|
3
|
+
*/
|
|
4
|
+
|
|
5
|
+
import * as z from "zod";
|
|
6
|
+
import { safeParse } from "../../lib/schemas.js";
|
|
7
|
+
import { Result as SafeParseResult } from "../../types/fp.js";
|
|
8
|
+
import { SDKValidationError } from "../errors/sdkvalidationerror.js";
|
|
9
|
+
|
|
10
|
+
/**
|
|
11
|
+
* Describes link between an account and a terminal application.
|
|
12
|
+
*/
|
|
13
|
+
export type AccountTerminalApplication = {
|
|
14
|
+
/**
|
|
15
|
+
* ID of the merchant account.
|
|
16
|
+
*/
|
|
17
|
+
accountID: string;
|
|
18
|
+
/**
|
|
19
|
+
* ID of the terminal application.
|
|
20
|
+
*/
|
|
21
|
+
terminalApplicationID: string;
|
|
22
|
+
};
|
|
23
|
+
|
|
24
|
+
/** @internal */
|
|
25
|
+
export const AccountTerminalApplication$inboundSchema: z.ZodType<
|
|
26
|
+
AccountTerminalApplication,
|
|
27
|
+
z.ZodTypeDef,
|
|
28
|
+
unknown
|
|
29
|
+
> = z.object({
|
|
30
|
+
accountID: z.string(),
|
|
31
|
+
terminalApplicationID: z.string(),
|
|
32
|
+
});
|
|
33
|
+
|
|
34
|
+
/** @internal */
|
|
35
|
+
export type AccountTerminalApplication$Outbound = {
|
|
36
|
+
accountID: string;
|
|
37
|
+
terminalApplicationID: string;
|
|
38
|
+
};
|
|
39
|
+
|
|
40
|
+
/** @internal */
|
|
41
|
+
export const AccountTerminalApplication$outboundSchema: z.ZodType<
|
|
42
|
+
AccountTerminalApplication$Outbound,
|
|
43
|
+
z.ZodTypeDef,
|
|
44
|
+
AccountTerminalApplication
|
|
45
|
+
> = z.object({
|
|
46
|
+
accountID: z.string(),
|
|
47
|
+
terminalApplicationID: z.string(),
|
|
48
|
+
});
|
|
49
|
+
|
|
50
|
+
/**
|
|
51
|
+
* @internal
|
|
52
|
+
* @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
|
|
53
|
+
*/
|
|
54
|
+
export namespace AccountTerminalApplication$ {
|
|
55
|
+
/** @deprecated use `AccountTerminalApplication$inboundSchema` instead. */
|
|
56
|
+
export const inboundSchema = AccountTerminalApplication$inboundSchema;
|
|
57
|
+
/** @deprecated use `AccountTerminalApplication$outboundSchema` instead. */
|
|
58
|
+
export const outboundSchema = AccountTerminalApplication$outboundSchema;
|
|
59
|
+
/** @deprecated use `AccountTerminalApplication$Outbound` instead. */
|
|
60
|
+
export type Outbound = AccountTerminalApplication$Outbound;
|
|
61
|
+
}
|
|
62
|
+
|
|
63
|
+
export function accountTerminalApplicationToJSON(
|
|
64
|
+
accountTerminalApplication: AccountTerminalApplication,
|
|
65
|
+
): string {
|
|
66
|
+
return JSON.stringify(
|
|
67
|
+
AccountTerminalApplication$outboundSchema.parse(accountTerminalApplication),
|
|
68
|
+
);
|
|
69
|
+
}
|
|
70
|
+
|
|
71
|
+
export function accountTerminalApplicationFromJSON(
|
|
72
|
+
jsonString: string,
|
|
73
|
+
): SafeParseResult<AccountTerminalApplication, SDKValidationError> {
|
|
74
|
+
return safeParse(
|
|
75
|
+
jsonString,
|
|
76
|
+
(x) => AccountTerminalApplication$inboundSchema.parse(JSON.parse(x)),
|
|
77
|
+
`Failed to parse 'AccountTerminalApplication' from JSON`,
|
|
78
|
+
);
|
|
79
|
+
}
|
|
@@ -29,11 +29,11 @@ export type CreateTerminalApplication = {
|
|
|
29
29
|
*/
|
|
30
30
|
packageName?: string | undefined;
|
|
31
31
|
/**
|
|
32
|
-
* The
|
|
32
|
+
* The SHA-256 digest of the signing key for the application. Required if platform is `android`.
|
|
33
33
|
*/
|
|
34
34
|
sha256Digest?: string | undefined;
|
|
35
35
|
/**
|
|
36
|
-
* The
|
|
36
|
+
* The version code of the Android application. Required if platform is `android`.
|
|
37
37
|
*/
|
|
38
38
|
versionCode?: string | undefined;
|
|
39
39
|
};
|
|
@@ -6,6 +6,7 @@ export * from "./account.js";
|
|
|
6
6
|
export * from "./accountcapability.js";
|
|
7
7
|
export * from "./accountcountries.js";
|
|
8
8
|
export * from "./accountnameverification.js";
|
|
9
|
+
export * from "./accountterminalapplication.js";
|
|
9
10
|
export * from "./accounttype.js";
|
|
10
11
|
export * from "./accountverificationstatus.js";
|
|
11
12
|
export * from "./achcreditsamedaypaymentmethod.js";
|
|
@@ -365,6 +366,7 @@ export * from "./taxidupdate.js";
|
|
|
365
366
|
export * from "./terminalapplication.js";
|
|
366
367
|
export * from "./terminalapplicationplatform.js";
|
|
367
368
|
export * from "./terminalapplicationstatus.js";
|
|
369
|
+
export * from "./terminalapplicationversion.js";
|
|
368
370
|
export * from "./terminalcard.js";
|
|
369
371
|
export * from "./terminalconfiguration.js";
|
|
370
372
|
export * from "./termsofservice.js";
|
|
@@ -4,22 +4,26 @@
|
|
|
4
4
|
|
|
5
5
|
import * as z from "zod";
|
|
6
6
|
import { safeParse } from "../../lib/schemas.js";
|
|
7
|
+
import { ClosedEnum } from "../../types/enums.js";
|
|
7
8
|
import { Result as SafeParseResult } from "../../types/fp.js";
|
|
8
9
|
import { SDKValidationError } from "../errors/sdkvalidationerror.js";
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
10
|
+
|
|
11
|
+
/**
|
|
12
|
+
* The type of receipt being requested.
|
|
13
|
+
*/
|
|
14
|
+
export const Kind = {
|
|
15
|
+
SaleCustomerV1: "sale.customer.v1",
|
|
16
|
+
} as const;
|
|
17
|
+
/**
|
|
18
|
+
* The type of receipt being requested.
|
|
19
|
+
*/
|
|
20
|
+
export type Kind = ClosedEnum<typeof Kind>;
|
|
14
21
|
|
|
15
22
|
/**
|
|
16
23
|
* A receipt request for a specific transfer, schedule, or schedule occurrence.
|
|
17
24
|
*/
|
|
18
25
|
export type ReceiptRequest = {
|
|
19
|
-
|
|
20
|
-
* The type of receipt being requested.
|
|
21
|
-
*/
|
|
22
|
-
kind: ReceiptKind;
|
|
26
|
+
kind: Kind;
|
|
23
27
|
/**
|
|
24
28
|
* The email address to send the receipt to.
|
|
25
29
|
*
|
|
@@ -57,13 +61,33 @@ export type ReceiptRequest = {
|
|
|
57
61
|
forOccurrenceID?: string | undefined;
|
|
58
62
|
};
|
|
59
63
|
|
|
64
|
+
/** @internal */
|
|
65
|
+
export const Kind$inboundSchema: z.ZodNativeEnum<typeof Kind> = z.nativeEnum(
|
|
66
|
+
Kind,
|
|
67
|
+
);
|
|
68
|
+
|
|
69
|
+
/** @internal */
|
|
70
|
+
export const Kind$outboundSchema: z.ZodNativeEnum<typeof Kind> =
|
|
71
|
+
Kind$inboundSchema;
|
|
72
|
+
|
|
73
|
+
/**
|
|
74
|
+
* @internal
|
|
75
|
+
* @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
|
|
76
|
+
*/
|
|
77
|
+
export namespace Kind$ {
|
|
78
|
+
/** @deprecated use `Kind$inboundSchema` instead. */
|
|
79
|
+
export const inboundSchema = Kind$inboundSchema;
|
|
80
|
+
/** @deprecated use `Kind$outboundSchema` instead. */
|
|
81
|
+
export const outboundSchema = Kind$outboundSchema;
|
|
82
|
+
}
|
|
83
|
+
|
|
60
84
|
/** @internal */
|
|
61
85
|
export const ReceiptRequest$inboundSchema: z.ZodType<
|
|
62
86
|
ReceiptRequest,
|
|
63
87
|
z.ZodTypeDef,
|
|
64
88
|
unknown
|
|
65
89
|
> = z.object({
|
|
66
|
-
kind:
|
|
90
|
+
kind: Kind$inboundSchema,
|
|
67
91
|
email: z.string().optional(),
|
|
68
92
|
emailAccountID: z.string().optional(),
|
|
69
93
|
forTransferID: z.string().optional(),
|
|
@@ -87,7 +111,7 @@ export const ReceiptRequest$outboundSchema: z.ZodType<
|
|
|
87
111
|
z.ZodTypeDef,
|
|
88
112
|
ReceiptRequest
|
|
89
113
|
> = z.object({
|
|
90
|
-
kind:
|
|
114
|
+
kind: Kind$outboundSchema,
|
|
91
115
|
email: z.string().optional(),
|
|
92
116
|
emailAccountID: z.string().optional(),
|
|
93
117
|
forTransferID: z.string().optional(),
|
|
@@ -42,11 +42,11 @@ export type TerminalApplication = {
|
|
|
42
42
|
*/
|
|
43
43
|
packageName?: string | undefined;
|
|
44
44
|
/**
|
|
45
|
-
*
|
|
45
|
+
* A cryptographic hash of the signing key for the application. Will be returned if platform is `android`.
|
|
46
46
|
*/
|
|
47
47
|
sha256Digest?: string | undefined;
|
|
48
48
|
/**
|
|
49
|
-
* The app version of the terminal application Will be returned if platform is `android`.
|
|
49
|
+
* The app version code of the terminal application. Will be returned if platform is `android`.
|
|
50
50
|
*/
|
|
51
51
|
versionCode?: string | undefined;
|
|
52
52
|
};
|
|
@@ -0,0 +1,72 @@
|
|
|
1
|
+
/*
|
|
2
|
+
* Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.
|
|
3
|
+
*/
|
|
4
|
+
|
|
5
|
+
import * as z from "zod";
|
|
6
|
+
import { safeParse } from "../../lib/schemas.js";
|
|
7
|
+
import { Result as SafeParseResult } from "../../types/fp.js";
|
|
8
|
+
import { SDKValidationError } from "../errors/sdkvalidationerror.js";
|
|
9
|
+
|
|
10
|
+
/**
|
|
11
|
+
* Describes a terminal application version.
|
|
12
|
+
*/
|
|
13
|
+
export type TerminalApplicationVersion = {
|
|
14
|
+
/**
|
|
15
|
+
* The app version of the terminal application (version code for Android terminal application).
|
|
16
|
+
*/
|
|
17
|
+
version: string;
|
|
18
|
+
};
|
|
19
|
+
|
|
20
|
+
/** @internal */
|
|
21
|
+
export const TerminalApplicationVersion$inboundSchema: z.ZodType<
|
|
22
|
+
TerminalApplicationVersion,
|
|
23
|
+
z.ZodTypeDef,
|
|
24
|
+
unknown
|
|
25
|
+
> = z.object({
|
|
26
|
+
version: z.string(),
|
|
27
|
+
});
|
|
28
|
+
|
|
29
|
+
/** @internal */
|
|
30
|
+
export type TerminalApplicationVersion$Outbound = {
|
|
31
|
+
version: string;
|
|
32
|
+
};
|
|
33
|
+
|
|
34
|
+
/** @internal */
|
|
35
|
+
export const TerminalApplicationVersion$outboundSchema: z.ZodType<
|
|
36
|
+
TerminalApplicationVersion$Outbound,
|
|
37
|
+
z.ZodTypeDef,
|
|
38
|
+
TerminalApplicationVersion
|
|
39
|
+
> = z.object({
|
|
40
|
+
version: z.string(),
|
|
41
|
+
});
|
|
42
|
+
|
|
43
|
+
/**
|
|
44
|
+
* @internal
|
|
45
|
+
* @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
|
|
46
|
+
*/
|
|
47
|
+
export namespace TerminalApplicationVersion$ {
|
|
48
|
+
/** @deprecated use `TerminalApplicationVersion$inboundSchema` instead. */
|
|
49
|
+
export const inboundSchema = TerminalApplicationVersion$inboundSchema;
|
|
50
|
+
/** @deprecated use `TerminalApplicationVersion$outboundSchema` instead. */
|
|
51
|
+
export const outboundSchema = TerminalApplicationVersion$outboundSchema;
|
|
52
|
+
/** @deprecated use `TerminalApplicationVersion$Outbound` instead. */
|
|
53
|
+
export type Outbound = TerminalApplicationVersion$Outbound;
|
|
54
|
+
}
|
|
55
|
+
|
|
56
|
+
export function terminalApplicationVersionToJSON(
|
|
57
|
+
terminalApplicationVersion: TerminalApplicationVersion,
|
|
58
|
+
): string {
|
|
59
|
+
return JSON.stringify(
|
|
60
|
+
TerminalApplicationVersion$outboundSchema.parse(terminalApplicationVersion),
|
|
61
|
+
);
|
|
62
|
+
}
|
|
63
|
+
|
|
64
|
+
export function terminalApplicationVersionFromJSON(
|
|
65
|
+
jsonString: string,
|
|
66
|
+
): SafeParseResult<TerminalApplicationVersion, SDKValidationError> {
|
|
67
|
+
return safeParse(
|
|
68
|
+
jsonString,
|
|
69
|
+
(x) => TerminalApplicationVersion$inboundSchema.parse(JSON.parse(x)),
|
|
70
|
+
`Failed to parse 'TerminalApplicationVersion' from JSON`,
|
|
71
|
+
);
|
|
72
|
+
}
|