@open-loyalty/mcp-server 1.3.6 → 1.4.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.
Files changed (42) hide show
  1. package/dist/instructions.d.ts +1 -1
  2. package/dist/instructions.js +18 -5
  3. package/dist/tools/achievement/index.js +10 -10
  4. package/dist/tools/achievement/schemas.js +16 -8
  5. package/dist/tools/reward/handlers.d.ts +3 -3
  6. package/dist/tools/reward/handlers.js +54 -8
  7. package/dist/tools/reward/index.d.ts +4 -8
  8. package/dist/tools/reward/index.js +13 -5
  9. package/dist/tools/reward/schemas.d.ts +3 -7
  10. package/dist/tools/reward/schemas.js +16 -8
  11. package/dist/tools/tierset.d.ts +1 -1
  12. package/dist/tools/tierset.js +49 -25
  13. package/dist/tools/transaction.js +5 -2
  14. package/dist/tools/wallet-type.js +27 -16
  15. package/dist/types/schemas/admin.d.ts +6 -6
  16. package/dist/types/schemas/role.d.ts +4 -4
  17. package/dist/types/schemas/wallet-type.js +7 -5
  18. package/package.json +1 -1
  19. package/dist/prompts/fan-engagement-setup.d.ts +0 -107
  20. package/dist/prompts/fan-engagement-setup.js +0 -492
  21. package/dist/tools/achievement.d.ts +0 -1017
  22. package/dist/tools/achievement.js +0 -354
  23. package/dist/tools/campaign.d.ts +0 -1800
  24. package/dist/tools/campaign.js +0 -737
  25. package/dist/tools/member.d.ts +0 -366
  26. package/dist/tools/member.js +0 -352
  27. package/dist/tools/reward.d.ts +0 -279
  28. package/dist/tools/reward.js +0 -361
  29. package/dist/tools/segment.d.ts +0 -816
  30. package/dist/tools/segment.js +0 -333
  31. package/dist/workflows/app-login-streak.d.ts +0 -39
  32. package/dist/workflows/app-login-streak.js +0 -298
  33. package/dist/workflows/early-arrival.d.ts +0 -33
  34. package/dist/workflows/early-arrival.js +0 -148
  35. package/dist/workflows/index.d.ts +0 -101
  36. package/dist/workflows/index.js +0 -208
  37. package/dist/workflows/match-attendance.d.ts +0 -45
  38. package/dist/workflows/match-attendance.js +0 -308
  39. package/dist/workflows/sportsbar-visit.d.ts +0 -41
  40. package/dist/workflows/sportsbar-visit.js +0 -284
  41. package/dist/workflows/vod-watching.d.ts +0 -43
  42. package/dist/workflows/vod-watching.js +0 -326
@@ -1,366 +0,0 @@
1
- import { z } from "zod";
2
- import { Member } from "../types/schemas/member.js";
3
- export declare const MemberCreateInputSchema: {
4
- storeCode: z.ZodOptional<z.ZodString>;
5
- email: z.ZodString;
6
- firstName: z.ZodOptional<z.ZodString>;
7
- lastName: z.ZodOptional<z.ZodString>;
8
- phone: z.ZodOptional<z.ZodString>;
9
- birthDate: z.ZodOptional<z.ZodString>;
10
- gender: z.ZodOptional<z.ZodEnum<["male", "female", "not_disclosed"]>>;
11
- loyaltyCardNumber: z.ZodOptional<z.ZodString>;
12
- agreement1: z.ZodOptional<z.ZodBoolean>;
13
- agreement2: z.ZodOptional<z.ZodBoolean>;
14
- agreement3: z.ZodOptional<z.ZodBoolean>;
15
- address: z.ZodOptional<z.ZodObject<{
16
- street: z.ZodOptional<z.ZodString>;
17
- city: z.ZodOptional<z.ZodString>;
18
- postal: z.ZodOptional<z.ZodString>;
19
- country: z.ZodOptional<z.ZodString>;
20
- province: z.ZodOptional<z.ZodString>;
21
- }, "strip", z.ZodTypeAny, {
22
- street?: string | undefined;
23
- city?: string | undefined;
24
- postal?: string | undefined;
25
- country?: string | undefined;
26
- province?: string | undefined;
27
- }, {
28
- street?: string | undefined;
29
- city?: string | undefined;
30
- postal?: string | undefined;
31
- country?: string | undefined;
32
- province?: string | undefined;
33
- }>>;
34
- };
35
- export declare const MemberGetInputSchema: {
36
- storeCode: z.ZodOptional<z.ZodString>;
37
- memberId: z.ZodString;
38
- };
39
- export declare const MemberListInputSchema: {
40
- storeCode: z.ZodOptional<z.ZodString>;
41
- cursor: z.ZodOptional<z.ZodString>;
42
- page: z.ZodOptional<z.ZodNumber>;
43
- perPage: z.ZodOptional<z.ZodNumber>;
44
- email: z.ZodOptional<z.ZodString>;
45
- firstName: z.ZodOptional<z.ZodString>;
46
- lastName: z.ZodOptional<z.ZodString>;
47
- phone: z.ZodOptional<z.ZodString>;
48
- loyaltyCardNumber: z.ZodOptional<z.ZodString>;
49
- active: z.ZodOptional<z.ZodBoolean>;
50
- };
51
- export declare const MemberUpdateInputSchema: {
52
- storeCode: z.ZodOptional<z.ZodString>;
53
- memberId: z.ZodString;
54
- firstName: z.ZodOptional<z.ZodString>;
55
- lastName: z.ZodOptional<z.ZodString>;
56
- phone: z.ZodOptional<z.ZodString>;
57
- birthDate: z.ZodOptional<z.ZodString>;
58
- gender: z.ZodOptional<z.ZodEnum<["male", "female", "not_disclosed"]>>;
59
- address: z.ZodOptional<z.ZodObject<{
60
- street: z.ZodOptional<z.ZodString>;
61
- city: z.ZodOptional<z.ZodString>;
62
- postal: z.ZodOptional<z.ZodString>;
63
- country: z.ZodOptional<z.ZodString>;
64
- province: z.ZodOptional<z.ZodString>;
65
- }, "strip", z.ZodTypeAny, {
66
- street?: string | undefined;
67
- city?: string | undefined;
68
- postal?: string | undefined;
69
- country?: string | undefined;
70
- province?: string | undefined;
71
- }, {
72
- street?: string | undefined;
73
- city?: string | undefined;
74
- postal?: string | undefined;
75
- country?: string | undefined;
76
- province?: string | undefined;
77
- }>>;
78
- agreement1: z.ZodOptional<z.ZodBoolean>;
79
- agreement2: z.ZodOptional<z.ZodBoolean>;
80
- agreement3: z.ZodOptional<z.ZodBoolean>;
81
- };
82
- export declare const MemberIdInputSchema: {
83
- storeCode: z.ZodOptional<z.ZodString>;
84
- memberId: z.ZodString;
85
- };
86
- export declare const MemberAssignTierInputSchema: {
87
- storeCode: z.ZodOptional<z.ZodString>;
88
- memberId: z.ZodString;
89
- levelId: z.ZodString;
90
- };
91
- export declare function memberCreate(input: {
92
- storeCode?: string;
93
- email: string;
94
- firstName?: string;
95
- lastName?: string;
96
- phone?: string;
97
- birthDate?: string;
98
- gender?: string;
99
- loyaltyCardNumber?: string;
100
- agreement1?: boolean;
101
- agreement2?: boolean;
102
- agreement3?: boolean;
103
- address?: {
104
- street?: string;
105
- city?: string;
106
- postal?: string;
107
- country?: string;
108
- province?: string;
109
- };
110
- }): Promise<{
111
- memberId: string;
112
- loyaltyCardNumber: string;
113
- email: string;
114
- }>;
115
- export declare function memberGet(input: {
116
- storeCode?: string;
117
- memberId: string;
118
- }): Promise<Member>;
119
- export declare function memberList(input: {
120
- storeCode?: string;
121
- cursor?: string;
122
- page?: number;
123
- perPage?: number;
124
- email?: string;
125
- firstName?: string;
126
- lastName?: string;
127
- phone?: string;
128
- loyaltyCardNumber?: string;
129
- active?: boolean;
130
- }): Promise<{
131
- members: Array<{
132
- memberId: string;
133
- email: string;
134
- firstName?: string;
135
- lastName?: string;
136
- loyaltyCardNumber?: string;
137
- active: boolean;
138
- }>;
139
- total: {
140
- all?: number;
141
- filtered?: number;
142
- };
143
- cursor?: string;
144
- }>;
145
- export declare function memberUpdate(input: {
146
- storeCode?: string;
147
- memberId: string;
148
- firstName?: string;
149
- lastName?: string;
150
- phone?: string;
151
- birthDate?: string;
152
- gender?: string;
153
- address?: {
154
- street?: string;
155
- city?: string;
156
- postal?: string;
157
- country?: string;
158
- province?: string;
159
- };
160
- agreement1?: boolean;
161
- agreement2?: boolean;
162
- agreement3?: boolean;
163
- }): Promise<void>;
164
- export declare function memberActivate(input: {
165
- storeCode?: string;
166
- memberId: string;
167
- }): Promise<void>;
168
- export declare function memberDeactivate(input: {
169
- storeCode?: string;
170
- memberId: string;
171
- }): Promise<void>;
172
- export declare function memberDelete(input: {
173
- storeCode?: string;
174
- memberId: string;
175
- }): Promise<void>;
176
- export declare function memberGetTierProgress(input: {
177
- storeCode?: string;
178
- memberId: string;
179
- }): Promise<{
180
- currentTier?: {
181
- levelId: string;
182
- name: string;
183
- };
184
- nextTier?: {
185
- levelId: string;
186
- name: string;
187
- };
188
- currentValue: number;
189
- requiredValue?: number;
190
- progressPercent: number;
191
- }>;
192
- export declare function memberAssignTier(input: {
193
- storeCode?: string;
194
- memberId: string;
195
- levelId: string;
196
- }): Promise<void>;
197
- export declare function memberRemoveManualTier(input: {
198
- storeCode?: string;
199
- memberId: string;
200
- }): Promise<void>;
201
- export declare const memberToolDefinitions: readonly [{
202
- readonly name: "openloyalty_member_create";
203
- readonly title: "Register New Member";
204
- readonly description: "Register a new loyalty program member. Returns memberId for subsequent operations like points_add or member_get. Email must be unique within the store.";
205
- readonly readOnly: false;
206
- readonly inputSchema: {
207
- storeCode: z.ZodOptional<z.ZodString>;
208
- email: z.ZodString;
209
- firstName: z.ZodOptional<z.ZodString>;
210
- lastName: z.ZodOptional<z.ZodString>;
211
- phone: z.ZodOptional<z.ZodString>;
212
- birthDate: z.ZodOptional<z.ZodString>;
213
- gender: z.ZodOptional<z.ZodEnum<["male", "female", "not_disclosed"]>>;
214
- loyaltyCardNumber: z.ZodOptional<z.ZodString>;
215
- agreement1: z.ZodOptional<z.ZodBoolean>;
216
- agreement2: z.ZodOptional<z.ZodBoolean>;
217
- agreement3: z.ZodOptional<z.ZodBoolean>;
218
- address: z.ZodOptional<z.ZodObject<{
219
- street: z.ZodOptional<z.ZodString>;
220
- city: z.ZodOptional<z.ZodString>;
221
- postal: z.ZodOptional<z.ZodString>;
222
- country: z.ZodOptional<z.ZodString>;
223
- province: z.ZodOptional<z.ZodString>;
224
- }, "strip", z.ZodTypeAny, {
225
- street?: string | undefined;
226
- city?: string | undefined;
227
- postal?: string | undefined;
228
- country?: string | undefined;
229
- province?: string | undefined;
230
- }, {
231
- street?: string | undefined;
232
- city?: string | undefined;
233
- postal?: string | undefined;
234
- country?: string | undefined;
235
- province?: string | undefined;
236
- }>>;
237
- };
238
- readonly handler: typeof memberCreate;
239
- }, {
240
- readonly name: "openloyalty_member_get";
241
- readonly title: "Get Member Profile";
242
- readonly description: "Get member details including profile, points balance, and tier status. Use memberId from member_create or member_list.";
243
- readonly readOnly: true;
244
- readonly inputSchema: {
245
- storeCode: z.ZodOptional<z.ZodString>;
246
- memberId: z.ZodString;
247
- };
248
- readonly handler: typeof memberGet;
249
- }, {
250
- readonly name: "openloyalty_member_list";
251
- readonly title: "Search Members";
252
- readonly description: string;
253
- readonly readOnly: true;
254
- readonly inputSchema: {
255
- storeCode: z.ZodOptional<z.ZodString>;
256
- cursor: z.ZodOptional<z.ZodString>;
257
- page: z.ZodOptional<z.ZodNumber>;
258
- perPage: z.ZodOptional<z.ZodNumber>;
259
- email: z.ZodOptional<z.ZodString>;
260
- firstName: z.ZodOptional<z.ZodString>;
261
- lastName: z.ZodOptional<z.ZodString>;
262
- phone: z.ZodOptional<z.ZodString>;
263
- loyaltyCardNumber: z.ZodOptional<z.ZodString>;
264
- active: z.ZodOptional<z.ZodBoolean>;
265
- };
266
- readonly handler: typeof memberList;
267
- }, {
268
- readonly name: "openloyalty_member_update";
269
- readonly title: "Update Member Profile";
270
- readonly description: "Update member profile fields. Cannot change email. Use member_get first to see current values.";
271
- readonly readOnly: false;
272
- readonly inputSchema: {
273
- storeCode: z.ZodOptional<z.ZodString>;
274
- memberId: z.ZodString;
275
- firstName: z.ZodOptional<z.ZodString>;
276
- lastName: z.ZodOptional<z.ZodString>;
277
- phone: z.ZodOptional<z.ZodString>;
278
- birthDate: z.ZodOptional<z.ZodString>;
279
- gender: z.ZodOptional<z.ZodEnum<["male", "female", "not_disclosed"]>>;
280
- address: z.ZodOptional<z.ZodObject<{
281
- street: z.ZodOptional<z.ZodString>;
282
- city: z.ZodOptional<z.ZodString>;
283
- postal: z.ZodOptional<z.ZodString>;
284
- country: z.ZodOptional<z.ZodString>;
285
- province: z.ZodOptional<z.ZodString>;
286
- }, "strip", z.ZodTypeAny, {
287
- street?: string | undefined;
288
- city?: string | undefined;
289
- postal?: string | undefined;
290
- country?: string | undefined;
291
- province?: string | undefined;
292
- }, {
293
- street?: string | undefined;
294
- city?: string | undefined;
295
- postal?: string | undefined;
296
- country?: string | undefined;
297
- province?: string | undefined;
298
- }>>;
299
- agreement1: z.ZodOptional<z.ZodBoolean>;
300
- agreement2: z.ZodOptional<z.ZodBoolean>;
301
- agreement3: z.ZodOptional<z.ZodBoolean>;
302
- };
303
- readonly handler: typeof memberUpdate;
304
- }, {
305
- readonly name: "openloyalty_member_activate";
306
- readonly title: "Activate Member Account";
307
- readonly description: "Activate a member account. Inactive members cannot earn or spend points.";
308
- readonly readOnly: false;
309
- readonly inputSchema: {
310
- storeCode: z.ZodOptional<z.ZodString>;
311
- memberId: z.ZodString;
312
- };
313
- readonly handler: typeof memberActivate;
314
- }, {
315
- readonly name: "openloyalty_member_deactivate";
316
- readonly title: "Deactivate Member Account";
317
- readonly description: "Deactivate a member account. Deactivated members cannot earn or spend points but retain their balance.";
318
- readonly readOnly: false;
319
- readonly inputSchema: {
320
- storeCode: z.ZodOptional<z.ZodString>;
321
- memberId: z.ZodString;
322
- };
323
- readonly handler: typeof memberDeactivate;
324
- }, {
325
- readonly name: "openloyalty_member_delete";
326
- readonly title: "Delete Member (Permanent)";
327
- readonly description: "Permanently removes member and all associated data. Cannot be undone. Use for GDPR compliance or member requests.";
328
- readonly readOnly: false;
329
- readonly destructive: true;
330
- readonly inputSchema: {
331
- storeCode: z.ZodOptional<z.ZodString>;
332
- memberId: z.ZodString;
333
- };
334
- readonly handler: typeof memberDelete;
335
- }, {
336
- readonly name: "openloyalty_member_get_tier_progress";
337
- readonly title: "Check Tier Progress";
338
- readonly description: "Get member tier progression status showing current tier and progress to next. Returns currentValue, requiredValue, and progressPercent.";
339
- readonly readOnly: true;
340
- readonly inputSchema: {
341
- storeCode: z.ZodOptional<z.ZodString>;
342
- memberId: z.ZodString;
343
- };
344
- readonly handler: typeof memberGetTierProgress;
345
- }, {
346
- readonly name: "openloyalty_member_assign_tier";
347
- readonly title: "Assign Tier to Member";
348
- readonly description: "Manually assign a tier level to a member, overriding automatic tier calculation. Use tierset_get_tiers to find available levelId values.";
349
- readonly readOnly: false;
350
- readonly inputSchema: {
351
- storeCode: z.ZodOptional<z.ZodString>;
352
- memberId: z.ZodString;
353
- levelId: z.ZodString;
354
- };
355
- readonly handler: typeof memberAssignTier;
356
- }, {
357
- readonly name: "openloyalty_member_remove_manual_tier";
358
- readonly title: "Remove Manual Tier Assignment";
359
- readonly description: "Remove manually assigned tier from member, restoring automatic tier calculation based on conditions.";
360
- readonly readOnly: false;
361
- readonly inputSchema: {
362
- storeCode: z.ZodOptional<z.ZodString>;
363
- memberId: z.ZodString;
364
- };
365
- readonly handler: typeof memberRemoveManualTier;
366
- }];