@moovio/sdk 0.5.4 → 0.6.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.
Files changed (80) hide show
  1. package/README.md +19 -8
  2. package/bin/mcp-server.js +488 -106
  3. package/bin/mcp-server.js.map +18 -12
  4. package/docs/sdks/transfers/README.md +185 -0
  5. package/funcs/transfersCreateCancellation.d.ts +17 -0
  6. package/funcs/transfersCreateCancellation.d.ts.map +1 -0
  7. package/funcs/transfersCreateCancellation.js +128 -0
  8. package/funcs/transfersCreateCancellation.js.map +1 -0
  9. package/funcs/transfersGetCancellation.d.ts +16 -0
  10. package/funcs/transfersGetCancellation.d.ts.map +1 -0
  11. package/funcs/transfersGetCancellation.js +131 -0
  12. package/funcs/transfersGetCancellation.js.map +1 -0
  13. package/jsr.json +1 -1
  14. package/lib/config.d.ts +3 -3
  15. package/lib/config.js +3 -3
  16. package/mcp-server/cli/start/command.d.ts.map +1 -1
  17. package/mcp-server/cli/start/command.js +9 -0
  18. package/mcp-server/cli/start/command.js.map +1 -1
  19. package/mcp-server/cli/start/impl.d.ts +1 -0
  20. package/mcp-server/cli/start/impl.d.ts.map +1 -1
  21. package/mcp-server/cli/start/impl.js +2 -0
  22. package/mcp-server/cli/start/impl.js.map +1 -1
  23. package/mcp-server/mcp-server.js +1 -1
  24. package/mcp-server/server.d.ts +1 -0
  25. package/mcp-server/server.d.ts.map +1 -1
  26. package/mcp-server/server.js +7 -2
  27. package/mcp-server/server.js.map +1 -1
  28. package/mcp-server/tools/transfersCreateCancellation.d.ts +8 -0
  29. package/mcp-server/tools/transfersCreateCancellation.d.ts.map +1 -0
  30. package/mcp-server/tools/transfersCreateCancellation.js +65 -0
  31. package/mcp-server/tools/transfersCreateCancellation.js.map +1 -0
  32. package/mcp-server/tools/transfersGetCancellation.d.ts +8 -0
  33. package/mcp-server/tools/transfersGetCancellation.d.ts.map +1 -0
  34. package/mcp-server/tools/transfersGetCancellation.js +65 -0
  35. package/mcp-server/tools/transfersGetCancellation.js.map +1 -0
  36. package/mcp-server/tools.d.ts +1 -1
  37. package/mcp-server/tools.d.ts.map +1 -1
  38. package/mcp-server/tools.js +4 -1
  39. package/mcp-server/tools.js.map +1 -1
  40. package/models/components/transfer.d.ts +3 -0
  41. package/models/components/transfer.d.ts.map +1 -1
  42. package/models/components/transfer.js +3 -0
  43. package/models/components/transfer.js.map +1 -1
  44. package/models/errors/transfer.d.ts +3 -0
  45. package/models/errors/transfer.d.ts.map +1 -1
  46. package/models/errors/transfer.js +4 -0
  47. package/models/errors/transfer.js.map +1 -1
  48. package/models/operations/createcancellation.d.ts +107 -0
  49. package/models/operations/createcancellation.d.ts.map +1 -0
  50. package/models/operations/createcancellation.js +147 -0
  51. package/models/operations/createcancellation.js.map +1 -0
  52. package/models/operations/getcancellation.d.ts +112 -0
  53. package/models/operations/getcancellation.d.ts.map +1 -0
  54. package/models/operations/getcancellation.js +149 -0
  55. package/models/operations/getcancellation.js.map +1 -0
  56. package/models/operations/index.d.ts +2 -0
  57. package/models/operations/index.d.ts.map +1 -1
  58. package/models/operations/index.js +2 -0
  59. package/models/operations/index.js.map +1 -1
  60. package/package.json +1 -1
  61. package/sdk/transfers.d.ts +14 -0
  62. package/sdk/transfers.d.ts.map +1 -1
  63. package/sdk/transfers.js +20 -0
  64. package/sdk/transfers.js.map +1 -1
  65. package/src/funcs/transfersCreateCancellation.ts +184 -0
  66. package/src/funcs/transfersGetCancellation.ts +183 -0
  67. package/src/lib/config.ts +3 -3
  68. package/src/mcp-server/cli/start/command.ts +9 -0
  69. package/src/mcp-server/cli/start/impl.ts +3 -0
  70. package/src/mcp-server/mcp-server.ts +1 -1
  71. package/src/mcp-server/server.ts +14 -2
  72. package/src/mcp-server/tools/transfersCreateCancellation.ts +38 -0
  73. package/src/mcp-server/tools/transfersGetCancellation.ts +38 -0
  74. package/src/mcp-server/tools.ts +5 -0
  75. package/src/models/components/transfer.ts +10 -0
  76. package/src/models/errors/transfer.ts +6 -0
  77. package/src/models/operations/createcancellation.ts +229 -0
  78. package/src/models/operations/getcancellation.ts +236 -0
  79. package/src/models/operations/index.ts +2 -0
  80. package/src/sdk/transfers.ts +36 -0
@@ -1 +1 @@
1
- {"version":3,"file":"transfers.d.ts","sourceRoot":"","sources":["../src/sdk/transfers.ts"],"names":[],"mappings":"AAaA,OAAO,EAAE,SAAS,EAAE,cAAc,EAAE,MAAM,gBAAgB,CAAC;AAC3D,OAAO,KAAK,UAAU,MAAM,+BAA+B,CAAC;AAC5D,OAAO,KAAK,UAAU,MAAM,+BAA+B,CAAC;AAG5D,qBAAa,SAAU,SAAQ,SAAS;IACtC;;;;;;;OAOG;IACG,MAAM,CACV,OAAO,EAAE,UAAU,CAAC,qBAAqB,EACzC,OAAO,CAAC,EAAE,cAAc,GACvB,OAAO,CAAC,UAAU,CAAC,sBAAsB,CAAC;IAQ7C;;;;;;;;;;;;OAYG;IACG,IAAI,CACR,OAAO,EAAE,UAAU,CAAC,oBAAoB,EACxC,OAAO,CAAC,EAAE,cAAc,GACvB,OAAO,CAAC,UAAU,CAAC,qBAAqB,CAAC;IAQ5C;;;;;;;;OAQG;IACG,GAAG,CACP,OAAO,EAAE,UAAU,CAAC,kBAAkB,EACtC,OAAO,CAAC,EAAE,cAAc,GACvB,OAAO,CAAC,UAAU,CAAC,mBAAmB,CAAC;IAQ1C;;;;;;;OAOG;IACG,MAAM,CACV,OAAO,EAAE,UAAU,CAAC,qBAAqB,EACzC,OAAO,CAAC,EAAE,cAAc,GACvB,OAAO,CAAC,UAAU,CAAC,sBAAsB,CAAC;IAQ7C;;;;;;;;OAQG;IACG,cAAc,CAClB,OAAO,EAAE,UAAU,CAAC,qBAAqB,EACzC,OAAO,CAAC,EAAE,cAAc,GACvB,OAAO,CAAC,UAAU,CAAC,sBAAsB,CAAC;IAQ7C;;;;;OAKG;IACG,WAAW,CACf,OAAO,EAAE,UAAU,CAAC,kBAAkB,EACtC,OAAO,CAAC,EAAE,cAAc,GACvB,OAA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,CAAC,qBAAqB,EACzC,OAAO,CAAC,EAAE,cAAc,GACvB,OAAO,CAAC,UAAU,CAAC,sBAAsB,CAAC;IAQ7C;;;;;OAKG;IACG,kBAAkB,CACtB,OAAO,EAAE,UAAU,CAAC,yBAAyB,EAC7C,OAAO,CAAC,EAAE,cAAc,GACvB,OAAO,CAAC,UAAU,CAAC,0BAA0B,CAAC;IAQjD;;;;;OAKG;IACG,eAAe,CACnB,OAAO,EAAE,UAAU,CAAC,sBAAsB,EAC1C,OAAO,CAAC,EAAE,cAAc,GACvB,OAAO,CAAC,UAAU,CAAC,uBAAuB,CAAC;IAQ9C;;;;;;;;OAQG;IACG,cAAc,CAClB,OAAO,EAAE,UAAU,CAAC,qBAAqB,EACzC,OAAO,CAAC,EAAE,cAAc,GACvB,OAAO,CAAC,UAAU,CAAC,sBAAsB,CAAC;IAQ7C;;;;;OAKG;IACG,WAAW,CACf,OAAO,EAAE,UAAU,CAAC,kBAAkB,EACtC,OAAO,CAAC,EAAE,cAAc,GACvB,OAAO,CAAC,UAAU,CAAC,mBAAmB,CAAC;IAQ1C;;;;;OAKG;IACG,SAAS,CACb,OAAO,EAAE,UAAU,CAAC,gBAAgB,EACpC,OAAO,CAAC,EAAE,cAAc,GACvB,OAAO,CAAC,UAAU,CAAC,iBAAiB,CAAC;IAQxC;;;;;;;OAOG;IACG,cAAc,CAClB,OAAO,EAAE,UAAU,CAAC,qBAAqB,EACzC,OAAO,CAAC,EAAE,cAAc,GACvB,OAAO,CAAC,UAAU,CAAC,sBAAsB,CAAC;IAQ7C;;;;;;;;OAQG;IACG,eAAe,CACnB,OAAO,EAAE,UAAU,CAAC,qBAAqB,EACzC,OAAO,CAAC,EAAE,cAAc,GACvB,OAAO,CAAC,UAAU,CAAC,6BAA6B,CAAC;CAOrD"}
package/sdk/transfers.js CHANGED
@@ -5,9 +5,11 @@
5
5
  Object.defineProperty(exports, "__esModule", { value: true });
6
6
  exports.Transfers = void 0;
7
7
  const transfersCreate_js_1 = require("../funcs/transfersCreate.js");
8
+ const transfersCreateCancellation_js_1 = require("../funcs/transfersCreateCancellation.js");
8
9
  const transfersCreateReversal_js_1 = require("../funcs/transfersCreateReversal.js");
9
10
  const transfersGenerateOptions_js_1 = require("../funcs/transfersGenerateOptions.js");
10
11
  const transfersGet_js_1 = require("../funcs/transfersGet.js");
12
+ const transfersGetCancellation_js_1 = require("../funcs/transfersGetCancellation.js");
11
13
  const transfersGetRefund_js_1 = require("../funcs/transfersGetRefund.js");
12
14
  const transfersInitiateRefund_js_1 = require("../funcs/transfersInitiateRefund.js");
13
15
  const transfersList_js_1 = require("../funcs/transfersList.js");
@@ -66,6 +68,24 @@ class Transfers extends sdks_js_1.ClientSDK {
66
68
  async update(request, options) {
67
69
  return (0, fp_js_1.unwrapAsync)((0, transfersUpdate_js_1.transfersUpdate)(this, request, options));
68
70
  }
71
+ /**
72
+ * Initiate a cancellation for a card, ACH, or queued transfer.
73
+ *
74
+ * To access this endpoint using a [token](https://docs.moov.io/api/authentication/access-tokens/) you'll need
75
+ * to specify the `/accounts/{accountID}/transfers.write` scope.
76
+ */
77
+ async createCancellation(request, options) {
78
+ return (0, fp_js_1.unwrapAsync)((0, transfersCreateCancellation_js_1.transfersCreateCancellation)(this, request, options));
79
+ }
80
+ /**
81
+ * Get details of a cancellation for a transfer.
82
+ *
83
+ * To access this endpoint using a [token](https://docs.moov.io/api/authentication/access-tokens/) you'll need
84
+ * to specify the `/accounts/{accountID}/transfers.read` scope.
85
+ */
86
+ async getCancellation(request, options) {
87
+ return (0, fp_js_1.unwrapAsync)((0, transfersGetCancellation_js_1.transfersGetCancellation)(this, request, options));
88
+ }
69
89
  /**
70
90
  * Initiate a refund for a card transfer.
71
91
  *
@@ -1 +1 @@
1
- {"version":3,"file":"transfers.js","sourceRoot":"","sources":["../src/sdk/transfers.ts"],"names":[],"mappings":";AAAA;;GAEG;;;AAEH,oEAA8D;AAC9D,oFAA8E;AAC9E,sFAAgF;AAChF,8DAAwD;AACxD,0EA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,EACpC,OAAwB;QAExB,OAAO,IAAA,mBAAW,EAAC,IAAA,0CAAkB,EACnC,IAAI,EACJ,OAAO,EACP,OAAO,CACR,CAAC,CAAC;IACL,CAAC;IAED;;;;;;;OAOG;IACH,KAAK,CAAC,cAAc,CAClB,OAAyC,EACzC,OAAwB;QAExB,OAAO,IAAA,mBAAW,EAAC,IAAA,oDAAuB,EACxC,IAAI,EACJ,OAAO,EACP,OAAO,CACR,CAAC,CAAC;IACL,CAAC;IAED;;;;;;;;OAQG;IACH,KAAK,CAAC,eAAe,CACnB,OAAyC,EACzC,OAAwB;QAExB,OAAO,IAAA,mBAAW,EAAC,IAAA,sDAAwB,EACzC,IAAI,EACJ,OAAO,EACP,OAAO,CACR,CAAC,CAAC;IACL,CAAC;CACF;AA/KD,8BA+KC"}
1
+ {"version":3,"file":"transfers.js","sourceRoot":"","sources":["../src/sdk/transfers.ts"],"names":[],"mappings":";AAAA;;GAEG;;;AAEH,oEAA8D;AAC9D,4FAAsF;AACtF,oFAA8E;AAC9E,sFAAgF;AAChF,8DAAwD;AACxD,sFAAgF;AAChF,0EAAoE;AACpE,oFAA8E;AAC9E,gEAA0D;AAC1D,8EAAwE;AACxE,oEAA8D;AAC9D,4CAA2D;AAG3D,0CAA6C;AAE7C,MAAa,SAAU,SAAQ,mBAAS;IACtC;;;;;;;OAOG;IACH,KAAK,CAAC,MAAM,CACV,OAAyC,EACzC,OAAwB;QAExB,OAAO,IAAA,mBAAW,EAAC,IAAA,oCAAe,EAChC,IAAI,EACJ,OAAO,EACP,OAAO,CACR,CAAC,CAAC;IACL,CAAC;IAED;;;;;;;;;;;;OAYG;IACH,KAAK,CAAC,IAAI,CACR,OAAwC,EACxC,OAAwB;QAExB,OAAO,IAAA,mBAAW,EAAC,IAAA,gCAAa,EAC9B,IAAI,EACJ,OAAO,EACP,OAAO,CACR,CAAC,CAAC;IACL,CAAC;IAED;;;;;;;;OAQG;IACH,KAAK,CAAC,GAAG,CACP,OAAsC,EACtC,OAA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OAAO,IAAA,mBAAW,EAAC,IAAA,oDAAuB,EACxC,IAAI,EACJ,OAAO,EACP,OAAO,CACR,CAAC,CAAC;IACL,CAAC;IAED;;;;;;;;OAQG;IACH,KAAK,CAAC,eAAe,CACnB,OAAyC,EACzC,OAAwB;QAExB,OAAO,IAAA,mBAAW,EAAC,IAAA,sDAAwB,EACzC,IAAI,EACJ,OAAO,EACP,OAAO,CACR,CAAC,CAAC;IACL,CAAC;CACF;AAjND,8BAiNC"}
@@ -0,0 +1,184 @@
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 * as errors from "../models/errors/index.js";
22
+ import { SDKValidationError } from "../models/errors/sdkvalidationerror.js";
23
+ import * as operations from "../models/operations/index.js";
24
+ import { APICall, APIPromise } from "../types/async.js";
25
+ import { Result } from "../types/fp.js";
26
+
27
+ /**
28
+ * Initiate a cancellation for a card, ACH, or queued transfer.
29
+ *
30
+ * To access this endpoint using a [token](https://docs.moov.io/api/authentication/access-tokens/) you'll need
31
+ * to specify the `/accounts/{accountID}/transfers.write` scope.
32
+ */
33
+ export function transfersCreateCancellation(
34
+ client: MoovCore,
35
+ request: operations.CreateCancellationRequest,
36
+ options?: RequestOptions,
37
+ ): APIPromise<
38
+ Result<
39
+ operations.CreateCancellationResponse,
40
+ | errors.GenericError
41
+ | APIError
42
+ | SDKValidationError
43
+ | UnexpectedClientError
44
+ | InvalidRequestError
45
+ | RequestAbortedError
46
+ | RequestTimeoutError
47
+ | ConnectionError
48
+ >
49
+ > {
50
+ return new APIPromise($do(
51
+ client,
52
+ request,
53
+ options,
54
+ ));
55
+ }
56
+
57
+ async function $do(
58
+ client: MoovCore,
59
+ request: operations.CreateCancellationRequest,
60
+ options?: RequestOptions,
61
+ ): Promise<
62
+ [
63
+ Result<
64
+ operations.CreateCancellationResponse,
65
+ | errors.GenericError
66
+ | APIError
67
+ | SDKValidationError
68
+ | UnexpectedClientError
69
+ | InvalidRequestError
70
+ | RequestAbortedError
71
+ | RequestTimeoutError
72
+ | ConnectionError
73
+ >,
74
+ APICall,
75
+ ]
76
+ > {
77
+ const parsed = safeParse(
78
+ request,
79
+ (value) => operations.CreateCancellationRequest$outboundSchema.parse(value),
80
+ "Input validation failed",
81
+ );
82
+ if (!parsed.ok) {
83
+ return [parsed, { status: "invalid" }];
84
+ }
85
+ const payload = parsed.value;
86
+ const body = null;
87
+
88
+ const pathParams = {
89
+ accountID: encodeSimple("accountID", payload.accountID, {
90
+ explode: false,
91
+ charEncoding: "percent",
92
+ }),
93
+ transferID: encodeSimple("transferID", payload.transferID, {
94
+ explode: false,
95
+ charEncoding: "percent",
96
+ }),
97
+ };
98
+
99
+ const path = pathToFunc(
100
+ "/accounts/{accountID}/transfers/{transferID}/cancellations",
101
+ )(pathParams);
102
+
103
+ const headers = new Headers(compactMap({
104
+ Accept: "application/json",
105
+ "x-moov-version": encodeSimple(
106
+ "x-moov-version",
107
+ client._options.xMoovVersion,
108
+ { explode: false, charEncoding: "none" },
109
+ ),
110
+ }));
111
+
112
+ const securityInput = await extractSecurity(client._options.security);
113
+ const requestSecurity = resolveGlobalSecurity(securityInput);
114
+
115
+ const context = {
116
+ baseURL: options?.serverURL ?? client._baseURL ?? "",
117
+ operationID: "createCancellation",
118
+ oAuth2Scopes: [],
119
+
120
+ resolvedSecurity: requestSecurity,
121
+
122
+ securitySource: client._options.security,
123
+ retryConfig: options?.retries
124
+ || client._options.retryConfig
125
+ || { strategy: "none" },
126
+ retryCodes: options?.retryCodes || ["429", "500", "502", "503", "504"],
127
+ };
128
+
129
+ const requestRes = client._createRequest(context, {
130
+ security: requestSecurity,
131
+ method: "POST",
132
+ baseURL: options?.serverURL,
133
+ path: path,
134
+ headers: headers,
135
+ body: body,
136
+ timeoutMs: options?.timeoutMs || client._options.timeoutMs || -1,
137
+ }, options);
138
+ if (!requestRes.ok) {
139
+ return [requestRes, { status: "invalid" }];
140
+ }
141
+ const req = requestRes.value;
142
+
143
+ const doResult = await client._do(req, {
144
+ context,
145
+ errorCodes: ["400", "401", "403", "404", "429", "4XX", "500", "504", "5XX"],
146
+ retryConfig: context.retryConfig,
147
+ retryCodes: context.retryCodes,
148
+ });
149
+ if (!doResult.ok) {
150
+ return [doResult, { status: "request-error", request: req }];
151
+ }
152
+ const response = doResult.value;
153
+
154
+ const responseFields = {
155
+ HttpMeta: { Response: response, Request: req },
156
+ };
157
+
158
+ const [result] = await M.match<
159
+ operations.CreateCancellationResponse,
160
+ | errors.GenericError
161
+ | APIError
162
+ | SDKValidationError
163
+ | UnexpectedClientError
164
+ | InvalidRequestError
165
+ | RequestAbortedError
166
+ | RequestTimeoutError
167
+ | ConnectionError
168
+ >(
169
+ M.json([200, 202], operations.CreateCancellationResponse$inboundSchema, {
170
+ hdrs: true,
171
+ key: "Result",
172
+ }),
173
+ M.jsonErr(400, errors.GenericError$inboundSchema, { hdrs: true }),
174
+ M.fail([401, 403, 404, 429]),
175
+ M.fail([500, 504]),
176
+ M.fail("4XX"),
177
+ M.fail("5XX"),
178
+ )(response, { extraFields: responseFields });
179
+ if (!result.ok) {
180
+ return [result, { status: "complete", request: req, response }];
181
+ }
182
+
183
+ return [result, { status: "complete", request: req, response }];
184
+ }
@@ -0,0 +1,183 @@
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
+ * Get details of a cancellation for a transfer.
28
+ *
29
+ * To access this endpoint using a [token](https://docs.moov.io/api/authentication/access-tokens/) you'll need
30
+ * to specify the `/accounts/{accountID}/transfers.read` scope.
31
+ */
32
+ export function transfersGetCancellation(
33
+ client: MoovCore,
34
+ request: operations.GetCancellationRequest,
35
+ options?: RequestOptions,
36
+ ): APIPromise<
37
+ Result<
38
+ operations.GetCancellationResponse,
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.GetCancellationRequest,
58
+ options?: RequestOptions,
59
+ ): Promise<
60
+ [
61
+ Result<
62
+ operations.GetCancellationResponse,
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) => operations.GetCancellationRequest$outboundSchema.parse(value),
77
+ "Input validation failed",
78
+ );
79
+ if (!parsed.ok) {
80
+ return [parsed, { status: "invalid" }];
81
+ }
82
+ const payload = parsed.value;
83
+ const body = null;
84
+
85
+ const pathParams = {
86
+ accountID: encodeSimple("accountID", payload.accountID, {
87
+ explode: false,
88
+ charEncoding: "percent",
89
+ }),
90
+ cancellationID: encodeSimple("cancellationID", payload.cancellationID, {
91
+ explode: false,
92
+ charEncoding: "percent",
93
+ }),
94
+ transferID: encodeSimple("transferID", payload.transferID, {
95
+ explode: false,
96
+ charEncoding: "percent",
97
+ }),
98
+ };
99
+
100
+ const path = pathToFunc(
101
+ "/accounts/{accountID}/transfers/{transferID}/cancellations/{cancellationID}",
102
+ )(pathParams);
103
+
104
+ const headers = new Headers(compactMap({
105
+ Accept: "application/json",
106
+ "x-moov-version": encodeSimple(
107
+ "x-moov-version",
108
+ client._options.xMoovVersion,
109
+ { explode: false, charEncoding: "none" },
110
+ ),
111
+ }));
112
+
113
+ const securityInput = await extractSecurity(client._options.security);
114
+ const requestSecurity = resolveGlobalSecurity(securityInput);
115
+
116
+ const context = {
117
+ baseURL: options?.serverURL ?? client._baseURL ?? "",
118
+ operationID: "getCancellation",
119
+ oAuth2Scopes: [],
120
+
121
+ resolvedSecurity: requestSecurity,
122
+
123
+ securitySource: client._options.security,
124
+ retryConfig: options?.retries
125
+ || client._options.retryConfig
126
+ || { strategy: "none" },
127
+ retryCodes: options?.retryCodes || ["429", "500", "502", "503", "504"],
128
+ };
129
+
130
+ const requestRes = client._createRequest(context, {
131
+ security: requestSecurity,
132
+ method: "GET",
133
+ baseURL: options?.serverURL,
134
+ path: path,
135
+ headers: headers,
136
+ body: body,
137
+ timeoutMs: options?.timeoutMs || client._options.timeoutMs || -1,
138
+ }, options);
139
+ if (!requestRes.ok) {
140
+ return [requestRes, { status: "invalid" }];
141
+ }
142
+ const req = requestRes.value;
143
+
144
+ const doResult = await client._do(req, {
145
+ context,
146
+ errorCodes: ["401", "403", "404", "429", "4XX", "500", "504", "5XX"],
147
+ retryConfig: context.retryConfig,
148
+ retryCodes: context.retryCodes,
149
+ });
150
+ if (!doResult.ok) {
151
+ return [doResult, { status: "request-error", request: req }];
152
+ }
153
+ const response = doResult.value;
154
+
155
+ const responseFields = {
156
+ HttpMeta: { Response: response, Request: req },
157
+ };
158
+
159
+ const [result] = await M.match<
160
+ operations.GetCancellationResponse,
161
+ | APIError
162
+ | SDKValidationError
163
+ | UnexpectedClientError
164
+ | InvalidRequestError
165
+ | RequestAbortedError
166
+ | RequestTimeoutError
167
+ | ConnectionError
168
+ >(
169
+ M.json(200, operations.GetCancellationResponse$inboundSchema, {
170
+ hdrs: true,
171
+ key: "Result",
172
+ }),
173
+ M.fail([401, 403, 404, 429]),
174
+ M.fail([500, 504]),
175
+ M.fail("4XX"),
176
+ M.fail("5XX"),
177
+ )(response, { extraFields: responseFields });
178
+ if (!result.ok) {
179
+ return [result, { status: "complete", request: req, response }];
180
+ }
181
+
182
+ return [result, { status: "complete", request: req, response }];
183
+ }
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.5.4",
73
- genVersion: "2.536.0",
74
- userAgent: "speakeasy-sdk/typescript 0.5.4 2.536.0 latest @moovio/sdk",
72
+ sdkVersion: "0.6.1",
73
+ genVersion: "2.539.1",
74
+ userAgent: "speakeasy-sdk/typescript 0.6.1 2.539.1 latest @moovio/sdk",
75
75
  } as const;
@@ -28,6 +28,15 @@ export const startCommand = buildCommand({
28
28
  parse: (val: string) =>
29
29
  z.coerce.number().int().gte(0).lt(65536).parse(val),
30
30
  },
31
+ tool: {
32
+ kind: "parsed",
33
+ brief: "Specify tools to mount on the server",
34
+ optional: true,
35
+ variadic: true,
36
+ parse: (value) => {
37
+ return z.string().parse(value);
38
+ },
39
+ },
31
40
  ...(mcpScopes.length
32
41
  ? {
33
42
  scope: {
@@ -18,6 +18,7 @@ import { createMCPServer } from "../../server.js";
18
18
  interface StartCommandFlags {
19
19
  readonly transport: "stdio" | "sse";
20
20
  readonly port: number;
21
+ readonly tool?: string[];
21
22
  readonly scope?: MCPScope[];
22
23
  readonly username?: string | undefined;
23
24
  readonly password?: string | undefined;
@@ -50,6 +51,7 @@ async function startStdio(flags: StartCommandFlags) {
50
51
  const transport = new StdioServerTransport();
51
52
  const server = createMCPServer({
52
53
  logger,
54
+ allowedTools: flags.tool,
53
55
  scopes: flags.scope,
54
56
  security: allRequired({
55
57
  username: flags.username,
@@ -74,6 +76,7 @@ async function startSSE(flags: StartCommandFlags) {
74
76
  const app = express();
75
77
  const mcpServer = createMCPServer({
76
78
  logger,
79
+ allowedTools: flags.tool,
77
80
  scopes: flags.scope,
78
81
  security: allRequired({
79
82
  username: flags.username,
@@ -19,7 +19,7 @@ const routes = buildRouteMap({
19
19
  export const app = buildApplication(routes, {
20
20
  name: "mcp",
21
21
  versionInfo: {
22
- currentVersion: "0.5.4",
22
+ currentVersion: "0.6.1",
23
23
  },
24
24
  });
25
25
 
@@ -121,9 +121,11 @@ import { tool$terminalApplicationsDelete } from "./tools/terminalApplicationsDel
121
121
  import { tool$terminalApplicationsGet } from "./tools/terminalApplicationsGet.js";
122
122
  import { tool$terminalApplicationsList } from "./tools/terminalApplicationsList.js";
123
123
  import { tool$transfersCreate } from "./tools/transfersCreate.js";
124
+ import { tool$transfersCreateCancellation } from "./tools/transfersCreateCancellation.js";
124
125
  import { tool$transfersCreateReversal } from "./tools/transfersCreateReversal.js";
125
126
  import { tool$transfersGenerateOptions } from "./tools/transfersGenerateOptions.js";
126
127
  import { tool$transfersGet } from "./tools/transfersGet.js";
128
+ import { tool$transfersGetCancellation } from "./tools/transfersGetCancellation.js";
127
129
  import { tool$transfersGetRefund } from "./tools/transfersGetRefund.js";
128
130
  import { tool$transfersInitiateRefund } from "./tools/transfersInitiateRefund.js";
129
131
  import { tool$transfersList } from "./tools/transfersList.js";
@@ -138,6 +140,7 @@ import { tool$walletTransactionsList } from "./tools/walletTransactionsList.js";
138
140
 
139
141
  export function createMCPServer(deps: {
140
142
  logger: ConsoleLogger;
143
+ allowedTools?: string[] | undefined;
141
144
  scopes?: MCPScope[] | undefined;
142
145
  serverURL?: string | undefined;
143
146
  security?: SDKOptions["security"] | undefined;
@@ -146,7 +149,7 @@ export function createMCPServer(deps: {
146
149
  }) {
147
150
  const server = new McpServer({
148
151
  name: "Moov",
149
- version: "0.5.4",
152
+ version: "0.6.1",
150
153
  });
151
154
 
152
155
  const client = new MoovCore({
@@ -156,7 +159,14 @@ export function createMCPServer(deps: {
156
159
  serverIdx: deps.serverIdx,
157
160
  });
158
161
  const scopes = new Set(deps.scopes ?? mcpScopes);
159
- const tool = createRegisterTool(deps.logger, server, client, scopes);
162
+ const allowedTools = deps.allowedTools && new Set(deps.allowedTools);
163
+ const tool = createRegisterTool(
164
+ deps.logger,
165
+ server,
166
+ client,
167
+ scopes,
168
+ allowedTools,
169
+ );
160
170
 
161
171
  tool(tool$accountsCreate);
162
172
  tool(tool$accountsList);
@@ -246,6 +256,8 @@ export function createMCPServer(deps: {
246
256
  tool(tool$transfersList);
247
257
  tool(tool$transfersGet);
248
258
  tool(tool$transfersUpdate);
259
+ tool(tool$transfersCreateCancellation);
260
+ tool(tool$transfersGetCancellation);
249
261
  tool(tool$transfersInitiateRefund);
250
262
  tool(tool$transfersListRefunds);
251
263
  tool(tool$transfersGetRefund);
@@ -0,0 +1,38 @@
1
+ /*
2
+ * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.
3
+ */
4
+
5
+ import { transfersCreateCancellation } from "../../funcs/transfersCreateCancellation.js";
6
+ import * as operations from "../../models/operations/index.js";
7
+ import { formatResult, ToolDefinition } from "../tools.js";
8
+
9
+ const args = {
10
+ request: operations.CreateCancellationRequest$inboundSchema,
11
+ };
12
+
13
+ export const tool$transfersCreateCancellation: ToolDefinition<typeof args> = {
14
+ name: "transfers_create-cancellation",
15
+ description: ` Initiate a cancellation for a card, ACH, or queued transfer.
16
+
17
+ To access this endpoint using a [token](https://docs.moov.io/api/authentication/access-tokens/) you'll need
18
+ to specify the \`/accounts/{accountID}/transfers.write\` scope.`,
19
+ args,
20
+ tool: async (client, args, ctx) => {
21
+ const [result, apiCall] = await transfersCreateCancellation(
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
+ };
@@ -0,0 +1,38 @@
1
+ /*
2
+ * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.
3
+ */
4
+
5
+ import { transfersGetCancellation } from "../../funcs/transfersGetCancellation.js";
6
+ import * as operations from "../../models/operations/index.js";
7
+ import { formatResult, ToolDefinition } from "../tools.js";
8
+
9
+ const args = {
10
+ request: operations.GetCancellationRequest$inboundSchema,
11
+ };
12
+
13
+ export const tool$transfersGetCancellation: ToolDefinition<typeof args> = {
14
+ name: "transfers_get-cancellation",
15
+ description: ` Get details of a cancellation for a transfer.
16
+
17
+ To access this endpoint using a [token](https://docs.moov.io/api/authentication/access-tokens/) you'll need
18
+ to specify the \`/accounts/{accountID}/transfers.read\` scope.`,
19
+ args,
20
+ tool: async (client, args, ctx) => {
21
+ const [result, apiCall] = await transfersGetCancellation(
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
+ };
@@ -94,8 +94,13 @@ export function createRegisterTool(
94
94
  server: McpServer,
95
95
  sdk: MoovCore,
96
96
  allowedScopes: Set<MCPScope>,
97
+ allowedTools?: Set<string>,
97
98
  ): <A extends ZodRawShape | undefined>(tool: ToolDefinition<A>) => void {
98
99
  return <A extends ZodRawShape | undefined>(tool: ToolDefinition<A>): void => {
100
+ if (allowedTools && !allowedTools.has(tool.name)) {
101
+ return;
102
+ }
103
+
99
104
  const toolScopes = tool.scopes ?? [];
100
105
  if (!toolScopes.every((s) => allowedScopes.has(s))) {
101
106
  return;
@@ -12,6 +12,12 @@ import {
12
12
  Amount$Outbound,
13
13
  Amount$outboundSchema,
14
14
  } from "./amount.js";
15
+ import {
16
+ Cancellation,
17
+ Cancellation$inboundSchema,
18
+ Cancellation$Outbound,
19
+ Cancellation$outboundSchema,
20
+ } from "./cancellation.js";
15
21
  import {
16
22
  CardAcquiringDispute,
17
23
  CardAcquiringDispute$inboundSchema,
@@ -102,6 +108,7 @@ export type Transfer = {
102
108
  */
103
109
  moovFeeDetails?: MoovFeeDetails | undefined;
104
110
  groupID?: string | undefined;
111
+ cancellations?: Array<Cancellation> | undefined;
105
112
  refundedAmount?: Amount | undefined;
106
113
  refunds?: Array<CardAcquiringRefund> | undefined;
107
114
  disputedAmount?: Amount | undefined;
@@ -133,6 +140,7 @@ export const Transfer$inboundSchema: z.ZodType<
133
140
  moovFeeDecimal: z.string().optional(),
134
141
  moovFeeDetails: MoovFeeDetails$inboundSchema.optional(),
135
142
  groupID: z.string().optional(),
143
+ cancellations: z.array(Cancellation$inboundSchema).optional(),
136
144
  refundedAmount: Amount$inboundSchema.optional(),
137
145
  refunds: z.array(CardAcquiringRefund$inboundSchema).optional(),
138
146
  disputedAmount: Amount$inboundSchema.optional(),
@@ -159,6 +167,7 @@ export type Transfer$Outbound = {
159
167
  moovFeeDecimal?: string | undefined;
160
168
  moovFeeDetails?: MoovFeeDetails$Outbound | undefined;
161
169
  groupID?: string | undefined;
170
+ cancellations?: Array<Cancellation$Outbound> | undefined;
162
171
  refundedAmount?: Amount$Outbound | undefined;
163
172
  refunds?: Array<CardAcquiringRefund$Outbound> | undefined;
164
173
  disputedAmount?: Amount$Outbound | undefined;
@@ -189,6 +198,7 @@ export const Transfer$outboundSchema: z.ZodType<
189
198
  moovFeeDecimal: z.string().optional(),
190
199
  moovFeeDetails: MoovFeeDetails$outboundSchema.optional(),
191
200
  groupID: z.string().optional(),
201
+ cancellations: z.array(Cancellation$outboundSchema).optional(),
192
202
  refundedAmount: Amount$outboundSchema.optional(),
193
203
  refunds: z.array(CardAcquiringRefund$outboundSchema).optional(),
194
204
  disputedAmount: Amount$outboundSchema.optional(),