@codingfactory/socialkit-vue 0.5.3 → 0.7.0

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.
Files changed (49) hide show
  1. package/dist/index.d.ts +13 -0
  2. package/dist/index.d.ts.map +1 -1
  3. package/dist/index.js +5 -0
  4. package/dist/index.js.map +1 -1
  5. package/dist/services/gamification.d.ts +87 -0
  6. package/dist/services/gamification.d.ts.map +1 -0
  7. package/dist/services/gamification.js +263 -0
  8. package/dist/services/gamification.js.map +1 -0
  9. package/dist/stores/content.d.ts +1418 -0
  10. package/dist/stores/content.d.ts.map +1 -0
  11. package/dist/stores/content.js +1195 -0
  12. package/dist/stores/content.js.map +1 -0
  13. package/dist/stores/gamification.d.ts +2875 -0
  14. package/dist/stores/gamification.d.ts.map +1 -0
  15. package/dist/stores/gamification.js +1136 -0
  16. package/dist/stores/gamification.js.map +1 -0
  17. package/dist/types/api.d.ts +1 -0
  18. package/dist/types/api.d.ts.map +1 -1
  19. package/dist/types/content-api.d.ts +23 -0
  20. package/dist/types/content-api.d.ts.map +1 -0
  21. package/dist/types/content-api.js +5 -0
  22. package/dist/types/content-api.js.map +1 -0
  23. package/dist/types/content.d.ts +309 -0
  24. package/dist/types/content.d.ts.map +1 -0
  25. package/dist/types/content.js +36 -0
  26. package/dist/types/content.js.map +1 -0
  27. package/dist/types/gamification.d.ts +267 -0
  28. package/dist/types/gamification.d.ts.map +1 -0
  29. package/dist/types/gamification.js +5 -0
  30. package/dist/types/gamification.js.map +1 -0
  31. package/dist/types/media.d.ts +63 -0
  32. package/dist/types/media.d.ts.map +1 -0
  33. package/dist/types/media.js +13 -0
  34. package/dist/types/media.js.map +1 -0
  35. package/dist/types/reputation.d.ts +55 -0
  36. package/dist/types/reputation.d.ts.map +1 -0
  37. package/dist/types/reputation.js +5 -0
  38. package/dist/types/reputation.js.map +1 -0
  39. package/package.json +1 -1
  40. package/src/index.ts +143 -0
  41. package/src/services/gamification.ts +432 -0
  42. package/src/stores/content.ts +1477 -0
  43. package/src/stores/gamification.ts +1565 -0
  44. package/src/types/api.ts +1 -0
  45. package/src/types/content-api.ts +24 -0
  46. package/src/types/content.ts +381 -0
  47. package/src/types/gamification.ts +286 -0
  48. package/src/types/media.ts +81 -0
  49. package/src/types/reputation.ts +78 -0
@@ -0,0 +1,267 @@
1
+ /**
2
+ * Gamification-domain types shared across SocialKit frontends.
3
+ */
4
+ export interface UserStats {
5
+ id: string;
6
+ user_id: string;
7
+ total_points: number;
8
+ coin_balance: number;
9
+ lifetime_points: number;
10
+ current_level: number;
11
+ level: ReputationLevel;
12
+ next_level: ReputationLevel | null;
13
+ level_progress: number;
14
+ points_to_next_level: number;
15
+ points_this_week: number;
16
+ points_this_month: number;
17
+ points_this_year?: number;
18
+ rank?: number;
19
+ percentile?: number;
20
+ badges?: Badge[];
21
+ streaks?: {
22
+ current: number;
23
+ longest: number;
24
+ };
25
+ streak?: {
26
+ current_count: number;
27
+ longest_streak: number;
28
+ last_activity_at?: string;
29
+ frozen: boolean;
30
+ freeze_available: number;
31
+ };
32
+ daily_limits?: {
33
+ points_awarded: number;
34
+ max_points: number;
35
+ points_remaining: number;
36
+ is_reached: boolean;
37
+ resets_at: string;
38
+ };
39
+ privileges: UserPrivilege[];
40
+ stats: Record<string, unknown>;
41
+ }
42
+ export type UserReputation = UserStats;
43
+ export interface ReputationLevel {
44
+ level_number: number;
45
+ name: string;
46
+ badge_color: string;
47
+ badge_icon: string;
48
+ benefits: string[];
49
+ min_points?: number;
50
+ }
51
+ export interface UserPrivilege {
52
+ id: string;
53
+ slug: string;
54
+ name: string;
55
+ description: string;
56
+ unlocked_at: string;
57
+ expires_at?: string;
58
+ category?: string;
59
+ is_active?: boolean;
60
+ privilege_id?: string;
61
+ }
62
+ export interface Achievement {
63
+ id: string;
64
+ name: string;
65
+ description: string;
66
+ icon: string;
67
+ rarity?: 'common' | 'uncommon' | 'rare' | 'epic' | 'legendary';
68
+ condition_type?: 'count' | 'streak' | 'points' | 'social';
69
+ condition_data?: {
70
+ action?: string;
71
+ target: number;
72
+ current?: number;
73
+ };
74
+ reward_points?: number;
75
+ points_awarded?: number;
76
+ reward_data?: {
77
+ badge_color?: string;
78
+ badge_text?: string;
79
+ special_privileges?: string[];
80
+ unlocks_feature?: string;
81
+ };
82
+ is_active?: boolean;
83
+ is_visible?: boolean;
84
+ is_unlocked?: boolean;
85
+ is_claimed?: boolean;
86
+ can_claim?: boolean;
87
+ unlocked_at?: string | null;
88
+ claimed_at?: string | null;
89
+ progress_percentage?: number;
90
+ progress_current?: number;
91
+ progress_target?: number;
92
+ share_card?: AchievementShareCard;
93
+ progress?: number | AchievementProgress;
94
+ sort_order?: number;
95
+ requirements?: AchievementRequirement[];
96
+ category?: string;
97
+ }
98
+ export interface AchievementShareCard {
99
+ title: string;
100
+ badge_label: string;
101
+ description: string;
102
+ image_url: string;
103
+ share_url: string;
104
+ share_text: string;
105
+ }
106
+ export interface AchievementProgress {
107
+ current_value: number;
108
+ target_value: number;
109
+ percentage: number;
110
+ unit: string;
111
+ }
112
+ export interface AchievementRequirement {
113
+ id: string;
114
+ type: string;
115
+ target_value: number;
116
+ current_value: number;
117
+ description: string;
118
+ }
119
+ export interface AchievementUnlockNotification {
120
+ achievementId: string;
121
+ title: string;
122
+ description: string;
123
+ icon: string;
124
+ unlockedAt: string;
125
+ points?: number;
126
+ }
127
+ export interface Quest {
128
+ id: string;
129
+ name?: string;
130
+ title?: string;
131
+ description: string;
132
+ type: 'daily' | 'weekly' | 'monthly' | 'special' | 'challenge';
133
+ objectives: QuestObjective[];
134
+ rewards?: QuestReward[];
135
+ reward_points: number;
136
+ status?: 'available' | 'in_progress' | 'completed' | 'expired';
137
+ is_active?: boolean;
138
+ starts_at?: string;
139
+ expires_at: string | null;
140
+ completed_at: string | null;
141
+ accepted_at?: string | null;
142
+ progress?: {
143
+ current: number;
144
+ total: number;
145
+ percentage: number;
146
+ };
147
+ progress_percentage?: number;
148
+ category?: string;
149
+ }
150
+ export interface QuestObjective {
151
+ id: string;
152
+ quest_id?: string;
153
+ description: string;
154
+ type: string;
155
+ target: number;
156
+ target_value?: number;
157
+ current: number;
158
+ current_value?: number;
159
+ is_completed?: boolean;
160
+ completed?: boolean;
161
+ bonus_points?: number;
162
+ unit?: string;
163
+ }
164
+ export interface QuestReward {
165
+ type: 'points' | 'badge' | 'privilege' | 'item';
166
+ value: number | string;
167
+ description: string;
168
+ }
169
+ export interface LeaderboardEntry {
170
+ rank: number;
171
+ user_id: string;
172
+ handle: string;
173
+ name: string;
174
+ avatar_url?: string | null;
175
+ points: number;
176
+ period_points?: number;
177
+ total_points: number;
178
+ level: number;
179
+ current_level?: number;
180
+ level_details?: ReputationLevel;
181
+ achievements_count?: number;
182
+ change: number;
183
+ trend?: number | 'up' | 'down' | 'same' | null;
184
+ is_current_user: boolean;
185
+ space_id?: string | null;
186
+ }
187
+ export type LeaderboardPeriod = 'daily' | 'weekly' | 'monthly' | 'all-time';
188
+ export type QuestFilter = 'active' | 'daily' | 'weekly' | 'completed';
189
+ export interface Reward {
190
+ id: string;
191
+ name: string;
192
+ description: string;
193
+ cost_points: number;
194
+ reward_type?: 'badge' | 'title' | 'cosmetic' | 'boost' | 'feature';
195
+ type?: 'cosmetic' | 'privilege' | 'boost' | 'item';
196
+ category?: 'badge' | 'privilege' | 'cosmetic' | 'bonus';
197
+ icon?: string;
198
+ preview_image?: string;
199
+ reward_data?: Record<string, unknown>;
200
+ can_redeem?: boolean;
201
+ user_points?: number;
202
+ points_needed?: number;
203
+ stock_quantity?: number | null;
204
+ stock_remaining?: number | null;
205
+ max_per_user?: number;
206
+ user_redemptions?: number;
207
+ availability_status?: 'available' | 'insufficient_points' | 'out_of_stock' | 'limit_reached' | 'inactive' | string;
208
+ data?: {
209
+ duration?: number;
210
+ value?: unknown;
211
+ icon?: string;
212
+ color?: string;
213
+ };
214
+ stock?: number;
215
+ limited_quantity?: number | null;
216
+ remaining_quantity?: number | null;
217
+ redemption_limit?: number;
218
+ is_available?: boolean;
219
+ is_claimed?: boolean;
220
+ redeemed_count?: number;
221
+ redeemed_at?: string;
222
+ }
223
+ export interface ClaimedReward {
224
+ id: string;
225
+ reward_id: string;
226
+ reward: Reward;
227
+ claimed_at: string;
228
+ status: 'active' | 'expired';
229
+ expires_at?: string;
230
+ }
231
+ export interface RewardTransaction {
232
+ id: string;
233
+ reward_id: string;
234
+ reward: Reward;
235
+ points_spent: number;
236
+ transaction_type: 'redemption' | 'refund';
237
+ created_at: string;
238
+ metadata: Record<string, unknown>;
239
+ }
240
+ export interface Badge {
241
+ id: string;
242
+ name: string;
243
+ description: string;
244
+ icon: string;
245
+ color: string;
246
+ rarity: 'common' | 'uncommon' | 'rare' | 'epic' | 'legendary';
247
+ earned_at: string;
248
+ }
249
+ export interface GamificationNotification {
250
+ type: 'points_earned' | 'level_up' | 'achievement_unlocked' | 'quest_completed' | 'leaderboard_change' | 'reward_available';
251
+ data: unknown;
252
+ timestamp: string;
253
+ }
254
+ export interface PointTransaction {
255
+ id: string;
256
+ user_id: string;
257
+ points: number;
258
+ type: string;
259
+ source_type?: string;
260
+ source_id?: string;
261
+ description: string;
262
+ created_at: string;
263
+ is_reversed?: boolean;
264
+ reversed_at?: string;
265
+ reversal_reason?: string;
266
+ }
267
+ //# sourceMappingURL=gamification.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"gamification.d.ts","sourceRoot":"","sources":["../../src/types/gamification.ts"],"names":[],"mappings":"AAAA;;GAEG;AAEH,MAAM,WAAW,SAAS;IACxB,EAAE,EAAE,MAAM,CAAA;IACV,OAAO,EAAE,MAAM,CAAA;IACf,YAAY,EAAE,MAAM,CAAA;IACpB,YAAY,EAAE,MAAM,CAAA;IACpB,eAAe,EAAE,MAAM,CAAA;IACvB,aAAa,EAAE,MAAM,CAAA;IACrB,KAAK,EAAE,eAAe,CAAA;IACtB,UAAU,EAAE,eAAe,GAAG,IAAI,CAAA;IAClC,cAAc,EAAE,MAAM,CAAA;IACtB,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AE,MAAM,CAAA;IACjB,MAAM,EAAE,MAAM,CAAA;IACd,YAAY,EAAE,MAAM,CAAA;IACpB,gBAAgB,EAAE,YAAY,GAAG,QAAQ,CAAA;IACzC,UAAU,EAAE,MAAM,CAAA;IAClB,QAAQ,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,CAAA;CAClC;AAED,MAAM,WAAW,KAAK;IACpB,EAAE,EAAE,MAAM,CAAA;IACV,IAAI,EAAE,MAAM,CAAA;IACZ,WAAW,EAAE,MAAM,CAAA;IACnB,IAAI,EAAE,MAAM,CAAA;IACZ,KAAK,EAAE,MAAM,CAAA;IACb,MAAM,EAAE,QAAQ,GAAG,UAAU,GAAG,MAAM,GAAG,MAAM,GAAG,WAAW,CAAA;IAC7D,SAAS,EAAE,MAAM,CAAA;CAClB;AAED,MAAM,WAAW,wBAAwB;IACvC,IAAI,EAAE,eAAe,GAAG,UAAU,GAAG,sBAAsB,GAAG,iBAAiB,GAAG,oBAAoB,GAAG,kBAAkB,CAAA;IAC3H,IAAI,EAAE,OAAO,CAAA;IACb,SAAS,EAAE,MAAM,CAAA;CAClB;AAED,MAAM,WAAW,gBAAgB;IAC/B,EAAE,EAAE,MAAM,CAAA;IACV,OAAO,EAAE,MAAM,CAAA;IACf,MAAM,EAAE,MAAM,CAAA;IACd,IAAI,EAAE,MAAM,CAAA;IACZ,WAAW,CAAC,EAAE,MAAM,CAAA;IACpB,SAAS,CAAC,EAAE,MAAM,CAAA;IAClB,WAAW,EAAE,MAAM,CAAA;IACnB,UAAU,EAAE,MAAM,CAAA;IAClB,WAAW,CAAC,EAAE,OAAO,CAAA;IACrB,WAAW,CAAC,EAAE,MAAM,CAAA;IACpB,eAAe,CAAC,EAAE,MAAM,CAAA;CACzB"}
@@ -0,0 +1,5 @@
1
+ /**
2
+ * Gamification-domain types shared across SocialKit frontends.
3
+ */
4
+ export {};
5
+ //# sourceMappingURL=gamification.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"gamification.js","sourceRoot":"","sources":["../../src/types/gamification.ts"],"names":[],"mappings":"AAAA;;GAEG"}
@@ -0,0 +1,63 @@
1
+ /**
2
+ * Core type definitions for media.
3
+ */
4
+ export interface MediaItem {
5
+ id: string;
6
+ type: 'image' | 'video' | 'document';
7
+ url: string;
8
+ thumbnail_url?: string;
9
+ alt_text?: string;
10
+ width?: number;
11
+ height?: number;
12
+ size?: number;
13
+ mime_type?: string;
14
+ created_at?: string;
15
+ updated_at?: string;
16
+ }
17
+ export declare function isMediaItem(obj: unknown): obj is MediaItem;
18
+ export interface UploadedMedia {
19
+ id: string;
20
+ url: string;
21
+ thumb_url?: string | null;
22
+ preview_url?: string | null;
23
+ mime_type: string;
24
+ size: number;
25
+ urls?: {
26
+ original?: string;
27
+ thumbnail?: string;
28
+ preview?: string;
29
+ };
30
+ original_url?: string;
31
+ }
32
+ export interface LocalMediaItem {
33
+ id?: string;
34
+ previewUrl: string;
35
+ file?: File;
36
+ mimeType: string;
37
+ name: string;
38
+ size: number;
39
+ status: 'pending' | 'uploading' | 'uploaded' | 'failed';
40
+ error?: string;
41
+ }
42
+ export interface FilterConfig {
43
+ name: string;
44
+ type: string;
45
+ value: number | string;
46
+ timestamp?: number;
47
+ }
48
+ export type ImageEditorContext = 'profile' | 'editor' | 'gallery';
49
+ export type ImageFormat = 'jpeg' | 'png' | 'webp';
50
+ export interface ImageEditorSaveData {
51
+ imageData: Blob;
52
+ filters: FilterConfig[];
53
+ metadata: ImageEditorMetadata;
54
+ }
55
+ export interface ImageEditorMetadata {
56
+ originalUrl: string;
57
+ context: string;
58
+ appliedFilters: FilterConfig[];
59
+ processingTime: number;
60
+ }
61
+ export type MediaType = MediaItem['type'];
62
+ export type MediaUpdate = Partial<Omit<MediaItem, 'id' | 'created_at'>>;
63
+ //# sourceMappingURL=media.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"media.d.ts","sourceRoot":"","sources":["../../src/types/media.ts"],"names":[],"mappings":"AAAA;;GAEG;AAEH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AM,CAAA;CACf;AAED,MAAM,WAAW,YAAY;IAC3B,IAAI,EAAE,MAAM,CAAA;IACZ,IAAI,EAAE,MAAM,CAAA;IACZ,KAAK,EAAE,MAAM,GAAG,MAAM,CAAA;IACtB,SAAS,CAAC,EAAE,MAAM,CAAA;CACnB;AAED,MAAM,MAAM,kBAAkB,GAAG,SAAS,GAAG,QAAQ,GAAG,SAAS,CAAA;AACjE,MAAM,MAAM,WAAW,GAAG,MAAM,GAAG,KAAK,GAAG,MAAM,CAAA;AAEjD,MAAM,WAAW,mBAAmB;IAClC,SAAS,EAAE,IAAI,CAAA;IACf,OAAO,EAAE,YAAY,EAAE,CAAA;IACvB,QAAQ,EAAE,mBAAmB,CAAA;CAC9B;AAED,MAAM,WAAW,mBAAmB;IAClC,WAAW,EAAE,MAAM,CAAA;IACnB,OAAO,EAAE,MAAM,CAAA;IACf,cAAc,EAAE,YAAY,EAAE,CAAA;IAC9B,cAAc,EAAE,MAAM,CAAA;CACvB;AAED,MAAM,MAAM,SAAS,GAAG,SAAS,CAAC,MAAM,CAAC,CAAA;AACzC,MAAM,MAAM,WAAW,GAAG,OAAO,CAAC,IAAI,CAAC,SAAS,EAAE,IAAI,GAAG,YAAY,CAAC,CAAC,CAAA"}
@@ -0,0 +1,13 @@
1
+ /**
2
+ * Core type definitions for media.
3
+ */
4
+ export function isMediaItem(obj) {
5
+ return (obj !== null
6
+ && typeof obj === 'object'
7
+ && 'id' in obj
8
+ && 'type' in obj
9
+ && 'url' in obj
10
+ && typeof obj.type === 'string'
11
+ && ['image', 'video', 'document'].includes(obj.type));
12
+ }
13
+ //# sourceMappingURL=media.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"media.js","sourceRoot":"","sources":["../../src/types/media.ts"],"names":[],"mappings":"AAAA;;GAEG;AAgBH,MAAM,UAAU,WAAW,CAAC,GAAY;IACtC,OAAO,CACL,GAAG,KAAK,IAAI;WACT,OAAO,GAAG,KAAK,QAAQ;WACvB,IAAI,IAAI,GAAG;WACX,MAAM,IAAI,GAAG;WACb,KAAK,IAAI,GAAG;WACZ,OAAQ,GAAiB,CAAC,IAAI,KAAK,QAAQ;WAC3C,CAAC,OAAO,EAAE,OAAO,EAAE,UAAU,CAAC,CAAC,QAAQ,CAAE,GAAiB,CAAC,IAAI,CAAC,CACpE,CAAA;AACH,CAAC"}
@@ -0,0 +1,55 @@
1
+ /**
2
+ * Generic reputation-adjacent types shared across SocialKit frontends.
3
+ */
4
+ import type { LeaderboardEntry, PointTransaction, ReputationLevel, UserReputation, UserStats, UserPrivilege } from './gamification.js';
5
+ export type Timestamp = string;
6
+ export type { LeaderboardEntry, PointTransaction, ReputationLevel, UserPrivilege, UserReputation, UserStats, };
7
+ export interface ReputationPrivilege {
8
+ id: string;
9
+ name: string;
10
+ slug: string;
11
+ category: string;
12
+ required_points: number;
13
+ required_level: number | null;
14
+ description: string;
15
+ is_active: boolean;
16
+ }
17
+ export interface DailyLimitStatus {
18
+ points_awarded: number;
19
+ max_points: number;
20
+ points_remaining: number;
21
+ is_reached: boolean;
22
+ resets_at: string;
23
+ }
24
+ export interface StreakMilestone {
25
+ days: number;
26
+ days_remaining: number;
27
+ bonus_points: number;
28
+ }
29
+ export interface UserStreakStatus {
30
+ days: number;
31
+ is_active_today: boolean;
32
+ freeze_available: number;
33
+ next_milestone: StreakMilestone | null;
34
+ }
35
+ export interface PointsAwardedEvent {
36
+ transaction_id?: string;
37
+ action_type: string;
38
+ points: number;
39
+ reason?: string;
40
+ source_type?: string;
41
+ source_id?: string;
42
+ metadata?: Record<string, unknown>;
43
+ level_progress?: number;
44
+ lifetime_points?: number;
45
+ }
46
+ export interface LevelUpEvent {
47
+ new_level: number;
48
+ level_details: ReputationLevel;
49
+ next_level_details: ReputationLevel | null;
50
+ }
51
+ export interface ReputationSnapshot {
52
+ snapshot_date: Timestamp;
53
+ total_points: number;
54
+ }
55
+ //# sourceMappingURL=reputation.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"reputation.d.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IACf,WAAW,CAAC,EAAE,MAAM,CAAA;IACpB,SAAS,CAAC,EAAE,MAAM,CAAA;IAClB,QAAQ,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,CAAA;IAClC,cAAc,CAAC,EAAE,MAAM,CAAA;IACvB,eAAe,CAAC,EAAE,MAAM,CAAA;CACzB;AAED,MAAM,WAAW,YAAY;IAC3B,SAAS,EAAE,MAAM,CAAA;IACjB,aAAa,EAAE,eAAe,CAAA;IAC9B,kBAAkB,EAAE,eAAe,GAAG,IAAI,CAAA;CAC3C;AAED,MAAM,WAAW,kBAAkB;IACjC,aAAa,EAAE,SAAS,CAAA;IACxB,YAAY,EAAE,MAAM,CAAA;CACrB"}
@@ -0,0 +1,5 @@
1
+ /**
2
+ * Generic reputation-adjacent types shared across SocialKit frontends.
3
+ */
4
+ export {};
5
+ //# sourceMappingURL=reputation.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"reputation.js","sourceRoot":"","sources":["../../src/types/reputation.ts"],"names":[],"mappings":"AAAA;;GAEG"}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@codingfactory/socialkit-vue",
3
- "version": "0.5.3",
3
+ "version": "0.7.0",
4
4
  "description": "Shared Vue 3 utilities for SocialKit-powered frontends",
5
5
  "type": "module",
6
6
  "main": "./dist/index.js",
package/src/index.ts CHANGED
@@ -264,6 +264,149 @@ export {
264
264
  createDiscussionStoreDefinition
265
265
  } from './stores/discussion.js'
266
266
 
267
+ // ── Media Types ──────────────────────────────────────────────────────────────
268
+ export type {
269
+ FilterConfig,
270
+ ImageEditorContext,
271
+ ImageEditorMetadata,
272
+ ImageEditorSaveData,
273
+ ImageFormat,
274
+ LocalMediaItem,
275
+ MediaItem,
276
+ MediaType,
277
+ MediaUpdate,
278
+ UploadedMedia
279
+ } from './types/media.js'
280
+
281
+ export {
282
+ isMediaItem
283
+ } from './types/media.js'
284
+
285
+ // ── Content Types ────────────────────────────────────────────────────────────
286
+ export type {
287
+ AlbumSummary,
288
+ BaseEntity,
289
+ Comment,
290
+ CommentListResponse,
291
+ CommentUpdate,
292
+ ContentActiveRecipeMeta,
293
+ ContentCurrentUser,
294
+ ContentMediaUploadService,
295
+ ContentStoreConfig,
296
+ ContentStoreLogger,
297
+ ContentStoreStorage,
298
+ FeedEntry,
299
+ PendingPost,
300
+ PendingPostStatus,
301
+ PendingVideoRender,
302
+ Post,
303
+ PostAuthor,
304
+ PostFeeling,
305
+ PostFeelingType,
306
+ PostFeelingValue,
307
+ PostListResponse,
308
+ PostMedia,
309
+ PostMeta,
310
+ PostResponse,
311
+ PostShareType,
312
+ PostUpdate,
313
+ PostWithPendingState,
314
+ ProcessPendingPostResult,
315
+ QuotedPostPreview,
316
+ Reaction,
317
+ RecoverablePendingDraft,
318
+ ScheduledPostEntry,
319
+ ScheduledPostsPage,
320
+ ThreadSummary,
321
+ VideoRenderStatus
322
+ } from './types/content.js'
323
+
324
+ export {
325
+ isComment,
326
+ isPost,
327
+ PostVisibility,
328
+ ReactionKind
329
+ } from './types/content.js'
330
+
331
+ // ── Content API Types ────────────────────────────────────────────────────────
332
+ export type {
333
+ FeedResponse
334
+ } from './types/content-api.js'
335
+
336
+ // ── Content Store ────────────────────────────────────────────────────────────
337
+ export type {
338
+ ContentStoreReturn
339
+ } from './stores/content.js'
340
+
341
+ export {
342
+ createContentStoreDefinition
343
+ } from './stores/content.js'
344
+
345
+ // ── Gamification Types ───────────────────────────────────────────────────────
346
+ export type {
347
+ Achievement,
348
+ AchievementProgress,
349
+ AchievementRequirement,
350
+ AchievementShareCard,
351
+ AchievementUnlockNotification,
352
+ Badge,
353
+ ClaimedReward,
354
+ GamificationNotification,
355
+ LeaderboardEntry,
356
+ LeaderboardPeriod,
357
+ PointTransaction,
358
+ Quest,
359
+ QuestFilter,
360
+ QuestObjective,
361
+ QuestReward,
362
+ ReputationLevel,
363
+ Reward,
364
+ RewardTransaction,
365
+ UserPrivilege,
366
+ UserReputation,
367
+ UserStats
368
+ } from './types/gamification.js'
369
+
370
+ // ── Reputation Types ─────────────────────────────────────────────────────────
371
+ export type {
372
+ DailyLimitStatus,
373
+ LevelUpEvent,
374
+ PointsAwardedEvent,
375
+ ReputationPrivilege,
376
+ ReputationSnapshot,
377
+ StreakMilestone,
378
+ Timestamp,
379
+ UserStreakStatus
380
+ } from './types/reputation.js'
381
+
382
+ // ── Gamification Service ────────────────────────────────────────────────────
383
+ export type {
384
+ GamificationServiceConfig,
385
+ GamificationServiceInstance,
386
+ GamificationServiceLogger,
387
+ GamificationWebSocketFactory,
388
+ GamificationWebSocketLike,
389
+ GamificationWebSocketMessageEventLike
390
+ } from './services/gamification.js'
391
+
392
+ export {
393
+ createGamificationService
394
+ } from './services/gamification.js'
395
+
396
+ // ── Gamification Store ──────────────────────────────────────────────────────
397
+ export type {
398
+ GamificationRealtimeChannelLike,
399
+ GamificationRealtimeClientLike,
400
+ GamificationStoreConfig,
401
+ GamificationStoreCurrentUser,
402
+ GamificationStoreLogger,
403
+ GamificationStoreReturn,
404
+ } from './stores/gamification.js'
405
+
406
+ export {
407
+ createGamificationStoreDefinition
408
+ } from './stores/gamification.js'
409
+
267
410
  // ── Auth Composable ──────────────────────────────────────────────────────────
268
411
  export type {
269
412
  UseAuthReturn