@meetlark/mcp-server 1.0.1 → 1.0.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/bin/cli.js +1 -1
- package/dist/{chunk-AFREFQH7.js → chunk-7TPOSXIQ.js} +63 -11
- package/dist/src/index.d.ts +13 -1
- package/dist/src/index.js +15 -3
- package/package.json +2 -1
- package/server.json +14 -4
- package/src/index.ts +8 -0
- package/src/tools/close-poll.ts +8 -0
- package/src/tools/create-poll.ts +8 -0
- package/src/tools/get-admin.ts +13 -3
- package/src/tools/get-results.ts +12 -3
- package/src/tools/reopen-poll.ts +8 -0
- package/src/tools/vote.ts +8 -0
- package/test/exports.test.ts +27 -0
package/dist/bin/cli.js
CHANGED
|
@@ -74,9 +74,6 @@ var MeetLarkClient = class {
|
|
|
74
74
|
}
|
|
75
75
|
};
|
|
76
76
|
|
|
77
|
-
// src/server.ts
|
|
78
|
-
import { McpServer } from "@modelcontextprotocol/sdk/server/mcp.js";
|
|
79
|
-
|
|
80
77
|
// ../../node_modules/zod/v4/classic/external.js
|
|
81
78
|
var external_exports = {};
|
|
82
79
|
__export(external_exports, {
|
|
@@ -13861,6 +13858,10 @@ function registerCreatePoll(server, client) {
|
|
|
13861
13858
|
).describe("Available time slots to vote on"),
|
|
13862
13859
|
creatorEmail: external_exports.string().describe("Email address of the poll creator"),
|
|
13863
13860
|
creatorName: external_exports.string().optional().describe("Name of the poll creator")
|
|
13861
|
+
},
|
|
13862
|
+
_meta: {
|
|
13863
|
+
"openai/toolInvocation/invoking": "Creating scheduling poll...",
|
|
13864
|
+
"openai/toolInvocation/invoked": "Poll created!"
|
|
13864
13865
|
}
|
|
13865
13866
|
}, async (args) => {
|
|
13866
13867
|
const result = await client.createPoll(args);
|
|
@@ -13903,7 +13904,11 @@ function registerCreatePoll(server, client) {
|
|
|
13903
13904
|
type: "text",
|
|
13904
13905
|
text: JSON.stringify(result.data)
|
|
13905
13906
|
}
|
|
13906
|
-
]
|
|
13907
|
+
],
|
|
13908
|
+
structuredContent: {
|
|
13909
|
+
type: "poll_created",
|
|
13910
|
+
...result.data
|
|
13911
|
+
}
|
|
13907
13912
|
};
|
|
13908
13913
|
});
|
|
13909
13914
|
}
|
|
@@ -13911,9 +13916,13 @@ function registerCreatePoll(server, client) {
|
|
|
13911
13916
|
// src/tools/get-results.ts
|
|
13912
13917
|
function registerGetResults(server, client) {
|
|
13913
13918
|
server.registerTool("meetlark_get_results", {
|
|
13914
|
-
description: "
|
|
13919
|
+
description: "Get poll details and available time slots using a participation token. Returns the poll title, description, status, and time slots -- but NOT votes or participant data. This is the view a participant sees before voting. To see who voted and how, use meetlark_get_admin_view instead.",
|
|
13915
13920
|
inputSchema: {
|
|
13916
13921
|
participateToken: external_exports.string().describe("The prt_xxx token from the participation URL")
|
|
13922
|
+
},
|
|
13923
|
+
_meta: {
|
|
13924
|
+
"openai/toolInvocation/invoking": "Loading poll details...",
|
|
13925
|
+
"openai/toolInvocation/invoked": "Poll details loaded!"
|
|
13917
13926
|
}
|
|
13918
13927
|
}, async (args) => {
|
|
13919
13928
|
const result = await client.getResults(args.participateToken);
|
|
@@ -13956,7 +13965,11 @@ function registerGetResults(server, client) {
|
|
|
13956
13965
|
type: "text",
|
|
13957
13966
|
text: JSON.stringify(result.data)
|
|
13958
13967
|
}
|
|
13959
|
-
]
|
|
13968
|
+
],
|
|
13969
|
+
structuredContent: {
|
|
13970
|
+
type: "poll_details",
|
|
13971
|
+
...result.data
|
|
13972
|
+
}
|
|
13960
13973
|
};
|
|
13961
13974
|
});
|
|
13962
13975
|
}
|
|
@@ -13974,6 +13987,10 @@ function registerVote(server, client) {
|
|
|
13974
13987
|
value: external_exports.enum(["yes", "maybe", "no"]).describe("Vote value")
|
|
13975
13988
|
})
|
|
13976
13989
|
).describe("Votes for each time slot")
|
|
13990
|
+
},
|
|
13991
|
+
_meta: {
|
|
13992
|
+
"openai/toolInvocation/invoking": "Submitting vote...",
|
|
13993
|
+
"openai/toolInvocation/invoked": "Vote recorded!"
|
|
13977
13994
|
}
|
|
13978
13995
|
}, async (args) => {
|
|
13979
13996
|
const result = await client.vote(args.participateToken, {
|
|
@@ -14030,7 +14047,11 @@ function registerVote(server, client) {
|
|
|
14030
14047
|
type: "text",
|
|
14031
14048
|
text: JSON.stringify(result.data)
|
|
14032
14049
|
}
|
|
14033
|
-
]
|
|
14050
|
+
],
|
|
14051
|
+
structuredContent: {
|
|
14052
|
+
type: "vote_recorded",
|
|
14053
|
+
...result.data
|
|
14054
|
+
}
|
|
14034
14055
|
};
|
|
14035
14056
|
});
|
|
14036
14057
|
}
|
|
@@ -14038,9 +14059,13 @@ function registerVote(server, client) {
|
|
|
14038
14059
|
// src/tools/get-admin.ts
|
|
14039
14060
|
function registerGetAdmin(server, client) {
|
|
14040
14061
|
server.registerTool("meetlark_get_admin_view", {
|
|
14041
|
-
description: "Get full poll details and
|
|
14062
|
+
description: "Get full poll details including all votes and participants. This is the only way to see who voted and how they voted. Returns poll info, time slots, every participant's votes (yes/maybe/no per slot), and admin URLs. Use the admin token from poll creation. Use this to check vote status or results.",
|
|
14042
14063
|
inputSchema: {
|
|
14043
14064
|
adminToken: external_exports.string().describe("The adm_xxx token from poll creation")
|
|
14065
|
+
},
|
|
14066
|
+
_meta: {
|
|
14067
|
+
"openai/toolInvocation/invoking": "Loading admin view...",
|
|
14068
|
+
"openai/toolInvocation/invoked": "Admin details loaded!"
|
|
14044
14069
|
}
|
|
14045
14070
|
}, async (args) => {
|
|
14046
14071
|
const result = await client.getAdminView(args.adminToken);
|
|
@@ -14083,7 +14108,11 @@ function registerGetAdmin(server, client) {
|
|
|
14083
14108
|
type: "text",
|
|
14084
14109
|
text: JSON.stringify(result.data)
|
|
14085
14110
|
}
|
|
14086
|
-
]
|
|
14111
|
+
],
|
|
14112
|
+
structuredContent: {
|
|
14113
|
+
type: "admin_view",
|
|
14114
|
+
...result.data
|
|
14115
|
+
}
|
|
14087
14116
|
};
|
|
14088
14117
|
});
|
|
14089
14118
|
}
|
|
@@ -14094,6 +14123,10 @@ function registerClosePoll(server, client) {
|
|
|
14094
14123
|
description: "Close a poll to stop accepting new votes. Use the admin token from poll creation.",
|
|
14095
14124
|
inputSchema: {
|
|
14096
14125
|
adminToken: external_exports.string().describe("The adm_xxx token from poll creation")
|
|
14126
|
+
},
|
|
14127
|
+
_meta: {
|
|
14128
|
+
"openai/toolInvocation/invoking": "Closing poll...",
|
|
14129
|
+
"openai/toolInvocation/invoked": "Poll closed!"
|
|
14097
14130
|
}
|
|
14098
14131
|
}, async (args) => {
|
|
14099
14132
|
const result = await client.closePoll(args.adminToken);
|
|
@@ -14147,7 +14180,11 @@ function registerClosePoll(server, client) {
|
|
|
14147
14180
|
type: "text",
|
|
14148
14181
|
text: JSON.stringify(result.data)
|
|
14149
14182
|
}
|
|
14150
|
-
]
|
|
14183
|
+
],
|
|
14184
|
+
structuredContent: {
|
|
14185
|
+
type: "poll_closed",
|
|
14186
|
+
...result.data
|
|
14187
|
+
}
|
|
14151
14188
|
};
|
|
14152
14189
|
});
|
|
14153
14190
|
}
|
|
@@ -14158,6 +14195,10 @@ function registerReopenPoll(server, client) {
|
|
|
14158
14195
|
description: "Reopen a previously closed poll to accept votes again. Use the admin token from poll creation.",
|
|
14159
14196
|
inputSchema: {
|
|
14160
14197
|
adminToken: external_exports.string().describe("The adm_xxx token from poll creation")
|
|
14198
|
+
},
|
|
14199
|
+
_meta: {
|
|
14200
|
+
"openai/toolInvocation/invoking": "Reopening poll...",
|
|
14201
|
+
"openai/toolInvocation/invoked": "Poll reopened!"
|
|
14161
14202
|
}
|
|
14162
14203
|
}, async (args) => {
|
|
14163
14204
|
const result = await client.reopenPoll(args.adminToken);
|
|
@@ -14211,12 +14252,17 @@ function registerReopenPoll(server, client) {
|
|
|
14211
14252
|
type: "text",
|
|
14212
14253
|
text: JSON.stringify(result.data)
|
|
14213
14254
|
}
|
|
14214
|
-
]
|
|
14255
|
+
],
|
|
14256
|
+
structuredContent: {
|
|
14257
|
+
type: "poll_reopened",
|
|
14258
|
+
...result.data
|
|
14259
|
+
}
|
|
14215
14260
|
};
|
|
14216
14261
|
});
|
|
14217
14262
|
}
|
|
14218
14263
|
|
|
14219
14264
|
// src/server.ts
|
|
14265
|
+
import { McpServer } from "@modelcontextprotocol/sdk/server/mcp.js";
|
|
14220
14266
|
function createMeetLarkServer(apiUrl) {
|
|
14221
14267
|
const server = new McpServer({
|
|
14222
14268
|
name: "meetlark",
|
|
@@ -14234,5 +14280,11 @@ function createMeetLarkServer(apiUrl) {
|
|
|
14234
14280
|
|
|
14235
14281
|
export {
|
|
14236
14282
|
MeetLarkClient,
|
|
14283
|
+
registerCreatePoll,
|
|
14284
|
+
registerGetResults,
|
|
14285
|
+
registerVote,
|
|
14286
|
+
registerGetAdmin,
|
|
14287
|
+
registerClosePoll,
|
|
14288
|
+
registerReopenPoll,
|
|
14237
14289
|
createMeetLarkServer
|
|
14238
14290
|
};
|
package/dist/src/index.d.ts
CHANGED
|
@@ -23,4 +23,16 @@ declare class MeetLarkClient {
|
|
|
23
23
|
reopenPoll(adminToken: string): Promise<MeetLarkResult<unknown>>;
|
|
24
24
|
}
|
|
25
25
|
|
|
26
|
-
|
|
26
|
+
declare function registerCreatePoll(server: McpServer, client: MeetLarkClient): void;
|
|
27
|
+
|
|
28
|
+
declare function registerGetResults(server: McpServer, client: MeetLarkClient): void;
|
|
29
|
+
|
|
30
|
+
declare function registerVote(server: McpServer, client: MeetLarkClient): void;
|
|
31
|
+
|
|
32
|
+
declare function registerGetAdmin(server: McpServer, client: MeetLarkClient): void;
|
|
33
|
+
|
|
34
|
+
declare function registerClosePoll(server: McpServer, client: MeetLarkClient): void;
|
|
35
|
+
|
|
36
|
+
declare function registerReopenPoll(server: McpServer, client: MeetLarkClient): void;
|
|
37
|
+
|
|
38
|
+
export { MeetLarkClient, type MeetLarkError, type MeetLarkResult, createMeetLarkServer, registerClosePoll, registerCreatePoll, registerGetAdmin, registerGetResults, registerReopenPoll, registerVote };
|
package/dist/src/index.js
CHANGED
|
@@ -1,8 +1,20 @@
|
|
|
1
1
|
import {
|
|
2
2
|
MeetLarkClient,
|
|
3
|
-
createMeetLarkServer
|
|
4
|
-
|
|
3
|
+
createMeetLarkServer,
|
|
4
|
+
registerClosePoll,
|
|
5
|
+
registerCreatePoll,
|
|
6
|
+
registerGetAdmin,
|
|
7
|
+
registerGetResults,
|
|
8
|
+
registerReopenPoll,
|
|
9
|
+
registerVote
|
|
10
|
+
} from "../chunk-7TPOSXIQ.js";
|
|
5
11
|
export {
|
|
6
12
|
MeetLarkClient,
|
|
7
|
-
createMeetLarkServer
|
|
13
|
+
createMeetLarkServer,
|
|
14
|
+
registerClosePoll,
|
|
15
|
+
registerCreatePoll,
|
|
16
|
+
registerGetAdmin,
|
|
17
|
+
registerGetResults,
|
|
18
|
+
registerReopenPoll,
|
|
19
|
+
registerVote
|
|
8
20
|
};
|
package/package.json
CHANGED
|
@@ -1,7 +1,8 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@meetlark/mcp-server",
|
|
3
|
-
"version": "1.0.
|
|
3
|
+
"version": "1.0.3",
|
|
4
4
|
"description": "MCP server for MeetLark - agent-first meeting schedule poll - for humans and agents.",
|
|
5
|
+
"mcpName": "ai.meetlark/mcp-server",
|
|
5
6
|
"type": "module",
|
|
6
7
|
"bin": {
|
|
7
8
|
"meetlark-mcp": "./dist/bin/cli.js"
|
package/server.json
CHANGED
|
@@ -1,11 +1,21 @@
|
|
|
1
1
|
{
|
|
2
|
-
"$schema": "https://static.modelcontextprotocol.io/schemas/2025-
|
|
2
|
+
"$schema": "https://static.modelcontextprotocol.io/schemas/2025-12-11/server.schema.json",
|
|
3
3
|
"name": "ai.meetlark/mcp-server",
|
|
4
|
-
"description": "Agent-first meeting schedule
|
|
5
|
-
"version": "1.0.
|
|
4
|
+
"description": "Agent-first meeting schedule polls for humans and agents. Create polls, vote, find times.",
|
|
5
|
+
"version": "1.0.3",
|
|
6
|
+
"packages": [
|
|
7
|
+
{
|
|
8
|
+
"registryType": "npm",
|
|
9
|
+
"identifier": "@meetlark/mcp-server",
|
|
10
|
+
"version": "1.0.3",
|
|
11
|
+
"transport": {
|
|
12
|
+
"type": "stdio"
|
|
13
|
+
}
|
|
14
|
+
}
|
|
15
|
+
],
|
|
6
16
|
"remotes": [
|
|
7
17
|
{
|
|
8
|
-
"type": "
|
|
18
|
+
"type": "streamable-http",
|
|
9
19
|
"url": "https://meetlark.ai/mcp"
|
|
10
20
|
}
|
|
11
21
|
]
|
package/src/index.ts
CHANGED
|
@@ -1,3 +1,11 @@
|
|
|
1
1
|
export { createMeetLarkServer } from "./server.js";
|
|
2
2
|
export { MeetLarkClient } from "./client.js";
|
|
3
3
|
export type { MeetLarkError, MeetLarkResult } from "./client.js";
|
|
4
|
+
export {
|
|
5
|
+
registerCreatePoll,
|
|
6
|
+
registerGetResults,
|
|
7
|
+
registerVote,
|
|
8
|
+
registerGetAdmin,
|
|
9
|
+
registerClosePoll,
|
|
10
|
+
registerReopenPoll,
|
|
11
|
+
} from "./tools/index.js";
|
package/src/tools/close-poll.ts
CHANGED
|
@@ -12,6 +12,10 @@ export function registerClosePoll(server: McpServer, client: MeetLarkClient) {
|
|
|
12
12
|
.string()
|
|
13
13
|
.describe("The adm_xxx token from poll creation"),
|
|
14
14
|
},
|
|
15
|
+
_meta: {
|
|
16
|
+
"openai/toolInvocation/invoking": "Closing poll...",
|
|
17
|
+
"openai/toolInvocation/invoked": "Poll closed!",
|
|
18
|
+
},
|
|
15
19
|
}, async (args) => {
|
|
16
20
|
const result = await client.closePoll(args.adminToken);
|
|
17
21
|
|
|
@@ -70,6 +74,10 @@ export function registerClosePoll(server: McpServer, client: MeetLarkClient) {
|
|
|
70
74
|
text: JSON.stringify(result.data),
|
|
71
75
|
},
|
|
72
76
|
],
|
|
77
|
+
structuredContent: {
|
|
78
|
+
type: "poll_closed",
|
|
79
|
+
...(result.data as Record<string, unknown>),
|
|
80
|
+
},
|
|
73
81
|
};
|
|
74
82
|
});
|
|
75
83
|
}
|
package/src/tools/create-poll.ts
CHANGED
|
@@ -33,6 +33,10 @@ export function registerCreatePoll(server: McpServer, client: MeetLarkClient) {
|
|
|
33
33
|
.optional()
|
|
34
34
|
.describe("Name of the poll creator"),
|
|
35
35
|
},
|
|
36
|
+
_meta: {
|
|
37
|
+
"openai/toolInvocation/invoking": "Creating scheduling poll...",
|
|
38
|
+
"openai/toolInvocation/invoked": "Poll created!",
|
|
39
|
+
},
|
|
36
40
|
}, async (args) => {
|
|
37
41
|
const result = await client.createPoll(args);
|
|
38
42
|
|
|
@@ -79,6 +83,10 @@ export function registerCreatePoll(server: McpServer, client: MeetLarkClient) {
|
|
|
79
83
|
text: JSON.stringify(result.data),
|
|
80
84
|
},
|
|
81
85
|
],
|
|
86
|
+
structuredContent: {
|
|
87
|
+
type: "poll_created",
|
|
88
|
+
...(result.data as Record<string, unknown>),
|
|
89
|
+
},
|
|
82
90
|
};
|
|
83
91
|
});
|
|
84
92
|
}
|
package/src/tools/get-admin.ts
CHANGED
|
@@ -5,14 +5,20 @@ import type { MeetLarkClient } from "../client.js";
|
|
|
5
5
|
export function registerGetAdmin(server: McpServer, client: MeetLarkClient) {
|
|
6
6
|
server.registerTool("meetlark_get_admin_view", {
|
|
7
7
|
description:
|
|
8
|
-
"Get full poll details
|
|
9
|
-
"
|
|
10
|
-
"
|
|
8
|
+
"Get full poll details including all votes and participants. " +
|
|
9
|
+
"This is the only way to see who voted and how they voted. " +
|
|
10
|
+
"Returns poll info, time slots, every participant's votes " +
|
|
11
|
+
"(yes/maybe/no per slot), and admin URLs. Use the admin token " +
|
|
12
|
+
"from poll creation. Use this to check vote status or results.",
|
|
11
13
|
inputSchema: {
|
|
12
14
|
adminToken: z
|
|
13
15
|
.string()
|
|
14
16
|
.describe("The adm_xxx token from poll creation"),
|
|
15
17
|
},
|
|
18
|
+
_meta: {
|
|
19
|
+
"openai/toolInvocation/invoking": "Loading admin view...",
|
|
20
|
+
"openai/toolInvocation/invoked": "Admin details loaded!",
|
|
21
|
+
},
|
|
16
22
|
}, async (args) => {
|
|
17
23
|
const result = await client.getAdminView(args.adminToken);
|
|
18
24
|
|
|
@@ -59,6 +65,10 @@ export function registerGetAdmin(server: McpServer, client: MeetLarkClient) {
|
|
|
59
65
|
text: JSON.stringify(result.data),
|
|
60
66
|
},
|
|
61
67
|
],
|
|
68
|
+
structuredContent: {
|
|
69
|
+
type: "admin_view",
|
|
70
|
+
...(result.data as Record<string, unknown>),
|
|
71
|
+
},
|
|
62
72
|
};
|
|
63
73
|
});
|
|
64
74
|
}
|
package/src/tools/get-results.ts
CHANGED
|
@@ -5,14 +5,19 @@ import type { MeetLarkClient } from "../client.js";
|
|
|
5
5
|
export function registerGetResults(server: McpServer, client: MeetLarkClient) {
|
|
6
6
|
server.registerTool("meetlark_get_results", {
|
|
7
7
|
description:
|
|
8
|
-
"
|
|
9
|
-
"
|
|
10
|
-
"
|
|
8
|
+
"Get poll details and available time slots using a participation token. " +
|
|
9
|
+
"Returns the poll title, description, status, and time slots -- but NOT " +
|
|
10
|
+
"votes or participant data. This is the view a participant sees before " +
|
|
11
|
+
"voting. To see who voted and how, use meetlark_get_admin_view instead.",
|
|
11
12
|
inputSchema: {
|
|
12
13
|
participateToken: z
|
|
13
14
|
.string()
|
|
14
15
|
.describe("The prt_xxx token from the participation URL"),
|
|
15
16
|
},
|
|
17
|
+
_meta: {
|
|
18
|
+
"openai/toolInvocation/invoking": "Loading poll details...",
|
|
19
|
+
"openai/toolInvocation/invoked": "Poll details loaded!",
|
|
20
|
+
},
|
|
16
21
|
}, async (args) => {
|
|
17
22
|
const result = await client.getResults(args.participateToken);
|
|
18
23
|
|
|
@@ -59,6 +64,10 @@ export function registerGetResults(server: McpServer, client: MeetLarkClient) {
|
|
|
59
64
|
text: JSON.stringify(result.data),
|
|
60
65
|
},
|
|
61
66
|
],
|
|
67
|
+
structuredContent: {
|
|
68
|
+
type: "poll_details",
|
|
69
|
+
...(result.data as Record<string, unknown>),
|
|
70
|
+
},
|
|
62
71
|
};
|
|
63
72
|
});
|
|
64
73
|
}
|
package/src/tools/reopen-poll.ts
CHANGED
|
@@ -12,6 +12,10 @@ export function registerReopenPoll(server: McpServer, client: MeetLarkClient) {
|
|
|
12
12
|
.string()
|
|
13
13
|
.describe("The adm_xxx token from poll creation"),
|
|
14
14
|
},
|
|
15
|
+
_meta: {
|
|
16
|
+
"openai/toolInvocation/invoking": "Reopening poll...",
|
|
17
|
+
"openai/toolInvocation/invoked": "Poll reopened!",
|
|
18
|
+
},
|
|
15
19
|
}, async (args) => {
|
|
16
20
|
const result = await client.reopenPoll(args.adminToken);
|
|
17
21
|
|
|
@@ -70,6 +74,10 @@ export function registerReopenPoll(server: McpServer, client: MeetLarkClient) {
|
|
|
70
74
|
text: JSON.stringify(result.data),
|
|
71
75
|
},
|
|
72
76
|
],
|
|
77
|
+
structuredContent: {
|
|
78
|
+
type: "poll_reopened",
|
|
79
|
+
...(result.data as Record<string, unknown>),
|
|
80
|
+
},
|
|
73
81
|
};
|
|
74
82
|
});
|
|
75
83
|
}
|
package/src/tools/vote.ts
CHANGED
|
@@ -22,6 +22,10 @@ export function registerVote(server: McpServer, client: MeetLarkClient) {
|
|
|
22
22
|
)
|
|
23
23
|
.describe("Votes for each time slot"),
|
|
24
24
|
},
|
|
25
|
+
_meta: {
|
|
26
|
+
"openai/toolInvocation/invoking": "Submitting vote...",
|
|
27
|
+
"openai/toolInvocation/invoked": "Vote recorded!",
|
|
28
|
+
},
|
|
25
29
|
}, async (args) => {
|
|
26
30
|
const result = await client.vote(args.participateToken, {
|
|
27
31
|
name: args.name,
|
|
@@ -83,6 +87,10 @@ export function registerVote(server: McpServer, client: MeetLarkClient) {
|
|
|
83
87
|
text: JSON.stringify(result.data),
|
|
84
88
|
},
|
|
85
89
|
],
|
|
90
|
+
structuredContent: {
|
|
91
|
+
type: "vote_recorded",
|
|
92
|
+
...(result.data as Record<string, unknown>),
|
|
93
|
+
},
|
|
86
94
|
};
|
|
87
95
|
});
|
|
88
96
|
}
|
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
import { describe, it } from "node:test";
|
|
2
|
+
import assert from "node:assert";
|
|
3
|
+
import {
|
|
4
|
+
registerCreatePoll,
|
|
5
|
+
registerGetResults,
|
|
6
|
+
registerVote,
|
|
7
|
+
registerGetAdmin,
|
|
8
|
+
registerClosePoll,
|
|
9
|
+
registerReopenPoll,
|
|
10
|
+
} from "../src/index.ts";
|
|
11
|
+
|
|
12
|
+
describe("register* exports", () => {
|
|
13
|
+
const exports = {
|
|
14
|
+
registerCreatePoll,
|
|
15
|
+
registerGetResults,
|
|
16
|
+
registerVote,
|
|
17
|
+
registerGetAdmin,
|
|
18
|
+
registerClosePoll,
|
|
19
|
+
registerReopenPoll,
|
|
20
|
+
};
|
|
21
|
+
|
|
22
|
+
for (const [name, fn] of Object.entries(exports)) {
|
|
23
|
+
it(`${name} is importable and is a function`, () => {
|
|
24
|
+
assert.strictEqual(typeof fn, "function");
|
|
25
|
+
});
|
|
26
|
+
}
|
|
27
|
+
});
|