@qrush/types 2.0.28 → 2.0.30
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/Common.d.ts +4 -0
- package/dist/Location.d.ts +2 -2
- package/dist/Promotion.d.ts +27 -32
- package/package.json +1 -1
package/dist/Common.d.ts
CHANGED
|
@@ -16,6 +16,10 @@ export type Features = {
|
|
|
16
16
|
hasIndoorArea: boolean;
|
|
17
17
|
paymentMethods: PaymentMethod[];
|
|
18
18
|
};
|
|
19
|
+
export interface DeviceInfo {
|
|
20
|
+
platform: 'ios' | 'android' | 'web';
|
|
21
|
+
appVersion?: string;
|
|
22
|
+
}
|
|
19
23
|
export type Address = {
|
|
20
24
|
street: string;
|
|
21
25
|
number: string;
|
package/dist/Location.d.ts
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { FireQueryDocSnapshotRef } from "./CustomDocType.js";
|
|
2
2
|
import { Location as BaseLocation, Features } from "./Common.js";
|
|
3
|
-
import {
|
|
3
|
+
import { PromotionTeaser } from "./Promotion.js";
|
|
4
4
|
export declare const LOCATION_TYPE_MAPPING: {
|
|
5
5
|
readonly Bar: "bars";
|
|
6
6
|
readonly Outdoor: "outdoor";
|
|
@@ -93,6 +93,6 @@ export type IFireLocation = {
|
|
|
93
93
|
activePromoterCount?: number;
|
|
94
94
|
totalEventsCreated?: number;
|
|
95
95
|
activeOwnerCount?: number;
|
|
96
|
-
|
|
96
|
+
promotionTeasers?: PromotionTeaser[];
|
|
97
97
|
};
|
|
98
98
|
export type FireLocationSnapshotRef = FireQueryDocSnapshotRef<IFireLocation>;
|
package/dist/Promotion.d.ts
CHANGED
|
@@ -1,6 +1,8 @@
|
|
|
1
1
|
import { Timestamp } from "@firebase/firestore";
|
|
2
|
+
import { DeviceInfo } from "./Common.js";
|
|
2
3
|
export type PromotionItemType = "shot" | "drink" | "beer" | "cocktail" | "entry" | "food" | "merch" | "vip" | "skipline" | "service";
|
|
3
4
|
export type PromotionDealType = "2for1" | "free" | "discount" | "upgrade" | "combo" | "happyhour";
|
|
5
|
+
export type OwnerType = "location" | "user";
|
|
4
6
|
export type PromotionStatus = "active" | "inactive" | "archived";
|
|
5
7
|
export interface CustomizationRules {
|
|
6
8
|
allowTitleEdit: boolean;
|
|
@@ -31,7 +33,7 @@ export interface PromotionTemplate {
|
|
|
31
33
|
}
|
|
32
34
|
export interface PromotionInstance {
|
|
33
35
|
id: string;
|
|
34
|
-
ownerType:
|
|
36
|
+
ownerType: OwnerType;
|
|
35
37
|
locationId?: string;
|
|
36
38
|
userId?: string;
|
|
37
39
|
templateId?: string;
|
|
@@ -59,18 +61,6 @@ export interface PromotionInstance {
|
|
|
59
61
|
/** @deprecated */
|
|
60
62
|
displayOrder?: number;
|
|
61
63
|
}
|
|
62
|
-
export interface PromotionRedemption {
|
|
63
|
-
id: string;
|
|
64
|
-
userId: string;
|
|
65
|
-
instanceId: string;
|
|
66
|
-
locationId: string;
|
|
67
|
-
eventId?: string;
|
|
68
|
-
promotionTitle: string;
|
|
69
|
-
itemType: PromotionItemType;
|
|
70
|
-
dealType?: PromotionDealType;
|
|
71
|
-
savingAmount: number;
|
|
72
|
-
redeemedAt: Timestamp;
|
|
73
|
-
}
|
|
74
64
|
export interface PromotionInstancePermission {
|
|
75
65
|
userId: string;
|
|
76
66
|
permissionType: 'promotion';
|
|
@@ -114,37 +104,21 @@ export interface LocationPermission {
|
|
|
114
104
|
revokedBy?: string;
|
|
115
105
|
revocationReason?: string;
|
|
116
106
|
}
|
|
117
|
-
/** @deprecated replaced with BaseActivePromotion */
|
|
118
|
-
export interface ActivePromotion {
|
|
119
|
-
instanceId: string;
|
|
120
|
-
ownerType: "location" | "user";
|
|
121
|
-
timeSlots?: TimeSlot[];
|
|
122
|
-
activeDays?: number[];
|
|
123
|
-
resetMinutes?: number;
|
|
124
|
-
resetTime?: number;
|
|
125
|
-
maxRedemptions?: number;
|
|
126
|
-
minRedemptions?: number;
|
|
127
|
-
displayOrder?: number;
|
|
128
|
-
titleSnapshot: string;
|
|
129
|
-
savingSnapshot: number;
|
|
130
|
-
descriptionSnapshot: string;
|
|
131
|
-
itemTypeSnapshot: PromotionItemType;
|
|
132
|
-
dealTypeSnapshot?: PromotionDealType;
|
|
133
|
-
resetMinutesSnapshot: number;
|
|
134
|
-
}
|
|
135
107
|
export interface TimeSlot {
|
|
136
108
|
from: Timestamp;
|
|
137
109
|
to: Timestamp;
|
|
138
110
|
}
|
|
139
111
|
export interface BaseActivePromotion {
|
|
140
112
|
instanceId: string;
|
|
141
|
-
|
|
113
|
+
templateId?: string;
|
|
114
|
+
ownerType: OwnerType;
|
|
142
115
|
titleSnapshot: string;
|
|
143
116
|
savingSnapshot: number;
|
|
144
117
|
descriptionSnapshot: string;
|
|
145
118
|
itemTypeSnapshot: PromotionItemType;
|
|
146
119
|
dealTypeSnapshot?: PromotionDealType;
|
|
147
120
|
resetMinutesSnapshot: number;
|
|
121
|
+
resetTime?: number;
|
|
148
122
|
timeSlots?: TimeSlot[];
|
|
149
123
|
maxRedemptions?: number;
|
|
150
124
|
displayOrder?: number;
|
|
@@ -168,4 +142,25 @@ export interface RedeemPromotionPayload {
|
|
|
168
142
|
instanceId: string;
|
|
169
143
|
locationId: string;
|
|
170
144
|
eventId?: string;
|
|
145
|
+
deviceInfo?: DeviceInfo;
|
|
146
|
+
clientIP?: string;
|
|
147
|
+
sessionId?: string;
|
|
148
|
+
}
|
|
149
|
+
export interface PromotionRedemption {
|
|
150
|
+
id: string;
|
|
151
|
+
userId: string;
|
|
152
|
+
instanceId: string;
|
|
153
|
+
ownerType: OwnerType;
|
|
154
|
+
templateId?: string;
|
|
155
|
+
locationId: string;
|
|
156
|
+
eventId?: string;
|
|
157
|
+
promotionTitle: string;
|
|
158
|
+
itemType: PromotionItemType;
|
|
159
|
+
dealType?: PromotionDealType;
|
|
160
|
+
savingAmount: number;
|
|
161
|
+
redeemedAt: Timestamp;
|
|
162
|
+
deviceInfo?: DeviceInfo;
|
|
163
|
+
clientIP?: string;
|
|
164
|
+
sessionId?: string;
|
|
165
|
+
appVersion?: string;
|
|
171
166
|
}
|