@moovio/sdk 0.10.0 → 0.10.1
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 +315 -125
- package/bin/mcp-server.js.map +12 -8
- 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/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/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,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.1",
|
|
73
|
+
genVersion: "2.559.0",
|
|
74
|
+
userAgent: "speakeasy-sdk/typescript 0.10.1 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.1",
|
|
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
|
+
};
|
|
@@ -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
|
+
}
|
|
@@ -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 GetTerminalConfigurationGlobals = {
|
|
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 GetTerminalConfigurationRequest = {
|
|
30
|
+
accountID: string;
|
|
31
|
+
terminalApplicationID: string;
|
|
32
|
+
};
|
|
33
|
+
|
|
34
|
+
export type GetTerminalConfigurationResponse = {
|
|
35
|
+
headers: { [k: string]: Array<string> };
|
|
36
|
+
result: components.TerminalConfiguration;
|
|
37
|
+
};
|
|
38
|
+
|
|
39
|
+
/** @internal */
|
|
40
|
+
export const GetTerminalConfigurationGlobals$inboundSchema: z.ZodType<
|
|
41
|
+
GetTerminalConfigurationGlobals,
|
|
42
|
+
z.ZodTypeDef,
|
|
43
|
+
unknown
|
|
44
|
+
> = z.object({
|
|
45
|
+
"x-moov-version": z.string().default("v2024.01.00"),
|
|
46
|
+
}).transform((v) => {
|
|
47
|
+
return remap$(v, {
|
|
48
|
+
"x-moov-version": "xMoovVersion",
|
|
49
|
+
});
|
|
50
|
+
});
|
|
51
|
+
|
|
52
|
+
/** @internal */
|
|
53
|
+
export type GetTerminalConfigurationGlobals$Outbound = {
|
|
54
|
+
"x-moov-version": string;
|
|
55
|
+
};
|
|
56
|
+
|
|
57
|
+
/** @internal */
|
|
58
|
+
export const GetTerminalConfigurationGlobals$outboundSchema: z.ZodType<
|
|
59
|
+
GetTerminalConfigurationGlobals$Outbound,
|
|
60
|
+
z.ZodTypeDef,
|
|
61
|
+
GetTerminalConfigurationGlobals
|
|
62
|
+
> = z.object({
|
|
63
|
+
xMoovVersion: z.string().default("v2024.01.00"),
|
|
64
|
+
}).transform((v) => {
|
|
65
|
+
return remap$(v, {
|
|
66
|
+
xMoovVersion: "x-moov-version",
|
|
67
|
+
});
|
|
68
|
+
});
|
|
69
|
+
|
|
70
|
+
/**
|
|
71
|
+
* @internal
|
|
72
|
+
* @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
|
|
73
|
+
*/
|
|
74
|
+
export namespace GetTerminalConfigurationGlobals$ {
|
|
75
|
+
/** @deprecated use `GetTerminalConfigurationGlobals$inboundSchema` instead. */
|
|
76
|
+
export const inboundSchema = GetTerminalConfigurationGlobals$inboundSchema;
|
|
77
|
+
/** @deprecated use `GetTerminalConfigurationGlobals$outboundSchema` instead. */
|
|
78
|
+
export const outboundSchema = GetTerminalConfigurationGlobals$outboundSchema;
|
|
79
|
+
/** @deprecated use `GetTerminalConfigurationGlobals$Outbound` instead. */
|
|
80
|
+
export type Outbound = GetTerminalConfigurationGlobals$Outbound;
|
|
81
|
+
}
|
|
82
|
+
|
|
83
|
+
export function getTerminalConfigurationGlobalsToJSON(
|
|
84
|
+
getTerminalConfigurationGlobals: GetTerminalConfigurationGlobals,
|
|
85
|
+
): string {
|
|
86
|
+
return JSON.stringify(
|
|
87
|
+
GetTerminalConfigurationGlobals$outboundSchema.parse(
|
|
88
|
+
getTerminalConfigurationGlobals,
|
|
89
|
+
),
|
|
90
|
+
);
|
|
91
|
+
}
|
|
92
|
+
|
|
93
|
+
export function getTerminalConfigurationGlobalsFromJSON(
|
|
94
|
+
jsonString: string,
|
|
95
|
+
): SafeParseResult<GetTerminalConfigurationGlobals, SDKValidationError> {
|
|
96
|
+
return safeParse(
|
|
97
|
+
jsonString,
|
|
98
|
+
(x) => GetTerminalConfigurationGlobals$inboundSchema.parse(JSON.parse(x)),
|
|
99
|
+
`Failed to parse 'GetTerminalConfigurationGlobals' from JSON`,
|
|
100
|
+
);
|
|
101
|
+
}
|
|
102
|
+
|
|
103
|
+
/** @internal */
|
|
104
|
+
export const GetTerminalConfigurationRequest$inboundSchema: z.ZodType<
|
|
105
|
+
GetTerminalConfigurationRequest,
|
|
106
|
+
z.ZodTypeDef,
|
|
107
|
+
unknown
|
|
108
|
+
> = z.object({
|
|
109
|
+
accountID: z.string(),
|
|
110
|
+
terminalApplicationID: z.string(),
|
|
111
|
+
});
|
|
112
|
+
|
|
113
|
+
/** @internal */
|
|
114
|
+
export type GetTerminalConfigurationRequest$Outbound = {
|
|
115
|
+
accountID: string;
|
|
116
|
+
terminalApplicationID: string;
|
|
117
|
+
};
|
|
118
|
+
|
|
119
|
+
/** @internal */
|
|
120
|
+
export const GetTerminalConfigurationRequest$outboundSchema: z.ZodType<
|
|
121
|
+
GetTerminalConfigurationRequest$Outbound,
|
|
122
|
+
z.ZodTypeDef,
|
|
123
|
+
GetTerminalConfigurationRequest
|
|
124
|
+
> = z.object({
|
|
125
|
+
accountID: z.string(),
|
|
126
|
+
terminalApplicationID: z.string(),
|
|
127
|
+
});
|
|
128
|
+
|
|
129
|
+
/**
|
|
130
|
+
* @internal
|
|
131
|
+
* @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
|
|
132
|
+
*/
|
|
133
|
+
export namespace GetTerminalConfigurationRequest$ {
|
|
134
|
+
/** @deprecated use `GetTerminalConfigurationRequest$inboundSchema` instead. */
|
|
135
|
+
export const inboundSchema = GetTerminalConfigurationRequest$inboundSchema;
|
|
136
|
+
/** @deprecated use `GetTerminalConfigurationRequest$outboundSchema` instead. */
|
|
137
|
+
export const outboundSchema = GetTerminalConfigurationRequest$outboundSchema;
|
|
138
|
+
/** @deprecated use `GetTerminalConfigurationRequest$Outbound` instead. */
|
|
139
|
+
export type Outbound = GetTerminalConfigurationRequest$Outbound;
|
|
140
|
+
}
|
|
141
|
+
|
|
142
|
+
export function getTerminalConfigurationRequestToJSON(
|
|
143
|
+
getTerminalConfigurationRequest: GetTerminalConfigurationRequest,
|
|
144
|
+
): string {
|
|
145
|
+
return JSON.stringify(
|
|
146
|
+
GetTerminalConfigurationRequest$outboundSchema.parse(
|
|
147
|
+
getTerminalConfigurationRequest,
|
|
148
|
+
),
|
|
149
|
+
);
|
|
150
|
+
}
|
|
151
|
+
|
|
152
|
+
export function getTerminalConfigurationRequestFromJSON(
|
|
153
|
+
jsonString: string,
|
|
154
|
+
): SafeParseResult<GetTerminalConfigurationRequest, SDKValidationError> {
|
|
155
|
+
return safeParse(
|
|
156
|
+
jsonString,
|
|
157
|
+
(x) => GetTerminalConfigurationRequest$inboundSchema.parse(JSON.parse(x)),
|
|
158
|
+
`Failed to parse 'GetTerminalConfigurationRequest' from JSON`,
|
|
159
|
+
);
|
|
160
|
+
}
|
|
161
|
+
|
|
162
|
+
/** @internal */
|
|
163
|
+
export const GetTerminalConfigurationResponse$inboundSchema: z.ZodType<
|
|
164
|
+
GetTerminalConfigurationResponse,
|
|
165
|
+
z.ZodTypeDef,
|
|
166
|
+
unknown
|
|
167
|
+
> = z.object({
|
|
168
|
+
Headers: z.record(z.array(z.string())),
|
|
169
|
+
Result: components.TerminalConfiguration$inboundSchema,
|
|
170
|
+
}).transform((v) => {
|
|
171
|
+
return remap$(v, {
|
|
172
|
+
"Headers": "headers",
|
|
173
|
+
"Result": "result",
|
|
174
|
+
});
|
|
175
|
+
});
|
|
176
|
+
|
|
177
|
+
/** @internal */
|
|
178
|
+
export type GetTerminalConfigurationResponse$Outbound = {
|
|
179
|
+
Headers: { [k: string]: Array<string> };
|
|
180
|
+
Result: components.TerminalConfiguration$Outbound;
|
|
181
|
+
};
|
|
182
|
+
|
|
183
|
+
/** @internal */
|
|
184
|
+
export const GetTerminalConfigurationResponse$outboundSchema: z.ZodType<
|
|
185
|
+
GetTerminalConfigurationResponse$Outbound,
|
|
186
|
+
z.ZodTypeDef,
|
|
187
|
+
GetTerminalConfigurationResponse
|
|
188
|
+
> = z.object({
|
|
189
|
+
headers: z.record(z.array(z.string())),
|
|
190
|
+
result: components.TerminalConfiguration$outboundSchema,
|
|
191
|
+
}).transform((v) => {
|
|
192
|
+
return remap$(v, {
|
|
193
|
+
headers: "Headers",
|
|
194
|
+
result: "Result",
|
|
195
|
+
});
|
|
196
|
+
});
|
|
197
|
+
|
|
198
|
+
/**
|
|
199
|
+
* @internal
|
|
200
|
+
* @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
|
|
201
|
+
*/
|
|
202
|
+
export namespace GetTerminalConfigurationResponse$ {
|
|
203
|
+
/** @deprecated use `GetTerminalConfigurationResponse$inboundSchema` instead. */
|
|
204
|
+
export const inboundSchema = GetTerminalConfigurationResponse$inboundSchema;
|
|
205
|
+
/** @deprecated use `GetTerminalConfigurationResponse$outboundSchema` instead. */
|
|
206
|
+
export const outboundSchema = GetTerminalConfigurationResponse$outboundSchema;
|
|
207
|
+
/** @deprecated use `GetTerminalConfigurationResponse$Outbound` instead. */
|
|
208
|
+
export type Outbound = GetTerminalConfigurationResponse$Outbound;
|
|
209
|
+
}
|
|
210
|
+
|
|
211
|
+
export function getTerminalConfigurationResponseToJSON(
|
|
212
|
+
getTerminalConfigurationResponse: GetTerminalConfigurationResponse,
|
|
213
|
+
): string {
|
|
214
|
+
return JSON.stringify(
|
|
215
|
+
GetTerminalConfigurationResponse$outboundSchema.parse(
|
|
216
|
+
getTerminalConfigurationResponse,
|
|
217
|
+
),
|
|
218
|
+
);
|
|
219
|
+
}
|
|
220
|
+
|
|
221
|
+
export function getTerminalConfigurationResponseFromJSON(
|
|
222
|
+
jsonString: string,
|
|
223
|
+
): SafeParseResult<GetTerminalConfigurationResponse, SDKValidationError> {
|
|
224
|
+
return safeParse(
|
|
225
|
+
jsonString,
|
|
226
|
+
(x) => GetTerminalConfigurationResponse$inboundSchema.parse(JSON.parse(x)),
|
|
227
|
+
`Failed to parse 'GetTerminalConfigurationResponse' from JSON`,
|
|
228
|
+
);
|
|
229
|
+
}
|
|
@@ -65,6 +65,7 @@ export * from "./getschedules.js";
|
|
|
65
65
|
export * from "./getsweep.js";
|
|
66
66
|
export * from "./getsweepconfig.js";
|
|
67
67
|
export * from "./getterminalapplication.js";
|
|
68
|
+
export * from "./getterminalconfiguration.js";
|
|
68
69
|
export * from "./gettermsofservicetoken.js";
|
|
69
70
|
export * from "./gettransfer.js";
|
|
70
71
|
export * from "./getunderwriting.js";
|
package/src/sdk/sdk.ts
CHANGED
|
@@ -31,6 +31,7 @@ import { Representatives } from "./representatives.js";
|
|
|
31
31
|
import { Scheduling } from "./scheduling.js";
|
|
32
32
|
import { Sweeps } from "./sweeps.js";
|
|
33
33
|
import { TerminalApplications } from "./terminalapplications.js";
|
|
34
|
+
import { TerminalConfigurations } from "./terminalconfigurations.js";
|
|
34
35
|
import { Transfers } from "./transfers.js";
|
|
35
36
|
import { Underwriting } from "./underwriting.js";
|
|
36
37
|
import { Wallets } from "./wallets.js";
|
|
@@ -112,6 +113,13 @@ export class Moov extends ClientSDK {
|
|
|
112
113
|
return (this._sweeps ??= new Sweeps(this._options));
|
|
113
114
|
}
|
|
114
115
|
|
|
116
|
+
private _terminalConfigurations?: TerminalConfigurations;
|
|
117
|
+
get terminalConfigurations(): TerminalConfigurations {
|
|
118
|
+
return (this._terminalConfigurations ??= new TerminalConfigurations(
|
|
119
|
+
this._options,
|
|
120
|
+
));
|
|
121
|
+
}
|
|
122
|
+
|
|
115
123
|
private _transfers?: Transfers;
|
|
116
124
|
get transfers(): Transfers {
|
|
117
125
|
return (this._transfers ??= new Transfers(this._options));
|
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
/*
|
|
2
|
+
* Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.
|
|
3
|
+
*/
|
|
4
|
+
|
|
5
|
+
import { terminalConfigurationsGet } from "../funcs/terminalConfigurationsGet.js";
|
|
6
|
+
import { ClientSDK, RequestOptions } from "../lib/sdks.js";
|
|
7
|
+
import * as operations from "../models/operations/index.js";
|
|
8
|
+
import { unwrapAsync } from "../types/fp.js";
|
|
9
|
+
|
|
10
|
+
export class TerminalConfigurations extends 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(
|
|
18
|
+
request: operations.GetTerminalConfigurationRequest,
|
|
19
|
+
options?: RequestOptions,
|
|
20
|
+
): Promise<operations.GetTerminalConfigurationResponse> {
|
|
21
|
+
return unwrapAsync(terminalConfigurationsGet(
|
|
22
|
+
this,
|
|
23
|
+
request,
|
|
24
|
+
options,
|
|
25
|
+
));
|
|
26
|
+
}
|
|
27
|
+
}
|