@qrush/types 2.0.28 → 2.0.29

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.
@@ -1,6 +1,6 @@
1
1
  import { FireQueryDocSnapshotRef } from "./CustomDocType.js";
2
2
  import { Location as BaseLocation, Features } from "./Common.js";
3
- import { ActivePromotion } from "./Promotion.js";
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
- promotions?: ActivePromotion[];
96
+ promotionTeasers?: PromotionTeaser[];
97
97
  };
98
98
  export type FireLocationSnapshotRef = FireQueryDocSnapshotRef<IFireLocation>;
@@ -59,18 +59,6 @@ export interface PromotionInstance {
59
59
  /** @deprecated */
60
60
  displayOrder?: number;
61
61
  }
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
62
  export interface PromotionInstancePermission {
75
63
  userId: string;
76
64
  permissionType: 'promotion';
@@ -114,30 +102,13 @@ export interface LocationPermission {
114
102
  revokedBy?: string;
115
103
  revocationReason?: string;
116
104
  }
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
105
  export interface TimeSlot {
136
106
  from: Timestamp;
137
107
  to: Timestamp;
138
108
  }
139
109
  export interface BaseActivePromotion {
140
110
  instanceId: string;
111
+ templateId?: string;
141
112
  ownerType: "location" | "user";
142
113
  titleSnapshot: string;
143
114
  savingSnapshot: number;
@@ -169,3 +140,16 @@ export interface RedeemPromotionPayload {
169
140
  locationId: string;
170
141
  eventId?: string;
171
142
  }
143
+ export interface PromotionRedemption {
144
+ id: string;
145
+ userId: string;
146
+ instanceId: string;
147
+ templateId?: string;
148
+ locationId: string;
149
+ eventId?: string;
150
+ promotionTitle: string;
151
+ itemType: PromotionItemType;
152
+ dealType?: PromotionDealType;
153
+ savingAmount: number;
154
+ redeemedAt: Timestamp;
155
+ }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@qrush/types",
3
- "version": "2.0.28",
3
+ "version": "2.0.29",
4
4
  "description": "Shared TypeScript types for the QRush ecosystem",
5
5
  "type": "module",
6
6
  "scripts": {