@open-loyalty/mcp-server 1.1.0 → 1.3.3

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (112) 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.js +10 -0
  5. package/dist/config.d.ts +0 -13
  6. package/dist/config.js +0 -14
  7. package/dist/http.js +35 -3
  8. package/dist/instructions.d.ts +5 -0
  9. package/dist/instructions.js +440 -0
  10. package/dist/prompts/fan-engagement-setup.d.ts +107 -0
  11. package/dist/prompts/fan-engagement-setup.js +492 -0
  12. package/dist/server.d.ts +1 -1
  13. package/dist/server.js +60 -273
  14. package/dist/tools/achievement/handlers.d.ts +117 -0
  15. package/dist/tools/achievement/handlers.js +161 -0
  16. package/dist/tools/achievement/index.d.ts +479 -0
  17. package/dist/tools/achievement/index.js +74 -0
  18. package/dist/tools/achievement/schemas.d.ts +433 -0
  19. package/dist/tools/achievement/schemas.js +142 -0
  20. package/dist/tools/achievement.d.ts +141 -121
  21. package/dist/tools/achievement.js +60 -24
  22. package/dist/tools/admin.d.ts +6 -6
  23. package/dist/tools/admin.js +12 -12
  24. package/dist/tools/analytics.d.ts +11 -11
  25. package/dist/tools/analytics.js +30 -29
  26. package/dist/tools/apikey.d.ts +3 -3
  27. package/dist/tools/apikey.js +6 -6
  28. package/dist/tools/audit.d.ts +2 -2
  29. package/dist/tools/audit.js +4 -4
  30. package/dist/tools/badge.d.ts +6 -6
  31. package/dist/tools/badge.js +23 -18
  32. package/dist/tools/campaign/handlers.d.ts +42 -0
  33. package/dist/tools/campaign/handlers.js +223 -0
  34. package/dist/tools/campaign/index.d.ts +783 -0
  35. package/dist/tools/campaign/index.js +117 -0
  36. package/dist/tools/campaign/member-handlers.d.ts +60 -0
  37. package/dist/tools/campaign/member-handlers.js +159 -0
  38. package/dist/tools/campaign/schemas.d.ts +704 -0
  39. package/dist/tools/campaign/schemas.js +259 -0
  40. package/dist/tools/campaign/types.d.ts +161 -0
  41. package/dist/tools/campaign/types.js +2 -0
  42. package/dist/tools/custom-event.d.ts +315 -0
  43. package/dist/tools/custom-event.js +270 -0
  44. package/dist/tools/export.d.ts +4 -4
  45. package/dist/tools/export.js +12 -12
  46. package/dist/tools/import.d.ts +3 -3
  47. package/dist/tools/import.js +23 -15
  48. package/dist/tools/index.js +13 -5
  49. package/dist/tools/member/handlers.d.ts +111 -0
  50. package/dist/tools/member/handlers.js +206 -0
  51. package/dist/tools/member/index.d.ts +169 -0
  52. package/dist/tools/member/index.js +92 -0
  53. package/dist/tools/member/schemas.d.ts +89 -0
  54. package/dist/tools/member/schemas.js +65 -0
  55. package/dist/tools/points.d.ts +7 -6
  56. package/dist/tools/points.js +21 -20
  57. package/dist/tools/referral/handlers.d.ts +47 -0
  58. package/dist/tools/referral/handlers.js +115 -0
  59. package/dist/tools/referral/index.d.ts +44 -0
  60. package/dist/tools/referral/index.js +44 -0
  61. package/dist/tools/referral/schemas.d.ts +34 -0
  62. package/dist/tools/referral/schemas.js +52 -0
  63. package/dist/tools/reward/handlers.d.ts +110 -0
  64. package/dist/tools/reward/handlers.js +289 -0
  65. package/dist/tools/reward/index.d.ts +177 -0
  66. package/dist/tools/reward/index.js +93 -0
  67. package/dist/tools/reward/schemas.d.ts +116 -0
  68. package/dist/tools/reward/schemas.js +92 -0
  69. package/dist/tools/role.d.ts +6 -6
  70. package/dist/tools/role.js +12 -12
  71. package/dist/tools/segment/handlers.d.ts +87 -0
  72. package/dist/tools/segment/handlers.js +174 -0
  73. package/dist/tools/segment/index.d.ts +395 -0
  74. package/dist/tools/segment/index.js +88 -0
  75. package/dist/tools/segment/schemas.d.ts +337 -0
  76. package/dist/tools/segment/schemas.js +79 -0
  77. package/dist/tools/segment.d.ts +10 -10
  78. package/dist/tools/segment.js +55 -31
  79. package/dist/tools/store.d.ts +4 -4
  80. package/dist/tools/store.js +8 -8
  81. package/dist/tools/tierset.d.ts +10 -10
  82. package/dist/tools/tierset.js +69 -37
  83. package/dist/tools/transaction.d.ts +4 -4
  84. package/dist/tools/transaction.js +12 -12
  85. package/dist/tools/wallet-type.d.ts +221 -16
  86. package/dist/tools/wallet-type.js +248 -17
  87. package/dist/tools/webhook.d.ts +6 -6
  88. package/dist/tools/webhook.js +90 -31
  89. package/dist/types/schemas/achievement.d.ts +18 -18
  90. package/dist/types/schemas/campaign.d.ts +64 -184
  91. package/dist/types/schemas/campaign.js +2 -7
  92. package/dist/types/schemas/common.d.ts +5 -0
  93. package/dist/types/schemas/common.js +5 -0
  94. package/dist/types/schemas/member.d.ts +2 -2
  95. package/dist/types/schemas/reward.d.ts +94 -18
  96. package/dist/types/schemas/reward.js +8 -3
  97. package/dist/types/schemas/wallet-type.d.ts +306 -8
  98. package/dist/types/schemas/wallet-type.js +82 -1
  99. package/dist/utils/errors.js +32 -5
  100. package/dist/workflows/app-login-streak.d.ts +39 -0
  101. package/dist/workflows/app-login-streak.js +298 -0
  102. package/dist/workflows/early-arrival.d.ts +33 -0
  103. package/dist/workflows/early-arrival.js +148 -0
  104. package/dist/workflows/index.d.ts +101 -0
  105. package/dist/workflows/index.js +208 -0
  106. package/dist/workflows/match-attendance.d.ts +45 -0
  107. package/dist/workflows/match-attendance.js +308 -0
  108. package/dist/workflows/sportsbar-visit.d.ts +41 -0
  109. package/dist/workflows/sportsbar-visit.js +284 -0
  110. package/dist/workflows/vod-watching.d.ts +43 -0
  111. package/dist/workflows/vod-watching.js +326 -0
  112. package/package.json +8 -2
@@ -13,10 +13,11 @@ export declare const RewardCategorySchema: z.ZodObject<{
13
13
  active: boolean;
14
14
  categoryId: string;
15
15
  }>;
16
- export declare const RewardSchema: z.ZodObject<{
16
+ export declare const RewardSchema: z.ZodEffects<z.ZodObject<{
17
17
  rewardId: z.ZodString;
18
18
  name: z.ZodString;
19
- type: z.ZodEnum<["static_coupon", "dynamic_coupon", "conversion_coupon", "material", "fortune_wheel"]>;
19
+ reward: z.ZodOptional<z.ZodEnum<["static_coupon", "dynamic_coupon", "conversion_coupon", "material", "fortune_wheel"]>>;
20
+ type: z.ZodOptional<z.ZodEnum<["static_coupon", "dynamic_coupon", "conversion_coupon", "material", "fortune_wheel"]>>;
20
21
  costInPoints: z.ZodOptional<z.ZodNumber>;
21
22
  active: z.ZodBoolean;
22
23
  description: z.ZodOptional<z.ZodString>;
@@ -26,15 +27,16 @@ export declare const RewardSchema: z.ZodObject<{
26
27
  segments: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
27
28
  target: z.ZodOptional<z.ZodNullable<z.ZodEnum<["level", "segment"]>>>;
28
29
  couponValue: z.ZodOptional<z.ZodNumber>;
29
- couponValueType: z.ZodOptional<z.ZodEnum<["Money", "Percentage"]>>;
30
+ couponValueType: z.ZodOptional<z.ZodEnum<["money", "percentage", "Money", "Percentage"]>>;
30
31
  daysValid: z.ZodOptional<z.ZodNumber>;
31
32
  stock: z.ZodOptional<z.ZodNullable<z.ZodNumber>>;
32
33
  }, "strip", z.ZodTypeAny, {
33
- type: "static_coupon" | "dynamic_coupon" | "conversion_coupon" | "material" | "fortune_wheel";
34
34
  name: string;
35
35
  active: boolean;
36
36
  rewardId: string;
37
+ type?: "static_coupon" | "dynamic_coupon" | "conversion_coupon" | "material" | "fortune_wheel" | undefined;
37
38
  description?: string | undefined;
39
+ reward?: "static_coupon" | "dynamic_coupon" | "conversion_coupon" | "material" | "fortune_wheel" | undefined;
38
40
  costInPoints?: number | undefined;
39
41
  usageInstruction?: string | undefined;
40
42
  categories?: string[] | undefined;
@@ -42,15 +44,16 @@ export declare const RewardSchema: z.ZodObject<{
42
44
  segments?: string[] | undefined;
43
45
  target?: "level" | "segment" | null | undefined;
44
46
  couponValue?: number | undefined;
45
- couponValueType?: "Money" | "Percentage" | undefined;
47
+ couponValueType?: "money" | "percentage" | "Money" | "Percentage" | undefined;
46
48
  daysValid?: number | undefined;
47
49
  stock?: number | null | undefined;
48
50
  }, {
49
- type: "static_coupon" | "dynamic_coupon" | "conversion_coupon" | "material" | "fortune_wheel";
50
51
  name: string;
51
52
  active: boolean;
52
53
  rewardId: string;
54
+ type?: "static_coupon" | "dynamic_coupon" | "conversion_coupon" | "material" | "fortune_wheel" | undefined;
53
55
  description?: string | undefined;
56
+ reward?: "static_coupon" | "dynamic_coupon" | "conversion_coupon" | "material" | "fortune_wheel" | undefined;
54
57
  costInPoints?: number | undefined;
55
58
  usageInstruction?: string | undefined;
56
59
  categories?: string[] | undefined;
@@ -58,7 +61,41 @@ export declare const RewardSchema: z.ZodObject<{
58
61
  segments?: string[] | undefined;
59
62
  target?: "level" | "segment" | null | undefined;
60
63
  couponValue?: number | undefined;
61
- couponValueType?: "Money" | "Percentage" | undefined;
64
+ couponValueType?: "money" | "percentage" | "Money" | "Percentage" | undefined;
65
+ daysValid?: number | undefined;
66
+ stock?: number | null | undefined;
67
+ }>, {
68
+ type: "static_coupon" | "dynamic_coupon" | "conversion_coupon" | "material" | "fortune_wheel" | undefined;
69
+ name: string;
70
+ active: boolean;
71
+ rewardId: string;
72
+ description?: string | undefined;
73
+ reward?: "static_coupon" | "dynamic_coupon" | "conversion_coupon" | "material" | "fortune_wheel" | undefined;
74
+ costInPoints?: number | undefined;
75
+ usageInstruction?: string | undefined;
76
+ categories?: string[] | undefined;
77
+ levels?: string[] | undefined;
78
+ segments?: string[] | undefined;
79
+ target?: "level" | "segment" | null | undefined;
80
+ couponValue?: number | undefined;
81
+ couponValueType?: "money" | "percentage" | "Money" | "Percentage" | undefined;
82
+ daysValid?: number | undefined;
83
+ stock?: number | null | undefined;
84
+ }, {
85
+ name: string;
86
+ active: boolean;
87
+ rewardId: string;
88
+ type?: "static_coupon" | "dynamic_coupon" | "conversion_coupon" | "material" | "fortune_wheel" | undefined;
89
+ description?: string | undefined;
90
+ reward?: "static_coupon" | "dynamic_coupon" | "conversion_coupon" | "material" | "fortune_wheel" | undefined;
91
+ costInPoints?: number | undefined;
92
+ usageInstruction?: string | undefined;
93
+ categories?: string[] | undefined;
94
+ levels?: string[] | undefined;
95
+ segments?: string[] | undefined;
96
+ target?: "level" | "segment" | null | undefined;
97
+ couponValue?: number | undefined;
98
+ couponValueType?: "money" | "percentage" | "Money" | "Percentage" | undefined;
62
99
  daysValid?: number | undefined;
63
100
  stock?: number | null | undefined;
64
101
  }>;
@@ -85,10 +122,11 @@ export declare const IssuedRewardSchema: z.ZodObject<{
85
122
  issuedAt?: string | undefined;
86
123
  }>;
87
124
  export declare const RewardListResponseSchema: z.ZodObject<{
88
- items: z.ZodArray<z.ZodObject<{
125
+ items: z.ZodArray<z.ZodEffects<z.ZodObject<{
89
126
  rewardId: z.ZodString;
90
127
  name: z.ZodString;
91
- type: z.ZodEnum<["static_coupon", "dynamic_coupon", "conversion_coupon", "material", "fortune_wheel"]>;
128
+ reward: z.ZodOptional<z.ZodEnum<["static_coupon", "dynamic_coupon", "conversion_coupon", "material", "fortune_wheel"]>>;
129
+ type: z.ZodOptional<z.ZodEnum<["static_coupon", "dynamic_coupon", "conversion_coupon", "material", "fortune_wheel"]>>;
92
130
  costInPoints: z.ZodOptional<z.ZodNumber>;
93
131
  active: z.ZodBoolean;
94
132
  description: z.ZodOptional<z.ZodString>;
@@ -98,15 +136,50 @@ export declare const RewardListResponseSchema: z.ZodObject<{
98
136
  segments: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
99
137
  target: z.ZodOptional<z.ZodNullable<z.ZodEnum<["level", "segment"]>>>;
100
138
  couponValue: z.ZodOptional<z.ZodNumber>;
101
- couponValueType: z.ZodOptional<z.ZodEnum<["Money", "Percentage"]>>;
139
+ couponValueType: z.ZodOptional<z.ZodEnum<["money", "percentage", "Money", "Percentage"]>>;
102
140
  daysValid: z.ZodOptional<z.ZodNumber>;
103
141
  stock: z.ZodOptional<z.ZodNullable<z.ZodNumber>>;
104
142
  }, "strip", z.ZodTypeAny, {
105
- type: "static_coupon" | "dynamic_coupon" | "conversion_coupon" | "material" | "fortune_wheel";
143
+ name: string;
144
+ active: boolean;
145
+ rewardId: string;
146
+ type?: "static_coupon" | "dynamic_coupon" | "conversion_coupon" | "material" | "fortune_wheel" | undefined;
147
+ description?: string | undefined;
148
+ reward?: "static_coupon" | "dynamic_coupon" | "conversion_coupon" | "material" | "fortune_wheel" | undefined;
149
+ costInPoints?: number | undefined;
150
+ usageInstruction?: string | undefined;
151
+ categories?: string[] | undefined;
152
+ levels?: string[] | undefined;
153
+ segments?: string[] | undefined;
154
+ target?: "level" | "segment" | null | undefined;
155
+ couponValue?: number | undefined;
156
+ couponValueType?: "money" | "percentage" | "Money" | "Percentage" | undefined;
157
+ daysValid?: number | undefined;
158
+ stock?: number | null | undefined;
159
+ }, {
160
+ name: string;
161
+ active: boolean;
162
+ rewardId: string;
163
+ type?: "static_coupon" | "dynamic_coupon" | "conversion_coupon" | "material" | "fortune_wheel" | undefined;
164
+ description?: string | undefined;
165
+ reward?: "static_coupon" | "dynamic_coupon" | "conversion_coupon" | "material" | "fortune_wheel" | undefined;
166
+ costInPoints?: number | undefined;
167
+ usageInstruction?: string | undefined;
168
+ categories?: string[] | undefined;
169
+ levels?: string[] | undefined;
170
+ segments?: string[] | undefined;
171
+ target?: "level" | "segment" | null | undefined;
172
+ couponValue?: number | undefined;
173
+ couponValueType?: "money" | "percentage" | "Money" | "Percentage" | undefined;
174
+ daysValid?: number | undefined;
175
+ stock?: number | null | undefined;
176
+ }>, {
177
+ type: "static_coupon" | "dynamic_coupon" | "conversion_coupon" | "material" | "fortune_wheel" | undefined;
106
178
  name: string;
107
179
  active: boolean;
108
180
  rewardId: string;
109
181
  description?: string | undefined;
182
+ reward?: "static_coupon" | "dynamic_coupon" | "conversion_coupon" | "material" | "fortune_wheel" | undefined;
110
183
  costInPoints?: number | undefined;
111
184
  usageInstruction?: string | undefined;
112
185
  categories?: string[] | undefined;
@@ -114,15 +187,16 @@ export declare const RewardListResponseSchema: z.ZodObject<{
114
187
  segments?: string[] | undefined;
115
188
  target?: "level" | "segment" | null | undefined;
116
189
  couponValue?: number | undefined;
117
- couponValueType?: "Money" | "Percentage" | undefined;
190
+ couponValueType?: "money" | "percentage" | "Money" | "Percentage" | undefined;
118
191
  daysValid?: number | undefined;
119
192
  stock?: number | null | undefined;
120
193
  }, {
121
- type: "static_coupon" | "dynamic_coupon" | "conversion_coupon" | "material" | "fortune_wheel";
122
194
  name: string;
123
195
  active: boolean;
124
196
  rewardId: string;
197
+ type?: "static_coupon" | "dynamic_coupon" | "conversion_coupon" | "material" | "fortune_wheel" | undefined;
125
198
  description?: string | undefined;
199
+ reward?: "static_coupon" | "dynamic_coupon" | "conversion_coupon" | "material" | "fortune_wheel" | undefined;
126
200
  costInPoints?: number | undefined;
127
201
  usageInstruction?: string | undefined;
128
202
  categories?: string[] | undefined;
@@ -130,7 +204,7 @@ export declare const RewardListResponseSchema: z.ZodObject<{
130
204
  segments?: string[] | undefined;
131
205
  target?: "level" | "segment" | null | undefined;
132
206
  couponValue?: number | undefined;
133
- couponValueType?: "Money" | "Percentage" | undefined;
207
+ couponValueType?: "money" | "percentage" | "Money" | "Percentage" | undefined;
134
208
  daysValid?: number | undefined;
135
209
  stock?: number | null | undefined;
136
210
  }>, "many">;
@@ -149,11 +223,12 @@ export declare const RewardListResponseSchema: z.ZodObject<{
149
223
  }, z.ZodTypeAny, "passthrough">>;
150
224
  }, "strip", z.ZodTypeAny, {
151
225
  items: {
152
- type: "static_coupon" | "dynamic_coupon" | "conversion_coupon" | "material" | "fortune_wheel";
226
+ type: "static_coupon" | "dynamic_coupon" | "conversion_coupon" | "material" | "fortune_wheel" | undefined;
153
227
  name: string;
154
228
  active: boolean;
155
229
  rewardId: string;
156
230
  description?: string | undefined;
231
+ reward?: "static_coupon" | "dynamic_coupon" | "conversion_coupon" | "material" | "fortune_wheel" | undefined;
157
232
  costInPoints?: number | undefined;
158
233
  usageInstruction?: string | undefined;
159
234
  categories?: string[] | undefined;
@@ -161,7 +236,7 @@ export declare const RewardListResponseSchema: z.ZodObject<{
161
236
  segments?: string[] | undefined;
162
237
  target?: "level" | "segment" | null | undefined;
163
238
  couponValue?: number | undefined;
164
- couponValueType?: "Money" | "Percentage" | undefined;
239
+ couponValueType?: "money" | "percentage" | "Money" | "Percentage" | undefined;
165
240
  daysValid?: number | undefined;
166
241
  stock?: number | null | undefined;
167
242
  }[];
@@ -174,11 +249,12 @@ export declare const RewardListResponseSchema: z.ZodObject<{
174
249
  };
175
250
  }, {
176
251
  items: {
177
- type: "static_coupon" | "dynamic_coupon" | "conversion_coupon" | "material" | "fortune_wheel";
178
252
  name: string;
179
253
  active: boolean;
180
254
  rewardId: string;
255
+ type?: "static_coupon" | "dynamic_coupon" | "conversion_coupon" | "material" | "fortune_wheel" | undefined;
181
256
  description?: string | undefined;
257
+ reward?: "static_coupon" | "dynamic_coupon" | "conversion_coupon" | "material" | "fortune_wheel" | undefined;
182
258
  costInPoints?: number | undefined;
183
259
  usageInstruction?: string | undefined;
184
260
  categories?: string[] | undefined;
@@ -186,7 +262,7 @@ export declare const RewardListResponseSchema: z.ZodObject<{
186
262
  segments?: string[] | undefined;
187
263
  target?: "level" | "segment" | null | undefined;
188
264
  couponValue?: number | undefined;
189
- couponValueType?: "Money" | "Percentage" | undefined;
265
+ couponValueType?: "money" | "percentage" | "Money" | "Percentage" | undefined;
190
266
  daysValid?: number | undefined;
191
267
  stock?: number | null | undefined;
192
268
  }[];
@@ -12,10 +12,12 @@ export const RewardCategorySchema = z.object({
12
12
  name: z.string(),
13
13
  active: z.boolean(),
14
14
  });
15
+ // API returns "reward" field for type, and lowercase couponValueType
15
16
  export const RewardSchema = z.object({
16
17
  rewardId: z.string(),
17
18
  name: z.string(),
18
- type: RewardTypeEnum,
19
+ reward: RewardTypeEnum.optional(), // API uses "reward" field for type
20
+ type: RewardTypeEnum.optional(), // Fallback if API returns "type"
19
21
  costInPoints: z.number().optional(),
20
22
  active: z.boolean(),
21
23
  description: z.string().optional(),
@@ -25,10 +27,13 @@ export const RewardSchema = z.object({
25
27
  segments: z.array(z.string()).optional(),
26
28
  target: z.enum(["level", "segment"]).nullable().optional(),
27
29
  couponValue: z.number().optional(),
28
- couponValueType: z.enum(["Money", "Percentage"]).optional(),
30
+ couponValueType: z.enum(["money", "percentage", "Money", "Percentage"]).optional(), // API returns lowercase
29
31
  daysValid: z.number().optional(),
30
32
  stock: z.number().nullable().optional(),
31
- });
33
+ }).transform((data) => ({
34
+ ...data,
35
+ type: data.reward || data.type, // Normalize to "type" field
36
+ }));
32
37
  export const IssuedRewardSchema = z.object({
33
38
  issuedRewardId: z.string(),
34
39
  rewardId: z.string(),
@@ -2,7 +2,7 @@ import { z } from "zod";
2
2
  export declare const WalletTypeSchema: z.ZodObject<{
3
3
  walletTypeId: z.ZodString;
4
4
  code: z.ZodString;
5
- name: z.ZodString;
5
+ name: z.ZodOptional<z.ZodString>;
6
6
  unitSingularName: z.ZodOptional<z.ZodString>;
7
7
  unitPluralName: z.ZodOptional<z.ZodString>;
8
8
  active: z.ZodBoolean;
@@ -10,34 +10,55 @@ export declare const WalletTypeSchema: z.ZodObject<{
10
10
  createdAt: z.ZodOptional<z.ZodString>;
11
11
  limits: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
12
12
  allowNegativeBalance: z.ZodOptional<z.ZodBoolean>;
13
+ translations: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
14
+ unitDaysExpiryAfter: z.ZodOptional<z.ZodString>;
15
+ unitDaysActiveCount: z.ZodOptional<z.ZodNumber>;
16
+ unitYearsActiveCount: z.ZodOptional<z.ZodNumber>;
17
+ unitDaysLocked: z.ZodOptional<z.ZodNumber>;
18
+ allTimeNotLocked: z.ZodOptional<z.ZodBoolean>;
19
+ unitExpiryDate: z.ZodOptional<z.ZodString>;
13
20
  }, "strip", z.ZodTypeAny, {
14
21
  code: string;
15
22
  walletTypeId: string;
16
- name: string;
17
23
  active: boolean;
18
24
  isDefault: boolean;
25
+ name?: string | undefined;
19
26
  unitSingularName?: string | undefined;
20
27
  unitPluralName?: string | undefined;
21
28
  createdAt?: string | undefined;
22
29
  limits?: Record<string, unknown> | undefined;
23
30
  allowNegativeBalance?: boolean | undefined;
31
+ translations?: Record<string, unknown> | undefined;
32
+ unitDaysExpiryAfter?: string | undefined;
33
+ unitDaysActiveCount?: number | undefined;
34
+ unitYearsActiveCount?: number | undefined;
35
+ unitDaysLocked?: number | undefined;
36
+ allTimeNotLocked?: boolean | undefined;
37
+ unitExpiryDate?: string | undefined;
24
38
  }, {
25
39
  code: string;
26
40
  walletTypeId: string;
27
- name: string;
28
41
  active: boolean;
29
42
  isDefault: boolean;
43
+ name?: string | undefined;
30
44
  unitSingularName?: string | undefined;
31
45
  unitPluralName?: string | undefined;
32
46
  createdAt?: string | undefined;
33
47
  limits?: Record<string, unknown> | undefined;
34
48
  allowNegativeBalance?: boolean | undefined;
49
+ translations?: Record<string, unknown> | undefined;
50
+ unitDaysExpiryAfter?: string | undefined;
51
+ unitDaysActiveCount?: number | undefined;
52
+ unitYearsActiveCount?: number | undefined;
53
+ unitDaysLocked?: number | undefined;
54
+ allTimeNotLocked?: boolean | undefined;
55
+ unitExpiryDate?: string | undefined;
35
56
  }>;
36
57
  export declare const WalletTypeListResponseSchema: z.ZodObject<{
37
58
  items: z.ZodArray<z.ZodObject<{
38
59
  walletTypeId: z.ZodString;
39
60
  code: z.ZodString;
40
- name: z.ZodString;
61
+ name: z.ZodOptional<z.ZodString>;
41
62
  unitSingularName: z.ZodOptional<z.ZodString>;
42
63
  unitPluralName: z.ZodOptional<z.ZodString>;
43
64
  active: z.ZodBoolean;
@@ -45,55 +66,332 @@ export declare const WalletTypeListResponseSchema: z.ZodObject<{
45
66
  createdAt: z.ZodOptional<z.ZodString>;
46
67
  limits: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
47
68
  allowNegativeBalance: z.ZodOptional<z.ZodBoolean>;
69
+ translations: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
70
+ unitDaysExpiryAfter: z.ZodOptional<z.ZodString>;
71
+ unitDaysActiveCount: z.ZodOptional<z.ZodNumber>;
72
+ unitYearsActiveCount: z.ZodOptional<z.ZodNumber>;
73
+ unitDaysLocked: z.ZodOptional<z.ZodNumber>;
74
+ allTimeNotLocked: z.ZodOptional<z.ZodBoolean>;
75
+ unitExpiryDate: z.ZodOptional<z.ZodString>;
48
76
  }, "strip", z.ZodTypeAny, {
49
77
  code: string;
50
78
  walletTypeId: string;
51
- name: string;
52
79
  active: boolean;
53
80
  isDefault: boolean;
81
+ name?: string | undefined;
54
82
  unitSingularName?: string | undefined;
55
83
  unitPluralName?: string | undefined;
56
84
  createdAt?: string | undefined;
57
85
  limits?: Record<string, unknown> | undefined;
58
86
  allowNegativeBalance?: boolean | undefined;
87
+ translations?: Record<string, unknown> | undefined;
88
+ unitDaysExpiryAfter?: string | undefined;
89
+ unitDaysActiveCount?: number | undefined;
90
+ unitYearsActiveCount?: number | undefined;
91
+ unitDaysLocked?: number | undefined;
92
+ allTimeNotLocked?: boolean | undefined;
93
+ unitExpiryDate?: string | undefined;
59
94
  }, {
60
95
  code: string;
61
96
  walletTypeId: string;
62
- name: string;
63
97
  active: boolean;
64
98
  isDefault: boolean;
99
+ name?: string | undefined;
65
100
  unitSingularName?: string | undefined;
66
101
  unitPluralName?: string | undefined;
67
102
  createdAt?: string | undefined;
68
103
  limits?: Record<string, unknown> | undefined;
69
104
  allowNegativeBalance?: boolean | undefined;
105
+ translations?: Record<string, unknown> | undefined;
106
+ unitDaysExpiryAfter?: string | undefined;
107
+ unitDaysActiveCount?: number | undefined;
108
+ unitYearsActiveCount?: number | undefined;
109
+ unitDaysLocked?: number | undefined;
110
+ allTimeNotLocked?: boolean | undefined;
111
+ unitExpiryDate?: string | undefined;
70
112
  }>, "many">;
71
113
  }, "strip", z.ZodTypeAny, {
72
114
  items: {
73
115
  code: string;
74
116
  walletTypeId: string;
75
- name: string;
76
117
  active: boolean;
77
118
  isDefault: boolean;
119
+ name?: string | undefined;
78
120
  unitSingularName?: string | undefined;
79
121
  unitPluralName?: string | undefined;
80
122
  createdAt?: string | undefined;
81
123
  limits?: Record<string, unknown> | undefined;
82
124
  allowNegativeBalance?: boolean | undefined;
125
+ translations?: Record<string, unknown> | undefined;
126
+ unitDaysExpiryAfter?: string | undefined;
127
+ unitDaysActiveCount?: number | undefined;
128
+ unitYearsActiveCount?: number | undefined;
129
+ unitDaysLocked?: number | undefined;
130
+ allTimeNotLocked?: boolean | undefined;
131
+ unitExpiryDate?: string | undefined;
83
132
  }[];
84
133
  }, {
85
134
  items: {
86
135
  code: string;
87
136
  walletTypeId: string;
88
- name: string;
89
137
  active: boolean;
90
138
  isDefault: boolean;
139
+ name?: string | undefined;
91
140
  unitSingularName?: string | undefined;
92
141
  unitPluralName?: string | undefined;
93
142
  createdAt?: string | undefined;
94
143
  limits?: Record<string, unknown> | undefined;
95
144
  allowNegativeBalance?: boolean | undefined;
145
+ translations?: Record<string, unknown> | undefined;
146
+ unitDaysExpiryAfter?: string | undefined;
147
+ unitDaysActiveCount?: number | undefined;
148
+ unitYearsActiveCount?: number | undefined;
149
+ unitDaysLocked?: number | undefined;
150
+ allTimeNotLocked?: boolean | undefined;
151
+ unitExpiryDate?: string | undefined;
96
152
  }[];
97
153
  }>;
154
+ export declare const WalletTypeCreateResponseSchema: z.ZodObject<{
155
+ walletTypeId: z.ZodString;
156
+ }, "strip", z.ZodTypeAny, {
157
+ walletTypeId: string;
158
+ }, {
159
+ walletTypeId: string;
160
+ }>;
98
161
  export type WalletType = z.infer<typeof WalletTypeSchema>;
99
162
  export type WalletTypeListResponse = z.infer<typeof WalletTypeListResponseSchema>;
163
+ export type WalletTypeCreateResponse = z.infer<typeof WalletTypeCreateResponseSchema>;
164
+ export declare const WalletTypeListInputSchema: {
165
+ storeCode: z.ZodOptional<z.ZodString>;
166
+ };
167
+ export declare const WalletTypeGetInputSchema: {
168
+ storeCode: z.ZodOptional<z.ZodString>;
169
+ walletTypeId: z.ZodString;
170
+ };
171
+ export declare const WalletTypeLimitsInputSchema: z.ZodOptional<z.ZodObject<{
172
+ points: z.ZodOptional<z.ZodObject<{
173
+ interval: z.ZodOptional<z.ZodObject<{
174
+ type: z.ZodEnum<["calendarHours", "calendarDays", "calendarWeeks", "calendarMonths", "calendarYears"]>;
175
+ value: z.ZodNumber;
176
+ }, "strip", z.ZodTypeAny, {
177
+ value: number;
178
+ type: "calendarHours" | "calendarDays" | "calendarWeeks" | "calendarMonths" | "calendarYears";
179
+ }, {
180
+ value: number;
181
+ type: "calendarHours" | "calendarDays" | "calendarWeeks" | "calendarMonths" | "calendarYears";
182
+ }>>;
183
+ value: z.ZodNumber;
184
+ }, "strip", z.ZodTypeAny, {
185
+ value: number;
186
+ interval?: {
187
+ value: number;
188
+ type: "calendarHours" | "calendarDays" | "calendarWeeks" | "calendarMonths" | "calendarYears";
189
+ } | undefined;
190
+ }, {
191
+ value: number;
192
+ interval?: {
193
+ value: number;
194
+ type: "calendarHours" | "calendarDays" | "calendarWeeks" | "calendarMonths" | "calendarYears";
195
+ } | undefined;
196
+ }>>;
197
+ pointsPerMember: z.ZodOptional<z.ZodObject<{
198
+ interval: z.ZodOptional<z.ZodObject<{
199
+ type: z.ZodEnum<["calendarHours", "calendarDays", "calendarWeeks", "calendarMonths", "calendarYears"]>;
200
+ value: z.ZodNumber;
201
+ }, "strip", z.ZodTypeAny, {
202
+ value: number;
203
+ type: "calendarHours" | "calendarDays" | "calendarWeeks" | "calendarMonths" | "calendarYears";
204
+ }, {
205
+ value: number;
206
+ type: "calendarHours" | "calendarDays" | "calendarWeeks" | "calendarMonths" | "calendarYears";
207
+ }>>;
208
+ value: z.ZodNumber;
209
+ }, "strip", z.ZodTypeAny, {
210
+ value: number;
211
+ interval?: {
212
+ value: number;
213
+ type: "calendarHours" | "calendarDays" | "calendarWeeks" | "calendarMonths" | "calendarYears";
214
+ } | undefined;
215
+ }, {
216
+ value: number;
217
+ interval?: {
218
+ value: number;
219
+ type: "calendarHours" | "calendarDays" | "calendarWeeks" | "calendarMonths" | "calendarYears";
220
+ } | undefined;
221
+ }>>;
222
+ }, "strip", z.ZodTypeAny, {
223
+ points?: {
224
+ value: number;
225
+ interval?: {
226
+ value: number;
227
+ type: "calendarHours" | "calendarDays" | "calendarWeeks" | "calendarMonths" | "calendarYears";
228
+ } | undefined;
229
+ } | undefined;
230
+ pointsPerMember?: {
231
+ value: number;
232
+ interval?: {
233
+ value: number;
234
+ type: "calendarHours" | "calendarDays" | "calendarWeeks" | "calendarMonths" | "calendarYears";
235
+ } | undefined;
236
+ } | undefined;
237
+ }, {
238
+ points?: {
239
+ value: number;
240
+ interval?: {
241
+ value: number;
242
+ type: "calendarHours" | "calendarDays" | "calendarWeeks" | "calendarMonths" | "calendarYears";
243
+ } | undefined;
244
+ } | undefined;
245
+ pointsPerMember?: {
246
+ value: number;
247
+ interval?: {
248
+ value: number;
249
+ type: "calendarHours" | "calendarDays" | "calendarWeeks" | "calendarMonths" | "calendarYears";
250
+ } | undefined;
251
+ } | undefined;
252
+ }>>;
253
+ export declare const WalletTypeCreateInputSchema: {
254
+ storeCode: z.ZodOptional<z.ZodString>;
255
+ translations: z.ZodObject<{
256
+ en: z.ZodObject<{
257
+ name: z.ZodString;
258
+ description: z.ZodOptional<z.ZodString>;
259
+ }, "strip", z.ZodTypeAny, {
260
+ name: string;
261
+ description?: string | undefined;
262
+ }, {
263
+ name: string;
264
+ description?: string | undefined;
265
+ }>;
266
+ }, "passthrough", z.ZodTypeAny, z.objectOutputType<{
267
+ en: z.ZodObject<{
268
+ name: z.ZodString;
269
+ description: z.ZodOptional<z.ZodString>;
270
+ }, "strip", z.ZodTypeAny, {
271
+ name: string;
272
+ description?: string | undefined;
273
+ }, {
274
+ name: string;
275
+ description?: string | undefined;
276
+ }>;
277
+ }, z.ZodTypeAny, "passthrough">, z.objectInputType<{
278
+ en: z.ZodObject<{
279
+ name: z.ZodString;
280
+ description: z.ZodOptional<z.ZodString>;
281
+ }, "strip", z.ZodTypeAny, {
282
+ name: string;
283
+ description?: string | undefined;
284
+ }, {
285
+ name: string;
286
+ description?: string | undefined;
287
+ }>;
288
+ }, z.ZodTypeAny, "passthrough">>;
289
+ unitSingularName: z.ZodString;
290
+ unitPluralName: z.ZodString;
291
+ unitDaysExpiryAfter: z.ZodString;
292
+ code: z.ZodOptional<z.ZodString>;
293
+ allowNegativeBalance: z.ZodOptional<z.ZodBoolean>;
294
+ unitExpiryDate: z.ZodOptional<z.ZodString>;
295
+ unitDaysActiveCount: z.ZodOptional<z.ZodNumber>;
296
+ unitYearsActiveCount: z.ZodOptional<z.ZodNumber>;
297
+ unitDaysLocked: z.ZodOptional<z.ZodNumber>;
298
+ allTimeNotLocked: z.ZodOptional<z.ZodBoolean>;
299
+ };
300
+ export declare const WalletTypeUpdateInputSchema: {
301
+ storeCode: z.ZodOptional<z.ZodString>;
302
+ walletTypeId: z.ZodString;
303
+ name: z.ZodOptional<z.ZodString>;
304
+ description: z.ZodOptional<z.ZodString>;
305
+ unitSingularName: z.ZodOptional<z.ZodString>;
306
+ unitPluralName: z.ZodOptional<z.ZodString>;
307
+ active: z.ZodOptional<z.ZodBoolean>;
308
+ allowNegativeBalance: z.ZodOptional<z.ZodBoolean>;
309
+ limits: z.ZodOptional<z.ZodObject<{
310
+ points: z.ZodOptional<z.ZodObject<{
311
+ interval: z.ZodOptional<z.ZodObject<{
312
+ type: z.ZodEnum<["calendarHours", "calendarDays", "calendarWeeks", "calendarMonths", "calendarYears"]>;
313
+ value: z.ZodNumber;
314
+ }, "strip", z.ZodTypeAny, {
315
+ value: number;
316
+ type: "calendarHours" | "calendarDays" | "calendarWeeks" | "calendarMonths" | "calendarYears";
317
+ }, {
318
+ value: number;
319
+ type: "calendarHours" | "calendarDays" | "calendarWeeks" | "calendarMonths" | "calendarYears";
320
+ }>>;
321
+ value: z.ZodNumber;
322
+ }, "strip", z.ZodTypeAny, {
323
+ value: number;
324
+ interval?: {
325
+ value: number;
326
+ type: "calendarHours" | "calendarDays" | "calendarWeeks" | "calendarMonths" | "calendarYears";
327
+ } | undefined;
328
+ }, {
329
+ value: number;
330
+ interval?: {
331
+ value: number;
332
+ type: "calendarHours" | "calendarDays" | "calendarWeeks" | "calendarMonths" | "calendarYears";
333
+ } | undefined;
334
+ }>>;
335
+ pointsPerMember: z.ZodOptional<z.ZodObject<{
336
+ interval: z.ZodOptional<z.ZodObject<{
337
+ type: z.ZodEnum<["calendarHours", "calendarDays", "calendarWeeks", "calendarMonths", "calendarYears"]>;
338
+ value: z.ZodNumber;
339
+ }, "strip", z.ZodTypeAny, {
340
+ value: number;
341
+ type: "calendarHours" | "calendarDays" | "calendarWeeks" | "calendarMonths" | "calendarYears";
342
+ }, {
343
+ value: number;
344
+ type: "calendarHours" | "calendarDays" | "calendarWeeks" | "calendarMonths" | "calendarYears";
345
+ }>>;
346
+ value: z.ZodNumber;
347
+ }, "strip", z.ZodTypeAny, {
348
+ value: number;
349
+ interval?: {
350
+ value: number;
351
+ type: "calendarHours" | "calendarDays" | "calendarWeeks" | "calendarMonths" | "calendarYears";
352
+ } | undefined;
353
+ }, {
354
+ value: number;
355
+ interval?: {
356
+ value: number;
357
+ type: "calendarHours" | "calendarDays" | "calendarWeeks" | "calendarMonths" | "calendarYears";
358
+ } | undefined;
359
+ }>>;
360
+ }, "strip", z.ZodTypeAny, {
361
+ points?: {
362
+ value: number;
363
+ interval?: {
364
+ value: number;
365
+ type: "calendarHours" | "calendarDays" | "calendarWeeks" | "calendarMonths" | "calendarYears";
366
+ } | undefined;
367
+ } | undefined;
368
+ pointsPerMember?: {
369
+ value: number;
370
+ interval?: {
371
+ value: number;
372
+ type: "calendarHours" | "calendarDays" | "calendarWeeks" | "calendarMonths" | "calendarYears";
373
+ } | undefined;
374
+ } | undefined;
375
+ }, {
376
+ points?: {
377
+ value: number;
378
+ interval?: {
379
+ value: number;
380
+ type: "calendarHours" | "calendarDays" | "calendarWeeks" | "calendarMonths" | "calendarYears";
381
+ } | undefined;
382
+ } | undefined;
383
+ pointsPerMember?: {
384
+ value: number;
385
+ interval?: {
386
+ value: number;
387
+ type: "calendarHours" | "calendarDays" | "calendarWeeks" | "calendarMonths" | "calendarYears";
388
+ } | undefined;
389
+ } | undefined;
390
+ }>>;
391
+ unitExpiryDate: z.ZodOptional<z.ZodString>;
392
+ unitDaysExpiryAfter: z.ZodOptional<z.ZodString>;
393
+ unitDaysActiveCount: z.ZodOptional<z.ZodNumber>;
394
+ unitYearsActiveCount: z.ZodOptional<z.ZodNumber>;
395
+ unitDaysLocked: z.ZodOptional<z.ZodNumber>;
396
+ allTimeNotLocked: z.ZodOptional<z.ZodBoolean>;
397
+ };