@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.
- package/dist/instructions.d.ts +1 -1
- package/dist/instructions.js +18 -5
- package/dist/tools/reward/handlers.d.ts +2 -0
- package/dist/tools/reward/handlers.js +52 -6
- package/dist/tools/reward/index.d.ts +2 -0
- package/dist/tools/reward/index.js +13 -7
- package/dist/tools/reward/schemas.d.ts +2 -0
- package/dist/tools/reward/schemas.js +15 -5
- package/dist/tools/tierset.d.ts +1 -1
- package/dist/tools/tierset.js +49 -25
- package/dist/tools/transaction.js +5 -2
- package/dist/tools/wallet-type.js +26 -17
- package/dist/types/schemas/admin.d.ts +6 -6
- package/dist/types/schemas/role.d.ts +4 -4
- package/package.json +1 -1
- package/dist/prompts/fan-engagement-setup.d.ts +0 -107
- package/dist/prompts/fan-engagement-setup.js +0 -492
- package/dist/tools/achievement.d.ts +0 -1017
- package/dist/tools/achievement.js +0 -354
- package/dist/tools/campaign.d.ts +0 -1800
- package/dist/tools/campaign.js +0 -737
- package/dist/tools/member.d.ts +0 -366
- package/dist/tools/member.js +0 -352
- package/dist/tools/reward.d.ts +0 -279
- package/dist/tools/reward.js +0 -361
- package/dist/tools/segment.d.ts +0 -816
- package/dist/tools/segment.js +0 -333
- package/dist/workflows/app-login-streak.d.ts +0 -39
- package/dist/workflows/app-login-streak.js +0 -298
- package/dist/workflows/early-arrival.d.ts +0 -33
- package/dist/workflows/early-arrival.js +0 -148
- package/dist/workflows/index.d.ts +0 -101
- package/dist/workflows/index.js +0 -208
- package/dist/workflows/match-attendance.d.ts +0 -45
- package/dist/workflows/match-attendance.js +0 -308
- package/dist/workflows/sportsbar-visit.d.ts +0 -41
- package/dist/workflows/sportsbar-visit.js +0 -284
- package/dist/workflows/vod-watching.d.ts +0 -43
- package/dist/workflows/vod-watching.js +0 -326
|
@@ -1,1017 +0,0 @@
|
|
|
1
|
-
import { z } from "zod";
|
|
2
|
-
import { AchievementListItem } from "../types/schemas/achievement.js";
|
|
3
|
-
export declare const AchievementListInputSchema: {
|
|
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
|
-
name: z.ZodOptional<z.ZodString>;
|
|
9
|
-
};
|
|
10
|
-
export declare const AchievementCreateInputSchema: {
|
|
11
|
-
storeCode: z.ZodOptional<z.ZodString>;
|
|
12
|
-
translations: z.ZodRecord<z.ZodString, z.ZodObject<{
|
|
13
|
-
name: z.ZodString;
|
|
14
|
-
description: z.ZodOptional<z.ZodString>;
|
|
15
|
-
}, "strip", z.ZodTypeAny, {
|
|
16
|
-
name: string;
|
|
17
|
-
description?: string | undefined;
|
|
18
|
-
}, {
|
|
19
|
-
name: string;
|
|
20
|
-
description?: string | undefined;
|
|
21
|
-
}>>;
|
|
22
|
-
active: z.ZodOptional<z.ZodBoolean>;
|
|
23
|
-
activity: z.ZodOptional<z.ZodObject<{
|
|
24
|
-
startsAt: z.ZodOptional<z.ZodString>;
|
|
25
|
-
endsAt: z.ZodOptional<z.ZodString>;
|
|
26
|
-
operator: z.ZodOptional<z.ZodString>;
|
|
27
|
-
}, "strip", z.ZodTypeAny, {
|
|
28
|
-
operator?: string | undefined;
|
|
29
|
-
startsAt?: string | undefined;
|
|
30
|
-
endsAt?: string | undefined;
|
|
31
|
-
}, {
|
|
32
|
-
operator?: string | undefined;
|
|
33
|
-
startsAt?: string | undefined;
|
|
34
|
-
endsAt?: string | undefined;
|
|
35
|
-
}>>;
|
|
36
|
-
limit: z.ZodOptional<z.ZodObject<{
|
|
37
|
-
value: z.ZodOptional<z.ZodNumber>;
|
|
38
|
-
interval: z.ZodOptional<z.ZodObject<{
|
|
39
|
-
type: z.ZodString;
|
|
40
|
-
value: z.ZodOptional<z.ZodNumber>;
|
|
41
|
-
}, "strip", z.ZodTypeAny, {
|
|
42
|
-
type: string;
|
|
43
|
-
value?: number | undefined;
|
|
44
|
-
}, {
|
|
45
|
-
type: string;
|
|
46
|
-
value?: number | undefined;
|
|
47
|
-
}>>;
|
|
48
|
-
}, "strip", z.ZodTypeAny, {
|
|
49
|
-
value?: number | undefined;
|
|
50
|
-
interval?: {
|
|
51
|
-
type: string;
|
|
52
|
-
value?: number | undefined;
|
|
53
|
-
} | undefined;
|
|
54
|
-
}, {
|
|
55
|
-
value?: number | undefined;
|
|
56
|
-
interval?: {
|
|
57
|
-
type: string;
|
|
58
|
-
value?: number | undefined;
|
|
59
|
-
} | undefined;
|
|
60
|
-
}>>;
|
|
61
|
-
rules: z.ZodArray<z.ZodObject<{
|
|
62
|
-
achievementRuleId: z.ZodOptional<z.ZodString>;
|
|
63
|
-
translations: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodObject<{
|
|
64
|
-
name: z.ZodString;
|
|
65
|
-
description: z.ZodOptional<z.ZodString>;
|
|
66
|
-
}, "strip", z.ZodTypeAny, {
|
|
67
|
-
name: string;
|
|
68
|
-
description?: string | undefined;
|
|
69
|
-
}, {
|
|
70
|
-
name: string;
|
|
71
|
-
description?: string | undefined;
|
|
72
|
-
}>>>;
|
|
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
|
-
event: z.ZodOptional<z.ZodString>;
|
|
76
|
-
completeRule: z.ZodObject<{
|
|
77
|
-
periodGoal: z.ZodUnion<[z.ZodNumber, z.ZodString]>;
|
|
78
|
-
period: z.ZodObject<{
|
|
79
|
-
type: z.ZodEnum<["day", "week", "month", "year", "last_day", "calendarDays", "calendarWeeks", "calendarMonths", "calendarYears"]>;
|
|
80
|
-
consecutive: z.ZodNumber;
|
|
81
|
-
}, "strip", z.ZodTypeAny, {
|
|
82
|
-
type: "day" | "week" | "month" | "year" | "calendarDays" | "calendarWeeks" | "calendarMonths" | "calendarYears" | "last_day";
|
|
83
|
-
consecutive: number;
|
|
84
|
-
}, {
|
|
85
|
-
type: "day" | "week" | "month" | "year" | "calendarDays" | "calendarWeeks" | "calendarMonths" | "calendarYears" | "last_day";
|
|
86
|
-
consecutive: number;
|
|
87
|
-
}>;
|
|
88
|
-
uniqueAttribute: z.ZodOptional<z.ZodString>;
|
|
89
|
-
}, "strip", z.ZodTypeAny, {
|
|
90
|
-
periodGoal: string | number;
|
|
91
|
-
period: {
|
|
92
|
-
type: "day" | "week" | "month" | "year" | "calendarDays" | "calendarWeeks" | "calendarMonths" | "calendarYears" | "last_day";
|
|
93
|
-
consecutive: number;
|
|
94
|
-
};
|
|
95
|
-
uniqueAttribute?: string | undefined;
|
|
96
|
-
}, {
|
|
97
|
-
periodGoal: string | number;
|
|
98
|
-
period: {
|
|
99
|
-
type: "day" | "week" | "month" | "year" | "calendarDays" | "calendarWeeks" | "calendarMonths" | "calendarYears" | "last_day";
|
|
100
|
-
consecutive: number;
|
|
101
|
-
};
|
|
102
|
-
uniqueAttribute?: string | undefined;
|
|
103
|
-
}>;
|
|
104
|
-
aggregation: z.ZodOptional<z.ZodObject<{
|
|
105
|
-
type: z.ZodEnum<["quantity", "sum", "average", "min", "max"]>;
|
|
106
|
-
rule: z.ZodOptional<z.ZodString>;
|
|
107
|
-
}, "strip", z.ZodTypeAny, {
|
|
108
|
-
type: "quantity" | "min" | "max" | "sum" | "average";
|
|
109
|
-
rule?: string | undefined;
|
|
110
|
-
}, {
|
|
111
|
-
type: "quantity" | "min" | "max" | "sum" | "average";
|
|
112
|
-
rule?: string | undefined;
|
|
113
|
-
}>>;
|
|
114
|
-
conditions: z.ZodOptional<z.ZodArray<z.ZodRecord<z.ZodString, z.ZodUnknown>, "many">>;
|
|
115
|
-
limit: z.ZodOptional<z.ZodObject<{
|
|
116
|
-
value: z.ZodOptional<z.ZodNumber>;
|
|
117
|
-
interval: z.ZodOptional<z.ZodObject<{
|
|
118
|
-
type: z.ZodString;
|
|
119
|
-
value: z.ZodOptional<z.ZodNumber>;
|
|
120
|
-
}, "strip", z.ZodTypeAny, {
|
|
121
|
-
type: string;
|
|
122
|
-
value?: number | undefined;
|
|
123
|
-
}, {
|
|
124
|
-
type: string;
|
|
125
|
-
value?: number | undefined;
|
|
126
|
-
}>>;
|
|
127
|
-
}, "strip", z.ZodTypeAny, {
|
|
128
|
-
value?: number | undefined;
|
|
129
|
-
interval?: {
|
|
130
|
-
type: string;
|
|
131
|
-
value?: number | undefined;
|
|
132
|
-
} | undefined;
|
|
133
|
-
}, {
|
|
134
|
-
value?: number | undefined;
|
|
135
|
-
interval?: {
|
|
136
|
-
type: string;
|
|
137
|
-
value?: number | undefined;
|
|
138
|
-
} | undefined;
|
|
139
|
-
}>>;
|
|
140
|
-
uniqueReferee: z.ZodOptional<z.ZodBoolean>;
|
|
141
|
-
}, "strip", z.ZodTypeAny, {
|
|
142
|
-
completeRule: {
|
|
143
|
-
periodGoal: string | number;
|
|
144
|
-
period: {
|
|
145
|
-
type: "day" | "week" | "month" | "year" | "calendarDays" | "calendarWeeks" | "calendarMonths" | "calendarYears" | "last_day";
|
|
146
|
-
consecutive: number;
|
|
147
|
-
};
|
|
148
|
-
uniqueAttribute?: string | undefined;
|
|
149
|
-
};
|
|
150
|
-
type?: "direct" | "referral" | undefined;
|
|
151
|
-
conditions?: Record<string, unknown>[] | undefined;
|
|
152
|
-
translations?: Record<string, {
|
|
153
|
-
name: string;
|
|
154
|
-
description?: string | undefined;
|
|
155
|
-
}> | undefined;
|
|
156
|
-
trigger?: "referral" | "transaction" | "custom_event" | "achievement" | "points_transfer" | "reward_redemption" | "tier_change" | "registration" | "profile_update" | undefined;
|
|
157
|
-
event?: string | undefined;
|
|
158
|
-
achievementRuleId?: string | undefined;
|
|
159
|
-
aggregation?: {
|
|
160
|
-
type: "quantity" | "min" | "max" | "sum" | "average";
|
|
161
|
-
rule?: string | undefined;
|
|
162
|
-
} | undefined;
|
|
163
|
-
limit?: {
|
|
164
|
-
value?: number | undefined;
|
|
165
|
-
interval?: {
|
|
166
|
-
type: string;
|
|
167
|
-
value?: number | undefined;
|
|
168
|
-
} | undefined;
|
|
169
|
-
} | undefined;
|
|
170
|
-
uniqueReferee?: boolean | undefined;
|
|
171
|
-
}, {
|
|
172
|
-
completeRule: {
|
|
173
|
-
periodGoal: string | number;
|
|
174
|
-
period: {
|
|
175
|
-
type: "day" | "week" | "month" | "year" | "calendarDays" | "calendarWeeks" | "calendarMonths" | "calendarYears" | "last_day";
|
|
176
|
-
consecutive: number;
|
|
177
|
-
};
|
|
178
|
-
uniqueAttribute?: string | undefined;
|
|
179
|
-
};
|
|
180
|
-
type?: "direct" | "referral" | undefined;
|
|
181
|
-
conditions?: Record<string, unknown>[] | undefined;
|
|
182
|
-
translations?: Record<string, {
|
|
183
|
-
name: string;
|
|
184
|
-
description?: string | undefined;
|
|
185
|
-
}> | undefined;
|
|
186
|
-
trigger?: "referral" | "transaction" | "custom_event" | "achievement" | "points_transfer" | "reward_redemption" | "tier_change" | "registration" | "profile_update" | undefined;
|
|
187
|
-
event?: string | undefined;
|
|
188
|
-
achievementRuleId?: string | undefined;
|
|
189
|
-
aggregation?: {
|
|
190
|
-
type: "quantity" | "min" | "max" | "sum" | "average";
|
|
191
|
-
rule?: string | undefined;
|
|
192
|
-
} | undefined;
|
|
193
|
-
limit?: {
|
|
194
|
-
value?: number | undefined;
|
|
195
|
-
interval?: {
|
|
196
|
-
type: string;
|
|
197
|
-
value?: number | undefined;
|
|
198
|
-
} | undefined;
|
|
199
|
-
} | undefined;
|
|
200
|
-
uniqueReferee?: boolean | undefined;
|
|
201
|
-
}>, "many">;
|
|
202
|
-
badgeTypeId: z.ZodOptional<z.ZodString>;
|
|
203
|
-
};
|
|
204
|
-
export declare const AchievementGetInputSchema: {
|
|
205
|
-
storeCode: z.ZodOptional<z.ZodString>;
|
|
206
|
-
achievementId: z.ZodString;
|
|
207
|
-
};
|
|
208
|
-
export declare const AchievementUpdateInputSchema: {
|
|
209
|
-
storeCode: z.ZodOptional<z.ZodString>;
|
|
210
|
-
achievementId: z.ZodString;
|
|
211
|
-
translations: z.ZodRecord<z.ZodString, z.ZodObject<{
|
|
212
|
-
name: z.ZodString;
|
|
213
|
-
description: z.ZodOptional<z.ZodString>;
|
|
214
|
-
}, "strip", z.ZodTypeAny, {
|
|
215
|
-
name: string;
|
|
216
|
-
description?: string | undefined;
|
|
217
|
-
}, {
|
|
218
|
-
name: string;
|
|
219
|
-
description?: string | undefined;
|
|
220
|
-
}>>;
|
|
221
|
-
active: z.ZodOptional<z.ZodBoolean>;
|
|
222
|
-
activity: z.ZodOptional<z.ZodObject<{
|
|
223
|
-
startsAt: z.ZodOptional<z.ZodString>;
|
|
224
|
-
endsAt: z.ZodOptional<z.ZodString>;
|
|
225
|
-
operator: z.ZodOptional<z.ZodString>;
|
|
226
|
-
}, "strip", z.ZodTypeAny, {
|
|
227
|
-
operator?: string | undefined;
|
|
228
|
-
startsAt?: string | undefined;
|
|
229
|
-
endsAt?: string | undefined;
|
|
230
|
-
}, {
|
|
231
|
-
operator?: string | undefined;
|
|
232
|
-
startsAt?: string | undefined;
|
|
233
|
-
endsAt?: string | undefined;
|
|
234
|
-
}>>;
|
|
235
|
-
limit: z.ZodOptional<z.ZodObject<{
|
|
236
|
-
value: z.ZodOptional<z.ZodNumber>;
|
|
237
|
-
interval: z.ZodOptional<z.ZodObject<{
|
|
238
|
-
type: z.ZodString;
|
|
239
|
-
value: z.ZodOptional<z.ZodNumber>;
|
|
240
|
-
}, "strip", z.ZodTypeAny, {
|
|
241
|
-
type: string;
|
|
242
|
-
value?: number | undefined;
|
|
243
|
-
}, {
|
|
244
|
-
type: string;
|
|
245
|
-
value?: number | undefined;
|
|
246
|
-
}>>;
|
|
247
|
-
}, "strip", z.ZodTypeAny, {
|
|
248
|
-
value?: number | undefined;
|
|
249
|
-
interval?: {
|
|
250
|
-
type: string;
|
|
251
|
-
value?: number | undefined;
|
|
252
|
-
} | undefined;
|
|
253
|
-
}, {
|
|
254
|
-
value?: number | undefined;
|
|
255
|
-
interval?: {
|
|
256
|
-
type: string;
|
|
257
|
-
value?: number | undefined;
|
|
258
|
-
} | undefined;
|
|
259
|
-
}>>;
|
|
260
|
-
rules: z.ZodArray<z.ZodObject<{
|
|
261
|
-
achievementRuleId: z.ZodOptional<z.ZodString>;
|
|
262
|
-
translations: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodObject<{
|
|
263
|
-
name: z.ZodString;
|
|
264
|
-
description: z.ZodOptional<z.ZodString>;
|
|
265
|
-
}, "strip", z.ZodTypeAny, {
|
|
266
|
-
name: string;
|
|
267
|
-
description?: string | undefined;
|
|
268
|
-
}, {
|
|
269
|
-
name: string;
|
|
270
|
-
description?: string | undefined;
|
|
271
|
-
}>>>;
|
|
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"]>>;
|
|
274
|
-
event: z.ZodOptional<z.ZodString>;
|
|
275
|
-
completeRule: z.ZodObject<{
|
|
276
|
-
periodGoal: z.ZodUnion<[z.ZodNumber, z.ZodString]>;
|
|
277
|
-
period: z.ZodObject<{
|
|
278
|
-
type: z.ZodEnum<["day", "week", "month", "year", "last_day", "calendarDays", "calendarWeeks", "calendarMonths", "calendarYears"]>;
|
|
279
|
-
consecutive: z.ZodNumber;
|
|
280
|
-
}, "strip", z.ZodTypeAny, {
|
|
281
|
-
type: "day" | "week" | "month" | "year" | "calendarDays" | "calendarWeeks" | "calendarMonths" | "calendarYears" | "last_day";
|
|
282
|
-
consecutive: number;
|
|
283
|
-
}, {
|
|
284
|
-
type: "day" | "week" | "month" | "year" | "calendarDays" | "calendarWeeks" | "calendarMonths" | "calendarYears" | "last_day";
|
|
285
|
-
consecutive: number;
|
|
286
|
-
}>;
|
|
287
|
-
uniqueAttribute: z.ZodOptional<z.ZodString>;
|
|
288
|
-
}, "strip", z.ZodTypeAny, {
|
|
289
|
-
periodGoal: string | number;
|
|
290
|
-
period: {
|
|
291
|
-
type: "day" | "week" | "month" | "year" | "calendarDays" | "calendarWeeks" | "calendarMonths" | "calendarYears" | "last_day";
|
|
292
|
-
consecutive: number;
|
|
293
|
-
};
|
|
294
|
-
uniqueAttribute?: string | undefined;
|
|
295
|
-
}, {
|
|
296
|
-
periodGoal: string | number;
|
|
297
|
-
period: {
|
|
298
|
-
type: "day" | "week" | "month" | "year" | "calendarDays" | "calendarWeeks" | "calendarMonths" | "calendarYears" | "last_day";
|
|
299
|
-
consecutive: number;
|
|
300
|
-
};
|
|
301
|
-
uniqueAttribute?: string | undefined;
|
|
302
|
-
}>;
|
|
303
|
-
aggregation: z.ZodOptional<z.ZodObject<{
|
|
304
|
-
type: z.ZodEnum<["quantity", "sum", "average", "min", "max"]>;
|
|
305
|
-
rule: z.ZodOptional<z.ZodString>;
|
|
306
|
-
}, "strip", z.ZodTypeAny, {
|
|
307
|
-
type: "quantity" | "min" | "max" | "sum" | "average";
|
|
308
|
-
rule?: string | undefined;
|
|
309
|
-
}, {
|
|
310
|
-
type: "quantity" | "min" | "max" | "sum" | "average";
|
|
311
|
-
rule?: string | undefined;
|
|
312
|
-
}>>;
|
|
313
|
-
conditions: z.ZodOptional<z.ZodArray<z.ZodRecord<z.ZodString, z.ZodUnknown>, "many">>;
|
|
314
|
-
limit: z.ZodOptional<z.ZodObject<{
|
|
315
|
-
value: z.ZodOptional<z.ZodNumber>;
|
|
316
|
-
interval: z.ZodOptional<z.ZodObject<{
|
|
317
|
-
type: z.ZodString;
|
|
318
|
-
value: z.ZodOptional<z.ZodNumber>;
|
|
319
|
-
}, "strip", z.ZodTypeAny, {
|
|
320
|
-
type: string;
|
|
321
|
-
value?: number | undefined;
|
|
322
|
-
}, {
|
|
323
|
-
type: string;
|
|
324
|
-
value?: number | undefined;
|
|
325
|
-
}>>;
|
|
326
|
-
}, "strip", z.ZodTypeAny, {
|
|
327
|
-
value?: number | undefined;
|
|
328
|
-
interval?: {
|
|
329
|
-
type: string;
|
|
330
|
-
value?: number | undefined;
|
|
331
|
-
} | undefined;
|
|
332
|
-
}, {
|
|
333
|
-
value?: number | undefined;
|
|
334
|
-
interval?: {
|
|
335
|
-
type: string;
|
|
336
|
-
value?: number | undefined;
|
|
337
|
-
} | undefined;
|
|
338
|
-
}>>;
|
|
339
|
-
uniqueReferee: z.ZodOptional<z.ZodBoolean>;
|
|
340
|
-
}, "strip", z.ZodTypeAny, {
|
|
341
|
-
completeRule: {
|
|
342
|
-
periodGoal: string | number;
|
|
343
|
-
period: {
|
|
344
|
-
type: "day" | "week" | "month" | "year" | "calendarDays" | "calendarWeeks" | "calendarMonths" | "calendarYears" | "last_day";
|
|
345
|
-
consecutive: number;
|
|
346
|
-
};
|
|
347
|
-
uniqueAttribute?: string | undefined;
|
|
348
|
-
};
|
|
349
|
-
type?: "direct" | "referral" | undefined;
|
|
350
|
-
conditions?: Record<string, unknown>[] | undefined;
|
|
351
|
-
translations?: Record<string, {
|
|
352
|
-
name: string;
|
|
353
|
-
description?: string | undefined;
|
|
354
|
-
}> | undefined;
|
|
355
|
-
trigger?: "referral" | "transaction" | "custom_event" | "achievement" | "points_transfer" | "reward_redemption" | "tier_change" | "registration" | "profile_update" | undefined;
|
|
356
|
-
event?: string | undefined;
|
|
357
|
-
achievementRuleId?: string | undefined;
|
|
358
|
-
aggregation?: {
|
|
359
|
-
type: "quantity" | "min" | "max" | "sum" | "average";
|
|
360
|
-
rule?: string | undefined;
|
|
361
|
-
} | undefined;
|
|
362
|
-
limit?: {
|
|
363
|
-
value?: number | undefined;
|
|
364
|
-
interval?: {
|
|
365
|
-
type: string;
|
|
366
|
-
value?: number | undefined;
|
|
367
|
-
} | undefined;
|
|
368
|
-
} | undefined;
|
|
369
|
-
uniqueReferee?: boolean | undefined;
|
|
370
|
-
}, {
|
|
371
|
-
completeRule: {
|
|
372
|
-
periodGoal: string | number;
|
|
373
|
-
period: {
|
|
374
|
-
type: "day" | "week" | "month" | "year" | "calendarDays" | "calendarWeeks" | "calendarMonths" | "calendarYears" | "last_day";
|
|
375
|
-
consecutive: number;
|
|
376
|
-
};
|
|
377
|
-
uniqueAttribute?: string | undefined;
|
|
378
|
-
};
|
|
379
|
-
type?: "direct" | "referral" | undefined;
|
|
380
|
-
conditions?: Record<string, unknown>[] | undefined;
|
|
381
|
-
translations?: Record<string, {
|
|
382
|
-
name: string;
|
|
383
|
-
description?: string | undefined;
|
|
384
|
-
}> | undefined;
|
|
385
|
-
trigger?: "referral" | "transaction" | "custom_event" | "achievement" | "points_transfer" | "reward_redemption" | "tier_change" | "registration" | "profile_update" | undefined;
|
|
386
|
-
event?: string | undefined;
|
|
387
|
-
achievementRuleId?: string | undefined;
|
|
388
|
-
aggregation?: {
|
|
389
|
-
type: "quantity" | "min" | "max" | "sum" | "average";
|
|
390
|
-
rule?: string | undefined;
|
|
391
|
-
} | undefined;
|
|
392
|
-
limit?: {
|
|
393
|
-
value?: number | undefined;
|
|
394
|
-
interval?: {
|
|
395
|
-
type: string;
|
|
396
|
-
value?: number | undefined;
|
|
397
|
-
} | undefined;
|
|
398
|
-
} | undefined;
|
|
399
|
-
uniqueReferee?: boolean | undefined;
|
|
400
|
-
}>, "many">;
|
|
401
|
-
badgeTypeId: z.ZodOptional<z.ZodString>;
|
|
402
|
-
};
|
|
403
|
-
export declare const AchievementPatchInputSchema: {
|
|
404
|
-
storeCode: z.ZodOptional<z.ZodString>;
|
|
405
|
-
achievementId: z.ZodString;
|
|
406
|
-
active: z.ZodOptional<z.ZodBoolean>;
|
|
407
|
-
translations: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodObject<{
|
|
408
|
-
name: z.ZodOptional<z.ZodString>;
|
|
409
|
-
description: z.ZodOptional<z.ZodString>;
|
|
410
|
-
}, "strip", z.ZodTypeAny, {
|
|
411
|
-
name?: string | undefined;
|
|
412
|
-
description?: string | undefined;
|
|
413
|
-
}, {
|
|
414
|
-
name?: string | undefined;
|
|
415
|
-
description?: string | undefined;
|
|
416
|
-
}>>>;
|
|
417
|
-
};
|
|
418
|
-
export declare const AchievementGetMemberProgressInputSchema: {
|
|
419
|
-
storeCode: z.ZodOptional<z.ZodString>;
|
|
420
|
-
memberId: z.ZodString;
|
|
421
|
-
achievementId: z.ZodString;
|
|
422
|
-
};
|
|
423
|
-
export declare const AchievementListMemberAchievementsInputSchema: {
|
|
424
|
-
storeCode: z.ZodOptional<z.ZodString>;
|
|
425
|
-
memberId: z.ZodString;
|
|
426
|
-
page: z.ZodOptional<z.ZodNumber>;
|
|
427
|
-
perPage: z.ZodOptional<z.ZodNumber>;
|
|
428
|
-
name: z.ZodOptional<z.ZodString>;
|
|
429
|
-
achievementId: z.ZodOptional<z.ZodString>;
|
|
430
|
-
};
|
|
431
|
-
export declare function achievementList(input: {
|
|
432
|
-
storeCode?: string;
|
|
433
|
-
page?: number;
|
|
434
|
-
perPage?: number;
|
|
435
|
-
active?: boolean;
|
|
436
|
-
name?: string;
|
|
437
|
-
}): Promise<{
|
|
438
|
-
achievements: AchievementListItem[];
|
|
439
|
-
total: {
|
|
440
|
-
all?: number;
|
|
441
|
-
filtered?: number;
|
|
442
|
-
};
|
|
443
|
-
}>;
|
|
444
|
-
interface AchievementCreateInput {
|
|
445
|
-
storeCode?: string;
|
|
446
|
-
translations: Record<string, {
|
|
447
|
-
name: string;
|
|
448
|
-
description?: string;
|
|
449
|
-
}>;
|
|
450
|
-
active?: boolean;
|
|
451
|
-
activity?: {
|
|
452
|
-
startsAt?: string;
|
|
453
|
-
endsAt?: string;
|
|
454
|
-
operator?: string;
|
|
455
|
-
};
|
|
456
|
-
limit?: {
|
|
457
|
-
value?: number;
|
|
458
|
-
interval?: {
|
|
459
|
-
type: string;
|
|
460
|
-
value?: number;
|
|
461
|
-
};
|
|
462
|
-
};
|
|
463
|
-
rules: Array<Record<string, unknown>>;
|
|
464
|
-
badgeTypeId?: string;
|
|
465
|
-
}
|
|
466
|
-
export declare function achievementCreate(input: AchievementCreateInput): Promise<{
|
|
467
|
-
achievementId: string;
|
|
468
|
-
}>;
|
|
469
|
-
export declare function achievementGet(input: {
|
|
470
|
-
storeCode?: string;
|
|
471
|
-
achievementId: string;
|
|
472
|
-
}): Promise<Record<string, unknown>>;
|
|
473
|
-
interface AchievementUpdateInput {
|
|
474
|
-
storeCode?: string;
|
|
475
|
-
achievementId: string;
|
|
476
|
-
translations: Record<string, {
|
|
477
|
-
name: string;
|
|
478
|
-
description?: string;
|
|
479
|
-
}>;
|
|
480
|
-
active?: boolean;
|
|
481
|
-
activity?: {
|
|
482
|
-
startsAt?: string;
|
|
483
|
-
endsAt?: string;
|
|
484
|
-
operator?: string;
|
|
485
|
-
};
|
|
486
|
-
limit?: {
|
|
487
|
-
value?: number;
|
|
488
|
-
interval?: {
|
|
489
|
-
type: string;
|
|
490
|
-
value?: number;
|
|
491
|
-
};
|
|
492
|
-
};
|
|
493
|
-
rules: Array<Record<string, unknown>>;
|
|
494
|
-
badgeTypeId?: string;
|
|
495
|
-
}
|
|
496
|
-
export declare function achievementUpdate(input: AchievementUpdateInput): Promise<void>;
|
|
497
|
-
interface AchievementPatchInput {
|
|
498
|
-
storeCode?: string;
|
|
499
|
-
achievementId: string;
|
|
500
|
-
active?: boolean;
|
|
501
|
-
translations?: Record<string, {
|
|
502
|
-
name?: string;
|
|
503
|
-
description?: string;
|
|
504
|
-
}>;
|
|
505
|
-
}
|
|
506
|
-
export declare function achievementPatch(input: AchievementPatchInput): Promise<void>;
|
|
507
|
-
interface AchievementMemberProgress {
|
|
508
|
-
achievementId: string;
|
|
509
|
-
achievementName?: string;
|
|
510
|
-
achievementDescription?: string;
|
|
511
|
-
limitReached?: boolean;
|
|
512
|
-
memberProgress: {
|
|
513
|
-
completedCount: number;
|
|
514
|
-
rules: Array<{
|
|
515
|
-
achievementRuleId: string;
|
|
516
|
-
periodGoal: number;
|
|
517
|
-
currentPeriodValue: number;
|
|
518
|
-
consecutivePeriods?: number;
|
|
519
|
-
completedConsecutivePeriods?: number;
|
|
520
|
-
periodType?: string;
|
|
521
|
-
type?: string;
|
|
522
|
-
trigger?: string;
|
|
523
|
-
periodValue?: number;
|
|
524
|
-
}>;
|
|
525
|
-
};
|
|
526
|
-
}
|
|
527
|
-
export declare function achievementGetMemberProgress(input: {
|
|
528
|
-
storeCode?: string;
|
|
529
|
-
memberId: string;
|
|
530
|
-
achievementId: string;
|
|
531
|
-
}): Promise<AchievementMemberProgress>;
|
|
532
|
-
export declare function achievementListMemberAchievements(input: {
|
|
533
|
-
storeCode?: string;
|
|
534
|
-
memberId: string;
|
|
535
|
-
page?: number;
|
|
536
|
-
perPage?: number;
|
|
537
|
-
name?: string;
|
|
538
|
-
achievementId?: string;
|
|
539
|
-
}): Promise<{
|
|
540
|
-
achievements: AchievementMemberProgress[];
|
|
541
|
-
total: {
|
|
542
|
-
all?: number;
|
|
543
|
-
filtered?: number;
|
|
544
|
-
};
|
|
545
|
-
}>;
|
|
546
|
-
export declare const achievementToolDefinitions: readonly [{
|
|
547
|
-
readonly name: "openloyalty_achievement_list";
|
|
548
|
-
readonly title: "List Achievements";
|
|
549
|
-
readonly description: "List achievements. Achievements gamify member behavior by setting goals (e.g., 'Make 5 purchases this month'). Returns achievementId, name, active status, and associated badge. Use achievement_get for full rules and configuration.";
|
|
550
|
-
readonly readOnly: true;
|
|
551
|
-
readonly inputSchema: {
|
|
552
|
-
storeCode: z.ZodOptional<z.ZodString>;
|
|
553
|
-
page: z.ZodOptional<z.ZodNumber>;
|
|
554
|
-
perPage: z.ZodOptional<z.ZodNumber>;
|
|
555
|
-
active: z.ZodOptional<z.ZodBoolean>;
|
|
556
|
-
name: z.ZodOptional<z.ZodString>;
|
|
557
|
-
};
|
|
558
|
-
readonly handler: typeof achievementList;
|
|
559
|
-
}, {
|
|
560
|
-
readonly name: "openloyalty_achievement_create";
|
|
561
|
-
readonly title: "Create Achievement";
|
|
562
|
-
readonly description: string;
|
|
563
|
-
readonly readOnly: false;
|
|
564
|
-
readonly inputSchema: {
|
|
565
|
-
storeCode: z.ZodOptional<z.ZodString>;
|
|
566
|
-
translations: z.ZodRecord<z.ZodString, z.ZodObject<{
|
|
567
|
-
name: z.ZodString;
|
|
568
|
-
description: z.ZodOptional<z.ZodString>;
|
|
569
|
-
}, "strip", z.ZodTypeAny, {
|
|
570
|
-
name: string;
|
|
571
|
-
description?: string | undefined;
|
|
572
|
-
}, {
|
|
573
|
-
name: string;
|
|
574
|
-
description?: string | undefined;
|
|
575
|
-
}>>;
|
|
576
|
-
active: z.ZodOptional<z.ZodBoolean>;
|
|
577
|
-
activity: z.ZodOptional<z.ZodObject<{
|
|
578
|
-
startsAt: z.ZodOptional<z.ZodString>;
|
|
579
|
-
endsAt: z.ZodOptional<z.ZodString>;
|
|
580
|
-
operator: z.ZodOptional<z.ZodString>;
|
|
581
|
-
}, "strip", z.ZodTypeAny, {
|
|
582
|
-
operator?: string | undefined;
|
|
583
|
-
startsAt?: string | undefined;
|
|
584
|
-
endsAt?: string | undefined;
|
|
585
|
-
}, {
|
|
586
|
-
operator?: string | undefined;
|
|
587
|
-
startsAt?: string | undefined;
|
|
588
|
-
endsAt?: string | undefined;
|
|
589
|
-
}>>;
|
|
590
|
-
limit: z.ZodOptional<z.ZodObject<{
|
|
591
|
-
value: z.ZodOptional<z.ZodNumber>;
|
|
592
|
-
interval: z.ZodOptional<z.ZodObject<{
|
|
593
|
-
type: z.ZodString;
|
|
594
|
-
value: z.ZodOptional<z.ZodNumber>;
|
|
595
|
-
}, "strip", z.ZodTypeAny, {
|
|
596
|
-
type: string;
|
|
597
|
-
value?: number | undefined;
|
|
598
|
-
}, {
|
|
599
|
-
type: string;
|
|
600
|
-
value?: number | undefined;
|
|
601
|
-
}>>;
|
|
602
|
-
}, "strip", z.ZodTypeAny, {
|
|
603
|
-
value?: number | undefined;
|
|
604
|
-
interval?: {
|
|
605
|
-
type: string;
|
|
606
|
-
value?: number | undefined;
|
|
607
|
-
} | undefined;
|
|
608
|
-
}, {
|
|
609
|
-
value?: number | undefined;
|
|
610
|
-
interval?: {
|
|
611
|
-
type: string;
|
|
612
|
-
value?: number | undefined;
|
|
613
|
-
} | undefined;
|
|
614
|
-
}>>;
|
|
615
|
-
rules: z.ZodArray<z.ZodObject<{
|
|
616
|
-
achievementRuleId: z.ZodOptional<z.ZodString>;
|
|
617
|
-
translations: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodObject<{
|
|
618
|
-
name: z.ZodString;
|
|
619
|
-
description: z.ZodOptional<z.ZodString>;
|
|
620
|
-
}, "strip", z.ZodTypeAny, {
|
|
621
|
-
name: string;
|
|
622
|
-
description?: string | undefined;
|
|
623
|
-
}, {
|
|
624
|
-
name: string;
|
|
625
|
-
description?: string | undefined;
|
|
626
|
-
}>>>;
|
|
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"]>>;
|
|
629
|
-
event: z.ZodOptional<z.ZodString>;
|
|
630
|
-
completeRule: z.ZodObject<{
|
|
631
|
-
periodGoal: z.ZodUnion<[z.ZodNumber, z.ZodString]>;
|
|
632
|
-
period: z.ZodObject<{
|
|
633
|
-
type: z.ZodEnum<["day", "week", "month", "year", "last_day", "calendarDays", "calendarWeeks", "calendarMonths", "calendarYears"]>;
|
|
634
|
-
consecutive: z.ZodNumber;
|
|
635
|
-
}, "strip", z.ZodTypeAny, {
|
|
636
|
-
type: "day" | "week" | "month" | "year" | "calendarDays" | "calendarWeeks" | "calendarMonths" | "calendarYears" | "last_day";
|
|
637
|
-
consecutive: number;
|
|
638
|
-
}, {
|
|
639
|
-
type: "day" | "week" | "month" | "year" | "calendarDays" | "calendarWeeks" | "calendarMonths" | "calendarYears" | "last_day";
|
|
640
|
-
consecutive: number;
|
|
641
|
-
}>;
|
|
642
|
-
uniqueAttribute: z.ZodOptional<z.ZodString>;
|
|
643
|
-
}, "strip", z.ZodTypeAny, {
|
|
644
|
-
periodGoal: string | number;
|
|
645
|
-
period: {
|
|
646
|
-
type: "day" | "week" | "month" | "year" | "calendarDays" | "calendarWeeks" | "calendarMonths" | "calendarYears" | "last_day";
|
|
647
|
-
consecutive: number;
|
|
648
|
-
};
|
|
649
|
-
uniqueAttribute?: string | undefined;
|
|
650
|
-
}, {
|
|
651
|
-
periodGoal: string | number;
|
|
652
|
-
period: {
|
|
653
|
-
type: "day" | "week" | "month" | "year" | "calendarDays" | "calendarWeeks" | "calendarMonths" | "calendarYears" | "last_day";
|
|
654
|
-
consecutive: number;
|
|
655
|
-
};
|
|
656
|
-
uniqueAttribute?: string | undefined;
|
|
657
|
-
}>;
|
|
658
|
-
aggregation: z.ZodOptional<z.ZodObject<{
|
|
659
|
-
type: z.ZodEnum<["quantity", "sum", "average", "min", "max"]>;
|
|
660
|
-
rule: z.ZodOptional<z.ZodString>;
|
|
661
|
-
}, "strip", z.ZodTypeAny, {
|
|
662
|
-
type: "quantity" | "min" | "max" | "sum" | "average";
|
|
663
|
-
rule?: string | undefined;
|
|
664
|
-
}, {
|
|
665
|
-
type: "quantity" | "min" | "max" | "sum" | "average";
|
|
666
|
-
rule?: string | undefined;
|
|
667
|
-
}>>;
|
|
668
|
-
conditions: z.ZodOptional<z.ZodArray<z.ZodRecord<z.ZodString, z.ZodUnknown>, "many">>;
|
|
669
|
-
limit: z.ZodOptional<z.ZodObject<{
|
|
670
|
-
value: z.ZodOptional<z.ZodNumber>;
|
|
671
|
-
interval: z.ZodOptional<z.ZodObject<{
|
|
672
|
-
type: z.ZodString;
|
|
673
|
-
value: z.ZodOptional<z.ZodNumber>;
|
|
674
|
-
}, "strip", z.ZodTypeAny, {
|
|
675
|
-
type: string;
|
|
676
|
-
value?: number | undefined;
|
|
677
|
-
}, {
|
|
678
|
-
type: string;
|
|
679
|
-
value?: number | undefined;
|
|
680
|
-
}>>;
|
|
681
|
-
}, "strip", z.ZodTypeAny, {
|
|
682
|
-
value?: number | undefined;
|
|
683
|
-
interval?: {
|
|
684
|
-
type: string;
|
|
685
|
-
value?: number | undefined;
|
|
686
|
-
} | undefined;
|
|
687
|
-
}, {
|
|
688
|
-
value?: number | undefined;
|
|
689
|
-
interval?: {
|
|
690
|
-
type: string;
|
|
691
|
-
value?: number | undefined;
|
|
692
|
-
} | undefined;
|
|
693
|
-
}>>;
|
|
694
|
-
uniqueReferee: z.ZodOptional<z.ZodBoolean>;
|
|
695
|
-
}, "strip", z.ZodTypeAny, {
|
|
696
|
-
completeRule: {
|
|
697
|
-
periodGoal: string | number;
|
|
698
|
-
period: {
|
|
699
|
-
type: "day" | "week" | "month" | "year" | "calendarDays" | "calendarWeeks" | "calendarMonths" | "calendarYears" | "last_day";
|
|
700
|
-
consecutive: number;
|
|
701
|
-
};
|
|
702
|
-
uniqueAttribute?: string | undefined;
|
|
703
|
-
};
|
|
704
|
-
type?: "direct" | "referral" | undefined;
|
|
705
|
-
conditions?: Record<string, unknown>[] | undefined;
|
|
706
|
-
translations?: Record<string, {
|
|
707
|
-
name: string;
|
|
708
|
-
description?: string | undefined;
|
|
709
|
-
}> | undefined;
|
|
710
|
-
trigger?: "referral" | "transaction" | "custom_event" | "achievement" | "points_transfer" | "reward_redemption" | "tier_change" | "registration" | "profile_update" | undefined;
|
|
711
|
-
event?: string | undefined;
|
|
712
|
-
achievementRuleId?: string | undefined;
|
|
713
|
-
aggregation?: {
|
|
714
|
-
type: "quantity" | "min" | "max" | "sum" | "average";
|
|
715
|
-
rule?: string | undefined;
|
|
716
|
-
} | undefined;
|
|
717
|
-
limit?: {
|
|
718
|
-
value?: number | undefined;
|
|
719
|
-
interval?: {
|
|
720
|
-
type: string;
|
|
721
|
-
value?: number | undefined;
|
|
722
|
-
} | undefined;
|
|
723
|
-
} | undefined;
|
|
724
|
-
uniqueReferee?: boolean | undefined;
|
|
725
|
-
}, {
|
|
726
|
-
completeRule: {
|
|
727
|
-
periodGoal: string | number;
|
|
728
|
-
period: {
|
|
729
|
-
type: "day" | "week" | "month" | "year" | "calendarDays" | "calendarWeeks" | "calendarMonths" | "calendarYears" | "last_day";
|
|
730
|
-
consecutive: number;
|
|
731
|
-
};
|
|
732
|
-
uniqueAttribute?: string | undefined;
|
|
733
|
-
};
|
|
734
|
-
type?: "direct" | "referral" | undefined;
|
|
735
|
-
conditions?: Record<string, unknown>[] | undefined;
|
|
736
|
-
translations?: Record<string, {
|
|
737
|
-
name: string;
|
|
738
|
-
description?: string | undefined;
|
|
739
|
-
}> | undefined;
|
|
740
|
-
trigger?: "referral" | "transaction" | "custom_event" | "achievement" | "points_transfer" | "reward_redemption" | "tier_change" | "registration" | "profile_update" | undefined;
|
|
741
|
-
event?: string | undefined;
|
|
742
|
-
achievementRuleId?: string | undefined;
|
|
743
|
-
aggregation?: {
|
|
744
|
-
type: "quantity" | "min" | "max" | "sum" | "average";
|
|
745
|
-
rule?: string | undefined;
|
|
746
|
-
} | undefined;
|
|
747
|
-
limit?: {
|
|
748
|
-
value?: number | undefined;
|
|
749
|
-
interval?: {
|
|
750
|
-
type: string;
|
|
751
|
-
value?: number | undefined;
|
|
752
|
-
} | undefined;
|
|
753
|
-
} | undefined;
|
|
754
|
-
uniqueReferee?: boolean | undefined;
|
|
755
|
-
}>, "many">;
|
|
756
|
-
badgeTypeId: z.ZodOptional<z.ZodString>;
|
|
757
|
-
};
|
|
758
|
-
readonly handler: typeof achievementCreate;
|
|
759
|
-
}, {
|
|
760
|
-
readonly name: "openloyalty_achievement_get";
|
|
761
|
-
readonly title: "Get Achievement Details";
|
|
762
|
-
readonly description: "Get achievement details including all rules, conditions, activity period, limits, and completions count.";
|
|
763
|
-
readonly readOnly: true;
|
|
764
|
-
readonly inputSchema: {
|
|
765
|
-
storeCode: z.ZodOptional<z.ZodString>;
|
|
766
|
-
achievementId: z.ZodString;
|
|
767
|
-
};
|
|
768
|
-
readonly handler: typeof achievementGet;
|
|
769
|
-
}, {
|
|
770
|
-
readonly name: "openloyalty_achievement_update";
|
|
771
|
-
readonly title: "Update Achievement";
|
|
772
|
-
readonly description: "Update achievement configuration. Requires full achievement object (translations, rules). Use achievement_get first to retrieve current configuration.";
|
|
773
|
-
readonly readOnly: false;
|
|
774
|
-
readonly inputSchema: {
|
|
775
|
-
storeCode: z.ZodOptional<z.ZodString>;
|
|
776
|
-
achievementId: z.ZodString;
|
|
777
|
-
translations: z.ZodRecord<z.ZodString, z.ZodObject<{
|
|
778
|
-
name: z.ZodString;
|
|
779
|
-
description: z.ZodOptional<z.ZodString>;
|
|
780
|
-
}, "strip", z.ZodTypeAny, {
|
|
781
|
-
name: string;
|
|
782
|
-
description?: string | undefined;
|
|
783
|
-
}, {
|
|
784
|
-
name: string;
|
|
785
|
-
description?: string | undefined;
|
|
786
|
-
}>>;
|
|
787
|
-
active: z.ZodOptional<z.ZodBoolean>;
|
|
788
|
-
activity: z.ZodOptional<z.ZodObject<{
|
|
789
|
-
startsAt: z.ZodOptional<z.ZodString>;
|
|
790
|
-
endsAt: z.ZodOptional<z.ZodString>;
|
|
791
|
-
operator: z.ZodOptional<z.ZodString>;
|
|
792
|
-
}, "strip", z.ZodTypeAny, {
|
|
793
|
-
operator?: string | undefined;
|
|
794
|
-
startsAt?: string | undefined;
|
|
795
|
-
endsAt?: string | undefined;
|
|
796
|
-
}, {
|
|
797
|
-
operator?: string | undefined;
|
|
798
|
-
startsAt?: string | undefined;
|
|
799
|
-
endsAt?: string | undefined;
|
|
800
|
-
}>>;
|
|
801
|
-
limit: z.ZodOptional<z.ZodObject<{
|
|
802
|
-
value: z.ZodOptional<z.ZodNumber>;
|
|
803
|
-
interval: z.ZodOptional<z.ZodObject<{
|
|
804
|
-
type: z.ZodString;
|
|
805
|
-
value: z.ZodOptional<z.ZodNumber>;
|
|
806
|
-
}, "strip", z.ZodTypeAny, {
|
|
807
|
-
type: string;
|
|
808
|
-
value?: number | undefined;
|
|
809
|
-
}, {
|
|
810
|
-
type: string;
|
|
811
|
-
value?: number | undefined;
|
|
812
|
-
}>>;
|
|
813
|
-
}, "strip", z.ZodTypeAny, {
|
|
814
|
-
value?: number | undefined;
|
|
815
|
-
interval?: {
|
|
816
|
-
type: string;
|
|
817
|
-
value?: number | undefined;
|
|
818
|
-
} | undefined;
|
|
819
|
-
}, {
|
|
820
|
-
value?: number | undefined;
|
|
821
|
-
interval?: {
|
|
822
|
-
type: string;
|
|
823
|
-
value?: number | undefined;
|
|
824
|
-
} | undefined;
|
|
825
|
-
}>>;
|
|
826
|
-
rules: z.ZodArray<z.ZodObject<{
|
|
827
|
-
achievementRuleId: z.ZodOptional<z.ZodString>;
|
|
828
|
-
translations: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodObject<{
|
|
829
|
-
name: z.ZodString;
|
|
830
|
-
description: z.ZodOptional<z.ZodString>;
|
|
831
|
-
}, "strip", z.ZodTypeAny, {
|
|
832
|
-
name: string;
|
|
833
|
-
description?: string | undefined;
|
|
834
|
-
}, {
|
|
835
|
-
name: string;
|
|
836
|
-
description?: string | undefined;
|
|
837
|
-
}>>>;
|
|
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"]>>;
|
|
840
|
-
event: z.ZodOptional<z.ZodString>;
|
|
841
|
-
completeRule: z.ZodObject<{
|
|
842
|
-
periodGoal: z.ZodUnion<[z.ZodNumber, z.ZodString]>;
|
|
843
|
-
period: z.ZodObject<{
|
|
844
|
-
type: z.ZodEnum<["day", "week", "month", "year", "last_day", "calendarDays", "calendarWeeks", "calendarMonths", "calendarYears"]>;
|
|
845
|
-
consecutive: z.ZodNumber;
|
|
846
|
-
}, "strip", z.ZodTypeAny, {
|
|
847
|
-
type: "day" | "week" | "month" | "year" | "calendarDays" | "calendarWeeks" | "calendarMonths" | "calendarYears" | "last_day";
|
|
848
|
-
consecutive: number;
|
|
849
|
-
}, {
|
|
850
|
-
type: "day" | "week" | "month" | "year" | "calendarDays" | "calendarWeeks" | "calendarMonths" | "calendarYears" | "last_day";
|
|
851
|
-
consecutive: number;
|
|
852
|
-
}>;
|
|
853
|
-
uniqueAttribute: z.ZodOptional<z.ZodString>;
|
|
854
|
-
}, "strip", z.ZodTypeAny, {
|
|
855
|
-
periodGoal: string | number;
|
|
856
|
-
period: {
|
|
857
|
-
type: "day" | "week" | "month" | "year" | "calendarDays" | "calendarWeeks" | "calendarMonths" | "calendarYears" | "last_day";
|
|
858
|
-
consecutive: number;
|
|
859
|
-
};
|
|
860
|
-
uniqueAttribute?: string | undefined;
|
|
861
|
-
}, {
|
|
862
|
-
periodGoal: string | number;
|
|
863
|
-
period: {
|
|
864
|
-
type: "day" | "week" | "month" | "year" | "calendarDays" | "calendarWeeks" | "calendarMonths" | "calendarYears" | "last_day";
|
|
865
|
-
consecutive: number;
|
|
866
|
-
};
|
|
867
|
-
uniqueAttribute?: string | undefined;
|
|
868
|
-
}>;
|
|
869
|
-
aggregation: z.ZodOptional<z.ZodObject<{
|
|
870
|
-
type: z.ZodEnum<["quantity", "sum", "average", "min", "max"]>;
|
|
871
|
-
rule: z.ZodOptional<z.ZodString>;
|
|
872
|
-
}, "strip", z.ZodTypeAny, {
|
|
873
|
-
type: "quantity" | "min" | "max" | "sum" | "average";
|
|
874
|
-
rule?: string | undefined;
|
|
875
|
-
}, {
|
|
876
|
-
type: "quantity" | "min" | "max" | "sum" | "average";
|
|
877
|
-
rule?: string | undefined;
|
|
878
|
-
}>>;
|
|
879
|
-
conditions: z.ZodOptional<z.ZodArray<z.ZodRecord<z.ZodString, z.ZodUnknown>, "many">>;
|
|
880
|
-
limit: z.ZodOptional<z.ZodObject<{
|
|
881
|
-
value: z.ZodOptional<z.ZodNumber>;
|
|
882
|
-
interval: z.ZodOptional<z.ZodObject<{
|
|
883
|
-
type: z.ZodString;
|
|
884
|
-
value: z.ZodOptional<z.ZodNumber>;
|
|
885
|
-
}, "strip", z.ZodTypeAny, {
|
|
886
|
-
type: string;
|
|
887
|
-
value?: number | undefined;
|
|
888
|
-
}, {
|
|
889
|
-
type: string;
|
|
890
|
-
value?: number | undefined;
|
|
891
|
-
}>>;
|
|
892
|
-
}, "strip", z.ZodTypeAny, {
|
|
893
|
-
value?: number | undefined;
|
|
894
|
-
interval?: {
|
|
895
|
-
type: string;
|
|
896
|
-
value?: number | undefined;
|
|
897
|
-
} | undefined;
|
|
898
|
-
}, {
|
|
899
|
-
value?: number | undefined;
|
|
900
|
-
interval?: {
|
|
901
|
-
type: string;
|
|
902
|
-
value?: number | undefined;
|
|
903
|
-
} | undefined;
|
|
904
|
-
}>>;
|
|
905
|
-
uniqueReferee: z.ZodOptional<z.ZodBoolean>;
|
|
906
|
-
}, "strip", z.ZodTypeAny, {
|
|
907
|
-
completeRule: {
|
|
908
|
-
periodGoal: string | number;
|
|
909
|
-
period: {
|
|
910
|
-
type: "day" | "week" | "month" | "year" | "calendarDays" | "calendarWeeks" | "calendarMonths" | "calendarYears" | "last_day";
|
|
911
|
-
consecutive: number;
|
|
912
|
-
};
|
|
913
|
-
uniqueAttribute?: string | undefined;
|
|
914
|
-
};
|
|
915
|
-
type?: "direct" | "referral" | undefined;
|
|
916
|
-
conditions?: Record<string, unknown>[] | undefined;
|
|
917
|
-
translations?: Record<string, {
|
|
918
|
-
name: string;
|
|
919
|
-
description?: string | undefined;
|
|
920
|
-
}> | undefined;
|
|
921
|
-
trigger?: "referral" | "transaction" | "custom_event" | "achievement" | "points_transfer" | "reward_redemption" | "tier_change" | "registration" | "profile_update" | undefined;
|
|
922
|
-
event?: string | undefined;
|
|
923
|
-
achievementRuleId?: string | undefined;
|
|
924
|
-
aggregation?: {
|
|
925
|
-
type: "quantity" | "min" | "max" | "sum" | "average";
|
|
926
|
-
rule?: string | undefined;
|
|
927
|
-
} | undefined;
|
|
928
|
-
limit?: {
|
|
929
|
-
value?: number | undefined;
|
|
930
|
-
interval?: {
|
|
931
|
-
type: string;
|
|
932
|
-
value?: number | undefined;
|
|
933
|
-
} | undefined;
|
|
934
|
-
} | undefined;
|
|
935
|
-
uniqueReferee?: boolean | undefined;
|
|
936
|
-
}, {
|
|
937
|
-
completeRule: {
|
|
938
|
-
periodGoal: string | number;
|
|
939
|
-
period: {
|
|
940
|
-
type: "day" | "week" | "month" | "year" | "calendarDays" | "calendarWeeks" | "calendarMonths" | "calendarYears" | "last_day";
|
|
941
|
-
consecutive: number;
|
|
942
|
-
};
|
|
943
|
-
uniqueAttribute?: string | undefined;
|
|
944
|
-
};
|
|
945
|
-
type?: "direct" | "referral" | undefined;
|
|
946
|
-
conditions?: Record<string, unknown>[] | undefined;
|
|
947
|
-
translations?: Record<string, {
|
|
948
|
-
name: string;
|
|
949
|
-
description?: string | undefined;
|
|
950
|
-
}> | undefined;
|
|
951
|
-
trigger?: "referral" | "transaction" | "custom_event" | "achievement" | "points_transfer" | "reward_redemption" | "tier_change" | "registration" | "profile_update" | undefined;
|
|
952
|
-
event?: string | undefined;
|
|
953
|
-
achievementRuleId?: string | undefined;
|
|
954
|
-
aggregation?: {
|
|
955
|
-
type: "quantity" | "min" | "max" | "sum" | "average";
|
|
956
|
-
rule?: string | undefined;
|
|
957
|
-
} | undefined;
|
|
958
|
-
limit?: {
|
|
959
|
-
value?: number | undefined;
|
|
960
|
-
interval?: {
|
|
961
|
-
type: string;
|
|
962
|
-
value?: number | undefined;
|
|
963
|
-
} | undefined;
|
|
964
|
-
} | undefined;
|
|
965
|
-
uniqueReferee?: boolean | undefined;
|
|
966
|
-
}>, "many">;
|
|
967
|
-
badgeTypeId: z.ZodOptional<z.ZodString>;
|
|
968
|
-
};
|
|
969
|
-
readonly handler: typeof achievementUpdate;
|
|
970
|
-
}, {
|
|
971
|
-
readonly name: "openloyalty_achievement_patch";
|
|
972
|
-
readonly title: "Patch Achievement";
|
|
973
|
-
readonly description: "Partial update of achievement. Use for simple changes like activating/deactivating or updating translations without providing full rules.";
|
|
974
|
-
readonly readOnly: false;
|
|
975
|
-
readonly inputSchema: {
|
|
976
|
-
storeCode: z.ZodOptional<z.ZodString>;
|
|
977
|
-
achievementId: z.ZodString;
|
|
978
|
-
active: z.ZodOptional<z.ZodBoolean>;
|
|
979
|
-
translations: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodObject<{
|
|
980
|
-
name: z.ZodOptional<z.ZodString>;
|
|
981
|
-
description: z.ZodOptional<z.ZodString>;
|
|
982
|
-
}, "strip", z.ZodTypeAny, {
|
|
983
|
-
name?: string | undefined;
|
|
984
|
-
description?: string | undefined;
|
|
985
|
-
}, {
|
|
986
|
-
name?: string | undefined;
|
|
987
|
-
description?: string | undefined;
|
|
988
|
-
}>>>;
|
|
989
|
-
};
|
|
990
|
-
readonly handler: typeof achievementPatch;
|
|
991
|
-
}, {
|
|
992
|
-
readonly name: "openloyalty_achievement_get_member_progress";
|
|
993
|
-
readonly title: "Get Member Achievement Progress";
|
|
994
|
-
readonly description: "Get member's progress on a specific achievement. Returns completedCount, and for each rule: periodGoal, currentPeriodValue, and consecutive period tracking.";
|
|
995
|
-
readonly readOnly: true;
|
|
996
|
-
readonly inputSchema: {
|
|
997
|
-
storeCode: z.ZodOptional<z.ZodString>;
|
|
998
|
-
memberId: z.ZodString;
|
|
999
|
-
achievementId: z.ZodString;
|
|
1000
|
-
};
|
|
1001
|
-
readonly handler: typeof achievementGetMemberProgress;
|
|
1002
|
-
}, {
|
|
1003
|
-
readonly name: "openloyalty_achievement_list_member_achievements";
|
|
1004
|
-
readonly title: "List Member Achievements";
|
|
1005
|
-
readonly description: "List all achievements with member's progress. Returns each achievement's status, completion count, and per-rule progress. Use for displaying gamification dashboard.";
|
|
1006
|
-
readonly readOnly: true;
|
|
1007
|
-
readonly inputSchema: {
|
|
1008
|
-
storeCode: z.ZodOptional<z.ZodString>;
|
|
1009
|
-
memberId: z.ZodString;
|
|
1010
|
-
page: z.ZodOptional<z.ZodNumber>;
|
|
1011
|
-
perPage: z.ZodOptional<z.ZodNumber>;
|
|
1012
|
-
name: z.ZodOptional<z.ZodString>;
|
|
1013
|
-
achievementId: z.ZodOptional<z.ZodString>;
|
|
1014
|
-
};
|
|
1015
|
-
readonly handler: typeof achievementListMemberAchievements;
|
|
1016
|
-
}];
|
|
1017
|
-
export {};
|