@open-loyalty/mcp-server 1.3.7 → 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 (39) hide show
  1. package/dist/instructions.d.ts +1 -1
  2. package/dist/instructions.js +18 -5
  3. package/dist/tools/reward/handlers.d.ts +2 -0
  4. package/dist/tools/reward/handlers.js +52 -6
  5. package/dist/tools/reward/index.d.ts +2 -0
  6. package/dist/tools/reward/index.js +13 -7
  7. package/dist/tools/reward/schemas.d.ts +2 -0
  8. package/dist/tools/reward/schemas.js +15 -5
  9. package/dist/tools/tierset.d.ts +1 -1
  10. package/dist/tools/tierset.js +49 -25
  11. package/dist/tools/transaction.js +5 -2
  12. package/dist/tools/wallet-type.js +26 -17
  13. package/dist/types/schemas/admin.d.ts +6 -6
  14. package/dist/types/schemas/role.d.ts +4 -4
  15. package/package.json +1 -1
  16. package/dist/prompts/fan-engagement-setup.d.ts +0 -107
  17. package/dist/prompts/fan-engagement-setup.js +0 -492
  18. package/dist/tools/achievement.d.ts +0 -1017
  19. package/dist/tools/achievement.js +0 -354
  20. package/dist/tools/campaign.d.ts +0 -1800
  21. package/dist/tools/campaign.js +0 -737
  22. package/dist/tools/member.d.ts +0 -366
  23. package/dist/tools/member.js +0 -352
  24. package/dist/tools/reward.d.ts +0 -279
  25. package/dist/tools/reward.js +0 -361
  26. package/dist/tools/segment.d.ts +0 -816
  27. package/dist/tools/segment.js +0 -333
  28. package/dist/workflows/app-login-streak.d.ts +0 -39
  29. package/dist/workflows/app-login-streak.js +0 -298
  30. package/dist/workflows/early-arrival.d.ts +0 -33
  31. package/dist/workflows/early-arrival.js +0 -148
  32. package/dist/workflows/index.d.ts +0 -101
  33. package/dist/workflows/index.js +0 -208
  34. package/dist/workflows/match-attendance.d.ts +0 -45
  35. package/dist/workflows/match-attendance.js +0 -308
  36. package/dist/workflows/sportsbar-visit.d.ts +0 -41
  37. package/dist/workflows/sportsbar-visit.js +0 -284
  38. package/dist/workflows/vod-watching.d.ts +0 -43
  39. package/dist/workflows/vod-watching.js +0 -326
@@ -1,1800 +0,0 @@
1
- import { z } from "zod";
2
- import { CampaignListItem } from "../types/schemas/campaign.js";
3
- export declare const CampaignListInputSchema: {
4
- storeCode: z.ZodOptional<z.ZodString>;
5
- page: z.ZodOptional<z.ZodNumber>;
6
- perPage: z.ZodOptional<z.ZodNumber>;
7
- active: z.ZodOptional<z.ZodBoolean>;
8
- type: z.ZodOptional<z.ZodEnum<["direct", "referral"]>>;
9
- trigger: z.ZodOptional<z.ZodEnum<["transaction", "custom_event", "time", "achievement", "custom_event_unique_code", "leaderboard", "internal_event", "return_transaction", "challenge", "fortune_wheel"]>>;
10
- };
11
- export declare const CampaignGetInputSchema: {
12
- storeCode: z.ZodOptional<z.ZodString>;
13
- campaignId: z.ZodString;
14
- };
15
- export declare const CampaignUpdateInputSchema: {
16
- storeCode: z.ZodOptional<z.ZodString>;
17
- campaignId: z.ZodString;
18
- type: z.ZodEnum<["direct", "referral"]>;
19
- trigger: z.ZodEnum<["transaction", "custom_event", "time", "achievement", "custom_event_unique_code", "leaderboard", "internal_event", "return_transaction", "challenge", "fortune_wheel"]>;
20
- translations: z.ZodObject<{
21
- en: z.ZodObject<{
22
- name: z.ZodString;
23
- description: z.ZodOptional<z.ZodString>;
24
- }, "strip", z.ZodTypeAny, {
25
- name: string;
26
- description?: string | undefined;
27
- }, {
28
- name: string;
29
- description?: string | undefined;
30
- }>;
31
- }, "passthrough", z.ZodTypeAny, z.objectOutputType<{
32
- en: z.ZodObject<{
33
- name: z.ZodString;
34
- description: z.ZodOptional<z.ZodString>;
35
- }, "strip", z.ZodTypeAny, {
36
- name: string;
37
- description?: string | undefined;
38
- }, {
39
- name: string;
40
- description?: string | undefined;
41
- }>;
42
- }, z.ZodTypeAny, "passthrough">, z.objectInputType<{
43
- en: z.ZodObject<{
44
- name: z.ZodString;
45
- description: z.ZodOptional<z.ZodString>;
46
- }, "strip", z.ZodTypeAny, {
47
- name: string;
48
- description?: string | undefined;
49
- }, {
50
- name: string;
51
- description?: string | undefined;
52
- }>;
53
- }, z.ZodTypeAny, "passthrough">>;
54
- activity: z.ZodObject<{
55
- startsAt: z.ZodString;
56
- endsAt: z.ZodOptional<z.ZodString>;
57
- }, "strip", z.ZodTypeAny, {
58
- startsAt: string;
59
- endsAt?: string | undefined;
60
- }, {
61
- startsAt: string;
62
- endsAt?: string | undefined;
63
- }>;
64
- rules: z.ZodArray<z.ZodObject<{
65
- name: z.ZodString;
66
- description: z.ZodOptional<z.ZodString>;
67
- target: z.ZodOptional<z.ZodEnum<["self", "referrer"]>>;
68
- effects: z.ZodArray<z.ZodObject<{
69
- effect: z.ZodString;
70
- pointsRule: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
71
- walletCode: z.ZodOptional<z.ZodString>;
72
- rewardId: z.ZodOptional<z.ZodString>;
73
- }, "strip", z.ZodTypeAny, {
74
- effect: string;
75
- walletCode?: string | undefined;
76
- rewardId?: string | undefined;
77
- pointsRule?: Record<string, unknown> | undefined;
78
- }, {
79
- effect: string;
80
- walletCode?: string | undefined;
81
- rewardId?: string | undefined;
82
- pointsRule?: Record<string, unknown> | undefined;
83
- }>, "many">;
84
- conditions: z.ZodOptional<z.ZodArray<z.ZodObject<{
85
- operator: z.ZodString;
86
- attribute: z.ZodString;
87
- data: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
88
- }, "strip", z.ZodTypeAny, {
89
- attribute: string;
90
- operator: string;
91
- data?: Record<string, unknown> | undefined;
92
- }, {
93
- attribute: string;
94
- operator: string;
95
- data?: Record<string, unknown> | undefined;
96
- }>, "many">>;
97
- }, "strip", z.ZodTypeAny, {
98
- name: string;
99
- effects: {
100
- effect: string;
101
- walletCode?: string | undefined;
102
- rewardId?: string | undefined;
103
- pointsRule?: Record<string, unknown> | undefined;
104
- }[];
105
- description?: string | undefined;
106
- conditions?: {
107
- attribute: string;
108
- operator: string;
109
- data?: Record<string, unknown> | undefined;
110
- }[] | undefined;
111
- target?: "self" | "referrer" | undefined;
112
- }, {
113
- name: string;
114
- effects: {
115
- effect: string;
116
- walletCode?: string | undefined;
117
- rewardId?: string | undefined;
118
- pointsRule?: Record<string, unknown> | undefined;
119
- }[];
120
- description?: string | undefined;
121
- conditions?: {
122
- attribute: string;
123
- operator: string;
124
- data?: Record<string, unknown> | undefined;
125
- }[] | undefined;
126
- target?: "self" | "referrer" | undefined;
127
- }>, "many">;
128
- visibility: z.ZodOptional<z.ZodObject<{
129
- target: z.ZodEnum<["all", "tier", "segment"]>;
130
- tiers: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
131
- segments: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
132
- }, "strip", z.ZodTypeAny, {
133
- target: "all" | "segment" | "tier";
134
- tiers?: string[] | undefined;
135
- segments?: string[] | undefined;
136
- }, {
137
- target: "all" | "segment" | "tier";
138
- tiers?: string[] | undefined;
139
- segments?: string[] | undefined;
140
- }>>;
141
- audience: z.ZodOptional<z.ZodObject<{
142
- target: z.ZodEnum<["all", "tier", "segment"]>;
143
- tiers: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
144
- segments: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
145
- }, "strip", z.ZodTypeAny, {
146
- target: "all" | "segment" | "tier";
147
- tiers?: string[] | undefined;
148
- segments?: string[] | undefined;
149
- }, {
150
- target: "all" | "segment" | "tier";
151
- tiers?: string[] | undefined;
152
- segments?: string[] | undefined;
153
- }>>;
154
- limits: z.ZodOptional<z.ZodObject<{
155
- points: z.ZodOptional<z.ZodObject<{
156
- value: z.ZodNumber;
157
- interval: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
158
- }, "strip", z.ZodTypeAny, {
159
- value: number;
160
- interval?: Record<string, unknown> | undefined;
161
- }, {
162
- value: number;
163
- interval?: Record<string, unknown> | undefined;
164
- }>>;
165
- pointsPerMember: z.ZodOptional<z.ZodObject<{
166
- value: z.ZodNumber;
167
- interval: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
168
- }, "strip", z.ZodTypeAny, {
169
- value: number;
170
- interval?: Record<string, unknown> | undefined;
171
- }, {
172
- value: number;
173
- interval?: Record<string, unknown> | undefined;
174
- }>>;
175
- executionsPerMember: z.ZodOptional<z.ZodObject<{
176
- value: z.ZodNumber;
177
- interval: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
178
- }, "strip", z.ZodTypeAny, {
179
- value: number;
180
- interval?: Record<string, unknown> | undefined;
181
- }, {
182
- value: number;
183
- interval?: Record<string, unknown> | undefined;
184
- }>>;
185
- }, "strip", z.ZodTypeAny, {
186
- points?: {
187
- value: number;
188
- interval?: Record<string, unknown> | undefined;
189
- } | undefined;
190
- pointsPerMember?: {
191
- value: number;
192
- interval?: Record<string, unknown> | undefined;
193
- } | undefined;
194
- executionsPerMember?: {
195
- value: number;
196
- interval?: Record<string, unknown> | undefined;
197
- } | undefined;
198
- }, {
199
- points?: {
200
- value: number;
201
- interval?: Record<string, unknown> | undefined;
202
- } | undefined;
203
- pointsPerMember?: {
204
- value: number;
205
- interval?: Record<string, unknown> | undefined;
206
- } | undefined;
207
- executionsPerMember?: {
208
- value: number;
209
- interval?: Record<string, unknown> | undefined;
210
- } | undefined;
211
- }>>;
212
- active: z.ZodOptional<z.ZodBoolean>;
213
- displayOrder: z.ZodOptional<z.ZodNumber>;
214
- labels: z.ZodOptional<z.ZodArray<z.ZodObject<{
215
- key: z.ZodString;
216
- value: z.ZodString;
217
- }, "strip", z.ZodTypeAny, {
218
- value: string;
219
- key: string;
220
- }, {
221
- value: string;
222
- key: string;
223
- }>, "many">>;
224
- event: z.ZodOptional<z.ZodString>;
225
- };
226
- export declare const CampaignPatchInputSchema: {
227
- storeCode: z.ZodOptional<z.ZodString>;
228
- campaignId: z.ZodString;
229
- active: z.ZodOptional<z.ZodBoolean>;
230
- displayOrder: z.ZodOptional<z.ZodNumber>;
231
- };
232
- export declare const CampaignDeleteInputSchema: {
233
- storeCode: z.ZodOptional<z.ZodString>;
234
- campaignId: z.ZodString;
235
- };
236
- export declare const CampaignSimulateInputSchema: {
237
- storeCode: z.ZodOptional<z.ZodString>;
238
- trigger: z.ZodEnum<["transaction", "custom_event", "time", "achievement", "custom_event_unique_code", "leaderboard", "internal_event", "return_transaction", "challenge", "fortune_wheel"]>;
239
- transaction: z.ZodOptional<z.ZodObject<{
240
- grossValue: z.ZodOptional<z.ZodNumber>;
241
- documentNumber: z.ZodOptional<z.ZodString>;
242
- purchasedAt: z.ZodOptional<z.ZodString>;
243
- documentType: z.ZodOptional<z.ZodEnum<["sell", "return"]>>;
244
- purchasePlace: z.ZodOptional<z.ZodString>;
245
- items: z.ZodOptional<z.ZodArray<z.ZodObject<{
246
- sku: z.ZodString;
247
- name: z.ZodString;
248
- qty: z.ZodOptional<z.ZodUnion<[z.ZodString, z.ZodNumber]>>;
249
- grossValue: z.ZodUnion<[z.ZodString, z.ZodNumber]>;
250
- category: z.ZodOptional<z.ZodString>;
251
- maker: z.ZodOptional<z.ZodString>;
252
- labels: z.ZodOptional<z.ZodArray<z.ZodObject<{
253
- key: z.ZodString;
254
- value: z.ZodString;
255
- }, "strip", z.ZodTypeAny, {
256
- value: string;
257
- key: string;
258
- }, {
259
- value: string;
260
- key: string;
261
- }>, "many">>;
262
- }, "strip", z.ZodTypeAny, {
263
- name: string;
264
- sku: string;
265
- grossValue: string | number;
266
- labels?: {
267
- value: string;
268
- key: string;
269
- }[] | undefined;
270
- category?: string | undefined;
271
- maker?: string | undefined;
272
- qty?: string | number | undefined;
273
- }, {
274
- name: string;
275
- sku: string;
276
- grossValue: string | number;
277
- labels?: {
278
- value: string;
279
- key: string;
280
- }[] | undefined;
281
- category?: string | undefined;
282
- maker?: string | undefined;
283
- qty?: string | number | undefined;
284
- }>, "many">>;
285
- labels: z.ZodOptional<z.ZodArray<z.ZodObject<{
286
- key: z.ZodString;
287
- value: z.ZodString;
288
- }, "strip", z.ZodTypeAny, {
289
- value: string;
290
- key: string;
291
- }, {
292
- value: string;
293
- key: string;
294
- }>, "many">>;
295
- }, "strip", z.ZodTypeAny, {
296
- items?: {
297
- name: string;
298
- sku: string;
299
- grossValue: string | number;
300
- labels?: {
301
- value: string;
302
- key: string;
303
- }[] | undefined;
304
- category?: string | undefined;
305
- maker?: string | undefined;
306
- qty?: string | number | undefined;
307
- }[] | undefined;
308
- documentNumber?: string | undefined;
309
- purchasedAt?: string | undefined;
310
- documentType?: "sell" | "return" | undefined;
311
- purchasePlace?: string | undefined;
312
- labels?: {
313
- value: string;
314
- key: string;
315
- }[] | undefined;
316
- grossValue?: number | undefined;
317
- }, {
318
- items?: {
319
- name: string;
320
- sku: string;
321
- grossValue: string | number;
322
- labels?: {
323
- value: string;
324
- key: string;
325
- }[] | undefined;
326
- category?: string | undefined;
327
- maker?: string | undefined;
328
- qty?: string | number | undefined;
329
- }[] | undefined;
330
- documentNumber?: string | undefined;
331
- purchasedAt?: string | undefined;
332
- documentType?: "sell" | "return" | undefined;
333
- purchasePlace?: string | undefined;
334
- labels?: {
335
- value: string;
336
- key: string;
337
- }[] | undefined;
338
- grossValue?: number | undefined;
339
- }>>;
340
- customEvent: z.ZodOptional<z.ZodObject<{
341
- eventCode: z.ZodString;
342
- attributes: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
343
- }, "strip", z.ZodTypeAny, {
344
- eventCode: string;
345
- attributes?: Record<string, unknown> | undefined;
346
- }, {
347
- eventCode: string;
348
- attributes?: Record<string, unknown> | undefined;
349
- }>>;
350
- customer: z.ZodObject<{
351
- customerId: z.ZodOptional<z.ZodString>;
352
- id: z.ZodOptional<z.ZodString>;
353
- email: z.ZodOptional<z.ZodString>;
354
- loyaltyCardNumber: z.ZodOptional<z.ZodString>;
355
- phone: z.ZodOptional<z.ZodString>;
356
- firstName: z.ZodOptional<z.ZodString>;
357
- lastName: z.ZodOptional<z.ZodString>;
358
- }, "strip", z.ZodTypeAny, {
359
- email?: string | undefined;
360
- phone?: string | undefined;
361
- loyaltyCardNumber?: string | undefined;
362
- firstName?: string | undefined;
363
- lastName?: string | undefined;
364
- id?: string | undefined;
365
- customerId?: string | undefined;
366
- }, {
367
- email?: string | undefined;
368
- phone?: string | undefined;
369
- loyaltyCardNumber?: string | undefined;
370
- firstName?: string | undefined;
371
- lastName?: string | undefined;
372
- id?: string | undefined;
373
- customerId?: string | undefined;
374
- }>;
375
- referrer: z.ZodOptional<z.ZodObject<{
376
- id: z.ZodOptional<z.ZodString>;
377
- email: z.ZodOptional<z.ZodString>;
378
- loyaltyCardNumber: z.ZodOptional<z.ZodString>;
379
- }, "strip", z.ZodTypeAny, {
380
- email?: string | undefined;
381
- loyaltyCardNumber?: string | undefined;
382
- id?: string | undefined;
383
- }, {
384
- email?: string | undefined;
385
- loyaltyCardNumber?: string | undefined;
386
- id?: string | undefined;
387
- }>>;
388
- };
389
- export declare const CampaignGenerateCodesInputSchema: {
390
- storeCode: z.ZodOptional<z.ZodString>;
391
- campaignId: z.ZodString;
392
- quantity: z.ZodNumber;
393
- };
394
- export declare const CampaignListCodesInputSchema: {
395
- storeCode: z.ZodOptional<z.ZodString>;
396
- campaignId: z.ZodString;
397
- page: z.ZodOptional<z.ZodNumber>;
398
- perPage: z.ZodOptional<z.ZodNumber>;
399
- status: z.ZodOptional<z.ZodString>;
400
- code: z.ZodOptional<z.ZodString>;
401
- };
402
- export declare const CampaignGetAvailableInputSchema: {
403
- storeCode: z.ZodOptional<z.ZodString>;
404
- memberId: z.ZodString;
405
- page: z.ZodOptional<z.ZodNumber>;
406
- perPage: z.ZodOptional<z.ZodNumber>;
407
- type: z.ZodOptional<z.ZodEnum<["direct", "referral"]>>;
408
- trigger: z.ZodOptional<z.ZodEnum<["transaction", "custom_event", "time", "achievement", "custom_event_unique_code", "leaderboard", "internal_event", "return_transaction", "challenge", "fortune_wheel"]>>;
409
- };
410
- export declare const CampaignGetVisibleInputSchema: {
411
- storeCode: z.ZodOptional<z.ZodString>;
412
- memberId: z.ZodString;
413
- page: z.ZodOptional<z.ZodNumber>;
414
- perPage: z.ZodOptional<z.ZodNumber>;
415
- active: z.ZodOptional<z.ZodBoolean>;
416
- };
417
- export declare const CampaignGetLeaderboardInputSchema: {
418
- storeCode: z.ZodOptional<z.ZodString>;
419
- campaignId: z.ZodString;
420
- type: z.ZodOptional<z.ZodString>;
421
- };
422
- export declare const CampaignCreateInputSchema: {
423
- storeCode: z.ZodOptional<z.ZodString>;
424
- type: z.ZodEnum<["direct", "referral"]>;
425
- trigger: z.ZodEnum<["transaction", "custom_event", "time", "achievement", "custom_event_unique_code", "leaderboard", "internal_event", "return_transaction", "challenge", "fortune_wheel"]>;
426
- translations: z.ZodObject<{
427
- en: z.ZodObject<{
428
- name: z.ZodString;
429
- description: z.ZodOptional<z.ZodString>;
430
- }, "strip", z.ZodTypeAny, {
431
- name: string;
432
- description?: string | undefined;
433
- }, {
434
- name: string;
435
- description?: string | undefined;
436
- }>;
437
- }, "passthrough", z.ZodTypeAny, z.objectOutputType<{
438
- en: z.ZodObject<{
439
- name: z.ZodString;
440
- description: z.ZodOptional<z.ZodString>;
441
- }, "strip", z.ZodTypeAny, {
442
- name: string;
443
- description?: string | undefined;
444
- }, {
445
- name: string;
446
- description?: string | undefined;
447
- }>;
448
- }, z.ZodTypeAny, "passthrough">, z.objectInputType<{
449
- en: z.ZodObject<{
450
- name: z.ZodString;
451
- description: z.ZodOptional<z.ZodString>;
452
- }, "strip", z.ZodTypeAny, {
453
- name: string;
454
- description?: string | undefined;
455
- }, {
456
- name: string;
457
- description?: string | undefined;
458
- }>;
459
- }, z.ZodTypeAny, "passthrough">>;
460
- activity: z.ZodObject<{
461
- startsAt: z.ZodString;
462
- endsAt: z.ZodOptional<z.ZodString>;
463
- }, "strip", z.ZodTypeAny, {
464
- startsAt: string;
465
- endsAt?: string | undefined;
466
- }, {
467
- startsAt: string;
468
- endsAt?: string | undefined;
469
- }>;
470
- rules: z.ZodArray<z.ZodObject<{
471
- name: z.ZodString;
472
- description: z.ZodOptional<z.ZodString>;
473
- target: z.ZodOptional<z.ZodEnum<["self", "referrer"]>>;
474
- effects: z.ZodArray<z.ZodObject<{
475
- effect: z.ZodEnum<["give_points", "give_reward", "deduct_unit", "assign_member_custom_attribute", "remove_member_custom_attribute"]>;
476
- pointsRule: z.ZodOptional<z.ZodObject<{
477
- expression: z.ZodOptional<z.ZodString>;
478
- multiplier: z.ZodOptional<z.ZodNumber>;
479
- fixedValue: z.ZodOptional<z.ZodNumber>;
480
- }, "strip", z.ZodTypeAny, {
481
- expression?: string | undefined;
482
- multiplier?: number | undefined;
483
- fixedValue?: number | undefined;
484
- }, {
485
- expression?: string | undefined;
486
- multiplier?: number | undefined;
487
- fixedValue?: number | undefined;
488
- }>>;
489
- walletCode: z.ZodOptional<z.ZodString>;
490
- rewardId: z.ZodOptional<z.ZodString>;
491
- customAttributeKey: z.ZodOptional<z.ZodString>;
492
- customAttributeValueRule: z.ZodOptional<z.ZodString>;
493
- }, "strip", z.ZodTypeAny, {
494
- effect: "give_points" | "give_reward" | "deduct_unit" | "assign_member_custom_attribute" | "remove_member_custom_attribute";
495
- walletCode?: string | undefined;
496
- rewardId?: string | undefined;
497
- pointsRule?: {
498
- expression?: string | undefined;
499
- multiplier?: number | undefined;
500
- fixedValue?: number | undefined;
501
- } | undefined;
502
- customAttributeKey?: string | undefined;
503
- customAttributeValueRule?: string | undefined;
504
- }, {
505
- effect: "give_points" | "give_reward" | "deduct_unit" | "assign_member_custom_attribute" | "remove_member_custom_attribute";
506
- walletCode?: string | undefined;
507
- rewardId?: string | undefined;
508
- pointsRule?: {
509
- expression?: string | undefined;
510
- multiplier?: number | undefined;
511
- fixedValue?: number | undefined;
512
- } | undefined;
513
- customAttributeKey?: string | undefined;
514
- customAttributeValueRule?: string | undefined;
515
- }>, "many">;
516
- conditions: z.ZodOptional<z.ZodArray<z.ZodObject<{
517
- operator: z.ZodString;
518
- attribute: z.ZodString;
519
- data: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
520
- }, "strip", z.ZodTypeAny, {
521
- attribute: string;
522
- operator: string;
523
- data?: Record<string, unknown> | undefined;
524
- }, {
525
- attribute: string;
526
- operator: string;
527
- data?: Record<string, unknown> | undefined;
528
- }>, "many">>;
529
- }, "strip", z.ZodTypeAny, {
530
- name: string;
531
- effects: {
532
- effect: "give_points" | "give_reward" | "deduct_unit" | "assign_member_custom_attribute" | "remove_member_custom_attribute";
533
- walletCode?: string | undefined;
534
- rewardId?: string | undefined;
535
- pointsRule?: {
536
- expression?: string | undefined;
537
- multiplier?: number | undefined;
538
- fixedValue?: number | undefined;
539
- } | undefined;
540
- customAttributeKey?: string | undefined;
541
- customAttributeValueRule?: string | undefined;
542
- }[];
543
- description?: string | undefined;
544
- conditions?: {
545
- attribute: string;
546
- operator: string;
547
- data?: Record<string, unknown> | undefined;
548
- }[] | undefined;
549
- target?: "self" | "referrer" | undefined;
550
- }, {
551
- name: string;
552
- effects: {
553
- effect: "give_points" | "give_reward" | "deduct_unit" | "assign_member_custom_attribute" | "remove_member_custom_attribute";
554
- walletCode?: string | undefined;
555
- rewardId?: string | undefined;
556
- pointsRule?: {
557
- expression?: string | undefined;
558
- multiplier?: number | undefined;
559
- fixedValue?: number | undefined;
560
- } | undefined;
561
- customAttributeKey?: string | undefined;
562
- customAttributeValueRule?: string | undefined;
563
- }[];
564
- description?: string | undefined;
565
- conditions?: {
566
- attribute: string;
567
- operator: string;
568
- data?: Record<string, unknown> | undefined;
569
- }[] | undefined;
570
- target?: "self" | "referrer" | undefined;
571
- }>, "many">;
572
- visibility: z.ZodOptional<z.ZodObject<{
573
- target: z.ZodEnum<["all", "tier", "segment"]>;
574
- tiers: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
575
- segments: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
576
- }, "strip", z.ZodTypeAny, {
577
- target: "all" | "segment" | "tier";
578
- tiers?: string[] | undefined;
579
- segments?: string[] | undefined;
580
- }, {
581
- target: "all" | "segment" | "tier";
582
- tiers?: string[] | undefined;
583
- segments?: string[] | undefined;
584
- }>>;
585
- audience: z.ZodOptional<z.ZodObject<{
586
- target: z.ZodEnum<["all", "tier", "segment"]>;
587
- tiers: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
588
- segments: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
589
- }, "strip", z.ZodTypeAny, {
590
- target: "all" | "segment" | "tier";
591
- tiers?: string[] | undefined;
592
- segments?: string[] | undefined;
593
- }, {
594
- target: "all" | "segment" | "tier";
595
- tiers?: string[] | undefined;
596
- segments?: string[] | undefined;
597
- }>>;
598
- limits: z.ZodOptional<z.ZodObject<{
599
- points: z.ZodOptional<z.ZodObject<{
600
- value: z.ZodNumber;
601
- interval: z.ZodOptional<z.ZodObject<{
602
- type: z.ZodEnum<["days", "weeks", "months", "years", "forever"]>;
603
- value: z.ZodOptional<z.ZodNumber>;
604
- }, "strip", z.ZodTypeAny, {
605
- type: "days" | "weeks" | "months" | "years" | "forever";
606
- value?: number | undefined;
607
- }, {
608
- type: "days" | "weeks" | "months" | "years" | "forever";
609
- value?: number | undefined;
610
- }>>;
611
- }, "strip", z.ZodTypeAny, {
612
- value: number;
613
- interval?: {
614
- type: "days" | "weeks" | "months" | "years" | "forever";
615
- value?: number | undefined;
616
- } | undefined;
617
- }, {
618
- value: number;
619
- interval?: {
620
- type: "days" | "weeks" | "months" | "years" | "forever";
621
- value?: number | undefined;
622
- } | undefined;
623
- }>>;
624
- pointsPerMember: z.ZodOptional<z.ZodObject<{
625
- value: z.ZodNumber;
626
- interval: z.ZodOptional<z.ZodObject<{
627
- type: z.ZodEnum<["days", "weeks", "months", "years", "forever"]>;
628
- value: z.ZodOptional<z.ZodNumber>;
629
- }, "strip", z.ZodTypeAny, {
630
- type: "days" | "weeks" | "months" | "years" | "forever";
631
- value?: number | undefined;
632
- }, {
633
- type: "days" | "weeks" | "months" | "years" | "forever";
634
- value?: number | undefined;
635
- }>>;
636
- }, "strip", z.ZodTypeAny, {
637
- value: number;
638
- interval?: {
639
- type: "days" | "weeks" | "months" | "years" | "forever";
640
- value?: number | undefined;
641
- } | undefined;
642
- }, {
643
- value: number;
644
- interval?: {
645
- type: "days" | "weeks" | "months" | "years" | "forever";
646
- value?: number | undefined;
647
- } | undefined;
648
- }>>;
649
- executionsPerMember: z.ZodOptional<z.ZodObject<{
650
- value: z.ZodNumber;
651
- interval: z.ZodOptional<z.ZodObject<{
652
- type: z.ZodEnum<["days", "weeks", "months", "years", "forever"]>;
653
- value: z.ZodOptional<z.ZodNumber>;
654
- }, "strip", z.ZodTypeAny, {
655
- type: "days" | "weeks" | "months" | "years" | "forever";
656
- value?: number | undefined;
657
- }, {
658
- type: "days" | "weeks" | "months" | "years" | "forever";
659
- value?: number | undefined;
660
- }>>;
661
- }, "strip", z.ZodTypeAny, {
662
- value: number;
663
- interval?: {
664
- type: "days" | "weeks" | "months" | "years" | "forever";
665
- value?: number | undefined;
666
- } | undefined;
667
- }, {
668
- value: number;
669
- interval?: {
670
- type: "days" | "weeks" | "months" | "years" | "forever";
671
- value?: number | undefined;
672
- } | undefined;
673
- }>>;
674
- }, "strip", z.ZodTypeAny, {
675
- points?: {
676
- value: number;
677
- interval?: {
678
- type: "days" | "weeks" | "months" | "years" | "forever";
679
- value?: number | undefined;
680
- } | undefined;
681
- } | undefined;
682
- pointsPerMember?: {
683
- value: number;
684
- interval?: {
685
- type: "days" | "weeks" | "months" | "years" | "forever";
686
- value?: number | undefined;
687
- } | undefined;
688
- } | undefined;
689
- executionsPerMember?: {
690
- value: number;
691
- interval?: {
692
- type: "days" | "weeks" | "months" | "years" | "forever";
693
- value?: number | undefined;
694
- } | undefined;
695
- } | undefined;
696
- }, {
697
- points?: {
698
- value: number;
699
- interval?: {
700
- type: "days" | "weeks" | "months" | "years" | "forever";
701
- value?: number | undefined;
702
- } | undefined;
703
- } | undefined;
704
- pointsPerMember?: {
705
- value: number;
706
- interval?: {
707
- type: "days" | "weeks" | "months" | "years" | "forever";
708
- value?: number | undefined;
709
- } | undefined;
710
- } | undefined;
711
- executionsPerMember?: {
712
- value: number;
713
- interval?: {
714
- type: "days" | "weeks" | "months" | "years" | "forever";
715
- value?: number | undefined;
716
- } | undefined;
717
- } | undefined;
718
- }>>;
719
- active: z.ZodOptional<z.ZodBoolean>;
720
- displayOrder: z.ZodOptional<z.ZodNumber>;
721
- labels: z.ZodOptional<z.ZodArray<z.ZodObject<{
722
- key: z.ZodString;
723
- value: z.ZodString;
724
- }, "strip", z.ZodTypeAny, {
725
- value: string;
726
- key: string;
727
- }, {
728
- value: string;
729
- key: string;
730
- }>, "many">>;
731
- event: z.ZodOptional<z.ZodString>;
732
- };
733
- export declare function campaignList(input: {
734
- storeCode?: string;
735
- page?: number;
736
- perPage?: number;
737
- active?: boolean;
738
- type?: string;
739
- trigger?: string;
740
- }): Promise<{
741
- campaigns: CampaignListItem[];
742
- total: {
743
- all?: number;
744
- filtered?: number;
745
- };
746
- }>;
747
- export declare function campaignGet(input: {
748
- storeCode?: string;
749
- campaignId: string;
750
- }): Promise<Record<string, unknown>>;
751
- export declare function campaignUpdate(input: Record<string, unknown>): Promise<void>;
752
- export declare function campaignPatch(input: {
753
- storeCode?: string;
754
- campaignId: string;
755
- active?: boolean;
756
- displayOrder?: number;
757
- }): Promise<void>;
758
- export declare function campaignDelete(input: {
759
- storeCode?: string;
760
- campaignId: string;
761
- }): Promise<void>;
762
- interface SimulatedEffect {
763
- campaignId: string;
764
- campaignName?: string;
765
- effects: Array<Record<string, unknown>>;
766
- limitReached?: boolean;
767
- }
768
- interface CampaignSimulateInput {
769
- storeCode?: string;
770
- trigger: string;
771
- transaction?: {
772
- grossValue?: number;
773
- documentNumber?: string;
774
- purchasedAt?: string;
775
- documentType?: string;
776
- purchasePlace?: string;
777
- items?: Array<{
778
- sku: string;
779
- name: string;
780
- qty?: string | number;
781
- grossValue: string | number;
782
- category?: string;
783
- maker?: string;
784
- labels?: Array<{
785
- key: string;
786
- value: string;
787
- }>;
788
- }>;
789
- labels?: Array<{
790
- key: string;
791
- value: string;
792
- }>;
793
- };
794
- customEvent?: {
795
- eventCode: string;
796
- attributes?: Record<string, unknown>;
797
- };
798
- customer: {
799
- customerId?: string;
800
- id?: string;
801
- email?: string;
802
- loyaltyCardNumber?: string;
803
- phone?: string;
804
- firstName?: string;
805
- lastName?: string;
806
- };
807
- referrer?: {
808
- id?: string;
809
- email?: string;
810
- loyaltyCardNumber?: string;
811
- };
812
- }
813
- export declare function campaignSimulate(input: CampaignSimulateInput): Promise<{
814
- simulatedEffects: SimulatedEffect[];
815
- evaluationWarnings?: Array<{
816
- campaignId: string;
817
- message: string;
818
- }>;
819
- simulatedMember?: Record<string, unknown>;
820
- }>;
821
- export declare function campaignGenerateCodes(input: {
822
- storeCode?: string;
823
- campaignId: string;
824
- quantity: number;
825
- }): Promise<{
826
- codesGenerated: number;
827
- }>;
828
- interface CampaignCode {
829
- codeId: string;
830
- code: string;
831
- status: string;
832
- usedAt?: string;
833
- createdAt?: string;
834
- createdBy?: string;
835
- }
836
- export declare function campaignListCodes(input: {
837
- storeCode?: string;
838
- campaignId: string;
839
- page?: number;
840
- perPage?: number;
841
- status?: string;
842
- code?: string;
843
- }): Promise<{
844
- codes: CampaignCode[];
845
- total: {
846
- all?: number;
847
- filtered?: number;
848
- };
849
- }>;
850
- interface MemberCampaignItem {
851
- campaignId: string;
852
- name: string;
853
- active: boolean;
854
- type: string;
855
- trigger: string;
856
- limitReached?: boolean;
857
- description?: string;
858
- }
859
- export declare function campaignGetAvailable(input: {
860
- storeCode?: string;
861
- memberId: string;
862
- page?: number;
863
- perPage?: number;
864
- type?: string;
865
- trigger?: string;
866
- }): Promise<{
867
- campaigns: MemberCampaignItem[];
868
- total: {
869
- all?: number;
870
- filtered?: number;
871
- };
872
- }>;
873
- export declare function campaignGetVisible(input: {
874
- storeCode?: string;
875
- memberId: string;
876
- page?: number;
877
- perPage?: number;
878
- active?: boolean;
879
- }): Promise<{
880
- campaigns: MemberCampaignItem[];
881
- total: {
882
- all?: number;
883
- filtered?: number;
884
- };
885
- }>;
886
- interface LeaderboardEntry {
887
- member: {
888
- customerId: string;
889
- firstName?: string;
890
- lastName?: string;
891
- email?: string;
892
- loyaltyCardNumber?: string;
893
- };
894
- ranking: {
895
- score: number;
896
- position: number;
897
- recalculatedAt?: string;
898
- changedPositionAt?: string;
899
- };
900
- }
901
- export declare function campaignGetLeaderboard(input: {
902
- storeCode?: string;
903
- campaignId: string;
904
- type?: string;
905
- }): Promise<{
906
- entries: LeaderboardEntry[];
907
- total: {
908
- all?: number;
909
- filtered?: number;
910
- };
911
- }>;
912
- interface CampaignCreateInput {
913
- storeCode?: string;
914
- type: string;
915
- trigger: string;
916
- translations: {
917
- en: {
918
- name: string;
919
- description?: string;
920
- };
921
- [key: string]: {
922
- name: string;
923
- description?: string;
924
- };
925
- };
926
- activity: {
927
- startsAt: string;
928
- endsAt?: string;
929
- };
930
- rules: Array<{
931
- name: string;
932
- description?: string;
933
- target?: string;
934
- effects: Array<{
935
- effect: string;
936
- pointsRule?: {
937
- expression?: string;
938
- multiplier?: number;
939
- fixedValue?: number;
940
- };
941
- walletCode?: string;
942
- rewardId?: string;
943
- customAttributeKey?: string;
944
- customAttributeValueRule?: string;
945
- }>;
946
- conditions?: Array<{
947
- operator: string;
948
- attribute: string;
949
- data?: Record<string, unknown>;
950
- }>;
951
- }>;
952
- visibility?: {
953
- target: string;
954
- tiers?: string[];
955
- segments?: string[];
956
- };
957
- audience?: {
958
- target: string;
959
- tiers?: string[];
960
- segments?: string[];
961
- };
962
- limits?: {
963
- points?: {
964
- value: number;
965
- interval?: {
966
- type: string;
967
- value?: number;
968
- };
969
- };
970
- pointsPerMember?: {
971
- value: number;
972
- interval?: {
973
- type: string;
974
- value?: number;
975
- };
976
- };
977
- executionsPerMember?: {
978
- value: number;
979
- interval?: {
980
- type: string;
981
- value?: number;
982
- };
983
- };
984
- };
985
- active?: boolean;
986
- displayOrder?: number;
987
- labels?: Array<{
988
- key: string;
989
- value: string;
990
- }>;
991
- event?: string;
992
- }
993
- export declare function campaignCreate(input: CampaignCreateInput): Promise<{
994
- campaignId: string;
995
- }>;
996
- export declare const campaignToolDefinitions: readonly [{
997
- readonly name: "openloyalty_campaign_list";
998
- readonly title: "List Campaigns";
999
- readonly description: "List all campaigns. Filter by type (direct/referral) or trigger (transaction/custom_event/time/etc). Use campaign_get for full configuration including rules and effects.";
1000
- readonly readOnly: true;
1001
- readonly inputSchema: {
1002
- storeCode: z.ZodOptional<z.ZodString>;
1003
- page: z.ZodOptional<z.ZodNumber>;
1004
- perPage: z.ZodOptional<z.ZodNumber>;
1005
- active: z.ZodOptional<z.ZodBoolean>;
1006
- type: z.ZodOptional<z.ZodEnum<["direct", "referral"]>>;
1007
- trigger: z.ZodOptional<z.ZodEnum<["transaction", "custom_event", "time", "achievement", "custom_event_unique_code", "leaderboard", "internal_event", "return_transaction", "challenge", "fortune_wheel"]>>;
1008
- };
1009
- readonly handler: typeof campaignList;
1010
- }, {
1011
- readonly name: "openloyalty_campaign_create";
1012
- readonly title: "Create Campaign";
1013
- readonly description: "Create campaign to automate engagement. Triggers: transaction (purchase-based), custom_event (for custom actions), time (scheduled). Effects: give_points, give_reward, deduct_unit. Rules define when/what happens. Example - Double points: trigger=transaction, effect=give_points with pointsRule containing multiplier:2.";
1014
- readonly readOnly: false;
1015
- readonly inputSchema: {
1016
- storeCode: z.ZodOptional<z.ZodString>;
1017
- type: z.ZodEnum<["direct", "referral"]>;
1018
- trigger: z.ZodEnum<["transaction", "custom_event", "time", "achievement", "custom_event_unique_code", "leaderboard", "internal_event", "return_transaction", "challenge", "fortune_wheel"]>;
1019
- translations: z.ZodObject<{
1020
- en: z.ZodObject<{
1021
- name: z.ZodString;
1022
- description: z.ZodOptional<z.ZodString>;
1023
- }, "strip", z.ZodTypeAny, {
1024
- name: string;
1025
- description?: string | undefined;
1026
- }, {
1027
- name: string;
1028
- description?: string | undefined;
1029
- }>;
1030
- }, "passthrough", z.ZodTypeAny, z.objectOutputType<{
1031
- en: z.ZodObject<{
1032
- name: z.ZodString;
1033
- description: z.ZodOptional<z.ZodString>;
1034
- }, "strip", z.ZodTypeAny, {
1035
- name: string;
1036
- description?: string | undefined;
1037
- }, {
1038
- name: string;
1039
- description?: string | undefined;
1040
- }>;
1041
- }, z.ZodTypeAny, "passthrough">, z.objectInputType<{
1042
- en: z.ZodObject<{
1043
- name: z.ZodString;
1044
- description: z.ZodOptional<z.ZodString>;
1045
- }, "strip", z.ZodTypeAny, {
1046
- name: string;
1047
- description?: string | undefined;
1048
- }, {
1049
- name: string;
1050
- description?: string | undefined;
1051
- }>;
1052
- }, z.ZodTypeAny, "passthrough">>;
1053
- activity: z.ZodObject<{
1054
- startsAt: z.ZodString;
1055
- endsAt: z.ZodOptional<z.ZodString>;
1056
- }, "strip", z.ZodTypeAny, {
1057
- startsAt: string;
1058
- endsAt?: string | undefined;
1059
- }, {
1060
- startsAt: string;
1061
- endsAt?: string | undefined;
1062
- }>;
1063
- rules: z.ZodArray<z.ZodObject<{
1064
- name: z.ZodString;
1065
- description: z.ZodOptional<z.ZodString>;
1066
- target: z.ZodOptional<z.ZodEnum<["self", "referrer"]>>;
1067
- effects: z.ZodArray<z.ZodObject<{
1068
- effect: z.ZodEnum<["give_points", "give_reward", "deduct_unit", "assign_member_custom_attribute", "remove_member_custom_attribute"]>;
1069
- pointsRule: z.ZodOptional<z.ZodObject<{
1070
- expression: z.ZodOptional<z.ZodString>;
1071
- multiplier: z.ZodOptional<z.ZodNumber>;
1072
- fixedValue: z.ZodOptional<z.ZodNumber>;
1073
- }, "strip", z.ZodTypeAny, {
1074
- expression?: string | undefined;
1075
- multiplier?: number | undefined;
1076
- fixedValue?: number | undefined;
1077
- }, {
1078
- expression?: string | undefined;
1079
- multiplier?: number | undefined;
1080
- fixedValue?: number | undefined;
1081
- }>>;
1082
- walletCode: z.ZodOptional<z.ZodString>;
1083
- rewardId: z.ZodOptional<z.ZodString>;
1084
- customAttributeKey: z.ZodOptional<z.ZodString>;
1085
- customAttributeValueRule: z.ZodOptional<z.ZodString>;
1086
- }, "strip", z.ZodTypeAny, {
1087
- effect: "give_points" | "give_reward" | "deduct_unit" | "assign_member_custom_attribute" | "remove_member_custom_attribute";
1088
- walletCode?: string | undefined;
1089
- rewardId?: string | undefined;
1090
- pointsRule?: {
1091
- expression?: string | undefined;
1092
- multiplier?: number | undefined;
1093
- fixedValue?: number | undefined;
1094
- } | undefined;
1095
- customAttributeKey?: string | undefined;
1096
- customAttributeValueRule?: string | undefined;
1097
- }, {
1098
- effect: "give_points" | "give_reward" | "deduct_unit" | "assign_member_custom_attribute" | "remove_member_custom_attribute";
1099
- walletCode?: string | undefined;
1100
- rewardId?: string | undefined;
1101
- pointsRule?: {
1102
- expression?: string | undefined;
1103
- multiplier?: number | undefined;
1104
- fixedValue?: number | undefined;
1105
- } | undefined;
1106
- customAttributeKey?: string | undefined;
1107
- customAttributeValueRule?: string | undefined;
1108
- }>, "many">;
1109
- conditions: z.ZodOptional<z.ZodArray<z.ZodObject<{
1110
- operator: z.ZodString;
1111
- attribute: z.ZodString;
1112
- data: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
1113
- }, "strip", z.ZodTypeAny, {
1114
- attribute: string;
1115
- operator: string;
1116
- data?: Record<string, unknown> | undefined;
1117
- }, {
1118
- attribute: string;
1119
- operator: string;
1120
- data?: Record<string, unknown> | undefined;
1121
- }>, "many">>;
1122
- }, "strip", z.ZodTypeAny, {
1123
- name: string;
1124
- effects: {
1125
- effect: "give_points" | "give_reward" | "deduct_unit" | "assign_member_custom_attribute" | "remove_member_custom_attribute";
1126
- walletCode?: string | undefined;
1127
- rewardId?: string | undefined;
1128
- pointsRule?: {
1129
- expression?: string | undefined;
1130
- multiplier?: number | undefined;
1131
- fixedValue?: number | undefined;
1132
- } | undefined;
1133
- customAttributeKey?: string | undefined;
1134
- customAttributeValueRule?: string | undefined;
1135
- }[];
1136
- description?: string | undefined;
1137
- conditions?: {
1138
- attribute: string;
1139
- operator: string;
1140
- data?: Record<string, unknown> | undefined;
1141
- }[] | undefined;
1142
- target?: "self" | "referrer" | undefined;
1143
- }, {
1144
- name: string;
1145
- effects: {
1146
- effect: "give_points" | "give_reward" | "deduct_unit" | "assign_member_custom_attribute" | "remove_member_custom_attribute";
1147
- walletCode?: string | undefined;
1148
- rewardId?: string | undefined;
1149
- pointsRule?: {
1150
- expression?: string | undefined;
1151
- multiplier?: number | undefined;
1152
- fixedValue?: number | undefined;
1153
- } | undefined;
1154
- customAttributeKey?: string | undefined;
1155
- customAttributeValueRule?: string | undefined;
1156
- }[];
1157
- description?: string | undefined;
1158
- conditions?: {
1159
- attribute: string;
1160
- operator: string;
1161
- data?: Record<string, unknown> | undefined;
1162
- }[] | undefined;
1163
- target?: "self" | "referrer" | undefined;
1164
- }>, "many">;
1165
- visibility: z.ZodOptional<z.ZodObject<{
1166
- target: z.ZodEnum<["all", "tier", "segment"]>;
1167
- tiers: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
1168
- segments: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
1169
- }, "strip", z.ZodTypeAny, {
1170
- target: "all" | "segment" | "tier";
1171
- tiers?: string[] | undefined;
1172
- segments?: string[] | undefined;
1173
- }, {
1174
- target: "all" | "segment" | "tier";
1175
- tiers?: string[] | undefined;
1176
- segments?: string[] | undefined;
1177
- }>>;
1178
- audience: z.ZodOptional<z.ZodObject<{
1179
- target: z.ZodEnum<["all", "tier", "segment"]>;
1180
- tiers: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
1181
- segments: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
1182
- }, "strip", z.ZodTypeAny, {
1183
- target: "all" | "segment" | "tier";
1184
- tiers?: string[] | undefined;
1185
- segments?: string[] | undefined;
1186
- }, {
1187
- target: "all" | "segment" | "tier";
1188
- tiers?: string[] | undefined;
1189
- segments?: string[] | undefined;
1190
- }>>;
1191
- limits: z.ZodOptional<z.ZodObject<{
1192
- points: z.ZodOptional<z.ZodObject<{
1193
- value: z.ZodNumber;
1194
- interval: z.ZodOptional<z.ZodObject<{
1195
- type: z.ZodEnum<["days", "weeks", "months", "years", "forever"]>;
1196
- value: z.ZodOptional<z.ZodNumber>;
1197
- }, "strip", z.ZodTypeAny, {
1198
- type: "days" | "weeks" | "months" | "years" | "forever";
1199
- value?: number | undefined;
1200
- }, {
1201
- type: "days" | "weeks" | "months" | "years" | "forever";
1202
- value?: number | undefined;
1203
- }>>;
1204
- }, "strip", z.ZodTypeAny, {
1205
- value: number;
1206
- interval?: {
1207
- type: "days" | "weeks" | "months" | "years" | "forever";
1208
- value?: number | undefined;
1209
- } | undefined;
1210
- }, {
1211
- value: number;
1212
- interval?: {
1213
- type: "days" | "weeks" | "months" | "years" | "forever";
1214
- value?: number | undefined;
1215
- } | undefined;
1216
- }>>;
1217
- pointsPerMember: z.ZodOptional<z.ZodObject<{
1218
- value: z.ZodNumber;
1219
- interval: z.ZodOptional<z.ZodObject<{
1220
- type: z.ZodEnum<["days", "weeks", "months", "years", "forever"]>;
1221
- value: z.ZodOptional<z.ZodNumber>;
1222
- }, "strip", z.ZodTypeAny, {
1223
- type: "days" | "weeks" | "months" | "years" | "forever";
1224
- value?: number | undefined;
1225
- }, {
1226
- type: "days" | "weeks" | "months" | "years" | "forever";
1227
- value?: number | undefined;
1228
- }>>;
1229
- }, "strip", z.ZodTypeAny, {
1230
- value: number;
1231
- interval?: {
1232
- type: "days" | "weeks" | "months" | "years" | "forever";
1233
- value?: number | undefined;
1234
- } | undefined;
1235
- }, {
1236
- value: number;
1237
- interval?: {
1238
- type: "days" | "weeks" | "months" | "years" | "forever";
1239
- value?: number | undefined;
1240
- } | undefined;
1241
- }>>;
1242
- executionsPerMember: z.ZodOptional<z.ZodObject<{
1243
- value: z.ZodNumber;
1244
- interval: z.ZodOptional<z.ZodObject<{
1245
- type: z.ZodEnum<["days", "weeks", "months", "years", "forever"]>;
1246
- value: z.ZodOptional<z.ZodNumber>;
1247
- }, "strip", z.ZodTypeAny, {
1248
- type: "days" | "weeks" | "months" | "years" | "forever";
1249
- value?: number | undefined;
1250
- }, {
1251
- type: "days" | "weeks" | "months" | "years" | "forever";
1252
- value?: number | undefined;
1253
- }>>;
1254
- }, "strip", z.ZodTypeAny, {
1255
- value: number;
1256
- interval?: {
1257
- type: "days" | "weeks" | "months" | "years" | "forever";
1258
- value?: number | undefined;
1259
- } | undefined;
1260
- }, {
1261
- value: number;
1262
- interval?: {
1263
- type: "days" | "weeks" | "months" | "years" | "forever";
1264
- value?: number | undefined;
1265
- } | undefined;
1266
- }>>;
1267
- }, "strip", z.ZodTypeAny, {
1268
- points?: {
1269
- value: number;
1270
- interval?: {
1271
- type: "days" | "weeks" | "months" | "years" | "forever";
1272
- value?: number | undefined;
1273
- } | undefined;
1274
- } | undefined;
1275
- pointsPerMember?: {
1276
- value: number;
1277
- interval?: {
1278
- type: "days" | "weeks" | "months" | "years" | "forever";
1279
- value?: number | undefined;
1280
- } | undefined;
1281
- } | undefined;
1282
- executionsPerMember?: {
1283
- value: number;
1284
- interval?: {
1285
- type: "days" | "weeks" | "months" | "years" | "forever";
1286
- value?: number | undefined;
1287
- } | undefined;
1288
- } | undefined;
1289
- }, {
1290
- points?: {
1291
- value: number;
1292
- interval?: {
1293
- type: "days" | "weeks" | "months" | "years" | "forever";
1294
- value?: number | undefined;
1295
- } | undefined;
1296
- } | undefined;
1297
- pointsPerMember?: {
1298
- value: number;
1299
- interval?: {
1300
- type: "days" | "weeks" | "months" | "years" | "forever";
1301
- value?: number | undefined;
1302
- } | undefined;
1303
- } | undefined;
1304
- executionsPerMember?: {
1305
- value: number;
1306
- interval?: {
1307
- type: "days" | "weeks" | "months" | "years" | "forever";
1308
- value?: number | undefined;
1309
- } | undefined;
1310
- } | undefined;
1311
- }>>;
1312
- active: z.ZodOptional<z.ZodBoolean>;
1313
- displayOrder: z.ZodOptional<z.ZodNumber>;
1314
- labels: z.ZodOptional<z.ZodArray<z.ZodObject<{
1315
- key: z.ZodString;
1316
- value: z.ZodString;
1317
- }, "strip", z.ZodTypeAny, {
1318
- value: string;
1319
- key: string;
1320
- }, {
1321
- value: string;
1322
- key: string;
1323
- }>, "many">>;
1324
- event: z.ZodOptional<z.ZodString>;
1325
- };
1326
- readonly handler: typeof campaignCreate;
1327
- }, {
1328
- readonly name: "openloyalty_campaign_get";
1329
- readonly title: "Get Campaign Details";
1330
- readonly description: "Get full campaign configuration including all rules, conditions, effects, and targeting.";
1331
- readonly readOnly: true;
1332
- readonly inputSchema: {
1333
- storeCode: z.ZodOptional<z.ZodString>;
1334
- campaignId: z.ZodString;
1335
- };
1336
- readonly handler: typeof campaignGet;
1337
- }, {
1338
- readonly name: "openloyalty_campaign_update";
1339
- readonly title: "Update Campaign";
1340
- readonly description: "Full update of campaign configuration. Requires all campaign fields. Use campaign_get first to retrieve current configuration, modify it, then send the complete object.";
1341
- readonly readOnly: false;
1342
- readonly inputSchema: {
1343
- storeCode: z.ZodOptional<z.ZodString>;
1344
- campaignId: z.ZodString;
1345
- type: z.ZodEnum<["direct", "referral"]>;
1346
- trigger: z.ZodEnum<["transaction", "custom_event", "time", "achievement", "custom_event_unique_code", "leaderboard", "internal_event", "return_transaction", "challenge", "fortune_wheel"]>;
1347
- translations: z.ZodObject<{
1348
- en: z.ZodObject<{
1349
- name: z.ZodString;
1350
- description: z.ZodOptional<z.ZodString>;
1351
- }, "strip", z.ZodTypeAny, {
1352
- name: string;
1353
- description?: string | undefined;
1354
- }, {
1355
- name: string;
1356
- description?: string | undefined;
1357
- }>;
1358
- }, "passthrough", z.ZodTypeAny, z.objectOutputType<{
1359
- en: z.ZodObject<{
1360
- name: z.ZodString;
1361
- description: z.ZodOptional<z.ZodString>;
1362
- }, "strip", z.ZodTypeAny, {
1363
- name: string;
1364
- description?: string | undefined;
1365
- }, {
1366
- name: string;
1367
- description?: string | undefined;
1368
- }>;
1369
- }, z.ZodTypeAny, "passthrough">, z.objectInputType<{
1370
- en: z.ZodObject<{
1371
- name: z.ZodString;
1372
- description: z.ZodOptional<z.ZodString>;
1373
- }, "strip", z.ZodTypeAny, {
1374
- name: string;
1375
- description?: string | undefined;
1376
- }, {
1377
- name: string;
1378
- description?: string | undefined;
1379
- }>;
1380
- }, z.ZodTypeAny, "passthrough">>;
1381
- activity: z.ZodObject<{
1382
- startsAt: z.ZodString;
1383
- endsAt: z.ZodOptional<z.ZodString>;
1384
- }, "strip", z.ZodTypeAny, {
1385
- startsAt: string;
1386
- endsAt?: string | undefined;
1387
- }, {
1388
- startsAt: string;
1389
- endsAt?: string | undefined;
1390
- }>;
1391
- rules: z.ZodArray<z.ZodObject<{
1392
- name: z.ZodString;
1393
- description: z.ZodOptional<z.ZodString>;
1394
- target: z.ZodOptional<z.ZodEnum<["self", "referrer"]>>;
1395
- effects: z.ZodArray<z.ZodObject<{
1396
- effect: z.ZodString;
1397
- pointsRule: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
1398
- walletCode: z.ZodOptional<z.ZodString>;
1399
- rewardId: z.ZodOptional<z.ZodString>;
1400
- }, "strip", z.ZodTypeAny, {
1401
- effect: string;
1402
- walletCode?: string | undefined;
1403
- rewardId?: string | undefined;
1404
- pointsRule?: Record<string, unknown> | undefined;
1405
- }, {
1406
- effect: string;
1407
- walletCode?: string | undefined;
1408
- rewardId?: string | undefined;
1409
- pointsRule?: Record<string, unknown> | undefined;
1410
- }>, "many">;
1411
- conditions: z.ZodOptional<z.ZodArray<z.ZodObject<{
1412
- operator: z.ZodString;
1413
- attribute: z.ZodString;
1414
- data: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
1415
- }, "strip", z.ZodTypeAny, {
1416
- attribute: string;
1417
- operator: string;
1418
- data?: Record<string, unknown> | undefined;
1419
- }, {
1420
- attribute: string;
1421
- operator: string;
1422
- data?: Record<string, unknown> | undefined;
1423
- }>, "many">>;
1424
- }, "strip", z.ZodTypeAny, {
1425
- name: string;
1426
- effects: {
1427
- effect: string;
1428
- walletCode?: string | undefined;
1429
- rewardId?: string | undefined;
1430
- pointsRule?: Record<string, unknown> | undefined;
1431
- }[];
1432
- description?: string | undefined;
1433
- conditions?: {
1434
- attribute: string;
1435
- operator: string;
1436
- data?: Record<string, unknown> | undefined;
1437
- }[] | undefined;
1438
- target?: "self" | "referrer" | undefined;
1439
- }, {
1440
- name: string;
1441
- effects: {
1442
- effect: string;
1443
- walletCode?: string | undefined;
1444
- rewardId?: string | undefined;
1445
- pointsRule?: Record<string, unknown> | undefined;
1446
- }[];
1447
- description?: string | undefined;
1448
- conditions?: {
1449
- attribute: string;
1450
- operator: string;
1451
- data?: Record<string, unknown> | undefined;
1452
- }[] | undefined;
1453
- target?: "self" | "referrer" | undefined;
1454
- }>, "many">;
1455
- visibility: z.ZodOptional<z.ZodObject<{
1456
- target: z.ZodEnum<["all", "tier", "segment"]>;
1457
- tiers: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
1458
- segments: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
1459
- }, "strip", z.ZodTypeAny, {
1460
- target: "all" | "segment" | "tier";
1461
- tiers?: string[] | undefined;
1462
- segments?: string[] | undefined;
1463
- }, {
1464
- target: "all" | "segment" | "tier";
1465
- tiers?: string[] | undefined;
1466
- segments?: string[] | undefined;
1467
- }>>;
1468
- audience: z.ZodOptional<z.ZodObject<{
1469
- target: z.ZodEnum<["all", "tier", "segment"]>;
1470
- tiers: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
1471
- segments: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
1472
- }, "strip", z.ZodTypeAny, {
1473
- target: "all" | "segment" | "tier";
1474
- tiers?: string[] | undefined;
1475
- segments?: string[] | undefined;
1476
- }, {
1477
- target: "all" | "segment" | "tier";
1478
- tiers?: string[] | undefined;
1479
- segments?: string[] | undefined;
1480
- }>>;
1481
- limits: z.ZodOptional<z.ZodObject<{
1482
- points: z.ZodOptional<z.ZodObject<{
1483
- value: z.ZodNumber;
1484
- interval: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
1485
- }, "strip", z.ZodTypeAny, {
1486
- value: number;
1487
- interval?: Record<string, unknown> | undefined;
1488
- }, {
1489
- value: number;
1490
- interval?: Record<string, unknown> | undefined;
1491
- }>>;
1492
- pointsPerMember: z.ZodOptional<z.ZodObject<{
1493
- value: z.ZodNumber;
1494
- interval: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
1495
- }, "strip", z.ZodTypeAny, {
1496
- value: number;
1497
- interval?: Record<string, unknown> | undefined;
1498
- }, {
1499
- value: number;
1500
- interval?: Record<string, unknown> | undefined;
1501
- }>>;
1502
- executionsPerMember: z.ZodOptional<z.ZodObject<{
1503
- value: z.ZodNumber;
1504
- interval: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
1505
- }, "strip", z.ZodTypeAny, {
1506
- value: number;
1507
- interval?: Record<string, unknown> | undefined;
1508
- }, {
1509
- value: number;
1510
- interval?: Record<string, unknown> | undefined;
1511
- }>>;
1512
- }, "strip", z.ZodTypeAny, {
1513
- points?: {
1514
- value: number;
1515
- interval?: Record<string, unknown> | undefined;
1516
- } | undefined;
1517
- pointsPerMember?: {
1518
- value: number;
1519
- interval?: Record<string, unknown> | undefined;
1520
- } | undefined;
1521
- executionsPerMember?: {
1522
- value: number;
1523
- interval?: Record<string, unknown> | undefined;
1524
- } | undefined;
1525
- }, {
1526
- points?: {
1527
- value: number;
1528
- interval?: Record<string, unknown> | undefined;
1529
- } | undefined;
1530
- pointsPerMember?: {
1531
- value: number;
1532
- interval?: Record<string, unknown> | undefined;
1533
- } | undefined;
1534
- executionsPerMember?: {
1535
- value: number;
1536
- interval?: Record<string, unknown> | undefined;
1537
- } | undefined;
1538
- }>>;
1539
- active: z.ZodOptional<z.ZodBoolean>;
1540
- displayOrder: z.ZodOptional<z.ZodNumber>;
1541
- labels: z.ZodOptional<z.ZodArray<z.ZodObject<{
1542
- key: z.ZodString;
1543
- value: z.ZodString;
1544
- }, "strip", z.ZodTypeAny, {
1545
- value: string;
1546
- key: string;
1547
- }, {
1548
- value: string;
1549
- key: string;
1550
- }>, "many">>;
1551
- event: z.ZodOptional<z.ZodString>;
1552
- };
1553
- readonly handler: typeof campaignUpdate;
1554
- }, {
1555
- readonly name: "openloyalty_campaign_patch";
1556
- readonly title: "Patch Campaign";
1557
- readonly description: "Partial update of campaign - only active status and displayOrder can be patched. For full updates, use campaign_update.";
1558
- readonly readOnly: false;
1559
- readonly inputSchema: {
1560
- storeCode: z.ZodOptional<z.ZodString>;
1561
- campaignId: z.ZodString;
1562
- active: z.ZodOptional<z.ZodBoolean>;
1563
- displayOrder: z.ZodOptional<z.ZodNumber>;
1564
- };
1565
- readonly handler: typeof campaignPatch;
1566
- }, {
1567
- readonly name: "openloyalty_campaign_delete";
1568
- readonly title: "Delete Campaign (Permanent)";
1569
- readonly description: "Permanently delete a campaign. This cannot be undone. Consider deactivating instead if you may need the campaign later.";
1570
- readonly readOnly: false;
1571
- readonly destructive: true;
1572
- readonly inputSchema: {
1573
- storeCode: z.ZodOptional<z.ZodString>;
1574
- campaignId: z.ZodString;
1575
- };
1576
- readonly handler: typeof campaignDelete;
1577
- }, {
1578
- readonly name: "openloyalty_campaign_simulate";
1579
- readonly title: "Simulate Campaign Effects";
1580
- readonly description: "Simulate campaign effects without executing them. Use to preview what points/rewards a transaction would earn. Provide trigger type, transaction/event data, and customer. Returns simulated effects grouped by campaign.";
1581
- readonly readOnly: true;
1582
- readonly inputSchema: {
1583
- storeCode: z.ZodOptional<z.ZodString>;
1584
- trigger: z.ZodEnum<["transaction", "custom_event", "time", "achievement", "custom_event_unique_code", "leaderboard", "internal_event", "return_transaction", "challenge", "fortune_wheel"]>;
1585
- transaction: z.ZodOptional<z.ZodObject<{
1586
- grossValue: z.ZodOptional<z.ZodNumber>;
1587
- documentNumber: z.ZodOptional<z.ZodString>;
1588
- purchasedAt: z.ZodOptional<z.ZodString>;
1589
- documentType: z.ZodOptional<z.ZodEnum<["sell", "return"]>>;
1590
- purchasePlace: z.ZodOptional<z.ZodString>;
1591
- items: z.ZodOptional<z.ZodArray<z.ZodObject<{
1592
- sku: z.ZodString;
1593
- name: z.ZodString;
1594
- qty: z.ZodOptional<z.ZodUnion<[z.ZodString, z.ZodNumber]>>;
1595
- grossValue: z.ZodUnion<[z.ZodString, z.ZodNumber]>;
1596
- category: z.ZodOptional<z.ZodString>;
1597
- maker: z.ZodOptional<z.ZodString>;
1598
- labels: z.ZodOptional<z.ZodArray<z.ZodObject<{
1599
- key: z.ZodString;
1600
- value: z.ZodString;
1601
- }, "strip", z.ZodTypeAny, {
1602
- value: string;
1603
- key: string;
1604
- }, {
1605
- value: string;
1606
- key: string;
1607
- }>, "many">>;
1608
- }, "strip", z.ZodTypeAny, {
1609
- name: string;
1610
- sku: string;
1611
- grossValue: string | number;
1612
- labels?: {
1613
- value: string;
1614
- key: string;
1615
- }[] | undefined;
1616
- category?: string | undefined;
1617
- maker?: string | undefined;
1618
- qty?: string | number | undefined;
1619
- }, {
1620
- name: string;
1621
- sku: string;
1622
- grossValue: string | number;
1623
- labels?: {
1624
- value: string;
1625
- key: string;
1626
- }[] | undefined;
1627
- category?: string | undefined;
1628
- maker?: string | undefined;
1629
- qty?: string | number | undefined;
1630
- }>, "many">>;
1631
- labels: z.ZodOptional<z.ZodArray<z.ZodObject<{
1632
- key: z.ZodString;
1633
- value: z.ZodString;
1634
- }, "strip", z.ZodTypeAny, {
1635
- value: string;
1636
- key: string;
1637
- }, {
1638
- value: string;
1639
- key: string;
1640
- }>, "many">>;
1641
- }, "strip", z.ZodTypeAny, {
1642
- items?: {
1643
- name: string;
1644
- sku: string;
1645
- grossValue: string | number;
1646
- labels?: {
1647
- value: string;
1648
- key: string;
1649
- }[] | undefined;
1650
- category?: string | undefined;
1651
- maker?: string | undefined;
1652
- qty?: string | number | undefined;
1653
- }[] | undefined;
1654
- documentNumber?: string | undefined;
1655
- purchasedAt?: string | undefined;
1656
- documentType?: "sell" | "return" | undefined;
1657
- purchasePlace?: string | undefined;
1658
- labels?: {
1659
- value: string;
1660
- key: string;
1661
- }[] | undefined;
1662
- grossValue?: number | undefined;
1663
- }, {
1664
- items?: {
1665
- name: string;
1666
- sku: string;
1667
- grossValue: string | number;
1668
- labels?: {
1669
- value: string;
1670
- key: string;
1671
- }[] | undefined;
1672
- category?: string | undefined;
1673
- maker?: string | undefined;
1674
- qty?: string | number | undefined;
1675
- }[] | undefined;
1676
- documentNumber?: string | undefined;
1677
- purchasedAt?: string | undefined;
1678
- documentType?: "sell" | "return" | undefined;
1679
- purchasePlace?: string | undefined;
1680
- labels?: {
1681
- value: string;
1682
- key: string;
1683
- }[] | undefined;
1684
- grossValue?: number | undefined;
1685
- }>>;
1686
- customEvent: z.ZodOptional<z.ZodObject<{
1687
- eventCode: z.ZodString;
1688
- attributes: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
1689
- }, "strip", z.ZodTypeAny, {
1690
- eventCode: string;
1691
- attributes?: Record<string, unknown> | undefined;
1692
- }, {
1693
- eventCode: string;
1694
- attributes?: Record<string, unknown> | undefined;
1695
- }>>;
1696
- customer: z.ZodObject<{
1697
- customerId: z.ZodOptional<z.ZodString>;
1698
- id: z.ZodOptional<z.ZodString>;
1699
- email: z.ZodOptional<z.ZodString>;
1700
- loyaltyCardNumber: z.ZodOptional<z.ZodString>;
1701
- phone: z.ZodOptional<z.ZodString>;
1702
- firstName: z.ZodOptional<z.ZodString>;
1703
- lastName: z.ZodOptional<z.ZodString>;
1704
- }, "strip", z.ZodTypeAny, {
1705
- email?: string | undefined;
1706
- phone?: string | undefined;
1707
- loyaltyCardNumber?: string | undefined;
1708
- firstName?: string | undefined;
1709
- lastName?: string | undefined;
1710
- id?: string | undefined;
1711
- customerId?: string | undefined;
1712
- }, {
1713
- email?: string | undefined;
1714
- phone?: string | undefined;
1715
- loyaltyCardNumber?: string | undefined;
1716
- firstName?: string | undefined;
1717
- lastName?: string | undefined;
1718
- id?: string | undefined;
1719
- customerId?: string | undefined;
1720
- }>;
1721
- referrer: z.ZodOptional<z.ZodObject<{
1722
- id: z.ZodOptional<z.ZodString>;
1723
- email: z.ZodOptional<z.ZodString>;
1724
- loyaltyCardNumber: z.ZodOptional<z.ZodString>;
1725
- }, "strip", z.ZodTypeAny, {
1726
- email?: string | undefined;
1727
- loyaltyCardNumber?: string | undefined;
1728
- id?: string | undefined;
1729
- }, {
1730
- email?: string | undefined;
1731
- loyaltyCardNumber?: string | undefined;
1732
- id?: string | undefined;
1733
- }>>;
1734
- };
1735
- readonly handler: typeof campaignSimulate;
1736
- }, {
1737
- readonly name: "openloyalty_campaign_generate_codes";
1738
- readonly title: "Generate Campaign Codes";
1739
- readonly description: "Generate unique redemption codes for a campaign. Use for promotions requiring unique codes. Codes are auto-generated and can be retrieved with campaign_list_codes.";
1740
- readonly readOnly: false;
1741
- readonly inputSchema: {
1742
- storeCode: z.ZodOptional<z.ZodString>;
1743
- campaignId: z.ZodString;
1744
- quantity: z.ZodNumber;
1745
- };
1746
- readonly handler: typeof campaignGenerateCodes;
1747
- }, {
1748
- readonly name: "openloyalty_campaign_list_codes";
1749
- readonly title: "List Campaign Codes";
1750
- readonly description: "List redemption codes for a campaign. Filter by status (active/used) or specific code. Returns code details including usage status.";
1751
- readonly readOnly: true;
1752
- readonly inputSchema: {
1753
- storeCode: z.ZodOptional<z.ZodString>;
1754
- campaignId: z.ZodString;
1755
- page: z.ZodOptional<z.ZodNumber>;
1756
- perPage: z.ZodOptional<z.ZodNumber>;
1757
- status: z.ZodOptional<z.ZodString>;
1758
- code: z.ZodOptional<z.ZodString>;
1759
- };
1760
- readonly handler: typeof campaignListCodes;
1761
- }, {
1762
- readonly name: "openloyalty_campaign_get_available";
1763
- readonly title: "Get Available Campaigns for Member";
1764
- readonly description: "Get campaigns available to a specific member. Returns campaigns the member can participate in based on their tier, segments, and campaign targeting rules. Includes limitReached indicator.";
1765
- readonly readOnly: true;
1766
- readonly inputSchema: {
1767
- storeCode: z.ZodOptional<z.ZodString>;
1768
- memberId: z.ZodString;
1769
- page: z.ZodOptional<z.ZodNumber>;
1770
- perPage: z.ZodOptional<z.ZodNumber>;
1771
- type: z.ZodOptional<z.ZodEnum<["direct", "referral"]>>;
1772
- trigger: z.ZodOptional<z.ZodEnum<["transaction", "custom_event", "time", "achievement", "custom_event_unique_code", "leaderboard", "internal_event", "return_transaction", "challenge", "fortune_wheel"]>>;
1773
- };
1774
- readonly handler: typeof campaignGetAvailable;
1775
- }, {
1776
- readonly name: "openloyalty_campaign_get_visible";
1777
- readonly title: "Get Visible Campaigns for Member";
1778
- readonly description: "Get campaigns visible to a specific member. May include campaigns not yet available (e.g., upcoming campaigns or those requiring certain conditions). Use get_available for campaigns the member can currently participate in.";
1779
- readonly readOnly: true;
1780
- readonly inputSchema: {
1781
- storeCode: z.ZodOptional<z.ZodString>;
1782
- memberId: z.ZodString;
1783
- page: z.ZodOptional<z.ZodNumber>;
1784
- perPage: z.ZodOptional<z.ZodNumber>;
1785
- active: z.ZodOptional<z.ZodBoolean>;
1786
- };
1787
- readonly handler: typeof campaignGetVisible;
1788
- }, {
1789
- readonly name: "openloyalty_campaign_get_leaderboard";
1790
- readonly title: "Get Campaign Leaderboard";
1791
- readonly description: "Get leaderboard rankings for a campaign. Returns ranked list of members with scores and positions. Use for leaderboard-type campaigns to show competition standings.";
1792
- readonly readOnly: true;
1793
- readonly inputSchema: {
1794
- storeCode: z.ZodOptional<z.ZodString>;
1795
- campaignId: z.ZodString;
1796
- type: z.ZodOptional<z.ZodString>;
1797
- };
1798
- readonly handler: typeof campaignGetLeaderboard;
1799
- }];
1800
- export {};