@simonarcher/fika-types 1.0.46 → 1.0.48
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/actions.d.ts +21 -0
- package/dist/actions.js +27 -0
- package/dist/index.d.ts +2 -0
- package/dist/index.js +4 -0
- package/dist/loyalty.d.ts +23 -1
- package/dist/rewards.d.ts +28 -0
- package/dist/rewards.js +23 -0
- package/package.json +1 -1
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
export declare enum ActionEnum {
|
|
2
|
+
AddShop = "AddShop",
|
|
3
|
+
AddShopPhotos = "AddShopPhotos",
|
|
4
|
+
AddShopMenu = "AddShopMenu",
|
|
5
|
+
AddShopOpeningHours = "AddShopOpeningHours",
|
|
6
|
+
VisitNewShop = "VisitNewShop",
|
|
7
|
+
AddTip = "AddTip",
|
|
8
|
+
AddUsername = "AddUsername",
|
|
9
|
+
AddProfilePicture = "AddProfilePicture",
|
|
10
|
+
CheckInShop = "CheckInShop",
|
|
11
|
+
OrderFromShop = "OrderFromShop",
|
|
12
|
+
LikeShot = "LikeShot",
|
|
13
|
+
ReportShot = "ReportShot",
|
|
14
|
+
AddReview = "AddReview",
|
|
15
|
+
AwardStamp = "AwardStamp",
|
|
16
|
+
RedeemVoucher = "RedeemVoucher",
|
|
17
|
+
FavouriteShop = "FavouriteShop",
|
|
18
|
+
CompleteQuestStep = "CompleteQuestStep",
|
|
19
|
+
CompleteQuest = "CompleteQuest",
|
|
20
|
+
JoinQuest = "JoinQuest"
|
|
21
|
+
}
|
package/dist/actions.js
ADDED
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.ActionEnum = void 0;
|
|
4
|
+
var ActionEnum;
|
|
5
|
+
(function (ActionEnum) {
|
|
6
|
+
ActionEnum["AddShop"] = "AddShop";
|
|
7
|
+
ActionEnum["AddShopPhotos"] = "AddShopPhotos";
|
|
8
|
+
ActionEnum["AddShopMenu"] = "AddShopMenu";
|
|
9
|
+
ActionEnum["AddShopOpeningHours"] = "AddShopOpeningHours";
|
|
10
|
+
ActionEnum["VisitNewShop"] = "VisitNewShop";
|
|
11
|
+
ActionEnum["AddTip"] = "AddTip";
|
|
12
|
+
ActionEnum["AddUsername"] = "AddUsername";
|
|
13
|
+
ActionEnum["AddProfilePicture"] = "AddProfilePicture";
|
|
14
|
+
ActionEnum["CheckInShop"] = "CheckInShop";
|
|
15
|
+
ActionEnum["OrderFromShop"] = "OrderFromShop";
|
|
16
|
+
ActionEnum["LikeShot"] = "LikeShot";
|
|
17
|
+
ActionEnum["ReportShot"] = "ReportShot";
|
|
18
|
+
ActionEnum["AddReview"] = "AddReview";
|
|
19
|
+
ActionEnum["AwardStamp"] = "AwardStamp";
|
|
20
|
+
ActionEnum["RedeemVoucher"] = "RedeemVoucher";
|
|
21
|
+
ActionEnum["FavouriteShop"] = "FavouriteShop";
|
|
22
|
+
// Quest-related actions
|
|
23
|
+
ActionEnum["CompleteQuestStep"] = "CompleteQuestStep";
|
|
24
|
+
ActionEnum["CompleteQuest"] = "CompleteQuest";
|
|
25
|
+
ActionEnum["JoinQuest"] = "JoinQuest";
|
|
26
|
+
// Shop Order actions
|
|
27
|
+
})(ActionEnum || (exports.ActionEnum = ActionEnum = {}));
|
package/dist/index.d.ts
CHANGED
package/dist/index.js
CHANGED
|
@@ -34,3 +34,7 @@ __exportStar(require("./notificationChannels"), exports);
|
|
|
34
34
|
__exportStar(require("./userShopOrder"), exports);
|
|
35
35
|
// Export all loyalty-related types
|
|
36
36
|
__exportStar(require("./loyalty"), exports);
|
|
37
|
+
// Export all actions-related types
|
|
38
|
+
__exportStar(require("./actions"), exports);
|
|
39
|
+
// Export all rewards-related types
|
|
40
|
+
__exportStar(require("./rewards"), exports);
|
package/dist/loyalty.d.ts
CHANGED
|
@@ -17,6 +17,26 @@ export interface QRTokenPayload {
|
|
|
17
17
|
/** 6-digit backup verification code */
|
|
18
18
|
securityCode: string;
|
|
19
19
|
}
|
|
20
|
+
/**
|
|
21
|
+
* Enhanced stamp data for voucher storage
|
|
22
|
+
* Contains detailed information about each stamp used in a voucher
|
|
23
|
+
*/
|
|
24
|
+
export interface VoucherStampData {
|
|
25
|
+
/** Unique stamp identifier */
|
|
26
|
+
id: string;
|
|
27
|
+
/** Shop where stamp was earned */
|
|
28
|
+
shopId: string;
|
|
29
|
+
/** Staff member who awarded the stamp */
|
|
30
|
+
issuerId: string;
|
|
31
|
+
/** When stamp was created/awarded */
|
|
32
|
+
createdAt: AdminTimestamp;
|
|
33
|
+
/** Method of stamp award */
|
|
34
|
+
issueMethod: "app" | "nfc";
|
|
35
|
+
/** Type of stamp */
|
|
36
|
+
type: string;
|
|
37
|
+
/** User who earned the stamp */
|
|
38
|
+
userId: string;
|
|
39
|
+
}
|
|
20
40
|
/**
|
|
21
41
|
* Enhanced voucher document with QR token support
|
|
22
42
|
* Extends the basic voucher with security and redemption tracking
|
|
@@ -29,7 +49,7 @@ export interface LoyaltyVoucher {
|
|
|
29
49
|
/** Shop where voucher can be redeemed */
|
|
30
50
|
shopId: string;
|
|
31
51
|
/** Stamps used to create this voucher */
|
|
32
|
-
stamps:
|
|
52
|
+
stamps: VoucherStampData[];
|
|
33
53
|
/** When voucher was created */
|
|
34
54
|
createdAt: AdminTimestamp;
|
|
35
55
|
/** Whether voucher is still valid */
|
|
@@ -120,6 +140,8 @@ export interface RedeemVoucherResponse {
|
|
|
120
140
|
voucher?: LoyaltyVoucher;
|
|
121
141
|
/** User information */
|
|
122
142
|
user?: VoucherUserInfo;
|
|
143
|
+
/** Action ID for analytics and order association */
|
|
144
|
+
actionId?: string;
|
|
123
145
|
}
|
|
124
146
|
/**
|
|
125
147
|
* Response for voucher validation
|
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
export interface RewardData {
|
|
2
|
+
userId: string;
|
|
3
|
+
rewardAction: RewardAction;
|
|
4
|
+
rewardCategory: RewardCategory;
|
|
5
|
+
metadata?: any;
|
|
6
|
+
}
|
|
7
|
+
export declare enum RewardAction {
|
|
8
|
+
AddShop = "AddedShop",
|
|
9
|
+
CompletedProfile = "CompletedProfile",
|
|
10
|
+
NewShop = "NewShop",
|
|
11
|
+
UploadedShot = "UploadedShot",
|
|
12
|
+
NewCountry = "NewCountry",
|
|
13
|
+
QuestCompletion = "QuestCompletion",
|
|
14
|
+
QuestStepCompletion = "QuestStepCompletion",
|
|
15
|
+
QuestStreak = "QuestStreak"
|
|
16
|
+
}
|
|
17
|
+
export declare enum RewardCategory {
|
|
18
|
+
Shops = "Shops",
|
|
19
|
+
Countries = "Countries",
|
|
20
|
+
Special = "Special",
|
|
21
|
+
Quests = "Quests"
|
|
22
|
+
}
|
|
23
|
+
export interface RewardsPointsData {
|
|
24
|
+
userId: string;
|
|
25
|
+
action: string;
|
|
26
|
+
metadata?: any;
|
|
27
|
+
points?: number;
|
|
28
|
+
}
|
package/dist/rewards.js
ADDED
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.RewardCategory = exports.RewardAction = void 0;
|
|
4
|
+
var RewardAction;
|
|
5
|
+
(function (RewardAction) {
|
|
6
|
+
RewardAction["AddShop"] = "AddedShop";
|
|
7
|
+
RewardAction["CompletedProfile"] = "CompletedProfile";
|
|
8
|
+
RewardAction["NewShop"] = "NewShop";
|
|
9
|
+
RewardAction["UploadedShot"] = "UploadedShot";
|
|
10
|
+
RewardAction["NewCountry"] = "NewCountry";
|
|
11
|
+
// Quest-related rewards
|
|
12
|
+
RewardAction["QuestCompletion"] = "QuestCompletion";
|
|
13
|
+
RewardAction["QuestStepCompletion"] = "QuestStepCompletion";
|
|
14
|
+
RewardAction["QuestStreak"] = "QuestStreak";
|
|
15
|
+
})(RewardAction || (exports.RewardAction = RewardAction = {}));
|
|
16
|
+
var RewardCategory;
|
|
17
|
+
(function (RewardCategory) {
|
|
18
|
+
RewardCategory["Shops"] = "Shops";
|
|
19
|
+
RewardCategory["Countries"] = "Countries";
|
|
20
|
+
RewardCategory["Special"] = "Special";
|
|
21
|
+
// Quest-related rewards
|
|
22
|
+
RewardCategory["Quests"] = "Quests";
|
|
23
|
+
})(RewardCategory || (exports.RewardCategory = RewardCategory = {}));
|