@open-loyalty/mcp-server 1.0.3 → 1.3.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 (142) hide show
  1. package/README.md +180 -177
  2. package/dist/auth/provider.js +2 -14
  3. package/dist/auth/storage.js +22 -0
  4. package/dist/client/http.d.ts +5 -0
  5. package/dist/client/http.js +62 -3
  6. package/dist/config.d.ts +6 -5
  7. package/dist/config.js +15 -11
  8. package/dist/http.js +170 -65
  9. package/dist/instructions.d.ts +5 -0
  10. package/dist/instructions.js +420 -0
  11. package/dist/prompts/fan-engagement-setup.d.ts +107 -0
  12. package/dist/prompts/fan-engagement-setup.js +492 -0
  13. package/dist/server.d.ts +1 -1
  14. package/dist/server.js +68 -278
  15. package/dist/tools/achievement/handlers.d.ts +117 -0
  16. package/dist/tools/achievement/handlers.js +161 -0
  17. package/dist/tools/achievement/index.d.ts +479 -0
  18. package/dist/tools/achievement/index.js +74 -0
  19. package/dist/tools/achievement/schemas.d.ts +433 -0
  20. package/dist/tools/achievement/schemas.js +142 -0
  21. package/dist/tools/achievement.d.ts +155 -121
  22. package/dist/tools/achievement.js +82 -39
  23. package/dist/tools/admin.d.ts +18 -6
  24. package/dist/tools/admin.js +24 -12
  25. package/dist/tools/analytics.d.ts +29 -11
  26. package/dist/tools/analytics.js +58 -48
  27. package/dist/tools/apikey.d.ts +10 -3
  28. package/dist/tools/apikey.js +13 -6
  29. package/dist/tools/audit.d.ts +6 -2
  30. package/dist/tools/audit.js +8 -4
  31. package/dist/tools/badge.d.ts +14 -6
  32. package/dist/tools/badge.js +36 -27
  33. package/dist/tools/campaign/handlers.d.ts +42 -0
  34. package/dist/tools/campaign/handlers.js +223 -0
  35. package/dist/tools/campaign/index.d.ts +783 -0
  36. package/dist/tools/campaign/index.js +112 -0
  37. package/dist/tools/campaign/member-handlers.d.ts +60 -0
  38. package/dist/tools/campaign/member-handlers.js +159 -0
  39. package/dist/tools/campaign/schemas.d.ts +704 -0
  40. package/dist/tools/campaign/schemas.js +259 -0
  41. package/dist/tools/campaign/types.d.ts +161 -0
  42. package/dist/tools/campaign/types.js +2 -0
  43. package/dist/tools/campaign.d.ts +41 -16
  44. package/dist/tools/campaign.js +38 -25
  45. package/dist/tools/custom-event.d.ts +315 -0
  46. package/dist/tools/custom-event.js +270 -0
  47. package/dist/tools/export.d.ts +12 -4
  48. package/dist/tools/export.js +25 -20
  49. package/dist/tools/import.d.ts +9 -3
  50. package/dist/tools/import.js +33 -21
  51. package/dist/tools/index.d.ts +3 -11
  52. package/dist/tools/index.js +17 -475
  53. package/dist/tools/member/handlers.d.ts +111 -0
  54. package/dist/tools/member/handlers.js +206 -0
  55. package/dist/tools/member/index.d.ts +169 -0
  56. package/dist/tools/member/index.js +92 -0
  57. package/dist/tools/member/schemas.d.ts +89 -0
  58. package/dist/tools/member/schemas.js +65 -0
  59. package/dist/tools/member.d.ts +21 -0
  60. package/dist/tools/member.js +56 -62
  61. package/dist/tools/points.d.ts +19 -6
  62. package/dist/tools/points.js +51 -49
  63. package/dist/tools/referral/handlers.d.ts +47 -0
  64. package/dist/tools/referral/handlers.js +115 -0
  65. package/dist/tools/referral/index.d.ts +44 -0
  66. package/dist/tools/referral/index.js +44 -0
  67. package/dist/tools/referral/schemas.d.ts +34 -0
  68. package/dist/tools/referral/schemas.js +52 -0
  69. package/dist/tools/reward/handlers.d.ts +110 -0
  70. package/dist/tools/reward/handlers.js +289 -0
  71. package/dist/tools/reward/index.d.ts +177 -0
  72. package/dist/tools/reward/index.js +90 -0
  73. package/dist/tools/reward/schemas.d.ts +116 -0
  74. package/dist/tools/reward/schemas.js +91 -0
  75. package/dist/tools/reward.d.ts +18 -0
  76. package/dist/tools/reward.js +56 -66
  77. package/dist/tools/role.d.ts +26 -7
  78. package/dist/tools/role.js +25 -12
  79. package/dist/tools/segment/handlers.d.ts +87 -0
  80. package/dist/tools/segment/handlers.js +174 -0
  81. package/dist/tools/segment/index.d.ts +395 -0
  82. package/dist/tools/segment/index.js +87 -0
  83. package/dist/tools/segment/schemas.d.ts +337 -0
  84. package/dist/tools/segment/schemas.js +79 -0
  85. package/dist/tools/segment.d.ts +29 -10
  86. package/dist/tools/segment.js +84 -50
  87. package/dist/tools/store.d.ts +12 -4
  88. package/dist/tools/store.js +16 -8
  89. package/dist/tools/tierset.d.ts +19 -7
  90. package/dist/tools/tierset.js +44 -35
  91. package/dist/tools/transaction.d.ts +16 -8
  92. package/dist/tools/transaction.js +25 -21
  93. package/dist/tools/wallet-type.d.ts +7 -3
  94. package/dist/tools/wallet-type.js +14 -12
  95. package/dist/tools/webhook.d.ts +23 -10
  96. package/dist/tools/webhook.js +135 -33
  97. package/dist/types/schemas/achievement.d.ts +12 -309
  98. package/dist/types/schemas/achievement.js +0 -13
  99. package/dist/types/schemas/admin.d.ts +10 -97
  100. package/dist/types/schemas/admin.js +0 -38
  101. package/dist/types/schemas/badge.d.ts +0 -37
  102. package/dist/types/schemas/badge.js +0 -11
  103. package/dist/types/schemas/campaign.d.ts +64 -832
  104. package/dist/types/schemas/campaign.js +2 -25
  105. package/dist/types/schemas/common.d.ts +5 -0
  106. package/dist/types/schemas/common.js +5 -0
  107. package/dist/types/schemas/export.d.ts +0 -17
  108. package/dist/types/schemas/export.js +0 -7
  109. package/dist/types/schemas/member.d.ts +37 -176
  110. package/dist/types/schemas/member.js +0 -27
  111. package/dist/types/schemas/points.d.ts +0 -63
  112. package/dist/types/schemas/points.js +0 -22
  113. package/dist/types/schemas/reward.d.ts +71 -68
  114. package/dist/types/schemas/reward.js +8 -28
  115. package/dist/types/schemas/role.d.ts +0 -100
  116. package/dist/types/schemas/role.js +0 -29
  117. package/dist/types/schemas/segment.d.ts +0 -58
  118. package/dist/types/schemas/segment.js +0 -17
  119. package/dist/types/schemas/tierset.d.ts +0 -176
  120. package/dist/types/schemas/tierset.js +0 -27
  121. package/dist/types/schemas/transaction.d.ts +23 -254
  122. package/dist/types/schemas/transaction.js +0 -7
  123. package/dist/types/schemas/wallet-type.d.ts +8 -8
  124. package/dist/types/schemas/wallet-type.js +1 -1
  125. package/dist/types/schemas/webhook.d.ts +0 -58
  126. package/dist/types/schemas/webhook.js +0 -12
  127. package/dist/utils/errors.js +30 -3
  128. package/dist/utils/payload.d.ts +12 -0
  129. package/dist/utils/payload.js +14 -0
  130. package/dist/workflows/app-login-streak.d.ts +39 -0
  131. package/dist/workflows/app-login-streak.js +298 -0
  132. package/dist/workflows/early-arrival.d.ts +33 -0
  133. package/dist/workflows/early-arrival.js +148 -0
  134. package/dist/workflows/index.d.ts +101 -0
  135. package/dist/workflows/index.js +208 -0
  136. package/dist/workflows/match-attendance.d.ts +45 -0
  137. package/dist/workflows/match-attendance.js +308 -0
  138. package/dist/workflows/sportsbar-visit.d.ts +41 -0
  139. package/dist/workflows/sportsbar-visit.js +284 -0
  140. package/dist/workflows/vod-watching.d.ts +43 -0
  141. package/dist/workflows/vod-watching.js +326 -0
  142. package/package.json +10 -2
@@ -0,0 +1,783 @@
1
+ export { CampaignListInputSchema, CampaignGetInputSchema, CampaignCreateInputSchema, CampaignUpdateInputSchema, CampaignPatchInputSchema, CampaignDeleteInputSchema, CampaignSimulateInputSchema, CampaignGenerateCodesInputSchema, CampaignListCodesInputSchema, CampaignGetAvailableInputSchema, CampaignGetVisibleInputSchema, CampaignGetLeaderboardInputSchema, } from "./schemas.js";
2
+ export type { SimulatedEffect, CampaignCode, MemberCampaignItem, LeaderboardEntry, CampaignSimulateInput, CampaignCreateInput, } from "./types.js";
3
+ export { campaignList, campaignGet, campaignCreate, campaignUpdate, campaignPatch, campaignDelete, campaignSimulate, } from "./handlers.js";
4
+ export { campaignGenerateCodes, campaignListCodes, campaignGetAvailable, campaignGetVisible, campaignGetLeaderboard, } from "./member-handlers.js";
5
+ import { campaignList, campaignGet, campaignCreate, campaignUpdate, campaignPatch, campaignDelete, campaignSimulate } from "./handlers.js";
6
+ import { campaignGenerateCodes, campaignListCodes, campaignGetAvailable, campaignGetVisible, campaignGetLeaderboard } from "./member-handlers.js";
7
+ export declare const campaignToolDefinitions: readonly [{
8
+ readonly name: "ol_campaign_list";
9
+ readonly title: "List Campaigns";
10
+ 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.";
11
+ readonly readOnly: true;
12
+ readonly inputSchema: {
13
+ storeCode: import("zod").ZodOptional<import("zod").ZodString>;
14
+ page: import("zod").ZodOptional<import("zod").ZodNumber>;
15
+ perPage: import("zod").ZodOptional<import("zod").ZodNumber>;
16
+ active: import("zod").ZodOptional<import("zod").ZodBoolean>;
17
+ type: import("zod").ZodOptional<import("zod").ZodEnum<["direct", "referral"]>>;
18
+ trigger: import("zod").ZodOptional<import("zod").ZodEnum<["transaction", "custom_event", "time", "achievement", "custom_event_unique_code", "leaderboard", "internal_event", "return_transaction", "challenge", "fortune_wheel"]>>;
19
+ };
20
+ readonly handler: typeof campaignList;
21
+ }, {
22
+ readonly name: "ol_campaign_create";
23
+ readonly title: "Create Campaign";
24
+ readonly description: string;
25
+ readonly readOnly: false;
26
+ readonly inputSchema: {
27
+ storeCode: import("zod").ZodOptional<import("zod").ZodString>;
28
+ type: import("zod").ZodEnum<["direct", "referral"]>;
29
+ trigger: import("zod").ZodEnum<["transaction", "custom_event", "time", "achievement", "custom_event_unique_code", "leaderboard", "internal_event", "return_transaction", "challenge", "fortune_wheel"]>;
30
+ translations: import("zod").ZodObject<{
31
+ en: import("zod").ZodObject<{
32
+ name: import("zod").ZodString;
33
+ description: import("zod").ZodOptional<import("zod").ZodString>;
34
+ }, "strip", import("zod").ZodTypeAny, {
35
+ name: string;
36
+ description?: string | undefined;
37
+ }, {
38
+ name: string;
39
+ description?: string | undefined;
40
+ }>;
41
+ }, "passthrough", import("zod").ZodTypeAny, import("zod").objectOutputType<{
42
+ en: import("zod").ZodObject<{
43
+ name: import("zod").ZodString;
44
+ description: import("zod").ZodOptional<import("zod").ZodString>;
45
+ }, "strip", import("zod").ZodTypeAny, {
46
+ name: string;
47
+ description?: string | undefined;
48
+ }, {
49
+ name: string;
50
+ description?: string | undefined;
51
+ }>;
52
+ }, import("zod").ZodTypeAny, "passthrough">, import("zod").objectInputType<{
53
+ en: import("zod").ZodObject<{
54
+ name: import("zod").ZodString;
55
+ description: import("zod").ZodOptional<import("zod").ZodString>;
56
+ }, "strip", import("zod").ZodTypeAny, {
57
+ name: string;
58
+ description?: string | undefined;
59
+ }, {
60
+ name: string;
61
+ description?: string | undefined;
62
+ }>;
63
+ }, import("zod").ZodTypeAny, "passthrough">>;
64
+ activity: import("zod").ZodObject<{
65
+ startsAt: import("zod").ZodString;
66
+ endsAt: import("zod").ZodOptional<import("zod").ZodString>;
67
+ }, "strip", import("zod").ZodTypeAny, {
68
+ startsAt: string;
69
+ endsAt?: string | undefined;
70
+ }, {
71
+ startsAt: string;
72
+ endsAt?: string | undefined;
73
+ }>;
74
+ rules: import("zod").ZodArray<import("zod").ZodObject<{
75
+ name: import("zod").ZodString;
76
+ description: import("zod").ZodOptional<import("zod").ZodString>;
77
+ target: import("zod").ZodOptional<import("zod").ZodEnum<["self", "referrer"]>>;
78
+ effects: import("zod").ZodArray<import("zod").ZodObject<{
79
+ effect: import("zod").ZodEnum<["give_points", "give_reward", "deduct_unit", "assign_member_custom_attribute", "remove_member_custom_attribute"]>;
80
+ pointsRule: import("zod").ZodOptional<import("zod").ZodString>;
81
+ walletCode: import("zod").ZodOptional<import("zod").ZodString>;
82
+ rewardId: import("zod").ZodOptional<import("zod").ZodString>;
83
+ customAttributeKey: import("zod").ZodOptional<import("zod").ZodString>;
84
+ customAttributeValueRule: import("zod").ZodOptional<import("zod").ZodString>;
85
+ }, "strip", import("zod").ZodTypeAny, {
86
+ effect: "give_points" | "give_reward" | "deduct_unit" | "assign_member_custom_attribute" | "remove_member_custom_attribute";
87
+ walletCode?: string | undefined;
88
+ rewardId?: string | undefined;
89
+ pointsRule?: string | undefined;
90
+ customAttributeKey?: string | undefined;
91
+ customAttributeValueRule?: string | undefined;
92
+ }, {
93
+ effect: "give_points" | "give_reward" | "deduct_unit" | "assign_member_custom_attribute" | "remove_member_custom_attribute";
94
+ walletCode?: string | undefined;
95
+ rewardId?: string | undefined;
96
+ pointsRule?: string | undefined;
97
+ customAttributeKey?: string | undefined;
98
+ customAttributeValueRule?: string | undefined;
99
+ }>, "many">;
100
+ conditions: import("zod").ZodOptional<import("zod").ZodArray<import("zod").ZodObject<{
101
+ operator: import("zod").ZodString;
102
+ attribute: import("zod").ZodString;
103
+ data: import("zod").ZodOptional<import("zod").ZodRecord<import("zod").ZodString, import("zod").ZodUnknown>>;
104
+ }, "strip", import("zod").ZodTypeAny, {
105
+ attribute: string;
106
+ operator: string;
107
+ data?: Record<string, unknown> | undefined;
108
+ }, {
109
+ attribute: string;
110
+ operator: string;
111
+ data?: Record<string, unknown> | undefined;
112
+ }>, "many">>;
113
+ }, "strip", import("zod").ZodTypeAny, {
114
+ name: string;
115
+ effects: {
116
+ effect: "give_points" | "give_reward" | "deduct_unit" | "assign_member_custom_attribute" | "remove_member_custom_attribute";
117
+ walletCode?: string | undefined;
118
+ rewardId?: string | undefined;
119
+ pointsRule?: string | undefined;
120
+ customAttributeKey?: string | undefined;
121
+ customAttributeValueRule?: string | undefined;
122
+ }[];
123
+ description?: string | undefined;
124
+ conditions?: {
125
+ attribute: string;
126
+ operator: string;
127
+ data?: Record<string, unknown> | undefined;
128
+ }[] | undefined;
129
+ target?: "self" | "referrer" | undefined;
130
+ }, {
131
+ name: string;
132
+ effects: {
133
+ effect: "give_points" | "give_reward" | "deduct_unit" | "assign_member_custom_attribute" | "remove_member_custom_attribute";
134
+ walletCode?: string | undefined;
135
+ rewardId?: string | undefined;
136
+ pointsRule?: string | undefined;
137
+ customAttributeKey?: string | undefined;
138
+ customAttributeValueRule?: string | undefined;
139
+ }[];
140
+ description?: string | undefined;
141
+ conditions?: {
142
+ attribute: string;
143
+ operator: string;
144
+ data?: Record<string, unknown> | undefined;
145
+ }[] | undefined;
146
+ target?: "self" | "referrer" | undefined;
147
+ }>, "many">;
148
+ visibility: import("zod").ZodOptional<import("zod").ZodObject<{
149
+ target: import("zod").ZodEnum<["all", "tier", "segment"]>;
150
+ tiers: import("zod").ZodOptional<import("zod").ZodArray<import("zod").ZodString, "many">>;
151
+ segments: import("zod").ZodOptional<import("zod").ZodArray<import("zod").ZodString, "many">>;
152
+ }, "strip", import("zod").ZodTypeAny, {
153
+ target: "all" | "segment" | "tier";
154
+ tiers?: string[] | undefined;
155
+ segments?: string[] | undefined;
156
+ }, {
157
+ target: "all" | "segment" | "tier";
158
+ tiers?: string[] | undefined;
159
+ segments?: string[] | undefined;
160
+ }>>;
161
+ audience: import("zod").ZodOptional<import("zod").ZodObject<{
162
+ target: import("zod").ZodEnum<["tier", "segment"]>;
163
+ tiers: import("zod").ZodOptional<import("zod").ZodArray<import("zod").ZodString, "many">>;
164
+ segments: import("zod").ZodOptional<import("zod").ZodArray<import("zod").ZodString, "many">>;
165
+ }, "strip", import("zod").ZodTypeAny, {
166
+ target: "segment" | "tier";
167
+ tiers?: string[] | undefined;
168
+ segments?: string[] | undefined;
169
+ }, {
170
+ target: "segment" | "tier";
171
+ tiers?: string[] | undefined;
172
+ segments?: string[] | undefined;
173
+ }>>;
174
+ limits: import("zod").ZodOptional<import("zod").ZodObject<{
175
+ points: import("zod").ZodOptional<import("zod").ZodObject<{
176
+ value: import("zod").ZodNumber;
177
+ interval: import("zod").ZodOptional<import("zod").ZodObject<{
178
+ type: import("zod").ZodEnum<["calendarDays", "calendarWeeks", "calendarMonths", "calendarYears"]>;
179
+ value: import("zod").ZodOptional<import("zod").ZodNumber>;
180
+ }, "strip", import("zod").ZodTypeAny, {
181
+ type: "calendarDays" | "calendarWeeks" | "calendarMonths" | "calendarYears";
182
+ value?: number | undefined;
183
+ }, {
184
+ type: "calendarDays" | "calendarWeeks" | "calendarMonths" | "calendarYears";
185
+ value?: number | undefined;
186
+ }>>;
187
+ }, "strip", import("zod").ZodTypeAny, {
188
+ value: number;
189
+ interval?: {
190
+ type: "calendarDays" | "calendarWeeks" | "calendarMonths" | "calendarYears";
191
+ value?: number | undefined;
192
+ } | undefined;
193
+ }, {
194
+ value: number;
195
+ interval?: {
196
+ type: "calendarDays" | "calendarWeeks" | "calendarMonths" | "calendarYears";
197
+ value?: number | undefined;
198
+ } | undefined;
199
+ }>>;
200
+ pointsPerMember: import("zod").ZodOptional<import("zod").ZodObject<{
201
+ value: import("zod").ZodNumber;
202
+ interval: import("zod").ZodOptional<import("zod").ZodObject<{
203
+ type: import("zod").ZodEnum<["calendarDays", "calendarWeeks", "calendarMonths", "calendarYears"]>;
204
+ value: import("zod").ZodOptional<import("zod").ZodNumber>;
205
+ }, "strip", import("zod").ZodTypeAny, {
206
+ type: "calendarDays" | "calendarWeeks" | "calendarMonths" | "calendarYears";
207
+ value?: number | undefined;
208
+ }, {
209
+ type: "calendarDays" | "calendarWeeks" | "calendarMonths" | "calendarYears";
210
+ value?: number | undefined;
211
+ }>>;
212
+ }, "strip", import("zod").ZodTypeAny, {
213
+ value: number;
214
+ interval?: {
215
+ type: "calendarDays" | "calendarWeeks" | "calendarMonths" | "calendarYears";
216
+ value?: number | undefined;
217
+ } | undefined;
218
+ }, {
219
+ value: number;
220
+ interval?: {
221
+ type: "calendarDays" | "calendarWeeks" | "calendarMonths" | "calendarYears";
222
+ value?: number | undefined;
223
+ } | undefined;
224
+ }>>;
225
+ executionsPerMember: import("zod").ZodOptional<import("zod").ZodObject<{
226
+ value: import("zod").ZodNumber;
227
+ interval: import("zod").ZodOptional<import("zod").ZodObject<{
228
+ type: import("zod").ZodEnum<["calendarDays", "calendarWeeks", "calendarMonths", "calendarYears"]>;
229
+ value: import("zod").ZodOptional<import("zod").ZodNumber>;
230
+ }, "strip", import("zod").ZodTypeAny, {
231
+ type: "calendarDays" | "calendarWeeks" | "calendarMonths" | "calendarYears";
232
+ value?: number | undefined;
233
+ }, {
234
+ type: "calendarDays" | "calendarWeeks" | "calendarMonths" | "calendarYears";
235
+ value?: number | undefined;
236
+ }>>;
237
+ }, "strip", import("zod").ZodTypeAny, {
238
+ value: number;
239
+ interval?: {
240
+ type: "calendarDays" | "calendarWeeks" | "calendarMonths" | "calendarYears";
241
+ value?: number | undefined;
242
+ } | undefined;
243
+ }, {
244
+ value: number;
245
+ interval?: {
246
+ type: "calendarDays" | "calendarWeeks" | "calendarMonths" | "calendarYears";
247
+ value?: number | undefined;
248
+ } | undefined;
249
+ }>>;
250
+ }, "strip", import("zod").ZodTypeAny, {
251
+ points?: {
252
+ value: number;
253
+ interval?: {
254
+ type: "calendarDays" | "calendarWeeks" | "calendarMonths" | "calendarYears";
255
+ value?: number | undefined;
256
+ } | undefined;
257
+ } | undefined;
258
+ pointsPerMember?: {
259
+ value: number;
260
+ interval?: {
261
+ type: "calendarDays" | "calendarWeeks" | "calendarMonths" | "calendarYears";
262
+ value?: number | undefined;
263
+ } | undefined;
264
+ } | undefined;
265
+ executionsPerMember?: {
266
+ value: number;
267
+ interval?: {
268
+ type: "calendarDays" | "calendarWeeks" | "calendarMonths" | "calendarYears";
269
+ value?: number | undefined;
270
+ } | undefined;
271
+ } | undefined;
272
+ }, {
273
+ points?: {
274
+ value: number;
275
+ interval?: {
276
+ type: "calendarDays" | "calendarWeeks" | "calendarMonths" | "calendarYears";
277
+ value?: number | undefined;
278
+ } | undefined;
279
+ } | undefined;
280
+ pointsPerMember?: {
281
+ value: number;
282
+ interval?: {
283
+ type: "calendarDays" | "calendarWeeks" | "calendarMonths" | "calendarYears";
284
+ value?: number | undefined;
285
+ } | undefined;
286
+ } | undefined;
287
+ executionsPerMember?: {
288
+ value: number;
289
+ interval?: {
290
+ type: "calendarDays" | "calendarWeeks" | "calendarMonths" | "calendarYears";
291
+ value?: number | undefined;
292
+ } | undefined;
293
+ } | undefined;
294
+ }>>;
295
+ active: import("zod").ZodOptional<import("zod").ZodBoolean>;
296
+ displayOrder: import("zod").ZodOptional<import("zod").ZodNumber>;
297
+ labels: import("zod").ZodOptional<import("zod").ZodArray<import("zod").ZodObject<{
298
+ key: import("zod").ZodString;
299
+ value: import("zod").ZodString;
300
+ }, "strip", import("zod").ZodTypeAny, {
301
+ value: string;
302
+ key: string;
303
+ }, {
304
+ value: string;
305
+ key: string;
306
+ }>, "many">>;
307
+ event: import("zod").ZodOptional<import("zod").ZodString>;
308
+ achievementId: import("zod").ZodOptional<import("zod").ZodString>;
309
+ };
310
+ readonly handler: typeof campaignCreate;
311
+ }, {
312
+ readonly name: "ol_campaign_get";
313
+ readonly title: "Get Campaign Details";
314
+ readonly description: "Get full campaign configuration including all rules, conditions, effects, and targeting.";
315
+ readonly readOnly: true;
316
+ readonly inputSchema: {
317
+ storeCode: import("zod").ZodOptional<import("zod").ZodString>;
318
+ campaignId: import("zod").ZodString;
319
+ };
320
+ readonly handler: typeof campaignGet;
321
+ }, {
322
+ readonly name: "ol_campaign_update";
323
+ readonly title: "Update Campaign";
324
+ 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.";
325
+ readonly readOnly: false;
326
+ readonly inputSchema: {
327
+ storeCode: import("zod").ZodOptional<import("zod").ZodString>;
328
+ campaignId: import("zod").ZodString;
329
+ type: import("zod").ZodEnum<["direct", "referral"]>;
330
+ trigger: import("zod").ZodEnum<["transaction", "custom_event", "time", "achievement", "custom_event_unique_code", "leaderboard", "internal_event", "return_transaction", "challenge", "fortune_wheel"]>;
331
+ translations: import("zod").ZodObject<{
332
+ en: import("zod").ZodObject<{
333
+ name: import("zod").ZodString;
334
+ description: import("zod").ZodOptional<import("zod").ZodString>;
335
+ }, "strip", import("zod").ZodTypeAny, {
336
+ name: string;
337
+ description?: string | undefined;
338
+ }, {
339
+ name: string;
340
+ description?: string | undefined;
341
+ }>;
342
+ }, "passthrough", import("zod").ZodTypeAny, import("zod").objectOutputType<{
343
+ en: import("zod").ZodObject<{
344
+ name: import("zod").ZodString;
345
+ description: import("zod").ZodOptional<import("zod").ZodString>;
346
+ }, "strip", import("zod").ZodTypeAny, {
347
+ name: string;
348
+ description?: string | undefined;
349
+ }, {
350
+ name: string;
351
+ description?: string | undefined;
352
+ }>;
353
+ }, import("zod").ZodTypeAny, "passthrough">, import("zod").objectInputType<{
354
+ en: import("zod").ZodObject<{
355
+ name: import("zod").ZodString;
356
+ description: import("zod").ZodOptional<import("zod").ZodString>;
357
+ }, "strip", import("zod").ZodTypeAny, {
358
+ name: string;
359
+ description?: string | undefined;
360
+ }, {
361
+ name: string;
362
+ description?: string | undefined;
363
+ }>;
364
+ }, import("zod").ZodTypeAny, "passthrough">>;
365
+ activity: import("zod").ZodObject<{
366
+ startsAt: import("zod").ZodString;
367
+ endsAt: import("zod").ZodOptional<import("zod").ZodString>;
368
+ }, "strip", import("zod").ZodTypeAny, {
369
+ startsAt: string;
370
+ endsAt?: string | undefined;
371
+ }, {
372
+ startsAt: string;
373
+ endsAt?: string | undefined;
374
+ }>;
375
+ rules: import("zod").ZodArray<import("zod").ZodObject<{
376
+ name: import("zod").ZodString;
377
+ description: import("zod").ZodOptional<import("zod").ZodString>;
378
+ target: import("zod").ZodOptional<import("zod").ZodEnum<["self", "referrer"]>>;
379
+ effects: import("zod").ZodArray<import("zod").ZodObject<{
380
+ effect: import("zod").ZodString;
381
+ pointsRule: import("zod").ZodOptional<import("zod").ZodString>;
382
+ walletCode: import("zod").ZodOptional<import("zod").ZodString>;
383
+ rewardId: import("zod").ZodOptional<import("zod").ZodString>;
384
+ }, "strip", import("zod").ZodTypeAny, {
385
+ effect: string;
386
+ walletCode?: string | undefined;
387
+ rewardId?: string | undefined;
388
+ pointsRule?: string | undefined;
389
+ }, {
390
+ effect: string;
391
+ walletCode?: string | undefined;
392
+ rewardId?: string | undefined;
393
+ pointsRule?: string | undefined;
394
+ }>, "many">;
395
+ conditions: import("zod").ZodOptional<import("zod").ZodArray<import("zod").ZodObject<{
396
+ operator: import("zod").ZodString;
397
+ attribute: import("zod").ZodString;
398
+ data: import("zod").ZodOptional<import("zod").ZodRecord<import("zod").ZodString, import("zod").ZodUnknown>>;
399
+ }, "strip", import("zod").ZodTypeAny, {
400
+ attribute: string;
401
+ operator: string;
402
+ data?: Record<string, unknown> | undefined;
403
+ }, {
404
+ attribute: string;
405
+ operator: string;
406
+ data?: Record<string, unknown> | undefined;
407
+ }>, "many">>;
408
+ }, "strip", import("zod").ZodTypeAny, {
409
+ name: string;
410
+ effects: {
411
+ effect: string;
412
+ walletCode?: string | undefined;
413
+ rewardId?: string | undefined;
414
+ pointsRule?: string | undefined;
415
+ }[];
416
+ description?: string | undefined;
417
+ conditions?: {
418
+ attribute: string;
419
+ operator: string;
420
+ data?: Record<string, unknown> | undefined;
421
+ }[] | undefined;
422
+ target?: "self" | "referrer" | undefined;
423
+ }, {
424
+ name: string;
425
+ effects: {
426
+ effect: string;
427
+ walletCode?: string | undefined;
428
+ rewardId?: string | undefined;
429
+ pointsRule?: string | undefined;
430
+ }[];
431
+ description?: string | undefined;
432
+ conditions?: {
433
+ attribute: string;
434
+ operator: string;
435
+ data?: Record<string, unknown> | undefined;
436
+ }[] | undefined;
437
+ target?: "self" | "referrer" | undefined;
438
+ }>, "many">;
439
+ visibility: import("zod").ZodOptional<import("zod").ZodObject<{
440
+ target: import("zod").ZodEnum<["all", "tier", "segment"]>;
441
+ tiers: import("zod").ZodOptional<import("zod").ZodArray<import("zod").ZodString, "many">>;
442
+ segments: import("zod").ZodOptional<import("zod").ZodArray<import("zod").ZodString, "many">>;
443
+ }, "strip", import("zod").ZodTypeAny, {
444
+ target: "all" | "segment" | "tier";
445
+ tiers?: string[] | undefined;
446
+ segments?: string[] | undefined;
447
+ }, {
448
+ target: "all" | "segment" | "tier";
449
+ tiers?: string[] | undefined;
450
+ segments?: string[] | undefined;
451
+ }>>;
452
+ audience: import("zod").ZodOptional<import("zod").ZodObject<{
453
+ target: import("zod").ZodEnum<["tier", "segment"]>;
454
+ tiers: import("zod").ZodOptional<import("zod").ZodArray<import("zod").ZodString, "many">>;
455
+ segments: import("zod").ZodOptional<import("zod").ZodArray<import("zod").ZodString, "many">>;
456
+ }, "strip", import("zod").ZodTypeAny, {
457
+ target: "segment" | "tier";
458
+ tiers?: string[] | undefined;
459
+ segments?: string[] | undefined;
460
+ }, {
461
+ target: "segment" | "tier";
462
+ tiers?: string[] | undefined;
463
+ segments?: string[] | undefined;
464
+ }>>;
465
+ limits: import("zod").ZodOptional<import("zod").ZodObject<{
466
+ points: import("zod").ZodOptional<import("zod").ZodObject<{
467
+ value: import("zod").ZodNumber;
468
+ interval: import("zod").ZodOptional<import("zod").ZodRecord<import("zod").ZodString, import("zod").ZodUnknown>>;
469
+ }, "strip", import("zod").ZodTypeAny, {
470
+ value: number;
471
+ interval?: Record<string, unknown> | undefined;
472
+ }, {
473
+ value: number;
474
+ interval?: Record<string, unknown> | undefined;
475
+ }>>;
476
+ pointsPerMember: import("zod").ZodOptional<import("zod").ZodObject<{
477
+ value: import("zod").ZodNumber;
478
+ interval: import("zod").ZodOptional<import("zod").ZodRecord<import("zod").ZodString, import("zod").ZodUnknown>>;
479
+ }, "strip", import("zod").ZodTypeAny, {
480
+ value: number;
481
+ interval?: Record<string, unknown> | undefined;
482
+ }, {
483
+ value: number;
484
+ interval?: Record<string, unknown> | undefined;
485
+ }>>;
486
+ executionsPerMember: import("zod").ZodOptional<import("zod").ZodObject<{
487
+ value: import("zod").ZodNumber;
488
+ interval: import("zod").ZodOptional<import("zod").ZodRecord<import("zod").ZodString, import("zod").ZodUnknown>>;
489
+ }, "strip", import("zod").ZodTypeAny, {
490
+ value: number;
491
+ interval?: Record<string, unknown> | undefined;
492
+ }, {
493
+ value: number;
494
+ interval?: Record<string, unknown> | undefined;
495
+ }>>;
496
+ }, "strip", import("zod").ZodTypeAny, {
497
+ points?: {
498
+ value: number;
499
+ interval?: Record<string, unknown> | undefined;
500
+ } | undefined;
501
+ pointsPerMember?: {
502
+ value: number;
503
+ interval?: Record<string, unknown> | undefined;
504
+ } | undefined;
505
+ executionsPerMember?: {
506
+ value: number;
507
+ interval?: Record<string, unknown> | undefined;
508
+ } | undefined;
509
+ }, {
510
+ points?: {
511
+ value: number;
512
+ interval?: Record<string, unknown> | undefined;
513
+ } | undefined;
514
+ pointsPerMember?: {
515
+ value: number;
516
+ interval?: Record<string, unknown> | undefined;
517
+ } | undefined;
518
+ executionsPerMember?: {
519
+ value: number;
520
+ interval?: Record<string, unknown> | undefined;
521
+ } | undefined;
522
+ }>>;
523
+ active: import("zod").ZodOptional<import("zod").ZodBoolean>;
524
+ displayOrder: import("zod").ZodOptional<import("zod").ZodNumber>;
525
+ labels: import("zod").ZodOptional<import("zod").ZodArray<import("zod").ZodObject<{
526
+ key: import("zod").ZodString;
527
+ value: import("zod").ZodString;
528
+ }, "strip", import("zod").ZodTypeAny, {
529
+ value: string;
530
+ key: string;
531
+ }, {
532
+ value: string;
533
+ key: string;
534
+ }>, "many">>;
535
+ event: import("zod").ZodOptional<import("zod").ZodString>;
536
+ };
537
+ readonly handler: typeof campaignUpdate;
538
+ }, {
539
+ readonly name: "ol_campaign_patch";
540
+ readonly title: "Patch Campaign";
541
+ readonly description: "Partial update of campaign - only active status and displayOrder can be patched. For full updates, use campaign_update.";
542
+ readonly readOnly: false;
543
+ readonly inputSchema: {
544
+ storeCode: import("zod").ZodOptional<import("zod").ZodString>;
545
+ campaignId: import("zod").ZodString;
546
+ active: import("zod").ZodOptional<import("zod").ZodBoolean>;
547
+ displayOrder: import("zod").ZodOptional<import("zod").ZodNumber>;
548
+ };
549
+ readonly handler: typeof campaignPatch;
550
+ }, {
551
+ readonly name: "ol_campaign_delete";
552
+ readonly title: "Delete Campaign (Permanent)";
553
+ readonly description: "Permanently delete a campaign. This cannot be undone. Consider deactivating instead if you may need the campaign later.";
554
+ readonly readOnly: false;
555
+ readonly destructive: true;
556
+ readonly inputSchema: {
557
+ storeCode: import("zod").ZodOptional<import("zod").ZodString>;
558
+ campaignId: import("zod").ZodString;
559
+ };
560
+ readonly handler: typeof campaignDelete;
561
+ }, {
562
+ readonly name: "ol_campaign_simulate";
563
+ readonly title: "Simulate Campaign Effects";
564
+ 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.";
565
+ readonly readOnly: true;
566
+ readonly inputSchema: {
567
+ storeCode: import("zod").ZodOptional<import("zod").ZodString>;
568
+ trigger: import("zod").ZodEnum<["transaction", "custom_event", "time", "achievement", "custom_event_unique_code", "leaderboard", "internal_event", "return_transaction", "challenge", "fortune_wheel"]>;
569
+ transaction: import("zod").ZodOptional<import("zod").ZodObject<{
570
+ grossValue: import("zod").ZodOptional<import("zod").ZodNumber>;
571
+ documentNumber: import("zod").ZodOptional<import("zod").ZodString>;
572
+ purchasedAt: import("zod").ZodOptional<import("zod").ZodString>;
573
+ documentType: import("zod").ZodOptional<import("zod").ZodEnum<["sell", "return"]>>;
574
+ purchasePlace: import("zod").ZodOptional<import("zod").ZodString>;
575
+ items: import("zod").ZodOptional<import("zod").ZodArray<import("zod").ZodObject<{
576
+ sku: import("zod").ZodString;
577
+ name: import("zod").ZodString;
578
+ qty: import("zod").ZodOptional<import("zod").ZodUnion<[import("zod").ZodString, import("zod").ZodNumber]>>;
579
+ grossValue: import("zod").ZodUnion<[import("zod").ZodString, import("zod").ZodNumber]>;
580
+ category: import("zod").ZodOptional<import("zod").ZodString>;
581
+ maker: import("zod").ZodOptional<import("zod").ZodString>;
582
+ labels: import("zod").ZodOptional<import("zod").ZodArray<import("zod").ZodObject<{
583
+ key: import("zod").ZodString;
584
+ value: import("zod").ZodString;
585
+ }, "strip", import("zod").ZodTypeAny, {
586
+ value: string;
587
+ key: string;
588
+ }, {
589
+ value: string;
590
+ key: string;
591
+ }>, "many">>;
592
+ }, "strip", import("zod").ZodTypeAny, {
593
+ name: string;
594
+ sku: string;
595
+ grossValue: string | number;
596
+ labels?: {
597
+ value: string;
598
+ key: string;
599
+ }[] | undefined;
600
+ category?: string | undefined;
601
+ maker?: string | undefined;
602
+ qty?: string | number | undefined;
603
+ }, {
604
+ name: string;
605
+ sku: string;
606
+ grossValue: string | number;
607
+ labels?: {
608
+ value: string;
609
+ key: string;
610
+ }[] | undefined;
611
+ category?: string | undefined;
612
+ maker?: string | undefined;
613
+ qty?: string | number | undefined;
614
+ }>, "many">>;
615
+ labels: import("zod").ZodOptional<import("zod").ZodArray<import("zod").ZodObject<{
616
+ key: import("zod").ZodString;
617
+ value: import("zod").ZodString;
618
+ }, "strip", import("zod").ZodTypeAny, {
619
+ value: string;
620
+ key: string;
621
+ }, {
622
+ value: string;
623
+ key: string;
624
+ }>, "many">>;
625
+ }, "strip", import("zod").ZodTypeAny, {
626
+ items?: {
627
+ name: string;
628
+ sku: string;
629
+ grossValue: string | number;
630
+ labels?: {
631
+ value: string;
632
+ key: string;
633
+ }[] | undefined;
634
+ category?: string | undefined;
635
+ maker?: string | undefined;
636
+ qty?: string | number | undefined;
637
+ }[] | undefined;
638
+ documentNumber?: string | undefined;
639
+ purchasedAt?: string | undefined;
640
+ documentType?: "sell" | "return" | undefined;
641
+ purchasePlace?: string | undefined;
642
+ labels?: {
643
+ value: string;
644
+ key: string;
645
+ }[] | undefined;
646
+ grossValue?: number | undefined;
647
+ }, {
648
+ items?: {
649
+ name: string;
650
+ sku: string;
651
+ grossValue: string | number;
652
+ labels?: {
653
+ value: string;
654
+ key: string;
655
+ }[] | undefined;
656
+ category?: string | undefined;
657
+ maker?: string | undefined;
658
+ qty?: string | number | undefined;
659
+ }[] | undefined;
660
+ documentNumber?: string | undefined;
661
+ purchasedAt?: string | undefined;
662
+ documentType?: "sell" | "return" | undefined;
663
+ purchasePlace?: string | undefined;
664
+ labels?: {
665
+ value: string;
666
+ key: string;
667
+ }[] | undefined;
668
+ grossValue?: number | undefined;
669
+ }>>;
670
+ customEvent: import("zod").ZodOptional<import("zod").ZodObject<{
671
+ eventCode: import("zod").ZodString;
672
+ attributes: import("zod").ZodOptional<import("zod").ZodRecord<import("zod").ZodString, import("zod").ZodUnknown>>;
673
+ }, "strip", import("zod").ZodTypeAny, {
674
+ eventCode: string;
675
+ attributes?: Record<string, unknown> | undefined;
676
+ }, {
677
+ eventCode: string;
678
+ attributes?: Record<string, unknown> | undefined;
679
+ }>>;
680
+ customer: import("zod").ZodObject<{
681
+ customerId: import("zod").ZodOptional<import("zod").ZodString>;
682
+ id: import("zod").ZodOptional<import("zod").ZodString>;
683
+ email: import("zod").ZodOptional<import("zod").ZodString>;
684
+ loyaltyCardNumber: import("zod").ZodOptional<import("zod").ZodString>;
685
+ phone: import("zod").ZodOptional<import("zod").ZodString>;
686
+ firstName: import("zod").ZodOptional<import("zod").ZodString>;
687
+ lastName: import("zod").ZodOptional<import("zod").ZodString>;
688
+ }, "strip", import("zod").ZodTypeAny, {
689
+ email?: string | undefined;
690
+ phone?: string | undefined;
691
+ loyaltyCardNumber?: string | undefined;
692
+ firstName?: string | undefined;
693
+ lastName?: string | undefined;
694
+ id?: string | undefined;
695
+ customerId?: string | undefined;
696
+ }, {
697
+ email?: string | undefined;
698
+ phone?: string | undefined;
699
+ loyaltyCardNumber?: string | undefined;
700
+ firstName?: string | undefined;
701
+ lastName?: string | undefined;
702
+ id?: string | undefined;
703
+ customerId?: string | undefined;
704
+ }>;
705
+ referrer: import("zod").ZodOptional<import("zod").ZodObject<{
706
+ id: import("zod").ZodOptional<import("zod").ZodString>;
707
+ email: import("zod").ZodOptional<import("zod").ZodString>;
708
+ loyaltyCardNumber: import("zod").ZodOptional<import("zod").ZodString>;
709
+ }, "strip", import("zod").ZodTypeAny, {
710
+ email?: string | undefined;
711
+ loyaltyCardNumber?: string | undefined;
712
+ id?: string | undefined;
713
+ }, {
714
+ email?: string | undefined;
715
+ loyaltyCardNumber?: string | undefined;
716
+ id?: string | undefined;
717
+ }>>;
718
+ };
719
+ readonly handler: typeof campaignSimulate;
720
+ }, {
721
+ readonly name: "ol_campaign_generate_codes";
722
+ readonly title: "Generate Campaign Codes";
723
+ 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.";
724
+ readonly readOnly: false;
725
+ readonly inputSchema: {
726
+ storeCode: import("zod").ZodOptional<import("zod").ZodString>;
727
+ campaignId: import("zod").ZodString;
728
+ quantity: import("zod").ZodNumber;
729
+ };
730
+ readonly handler: typeof campaignGenerateCodes;
731
+ }, {
732
+ readonly name: "ol_campaign_list_codes";
733
+ readonly title: "List Campaign Codes";
734
+ readonly description: "List redemption codes for a campaign. Filter by status (active/used) or specific code. Returns code details including usage status.";
735
+ readonly readOnly: true;
736
+ readonly inputSchema: {
737
+ storeCode: import("zod").ZodOptional<import("zod").ZodString>;
738
+ campaignId: import("zod").ZodString;
739
+ page: import("zod").ZodOptional<import("zod").ZodNumber>;
740
+ perPage: import("zod").ZodOptional<import("zod").ZodNumber>;
741
+ status: import("zod").ZodOptional<import("zod").ZodString>;
742
+ code: import("zod").ZodOptional<import("zod").ZodString>;
743
+ };
744
+ readonly handler: typeof campaignListCodes;
745
+ }, {
746
+ readonly name: "ol_campaign_get_available";
747
+ readonly title: "Get Available Campaigns for Member";
748
+ 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.";
749
+ readonly readOnly: true;
750
+ readonly inputSchema: {
751
+ storeCode: import("zod").ZodOptional<import("zod").ZodString>;
752
+ memberId: import("zod").ZodString;
753
+ page: import("zod").ZodOptional<import("zod").ZodNumber>;
754
+ perPage: import("zod").ZodOptional<import("zod").ZodNumber>;
755
+ type: import("zod").ZodOptional<import("zod").ZodEnum<["direct", "referral"]>>;
756
+ trigger: import("zod").ZodOptional<import("zod").ZodEnum<["transaction", "custom_event", "time", "achievement", "custom_event_unique_code", "leaderboard", "internal_event", "return_transaction", "challenge", "fortune_wheel"]>>;
757
+ };
758
+ readonly handler: typeof campaignGetAvailable;
759
+ }, {
760
+ readonly name: "ol_campaign_get_visible";
761
+ readonly title: "Get Visible Campaigns for Member";
762
+ 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.";
763
+ readonly readOnly: true;
764
+ readonly inputSchema: {
765
+ storeCode: import("zod").ZodOptional<import("zod").ZodString>;
766
+ memberId: import("zod").ZodString;
767
+ page: import("zod").ZodOptional<import("zod").ZodNumber>;
768
+ perPage: import("zod").ZodOptional<import("zod").ZodNumber>;
769
+ active: import("zod").ZodOptional<import("zod").ZodBoolean>;
770
+ };
771
+ readonly handler: typeof campaignGetVisible;
772
+ }, {
773
+ readonly name: "ol_campaign_get_leaderboard";
774
+ readonly title: "Get Campaign Leaderboard";
775
+ 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.";
776
+ readonly readOnly: true;
777
+ readonly inputSchema: {
778
+ storeCode: import("zod").ZodOptional<import("zod").ZodString>;
779
+ campaignId: import("zod").ZodString;
780
+ type: import("zod").ZodOptional<import("zod").ZodString>;
781
+ };
782
+ readonly handler: typeof campaignGetLeaderboard;
783
+ }];