@simonarcher/fika-types 1.0.45 → 1.0.47

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/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: string[];
52
+ stamps: VoucherStampData[];
33
53
  /** When voucher was created */
34
54
  createdAt: AdminTimestamp;
35
55
  /** Whether voucher is still valid */
@@ -3,7 +3,7 @@ export interface SaveUserShopOrderRequest {
3
3
  shopId: string;
4
4
  orderDate: Date;
5
5
  loyaltyRewardActionId?: string;
6
- items: UserShopOrderItem[];
6
+ items: UserShopOrderProductItem[];
7
7
  servedByStaffId?: string;
8
8
  }
9
9
  export interface UserShopOrder {
@@ -12,16 +12,17 @@ export interface UserShopOrder {
12
12
  shopId: string;
13
13
  orderDate: Date;
14
14
  loyaltyRewardActionId?: string;
15
- items: UserShopOrderItem[];
15
+ items: UserShopOrderProductItem[];
16
16
  servedByStaffId?: string;
17
17
  }
18
- export interface UserShopOrderItem {
18
+ export interface UserShopOrderProductItem {
19
19
  id: string;
20
20
  productId: string;
21
21
  productName: string;
22
- extras: UserShopOrderExtra[];
22
+ price: number;
23
+ extras: UserShopOrderProductExtra[];
23
24
  }
24
- export interface UserShopOrderExtra {
25
+ export interface UserShopOrderProductExtra {
25
26
  id: string;
26
27
  name: string;
27
28
  price: number;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@simonarcher/fika-types",
3
- "version": "1.0.45",
3
+ "version": "1.0.47",
4
4
  "description": "Shared TypeScript types for Fika projects",
5
5
  "main": "dist/index.js",
6
6
  "types": "dist/index.d.ts",