@open-loyalty/mcp-server 1.1.0 → 1.3.3
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +180 -177
- package/dist/auth/provider.js +2 -14
- package/dist/auth/storage.js +22 -0
- package/dist/client/http.js +10 -0
- package/dist/config.d.ts +0 -13
- package/dist/config.js +0 -14
- package/dist/http.js +35 -3
- package/dist/instructions.d.ts +5 -0
- package/dist/instructions.js +440 -0
- package/dist/prompts/fan-engagement-setup.d.ts +107 -0
- package/dist/prompts/fan-engagement-setup.js +492 -0
- package/dist/server.d.ts +1 -1
- package/dist/server.js +60 -273
- package/dist/tools/achievement/handlers.d.ts +117 -0
- package/dist/tools/achievement/handlers.js +161 -0
- package/dist/tools/achievement/index.d.ts +479 -0
- package/dist/tools/achievement/index.js +74 -0
- package/dist/tools/achievement/schemas.d.ts +433 -0
- package/dist/tools/achievement/schemas.js +142 -0
- package/dist/tools/achievement.d.ts +141 -121
- package/dist/tools/achievement.js +60 -24
- package/dist/tools/admin.d.ts +6 -6
- package/dist/tools/admin.js +12 -12
- package/dist/tools/analytics.d.ts +11 -11
- package/dist/tools/analytics.js +30 -29
- package/dist/tools/apikey.d.ts +3 -3
- package/dist/tools/apikey.js +6 -6
- package/dist/tools/audit.d.ts +2 -2
- package/dist/tools/audit.js +4 -4
- package/dist/tools/badge.d.ts +6 -6
- package/dist/tools/badge.js +23 -18
- package/dist/tools/campaign/handlers.d.ts +42 -0
- package/dist/tools/campaign/handlers.js +223 -0
- package/dist/tools/campaign/index.d.ts +783 -0
- package/dist/tools/campaign/index.js +117 -0
- package/dist/tools/campaign/member-handlers.d.ts +60 -0
- package/dist/tools/campaign/member-handlers.js +159 -0
- package/dist/tools/campaign/schemas.d.ts +704 -0
- package/dist/tools/campaign/schemas.js +259 -0
- package/dist/tools/campaign/types.d.ts +161 -0
- package/dist/tools/campaign/types.js +2 -0
- package/dist/tools/custom-event.d.ts +315 -0
- package/dist/tools/custom-event.js +270 -0
- package/dist/tools/export.d.ts +4 -4
- package/dist/tools/export.js +12 -12
- package/dist/tools/import.d.ts +3 -3
- package/dist/tools/import.js +23 -15
- package/dist/tools/index.js +13 -5
- package/dist/tools/member/handlers.d.ts +111 -0
- package/dist/tools/member/handlers.js +206 -0
- package/dist/tools/member/index.d.ts +169 -0
- package/dist/tools/member/index.js +92 -0
- package/dist/tools/member/schemas.d.ts +89 -0
- package/dist/tools/member/schemas.js +65 -0
- package/dist/tools/points.d.ts +7 -6
- package/dist/tools/points.js +21 -20
- package/dist/tools/referral/handlers.d.ts +47 -0
- package/dist/tools/referral/handlers.js +115 -0
- package/dist/tools/referral/index.d.ts +44 -0
- package/dist/tools/referral/index.js +44 -0
- package/dist/tools/referral/schemas.d.ts +34 -0
- package/dist/tools/referral/schemas.js +52 -0
- package/dist/tools/reward/handlers.d.ts +110 -0
- package/dist/tools/reward/handlers.js +289 -0
- package/dist/tools/reward/index.d.ts +177 -0
- package/dist/tools/reward/index.js +93 -0
- package/dist/tools/reward/schemas.d.ts +116 -0
- package/dist/tools/reward/schemas.js +92 -0
- package/dist/tools/role.d.ts +6 -6
- package/dist/tools/role.js +12 -12
- package/dist/tools/segment/handlers.d.ts +87 -0
- package/dist/tools/segment/handlers.js +174 -0
- package/dist/tools/segment/index.d.ts +395 -0
- package/dist/tools/segment/index.js +88 -0
- package/dist/tools/segment/schemas.d.ts +337 -0
- package/dist/tools/segment/schemas.js +79 -0
- package/dist/tools/segment.d.ts +10 -10
- package/dist/tools/segment.js +55 -31
- package/dist/tools/store.d.ts +4 -4
- package/dist/tools/store.js +8 -8
- package/dist/tools/tierset.d.ts +10 -10
- package/dist/tools/tierset.js +69 -37
- package/dist/tools/transaction.d.ts +4 -4
- package/dist/tools/transaction.js +12 -12
- package/dist/tools/wallet-type.d.ts +221 -16
- package/dist/tools/wallet-type.js +248 -17
- package/dist/tools/webhook.d.ts +6 -6
- package/dist/tools/webhook.js +90 -31
- package/dist/types/schemas/achievement.d.ts +18 -18
- package/dist/types/schemas/campaign.d.ts +64 -184
- package/dist/types/schemas/campaign.js +2 -7
- package/dist/types/schemas/common.d.ts +5 -0
- package/dist/types/schemas/common.js +5 -0
- package/dist/types/schemas/member.d.ts +2 -2
- package/dist/types/schemas/reward.d.ts +94 -18
- package/dist/types/schemas/reward.js +8 -3
- package/dist/types/schemas/wallet-type.d.ts +306 -8
- package/dist/types/schemas/wallet-type.js +82 -1
- package/dist/utils/errors.js +32 -5
- package/dist/workflows/app-login-streak.d.ts +39 -0
- package/dist/workflows/app-login-streak.js +298 -0
- package/dist/workflows/early-arrival.d.ts +33 -0
- package/dist/workflows/early-arrival.js +148 -0
- package/dist/workflows/index.d.ts +101 -0
- package/dist/workflows/index.js +208 -0
- package/dist/workflows/match-attendance.d.ts +45 -0
- package/dist/workflows/match-attendance.js +308 -0
- package/dist/workflows/sportsbar-visit.d.ts +41 -0
- package/dist/workflows/sportsbar-visit.js +284 -0
- package/dist/workflows/vod-watching.d.ts +43 -0
- package/dist/workflows/vod-watching.js +326 -0
- package/package.json +8 -2
|
@@ -70,42 +70,45 @@ export declare const AchievementCreateInputSchema: {
|
|
|
70
70
|
name: string;
|
|
71
71
|
description?: string | undefined;
|
|
72
72
|
}>>>;
|
|
73
|
-
trigger: z.ZodOptional<z.
|
|
74
|
-
type: z.ZodOptional<z.
|
|
73
|
+
trigger: z.ZodOptional<z.ZodEnum<["transaction", "custom_event", "points_transfer", "reward_redemption", "referral", "achievement", "tier_change", "registration", "profile_update"]>>;
|
|
74
|
+
type: z.ZodOptional<z.ZodEnum<["direct", "referral"]>>;
|
|
75
75
|
event: z.ZodOptional<z.ZodString>;
|
|
76
76
|
completeRule: z.ZodObject<{
|
|
77
77
|
periodGoal: z.ZodUnion<[z.ZodNumber, z.ZodString]>;
|
|
78
|
-
period: z.
|
|
79
|
-
|
|
80
|
-
|
|
78
|
+
period: z.ZodObject<{
|
|
79
|
+
type: z.ZodEnum<["day", "week", "month", "year", "last_day", "calendarDays", "calendarWeeks", "calendarMonths", "calendarYears"]>;
|
|
80
|
+
consecutive: z.ZodNumber;
|
|
81
81
|
}, "strip", z.ZodTypeAny, {
|
|
82
|
-
|
|
83
|
-
consecutive
|
|
82
|
+
type: "day" | "week" | "month" | "year" | "calendarDays" | "calendarWeeks" | "calendarMonths" | "calendarYears" | "last_day";
|
|
83
|
+
consecutive: number;
|
|
84
84
|
}, {
|
|
85
|
-
|
|
86
|
-
consecutive
|
|
87
|
-
}
|
|
85
|
+
type: "day" | "week" | "month" | "year" | "calendarDays" | "calendarWeeks" | "calendarMonths" | "calendarYears" | "last_day";
|
|
86
|
+
consecutive: number;
|
|
87
|
+
}>;
|
|
88
88
|
uniqueAttribute: z.ZodOptional<z.ZodString>;
|
|
89
89
|
}, "strip", z.ZodTypeAny, {
|
|
90
90
|
periodGoal: string | number;
|
|
91
|
-
period
|
|
92
|
-
|
|
93
|
-
consecutive
|
|
94
|
-
}
|
|
91
|
+
period: {
|
|
92
|
+
type: "day" | "week" | "month" | "year" | "calendarDays" | "calendarWeeks" | "calendarMonths" | "calendarYears" | "last_day";
|
|
93
|
+
consecutive: number;
|
|
94
|
+
};
|
|
95
95
|
uniqueAttribute?: string | undefined;
|
|
96
96
|
}, {
|
|
97
97
|
periodGoal: string | number;
|
|
98
|
-
period
|
|
99
|
-
|
|
100
|
-
consecutive
|
|
101
|
-
}
|
|
98
|
+
period: {
|
|
99
|
+
type: "day" | "week" | "month" | "year" | "calendarDays" | "calendarWeeks" | "calendarMonths" | "calendarYears" | "last_day";
|
|
100
|
+
consecutive: number;
|
|
101
|
+
};
|
|
102
102
|
uniqueAttribute?: string | undefined;
|
|
103
103
|
}>;
|
|
104
104
|
aggregation: z.ZodOptional<z.ZodObject<{
|
|
105
|
+
type: z.ZodEnum<["quantity", "sum", "average", "min", "max"]>;
|
|
105
106
|
rule: z.ZodOptional<z.ZodString>;
|
|
106
107
|
}, "strip", z.ZodTypeAny, {
|
|
108
|
+
type: "quantity" | "min" | "max" | "sum" | "average";
|
|
107
109
|
rule?: string | undefined;
|
|
108
110
|
}, {
|
|
111
|
+
type: "quantity" | "min" | "max" | "sum" | "average";
|
|
109
112
|
rule?: string | undefined;
|
|
110
113
|
}>>;
|
|
111
114
|
conditions: z.ZodOptional<z.ZodArray<z.ZodRecord<z.ZodString, z.ZodUnknown>, "many">>;
|
|
@@ -138,22 +141,23 @@ export declare const AchievementCreateInputSchema: {
|
|
|
138
141
|
}, "strip", z.ZodTypeAny, {
|
|
139
142
|
completeRule: {
|
|
140
143
|
periodGoal: string | number;
|
|
141
|
-
period
|
|
142
|
-
|
|
143
|
-
consecutive
|
|
144
|
-
}
|
|
144
|
+
period: {
|
|
145
|
+
type: "day" | "week" | "month" | "year" | "calendarDays" | "calendarWeeks" | "calendarMonths" | "calendarYears" | "last_day";
|
|
146
|
+
consecutive: number;
|
|
147
|
+
};
|
|
145
148
|
uniqueAttribute?: string | undefined;
|
|
146
149
|
};
|
|
147
|
-
type?:
|
|
150
|
+
type?: "direct" | "referral" | undefined;
|
|
148
151
|
conditions?: Record<string, unknown>[] | undefined;
|
|
149
152
|
translations?: Record<string, {
|
|
150
153
|
name: string;
|
|
151
154
|
description?: string | undefined;
|
|
152
155
|
}> | undefined;
|
|
153
|
-
trigger?:
|
|
156
|
+
trigger?: "referral" | "transaction" | "custom_event" | "achievement" | "points_transfer" | "reward_redemption" | "tier_change" | "registration" | "profile_update" | undefined;
|
|
154
157
|
event?: string | undefined;
|
|
155
158
|
achievementRuleId?: string | undefined;
|
|
156
159
|
aggregation?: {
|
|
160
|
+
type: "quantity" | "min" | "max" | "sum" | "average";
|
|
157
161
|
rule?: string | undefined;
|
|
158
162
|
} | undefined;
|
|
159
163
|
limit?: {
|
|
@@ -167,22 +171,23 @@ export declare const AchievementCreateInputSchema: {
|
|
|
167
171
|
}, {
|
|
168
172
|
completeRule: {
|
|
169
173
|
periodGoal: string | number;
|
|
170
|
-
period
|
|
171
|
-
|
|
172
|
-
consecutive
|
|
173
|
-
}
|
|
174
|
+
period: {
|
|
175
|
+
type: "day" | "week" | "month" | "year" | "calendarDays" | "calendarWeeks" | "calendarMonths" | "calendarYears" | "last_day";
|
|
176
|
+
consecutive: number;
|
|
177
|
+
};
|
|
174
178
|
uniqueAttribute?: string | undefined;
|
|
175
179
|
};
|
|
176
|
-
type?:
|
|
180
|
+
type?: "direct" | "referral" | undefined;
|
|
177
181
|
conditions?: Record<string, unknown>[] | undefined;
|
|
178
182
|
translations?: Record<string, {
|
|
179
183
|
name: string;
|
|
180
184
|
description?: string | undefined;
|
|
181
185
|
}> | undefined;
|
|
182
|
-
trigger?:
|
|
186
|
+
trigger?: "referral" | "transaction" | "custom_event" | "achievement" | "points_transfer" | "reward_redemption" | "tier_change" | "registration" | "profile_update" | undefined;
|
|
183
187
|
event?: string | undefined;
|
|
184
188
|
achievementRuleId?: string | undefined;
|
|
185
189
|
aggregation?: {
|
|
190
|
+
type: "quantity" | "min" | "max" | "sum" | "average";
|
|
186
191
|
rule?: string | undefined;
|
|
187
192
|
} | undefined;
|
|
188
193
|
limit?: {
|
|
@@ -264,42 +269,45 @@ export declare const AchievementUpdateInputSchema: {
|
|
|
264
269
|
name: string;
|
|
265
270
|
description?: string | undefined;
|
|
266
271
|
}>>>;
|
|
267
|
-
trigger: z.ZodOptional<z.
|
|
268
|
-
type: z.ZodOptional<z.
|
|
272
|
+
trigger: z.ZodOptional<z.ZodEnum<["transaction", "custom_event", "points_transfer", "reward_redemption", "referral", "achievement", "tier_change", "registration", "profile_update"]>>;
|
|
273
|
+
type: z.ZodOptional<z.ZodEnum<["direct", "referral"]>>;
|
|
269
274
|
event: z.ZodOptional<z.ZodString>;
|
|
270
275
|
completeRule: z.ZodObject<{
|
|
271
276
|
periodGoal: z.ZodUnion<[z.ZodNumber, z.ZodString]>;
|
|
272
|
-
period: z.
|
|
273
|
-
|
|
274
|
-
|
|
277
|
+
period: z.ZodObject<{
|
|
278
|
+
type: z.ZodEnum<["day", "week", "month", "year", "last_day", "calendarDays", "calendarWeeks", "calendarMonths", "calendarYears"]>;
|
|
279
|
+
consecutive: z.ZodNumber;
|
|
275
280
|
}, "strip", z.ZodTypeAny, {
|
|
276
|
-
|
|
277
|
-
consecutive
|
|
281
|
+
type: "day" | "week" | "month" | "year" | "calendarDays" | "calendarWeeks" | "calendarMonths" | "calendarYears" | "last_day";
|
|
282
|
+
consecutive: number;
|
|
278
283
|
}, {
|
|
279
|
-
|
|
280
|
-
consecutive
|
|
281
|
-
}
|
|
284
|
+
type: "day" | "week" | "month" | "year" | "calendarDays" | "calendarWeeks" | "calendarMonths" | "calendarYears" | "last_day";
|
|
285
|
+
consecutive: number;
|
|
286
|
+
}>;
|
|
282
287
|
uniqueAttribute: z.ZodOptional<z.ZodString>;
|
|
283
288
|
}, "strip", z.ZodTypeAny, {
|
|
284
289
|
periodGoal: string | number;
|
|
285
|
-
period
|
|
286
|
-
|
|
287
|
-
consecutive
|
|
288
|
-
}
|
|
290
|
+
period: {
|
|
291
|
+
type: "day" | "week" | "month" | "year" | "calendarDays" | "calendarWeeks" | "calendarMonths" | "calendarYears" | "last_day";
|
|
292
|
+
consecutive: number;
|
|
293
|
+
};
|
|
289
294
|
uniqueAttribute?: string | undefined;
|
|
290
295
|
}, {
|
|
291
296
|
periodGoal: string | number;
|
|
292
|
-
period
|
|
293
|
-
|
|
294
|
-
consecutive
|
|
295
|
-
}
|
|
297
|
+
period: {
|
|
298
|
+
type: "day" | "week" | "month" | "year" | "calendarDays" | "calendarWeeks" | "calendarMonths" | "calendarYears" | "last_day";
|
|
299
|
+
consecutive: number;
|
|
300
|
+
};
|
|
296
301
|
uniqueAttribute?: string | undefined;
|
|
297
302
|
}>;
|
|
298
303
|
aggregation: z.ZodOptional<z.ZodObject<{
|
|
304
|
+
type: z.ZodEnum<["quantity", "sum", "average", "min", "max"]>;
|
|
299
305
|
rule: z.ZodOptional<z.ZodString>;
|
|
300
306
|
}, "strip", z.ZodTypeAny, {
|
|
307
|
+
type: "quantity" | "min" | "max" | "sum" | "average";
|
|
301
308
|
rule?: string | undefined;
|
|
302
309
|
}, {
|
|
310
|
+
type: "quantity" | "min" | "max" | "sum" | "average";
|
|
303
311
|
rule?: string | undefined;
|
|
304
312
|
}>>;
|
|
305
313
|
conditions: z.ZodOptional<z.ZodArray<z.ZodRecord<z.ZodString, z.ZodUnknown>, "many">>;
|
|
@@ -332,22 +340,23 @@ export declare const AchievementUpdateInputSchema: {
|
|
|
332
340
|
}, "strip", z.ZodTypeAny, {
|
|
333
341
|
completeRule: {
|
|
334
342
|
periodGoal: string | number;
|
|
335
|
-
period
|
|
336
|
-
|
|
337
|
-
consecutive
|
|
338
|
-
}
|
|
343
|
+
period: {
|
|
344
|
+
type: "day" | "week" | "month" | "year" | "calendarDays" | "calendarWeeks" | "calendarMonths" | "calendarYears" | "last_day";
|
|
345
|
+
consecutive: number;
|
|
346
|
+
};
|
|
339
347
|
uniqueAttribute?: string | undefined;
|
|
340
348
|
};
|
|
341
|
-
type?:
|
|
349
|
+
type?: "direct" | "referral" | undefined;
|
|
342
350
|
conditions?: Record<string, unknown>[] | undefined;
|
|
343
351
|
translations?: Record<string, {
|
|
344
352
|
name: string;
|
|
345
353
|
description?: string | undefined;
|
|
346
354
|
}> | undefined;
|
|
347
|
-
trigger?:
|
|
355
|
+
trigger?: "referral" | "transaction" | "custom_event" | "achievement" | "points_transfer" | "reward_redemption" | "tier_change" | "registration" | "profile_update" | undefined;
|
|
348
356
|
event?: string | undefined;
|
|
349
357
|
achievementRuleId?: string | undefined;
|
|
350
358
|
aggregation?: {
|
|
359
|
+
type: "quantity" | "min" | "max" | "sum" | "average";
|
|
351
360
|
rule?: string | undefined;
|
|
352
361
|
} | undefined;
|
|
353
362
|
limit?: {
|
|
@@ -361,22 +370,23 @@ export declare const AchievementUpdateInputSchema: {
|
|
|
361
370
|
}, {
|
|
362
371
|
completeRule: {
|
|
363
372
|
periodGoal: string | number;
|
|
364
|
-
period
|
|
365
|
-
|
|
366
|
-
consecutive
|
|
367
|
-
}
|
|
373
|
+
period: {
|
|
374
|
+
type: "day" | "week" | "month" | "year" | "calendarDays" | "calendarWeeks" | "calendarMonths" | "calendarYears" | "last_day";
|
|
375
|
+
consecutive: number;
|
|
376
|
+
};
|
|
368
377
|
uniqueAttribute?: string | undefined;
|
|
369
378
|
};
|
|
370
|
-
type?:
|
|
379
|
+
type?: "direct" | "referral" | undefined;
|
|
371
380
|
conditions?: Record<string, unknown>[] | undefined;
|
|
372
381
|
translations?: Record<string, {
|
|
373
382
|
name: string;
|
|
374
383
|
description?: string | undefined;
|
|
375
384
|
}> | undefined;
|
|
376
|
-
trigger?:
|
|
385
|
+
trigger?: "referral" | "transaction" | "custom_event" | "achievement" | "points_transfer" | "reward_redemption" | "tier_change" | "registration" | "profile_update" | undefined;
|
|
377
386
|
event?: string | undefined;
|
|
378
387
|
achievementRuleId?: string | undefined;
|
|
379
388
|
aggregation?: {
|
|
389
|
+
type: "quantity" | "min" | "max" | "sum" | "average";
|
|
380
390
|
rule?: string | undefined;
|
|
381
391
|
} | undefined;
|
|
382
392
|
limit?: {
|
|
@@ -549,7 +559,7 @@ export declare const achievementToolDefinitions: readonly [{
|
|
|
549
559
|
}, {
|
|
550
560
|
readonly name: "openloyalty_achievement_create";
|
|
551
561
|
readonly title: "Create Achievement";
|
|
552
|
-
readonly description:
|
|
562
|
+
readonly description: string;
|
|
553
563
|
readonly readOnly: false;
|
|
554
564
|
readonly inputSchema: {
|
|
555
565
|
storeCode: z.ZodOptional<z.ZodString>;
|
|
@@ -614,42 +624,45 @@ export declare const achievementToolDefinitions: readonly [{
|
|
|
614
624
|
name: string;
|
|
615
625
|
description?: string | undefined;
|
|
616
626
|
}>>>;
|
|
617
|
-
trigger: z.ZodOptional<z.
|
|
618
|
-
type: z.ZodOptional<z.
|
|
627
|
+
trigger: z.ZodOptional<z.ZodEnum<["transaction", "custom_event", "points_transfer", "reward_redemption", "referral", "achievement", "tier_change", "registration", "profile_update"]>>;
|
|
628
|
+
type: z.ZodOptional<z.ZodEnum<["direct", "referral"]>>;
|
|
619
629
|
event: z.ZodOptional<z.ZodString>;
|
|
620
630
|
completeRule: z.ZodObject<{
|
|
621
631
|
periodGoal: z.ZodUnion<[z.ZodNumber, z.ZodString]>;
|
|
622
|
-
period: z.
|
|
623
|
-
|
|
624
|
-
|
|
632
|
+
period: z.ZodObject<{
|
|
633
|
+
type: z.ZodEnum<["day", "week", "month", "year", "last_day", "calendarDays", "calendarWeeks", "calendarMonths", "calendarYears"]>;
|
|
634
|
+
consecutive: z.ZodNumber;
|
|
625
635
|
}, "strip", z.ZodTypeAny, {
|
|
626
|
-
|
|
627
|
-
consecutive
|
|
636
|
+
type: "day" | "week" | "month" | "year" | "calendarDays" | "calendarWeeks" | "calendarMonths" | "calendarYears" | "last_day";
|
|
637
|
+
consecutive: number;
|
|
628
638
|
}, {
|
|
629
|
-
|
|
630
|
-
consecutive
|
|
631
|
-
}
|
|
639
|
+
type: "day" | "week" | "month" | "year" | "calendarDays" | "calendarWeeks" | "calendarMonths" | "calendarYears" | "last_day";
|
|
640
|
+
consecutive: number;
|
|
641
|
+
}>;
|
|
632
642
|
uniqueAttribute: z.ZodOptional<z.ZodString>;
|
|
633
643
|
}, "strip", z.ZodTypeAny, {
|
|
634
644
|
periodGoal: string | number;
|
|
635
|
-
period
|
|
636
|
-
|
|
637
|
-
consecutive
|
|
638
|
-
}
|
|
645
|
+
period: {
|
|
646
|
+
type: "day" | "week" | "month" | "year" | "calendarDays" | "calendarWeeks" | "calendarMonths" | "calendarYears" | "last_day";
|
|
647
|
+
consecutive: number;
|
|
648
|
+
};
|
|
639
649
|
uniqueAttribute?: string | undefined;
|
|
640
650
|
}, {
|
|
641
651
|
periodGoal: string | number;
|
|
642
|
-
period
|
|
643
|
-
|
|
644
|
-
consecutive
|
|
645
|
-
}
|
|
652
|
+
period: {
|
|
653
|
+
type: "day" | "week" | "month" | "year" | "calendarDays" | "calendarWeeks" | "calendarMonths" | "calendarYears" | "last_day";
|
|
654
|
+
consecutive: number;
|
|
655
|
+
};
|
|
646
656
|
uniqueAttribute?: string | undefined;
|
|
647
657
|
}>;
|
|
648
658
|
aggregation: z.ZodOptional<z.ZodObject<{
|
|
659
|
+
type: z.ZodEnum<["quantity", "sum", "average", "min", "max"]>;
|
|
649
660
|
rule: z.ZodOptional<z.ZodString>;
|
|
650
661
|
}, "strip", z.ZodTypeAny, {
|
|
662
|
+
type: "quantity" | "min" | "max" | "sum" | "average";
|
|
651
663
|
rule?: string | undefined;
|
|
652
664
|
}, {
|
|
665
|
+
type: "quantity" | "min" | "max" | "sum" | "average";
|
|
653
666
|
rule?: string | undefined;
|
|
654
667
|
}>>;
|
|
655
668
|
conditions: z.ZodOptional<z.ZodArray<z.ZodRecord<z.ZodString, z.ZodUnknown>, "many">>;
|
|
@@ -682,22 +695,23 @@ export declare const achievementToolDefinitions: readonly [{
|
|
|
682
695
|
}, "strip", z.ZodTypeAny, {
|
|
683
696
|
completeRule: {
|
|
684
697
|
periodGoal: string | number;
|
|
685
|
-
period
|
|
686
|
-
|
|
687
|
-
consecutive
|
|
688
|
-
}
|
|
698
|
+
period: {
|
|
699
|
+
type: "day" | "week" | "month" | "year" | "calendarDays" | "calendarWeeks" | "calendarMonths" | "calendarYears" | "last_day";
|
|
700
|
+
consecutive: number;
|
|
701
|
+
};
|
|
689
702
|
uniqueAttribute?: string | undefined;
|
|
690
703
|
};
|
|
691
|
-
type?:
|
|
704
|
+
type?: "direct" | "referral" | undefined;
|
|
692
705
|
conditions?: Record<string, unknown>[] | undefined;
|
|
693
706
|
translations?: Record<string, {
|
|
694
707
|
name: string;
|
|
695
708
|
description?: string | undefined;
|
|
696
709
|
}> | undefined;
|
|
697
|
-
trigger?:
|
|
710
|
+
trigger?: "referral" | "transaction" | "custom_event" | "achievement" | "points_transfer" | "reward_redemption" | "tier_change" | "registration" | "profile_update" | undefined;
|
|
698
711
|
event?: string | undefined;
|
|
699
712
|
achievementRuleId?: string | undefined;
|
|
700
713
|
aggregation?: {
|
|
714
|
+
type: "quantity" | "min" | "max" | "sum" | "average";
|
|
701
715
|
rule?: string | undefined;
|
|
702
716
|
} | undefined;
|
|
703
717
|
limit?: {
|
|
@@ -711,22 +725,23 @@ export declare const achievementToolDefinitions: readonly [{
|
|
|
711
725
|
}, {
|
|
712
726
|
completeRule: {
|
|
713
727
|
periodGoal: string | number;
|
|
714
|
-
period
|
|
715
|
-
|
|
716
|
-
consecutive
|
|
717
|
-
}
|
|
728
|
+
period: {
|
|
729
|
+
type: "day" | "week" | "month" | "year" | "calendarDays" | "calendarWeeks" | "calendarMonths" | "calendarYears" | "last_day";
|
|
730
|
+
consecutive: number;
|
|
731
|
+
};
|
|
718
732
|
uniqueAttribute?: string | undefined;
|
|
719
733
|
};
|
|
720
|
-
type?:
|
|
734
|
+
type?: "direct" | "referral" | undefined;
|
|
721
735
|
conditions?: Record<string, unknown>[] | undefined;
|
|
722
736
|
translations?: Record<string, {
|
|
723
737
|
name: string;
|
|
724
738
|
description?: string | undefined;
|
|
725
739
|
}> | undefined;
|
|
726
|
-
trigger?:
|
|
740
|
+
trigger?: "referral" | "transaction" | "custom_event" | "achievement" | "points_transfer" | "reward_redemption" | "tier_change" | "registration" | "profile_update" | undefined;
|
|
727
741
|
event?: string | undefined;
|
|
728
742
|
achievementRuleId?: string | undefined;
|
|
729
743
|
aggregation?: {
|
|
744
|
+
type: "quantity" | "min" | "max" | "sum" | "average";
|
|
730
745
|
rule?: string | undefined;
|
|
731
746
|
} | undefined;
|
|
732
747
|
limit?: {
|
|
@@ -820,42 +835,45 @@ export declare const achievementToolDefinitions: readonly [{
|
|
|
820
835
|
name: string;
|
|
821
836
|
description?: string | undefined;
|
|
822
837
|
}>>>;
|
|
823
|
-
trigger: z.ZodOptional<z.
|
|
824
|
-
type: z.ZodOptional<z.
|
|
838
|
+
trigger: z.ZodOptional<z.ZodEnum<["transaction", "custom_event", "points_transfer", "reward_redemption", "referral", "achievement", "tier_change", "registration", "profile_update"]>>;
|
|
839
|
+
type: z.ZodOptional<z.ZodEnum<["direct", "referral"]>>;
|
|
825
840
|
event: z.ZodOptional<z.ZodString>;
|
|
826
841
|
completeRule: z.ZodObject<{
|
|
827
842
|
periodGoal: z.ZodUnion<[z.ZodNumber, z.ZodString]>;
|
|
828
|
-
period: z.
|
|
829
|
-
|
|
830
|
-
|
|
843
|
+
period: z.ZodObject<{
|
|
844
|
+
type: z.ZodEnum<["day", "week", "month", "year", "last_day", "calendarDays", "calendarWeeks", "calendarMonths", "calendarYears"]>;
|
|
845
|
+
consecutive: z.ZodNumber;
|
|
831
846
|
}, "strip", z.ZodTypeAny, {
|
|
832
|
-
|
|
833
|
-
consecutive
|
|
847
|
+
type: "day" | "week" | "month" | "year" | "calendarDays" | "calendarWeeks" | "calendarMonths" | "calendarYears" | "last_day";
|
|
848
|
+
consecutive: number;
|
|
834
849
|
}, {
|
|
835
|
-
|
|
836
|
-
consecutive
|
|
837
|
-
}
|
|
850
|
+
type: "day" | "week" | "month" | "year" | "calendarDays" | "calendarWeeks" | "calendarMonths" | "calendarYears" | "last_day";
|
|
851
|
+
consecutive: number;
|
|
852
|
+
}>;
|
|
838
853
|
uniqueAttribute: z.ZodOptional<z.ZodString>;
|
|
839
854
|
}, "strip", z.ZodTypeAny, {
|
|
840
855
|
periodGoal: string | number;
|
|
841
|
-
period
|
|
842
|
-
|
|
843
|
-
consecutive
|
|
844
|
-
}
|
|
856
|
+
period: {
|
|
857
|
+
type: "day" | "week" | "month" | "year" | "calendarDays" | "calendarWeeks" | "calendarMonths" | "calendarYears" | "last_day";
|
|
858
|
+
consecutive: number;
|
|
859
|
+
};
|
|
845
860
|
uniqueAttribute?: string | undefined;
|
|
846
861
|
}, {
|
|
847
862
|
periodGoal: string | number;
|
|
848
|
-
period
|
|
849
|
-
|
|
850
|
-
consecutive
|
|
851
|
-
}
|
|
863
|
+
period: {
|
|
864
|
+
type: "day" | "week" | "month" | "year" | "calendarDays" | "calendarWeeks" | "calendarMonths" | "calendarYears" | "last_day";
|
|
865
|
+
consecutive: number;
|
|
866
|
+
};
|
|
852
867
|
uniqueAttribute?: string | undefined;
|
|
853
868
|
}>;
|
|
854
869
|
aggregation: z.ZodOptional<z.ZodObject<{
|
|
870
|
+
type: z.ZodEnum<["quantity", "sum", "average", "min", "max"]>;
|
|
855
871
|
rule: z.ZodOptional<z.ZodString>;
|
|
856
872
|
}, "strip", z.ZodTypeAny, {
|
|
873
|
+
type: "quantity" | "min" | "max" | "sum" | "average";
|
|
857
874
|
rule?: string | undefined;
|
|
858
875
|
}, {
|
|
876
|
+
type: "quantity" | "min" | "max" | "sum" | "average";
|
|
859
877
|
rule?: string | undefined;
|
|
860
878
|
}>>;
|
|
861
879
|
conditions: z.ZodOptional<z.ZodArray<z.ZodRecord<z.ZodString, z.ZodUnknown>, "many">>;
|
|
@@ -888,22 +906,23 @@ export declare const achievementToolDefinitions: readonly [{
|
|
|
888
906
|
}, "strip", z.ZodTypeAny, {
|
|
889
907
|
completeRule: {
|
|
890
908
|
periodGoal: string | number;
|
|
891
|
-
period
|
|
892
|
-
|
|
893
|
-
consecutive
|
|
894
|
-
}
|
|
909
|
+
period: {
|
|
910
|
+
type: "day" | "week" | "month" | "year" | "calendarDays" | "calendarWeeks" | "calendarMonths" | "calendarYears" | "last_day";
|
|
911
|
+
consecutive: number;
|
|
912
|
+
};
|
|
895
913
|
uniqueAttribute?: string | undefined;
|
|
896
914
|
};
|
|
897
|
-
type?:
|
|
915
|
+
type?: "direct" | "referral" | undefined;
|
|
898
916
|
conditions?: Record<string, unknown>[] | undefined;
|
|
899
917
|
translations?: Record<string, {
|
|
900
918
|
name: string;
|
|
901
919
|
description?: string | undefined;
|
|
902
920
|
}> | undefined;
|
|
903
|
-
trigger?:
|
|
921
|
+
trigger?: "referral" | "transaction" | "custom_event" | "achievement" | "points_transfer" | "reward_redemption" | "tier_change" | "registration" | "profile_update" | undefined;
|
|
904
922
|
event?: string | undefined;
|
|
905
923
|
achievementRuleId?: string | undefined;
|
|
906
924
|
aggregation?: {
|
|
925
|
+
type: "quantity" | "min" | "max" | "sum" | "average";
|
|
907
926
|
rule?: string | undefined;
|
|
908
927
|
} | undefined;
|
|
909
928
|
limit?: {
|
|
@@ -917,22 +936,23 @@ export declare const achievementToolDefinitions: readonly [{
|
|
|
917
936
|
}, {
|
|
918
937
|
completeRule: {
|
|
919
938
|
periodGoal: string | number;
|
|
920
|
-
period
|
|
921
|
-
|
|
922
|
-
consecutive
|
|
923
|
-
}
|
|
939
|
+
period: {
|
|
940
|
+
type: "day" | "week" | "month" | "year" | "calendarDays" | "calendarWeeks" | "calendarMonths" | "calendarYears" | "last_day";
|
|
941
|
+
consecutive: number;
|
|
942
|
+
};
|
|
924
943
|
uniqueAttribute?: string | undefined;
|
|
925
944
|
};
|
|
926
|
-
type?:
|
|
945
|
+
type?: "direct" | "referral" | undefined;
|
|
927
946
|
conditions?: Record<string, unknown>[] | undefined;
|
|
928
947
|
translations?: Record<string, {
|
|
929
948
|
name: string;
|
|
930
949
|
description?: string | undefined;
|
|
931
950
|
}> | undefined;
|
|
932
|
-
trigger?:
|
|
951
|
+
trigger?: "referral" | "transaction" | "custom_event" | "achievement" | "points_transfer" | "reward_redemption" | "tier_change" | "registration" | "profile_update" | undefined;
|
|
933
952
|
event?: string | undefined;
|
|
934
953
|
achievementRuleId?: string | undefined;
|
|
935
954
|
aggregation?: {
|
|
955
|
+
type: "quantity" | "min" | "max" | "sum" | "average";
|
|
936
956
|
rule?: string | undefined;
|
|
937
957
|
} | undefined;
|
|
938
958
|
limit?: {
|