@linkedapi/mcp 2.1.0 → 2.1.2
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/dist/linked-api-tools.d.ts.map +1 -1
- package/dist/linked-api-tools.js +14 -0
- package/dist/linked-api-tools.js.map +1 -1
- package/dist/tools/admin-cancel-connection-session.d.ts +16 -0
- package/dist/tools/admin-cancel-connection-session.d.ts.map +1 -0
- package/dist/tools/admin-cancel-connection-session.js +35 -0
- package/dist/tools/admin-cancel-connection-session.js.map +1 -0
- package/dist/tools/admin-create-reconnection-session.d.ts +16 -0
- package/dist/tools/admin-create-reconnection-session.d.ts.map +1 -0
- package/dist/tools/admin-create-reconnection-session.js +35 -0
- package/dist/tools/admin-create-reconnection-session.js.map +1 -0
- package/dist/tools/admin-delete-limits.d.ts +24 -0
- package/dist/tools/admin-delete-limits.d.ts.map +1 -0
- package/dist/tools/admin-delete-limits.js +58 -0
- package/dist/tools/admin-delete-limits.js.map +1 -0
- package/dist/tools/admin-get-connection-session.d.ts +16 -0
- package/dist/tools/admin-get-connection-session.d.ts.map +1 -0
- package/dist/tools/admin-get-connection-session.js +35 -0
- package/dist/tools/admin-get-connection-session.js.map +1 -0
- package/dist/tools/admin-get-limits-defaults.d.ts +18 -0
- package/dist/tools/admin-get-limits-defaults.d.ts.map +1 -0
- package/dist/tools/admin-get-limits-defaults.js +27 -0
- package/dist/tools/admin-get-limits-defaults.js.map +1 -0
- package/dist/tools/admin-get-limits.d.ts +20 -0
- package/dist/tools/admin-get-limits.d.ts.map +1 -0
- package/dist/tools/admin-get-limits.js +35 -0
- package/dist/tools/admin-get-limits.js.map +1 -0
- package/dist/tools/admin-reparse-account-info.d.ts +16 -0
- package/dist/tools/admin-reparse-account-info.d.ts.map +1 -0
- package/dist/tools/admin-reparse-account-info.js +35 -0
- package/dist/tools/admin-reparse-account-info.js.map +1 -0
- package/package.json +2 -2
- package/src/linked-api-tools.ts +14 -0
- package/src/tools/admin-cancel-connection-session.ts +42 -0
- package/src/tools/admin-create-reconnection-session.ts +47 -0
- package/src/tools/admin-delete-limits.ts +65 -0
- package/src/tools/admin-get-connection-session.ts +46 -0
- package/src/tools/admin-get-limits-defaults.ts +33 -0
- package/src/tools/admin-get-limits.ts +39 -0
- package/src/tools/admin-reparse-account-info.ts +47 -0
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"linked-api-tools.d.ts","sourceRoot":"","sources":["../src/linked-api-tools.ts"],"names":[],"mappings":"AAAA,OAAO,SAAS,MAAM,iBAAiB,CAAC;AACxC,OAAO,EAAE,IAAI,EAAE,MAAM,oCAAoC,CAAC;
|
|
1
|
+
{"version":3,"file":"linked-api-tools.d.ts","sourceRoot":"","sources":["../src/linked-api-tools.ts"],"names":[],"mappings":"AAAA,OAAO,SAAS,MAAM,iBAAiB,CAAC;AACxC,OAAO,EAAE,IAAI,EAAE,MAAM,oCAAoC,CAAC;AAgD1D,OAAO,KAAK,EAAE,oBAAoB,EAAE,MAAM,wCAAwC,CAAC;AACnF,OAAO,EAAE,SAAS,EAAE,MAAM,uBAAuB,CAAC;AAElD,UAAU,wBAAwB;IAChC,QAAQ,CAAC,IAAI,EAAE,MAAM,CAAC;IACtB,OAAO,IAAI,IAAI,CAAC;IAChB,QAAQ,CAAC,IAAI,EAAE,OAAO,GAAG,OAAO,CAAC;IACjC,OAAO,CAAC,OAAO,EAAE;QACf,SAAS,EAAE,SAAS,CAAC;QACrB,IAAI,EAAE,KAAK,CAAC;QACZ,SAAS,EAAE,MAAM,CAAC;KACnB,GAAG,OAAO,CAAC,oBAAoB,CAAC,OAAO,CAAC,CAAC,CAAC;CAC5C;AAED,qBAAa,cAAc;IACzB,SAAgB,KAAK,EAAE,aAAa,CAAC,wBAAwB,CAAC,CAAC;IAC/D,SAAgB,UAAU,EAAE,aAAa,CAAC,SAAS,CAAC,OAAO,EAAE,OAAO,CAAC,CAAC,CAAC;;IA2DhE,UAAU,CAAC,IAAI,EAAE,MAAM,GAAG,wBAAwB,GAAG,SAAS;IAI9D,eAAe,CAAC,IAAI,EAAE,MAAM,GAAG,SAAS,CAAC,OAAO,EAAE,OAAO,CAAC,GAAG,SAAS;CAG9E"}
|
package/dist/linked-api-tools.js
CHANGED
|
@@ -1,13 +1,20 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
3
|
exports.LinkedApiTools = void 0;
|
|
4
|
+
const admin_cancel_connection_session_js_1 = require("./tools/admin-cancel-connection-session.js");
|
|
4
5
|
const admin_connect_account_js_1 = require("./tools/admin-connect-account.js");
|
|
6
|
+
const admin_create_reconnection_session_js_1 = require("./tools/admin-create-reconnection-session.js");
|
|
7
|
+
const admin_delete_limits_js_1 = require("./tools/admin-delete-limits.js");
|
|
5
8
|
const admin_disconnect_account_js_1 = require("./tools/admin-disconnect-account.js");
|
|
6
9
|
const admin_get_accounts_js_1 = require("./tools/admin-get-accounts.js");
|
|
10
|
+
const admin_get_connection_session_js_1 = require("./tools/admin-get-connection-session.js");
|
|
11
|
+
const admin_get_limits_defaults_js_1 = require("./tools/admin-get-limits-defaults.js");
|
|
7
12
|
const admin_get_limits_usage_js_1 = require("./tools/admin-get-limits-usage.js");
|
|
13
|
+
const admin_get_limits_js_1 = require("./tools/admin-get-limits.js");
|
|
8
14
|
const admin_get_seats_js_1 = require("./tools/admin-get-seats.js");
|
|
9
15
|
const admin_get_subscription_status_js_1 = require("./tools/admin-get-subscription-status.js");
|
|
10
16
|
const admin_regenerate_token_js_1 = require("./tools/admin-regenerate-token.js");
|
|
17
|
+
const admin_reparse_account_info_js_1 = require("./tools/admin-reparse-account-info.js");
|
|
11
18
|
const admin_reset_limits_js_1 = require("./tools/admin-reset-limits.js");
|
|
12
19
|
const admin_set_limits_js_1 = require("./tools/admin-set-limits.js");
|
|
13
20
|
const admin_set_seats_js_1 = require("./tools/admin-set-seats.js");
|
|
@@ -83,11 +90,18 @@ class LinkedApiTools {
|
|
|
83
90
|
new admin_get_seats_js_1.AdminGetSeatsTool(),
|
|
84
91
|
new admin_set_seats_js_1.AdminSetSeatsTool(),
|
|
85
92
|
new admin_get_accounts_js_1.AdminGetAccountsTool(),
|
|
93
|
+
new admin_reparse_account_info_js_1.AdminReparseAccountInfoTool(),
|
|
94
|
+
new admin_create_reconnection_session_js_1.AdminCreateReconnectionSessionTool(),
|
|
86
95
|
new admin_connect_account_js_1.AdminConnectAccountTool(),
|
|
96
|
+
new admin_get_connection_session_js_1.AdminGetConnectionSessionTool(),
|
|
97
|
+
new admin_cancel_connection_session_js_1.AdminCancelConnectionSessionTool(),
|
|
87
98
|
new admin_disconnect_account_js_1.AdminDisconnectAccountTool(),
|
|
88
99
|
new admin_regenerate_token_js_1.AdminRegenerateTokenTool(),
|
|
100
|
+
new admin_get_limits_defaults_js_1.AdminGetLimitsDefaultsTool(),
|
|
101
|
+
new admin_get_limits_js_1.AdminGetLimitsTool(),
|
|
89
102
|
new admin_get_limits_usage_js_1.AdminGetLimitsUsageTool(),
|
|
90
103
|
new admin_set_limits_js_1.AdminSetLimitsTool(),
|
|
104
|
+
new admin_delete_limits_js_1.AdminDeleteLimitsTool(),
|
|
91
105
|
new admin_reset_limits_js_1.AdminResetLimitsTool(),
|
|
92
106
|
];
|
|
93
107
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"linked-api-tools.js","sourceRoot":"","sources":["../src/linked-api-tools.ts"],"names":[],"mappings":";;;AAGA,+EAA2E;AAC3E,qFAAiF;AACjF,yEAAqE;AACrE,iFAA4E;AAC5E,mEAA+D;AAC/D,+FAA0F;AAC1F,iFAA6E;AAC7E,yEAAqE;AACrE,qEAAiE;AACjE,mEAA+D;AAC/D,mFAA+E;AAC/E,mEAA+D;AAC/D,2DAAwD;AACxD,mFAA+E;AAC/E,+DAA4D;AAC5D,uDAAoD;AACpD,6DAA0D;AAC1D,yDAAsD;AACtD,2EAAiE;AACjE,qEAAkE;AAClE,2EAAuE;AACvE,qEA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xC,IAAI,kDAAuB,EAAE;YAC7B,IAAI,+DAA6B,EAAE;YACnC,IAAI,qEAAgC,EAAE;YACtC,IAAI,wDAA0B,EAAE;YAChC,IAAI,oDAAwB,EAAE;YAC9B,IAAI,yDAA0B,EAAE;YAChC,IAAI,wCAAkB,EAAE;YACxB,IAAI,mDAAuB,EAAE;YAC7B,IAAI,wCAAkB,EAAE;YACxB,IAAI,8CAAqB,EAAE;YAC3B,IAAI,4CAAoB,EAAE;SAC3B,CAAC;IACJ,CAAC;IAEM,UAAU,CAAC,IAAY;QAC5B,OAAO,IAAI,CAAC,KAAK,CAAC,IAAI,CAAC,CAAC,IAAI,EAAE,EAAE,CAAC,IAAI,CAAC,IAAI,KAAK,IAAI,CAAC,CAAC;IACvD,CAAC;IAEM,eAAe,CAAC,IAAY;QACjC,OAAO,IAAI,CAAC,UAAU,CAAC,IAAI,CAAC,CAAC,IAAI,EAAE,EAAE,CAAC,IAAI,CAAC,IAAI,KAAK,IAAI,CAAC,CAAC;IAC5D,CAAC;CACF;AApED,wCAoEC"}
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
import { LinkedApiAdmin, TCancelConnectionSessionParams } from '@linkedapi/node';
|
|
2
|
+
import { Tool } from '@modelcontextprotocol/sdk/types.js';
|
|
3
|
+
import z from 'zod';
|
|
4
|
+
import { AdminTool } from '../utils/admin-tool.js';
|
|
5
|
+
export declare class AdminCancelConnectionSessionTool extends AdminTool<TCancelConnectionSessionParams, void> {
|
|
6
|
+
readonly name = "admin_cancel_connection_session";
|
|
7
|
+
protected readonly schema: z.ZodObject<{
|
|
8
|
+
sessionId: z.ZodString;
|
|
9
|
+
}, z.core.$strip>;
|
|
10
|
+
execute({ admin, args, }: {
|
|
11
|
+
admin: LinkedApiAdmin;
|
|
12
|
+
args: TCancelConnectionSessionParams;
|
|
13
|
+
}): Promise<void>;
|
|
14
|
+
getTool(): Tool;
|
|
15
|
+
}
|
|
16
|
+
//# sourceMappingURL=admin-cancel-connection-session.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"admin-cancel-connection-session.d.ts","sourceRoot":"","sources":["../../src/tools/admin-cancel-connection-session.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,cAAc,EAAE,8BAA8B,EAAE,MAAM,iBAAiB,CAAC;AACjF,OAAO,EAAE,IAAI,EAAE,MAAM,oCAAoC,CAAC;AAC1D,OAAO,CAAC,MAAM,KAAK,CAAC;AAEpB,OAAO,EAAE,SAAS,EAAE,MAAM,wBAAwB,CAAC;AAEnD,qBAAa,gCAAiC,SAAQ,SAAS,CAC7D,8BAA8B,EAC9B,IAAI,CACL;IACC,SAAgB,IAAI,qCAAqC;IACzD,SAAS,CAAC,QAAQ,CAAC,MAAM;;sBAEtB;IAEmB,OAAO,CAAC,EAC5B,KAAK,EACL,IAAI,GACL,EAAE;QACD,KAAK,EAAE,cAAc,CAAC;QACtB,IAAI,EAAE,8BAA8B,CAAC;KACtC,GAAG,OAAO,CAAC,IAAI,CAAC;IAID,OAAO,IAAI,IAAI;CAgBhC"}
|
|
@@ -0,0 +1,35 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
3
|
+
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
4
|
+
};
|
|
5
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
6
|
+
exports.AdminCancelConnectionSessionTool = void 0;
|
|
7
|
+
const zod_1 = __importDefault(require("zod"));
|
|
8
|
+
const admin_tool_js_1 = require("../utils/admin-tool.js");
|
|
9
|
+
class AdminCancelConnectionSessionTool extends admin_tool_js_1.AdminTool {
|
|
10
|
+
name = 'admin_cancel_connection_session';
|
|
11
|
+
schema = zod_1.default.object({
|
|
12
|
+
sessionId: zod_1.default.string(),
|
|
13
|
+
});
|
|
14
|
+
async execute({ admin, args, }) {
|
|
15
|
+
await admin.accounts.cancelConnectionSession(args);
|
|
16
|
+
}
|
|
17
|
+
getTool() {
|
|
18
|
+
return {
|
|
19
|
+
name: this.name,
|
|
20
|
+
description: 'Cancel a pending connection or reconnection session.',
|
|
21
|
+
inputSchema: {
|
|
22
|
+
type: 'object',
|
|
23
|
+
properties: {
|
|
24
|
+
sessionId: {
|
|
25
|
+
type: 'string',
|
|
26
|
+
description: 'Connection session UUID',
|
|
27
|
+
},
|
|
28
|
+
},
|
|
29
|
+
required: ['sessionId'],
|
|
30
|
+
},
|
|
31
|
+
};
|
|
32
|
+
}
|
|
33
|
+
}
|
|
34
|
+
exports.AdminCancelConnectionSessionTool = AdminCancelConnectionSessionTool;
|
|
35
|
+
//# sourceMappingURL=admin-cancel-connection-session.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"admin-cancel-connection-session.js","sourceRoot":"","sources":["../../src/tools/admin-cancel-connection-session.ts"],"names":[],"mappings":";;;;;;AAEA,8CAAoB;AAEpB,0DAAmD;AAEnD,MAAa,gCAAiC,SAAQ,yBAGrD;IACiB,IAAI,GAAG,iCAAiC,CAAC;IACtC,MAAM,GAAG,aAAC,CAAC,MAAM,CAAC;QACnC,SAAS,EAAE,aAAC,CAAC,MAAM,EAAE;KACtB,CAAC,CAAC;IAEa,KAAK,CAAC,OAAO,CAAC,EAC5B,KAAK,EACL,IAAI,GAIL;QACC,MAAM,KAAK,CAAC,QAAQ,CAAC,uBAAuB,CAAC,IAAI,CAAC,CAAC;IACrD,CAAC;IAEe,OAAO;QACrB,OAAO;YACL,IAAI,EAAE,IAAI,CAAC,IAAI;YACf,WAAW,EAAE,sDAAsD;YACnE,WAAW,EAAE;gBACX,IAAI,EAAE,QAAQ;gBACd,UAAU,EAAE;oBACV,SAAS,EAAE;wBACT,IAAI,EAAE,QAAQ;wBACd,WAAW,EAAE,yBAAyB;qBACvC;iBACF;gBACD,QAAQ,EAAE,CAAC,WAAW,CAAC;aACxB;SACF,CAAC;IACJ,CAAC;CACF;AAnCD,4EAmCC"}
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
import { LinkedApiAdmin, TCreateReconnectionSessionParams, TCreateReconnectionSessionResult } from '@linkedapi/node';
|
|
2
|
+
import { Tool } from '@modelcontextprotocol/sdk/types.js';
|
|
3
|
+
import z from 'zod';
|
|
4
|
+
import { AdminTool } from '../utils/admin-tool.js';
|
|
5
|
+
export declare class AdminCreateReconnectionSessionTool extends AdminTool<TCreateReconnectionSessionParams, TCreateReconnectionSessionResult> {
|
|
6
|
+
readonly name = "admin_create_reconnection_session";
|
|
7
|
+
protected readonly schema: z.ZodObject<{
|
|
8
|
+
accountId: z.ZodString;
|
|
9
|
+
}, z.core.$strip>;
|
|
10
|
+
execute({ admin, args, }: {
|
|
11
|
+
admin: LinkedApiAdmin;
|
|
12
|
+
args: TCreateReconnectionSessionParams;
|
|
13
|
+
}): Promise<TCreateReconnectionSessionResult>;
|
|
14
|
+
getTool(): Tool;
|
|
15
|
+
}
|
|
16
|
+
//# sourceMappingURL=admin-create-reconnection-session.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"admin-create-reconnection-session.d.ts","sourceRoot":"","sources":["../../src/tools/admin-create-reconnection-session.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,cAAc,EACd,gCAAgC,EAChC,gCAAgC,EACjC,MAAM,iBAAiB,CAAC;AACzB,OAAO,EAAE,IAAI,EAAE,MAAM,oCAAoC,CAAC;AAC1D,OAAO,CAAC,MAAM,KAAK,CAAC;AAEpB,OAAO,EAAE,SAAS,EAAE,MAAM,wBAAwB,CAAC;AAEnD,qBAAa,kCAAmC,SAAQ,SAAS,CAC/D,gCAAgC,EAChC,gCAAgC,CACjC;IACC,SAAgB,IAAI,uCAAuC;IAC3D,SAAS,CAAC,QAAQ,CAAC,MAAM;;sBAEtB;IAEmB,OAAO,CAAC,EAC5B,KAAK,EACL,IAAI,GACL,EAAE;QACD,KAAK,EAAE,cAAc,CAAC;QACtB,IAAI,EAAE,gCAAgC,CAAC;KACxC,GAAG,OAAO,CAAC,gCAAgC,CAAC;IAI7B,OAAO,IAAI,IAAI;CAiBhC"}
|
|
@@ -0,0 +1,35 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
3
|
+
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
4
|
+
};
|
|
5
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
6
|
+
exports.AdminCreateReconnectionSessionTool = void 0;
|
|
7
|
+
const zod_1 = __importDefault(require("zod"));
|
|
8
|
+
const admin_tool_js_1 = require("../utils/admin-tool.js");
|
|
9
|
+
class AdminCreateReconnectionSessionTool extends admin_tool_js_1.AdminTool {
|
|
10
|
+
name = 'admin_create_reconnection_session';
|
|
11
|
+
schema = zod_1.default.object({
|
|
12
|
+
accountId: zod_1.default.string(),
|
|
13
|
+
});
|
|
14
|
+
async execute({ admin, args, }) {
|
|
15
|
+
return await admin.accounts.createReconnectionSession(args);
|
|
16
|
+
}
|
|
17
|
+
getTool() {
|
|
18
|
+
return {
|
|
19
|
+
name: this.name,
|
|
20
|
+
description: 'Create a reconnection session for an account with status reconnection_required. Returns reconnectionSessionId and reconnectionLink.',
|
|
21
|
+
inputSchema: {
|
|
22
|
+
type: 'object',
|
|
23
|
+
properties: {
|
|
24
|
+
accountId: {
|
|
25
|
+
type: 'string',
|
|
26
|
+
description: 'UUID of the account to reconnect',
|
|
27
|
+
},
|
|
28
|
+
},
|
|
29
|
+
required: ['accountId'],
|
|
30
|
+
},
|
|
31
|
+
};
|
|
32
|
+
}
|
|
33
|
+
}
|
|
34
|
+
exports.AdminCreateReconnectionSessionTool = AdminCreateReconnectionSessionTool;
|
|
35
|
+
//# sourceMappingURL=admin-create-reconnection-session.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"admin-create-reconnection-session.js","sourceRoot":"","sources":["../../src/tools/admin-create-reconnection-session.ts"],"names":[],"mappings":";;;;;;AAMA,8CAAoB;AAEpB,0DAAmD;AAEnD,MAAa,kCAAmC,SAAQ,yBAGvD;IACiB,IAAI,GAAG,mCAAmC,CAAC;IACxC,MAAM,GAAG,aAAC,CAAC,MAAM,CAAC;QACnC,SAAS,EAAE,aAAC,CAAC,MAAM,EAAE;KACtB,CAAC,CAAC;IAEa,KAAK,CAAC,OAAO,CAAC,EAC5B,KAAK,EACL,IAAI,GAIL;QACC,OAAO,MAAM,KAAK,CAAC,QAAQ,CAAC,yBAAyB,CAAC,IAAI,CAAC,CAAC;IAC9D,CAAC;IAEe,OAAO;QACrB,OAAO;YACL,IAAI,EAAE,IAAI,CAAC,IAAI;YACf,WAAW,EACT,qIAAqI;YACvI,WAAW,EAAE;gBACX,IAAI,EAAE,QAAQ;gBACd,UAAU,EAAE;oBACV,SAAS,EAAE;wBACT,IAAI,EAAE,QAAQ;wBACd,WAAW,EAAE,kCAAkC;qBAChD;iBACF;gBACD,QAAQ,EAAE,CAAC,WAAW,CAAC;aACxB;SACF,CAAC;IACJ,CAAC;CACF;AApCD,gFAoCC"}
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
import { LinkedApiAdmin, TDeleteLimitsParams } from '@linkedapi/node';
|
|
2
|
+
import { Tool } from '@modelcontextprotocol/sdk/types.js';
|
|
3
|
+
import z from 'zod';
|
|
4
|
+
import { AdminTool } from '../utils/admin-tool.js';
|
|
5
|
+
export declare class AdminDeleteLimitsTool extends AdminTool<TDeleteLimitsParams, void> {
|
|
6
|
+
readonly name = "admin_delete_limits";
|
|
7
|
+
protected readonly schema: z.ZodObject<{
|
|
8
|
+
accountId: z.ZodString;
|
|
9
|
+
limits: z.ZodArray<z.ZodObject<{
|
|
10
|
+
category: z.ZodString;
|
|
11
|
+
period: z.ZodEnum<{
|
|
12
|
+
daily: "daily";
|
|
13
|
+
weekly: "weekly";
|
|
14
|
+
monthly: "monthly";
|
|
15
|
+
}>;
|
|
16
|
+
}, z.core.$strip>>;
|
|
17
|
+
}, z.core.$strip>;
|
|
18
|
+
execute({ admin, args, }: {
|
|
19
|
+
admin: LinkedApiAdmin;
|
|
20
|
+
args: TDeleteLimitsParams;
|
|
21
|
+
}): Promise<void>;
|
|
22
|
+
getTool(): Tool;
|
|
23
|
+
}
|
|
24
|
+
//# sourceMappingURL=admin-delete-limits.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"admin-delete-limits.d.ts","sourceRoot":"","sources":["../../src/tools/admin-delete-limits.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,cAAc,EAAE,mBAAmB,EAAE,MAAM,iBAAiB,CAAC;AACtE,OAAO,EAAE,IAAI,EAAE,MAAM,oCAAoC,CAAC;AAC1D,OAAO,CAAC,MAAM,KAAK,CAAC;AAEpB,OAAO,EAAE,SAAS,EAAE,MAAM,wBAAwB,CAAC;AAEnD,qBAAa,qBAAsB,SAAQ,SAAS,CAAC,mBAAmB,EAAE,IAAI,CAAC;IAC7E,SAAgB,IAAI,yBAAyB;IAC7C,SAAS,CAAC,QAAQ,CAAC,MAAM;;;;;;;;;;sBAQtB;IAEmB,OAAO,CAAC,EAC5B,KAAK,EACL,IAAI,GACL,EAAE;QACD,KAAK,EAAE,cAAc,CAAC;QACtB,IAAI,EAAE,mBAAmB,CAAC;KAC3B,GAAG,OAAO,CAAC,IAAI,CAAC;IAID,OAAO,IAAI,IAAI;CAoChC"}
|
|
@@ -0,0 +1,58 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
3
|
+
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
4
|
+
};
|
|
5
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
6
|
+
exports.AdminDeleteLimitsTool = void 0;
|
|
7
|
+
const zod_1 = __importDefault(require("zod"));
|
|
8
|
+
const admin_tool_js_1 = require("../utils/admin-tool.js");
|
|
9
|
+
class AdminDeleteLimitsTool extends admin_tool_js_1.AdminTool {
|
|
10
|
+
name = 'admin_delete_limits';
|
|
11
|
+
schema = zod_1.default.object({
|
|
12
|
+
accountId: zod_1.default.string(),
|
|
13
|
+
limits: zod_1.default.array(zod_1.default.object({
|
|
14
|
+
category: zod_1.default.string(),
|
|
15
|
+
period: zod_1.default.enum(['daily', 'weekly', 'monthly']),
|
|
16
|
+
})),
|
|
17
|
+
});
|
|
18
|
+
async execute({ admin, args, }) {
|
|
19
|
+
await admin.limits.delete(args);
|
|
20
|
+
}
|
|
21
|
+
getTool() {
|
|
22
|
+
return {
|
|
23
|
+
name: this.name,
|
|
24
|
+
description: 'Delete specific rate limits for an account. Deleted limits fall back to system defaults.',
|
|
25
|
+
inputSchema: {
|
|
26
|
+
type: 'object',
|
|
27
|
+
properties: {
|
|
28
|
+
accountId: {
|
|
29
|
+
type: 'string',
|
|
30
|
+
description: 'Account UUID',
|
|
31
|
+
},
|
|
32
|
+
limits: {
|
|
33
|
+
type: 'array',
|
|
34
|
+
description: 'Array of limit keys to delete',
|
|
35
|
+
items: {
|
|
36
|
+
type: 'object',
|
|
37
|
+
properties: {
|
|
38
|
+
category: {
|
|
39
|
+
type: 'string',
|
|
40
|
+
description: 'Limit category',
|
|
41
|
+
},
|
|
42
|
+
period: {
|
|
43
|
+
type: 'string',
|
|
44
|
+
enum: ['daily', 'weekly', 'monthly'],
|
|
45
|
+
description: 'Limit period',
|
|
46
|
+
},
|
|
47
|
+
},
|
|
48
|
+
required: ['category', 'period'],
|
|
49
|
+
},
|
|
50
|
+
},
|
|
51
|
+
},
|
|
52
|
+
required: ['accountId', 'limits'],
|
|
53
|
+
},
|
|
54
|
+
};
|
|
55
|
+
}
|
|
56
|
+
}
|
|
57
|
+
exports.AdminDeleteLimitsTool = AdminDeleteLimitsTool;
|
|
58
|
+
//# sourceMappingURL=admin-delete-limits.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"admin-delete-limits.js","sourceRoot":"","sources":["../../src/tools/admin-delete-limits.ts"],"names":[],"mappings":";;;;;;AAEA,8CAAoB;AAEpB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C;aAClC;SACF,CAAC;IACJ,CAAC;CACF;AA1DD,sDA0DC"}
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
import { LinkedApiAdmin, TConnectionSessionResult, TGetConnectionSessionParams } from '@linkedapi/node';
|
|
2
|
+
import { Tool } from '@modelcontextprotocol/sdk/types.js';
|
|
3
|
+
import z from 'zod';
|
|
4
|
+
import { AdminTool } from '../utils/admin-tool.js';
|
|
5
|
+
export declare class AdminGetConnectionSessionTool extends AdminTool<TGetConnectionSessionParams, TConnectionSessionResult> {
|
|
6
|
+
readonly name = "admin_get_connection_session";
|
|
7
|
+
protected readonly schema: z.ZodObject<{
|
|
8
|
+
sessionId: z.ZodString;
|
|
9
|
+
}, z.core.$strip>;
|
|
10
|
+
execute({ admin, args, }: {
|
|
11
|
+
admin: LinkedApiAdmin;
|
|
12
|
+
args: TGetConnectionSessionParams;
|
|
13
|
+
}): Promise<TConnectionSessionResult>;
|
|
14
|
+
getTool(): Tool;
|
|
15
|
+
}
|
|
16
|
+
//# sourceMappingURL=admin-get-connection-session.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"admin-get-connection-session.d.ts","sourceRoot":"","sources":["../../src/tools/admin-get-connection-session.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,cAAc,EACd,wBAAwB,EACxB,2BAA2B,EAC5B,MAAM,iBAAiB,CAAC;AACzB,OAAO,EAAE,IAAI,EAAE,MAAM,oCAAoC,CAAC;AAC1D,OAAO,CAAC,MAAM,KAAK,CAAC;AAEpB,OAAO,EAAE,SAAS,EAAE,MAAM,wBAAwB,CAAC;AAEnD,qBAAa,6BAA8B,SAAQ,SAAS,CAC1D,2BAA2B,EAC3B,wBAAwB,CACzB;IACC,SAAgB,IAAI,kCAAkC;IACtD,SAAS,CAAC,QAAQ,CAAC,MAAM;;sBAEtB;IAEmB,OAAO,CAAC,EAC5B,KAAK,EACL,IAAI,GACL,EAAE;QACD,KAAK,EAAE,cAAc,CAAC;QACtB,IAAI,EAAE,2BAA2B,CAAC;KACnC,GAAG,OAAO,CAAC,wBAAwB,CAAC;IAIrB,OAAO,IAAI,IAAI;CAgBhC"}
|
|
@@ -0,0 +1,35 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
3
|
+
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
4
|
+
};
|
|
5
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
6
|
+
exports.AdminGetConnectionSessionTool = void 0;
|
|
7
|
+
const zod_1 = __importDefault(require("zod"));
|
|
8
|
+
const admin_tool_js_1 = require("../utils/admin-tool.js");
|
|
9
|
+
class AdminGetConnectionSessionTool extends admin_tool_js_1.AdminTool {
|
|
10
|
+
name = 'admin_get_connection_session';
|
|
11
|
+
schema = zod_1.default.object({
|
|
12
|
+
sessionId: zod_1.default.string(),
|
|
13
|
+
});
|
|
14
|
+
async execute({ admin, args, }) {
|
|
15
|
+
return await admin.accounts.getConnectionSession(args);
|
|
16
|
+
}
|
|
17
|
+
getTool() {
|
|
18
|
+
return {
|
|
19
|
+
name: this.name,
|
|
20
|
+
description: 'Get connection or reconnection session status by session ID.',
|
|
21
|
+
inputSchema: {
|
|
22
|
+
type: 'object',
|
|
23
|
+
properties: {
|
|
24
|
+
sessionId: {
|
|
25
|
+
type: 'string',
|
|
26
|
+
description: 'Connection session UUID',
|
|
27
|
+
},
|
|
28
|
+
},
|
|
29
|
+
required: ['sessionId'],
|
|
30
|
+
},
|
|
31
|
+
};
|
|
32
|
+
}
|
|
33
|
+
}
|
|
34
|
+
exports.AdminGetConnectionSessionTool = AdminGetConnectionSessionTool;
|
|
35
|
+
//# sourceMappingURL=admin-get-connection-session.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"admin-get-connection-session.js","sourceRoot":"","sources":["../../src/tools/admin-get-connection-session.ts"],"names":[],"mappings":";;;;;;AAMA,8CAAoB;AAEpB,0DAAmD;AAEnD,MAAa,6BAA8B,SAAQ,yBAGlD;IACiB,IAAI,GAAG,8BAA8B,CAAC;IACnC,MAAM,GAAG,aAAC,CAAC,MAAM,CAAC;QACnC,SAAS,EAAE,aAAC,CAAC,MAAM,EAAE;KACtB,CAAC,CAAC;IAEa,KAAK,CAAC,OAAO,CAAC,EAC5B,KAAK,EACL,IAAI,GAIL;QACC,OAAO,MAAM,KAAK,CAAC,QAAQ,CAAC,oBAAoB,CAAC,IAAI,CAAC,CAAC;IACzD,CAAC;IAEe,OAAO;QACrB,OAAO;YACL,IAAI,EAAE,IAAI,CAAC,IAAI;YACf,WAAW,EAAE,8DAA8D;YAC3E,WAAW,EAAE;gBACX,IAAI,EAAE,QAAQ;gBACd,UAAU,EAAE;oBACV,SAAS,EAAE;wBACT,IAAI,EAAE,QAAQ;wBACd,WAAW,EAAE,yBAAyB;qBACvC;iBACF;gBACD,QAAQ,EAAE,CAAC,WAAW,CAAC;aACxB;SACF,CAAC;IACJ,CAAC;CACF;AAnCD,sEAmCC"}
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
import { LinkedApiAdmin, TLimit } from '@linkedapi/node';
|
|
2
|
+
import { Tool } from '@modelcontextprotocol/sdk/types.js';
|
|
3
|
+
import z from 'zod';
|
|
4
|
+
import { AdminTool } from '../utils/admin-tool.js';
|
|
5
|
+
export declare class AdminGetLimitsDefaultsTool extends AdminTool<Record<string, never>, {
|
|
6
|
+
limits: Array<TLimit>;
|
|
7
|
+
}> {
|
|
8
|
+
readonly name = "admin_get_limits_defaults";
|
|
9
|
+
protected readonly schema: z.ZodObject<{}, z.core.$strip>;
|
|
10
|
+
execute({ admin, }: {
|
|
11
|
+
admin: LinkedApiAdmin;
|
|
12
|
+
args: Record<string, never>;
|
|
13
|
+
}): Promise<{
|
|
14
|
+
limits: Array<TLimit>;
|
|
15
|
+
}>;
|
|
16
|
+
getTool(): Tool;
|
|
17
|
+
}
|
|
18
|
+
//# sourceMappingURL=admin-get-limits-defaults.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"admin-get-limits-defaults.d.ts","sourceRoot":"","sources":["../../src/tools/admin-get-limits-defaults.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,cAAc,EAAE,MAAM,EAAE,MAAM,iBAAiB,CAAC;AACzD,OAAO,EAAE,IAAI,EAAE,MAAM,oCAAoC,CAAC;AAC1D,OAAO,CAAC,MAAM,KAAK,CAAC;AAEpB,OAAO,EAAE,SAAS,EAAE,MAAM,wBAAwB,CAAC;AAEnD,qBAAa,0BAA2B,SAAQ,SAAS,CACvD,MAAM,CAAC,MAAM,EAAE,KAAK,CAAC,EACrB;IAAE,MAAM,EAAE,KAAK,CAAC,MAAM,CAAC,CAAA;CAAE,CAC1B;IACC,SAAgB,IAAI,+BAA+B;IACnD,SAAS,CAAC,QAAQ,CAAC,MAAM,iCAAgB;IAEnB,OAAO,CAAC,EAC5B,KAAK,GACN,EAAE;QACD,KAAK,EAAE,cAAc,CAAC;QACtB,IAAI,EAAE,MAAM,CAAC,MAAM,EAAE,KAAK,CAAC,CAAC;KAC7B,GAAG,OAAO,CAAC;QAAE,MAAM,EAAE,KAAK,CAAC,MAAM,CAAC,CAAA;KAAE,CAAC;IAItB,OAAO,IAAI,IAAI;CAUhC"}
|
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
3
|
+
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
4
|
+
};
|
|
5
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
6
|
+
exports.AdminGetLimitsDefaultsTool = void 0;
|
|
7
|
+
const zod_1 = __importDefault(require("zod"));
|
|
8
|
+
const admin_tool_js_1 = require("../utils/admin-tool.js");
|
|
9
|
+
class AdminGetLimitsDefaultsTool extends admin_tool_js_1.AdminTool {
|
|
10
|
+
name = 'admin_get_limits_defaults';
|
|
11
|
+
schema = zod_1.default.object({});
|
|
12
|
+
async execute({ admin, }) {
|
|
13
|
+
return await admin.limits.getDefaults();
|
|
14
|
+
}
|
|
15
|
+
getTool() {
|
|
16
|
+
return {
|
|
17
|
+
name: this.name,
|
|
18
|
+
description: 'Get system default rate limits.',
|
|
19
|
+
inputSchema: {
|
|
20
|
+
type: 'object',
|
|
21
|
+
properties: {},
|
|
22
|
+
},
|
|
23
|
+
};
|
|
24
|
+
}
|
|
25
|
+
}
|
|
26
|
+
exports.AdminGetLimitsDefaultsTool = AdminGetLimitsDefaultsTool;
|
|
27
|
+
//# sourceMappingURL=admin-get-limits-defaults.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"admin-get-limits-defaults.js","sourceRoot":"","sources":["../../src/tools/admin-get-limits-defaults.ts"],"names":[],"mappings":";;;;;;AAEA,8CAAoB;AAEpB,0DAAmD;AAEnD,MAAa,0BAA2B,SAAQ,yBAG/C;IACiB,IAAI,GAAG,2BAA2B,CAAC;IAChC,MAAM,GAAG,aAAC,CAAC,MAAM,CAAC,EAAE,CAAC,CAAC;IAEzB,KAAK,CAAC,OAAO,CAAC,EAC5B,KAAK,GAIN;QACC,OAAO,MAAM,KAAK,CAAC,MAAM,CAAC,WAAW,EAAE,CAAC;IAC1C,CAAC;IAEe,OAAO;QACrB,OAAO;YACL,IAAI,EAAE,IAAI,CAAC,IAAI;YACf,WAAW,EAAE,iCAAiC;YAC9C,WAAW,EAAE;gBACX,IAAI,EAAE,QAAQ;gBACd,UAAU,EAAE,EAAE;aACf;SACF,CAAC;IACJ,CAAC;CACF;AA1BD,gEA0BC"}
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
import { LinkedApiAdmin, TGetLimitsParams, TLimit } from '@linkedapi/node';
|
|
2
|
+
import { Tool } from '@modelcontextprotocol/sdk/types.js';
|
|
3
|
+
import z from 'zod';
|
|
4
|
+
import { AdminTool } from '../utils/admin-tool.js';
|
|
5
|
+
export declare class AdminGetLimitsTool extends AdminTool<TGetLimitsParams, {
|
|
6
|
+
limits: Array<TLimit>;
|
|
7
|
+
}> {
|
|
8
|
+
readonly name = "admin_get_limits";
|
|
9
|
+
protected readonly schema: z.ZodObject<{
|
|
10
|
+
accountId: z.ZodString;
|
|
11
|
+
}, z.core.$strip>;
|
|
12
|
+
execute({ admin, args, }: {
|
|
13
|
+
admin: LinkedApiAdmin;
|
|
14
|
+
args: TGetLimitsParams;
|
|
15
|
+
}): Promise<{
|
|
16
|
+
limits: Array<TLimit>;
|
|
17
|
+
}>;
|
|
18
|
+
getTool(): Tool;
|
|
19
|
+
}
|
|
20
|
+
//# sourceMappingURL=admin-get-limits.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"admin-get-limits.d.ts","sourceRoot":"","sources":["../../src/tools/admin-get-limits.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,cAAc,EAAE,gBAAgB,EAAE,MAAM,EAAE,MAAM,iBAAiB,CAAC;AAC3E,OAAO,EAAE,IAAI,EAAE,MAAM,oCAAoC,CAAC;AAC1D,OAAO,CAAC,MAAM,KAAK,CAAC;AAEpB,OAAO,EAAE,SAAS,EAAE,MAAM,wBAAwB,CAAC;AAEnD,qBAAa,kBAAmB,SAAQ,SAAS,CAAC,gBAAgB,EAAE;IAAE,MAAM,EAAE,KAAK,CAAC,MAAM,CAAC,CAAA;CAAE,CAAC;IAC5F,SAAgB,IAAI,sBAAsB;IAC1C,SAAS,CAAC,QAAQ,CAAC,MAAM;;sBAEtB;IAEmB,OAAO,CAAC,EAC5B,KAAK,EACL,IAAI,GACL,EAAE;QACD,KAAK,EAAE,cAAc,CAAC;QACtB,IAAI,EAAE,gBAAgB,CAAC;KACxB,GAAG,OAAO,CAAC;QAAE,MAAM,EAAE,KAAK,CAAC,MAAM,CAAC,CAAA;KAAE,CAAC;IAItB,OAAO,IAAI,IAAI;CAgBhC"}
|
|
@@ -0,0 +1,35 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
3
|
+
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
4
|
+
};
|
|
5
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
6
|
+
exports.AdminGetLimitsTool = void 0;
|
|
7
|
+
const zod_1 = __importDefault(require("zod"));
|
|
8
|
+
const admin_tool_js_1 = require("../utils/admin-tool.js");
|
|
9
|
+
class AdminGetLimitsTool extends admin_tool_js_1.AdminTool {
|
|
10
|
+
name = 'admin_get_limits';
|
|
11
|
+
schema = zod_1.default.object({
|
|
12
|
+
accountId: zod_1.default.string(),
|
|
13
|
+
});
|
|
14
|
+
async execute({ admin, args, }) {
|
|
15
|
+
return await admin.limits.get(args);
|
|
16
|
+
}
|
|
17
|
+
getTool() {
|
|
18
|
+
return {
|
|
19
|
+
name: this.name,
|
|
20
|
+
description: 'Get configured rate limits for an account.',
|
|
21
|
+
inputSchema: {
|
|
22
|
+
type: 'object',
|
|
23
|
+
properties: {
|
|
24
|
+
accountId: {
|
|
25
|
+
type: 'string',
|
|
26
|
+
description: 'Account UUID',
|
|
27
|
+
},
|
|
28
|
+
},
|
|
29
|
+
required: ['accountId'],
|
|
30
|
+
},
|
|
31
|
+
};
|
|
32
|
+
}
|
|
33
|
+
}
|
|
34
|
+
exports.AdminGetLimitsTool = AdminGetLimitsTool;
|
|
35
|
+
//# sourceMappingURL=admin-get-limits.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"admin-get-limits.js","sourceRoot":"","sources":["../../src/tools/admin-get-limits.ts"],"names":[],"mappings":";;;;;;AAEA,8CAAoB;AAEpB,0DAAmD;AAEnD,MAAa,kBAAmB,SAAQ,yBAAsD;IAC5E,IAAI,GAAG,kBAAkB,CAAC;IACvB,MAAM,GAAG,aAAC,CAAC,MAAM,CAAC;QACnC,SAAS,EAAE,aAAC,CAAC,MAAM,EAAE;KACtB,CAAC,CAAC;IAEa,KAAK,CAAC,OAAO,CAAC,EAC5B,KAAK,EACL,IAAI,GAIL;QACC,OAAO,MAAM,KAAK,CAAC,MAAM,CAAC,GAAG,CAAC,IAAI,CAAC,CAAC;IACtC,CAAC;IAEe,OAAO;QACrB,OAAO;YACL,IAAI,EAAE,IAAI,CAAC,IAAI;YACf,WAAW,EAAE,4CAA4C;YACzD,WAAW,EAAE;gBACX,IAAI,EAAE,QAAQ;gBACd,UAAU,EAAE;oBACV,SAAS,EAAE;wBACT,IAAI,EAAE,QAAQ;wBACd,WAAW,EAAE,cAAc;qBAC5B;iBACF;gBACD,QAAQ,EAAE,CAAC,WAAW,CAAC;aACxB;SACF,CAAC;IACJ,CAAC;CACF;AAhCD,gDAgCC"}
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
import { LinkedApiAdmin, TReparseAccountInfoParams, TReparseAccountInfoResult } from '@linkedapi/node';
|
|
2
|
+
import { Tool } from '@modelcontextprotocol/sdk/types.js';
|
|
3
|
+
import z from 'zod';
|
|
4
|
+
import { AdminTool } from '../utils/admin-tool.js';
|
|
5
|
+
export declare class AdminReparseAccountInfoTool extends AdminTool<TReparseAccountInfoParams, TReparseAccountInfoResult> {
|
|
6
|
+
readonly name = "admin_reparse_account_info";
|
|
7
|
+
protected readonly schema: z.ZodObject<{
|
|
8
|
+
accountId: z.ZodString;
|
|
9
|
+
}, z.core.$strip>;
|
|
10
|
+
execute({ admin, args, }: {
|
|
11
|
+
admin: LinkedApiAdmin;
|
|
12
|
+
args: TReparseAccountInfoParams;
|
|
13
|
+
}): Promise<TReparseAccountInfoResult>;
|
|
14
|
+
getTool(): Tool;
|
|
15
|
+
}
|
|
16
|
+
//# sourceMappingURL=admin-reparse-account-info.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"admin-reparse-account-info.d.ts","sourceRoot":"","sources":["../../src/tools/admin-reparse-account-info.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,cAAc,EACd,yBAAyB,EACzB,yBAAyB,EAC1B,MAAM,iBAAiB,CAAC;AACzB,OAAO,EAAE,IAAI,EAAE,MAAM,oCAAoC,CAAC;AAC1D,OAAO,CAAC,MAAM,KAAK,CAAC;AAEpB,OAAO,EAAE,SAAS,EAAE,MAAM,wBAAwB,CAAC;AAEnD,qBAAa,2BAA4B,SAAQ,SAAS,CACxD,yBAAyB,EACzB,yBAAyB,CAC1B;IACC,SAAgB,IAAI,gCAAgC;IACpD,SAAS,CAAC,QAAQ,CAAC,MAAM;;sBAEtB;IAEmB,OAAO,CAAC,EAC5B,KAAK,EACL,IAAI,GACL,EAAE;QACD,KAAK,EAAE,cAAc,CAAC;QACtB,IAAI,EAAE,yBAAyB,CAAC;KACjC,GAAG,OAAO,CAAC,yBAAyB,CAAC;IAItB,OAAO,IAAI,IAAI;CAiBhC"}
|
|
@@ -0,0 +1,35 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
3
|
+
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
4
|
+
};
|
|
5
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
6
|
+
exports.AdminReparseAccountInfoTool = void 0;
|
|
7
|
+
const zod_1 = __importDefault(require("zod"));
|
|
8
|
+
const admin_tool_js_1 = require("../utils/admin-tool.js");
|
|
9
|
+
class AdminReparseAccountInfoTool extends admin_tool_js_1.AdminTool {
|
|
10
|
+
name = 'admin_reparse_account_info';
|
|
11
|
+
schema = zod_1.default.object({
|
|
12
|
+
accountId: zod_1.default.string(),
|
|
13
|
+
});
|
|
14
|
+
async execute({ admin, args, }) {
|
|
15
|
+
return await admin.accounts.reparseAccountInfo(args);
|
|
16
|
+
}
|
|
17
|
+
getTool() {
|
|
18
|
+
return {
|
|
19
|
+
name: this.name,
|
|
20
|
+
description: 'Refresh stored profile information for a connected account. Starts a background reparse workflow and returns workflowId.',
|
|
21
|
+
inputSchema: {
|
|
22
|
+
type: 'object',
|
|
23
|
+
properties: {
|
|
24
|
+
accountId: {
|
|
25
|
+
type: 'string',
|
|
26
|
+
description: 'UUID of the account to refresh',
|
|
27
|
+
},
|
|
28
|
+
},
|
|
29
|
+
required: ['accountId'],
|
|
30
|
+
},
|
|
31
|
+
};
|
|
32
|
+
}
|
|
33
|
+
}
|
|
34
|
+
exports.AdminReparseAccountInfoTool = AdminReparseAccountInfoTool;
|
|
35
|
+
//# sourceMappingURL=admin-reparse-account-info.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"admin-reparse-account-info.js","sourceRoot":"","sources":["../../src/tools/admin-reparse-account-info.ts"],"names":[],"mappings":";;;;;;AAMA,8CAAoB;AAEpB,0DAAmD;AAEnD,MAAa,2BAA4B,SAAQ,yBAGhD;IACiB,IAAI,GAAG,4BAA4B,CAAC;IACjC,MAAM,GAAG,aAAC,CAAC,MAAM,CAAC;QACnC,SAAS,EAAE,aAAC,CAAC,MAAM,EAAE;KACtB,CAAC,CAAC;IAEa,KAAK,CAAC,OAAO,CAAC,EAC5B,KAAK,EACL,IAAI,GAIL;QACC,OAAO,MAAM,KAAK,CAAC,QAAQ,CAAC,kBAAkB,CAAC,IAAI,CAAC,CAAC;IACvD,CAAC;IAEe,OAAO;QACrB,OAAO;YACL,IAAI,EAAE,IAAI,CAAC,IAAI;YACf,WAAW,EACT,0HAA0H;YAC5H,WAAW,EAAE;gBACX,IAAI,EAAE,QAAQ;gBACd,UAAU,EAAE;oBACV,SAAS,EAAE;wBACT,IAAI,EAAE,QAAQ;wBACd,WAAW,EAAE,gCAAgC;qBAC9C;iBACF;gBACD,QAAQ,EAAE,CAAC,WAAW,CAAC;aACxB;SACF,CAAC;IACJ,CAAC;CACF;AApCD,kEAoCC"}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@linkedapi/mcp",
|
|
3
|
-
"version": "2.1.
|
|
3
|
+
"version": "2.1.2",
|
|
4
4
|
"description": "MCP server that lets AI assistants control LinkedIn accounts and retrieve real-time data.",
|
|
5
5
|
"main": "dist/index.js",
|
|
6
6
|
"bin": {
|
|
@@ -17,7 +17,7 @@
|
|
|
17
17
|
"clean": "rm -rf dist",
|
|
18
18
|
"typecheck": "tsc --noEmit",
|
|
19
19
|
"lint": "eslint src --fix",
|
|
20
|
-
"format": "prettier --write \"src/**/*.ts\"",
|
|
20
|
+
"format": "prettier --write --log-level warn \"src/**/*.ts\"",
|
|
21
21
|
"prepublishOnly": "npm run clean && npm run build",
|
|
22
22
|
"prepare": "husky"
|
|
23
23
|
},
|
package/src/linked-api-tools.ts
CHANGED
|
@@ -1,13 +1,20 @@
|
|
|
1
1
|
import LinkedApi from '@linkedapi/node';
|
|
2
2
|
import { Tool } from '@modelcontextprotocol/sdk/types.js';
|
|
3
3
|
|
|
4
|
+
import { AdminCancelConnectionSessionTool } from './tools/admin-cancel-connection-session.js';
|
|
4
5
|
import { AdminConnectAccountTool } from './tools/admin-connect-account.js';
|
|
6
|
+
import { AdminCreateReconnectionSessionTool } from './tools/admin-create-reconnection-session.js';
|
|
7
|
+
import { AdminDeleteLimitsTool } from './tools/admin-delete-limits.js';
|
|
5
8
|
import { AdminDisconnectAccountTool } from './tools/admin-disconnect-account.js';
|
|
6
9
|
import { AdminGetAccountsTool } from './tools/admin-get-accounts.js';
|
|
10
|
+
import { AdminGetConnectionSessionTool } from './tools/admin-get-connection-session.js';
|
|
11
|
+
import { AdminGetLimitsDefaultsTool } from './tools/admin-get-limits-defaults.js';
|
|
7
12
|
import { AdminGetLimitsUsageTool } from './tools/admin-get-limits-usage.js';
|
|
13
|
+
import { AdminGetLimitsTool } from './tools/admin-get-limits.js';
|
|
8
14
|
import { AdminGetSeatsTool } from './tools/admin-get-seats.js';
|
|
9
15
|
import { AdminGetSubscriptionStatusTool } from './tools/admin-get-subscription-status.js';
|
|
10
16
|
import { AdminRegenerateTokenTool } from './tools/admin-regenerate-token.js';
|
|
17
|
+
import { AdminReparseAccountInfoTool } from './tools/admin-reparse-account-info.js';
|
|
11
18
|
import { AdminResetLimitsTool } from './tools/admin-reset-limits.js';
|
|
12
19
|
import { AdminSetLimitsTool } from './tools/admin-set-limits.js';
|
|
13
20
|
import { AdminSetSeatsTool } from './tools/admin-set-seats.js';
|
|
@@ -99,11 +106,18 @@ export class LinkedApiTools {
|
|
|
99
106
|
new AdminGetSeatsTool(),
|
|
100
107
|
new AdminSetSeatsTool(),
|
|
101
108
|
new AdminGetAccountsTool(),
|
|
109
|
+
new AdminReparseAccountInfoTool(),
|
|
110
|
+
new AdminCreateReconnectionSessionTool(),
|
|
102
111
|
new AdminConnectAccountTool(),
|
|
112
|
+
new AdminGetConnectionSessionTool(),
|
|
113
|
+
new AdminCancelConnectionSessionTool(),
|
|
103
114
|
new AdminDisconnectAccountTool(),
|
|
104
115
|
new AdminRegenerateTokenTool(),
|
|
116
|
+
new AdminGetLimitsDefaultsTool(),
|
|
117
|
+
new AdminGetLimitsTool(),
|
|
105
118
|
new AdminGetLimitsUsageTool(),
|
|
106
119
|
new AdminSetLimitsTool(),
|
|
120
|
+
new AdminDeleteLimitsTool(),
|
|
107
121
|
new AdminResetLimitsTool(),
|
|
108
122
|
];
|
|
109
123
|
}
|
|
@@ -0,0 +1,42 @@
|
|
|
1
|
+
import { LinkedApiAdmin, TCancelConnectionSessionParams } from '@linkedapi/node';
|
|
2
|
+
import { Tool } from '@modelcontextprotocol/sdk/types.js';
|
|
3
|
+
import z from 'zod';
|
|
4
|
+
|
|
5
|
+
import { AdminTool } from '../utils/admin-tool.js';
|
|
6
|
+
|
|
7
|
+
export class AdminCancelConnectionSessionTool extends AdminTool<
|
|
8
|
+
TCancelConnectionSessionParams,
|
|
9
|
+
void
|
|
10
|
+
> {
|
|
11
|
+
public readonly name = 'admin_cancel_connection_session';
|
|
12
|
+
protected readonly schema = z.object({
|
|
13
|
+
sessionId: z.string(),
|
|
14
|
+
});
|
|
15
|
+
|
|
16
|
+
public override async execute({
|
|
17
|
+
admin,
|
|
18
|
+
args,
|
|
19
|
+
}: {
|
|
20
|
+
admin: LinkedApiAdmin;
|
|
21
|
+
args: TCancelConnectionSessionParams;
|
|
22
|
+
}): Promise<void> {
|
|
23
|
+
await admin.accounts.cancelConnectionSession(args);
|
|
24
|
+
}
|
|
25
|
+
|
|
26
|
+
public override getTool(): Tool {
|
|
27
|
+
return {
|
|
28
|
+
name: this.name,
|
|
29
|
+
description: 'Cancel a pending connection or reconnection session.',
|
|
30
|
+
inputSchema: {
|
|
31
|
+
type: 'object',
|
|
32
|
+
properties: {
|
|
33
|
+
sessionId: {
|
|
34
|
+
type: 'string',
|
|
35
|
+
description: 'Connection session UUID',
|
|
36
|
+
},
|
|
37
|
+
},
|
|
38
|
+
required: ['sessionId'],
|
|
39
|
+
},
|
|
40
|
+
};
|
|
41
|
+
}
|
|
42
|
+
}
|
|
@@ -0,0 +1,47 @@
|
|
|
1
|
+
import {
|
|
2
|
+
LinkedApiAdmin,
|
|
3
|
+
TCreateReconnectionSessionParams,
|
|
4
|
+
TCreateReconnectionSessionResult,
|
|
5
|
+
} from '@linkedapi/node';
|
|
6
|
+
import { Tool } from '@modelcontextprotocol/sdk/types.js';
|
|
7
|
+
import z from 'zod';
|
|
8
|
+
|
|
9
|
+
import { AdminTool } from '../utils/admin-tool.js';
|
|
10
|
+
|
|
11
|
+
export class AdminCreateReconnectionSessionTool extends AdminTool<
|
|
12
|
+
TCreateReconnectionSessionParams,
|
|
13
|
+
TCreateReconnectionSessionResult
|
|
14
|
+
> {
|
|
15
|
+
public readonly name = 'admin_create_reconnection_session';
|
|
16
|
+
protected readonly schema = z.object({
|
|
17
|
+
accountId: z.string(),
|
|
18
|
+
});
|
|
19
|
+
|
|
20
|
+
public override async execute({
|
|
21
|
+
admin,
|
|
22
|
+
args,
|
|
23
|
+
}: {
|
|
24
|
+
admin: LinkedApiAdmin;
|
|
25
|
+
args: TCreateReconnectionSessionParams;
|
|
26
|
+
}): Promise<TCreateReconnectionSessionResult> {
|
|
27
|
+
return await admin.accounts.createReconnectionSession(args);
|
|
28
|
+
}
|
|
29
|
+
|
|
30
|
+
public override getTool(): Tool {
|
|
31
|
+
return {
|
|
32
|
+
name: this.name,
|
|
33
|
+
description:
|
|
34
|
+
'Create a reconnection session for an account with status reconnection_required. Returns reconnectionSessionId and reconnectionLink.',
|
|
35
|
+
inputSchema: {
|
|
36
|
+
type: 'object',
|
|
37
|
+
properties: {
|
|
38
|
+
accountId: {
|
|
39
|
+
type: 'string',
|
|
40
|
+
description: 'UUID of the account to reconnect',
|
|
41
|
+
},
|
|
42
|
+
},
|
|
43
|
+
required: ['accountId'],
|
|
44
|
+
},
|
|
45
|
+
};
|
|
46
|
+
}
|
|
47
|
+
}
|
|
@@ -0,0 +1,65 @@
|
|
|
1
|
+
import { LinkedApiAdmin, TDeleteLimitsParams } from '@linkedapi/node';
|
|
2
|
+
import { Tool } from '@modelcontextprotocol/sdk/types.js';
|
|
3
|
+
import z from 'zod';
|
|
4
|
+
|
|
5
|
+
import { AdminTool } from '../utils/admin-tool.js';
|
|
6
|
+
|
|
7
|
+
export class AdminDeleteLimitsTool extends AdminTool<TDeleteLimitsParams, void> {
|
|
8
|
+
public readonly name = 'admin_delete_limits';
|
|
9
|
+
protected readonly schema = z.object({
|
|
10
|
+
accountId: z.string(),
|
|
11
|
+
limits: z.array(
|
|
12
|
+
z.object({
|
|
13
|
+
category: z.string(),
|
|
14
|
+
period: z.enum(['daily', 'weekly', 'monthly']),
|
|
15
|
+
}),
|
|
16
|
+
),
|
|
17
|
+
});
|
|
18
|
+
|
|
19
|
+
public override async execute({
|
|
20
|
+
admin,
|
|
21
|
+
args,
|
|
22
|
+
}: {
|
|
23
|
+
admin: LinkedApiAdmin;
|
|
24
|
+
args: TDeleteLimitsParams;
|
|
25
|
+
}): Promise<void> {
|
|
26
|
+
await admin.limits.delete(args);
|
|
27
|
+
}
|
|
28
|
+
|
|
29
|
+
public override getTool(): Tool {
|
|
30
|
+
return {
|
|
31
|
+
name: this.name,
|
|
32
|
+
description:
|
|
33
|
+
'Delete specific rate limits for an account. Deleted limits fall back to system defaults.',
|
|
34
|
+
inputSchema: {
|
|
35
|
+
type: 'object',
|
|
36
|
+
properties: {
|
|
37
|
+
accountId: {
|
|
38
|
+
type: 'string',
|
|
39
|
+
description: 'Account UUID',
|
|
40
|
+
},
|
|
41
|
+
limits: {
|
|
42
|
+
type: 'array',
|
|
43
|
+
description: 'Array of limit keys to delete',
|
|
44
|
+
items: {
|
|
45
|
+
type: 'object',
|
|
46
|
+
properties: {
|
|
47
|
+
category: {
|
|
48
|
+
type: 'string',
|
|
49
|
+
description: 'Limit category',
|
|
50
|
+
},
|
|
51
|
+
period: {
|
|
52
|
+
type: 'string',
|
|
53
|
+
enum: ['daily', 'weekly', 'monthly'],
|
|
54
|
+
description: 'Limit period',
|
|
55
|
+
},
|
|
56
|
+
},
|
|
57
|
+
required: ['category', 'period'],
|
|
58
|
+
},
|
|
59
|
+
},
|
|
60
|
+
},
|
|
61
|
+
required: ['accountId', 'limits'],
|
|
62
|
+
},
|
|
63
|
+
};
|
|
64
|
+
}
|
|
65
|
+
}
|
|
@@ -0,0 +1,46 @@
|
|
|
1
|
+
import {
|
|
2
|
+
LinkedApiAdmin,
|
|
3
|
+
TConnectionSessionResult,
|
|
4
|
+
TGetConnectionSessionParams,
|
|
5
|
+
} from '@linkedapi/node';
|
|
6
|
+
import { Tool } from '@modelcontextprotocol/sdk/types.js';
|
|
7
|
+
import z from 'zod';
|
|
8
|
+
|
|
9
|
+
import { AdminTool } from '../utils/admin-tool.js';
|
|
10
|
+
|
|
11
|
+
export class AdminGetConnectionSessionTool extends AdminTool<
|
|
12
|
+
TGetConnectionSessionParams,
|
|
13
|
+
TConnectionSessionResult
|
|
14
|
+
> {
|
|
15
|
+
public readonly name = 'admin_get_connection_session';
|
|
16
|
+
protected readonly schema = z.object({
|
|
17
|
+
sessionId: z.string(),
|
|
18
|
+
});
|
|
19
|
+
|
|
20
|
+
public override async execute({
|
|
21
|
+
admin,
|
|
22
|
+
args,
|
|
23
|
+
}: {
|
|
24
|
+
admin: LinkedApiAdmin;
|
|
25
|
+
args: TGetConnectionSessionParams;
|
|
26
|
+
}): Promise<TConnectionSessionResult> {
|
|
27
|
+
return await admin.accounts.getConnectionSession(args);
|
|
28
|
+
}
|
|
29
|
+
|
|
30
|
+
public override getTool(): Tool {
|
|
31
|
+
return {
|
|
32
|
+
name: this.name,
|
|
33
|
+
description: 'Get connection or reconnection session status by session ID.',
|
|
34
|
+
inputSchema: {
|
|
35
|
+
type: 'object',
|
|
36
|
+
properties: {
|
|
37
|
+
sessionId: {
|
|
38
|
+
type: 'string',
|
|
39
|
+
description: 'Connection session UUID',
|
|
40
|
+
},
|
|
41
|
+
},
|
|
42
|
+
required: ['sessionId'],
|
|
43
|
+
},
|
|
44
|
+
};
|
|
45
|
+
}
|
|
46
|
+
}
|
|
@@ -0,0 +1,33 @@
|
|
|
1
|
+
import { LinkedApiAdmin, TLimit } from '@linkedapi/node';
|
|
2
|
+
import { Tool } from '@modelcontextprotocol/sdk/types.js';
|
|
3
|
+
import z from 'zod';
|
|
4
|
+
|
|
5
|
+
import { AdminTool } from '../utils/admin-tool.js';
|
|
6
|
+
|
|
7
|
+
export class AdminGetLimitsDefaultsTool extends AdminTool<
|
|
8
|
+
Record<string, never>,
|
|
9
|
+
{ limits: Array<TLimit> }
|
|
10
|
+
> {
|
|
11
|
+
public readonly name = 'admin_get_limits_defaults';
|
|
12
|
+
protected readonly schema = z.object({});
|
|
13
|
+
|
|
14
|
+
public override async execute({
|
|
15
|
+
admin,
|
|
16
|
+
}: {
|
|
17
|
+
admin: LinkedApiAdmin;
|
|
18
|
+
args: Record<string, never>;
|
|
19
|
+
}): Promise<{ limits: Array<TLimit> }> {
|
|
20
|
+
return await admin.limits.getDefaults();
|
|
21
|
+
}
|
|
22
|
+
|
|
23
|
+
public override getTool(): Tool {
|
|
24
|
+
return {
|
|
25
|
+
name: this.name,
|
|
26
|
+
description: 'Get system default rate limits.',
|
|
27
|
+
inputSchema: {
|
|
28
|
+
type: 'object',
|
|
29
|
+
properties: {},
|
|
30
|
+
},
|
|
31
|
+
};
|
|
32
|
+
}
|
|
33
|
+
}
|
|
@@ -0,0 +1,39 @@
|
|
|
1
|
+
import { LinkedApiAdmin, TGetLimitsParams, TLimit } from '@linkedapi/node';
|
|
2
|
+
import { Tool } from '@modelcontextprotocol/sdk/types.js';
|
|
3
|
+
import z from 'zod';
|
|
4
|
+
|
|
5
|
+
import { AdminTool } from '../utils/admin-tool.js';
|
|
6
|
+
|
|
7
|
+
export class AdminGetLimitsTool extends AdminTool<TGetLimitsParams, { limits: Array<TLimit> }> {
|
|
8
|
+
public readonly name = 'admin_get_limits';
|
|
9
|
+
protected readonly schema = z.object({
|
|
10
|
+
accountId: z.string(),
|
|
11
|
+
});
|
|
12
|
+
|
|
13
|
+
public override async execute({
|
|
14
|
+
admin,
|
|
15
|
+
args,
|
|
16
|
+
}: {
|
|
17
|
+
admin: LinkedApiAdmin;
|
|
18
|
+
args: TGetLimitsParams;
|
|
19
|
+
}): Promise<{ limits: Array<TLimit> }> {
|
|
20
|
+
return await admin.limits.get(args);
|
|
21
|
+
}
|
|
22
|
+
|
|
23
|
+
public override getTool(): Tool {
|
|
24
|
+
return {
|
|
25
|
+
name: this.name,
|
|
26
|
+
description: 'Get configured rate limits for an account.',
|
|
27
|
+
inputSchema: {
|
|
28
|
+
type: 'object',
|
|
29
|
+
properties: {
|
|
30
|
+
accountId: {
|
|
31
|
+
type: 'string',
|
|
32
|
+
description: 'Account UUID',
|
|
33
|
+
},
|
|
34
|
+
},
|
|
35
|
+
required: ['accountId'],
|
|
36
|
+
},
|
|
37
|
+
};
|
|
38
|
+
}
|
|
39
|
+
}
|
|
@@ -0,0 +1,47 @@
|
|
|
1
|
+
import {
|
|
2
|
+
LinkedApiAdmin,
|
|
3
|
+
TReparseAccountInfoParams,
|
|
4
|
+
TReparseAccountInfoResult,
|
|
5
|
+
} from '@linkedapi/node';
|
|
6
|
+
import { Tool } from '@modelcontextprotocol/sdk/types.js';
|
|
7
|
+
import z from 'zod';
|
|
8
|
+
|
|
9
|
+
import { AdminTool } from '../utils/admin-tool.js';
|
|
10
|
+
|
|
11
|
+
export class AdminReparseAccountInfoTool extends AdminTool<
|
|
12
|
+
TReparseAccountInfoParams,
|
|
13
|
+
TReparseAccountInfoResult
|
|
14
|
+
> {
|
|
15
|
+
public readonly name = 'admin_reparse_account_info';
|
|
16
|
+
protected readonly schema = z.object({
|
|
17
|
+
accountId: z.string(),
|
|
18
|
+
});
|
|
19
|
+
|
|
20
|
+
public override async execute({
|
|
21
|
+
admin,
|
|
22
|
+
args,
|
|
23
|
+
}: {
|
|
24
|
+
admin: LinkedApiAdmin;
|
|
25
|
+
args: TReparseAccountInfoParams;
|
|
26
|
+
}): Promise<TReparseAccountInfoResult> {
|
|
27
|
+
return await admin.accounts.reparseAccountInfo(args);
|
|
28
|
+
}
|
|
29
|
+
|
|
30
|
+
public override getTool(): Tool {
|
|
31
|
+
return {
|
|
32
|
+
name: this.name,
|
|
33
|
+
description:
|
|
34
|
+
'Refresh stored profile information for a connected account. Starts a background reparse workflow and returns workflowId.',
|
|
35
|
+
inputSchema: {
|
|
36
|
+
type: 'object',
|
|
37
|
+
properties: {
|
|
38
|
+
accountId: {
|
|
39
|
+
type: 'string',
|
|
40
|
+
description: 'UUID of the account to refresh',
|
|
41
|
+
},
|
|
42
|
+
},
|
|
43
|
+
required: ['accountId'],
|
|
44
|
+
},
|
|
45
|
+
};
|
|
46
|
+
}
|
|
47
|
+
}
|