@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.
- package/README.md +180 -177
- package/dist/auth/provider.js +2 -14
- package/dist/auth/storage.js +22 -0
- package/dist/client/http.d.ts +5 -0
- package/dist/client/http.js +62 -3
- package/dist/config.d.ts +6 -5
- package/dist/config.js +15 -11
- package/dist/http.js +170 -65
- package/dist/instructions.d.ts +5 -0
- package/dist/instructions.js +420 -0
- package/dist/prompts/fan-engagement-setup.d.ts +107 -0
- package/dist/prompts/fan-engagement-setup.js +492 -0
- package/dist/server.d.ts +1 -1
- package/dist/server.js +68 -278
- package/dist/tools/achievement/handlers.d.ts +117 -0
- package/dist/tools/achievement/handlers.js +161 -0
- package/dist/tools/achievement/index.d.ts +479 -0
- package/dist/tools/achievement/index.js +74 -0
- package/dist/tools/achievement/schemas.d.ts +433 -0
- package/dist/tools/achievement/schemas.js +142 -0
- package/dist/tools/achievement.d.ts +155 -121
- package/dist/tools/achievement.js +82 -39
- package/dist/tools/admin.d.ts +18 -6
- package/dist/tools/admin.js +24 -12
- package/dist/tools/analytics.d.ts +29 -11
- package/dist/tools/analytics.js +58 -48
- package/dist/tools/apikey.d.ts +10 -3
- package/dist/tools/apikey.js +13 -6
- package/dist/tools/audit.d.ts +6 -2
- package/dist/tools/audit.js +8 -4
- package/dist/tools/badge.d.ts +14 -6
- package/dist/tools/badge.js +36 -27
- package/dist/tools/campaign/handlers.d.ts +42 -0
- package/dist/tools/campaign/handlers.js +223 -0
- package/dist/tools/campaign/index.d.ts +783 -0
- package/dist/tools/campaign/index.js +112 -0
- package/dist/tools/campaign/member-handlers.d.ts +60 -0
- package/dist/tools/campaign/member-handlers.js +159 -0
- package/dist/tools/campaign/schemas.d.ts +704 -0
- package/dist/tools/campaign/schemas.js +259 -0
- package/dist/tools/campaign/types.d.ts +161 -0
- package/dist/tools/campaign/types.js +2 -0
- package/dist/tools/campaign.d.ts +41 -16
- package/dist/tools/campaign.js +38 -25
- package/dist/tools/custom-event.d.ts +315 -0
- package/dist/tools/custom-event.js +270 -0
- package/dist/tools/export.d.ts +12 -4
- package/dist/tools/export.js +25 -20
- package/dist/tools/import.d.ts +9 -3
- package/dist/tools/import.js +33 -21
- package/dist/tools/index.d.ts +3 -11
- package/dist/tools/index.js +17 -475
- package/dist/tools/member/handlers.d.ts +111 -0
- package/dist/tools/member/handlers.js +206 -0
- package/dist/tools/member/index.d.ts +169 -0
- package/dist/tools/member/index.js +92 -0
- package/dist/tools/member/schemas.d.ts +89 -0
- package/dist/tools/member/schemas.js +65 -0
- package/dist/tools/member.d.ts +21 -0
- package/dist/tools/member.js +56 -62
- package/dist/tools/points.d.ts +19 -6
- package/dist/tools/points.js +51 -49
- package/dist/tools/referral/handlers.d.ts +47 -0
- package/dist/tools/referral/handlers.js +115 -0
- package/dist/tools/referral/index.d.ts +44 -0
- package/dist/tools/referral/index.js +44 -0
- package/dist/tools/referral/schemas.d.ts +34 -0
- package/dist/tools/referral/schemas.js +52 -0
- package/dist/tools/reward/handlers.d.ts +110 -0
- package/dist/tools/reward/handlers.js +289 -0
- package/dist/tools/reward/index.d.ts +177 -0
- package/dist/tools/reward/index.js +90 -0
- package/dist/tools/reward/schemas.d.ts +116 -0
- package/dist/tools/reward/schemas.js +91 -0
- package/dist/tools/reward.d.ts +18 -0
- package/dist/tools/reward.js +56 -66
- package/dist/tools/role.d.ts +26 -7
- package/dist/tools/role.js +25 -12
- package/dist/tools/segment/handlers.d.ts +87 -0
- package/dist/tools/segment/handlers.js +174 -0
- package/dist/tools/segment/index.d.ts +395 -0
- package/dist/tools/segment/index.js +87 -0
- package/dist/tools/segment/schemas.d.ts +337 -0
- package/dist/tools/segment/schemas.js +79 -0
- package/dist/tools/segment.d.ts +29 -10
- package/dist/tools/segment.js +84 -50
- package/dist/tools/store.d.ts +12 -4
- package/dist/tools/store.js +16 -8
- package/dist/tools/tierset.d.ts +19 -7
- package/dist/tools/tierset.js +44 -35
- package/dist/tools/transaction.d.ts +16 -8
- package/dist/tools/transaction.js +25 -21
- package/dist/tools/wallet-type.d.ts +7 -3
- package/dist/tools/wallet-type.js +14 -12
- package/dist/tools/webhook.d.ts +23 -10
- package/dist/tools/webhook.js +135 -33
- package/dist/types/schemas/achievement.d.ts +12 -309
- package/dist/types/schemas/achievement.js +0 -13
- package/dist/types/schemas/admin.d.ts +10 -97
- package/dist/types/schemas/admin.js +0 -38
- package/dist/types/schemas/badge.d.ts +0 -37
- package/dist/types/schemas/badge.js +0 -11
- package/dist/types/schemas/campaign.d.ts +64 -832
- package/dist/types/schemas/campaign.js +2 -25
- package/dist/types/schemas/common.d.ts +5 -0
- package/dist/types/schemas/common.js +5 -0
- package/dist/types/schemas/export.d.ts +0 -17
- package/dist/types/schemas/export.js +0 -7
- package/dist/types/schemas/member.d.ts +37 -176
- package/dist/types/schemas/member.js +0 -27
- package/dist/types/schemas/points.d.ts +0 -63
- package/dist/types/schemas/points.js +0 -22
- package/dist/types/schemas/reward.d.ts +71 -68
- package/dist/types/schemas/reward.js +8 -28
- package/dist/types/schemas/role.d.ts +0 -100
- package/dist/types/schemas/role.js +0 -29
- package/dist/types/schemas/segment.d.ts +0 -58
- package/dist/types/schemas/segment.js +0 -17
- package/dist/types/schemas/tierset.d.ts +0 -176
- package/dist/types/schemas/tierset.js +0 -27
- package/dist/types/schemas/transaction.d.ts +23 -254
- package/dist/types/schemas/transaction.js +0 -7
- package/dist/types/schemas/wallet-type.d.ts +8 -8
- package/dist/types/schemas/wallet-type.js +1 -1
- package/dist/types/schemas/webhook.d.ts +0 -58
- package/dist/types/schemas/webhook.js +0 -12
- package/dist/utils/errors.js +30 -3
- package/dist/utils/payload.d.ts +12 -0
- package/dist/utils/payload.js +14 -0
- package/dist/workflows/app-login-streak.d.ts +39 -0
- package/dist/workflows/app-login-streak.js +298 -0
- package/dist/workflows/early-arrival.d.ts +33 -0
- package/dist/workflows/early-arrival.js +148 -0
- package/dist/workflows/index.d.ts +101 -0
- package/dist/workflows/index.js +208 -0
- package/dist/workflows/match-attendance.d.ts +45 -0
- package/dist/workflows/match-attendance.js +308 -0
- package/dist/workflows/sportsbar-visit.d.ts +41 -0
- package/dist/workflows/sportsbar-visit.js +284 -0
- package/dist/workflows/vod-watching.d.ts +43 -0
- package/dist/workflows/vod-watching.js +326 -0
- package/package.json +10 -2
|
@@ -607,303 +607,6 @@ export declare const AchievementListItemSchema: z.ZodObject<{
|
|
|
607
607
|
badgeTypeId?: string | undefined;
|
|
608
608
|
}>;
|
|
609
609
|
export type AchievementListItem = z.infer<typeof AchievementListItemSchema>;
|
|
610
|
-
/**
|
|
611
|
-
* Achievement Create Input Schema.
|
|
612
|
-
* Matches the POST /api/{storeCode}/achievement body structure.
|
|
613
|
-
* IMPORTANT: Request must be wrapped as { achievement: {...} }
|
|
614
|
-
*/
|
|
615
|
-
export declare const AchievementCreateInputSchema: z.ZodObject<{
|
|
616
|
-
translations: z.ZodRecord<z.ZodString, z.ZodObject<{
|
|
617
|
-
name: z.ZodString;
|
|
618
|
-
description: z.ZodOptional<z.ZodString>;
|
|
619
|
-
}, "strip", z.ZodTypeAny, {
|
|
620
|
-
name: string;
|
|
621
|
-
description?: string | undefined;
|
|
622
|
-
}, {
|
|
623
|
-
name: string;
|
|
624
|
-
description?: string | undefined;
|
|
625
|
-
}>>;
|
|
626
|
-
active: z.ZodOptional<z.ZodBoolean>;
|
|
627
|
-
activity: z.ZodOptional<z.ZodObject<{
|
|
628
|
-
startsAt: z.ZodOptional<z.ZodString>;
|
|
629
|
-
endsAt: z.ZodOptional<z.ZodString>;
|
|
630
|
-
data: z.ZodOptional<z.ZodString>;
|
|
631
|
-
operator: z.ZodOptional<z.ZodString>;
|
|
632
|
-
}, "strip", z.ZodTypeAny, {
|
|
633
|
-
data?: string | undefined;
|
|
634
|
-
operator?: string | undefined;
|
|
635
|
-
startsAt?: string | undefined;
|
|
636
|
-
endsAt?: string | undefined;
|
|
637
|
-
}, {
|
|
638
|
-
data?: string | undefined;
|
|
639
|
-
operator?: string | undefined;
|
|
640
|
-
startsAt?: string | undefined;
|
|
641
|
-
endsAt?: string | undefined;
|
|
642
|
-
}>>;
|
|
643
|
-
limit: z.ZodOptional<z.ZodObject<{
|
|
644
|
-
value: z.ZodOptional<z.ZodNumber>;
|
|
645
|
-
interval: z.ZodOptional<z.ZodObject<{
|
|
646
|
-
type: z.ZodString;
|
|
647
|
-
value: z.ZodOptional<z.ZodNumber>;
|
|
648
|
-
}, "strip", z.ZodTypeAny, {
|
|
649
|
-
type: string;
|
|
650
|
-
value?: number | undefined;
|
|
651
|
-
}, {
|
|
652
|
-
type: string;
|
|
653
|
-
value?: number | undefined;
|
|
654
|
-
}>>;
|
|
655
|
-
}, "strip", z.ZodTypeAny, {
|
|
656
|
-
value?: number | undefined;
|
|
657
|
-
interval?: {
|
|
658
|
-
type: string;
|
|
659
|
-
value?: number | undefined;
|
|
660
|
-
} | undefined;
|
|
661
|
-
}, {
|
|
662
|
-
value?: number | undefined;
|
|
663
|
-
interval?: {
|
|
664
|
-
type: string;
|
|
665
|
-
value?: number | undefined;
|
|
666
|
-
} | undefined;
|
|
667
|
-
}>>;
|
|
668
|
-
rules: z.ZodArray<z.ZodObject<{
|
|
669
|
-
achievementRuleId: z.ZodOptional<z.ZodString>;
|
|
670
|
-
translations: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodObject<{
|
|
671
|
-
name: z.ZodString;
|
|
672
|
-
description: z.ZodOptional<z.ZodString>;
|
|
673
|
-
}, "strip", z.ZodTypeAny, {
|
|
674
|
-
name: string;
|
|
675
|
-
description?: string | undefined;
|
|
676
|
-
}, {
|
|
677
|
-
name: string;
|
|
678
|
-
description?: string | undefined;
|
|
679
|
-
}>>>;
|
|
680
|
-
trigger: z.ZodOptional<z.ZodString>;
|
|
681
|
-
type: z.ZodOptional<z.ZodString>;
|
|
682
|
-
event: z.ZodOptional<z.ZodString>;
|
|
683
|
-
completeRule: z.ZodObject<{
|
|
684
|
-
periodGoal: z.ZodUnion<[z.ZodNumber, z.ZodString]>;
|
|
685
|
-
period: z.ZodOptional<z.ZodObject<{
|
|
686
|
-
consecutive: z.ZodOptional<z.ZodNumber>;
|
|
687
|
-
value: z.ZodOptional<z.ZodNumber>;
|
|
688
|
-
}, "strip", z.ZodTypeAny, {
|
|
689
|
-
value?: number | undefined;
|
|
690
|
-
consecutive?: number | undefined;
|
|
691
|
-
}, {
|
|
692
|
-
value?: number | undefined;
|
|
693
|
-
consecutive?: number | undefined;
|
|
694
|
-
}>>;
|
|
695
|
-
uniqueAttribute: z.ZodOptional<z.ZodString>;
|
|
696
|
-
}, "strip", z.ZodTypeAny, {
|
|
697
|
-
periodGoal: string | number;
|
|
698
|
-
period?: {
|
|
699
|
-
value?: number | undefined;
|
|
700
|
-
consecutive?: number | undefined;
|
|
701
|
-
} | undefined;
|
|
702
|
-
uniqueAttribute?: string | undefined;
|
|
703
|
-
}, {
|
|
704
|
-
periodGoal: string | number;
|
|
705
|
-
period?: {
|
|
706
|
-
value?: number | undefined;
|
|
707
|
-
consecutive?: number | undefined;
|
|
708
|
-
} | undefined;
|
|
709
|
-
uniqueAttribute?: string | undefined;
|
|
710
|
-
}>;
|
|
711
|
-
aggregation: z.ZodOptional<z.ZodObject<{
|
|
712
|
-
rule: z.ZodOptional<z.ZodString>;
|
|
713
|
-
}, "strip", z.ZodTypeAny, {
|
|
714
|
-
rule?: string | undefined;
|
|
715
|
-
}, {
|
|
716
|
-
rule?: string | undefined;
|
|
717
|
-
}>>;
|
|
718
|
-
conditions: z.ZodOptional<z.ZodArray<z.ZodRecord<z.ZodString, z.ZodUnknown>, "many">>;
|
|
719
|
-
limit: z.ZodOptional<z.ZodObject<{
|
|
720
|
-
value: z.ZodOptional<z.ZodNumber>;
|
|
721
|
-
interval: z.ZodOptional<z.ZodObject<{
|
|
722
|
-
type: z.ZodString;
|
|
723
|
-
value: z.ZodOptional<z.ZodNumber>;
|
|
724
|
-
}, "strip", z.ZodTypeAny, {
|
|
725
|
-
type: string;
|
|
726
|
-
value?: number | undefined;
|
|
727
|
-
}, {
|
|
728
|
-
type: string;
|
|
729
|
-
value?: number | undefined;
|
|
730
|
-
}>>;
|
|
731
|
-
}, "strip", z.ZodTypeAny, {
|
|
732
|
-
value?: number | undefined;
|
|
733
|
-
interval?: {
|
|
734
|
-
type: string;
|
|
735
|
-
value?: number | undefined;
|
|
736
|
-
} | undefined;
|
|
737
|
-
}, {
|
|
738
|
-
value?: number | undefined;
|
|
739
|
-
interval?: {
|
|
740
|
-
type: string;
|
|
741
|
-
value?: number | undefined;
|
|
742
|
-
} | undefined;
|
|
743
|
-
}>>;
|
|
744
|
-
uniqueReferee: z.ZodOptional<z.ZodBoolean>;
|
|
745
|
-
}, "strip", z.ZodTypeAny, {
|
|
746
|
-
completeRule: {
|
|
747
|
-
periodGoal: string | number;
|
|
748
|
-
period?: {
|
|
749
|
-
value?: number | undefined;
|
|
750
|
-
consecutive?: number | undefined;
|
|
751
|
-
} | undefined;
|
|
752
|
-
uniqueAttribute?: string | undefined;
|
|
753
|
-
};
|
|
754
|
-
type?: string | undefined;
|
|
755
|
-
conditions?: Record<string, unknown>[] | undefined;
|
|
756
|
-
translations?: Record<string, {
|
|
757
|
-
name: string;
|
|
758
|
-
description?: string | undefined;
|
|
759
|
-
}> | undefined;
|
|
760
|
-
trigger?: string | undefined;
|
|
761
|
-
event?: string | undefined;
|
|
762
|
-
achievementRuleId?: string | undefined;
|
|
763
|
-
aggregation?: {
|
|
764
|
-
rule?: string | undefined;
|
|
765
|
-
} | undefined;
|
|
766
|
-
limit?: {
|
|
767
|
-
value?: number | undefined;
|
|
768
|
-
interval?: {
|
|
769
|
-
type: string;
|
|
770
|
-
value?: number | undefined;
|
|
771
|
-
} | undefined;
|
|
772
|
-
} | undefined;
|
|
773
|
-
uniqueReferee?: boolean | undefined;
|
|
774
|
-
}, {
|
|
775
|
-
completeRule: {
|
|
776
|
-
periodGoal: string | number;
|
|
777
|
-
period?: {
|
|
778
|
-
value?: number | undefined;
|
|
779
|
-
consecutive?: number | undefined;
|
|
780
|
-
} | undefined;
|
|
781
|
-
uniqueAttribute?: string | undefined;
|
|
782
|
-
};
|
|
783
|
-
type?: string | undefined;
|
|
784
|
-
conditions?: Record<string, unknown>[] | undefined;
|
|
785
|
-
translations?: Record<string, {
|
|
786
|
-
name: string;
|
|
787
|
-
description?: string | undefined;
|
|
788
|
-
}> | undefined;
|
|
789
|
-
trigger?: string | undefined;
|
|
790
|
-
event?: string | undefined;
|
|
791
|
-
achievementRuleId?: string | undefined;
|
|
792
|
-
aggregation?: {
|
|
793
|
-
rule?: string | undefined;
|
|
794
|
-
} | undefined;
|
|
795
|
-
limit?: {
|
|
796
|
-
value?: number | undefined;
|
|
797
|
-
interval?: {
|
|
798
|
-
type: string;
|
|
799
|
-
value?: number | undefined;
|
|
800
|
-
} | undefined;
|
|
801
|
-
} | undefined;
|
|
802
|
-
uniqueReferee?: boolean | undefined;
|
|
803
|
-
}>, "many">;
|
|
804
|
-
badgeTypeId: z.ZodOptional<z.ZodString>;
|
|
805
|
-
}, "strip", z.ZodTypeAny, {
|
|
806
|
-
translations: Record<string, {
|
|
807
|
-
name: string;
|
|
808
|
-
description?: string | undefined;
|
|
809
|
-
}>;
|
|
810
|
-
rules: {
|
|
811
|
-
completeRule: {
|
|
812
|
-
periodGoal: string | number;
|
|
813
|
-
period?: {
|
|
814
|
-
value?: number | undefined;
|
|
815
|
-
consecutive?: number | undefined;
|
|
816
|
-
} | undefined;
|
|
817
|
-
uniqueAttribute?: string | undefined;
|
|
818
|
-
};
|
|
819
|
-
type?: string | undefined;
|
|
820
|
-
conditions?: Record<string, unknown>[] | undefined;
|
|
821
|
-
translations?: Record<string, {
|
|
822
|
-
name: string;
|
|
823
|
-
description?: string | undefined;
|
|
824
|
-
}> | undefined;
|
|
825
|
-
trigger?: string | undefined;
|
|
826
|
-
event?: string | undefined;
|
|
827
|
-
achievementRuleId?: string | undefined;
|
|
828
|
-
aggregation?: {
|
|
829
|
-
rule?: string | undefined;
|
|
830
|
-
} | undefined;
|
|
831
|
-
limit?: {
|
|
832
|
-
value?: number | undefined;
|
|
833
|
-
interval?: {
|
|
834
|
-
type: string;
|
|
835
|
-
value?: number | undefined;
|
|
836
|
-
} | undefined;
|
|
837
|
-
} | undefined;
|
|
838
|
-
uniqueReferee?: boolean | undefined;
|
|
839
|
-
}[];
|
|
840
|
-
active?: boolean | undefined;
|
|
841
|
-
activity?: {
|
|
842
|
-
data?: string | undefined;
|
|
843
|
-
operator?: string | undefined;
|
|
844
|
-
startsAt?: string | undefined;
|
|
845
|
-
endsAt?: string | undefined;
|
|
846
|
-
} | undefined;
|
|
847
|
-
limit?: {
|
|
848
|
-
value?: number | undefined;
|
|
849
|
-
interval?: {
|
|
850
|
-
type: string;
|
|
851
|
-
value?: number | undefined;
|
|
852
|
-
} | undefined;
|
|
853
|
-
} | undefined;
|
|
854
|
-
badgeTypeId?: string | undefined;
|
|
855
|
-
}, {
|
|
856
|
-
translations: Record<string, {
|
|
857
|
-
name: string;
|
|
858
|
-
description?: string | undefined;
|
|
859
|
-
}>;
|
|
860
|
-
rules: {
|
|
861
|
-
completeRule: {
|
|
862
|
-
periodGoal: string | number;
|
|
863
|
-
period?: {
|
|
864
|
-
value?: number | undefined;
|
|
865
|
-
consecutive?: number | undefined;
|
|
866
|
-
} | undefined;
|
|
867
|
-
uniqueAttribute?: string | undefined;
|
|
868
|
-
};
|
|
869
|
-
type?: string | undefined;
|
|
870
|
-
conditions?: Record<string, unknown>[] | undefined;
|
|
871
|
-
translations?: Record<string, {
|
|
872
|
-
name: string;
|
|
873
|
-
description?: string | undefined;
|
|
874
|
-
}> | undefined;
|
|
875
|
-
trigger?: string | undefined;
|
|
876
|
-
event?: string | undefined;
|
|
877
|
-
achievementRuleId?: string | undefined;
|
|
878
|
-
aggregation?: {
|
|
879
|
-
rule?: string | undefined;
|
|
880
|
-
} | undefined;
|
|
881
|
-
limit?: {
|
|
882
|
-
value?: number | undefined;
|
|
883
|
-
interval?: {
|
|
884
|
-
type: string;
|
|
885
|
-
value?: number | undefined;
|
|
886
|
-
} | undefined;
|
|
887
|
-
} | undefined;
|
|
888
|
-
uniqueReferee?: boolean | undefined;
|
|
889
|
-
}[];
|
|
890
|
-
active?: boolean | undefined;
|
|
891
|
-
activity?: {
|
|
892
|
-
data?: string | undefined;
|
|
893
|
-
operator?: string | undefined;
|
|
894
|
-
startsAt?: string | undefined;
|
|
895
|
-
endsAt?: string | undefined;
|
|
896
|
-
} | undefined;
|
|
897
|
-
limit?: {
|
|
898
|
-
value?: number | undefined;
|
|
899
|
-
interval?: {
|
|
900
|
-
type: string;
|
|
901
|
-
value?: number | undefined;
|
|
902
|
-
} | undefined;
|
|
903
|
-
} | undefined;
|
|
904
|
-
badgeTypeId?: string | undefined;
|
|
905
|
-
}>;
|
|
906
|
-
export type AchievementCreateInput = z.infer<typeof AchievementCreateInputSchema>;
|
|
907
610
|
/**
|
|
908
611
|
* Achievement Rule Progress Schema.
|
|
909
612
|
* Tracks a member's progress on a single rule.
|
|
@@ -919,8 +622,8 @@ export declare const AchievementRuleProgressSchema: z.ZodObject<{
|
|
|
919
622
|
trigger: z.ZodOptional<z.ZodString>;
|
|
920
623
|
periodValue: z.ZodOptional<z.ZodNumber>;
|
|
921
624
|
}, "strip", z.ZodTypeAny, {
|
|
922
|
-
periodGoal: number;
|
|
923
625
|
achievementRuleId: string;
|
|
626
|
+
periodGoal: number;
|
|
924
627
|
currentPeriodValue: number;
|
|
925
628
|
type?: string | undefined;
|
|
926
629
|
trigger?: string | undefined;
|
|
@@ -929,8 +632,8 @@ export declare const AchievementRuleProgressSchema: z.ZodObject<{
|
|
|
929
632
|
periodType?: string | undefined;
|
|
930
633
|
periodValue?: number | undefined;
|
|
931
634
|
}, {
|
|
932
|
-
periodGoal: number;
|
|
933
635
|
achievementRuleId: string;
|
|
636
|
+
periodGoal: number;
|
|
934
637
|
currentPeriodValue: number;
|
|
935
638
|
type?: string | undefined;
|
|
936
639
|
trigger?: string | undefined;
|
|
@@ -957,8 +660,8 @@ export declare const AchievementMemberProgressSchema: z.ZodObject<{
|
|
|
957
660
|
trigger: z.ZodOptional<z.ZodString>;
|
|
958
661
|
periodValue: z.ZodOptional<z.ZodNumber>;
|
|
959
662
|
}, "strip", z.ZodTypeAny, {
|
|
960
|
-
periodGoal: number;
|
|
961
663
|
achievementRuleId: string;
|
|
664
|
+
periodGoal: number;
|
|
962
665
|
currentPeriodValue: number;
|
|
963
666
|
type?: string | undefined;
|
|
964
667
|
trigger?: string | undefined;
|
|
@@ -967,8 +670,8 @@ export declare const AchievementMemberProgressSchema: z.ZodObject<{
|
|
|
967
670
|
periodType?: string | undefined;
|
|
968
671
|
periodValue?: number | undefined;
|
|
969
672
|
}, {
|
|
970
|
-
periodGoal: number;
|
|
971
673
|
achievementRuleId: string;
|
|
674
|
+
periodGoal: number;
|
|
972
675
|
currentPeriodValue: number;
|
|
973
676
|
type?: string | undefined;
|
|
974
677
|
trigger?: string | undefined;
|
|
@@ -979,8 +682,8 @@ export declare const AchievementMemberProgressSchema: z.ZodObject<{
|
|
|
979
682
|
}>, "many">;
|
|
980
683
|
}, "strip", z.ZodTypeAny, {
|
|
981
684
|
rules: {
|
|
982
|
-
periodGoal: number;
|
|
983
685
|
achievementRuleId: string;
|
|
686
|
+
periodGoal: number;
|
|
984
687
|
currentPeriodValue: number;
|
|
985
688
|
type?: string | undefined;
|
|
986
689
|
trigger?: string | undefined;
|
|
@@ -992,8 +695,8 @@ export declare const AchievementMemberProgressSchema: z.ZodObject<{
|
|
|
992
695
|
completedCount: number;
|
|
993
696
|
}, {
|
|
994
697
|
rules: {
|
|
995
|
-
periodGoal: number;
|
|
996
698
|
achievementRuleId: string;
|
|
699
|
+
periodGoal: number;
|
|
997
700
|
currentPeriodValue: number;
|
|
998
701
|
type?: string | undefined;
|
|
999
702
|
trigger?: string | undefined;
|
|
@@ -1027,8 +730,8 @@ export declare const AchievementProgressSchema: z.ZodObject<{
|
|
|
1027
730
|
trigger: z.ZodOptional<z.ZodString>;
|
|
1028
731
|
periodValue: z.ZodOptional<z.ZodNumber>;
|
|
1029
732
|
}, "strip", z.ZodTypeAny, {
|
|
1030
|
-
periodGoal: number;
|
|
1031
733
|
achievementRuleId: string;
|
|
734
|
+
periodGoal: number;
|
|
1032
735
|
currentPeriodValue: number;
|
|
1033
736
|
type?: string | undefined;
|
|
1034
737
|
trigger?: string | undefined;
|
|
@@ -1037,8 +740,8 @@ export declare const AchievementProgressSchema: z.ZodObject<{
|
|
|
1037
740
|
periodType?: string | undefined;
|
|
1038
741
|
periodValue?: number | undefined;
|
|
1039
742
|
}, {
|
|
1040
|
-
periodGoal: number;
|
|
1041
743
|
achievementRuleId: string;
|
|
744
|
+
periodGoal: number;
|
|
1042
745
|
currentPeriodValue: number;
|
|
1043
746
|
type?: string | undefined;
|
|
1044
747
|
trigger?: string | undefined;
|
|
@@ -1049,8 +752,8 @@ export declare const AchievementProgressSchema: z.ZodObject<{
|
|
|
1049
752
|
}>, "many">;
|
|
1050
753
|
}, "strip", z.ZodTypeAny, {
|
|
1051
754
|
rules: {
|
|
1052
|
-
periodGoal: number;
|
|
1053
755
|
achievementRuleId: string;
|
|
756
|
+
periodGoal: number;
|
|
1054
757
|
currentPeriodValue: number;
|
|
1055
758
|
type?: string | undefined;
|
|
1056
759
|
trigger?: string | undefined;
|
|
@@ -1062,8 +765,8 @@ export declare const AchievementProgressSchema: z.ZodObject<{
|
|
|
1062
765
|
completedCount: number;
|
|
1063
766
|
}, {
|
|
1064
767
|
rules: {
|
|
1065
|
-
periodGoal: number;
|
|
1066
768
|
achievementRuleId: string;
|
|
769
|
+
periodGoal: number;
|
|
1067
770
|
currentPeriodValue: number;
|
|
1068
771
|
type?: string | undefined;
|
|
1069
772
|
trigger?: string | undefined;
|
|
@@ -1078,8 +781,8 @@ export declare const AchievementProgressSchema: z.ZodObject<{
|
|
|
1078
781
|
achievementId: string;
|
|
1079
782
|
memberProgress: {
|
|
1080
783
|
rules: {
|
|
1081
|
-
periodGoal: number;
|
|
1082
784
|
achievementRuleId: string;
|
|
785
|
+
periodGoal: number;
|
|
1083
786
|
currentPeriodValue: number;
|
|
1084
787
|
type?: string | undefined;
|
|
1085
788
|
trigger?: string | undefined;
|
|
@@ -1097,8 +800,8 @@ export declare const AchievementProgressSchema: z.ZodObject<{
|
|
|
1097
800
|
achievementId: string;
|
|
1098
801
|
memberProgress: {
|
|
1099
802
|
rules: {
|
|
1100
|
-
periodGoal: number;
|
|
1101
803
|
achievementRuleId: string;
|
|
804
|
+
periodGoal: number;
|
|
1102
805
|
currentPeriodValue: number;
|
|
1103
806
|
type?: string | undefined;
|
|
1104
807
|
trigger?: string | undefined;
|
|
@@ -123,19 +123,6 @@ export const AchievementListItemSchema = z.object({
|
|
|
123
123
|
createdAt: z.string().optional(),
|
|
124
124
|
badgeTypeId: z.string().optional(),
|
|
125
125
|
});
|
|
126
|
-
/**
|
|
127
|
-
* Achievement Create Input Schema.
|
|
128
|
-
* Matches the POST /api/{storeCode}/achievement body structure.
|
|
129
|
-
* IMPORTANT: Request must be wrapped as { achievement: {...} }
|
|
130
|
-
*/
|
|
131
|
-
export const AchievementCreateInputSchema = z.object({
|
|
132
|
-
translations: TranslationsSchema.describe("Achievement name and description (at least 'en' required)."),
|
|
133
|
-
active: z.boolean().optional().describe("Whether achievement is active (default: false)."),
|
|
134
|
-
activity: AchievementActivitySchema.optional().describe("Time period configuration."),
|
|
135
|
-
limit: AchievementLimitSchema.optional().describe("Limit configuration."),
|
|
136
|
-
rules: z.array(AchievementRuleSchema).describe("Achievement rules."),
|
|
137
|
-
badgeTypeId: z.string().optional().describe("Badge type to award."),
|
|
138
|
-
});
|
|
139
126
|
/**
|
|
140
127
|
* Achievement Rule Progress Schema.
|
|
141
128
|
* Tracks a member's progress on a single rule.
|
|
@@ -79,12 +79,12 @@ export declare const AdminUserSchema: z.ZodObject<{
|
|
|
79
79
|
createdAt: z.ZodOptional<z.ZodString>;
|
|
80
80
|
dtype: z.ZodOptional<z.ZodString>;
|
|
81
81
|
}, "strip", z.ZodTypeAny, {
|
|
82
|
-
createdAt?: string | undefined;
|
|
83
|
-
id?: string | undefined;
|
|
84
82
|
email?: string | undefined;
|
|
83
|
+
phone?: string | undefined;
|
|
85
84
|
firstName?: string | undefined;
|
|
86
85
|
lastName?: string | undefined;
|
|
87
|
-
|
|
86
|
+
createdAt?: string | undefined;
|
|
87
|
+
id?: string | undefined;
|
|
88
88
|
adminId?: string | undefined;
|
|
89
89
|
username?: string | undefined;
|
|
90
90
|
isActive?: boolean | undefined;
|
|
@@ -102,12 +102,12 @@ export declare const AdminUserSchema: z.ZodObject<{
|
|
|
102
102
|
} | undefined;
|
|
103
103
|
dtype?: string | undefined;
|
|
104
104
|
}, {
|
|
105
|
-
createdAt?: string | undefined;
|
|
106
|
-
id?: string | undefined;
|
|
107
105
|
email?: string | undefined;
|
|
106
|
+
phone?: string | undefined;
|
|
108
107
|
firstName?: string | undefined;
|
|
109
108
|
lastName?: string | undefined;
|
|
110
|
-
|
|
109
|
+
createdAt?: string | undefined;
|
|
110
|
+
id?: string | undefined;
|
|
111
111
|
adminId?: string | undefined;
|
|
112
112
|
username?: string | undefined;
|
|
113
113
|
isActive?: boolean | undefined;
|
|
@@ -139,95 +139,23 @@ export declare const AdminUserListItemSchema: z.ZodObject<{
|
|
|
139
139
|
isActive: z.ZodOptional<z.ZodBoolean>;
|
|
140
140
|
createdAt: z.ZodOptional<z.ZodString>;
|
|
141
141
|
}, "strip", z.ZodTypeAny, {
|
|
142
|
-
createdAt?: string | undefined;
|
|
143
|
-
id?: string | undefined;
|
|
144
142
|
email?: string | undefined;
|
|
145
143
|
firstName?: string | undefined;
|
|
146
144
|
lastName?: string | undefined;
|
|
147
|
-
username?: string | undefined;
|
|
148
|
-
isActive?: boolean | undefined;
|
|
149
|
-
}, {
|
|
150
145
|
createdAt?: string | undefined;
|
|
151
146
|
id?: string | undefined;
|
|
152
|
-
email?: string | undefined;
|
|
153
|
-
firstName?: string | undefined;
|
|
154
|
-
lastName?: string | undefined;
|
|
155
147
|
username?: string | undefined;
|
|
156
148
|
isActive?: boolean | undefined;
|
|
157
|
-
}>;
|
|
158
|
-
export type AdminUserListItem = z.infer<typeof AdminUserListItemSchema>;
|
|
159
|
-
/**
|
|
160
|
-
* Admin User Create Input Schema.
|
|
161
|
-
* Input for POST /api/admin/data - uses { admin: {...} } wrapper
|
|
162
|
-
*/
|
|
163
|
-
export declare const AdminUserCreateInputSchema: z.ZodObject<{
|
|
164
|
-
email: z.ZodString;
|
|
165
|
-
plainPassword: z.ZodString;
|
|
166
|
-
firstName: z.ZodOptional<z.ZodString>;
|
|
167
|
-
lastName: z.ZodOptional<z.ZodString>;
|
|
168
|
-
phone: z.ZodOptional<z.ZodString>;
|
|
169
|
-
roles: z.ZodOptional<z.ZodArray<z.ZodUnion<[z.ZodString, z.ZodNumber]>, "many">>;
|
|
170
|
-
isActive: z.ZodOptional<z.ZodBoolean>;
|
|
171
|
-
external: z.ZodOptional<z.ZodBoolean>;
|
|
172
|
-
notificationsEnabled: z.ZodOptional<z.ZodBoolean>;
|
|
173
|
-
}, "strip", z.ZodTypeAny, {
|
|
174
|
-
email: string;
|
|
175
|
-
plainPassword: string;
|
|
176
|
-
firstName?: string | undefined;
|
|
177
|
-
lastName?: string | undefined;
|
|
178
|
-
phone?: string | undefined;
|
|
179
|
-
notificationsEnabled?: boolean | undefined;
|
|
180
|
-
isActive?: boolean | undefined;
|
|
181
|
-
external?: boolean | undefined;
|
|
182
|
-
roles?: (string | number)[] | undefined;
|
|
183
|
-
}, {
|
|
184
|
-
email: string;
|
|
185
|
-
plainPassword: string;
|
|
186
|
-
firstName?: string | undefined;
|
|
187
|
-
lastName?: string | undefined;
|
|
188
|
-
phone?: string | undefined;
|
|
189
|
-
notificationsEnabled?: boolean | undefined;
|
|
190
|
-
isActive?: boolean | undefined;
|
|
191
|
-
external?: boolean | undefined;
|
|
192
|
-
roles?: (string | number)[] | undefined;
|
|
193
|
-
}>;
|
|
194
|
-
export type AdminUserCreateInput = z.infer<typeof AdminUserCreateInputSchema>;
|
|
195
|
-
/**
|
|
196
|
-
* Admin User Update Input Schema.
|
|
197
|
-
* Input for PUT /api/admin/data/{adminId} - uses { admin: {...} } wrapper
|
|
198
|
-
*/
|
|
199
|
-
export declare const AdminUserUpdateInputSchema: z.ZodObject<{
|
|
200
|
-
email: z.ZodOptional<z.ZodString>;
|
|
201
|
-
firstName: z.ZodOptional<z.ZodString>;
|
|
202
|
-
lastName: z.ZodOptional<z.ZodString>;
|
|
203
|
-
phone: z.ZodOptional<z.ZodString>;
|
|
204
|
-
roles: z.ZodOptional<z.ZodArray<z.ZodUnion<[z.ZodString, z.ZodNumber]>, "many">>;
|
|
205
|
-
isActive: z.ZodOptional<z.ZodBoolean>;
|
|
206
|
-
external: z.ZodOptional<z.ZodBoolean>;
|
|
207
|
-
notificationsEnabled: z.ZodOptional<z.ZodBoolean>;
|
|
208
|
-
plainPassword: z.ZodOptional<z.ZodString>;
|
|
209
|
-
}, "strip", z.ZodTypeAny, {
|
|
210
|
-
email?: string | undefined;
|
|
211
|
-
firstName?: string | undefined;
|
|
212
|
-
lastName?: string | undefined;
|
|
213
|
-
phone?: string | undefined;
|
|
214
|
-
notificationsEnabled?: boolean | undefined;
|
|
215
|
-
isActive?: boolean | undefined;
|
|
216
|
-
external?: boolean | undefined;
|
|
217
|
-
roles?: (string | number)[] | undefined;
|
|
218
|
-
plainPassword?: string | undefined;
|
|
219
149
|
}, {
|
|
220
150
|
email?: string | undefined;
|
|
221
151
|
firstName?: string | undefined;
|
|
222
152
|
lastName?: string | undefined;
|
|
223
|
-
|
|
224
|
-
|
|
153
|
+
createdAt?: string | undefined;
|
|
154
|
+
id?: string | undefined;
|
|
155
|
+
username?: string | undefined;
|
|
225
156
|
isActive?: boolean | undefined;
|
|
226
|
-
external?: boolean | undefined;
|
|
227
|
-
roles?: (string | number)[] | undefined;
|
|
228
|
-
plainPassword?: string | undefined;
|
|
229
157
|
}>;
|
|
230
|
-
export type
|
|
158
|
+
export type AdminUserListItem = z.infer<typeof AdminUserListItemSchema>;
|
|
231
159
|
/**
|
|
232
160
|
* Admin Permission Schema.
|
|
233
161
|
* Represents admin permissions.
|
|
@@ -246,18 +174,3 @@ export declare const AdminPermissionSchema: z.ZodObject<{
|
|
|
246
174
|
permissions?: string[] | undefined;
|
|
247
175
|
}>;
|
|
248
176
|
export type AdminPermission = z.infer<typeof AdminPermissionSchema>;
|
|
249
|
-
/**
|
|
250
|
-
* Change Password Input Schema.
|
|
251
|
-
* Input for PUT /api/admin/password
|
|
252
|
-
*/
|
|
253
|
-
export declare const ChangePasswordInputSchema: z.ZodObject<{
|
|
254
|
-
currentPassword: z.ZodString;
|
|
255
|
-
plainPassword: z.ZodString;
|
|
256
|
-
}, "strip", z.ZodTypeAny, {
|
|
257
|
-
plainPassword: string;
|
|
258
|
-
currentPassword: string;
|
|
259
|
-
}, {
|
|
260
|
-
plainPassword: string;
|
|
261
|
-
currentPassword: string;
|
|
262
|
-
}>;
|
|
263
|
-
export type ChangePasswordInput = z.infer<typeof ChangePasswordInputSchema>;
|
|
@@ -50,36 +50,6 @@ export const AdminUserListItemSchema = z.object({
|
|
|
50
50
|
isActive: z.boolean().optional().describe("Whether admin account is active."),
|
|
51
51
|
createdAt: z.string().optional().describe("Account creation timestamp."),
|
|
52
52
|
});
|
|
53
|
-
/**
|
|
54
|
-
* Admin User Create Input Schema.
|
|
55
|
-
* Input for POST /api/admin/data - uses { admin: {...} } wrapper
|
|
56
|
-
*/
|
|
57
|
-
export const AdminUserCreateInputSchema = z.object({
|
|
58
|
-
email: z.string().describe("Admin email address (required)."),
|
|
59
|
-
plainPassword: z.string().describe("Admin password (required)."),
|
|
60
|
-
firstName: z.string().optional().describe("Admin first name."),
|
|
61
|
-
lastName: z.string().optional().describe("Admin last name."),
|
|
62
|
-
phone: z.string().optional().describe("Admin phone number."),
|
|
63
|
-
roles: z.array(z.union([z.string(), z.number()])).optional().describe("Role IDs to assign."),
|
|
64
|
-
isActive: z.boolean().optional().describe("Whether account is active (default: true)."),
|
|
65
|
-
external: z.boolean().optional().describe("Whether admin is external."),
|
|
66
|
-
notificationsEnabled: z.boolean().optional().describe("Whether notifications are enabled."),
|
|
67
|
-
});
|
|
68
|
-
/**
|
|
69
|
-
* Admin User Update Input Schema.
|
|
70
|
-
* Input for PUT /api/admin/data/{adminId} - uses { admin: {...} } wrapper
|
|
71
|
-
*/
|
|
72
|
-
export const AdminUserUpdateInputSchema = z.object({
|
|
73
|
-
email: z.string().optional().describe("Admin email address."),
|
|
74
|
-
firstName: z.string().optional().describe("Admin first name."),
|
|
75
|
-
lastName: z.string().optional().describe("Admin last name."),
|
|
76
|
-
phone: z.string().optional().describe("Admin phone number."),
|
|
77
|
-
roles: z.array(z.union([z.string(), z.number()])).optional().describe("Role IDs to assign."),
|
|
78
|
-
isActive: z.boolean().optional().describe("Whether account is active."),
|
|
79
|
-
external: z.boolean().optional().describe("Whether admin is external."),
|
|
80
|
-
notificationsEnabled: z.boolean().optional().describe("Whether notifications are enabled."),
|
|
81
|
-
plainPassword: z.string().optional().describe("New password (if changing)."),
|
|
82
|
-
});
|
|
83
53
|
/**
|
|
84
54
|
* Admin Permission Schema.
|
|
85
55
|
* Represents admin permissions.
|
|
@@ -89,11 +59,3 @@ export const AdminPermissionSchema = z.object({
|
|
|
89
59
|
roles: z.array(z.string()).optional().describe("List of role names."),
|
|
90
60
|
permissions: z.array(z.string()).optional().describe("List of permission strings."),
|
|
91
61
|
});
|
|
92
|
-
/**
|
|
93
|
-
* Change Password Input Schema.
|
|
94
|
-
* Input for PUT /api/admin/password
|
|
95
|
-
*/
|
|
96
|
-
export const ChangePasswordInputSchema = z.object({
|
|
97
|
-
currentPassword: z.string().describe("Current password."),
|
|
98
|
-
plainPassword: z.string().describe("New password."),
|
|
99
|
-
});
|
|
@@ -68,43 +68,6 @@ export declare const BadgeTypeListItemSchema: z.ZodObject<{
|
|
|
68
68
|
updatedAt?: string | undefined;
|
|
69
69
|
}>;
|
|
70
70
|
export type BadgeTypeListItem = z.infer<typeof BadgeTypeListItemSchema>;
|
|
71
|
-
/**
|
|
72
|
-
* Badge Type Create/Update Input Schema.
|
|
73
|
-
* Matches the PUT /api/{storeCode}/badge-type/{badgeTypeId} body structure.
|
|
74
|
-
* IMPORTANT: Request must be wrapped as { badgeType: {...} }
|
|
75
|
-
*/
|
|
76
|
-
export declare const BadgeTypeUpdateInputSchema: z.ZodObject<{
|
|
77
|
-
name: z.ZodOptional<z.ZodString>;
|
|
78
|
-
translations: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodObject<{
|
|
79
|
-
name: z.ZodString;
|
|
80
|
-
description: z.ZodOptional<z.ZodString>;
|
|
81
|
-
}, "strip", z.ZodTypeAny, {
|
|
82
|
-
name: string;
|
|
83
|
-
description?: string | undefined;
|
|
84
|
-
}, {
|
|
85
|
-
name: string;
|
|
86
|
-
description?: string | undefined;
|
|
87
|
-
}>>>;
|
|
88
|
-
imageUrl: z.ZodOptional<z.ZodString>;
|
|
89
|
-
active: z.ZodOptional<z.ZodBoolean>;
|
|
90
|
-
}, "strip", z.ZodTypeAny, {
|
|
91
|
-
name?: string | undefined;
|
|
92
|
-
active?: boolean | undefined;
|
|
93
|
-
translations?: Record<string, {
|
|
94
|
-
name: string;
|
|
95
|
-
description?: string | undefined;
|
|
96
|
-
}> | undefined;
|
|
97
|
-
imageUrl?: string | undefined;
|
|
98
|
-
}, {
|
|
99
|
-
name?: string | undefined;
|
|
100
|
-
active?: boolean | undefined;
|
|
101
|
-
translations?: Record<string, {
|
|
102
|
-
name: string;
|
|
103
|
-
description?: string | undefined;
|
|
104
|
-
}> | undefined;
|
|
105
|
-
imageUrl?: string | undefined;
|
|
106
|
-
}>;
|
|
107
|
-
export type BadgeTypeUpdateInput = z.infer<typeof BadgeTypeUpdateInputSchema>;
|
|
108
71
|
/**
|
|
109
72
|
* Member Badge Schema.
|
|
110
73
|
* Represents a member's earned badge.
|