@moovio/sdk 0.10.0 → 0.10.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 +11 -0
- package/bin/mcp-server.js +325 -135
- package/bin/mcp-server.js.map +14 -10
- package/docs/sdks/terminalconfigurations/README.md +98 -0
- package/funcs/terminalConfigurationsGet.d.ts +16 -0
- package/funcs/terminalConfigurationsGet.d.ts.map +1 -0
- package/funcs/terminalConfigurationsGet.js +124 -0
- package/funcs/terminalConfigurationsGet.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 +3 -1
- package/mcp-server/server.js.map +1 -1
- package/mcp-server/tools/terminalConfigurationsGet.d.ts +8 -0
- package/mcp-server/tools/terminalConfigurationsGet.d.ts.map +1 -0
- package/mcp-server/tools/terminalConfigurationsGet.js +65 -0
- package/mcp-server/tools/terminalConfigurationsGet.js.map +1 -0
- package/models/components/accountnameverification.d.ts +8 -8
- package/models/components/accountnameverification.d.ts.map +1 -1
- package/models/components/accountnameverification.js +8 -8
- package/models/components/accountnameverification.js.map +1 -1
- package/models/components/cardverification.d.ts +2 -2
- package/models/components/cardverification.d.ts.map +1 -1
- package/models/components/cardverification.js +2 -2
- package/models/components/cardverification.js.map +1 -1
- package/models/components/index.d.ts +1 -0
- package/models/components/index.d.ts.map +1 -1
- package/models/components/index.js +1 -0
- package/models/components/index.js.map +1 -1
- package/models/components/terminalconfiguration.d.ts +32 -0
- package/models/components/terminalconfiguration.d.ts.map +1 -0
- package/models/components/terminalconfiguration.js +69 -0
- package/models/components/terminalconfiguration.js.map +1 -0
- package/models/operations/getterminalconfiguration.d.ts +101 -0
- package/models/operations/getterminalconfiguration.d.ts.map +1 -0
- package/models/operations/getterminalconfiguration.js +147 -0
- package/models/operations/getterminalconfiguration.js.map +1 -0
- 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/package.json +1 -1
- 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/terminalconfigurations.d.ts +12 -0
- package/sdk/terminalconfigurations.d.ts.map +1 -0
- package/sdk/terminalconfigurations.js +22 -0
- package/sdk/terminalconfigurations.js.map +1 -0
- package/src/funcs/terminalConfigurationsGet.ts +181 -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/terminalConfigurationsGet.ts +38 -0
- package/src/models/components/accountnameverification.ts +16 -16
- package/src/models/components/cardverification.ts +4 -4
- package/src/models/components/index.ts +1 -0
- package/src/models/components/terminalconfiguration.ts +69 -0
- package/src/models/operations/getterminalconfiguration.ts +229 -0
- package/src/models/operations/index.ts +1 -0
- package/src/sdk/sdk.ts +8 -0
- package/src/sdk/terminalconfigurations.ts +27 -0
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
/*
|
|
3
|
+
* Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.
|
|
4
|
+
*/
|
|
5
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
6
|
+
exports.TerminalConfigurations = void 0;
|
|
7
|
+
const terminalConfigurationsGet_js_1 = require("../funcs/terminalConfigurationsGet.js");
|
|
8
|
+
const sdks_js_1 = require("../lib/sdks.js");
|
|
9
|
+
const fp_js_1 = require("../types/fp.js");
|
|
10
|
+
class TerminalConfigurations extends sdks_js_1.ClientSDK {
|
|
11
|
+
/**
|
|
12
|
+
* Fetch the configuration for a given Terminal Application
|
|
13
|
+
*
|
|
14
|
+
* To access this endpoint using an [access token](https://docs.moov.io/api/authentication/access-tokens/)
|
|
15
|
+
* you'll need to specify the `/accounts/{accountID}/terminal-configuration.read` scope.
|
|
16
|
+
*/
|
|
17
|
+
async get(request, options) {
|
|
18
|
+
return (0, fp_js_1.unwrapAsync)((0, terminalConfigurationsGet_js_1.terminalConfigurationsGet)(this, request, options));
|
|
19
|
+
}
|
|
20
|
+
}
|
|
21
|
+
exports.TerminalConfigurations = TerminalConfigurations;
|
|
22
|
+
//# sourceMappingURL=terminalconfigurations.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"terminalconfigurations.js","sourceRoot":"","sources":["../src/sdk/terminalconfigurations.ts"],"names":[],"mappings":";AAAA;;GAEG;;;AAEH,wFAAkF;AAClF,4CAA2D;AAE3D,0CAA6C;AAE7C,MAAa,sBAAuB,SAAQ,mBAAS;IACnD;;;;;OAKG;IACH,KAAK,CAAC,GAAG,CACP,OAAmD,EACnD,OAAwB;QAExB,OAAO,IAAA,mBAAW,EAAC,IAAA,wDAAyB,EAC1C,IAAI,EACJ,OAAO,EACP,OAAO,CACR,CAAC,CAAC;IACL,CAAC;CACF;AAjBD,wDAiBC"}
|
|
@@ -0,0 +1,181 @@
|
|
|
1
|
+
/*
|
|
2
|
+
* Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.
|
|
3
|
+
*/
|
|
4
|
+
|
|
5
|
+
import { MoovCore } 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 { APIError } from "../models/errors/apierror.js";
|
|
14
|
+
import {
|
|
15
|
+
ConnectionError,
|
|
16
|
+
InvalidRequestError,
|
|
17
|
+
RequestAbortedError,
|
|
18
|
+
RequestTimeoutError,
|
|
19
|
+
UnexpectedClientError,
|
|
20
|
+
} from "../models/errors/httpclienterrors.js";
|
|
21
|
+
import { SDKValidationError } from "../models/errors/sdkvalidationerror.js";
|
|
22
|
+
import * as operations from "../models/operations/index.js";
|
|
23
|
+
import { APICall, APIPromise } from "../types/async.js";
|
|
24
|
+
import { Result } from "../types/fp.js";
|
|
25
|
+
|
|
26
|
+
/**
|
|
27
|
+
* Fetch the configuration for a given Terminal Application
|
|
28
|
+
*
|
|
29
|
+
* To access this endpoint using an [access token](https://docs.moov.io/api/authentication/access-tokens/)
|
|
30
|
+
* you'll need to specify the `/accounts/{accountID}/terminal-configuration.read` scope.
|
|
31
|
+
*/
|
|
32
|
+
export function terminalConfigurationsGet(
|
|
33
|
+
client: MoovCore,
|
|
34
|
+
request: operations.GetTerminalConfigurationRequest,
|
|
35
|
+
options?: RequestOptions,
|
|
36
|
+
): APIPromise<
|
|
37
|
+
Result<
|
|
38
|
+
operations.GetTerminalConfigurationResponse,
|
|
39
|
+
| APIError
|
|
40
|
+
| SDKValidationError
|
|
41
|
+
| UnexpectedClientError
|
|
42
|
+
| InvalidRequestError
|
|
43
|
+
| RequestAbortedError
|
|
44
|
+
| RequestTimeoutError
|
|
45
|
+
| ConnectionError
|
|
46
|
+
>
|
|
47
|
+
> {
|
|
48
|
+
return new APIPromise($do(
|
|
49
|
+
client,
|
|
50
|
+
request,
|
|
51
|
+
options,
|
|
52
|
+
));
|
|
53
|
+
}
|
|
54
|
+
|
|
55
|
+
async function $do(
|
|
56
|
+
client: MoovCore,
|
|
57
|
+
request: operations.GetTerminalConfigurationRequest,
|
|
58
|
+
options?: RequestOptions,
|
|
59
|
+
): Promise<
|
|
60
|
+
[
|
|
61
|
+
Result<
|
|
62
|
+
operations.GetTerminalConfigurationResponse,
|
|
63
|
+
| APIError
|
|
64
|
+
| SDKValidationError
|
|
65
|
+
| UnexpectedClientError
|
|
66
|
+
| InvalidRequestError
|
|
67
|
+
| RequestAbortedError
|
|
68
|
+
| RequestTimeoutError
|
|
69
|
+
| ConnectionError
|
|
70
|
+
>,
|
|
71
|
+
APICall,
|
|
72
|
+
]
|
|
73
|
+
> {
|
|
74
|
+
const parsed = safeParse(
|
|
75
|
+
request,
|
|
76
|
+
(value) =>
|
|
77
|
+
operations.GetTerminalConfigurationRequest$outboundSchema.parse(value),
|
|
78
|
+
"Input validation failed",
|
|
79
|
+
);
|
|
80
|
+
if (!parsed.ok) {
|
|
81
|
+
return [parsed, { status: "invalid" }];
|
|
82
|
+
}
|
|
83
|
+
const payload = parsed.value;
|
|
84
|
+
const body = null;
|
|
85
|
+
|
|
86
|
+
const pathParams = {
|
|
87
|
+
accountID: encodeSimple("accountID", payload.accountID, {
|
|
88
|
+
explode: false,
|
|
89
|
+
charEncoding: "percent",
|
|
90
|
+
}),
|
|
91
|
+
terminalApplicationID: encodeSimple(
|
|
92
|
+
"terminalApplicationID",
|
|
93
|
+
payload.terminalApplicationID,
|
|
94
|
+
{ explode: false, charEncoding: "percent" },
|
|
95
|
+
),
|
|
96
|
+
};
|
|
97
|
+
|
|
98
|
+
const path = pathToFunc(
|
|
99
|
+
"/accounts/{accountID}/terminal-applications/{terminalApplicationID}/configuration",
|
|
100
|
+
)(pathParams);
|
|
101
|
+
|
|
102
|
+
const headers = new Headers(compactMap({
|
|
103
|
+
Accept: "application/json",
|
|
104
|
+
"x-moov-version": encodeSimple(
|
|
105
|
+
"x-moov-version",
|
|
106
|
+
client._options.xMoovVersion,
|
|
107
|
+
{ explode: false, charEncoding: "none" },
|
|
108
|
+
),
|
|
109
|
+
}));
|
|
110
|
+
|
|
111
|
+
const securityInput = await extractSecurity(client._options.security);
|
|
112
|
+
const requestSecurity = resolveGlobalSecurity(securityInput);
|
|
113
|
+
|
|
114
|
+
const context = {
|
|
115
|
+
baseURL: options?.serverURL ?? client._baseURL ?? "",
|
|
116
|
+
operationID: "getTerminalConfiguration",
|
|
117
|
+
oAuth2Scopes: [],
|
|
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
|
+
body: body,
|
|
135
|
+
timeoutMs: options?.timeoutMs || client._options.timeoutMs || -1,
|
|
136
|
+
}, options);
|
|
137
|
+
if (!requestRes.ok) {
|
|
138
|
+
return [requestRes, { status: "invalid" }];
|
|
139
|
+
}
|
|
140
|
+
const req = requestRes.value;
|
|
141
|
+
|
|
142
|
+
const doResult = await client._do(req, {
|
|
143
|
+
context,
|
|
144
|
+
errorCodes: ["401", "403", "404", "429", "4XX", "500", "504", "5XX"],
|
|
145
|
+
retryConfig: context.retryConfig,
|
|
146
|
+
retryCodes: context.retryCodes,
|
|
147
|
+
});
|
|
148
|
+
if (!doResult.ok) {
|
|
149
|
+
return [doResult, { status: "request-error", request: req }];
|
|
150
|
+
}
|
|
151
|
+
const response = doResult.value;
|
|
152
|
+
|
|
153
|
+
const responseFields = {
|
|
154
|
+
HttpMeta: { Response: response, Request: req },
|
|
155
|
+
};
|
|
156
|
+
|
|
157
|
+
const [result] = await M.match<
|
|
158
|
+
operations.GetTerminalConfigurationResponse,
|
|
159
|
+
| APIError
|
|
160
|
+
| SDKValidationError
|
|
161
|
+
| UnexpectedClientError
|
|
162
|
+
| InvalidRequestError
|
|
163
|
+
| RequestAbortedError
|
|
164
|
+
| RequestTimeoutError
|
|
165
|
+
| ConnectionError
|
|
166
|
+
>(
|
|
167
|
+
M.json(200, operations.GetTerminalConfigurationResponse$inboundSchema, {
|
|
168
|
+
hdrs: true,
|
|
169
|
+
key: "Result",
|
|
170
|
+
}),
|
|
171
|
+
M.fail([401, 403, 404, 429]),
|
|
172
|
+
M.fail([500, 504]),
|
|
173
|
+
M.fail("4XX"),
|
|
174
|
+
M.fail("5XX"),
|
|
175
|
+
)(response, { extraFields: responseFields });
|
|
176
|
+
if (!result.ok) {
|
|
177
|
+
return [result, { status: "complete", request: req, response }];
|
|
178
|
+
}
|
|
179
|
+
|
|
180
|
+
return [result, { status: "complete", request: req, response }];
|
|
181
|
+
}
|
package/src/lib/config.ts
CHANGED
|
@@ -69,7 +69,7 @@ export function serverURLFromOptions(options: SDKOptions): URL | null {
|
|
|
69
69
|
export const SDK_METADATA = {
|
|
70
70
|
language: "typescript",
|
|
71
71
|
openapiDocVersion: "latest",
|
|
72
|
-
sdkVersion: "0.10.
|
|
73
|
-
genVersion: "2.
|
|
74
|
-
userAgent: "speakeasy-sdk/typescript 0.10.
|
|
72
|
+
sdkVersion: "0.10.2",
|
|
73
|
+
genVersion: "2.559.0",
|
|
74
|
+
userAgent: "speakeasy-sdk/typescript 0.10.2 2.559.0 latest @moovio/sdk",
|
|
75
75
|
} as const;
|
package/src/mcp-server/server.ts
CHANGED
|
@@ -127,6 +127,7 @@ import { tool$terminalApplicationsCreate } from "./tools/terminalApplicationsCre
|
|
|
127
127
|
import { tool$terminalApplicationsDelete } from "./tools/terminalApplicationsDelete.js";
|
|
128
128
|
import { tool$terminalApplicationsGet } from "./tools/terminalApplicationsGet.js";
|
|
129
129
|
import { tool$terminalApplicationsList } from "./tools/terminalApplicationsList.js";
|
|
130
|
+
import { tool$terminalConfigurationsGet } from "./tools/terminalConfigurationsGet.js";
|
|
130
131
|
import { tool$transfersCreate } from "./tools/transfersCreate.js";
|
|
131
132
|
import { tool$transfersCreateCancellation } from "./tools/transfersCreateCancellation.js";
|
|
132
133
|
import { tool$transfersCreateReversal } from "./tools/transfersCreateReversal.js";
|
|
@@ -156,7 +157,7 @@ export function createMCPServer(deps: {
|
|
|
156
157
|
}) {
|
|
157
158
|
const server = new McpServer({
|
|
158
159
|
name: "Moov",
|
|
159
|
-
version: "0.10.
|
|
160
|
+
version: "0.10.2",
|
|
160
161
|
});
|
|
161
162
|
|
|
162
163
|
const client = new MoovCore({
|
|
@@ -271,6 +272,7 @@ export function createMCPServer(deps: {
|
|
|
271
272
|
tool(tool$sweepsUpdateConfig);
|
|
272
273
|
tool(tool$sweepsList);
|
|
273
274
|
tool(tool$sweepsGet);
|
|
275
|
+
tool(tool$terminalConfigurationsGet);
|
|
274
276
|
tool(tool$transfersCreate);
|
|
275
277
|
tool(tool$transfersList);
|
|
276
278
|
tool(tool$transfersGet);
|
|
@@ -0,0 +1,38 @@
|
|
|
1
|
+
/*
|
|
2
|
+
* Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.
|
|
3
|
+
*/
|
|
4
|
+
|
|
5
|
+
import { terminalConfigurationsGet } from "../../funcs/terminalConfigurationsGet.js";
|
|
6
|
+
import * as operations from "../../models/operations/index.js";
|
|
7
|
+
import { formatResult, ToolDefinition } from "../tools.js";
|
|
8
|
+
|
|
9
|
+
const args = {
|
|
10
|
+
request: operations.GetTerminalConfigurationRequest$inboundSchema,
|
|
11
|
+
};
|
|
12
|
+
|
|
13
|
+
export const tool$terminalConfigurationsGet: ToolDefinition<typeof args> = {
|
|
14
|
+
name: "terminal-configurations-get",
|
|
15
|
+
description: `Fetch the configuration for a given Terminal Application
|
|
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}/terminal-configuration.read\` scope.`,
|
|
19
|
+
args,
|
|
20
|
+
tool: async (client, args, ctx) => {
|
|
21
|
+
const [result, apiCall] = await terminalConfigurationsGet(
|
|
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
|
+
};
|
|
@@ -16,10 +16,10 @@ import {
|
|
|
16
16
|
* The results of submitting cardholder name to a card network for verification.
|
|
17
17
|
*/
|
|
18
18
|
export type AccountNameVerification = {
|
|
19
|
-
firstName
|
|
20
|
-
lastName
|
|
21
|
-
middleName
|
|
22
|
-
fullName
|
|
19
|
+
firstName?: CardVerificationResult | undefined;
|
|
20
|
+
lastName?: CardVerificationResult | undefined;
|
|
21
|
+
middleName?: CardVerificationResult | undefined;
|
|
22
|
+
fullName?: CardVerificationResult | undefined;
|
|
23
23
|
};
|
|
24
24
|
|
|
25
25
|
/** @internal */
|
|
@@ -28,18 +28,18 @@ export const AccountNameVerification$inboundSchema: z.ZodType<
|
|
|
28
28
|
z.ZodTypeDef,
|
|
29
29
|
unknown
|
|
30
30
|
> = z.object({
|
|
31
|
-
firstName: CardVerificationResult$inboundSchema,
|
|
32
|
-
lastName: CardVerificationResult$inboundSchema,
|
|
33
|
-
middleName: CardVerificationResult$inboundSchema,
|
|
34
|
-
fullName: CardVerificationResult$inboundSchema,
|
|
31
|
+
firstName: CardVerificationResult$inboundSchema.optional(),
|
|
32
|
+
lastName: CardVerificationResult$inboundSchema.optional(),
|
|
33
|
+
middleName: CardVerificationResult$inboundSchema.optional(),
|
|
34
|
+
fullName: CardVerificationResult$inboundSchema.optional(),
|
|
35
35
|
});
|
|
36
36
|
|
|
37
37
|
/** @internal */
|
|
38
38
|
export type AccountNameVerification$Outbound = {
|
|
39
|
-
firstName
|
|
40
|
-
lastName
|
|
41
|
-
middleName
|
|
42
|
-
fullName
|
|
39
|
+
firstName?: string | undefined;
|
|
40
|
+
lastName?: string | undefined;
|
|
41
|
+
middleName?: string | undefined;
|
|
42
|
+
fullName?: string | undefined;
|
|
43
43
|
};
|
|
44
44
|
|
|
45
45
|
/** @internal */
|
|
@@ -48,10 +48,10 @@ export const AccountNameVerification$outboundSchema: z.ZodType<
|
|
|
48
48
|
z.ZodTypeDef,
|
|
49
49
|
AccountNameVerification
|
|
50
50
|
> = z.object({
|
|
51
|
-
firstName: CardVerificationResult$outboundSchema,
|
|
52
|
-
lastName: CardVerificationResult$outboundSchema,
|
|
53
|
-
middleName: CardVerificationResult$outboundSchema,
|
|
54
|
-
fullName: CardVerificationResult$outboundSchema,
|
|
51
|
+
firstName: CardVerificationResult$outboundSchema.optional(),
|
|
52
|
+
lastName: CardVerificationResult$outboundSchema.optional(),
|
|
53
|
+
middleName: CardVerificationResult$outboundSchema.optional(),
|
|
54
|
+
fullName: CardVerificationResult$outboundSchema.optional(),
|
|
55
55
|
});
|
|
56
56
|
|
|
57
57
|
/**
|
|
@@ -28,7 +28,7 @@ export type CardVerification = {
|
|
|
28
28
|
/**
|
|
29
29
|
* The results of submitting cardholder name to a card network for verification.
|
|
30
30
|
*/
|
|
31
|
-
accountName
|
|
31
|
+
accountName?: AccountNameVerification | undefined;
|
|
32
32
|
};
|
|
33
33
|
|
|
34
34
|
/** @internal */
|
|
@@ -40,7 +40,7 @@ export const CardVerification$inboundSchema: z.ZodType<
|
|
|
40
40
|
cvv: CardVerificationResult$inboundSchema,
|
|
41
41
|
addressLine1: CardVerificationResult$inboundSchema,
|
|
42
42
|
postalCode: CardVerificationResult$inboundSchema,
|
|
43
|
-
accountName: AccountNameVerification$inboundSchema,
|
|
43
|
+
accountName: AccountNameVerification$inboundSchema.optional(),
|
|
44
44
|
});
|
|
45
45
|
|
|
46
46
|
/** @internal */
|
|
@@ -48,7 +48,7 @@ export type CardVerification$Outbound = {
|
|
|
48
48
|
cvv: string;
|
|
49
49
|
addressLine1: string;
|
|
50
50
|
postalCode: string;
|
|
51
|
-
accountName
|
|
51
|
+
accountName?: AccountNameVerification$Outbound | undefined;
|
|
52
52
|
};
|
|
53
53
|
|
|
54
54
|
/** @internal */
|
|
@@ -60,7 +60,7 @@ export const CardVerification$outboundSchema: z.ZodType<
|
|
|
60
60
|
cvv: CardVerificationResult$outboundSchema,
|
|
61
61
|
addressLine1: CardVerificationResult$outboundSchema,
|
|
62
62
|
postalCode: CardVerificationResult$outboundSchema,
|
|
63
|
-
accountName: AccountNameVerification$outboundSchema,
|
|
63
|
+
accountName: AccountNameVerification$outboundSchema.optional(),
|
|
64
64
|
});
|
|
65
65
|
|
|
66
66
|
/**
|
|
@@ -319,6 +319,7 @@ export * from "./terminalapplication.js";
|
|
|
319
319
|
export * from "./terminalapplicationplatform.js";
|
|
320
320
|
export * from "./terminalapplicationstatus.js";
|
|
321
321
|
export * from "./terminalcard.js";
|
|
322
|
+
export * from "./terminalconfiguration.js";
|
|
322
323
|
export * from "./termsofservice.js";
|
|
323
324
|
export * from "./termsofserviceerror.js";
|
|
324
325
|
export * from "./termsofservicetoken.js";
|
|
@@ -0,0 +1,69 @@
|
|
|
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 configuration.
|
|
12
|
+
*/
|
|
13
|
+
export type TerminalConfiguration = {
|
|
14
|
+
configuration: string;
|
|
15
|
+
};
|
|
16
|
+
|
|
17
|
+
/** @internal */
|
|
18
|
+
export const TerminalConfiguration$inboundSchema: z.ZodType<
|
|
19
|
+
TerminalConfiguration,
|
|
20
|
+
z.ZodTypeDef,
|
|
21
|
+
unknown
|
|
22
|
+
> = z.object({
|
|
23
|
+
configuration: z.string(),
|
|
24
|
+
});
|
|
25
|
+
|
|
26
|
+
/** @internal */
|
|
27
|
+
export type TerminalConfiguration$Outbound = {
|
|
28
|
+
configuration: string;
|
|
29
|
+
};
|
|
30
|
+
|
|
31
|
+
/** @internal */
|
|
32
|
+
export const TerminalConfiguration$outboundSchema: z.ZodType<
|
|
33
|
+
TerminalConfiguration$Outbound,
|
|
34
|
+
z.ZodTypeDef,
|
|
35
|
+
TerminalConfiguration
|
|
36
|
+
> = z.object({
|
|
37
|
+
configuration: z.string(),
|
|
38
|
+
});
|
|
39
|
+
|
|
40
|
+
/**
|
|
41
|
+
* @internal
|
|
42
|
+
* @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
|
|
43
|
+
*/
|
|
44
|
+
export namespace TerminalConfiguration$ {
|
|
45
|
+
/** @deprecated use `TerminalConfiguration$inboundSchema` instead. */
|
|
46
|
+
export const inboundSchema = TerminalConfiguration$inboundSchema;
|
|
47
|
+
/** @deprecated use `TerminalConfiguration$outboundSchema` instead. */
|
|
48
|
+
export const outboundSchema = TerminalConfiguration$outboundSchema;
|
|
49
|
+
/** @deprecated use `TerminalConfiguration$Outbound` instead. */
|
|
50
|
+
export type Outbound = TerminalConfiguration$Outbound;
|
|
51
|
+
}
|
|
52
|
+
|
|
53
|
+
export function terminalConfigurationToJSON(
|
|
54
|
+
terminalConfiguration: TerminalConfiguration,
|
|
55
|
+
): string {
|
|
56
|
+
return JSON.stringify(
|
|
57
|
+
TerminalConfiguration$outboundSchema.parse(terminalConfiguration),
|
|
58
|
+
);
|
|
59
|
+
}
|
|
60
|
+
|
|
61
|
+
export function terminalConfigurationFromJSON(
|
|
62
|
+
jsonString: string,
|
|
63
|
+
): SafeParseResult<TerminalConfiguration, SDKValidationError> {
|
|
64
|
+
return safeParse(
|
|
65
|
+
jsonString,
|
|
66
|
+
(x) => TerminalConfiguration$inboundSchema.parse(JSON.parse(x)),
|
|
67
|
+
`Failed to parse 'TerminalConfiguration' from JSON`,
|
|
68
|
+
);
|
|
69
|
+
}
|