@moovio/sdk 26.7.0 → 26.10.0-dev.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 (57) hide show
  1. package/README.md +71 -59
  2. package/bin/mcp-server.js +344 -150
  3. package/bin/mcp-server.js.map +13 -8
  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.d.ts.map +1 -1
  11. package/lib/config.js +3 -3
  12. package/lib/config.js.map +1 -1
  13. package/mcp-server/mcp-server.js +1 -1
  14. package/mcp-server/mcp-server.js.map +1 -1
  15. package/mcp-server/server.d.ts.map +1 -1
  16. package/mcp-server/server.js +3 -1
  17. package/mcp-server/server.js.map +1 -1
  18. package/mcp-server/tools/transfersGetRiskOutcomes.d.ts +8 -0
  19. package/mcp-server/tools/transfersGetRiskOutcomes.d.ts.map +1 -0
  20. package/mcp-server/tools/transfersGetRiskOutcomes.js +67 -0
  21. package/mcp-server/tools/transfersGetRiskOutcomes.js.map +1 -0
  22. package/models/components/contributingrule.d.ts +23 -0
  23. package/models/components/contributingrule.d.ts.map +1 -0
  24. package/models/components/contributingrule.js +59 -0
  25. package/models/components/contributingrule.js.map +1 -0
  26. package/models/components/index.d.ts +2 -0
  27. package/models/components/index.d.ts.map +1 -1
  28. package/models/components/index.js +2 -0
  29. package/models/components/index.js.map +1 -1
  30. package/models/components/partnerriskoutcomesresponse.d.ts +33 -0
  31. package/models/components/partnerriskoutcomesresponse.d.ts.map +1 -0
  32. package/models/components/partnerriskoutcomesresponse.js +62 -0
  33. package/models/components/partnerriskoutcomesresponse.js.map +1 -0
  34. package/models/operations/gettransferriskoutcomes.d.ts +48 -0
  35. package/models/operations/gettransferriskoutcomes.d.ts.map +1 -0
  36. package/models/operations/gettransferriskoutcomes.js +99 -0
  37. package/models/operations/gettransferriskoutcomes.js.map +1 -0
  38. package/models/operations/index.d.ts +1 -0
  39. package/models/operations/index.d.ts.map +1 -1
  40. package/models/operations/index.js +1 -0
  41. package/models/operations/index.js.map +1 -1
  42. package/package.json +1 -1
  43. package/sdk/transfers.d.ts +9 -0
  44. package/sdk/transfers.d.ts.map +1 -1
  45. package/sdk/transfers.js +12 -0
  46. package/sdk/transfers.js.map +1 -1
  47. package/src/funcs/transfersGetRiskOutcomes.ts +182 -0
  48. package/src/lib/config.ts +4 -3
  49. package/src/mcp-server/mcp-server.ts +1 -1
  50. package/src/mcp-server/server.ts +3 -1
  51. package/src/mcp-server/tools/transfersGetRiskOutcomes.ts +41 -0
  52. package/src/models/components/contributingrule.ts +58 -0
  53. package/src/models/components/index.ts +2 -0
  54. package/src/models/components/partnerriskoutcomesresponse.ts +77 -0
  55. package/src/models/operations/gettransferriskoutcomes.ts +136 -0
  56. package/src/models/operations/index.ts +1 -0
  57. package/src/sdk/transfers.ts +20 -0
@@ -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",
22
+ currentVersion: "26.10.0-dev.1",
23
23
  },
24
24
  });
25
25
 
@@ -182,6 +182,7 @@ import { tool$transfersGenerateOptions } from "./tools/transfersGenerateOptions.
182
182
  import { tool$transfersGet } from "./tools/transfersGet.js";
183
183
  import { tool$transfersGetCancellation } from "./tools/transfersGetCancellation.js";
184
184
  import { tool$transfersGetRefund } from "./tools/transfersGetRefund.js";
185
+ import { tool$transfersGetRiskOutcomes } from "./tools/transfersGetRiskOutcomes.js";
185
186
  import { tool$transfersInitiateRefund } from "./tools/transfersInitiateRefund.js";
186
187
  import { tool$transfersList } from "./tools/transfersList.js";
187
188
  import { tool$transfersListCancellations } from "./tools/transfersListCancellations.js";
@@ -216,7 +217,7 @@ export function createMCPServer(deps: {
216
217
  }) {
217
218
  const server = new McpServer({
218
219
  name: "Moov",
219
- version: "26.7.0",
220
+ version: "26.10.0-dev.1",
220
221
  });
221
222
 
222
223
  const client = new MoovCore({
@@ -388,6 +389,7 @@ export function createMCPServer(deps: {
388
389
  tool(tool$transfersListRefunds);
389
390
  tool(tool$transfersGetRefund);
390
391
  tool(tool$transfersCreateReversal);
392
+ tool(tool$transfersGetRiskOutcomes);
391
393
  tool(tool$underwritingGet);
392
394
  tool(tool$underwritingSave);
393
395
  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
+ }
@@ -144,6 +144,7 @@ export * from "./completebankaccountverification.js";
144
144
  export * from "./completedmicrodeposits.js";
145
145
  export * from "./completemicrodeposits.js";
146
146
  export * from "./contact.js";
147
+ export * from "./contributingrule.js";
147
148
  export * from "./createaccount.js";
148
149
  export * from "./createaccountsettings.js";
149
150
  export * from "./createaccounttype.js";
@@ -371,6 +372,7 @@ export * from "./othercardfees.js";
371
372
  export * from "./partialscheduleaccount.js";
372
373
  export * from "./partnerfees.js";
373
374
  export * from "./partnerpricingagreement.js";
375
+ export * from "./partnerriskoutcomesresponse.js";
374
376
  export * from "./patchaccount.js";
375
377
  export * from "./patchbusiness.js";
376
378
  export * from "./patchindividual.js";
@@ -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
+ }
@@ -97,6 +97,7 @@ export * from "./gettermsofservicetoken.js";
97
97
  export * from "./getticket.js";
98
98
  export * from "./gettransfer.js";
99
99
  export * from "./gettransferconfig.js";
100
+ export * from "./gettransferriskoutcomes.js";
100
101
  export * from "./getunderwriting.js";
101
102
  export * from "./getwallet.js";
102
103
  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
  }