@qrush/types 2.0.29 → 2.0.31

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 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;
@@ -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: "location" | "user";
36
+ ownerType: OwnerType;
35
37
  locationId?: string;
36
38
  userId?: string;
37
39
  templateId?: string;
@@ -109,13 +111,14 @@ export interface TimeSlot {
109
111
  export interface BaseActivePromotion {
110
112
  instanceId: string;
111
113
  templateId?: string;
112
- ownerType: "location" | "user";
114
+ ownerType: OwnerType;
113
115
  titleSnapshot: string;
114
116
  savingSnapshot: number;
115
117
  descriptionSnapshot: string;
116
118
  itemTypeSnapshot: PromotionItemType;
117
119
  dealTypeSnapshot?: PromotionDealType;
118
120
  resetMinutesSnapshot: number;
121
+ resetTime?: number;
119
122
  timeSlots?: TimeSlot[];
120
123
  maxRedemptions?: number;
121
124
  displayOrder?: number;
@@ -139,11 +142,13 @@ export interface RedeemPromotionPayload {
139
142
  instanceId: string;
140
143
  locationId: string;
141
144
  eventId?: string;
145
+ deviceInfo?: DeviceInfo;
142
146
  }
143
147
  export interface PromotionRedemption {
144
148
  id: string;
145
149
  userId: string;
146
150
  instanceId: string;
151
+ ownerType: OwnerType;
147
152
  templateId?: string;
148
153
  locationId: string;
149
154
  eventId?: string;
@@ -152,4 +157,8 @@ export interface PromotionRedemption {
152
157
  dealType?: PromotionDealType;
153
158
  savingAmount: number;
154
159
  redeemedAt: Timestamp;
160
+ deviceInfo?: DeviceInfo;
161
+ clientIP?: string;
162
+ sessionId?: string;
163
+ appVersion?: string;
155
164
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@qrush/types",
3
- "version": "2.0.29",
3
+ "version": "2.0.31",
4
4
  "description": "Shared TypeScript types for the QRush ecosystem",
5
5
  "type": "module",
6
6
  "scripts": {