@open-loyalty/mcp-server 1.0.0
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/LICENSE +21 -0
- package/README.md +654 -0
- package/dist/client/http.d.ts +8 -0
- package/dist/client/http.js +69 -0
- package/dist/config.d.ts +17 -0
- package/dist/config.js +40 -0
- package/dist/index.d.ts +2 -0
- package/dist/index.js +20 -0
- package/dist/server.d.ts +4 -0
- package/dist/server.js +334 -0
- package/dist/tools/achievement.d.ts +983 -0
- package/dist/tools/achievement.js +311 -0
- package/dist/tools/admin.d.ts +153 -0
- package/dist/tools/admin.js +193 -0
- package/dist/tools/analytics.d.ts +162 -0
- package/dist/tools/analytics.js +245 -0
- package/dist/tools/apikey.d.ts +72 -0
- package/dist/tools/apikey.js +78 -0
- package/dist/tools/audit.d.ts +107 -0
- package/dist/tools/audit.js +90 -0
- package/dist/tools/badge.d.ts +135 -0
- package/dist/tools/badge.js +165 -0
- package/dist/tools/campaign.d.ts +1775 -0
- package/dist/tools/campaign.js +724 -0
- package/dist/tools/export.d.ts +110 -0
- package/dist/tools/export.js +147 -0
- package/dist/tools/import.d.ts +110 -0
- package/dist/tools/import.js +126 -0
- package/dist/tools/index.d.ts +22 -0
- package/dist/tools/index.js +527 -0
- package/dist/tools/member.d.ts +345 -0
- package/dist/tools/member.js +358 -0
- package/dist/tools/member.test.d.ts +1 -0
- package/dist/tools/member.test.js +213 -0
- package/dist/tools/points.d.ts +188 -0
- package/dist/tools/points.js +306 -0
- package/dist/tools/points.test.d.ts +1 -0
- package/dist/tools/points.test.js +292 -0
- package/dist/tools/reward.d.ts +261 -0
- package/dist/tools/reward.js +371 -0
- package/dist/tools/reward.test.d.ts +1 -0
- package/dist/tools/reward.test.js +240 -0
- package/dist/tools/role.d.ts +161 -0
- package/dist/tools/role.js +160 -0
- package/dist/tools/segment.d.ts +797 -0
- package/dist/tools/segment.js +299 -0
- package/dist/tools/store.d.ts +101 -0
- package/dist/tools/store.js +117 -0
- package/dist/tools/tierset.d.ts +288 -0
- package/dist/tools/tierset.js +244 -0
- package/dist/tools/transaction.d.ts +357 -0
- package/dist/tools/transaction.js +242 -0
- package/dist/tools/transaction.test.d.ts +1 -0
- package/dist/tools/transaction.test.js +235 -0
- package/dist/tools/wallet-type.d.ts +32 -0
- package/dist/tools/wallet-type.js +58 -0
- package/dist/tools/webhook.d.ts +179 -0
- package/dist/tools/webhook.js +171 -0
- package/dist/types/schemas/achievement.d.ts +1116 -0
- package/dist/types/schemas/achievement.js +172 -0
- package/dist/types/schemas/admin.d.ts +263 -0
- package/dist/types/schemas/admin.js +99 -0
- package/dist/types/schemas/analytics.d.ts +542 -0
- package/dist/types/schemas/analytics.js +130 -0
- package/dist/types/schemas/badge.d.ts +131 -0
- package/dist/types/schemas/badge.js +48 -0
- package/dist/types/schemas/campaign.d.ts +2005 -0
- package/dist/types/schemas/campaign.js +189 -0
- package/dist/types/schemas/common.d.ts +52 -0
- package/dist/types/schemas/common.js +26 -0
- package/dist/types/schemas/export.d.ts +127 -0
- package/dist/types/schemas/export.js +43 -0
- package/dist/types/schemas/import.d.ts +344 -0
- package/dist/types/schemas/import.js +68 -0
- package/dist/types/schemas/member.d.ts +443 -0
- package/dist/types/schemas/member.js +92 -0
- package/dist/types/schemas/points.d.ts +188 -0
- package/dist/types/schemas/points.js +54 -0
- package/dist/types/schemas/reward.d.ts +278 -0
- package/dist/types/schemas/reward.js +69 -0
- package/dist/types/schemas/role.d.ts +260 -0
- package/dist/types/schemas/role.js +75 -0
- package/dist/types/schemas/segment.d.ts +592 -0
- package/dist/types/schemas/segment.js +114 -0
- package/dist/types/schemas/tierset.d.ts +552 -0
- package/dist/types/schemas/tierset.js +87 -0
- package/dist/types/schemas/transaction.d.ts +1022 -0
- package/dist/types/schemas/transaction.js +63 -0
- package/dist/types/schemas/wallet-type.d.ts +99 -0
- package/dist/types/schemas/wallet-type.js +17 -0
- package/dist/types/schemas/webhook.d.ts +195 -0
- package/dist/types/schemas/webhook.js +39 -0
- package/dist/utils/cursor.d.ts +84 -0
- package/dist/utils/cursor.js +117 -0
- package/dist/utils/errors.d.ts +12 -0
- package/dist/utils/errors.js +69 -0
- package/dist/utils/pagination.d.ts +39 -0
- package/dist/utils/pagination.js +77 -0
- package/package.json +65 -0
|
@@ -0,0 +1,527 @@
|
|
|
1
|
+
import { walletTypeToolDefinitions } from "./wallet-type.js";
|
|
2
|
+
import { tiersetToolDefinitions } from "./tierset.js";
|
|
3
|
+
import { memberToolDefinitions } from "./member.js";
|
|
4
|
+
import { pointsToolDefinitions } from "./points.js";
|
|
5
|
+
import { rewardToolDefinitions } from "./reward.js";
|
|
6
|
+
import { transactionToolDefinitions } from "./transaction.js";
|
|
7
|
+
// Phase 2 tools
|
|
8
|
+
import { campaignToolDefinitions } from "./campaign.js";
|
|
9
|
+
import { segmentToolDefinitions } from "./segment.js";
|
|
10
|
+
import { achievementToolDefinitions } from "./achievement.js";
|
|
11
|
+
import { badgeToolDefinitions } from "./badge.js";
|
|
12
|
+
// Phase 3 tools
|
|
13
|
+
import { analyticsToolDefinitions } from "./analytics.js";
|
|
14
|
+
import { adminToolDefinitions } from "./admin.js";
|
|
15
|
+
import { roleToolDefinitions } from "./role.js";
|
|
16
|
+
import { apiKeyToolDefinitions } from "./apikey.js";
|
|
17
|
+
import { auditToolDefinitions } from "./audit.js";
|
|
18
|
+
import { storeToolDefinitions } from "./store.js";
|
|
19
|
+
// Phase 4 tools
|
|
20
|
+
import { webhookToolDefinitions } from "./webhook.js";
|
|
21
|
+
import { importToolDefinitions } from "./import.js";
|
|
22
|
+
import { exportToolDefinitions } from "./export.js";
|
|
23
|
+
// User-friendly titles and behavior hints for each tool
|
|
24
|
+
export const toolMetadata = {
|
|
25
|
+
// Wallet Types - read-only lookups
|
|
26
|
+
openloyalty_wallet_type_list: {
|
|
27
|
+
title: "List Point Currencies",
|
|
28
|
+
annotations: { readOnlyHint: true, openWorldHint: true }
|
|
29
|
+
},
|
|
30
|
+
openloyalty_wallet_type_get: {
|
|
31
|
+
title: "Get Point Currency Details",
|
|
32
|
+
annotations: { readOnlyHint: true, openWorldHint: true }
|
|
33
|
+
},
|
|
34
|
+
// Tier Sets
|
|
35
|
+
openloyalty_tierset_list: {
|
|
36
|
+
title: "List Loyalty Programs",
|
|
37
|
+
annotations: { readOnlyHint: true, openWorldHint: true }
|
|
38
|
+
},
|
|
39
|
+
openloyalty_tierset_create: {
|
|
40
|
+
title: "Create Loyalty Program",
|
|
41
|
+
annotations: { readOnlyHint: false, openWorldHint: true }
|
|
42
|
+
},
|
|
43
|
+
openloyalty_tierset_get: {
|
|
44
|
+
title: "Get Loyalty Program Details",
|
|
45
|
+
annotations: { readOnlyHint: true, openWorldHint: true }
|
|
46
|
+
},
|
|
47
|
+
openloyalty_tierset_update: {
|
|
48
|
+
title: "Update Loyalty Program",
|
|
49
|
+
annotations: { readOnlyHint: false, openWorldHint: true }
|
|
50
|
+
},
|
|
51
|
+
openloyalty_tierset_update_tiers: {
|
|
52
|
+
title: "Configure Tier Thresholds",
|
|
53
|
+
annotations: { readOnlyHint: false, openWorldHint: true }
|
|
54
|
+
},
|
|
55
|
+
openloyalty_tierset_get_tiers: {
|
|
56
|
+
title: "Get Tier Configuration",
|
|
57
|
+
annotations: { readOnlyHint: true, openWorldHint: true }
|
|
58
|
+
},
|
|
59
|
+
// Members
|
|
60
|
+
openloyalty_member_create: {
|
|
61
|
+
title: "Register New Member",
|
|
62
|
+
annotations: { readOnlyHint: false, openWorldHint: true }
|
|
63
|
+
},
|
|
64
|
+
openloyalty_member_get: {
|
|
65
|
+
title: "Get Member Profile",
|
|
66
|
+
annotations: { readOnlyHint: true, openWorldHint: true }
|
|
67
|
+
},
|
|
68
|
+
openloyalty_member_list: {
|
|
69
|
+
title: "Search Members",
|
|
70
|
+
annotations: { readOnlyHint: true, openWorldHint: true }
|
|
71
|
+
},
|
|
72
|
+
openloyalty_member_update: {
|
|
73
|
+
title: "Update Member Profile",
|
|
74
|
+
annotations: { readOnlyHint: false, openWorldHint: true }
|
|
75
|
+
},
|
|
76
|
+
openloyalty_member_activate: {
|
|
77
|
+
title: "Activate Member Account",
|
|
78
|
+
annotations: { readOnlyHint: false, openWorldHint: true }
|
|
79
|
+
},
|
|
80
|
+
openloyalty_member_deactivate: {
|
|
81
|
+
title: "Deactivate Member Account",
|
|
82
|
+
annotations: { readOnlyHint: false, openWorldHint: true }
|
|
83
|
+
},
|
|
84
|
+
openloyalty_member_delete: {
|
|
85
|
+
title: "Delete Member (Permanent)",
|
|
86
|
+
annotations: { readOnlyHint: false, destructiveHint: true, openWorldHint: true }
|
|
87
|
+
},
|
|
88
|
+
openloyalty_member_get_tier_progress: {
|
|
89
|
+
title: "Check Tier Progress",
|
|
90
|
+
annotations: { readOnlyHint: true, openWorldHint: true }
|
|
91
|
+
},
|
|
92
|
+
openloyalty_member_assign_tier: {
|
|
93
|
+
title: "Assign Tier to Member",
|
|
94
|
+
annotations: { readOnlyHint: false, openWorldHint: true }
|
|
95
|
+
},
|
|
96
|
+
openloyalty_member_remove_manual_tier: {
|
|
97
|
+
title: "Remove Manual Tier Assignment",
|
|
98
|
+
annotations: { readOnlyHint: false, openWorldHint: true }
|
|
99
|
+
},
|
|
100
|
+
// Points
|
|
101
|
+
openloyalty_points_add: {
|
|
102
|
+
title: "Add Points to Member",
|
|
103
|
+
annotations: { readOnlyHint: false, openWorldHint: true }
|
|
104
|
+
},
|
|
105
|
+
openloyalty_points_spend: {
|
|
106
|
+
title: "Spend Member Points",
|
|
107
|
+
annotations: { readOnlyHint: false, openWorldHint: true }
|
|
108
|
+
},
|
|
109
|
+
openloyalty_points_transfer: {
|
|
110
|
+
title: "Transfer Points Between Members",
|
|
111
|
+
annotations: { readOnlyHint: false, openWorldHint: true }
|
|
112
|
+
},
|
|
113
|
+
openloyalty_points_get_balance: {
|
|
114
|
+
title: "Check Points Balance",
|
|
115
|
+
annotations: { readOnlyHint: true, openWorldHint: true }
|
|
116
|
+
},
|
|
117
|
+
openloyalty_points_get_history: {
|
|
118
|
+
title: "View Points History",
|
|
119
|
+
annotations: { readOnlyHint: true, openWorldHint: true }
|
|
120
|
+
},
|
|
121
|
+
openloyalty_points_get_histogram: {
|
|
122
|
+
title: "View Points Trends",
|
|
123
|
+
annotations: { readOnlyHint: true, openWorldHint: true }
|
|
124
|
+
},
|
|
125
|
+
// Rewards
|
|
126
|
+
openloyalty_reward_list: {
|
|
127
|
+
title: "Browse Rewards",
|
|
128
|
+
annotations: { readOnlyHint: true, openWorldHint: true }
|
|
129
|
+
},
|
|
130
|
+
openloyalty_reward_create: {
|
|
131
|
+
title: "Create New Reward",
|
|
132
|
+
annotations: { readOnlyHint: false, openWorldHint: true }
|
|
133
|
+
},
|
|
134
|
+
openloyalty_reward_get: {
|
|
135
|
+
title: "Get Reward Details",
|
|
136
|
+
annotations: { readOnlyHint: true, openWorldHint: true }
|
|
137
|
+
},
|
|
138
|
+
openloyalty_reward_update: {
|
|
139
|
+
title: "Update Reward",
|
|
140
|
+
annotations: { readOnlyHint: false, openWorldHint: true }
|
|
141
|
+
},
|
|
142
|
+
openloyalty_reward_activate: {
|
|
143
|
+
title: "Activate Reward",
|
|
144
|
+
annotations: { readOnlyHint: false, openWorldHint: true }
|
|
145
|
+
},
|
|
146
|
+
openloyalty_reward_deactivate: {
|
|
147
|
+
title: "Deactivate Reward",
|
|
148
|
+
annotations: { readOnlyHint: false, openWorldHint: true }
|
|
149
|
+
},
|
|
150
|
+
openloyalty_reward_buy: {
|
|
151
|
+
title: "Redeem Reward for Member",
|
|
152
|
+
annotations: { readOnlyHint: false, openWorldHint: true }
|
|
153
|
+
},
|
|
154
|
+
openloyalty_reward_redeem: {
|
|
155
|
+
title: "Use Coupon Code",
|
|
156
|
+
annotations: { readOnlyHint: false, openWorldHint: true }
|
|
157
|
+
},
|
|
158
|
+
openloyalty_reward_category_list: {
|
|
159
|
+
title: "List Reward Categories",
|
|
160
|
+
annotations: { readOnlyHint: true, openWorldHint: true }
|
|
161
|
+
},
|
|
162
|
+
// Transactions
|
|
163
|
+
openloyalty_transaction_create: {
|
|
164
|
+
title: "Record Purchase",
|
|
165
|
+
annotations: { readOnlyHint: false, openWorldHint: true }
|
|
166
|
+
},
|
|
167
|
+
openloyalty_transaction_get: {
|
|
168
|
+
title: "Get Transaction Details",
|
|
169
|
+
annotations: { readOnlyHint: true, openWorldHint: true }
|
|
170
|
+
},
|
|
171
|
+
openloyalty_transaction_list: {
|
|
172
|
+
title: "Search Transactions",
|
|
173
|
+
annotations: { readOnlyHint: true, openWorldHint: true }
|
|
174
|
+
},
|
|
175
|
+
openloyalty_transaction_assign_member: {
|
|
176
|
+
title: "Link Transaction to Member",
|
|
177
|
+
annotations: { readOnlyHint: false, openWorldHint: true }
|
|
178
|
+
},
|
|
179
|
+
// Phase 2: Campaigns
|
|
180
|
+
openloyalty_campaign_list: {
|
|
181
|
+
title: "List Campaigns",
|
|
182
|
+
annotations: { readOnlyHint: true, openWorldHint: true }
|
|
183
|
+
},
|
|
184
|
+
openloyalty_campaign_create: {
|
|
185
|
+
title: "Create Campaign",
|
|
186
|
+
annotations: { readOnlyHint: false, openWorldHint: true }
|
|
187
|
+
},
|
|
188
|
+
openloyalty_campaign_get: {
|
|
189
|
+
title: "Get Campaign Details",
|
|
190
|
+
annotations: { readOnlyHint: true, openWorldHint: true }
|
|
191
|
+
},
|
|
192
|
+
openloyalty_campaign_update: {
|
|
193
|
+
title: "Update Campaign",
|
|
194
|
+
annotations: { readOnlyHint: false, openWorldHint: true }
|
|
195
|
+
},
|
|
196
|
+
openloyalty_campaign_patch: {
|
|
197
|
+
title: "Patch Campaign",
|
|
198
|
+
annotations: { readOnlyHint: false, openWorldHint: true }
|
|
199
|
+
},
|
|
200
|
+
openloyalty_campaign_delete: {
|
|
201
|
+
title: "Delete Campaign (Permanent)",
|
|
202
|
+
annotations: { readOnlyHint: false, destructiveHint: true, openWorldHint: true }
|
|
203
|
+
},
|
|
204
|
+
openloyalty_campaign_simulate: {
|
|
205
|
+
title: "Simulate Campaign Effects",
|
|
206
|
+
annotations: { readOnlyHint: true, openWorldHint: true }
|
|
207
|
+
},
|
|
208
|
+
openloyalty_campaign_generate_codes: {
|
|
209
|
+
title: "Generate Campaign Codes",
|
|
210
|
+
annotations: { readOnlyHint: false, openWorldHint: true }
|
|
211
|
+
},
|
|
212
|
+
openloyalty_campaign_list_codes: {
|
|
213
|
+
title: "List Campaign Codes",
|
|
214
|
+
annotations: { readOnlyHint: true, openWorldHint: true }
|
|
215
|
+
},
|
|
216
|
+
openloyalty_campaign_get_available: {
|
|
217
|
+
title: "Get Available Campaigns for Member",
|
|
218
|
+
annotations: { readOnlyHint: true, openWorldHint: true }
|
|
219
|
+
},
|
|
220
|
+
openloyalty_campaign_get_visible: {
|
|
221
|
+
title: "Get Visible Campaigns for Member",
|
|
222
|
+
annotations: { readOnlyHint: true, openWorldHint: true }
|
|
223
|
+
},
|
|
224
|
+
openloyalty_campaign_get_leaderboard: {
|
|
225
|
+
title: "Get Campaign Leaderboard",
|
|
226
|
+
annotations: { readOnlyHint: true, openWorldHint: true }
|
|
227
|
+
},
|
|
228
|
+
// Phase 2: Segments
|
|
229
|
+
openloyalty_segment_list: {
|
|
230
|
+
title: "List Segments",
|
|
231
|
+
annotations: { readOnlyHint: true, openWorldHint: true }
|
|
232
|
+
},
|
|
233
|
+
openloyalty_segment_create: {
|
|
234
|
+
title: "Create Segment",
|
|
235
|
+
annotations: { readOnlyHint: false, openWorldHint: true }
|
|
236
|
+
},
|
|
237
|
+
openloyalty_segment_get: {
|
|
238
|
+
title: "Get Segment Details",
|
|
239
|
+
annotations: { readOnlyHint: true, openWorldHint: true }
|
|
240
|
+
},
|
|
241
|
+
openloyalty_segment_update: {
|
|
242
|
+
title: "Update Segment",
|
|
243
|
+
annotations: { readOnlyHint: false, openWorldHint: true }
|
|
244
|
+
},
|
|
245
|
+
openloyalty_segment_delete: {
|
|
246
|
+
title: "Delete Segment (Permanent)",
|
|
247
|
+
annotations: { readOnlyHint: false, destructiveHint: true, openWorldHint: true }
|
|
248
|
+
},
|
|
249
|
+
openloyalty_segment_get_members: {
|
|
250
|
+
title: "Get Segment Members",
|
|
251
|
+
annotations: { readOnlyHint: true, openWorldHint: true }
|
|
252
|
+
},
|
|
253
|
+
openloyalty_segment_activate: {
|
|
254
|
+
title: "Activate Segment",
|
|
255
|
+
annotations: { readOnlyHint: false, openWorldHint: true }
|
|
256
|
+
},
|
|
257
|
+
openloyalty_segment_deactivate: {
|
|
258
|
+
title: "Deactivate Segment",
|
|
259
|
+
annotations: { readOnlyHint: false, openWorldHint: true }
|
|
260
|
+
},
|
|
261
|
+
openloyalty_segment_get_resources: {
|
|
262
|
+
title: "Get Segment Resources",
|
|
263
|
+
annotations: { readOnlyHint: true, openWorldHint: true }
|
|
264
|
+
},
|
|
265
|
+
// Phase 2: Achievements
|
|
266
|
+
openloyalty_achievement_list: {
|
|
267
|
+
title: "List Achievements",
|
|
268
|
+
annotations: { readOnlyHint: true, openWorldHint: true }
|
|
269
|
+
},
|
|
270
|
+
openloyalty_achievement_create: {
|
|
271
|
+
title: "Create Achievement",
|
|
272
|
+
annotations: { readOnlyHint: false, openWorldHint: true }
|
|
273
|
+
},
|
|
274
|
+
openloyalty_achievement_get: {
|
|
275
|
+
title: "Get Achievement Details",
|
|
276
|
+
annotations: { readOnlyHint: true, openWorldHint: true }
|
|
277
|
+
},
|
|
278
|
+
openloyalty_achievement_update: {
|
|
279
|
+
title: "Update Achievement",
|
|
280
|
+
annotations: { readOnlyHint: false, openWorldHint: true }
|
|
281
|
+
},
|
|
282
|
+
openloyalty_achievement_patch: {
|
|
283
|
+
title: "Patch Achievement",
|
|
284
|
+
annotations: { readOnlyHint: false, openWorldHint: true }
|
|
285
|
+
},
|
|
286
|
+
openloyalty_achievement_get_member_progress: {
|
|
287
|
+
title: "Get Member Achievement Progress",
|
|
288
|
+
annotations: { readOnlyHint: true, openWorldHint: true }
|
|
289
|
+
},
|
|
290
|
+
openloyalty_achievement_list_member_achievements: {
|
|
291
|
+
title: "List Member Achievements",
|
|
292
|
+
annotations: { readOnlyHint: true, openWorldHint: true }
|
|
293
|
+
},
|
|
294
|
+
// Phase 2: Badges
|
|
295
|
+
openloyalty_badge_list: {
|
|
296
|
+
title: "List Badges",
|
|
297
|
+
annotations: { readOnlyHint: true, openWorldHint: true }
|
|
298
|
+
},
|
|
299
|
+
openloyalty_badge_get: {
|
|
300
|
+
title: "Get Badge Details",
|
|
301
|
+
annotations: { readOnlyHint: true, openWorldHint: true }
|
|
302
|
+
},
|
|
303
|
+
openloyalty_badge_update: {
|
|
304
|
+
title: "Update Badge",
|
|
305
|
+
annotations: { readOnlyHint: false, openWorldHint: true }
|
|
306
|
+
},
|
|
307
|
+
openloyalty_badge_get_member_badges: {
|
|
308
|
+
title: "Get Member Badges",
|
|
309
|
+
annotations: { readOnlyHint: true, openWorldHint: true }
|
|
310
|
+
},
|
|
311
|
+
// Phase 3: Analytics
|
|
312
|
+
openloyalty_analytics_tiers: {
|
|
313
|
+
title: "Get Tier Analytics",
|
|
314
|
+
annotations: { readOnlyHint: true, openWorldHint: true }
|
|
315
|
+
},
|
|
316
|
+
openloyalty_analytics_members: {
|
|
317
|
+
title: "Get Member Analytics",
|
|
318
|
+
annotations: { readOnlyHint: true, openWorldHint: true }
|
|
319
|
+
},
|
|
320
|
+
openloyalty_analytics_points: {
|
|
321
|
+
title: "Get Points Analytics",
|
|
322
|
+
annotations: { readOnlyHint: true, openWorldHint: true }
|
|
323
|
+
},
|
|
324
|
+
openloyalty_analytics_transactions: {
|
|
325
|
+
title: "Get Transaction Analytics",
|
|
326
|
+
annotations: { readOnlyHint: true, openWorldHint: true }
|
|
327
|
+
},
|
|
328
|
+
openloyalty_analytics_referrals: {
|
|
329
|
+
title: "Get Referral Analytics",
|
|
330
|
+
annotations: { readOnlyHint: true, openWorldHint: true }
|
|
331
|
+
},
|
|
332
|
+
openloyalty_analytics_campaigns: {
|
|
333
|
+
title: "Get Campaign Analytics",
|
|
334
|
+
annotations: { readOnlyHint: true, openWorldHint: true }
|
|
335
|
+
},
|
|
336
|
+
openloyalty_analytics_dashboard: {
|
|
337
|
+
title: "Get Dashboard Overview",
|
|
338
|
+
annotations: { readOnlyHint: true, openWorldHint: true }
|
|
339
|
+
},
|
|
340
|
+
openloyalty_analytics_units: {
|
|
341
|
+
title: "Get Units Overview",
|
|
342
|
+
annotations: { readOnlyHint: true, openWorldHint: true }
|
|
343
|
+
},
|
|
344
|
+
openloyalty_analytics_campaign_detail: {
|
|
345
|
+
title: "Get Campaign Detail Analytics",
|
|
346
|
+
annotations: { readOnlyHint: true, openWorldHint: true }
|
|
347
|
+
},
|
|
348
|
+
// Phase 3: Admin Users
|
|
349
|
+
openloyalty_admin_list: {
|
|
350
|
+
title: "List Admin Users",
|
|
351
|
+
annotations: { readOnlyHint: true, openWorldHint: true }
|
|
352
|
+
},
|
|
353
|
+
openloyalty_admin_create: {
|
|
354
|
+
title: "Create Admin User",
|
|
355
|
+
annotations: { readOnlyHint: false, openWorldHint: true }
|
|
356
|
+
},
|
|
357
|
+
openloyalty_admin_get: {
|
|
358
|
+
title: "Get Admin User Details",
|
|
359
|
+
annotations: { readOnlyHint: true, openWorldHint: true }
|
|
360
|
+
},
|
|
361
|
+
openloyalty_admin_update: {
|
|
362
|
+
title: "Update Admin User",
|
|
363
|
+
annotations: { readOnlyHint: false, openWorldHint: true }
|
|
364
|
+
},
|
|
365
|
+
openloyalty_admin_change_password: {
|
|
366
|
+
title: "Change Admin Password",
|
|
367
|
+
annotations: { readOnlyHint: false, openWorldHint: true }
|
|
368
|
+
},
|
|
369
|
+
openloyalty_admin_get_permissions: {
|
|
370
|
+
title: "Get Admin Permissions",
|
|
371
|
+
annotations: { readOnlyHint: true, openWorldHint: true }
|
|
372
|
+
},
|
|
373
|
+
// Phase 3: Roles/ACL
|
|
374
|
+
openloyalty_role_list: {
|
|
375
|
+
title: "List Roles",
|
|
376
|
+
annotations: { readOnlyHint: true, openWorldHint: true }
|
|
377
|
+
},
|
|
378
|
+
openloyalty_role_create: {
|
|
379
|
+
title: "Create Role",
|
|
380
|
+
annotations: { readOnlyHint: false, openWorldHint: true }
|
|
381
|
+
},
|
|
382
|
+
openloyalty_role_get: {
|
|
383
|
+
title: "Get Role Details",
|
|
384
|
+
annotations: { readOnlyHint: true, openWorldHint: true }
|
|
385
|
+
},
|
|
386
|
+
openloyalty_role_update: {
|
|
387
|
+
title: "Update Role",
|
|
388
|
+
annotations: { readOnlyHint: false, openWorldHint: true }
|
|
389
|
+
},
|
|
390
|
+
openloyalty_role_delete: {
|
|
391
|
+
title: "Delete Role (Permanent)",
|
|
392
|
+
annotations: { readOnlyHint: false, destructiveHint: true, openWorldHint: true }
|
|
393
|
+
},
|
|
394
|
+
openloyalty_acl_get_resources: {
|
|
395
|
+
title: "Get ACL Resources",
|
|
396
|
+
annotations: { readOnlyHint: true, openWorldHint: true }
|
|
397
|
+
},
|
|
398
|
+
// Phase 3: API Keys
|
|
399
|
+
openloyalty_apikey_create: {
|
|
400
|
+
title: "Create API Key",
|
|
401
|
+
annotations: { readOnlyHint: false, openWorldHint: true }
|
|
402
|
+
},
|
|
403
|
+
openloyalty_apikey_list: {
|
|
404
|
+
title: "List API Keys",
|
|
405
|
+
annotations: { readOnlyHint: true, openWorldHint: true }
|
|
406
|
+
},
|
|
407
|
+
openloyalty_apikey_delete: {
|
|
408
|
+
title: "Delete API Key (Permanent)",
|
|
409
|
+
annotations: { readOnlyHint: false, destructiveHint: true, openWorldHint: true }
|
|
410
|
+
},
|
|
411
|
+
// Phase 3: Audit Logs
|
|
412
|
+
openloyalty_audit_list: {
|
|
413
|
+
title: "List Audit Logs",
|
|
414
|
+
annotations: { readOnlyHint: true, openWorldHint: true }
|
|
415
|
+
},
|
|
416
|
+
openloyalty_audit_export: {
|
|
417
|
+
title: "Export Audit Logs",
|
|
418
|
+
annotations: { readOnlyHint: false, openWorldHint: true }
|
|
419
|
+
},
|
|
420
|
+
// Phase 3: Stores
|
|
421
|
+
openloyalty_store_list: {
|
|
422
|
+
title: "List Stores",
|
|
423
|
+
annotations: { readOnlyHint: true, openWorldHint: true }
|
|
424
|
+
},
|
|
425
|
+
openloyalty_store_create: {
|
|
426
|
+
title: "Create Store",
|
|
427
|
+
annotations: { readOnlyHint: false, openWorldHint: true }
|
|
428
|
+
},
|
|
429
|
+
openloyalty_store_get: {
|
|
430
|
+
title: "Get Store Details",
|
|
431
|
+
annotations: { readOnlyHint: true, openWorldHint: true }
|
|
432
|
+
},
|
|
433
|
+
openloyalty_store_update: {
|
|
434
|
+
title: "Update Store",
|
|
435
|
+
annotations: { readOnlyHint: false, openWorldHint: true }
|
|
436
|
+
},
|
|
437
|
+
// Phase 4: Webhooks
|
|
438
|
+
openloyalty_webhook_list: {
|
|
439
|
+
title: "List Webhook Subscriptions",
|
|
440
|
+
annotations: { readOnlyHint: true, openWorldHint: true }
|
|
441
|
+
},
|
|
442
|
+
openloyalty_webhook_create: {
|
|
443
|
+
title: "Create Webhook Subscription",
|
|
444
|
+
annotations: { readOnlyHint: false, openWorldHint: true }
|
|
445
|
+
},
|
|
446
|
+
openloyalty_webhook_get: {
|
|
447
|
+
title: "Get Webhook Subscription Details",
|
|
448
|
+
annotations: { readOnlyHint: true, openWorldHint: true }
|
|
449
|
+
},
|
|
450
|
+
openloyalty_webhook_update: {
|
|
451
|
+
title: "Update Webhook Subscription",
|
|
452
|
+
annotations: { readOnlyHint: false, openWorldHint: true }
|
|
453
|
+
},
|
|
454
|
+
openloyalty_webhook_delete: {
|
|
455
|
+
title: "Delete Webhook Subscription (Permanent)",
|
|
456
|
+
annotations: { readOnlyHint: false, destructiveHint: true, openWorldHint: true }
|
|
457
|
+
},
|
|
458
|
+
openloyalty_webhook_events: {
|
|
459
|
+
title: "List Available Webhook Events",
|
|
460
|
+
annotations: { readOnlyHint: true, openWorldHint: true }
|
|
461
|
+
},
|
|
462
|
+
// Phase 4: Import
|
|
463
|
+
openloyalty_import_create: {
|
|
464
|
+
title: "Create Bulk Import",
|
|
465
|
+
annotations: { readOnlyHint: false, openWorldHint: true }
|
|
466
|
+
},
|
|
467
|
+
openloyalty_import_list: {
|
|
468
|
+
title: "List Imports",
|
|
469
|
+
annotations: { readOnlyHint: true, openWorldHint: true }
|
|
470
|
+
},
|
|
471
|
+
openloyalty_import_get: {
|
|
472
|
+
title: "Get Import Details",
|
|
473
|
+
annotations: { readOnlyHint: true, openWorldHint: true }
|
|
474
|
+
},
|
|
475
|
+
// Phase 4: Export
|
|
476
|
+
openloyalty_export_create: {
|
|
477
|
+
title: "Create Data Export",
|
|
478
|
+
annotations: { readOnlyHint: false, openWorldHint: true }
|
|
479
|
+
},
|
|
480
|
+
openloyalty_export_list: {
|
|
481
|
+
title: "List Exports",
|
|
482
|
+
annotations: { readOnlyHint: true, openWorldHint: true }
|
|
483
|
+
},
|
|
484
|
+
openloyalty_export_get: {
|
|
485
|
+
title: "Get Export Details",
|
|
486
|
+
annotations: { readOnlyHint: true, openWorldHint: true }
|
|
487
|
+
},
|
|
488
|
+
openloyalty_export_download: {
|
|
489
|
+
title: "Download Export File",
|
|
490
|
+
annotations: { readOnlyHint: true, openWorldHint: true }
|
|
491
|
+
},
|
|
492
|
+
};
|
|
493
|
+
const allTools = [
|
|
494
|
+
// Phase 1 tools
|
|
495
|
+
...walletTypeToolDefinitions,
|
|
496
|
+
...tiersetToolDefinitions,
|
|
497
|
+
...memberToolDefinitions,
|
|
498
|
+
...pointsToolDefinitions,
|
|
499
|
+
...rewardToolDefinitions,
|
|
500
|
+
...transactionToolDefinitions,
|
|
501
|
+
// Phase 2 tools
|
|
502
|
+
...campaignToolDefinitions,
|
|
503
|
+
...segmentToolDefinitions,
|
|
504
|
+
...achievementToolDefinitions,
|
|
505
|
+
...badgeToolDefinitions,
|
|
506
|
+
// Phase 3 tools
|
|
507
|
+
...analyticsToolDefinitions,
|
|
508
|
+
...adminToolDefinitions,
|
|
509
|
+
...roleToolDefinitions,
|
|
510
|
+
...apiKeyToolDefinitions,
|
|
511
|
+
...auditToolDefinitions,
|
|
512
|
+
...storeToolDefinitions,
|
|
513
|
+
// Phase 4 tools
|
|
514
|
+
...webhookToolDefinitions,
|
|
515
|
+
...importToolDefinitions,
|
|
516
|
+
...exportToolDefinitions,
|
|
517
|
+
];
|
|
518
|
+
const toolHandlers = new Map();
|
|
519
|
+
for (const tool of allTools) {
|
|
520
|
+
toolHandlers.set(tool.name, tool.handler);
|
|
521
|
+
}
|
|
522
|
+
export function getAllTools() {
|
|
523
|
+
return allTools;
|
|
524
|
+
}
|
|
525
|
+
export function getToolHandler(name) {
|
|
526
|
+
return toolHandlers.get(name);
|
|
527
|
+
}
|