@qrush/types 2.0.16 → 2.0.17

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/Events.d.ts CHANGED
@@ -4,7 +4,7 @@ import { IFireMetaPossibleTags } from "./Meta.js";
4
4
  import musicGenres from "./Genres.js";
5
5
  import { LocationTypeArray, LocationTypeSlugArray } from "./Location.js";
6
6
  import { Features, Location, EventCategory, EventCategorySlug } from "./Common.js";
7
- import { ActivePromotion } from "./Promotion.js";
7
+ import { PromotionTeaser } from "./Promotion.js";
8
8
  export { EventCategory, EventCategorySlug, eventCategories, Features, Location, } from "./Common.js";
9
9
  export interface IFireEvent {
10
10
  id: string;
@@ -44,7 +44,7 @@ export interface IFireEvent {
44
44
  modifiedAt?: Timestamp | null;
45
45
  createdBy: string;
46
46
  locationId: string;
47
- activePromotions: ActivePromotion[];
47
+ promotionTeasers: PromotionTeaser[];
48
48
  lastModifiedBy?: string;
49
49
  lastModifiedAt?: Timestamp;
50
50
  }
@@ -31,7 +31,7 @@ export interface PromotionTemplate {
31
31
  }
32
32
  export interface PromotionInstance {
33
33
  id: string;
34
- ownerType: 'location' | 'user';
34
+ ownerType: "location" | "user";
35
35
  locationId?: string;
36
36
  userId?: string;
37
37
  templateId?: string;
@@ -54,6 +54,7 @@ export interface PromotionInstance {
54
54
  dailyRedemptionCount: number;
55
55
  totalRedemptionCount: number;
56
56
  lastRedemptionReset?: Timestamp;
57
+ /** @deprecated */
57
58
  displayOrder?: number;
58
59
  }
59
60
  export interface PromotionRedemption {
@@ -105,9 +106,10 @@ export interface LocationPermission {
105
106
  revokedBy?: string;
106
107
  revocationReason?: string;
107
108
  }
109
+ /** @deprecated replaced with BaseActivePromotion */
108
110
  export interface ActivePromotion {
109
111
  instanceId: string;
110
- ownerType: 'location' | 'user';
112
+ ownerType: "location" | "user";
111
113
  timeSlots?: TimeSlot[];
112
114
  activeDays?: number[];
113
115
  resetMinutes?: number;
@@ -126,3 +128,36 @@ export interface TimeSlot {
126
128
  from: Timestamp;
127
129
  to: Timestamp;
128
130
  }
131
+ export interface BaseActivePromotion {
132
+ instanceId: string;
133
+ ownerType: "location" | "user";
134
+ titleSnapshot: string;
135
+ savingSnapshot: number;
136
+ descriptionSnapshot: string;
137
+ itemTypeSnapshot: PromotionItemType;
138
+ dealTypeSnapshot?: PromotionDealType;
139
+ resetMinutesSnapshot: number;
140
+ timeSlots?: TimeSlot[];
141
+ activeDays?: number[];
142
+ maxRedemptions?: number;
143
+ displayOrder?: number;
144
+ }
145
+ export interface EventActivePromotion extends BaseActivePromotion {
146
+ redemptionCount: number;
147
+ }
148
+ export interface LocationActivePromotion extends BaseActivePromotion {
149
+ dailyRedemptionCount: number;
150
+ lastRedemptionReset: Timestamp;
151
+ }
152
+ export interface PromotionTeaser {
153
+ instanceId: string;
154
+ titleSnapshot: string;
155
+ itemTypeSnapshot: PromotionItemType;
156
+ dealTypeSnapshot?: PromotionDealType;
157
+ savingSnapshot: number;
158
+ }
159
+ export interface RedeemPromotionPayload {
160
+ instanceId: string;
161
+ locationId: string;
162
+ eventId?: string;
163
+ }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@qrush/types",
3
- "version": "2.0.16",
3
+ "version": "2.0.17",
4
4
  "description": "Shared TypeScript types for the QRush ecosystem",
5
5
  "type": "module",
6
6
  "scripts": {