@open-loyalty/mcp-server 1.14.0 → 1.16.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/index.js +6 -0
- package/dist/instructions.d.ts +1 -1
- package/dist/instructions.js +1 -1
- package/dist/server.js +1 -1
- package/dist/tools/analytics/handlers.js +2 -2
- package/dist/tools/analytics/index.d.ts +4 -4
- package/dist/tools/analytics/schemas.d.ts +4 -4
- package/dist/tools/analytics/schemas.js +7 -5
- package/dist/tools/apps/dashboard/handlers.d.ts +21 -6
- package/dist/tools/apps/dashboard/handlers.js +70 -13
- package/dist/tools/campaign/handlers.js +24 -5
- package/dist/tools/campaign/index.d.ts +227 -116
- package/dist/tools/campaign/index.js +4 -1
- package/dist/tools/campaign/normalizers.d.ts +5 -0
- package/dist/tools/campaign/normalizers.js +50 -0
- package/dist/tools/campaign/schemas.d.ts +227 -116
- package/dist/tools/campaign/schemas.js +34 -20
- package/dist/tools/campaign/types.d.ts +9 -7
- package/dist/types/schemas/analytics.d.ts +38 -6
- package/dist/types/schemas/analytics.js +6 -2
- package/dist/types/schemas/campaign.d.ts +120 -120
- package/dist/types/schemas/campaign.js +3 -3
- package/dist/ui/campaign-builder.html +45 -28
- package/dist/ui/dashboard.html +124 -133
- package/dist/ui/member-profile.html +50 -33
- package/dist/ui/rewards-catalog.html +36 -19
- package/dist/ui/tier-visualizer.html +38 -21
- package/dist/ui/transaction-timeline.html +44 -27
- package/dist/utils/errors.js +4 -3
- package/package.json +3 -3
|
@@ -249,15 +249,15 @@ export declare const CampaignActivitySchema: z.ZodObject<{
|
|
|
249
249
|
}>;
|
|
250
250
|
export type CampaignActivity = z.infer<typeof CampaignActivitySchema>;
|
|
251
251
|
export declare const CampaignVisibilitySchema: z.ZodObject<{
|
|
252
|
-
target: z.ZodEnum<["
|
|
252
|
+
target: z.ZodEnum<["none", "tier", "segment"]>;
|
|
253
253
|
tiers: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
|
|
254
254
|
segments: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
|
|
255
255
|
}, "strip", z.ZodTypeAny, {
|
|
256
|
-
target: "
|
|
256
|
+
target: "none" | "tier" | "segment";
|
|
257
257
|
tiers?: string[] | undefined;
|
|
258
258
|
segments?: string[] | undefined;
|
|
259
259
|
}, {
|
|
260
|
-
target: "
|
|
260
|
+
target: "none" | "tier" | "segment";
|
|
261
261
|
tiers?: string[] | undefined;
|
|
262
262
|
segments?: string[] | undefined;
|
|
263
263
|
}>;
|
|
@@ -277,39 +277,39 @@ export declare const CampaignAudienceSchema: z.ZodObject<{
|
|
|
277
277
|
}>;
|
|
278
278
|
export type CampaignAudience = z.infer<typeof CampaignAudienceSchema>;
|
|
279
279
|
export declare const CampaignLimitIntervalSchema: z.ZodObject<{
|
|
280
|
-
type: z.ZodEnum<["
|
|
281
|
-
value: z.
|
|
280
|
+
type: z.ZodEnum<["calendarHours", "calendarDays", "calendarWeeks", "calendarMonths", "calendarYears"]>;
|
|
281
|
+
value: z.ZodNumber;
|
|
282
282
|
}, "strip", z.ZodTypeAny, {
|
|
283
|
-
|
|
284
|
-
|
|
283
|
+
value: number;
|
|
284
|
+
type: "calendarHours" | "calendarDays" | "calendarWeeks" | "calendarMonths" | "calendarYears";
|
|
285
285
|
}, {
|
|
286
|
-
|
|
287
|
-
|
|
286
|
+
value: number;
|
|
287
|
+
type: "calendarHours" | "calendarDays" | "calendarWeeks" | "calendarMonths" | "calendarYears";
|
|
288
288
|
}>;
|
|
289
289
|
export type CampaignLimitInterval = z.infer<typeof CampaignLimitIntervalSchema>;
|
|
290
290
|
export declare const CampaignLimitValueSchema: z.ZodObject<{
|
|
291
291
|
value: z.ZodNumber;
|
|
292
292
|
interval: z.ZodOptional<z.ZodObject<{
|
|
293
|
-
type: z.ZodEnum<["
|
|
294
|
-
value: z.
|
|
293
|
+
type: z.ZodEnum<["calendarHours", "calendarDays", "calendarWeeks", "calendarMonths", "calendarYears"]>;
|
|
294
|
+
value: z.ZodNumber;
|
|
295
295
|
}, "strip", z.ZodTypeAny, {
|
|
296
|
-
|
|
297
|
-
|
|
296
|
+
value: number;
|
|
297
|
+
type: "calendarHours" | "calendarDays" | "calendarWeeks" | "calendarMonths" | "calendarYears";
|
|
298
298
|
}, {
|
|
299
|
-
|
|
300
|
-
|
|
299
|
+
value: number;
|
|
300
|
+
type: "calendarHours" | "calendarDays" | "calendarWeeks" | "calendarMonths" | "calendarYears";
|
|
301
301
|
}>>;
|
|
302
302
|
}, "strip", z.ZodTypeAny, {
|
|
303
303
|
value: number;
|
|
304
304
|
interval?: {
|
|
305
|
-
|
|
306
|
-
|
|
305
|
+
value: number;
|
|
306
|
+
type: "calendarHours" | "calendarDays" | "calendarWeeks" | "calendarMonths" | "calendarYears";
|
|
307
307
|
} | undefined;
|
|
308
308
|
}, {
|
|
309
309
|
value: number;
|
|
310
310
|
interval?: {
|
|
311
|
-
|
|
312
|
-
|
|
311
|
+
value: number;
|
|
312
|
+
type: "calendarHours" | "calendarDays" | "calendarWeeks" | "calendarMonths" | "calendarYears";
|
|
313
313
|
} | undefined;
|
|
314
314
|
}>;
|
|
315
315
|
export type CampaignLimitValue = z.infer<typeof CampaignLimitValueSchema>;
|
|
@@ -317,120 +317,120 @@ export declare const CampaignLimitsSchema: z.ZodObject<{
|
|
|
317
317
|
points: z.ZodOptional<z.ZodObject<{
|
|
318
318
|
value: z.ZodNumber;
|
|
319
319
|
interval: z.ZodOptional<z.ZodObject<{
|
|
320
|
-
type: z.ZodEnum<["
|
|
321
|
-
value: z.
|
|
320
|
+
type: z.ZodEnum<["calendarHours", "calendarDays", "calendarWeeks", "calendarMonths", "calendarYears"]>;
|
|
321
|
+
value: z.ZodNumber;
|
|
322
322
|
}, "strip", z.ZodTypeAny, {
|
|
323
|
-
|
|
324
|
-
|
|
323
|
+
value: number;
|
|
324
|
+
type: "calendarHours" | "calendarDays" | "calendarWeeks" | "calendarMonths" | "calendarYears";
|
|
325
325
|
}, {
|
|
326
|
-
|
|
327
|
-
|
|
326
|
+
value: number;
|
|
327
|
+
type: "calendarHours" | "calendarDays" | "calendarWeeks" | "calendarMonths" | "calendarYears";
|
|
328
328
|
}>>;
|
|
329
329
|
}, "strip", z.ZodTypeAny, {
|
|
330
330
|
value: number;
|
|
331
331
|
interval?: {
|
|
332
|
-
|
|
333
|
-
|
|
332
|
+
value: number;
|
|
333
|
+
type: "calendarHours" | "calendarDays" | "calendarWeeks" | "calendarMonths" | "calendarYears";
|
|
334
334
|
} | undefined;
|
|
335
335
|
}, {
|
|
336
336
|
value: number;
|
|
337
337
|
interval?: {
|
|
338
|
-
|
|
339
|
-
|
|
338
|
+
value: number;
|
|
339
|
+
type: "calendarHours" | "calendarDays" | "calendarWeeks" | "calendarMonths" | "calendarYears";
|
|
340
340
|
} | undefined;
|
|
341
341
|
}>>;
|
|
342
342
|
pointsPerMember: z.ZodOptional<z.ZodObject<{
|
|
343
343
|
value: z.ZodNumber;
|
|
344
344
|
interval: z.ZodOptional<z.ZodObject<{
|
|
345
|
-
type: z.ZodEnum<["
|
|
346
|
-
value: z.
|
|
345
|
+
type: z.ZodEnum<["calendarHours", "calendarDays", "calendarWeeks", "calendarMonths", "calendarYears"]>;
|
|
346
|
+
value: z.ZodNumber;
|
|
347
347
|
}, "strip", z.ZodTypeAny, {
|
|
348
|
-
|
|
349
|
-
|
|
348
|
+
value: number;
|
|
349
|
+
type: "calendarHours" | "calendarDays" | "calendarWeeks" | "calendarMonths" | "calendarYears";
|
|
350
350
|
}, {
|
|
351
|
-
|
|
352
|
-
|
|
351
|
+
value: number;
|
|
352
|
+
type: "calendarHours" | "calendarDays" | "calendarWeeks" | "calendarMonths" | "calendarYears";
|
|
353
353
|
}>>;
|
|
354
354
|
}, "strip", z.ZodTypeAny, {
|
|
355
355
|
value: number;
|
|
356
356
|
interval?: {
|
|
357
|
-
|
|
358
|
-
|
|
357
|
+
value: number;
|
|
358
|
+
type: "calendarHours" | "calendarDays" | "calendarWeeks" | "calendarMonths" | "calendarYears";
|
|
359
359
|
} | undefined;
|
|
360
360
|
}, {
|
|
361
361
|
value: number;
|
|
362
362
|
interval?: {
|
|
363
|
-
|
|
364
|
-
|
|
363
|
+
value: number;
|
|
364
|
+
type: "calendarHours" | "calendarDays" | "calendarWeeks" | "calendarMonths" | "calendarYears";
|
|
365
365
|
} | undefined;
|
|
366
366
|
}>>;
|
|
367
367
|
executionsPerMember: z.ZodOptional<z.ZodObject<{
|
|
368
368
|
value: z.ZodNumber;
|
|
369
369
|
interval: z.ZodOptional<z.ZodObject<{
|
|
370
|
-
type: z.ZodEnum<["
|
|
371
|
-
value: z.
|
|
370
|
+
type: z.ZodEnum<["calendarHours", "calendarDays", "calendarWeeks", "calendarMonths", "calendarYears"]>;
|
|
371
|
+
value: z.ZodNumber;
|
|
372
372
|
}, "strip", z.ZodTypeAny, {
|
|
373
|
-
|
|
374
|
-
|
|
373
|
+
value: number;
|
|
374
|
+
type: "calendarHours" | "calendarDays" | "calendarWeeks" | "calendarMonths" | "calendarYears";
|
|
375
375
|
}, {
|
|
376
|
-
|
|
377
|
-
|
|
376
|
+
value: number;
|
|
377
|
+
type: "calendarHours" | "calendarDays" | "calendarWeeks" | "calendarMonths" | "calendarYears";
|
|
378
378
|
}>>;
|
|
379
379
|
}, "strip", z.ZodTypeAny, {
|
|
380
380
|
value: number;
|
|
381
381
|
interval?: {
|
|
382
|
-
|
|
383
|
-
|
|
382
|
+
value: number;
|
|
383
|
+
type: "calendarHours" | "calendarDays" | "calendarWeeks" | "calendarMonths" | "calendarYears";
|
|
384
384
|
} | undefined;
|
|
385
385
|
}, {
|
|
386
386
|
value: number;
|
|
387
387
|
interval?: {
|
|
388
|
-
|
|
389
|
-
|
|
388
|
+
value: number;
|
|
389
|
+
type: "calendarHours" | "calendarDays" | "calendarWeeks" | "calendarMonths" | "calendarYears";
|
|
390
390
|
} | undefined;
|
|
391
391
|
}>>;
|
|
392
392
|
}, "strip", z.ZodTypeAny, {
|
|
393
393
|
points?: {
|
|
394
394
|
value: number;
|
|
395
395
|
interval?: {
|
|
396
|
-
|
|
397
|
-
|
|
396
|
+
value: number;
|
|
397
|
+
type: "calendarHours" | "calendarDays" | "calendarWeeks" | "calendarMonths" | "calendarYears";
|
|
398
398
|
} | undefined;
|
|
399
399
|
} | undefined;
|
|
400
400
|
pointsPerMember?: {
|
|
401
401
|
value: number;
|
|
402
402
|
interval?: {
|
|
403
|
-
|
|
404
|
-
|
|
403
|
+
value: number;
|
|
404
|
+
type: "calendarHours" | "calendarDays" | "calendarWeeks" | "calendarMonths" | "calendarYears";
|
|
405
405
|
} | undefined;
|
|
406
406
|
} | undefined;
|
|
407
407
|
executionsPerMember?: {
|
|
408
408
|
value: number;
|
|
409
409
|
interval?: {
|
|
410
|
-
|
|
411
|
-
|
|
410
|
+
value: number;
|
|
411
|
+
type: "calendarHours" | "calendarDays" | "calendarWeeks" | "calendarMonths" | "calendarYears";
|
|
412
412
|
} | undefined;
|
|
413
413
|
} | undefined;
|
|
414
414
|
}, {
|
|
415
415
|
points?: {
|
|
416
416
|
value: number;
|
|
417
417
|
interval?: {
|
|
418
|
-
|
|
419
|
-
|
|
418
|
+
value: number;
|
|
419
|
+
type: "calendarHours" | "calendarDays" | "calendarWeeks" | "calendarMonths" | "calendarYears";
|
|
420
420
|
} | undefined;
|
|
421
421
|
} | undefined;
|
|
422
422
|
pointsPerMember?: {
|
|
423
423
|
value: number;
|
|
424
424
|
interval?: {
|
|
425
|
-
|
|
426
|
-
|
|
425
|
+
value: number;
|
|
426
|
+
type: "calendarHours" | "calendarDays" | "calendarWeeks" | "calendarMonths" | "calendarYears";
|
|
427
427
|
} | undefined;
|
|
428
428
|
} | undefined;
|
|
429
429
|
executionsPerMember?: {
|
|
430
430
|
value: number;
|
|
431
431
|
interval?: {
|
|
432
|
-
|
|
433
|
-
|
|
432
|
+
value: number;
|
|
433
|
+
type: "calendarHours" | "calendarDays" | "calendarWeeks" | "calendarMonths" | "calendarYears";
|
|
434
434
|
} | undefined;
|
|
435
435
|
} | undefined;
|
|
436
436
|
}>;
|
|
@@ -729,15 +729,15 @@ export declare const CampaignSchema: z.ZodObject<{
|
|
|
729
729
|
target?: "self" | "referrer" | undefined;
|
|
730
730
|
}>, "many">;
|
|
731
731
|
visibility: z.ZodOptional<z.ZodObject<{
|
|
732
|
-
target: z.ZodEnum<["
|
|
732
|
+
target: z.ZodEnum<["none", "tier", "segment"]>;
|
|
733
733
|
tiers: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
|
|
734
734
|
segments: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
|
|
735
735
|
}, "strip", z.ZodTypeAny, {
|
|
736
|
-
target: "
|
|
736
|
+
target: "none" | "tier" | "segment";
|
|
737
737
|
tiers?: string[] | undefined;
|
|
738
738
|
segments?: string[] | undefined;
|
|
739
739
|
}, {
|
|
740
|
-
target: "
|
|
740
|
+
target: "none" | "tier" | "segment";
|
|
741
741
|
tiers?: string[] | undefined;
|
|
742
742
|
segments?: string[] | undefined;
|
|
743
743
|
}>>;
|
|
@@ -758,120 +758,120 @@ export declare const CampaignSchema: z.ZodObject<{
|
|
|
758
758
|
points: z.ZodOptional<z.ZodObject<{
|
|
759
759
|
value: z.ZodNumber;
|
|
760
760
|
interval: z.ZodOptional<z.ZodObject<{
|
|
761
|
-
type: z.ZodEnum<["
|
|
762
|
-
value: z.
|
|
761
|
+
type: z.ZodEnum<["calendarHours", "calendarDays", "calendarWeeks", "calendarMonths", "calendarYears"]>;
|
|
762
|
+
value: z.ZodNumber;
|
|
763
763
|
}, "strip", z.ZodTypeAny, {
|
|
764
|
-
|
|
765
|
-
|
|
764
|
+
value: number;
|
|
765
|
+
type: "calendarHours" | "calendarDays" | "calendarWeeks" | "calendarMonths" | "calendarYears";
|
|
766
766
|
}, {
|
|
767
|
-
|
|
768
|
-
|
|
767
|
+
value: number;
|
|
768
|
+
type: "calendarHours" | "calendarDays" | "calendarWeeks" | "calendarMonths" | "calendarYears";
|
|
769
769
|
}>>;
|
|
770
770
|
}, "strip", z.ZodTypeAny, {
|
|
771
771
|
value: number;
|
|
772
772
|
interval?: {
|
|
773
|
-
|
|
774
|
-
|
|
773
|
+
value: number;
|
|
774
|
+
type: "calendarHours" | "calendarDays" | "calendarWeeks" | "calendarMonths" | "calendarYears";
|
|
775
775
|
} | undefined;
|
|
776
776
|
}, {
|
|
777
777
|
value: number;
|
|
778
778
|
interval?: {
|
|
779
|
-
|
|
780
|
-
|
|
779
|
+
value: number;
|
|
780
|
+
type: "calendarHours" | "calendarDays" | "calendarWeeks" | "calendarMonths" | "calendarYears";
|
|
781
781
|
} | undefined;
|
|
782
782
|
}>>;
|
|
783
783
|
pointsPerMember: z.ZodOptional<z.ZodObject<{
|
|
784
784
|
value: z.ZodNumber;
|
|
785
785
|
interval: z.ZodOptional<z.ZodObject<{
|
|
786
|
-
type: z.ZodEnum<["
|
|
787
|
-
value: z.
|
|
786
|
+
type: z.ZodEnum<["calendarHours", "calendarDays", "calendarWeeks", "calendarMonths", "calendarYears"]>;
|
|
787
|
+
value: z.ZodNumber;
|
|
788
788
|
}, "strip", z.ZodTypeAny, {
|
|
789
|
-
|
|
790
|
-
|
|
789
|
+
value: number;
|
|
790
|
+
type: "calendarHours" | "calendarDays" | "calendarWeeks" | "calendarMonths" | "calendarYears";
|
|
791
791
|
}, {
|
|
792
|
-
|
|
793
|
-
|
|
792
|
+
value: number;
|
|
793
|
+
type: "calendarHours" | "calendarDays" | "calendarWeeks" | "calendarMonths" | "calendarYears";
|
|
794
794
|
}>>;
|
|
795
795
|
}, "strip", z.ZodTypeAny, {
|
|
796
796
|
value: number;
|
|
797
797
|
interval?: {
|
|
798
|
-
|
|
799
|
-
|
|
798
|
+
value: number;
|
|
799
|
+
type: "calendarHours" | "calendarDays" | "calendarWeeks" | "calendarMonths" | "calendarYears";
|
|
800
800
|
} | undefined;
|
|
801
801
|
}, {
|
|
802
802
|
value: number;
|
|
803
803
|
interval?: {
|
|
804
|
-
|
|
805
|
-
|
|
804
|
+
value: number;
|
|
805
|
+
type: "calendarHours" | "calendarDays" | "calendarWeeks" | "calendarMonths" | "calendarYears";
|
|
806
806
|
} | undefined;
|
|
807
807
|
}>>;
|
|
808
808
|
executionsPerMember: z.ZodOptional<z.ZodObject<{
|
|
809
809
|
value: z.ZodNumber;
|
|
810
810
|
interval: z.ZodOptional<z.ZodObject<{
|
|
811
|
-
type: z.ZodEnum<["
|
|
812
|
-
value: z.
|
|
811
|
+
type: z.ZodEnum<["calendarHours", "calendarDays", "calendarWeeks", "calendarMonths", "calendarYears"]>;
|
|
812
|
+
value: z.ZodNumber;
|
|
813
813
|
}, "strip", z.ZodTypeAny, {
|
|
814
|
-
|
|
815
|
-
|
|
814
|
+
value: number;
|
|
815
|
+
type: "calendarHours" | "calendarDays" | "calendarWeeks" | "calendarMonths" | "calendarYears";
|
|
816
816
|
}, {
|
|
817
|
-
|
|
818
|
-
|
|
817
|
+
value: number;
|
|
818
|
+
type: "calendarHours" | "calendarDays" | "calendarWeeks" | "calendarMonths" | "calendarYears";
|
|
819
819
|
}>>;
|
|
820
820
|
}, "strip", z.ZodTypeAny, {
|
|
821
821
|
value: number;
|
|
822
822
|
interval?: {
|
|
823
|
-
|
|
824
|
-
|
|
823
|
+
value: number;
|
|
824
|
+
type: "calendarHours" | "calendarDays" | "calendarWeeks" | "calendarMonths" | "calendarYears";
|
|
825
825
|
} | undefined;
|
|
826
826
|
}, {
|
|
827
827
|
value: number;
|
|
828
828
|
interval?: {
|
|
829
|
-
|
|
830
|
-
|
|
829
|
+
value: number;
|
|
830
|
+
type: "calendarHours" | "calendarDays" | "calendarWeeks" | "calendarMonths" | "calendarYears";
|
|
831
831
|
} | undefined;
|
|
832
832
|
}>>;
|
|
833
833
|
}, "strip", z.ZodTypeAny, {
|
|
834
834
|
points?: {
|
|
835
835
|
value: number;
|
|
836
836
|
interval?: {
|
|
837
|
-
|
|
838
|
-
|
|
837
|
+
value: number;
|
|
838
|
+
type: "calendarHours" | "calendarDays" | "calendarWeeks" | "calendarMonths" | "calendarYears";
|
|
839
839
|
} | undefined;
|
|
840
840
|
} | undefined;
|
|
841
841
|
pointsPerMember?: {
|
|
842
842
|
value: number;
|
|
843
843
|
interval?: {
|
|
844
|
-
|
|
845
|
-
|
|
844
|
+
value: number;
|
|
845
|
+
type: "calendarHours" | "calendarDays" | "calendarWeeks" | "calendarMonths" | "calendarYears";
|
|
846
846
|
} | undefined;
|
|
847
847
|
} | undefined;
|
|
848
848
|
executionsPerMember?: {
|
|
849
849
|
value: number;
|
|
850
850
|
interval?: {
|
|
851
|
-
|
|
852
|
-
|
|
851
|
+
value: number;
|
|
852
|
+
type: "calendarHours" | "calendarDays" | "calendarWeeks" | "calendarMonths" | "calendarYears";
|
|
853
853
|
} | undefined;
|
|
854
854
|
} | undefined;
|
|
855
855
|
}, {
|
|
856
856
|
points?: {
|
|
857
857
|
value: number;
|
|
858
858
|
interval?: {
|
|
859
|
-
|
|
860
|
-
|
|
859
|
+
value: number;
|
|
860
|
+
type: "calendarHours" | "calendarDays" | "calendarWeeks" | "calendarMonths" | "calendarYears";
|
|
861
861
|
} | undefined;
|
|
862
862
|
} | undefined;
|
|
863
863
|
pointsPerMember?: {
|
|
864
864
|
value: number;
|
|
865
865
|
interval?: {
|
|
866
|
-
|
|
867
|
-
|
|
866
|
+
value: number;
|
|
867
|
+
type: "calendarHours" | "calendarDays" | "calendarWeeks" | "calendarMonths" | "calendarYears";
|
|
868
868
|
} | undefined;
|
|
869
869
|
} | undefined;
|
|
870
870
|
executionsPerMember?: {
|
|
871
871
|
value: number;
|
|
872
872
|
interval?: {
|
|
873
|
-
|
|
874
|
-
|
|
873
|
+
value: number;
|
|
874
|
+
type: "calendarHours" | "calendarDays" | "calendarWeeks" | "calendarMonths" | "calendarYears";
|
|
875
875
|
} | undefined;
|
|
876
876
|
} | undefined;
|
|
877
877
|
}>>;
|
|
@@ -1016,22 +1016,22 @@ export declare const CampaignSchema: z.ZodObject<{
|
|
|
1016
1016
|
points?: {
|
|
1017
1017
|
value: number;
|
|
1018
1018
|
interval?: {
|
|
1019
|
-
|
|
1020
|
-
|
|
1019
|
+
value: number;
|
|
1020
|
+
type: "calendarHours" | "calendarDays" | "calendarWeeks" | "calendarMonths" | "calendarYears";
|
|
1021
1021
|
} | undefined;
|
|
1022
1022
|
} | undefined;
|
|
1023
1023
|
pointsPerMember?: {
|
|
1024
1024
|
value: number;
|
|
1025
1025
|
interval?: {
|
|
1026
|
-
|
|
1027
|
-
|
|
1026
|
+
value: number;
|
|
1027
|
+
type: "calendarHours" | "calendarDays" | "calendarWeeks" | "calendarMonths" | "calendarYears";
|
|
1028
1028
|
} | undefined;
|
|
1029
1029
|
} | undefined;
|
|
1030
1030
|
executionsPerMember?: {
|
|
1031
1031
|
value: number;
|
|
1032
1032
|
interval?: {
|
|
1033
|
-
|
|
1034
|
-
|
|
1033
|
+
value: number;
|
|
1034
|
+
type: "calendarHours" | "calendarDays" | "calendarWeeks" | "calendarMonths" | "calendarYears";
|
|
1035
1035
|
} | undefined;
|
|
1036
1036
|
} | undefined;
|
|
1037
1037
|
} | undefined;
|
|
@@ -1040,7 +1040,7 @@ export declare const CampaignSchema: z.ZodObject<{
|
|
|
1040
1040
|
endsAt?: string | undefined;
|
|
1041
1041
|
} | undefined;
|
|
1042
1042
|
visibility?: {
|
|
1043
|
-
target: "
|
|
1043
|
+
target: "none" | "tier" | "segment";
|
|
1044
1044
|
tiers?: string[] | undefined;
|
|
1045
1045
|
segments?: string[] | undefined;
|
|
1046
1046
|
} | undefined;
|
|
@@ -1116,22 +1116,22 @@ export declare const CampaignSchema: z.ZodObject<{
|
|
|
1116
1116
|
points?: {
|
|
1117
1117
|
value: number;
|
|
1118
1118
|
interval?: {
|
|
1119
|
-
|
|
1120
|
-
|
|
1119
|
+
value: number;
|
|
1120
|
+
type: "calendarHours" | "calendarDays" | "calendarWeeks" | "calendarMonths" | "calendarYears";
|
|
1121
1121
|
} | undefined;
|
|
1122
1122
|
} | undefined;
|
|
1123
1123
|
pointsPerMember?: {
|
|
1124
1124
|
value: number;
|
|
1125
1125
|
interval?: {
|
|
1126
|
-
|
|
1127
|
-
|
|
1126
|
+
value: number;
|
|
1127
|
+
type: "calendarHours" | "calendarDays" | "calendarWeeks" | "calendarMonths" | "calendarYears";
|
|
1128
1128
|
} | undefined;
|
|
1129
1129
|
} | undefined;
|
|
1130
1130
|
executionsPerMember?: {
|
|
1131
1131
|
value: number;
|
|
1132
1132
|
interval?: {
|
|
1133
|
-
|
|
1134
|
-
|
|
1133
|
+
value: number;
|
|
1134
|
+
type: "calendarHours" | "calendarDays" | "calendarWeeks" | "calendarMonths" | "calendarYears";
|
|
1135
1135
|
} | undefined;
|
|
1136
1136
|
} | undefined;
|
|
1137
1137
|
} | undefined;
|
|
@@ -1140,7 +1140,7 @@ export declare const CampaignSchema: z.ZodObject<{
|
|
|
1140
1140
|
endsAt?: string | undefined;
|
|
1141
1141
|
} | undefined;
|
|
1142
1142
|
visibility?: {
|
|
1143
|
-
target: "
|
|
1143
|
+
target: "none" | "tier" | "segment";
|
|
1144
1144
|
tiers?: string[] | undefined;
|
|
1145
1145
|
segments?: string[] | undefined;
|
|
1146
1146
|
} | undefined;
|
|
@@ -68,7 +68,7 @@ export const CampaignActivitySchema = z.object({
|
|
|
68
68
|
});
|
|
69
69
|
// Campaign Visibility Schema (who can see the campaign)
|
|
70
70
|
export const CampaignVisibilitySchema = z.object({
|
|
71
|
-
target: z.enum(["
|
|
71
|
+
target: z.enum(["none", "tier", "segment"]),
|
|
72
72
|
tiers: z.array(z.string()).optional(),
|
|
73
73
|
segments: z.array(z.string()).optional(),
|
|
74
74
|
});
|
|
@@ -80,8 +80,8 @@ export const CampaignAudienceSchema = z.object({
|
|
|
80
80
|
});
|
|
81
81
|
// Limit Interval Schema
|
|
82
82
|
export const CampaignLimitIntervalSchema = z.object({
|
|
83
|
-
type: z.enum(["
|
|
84
|
-
value: z.number()
|
|
83
|
+
type: z.enum(["calendarHours", "calendarDays", "calendarWeeks", "calendarMonths", "calendarYears"]),
|
|
84
|
+
value: z.number(),
|
|
85
85
|
});
|
|
86
86
|
// Limit Value Schema
|
|
87
87
|
export const CampaignLimitValueSchema = z.object({
|