@growsober/types 1.0.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.
package/src/index.ts ADDED
@@ -0,0 +1,41 @@
1
+ /**
2
+ * GrowSober API Types
3
+ *
4
+ * This file exports all auto-generated types from the GrowSober API.
5
+ * Types are generated from the OpenAPI specification using openapi-typescript.
6
+ *
7
+ * To regenerate types:
8
+ * 1. Start the API: cd ../growsober-api && npm run start:dev
9
+ * 2. Generate types: npm run generate
10
+ * 3. Build: npm run build
11
+ */
12
+
13
+ // Re-export generated types (will be created by `npm run generate`)
14
+ export * from './generated';
15
+
16
+ // Manual type helpers
17
+ export type ApiResponse<T> = {
18
+ data: T;
19
+ message?: string;
20
+ statusCode: number;
21
+ };
22
+
23
+ export type PaginatedResponse<T> = {
24
+ data: T[];
25
+ meta: {
26
+ total: number;
27
+ page: number;
28
+ limit: number;
29
+ totalPages: number;
30
+ };
31
+ };
32
+
33
+ // GrowSober-specific types
34
+ export type DrinkingIdentity = 'alcohol_free' | 'sober_curious' | 'occasional';
35
+
36
+ export interface GrowSoberUserFields {
37
+ drinkingIdentity: DrinkingIdentity;
38
+ sobrietyDate?: string;
39
+ openToMeet: boolean;
40
+ lookingFor?: string;
41
+ }