@moovio/sdk 0.22.6 → 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 +213 -38
- 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/createtransfer.d.ts +4 -1
- package/models/operations/createtransfer.d.ts.map +1 -1
- package/models/operations/createtransfer.js.map +1 -1
- 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/createtransfer.ts +4 -1
- package/src/models/operations/index.ts +2 -0
- package/src/models/operations/listconnectedaccountsforaccount.ts +276 -0
- package/src/sdk/accounts.ts +38 -0
package/sdk/accounts.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"accounts.d.ts","sourceRoot":"","sources":["../src/sdk/accounts.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"accounts.d.ts","sourceRoot":"","sources":["../src/sdk/accounts.ts"],"names":[],"mappings":"AAeA,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,QAAS,SAAQ,SAAS;IACrC;;;;;;;;;;;;;;;;OAgBG;IACG,MAAM,CACV,OAAO,EAAE,UAAU,CAAC,aAAa,EACjC,OAAO,CAAC,EAAE,cAAc,GACvB,OAAO,CAAC,UAAU,CAAC,qBAAqB,CAAC;IAQ5C;;;;;;;;;OASG;IACG,IAAI,CACR,OAAO,EAAE,UAAU,CAAC,mBAAmB,EACvC,OAAO,CAAC,EAAE,cAAc,GACvB,OAAO,CAAC,UAAU,CAAC,oBAAoB,CAAC;IAQ3C;;;;;OAKG;IACG,GAAG,CACP,OAAO,EAAE,UAAU,CAAC,iBAAiB,EACrC,OAAO,CAAC,EAAE,cAAc,GACvB,OAAO,CAAC,UAAU,CAAC,kBAAkB,CAAC;IAQzC;;;;;;;;;;;;;OAaG;IACG,MAAM,CACV,OAAO,EAAE,UAAU,CAAC,oBAAoB,EACxC,OAAO,CAAC,EAAE,cAAc,GACvB,OAAO,CAAC,UAAU,CAAC,qBAAqB,CAAC;IAQ5C;;;;;;;OAOG;IACG,UAAU,CACd,OAAO,EAAE,UAAU,CAAC,wBAAwB,EAC5C,OAAO,CAAC,EAAE,cAAc,GACvB,OAAO,CAAC,UAAU,CAAC,yBAAyB,GAAG,SAAS,CAAC;IAQ5D;;;;;;;;;OASG;IACG,aAAa,CACjB,OAAO,EAAE,UAAU,CAAC,sCAAsC,EAC1D,OAAO,CAAC,EAAE,cAAc,GACvB,OAAO,CAAC,UAAU,CAAC,uCAAuC,CAAC;IAQ9D;;;OAGG;IACG,OAAO,CACX,OAAO,EAAE,UAAU,CAAC,qBAAqB,EACzC,OAAO,CAAC,EAAE,cAAc,GACvB,OAAO,CAAC,UAAU,CAAC,sBAAsB,GAAG,SAAS,CAAC;IAQzD;;;;;OAKG;IACG,YAAY,CAChB,OAAO,EAAE,UAAU,CAAC,0BAA0B,EAC9C,OAAO,CAAC,EAAE,cAAc,GACvB,OAAO,CAAC,UAAU,CAAC,2BAA2B,CAAC;IAQlD;;;;;;;OAOG;IACG,eAAe,CACnB,OAAO,EAAE,UAAU,CAAC,6BAA6B,EACjD,OAAO,CAAC,EAAE,cAAc,GACvB,OAAO,CAAC,UAAU,CAAC,8BAA8B,CAAC;IAQrD;;;;;OAKG;IACG,8BAA8B,CAClC,OAAO,EAAE,UAAU,CAAC,qCAAqC,EACzD,OAAO,CAAC,EAAE,cAAc,GACvB,OAAO,CAAC,UAAU,CAAC,sCAAsC,CAAC;IAQ7D;;;;;;OAMG;IACG,sBAAsB,CAC1B,OAAO,EAAE,UAAU,CAAC,6BAA6B,EACjD,OAAO,CAAC,EAAE,cAAc,GACvB,OAAO,CAAC,UAAU,CAAC,8BAA8B,CAAC;CAOtD"}
|
package/sdk/accounts.js
CHANGED
|
@@ -5,6 +5,7 @@
|
|
|
5
5
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
6
6
|
exports.Accounts = void 0;
|
|
7
7
|
const accountsAssignCountries_js_1 = require("../funcs/accountsAssignCountries.js");
|
|
8
|
+
const accountsConnect_js_1 = require("../funcs/accountsConnect.js");
|
|
8
9
|
const accountsCreate_js_1 = require("../funcs/accountsCreate.js");
|
|
9
10
|
const accountsDisconnect_js_1 = require("../funcs/accountsDisconnect.js");
|
|
10
11
|
const accountsGet_js_1 = require("../funcs/accountsGet.js");
|
|
@@ -12,6 +13,7 @@ const accountsGetCountries_js_1 = require("../funcs/accountsGetCountries.js");
|
|
|
12
13
|
const accountsGetMerchantProcessingAgreement_js_1 = require("../funcs/accountsGetMerchantProcessingAgreement.js");
|
|
13
14
|
const accountsGetTermsOfServiceToken_js_1 = require("../funcs/accountsGetTermsOfServiceToken.js");
|
|
14
15
|
const accountsList_js_1 = require("../funcs/accountsList.js");
|
|
16
|
+
const accountsListConnected_js_1 = require("../funcs/accountsListConnected.js");
|
|
15
17
|
const accountsUpdate_js_1 = require("../funcs/accountsUpdate.js");
|
|
16
18
|
const sdks_js_1 = require("../lib/sdks.js");
|
|
17
19
|
const fp_js_1 = require("../types/fp.js");
|
|
@@ -86,6 +88,26 @@ class Accounts extends sdks_js_1.ClientSDK {
|
|
|
86
88
|
async disconnect(request, options) {
|
|
87
89
|
return (0, fp_js_1.unwrapAsync)((0, accountsDisconnect_js_1.accountsDisconnect)(this, request, options));
|
|
88
90
|
}
|
|
91
|
+
/**
|
|
92
|
+
* List or search accounts to which the caller is connected.
|
|
93
|
+
*
|
|
94
|
+
* All supported query parameters are optional. If none are provided the response will include all connected accounts.
|
|
95
|
+
* Pagination is supported via the `skip` and `count` query parameters. Searching by name and email will overlap and
|
|
96
|
+
* return results based on relevance. Accounts with AccountType `guest` will not be included in the response.
|
|
97
|
+
*
|
|
98
|
+
* To access this endpoint using an [access token](https://docs.moov.io/api/authentication/access-tokens/) you'll need
|
|
99
|
+
* to specify the `/accounts.read` scope.
|
|
100
|
+
*/
|
|
101
|
+
async listConnected(request, options) {
|
|
102
|
+
return (0, fp_js_1.unwrapAsync)((0, accountsListConnected_js_1.accountsListConnected)(this, request, options));
|
|
103
|
+
}
|
|
104
|
+
/**
|
|
105
|
+
* Shares access scopes from the account specified to the caller, establishing a connection
|
|
106
|
+
* between the two accounts with the specified permissions.
|
|
107
|
+
*/
|
|
108
|
+
async connect(request, options) {
|
|
109
|
+
return (0, fp_js_1.unwrapAsync)((0, accountsConnect_js_1.accountsConnect)(this, request, options));
|
|
110
|
+
}
|
|
89
111
|
/**
|
|
90
112
|
* Retrieve the specified countries of operation for an account.
|
|
91
113
|
*
|
package/sdk/accounts.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"accounts.js","sourceRoot":"","sources":["../src/sdk/accounts.ts"],"names":[],"mappings":";AAAA;;GAEG;;;AAEH,oFAA8E;AAC9E,kEAA4D;AAC5D,0EAAoE;AACpE,4DAAsD;AACtD,8EAAwE;AACxE,kHAA4G;AAC5G,kGAA4F;AAC5F,8DAAwD;AACxD,kEAA4D;AAC5D,4CAA2D;AAG3D,0CAA6C;AAE7C,MAAa,QAAS,SAAQ,mBAAS;IACrC;;;;;;;;;;;;;;;;OAgBG;IACH,KAAK,CAAC,MAAM,CACV,OAAiC,EACjC,OAAwB;QAExB,OAAO,IAAA,mBAAW,EAAC,IAAA,kCAAc,EAC/B,IAAI,EACJ,OAAO,EACP,OAAO,CACR,CAAC,CAAC;IACL,CAAC;IAED;;;;;;;;;OASG;IACH,KAAK,CAAC,IAAI,CACR,OAAuC,EACvC,OAAwB;QAExB,OAAO,IAAA,mBAAW,EAAC,IAAA,8BAAY,EAC7B,IAAI,EACJ,OAAO,EACP,OAAO,CACR,CAAC,CAAC;IACL,CAAC;IAED;;;;;OAKG;IACH,KAAK,CAAC,GAAG,CACP,OAAqC,EACrC,OAAwB;QAExB,OAAO,IAAA,mBAAW,EAAC,IAAA,4BAAW,EAC5B,IAAI,EACJ,OAAO,EACP,OAAO,CACR,CAAC,CAAC;IACL,CAAC;IAED;;;;;;;;;;;;;OAaG;IACH,KAAK,CAAC,MAAM,CACV,OAAwC,EACxC,OAAwB;QAExB,OAAO,IAAA,mBAAW,EAAC,IAAA,kCAAc,EAC/B,IAAI,EACJ,OAAO,EACP,OAAO,CACR,CAAC,CAAC;IACL,CAAC;IAED;;;;;;;OAOG;IACH,KAAK,CAAC,UAAU,CACd,OAA4C,EAC5C,OAAwB;QAExB,OAAO,IAAA,mBAAW,EAAC,IAAA,0CAAkB,EACnC,IAAI,EACJ,OAAO,EACP,OAAO,CACR,CAAC,CAAC;IACL,CAAC;IAED;;;;;OAKG;IACH,KAAK,CAAC,YAAY,CAChB,OAA8C,EAC9C,OAAwB;QAExB,OAAO,IAAA,mBAAW,EAAC,IAAA,8CAAoB,EACrC,IAAI,EACJ,OAAO,EACP,OAAO,CACR,CAAC,CAAC;IACL,CAAC;IAED;;;;;;;OAOG;IACH,KAAK,CAAC,eAAe,CACnB,OAAiD,EACjD,OAAwB;QAExB,OAAO,IAAA,mBAAW,EAAC,IAAA,oDAAuB,EACxC,IAAI,EACJ,OAAO,EACP,OAAO,CACR,CAAC,CAAC;IACL,CAAC;IAED;;;;;OAKG;IACH,KAAK,CAAC,8BAA8B,CAClC,OAAyD,EACzD,OAAwB;QAExB,OAAO,IAAA,mBAAW,EAAC,IAAA,kFAAsC,EACvD,IAAI,EACJ,OAAO,EACP,OAAO,CACR,CAAC,CAAC;IACL,CAAC;IAED;;;;;;OAMG;IACH,KAAK,CAAC,sBAAsB,CAC1B,OAAiD,EACjD,OAAwB;QAExB,OAAO,IAAA,mBAAW,EAAC,IAAA,kEAA8B,EAC/C,IAAI,EACJ,OAAO,EACP,OAAO,CACR,CAAC,CAAC;IACL,CAAC;CACF;
|
|
1
|
+
{"version":3,"file":"accounts.js","sourceRoot":"","sources":["../src/sdk/accounts.ts"],"names":[],"mappings":";AAAA;;GAEG;;;AAEH,oFAA8E;AAC9E,oEAA8D;AAC9D,kEAA4D;AAC5D,0EAAoE;AACpE,4DAAsD;AACtD,8EAAwE;AACxE,kHAA4G;AAC5G,kGAA4F;AAC5F,8DAAwD;AACxD,gFAA0E;AAC1E,kEAA4D;AAC5D,4CAA2D;AAG3D,0CAA6C;AAE7C,MAAa,QAAS,SAAQ,mBAAS;IACrC;;;;;;;;;;;;;;;;OAgBG;IACH,KAAK,CAAC,MAAM,CACV,OAAiC,EACjC,OAAwB;QAExB,OAAO,IAAA,mBAAW,EAAC,IAAA,kCAAc,EAC/B,IAAI,EACJ,OAAO,EACP,OAAO,CACR,CAAC,CAAC;IACL,CAAC;IAED;;;;;;;;;OASG;IACH,KAAK,CAAC,IAAI,CACR,OAAuC,EACvC,OAAwB;QAExB,OAAO,IAAA,mBAAW,EAAC,IAAA,8BAAY,EAC7B,IAAI,EACJ,OAAO,EACP,OAAO,CACR,CAAC,CAAC;IACL,CAAC;IAED;;;;;OAKG;IACH,KAAK,CAAC,GAAG,CACP,OAAqC,EACrC,OAAwB;QAExB,OAAO,IAAA,mBAAW,EAAC,IAAA,4BAAW,EAC5B,IAAI,EACJ,OAAO,EACP,OAAO,CACR,CAAC,CAAC;IACL,CAAC;IAED;;;;;;;;;;;;;OAaG;IACH,KAAK,CAAC,MAAM,CACV,OAAwC,EACxC,OAAwB;QAExB,OAAO,IAAA,mBAAW,EAAC,IAAA,kCAAc,EAC/B,IAAI,EACJ,OAAO,EACP,OAAO,CACR,CAAC,CAAC;IACL,CAAC;IAED;;;;;;;OAOG;IACH,KAAK,CAAC,UAAU,CACd,OAA4C,EAC5C,OAAwB;QAExB,OAAO,IAAA,mBAAW,EAAC,IAAA,0CAAkB,EACnC,IAAI,EACJ,OAAO,EACP,OAAO,CACR,CAAC,CAAC;IACL,CAAC;IAED;;;;;;;;;OASG;IACH,KAAK,CAAC,aAAa,CACjB,OAA0D,EAC1D,OAAwB;QAExB,OAAO,IAAA,mBAAW,EAAC,IAAA,gDAAqB,EACtC,IAAI,EACJ,OAAO,EACP,OAAO,CACR,CAAC,CAAC;IACL,CAAC;IAED;;;OAGG;IACH,KAAK,CAAC,OAAO,CACX,OAAyC,EACzC,OAAwB;QAExB,OAAO,IAAA,mBAAW,EAAC,IAAA,oCAAe,EAChC,IAAI,EACJ,OAAO,EACP,OAAO,CACR,CAAC,CAAC;IACL,CAAC;IAED;;;;;OAKG;IACH,KAAK,CAAC,YAAY,CAChB,OAA8C,EAC9C,OAAwB;QAExB,OAAO,IAAA,mBAAW,EAAC,IAAA,8CAAoB,EACrC,IAAI,EACJ,OAAO,EACP,OAAO,CACR,CAAC,CAAC;IACL,CAAC;IAED;;;;;;;OAOG;IACH,KAAK,CAAC,eAAe,CACnB,OAAiD,EACjD,OAAwB;QAExB,OAAO,IAAA,mBAAW,EAAC,IAAA,oDAAuB,EACxC,IAAI,EACJ,OAAO,EACP,OAAO,CACR,CAAC,CAAC;IACL,CAAC;IAED;;;;;OAKG;IACH,KAAK,CAAC,8BAA8B,CAClC,OAAyD,EACzD,OAAwB;QAExB,OAAO,IAAA,mBAAW,EAAC,IAAA,kFAAsC,EACvD,IAAI,EACJ,OAAO,EACP,OAAO,CACR,CAAC,CAAC;IACL,CAAC;IAED;;;;;;OAMG;IACH,KAAK,CAAC,sBAAsB,CAC1B,OAAiD,EACjD,OAAwB;QAExB,OAAO,IAAA,mBAAW,EAAC,IAAA,kEAA8B,EAC/C,IAAI,EACJ,OAAO,EACP,OAAO,CACR,CAAC,CAAC;IACL,CAAC;CACF;AAzND,4BAyNC"}
|
|
@@ -0,0 +1,200 @@
|
|
|
1
|
+
/*
|
|
2
|
+
* Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.
|
|
3
|
+
*/
|
|
4
|
+
|
|
5
|
+
import { MoovCore } from "../core.js";
|
|
6
|
+
import { encodeJSON, 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 {
|
|
14
|
+
ConnectionError,
|
|
15
|
+
InvalidRequestError,
|
|
16
|
+
RequestAbortedError,
|
|
17
|
+
RequestTimeoutError,
|
|
18
|
+
UnexpectedClientError,
|
|
19
|
+
} from "../models/errors/httpclienterrors.js";
|
|
20
|
+
import * as errors from "../models/errors/index.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
|
+
* Shares access scopes from the account specified to the caller, establishing a connection
|
|
30
|
+
* between the two accounts with the specified permissions.
|
|
31
|
+
*/
|
|
32
|
+
export function accountsConnect(
|
|
33
|
+
client: MoovCore,
|
|
34
|
+
request: operations.ConnectAccountRequest,
|
|
35
|
+
options?: RequestOptions,
|
|
36
|
+
): APIPromise<
|
|
37
|
+
Result<
|
|
38
|
+
operations.ConnectAccountResponse | undefined,
|
|
39
|
+
| errors.GenericError
|
|
40
|
+
| errors.ConnectAccountRequestValidationError
|
|
41
|
+
| MoovError
|
|
42
|
+
| ResponseValidationError
|
|
43
|
+
| ConnectionError
|
|
44
|
+
| RequestAbortedError
|
|
45
|
+
| RequestTimeoutError
|
|
46
|
+
| InvalidRequestError
|
|
47
|
+
| UnexpectedClientError
|
|
48
|
+
| SDKValidationError
|
|
49
|
+
>
|
|
50
|
+
> {
|
|
51
|
+
return new APIPromise($do(
|
|
52
|
+
client,
|
|
53
|
+
request,
|
|
54
|
+
options,
|
|
55
|
+
));
|
|
56
|
+
}
|
|
57
|
+
|
|
58
|
+
async function $do(
|
|
59
|
+
client: MoovCore,
|
|
60
|
+
request: operations.ConnectAccountRequest,
|
|
61
|
+
options?: RequestOptions,
|
|
62
|
+
): Promise<
|
|
63
|
+
[
|
|
64
|
+
Result<
|
|
65
|
+
operations.ConnectAccountResponse | undefined,
|
|
66
|
+
| errors.GenericError
|
|
67
|
+
| errors.ConnectAccountRequestValidationError
|
|
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) => operations.ConnectAccountRequest$outboundSchema.parse(value),
|
|
83
|
+
"Input validation failed",
|
|
84
|
+
);
|
|
85
|
+
if (!parsed.ok) {
|
|
86
|
+
return [parsed, { status: "invalid" }];
|
|
87
|
+
}
|
|
88
|
+
const payload = parsed.value;
|
|
89
|
+
const body = encodeJSON("body", payload.ShareScopes, { explode: true });
|
|
90
|
+
|
|
91
|
+
const pathParams = {
|
|
92
|
+
accountID: encodeSimple("accountID", payload.accountID, {
|
|
93
|
+
explode: false,
|
|
94
|
+
charEncoding: "percent",
|
|
95
|
+
}),
|
|
96
|
+
};
|
|
97
|
+
|
|
98
|
+
const path = pathToFunc("/accounts/{accountID}/connections")(pathParams);
|
|
99
|
+
|
|
100
|
+
const headers = new Headers(compactMap({
|
|
101
|
+
"Content-Type": "application/json",
|
|
102
|
+
Accept: "application/json",
|
|
103
|
+
"X-Moov-Version": encodeSimple(
|
|
104
|
+
"X-Moov-Version",
|
|
105
|
+
client._options.xMoovVersion,
|
|
106
|
+
{ explode: false, charEncoding: "none" },
|
|
107
|
+
),
|
|
108
|
+
}));
|
|
109
|
+
|
|
110
|
+
const securityInput = await extractSecurity(client._options.security);
|
|
111
|
+
const requestSecurity = resolveGlobalSecurity(securityInput);
|
|
112
|
+
|
|
113
|
+
const context = {
|
|
114
|
+
options: client._options,
|
|
115
|
+
baseURL: options?.serverURL ?? client._baseURL ?? "",
|
|
116
|
+
operationID: "connectAccount",
|
|
117
|
+
oAuth2Scopes: null,
|
|
118
|
+
|
|
119
|
+
resolvedSecurity: requestSecurity,
|
|
120
|
+
|
|
121
|
+
securitySource: client._options.security,
|
|
122
|
+
retryConfig: options?.retries
|
|
123
|
+
|| client._options.retryConfig
|
|
124
|
+
|| { strategy: "none" },
|
|
125
|
+
retryCodes: options?.retryCodes || ["429", "500", "502", "503", "504"],
|
|
126
|
+
};
|
|
127
|
+
|
|
128
|
+
const requestRes = client._createRequest(context, {
|
|
129
|
+
security: requestSecurity,
|
|
130
|
+
method: "POST",
|
|
131
|
+
baseURL: options?.serverURL,
|
|
132
|
+
path: path,
|
|
133
|
+
headers: headers,
|
|
134
|
+
body: body,
|
|
135
|
+
userAgent: client._options.userAgent,
|
|
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: [
|
|
146
|
+
"400",
|
|
147
|
+
"401",
|
|
148
|
+
"403",
|
|
149
|
+
"404",
|
|
150
|
+
"409",
|
|
151
|
+
"422",
|
|
152
|
+
"429",
|
|
153
|
+
"4XX",
|
|
154
|
+
"500",
|
|
155
|
+
"504",
|
|
156
|
+
"5XX",
|
|
157
|
+
],
|
|
158
|
+
retryConfig: context.retryConfig,
|
|
159
|
+
retryCodes: context.retryCodes,
|
|
160
|
+
});
|
|
161
|
+
if (!doResult.ok) {
|
|
162
|
+
return [doResult, { status: "request-error", request: req }];
|
|
163
|
+
}
|
|
164
|
+
const response = doResult.value;
|
|
165
|
+
|
|
166
|
+
const responseFields = {
|
|
167
|
+
HttpMeta: { Response: response, Request: req },
|
|
168
|
+
};
|
|
169
|
+
|
|
170
|
+
const [result] = await M.match<
|
|
171
|
+
operations.ConnectAccountResponse | undefined,
|
|
172
|
+
| errors.GenericError
|
|
173
|
+
| errors.ConnectAccountRequestValidationError
|
|
174
|
+
| MoovError
|
|
175
|
+
| ResponseValidationError
|
|
176
|
+
| ConnectionError
|
|
177
|
+
| RequestAbortedError
|
|
178
|
+
| RequestTimeoutError
|
|
179
|
+
| InvalidRequestError
|
|
180
|
+
| UnexpectedClientError
|
|
181
|
+
| SDKValidationError
|
|
182
|
+
>(
|
|
183
|
+
M.nil(201, operations.ConnectAccountResponse$inboundSchema.optional(), {
|
|
184
|
+
hdrs: true,
|
|
185
|
+
}),
|
|
186
|
+
M.jsonErr([400, 409], errors.GenericError$inboundSchema, { hdrs: true }),
|
|
187
|
+
M.jsonErr(422, errors.ConnectAccountRequestValidationError$inboundSchema, {
|
|
188
|
+
hdrs: true,
|
|
189
|
+
}),
|
|
190
|
+
M.fail([401, 403, 404, 429]),
|
|
191
|
+
M.fail([500, 504]),
|
|
192
|
+
M.fail("4XX"),
|
|
193
|
+
M.fail("5XX"),
|
|
194
|
+
)(response, req, { extraFields: responseFields });
|
|
195
|
+
if (!result.ok) {
|
|
196
|
+
return [result, { status: "complete", request: req, response }];
|
|
197
|
+
}
|
|
198
|
+
|
|
199
|
+
return [result, { status: "complete", request: req, response }];
|
|
200
|
+
}
|
|
@@ -0,0 +1,202 @@
|
|
|
1
|
+
/*
|
|
2
|
+
* Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.
|
|
3
|
+
*/
|
|
4
|
+
|
|
5
|
+
import { MoovCore } from "../core.js";
|
|
6
|
+
import { encodeFormQuery, 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 {
|
|
14
|
+
ConnectionError,
|
|
15
|
+
InvalidRequestError,
|
|
16
|
+
RequestAbortedError,
|
|
17
|
+
RequestTimeoutError,
|
|
18
|
+
UnexpectedClientError,
|
|
19
|
+
} from "../models/errors/httpclienterrors.js";
|
|
20
|
+
import { MoovError } from "../models/errors/mooverror.js";
|
|
21
|
+
import { ResponseValidationError } from "../models/errors/responsevalidationerror.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
|
+
* List or search accounts to which the caller is connected.
|
|
29
|
+
*
|
|
30
|
+
* All supported query parameters are optional. If none are provided the response will include all connected accounts.
|
|
31
|
+
* Pagination is supported via the `skip` and `count` query parameters. Searching by name and email will overlap and
|
|
32
|
+
* return results based on relevance. Accounts with AccountType `guest` will not be included in the response.
|
|
33
|
+
*
|
|
34
|
+
* To access this endpoint using an [access token](https://docs.moov.io/api/authentication/access-tokens/) you'll need
|
|
35
|
+
* to specify the `/accounts.read` scope.
|
|
36
|
+
*/
|
|
37
|
+
export function accountsListConnected(
|
|
38
|
+
client: MoovCore,
|
|
39
|
+
request: operations.ListConnectedAccountsForAccountRequest,
|
|
40
|
+
options?: RequestOptions,
|
|
41
|
+
): APIPromise<
|
|
42
|
+
Result<
|
|
43
|
+
operations.ListConnectedAccountsForAccountResponse,
|
|
44
|
+
| MoovError
|
|
45
|
+
| ResponseValidationError
|
|
46
|
+
| ConnectionError
|
|
47
|
+
| RequestAbortedError
|
|
48
|
+
| RequestTimeoutError
|
|
49
|
+
| InvalidRequestError
|
|
50
|
+
| UnexpectedClientError
|
|
51
|
+
| SDKValidationError
|
|
52
|
+
>
|
|
53
|
+
> {
|
|
54
|
+
return new APIPromise($do(
|
|
55
|
+
client,
|
|
56
|
+
request,
|
|
57
|
+
options,
|
|
58
|
+
));
|
|
59
|
+
}
|
|
60
|
+
|
|
61
|
+
async function $do(
|
|
62
|
+
client: MoovCore,
|
|
63
|
+
request: operations.ListConnectedAccountsForAccountRequest,
|
|
64
|
+
options?: RequestOptions,
|
|
65
|
+
): Promise<
|
|
66
|
+
[
|
|
67
|
+
Result<
|
|
68
|
+
operations.ListConnectedAccountsForAccountResponse,
|
|
69
|
+
| MoovError
|
|
70
|
+
| ResponseValidationError
|
|
71
|
+
| ConnectionError
|
|
72
|
+
| RequestAbortedError
|
|
73
|
+
| RequestTimeoutError
|
|
74
|
+
| InvalidRequestError
|
|
75
|
+
| UnexpectedClientError
|
|
76
|
+
| SDKValidationError
|
|
77
|
+
>,
|
|
78
|
+
APICall,
|
|
79
|
+
]
|
|
80
|
+
> {
|
|
81
|
+
const parsed = safeParse(
|
|
82
|
+
request,
|
|
83
|
+
(value) =>
|
|
84
|
+
operations.ListConnectedAccountsForAccountRequest$outboundSchema.parse(
|
|
85
|
+
value,
|
|
86
|
+
),
|
|
87
|
+
"Input validation failed",
|
|
88
|
+
);
|
|
89
|
+
if (!parsed.ok) {
|
|
90
|
+
return [parsed, { status: "invalid" }];
|
|
91
|
+
}
|
|
92
|
+
const payload = parsed.value;
|
|
93
|
+
const body = null;
|
|
94
|
+
|
|
95
|
+
const pathParams = {
|
|
96
|
+
accountID: encodeSimple("accountID", payload.accountID, {
|
|
97
|
+
explode: false,
|
|
98
|
+
charEncoding: "percent",
|
|
99
|
+
}),
|
|
100
|
+
};
|
|
101
|
+
|
|
102
|
+
const path = pathToFunc("/accounts/{accountID}/connected-accounts")(
|
|
103
|
+
pathParams,
|
|
104
|
+
);
|
|
105
|
+
|
|
106
|
+
const query = encodeFormQuery({
|
|
107
|
+
"capability": payload.capability,
|
|
108
|
+
"capabilityStatus": payload.capabilityStatus,
|
|
109
|
+
"count": payload.count,
|
|
110
|
+
"email": payload.email,
|
|
111
|
+
"foreignID": payload.foreignID,
|
|
112
|
+
"includeDisconnected": payload.includeDisconnected,
|
|
113
|
+
"name": payload.name,
|
|
114
|
+
"skip": payload.skip,
|
|
115
|
+
"type": payload.type,
|
|
116
|
+
}, { explode: false });
|
|
117
|
+
|
|
118
|
+
const headers = new Headers(compactMap({
|
|
119
|
+
Accept: "application/json",
|
|
120
|
+
"X-Moov-Version": encodeSimple(
|
|
121
|
+
"X-Moov-Version",
|
|
122
|
+
client._options.xMoovVersion,
|
|
123
|
+
{ explode: false, charEncoding: "none" },
|
|
124
|
+
),
|
|
125
|
+
}));
|
|
126
|
+
|
|
127
|
+
const securityInput = await extractSecurity(client._options.security);
|
|
128
|
+
const requestSecurity = resolveGlobalSecurity(securityInput);
|
|
129
|
+
|
|
130
|
+
const context = {
|
|
131
|
+
options: client._options,
|
|
132
|
+
baseURL: options?.serverURL ?? client._baseURL ?? "",
|
|
133
|
+
operationID: "listConnectedAccountsForAccount",
|
|
134
|
+
oAuth2Scopes: null,
|
|
135
|
+
|
|
136
|
+
resolvedSecurity: requestSecurity,
|
|
137
|
+
|
|
138
|
+
securitySource: client._options.security,
|
|
139
|
+
retryConfig: options?.retries
|
|
140
|
+
|| client._options.retryConfig
|
|
141
|
+
|| { strategy: "none" },
|
|
142
|
+
retryCodes: options?.retryCodes || ["429", "500", "502", "503", "504"],
|
|
143
|
+
};
|
|
144
|
+
|
|
145
|
+
const requestRes = client._createRequest(context, {
|
|
146
|
+
security: requestSecurity,
|
|
147
|
+
method: "GET",
|
|
148
|
+
baseURL: options?.serverURL,
|
|
149
|
+
path: path,
|
|
150
|
+
headers: headers,
|
|
151
|
+
query: query,
|
|
152
|
+
body: body,
|
|
153
|
+
userAgent: client._options.userAgent,
|
|
154
|
+
timeoutMs: options?.timeoutMs || client._options.timeoutMs || -1,
|
|
155
|
+
}, options);
|
|
156
|
+
if (!requestRes.ok) {
|
|
157
|
+
return [requestRes, { status: "invalid" }];
|
|
158
|
+
}
|
|
159
|
+
const req = requestRes.value;
|
|
160
|
+
|
|
161
|
+
const doResult = await client._do(req, {
|
|
162
|
+
context,
|
|
163
|
+
errorCodes: ["401", "403", "429", "4XX", "500", "504", "5XX"],
|
|
164
|
+
retryConfig: context.retryConfig,
|
|
165
|
+
retryCodes: context.retryCodes,
|
|
166
|
+
});
|
|
167
|
+
if (!doResult.ok) {
|
|
168
|
+
return [doResult, { status: "request-error", request: req }];
|
|
169
|
+
}
|
|
170
|
+
const response = doResult.value;
|
|
171
|
+
|
|
172
|
+
const responseFields = {
|
|
173
|
+
HttpMeta: { Response: response, Request: req },
|
|
174
|
+
};
|
|
175
|
+
|
|
176
|
+
const [result] = await M.match<
|
|
177
|
+
operations.ListConnectedAccountsForAccountResponse,
|
|
178
|
+
| MoovError
|
|
179
|
+
| ResponseValidationError
|
|
180
|
+
| ConnectionError
|
|
181
|
+
| RequestAbortedError
|
|
182
|
+
| RequestTimeoutError
|
|
183
|
+
| InvalidRequestError
|
|
184
|
+
| UnexpectedClientError
|
|
185
|
+
| SDKValidationError
|
|
186
|
+
>(
|
|
187
|
+
M.json(
|
|
188
|
+
200,
|
|
189
|
+
operations.ListConnectedAccountsForAccountResponse$inboundSchema,
|
|
190
|
+
{ hdrs: true, key: "Result" },
|
|
191
|
+
),
|
|
192
|
+
M.fail([401, 403, 429]),
|
|
193
|
+
M.fail([500, 504]),
|
|
194
|
+
M.fail("4XX"),
|
|
195
|
+
M.fail("5XX"),
|
|
196
|
+
)(response, req, { extraFields: responseFields });
|
|
197
|
+
if (!result.ok) {
|
|
198
|
+
return [result, { status: "complete", request: req, response }];
|
|
199
|
+
}
|
|
200
|
+
|
|
201
|
+
return [result, { status: "complete", request: req, response }];
|
|
202
|
+
}
|
package/src/lib/config.ts
CHANGED
|
@@ -73,7 +73,7 @@ export function serverURLFromOptions(options: SDKOptions): URL | null {
|
|
|
73
73
|
export const SDK_METADATA = {
|
|
74
74
|
language: "typescript",
|
|
75
75
|
openapiDocVersion: "latest",
|
|
76
|
-
sdkVersion: "0.22.
|
|
77
|
-
genVersion: "2.
|
|
78
|
-
userAgent: "speakeasy-sdk/typescript 0.22.
|
|
76
|
+
sdkVersion: "0.22.8",
|
|
77
|
+
genVersion: "2.788.5",
|
|
78
|
+
userAgent: "speakeasy-sdk/typescript 0.22.8 2.788.5 latest @moovio/sdk",
|
|
79
79
|
} as const;
|
|
@@ -4,7 +4,11 @@
|
|
|
4
4
|
|
|
5
5
|
import { McpServer } from "@modelcontextprotocol/sdk/server/mcp.js";
|
|
6
6
|
import { RequestHandlerExtra } from "@modelcontextprotocol/sdk/shared/protocol.js";
|
|
7
|
-
import {
|
|
7
|
+
import {
|
|
8
|
+
GetPromptResult,
|
|
9
|
+
ServerNotification,
|
|
10
|
+
ServerRequest,
|
|
11
|
+
} from "@modelcontextprotocol/sdk/types.js";
|
|
8
12
|
import {
|
|
9
13
|
objectOutputType,
|
|
10
14
|
ZodOptional,
|
|
@@ -33,7 +37,7 @@ export type PromptDefinition<
|
|
|
33
37
|
prompt: (
|
|
34
38
|
client: MoovCore,
|
|
35
39
|
args: objectOutputType<Args, ZodTypeAny>,
|
|
36
|
-
extra: RequestHandlerExtra,
|
|
40
|
+
extra: RequestHandlerExtra<ServerRequest, ServerNotification>,
|
|
37
41
|
) => GetPromptResult | Promise<GetPromptResult>;
|
|
38
42
|
}
|
|
39
43
|
: {
|
|
@@ -43,7 +47,7 @@ export type PromptDefinition<
|
|
|
43
47
|
args?: undefined;
|
|
44
48
|
prompt: (
|
|
45
49
|
client: MoovCore,
|
|
46
|
-
extra: RequestHandlerExtra,
|
|
50
|
+
extra: RequestHandlerExtra<ServerRequest, ServerNotification>,
|
|
47
51
|
) => GetPromptResult | Promise<GetPromptResult>;
|
|
48
52
|
};
|
|
49
53
|
|
|
@@ -9,7 +9,11 @@ import {
|
|
|
9
9
|
} from "@modelcontextprotocol/sdk/server/mcp.js";
|
|
10
10
|
import { RequestHandlerExtra } from "@modelcontextprotocol/sdk/shared/protocol.js";
|
|
11
11
|
import { Variables } from "@modelcontextprotocol/sdk/shared/uriTemplate.js";
|
|
12
|
-
import {
|
|
12
|
+
import {
|
|
13
|
+
ReadResourceResult,
|
|
14
|
+
ServerNotification,
|
|
15
|
+
ServerRequest,
|
|
16
|
+
} from "@modelcontextprotocol/sdk/types.js";
|
|
13
17
|
import { MoovCore } from "../core.js";
|
|
14
18
|
import { ConsoleLogger } from "./console-logger.js";
|
|
15
19
|
import { MCPScope } from "./scopes.js";
|
|
@@ -18,7 +22,7 @@ import { isAsyncIterable, isBinaryData, valueToBase64 } from "./shared.js";
|
|
|
18
22
|
export type ReadResourceCallback = (
|
|
19
23
|
client: MoovCore,
|
|
20
24
|
uri: URL,
|
|
21
|
-
extra: RequestHandlerExtra,
|
|
25
|
+
extra: RequestHandlerExtra<ServerRequest, ServerNotification>,
|
|
22
26
|
) => ReadResourceResult | Promise<ReadResourceResult>;
|
|
23
27
|
|
|
24
28
|
export type ResourceDefinition = {
|
|
@@ -34,7 +38,7 @@ export type ReadResourceTemplateCallback = (
|
|
|
34
38
|
client: MoovCore,
|
|
35
39
|
uri: URL,
|
|
36
40
|
vars: Variables,
|
|
37
|
-
extra: RequestHandlerExtra,
|
|
41
|
+
extra: RequestHandlerExtra<ServerRequest, ServerNotification>,
|
|
38
42
|
) => ReadResourceResult | Promise<ReadResourceResult>;
|
|
39
43
|
|
|
40
44
|
export type ResourceTemplateDefinition = {
|
package/src/mcp-server/server.ts
CHANGED
|
@@ -14,6 +14,7 @@ import {
|
|
|
14
14
|
import { MCPScope } from "./scopes.js";
|
|
15
15
|
import { createRegisterTool } from "./tools.js";
|
|
16
16
|
import { tool$accountsAssignCountries } from "./tools/accountsAssignCountries.js";
|
|
17
|
+
import { tool$accountsConnect } from "./tools/accountsConnect.js";
|
|
17
18
|
import { tool$accountsCreate } from "./tools/accountsCreate.js";
|
|
18
19
|
import { tool$accountsDisconnect } from "./tools/accountsDisconnect.js";
|
|
19
20
|
import { tool$accountsGet } from "./tools/accountsGet.js";
|
|
@@ -21,6 +22,7 @@ import { tool$accountsGetCountries } from "./tools/accountsGetCountries.js";
|
|
|
21
22
|
import { tool$accountsGetMerchantProcessingAgreement } from "./tools/accountsGetMerchantProcessingAgreement.js";
|
|
22
23
|
import { tool$accountsGetTermsOfServiceToken } from "./tools/accountsGetTermsOfServiceToken.js";
|
|
23
24
|
import { tool$accountsList } from "./tools/accountsList.js";
|
|
25
|
+
import { tool$accountsListConnected } from "./tools/accountsListConnected.js";
|
|
24
26
|
import { tool$accountsUpdate } from "./tools/accountsUpdate.js";
|
|
25
27
|
import { tool$accountTerminalApplicationsGet } from "./tools/accountTerminalApplicationsGet.js";
|
|
26
28
|
import { tool$accountTerminalApplicationsGetConfiguration } from "./tools/accountTerminalApplicationsGetConfiguration.js";
|
|
@@ -192,7 +194,7 @@ export function createMCPServer(deps: {
|
|
|
192
194
|
}) {
|
|
193
195
|
const server = new McpServer({
|
|
194
196
|
name: "Moov",
|
|
195
|
-
version: "0.22.
|
|
197
|
+
version: "0.22.8",
|
|
196
198
|
});
|
|
197
199
|
|
|
198
200
|
const client = new MoovCore({
|
|
@@ -228,6 +230,8 @@ export function createMCPServer(deps: {
|
|
|
228
230
|
tool(tool$accountsGet);
|
|
229
231
|
tool(tool$accountsUpdate);
|
|
230
232
|
tool(tool$accountsDisconnect);
|
|
233
|
+
tool(tool$accountsListConnected);
|
|
234
|
+
tool(tool$accountsConnect);
|
|
231
235
|
tool(tool$accountsGetCountries);
|
|
232
236
|
tool(tool$accountsAssignCountries);
|
|
233
237
|
tool(tool$accountsGetMerchantProcessingAgreement);
|
|
@@ -0,0 +1,35 @@
|
|
|
1
|
+
/*
|
|
2
|
+
* Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.
|
|
3
|
+
*/
|
|
4
|
+
|
|
5
|
+
import { accountsConnect } from "../../funcs/accountsConnect.js";
|
|
6
|
+
import * as operations from "../../models/operations/index.js";
|
|
7
|
+
import { formatResult, ToolDefinition } from "../tools.js";
|
|
8
|
+
|
|
9
|
+
const args = {
|
|
10
|
+
request: operations.ConnectAccountRequest$inboundSchema,
|
|
11
|
+
};
|
|
12
|
+
|
|
13
|
+
export const tool$accountsConnect: ToolDefinition<typeof args> = {
|
|
14
|
+
name: "accounts-connect",
|
|
15
|
+
description:
|
|
16
|
+
`Shares access scopes from the account specified to the caller, establishing a connection
|
|
17
|
+
between the two accounts with the specified permissions.`,
|
|
18
|
+
args,
|
|
19
|
+
tool: async (client, args, ctx) => {
|
|
20
|
+
const [result, apiCall] = await accountsConnect(
|
|
21
|
+
client,
|
|
22
|
+
args.request,
|
|
23
|
+
{ fetchOptions: { signal: ctx.signal } },
|
|
24
|
+
).$inspect();
|
|
25
|
+
|
|
26
|
+
if (!result.ok) {
|
|
27
|
+
return {
|
|
28
|
+
content: [{ type: "text", text: result.error.message }],
|
|
29
|
+
isError: true,
|
|
30
|
+
};
|
|
31
|
+
}
|
|
32
|
+
|
|
33
|
+
return formatResult(void 0, apiCall);
|
|
34
|
+
},
|
|
35
|
+
};
|
|
@@ -0,0 +1,42 @@
|
|
|
1
|
+
/*
|
|
2
|
+
* Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.
|
|
3
|
+
*/
|
|
4
|
+
|
|
5
|
+
import { accountsListConnected } from "../../funcs/accountsListConnected.js";
|
|
6
|
+
import * as operations from "../../models/operations/index.js";
|
|
7
|
+
import { formatResult, ToolDefinition } from "../tools.js";
|
|
8
|
+
|
|
9
|
+
const args = {
|
|
10
|
+
request: operations.ListConnectedAccountsForAccountRequest$inboundSchema,
|
|
11
|
+
};
|
|
12
|
+
|
|
13
|
+
export const tool$accountsListConnected: ToolDefinition<typeof args> = {
|
|
14
|
+
name: "accounts-list-connected",
|
|
15
|
+
description: `List or search accounts to which the caller is connected.
|
|
16
|
+
|
|
17
|
+
All supported query parameters are optional. If none are provided the response will include all connected accounts.
|
|
18
|
+
Pagination is supported via the \`skip\` and \`count\` query parameters. Searching by name and email will overlap and
|
|
19
|
+
return results based on relevance. Accounts with AccountType \`guest\` will not be included in the response.
|
|
20
|
+
|
|
21
|
+
To access this endpoint using an [access token](https://docs.moov.io/api/authentication/access-tokens/) you'll need
|
|
22
|
+
to specify the \`/accounts.read\` scope.`,
|
|
23
|
+
args,
|
|
24
|
+
tool: async (client, args, ctx) => {
|
|
25
|
+
const [result, apiCall] = await accountsListConnected(
|
|
26
|
+
client,
|
|
27
|
+
args.request,
|
|
28
|
+
{ fetchOptions: { signal: ctx.signal } },
|
|
29
|
+
).$inspect();
|
|
30
|
+
|
|
31
|
+
if (!result.ok) {
|
|
32
|
+
return {
|
|
33
|
+
content: [{ type: "text", text: result.error.message }],
|
|
34
|
+
isError: true,
|
|
35
|
+
};
|
|
36
|
+
}
|
|
37
|
+
|
|
38
|
+
const value = result.value.result;
|
|
39
|
+
|
|
40
|
+
return formatResult(value, apiCall);
|
|
41
|
+
},
|
|
42
|
+
};
|