@moovio/sdk 26.7.0-dev.6 → 26.10.0-dev.0

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 (63) hide show
  1. package/README.md +71 -59
  2. package/bin/mcp-server.js +344 -150
  3. package/bin/mcp-server.js.map +16 -11
  4. package/funcs/transfersGetRiskOutcomes.d.ts +19 -0
  5. package/funcs/transfersGetRiskOutcomes.d.ts.map +1 -0
  6. package/funcs/transfersGetRiskOutcomes.js +131 -0
  7. package/funcs/transfersGetRiskOutcomes.js.map +1 -0
  8. package/jsr.json +1 -1
  9. package/lib/config.d.ts +3 -3
  10. package/lib/config.js +3 -3
  11. package/lib/config.js.map +1 -1
  12. package/mcp-server/mcp-server.js +1 -1
  13. package/mcp-server/mcp-server.js.map +1 -1
  14. package/mcp-server/server.d.ts.map +1 -1
  15. package/mcp-server/server.js +3 -1
  16. package/mcp-server/server.js.map +1 -1
  17. package/mcp-server/tools/transfersGetRiskOutcomes.d.ts +8 -0
  18. package/mcp-server/tools/transfersGetRiskOutcomes.d.ts.map +1 -0
  19. package/mcp-server/tools/transfersGetRiskOutcomes.js +67 -0
  20. package/mcp-server/tools/transfersGetRiskOutcomes.js.map +1 -0
  21. package/models/components/contributingrule.d.ts +23 -0
  22. package/models/components/contributingrule.d.ts.map +1 -0
  23. package/models/components/contributingrule.js +59 -0
  24. package/models/components/contributingrule.js.map +1 -0
  25. package/models/components/filedetails.d.ts +1 -1
  26. package/models/components/filepurpose.d.ts +2 -2
  27. package/models/components/filepurpose.js +1 -1
  28. package/models/components/index.d.ts +2 -0
  29. package/models/components/index.d.ts.map +1 -1
  30. package/models/components/index.js +2 -0
  31. package/models/components/index.js.map +1 -1
  32. package/models/components/onboardinginvite.d.ts +1 -1
  33. package/models/components/partnerriskoutcomesresponse.d.ts +33 -0
  34. package/models/components/partnerriskoutcomesresponse.d.ts.map +1 -0
  35. package/models/components/partnerriskoutcomesresponse.js +62 -0
  36. package/models/components/partnerriskoutcomesresponse.js.map +1 -0
  37. package/models/operations/gettransferriskoutcomes.d.ts +48 -0
  38. package/models/operations/gettransferriskoutcomes.d.ts.map +1 -0
  39. package/models/operations/gettransferriskoutcomes.js +99 -0
  40. package/models/operations/gettransferriskoutcomes.js.map +1 -0
  41. package/models/operations/index.d.ts +1 -0
  42. package/models/operations/index.d.ts.map +1 -1
  43. package/models/operations/index.js +1 -0
  44. package/models/operations/index.js.map +1 -1
  45. package/package.json +1 -1
  46. package/sdk/transfers.d.ts +9 -0
  47. package/sdk/transfers.d.ts.map +1 -1
  48. package/sdk/transfers.js +12 -0
  49. package/sdk/transfers.js.map +1 -1
  50. package/src/funcs/transfersGetRiskOutcomes.ts +182 -0
  51. package/src/lib/config.ts +3 -3
  52. package/src/mcp-server/mcp-server.ts +1 -1
  53. package/src/mcp-server/server.ts +3 -1
  54. package/src/mcp-server/tools/transfersGetRiskOutcomes.ts +41 -0
  55. package/src/models/components/contributingrule.ts +58 -0
  56. package/src/models/components/filedetails.ts +1 -1
  57. package/src/models/components/filepurpose.ts +2 -2
  58. package/src/models/components/index.ts +2 -0
  59. package/src/models/components/onboardinginvite.ts +1 -1
  60. package/src/models/components/partnerriskoutcomesresponse.ts +77 -0
  61. package/src/models/operations/gettransferriskoutcomes.ts +136 -0
  62. package/src/models/operations/index.ts +1 -0
  63. package/src/sdk/transfers.ts +20 -0
@@ -0,0 +1,182 @@
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 { matchStatusCode } from "../lib/http.js";
8
+ import * as M from "../lib/matchers.js";
9
+ import { compactMap } from "../lib/primitives.js";
10
+ import { safeParse } from "../lib/schemas.js";
11
+ import { RequestOptions } from "../lib/sdks.js";
12
+ import { extractSecurity, resolveGlobalSecurity } from "../lib/security.js";
13
+ import { pathToFunc } from "../lib/url.js";
14
+ import {
15
+ ConnectionError,
16
+ InvalidRequestError,
17
+ RequestAbortedError,
18
+ RequestTimeoutError,
19
+ UnexpectedClientError,
20
+ } from "../models/errors/httpclienterrors.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
+ * Retrieve the risk rules that contributed to a transfer's risk decision.
30
+ *
31
+ * This endpoint has limited availability and must be enabled for your account by Moov.
32
+ *
33
+ * To access this endpoint using an [access token](https://docs.moov.io/api/authentication/access-tokens/)
34
+ * you'll need to specify the `/accounts/{accountID}/transfers.read` scope.
35
+ */
36
+ export function transfersGetRiskOutcomes(
37
+ client: MoovCore,
38
+ request: operations.GetTransferRiskOutcomesRequest,
39
+ options?: RequestOptions,
40
+ ): APIPromise<
41
+ Result<
42
+ operations.GetTransferRiskOutcomesResponse,
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.GetTransferRiskOutcomesRequest,
63
+ options?: RequestOptions,
64
+ ): Promise<
65
+ [
66
+ Result<
67
+ operations.GetTransferRiskOutcomesResponse,
68
+ | MoovError
69
+ | ResponseValidationError
70
+ | ConnectionError
71
+ | RequestAbortedError
72
+ | RequestTimeoutError
73
+ | InvalidRequestError
74
+ | UnexpectedClientError
75
+ | SDKValidationError
76
+ >,
77
+ APICall,
78
+ ]
79
+ > {
80
+ const parsed = safeParse(
81
+ request,
82
+ (value) =>
83
+ operations.GetTransferRiskOutcomesRequest$outboundSchema.parse(value),
84
+ "Input validation failed",
85
+ );
86
+ if (!parsed.ok) {
87
+ return [parsed, { status: "invalid" }];
88
+ }
89
+ const payload = parsed.value;
90
+ const body = null;
91
+
92
+ const pathParams = {
93
+ transferID: encodeSimple("transferID", payload.transferID, {
94
+ explode: false,
95
+ charEncoding: "percent",
96
+ }),
97
+ };
98
+ const path = pathToFunc("/transfers/{transferID}/risk-outcomes")(pathParams);
99
+
100
+ const headers = new Headers(compactMap({
101
+ Accept: "application/json",
102
+ "X-Account-ID": encodeSimple("X-Account-ID", payload["X-Account-ID"], {
103
+ explode: false,
104
+ charEncoding: "none",
105
+ }),
106
+ }));
107
+
108
+ const securityInput = await extractSecurity(client._options.security);
109
+ const requestSecurity = resolveGlobalSecurity(securityInput);
110
+
111
+ const context = {
112
+ options: client._options,
113
+ baseURL: options?.serverURL ?? client._baseURL ?? "",
114
+ operationID: "getTransferRiskOutcomes",
115
+ oAuth2Scopes: null,
116
+
117
+ resolvedSecurity: requestSecurity,
118
+
119
+ securitySource: client._options.security,
120
+ retryConfig: options?.retries
121
+ || client._options.retryConfig
122
+ || { strategy: "none" },
123
+ retryCodes: options?.retryCodes || ["429", "500", "502", "503", "504"],
124
+ };
125
+
126
+ const requestRes = client._createRequest(context, {
127
+ security: requestSecurity,
128
+ method: "GET",
129
+ baseURL: options?.serverURL,
130
+ path: path,
131
+ headers: headers,
132
+ body: body,
133
+ userAgent: client._options.userAgent,
134
+ timeoutMs: options?.timeoutMs || client._options.timeoutMs || -1,
135
+ }, options);
136
+ if (!requestRes.ok) {
137
+ return [requestRes, { status: "invalid" }];
138
+ }
139
+ const req = requestRes.value;
140
+
141
+ const doResult = await client._do(req, {
142
+ context,
143
+ isErrorStatusCode: (statusCode: number) =>
144
+ matchStatusCode({ status: statusCode } as Response, ["4XX", "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.GetTransferRiskOutcomesResponse,
159
+ | MoovError
160
+ | ResponseValidationError
161
+ | ConnectionError
162
+ | RequestAbortedError
163
+ | RequestTimeoutError
164
+ | InvalidRequestError
165
+ | UnexpectedClientError
166
+ | SDKValidationError
167
+ >(
168
+ M.json(200, operations.GetTransferRiskOutcomesResponse$inboundSchema, {
169
+ hdrs: true,
170
+ key: "Result",
171
+ }),
172
+ M.fail([401, 403, 404, 429]),
173
+ M.fail([500, 504]),
174
+ M.fail("4XX"),
175
+ M.fail("5XX"),
176
+ )(response, req, { extraFields: responseFields });
177
+ if (!result.ok) {
178
+ return [result, { status: "complete", request: req, response }];
179
+ }
180
+
181
+ return [result, { status: "complete", request: req, response }];
182
+ }
package/src/lib/config.ts CHANGED
@@ -72,9 +72,9 @@ export function serverURLFromOptions(options: SDKOptions): URL | null {
72
72
 
73
73
  export const SDK_METADATA = {
74
74
  language: "typescript",
75
- openapiDocVersion: "v2026.07.00",
76
- sdkVersion: "26.7.0-dev.6",
75
+ openapiDocVersion: "v2026.10.00",
76
+ sdkVersion: "26.10.0-dev.0",
77
77
  genVersion: "2.917.0",
78
78
  userAgent:
79
- "speakeasy-sdk/typescript 26.7.0-dev.6 2.917.0 v2026.07.00 @moovio/sdk",
79
+ "speakeasy-sdk/typescript 26.10.0-dev.0 2.917.0 v2026.10.00 @moovio/sdk",
80
80
  } as const;
@@ -19,7 +19,7 @@ const routes = buildRouteMap({
19
19
  export const app = buildApplication(routes, {
20
20
  name: "mcp",
21
21
  versionInfo: {
22
- currentVersion: "26.7.0-dev.6",
22
+ currentVersion: "26.10.0-dev.0",
23
23
  },
24
24
  });
25
25
 
@@ -181,6 +181,7 @@ import { tool$transfersGenerateOptions } from "./tools/transfersGenerateOptions.
181
181
  import { tool$transfersGet } from "./tools/transfersGet.js";
182
182
  import { tool$transfersGetCancellation } from "./tools/transfersGetCancellation.js";
183
183
  import { tool$transfersGetRefund } from "./tools/transfersGetRefund.js";
184
+ import { tool$transfersGetRiskOutcomes } from "./tools/transfersGetRiskOutcomes.js";
184
185
  import { tool$transfersInitiateRefund } from "./tools/transfersInitiateRefund.js";
185
186
  import { tool$transfersList } from "./tools/transfersList.js";
186
187
  import { tool$transfersListCancellations } from "./tools/transfersListCancellations.js";
@@ -215,7 +216,7 @@ export function createMCPServer(deps: {
215
216
  }) {
216
217
  const server = new McpServer({
217
218
  name: "Moov",
218
- version: "26.7.0-dev.6",
219
+ version: "26.10.0-dev.0",
219
220
  });
220
221
 
221
222
  const client = new MoovCore({
@@ -386,6 +387,7 @@ export function createMCPServer(deps: {
386
387
  tool(tool$transfersListRefunds);
387
388
  tool(tool$transfersGetRefund);
388
389
  tool(tool$transfersCreateReversal);
390
+ tool(tool$transfersGetRiskOutcomes);
389
391
  tool(tool$underwritingGet);
390
392
  tool(tool$underwritingSave);
391
393
  tool(tool$underwritingUpsert);
@@ -0,0 +1,41 @@
1
+ /*
2
+ * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.
3
+ */
4
+
5
+ import { transfersGetRiskOutcomes } from "../../funcs/transfersGetRiskOutcomes.js";
6
+ import * as operations from "../../models/operations/index.js";
7
+ import { formatResult, ToolDefinition } from "../tools.js";
8
+
9
+ const args = {
10
+ request: operations.GetTransferRiskOutcomesRequest$inboundSchema,
11
+ };
12
+
13
+ export const tool$transfersGetRiskOutcomes: ToolDefinition<typeof args> = {
14
+ name: "transfers-get-risk-outcomes",
15
+ description:
16
+ `Retrieve the risk rules that contributed to a transfer's risk decision.
17
+
18
+ This endpoint has limited availability and must be enabled for your account by Moov.
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 \`/accounts/{accountID}/transfers.read\` scope.`,
22
+ args,
23
+ tool: async (client, args, ctx) => {
24
+ const [result, apiCall] = await transfersGetRiskOutcomes(
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,58 @@
1
+ /*
2
+ * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.
3
+ */
4
+
5
+ import * as z from "zod/v3";
6
+ import { safeParse } from "../../lib/schemas.js";
7
+ import { Result as SafeParseResult } from "../../types/fp.js";
8
+ import * as types from "../../types/primitives.js";
9
+ import { SDKValidationError } from "../errors/sdkvalidationerror.js";
10
+
11
+ /**
12
+ * A risk rule that contributed to a transfer's risk decision.
13
+ */
14
+ export type ContributingRule = {
15
+ /**
16
+ * Human-readable name of the contributing risk rule.
17
+ */
18
+ name: string;
19
+ };
20
+
21
+ /** @internal */
22
+ export const ContributingRule$inboundSchema: z.ZodType<
23
+ ContributingRule,
24
+ z.ZodTypeDef,
25
+ unknown
26
+ > = z.object({
27
+ name: types.string(),
28
+ });
29
+ /** @internal */
30
+ export type ContributingRule$Outbound = {
31
+ name: string;
32
+ };
33
+
34
+ /** @internal */
35
+ export const ContributingRule$outboundSchema: z.ZodType<
36
+ ContributingRule$Outbound,
37
+ z.ZodTypeDef,
38
+ ContributingRule
39
+ > = z.object({
40
+ name: z.string(),
41
+ });
42
+
43
+ export function contributingRuleToJSON(
44
+ contributingRule: ContributingRule,
45
+ ): string {
46
+ return JSON.stringify(
47
+ ContributingRule$outboundSchema.parse(contributingRule),
48
+ );
49
+ }
50
+ export function contributingRuleFromJSON(
51
+ jsonString: string,
52
+ ): SafeParseResult<ContributingRule, SDKValidationError> {
53
+ return safeParse(
54
+ jsonString,
55
+ (x) => ContributingRule$inboundSchema.parse(JSON.parse(x)),
56
+ `Failed to parse 'ContributingRule' from JSON`,
57
+ );
58
+ }
@@ -26,7 +26,7 @@ export type FileDetails = {
26
26
  fileName: string;
27
27
  accountID: string;
28
28
  /**
29
- * The file's purpose.
29
+ * The purpose of the file being uploaded.
30
30
  */
31
31
  filePurpose: FilePurpose;
32
32
  /**
@@ -7,7 +7,7 @@ import * as openEnums from "../../types/enums.js";
7
7
  import { OpenEnum } from "../../types/enums.js";
8
8
 
9
9
  /**
10
- * The file's purpose.
10
+ * The purpose of the file being uploaded.
11
11
  */
12
12
  export const FilePurpose = {
13
13
  BusinessVerification: "business_verification",
@@ -18,7 +18,7 @@ export const FilePurpose = {
18
18
  IdentityVerification: "identity_verification",
19
19
  } as const;
20
20
  /**
21
- * The file's purpose.
21
+ * The purpose of the file being uploaded.
22
22
  */
23
23
  export type FilePurpose = OpenEnum<typeof FilePurpose>;
24
24
 
@@ -143,6 +143,7 @@ export * from "./completebankaccountverification.js";
143
143
  export * from "./completedmicrodeposits.js";
144
144
  export * from "./completemicrodeposits.js";
145
145
  export * from "./contact.js";
146
+ export * from "./contributingrule.js";
146
147
  export * from "./createaccount.js";
147
148
  export * from "./createaccountsettings.js";
148
149
  export * from "./createaccounttype.js";
@@ -369,6 +370,7 @@ export * from "./othercardfees.js";
369
370
  export * from "./partialscheduleaccount.js";
370
371
  export * from "./partnerfees.js";
371
372
  export * from "./partnerpricingagreement.js";
373
+ export * from "./partnerriskoutcomesresponse.js";
372
374
  export * from "./patchaccount.js";
373
375
  export * from "./patchbusiness.js";
374
376
  export * from "./patchindividual.js";
@@ -40,7 +40,7 @@ export type OnboardingInvite = {
40
40
  */
41
41
  link: string;
42
42
  /**
43
- * The scopes requested by the inviter.
43
+ * Optional URL to redirect the user to after they complete the onboarding process.
44
44
  */
45
45
  returnURL?: string | undefined;
46
46
  /**
@@ -0,0 +1,77 @@
1
+ /*
2
+ * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.
3
+ */
4
+
5
+ import * as z from "zod/v3";
6
+ import { safeParse } from "../../lib/schemas.js";
7
+ import { Result as SafeParseResult } from "../../types/fp.js";
8
+ import * as types from "../../types/primitives.js";
9
+ import { SDKValidationError } from "../errors/sdkvalidationerror.js";
10
+ import {
11
+ ContributingRule,
12
+ ContributingRule$inboundSchema,
13
+ ContributingRule$Outbound,
14
+ ContributingRule$outboundSchema,
15
+ } from "./contributingrule.js";
16
+
17
+ /**
18
+ * The risk rules that contributed to a transfer's risk decision.
19
+ *
20
+ * @remarks
21
+ *
22
+ * This information has limited availability and must be enabled for your account by Moov.
23
+ */
24
+ export type PartnerRiskOutcomesResponse = {
25
+ /**
26
+ * Identifier of the transfer these outcomes belong to.
27
+ */
28
+ transferID: string;
29
+ /**
30
+ * The risk rules that contributed to the decision. May be empty when no rules are disclosed.
31
+ */
32
+ contributingRules: Array<ContributingRule>;
33
+ };
34
+
35
+ /** @internal */
36
+ export const PartnerRiskOutcomesResponse$inboundSchema: z.ZodType<
37
+ PartnerRiskOutcomesResponse,
38
+ z.ZodTypeDef,
39
+ unknown
40
+ > = z.object({
41
+ transferID: types.string(),
42
+ contributingRules: z.array(ContributingRule$inboundSchema),
43
+ });
44
+ /** @internal */
45
+ export type PartnerRiskOutcomesResponse$Outbound = {
46
+ transferID: string;
47
+ contributingRules: Array<ContributingRule$Outbound>;
48
+ };
49
+
50
+ /** @internal */
51
+ export const PartnerRiskOutcomesResponse$outboundSchema: z.ZodType<
52
+ PartnerRiskOutcomesResponse$Outbound,
53
+ z.ZodTypeDef,
54
+ PartnerRiskOutcomesResponse
55
+ > = z.object({
56
+ transferID: z.string(),
57
+ contributingRules: z.array(ContributingRule$outboundSchema),
58
+ });
59
+
60
+ export function partnerRiskOutcomesResponseToJSON(
61
+ partnerRiskOutcomesResponse: PartnerRiskOutcomesResponse,
62
+ ): string {
63
+ return JSON.stringify(
64
+ PartnerRiskOutcomesResponse$outboundSchema.parse(
65
+ partnerRiskOutcomesResponse,
66
+ ),
67
+ );
68
+ }
69
+ export function partnerRiskOutcomesResponseFromJSON(
70
+ jsonString: string,
71
+ ): SafeParseResult<PartnerRiskOutcomesResponse, SDKValidationError> {
72
+ return safeParse(
73
+ jsonString,
74
+ (x) => PartnerRiskOutcomesResponse$inboundSchema.parse(JSON.parse(x)),
75
+ `Failed to parse 'PartnerRiskOutcomesResponse' from JSON`,
76
+ );
77
+ }
@@ -0,0 +1,136 @@
1
+ /*
2
+ * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.
3
+ */
4
+
5
+ import * as z from "zod/v3";
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 types from "../../types/primitives.js";
10
+ import * as components from "../components/index.js";
11
+ import { SDKValidationError } from "../errors/sdkvalidationerror.js";
12
+
13
+ export type GetTransferRiskOutcomesRequest = {
14
+ /**
15
+ * Identifier for the transfer.
16
+ */
17
+ transferID: string;
18
+ /**
19
+ * The account the transfer belongs to. When omitted, the account is resolved
20
+ *
21
+ * @remarks
22
+ * from the calling credentials.
23
+ */
24
+ xAccountID?: string | undefined;
25
+ };
26
+
27
+ export type GetTransferRiskOutcomesResponse = {
28
+ headers: { [k: string]: Array<string> };
29
+ result: components.PartnerRiskOutcomesResponse;
30
+ };
31
+
32
+ /** @internal */
33
+ export const GetTransferRiskOutcomesRequest$inboundSchema: z.ZodType<
34
+ GetTransferRiskOutcomesRequest,
35
+ z.ZodTypeDef,
36
+ unknown
37
+ > = z.object({
38
+ transferID: types.string(),
39
+ "X-Account-ID": types.optional(types.string()),
40
+ }).transform((v) => {
41
+ return remap$(v, {
42
+ "X-Account-ID": "xAccountID",
43
+ });
44
+ });
45
+ /** @internal */
46
+ export type GetTransferRiskOutcomesRequest$Outbound = {
47
+ transferID: string;
48
+ "X-Account-ID"?: string | undefined;
49
+ };
50
+
51
+ /** @internal */
52
+ export const GetTransferRiskOutcomesRequest$outboundSchema: z.ZodType<
53
+ GetTransferRiskOutcomesRequest$Outbound,
54
+ z.ZodTypeDef,
55
+ GetTransferRiskOutcomesRequest
56
+ > = z.object({
57
+ transferID: z.string(),
58
+ xAccountID: z.string().optional(),
59
+ }).transform((v) => {
60
+ return remap$(v, {
61
+ xAccountID: "X-Account-ID",
62
+ });
63
+ });
64
+
65
+ export function getTransferRiskOutcomesRequestToJSON(
66
+ getTransferRiskOutcomesRequest: GetTransferRiskOutcomesRequest,
67
+ ): string {
68
+ return JSON.stringify(
69
+ GetTransferRiskOutcomesRequest$outboundSchema.parse(
70
+ getTransferRiskOutcomesRequest,
71
+ ),
72
+ );
73
+ }
74
+ export function getTransferRiskOutcomesRequestFromJSON(
75
+ jsonString: string,
76
+ ): SafeParseResult<GetTransferRiskOutcomesRequest, SDKValidationError> {
77
+ return safeParse(
78
+ jsonString,
79
+ (x) => GetTransferRiskOutcomesRequest$inboundSchema.parse(JSON.parse(x)),
80
+ `Failed to parse 'GetTransferRiskOutcomesRequest' from JSON`,
81
+ );
82
+ }
83
+
84
+ /** @internal */
85
+ export const GetTransferRiskOutcomesResponse$inboundSchema: z.ZodType<
86
+ GetTransferRiskOutcomesResponse,
87
+ z.ZodTypeDef,
88
+ unknown
89
+ > = z.object({
90
+ Headers: z.record(z.array(z.string())).default({}),
91
+ Result: components.PartnerRiskOutcomesResponse$inboundSchema,
92
+ }).transform((v) => {
93
+ return remap$(v, {
94
+ "Headers": "headers",
95
+ "Result": "result",
96
+ });
97
+ });
98
+ /** @internal */
99
+ export type GetTransferRiskOutcomesResponse$Outbound = {
100
+ Headers: { [k: string]: Array<string> };
101
+ Result: components.PartnerRiskOutcomesResponse$Outbound;
102
+ };
103
+
104
+ /** @internal */
105
+ export const GetTransferRiskOutcomesResponse$outboundSchema: z.ZodType<
106
+ GetTransferRiskOutcomesResponse$Outbound,
107
+ z.ZodTypeDef,
108
+ GetTransferRiskOutcomesResponse
109
+ > = z.object({
110
+ headers: z.record(z.array(z.string())),
111
+ result: components.PartnerRiskOutcomesResponse$outboundSchema,
112
+ }).transform((v) => {
113
+ return remap$(v, {
114
+ headers: "Headers",
115
+ result: "Result",
116
+ });
117
+ });
118
+
119
+ export function getTransferRiskOutcomesResponseToJSON(
120
+ getTransferRiskOutcomesResponse: GetTransferRiskOutcomesResponse,
121
+ ): string {
122
+ return JSON.stringify(
123
+ GetTransferRiskOutcomesResponse$outboundSchema.parse(
124
+ getTransferRiskOutcomesResponse,
125
+ ),
126
+ );
127
+ }
128
+ export function getTransferRiskOutcomesResponseFromJSON(
129
+ jsonString: string,
130
+ ): SafeParseResult<GetTransferRiskOutcomesResponse, SDKValidationError> {
131
+ return safeParse(
132
+ jsonString,
133
+ (x) => GetTransferRiskOutcomesResponse$inboundSchema.parse(JSON.parse(x)),
134
+ `Failed to parse 'GetTransferRiskOutcomesResponse' from JSON`,
135
+ );
136
+ }
@@ -96,6 +96,7 @@ export * from "./gettermsofservicetoken.js";
96
96
  export * from "./getticket.js";
97
97
  export * from "./gettransfer.js";
98
98
  export * from "./gettransferconfig.js";
99
+ export * from "./gettransferriskoutcomes.js";
99
100
  export * from "./getunderwriting.js";
100
101
  export * from "./getwallet.js";
101
102
  export * from "./getwallettransaction.js";
@@ -10,6 +10,7 @@ import { transfersGenerateOptions } from "../funcs/transfersGenerateOptions.js";
10
10
  import { transfersGet } from "../funcs/transfersGet.js";
11
11
  import { transfersGetCancellation } from "../funcs/transfersGetCancellation.js";
12
12
  import { transfersGetRefund } from "../funcs/transfersGetRefund.js";
13
+ import { transfersGetRiskOutcomes } from "../funcs/transfersGetRiskOutcomes.js";
13
14
  import { transfersInitiateRefund } from "../funcs/transfersInitiateRefund.js";
14
15
  import { transfersList } from "../funcs/transfersList.js";
15
16
  import { transfersListCancellations } from "../funcs/transfersListCancellations.js";
@@ -268,4 +269,23 @@ export class Transfers extends ClientSDK {
268
269
  options,
269
270
  ));
270
271
  }
272
+
273
+ /**
274
+ * Retrieve the risk rules that contributed to a transfer's risk decision.
275
+ *
276
+ * This endpoint has limited availability and must be enabled for your account by Moov.
277
+ *
278
+ * To access this endpoint using an [access token](https://docs.moov.io/api/authentication/access-tokens/)
279
+ * you'll need to specify the `/accounts/{accountID}/transfers.read` scope.
280
+ */
281
+ async getRiskOutcomes(
282
+ request: operations.GetTransferRiskOutcomesRequest,
283
+ options?: RequestOptions,
284
+ ): Promise<operations.GetTransferRiskOutcomesResponse> {
285
+ return unwrapAsync(transfersGetRiskOutcomes(
286
+ this,
287
+ request,
288
+ options,
289
+ ));
290
+ }
271
291
  }