@simonarcher/fika-types 1.0.32 → 1.0.34

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 CHANGED
@@ -4,3 +4,4 @@ export * from './farm';
4
4
  export * from './user';
5
5
  export * from './userList';
6
6
  export * from './coffeeEvents';
7
+ export * from './quest';
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);
@@ -0,0 +1,105 @@
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
+ completionBonusPoints: number;
13
+ rewards: QuestReward[];
14
+ requirements: QuestRequirement[];
15
+ status: 'active' | 'completed' | 'expired' | 'draft';
16
+ startDate: Timestamp;
17
+ endDate?: Timestamp;
18
+ createdBy: string;
19
+ createdAt: Timestamp;
20
+ updatedAt: Timestamp;
21
+ difficulty: 'easy' | 'medium' | 'hard';
22
+ estimatedDuration: number;
23
+ tags: string[];
24
+ coverImage?: string;
25
+ totalParticipants: number;
26
+ totalCompletions: number;
27
+ }
28
+ export interface QuestStep {
29
+ stepNumber: number;
30
+ shopId: string;
31
+ requiredActions: QuestAction[];
32
+ pointsReward: number;
33
+ description: string;
34
+ }
35
+ export interface QuestAction {
36
+ type: 'check_in' | 'review' | 'photo' | 'favorite' | 'menu_item';
37
+ metadata?: any;
38
+ }
39
+ export interface QuestReward {
40
+ type: 'points' | 'badge' | 'coupon';
41
+ value: number | string;
42
+ metadata?: any;
43
+ }
44
+ export interface QuestRequirement {
45
+ type: 'location' | 'time' | 'level' | 'previous_quest';
46
+ value: any;
47
+ }
48
+ export interface UserQuestProgress {
49
+ questId: string;
50
+ userId: string;
51
+ status: 'not_started' | 'in_progress' | 'completed' | 'abandoned';
52
+ currentStep: number;
53
+ completedSteps: QuestStepProgress[];
54
+ startedAt: Timestamp;
55
+ completedAt?: Timestamp;
56
+ totalPointsEarned: number;
57
+ }
58
+ export interface QuestStepProgress {
59
+ stepNumber: number;
60
+ shopId: string;
61
+ completedActions: CompletedAction[];
62
+ completedAt: Timestamp;
63
+ pointsEarned: number;
64
+ }
65
+ export interface CompletedAction {
66
+ type: QuestAction['type'];
67
+ completedAt: Timestamp;
68
+ metadata?: any;
69
+ pointsEarned: number;
70
+ }
71
+ export interface QuestSubmissionData {
72
+ title: string;
73
+ description: string;
74
+ geographicScope: 'city' | 'country' | 'global';
75
+ city?: string;
76
+ countryCode?: string;
77
+ shopIds: string[];
78
+ steps: Omit<QuestStep, 'stepNumber'>[];
79
+ completionBonusPoints: number;
80
+ rewards: QuestReward[];
81
+ requirements: QuestRequirement[];
82
+ difficulty: 'easy' | 'medium' | 'hard';
83
+ estimatedDuration: number;
84
+ tags: string[];
85
+ coverImage?: string;
86
+ startDate: Timestamp;
87
+ endDate?: Timestamp;
88
+ }
89
+ export interface QuestFilters {
90
+ geographicScope?: 'city' | 'country' | 'global';
91
+ city?: string;
92
+ countryCode?: string;
93
+ difficulty?: 'easy' | 'medium' | 'hard';
94
+ tags?: string[];
95
+ status?: 'active' | 'completed' | 'expired' | 'draft';
96
+ }
97
+ export interface QuestDiscoveryParams {
98
+ userLocation?: {
99
+ city: string;
100
+ countryCode: string;
101
+ };
102
+ filters?: QuestFilters;
103
+ limit?: number;
104
+ offset?: number;
105
+ }
package/dist/quest.js ADDED
@@ -0,0 +1,2 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@simonarcher/fika-types",
3
- "version": "1.0.32",
3
+ "version": "1.0.34",
4
4
  "description": "Shared TypeScript types for Fika projects",
5
5
  "main": "dist/index.js",
6
6
  "types": "dist/index.d.ts",