@qikdev/mcp 6.6.48 → 6.7.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +26 -41
- package/build/src/tools/campaign.d.ts +41 -0
- package/build/src/tools/campaign.d.ts.map +1 -0
- package/build/src/tools/campaign.js +331 -0
- package/build/src/tools/campaign.js.map +1 -0
- package/build/src/tools/checkin.d.ts +25 -0
- package/build/src/tools/checkin.d.ts.map +1 -0
- package/build/src/tools/checkin.js +199 -0
- package/build/src/tools/checkin.js.map +1 -0
- package/build/src/tools/definition.d.ts +90 -0
- package/build/src/tools/definition.d.ts.map +1 -0
- package/build/src/tools/definition.js +803 -0
- package/build/src/tools/definition.js.map +1 -0
- package/build/src/tools/filters.d.ts +11 -0
- package/build/src/tools/filters.d.ts.map +1 -0
- package/build/src/tools/filters.js +146 -0
- package/build/src/tools/filters.js.map +1 -0
- package/build/src/tools/glossary.d.ts +9 -0
- package/build/src/tools/glossary.d.ts.map +1 -1
- package/build/src/tools/glossary.js +200 -23
- package/build/src/tools/glossary.js.map +1 -1
- package/build/src/tools/index.d.ts.map +1 -1
- package/build/src/tools/index.js +56 -1
- package/build/src/tools/index.js.map +1 -1
- package/build/src/tools/list.d.ts.map +1 -1
- package/build/src/tools/list.js +41 -1
- package/build/src/tools/list.js.map +1 -1
- package/build/src/tools/relationships.d.ts +11 -0
- package/build/src/tools/relationships.d.ts.map +1 -0
- package/build/src/tools/relationships.js +130 -0
- package/build/src/tools/relationships.js.map +1 -0
- package/build/src/tools/reporting.d.ts +22 -0
- package/build/src/tools/reporting.d.ts.map +1 -0
- package/build/src/tools/reporting.js +219 -0
- package/build/src/tools/reporting.js.map +1 -0
- package/build/src/tools/sms.d.ts +13 -0
- package/build/src/tools/sms.d.ts.map +1 -0
- package/build/src/tools/sms.js +128 -0
- package/build/src/tools/sms.js.map +1 -0
- package/package.json +1 -1
|
@@ -0,0 +1,199 @@
|
|
|
1
|
+
import { ConfigManager } from "../config.js";
|
|
2
|
+
export const createCheckinTool = {
|
|
3
|
+
name: "create_checkin",
|
|
4
|
+
description: `Check one or more profiles into an event.
|
|
5
|
+
|
|
6
|
+
Creates checkin records linking profiles to an event.
|
|
7
|
+
Automatically captures age, gender, and name at time of checkin.
|
|
8
|
+
|
|
9
|
+
**Use Case:** "Check in John Smith to tonight's event"
|
|
10
|
+
|
|
11
|
+
**Note:** If a profile is already checked in to the event, it won't create a duplicate.`,
|
|
12
|
+
inputSchema: {
|
|
13
|
+
type: "object",
|
|
14
|
+
properties: {
|
|
15
|
+
eventId: {
|
|
16
|
+
type: "string",
|
|
17
|
+
description: "The event ID to check into"
|
|
18
|
+
},
|
|
19
|
+
profileIds: {
|
|
20
|
+
type: "array",
|
|
21
|
+
items: { type: "string" },
|
|
22
|
+
description: "Profile IDs to check in"
|
|
23
|
+
},
|
|
24
|
+
checkedInBy: {
|
|
25
|
+
type: "string",
|
|
26
|
+
description: "Profile ID of person doing the checkin (optional)"
|
|
27
|
+
},
|
|
28
|
+
absent: {
|
|
29
|
+
type: "boolean",
|
|
30
|
+
description: "Mark as absent (expected but didn't attend) instead of present"
|
|
31
|
+
}
|
|
32
|
+
},
|
|
33
|
+
required: ["eventId", "profileIds"]
|
|
34
|
+
},
|
|
35
|
+
};
|
|
36
|
+
export const checkoutTool = {
|
|
37
|
+
name: "checkout",
|
|
38
|
+
description: `Check out one or more checkins from an event.
|
|
39
|
+
|
|
40
|
+
Sets the checkin record to checked-out status with timestamp.
|
|
41
|
+
|
|
42
|
+
**Use Case:** "Check out the Smith family from the event"
|
|
43
|
+
|
|
44
|
+
Provide the checkin IDs (not profile IDs) to check out.`,
|
|
45
|
+
inputSchema: {
|
|
46
|
+
type: "object",
|
|
47
|
+
properties: {
|
|
48
|
+
checkinIds: {
|
|
49
|
+
type: "array",
|
|
50
|
+
items: { type: "string" },
|
|
51
|
+
description: "Checkin record IDs to check out"
|
|
52
|
+
},
|
|
53
|
+
checkedOutBy: {
|
|
54
|
+
type: "string",
|
|
55
|
+
description: "Profile ID of person doing the checkout (optional)"
|
|
56
|
+
},
|
|
57
|
+
pin: {
|
|
58
|
+
type: "string",
|
|
59
|
+
description: "Security PIN if required by the checkin"
|
|
60
|
+
}
|
|
61
|
+
},
|
|
62
|
+
required: ["checkinIds"]
|
|
63
|
+
},
|
|
64
|
+
};
|
|
65
|
+
export async function handleCreateCheckin(args) {
|
|
66
|
+
try {
|
|
67
|
+
const configManager = new ConfigManager();
|
|
68
|
+
const config = await configManager.loadConfig();
|
|
69
|
+
if (!config) {
|
|
70
|
+
throw new Error('Qik MCP server not configured. Run setup first.');
|
|
71
|
+
}
|
|
72
|
+
if (!args.profileIds?.length) {
|
|
73
|
+
return {
|
|
74
|
+
content: [{
|
|
75
|
+
type: "text",
|
|
76
|
+
text: `❌ No profile IDs provided. Please provide an array of profile IDs to check in.`
|
|
77
|
+
}]
|
|
78
|
+
};
|
|
79
|
+
}
|
|
80
|
+
const requestBody = {
|
|
81
|
+
checkins: args.profileIds
|
|
82
|
+
};
|
|
83
|
+
if (args.checkedInBy) {
|
|
84
|
+
requestBody.checkedInBy = args.checkedInBy;
|
|
85
|
+
}
|
|
86
|
+
if (args.absent) {
|
|
87
|
+
requestBody.absent = true;
|
|
88
|
+
}
|
|
89
|
+
const response = await fetch(`${config.apiUrl || 'https://api.qik.dev'}/event/${args.eventId}/checkin`, {
|
|
90
|
+
method: 'POST',
|
|
91
|
+
headers: {
|
|
92
|
+
'Authorization': `Bearer ${config.accessToken}`,
|
|
93
|
+
'Content-Type': 'application/json',
|
|
94
|
+
},
|
|
95
|
+
body: JSON.stringify(requestBody)
|
|
96
|
+
});
|
|
97
|
+
if (!response.ok) {
|
|
98
|
+
const errorText = await response.text();
|
|
99
|
+
throw new Error(`HTTP ${response.status}: ${errorText}`);
|
|
100
|
+
}
|
|
101
|
+
const result = await response.json();
|
|
102
|
+
const checkins = Array.isArray(result) ? result : [result];
|
|
103
|
+
let resultText = `# Checkin Result\n\n`;
|
|
104
|
+
resultText += `✅ Checked in ${checkins.length} profile(s) to event.\n\n`;
|
|
105
|
+
if (checkins.length > 0) {
|
|
106
|
+
resultText += `## Checkins Created\n`;
|
|
107
|
+
for (const checkin of checkins.slice(0, 10)) {
|
|
108
|
+
const name = [checkin.firstName, checkin.lastName].filter(Boolean).join(' ') || 'Unknown';
|
|
109
|
+
const status = args.absent ? '❌ Marked absent' : '✅ Checked in';
|
|
110
|
+
resultText += `- ${name} (ID: ${checkin._id}) ${status}\n`;
|
|
111
|
+
}
|
|
112
|
+
if (checkins.length > 10) {
|
|
113
|
+
resultText += `- ... and ${checkins.length - 10} more\n`;
|
|
114
|
+
}
|
|
115
|
+
}
|
|
116
|
+
resultText += `\n💡 Use \`get_event_attendance\` to see full attendance stats.`;
|
|
117
|
+
return {
|
|
118
|
+
content: [{
|
|
119
|
+
type: "text",
|
|
120
|
+
text: resultText
|
|
121
|
+
}]
|
|
122
|
+
};
|
|
123
|
+
}
|
|
124
|
+
catch (error) {
|
|
125
|
+
return {
|
|
126
|
+
content: [{
|
|
127
|
+
type: "text",
|
|
128
|
+
text: `❌ Failed to create checkin: ${error.message}`
|
|
129
|
+
}]
|
|
130
|
+
};
|
|
131
|
+
}
|
|
132
|
+
}
|
|
133
|
+
export async function handleCheckout(args) {
|
|
134
|
+
try {
|
|
135
|
+
const configManager = new ConfigManager();
|
|
136
|
+
const config = await configManager.loadConfig();
|
|
137
|
+
if (!config) {
|
|
138
|
+
throw new Error('Qik MCP server not configured. Run setup first.');
|
|
139
|
+
}
|
|
140
|
+
if (!args.checkinIds?.length) {
|
|
141
|
+
return {
|
|
142
|
+
content: [{
|
|
143
|
+
type: "text",
|
|
144
|
+
text: `❌ No checkin IDs provided. Please provide an array of checkin record IDs to check out.`
|
|
145
|
+
}]
|
|
146
|
+
};
|
|
147
|
+
}
|
|
148
|
+
const requestBody = {
|
|
149
|
+
checkins: args.checkinIds
|
|
150
|
+
};
|
|
151
|
+
if (args.checkedOutBy) {
|
|
152
|
+
requestBody.checkedOutBy = args.checkedOutBy;
|
|
153
|
+
}
|
|
154
|
+
if (args.pin) {
|
|
155
|
+
requestBody.pin = args.pin;
|
|
156
|
+
}
|
|
157
|
+
const response = await fetch(`${config.apiUrl || 'https://api.qik.dev'}/event/checkout`, {
|
|
158
|
+
method: 'POST',
|
|
159
|
+
headers: {
|
|
160
|
+
'Authorization': `Bearer ${config.accessToken}`,
|
|
161
|
+
'Content-Type': 'application/json',
|
|
162
|
+
},
|
|
163
|
+
body: JSON.stringify(requestBody)
|
|
164
|
+
});
|
|
165
|
+
if (!response.ok) {
|
|
166
|
+
const errorText = await response.text();
|
|
167
|
+
throw new Error(`HTTP ${response.status}: ${errorText}`);
|
|
168
|
+
}
|
|
169
|
+
const result = await response.json();
|
|
170
|
+
const checkedOut = Array.isArray(result) ? result : [result];
|
|
171
|
+
let resultText = `# Checkout Result\n\n`;
|
|
172
|
+
resultText += `✅ Checked out ${checkedOut.length} record(s).\n\n`;
|
|
173
|
+
if (checkedOut.length > 0) {
|
|
174
|
+
resultText += `## Checked Out\n`;
|
|
175
|
+
for (const checkin of checkedOut.slice(0, 10)) {
|
|
176
|
+
const name = [checkin.firstName, checkin.lastName].filter(Boolean).join(' ') || 'Unknown';
|
|
177
|
+
resultText += `- ${name} ↩️ Checked out\n`;
|
|
178
|
+
}
|
|
179
|
+
if (checkedOut.length > 10) {
|
|
180
|
+
resultText += `- ... and ${checkedOut.length - 10} more\n`;
|
|
181
|
+
}
|
|
182
|
+
}
|
|
183
|
+
return {
|
|
184
|
+
content: [{
|
|
185
|
+
type: "text",
|
|
186
|
+
text: resultText
|
|
187
|
+
}]
|
|
188
|
+
};
|
|
189
|
+
}
|
|
190
|
+
catch (error) {
|
|
191
|
+
return {
|
|
192
|
+
content: [{
|
|
193
|
+
type: "text",
|
|
194
|
+
text: `❌ Failed to checkout: ${error.message}`
|
|
195
|
+
}]
|
|
196
|
+
};
|
|
197
|
+
}
|
|
198
|
+
}
|
|
199
|
+
//# sourceMappingURL=checkin.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"checkin.js","sourceRoot":"","sources":["../../../src/tools/checkin.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,aAAa,EAAE,MAAM,cAAc,CAAC;AAE7C,MAAM,CAAC,MAAM,iBAAiB,GAAS;IACrC,IAAI,EAAE,gBAAgB;IACtB,WAAW,EAAE;;;;;;;wFAOyE;IACtF,WAAW,EAAE;QACX,IAAI,EAAE,QAAQ;QACd,UAAU,EAAE;YACV,OAAO,EAAE;gBACP,IAAI,EAAE,QAAQ;gBACd,WAAW,EAAE,4BAA4B;aAC1C;YACD,UAAU,EAAE;gBACV,IAAI,EAAE,OAAO;gBACb,KAAK,EAAE,EAAE,IAAI,EAAE,QAAQ,EAAE;gBACzB,WAAW,EAAE,yBAAyB;aACvC;YACD,WAAW,EAAE;gBACX,IAAI,EAAE,QAAQ;gBACd,WAAW,EAAE,mDAAmD;aACjE;YACD,MAAM,EAAE;gBACN,IAAI,EAAE,SAAS;gBACf,WAAW,EAAE,gEAAgE;aAC9E;SACF;QACD,QAAQ,EAAE,CAAC,SAAS,EAAE,YAAY,CAAC;KACpC;CACF,CAAC;AAEF,MAAM,CAAC,MAAM,YAAY,GAAS;IAChC,IAAI,EAAE,UAAU;IAChB,WAAW,EAAE;;;;;;wDAMyC;IACtD,WAAW,EAAE;QACX,IAAI,EAAE,QAAQ;QACd,UAAU,EAAE;YACV,UAAU,EAAE;gBACV,IAAI,EAAE,OAAO;gBACb,KAAK,EAAE,EAAE,IAAI,EAAE,QAAQ,EAAE;gBACzB,WAAW,EAAE,iCAAiC;aAC/C;YACD,YAAY,EAAE;gBACZ,IAAI,EAAE,QAAQ;gBACd,WAAW,EAAE,oDAAoD;aAClE;YACD,GAAG,EAAE;gBACH,IAAI,EAAE,QAAQ;gBACd,WAAW,EAAE,yCAAyC;aACvD;SACF;QACD,QAAQ,EAAE,CAAC,YAAY,CAAC;KACzB;CACF,CAAC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;SACH,CAAC;IACJ,CAAC;AACH,CAAC"}
|
|
@@ -0,0 +1,90 @@
|
|
|
1
|
+
import { Tool } from "@modelcontextprotocol/sdk/types.js";
|
|
2
|
+
interface DefinitionField {
|
|
3
|
+
title: string;
|
|
4
|
+
key?: string;
|
|
5
|
+
type: string;
|
|
6
|
+
widget?: string;
|
|
7
|
+
description?: string;
|
|
8
|
+
minimum?: number;
|
|
9
|
+
maximum?: number;
|
|
10
|
+
referenceType?: string;
|
|
11
|
+
options?: Array<{
|
|
12
|
+
title: string;
|
|
13
|
+
value: string;
|
|
14
|
+
}>;
|
|
15
|
+
defaultValues?: any[];
|
|
16
|
+
lockFilter?: any;
|
|
17
|
+
expressions?: any;
|
|
18
|
+
}
|
|
19
|
+
interface CreateDefinitionArgs {
|
|
20
|
+
title: string;
|
|
21
|
+
plural?: string;
|
|
22
|
+
definesType: string;
|
|
23
|
+
category?: string;
|
|
24
|
+
fields?: DefinitionField[];
|
|
25
|
+
scope?: string;
|
|
26
|
+
defaultScopes?: string[];
|
|
27
|
+
}
|
|
28
|
+
interface UpdateDefinitionArgs {
|
|
29
|
+
definitionId?: string;
|
|
30
|
+
definitionKey?: string;
|
|
31
|
+
changes: {
|
|
32
|
+
title?: string;
|
|
33
|
+
plural?: string;
|
|
34
|
+
category?: string;
|
|
35
|
+
addFields?: DefinitionField[];
|
|
36
|
+
removeFields?: string[];
|
|
37
|
+
updateFields?: DefinitionField[];
|
|
38
|
+
};
|
|
39
|
+
}
|
|
40
|
+
interface ListDefinitionsArgs {
|
|
41
|
+
search?: string;
|
|
42
|
+
definesType?: string;
|
|
43
|
+
category?: string;
|
|
44
|
+
includeFields?: boolean;
|
|
45
|
+
page?: {
|
|
46
|
+
size: number;
|
|
47
|
+
index: number;
|
|
48
|
+
};
|
|
49
|
+
}
|
|
50
|
+
interface SearchSimilarArgs {
|
|
51
|
+
query: string;
|
|
52
|
+
category?: string;
|
|
53
|
+
}
|
|
54
|
+
export declare const getDefinitionSchemaTool: Tool;
|
|
55
|
+
export declare const searchSimilarDefinitionsTool: Tool;
|
|
56
|
+
export declare const createDefinitionTool: Tool;
|
|
57
|
+
export declare const updateDefinitionTool: Tool;
|
|
58
|
+
export declare const listDefinitionsTool: Tool;
|
|
59
|
+
export declare function handleGetDefinitionSchema(): Promise<{
|
|
60
|
+
content: Array<{
|
|
61
|
+
type: string;
|
|
62
|
+
text: string;
|
|
63
|
+
}>;
|
|
64
|
+
}>;
|
|
65
|
+
export declare function handleSearchSimilarDefinitions(args: SearchSimilarArgs): Promise<{
|
|
66
|
+
content: Array<{
|
|
67
|
+
type: string;
|
|
68
|
+
text: string;
|
|
69
|
+
}>;
|
|
70
|
+
}>;
|
|
71
|
+
export declare function handleCreateDefinition(args: CreateDefinitionArgs): Promise<{
|
|
72
|
+
content: Array<{
|
|
73
|
+
type: string;
|
|
74
|
+
text: string;
|
|
75
|
+
}>;
|
|
76
|
+
}>;
|
|
77
|
+
export declare function handleUpdateDefinition(args: UpdateDefinitionArgs): Promise<{
|
|
78
|
+
content: Array<{
|
|
79
|
+
type: string;
|
|
80
|
+
text: string;
|
|
81
|
+
}>;
|
|
82
|
+
}>;
|
|
83
|
+
export declare function handleListDefinitions(args: ListDefinitionsArgs): Promise<{
|
|
84
|
+
content: Array<{
|
|
85
|
+
type: string;
|
|
86
|
+
text: string;
|
|
87
|
+
}>;
|
|
88
|
+
}>;
|
|
89
|
+
export {};
|
|
90
|
+
//# sourceMappingURL=definition.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"definition.d.ts","sourceRoot":"","sources":["../../../src/tools/definition.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,IAAI,EAAE,MAAM,oCAAoC,CAAC;AAQ1D,UAAU,eAAe;IACvB,KAAK,EAAE,MAAM,CAAC;IACd,GAAG,CAAC,EAAE,MAAM,CAAC;IACb,IAAI,EAAE,MAAM,CAAC;IACb,MAAM,CAAC,EAAE,MAAM,CAAC;IAChB,WAAW,CA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