@simonarcher/fika-types 1.0.72 → 1.0.74
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/index.d.ts +1 -0
- package/dist/index.js +2 -0
- package/dist/shop.d.ts +10 -0
- package/dist/shopCorrections.d.ts +53 -0
- package/dist/shopCorrections.js +2 -0
- package/package.json +1 -1
package/dist/index.d.ts
CHANGED
package/dist/index.js
CHANGED
|
@@ -40,3 +40,5 @@ __exportStar(require("./actions"), exports);
|
|
|
40
40
|
__exportStar(require("./rewards"), exports);
|
|
41
41
|
// Export all shop analytics-related types
|
|
42
42
|
__exportStar(require("./shopAnalytics"), exports);
|
|
43
|
+
// Export all shop correction-related types
|
|
44
|
+
__exportStar(require("./shopCorrections"), exports);
|
package/dist/shop.d.ts
CHANGED
|
@@ -473,6 +473,16 @@ export type RoasterRef = {
|
|
|
473
473
|
id: string;
|
|
474
474
|
displayName?: string;
|
|
475
475
|
tierHint?: 1 | 2 | 3;
|
|
476
|
+
/**
|
|
477
|
+
* Whether this roaster's beans are used in the grinder/coffee menu
|
|
478
|
+
* @default true (for backward compatibility with existing associations)
|
|
479
|
+
*/
|
|
480
|
+
inGrinder?: boolean;
|
|
481
|
+
/**
|
|
482
|
+
* Whether this roaster's beans are available for purchase (sold in bags)
|
|
483
|
+
* @default false (for backward compatibility with existing associations)
|
|
484
|
+
*/
|
|
485
|
+
availableForPurchase?: boolean;
|
|
476
486
|
};
|
|
477
487
|
export type CommunitySignal = 'cupping' | 'training' | 'education' | 'origin talk' | 'sustainability' | 'direct trade' | 'traceable';
|
|
478
488
|
export type BaristaAchievement = {
|
|
@@ -0,0 +1,53 @@
|
|
|
1
|
+
import type { Timestamp } from "firebase-admin/firestore";
|
|
2
|
+
/**
|
|
3
|
+
* Type for different correction categories
|
|
4
|
+
*/
|
|
5
|
+
export type CorrectionType = 'coffee' | 'brewMethods' | 'features' | 'menu' | 'other';
|
|
6
|
+
/**
|
|
7
|
+
* Interface for coffee-related corrections (roaster associations)
|
|
8
|
+
*/
|
|
9
|
+
export interface CoffeeCorrection {
|
|
10
|
+
roastersToAdd: Array<{
|
|
11
|
+
id?: string;
|
|
12
|
+
name: string;
|
|
13
|
+
isCustom: boolean;
|
|
14
|
+
}>;
|
|
15
|
+
roastersToRemove: Array<{
|
|
16
|
+
id: string;
|
|
17
|
+
name: string;
|
|
18
|
+
}>;
|
|
19
|
+
existingRoasters: Array<{
|
|
20
|
+
id: string;
|
|
21
|
+
name: string;
|
|
22
|
+
}>;
|
|
23
|
+
}
|
|
24
|
+
/**
|
|
25
|
+
* Interface for shop correction submission data
|
|
26
|
+
*/
|
|
27
|
+
export interface ShopCorrectionData {
|
|
28
|
+
shopId: string;
|
|
29
|
+
shopName: string;
|
|
30
|
+
correctionType: CorrectionType;
|
|
31
|
+
coffeeCorrection?: CoffeeCorrection;
|
|
32
|
+
userId: string;
|
|
33
|
+
userName?: string;
|
|
34
|
+
timestamp: number;
|
|
35
|
+
}
|
|
36
|
+
/**
|
|
37
|
+
* Interface for shop correction submissions stored in database
|
|
38
|
+
* Used for future review workflow
|
|
39
|
+
*/
|
|
40
|
+
export interface ShopCorrectionSubmission {
|
|
41
|
+
id: string;
|
|
42
|
+
shopId: string;
|
|
43
|
+
shopName: string;
|
|
44
|
+
correctionType: CorrectionType;
|
|
45
|
+
correctionData: any;
|
|
46
|
+
userId: string;
|
|
47
|
+
userName?: string;
|
|
48
|
+
status: 'pending' | 'approved' | 'rejected' | 'applied';
|
|
49
|
+
submittedAt: Timestamp;
|
|
50
|
+
reviewedAt?: Timestamp;
|
|
51
|
+
reviewedBy?: string;
|
|
52
|
+
notes?: string;
|
|
53
|
+
}
|