@kajidog/connpass-mcp-server 0.1.0
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/LICENCE +21 -0
- package/README.md +190 -0
- package/dist/apps-sdk.d.ts +8 -0
- package/dist/apps-sdk.d.ts.map +1 -0
- package/dist/apps-sdk.js +77 -0
- package/dist/apps-sdk.js.map +1 -0
- package/dist/auth/jwt.d.ts +23 -0
- package/dist/auth/jwt.d.ts.map +1 -0
- package/dist/auth/jwt.js +143 -0
- package/dist/auth/jwt.js.map +1 -0
- package/dist/config.d.ts +5 -0
- package/dist/config.d.ts.map +1 -0
- package/dist/config.js +60 -0
- package/dist/config.js.map +1 -0
- package/dist/index.d.ts +3 -0
- package/dist/index.d.ts.map +1 -0
- package/dist/index.js +178 -0
- package/dist/index.js.map +1 -0
- package/dist/session.d.ts +9 -0
- package/dist/session.d.ts.map +1 -0
- package/dist/session.js +58 -0
- package/dist/session.js.map +1 -0
- package/dist/tools/events.d.ts +82 -0
- package/dist/tools/events.d.ts.map +1 -0
- package/dist/tools/events.js +390 -0
- package/dist/tools/events.js.map +1 -0
- package/dist/tools/formatting.d.ts +74 -0
- package/dist/tools/formatting.d.ts.map +1 -0
- package/dist/tools/formatting.js +211 -0
- package/dist/tools/formatting.js.map +1 -0
- package/dist/tools/groups.d.ts +48 -0
- package/dist/tools/groups.d.ts.map +1 -0
- package/dist/tools/groups.js +115 -0
- package/dist/tools/groups.js.map +1 -0
- package/dist/tools/index.d.ts +58 -0
- package/dist/tools/index.d.ts.map +1 -0
- package/dist/tools/index.js +21 -0
- package/dist/tools/index.js.map +1 -0
- package/dist/tools/shared.d.ts +24 -0
- package/dist/tools/shared.d.ts.map +1 -0
- package/dist/tools/shared.js +136 -0
- package/dist/tools/shared.js.map +1 -0
- package/dist/tools/users.d.ts +51 -0
- package/dist/tools/users.d.ts.map +1 -0
- package/dist/tools/users.js +252 -0
- package/dist/tools/users.js.map +1 -0
- package/dist/transports/http.d.ts +17 -0
- package/dist/transports/http.d.ts.map +1 -0
- package/dist/transports/http.js +166 -0
- package/dist/transports/http.js.map +1 -0
- package/dist/transports/sse.d.ts +21 -0
- package/dist/transports/sse.d.ts.map +1 -0
- package/dist/transports/sse.js +153 -0
- package/dist/transports/sse.js.map +1 -0
- package/dist/transports/stdio.d.ts +38 -0
- package/dist/transports/stdio.d.ts.map +1 -0
- package/dist/transports/stdio.js +29 -0
- package/dist/transports/stdio.js.map +1 -0
- package/dist/widgets/connpass-events.d.ts +29 -0
- package/dist/widgets/connpass-events.d.ts.map +1 -0
- package/dist/widgets/connpass-events.html +2269 -0
- package/dist/widgets/connpass-events.js +58 -0
- package/dist/widgets/connpass-events.js.map +1 -0
- package/dist/widgets/index.d.ts +6 -0
- package/dist/widgets/index.d.ts.map +1 -0
- package/dist/widgets/index.js +31 -0
- package/dist/widgets/index.js.map +1 -0
- package/package.json +58 -0
|
@@ -0,0 +1,211 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.truncateText = truncateText;
|
|
4
|
+
exports.stripHtml = stripHtml;
|
|
5
|
+
exports.sanitizeRichText = sanitizeRichText;
|
|
6
|
+
exports.formatPresentation = formatPresentation;
|
|
7
|
+
exports.formatPresentationsResponse = formatPresentationsResponse;
|
|
8
|
+
exports.formatEvent = formatEvent;
|
|
9
|
+
exports.formatEventsResponse = formatEventsResponse;
|
|
10
|
+
exports.formatEventList = formatEventList;
|
|
11
|
+
const HTML_ENTITY_MAP = {
|
|
12
|
+
" ": " ",
|
|
13
|
+
"&": "&",
|
|
14
|
+
"<": "<",
|
|
15
|
+
">": ">",
|
|
16
|
+
""": '"',
|
|
17
|
+
""": '"',
|
|
18
|
+
"'": "'",
|
|
19
|
+
"'": "'",
|
|
20
|
+
"`": "`",
|
|
21
|
+
};
|
|
22
|
+
function truncateText(text, limit) {
|
|
23
|
+
if (!text) {
|
|
24
|
+
return "";
|
|
25
|
+
}
|
|
26
|
+
if (text.length <= limit) {
|
|
27
|
+
return text;
|
|
28
|
+
}
|
|
29
|
+
if (limit <= 3) {
|
|
30
|
+
return text.slice(0, limit);
|
|
31
|
+
}
|
|
32
|
+
return `${text.slice(0, limit - 3).trimEnd()}...`;
|
|
33
|
+
}
|
|
34
|
+
function decodeHtmlEntities(input) {
|
|
35
|
+
return input
|
|
36
|
+
.replace(/&(#x?[0-9a-fA-F]+|[a-zA-Z]+);/g, (entity) => {
|
|
37
|
+
const mapped = HTML_ENTITY_MAP[entity];
|
|
38
|
+
if (mapped) {
|
|
39
|
+
return mapped;
|
|
40
|
+
}
|
|
41
|
+
const numericMatch = entity.match(/^&#(x?[0-9a-fA-F]+);$/);
|
|
42
|
+
if (!numericMatch) {
|
|
43
|
+
return entity;
|
|
44
|
+
}
|
|
45
|
+
const value = numericMatch[1];
|
|
46
|
+
const codePoint = value.startsWith("x") || value.startsWith("X")
|
|
47
|
+
? Number.parseInt(value.slice(1), 16)
|
|
48
|
+
: Number.parseInt(value, 10);
|
|
49
|
+
if (!Number.isFinite(codePoint)) {
|
|
50
|
+
return entity;
|
|
51
|
+
}
|
|
52
|
+
try {
|
|
53
|
+
return String.fromCodePoint(codePoint);
|
|
54
|
+
}
|
|
55
|
+
catch (error) {
|
|
56
|
+
return entity;
|
|
57
|
+
}
|
|
58
|
+
})
|
|
59
|
+
.replace(/\u00a0/gi, " ");
|
|
60
|
+
}
|
|
61
|
+
function stripHtml(input) {
|
|
62
|
+
if (!input) {
|
|
63
|
+
return "";
|
|
64
|
+
}
|
|
65
|
+
const withoutScripts = input.replace(/<script[\s\S]*?<\/script>/gi, "");
|
|
66
|
+
const withoutStyles = withoutScripts.replace(/<style[\s\S]*?<\/style>/gi, "");
|
|
67
|
+
const withLineBreaks = withoutStyles
|
|
68
|
+
.replace(/<br\s*\/?\s*>/gi, "\n")
|
|
69
|
+
.replace(/<\/(p|div|section|article|header|footer|li)>/gi, "\n")
|
|
70
|
+
.replace(/<li[^>]*>/gi, "- ")
|
|
71
|
+
.replace(/<\/(h[1-6]|tr)>/gi, "\n");
|
|
72
|
+
const withoutTags = withLineBreaks.replace(/<[^>]+>/g, "");
|
|
73
|
+
return decodeHtmlEntities(withoutTags);
|
|
74
|
+
}
|
|
75
|
+
function sanitizeRichText(input) {
|
|
76
|
+
if (!input) {
|
|
77
|
+
return "";
|
|
78
|
+
}
|
|
79
|
+
const stripped = stripHtml(input);
|
|
80
|
+
const normalizedWhitespace = stripped
|
|
81
|
+
.replace(/\r/g, "\n")
|
|
82
|
+
.split(/\n+/)
|
|
83
|
+
.map((line) => line.trim())
|
|
84
|
+
.filter(Boolean)
|
|
85
|
+
.join("\n");
|
|
86
|
+
return normalizedWhitespace.replace(/[\t ]+/g, " ").trim();
|
|
87
|
+
}
|
|
88
|
+
function formatPresentation(presentation, descriptionLimit) {
|
|
89
|
+
const summary = sanitizeRichText(presentation.description);
|
|
90
|
+
const formatted = {
|
|
91
|
+
id: presentation.id,
|
|
92
|
+
title: presentation.title.trim(),
|
|
93
|
+
speaker: presentation.speakerName,
|
|
94
|
+
order: presentation.order,
|
|
95
|
+
updatedAt: presentation.updatedAt,
|
|
96
|
+
};
|
|
97
|
+
const processedSummary = typeof descriptionLimit === "number" && descriptionLimit > 0
|
|
98
|
+
? truncateText(summary, descriptionLimit)
|
|
99
|
+
: summary;
|
|
100
|
+
if (processedSummary) {
|
|
101
|
+
formatted.summary = processedSummary;
|
|
102
|
+
}
|
|
103
|
+
const links = {
|
|
104
|
+
url: presentation.url,
|
|
105
|
+
slideshare: presentation.slideshareUrl,
|
|
106
|
+
youtube: presentation.youtubeUrl,
|
|
107
|
+
twitter: presentation.twitterUrl,
|
|
108
|
+
};
|
|
109
|
+
if (links.url || links.slideshare || links.youtube || links.twitter) {
|
|
110
|
+
formatted.links = links;
|
|
111
|
+
}
|
|
112
|
+
return formatted;
|
|
113
|
+
}
|
|
114
|
+
function formatPresentationsResponse(response, options) {
|
|
115
|
+
const descriptionLimit = options?.presentationDescriptionLimit;
|
|
116
|
+
return {
|
|
117
|
+
returned: response.presentationsReturned,
|
|
118
|
+
presentations: response.presentations.map((presentation) => formatPresentation(presentation, descriptionLimit)),
|
|
119
|
+
};
|
|
120
|
+
}
|
|
121
|
+
function formatEvent(event, options) {
|
|
122
|
+
const descriptionLimit = options?.descriptionLimit;
|
|
123
|
+
const catchPhraseLimit = options?.catchPhraseLimit;
|
|
124
|
+
const presentationDescriptionLimit = options?.presentationDescriptionLimit;
|
|
125
|
+
const catchPhrase = sanitizeRichText(event.catchPhrase);
|
|
126
|
+
const description = sanitizeRichText(event.description);
|
|
127
|
+
const participants = {
|
|
128
|
+
accepted: event.participantCount,
|
|
129
|
+
waiting: event.waitingCount,
|
|
130
|
+
};
|
|
131
|
+
if (typeof event.limit === "number") {
|
|
132
|
+
participants.limit = event.limit;
|
|
133
|
+
}
|
|
134
|
+
const formatted = {
|
|
135
|
+
id: event.id,
|
|
136
|
+
title: event.title.trim(),
|
|
137
|
+
url: event.url,
|
|
138
|
+
schedule: {
|
|
139
|
+
start: event.startedAt,
|
|
140
|
+
end: event.endedAt,
|
|
141
|
+
},
|
|
142
|
+
owner: {
|
|
143
|
+
nickname: event.ownerNickname,
|
|
144
|
+
displayName: event.ownerDisplayName,
|
|
145
|
+
},
|
|
146
|
+
participants,
|
|
147
|
+
updatedAt: event.updatedAt,
|
|
148
|
+
};
|
|
149
|
+
if (event.hashTag) {
|
|
150
|
+
formatted.hashTag = event.hashTag;
|
|
151
|
+
}
|
|
152
|
+
if (event.imageUrl) {
|
|
153
|
+
formatted.imageUrl = event.imageUrl;
|
|
154
|
+
}
|
|
155
|
+
const processedCatchPhrase = typeof catchPhraseLimit === "number" && catchPhraseLimit > 0
|
|
156
|
+
? truncateText(catchPhrase, catchPhraseLimit)
|
|
157
|
+
: catchPhrase;
|
|
158
|
+
if (processedCatchPhrase) {
|
|
159
|
+
formatted.catchPhrase = processedCatchPhrase;
|
|
160
|
+
}
|
|
161
|
+
const processedDescription = typeof descriptionLimit === "number" && descriptionLimit > 0
|
|
162
|
+
? truncateText(description, descriptionLimit)
|
|
163
|
+
: description;
|
|
164
|
+
if (processedDescription) {
|
|
165
|
+
formatted.summary = processedDescription;
|
|
166
|
+
}
|
|
167
|
+
if (event.place || event.address) {
|
|
168
|
+
const location = {};
|
|
169
|
+
if (event.place) {
|
|
170
|
+
location.place = event.place;
|
|
171
|
+
}
|
|
172
|
+
if (event.address) {
|
|
173
|
+
location.address = event.address;
|
|
174
|
+
}
|
|
175
|
+
if (Object.keys(location).length > 0) {
|
|
176
|
+
formatted.location = location;
|
|
177
|
+
}
|
|
178
|
+
}
|
|
179
|
+
if (event.groupId || event.groupTitle || event.groupUrl) {
|
|
180
|
+
const group = {};
|
|
181
|
+
if (typeof event.groupId === "number") {
|
|
182
|
+
group.id = event.groupId;
|
|
183
|
+
}
|
|
184
|
+
if (event.groupTitle) {
|
|
185
|
+
group.title = event.groupTitle;
|
|
186
|
+
}
|
|
187
|
+
if (event.groupUrl) {
|
|
188
|
+
group.url = event.groupUrl;
|
|
189
|
+
}
|
|
190
|
+
if (Object.keys(group).length > 0) {
|
|
191
|
+
formatted.group = group;
|
|
192
|
+
}
|
|
193
|
+
}
|
|
194
|
+
const eventWithPresentations = event;
|
|
195
|
+
if (eventWithPresentations.presentations?.length) {
|
|
196
|
+
formatted.presentations = eventWithPresentations.presentations.map((presentation) => formatPresentation(presentation, presentationDescriptionLimit));
|
|
197
|
+
}
|
|
198
|
+
return formatted;
|
|
199
|
+
}
|
|
200
|
+
function formatEventsResponse(response, options) {
|
|
201
|
+
return {
|
|
202
|
+
returned: response.eventsReturned,
|
|
203
|
+
available: response.eventsAvailable,
|
|
204
|
+
start: response.eventsStart,
|
|
205
|
+
events: response.events.map((event) => formatEvent(event, options)),
|
|
206
|
+
};
|
|
207
|
+
}
|
|
208
|
+
function formatEventList(events, options) {
|
|
209
|
+
return events.map((event) => formatEvent(event, options));
|
|
210
|
+
}
|
|
211
|
+
//# sourceMappingURL=formatting.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"formatting.js","sourceRoot":"","sources":["../../src/tools/formatting.ts"],"names":[],"mappings":";;AAsFA,oCAcC;AAiCD,8BAgBC;AAED,4CAcC;AAED,gDAmCC;AAED,kEAYC;AAED,kCAmGC;AAED,oDAUC;AAED,0CAKC;AAzUD,MAAM,eAAe,GAA2B;IAC9C,QAAQ,EAAE,GAAG;IACb,OAAO,EAAE,GAAG;IACZ,MAAM,EAAE,GAAG;IACX,MAAM,EAAE,GAAG;IACX,QAAQ,EAAE,GAAG;IACb,OAAO,EAAE,GAAG;IACZ,OAAO,EAAE,GAAG;IACZ,QAAQ,EAAE,GAAG;IACb,QAAQ,EAAE,GAAG;CACd,CAAC;AAqEF,SAAgB,YAAY,CAAC,IAAY,EAAE,KAAa;IACtD,IAAI,CAAC,IAAI,EAAE,CAAC;QACV,OAAO,EAAE,CAAC;IACZ,CAAC;IAED,IAAI,IAAI,CAAC,MAAM,IAAI,KAAK,EAAE,CAAC;QACzB,OAAO,IAAI,CAAC;IACd,CAAC;IAED,IAAI,KAAK,IAAI,CAAC,EAAE,CAAC;QACf,OAAO,IAAI,CAAC,KAAK,CAAC,CAAC,EAAE,KAAK,CAAC,CAAC;IAC9B,CAAC;IAED,OAAO,GAAG,IAAI,CAAC,KAAK,CAAC,CAAC,EAAE,KAAK,GAAG,CAAC,CAAC,CAAC,OAAO,EAAE,KAAK,CAAC;AACpD,CAAC;AAED,SAAS,kBAAkB,CAAC,KAAa;IACvC,OAAO,KAAK;SACT,OAAO,CAAC,gCAAgC,EAAE,CAAC,MAAM,EAAE,EAAE;QACpD,MAAM,MAAM,GAAG,eAAe,CAAC,MAAM,CAAC,CAAC;QACvC,IAAI,MAAM,EAAE,CAAC;YACX,OAAO,MAAM,CAAC;QAChB,CAAC;QAED,MAAM,YAAY,GAAG,MAAM,CAAC,KAAK,CAAC,uBAAuB,CAAC,CAAC;QAC3D,IAAI,CAAC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BAAkB,CAAC,YAAY,EAAE,4BAA4B,CAAC,CAC/D,CAAC;IACJ,CAAC;IAED,OAAO,SAAS,CAAC;AACnB,CAAC;AAED,SAAgB,oBAAoB,CAClC,QAAwB,EACxB,OAA4B;IAE5B,OAAO;QACL,QAAQ,EAAE,QAAQ,CAAC,cAAc;QACjC,SAAS,EAAE,QAAQ,CAAC,eAAe;QACnC,KAAK,EAAE,QAAQ,CAAC,WAAW;QAC3B,MAAM,EAAE,QAAQ,CAAC,MAAM,CAAC,GAAG,CAAC,CAAC,KAAK,EAAE,EAAE,CAAC,WAAW,CAAC,KAAK,EAAE,OAAO,CAAC,CAAC;KACpE,CAAC;AACJ,CAAC;AAED,SAAgB,eAAe,CAC7B,MAA8E,EAC9E,OAA4B;IAE5B,OAAO,MAAM,CAAC,GAAG,CAAC,CAAC,KAAK,EAAE,EAAE,CAAC,WAAW,CAAC,KAAK,EAAE,OAAO,CAAC,CAAC,CAAC;AAC5D,CAAC"}
|
|
@@ -0,0 +1,48 @@
|
|
|
1
|
+
import { ConnpassClient } from "@kajidog/connpass-api-client";
|
|
2
|
+
declare const groupHandlers: {
|
|
3
|
+
search_groups(args: unknown, connpassClient: ConnpassClient): Promise<import("@kajidog/connpass-api-client").GroupsResponse>;
|
|
4
|
+
};
|
|
5
|
+
export type GroupToolName = keyof typeof groupHandlers;
|
|
6
|
+
export declare const groupTools: {
|
|
7
|
+
[x: string]: unknown;
|
|
8
|
+
name: string;
|
|
9
|
+
inputSchema: {
|
|
10
|
+
[x: string]: unknown;
|
|
11
|
+
type: "object";
|
|
12
|
+
properties?: {
|
|
13
|
+
[x: string]: unknown;
|
|
14
|
+
} | undefined;
|
|
15
|
+
required?: string[] | undefined;
|
|
16
|
+
};
|
|
17
|
+
title?: string | undefined;
|
|
18
|
+
description?: string | undefined;
|
|
19
|
+
outputSchema?: {
|
|
20
|
+
[x: string]: unknown;
|
|
21
|
+
type: "object";
|
|
22
|
+
properties?: {
|
|
23
|
+
[x: string]: unknown;
|
|
24
|
+
} | undefined;
|
|
25
|
+
required?: string[] | undefined;
|
|
26
|
+
} | undefined;
|
|
27
|
+
annotations?: {
|
|
28
|
+
[x: string]: unknown;
|
|
29
|
+
title?: string | undefined;
|
|
30
|
+
readOnlyHint?: boolean | undefined;
|
|
31
|
+
destructiveHint?: boolean | undefined;
|
|
32
|
+
idempotentHint?: boolean | undefined;
|
|
33
|
+
openWorldHint?: boolean | undefined;
|
|
34
|
+
} | undefined;
|
|
35
|
+
_meta?: {
|
|
36
|
+
[x: string]: unknown;
|
|
37
|
+
} | undefined;
|
|
38
|
+
icons?: {
|
|
39
|
+
[x: string]: unknown;
|
|
40
|
+
src: string;
|
|
41
|
+
mimeType?: string | undefined;
|
|
42
|
+
sizes?: string[] | undefined;
|
|
43
|
+
}[] | undefined;
|
|
44
|
+
}[];
|
|
45
|
+
export declare function isGroupTool(name: string): name is GroupToolName;
|
|
46
|
+
export declare function handleGroupTool(name: GroupToolName, args: unknown, connpassClient: ConnpassClient): Promise<import("@kajidog/connpass-api-client").GroupsResponse>;
|
|
47
|
+
export {};
|
|
48
|
+
//# sourceMappingURL=groups.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"groups.d.ts","sourceRoot":"","sources":["../../src/tools/groups.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,cAAc,EAAE,MAAM,8BAA8B,CAAC;AAyG9D,QAAA,MAAM,aAAa;wBACS,OAAO,kBAAkB,cAAc;CAKlE,CAAC;AAEF,MAAM,MAAM,aAAa,GAAG,MAAM,OAAO,aAAa,CAAC;AAEvD,eAAO,MAAM,UAAU;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAAqB,CAAC;AAE7C,wBAAgB,WAAW,CAAC,IAAI,EAAE,MAAM,GAAG,IAAI,IAAI,aAAa,CAE/D;AAED,wBAAsB,eAAe,CACnC,IAAI,EAAE,aAAa,EACnB,IAAI,EAAE,OAAO,EACb,cAAc,EAAE,cAAc,kEAG/B"}
|
|
@@ -0,0 +1,115 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.groupTools = void 0;
|
|
4
|
+
exports.isGroupTool = isGroupTool;
|
|
5
|
+
exports.handleGroupTool = handleGroupTool;
|
|
6
|
+
const zod_1 = require("zod");
|
|
7
|
+
const shared_js_1 = require("./shared.js");
|
|
8
|
+
const GroupSearchInputSchema = zod_1.z.object({
|
|
9
|
+
query: zod_1.z
|
|
10
|
+
.string()
|
|
11
|
+
.min(1)
|
|
12
|
+
.describe("Search for groups whose title or description matches all keywords")
|
|
13
|
+
.optional(),
|
|
14
|
+
groupIds: zod_1.z
|
|
15
|
+
.array(zod_1.z.number())
|
|
16
|
+
.describe("Limit results to these group IDs")
|
|
17
|
+
.optional(),
|
|
18
|
+
country: zod_1.z
|
|
19
|
+
.string()
|
|
20
|
+
.min(1)
|
|
21
|
+
.describe("ISO country code, e.g. 'JP'")
|
|
22
|
+
.optional(),
|
|
23
|
+
prefecture: zod_1.z
|
|
24
|
+
.string()
|
|
25
|
+
.min(1)
|
|
26
|
+
.describe("Prefecture name to filter by")
|
|
27
|
+
.optional(),
|
|
28
|
+
page: zod_1.z
|
|
29
|
+
.number()
|
|
30
|
+
.int()
|
|
31
|
+
.min(1)
|
|
32
|
+
.describe("1-based page number")
|
|
33
|
+
.optional(),
|
|
34
|
+
pageSize: zod_1.z
|
|
35
|
+
.number()
|
|
36
|
+
.int()
|
|
37
|
+
.min(1)
|
|
38
|
+
.max(100)
|
|
39
|
+
.describe("How many groups per page (default 20)")
|
|
40
|
+
.optional(),
|
|
41
|
+
sort: zod_1.z
|
|
42
|
+
.enum(shared_js_1.GROUP_SORT_KEYS)
|
|
43
|
+
.describe("Ranking by activity, members, or recency")
|
|
44
|
+
.optional(),
|
|
45
|
+
});
|
|
46
|
+
function buildGroupSearchParams(input, options) {
|
|
47
|
+
const pagination = (0, shared_js_1.applyPagination)(input.page, input.pageSize, options);
|
|
48
|
+
return {
|
|
49
|
+
keyword: input.query,
|
|
50
|
+
groupId: input.groupIds,
|
|
51
|
+
countryCode: input.country,
|
|
52
|
+
prefecture: input.prefecture,
|
|
53
|
+
order: input.sort ? shared_js_1.GROUP_SORT_MAP[input.sort] : undefined,
|
|
54
|
+
...pagination,
|
|
55
|
+
};
|
|
56
|
+
}
|
|
57
|
+
const groupToolsInternal = [
|
|
58
|
+
{
|
|
59
|
+
name: "search_groups",
|
|
60
|
+
description: "Find Connpass groups with simple filters",
|
|
61
|
+
inputSchema: {
|
|
62
|
+
type: "object",
|
|
63
|
+
properties: {
|
|
64
|
+
query: {
|
|
65
|
+
type: "string",
|
|
66
|
+
description: "Keywords that must match the group title or description",
|
|
67
|
+
},
|
|
68
|
+
groupIds: {
|
|
69
|
+
type: "array",
|
|
70
|
+
items: { type: "number" },
|
|
71
|
+
description: "Only show these specific group IDs",
|
|
72
|
+
},
|
|
73
|
+
country: {
|
|
74
|
+
type: "string",
|
|
75
|
+
description: "ISO country code, e.g. 'JP'",
|
|
76
|
+
},
|
|
77
|
+
prefecture: {
|
|
78
|
+
type: "string",
|
|
79
|
+
description: "Prefecture name to filter by",
|
|
80
|
+
},
|
|
81
|
+
page: {
|
|
82
|
+
type: "integer",
|
|
83
|
+
minimum: 1,
|
|
84
|
+
description: "1-based page number (default 1)",
|
|
85
|
+
},
|
|
86
|
+
pageSize: {
|
|
87
|
+
type: "integer",
|
|
88
|
+
minimum: 1,
|
|
89
|
+
maximum: 100,
|
|
90
|
+
description: "Groups per page (default 20)",
|
|
91
|
+
},
|
|
92
|
+
sort: {
|
|
93
|
+
type: "string",
|
|
94
|
+
enum: [...shared_js_1.GROUP_SORT_KEYS],
|
|
95
|
+
description: "Rank by activity, member count, or recency",
|
|
96
|
+
},
|
|
97
|
+
},
|
|
98
|
+
},
|
|
99
|
+
},
|
|
100
|
+
];
|
|
101
|
+
const groupHandlers = {
|
|
102
|
+
async search_groups(args, connpassClient) {
|
|
103
|
+
const params = GroupSearchInputSchema.parse(args ?? {});
|
|
104
|
+
const searchParams = buildGroupSearchParams(params);
|
|
105
|
+
return connpassClient.searchGroups(searchParams);
|
|
106
|
+
},
|
|
107
|
+
};
|
|
108
|
+
exports.groupTools = groupToolsInternal;
|
|
109
|
+
function isGroupTool(name) {
|
|
110
|
+
return name in groupHandlers;
|
|
111
|
+
}
|
|
112
|
+
async function handleGroupTool(name, args, connpassClient) {
|
|
113
|
+
return groupHandlers[name](args, connpassClient);
|
|
114
|
+
}
|
|
115
|
+
//# sourceMappingURL=groups.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"groups.js","sourceRoot":"","sources":["../../src/tools/groups.ts"],"names":[],"mappings":";;;AAuHA,kCAEC;AAED,0CAMC;AAhID,6BAAwB;AAGxB,2CAA6F;AAE7F,MAAM,sBAAsB,GAAG,OAAC,CAAC,MAAM,CAAC;IACtC,KAAK,EAAE,OAAC;SACL,MAAM,EAAE;SACR,GAAG,CAAC,CAAC,CAAC;SACN,QAAQ,CAAC,mEAAmE,CAAC;SAC7E,QAAQ,EAAE;IACb,QAAQ,EAAE,OAAC;SACR,KAAK,CAAC,OAAC,CAAC,MAAM,EAAE,CAAC;SACjB,QAAQ,CAAC,kCAAkC,CAAC;SAC5C,QAAQ,EAAE;IACb,OAAO,EAAE,OAAC;SACP,MAAM,EAAE;SACR,GAAG,CAAC,CAAC,CAAC;SACN,QAAQ,CAAC,6BAA6B,CAAC;SACvC,QAAQ,EAAE;IACb,UAAU,EAAE,OAAC;SACV,MAAM,EAAE;SACR,GAAG,CAAC,CAAC,CAAC;SACN,QAAQ,CAAC,8BAA8B,CAAC;SACxC,QAAQ,EAAE;IACb,IAAI,EAAE,OAAC;SACJ,MAAM,EAAE;SACR,GAAG,EAAE;SACL,GAAG,CAAC,CAAC,CAAC;SACN,QAAQ,CAAC,qBAAqB,CAAC;SAC/B,QAAQ,EAAE;IACb,QAAQ,EAAE,OAAC;SACR,MAAM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C;gBACD,IAAI,EAAE;oBACJ,IAAI,EAAE,SAAS;oBACf,OAAO,EAAE,CAAC;oBACV,WAAW,EAAE,iCAAiC;iBAC/C;gBACD,QAAQ,EAAE;oBACR,IAAI,EAAE,SAAS;oBACf,OAAO,EAAE,CAAC;oBACV,OAAO,EAAE,GAAG;oBACZ,WAAW,EAAE,8BAA8B;iBAC5C;gBACD,IAAI,EAAE;oBACJ,IAAI,EAAE,QAAQ;oBACd,IAAI,EAAE,CAAC,GAAG,2BAAe,CAAC;oBAC1B,WAAW,EAAE,4CAA4C;iBAC1D;aACF;SACF;KACF;CACF,CAAC;AAEF,MAAM,aAAa,GAAG;IACpB,KAAK,CAAC,aAAa,CAAC,IAAa,EAAE,cAA8B;QAC/D,MAAM,MAAM,GAAG,sBAAsB,CAAC,KAAK,CAAC,IAAI,IAAI,EAAE,CAAC,CAAC;QACxD,MAAM,YAAY,GAAG,sBAAsB,CAAC,MAAM,CAAC,CAAC;QACpD,OAAO,cAAc,CAAC,YAAY,CAAC,YAAY,CAAC,CAAC;IACnD,CAAC;CACF,CAAC;AAIW,QAAA,UAAU,GAAG,kBAAkB,CAAC;AAE7C,SAAgB,WAAW,CAAC,IAAY;IACtC,OAAO,IAAI,IAAI,aAAa,CAAC;AAC/B,CAAC;AAEM,KAAK,UAAU,eAAe,CACnC,IAAmB,EACnB,IAAa,EACb,cAA8B;IAE9B,OAAO,aAAa,CAAC,IAAI,CAAC,CAAC,IAAI,EAAE,cAAc,CAAC,CAAC;AACnD,CAAC"}
|
|
@@ -0,0 +1,58 @@
|
|
|
1
|
+
import { ConnpassClient } from "@kajidog/connpass-api-client";
|
|
2
|
+
export declare const tools: {
|
|
3
|
+
[x: string]: unknown;
|
|
4
|
+
name: string;
|
|
5
|
+
inputSchema: {
|
|
6
|
+
[x: string]: unknown;
|
|
7
|
+
type: "object";
|
|
8
|
+
properties?: {
|
|
9
|
+
[x: string]: unknown;
|
|
10
|
+
} | undefined;
|
|
11
|
+
required?: string[] | undefined;
|
|
12
|
+
};
|
|
13
|
+
title?: string | undefined;
|
|
14
|
+
description?: string | undefined;
|
|
15
|
+
outputSchema?: {
|
|
16
|
+
[x: string]: unknown;
|
|
17
|
+
type: "object";
|
|
18
|
+
properties?: {
|
|
19
|
+
[x: string]: unknown;
|
|
20
|
+
} | undefined;
|
|
21
|
+
required?: string[] | undefined;
|
|
22
|
+
} | undefined;
|
|
23
|
+
annotations?: {
|
|
24
|
+
[x: string]: unknown;
|
|
25
|
+
title?: string | undefined;
|
|
26
|
+
readOnlyHint?: boolean | undefined;
|
|
27
|
+
destructiveHint?: boolean | undefined;
|
|
28
|
+
idempotentHint?: boolean | undefined;
|
|
29
|
+
openWorldHint?: boolean | undefined;
|
|
30
|
+
} | undefined;
|
|
31
|
+
_meta?: {
|
|
32
|
+
[x: string]: unknown;
|
|
33
|
+
} | undefined;
|
|
34
|
+
icons?: {
|
|
35
|
+
[x: string]: unknown;
|
|
36
|
+
src: string;
|
|
37
|
+
mimeType?: string | undefined;
|
|
38
|
+
sizes?: string[] | undefined;
|
|
39
|
+
}[] | undefined;
|
|
40
|
+
}[];
|
|
41
|
+
export declare function handleToolCall(name: string, args: unknown, connpassClient: ConnpassClient): Promise<import("@kajidog/connpass-api-client").EventsResponse | import("./formatting.js").FormattedEventsResponse | import("./formatting.js").FormattedPresentationsResponse | import("@kajidog/connpass-api-client").UsersResponse | {
|
|
42
|
+
userId: number;
|
|
43
|
+
today: {
|
|
44
|
+
date: string;
|
|
45
|
+
events: import("./formatting.js").FormattedEvent[];
|
|
46
|
+
};
|
|
47
|
+
upcoming: {
|
|
48
|
+
rangeEnd: string;
|
|
49
|
+
events: import("./formatting.js").FormattedEvent[];
|
|
50
|
+
};
|
|
51
|
+
metadata: {
|
|
52
|
+
inspected: number;
|
|
53
|
+
limit: number;
|
|
54
|
+
daysAhead: number;
|
|
55
|
+
includePresentations: boolean;
|
|
56
|
+
};
|
|
57
|
+
} | import("@kajidog/connpass-api-client").GroupsResponse>;
|
|
58
|
+
//# sourceMappingURL=index.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/tools/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,cAAc,EAAE,MAAM,8BAA8B,CAAC;AAM9D,eAAO,MAAM,KAAK;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAA+C,CAAC;AAElE,wBAAsB,cAAc,CAAC,IAAI,EAAE,MAAM,EAAE,IAAI,EAAE,OAAO,EAAE,cAAc,EAAE,cAAc;;;;;;;;;;;;;;;;2DAc/F"}
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.tools = void 0;
|
|
4
|
+
exports.handleToolCall = handleToolCall;
|
|
5
|
+
const events_js_1 = require("./events.js");
|
|
6
|
+
const groups_js_1 = require("./groups.js");
|
|
7
|
+
const users_js_1 = require("./users.js");
|
|
8
|
+
exports.tools = [...events_js_1.eventTools, ...groups_js_1.groupTools, ...users_js_1.userTools];
|
|
9
|
+
async function handleToolCall(name, args, connpassClient) {
|
|
10
|
+
if ((0, events_js_1.isEventTool)(name)) {
|
|
11
|
+
return (0, events_js_1.handleEventTool)(name, args, connpassClient);
|
|
12
|
+
}
|
|
13
|
+
if ((0, groups_js_1.isGroupTool)(name)) {
|
|
14
|
+
return (0, groups_js_1.handleGroupTool)(name, args, connpassClient);
|
|
15
|
+
}
|
|
16
|
+
if ((0, users_js_1.isUserTool)(name)) {
|
|
17
|
+
return (0, users_js_1.handleUserTool)(name, args, connpassClient);
|
|
18
|
+
}
|
|
19
|
+
throw new Error(`Unknown tool: ${name}`);
|
|
20
|
+
}
|
|
21
|
+
//# sourceMappingURL=index.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/tools/index.ts"],"names":[],"mappings":";;;AAQA,wCAcC;AApBD,2CAAuE;AACvE,2CAAuE;AACvE,yCAAmE;AAEtD,QAAA,KAAK,GAAG,CAAC,GAAG,sBAAU,EAAE,GAAG,sBAAU,EAAE,GAAG,oBAAS,CAAC,CAAC;AAE3D,KAAK,UAAU,cAAc,CAAC,IAAY,EAAE,IAAa,EAAE,cAA8B;IAC9F,IAAI,IAAA,uBAAW,EAAC,IAAI,CAAC,EAAE,CAAC;QACtB,OAAO,IAAA,2BAAe,EAAC,IAAI,EAAE,IAAI,EAAE,cAAc,CAAC,CAAC;IACrD,CAAC;IAED,IAAI,IAAA,uBAAW,EAAC,IAAI,CAAC,EAAE,CAAC;QACtB,OAAO,IAAA,2BAAe,EAAC,IAAI,EAAE,IAAI,EAAE,cAAc,CAAC,CAAC;IACrD,CAAC;IAED,IAAI,IAAA,qBAAU,EAAC,IAAI,CAAC,EAAE,CAAC;QACrB,OAAO,IAAA,yBAAc,EAAC,IAAI,EAAE,IAAI,EAAE,cAAc,CAAC,CAAC;IACpD,CAAC;IAED,MAAM,IAAI,KAAK,CAAC,iBAAiB,IAAI,EAAE,CAAC,CAAC;AAC3C,CAAC"}
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
export declare const DEFAULT_PAGE_SIZE = 20;
|
|
2
|
+
export declare const EVENT_SORT_KEYS: readonly ["start-date-asc", "start-date-desc", "newly-added"];
|
|
3
|
+
export type EventSortKey = (typeof EVENT_SORT_KEYS)[number];
|
|
4
|
+
export declare const EVENT_SORT_MAP: Record<EventSortKey, 1 | 2 | 3>;
|
|
5
|
+
export declare const GROUP_SORT_KEYS: readonly ["most-events", "most-members", "newly-added"];
|
|
6
|
+
export type GroupSortKey = (typeof GROUP_SORT_KEYS)[number];
|
|
7
|
+
export declare const GROUP_SORT_MAP: Record<GroupSortKey, 1 | 2 | 3>;
|
|
8
|
+
export declare const USER_SORT_KEYS: readonly ["most-events", "most-followers", "newly-added"];
|
|
9
|
+
export type UserSortKey = (typeof USER_SORT_KEYS)[number];
|
|
10
|
+
export declare const USER_SORT_MAP: Record<UserSortKey, 1 | 2 | 3>;
|
|
11
|
+
export declare function parseDateInput(input: string, options?: {
|
|
12
|
+
style?: "compact" | "hyphenated";
|
|
13
|
+
}): string;
|
|
14
|
+
export declare function toYmdArray(value?: string | string[]): string[] | undefined;
|
|
15
|
+
export declare function parseHyphenatedDate(input: string): string;
|
|
16
|
+
export declare function normalizeStringArray(value?: string | string[]): string[] | undefined;
|
|
17
|
+
export type PaginationParams = {
|
|
18
|
+
start?: number;
|
|
19
|
+
count?: number;
|
|
20
|
+
};
|
|
21
|
+
export declare function applyPagination(page: number | undefined, pageSize: number | undefined, options?: {
|
|
22
|
+
includePagination?: boolean;
|
|
23
|
+
}): PaginationParams;
|
|
24
|
+
//# sourceMappingURL=shared.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"shared.d.ts","sourceRoot":"","sources":["../../src/tools/shared.ts"],"names":[],"mappings":"AAAA,eAAO,MAAM,iBAAiB,KAAK,CAAC;AAEpC,eAAO,MAAM,eAAe,+DAIlB,CAAC;AACX,MAAM,MAAM,YAAY,GAAG,CAAC,OAAO,eAAe,CAAC,CAAC,MAAM,CAAC,CAAC;AAC5D,eAAO,MAAM,cAAc,EAAE,MAAM,CAAC,YAAY,EAAE,CAAC,GAAG,CAAC,GAAG,CAAC,CAI1D,CAAC;AAEF,eAAO,MAAM,eAAe,yDAIlB,CAAC;AACX,MAAM,MAAM,YAAY,GAAG,CAAC,OAAO,eAAe,CAAC,CAAC,MAAM,CAAC,CAAC;AAC5D,eAAO,MAAM,cAAc,EAAE,MAAM,CAAC,YAAY,EAAE,CAAC,GAAG,CAAC,GAAG,CAAC,CAI1D,CAAC;AAEF,eAAO,MAAM,cAAc,2DAIjB,CAAC;AACX,MAAM,MAAM,WAAW,GAAG,CAAC,OAAO,cAAc,CAAC,CAAC,MAAM,CAAC,CAAC;AAC1D,eAAO,MAAM,aAAa,EAAE,MAAM,CAAC,WAAW,EAAE,CAAC,GAAG,CAAC,GAAG,CAAC,CAIxD,CAAC;AA8BF,wBAAgB,cAAc,CAC5B,KAAK,EAAE,MAAM,EACb,OAAO,CAAC,EAAE;IAAE,KAAK,CAAC,EAAE,SAAS,GAAG,YAAY,CAAA;CAAE,GAC7C,MAAM,CA8BR;AAED,wBAAgB,UAAU,CAAC,KAAK,CAAC,EAAE,MAAM,GAAG,MAAM,EAAE,GAAG,MAAM,EAAE,GAAG,SAAS,CAM1E;AAED,wBAAgB,mBAAmB,CAAC,KAAK,EAAE,MAAM,GAAG,MAAM,CAezD;AAED,wBAAgB,oBAAoB,CAAC,KAAK,CAAC,EAAE,MAAM,GAAG,MAAM,EAAE,GAAG,MAAM,EAAE,GAAG,SAAS,CAKpF;AAED,MAAM,MAAM,gBAAgB,GAAG;IAAE,KAAK,CAAC,EAAE,MAAM,CAAC;IAAC,KAAK,CAAC,EAAE,MAAM,CAAA;CAAE,CAAC;AAElE,wBAAgB,eAAe,CAC7B,IAAI,EAAE,MAAM,GAAG,SAAS,EACxB,QAAQ,EAAE,MAAM,GAAG,SAAS,EAC5B,OAAO,CAAC,EAAE;IAAE,iBAAiB,CAAC,EAAE,OAAO,CAAA;CAAE,GACxC,gBAAgB,CAiBlB"}
|
|
@@ -0,0 +1,136 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.USER_SORT_MAP = exports.USER_SORT_KEYS = exports.GROUP_SORT_MAP = exports.GROUP_SORT_KEYS = exports.EVENT_SORT_MAP = exports.EVENT_SORT_KEYS = exports.DEFAULT_PAGE_SIZE = void 0;
|
|
4
|
+
exports.parseDateInput = parseDateInput;
|
|
5
|
+
exports.toYmdArray = toYmdArray;
|
|
6
|
+
exports.parseHyphenatedDate = parseHyphenatedDate;
|
|
7
|
+
exports.normalizeStringArray = normalizeStringArray;
|
|
8
|
+
exports.applyPagination = applyPagination;
|
|
9
|
+
exports.DEFAULT_PAGE_SIZE = 20;
|
|
10
|
+
exports.EVENT_SORT_KEYS = [
|
|
11
|
+
"start-date-asc",
|
|
12
|
+
"start-date-desc",
|
|
13
|
+
"newly-added",
|
|
14
|
+
];
|
|
15
|
+
exports.EVENT_SORT_MAP = {
|
|
16
|
+
"start-date-asc": 1,
|
|
17
|
+
"start-date-desc": 2,
|
|
18
|
+
"newly-added": 3,
|
|
19
|
+
};
|
|
20
|
+
exports.GROUP_SORT_KEYS = [
|
|
21
|
+
"most-events",
|
|
22
|
+
"most-members",
|
|
23
|
+
"newly-added",
|
|
24
|
+
];
|
|
25
|
+
exports.GROUP_SORT_MAP = {
|
|
26
|
+
"most-events": 1,
|
|
27
|
+
"most-members": 2,
|
|
28
|
+
"newly-added": 3,
|
|
29
|
+
};
|
|
30
|
+
exports.USER_SORT_KEYS = [
|
|
31
|
+
"most-events",
|
|
32
|
+
"most-followers",
|
|
33
|
+
"newly-added",
|
|
34
|
+
];
|
|
35
|
+
exports.USER_SORT_MAP = {
|
|
36
|
+
"most-events": 1,
|
|
37
|
+
"most-followers": 2,
|
|
38
|
+
"newly-added": 3,
|
|
39
|
+
};
|
|
40
|
+
const RELATIVE_DATE_KEYWORDS = {
|
|
41
|
+
today: () => new Date(),
|
|
42
|
+
tomorrow: () => {
|
|
43
|
+
const date = new Date();
|
|
44
|
+
date.setDate(date.getDate() + 1);
|
|
45
|
+
return date;
|
|
46
|
+
},
|
|
47
|
+
yesterday: () => {
|
|
48
|
+
const date = new Date();
|
|
49
|
+
date.setDate(date.getDate() - 1);
|
|
50
|
+
return date;
|
|
51
|
+
},
|
|
52
|
+
};
|
|
53
|
+
function formatAsCompactYmd(date) {
|
|
54
|
+
const year = date.getFullYear();
|
|
55
|
+
const month = String(date.getMonth() + 1).padStart(2, "0");
|
|
56
|
+
const day = String(date.getDate()).padStart(2, "0");
|
|
57
|
+
return `${year}${month}${day}`;
|
|
58
|
+
}
|
|
59
|
+
function formatAsHyphenatedYmd(date) {
|
|
60
|
+
const year = date.getFullYear();
|
|
61
|
+
const month = String(date.getMonth() + 1).padStart(2, "0");
|
|
62
|
+
const day = String(date.getDate()).padStart(2, "0");
|
|
63
|
+
return `${year}-${month}-${day}`;
|
|
64
|
+
}
|
|
65
|
+
function parseDateInput(input, options) {
|
|
66
|
+
const normalized = input.trim().toLowerCase();
|
|
67
|
+
const relativeFactory = RELATIVE_DATE_KEYWORDS[normalized];
|
|
68
|
+
if (relativeFactory) {
|
|
69
|
+
return options?.style === "hyphenated"
|
|
70
|
+
? formatAsHyphenatedYmd(relativeFactory())
|
|
71
|
+
: formatAsCompactYmd(relativeFactory());
|
|
72
|
+
}
|
|
73
|
+
const hyphenFree = normalized.replace(/[-/.]/g, "");
|
|
74
|
+
if (/^\d{8}$/.test(hyphenFree)) {
|
|
75
|
+
const year = Number(hyphenFree.slice(0, 4));
|
|
76
|
+
const month = Number(hyphenFree.slice(4, 6)) - 1;
|
|
77
|
+
const day = Number(hyphenFree.slice(6, 8));
|
|
78
|
+
const candidate = new Date(Date.UTC(year, month, day));
|
|
79
|
+
if (!Number.isNaN(candidate.getTime())) {
|
|
80
|
+
return options?.style === "hyphenated"
|
|
81
|
+
? formatAsHyphenatedYmd(candidate)
|
|
82
|
+
: formatAsCompactYmd(candidate);
|
|
83
|
+
}
|
|
84
|
+
}
|
|
85
|
+
const parsed = new Date(input);
|
|
86
|
+
if (!Number.isNaN(parsed.getTime())) {
|
|
87
|
+
return options?.style === "hyphenated"
|
|
88
|
+
? formatAsHyphenatedYmd(parsed)
|
|
89
|
+
: formatAsCompactYmd(parsed);
|
|
90
|
+
}
|
|
91
|
+
throw new Error(`Could not understand date input: ${input}`);
|
|
92
|
+
}
|
|
93
|
+
function toYmdArray(value) {
|
|
94
|
+
if (!value) {
|
|
95
|
+
return undefined;
|
|
96
|
+
}
|
|
97
|
+
const inputs = Array.isArray(value) ? value : [value];
|
|
98
|
+
return inputs.map((item) => parseDateInput(item));
|
|
99
|
+
}
|
|
100
|
+
function parseHyphenatedDate(input) {
|
|
101
|
+
const parsed = parseDateInput(input, { style: "hyphenated" });
|
|
102
|
+
if (/^\d{4}-\d{2}-\d{2}$/.test(parsed)) {
|
|
103
|
+
return parsed;
|
|
104
|
+
}
|
|
105
|
+
const digitsOnly = parsed.replace(/[^0-9]/g, "");
|
|
106
|
+
if (digitsOnly.length === 8) {
|
|
107
|
+
const year = digitsOnly.slice(0, 4);
|
|
108
|
+
const month = digitsOnly.slice(4, 6);
|
|
109
|
+
const day = digitsOnly.slice(6, 8);
|
|
110
|
+
return `${year}-${month}-${day}`;
|
|
111
|
+
}
|
|
112
|
+
throw new Error(`Could not convert date input to YYYY-MM-DD: ${input}`);
|
|
113
|
+
}
|
|
114
|
+
function normalizeStringArray(value) {
|
|
115
|
+
if (!value) {
|
|
116
|
+
return undefined;
|
|
117
|
+
}
|
|
118
|
+
return Array.isArray(value) ? value : [value];
|
|
119
|
+
}
|
|
120
|
+
function applyPagination(page, pageSize, options) {
|
|
121
|
+
const includePagination = options?.includePagination ?? true;
|
|
122
|
+
if (!includePagination) {
|
|
123
|
+
return {};
|
|
124
|
+
}
|
|
125
|
+
const effectivePageSize = pageSize ?? exports.DEFAULT_PAGE_SIZE;
|
|
126
|
+
const pagination = {};
|
|
127
|
+
if (page) {
|
|
128
|
+
pagination.start = 1 + (page - 1) * effectivePageSize;
|
|
129
|
+
pagination.count = effectivePageSize;
|
|
130
|
+
}
|
|
131
|
+
else if (pageSize) {
|
|
132
|
+
pagination.count = effectivePageSize;
|
|
133
|
+
}
|
|
134
|
+
return pagination;
|
|
135
|
+
}
|
|
136
|
+
//# sourceMappingURL=shared.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"shared.js","sourceRoot":"","sources":["../../src/tools/shared.ts"],"names":[],"mappings":";;;AAkEA,wCAiCC;AAED,gCAMC;AAED,kDAeC;AAED,oDAKC;AAID,0CAqBC;AA5JY,QAAA,iBAAiB,GAAG,EAAE,CAAC;AAEvB,QAAA,eAAe,GAAG;IA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