@simonarcher/fika-types 1.0.31 → 1.0.33
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/quest.d.ts +103 -0
- package/dist/quest.js +2 -0
- package/dist/shop.d.ts +2 -2
- package/package.json +1 -1
package/dist/index.d.ts
CHANGED
package/dist/index.js
CHANGED
|
@@ -26,3 +26,5 @@ __exportStar(require("./user"), exports);
|
|
|
26
26
|
__exportStar(require("./userList"), exports);
|
|
27
27
|
// Export all coffee events-related types
|
|
28
28
|
__exportStar(require("./coffeeEvents"), exports);
|
|
29
|
+
// Export all quest-related types
|
|
30
|
+
__exportStar(require("./quest"), exports);
|
package/dist/quest.d.ts
ADDED
|
@@ -0,0 +1,103 @@
|
|
|
1
|
+
import type { Timestamp } from "firebase-admin/firestore";
|
|
2
|
+
export interface Quest {
|
|
3
|
+
id: string;
|
|
4
|
+
type: 'individual';
|
|
5
|
+
title: string;
|
|
6
|
+
description: string;
|
|
7
|
+
geographicScope: 'city' | 'country' | 'global';
|
|
8
|
+
city?: string;
|
|
9
|
+
countryCode?: string;
|
|
10
|
+
shopIds: string[];
|
|
11
|
+
steps: QuestStep[];
|
|
12
|
+
rewards: QuestReward[];
|
|
13
|
+
requirements: QuestRequirement[];
|
|
14
|
+
status: 'active' | 'completed' | 'expired' | 'draft';
|
|
15
|
+
startDate: Timestamp;
|
|
16
|
+
endDate?: Timestamp;
|
|
17
|
+
createdBy: string;
|
|
18
|
+
createdAt: Timestamp;
|
|
19
|
+
updatedAt: Timestamp;
|
|
20
|
+
difficulty: 'easy' | 'medium' | 'hard';
|
|
21
|
+
estimatedDuration: number;
|
|
22
|
+
tags: string[];
|
|
23
|
+
coverImage?: string;
|
|
24
|
+
totalParticipants: number;
|
|
25
|
+
totalCompletions: number;
|
|
26
|
+
}
|
|
27
|
+
export interface QuestStep {
|
|
28
|
+
stepNumber: number;
|
|
29
|
+
shopId: string;
|
|
30
|
+
requiredActions: QuestAction[];
|
|
31
|
+
pointsReward: number;
|
|
32
|
+
description: string;
|
|
33
|
+
}
|
|
34
|
+
export interface QuestAction {
|
|
35
|
+
type: 'check_in' | 'review' | 'photo' | 'favorite' | 'menu_item';
|
|
36
|
+
metadata?: any;
|
|
37
|
+
}
|
|
38
|
+
export interface QuestReward {
|
|
39
|
+
type: 'points' | 'badge' | 'coupon';
|
|
40
|
+
value: number | string;
|
|
41
|
+
metadata?: any;
|
|
42
|
+
}
|
|
43
|
+
export interface QuestRequirement {
|
|
44
|
+
type: 'location' | 'time' | 'level' | 'previous_quest';
|
|
45
|
+
value: any;
|
|
46
|
+
}
|
|
47
|
+
export interface UserQuestProgress {
|
|
48
|
+
questId: string;
|
|
49
|
+
userId: string;
|
|
50
|
+
status: 'not_started' | 'in_progress' | 'completed' | 'abandoned';
|
|
51
|
+
currentStep: number;
|
|
52
|
+
completedSteps: QuestStepProgress[];
|
|
53
|
+
startedAt: Timestamp;
|
|
54
|
+
completedAt?: Timestamp;
|
|
55
|
+
totalPointsEarned: number;
|
|
56
|
+
}
|
|
57
|
+
export interface QuestStepProgress {
|
|
58
|
+
stepNumber: number;
|
|
59
|
+
shopId: string;
|
|
60
|
+
completedActions: CompletedAction[];
|
|
61
|
+
completedAt: Timestamp;
|
|
62
|
+
pointsEarned: number;
|
|
63
|
+
}
|
|
64
|
+
export interface CompletedAction {
|
|
65
|
+
type: QuestAction['type'];
|
|
66
|
+
completedAt: Timestamp;
|
|
67
|
+
metadata?: any;
|
|
68
|
+
pointsEarned: number;
|
|
69
|
+
}
|
|
70
|
+
export interface QuestSubmissionData {
|
|
71
|
+
title: string;
|
|
72
|
+
description: string;
|
|
73
|
+
geographicScope: 'city' | 'country' | 'global';
|
|
74
|
+
city?: string;
|
|
75
|
+
countryCode?: string;
|
|
76
|
+
shopIds: string[];
|
|
77
|
+
steps: Omit<QuestStep, 'stepNumber'>[];
|
|
78
|
+
rewards: QuestReward[];
|
|
79
|
+
requirements: QuestRequirement[];
|
|
80
|
+
difficulty: 'easy' | 'medium' | 'hard';
|
|
81
|
+
estimatedDuration: number;
|
|
82
|
+
tags: string[];
|
|
83
|
+
coverImage?: string;
|
|
84
|
+
startDate: Timestamp;
|
|
85
|
+
endDate?: Timestamp;
|
|
86
|
+
}
|
|
87
|
+
export interface QuestFilters {
|
|
88
|
+
geographicScope?: 'city' | 'country' | 'global';
|
|
89
|
+
city?: string;
|
|
90
|
+
countryCode?: string;
|
|
91
|
+
difficulty?: 'easy' | 'medium' | 'hard';
|
|
92
|
+
tags?: string[];
|
|
93
|
+
status?: 'active' | 'completed' | 'expired' | 'draft';
|
|
94
|
+
}
|
|
95
|
+
export interface QuestDiscoveryParams {
|
|
96
|
+
userLocation?: {
|
|
97
|
+
city: string;
|
|
98
|
+
countryCode: string;
|
|
99
|
+
};
|
|
100
|
+
filters?: QuestFilters;
|
|
101
|
+
limit?: number;
|
|
102
|
+
offset?: number;
|
|
103
|
+
}
|
package/dist/quest.js
ADDED
package/dist/shop.d.ts
CHANGED
|
@@ -199,8 +199,8 @@ export interface ShopSpecialties {
|
|
|
199
199
|
additional: ShopSpecialtyKey[];
|
|
200
200
|
customSpecialty?: string;
|
|
201
201
|
}
|
|
202
|
-
export type CoffeeBrewingCategoryKey = 'Espresso-Based' | 'Pour-Over' | 'Immersion' | 'Cold & Iced' | 'Regional & Traditional' | 'Batch Brew / Commercial';
|
|
203
|
-
export type CoffeeBrewingMethodKey = 'espresso' | 'ristretto' | 'lungo' | 'americano' | 'macchiato' | 'cortado' | 'flatWhite' | 'cappuccino' | 'latte' | 'mocha' | 'v60' | 'kalitaWave' | 'chemex' | 'origamiDripper' | 'melitta' | 'clothDrip' | 'frenchPress' | 'aeropress' | 'cleverDripper' | 'siphon' | 'turkishCoffee' | 'coldBrew' | 'japaneseIcedCoffee' | 'nitroColdBrew' | 'flashBrew' | 'mokaPot' | 'vietnamesePhin' | 'cafeDeOlla' | 'cafeCubano' | 'ethiopianCeremony' | 'batchBrew' | 'percolator' | 'specialtyInstant';
|
|
202
|
+
export type CoffeeBrewingCategoryKey = 'Espresso-Based' | 'Pour-Over' | 'Immersion' | 'Cold & Iced' | 'Regional & Traditional' | 'Batch Brew / Commercial' | 'Tea & Non-Coffee';
|
|
203
|
+
export type CoffeeBrewingMethodKey = 'espresso' | 'ristretto' | 'lungo' | 'americano' | 'macchiato' | 'cortado' | 'flatWhite' | 'cappuccino' | 'latte' | 'mocha' | 'v60' | 'kalitaWave' | 'chemex' | 'origamiDripper' | 'melitta' | 'clothDrip' | 'frenchPress' | 'aeropress' | 'cleverDripper' | 'siphon' | 'turkishCoffee' | 'coldBrew' | 'japaneseIcedCoffee' | 'nitroColdBrew' | 'flashBrew' | 'mokaPot' | 'vietnamesePhin' | 'cafeDeOlla' | 'cafeCubano' | 'ethiopianCeremony' | 'batchBrew' | 'percolator' | 'specialtyInstant' | 'matcha' | 'matchaLatte' | 'looseleafTea' | 'teaBags' | 'chaiTea' | 'herbalTea' | 'icedTea' | 'bubbleTea' | 'kombucha';
|
|
204
204
|
export interface CoffeeBrewingMethod {
|
|
205
205
|
name: string;
|
|
206
206
|
description: string;
|