@moovio/sdk 0.22.7 → 0.22.8
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 +72 -51
- package/_speakeasy/.github/action-inputs-config.json +53 -0
- package/_speakeasy/.github/action-security-config.json +88 -0
- package/bin/mcp-server.js +40683 -21874
- package/bin/mcp-server.js.map +212 -37
- package/examples/package-lock.json +2 -2
- package/funcs/accountsConnect.d.ts +16 -0
- package/funcs/accountsConnect.d.ts.map +1 -0
- package/funcs/accountsConnect.js +138 -0
- package/funcs/accountsConnect.js.map +1 -0
- package/funcs/accountsListConnected.d.ts +21 -0
- package/funcs/accountsListConnected.d.ts.map +1 -0
- package/funcs/accountsListConnected.js +138 -0
- package/funcs/accountsListConnected.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/prompts.d.ts +3 -3
- package/mcp-server/prompts.d.ts.map +1 -1
- package/mcp-server/prompts.js.map +1 -1
- package/mcp-server/resources.d.ts +3 -3
- package/mcp-server/resources.d.ts.map +1 -1
- package/mcp-server/resources.js.map +1 -1
- package/mcp-server/server.d.ts.map +1 -1
- package/mcp-server/server.js +5 -1
- package/mcp-server/server.js.map +1 -1
- package/mcp-server/tools/accountsConnect.d.ts +8 -0
- package/mcp-server/tools/accountsConnect.d.ts.map +1 -0
- package/mcp-server/tools/accountsConnect.js +62 -0
- package/mcp-server/tools/accountsConnect.js.map +1 -0
- package/mcp-server/tools/accountsListConnected.d.ts +8 -0
- package/mcp-server/tools/accountsListConnected.d.ts.map +1 -0
- package/mcp-server/tools/accountsListConnected.js +69 -0
- package/mcp-server/tools/accountsListConnected.js.map +1 -0
- package/mcp-server/tools.d.ts +3 -3
- package/mcp-server/tools.d.ts.map +1 -1
- package/mcp-server/tools.js.map +1 -1
- package/models/components/index.d.ts +1 -0
- package/models/components/index.d.ts.map +1 -1
- package/models/components/index.js +1 -0
- package/models/components/index.js.map +1 -1
- package/models/components/sharescopes.d.ts +29 -0
- package/models/components/sharescopes.d.ts.map +1 -0
- package/models/components/sharescopes.js +61 -0
- package/models/components/sharescopes.js.map +1 -0
- package/models/errors/connectaccountrequestvalidationerror.d.ts +33 -0
- package/models/errors/connectaccountrequestvalidationerror.d.ts.map +1 -0
- package/models/errors/connectaccountrequestvalidationerror.js +80 -0
- package/models/errors/connectaccountrequestvalidationerror.js.map +1 -0
- package/models/errors/index.d.ts +1 -0
- package/models/errors/index.d.ts.map +1 -1
- package/models/errors/index.js +1 -0
- package/models/errors/index.js.map +1 -1
- package/models/operations/connectaccount.d.ts +64 -0
- package/models/operations/connectaccount.d.ts.map +1 -0
- package/models/operations/connectaccount.js +118 -0
- package/models/operations/connectaccount.js.map +1 -0
- package/models/operations/index.d.ts +2 -0
- package/models/operations/index.d.ts.map +1 -1
- package/models/operations/index.js +2 -0
- package/models/operations/index.js.map +1 -1
- package/models/operations/listconnectedaccountsforaccount.d.ts +130 -0
- package/models/operations/listconnectedaccountsforaccount.d.ts.map +1 -0
- package/models/operations/listconnectedaccountsforaccount.js +130 -0
- package/models/operations/listconnectedaccountsforaccount.js.map +1 -0
- package/package.json +2 -2
- package/sdk/accounts.d.ts +16 -0
- package/sdk/accounts.d.ts.map +1 -1
- package/sdk/accounts.js +22 -0
- package/sdk/accounts.js.map +1 -1
- package/src/funcs/accountsConnect.ts +200 -0
- package/src/funcs/accountsListConnected.ts +202 -0
- package/src/lib/config.ts +3 -3
- package/src/mcp-server/mcp-server.ts +1 -1
- package/src/mcp-server/prompts.ts +7 -3
- package/src/mcp-server/resources.ts +7 -3
- package/src/mcp-server/server.ts +5 -1
- package/src/mcp-server/tools/accountsConnect.ts +35 -0
- package/src/mcp-server/tools/accountsListConnected.ts +42 -0
- package/src/mcp-server/tools.ts +7 -3
- package/src/models/components/index.ts +1 -0
- package/src/models/components/sharescopes.ts +65 -0
- package/src/models/errors/connectaccountrequestvalidationerror.ts +74 -0
- package/src/models/errors/index.ts +1 -0
- package/src/models/operations/connectaccount.ts +181 -0
- package/src/models/operations/index.ts +2 -0
- package/src/models/operations/listconnectedaccountsforaccount.ts +276 -0
- package/src/sdk/accounts.ts +38 -0
|
@@ -0,0 +1,65 @@
|
|
|
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 { SDKValidationError } from "../errors/sdkvalidationerror.js";
|
|
9
|
+
import {
|
|
10
|
+
ApplicationScope,
|
|
11
|
+
ApplicationScope$inboundSchema,
|
|
12
|
+
ApplicationScope$outboundSchema,
|
|
13
|
+
} from "./applicationscope.js";
|
|
14
|
+
|
|
15
|
+
/**
|
|
16
|
+
* Describes the scopes being shared from a subject account to a principal account.
|
|
17
|
+
*/
|
|
18
|
+
export type ShareScopes = {
|
|
19
|
+
/**
|
|
20
|
+
* The account ID that will receive access to the scopes.
|
|
21
|
+
*/
|
|
22
|
+
principalAccountID: string;
|
|
23
|
+
/**
|
|
24
|
+
* The list of scopes to share with the principal account. If none are provided, all intersecting scopes are added.
|
|
25
|
+
*/
|
|
26
|
+
allowScopes?: Array<ApplicationScope> | undefined;
|
|
27
|
+
};
|
|
28
|
+
|
|
29
|
+
/** @internal */
|
|
30
|
+
export const ShareScopes$inboundSchema: z.ZodType<
|
|
31
|
+
ShareScopes,
|
|
32
|
+
z.ZodTypeDef,
|
|
33
|
+
unknown
|
|
34
|
+
> = z.object({
|
|
35
|
+
principalAccountID: z.string(),
|
|
36
|
+
allowScopes: z.array(ApplicationScope$inboundSchema).optional(),
|
|
37
|
+
});
|
|
38
|
+
/** @internal */
|
|
39
|
+
export type ShareScopes$Outbound = {
|
|
40
|
+
principalAccountID: string;
|
|
41
|
+
allowScopes?: Array<string> | undefined;
|
|
42
|
+
};
|
|
43
|
+
|
|
44
|
+
/** @internal */
|
|
45
|
+
export const ShareScopes$outboundSchema: z.ZodType<
|
|
46
|
+
ShareScopes$Outbound,
|
|
47
|
+
z.ZodTypeDef,
|
|
48
|
+
ShareScopes
|
|
49
|
+
> = z.object({
|
|
50
|
+
principalAccountID: z.string(),
|
|
51
|
+
allowScopes: z.array(ApplicationScope$outboundSchema).optional(),
|
|
52
|
+
});
|
|
53
|
+
|
|
54
|
+
export function shareScopesToJSON(shareScopes: ShareScopes): string {
|
|
55
|
+
return JSON.stringify(ShareScopes$outboundSchema.parse(shareScopes));
|
|
56
|
+
}
|
|
57
|
+
export function shareScopesFromJSON(
|
|
58
|
+
jsonString: string,
|
|
59
|
+
): SafeParseResult<ShareScopes, SDKValidationError> {
|
|
60
|
+
return safeParse(
|
|
61
|
+
jsonString,
|
|
62
|
+
(x) => ShareScopes$inboundSchema.parse(JSON.parse(x)),
|
|
63
|
+
`Failed to parse 'ShareScopes' from JSON`,
|
|
64
|
+
);
|
|
65
|
+
}
|
|
@@ -0,0 +1,74 @@
|
|
|
1
|
+
/*
|
|
2
|
+
* Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.
|
|
3
|
+
*/
|
|
4
|
+
|
|
5
|
+
import * as z from "zod/v3";
|
|
6
|
+
import { MoovError } from "./mooverror.js";
|
|
7
|
+
|
|
8
|
+
export type ConnectAccountRequestValidationErrorData = {
|
|
9
|
+
principalAccountID?: string | undefined;
|
|
10
|
+
allowScopes?: { [k: string]: string } | undefined;
|
|
11
|
+
};
|
|
12
|
+
|
|
13
|
+
export class ConnectAccountRequestValidationError extends MoovError {
|
|
14
|
+
principalAccountID?: string | undefined;
|
|
15
|
+
allowScopes?: { [k: string]: string } | undefined;
|
|
16
|
+
|
|
17
|
+
/** The original data that was passed to this error instance. */
|
|
18
|
+
data$: ConnectAccountRequestValidationErrorData;
|
|
19
|
+
|
|
20
|
+
constructor(
|
|
21
|
+
err: ConnectAccountRequestValidationErrorData,
|
|
22
|
+
httpMeta: { response: Response; request: Request; body: string },
|
|
23
|
+
) {
|
|
24
|
+
const message = "message" in err && typeof err.message === "string"
|
|
25
|
+
? err.message
|
|
26
|
+
: `API error occurred: ${JSON.stringify(err)}`;
|
|
27
|
+
super(message, httpMeta);
|
|
28
|
+
this.data$ = err;
|
|
29
|
+
if (err.principalAccountID != null) {
|
|
30
|
+
this.principalAccountID = err.principalAccountID;
|
|
31
|
+
}
|
|
32
|
+
if (err.allowScopes != null) this.allowScopes = err.allowScopes;
|
|
33
|
+
|
|
34
|
+
this.name = "ConnectAccountRequestValidationError";
|
|
35
|
+
}
|
|
36
|
+
}
|
|
37
|
+
|
|
38
|
+
/** @internal */
|
|
39
|
+
export const ConnectAccountRequestValidationError$inboundSchema: z.ZodType<
|
|
40
|
+
ConnectAccountRequestValidationError,
|
|
41
|
+
z.ZodTypeDef,
|
|
42
|
+
unknown
|
|
43
|
+
> = z.object({
|
|
44
|
+
principalAccountID: z.string().optional(),
|
|
45
|
+
allowScopes: z.record(z.string()).optional(),
|
|
46
|
+
request$: z.instanceof(Request),
|
|
47
|
+
response$: z.instanceof(Response),
|
|
48
|
+
body$: z.string(),
|
|
49
|
+
})
|
|
50
|
+
.transform((v) => {
|
|
51
|
+
return new ConnectAccountRequestValidationError(v, {
|
|
52
|
+
request: v.request$,
|
|
53
|
+
response: v.response$,
|
|
54
|
+
body: v.body$,
|
|
55
|
+
});
|
|
56
|
+
});
|
|
57
|
+
|
|
58
|
+
/** @internal */
|
|
59
|
+
export type ConnectAccountRequestValidationError$Outbound = {
|
|
60
|
+
principalAccountID?: string | undefined;
|
|
61
|
+
allowScopes?: { [k: string]: string } | undefined;
|
|
62
|
+
};
|
|
63
|
+
|
|
64
|
+
/** @internal */
|
|
65
|
+
export const ConnectAccountRequestValidationError$outboundSchema: z.ZodType<
|
|
66
|
+
ConnectAccountRequestValidationError$Outbound,
|
|
67
|
+
z.ZodTypeDef,
|
|
68
|
+
ConnectAccountRequestValidationError
|
|
69
|
+
> = z.instanceof(ConnectAccountRequestValidationError)
|
|
70
|
+
.transform(v => v.data$)
|
|
71
|
+
.pipe(z.object({
|
|
72
|
+
principalAccountID: z.string().optional(),
|
|
73
|
+
allowScopes: z.record(z.string()).optional(),
|
|
74
|
+
}));
|
|
@@ -10,6 +10,7 @@ export * from "./authtokenrequesterror.js";
|
|
|
10
10
|
export * from "./bankaccountvalidationerror.js";
|
|
11
11
|
export * from "./brandvalidationerror.js";
|
|
12
12
|
export * from "./cardacquiringrefund.js";
|
|
13
|
+
export * from "./connectaccountrequestvalidationerror.js";
|
|
13
14
|
export * from "./createaccounterror.js";
|
|
14
15
|
export * from "./createinvoiceerror.js";
|
|
15
16
|
export * from "./createpaymentlinkerror.js";
|
|
@@ -0,0 +1,181 @@
|
|
|
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 components from "../components/index.js";
|
|
10
|
+
import { SDKValidationError } from "../errors/sdkvalidationerror.js";
|
|
11
|
+
|
|
12
|
+
export type ConnectAccountGlobals = {
|
|
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
|
+
* When no version is specified, the API defaults to `v2024.01.00`.
|
|
26
|
+
*/
|
|
27
|
+
xMoovVersion?: string | undefined;
|
|
28
|
+
};
|
|
29
|
+
|
|
30
|
+
export type ConnectAccountRequest = {
|
|
31
|
+
accountID: string;
|
|
32
|
+
shareScopes: components.ShareScopes;
|
|
33
|
+
};
|
|
34
|
+
|
|
35
|
+
export type ConnectAccountResponse = {
|
|
36
|
+
headers: { [k: string]: Array<string> };
|
|
37
|
+
};
|
|
38
|
+
|
|
39
|
+
/** @internal */
|
|
40
|
+
export const ConnectAccountGlobals$inboundSchema: z.ZodType<
|
|
41
|
+
ConnectAccountGlobals,
|
|
42
|
+
z.ZodTypeDef,
|
|
43
|
+
unknown
|
|
44
|
+
> = z.object({
|
|
45
|
+
"X-Moov-Version": z.string().optional(),
|
|
46
|
+
}).transform((v) => {
|
|
47
|
+
return remap$(v, {
|
|
48
|
+
"X-Moov-Version": "xMoovVersion",
|
|
49
|
+
});
|
|
50
|
+
});
|
|
51
|
+
/** @internal */
|
|
52
|
+
export type ConnectAccountGlobals$Outbound = {
|
|
53
|
+
"X-Moov-Version"?: string | undefined;
|
|
54
|
+
};
|
|
55
|
+
|
|
56
|
+
/** @internal */
|
|
57
|
+
export const ConnectAccountGlobals$outboundSchema: z.ZodType<
|
|
58
|
+
ConnectAccountGlobals$Outbound,
|
|
59
|
+
z.ZodTypeDef,
|
|
60
|
+
ConnectAccountGlobals
|
|
61
|
+
> = z.object({
|
|
62
|
+
xMoovVersion: z.string().optional(),
|
|
63
|
+
}).transform((v) => {
|
|
64
|
+
return remap$(v, {
|
|
65
|
+
xMoovVersion: "X-Moov-Version",
|
|
66
|
+
});
|
|
67
|
+
});
|
|
68
|
+
|
|
69
|
+
export function connectAccountGlobalsToJSON(
|
|
70
|
+
connectAccountGlobals: ConnectAccountGlobals,
|
|
71
|
+
): string {
|
|
72
|
+
return JSON.stringify(
|
|
73
|
+
ConnectAccountGlobals$outboundSchema.parse(connectAccountGlobals),
|
|
74
|
+
);
|
|
75
|
+
}
|
|
76
|
+
export function connectAccountGlobalsFromJSON(
|
|
77
|
+
jsonString: string,
|
|
78
|
+
): SafeParseResult<ConnectAccountGlobals, SDKValidationError> {
|
|
79
|
+
return safeParse(
|
|
80
|
+
jsonString,
|
|
81
|
+
(x) => ConnectAccountGlobals$inboundSchema.parse(JSON.parse(x)),
|
|
82
|
+
`Failed to parse 'ConnectAccountGlobals' from JSON`,
|
|
83
|
+
);
|
|
84
|
+
}
|
|
85
|
+
|
|
86
|
+
/** @internal */
|
|
87
|
+
export const ConnectAccountRequest$inboundSchema: z.ZodType<
|
|
88
|
+
ConnectAccountRequest,
|
|
89
|
+
z.ZodTypeDef,
|
|
90
|
+
unknown
|
|
91
|
+
> = z.object({
|
|
92
|
+
accountID: z.string(),
|
|
93
|
+
ShareScopes: components.ShareScopes$inboundSchema,
|
|
94
|
+
}).transform((v) => {
|
|
95
|
+
return remap$(v, {
|
|
96
|
+
"ShareScopes": "shareScopes",
|
|
97
|
+
});
|
|
98
|
+
});
|
|
99
|
+
/** @internal */
|
|
100
|
+
export type ConnectAccountRequest$Outbound = {
|
|
101
|
+
accountID: string;
|
|
102
|
+
ShareScopes: components.ShareScopes$Outbound;
|
|
103
|
+
};
|
|
104
|
+
|
|
105
|
+
/** @internal */
|
|
106
|
+
export const ConnectAccountRequest$outboundSchema: z.ZodType<
|
|
107
|
+
ConnectAccountRequest$Outbound,
|
|
108
|
+
z.ZodTypeDef,
|
|
109
|
+
ConnectAccountRequest
|
|
110
|
+
> = z.object({
|
|
111
|
+
accountID: z.string(),
|
|
112
|
+
shareScopes: components.ShareScopes$outboundSchema,
|
|
113
|
+
}).transform((v) => {
|
|
114
|
+
return remap$(v, {
|
|
115
|
+
shareScopes: "ShareScopes",
|
|
116
|
+
});
|
|
117
|
+
});
|
|
118
|
+
|
|
119
|
+
export function connectAccountRequestToJSON(
|
|
120
|
+
connectAccountRequest: ConnectAccountRequest,
|
|
121
|
+
): string {
|
|
122
|
+
return JSON.stringify(
|
|
123
|
+
ConnectAccountRequest$outboundSchema.parse(connectAccountRequest),
|
|
124
|
+
);
|
|
125
|
+
}
|
|
126
|
+
export function connectAccountRequestFromJSON(
|
|
127
|
+
jsonString: string,
|
|
128
|
+
): SafeParseResult<ConnectAccountRequest, SDKValidationError> {
|
|
129
|
+
return safeParse(
|
|
130
|
+
jsonString,
|
|
131
|
+
(x) => ConnectAccountRequest$inboundSchema.parse(JSON.parse(x)),
|
|
132
|
+
`Failed to parse 'ConnectAccountRequest' from JSON`,
|
|
133
|
+
);
|
|
134
|
+
}
|
|
135
|
+
|
|
136
|
+
/** @internal */
|
|
137
|
+
export const ConnectAccountResponse$inboundSchema: z.ZodType<
|
|
138
|
+
ConnectAccountResponse,
|
|
139
|
+
z.ZodTypeDef,
|
|
140
|
+
unknown
|
|
141
|
+
> = z.object({
|
|
142
|
+
Headers: z.record(z.array(z.string())).default({}),
|
|
143
|
+
}).transform((v) => {
|
|
144
|
+
return remap$(v, {
|
|
145
|
+
"Headers": "headers",
|
|
146
|
+
});
|
|
147
|
+
});
|
|
148
|
+
/** @internal */
|
|
149
|
+
export type ConnectAccountResponse$Outbound = {
|
|
150
|
+
Headers: { [k: string]: Array<string> };
|
|
151
|
+
};
|
|
152
|
+
|
|
153
|
+
/** @internal */
|
|
154
|
+
export const ConnectAccountResponse$outboundSchema: z.ZodType<
|
|
155
|
+
ConnectAccountResponse$Outbound,
|
|
156
|
+
z.ZodTypeDef,
|
|
157
|
+
ConnectAccountResponse
|
|
158
|
+
> = z.object({
|
|
159
|
+
headers: z.record(z.array(z.string())),
|
|
160
|
+
}).transform((v) => {
|
|
161
|
+
return remap$(v, {
|
|
162
|
+
headers: "Headers",
|
|
163
|
+
});
|
|
164
|
+
});
|
|
165
|
+
|
|
166
|
+
export function connectAccountResponseToJSON(
|
|
167
|
+
connectAccountResponse: ConnectAccountResponse,
|
|
168
|
+
): string {
|
|
169
|
+
return JSON.stringify(
|
|
170
|
+
ConnectAccountResponse$outboundSchema.parse(connectAccountResponse),
|
|
171
|
+
);
|
|
172
|
+
}
|
|
173
|
+
export function connectAccountResponseFromJSON(
|
|
174
|
+
jsonString: string,
|
|
175
|
+
): SafeParseResult<ConnectAccountResponse, SDKValidationError> {
|
|
176
|
+
return safeParse(
|
|
177
|
+
jsonString,
|
|
178
|
+
(x) => ConnectAccountResponse$inboundSchema.parse(JSON.parse(x)),
|
|
179
|
+
`Failed to parse 'ConnectAccountResponse' from JSON`,
|
|
180
|
+
);
|
|
181
|
+
}
|
|
@@ -7,6 +7,7 @@ export * from "./assignaccountcountries.js";
|
|
|
7
7
|
export * from "./cancelschedule.js";
|
|
8
8
|
export * from "./completebankaccountverification.js";
|
|
9
9
|
export * from "./completemicrodeposits.js";
|
|
10
|
+
export * from "./connectaccount.js";
|
|
10
11
|
export * from "./createaccesstoken.js";
|
|
11
12
|
export * from "./createaccount.js";
|
|
12
13
|
export * from "./createapplepaysession.js";
|
|
@@ -99,6 +100,7 @@ export * from "./listadjustments.js";
|
|
|
99
100
|
export * from "./listbankaccounts.js";
|
|
100
101
|
export * from "./listcapabilities.js";
|
|
101
102
|
export * from "./listcards.js";
|
|
103
|
+
export * from "./listconnectedaccountsforaccount.js";
|
|
102
104
|
export * from "./listdisputeevidence.js";
|
|
103
105
|
export * from "./listdisputes.js";
|
|
104
106
|
export * from "./listfeeplanagreements.js";
|
|
@@ -0,0 +1,276 @@
|
|
|
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 components from "../components/index.js";
|
|
10
|
+
import { SDKValidationError } from "../errors/sdkvalidationerror.js";
|
|
11
|
+
|
|
12
|
+
export type ListConnectedAccountsForAccountGlobals = {
|
|
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
|
+
* When no version is specified, the API defaults to `v2024.01.00`.
|
|
26
|
+
*/
|
|
27
|
+
xMoovVersion?: string | undefined;
|
|
28
|
+
};
|
|
29
|
+
|
|
30
|
+
export type ListConnectedAccountsForAccountRequest = {
|
|
31
|
+
accountID: string;
|
|
32
|
+
/**
|
|
33
|
+
* Filter connected accounts by name.
|
|
34
|
+
*
|
|
35
|
+
* @remarks
|
|
36
|
+
*
|
|
37
|
+
* If provided, this query will attempt to find matches against the following Account and Profile fields:
|
|
38
|
+
* <ul>
|
|
39
|
+
* <li>Account `displayName`</li>
|
|
40
|
+
* <li>Individual Profile `firstName`, `middleName`, and `lastName`</li>
|
|
41
|
+
* <li>Business Profile `legalBusinessName`</li>
|
|
42
|
+
* </ul>
|
|
43
|
+
*
|
|
44
|
+
* Filtering by Guest Profile `name` is not currently supported.
|
|
45
|
+
*/
|
|
46
|
+
name?: string | undefined;
|
|
47
|
+
/**
|
|
48
|
+
* Filter connected accounts by email address.
|
|
49
|
+
*
|
|
50
|
+
* @remarks
|
|
51
|
+
*
|
|
52
|
+
* Provide the full email address to filter by email.
|
|
53
|
+
*/
|
|
54
|
+
email?: string | undefined;
|
|
55
|
+
/**
|
|
56
|
+
* Filter connected accounts by AccountType.
|
|
57
|
+
*
|
|
58
|
+
* @remarks
|
|
59
|
+
*
|
|
60
|
+
* If the `type` parameter is used in combination with `name`, only the corresponding type's name fields will
|
|
61
|
+
* be searched. For example, if `type=business` and `name=moov`, the search will attempt to find matches against
|
|
62
|
+
* the display name and Business Profile name fields (`legalBusinessName`, and `doingBusinessAs`).
|
|
63
|
+
*
|
|
64
|
+
* Filtering by `type=guest` is not currently supported.
|
|
65
|
+
*/
|
|
66
|
+
type?: components.CreateAccountType | undefined;
|
|
67
|
+
/**
|
|
68
|
+
* Serves as an optional alias from a foreign/external system which can be used to reference this resource.
|
|
69
|
+
*/
|
|
70
|
+
foreignID?: string | undefined;
|
|
71
|
+
/**
|
|
72
|
+
* Filter disconnected accounts.
|
|
73
|
+
*
|
|
74
|
+
* @remarks
|
|
75
|
+
*
|
|
76
|
+
* If true, the response will include disconnected accounts.
|
|
77
|
+
*/
|
|
78
|
+
includeDisconnected?: boolean | undefined;
|
|
79
|
+
/**
|
|
80
|
+
* Filter connected accounts by the capability.
|
|
81
|
+
*/
|
|
82
|
+
capability?: components.CapabilityID | undefined;
|
|
83
|
+
/**
|
|
84
|
+
* Filter connected accounts by the capability.
|
|
85
|
+
*/
|
|
86
|
+
capabilityStatus?: components.CapabilityStatus | undefined;
|
|
87
|
+
skip?: number | undefined;
|
|
88
|
+
count?: number | undefined;
|
|
89
|
+
};
|
|
90
|
+
|
|
91
|
+
export type ListConnectedAccountsForAccountResponse = {
|
|
92
|
+
headers: { [k: string]: Array<string> };
|
|
93
|
+
result: Array<components.Account>;
|
|
94
|
+
};
|
|
95
|
+
|
|
96
|
+
/** @internal */
|
|
97
|
+
export const ListConnectedAccountsForAccountGlobals$inboundSchema: z.ZodType<
|
|
98
|
+
ListConnectedAccountsForAccountGlobals,
|
|
99
|
+
z.ZodTypeDef,
|
|
100
|
+
unknown
|
|
101
|
+
> = z.object({
|
|
102
|
+
"X-Moov-Version": z.string().optional(),
|
|
103
|
+
}).transform((v) => {
|
|
104
|
+
return remap$(v, {
|
|
105
|
+
"X-Moov-Version": "xMoovVersion",
|
|
106
|
+
});
|
|
107
|
+
});
|
|
108
|
+
/** @internal */
|
|
109
|
+
export type ListConnectedAccountsForAccountGlobals$Outbound = {
|
|
110
|
+
"X-Moov-Version"?: string | undefined;
|
|
111
|
+
};
|
|
112
|
+
|
|
113
|
+
/** @internal */
|
|
114
|
+
export const ListConnectedAccountsForAccountGlobals$outboundSchema: z.ZodType<
|
|
115
|
+
ListConnectedAccountsForAccountGlobals$Outbound,
|
|
116
|
+
z.ZodTypeDef,
|
|
117
|
+
ListConnectedAccountsForAccountGlobals
|
|
118
|
+
> = z.object({
|
|
119
|
+
xMoovVersion: z.string().optional(),
|
|
120
|
+
}).transform((v) => {
|
|
121
|
+
return remap$(v, {
|
|
122
|
+
xMoovVersion: "X-Moov-Version",
|
|
123
|
+
});
|
|
124
|
+
});
|
|
125
|
+
|
|
126
|
+
export function listConnectedAccountsForAccountGlobalsToJSON(
|
|
127
|
+
listConnectedAccountsForAccountGlobals:
|
|
128
|
+
ListConnectedAccountsForAccountGlobals,
|
|
129
|
+
): string {
|
|
130
|
+
return JSON.stringify(
|
|
131
|
+
ListConnectedAccountsForAccountGlobals$outboundSchema.parse(
|
|
132
|
+
listConnectedAccountsForAccountGlobals,
|
|
133
|
+
),
|
|
134
|
+
);
|
|
135
|
+
}
|
|
136
|
+
export function listConnectedAccountsForAccountGlobalsFromJSON(
|
|
137
|
+
jsonString: string,
|
|
138
|
+
): SafeParseResult<ListConnectedAccountsForAccountGlobals, SDKValidationError> {
|
|
139
|
+
return safeParse(
|
|
140
|
+
jsonString,
|
|
141
|
+
(x) =>
|
|
142
|
+
ListConnectedAccountsForAccountGlobals$inboundSchema.parse(JSON.parse(x)),
|
|
143
|
+
`Failed to parse 'ListConnectedAccountsForAccountGlobals' from JSON`,
|
|
144
|
+
);
|
|
145
|
+
}
|
|
146
|
+
|
|
147
|
+
/** @internal */
|
|
148
|
+
export const ListConnectedAccountsForAccountRequest$inboundSchema: z.ZodType<
|
|
149
|
+
ListConnectedAccountsForAccountRequest,
|
|
150
|
+
z.ZodTypeDef,
|
|
151
|
+
unknown
|
|
152
|
+
> = z.object({
|
|
153
|
+
accountID: z.string(),
|
|
154
|
+
name: z.string().optional(),
|
|
155
|
+
email: z.string().optional(),
|
|
156
|
+
type: components.CreateAccountType$inboundSchema.optional(),
|
|
157
|
+
foreignID: z.string().optional(),
|
|
158
|
+
includeDisconnected: z.boolean().optional(),
|
|
159
|
+
capability: components.CapabilityID$inboundSchema.optional(),
|
|
160
|
+
capabilityStatus: components.CapabilityStatus$inboundSchema.optional(),
|
|
161
|
+
skip: z.number().int().optional(),
|
|
162
|
+
count: z.number().int().optional(),
|
|
163
|
+
});
|
|
164
|
+
/** @internal */
|
|
165
|
+
export type ListConnectedAccountsForAccountRequest$Outbound = {
|
|
166
|
+
accountID: string;
|
|
167
|
+
name?: string | undefined;
|
|
168
|
+
email?: string | undefined;
|
|
169
|
+
type?: string | undefined;
|
|
170
|
+
foreignID?: string | undefined;
|
|
171
|
+
includeDisconnected?: boolean | undefined;
|
|
172
|
+
capability?: string | undefined;
|
|
173
|
+
capabilityStatus?: string | undefined;
|
|
174
|
+
skip?: number | undefined;
|
|
175
|
+
count?: number | undefined;
|
|
176
|
+
};
|
|
177
|
+
|
|
178
|
+
/** @internal */
|
|
179
|
+
export const ListConnectedAccountsForAccountRequest$outboundSchema: z.ZodType<
|
|
180
|
+
ListConnectedAccountsForAccountRequest$Outbound,
|
|
181
|
+
z.ZodTypeDef,
|
|
182
|
+
ListConnectedAccountsForAccountRequest
|
|
183
|
+
> = z.object({
|
|
184
|
+
accountID: z.string(),
|
|
185
|
+
name: z.string().optional(),
|
|
186
|
+
email: z.string().optional(),
|
|
187
|
+
type: components.CreateAccountType$outboundSchema.optional(),
|
|
188
|
+
foreignID: z.string().optional(),
|
|
189
|
+
includeDisconnected: z.boolean().optional(),
|
|
190
|
+
capability: components.CapabilityID$outboundSchema.optional(),
|
|
191
|
+
capabilityStatus: components.CapabilityStatus$outboundSchema.optional(),
|
|
192
|
+
skip: z.number().int().optional(),
|
|
193
|
+
count: z.number().int().optional(),
|
|
194
|
+
});
|
|
195
|
+
|
|
196
|
+
export function listConnectedAccountsForAccountRequestToJSON(
|
|
197
|
+
listConnectedAccountsForAccountRequest:
|
|
198
|
+
ListConnectedAccountsForAccountRequest,
|
|
199
|
+
): string {
|
|
200
|
+
return JSON.stringify(
|
|
201
|
+
ListConnectedAccountsForAccountRequest$outboundSchema.parse(
|
|
202
|
+
listConnectedAccountsForAccountRequest,
|
|
203
|
+
),
|
|
204
|
+
);
|
|
205
|
+
}
|
|
206
|
+
export function listConnectedAccountsForAccountRequestFromJSON(
|
|
207
|
+
jsonString: string,
|
|
208
|
+
): SafeParseResult<ListConnectedAccountsForAccountRequest, SDKValidationError> {
|
|
209
|
+
return safeParse(
|
|
210
|
+
jsonString,
|
|
211
|
+
(x) =>
|
|
212
|
+
ListConnectedAccountsForAccountRequest$inboundSchema.parse(JSON.parse(x)),
|
|
213
|
+
`Failed to parse 'ListConnectedAccountsForAccountRequest' from JSON`,
|
|
214
|
+
);
|
|
215
|
+
}
|
|
216
|
+
|
|
217
|
+
/** @internal */
|
|
218
|
+
export const ListConnectedAccountsForAccountResponse$inboundSchema: z.ZodType<
|
|
219
|
+
ListConnectedAccountsForAccountResponse,
|
|
220
|
+
z.ZodTypeDef,
|
|
221
|
+
unknown
|
|
222
|
+
> = z.object({
|
|
223
|
+
Headers: z.record(z.array(z.string())).default({}),
|
|
224
|
+
Result: z.array(components.Account$inboundSchema),
|
|
225
|
+
}).transform((v) => {
|
|
226
|
+
return remap$(v, {
|
|
227
|
+
"Headers": "headers",
|
|
228
|
+
"Result": "result",
|
|
229
|
+
});
|
|
230
|
+
});
|
|
231
|
+
/** @internal */
|
|
232
|
+
export type ListConnectedAccountsForAccountResponse$Outbound = {
|
|
233
|
+
Headers: { [k: string]: Array<string> };
|
|
234
|
+
Result: Array<components.Account$Outbound>;
|
|
235
|
+
};
|
|
236
|
+
|
|
237
|
+
/** @internal */
|
|
238
|
+
export const ListConnectedAccountsForAccountResponse$outboundSchema: z.ZodType<
|
|
239
|
+
ListConnectedAccountsForAccountResponse$Outbound,
|
|
240
|
+
z.ZodTypeDef,
|
|
241
|
+
ListConnectedAccountsForAccountResponse
|
|
242
|
+
> = z.object({
|
|
243
|
+
headers: z.record(z.array(z.string())),
|
|
244
|
+
result: z.array(components.Account$outboundSchema),
|
|
245
|
+
}).transform((v) => {
|
|
246
|
+
return remap$(v, {
|
|
247
|
+
headers: "Headers",
|
|
248
|
+
result: "Result",
|
|
249
|
+
});
|
|
250
|
+
});
|
|
251
|
+
|
|
252
|
+
export function listConnectedAccountsForAccountResponseToJSON(
|
|
253
|
+
listConnectedAccountsForAccountResponse:
|
|
254
|
+
ListConnectedAccountsForAccountResponse,
|
|
255
|
+
): string {
|
|
256
|
+
return JSON.stringify(
|
|
257
|
+
ListConnectedAccountsForAccountResponse$outboundSchema.parse(
|
|
258
|
+
listConnectedAccountsForAccountResponse,
|
|
259
|
+
),
|
|
260
|
+
);
|
|
261
|
+
}
|
|
262
|
+
export function listConnectedAccountsForAccountResponseFromJSON(
|
|
263
|
+
jsonString: string,
|
|
264
|
+
): SafeParseResult<
|
|
265
|
+
ListConnectedAccountsForAccountResponse,
|
|
266
|
+
SDKValidationError
|
|
267
|
+
> {
|
|
268
|
+
return safeParse(
|
|
269
|
+
jsonString,
|
|
270
|
+
(x) =>
|
|
271
|
+
ListConnectedAccountsForAccountResponse$inboundSchema.parse(
|
|
272
|
+
JSON.parse(x),
|
|
273
|
+
),
|
|
274
|
+
`Failed to parse 'ListConnectedAccountsForAccountResponse' from JSON`,
|
|
275
|
+
);
|
|
276
|
+
}
|
package/src/sdk/accounts.ts
CHANGED
|
@@ -3,6 +3,7 @@
|
|
|
3
3
|
*/
|
|
4
4
|
|
|
5
5
|
import { accountsAssignCountries } from "../funcs/accountsAssignCountries.js";
|
|
6
|
+
import { accountsConnect } from "../funcs/accountsConnect.js";
|
|
6
7
|
import { accountsCreate } from "../funcs/accountsCreate.js";
|
|
7
8
|
import { accountsDisconnect } from "../funcs/accountsDisconnect.js";
|
|
8
9
|
import { accountsGet } from "../funcs/accountsGet.js";
|
|
@@ -10,6 +11,7 @@ import { accountsGetCountries } from "../funcs/accountsGetCountries.js";
|
|
|
10
11
|
import { accountsGetMerchantProcessingAgreement } from "../funcs/accountsGetMerchantProcessingAgreement.js";
|
|
11
12
|
import { accountsGetTermsOfServiceToken } from "../funcs/accountsGetTermsOfServiceToken.js";
|
|
12
13
|
import { accountsList } from "../funcs/accountsList.js";
|
|
14
|
+
import { accountsListConnected } from "../funcs/accountsListConnected.js";
|
|
13
15
|
import { accountsUpdate } from "../funcs/accountsUpdate.js";
|
|
14
16
|
import { ClientSDK, RequestOptions } from "../lib/sdks.js";
|
|
15
17
|
import * as components from "../models/components/index.js";
|
|
@@ -127,6 +129,42 @@ export class Accounts extends ClientSDK {
|
|
|
127
129
|
));
|
|
128
130
|
}
|
|
129
131
|
|
|
132
|
+
/**
|
|
133
|
+
* List or search accounts to which the caller is connected.
|
|
134
|
+
*
|
|
135
|
+
* All supported query parameters are optional. If none are provided the response will include all connected accounts.
|
|
136
|
+
* Pagination is supported via the `skip` and `count` query parameters. Searching by name and email will overlap and
|
|
137
|
+
* return results based on relevance. Accounts with AccountType `guest` will not be included in the response.
|
|
138
|
+
*
|
|
139
|
+
* To access this endpoint using an [access token](https://docs.moov.io/api/authentication/access-tokens/) you'll need
|
|
140
|
+
* to specify the `/accounts.read` scope.
|
|
141
|
+
*/
|
|
142
|
+
async listConnected(
|
|
143
|
+
request: operations.ListConnectedAccountsForAccountRequest,
|
|
144
|
+
options?: RequestOptions,
|
|
145
|
+
): Promise<operations.ListConnectedAccountsForAccountResponse> {
|
|
146
|
+
return unwrapAsync(accountsListConnected(
|
|
147
|
+
this,
|
|
148
|
+
request,
|
|
149
|
+
options,
|
|
150
|
+
));
|
|
151
|
+
}
|
|
152
|
+
|
|
153
|
+
/**
|
|
154
|
+
* Shares access scopes from the account specified to the caller, establishing a connection
|
|
155
|
+
* between the two accounts with the specified permissions.
|
|
156
|
+
*/
|
|
157
|
+
async connect(
|
|
158
|
+
request: operations.ConnectAccountRequest,
|
|
159
|
+
options?: RequestOptions,
|
|
160
|
+
): Promise<operations.ConnectAccountResponse | undefined> {
|
|
161
|
+
return unwrapAsync(accountsConnect(
|
|
162
|
+
this,
|
|
163
|
+
request,
|
|
164
|
+
options,
|
|
165
|
+
));
|
|
166
|
+
}
|
|
167
|
+
|
|
130
168
|
/**
|
|
131
169
|
* Retrieve the specified countries of operation for an account.
|
|
132
170
|
*
|