@linkedapi/mcp 2.1.1 → 2.1.3
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.js +6 -6
- package/dist/linked-api-tools.js.map +1 -1
- package/dist/tools/get-inbox.d.ts +21 -0
- package/dist/tools/get-inbox.d.ts.map +1 -0
- package/dist/tools/get-inbox.js +50 -0
- package/dist/tools/get-inbox.js.map +1 -0
- package/dist/tools/get-workflow-result.d.ts +2 -0
- package/dist/tools/get-workflow-result.d.ts.map +1 -1
- package/dist/tools/nv-send-message.d.ts +2 -1
- package/dist/tools/nv-send-message.d.ts.map +1 -1
- package/dist/tools/nv-send-message.js +10 -5
- package/dist/tools/nv-send-message.js.map +1 -1
- package/dist/tools/nv-sync-inbox.d.ts +11 -0
- package/dist/tools/nv-sync-inbox.d.ts.map +1 -0
- package/dist/tools/nv-sync-inbox.js +24 -0
- package/dist/tools/nv-sync-inbox.js.map +1 -0
- package/dist/tools/send-message.d.ts +2 -1
- package/dist/tools/send-message.d.ts.map +1 -1
- package/dist/tools/send-message.js +9 -4
- package/dist/tools/send-message.js.map +1 -1
- package/dist/tools/sync-inbox.d.ts +11 -0
- package/dist/tools/sync-inbox.d.ts.map +1 -0
- package/dist/tools/sync-inbox.js +24 -0
- package/dist/tools/sync-inbox.js.map +1 -0
- package/package.json +2 -2
- package/src/linked-api-tools.ts +6 -6
- package/src/tools/get-inbox.ts +58 -0
- package/src/tools/nv-send-message.ts +12 -5
- package/src/tools/nv-sync-inbox.ts +24 -0
- package/src/tools/send-message.ts +10 -4
- package/src/tools/sync-inbox.ts +24 -0
- package/dist/tools/admin-cancel-subscription.d.ts +0 -14
- package/dist/tools/admin-cancel-subscription.d.ts.map +0 -1
- package/dist/tools/admin-cancel-subscription.js +0 -27
- package/dist/tools/admin-cancel-subscription.js.map +0 -1
- package/dist/tools/admin-get-billing-link.d.ts +0 -14
- package/dist/tools/admin-get-billing-link.d.ts.map +0 -1
- package/dist/tools/admin-get-billing-link.js +0 -27
- package/dist/tools/admin-get-billing-link.js.map +0 -1
- package/dist/tools/admin-get-subscription-pricing.d.ts +0 -18
- package/dist/tools/admin-get-subscription-pricing.d.ts.map +0 -1
- package/dist/tools/admin-get-subscription-pricing.js +0 -27
- package/dist/tools/admin-get-subscription-pricing.js.map +0 -1
- package/src/tools/admin-cancel-subscription.ts +0 -30
- package/src/tools/admin-get-billing-link.ts +0 -30
- package/src/tools/admin-get-subscription-pricing.ts +0 -33
package/dist/linked-api-tools.js
CHANGED
|
@@ -2,19 +2,16 @@
|
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
3
|
exports.LinkedApiTools = void 0;
|
|
4
4
|
const admin_cancel_connection_session_js_1 = require("./tools/admin-cancel-connection-session.js");
|
|
5
|
-
const admin_cancel_subscription_js_1 = require("./tools/admin-cancel-subscription.js");
|
|
6
5
|
const admin_connect_account_js_1 = require("./tools/admin-connect-account.js");
|
|
7
6
|
const admin_create_reconnection_session_js_1 = require("./tools/admin-create-reconnection-session.js");
|
|
8
7
|
const admin_delete_limits_js_1 = require("./tools/admin-delete-limits.js");
|
|
9
8
|
const admin_disconnect_account_js_1 = require("./tools/admin-disconnect-account.js");
|
|
10
9
|
const admin_get_accounts_js_1 = require("./tools/admin-get-accounts.js");
|
|
11
|
-
const admin_get_billing_link_js_1 = require("./tools/admin-get-billing-link.js");
|
|
12
10
|
const admin_get_connection_session_js_1 = require("./tools/admin-get-connection-session.js");
|
|
13
11
|
const admin_get_limits_defaults_js_1 = require("./tools/admin-get-limits-defaults.js");
|
|
14
12
|
const admin_get_limits_usage_js_1 = require("./tools/admin-get-limits-usage.js");
|
|
15
13
|
const admin_get_limits_js_1 = require("./tools/admin-get-limits.js");
|
|
16
14
|
const admin_get_seats_js_1 = require("./tools/admin-get-seats.js");
|
|
17
|
-
const admin_get_subscription_pricing_js_1 = require("./tools/admin-get-subscription-pricing.js");
|
|
18
15
|
const admin_get_subscription_status_js_1 = require("./tools/admin-get-subscription-status.js");
|
|
19
16
|
const admin_regenerate_token_js_1 = require("./tools/admin-regenerate-token.js");
|
|
20
17
|
const admin_reparse_account_info_js_1 = require("./tools/admin-reparse-account-info.js");
|
|
@@ -31,6 +28,7 @@ const fetch_person_js_1 = require("./tools/fetch-person.js");
|
|
|
31
28
|
const fetch_post_js_1 = require("./tools/fetch-post.js");
|
|
32
29
|
const get_api_usage_stats_js_1 = require("./tools/get-api-usage-stats.js");
|
|
33
30
|
const get_conversation_js_1 = require("./tools/get-conversation.js");
|
|
31
|
+
const get_inbox_js_1 = require("./tools/get-inbox.js");
|
|
34
32
|
const get_workflow_result_js_1 = require("./tools/get-workflow-result.js");
|
|
35
33
|
const nv_fetch_company_js_1 = require("./tools/nv-fetch-company.js");
|
|
36
34
|
const nv_fetch_person_js_1 = require("./tools/nv-fetch-person.js");
|
|
@@ -38,6 +36,7 @@ const nv_get_conversation_js_1 = require("./tools/nv-get-conversation.js");
|
|
|
38
36
|
const nv_search_companies_js_1 = require("./tools/nv-search-companies.js");
|
|
39
37
|
const nv_search_people_js_1 = require("./tools/nv-search-people.js");
|
|
40
38
|
const nv_send_message_js_1 = require("./tools/nv-send-message.js");
|
|
39
|
+
const nv_sync_inbox_js_1 = require("./tools/nv-sync-inbox.js");
|
|
41
40
|
const react_to_post_js_1 = require("./tools/react-to-post.js");
|
|
42
41
|
const remove_connection_js_1 = require("./tools/remove-connection.js");
|
|
43
42
|
const retrieve_connections_js_1 = require("./tools/retrieve-connections.js");
|
|
@@ -49,6 +48,7 @@ const search_jobs_js_1 = require("./tools/search-jobs.js");
|
|
|
49
48
|
const search_people_js_1 = require("./tools/search-people.js");
|
|
50
49
|
const send_connection_request_js_1 = require("./tools/send-connection-request.js");
|
|
51
50
|
const send_message_js_1 = require("./tools/send-message.js");
|
|
51
|
+
const sync_inbox_js_1 = require("./tools/sync-inbox.js");
|
|
52
52
|
const withdraw_connection_request_js_1 = require("./tools/withdraw-connection-request.js");
|
|
53
53
|
class LinkedApiTools {
|
|
54
54
|
tools;
|
|
@@ -58,6 +58,8 @@ class LinkedApiTools {
|
|
|
58
58
|
// Standard tools
|
|
59
59
|
new send_message_js_1.SendMessageTool(),
|
|
60
60
|
new get_conversation_js_1.GetConversationTool(),
|
|
61
|
+
new sync_inbox_js_1.SyncInboxTool(),
|
|
62
|
+
new get_inbox_js_1.GetInboxTool(),
|
|
61
63
|
new check_connection_status_js_1.CheckConnectionStatusTool(),
|
|
62
64
|
new retrieve_connections_js_1.RetrieveConnectionsTool(),
|
|
63
65
|
new send_connection_request_js_1.SendConnectionRequestTool(),
|
|
@@ -79,6 +81,7 @@ class LinkedApiTools {
|
|
|
79
81
|
// Sales Navigator tools
|
|
80
82
|
new nv_send_message_js_1.NvSendMessageTool(),
|
|
81
83
|
new nv_get_conversation_js_1.NvGetConversationTool(),
|
|
84
|
+
new nv_sync_inbox_js_1.NvSyncInboxTool(),
|
|
82
85
|
new nv_search_companies_js_1.NvSearchCompaniesTool(),
|
|
83
86
|
new nv_search_people_js_1.NvSearchPeopleTool(),
|
|
84
87
|
new nv_fetch_company_js_1.NvFetchCompanyTool(),
|
|
@@ -92,9 +95,6 @@ class LinkedApiTools {
|
|
|
92
95
|
new admin_get_subscription_status_js_1.AdminGetSubscriptionStatusTool(),
|
|
93
96
|
new admin_get_seats_js_1.AdminGetSeatsTool(),
|
|
94
97
|
new admin_set_seats_js_1.AdminSetSeatsTool(),
|
|
95
|
-
new admin_get_subscription_pricing_js_1.AdminGetSubscriptionPricingTool(),
|
|
96
|
-
new admin_get_billing_link_js_1.AdminGetBillingLinkTool(),
|
|
97
|
-
new admin_cancel_subscription_js_1.AdminCancelSubscriptionTool(),
|
|
98
98
|
new admin_get_accounts_js_1.AdminGetAccountsTool(),
|
|
99
99
|
new admin_reparse_account_info_js_1.AdminReparseAccountInfoTool(),
|
|
100
100
|
new admin_create_reconnection_session_js_1.AdminCreateReconnectionSessionTool(),
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"linked-api-tools.js","sourceRoot":"","sources":["../src/linked-api-tools.ts"],"names":[],"mappings":";;;AAGA,mGAA8F;AAC9F
|
|
1
|
+
{"version":3,"file":"linked-api-tools.js","sourceRoot":"","sources":["../src/linked-api-tools.ts"],"names":[],"mappings":";;;AAGA,mGAA8F;AAC9F,+EAA2E;AAC3E,uGAAkG;AAClG,2EAAuE;AACvE,qFAAiF;AACjF,yEAAqE;AACrE,6FAAwF;AACxF,uFAAkF;AAClF,iFAA4E;AAC5E,qEAAiE;AACjE,mEAA+D;AAC/D,+FAA0F;AAC1F,iFAA6E;AAC7E,yFAAoF;AACpF,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,uDAAoD;AACpD,2EAAuE;AACvE,qEAAiE;AACjE,mEAA+D;AAC/D,2EAAuE;AACvE,2EAAuE;AACvE,qEAAiE;AACjE,mEAA+D;AAC/D,+DAA2D;AAC3D,+DAA2D;AAC3D,uEAAoE;AACpE,6EAA0E;AAC1E,uFAAmF;AACnF,6EAA0E;AAC1E,6DAA0D;AAC1D,qEAAkE;AAClE,2DAAwD;AACxD,+DAA4D;AAC5D,mFAA+E;AAC/E,6DAA0D;AAC1D,yDAAsD;AACtD,2FAAuF;AAevF,MAAa,cAAc;IACT,KAAK,CAA0C;IAC/C,UAAU,CAA6C;IAEvE;QACE,IAAI,CAAC,KAAK,GAAG;YACX,iBAAiB;YACjB,IAAI,iCAAe,EAAE;YACrB,IAAI,yCAAmB,EAAE;YACzB,IAAI,6BAAa,EAAE;YACnB,IAAI,2BAAY,EAAE;YAClB,IAAI,sDAAyB,EAAE;YAC/B,IAAI,iDAAuB,EAAE;YAC7B,IAAI,sDAAyB,EAAE;YAC/B,IAAI,8DAA6B,EAAE;YACnC,IAAI,0DAA2B,EAAE;YACjC,IAAI,2CAAoB,EAAE;YAC1B,IAAI,yCAAmB,EAAE;YACzB,IAAI,mCAAgB,EAAE;YACtB,IAAI,+BAAc,EAAE;YACpB,IAAI,mCAAgB,EAAE;YACtB,IAAI,iCAAe,EAAE;YACrB,IAAI,6BAAa,EAAE;YACnB,IAAI,2BAAY,EAAE;YAClB,IAAI,kCAAe,EAAE;YACrB,IAAI,sCAAiB,EAAE;YACvB,IAAI,+BAAc,EAAE;YACpB,IAAI,iCAAe,EAAE;YACrB,IAAI,iDAAuB,EAAE;YAC7B,wBAAwB;YACxB,IAAI,sCAAiB,EAAE;YACvB,IAAI,8CAAqB,EAAE;YAC3B,IAAI,kCAAe,EAAE;YACrB,IAAI,8CAAqB,EAAE;YAC3B,IAAI,wCAAkB,EAAE;YACxB,IAAI,wCAAkB,EAAE;YACxB,IAAI,sCAAiB,EAAE;YACvB,cAAc;YACd,IAAI,sDAAyB,EAAE;YAC/B,IAAI,8CAAqB,EAAE;YAC3B,IAAI,wCAAe,EAAE;SACtB,CAAC;QAEF,IAAI,CAAC,UAAU,GAAG;YAChB,IAAI,iEAA8B,EAAE;YACpC,IAAI,sCAAiB,EAAE;YACvB,IAAI,sCAAiB,EAAE;YACvB,IAAI,4CAAoB,EAAE;YAC1B,IAAI,2DAA2B,EAAE;YACjC,IAAI,yEAAkC,EAAE;YACxC,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;AAvED,wCAuEC"}
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
import LinkedApi, { TInboxPollRequest, TInboxPollResult, TMappedResponse } from '@linkedapi/node';
|
|
2
|
+
import { Tool } from '@modelcontextprotocol/sdk/types.js';
|
|
3
|
+
import z from 'zod';
|
|
4
|
+
import { LinkedApiTool } from '../utils/linked-api-tool.js';
|
|
5
|
+
export declare class GetInboxTool extends LinkedApiTool<TInboxPollRequest, TInboxPollResult> {
|
|
6
|
+
readonly name = "get_inbox";
|
|
7
|
+
protected readonly schema: z.ZodObject<{
|
|
8
|
+
since: z.ZodOptional<z.ZodString>;
|
|
9
|
+
type: z.ZodOptional<z.ZodEnum<{
|
|
10
|
+
st: "st";
|
|
11
|
+
nv: "nv";
|
|
12
|
+
}>>;
|
|
13
|
+
threadId: z.ZodOptional<z.ZodString>;
|
|
14
|
+
}, z.core.$strip>;
|
|
15
|
+
execute({ linkedapi, args: { since, type, threadId }, }: {
|
|
16
|
+
linkedapi: LinkedApi;
|
|
17
|
+
args: TInboxPollRequest;
|
|
18
|
+
}): Promise<TMappedResponse<TInboxPollResult>>;
|
|
19
|
+
getTool(): Tool;
|
|
20
|
+
}
|
|
21
|
+
//# sourceMappingURL=get-inbox.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"get-inbox.d.ts","sourceRoot":"","sources":["../../src/tools/get-inbox.ts"],"names":[],"mappings":"AAAA,OAAO,SAAS,EAAE,EAAE,iBAAiB,EAAE,gBAAgB,EAAE,eAAe,EAAE,MAAM,iBAAiB,CAAC;AAClG,OAAO,EAAE,IAAI,EAAE,MAAM,oCAAoC,CAAC;AAC1D,OAAO,CAAC,MAAM,KAAK,CAAC;AAEpB,OAAO,EAAE,aAAa,EAAE,MAAM,6BAA6B,CAAC;AAE5D,qBAAa,YAAa,SAAQ,aAAa,CAAC,iBAAiB,EAAE,gBAAgB,CAAC;IAClF,SAAgB,IAAI,eAAe;IACnC,SAAS,CAAC,QAAQ,CAAC,MAAM;;;;;;;sBAItB;IAEmB,OAAO,CAAC,EAC5B,SAAS,EACT,IAAI,EAAE,EAAE,KAAK,EAAE,IAAI,EAAE,QAAQ,EAAE,GAChC,EAAE;QACD,SAAS,EAAE,SAAS,CAAC;QACrB,IAAI,EAAE,iBAAiB,CAAC;KACzB,GAAG,OAAO,CAAC,eAAe,CAAC,gBAAgB,CAAC,CAAC;IAQ9B,OAAO,IAAI,IAAI;CA6BhC"}
|
|
@@ -0,0 +1,50 @@
|
|
|
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.GetInboxTool = void 0;
|
|
7
|
+
const zod_1 = __importDefault(require("zod"));
|
|
8
|
+
const linked_api_tool_js_1 = require("../utils/linked-api-tool.js");
|
|
9
|
+
class GetInboxTool extends linked_api_tool_js_1.LinkedApiTool {
|
|
10
|
+
name = 'get_inbox';
|
|
11
|
+
schema = zod_1.default.object({
|
|
12
|
+
since: zod_1.default.string().optional(),
|
|
13
|
+
type: zod_1.default.enum(['st', 'nv']).optional(),
|
|
14
|
+
threadId: zod_1.default.string().optional(),
|
|
15
|
+
});
|
|
16
|
+
async execute({ linkedapi, args: { since, type, threadId }, }) {
|
|
17
|
+
return linkedapi.pollInbox({
|
|
18
|
+
since,
|
|
19
|
+
type,
|
|
20
|
+
threadId,
|
|
21
|
+
});
|
|
22
|
+
}
|
|
23
|
+
getTool() {
|
|
24
|
+
return {
|
|
25
|
+
name: this.name,
|
|
26
|
+
description: 'Get messages from the monitored inbox across all conversations (standard and Sales Navigator), newest first. Requires inbox monitoring to be enabled once with sync_inbox (or nv_sync_inbox for Sales Navigator).',
|
|
27
|
+
inputSchema: {
|
|
28
|
+
type: 'object',
|
|
29
|
+
properties: {
|
|
30
|
+
since: {
|
|
31
|
+
type: 'string',
|
|
32
|
+
description: "Optional ISO 8601 timestamp to only retrieve messages after this date (e.g., '2024-01-15T10:30:00Z'). If not provided, all captured messages are returned.",
|
|
33
|
+
},
|
|
34
|
+
type: {
|
|
35
|
+
type: 'string',
|
|
36
|
+
enum: ['st', 'nv'],
|
|
37
|
+
description: 'Optional inbox type filter: "st" for standard messages, "nv" for Sales Navigator messages. If omitted, both are returned.',
|
|
38
|
+
},
|
|
39
|
+
threadId: {
|
|
40
|
+
type: 'string',
|
|
41
|
+
description: 'Optional conversation thread identifier to restrict the result to a single thread.',
|
|
42
|
+
},
|
|
43
|
+
},
|
|
44
|
+
required: [],
|
|
45
|
+
},
|
|
46
|
+
};
|
|
47
|
+
}
|
|
48
|
+
}
|
|
49
|
+
exports.GetInboxTool = GetInboxTool;
|
|
50
|
+
//# sourceMappingURL=get-inbox.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"get-inbox.js","sourceRoot":"","sources":["../../src/tools/get-inbox.ts"],"names":[],"mappings":";;;;;;AAEA,8CAAoB;AAEpB,oEAA4D;AAE5D,MAAa,YAAa,SAAQ,kCAAkD;IAClE,IAAI,GAAG,WAAW,CAAC;IAChB,MAAM,GAAG,aAAC,CAAC,MAAM,CAAC;QACnC,KAAK,EAAE,aAAC,CAAC,MAAM,EAAE,CAAC,QAAQ,EAAE;QAC5B,IAAI,EAAE,aAAC,CAAC,IAAI,CAAC,CAAC,IAAI,EAAE,IAAI,CAAC,CAAC,CAAC,QAAQ,EAAE;QACrC,QAAQ,EAAE,aAAC,CAAC,MAAM,EAAE,CAAC,QAAQ,EAAE;KAChC,CAAC,CAAC;IAEa,KAAK,CAAC,OAAO,CAAC,EAC5B,SAAS,EACT,IAAI,EAAE,EAAE,KAAK,EAAE,IAAI,EAAE,QAAQ,EAAE,GAIhC;QACC,OAAO,SAAS,CAAC,SAAS,CAAC;YACzB,KAAK;YACL,IAAI;YACJ,QAAQ;SACT,CAAC,CAAC;IACL,CAAC;IAEe,OAAO;QACrB,OAAO;YACL,IAAI,EAAE,IAAI,CAAC,IAAI;YACf,WAAW,EACT,mNAAmN;YACrN,WAAW,EAAE;gBACX,IAAI,EAAE,QAAQ;gBACd,UAAU,EAAE;oBACV,KAAK,EAAE;wBACL,IAAI,EAAE,QAAQ;wBACd,WAAW,EACT,4JAA4J;qBAC/J;oBACD,IAAI,EAAE;wBACJ,IAAI,EAAE,QAAQ;wBACd,IAAI,EAAE,CAAC,IAAI,EAAE,IAAI,CAAC;wBAClB,WAAW,EACT,2HAA2H;qBAC9H;oBACD,QAAQ,EAAE;wBACR,IAAI,EAAE,QAAQ;wBACd,WAAW,EACT,oFAAoF;qBACvF;iBACF;gBACD,QAAQ,EAAE,EAAE;aACb;SACF,CAAC;IACJ,CAAC;CACF;AAnDD,oCAmDC"}
|
|
@@ -16,6 +16,7 @@ export declare class GetWorkflowResultTool extends LinkedApiTool<IGetWorkflowRes
|
|
|
16
16
|
customWorkflow: "customWorkflow";
|
|
17
17
|
sendMessage: "sendMessage";
|
|
18
18
|
syncConversation: "syncConversation";
|
|
19
|
+
syncInbox: "syncInbox";
|
|
19
20
|
checkConnectionStatus: "checkConnectionStatus";
|
|
20
21
|
sendConnectionRequest: "sendConnectionRequest";
|
|
21
22
|
withdrawConnectionRequest: "withdrawConnectionRequest";
|
|
@@ -36,6 +37,7 @@ export declare class GetWorkflowResultTool extends LinkedApiTool<IGetWorkflowRes
|
|
|
36
37
|
retrievePerformance: "retrievePerformance";
|
|
37
38
|
nvSendMessage: "nvSendMessage";
|
|
38
39
|
nvSyncConversation: "nvSyncConversation";
|
|
40
|
+
nvSyncInbox: "nvSyncInbox";
|
|
39
41
|
nvSearchCompanies: "nvSearchCompanies";
|
|
40
42
|
nvSearchPeople: "nvSearchPeople";
|
|
41
43
|
nvFetchCompany: "nvFetchCompany";
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"get-workflow-result.d.ts","sourceRoot":"","sources":["../../src/tools/get-workflow-result.ts"],"names":[],"mappings":"AAAA,OAAO,SAAS,EAAE,EAGhB,eAAe,EAGhB,MAAM,iBAAiB,CAAC;AACzB,OAAO,EAAE,IAAI,EAAE,MAAM,oCAAoC,CAAC;AAC1D,OAAO,CAAC,MAAM,KAAK,CAAC;AAEpB,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,yCAAyC,CAAC;AAE5E,OAAO,EAAE,aAAa,EAAE,MAAM,6BAA6B,CAAC;AAK5D,UAAU,wBAAwB;IAChC,UAAU,EAAE,MAAM,CAAC;IACnB,aAAa,EAAE,MAAM,CAAC;IACtB,WAAW,CAAC,EAAE,MAAM,CAAC;CACtB;AAED,qBAAa,qBAAsB,SAAQ,aAAa,CAAC,wBAAwB,EAAE,OAAO,CAAC;IACzF,SAAgB,IAAI,yBAAyB;IAC7C,SAAS,CAAC,QAAQ,CAAC,MAAM
|
|
1
|
+
{"version":3,"file":"get-workflow-result.d.ts","sourceRoot":"","sources":["../../src/tools/get-workflow-result.ts"],"names":[],"mappings":"AAAA,OAAO,SAAS,EAAE,EAGhB,eAAe,EAGhB,MAAM,iBAAiB,CAAC;AACzB,OAAO,EAAE,IAAI,EAAE,MAAM,oCAAoC,CAAC;AAC1D,OAAO,CAAC,MAAM,KAAK,CAAC;AAEpB,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,yCAAyC,CAAC;AAE5E,OAAO,EAAE,aAAa,EAAE,MAAM,6BAA6B,CAAC;AAK5D,UAAU,wBAAwB;IAChC,UAAU,EAAE,MAAM,CAAC;IACnB,aAAa,EAAE,MAAM,CAAC;IACtB,WAAW,CAAC,EAAE,MAAM,CAAC;CACtB;AAED,qBAAa,qBAAsB,SAAQ,aAAa,CAAC,wBAAwB,EAAE,OAAO,CAAC;IACzF,SAAgB,IAAI,yBAAyB;IAC7C,SAAS,CAAC,QAAQ,CAAC,MAAM;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;sBAItB;IAEmB,OAAO,CAAC,EAC5B,SAAS,EACT,IAAI,EAAE,EAAE,UAAU,EAAE,aAAa,EAAE,WAAW,EAAE,EAChD,SAAS,GACV,EAAE;QACD,SAAS,EAAE,SAAS,CAAC;QACrB,IAAI,EAAE,wBAAwB,CAAC;QAC/B,SAAS,EAAE,MAAM,CAAC;KACnB,GAAG,OAAO,CAAC,eAAe,CAAC,OAAO,CAAC,GAAG,YAAY,CAAC;IA4BpC,OAAO,IAAI,IAAI;CA2BhC"}
|
|
@@ -6,9 +6,10 @@ export declare class NvSendMessageTool extends OperationTool<TNvSendMessageParam
|
|
|
6
6
|
readonly name = "nv_send_message";
|
|
7
7
|
readonly operationName: "nvSendMessage";
|
|
8
8
|
protected readonly schema: z.ZodObject<{
|
|
9
|
-
personUrl: z.ZodString
|
|
9
|
+
personUrl: z.ZodOptional<z.ZodString>;
|
|
10
10
|
text: z.ZodString;
|
|
11
11
|
subject: z.ZodOptional<z.ZodString>;
|
|
12
|
+
threadId: z.ZodOptional<z.ZodString>;
|
|
12
13
|
}, z.core.$strip>;
|
|
13
14
|
getTool(): Tool;
|
|
14
15
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"nv-send-message.d.ts","sourceRoot":"","sources":["../../src/tools/nv-send-message.ts"],"names":[],"mappings":"AAAA,OAAO,EAAkB,oBAAoB,EAAE,MAAM,iBAAiB,CAAC;AACvE,OAAO,EAAE,IAAI,EAAE,MAAM,oCAAoC,CAAC;AAC1D,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAExB,OAAO,EAAE,aAAa,EAAE,MAAM,6BAA6B,CAAC;AAE5D,qBAAa,iBAAkB,SAAQ,aAAa,CAAC,oBAAoB,EAAE,OAAO,CAAC;IACjF,SAAyB,IAAI,qBAAqB;IAClD,SAAyB,aAAa,kBAAgC;IACtE,mBAA4B,MAAM
|
|
1
|
+
{"version":3,"file":"nv-send-message.d.ts","sourceRoot":"","sources":["../../src/tools/nv-send-message.ts"],"names":[],"mappings":"AAAA,OAAO,EAAkB,oBAAoB,EAAE,MAAM,iBAAiB,CAAC;AACvE,OAAO,EAAE,IAAI,EAAE,MAAM,oCAAoC,CAAC;AAC1D,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAExB,OAAO,EAAE,aAAa,EAAE,MAAM,6BAA6B,CAAC;AAE5D,qBAAa,iBAAkB,SAAQ,aAAa,CAAC,oBAAoB,EAAE,OAAO,CAAC;IACjF,SAAyB,IAAI,qBAAqB;IAClD,SAAyB,aAAa,kBAAgC;IACtE,mBAA4B,MAAM;;;;;sBAK/B;IAEa,OAAO,IAAI,IAAI;CAgChC"}
|
|
@@ -8,20 +8,21 @@ class NvSendMessageTool extends linked_api_tool_js_1.OperationTool {
|
|
|
8
8
|
name = 'nv_send_message';
|
|
9
9
|
operationName = node_1.OPERATION_NAME.nvSendMessage;
|
|
10
10
|
schema = zod_1.z.object({
|
|
11
|
-
personUrl: zod_1.z.string(),
|
|
11
|
+
personUrl: zod_1.z.string().optional(),
|
|
12
12
|
text: zod_1.z.string().min(1),
|
|
13
13
|
subject: zod_1.z.string().optional(),
|
|
14
|
+
threadId: zod_1.z.string().optional(),
|
|
14
15
|
});
|
|
15
16
|
getTool() {
|
|
16
17
|
return {
|
|
17
18
|
name: this.name,
|
|
18
|
-
description: 'Allows you to send a message to a person in Sales Navigator (nv.sendMessage action). If this workflow is still running, do not retry this tool; retrying can send duplicate Sales Navigator messages to the same person.',
|
|
19
|
+
description: 'Allows you to send a message to a person in Sales Navigator (nv.sendMessage action). Provide either personUrl or threadId (threadId replies into an existing conversation thread and takes precedence). If this workflow is still running, do not retry this tool; retrying can send duplicate Sales Navigator messages to the same person.',
|
|
19
20
|
inputSchema: {
|
|
20
21
|
type: 'object',
|
|
21
22
|
properties: {
|
|
22
23
|
personUrl: {
|
|
23
24
|
type: 'string',
|
|
24
|
-
description: "LinkedIn URL of the person you want to send a message to (e.g., 'https://www.linkedin.com/in/john-doe')",
|
|
25
|
+
description: "LinkedIn URL of the person you want to send a message to (e.g., 'https://www.linkedin.com/in/john-doe'). Optional if threadId is provided.",
|
|
25
26
|
},
|
|
26
27
|
text: {
|
|
27
28
|
type: 'string',
|
|
@@ -29,10 +30,14 @@ class NvSendMessageTool extends linked_api_tool_js_1.OperationTool {
|
|
|
29
30
|
},
|
|
30
31
|
subject: {
|
|
31
32
|
type: 'string',
|
|
32
|
-
description: 'Subject line, must be up to 80 characters.',
|
|
33
|
+
description: 'Subject line, must be up to 80 characters. Required when starting a new conversation; ignored when replying into an existing thread via threadId.',
|
|
34
|
+
},
|
|
35
|
+
threadId: {
|
|
36
|
+
type: 'string',
|
|
37
|
+
description: 'Optional conversation thread identifier to reply into, as returned by get_inbox. Provide this instead of personUrl to reply directly into a known thread.',
|
|
33
38
|
},
|
|
34
39
|
},
|
|
35
|
-
required: ['
|
|
40
|
+
required: ['text'],
|
|
36
41
|
},
|
|
37
42
|
};
|
|
38
43
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"nv-send-message.js","sourceRoot":"","sources":["../../src/tools/nv-send-message.ts"],"names":[],"mappings":";;;AAAA,0CAAuE;AAEvE,6BAAwB;AAExB,oEAA4D;AAE5D,MAAa,iBAAkB,SAAQ,kCAA4C;IACxD,IAAI,GAAG,iBAAiB,CAAC;IACzB,aAAa,GAAG,qBAAc,CAAC,aAAa,CAAC;IAC1C,MAAM,GAAG,OAAC,CAAC,MAAM,CAAC;QAC5C,SAAS,EAAE,OAAC,CAAC,MAAM,EAAE;
|
|
1
|
+
{"version":3,"file":"nv-send-message.js","sourceRoot":"","sources":["../../src/tools/nv-send-message.ts"],"names":[],"mappings":";;;AAAA,0CAAuE;AAEvE,6BAAwB;AAExB,oEAA4D;AAE5D,MAAa,iBAAkB,SAAQ,kCAA4C;IACxD,IAAI,GAAG,iBAAiB,CAAC;IACzB,aAAa,GAAG,qBAAc,CAAC,aAAa,CAAC;IAC1C,MAAM,GAAG,OAAC,CAAC,MAAM,CAAC;QAC5C,SAAS,EAAE,OAAC,CAAC,MAAM,EAAE,CAAC,QAAQ,EAAE;QAChC,IAAI,EAAE,OAAC,CAAC,MAAM,EAAE,CAAC,GAAG,CAAC,CAAC,CAAC;QACvB,OAAO,EAAE,OAAC,CAAC,MAAM,EAAE,CAAC,QAAQ,EAAE;QAC9B,QAAQ,EAAE,OAAC,CAAC,MAAM,EAAE,CAAC,QAAQ,EAAE;KAChC,CAAC,CAAC;IAEa,OAAO;QACrB,OAAO;YACL,IAAI,EAAE,IAAI,CAAC,IAAI;YACf,WAAW,EACT,6UAA6U;YAC/U,WAAW,EAAE;gBACX,IAAI,EAAE,QAAQ;gBACd,UAAU,EAAE;oBACV,SAAS,EAAE;wBACT,IAAI,EAAE,QAAQ;wBACd,WAAW,EACT,4IAA4I;qBAC/I;oBACD,IAAI,EAAE;wBACJ,IAAI,EAAE,QAAQ;wBACd,WAAW,EAAE,kDAAkD;qBAChE;oBACD,OAAO,EAAE;wBACP,IAAI,EAAE,QAAQ;wBACd,WAAW,EACT,mJAAmJ;qBACtJ;oBACD,QAAQ,EAAE;wBACR,IAAI,EAAE,QAAQ;wBACd,WAAW,EACT,2JAA2J;qBAC9J;iBACF;gBACD,QAAQ,EAAE,CAAC,MAAM,CAAC;aACnB;SACF,CAAC;IACJ,CAAC;CACF;AA1CD,8CA0CC"}
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import { TNvSyncInboxParams } from '@linkedapi/node';
|
|
2
|
+
import { Tool } from '@modelcontextprotocol/sdk/types.js';
|
|
3
|
+
import { z } from 'zod';
|
|
4
|
+
import { OperationTool } from '../utils/linked-api-tool.js';
|
|
5
|
+
export declare class NvSyncInboxTool extends OperationTool<TNvSyncInboxParams, unknown> {
|
|
6
|
+
readonly name = "nv_sync_inbox";
|
|
7
|
+
readonly operationName: "nvSyncInbox";
|
|
8
|
+
protected readonly schema: z.ZodObject<{}, z.core.$strip>;
|
|
9
|
+
getTool(): Tool;
|
|
10
|
+
}
|
|
11
|
+
//# sourceMappingURL=nv-sync-inbox.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"nv-sync-inbox.d.ts","sourceRoot":"","sources":["../../src/tools/nv-sync-inbox.ts"],"names":[],"mappings":"AAAA,OAAO,EAAkB,kBAAkB,EAAE,MAAM,iBAAiB,CAAC;AACrE,OAAO,EAAE,IAAI,EAAE,MAAM,oCAAoC,CAAC;AAC1D,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAExB,OAAO,EAAE,aAAa,EAAE,MAAM,6BAA6B,CAAC;AAE5D,qBAAa,eAAgB,SAAQ,aAAa,CAAC,kBAAkB,EAAE,OAAO,CAAC;IAC7E,SAAyB,IAAI,mBAAmB;IAChD,SAAyB,aAAa,gBAA8B;IACpE,mBAA4B,MAAM,iCAAgB;IAElC,OAAO,IAAI,IAAI;CAYhC"}
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.NvSyncInboxTool = void 0;
|
|
4
|
+
const node_1 = require("@linkedapi/node");
|
|
5
|
+
const zod_1 = require("zod");
|
|
6
|
+
const linked_api_tool_js_1 = require("../utils/linked-api-tool.js");
|
|
7
|
+
class NvSyncInboxTool extends linked_api_tool_js_1.OperationTool {
|
|
8
|
+
name = 'nv_sync_inbox';
|
|
9
|
+
operationName = node_1.OPERATION_NAME.nvSyncInbox;
|
|
10
|
+
schema = zod_1.z.object({});
|
|
11
|
+
getTool() {
|
|
12
|
+
return {
|
|
13
|
+
name: this.name,
|
|
14
|
+
description: 'Enable whole-inbox monitoring in Sales Navigator so every incoming conversation can be polled with get_inbox (nv.syncInbox action). Run once per account; only messages that arrive after it is enabled are captured.',
|
|
15
|
+
inputSchema: {
|
|
16
|
+
type: 'object',
|
|
17
|
+
properties: {},
|
|
18
|
+
required: [],
|
|
19
|
+
},
|
|
20
|
+
};
|
|
21
|
+
}
|
|
22
|
+
}
|
|
23
|
+
exports.NvSyncInboxTool = NvSyncInboxTool;
|
|
24
|
+
//# sourceMappingURL=nv-sync-inbox.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"nv-sync-inbox.js","sourceRoot":"","sources":["../../src/tools/nv-sync-inbox.ts"],"names":[],"mappings":";;;AAAA,0CAAqE;AAErE,6BAAwB;AAExB,oEAA4D;AAE5D,MAAa,eAAgB,SAAQ,kCAA0C;IACpD,IAAI,GAAG,eAAe,CAAC;IACvB,aAAa,GAAG,qBAAc,CAAC,WAAW,CAAC;IACxC,MAAM,GAAG,OAAC,CAAC,MAAM,CAAC,EAAE,CAAC,CAAC;IAElC,OAAO;QACrB,OAAO;YACL,IAAI,EAAE,IAAI,CAAC,IAAI;YACf,WAAW,EACT,uNAAuN;YACzN,WAAW,EAAE;gBACX,IAAI,EAAE,QAAQ;gBACd,UAAU,EAAE,EAAE;gBACd,QAAQ,EAAE,EAAE;aACb;SACF,CAAC;IACJ,CAAC;CACF;AAjBD,0CAiBC"}
|
|
@@ -6,8 +6,9 @@ export declare class SendMessageTool extends OperationTool<TSendMessageParams, u
|
|
|
6
6
|
readonly name = "send_message";
|
|
7
7
|
readonly operationName: "sendMessage";
|
|
8
8
|
protected readonly schema: z.ZodObject<{
|
|
9
|
-
personUrl: z.ZodString
|
|
9
|
+
personUrl: z.ZodOptional<z.ZodString>;
|
|
10
10
|
text: z.ZodString;
|
|
11
|
+
threadId: z.ZodOptional<z.ZodString>;
|
|
11
12
|
}, z.core.$strip>;
|
|
12
13
|
getTool(): Tool;
|
|
13
14
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"send-message.d.ts","sourceRoot":"","sources":["../../src/tools/send-message.ts"],"names":[],"mappings":"AAAA,OAAO,EAAkB,kBAAkB,EAAE,MAAM,iBAAiB,CAAC;AACrE,OAAO,EAAE,IAAI,EAAE,MAAM,oCAAoC,CAAC;AAC1D,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAExB,OAAO,EAAE,aAAa,EAAE,MAAM,6BAA6B,CAAC;AAE5D,qBAAa,eAAgB,SAAQ,aAAa,CAAC,kBAAkB,EAAE,OAAO,CAAC;IAC7E,SAAyB,IAAI,kBAAkB;IAC/C,SAAyB,aAAa,gBAA8B;IACpE,mBAA4B,MAAM
|
|
1
|
+
{"version":3,"file":"send-message.d.ts","sourceRoot":"","sources":["../../src/tools/send-message.ts"],"names":[],"mappings":"AAAA,OAAO,EAAkB,kBAAkB,EAAE,MAAM,iBAAiB,CAAC;AACrE,OAAO,EAAE,IAAI,EAAE,MAAM,oCAAoC,CAAC;AAC1D,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAExB,OAAO,EAAE,aAAa,EAAE,MAAM,6BAA6B,CAAC;AAE5D,qBAAa,eAAgB,SAAQ,aAAa,CAAC,kBAAkB,EAAE,OAAO,CAAC;IAC7E,SAAyB,IAAI,kBAAkB;IAC/C,SAAyB,aAAa,gBAA8B;IACpE,mBAA4B,MAAM;;;;sBAI/B;IAEa,OAAO,IAAI,IAAI;CA2BhC"}
|
|
@@ -8,26 +8,31 @@ class SendMessageTool extends linked_api_tool_js_1.OperationTool {
|
|
|
8
8
|
name = 'send_message';
|
|
9
9
|
operationName = node_1.OPERATION_NAME.sendMessage;
|
|
10
10
|
schema = zod_1.z.object({
|
|
11
|
-
personUrl: zod_1.z.string(),
|
|
11
|
+
personUrl: zod_1.z.string().optional(),
|
|
12
12
|
text: zod_1.z.string().min(1),
|
|
13
|
+
threadId: zod_1.z.string().optional(),
|
|
13
14
|
});
|
|
14
15
|
getTool() {
|
|
15
16
|
return {
|
|
16
17
|
name: this.name,
|
|
17
|
-
description: 'Allows you to send a message to a person (st.sendMessage action). If this workflow is still running, do not retry this tool; retrying can send duplicate messages to the same person.',
|
|
18
|
+
description: 'Allows you to send a message to a person (st.sendMessage action). Provide either personUrl or threadId (threadId replies into an existing conversation thread and takes precedence). If this workflow is still running, do not retry this tool; retrying can send duplicate messages to the same person.',
|
|
18
19
|
inputSchema: {
|
|
19
20
|
type: 'object',
|
|
20
21
|
properties: {
|
|
21
22
|
personUrl: {
|
|
22
23
|
type: 'string',
|
|
23
|
-
description: "LinkedIn URL of the person you want to send a message to (e.g., 'https://www.linkedin.com/in/john-doe')",
|
|
24
|
+
description: "LinkedIn URL of the person you want to send a message to (e.g., 'https://www.linkedin.com/in/john-doe'). Optional if threadId is provided.",
|
|
24
25
|
},
|
|
25
26
|
text: {
|
|
26
27
|
type: 'string',
|
|
27
28
|
description: 'The message text, must be up to 1900 characters.',
|
|
28
29
|
},
|
|
30
|
+
threadId: {
|
|
31
|
+
type: 'string',
|
|
32
|
+
description: 'Optional conversation thread identifier to reply into, as returned by get_inbox. Provide this instead of personUrl to reply directly into a known thread.',
|
|
33
|
+
},
|
|
29
34
|
},
|
|
30
|
-
required: ['
|
|
35
|
+
required: ['text'],
|
|
31
36
|
},
|
|
32
37
|
};
|
|
33
38
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"send-message.js","sourceRoot":"","sources":["../../src/tools/send-message.ts"],"names":[],"mappings":";;;AAAA,0CAAqE;AAErE,6BAAwB;AAExB,oEAA4D;AAE5D,MAAa,eAAgB,SAAQ,kCAA0C;IACpD,IAAI,GAAG,cAAc,CAAC;IACtB,aAAa,GAAG,qBAAc,CAAC,WAAW,CAAC;IACxC,MAAM,GAAG,OAAC,CAAC,MAAM,CAAC;QAC5C,SAAS,EAAE,OAAC,CAAC,MAAM,EAAE;
|
|
1
|
+
{"version":3,"file":"send-message.js","sourceRoot":"","sources":["../../src/tools/send-message.ts"],"names":[],"mappings":";;;AAAA,0CAAqE;AAErE,6BAAwB;AAExB,oEAA4D;AAE5D,MAAa,eAAgB,SAAQ,kCAA0C;IACpD,IAAI,GAAG,cAAc,CAAC;IACtB,aAAa,GAAG,qBAAc,CAAC,WAAW,CAAC;IACxC,MAAM,GAAG,OAAC,CAAC,MAAM,CAAC;QAC5C,SAAS,EAAE,OAAC,CAAC,MAAM,EAAE,CAAC,QAAQ,EAAE;QAChC,IAAI,EAAE,OAAC,CAAC,MAAM,EAAE,CAAC,GAAG,CAAC,CAAC,CAAC;QACvB,QAAQ,EAAE,OAAC,CAAC,MAAM,EAAE,CAAC,QAAQ,EAAE;KAChC,CAAC,CAAC;IAEa,OAAO;QACrB,OAAO;YACL,IAAI,EAAE,IAAI,CAAC,IAAI;YACf,WAAW,EACT,0SAA0S;YAC5S,WAAW,EAAE;gBACX,IAAI,EAAE,QAAQ;gBACd,UAAU,EAAE;oBACV,SAAS,EAAE;wBACT,IAAI,EAAE,QAAQ;wBACd,WAAW,EACT,4IAA4I;qBAC/I;oBACD,IAAI,EAAE;wBACJ,IAAI,EAAE,QAAQ;wBACd,WAAW,EAAE,kDAAkD;qBAChE;oBACD,QAAQ,EAAE;wBACR,IAAI,EAAE,QAAQ;wBACd,WAAW,EACT,2JAA2J;qBAC9J;iBACF;gBACD,QAAQ,EAAE,CAAC,MAAM,CAAC;aACnB;SACF,CAAC;IACJ,CAAC;CACF;AApCD,0CAoCC"}
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import { TSyncInboxParams } from '@linkedapi/node';
|
|
2
|
+
import { Tool } from '@modelcontextprotocol/sdk/types.js';
|
|
3
|
+
import { z } from 'zod';
|
|
4
|
+
import { OperationTool } from '../utils/linked-api-tool.js';
|
|
5
|
+
export declare class SyncInboxTool extends OperationTool<TSyncInboxParams, unknown> {
|
|
6
|
+
readonly name = "sync_inbox";
|
|
7
|
+
readonly operationName: "syncInbox";
|
|
8
|
+
protected readonly schema: z.ZodObject<{}, z.core.$strip>;
|
|
9
|
+
getTool(): Tool;
|
|
10
|
+
}
|
|
11
|
+
//# sourceMappingURL=sync-inbox.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"sync-inbox.d.ts","sourceRoot":"","sources":["../../src/tools/sync-inbox.ts"],"names":[],"mappings":"AAAA,OAAO,EAAkB,gBAAgB,EAAE,MAAM,iBAAiB,CAAC;AACnE,OAAO,EAAE,IAAI,EAAE,MAAM,oCAAoC,CAAC;AAC1D,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAExB,OAAO,EAAE,aAAa,EAAE,MAAM,6BAA6B,CAAC;AAE5D,qBAAa,aAAc,SAAQ,aAAa,CAAC,gBAAgB,EAAE,OAAO,CAAC;IACzE,SAAyB,IAAI,gBAAgB;IAC7C,SAAyB,aAAa,cAA4B;IAClE,mBAA4B,MAAM,iCAAgB;IAElC,OAAO,IAAI,IAAI;CAYhC"}
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.SyncInboxTool = void 0;
|
|
4
|
+
const node_1 = require("@linkedapi/node");
|
|
5
|
+
const zod_1 = require("zod");
|
|
6
|
+
const linked_api_tool_js_1 = require("../utils/linked-api-tool.js");
|
|
7
|
+
class SyncInboxTool extends linked_api_tool_js_1.OperationTool {
|
|
8
|
+
name = 'sync_inbox';
|
|
9
|
+
operationName = node_1.OPERATION_NAME.syncInbox;
|
|
10
|
+
schema = zod_1.z.object({});
|
|
11
|
+
getTool() {
|
|
12
|
+
return {
|
|
13
|
+
name: this.name,
|
|
14
|
+
description: 'Enable whole-inbox monitoring so every incoming conversation can be polled with get_inbox (st.syncInbox action). Run once per account; only messages that arrive after it is enabled are captured.',
|
|
15
|
+
inputSchema: {
|
|
16
|
+
type: 'object',
|
|
17
|
+
properties: {},
|
|
18
|
+
required: [],
|
|
19
|
+
},
|
|
20
|
+
};
|
|
21
|
+
}
|
|
22
|
+
}
|
|
23
|
+
exports.SyncInboxTool = SyncInboxTool;
|
|
24
|
+
//# sourceMappingURL=sync-inbox.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"sync-inbox.js","sourceRoot":"","sources":["../../src/tools/sync-inbox.ts"],"names":[],"mappings":";;;AAAA,0CAAmE;AAEnE,6BAAwB;AAExB,oEAA4D;AAE5D,MAAa,aAAc,SAAQ,kCAAwC;IAChD,IAAI,GAAG,YAAY,CAAC;IACpB,aAAa,GAAG,qBAAc,CAAC,SAAS,CAAC;IACtC,MAAM,GAAG,OAAC,CAAC,MAAM,CAAC,EAAE,CAAC,CAAC;IAElC,OAAO;QACrB,OAAO;YACL,IAAI,EAAE,IAAI,CAAC,IAAI;YACf,WAAW,EACT,oMAAoM;YACtM,WAAW,EAAE;gBACX,IAAI,EAAE,QAAQ;gBACd,UAAU,EAAE,EAAE;gBACd,QAAQ,EAAE,EAAE;aACb;SACF,CAAC;IACJ,CAAC;CACF;AAjBD,sCAiBC"}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@linkedapi/mcp",
|
|
3
|
-
"version": "2.1.
|
|
3
|
+
"version": "2.1.3",
|
|
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": {
|
|
@@ -30,7 +30,7 @@
|
|
|
30
30
|
"author": "Linked API",
|
|
31
31
|
"license": "MIT",
|
|
32
32
|
"dependencies": {
|
|
33
|
-
"@linkedapi/node": "^2.
|
|
33
|
+
"@linkedapi/node": "^2.1.1",
|
|
34
34
|
"@modelcontextprotocol/sdk": "^1.17.4",
|
|
35
35
|
"zod": "^4.1.1"
|
|
36
36
|
},
|
package/src/linked-api-tools.ts
CHANGED
|
@@ -2,19 +2,16 @@ import LinkedApi from '@linkedapi/node';
|
|
|
2
2
|
import { Tool } from '@modelcontextprotocol/sdk/types.js';
|
|
3
3
|
|
|
4
4
|
import { AdminCancelConnectionSessionTool } from './tools/admin-cancel-connection-session.js';
|
|
5
|
-
import { AdminCancelSubscriptionTool } from './tools/admin-cancel-subscription.js';
|
|
6
5
|
import { AdminConnectAccountTool } from './tools/admin-connect-account.js';
|
|
7
6
|
import { AdminCreateReconnectionSessionTool } from './tools/admin-create-reconnection-session.js';
|
|
8
7
|
import { AdminDeleteLimitsTool } from './tools/admin-delete-limits.js';
|
|
9
8
|
import { AdminDisconnectAccountTool } from './tools/admin-disconnect-account.js';
|
|
10
9
|
import { AdminGetAccountsTool } from './tools/admin-get-accounts.js';
|
|
11
|
-
import { AdminGetBillingLinkTool } from './tools/admin-get-billing-link.js';
|
|
12
10
|
import { AdminGetConnectionSessionTool } from './tools/admin-get-connection-session.js';
|
|
13
11
|
import { AdminGetLimitsDefaultsTool } from './tools/admin-get-limits-defaults.js';
|
|
14
12
|
import { AdminGetLimitsUsageTool } from './tools/admin-get-limits-usage.js';
|
|
15
13
|
import { AdminGetLimitsTool } from './tools/admin-get-limits.js';
|
|
16
14
|
import { AdminGetSeatsTool } from './tools/admin-get-seats.js';
|
|
17
|
-
import { AdminGetSubscriptionPricingTool } from './tools/admin-get-subscription-pricing.js';
|
|
18
15
|
import { AdminGetSubscriptionStatusTool } from './tools/admin-get-subscription-status.js';
|
|
19
16
|
import { AdminRegenerateTokenTool } from './tools/admin-regenerate-token.js';
|
|
20
17
|
import { AdminReparseAccountInfoTool } from './tools/admin-reparse-account-info.js';
|
|
@@ -31,6 +28,7 @@ import { FetchPersonTool } from './tools/fetch-person.js';
|
|
|
31
28
|
import { FetchPostTool } from './tools/fetch-post.js';
|
|
32
29
|
import { GetApiUsageTool } from './tools/get-api-usage-stats.js';
|
|
33
30
|
import { GetConversationTool } from './tools/get-conversation.js';
|
|
31
|
+
import { GetInboxTool } from './tools/get-inbox.js';
|
|
34
32
|
import { GetWorkflowResultTool } from './tools/get-workflow-result.js';
|
|
35
33
|
import { NvFetchCompanyTool } from './tools/nv-fetch-company.js';
|
|
36
34
|
import { NvFetchPersonTool } from './tools/nv-fetch-person.js';
|
|
@@ -38,6 +36,7 @@ import { NvGetConversationTool } from './tools/nv-get-conversation.js';
|
|
|
38
36
|
import { NvSearchCompaniesTool } from './tools/nv-search-companies.js';
|
|
39
37
|
import { NvSearchPeopleTool } from './tools/nv-search-people.js';
|
|
40
38
|
import { NvSendMessageTool } from './tools/nv-send-message.js';
|
|
39
|
+
import { NvSyncInboxTool } from './tools/nv-sync-inbox.js';
|
|
41
40
|
import { ReactToPostTool } from './tools/react-to-post.js';
|
|
42
41
|
import { RemoveConnectionTool } from './tools/remove-connection.js';
|
|
43
42
|
import { RetrieveConnectionsTool } from './tools/retrieve-connections.js';
|
|
@@ -49,6 +48,7 @@ import { SearchJobsTool } from './tools/search-jobs.js';
|
|
|
49
48
|
import { SearchPeopleTool } from './tools/search-people.js';
|
|
50
49
|
import { SendConnectionRequestTool } from './tools/send-connection-request.js';
|
|
51
50
|
import { SendMessageTool } from './tools/send-message.js';
|
|
51
|
+
import { SyncInboxTool } from './tools/sync-inbox.js';
|
|
52
52
|
import { WithdrawConnectionRequestTool } from './tools/withdraw-connection-request.js';
|
|
53
53
|
import type { TLinkedApiToolResult } from './types/linked-api-tool-result.type.js';
|
|
54
54
|
import { AdminTool } from './utils/admin-tool.js';
|
|
@@ -73,6 +73,8 @@ export class LinkedApiTools {
|
|
|
73
73
|
// Standard tools
|
|
74
74
|
new SendMessageTool(),
|
|
75
75
|
new GetConversationTool(),
|
|
76
|
+
new SyncInboxTool(),
|
|
77
|
+
new GetInboxTool(),
|
|
76
78
|
new CheckConnectionStatusTool(),
|
|
77
79
|
new RetrieveConnectionsTool(),
|
|
78
80
|
new SendConnectionRequestTool(),
|
|
@@ -94,6 +96,7 @@ export class LinkedApiTools {
|
|
|
94
96
|
// Sales Navigator tools
|
|
95
97
|
new NvSendMessageTool(),
|
|
96
98
|
new NvGetConversationTool(),
|
|
99
|
+
new NvSyncInboxTool(),
|
|
97
100
|
new NvSearchCompaniesTool(),
|
|
98
101
|
new NvSearchPeopleTool(),
|
|
99
102
|
new NvFetchCompanyTool(),
|
|
@@ -108,9 +111,6 @@ export class LinkedApiTools {
|
|
|
108
111
|
new AdminGetSubscriptionStatusTool(),
|
|
109
112
|
new AdminGetSeatsTool(),
|
|
110
113
|
new AdminSetSeatsTool(),
|
|
111
|
-
new AdminGetSubscriptionPricingTool(),
|
|
112
|
-
new AdminGetBillingLinkTool(),
|
|
113
|
-
new AdminCancelSubscriptionTool(),
|
|
114
114
|
new AdminGetAccountsTool(),
|
|
115
115
|
new AdminReparseAccountInfoTool(),
|
|
116
116
|
new AdminCreateReconnectionSessionTool(),
|
|
@@ -0,0 +1,58 @@
|
|
|
1
|
+
import LinkedApi, { TInboxPollRequest, TInboxPollResult, TMappedResponse } from '@linkedapi/node';
|
|
2
|
+
import { Tool } from '@modelcontextprotocol/sdk/types.js';
|
|
3
|
+
import z from 'zod';
|
|
4
|
+
|
|
5
|
+
import { LinkedApiTool } from '../utils/linked-api-tool.js';
|
|
6
|
+
|
|
7
|
+
export class GetInboxTool extends LinkedApiTool<TInboxPollRequest, TInboxPollResult> {
|
|
8
|
+
public readonly name = 'get_inbox';
|
|
9
|
+
protected readonly schema = z.object({
|
|
10
|
+
since: z.string().optional(),
|
|
11
|
+
type: z.enum(['st', 'nv']).optional(),
|
|
12
|
+
threadId: z.string().optional(),
|
|
13
|
+
});
|
|
14
|
+
|
|
15
|
+
public override async execute({
|
|
16
|
+
linkedapi,
|
|
17
|
+
args: { since, type, threadId },
|
|
18
|
+
}: {
|
|
19
|
+
linkedapi: LinkedApi;
|
|
20
|
+
args: TInboxPollRequest;
|
|
21
|
+
}): Promise<TMappedResponse<TInboxPollResult>> {
|
|
22
|
+
return linkedapi.pollInbox({
|
|
23
|
+
since,
|
|
24
|
+
type,
|
|
25
|
+
threadId,
|
|
26
|
+
});
|
|
27
|
+
}
|
|
28
|
+
|
|
29
|
+
public override getTool(): Tool {
|
|
30
|
+
return {
|
|
31
|
+
name: this.name,
|
|
32
|
+
description:
|
|
33
|
+
'Get messages from the monitored inbox across all conversations (standard and Sales Navigator), newest first. Requires inbox monitoring to be enabled once with sync_inbox (or nv_sync_inbox for Sales Navigator).',
|
|
34
|
+
inputSchema: {
|
|
35
|
+
type: 'object',
|
|
36
|
+
properties: {
|
|
37
|
+
since: {
|
|
38
|
+
type: 'string',
|
|
39
|
+
description:
|
|
40
|
+
"Optional ISO 8601 timestamp to only retrieve messages after this date (e.g., '2024-01-15T10:30:00Z'). If not provided, all captured messages are returned.",
|
|
41
|
+
},
|
|
42
|
+
type: {
|
|
43
|
+
type: 'string',
|
|
44
|
+
enum: ['st', 'nv'],
|
|
45
|
+
description:
|
|
46
|
+
'Optional inbox type filter: "st" for standard messages, "nv" for Sales Navigator messages. If omitted, both are returned.',
|
|
47
|
+
},
|
|
48
|
+
threadId: {
|
|
49
|
+
type: 'string',
|
|
50
|
+
description:
|
|
51
|
+
'Optional conversation thread identifier to restrict the result to a single thread.',
|
|
52
|
+
},
|
|
53
|
+
},
|
|
54
|
+
required: [],
|
|
55
|
+
},
|
|
56
|
+
};
|
|
57
|
+
}
|
|
58
|
+
}
|
|
@@ -8,23 +8,24 @@ export class NvSendMessageTool extends OperationTool<TNvSendMessageParams, unkno
|
|
|
8
8
|
public override readonly name = 'nv_send_message';
|
|
9
9
|
public override readonly operationName = OPERATION_NAME.nvSendMessage;
|
|
10
10
|
protected override readonly schema = z.object({
|
|
11
|
-
personUrl: z.string(),
|
|
11
|
+
personUrl: z.string().optional(),
|
|
12
12
|
text: z.string().min(1),
|
|
13
13
|
subject: z.string().optional(),
|
|
14
|
+
threadId: z.string().optional(),
|
|
14
15
|
});
|
|
15
16
|
|
|
16
17
|
public override getTool(): Tool {
|
|
17
18
|
return {
|
|
18
19
|
name: this.name,
|
|
19
20
|
description:
|
|
20
|
-
'Allows you to send a message to a person in Sales Navigator (nv.sendMessage action). If this workflow is still running, do not retry this tool; retrying can send duplicate Sales Navigator messages to the same person.',
|
|
21
|
+
'Allows you to send a message to a person in Sales Navigator (nv.sendMessage action). Provide either personUrl or threadId (threadId replies into an existing conversation thread and takes precedence). If this workflow is still running, do not retry this tool; retrying can send duplicate Sales Navigator messages to the same person.',
|
|
21
22
|
inputSchema: {
|
|
22
23
|
type: 'object',
|
|
23
24
|
properties: {
|
|
24
25
|
personUrl: {
|
|
25
26
|
type: 'string',
|
|
26
27
|
description:
|
|
27
|
-
"LinkedIn URL of the person you want to send a message to (e.g., 'https://www.linkedin.com/in/john-doe')",
|
|
28
|
+
"LinkedIn URL of the person you want to send a message to (e.g., 'https://www.linkedin.com/in/john-doe'). Optional if threadId is provided.",
|
|
28
29
|
},
|
|
29
30
|
text: {
|
|
30
31
|
type: 'string',
|
|
@@ -32,10 +33,16 @@ export class NvSendMessageTool extends OperationTool<TNvSendMessageParams, unkno
|
|
|
32
33
|
},
|
|
33
34
|
subject: {
|
|
34
35
|
type: 'string',
|
|
35
|
-
description:
|
|
36
|
+
description:
|
|
37
|
+
'Subject line, must be up to 80 characters. Required when starting a new conversation; ignored when replying into an existing thread via threadId.',
|
|
38
|
+
},
|
|
39
|
+
threadId: {
|
|
40
|
+
type: 'string',
|
|
41
|
+
description:
|
|
42
|
+
'Optional conversation thread identifier to reply into, as returned by get_inbox. Provide this instead of personUrl to reply directly into a known thread.',
|
|
36
43
|
},
|
|
37
44
|
},
|
|
38
|
-
required: ['
|
|
45
|
+
required: ['text'],
|
|
39
46
|
},
|
|
40
47
|
};
|
|
41
48
|
}
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
import { OPERATION_NAME, TNvSyncInboxParams } from '@linkedapi/node';
|
|
2
|
+
import { Tool } from '@modelcontextprotocol/sdk/types.js';
|
|
3
|
+
import { z } from 'zod';
|
|
4
|
+
|
|
5
|
+
import { OperationTool } from '../utils/linked-api-tool.js';
|
|
6
|
+
|
|
7
|
+
export class NvSyncInboxTool extends OperationTool<TNvSyncInboxParams, unknown> {
|
|
8
|
+
public override readonly name = 'nv_sync_inbox';
|
|
9
|
+
public override readonly operationName = OPERATION_NAME.nvSyncInbox;
|
|
10
|
+
protected override readonly schema = z.object({});
|
|
11
|
+
|
|
12
|
+
public override getTool(): Tool {
|
|
13
|
+
return {
|
|
14
|
+
name: this.name,
|
|
15
|
+
description:
|
|
16
|
+
'Enable whole-inbox monitoring in Sales Navigator so every incoming conversation can be polled with get_inbox (nv.syncInbox action). Run once per account; only messages that arrive after it is enabled are captured.',
|
|
17
|
+
inputSchema: {
|
|
18
|
+
type: 'object',
|
|
19
|
+
properties: {},
|
|
20
|
+
required: [],
|
|
21
|
+
},
|
|
22
|
+
};
|
|
23
|
+
}
|
|
24
|
+
}
|
|
@@ -8,29 +8,35 @@ export class SendMessageTool extends OperationTool<TSendMessageParams, unknown>
|
|
|
8
8
|
public override readonly name = 'send_message';
|
|
9
9
|
public override readonly operationName = OPERATION_NAME.sendMessage;
|
|
10
10
|
protected override readonly schema = z.object({
|
|
11
|
-
personUrl: z.string(),
|
|
11
|
+
personUrl: z.string().optional(),
|
|
12
12
|
text: z.string().min(1),
|
|
13
|
+
threadId: z.string().optional(),
|
|
13
14
|
});
|
|
14
15
|
|
|
15
16
|
public override getTool(): Tool {
|
|
16
17
|
return {
|
|
17
18
|
name: this.name,
|
|
18
19
|
description:
|
|
19
|
-
'Allows you to send a message to a person (st.sendMessage action). If this workflow is still running, do not retry this tool; retrying can send duplicate messages to the same person.',
|
|
20
|
+
'Allows you to send a message to a person (st.sendMessage action). Provide either personUrl or threadId (threadId replies into an existing conversation thread and takes precedence). If this workflow is still running, do not retry this tool; retrying can send duplicate messages to the same person.',
|
|
20
21
|
inputSchema: {
|
|
21
22
|
type: 'object',
|
|
22
23
|
properties: {
|
|
23
24
|
personUrl: {
|
|
24
25
|
type: 'string',
|
|
25
26
|
description:
|
|
26
|
-
"LinkedIn URL of the person you want to send a message to (e.g., 'https://www.linkedin.com/in/john-doe')",
|
|
27
|
+
"LinkedIn URL of the person you want to send a message to (e.g., 'https://www.linkedin.com/in/john-doe'). Optional if threadId is provided.",
|
|
27
28
|
},
|
|
28
29
|
text: {
|
|
29
30
|
type: 'string',
|
|
30
31
|
description: 'The message text, must be up to 1900 characters.',
|
|
31
32
|
},
|
|
33
|
+
threadId: {
|
|
34
|
+
type: 'string',
|
|
35
|
+
description:
|
|
36
|
+
'Optional conversation thread identifier to reply into, as returned by get_inbox. Provide this instead of personUrl to reply directly into a known thread.',
|
|
37
|
+
},
|
|
32
38
|
},
|
|
33
|
-
required: ['
|
|
39
|
+
required: ['text'],
|
|
34
40
|
},
|
|
35
41
|
};
|
|
36
42
|
}
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
import { OPERATION_NAME, TSyncInboxParams } from '@linkedapi/node';
|
|
2
|
+
import { Tool } from '@modelcontextprotocol/sdk/types.js';
|
|
3
|
+
import { z } from 'zod';
|
|
4
|
+
|
|
5
|
+
import { OperationTool } from '../utils/linked-api-tool.js';
|
|
6
|
+
|
|
7
|
+
export class SyncInboxTool extends OperationTool<TSyncInboxParams, unknown> {
|
|
8
|
+
public override readonly name = 'sync_inbox';
|
|
9
|
+
public override readonly operationName = OPERATION_NAME.syncInbox;
|
|
10
|
+
protected override readonly schema = z.object({});
|
|
11
|
+
|
|
12
|
+
public override getTool(): Tool {
|
|
13
|
+
return {
|
|
14
|
+
name: this.name,
|
|
15
|
+
description:
|
|
16
|
+
'Enable whole-inbox monitoring so every incoming conversation can be polled with get_inbox (st.syncInbox action). Run once per account; only messages that arrive after it is enabled are captured.',
|
|
17
|
+
inputSchema: {
|
|
18
|
+
type: 'object',
|
|
19
|
+
properties: {},
|
|
20
|
+
required: [],
|
|
21
|
+
},
|
|
22
|
+
};
|
|
23
|
+
}
|
|
24
|
+
}
|
|
@@ -1,14 +0,0 @@
|
|
|
1
|
-
import { LinkedApiAdmin, TCancelResult } 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 AdminCancelSubscriptionTool extends AdminTool<Record<string, never>, TCancelResult> {
|
|
6
|
-
readonly name = "admin_cancel_subscription";
|
|
7
|
-
protected readonly schema: z.ZodObject<{}, z.core.$strip>;
|
|
8
|
-
execute({ admin, }: {
|
|
9
|
-
admin: LinkedApiAdmin;
|
|
10
|
-
args: Record<string, never>;
|
|
11
|
-
}): Promise<TCancelResult>;
|
|
12
|
-
getTool(): Tool;
|
|
13
|
-
}
|
|
14
|
-
//# sourceMappingURL=admin-cancel-subscription.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"admin-cancel-subscription.d.ts","sourceRoot":"","sources":["../../src/tools/admin-cancel-subscription.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,cAAc,EAAE,aAAa,EAAE,MAAM,iBAAiB,CAAC;AAChE,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,CAAC,MAAM,CAAC,MAAM,EAAE,KAAK,CAAC,EAAE,aAAa,CAAC;IAC9F,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,aAAa,CAAC;IAIV,OAAO,IAAI,IAAI;CAUhC"}
|
|
@@ -1,27 +0,0 @@
|
|
|
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.AdminCancelSubscriptionTool = void 0;
|
|
7
|
-
const zod_1 = __importDefault(require("zod"));
|
|
8
|
-
const admin_tool_js_1 = require("../utils/admin-tool.js");
|
|
9
|
-
class AdminCancelSubscriptionTool extends admin_tool_js_1.AdminTool {
|
|
10
|
-
name = 'admin_cancel_subscription';
|
|
11
|
-
schema = zod_1.default.object({});
|
|
12
|
-
async execute({ admin, }) {
|
|
13
|
-
return await admin.subscription.cancel();
|
|
14
|
-
}
|
|
15
|
-
getTool() {
|
|
16
|
-
return {
|
|
17
|
-
name: this.name,
|
|
18
|
-
description: 'Cancel the current subscription at the end of the billing period.',
|
|
19
|
-
inputSchema: {
|
|
20
|
-
type: 'object',
|
|
21
|
-
properties: {},
|
|
22
|
-
},
|
|
23
|
-
};
|
|
24
|
-
}
|
|
25
|
-
}
|
|
26
|
-
exports.AdminCancelSubscriptionTool = AdminCancelSubscriptionTool;
|
|
27
|
-
//# sourceMappingURL=admin-cancel-subscription.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"admin-cancel-subscription.js","sourceRoot":"","sources":["../../src/tools/admin-cancel-subscription.ts"],"names":[],"mappings":";;;;;;AAEA,8CAAoB;AAEpB,0DAAmD;AAEnD,MAAa,2BAA4B,SAAQ,yBAA+C;IAC9E,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,YAAY,CAAC,MAAM,EAAE,CAAC;IAC3C,CAAC;IAEe,OAAO;QACrB,OAAO;YACL,IAAI,EAAE,IAAI,CAAC,IAAI;YACf,WAAW,EAAE,mEAAmE;YAChF,WAAW,EAAE;gBACX,IAAI,EAAE,QAAQ;gBACd,UAAU,EAAE,EAAE;aACf;SACF,CAAC;IACJ,CAAC;CACF;AAvBD,kEAuBC"}
|
|
@@ -1,14 +0,0 @@
|
|
|
1
|
-
import { LinkedApiAdmin, TBillingLinkResult } 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 AdminGetBillingLinkTool extends AdminTool<Record<string, never>, TBillingLinkResult> {
|
|
6
|
-
readonly name = "admin_get_billing_link";
|
|
7
|
-
protected readonly schema: z.ZodObject<{}, z.core.$strip>;
|
|
8
|
-
execute({ admin, }: {
|
|
9
|
-
admin: LinkedApiAdmin;
|
|
10
|
-
args: Record<string, never>;
|
|
11
|
-
}): Promise<TBillingLinkResult>;
|
|
12
|
-
getTool(): Tool;
|
|
13
|
-
}
|
|
14
|
-
//# sourceMappingURL=admin-get-billing-link.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"admin-get-billing-link.d.ts","sourceRoot":"","sources":["../../src/tools/admin-get-billing-link.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,cAAc,EAAE,kBAAkB,EAAE,MAAM,iBAAiB,CAAC;AACrE,OAAO,EAAE,IAAI,EAAE,MAAM,oCAAoC,CAAC;AAC1D,OAAO,CAAC,MAAM,KAAK,CAAC;AAEpB,OAAO,EAAE,SAAS,EAAE,MAAM,wBAAwB,CAAC;AAEnD,qBAAa,uBAAwB,SAAQ,SAAS,CAAC,MAAM,CAAC,MAAM,EAAE,KAAK,CAAC,EAAE,kBAAkB,CAAC;IAC/F,SAAgB,IAAI,4BAA4B;IAChD,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,kBAAkB,CAAC;IAIf,OAAO,IAAI,IAAI;CAUhC"}
|
|
@@ -1,27 +0,0 @@
|
|
|
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.AdminGetBillingLinkTool = void 0;
|
|
7
|
-
const zod_1 = __importDefault(require("zod"));
|
|
8
|
-
const admin_tool_js_1 = require("../utils/admin-tool.js");
|
|
9
|
-
class AdminGetBillingLinkTool extends admin_tool_js_1.AdminTool {
|
|
10
|
-
name = 'admin_get_billing_link';
|
|
11
|
-
schema = zod_1.default.object({});
|
|
12
|
-
async execute({ admin, }) {
|
|
13
|
-
return await admin.subscription.getBillingLink();
|
|
14
|
-
}
|
|
15
|
-
getTool() {
|
|
16
|
-
return {
|
|
17
|
-
name: this.name,
|
|
18
|
-
description: 'Get a Stripe billing portal link for the current workspace.',
|
|
19
|
-
inputSchema: {
|
|
20
|
-
type: 'object',
|
|
21
|
-
properties: {},
|
|
22
|
-
},
|
|
23
|
-
};
|
|
24
|
-
}
|
|
25
|
-
}
|
|
26
|
-
exports.AdminGetBillingLinkTool = AdminGetBillingLinkTool;
|
|
27
|
-
//# sourceMappingURL=admin-get-billing-link.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"admin-get-billing-link.js","sourceRoot":"","sources":["../../src/tools/admin-get-billing-link.ts"],"names":[],"mappings":";;;;;;AAEA,8CAAoB;AAEpB,0DAAmD;AAEnD,MAAa,uBAAwB,SAAQ,yBAAoD;IAC/E,IAAI,GAAG,wBAAwB,CAAC;IAC7B,MAAM,GAAG,aAAC,CAAC,MAAM,CAAC,EAAE,CAAC,CAAC;IAEzB,KAAK,CAAC,OAAO,CAAC,EAC5B,KAAK,GAIN;QACC,OAAO,MAAM,KAAK,CAAC,YAAY,CAAC,cAAc,EAAE,CAAC;IACnD,CAAC;IAEe,OAAO;QACrB,OAAO;YACL,IAAI,EAAE,IAAI,CAAC,IAAI;YACf,WAAW,EAAE,6DAA6D;YAC1E,WAAW,EAAE;gBACX,IAAI,EAAE,QAAQ;gBACd,UAAU,EAAE,EAAE;aACf;SACF,CAAC;IACJ,CAAC;CACF;AAvBD,0DAuBC"}
|
|
@@ -1,18 +0,0 @@
|
|
|
1
|
-
import { LinkedApiAdmin, TSubscriptionProduct } 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 AdminGetSubscriptionPricingTool extends AdminTool<Record<string, never>, {
|
|
6
|
-
products: Array<TSubscriptionProduct>;
|
|
7
|
-
}> {
|
|
8
|
-
readonly name = "admin_get_subscription_pricing";
|
|
9
|
-
protected readonly schema: z.ZodObject<{}, z.core.$strip>;
|
|
10
|
-
execute({ admin, }: {
|
|
11
|
-
admin: LinkedApiAdmin;
|
|
12
|
-
args: Record<string, never>;
|
|
13
|
-
}): Promise<{
|
|
14
|
-
products: Array<TSubscriptionProduct>;
|
|
15
|
-
}>;
|
|
16
|
-
getTool(): Tool;
|
|
17
|
-
}
|
|
18
|
-
//# sourceMappingURL=admin-get-subscription-pricing.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"admin-get-subscription-pricing.d.ts","sourceRoot":"","sources":["../../src/tools/admin-get-subscription-pricing.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,cAAc,EAAE,oBAAoB,EAAE,MAAM,iBAAiB,CAAC;AACvE,OAAO,EAAE,IAAI,EAAE,MAAM,oCAAoC,CAAC;AAC1D,OAAO,CAAC,MAAM,KAAK,CAAC;AAEpB,OAAO,EAAE,SAAS,EAAE,MAAM,wBAAwB,CAAC;AAEnD,qBAAa,+BAAgC,SAAQ,SAAS,CAC5D,MAAM,CAAC,MAAM,EAAE,KAAK,CAAC,EACrB;IAAE,QAAQ,EAAE,KAAK,CAAC,oBAAoB,CAAC,CAAA;CAAE,CAC1C;IACC,SAAgB,IAAI,oCAAoC;IACxD,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,QAAQ,EAAE,KAAK,CAAC,oBAAoB,CAAC,CAAA;KAAE,CAAC;IAItC,OAAO,IAAI,IAAI;CAUhC"}
|
|
@@ -1,27 +0,0 @@
|
|
|
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.AdminGetSubscriptionPricingTool = void 0;
|
|
7
|
-
const zod_1 = __importDefault(require("zod"));
|
|
8
|
-
const admin_tool_js_1 = require("../utils/admin-tool.js");
|
|
9
|
-
class AdminGetSubscriptionPricingTool extends admin_tool_js_1.AdminTool {
|
|
10
|
-
name = 'admin_get_subscription_pricing';
|
|
11
|
-
schema = zod_1.default.object({});
|
|
12
|
-
async execute({ admin, }) {
|
|
13
|
-
return await admin.subscription.getPricing();
|
|
14
|
-
}
|
|
15
|
-
getTool() {
|
|
16
|
-
return {
|
|
17
|
-
name: this.name,
|
|
18
|
-
description: 'Get available subscription products and prices.',
|
|
19
|
-
inputSchema: {
|
|
20
|
-
type: 'object',
|
|
21
|
-
properties: {},
|
|
22
|
-
},
|
|
23
|
-
};
|
|
24
|
-
}
|
|
25
|
-
}
|
|
26
|
-
exports.AdminGetSubscriptionPricingTool = AdminGetSubscriptionPricingTool;
|
|
27
|
-
//# sourceMappingURL=admin-get-subscription-pricing.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"admin-get-subscription-pricing.js","sourceRoot":"","sources":["../../src/tools/admin-get-subscription-pricing.ts"],"names":[],"mappings":";;;;;;AAEA,8CAAoB;AAEpB,0DAAmD;AAEnD,MAAa,+BAAgC,SAAQ,yBAGpD;IACiB,IAAI,GAAG,gCAAgC,CAAC;IACrC,MAAM,GAAG,aAAC,CAAC,MAAM,CAAC,EAAE,CAAC,CAAC;IAEzB,KAAK,CAAC,OAAO,CAAC,EAC5B,KAAK,GAIN;QACC,OAAO,MAAM,KAAK,CAAC,YAAY,CAAC,UAAU,EAAE,CAAC;IAC/C,CAAC;IAEe,OAAO;QACrB,OAAO;YACL,IAAI,EAAE,IAAI,CAAC,IAAI;YACf,WAAW,EAAE,iDAAiD;YAC9D,WAAW,EAAE;gBACX,IAAI,EAAE,QAAQ;gBACd,UAAU,EAAE,EAAE;aACf;SACF,CAAC;IACJ,CAAC;CACF;AA1BD,0EA0BC"}
|
|
@@ -1,30 +0,0 @@
|
|
|
1
|
-
import { LinkedApiAdmin, TCancelResult } 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 AdminCancelSubscriptionTool extends AdminTool<Record<string, never>, TCancelResult> {
|
|
8
|
-
public readonly name = 'admin_cancel_subscription';
|
|
9
|
-
protected readonly schema = z.object({});
|
|
10
|
-
|
|
11
|
-
public override async execute({
|
|
12
|
-
admin,
|
|
13
|
-
}: {
|
|
14
|
-
admin: LinkedApiAdmin;
|
|
15
|
-
args: Record<string, never>;
|
|
16
|
-
}): Promise<TCancelResult> {
|
|
17
|
-
return await admin.subscription.cancel();
|
|
18
|
-
}
|
|
19
|
-
|
|
20
|
-
public override getTool(): Tool {
|
|
21
|
-
return {
|
|
22
|
-
name: this.name,
|
|
23
|
-
description: 'Cancel the current subscription at the end of the billing period.',
|
|
24
|
-
inputSchema: {
|
|
25
|
-
type: 'object',
|
|
26
|
-
properties: {},
|
|
27
|
-
},
|
|
28
|
-
};
|
|
29
|
-
}
|
|
30
|
-
}
|
|
@@ -1,30 +0,0 @@
|
|
|
1
|
-
import { LinkedApiAdmin, TBillingLinkResult } 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 AdminGetBillingLinkTool extends AdminTool<Record<string, never>, TBillingLinkResult> {
|
|
8
|
-
public readonly name = 'admin_get_billing_link';
|
|
9
|
-
protected readonly schema = z.object({});
|
|
10
|
-
|
|
11
|
-
public override async execute({
|
|
12
|
-
admin,
|
|
13
|
-
}: {
|
|
14
|
-
admin: LinkedApiAdmin;
|
|
15
|
-
args: Record<string, never>;
|
|
16
|
-
}): Promise<TBillingLinkResult> {
|
|
17
|
-
return await admin.subscription.getBillingLink();
|
|
18
|
-
}
|
|
19
|
-
|
|
20
|
-
public override getTool(): Tool {
|
|
21
|
-
return {
|
|
22
|
-
name: this.name,
|
|
23
|
-
description: 'Get a Stripe billing portal link for the current workspace.',
|
|
24
|
-
inputSchema: {
|
|
25
|
-
type: 'object',
|
|
26
|
-
properties: {},
|
|
27
|
-
},
|
|
28
|
-
};
|
|
29
|
-
}
|
|
30
|
-
}
|
|
@@ -1,33 +0,0 @@
|
|
|
1
|
-
import { LinkedApiAdmin, TSubscriptionProduct } 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 AdminGetSubscriptionPricingTool extends AdminTool<
|
|
8
|
-
Record<string, never>,
|
|
9
|
-
{ products: Array<TSubscriptionProduct> }
|
|
10
|
-
> {
|
|
11
|
-
public readonly name = 'admin_get_subscription_pricing';
|
|
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<{ products: Array<TSubscriptionProduct> }> {
|
|
20
|
-
return await admin.subscription.getPricing();
|
|
21
|
-
}
|
|
22
|
-
|
|
23
|
-
public override getTool(): Tool {
|
|
24
|
-
return {
|
|
25
|
-
name: this.name,
|
|
26
|
-
description: 'Get available subscription products and prices.',
|
|
27
|
-
inputSchema: {
|
|
28
|
-
type: 'object',
|
|
29
|
-
properties: {},
|
|
30
|
-
},
|
|
31
|
-
};
|
|
32
|
-
}
|
|
33
|
-
}
|