@mrck-labs/vanaheim-shared 0.2.1 → 0.4.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.
@@ -1,240 +0,0 @@
1
- /**
2
- * Database Types for Vanaheim
3
- *
4
- * Shared type definitions matching the Supabase PostgreSQL schema.
5
- * Used by both desktop and mobile apps.
6
- */
7
- interface ExpenseCategory {
8
- id: string;
9
- userId: string;
10
- name: string;
11
- icon: string;
12
- color: string;
13
- sortOrder: number;
14
- isDefault: boolean;
15
- createdAt: string;
16
- updatedAt: string;
17
- }
18
- interface NewExpenseCategory {
19
- name: string;
20
- icon: string;
21
- color: string;
22
- sortOrder?: number;
23
- isDefault?: boolean;
24
- }
25
- interface Expense {
26
- id: string;
27
- userId: string;
28
- name: string;
29
- amount: number;
30
- currency: string;
31
- frequency: string;
32
- categoryId: string;
33
- nextDueDate: string;
34
- notes: string | null;
35
- isShared: boolean;
36
- sharePercentage: number;
37
- isActive: boolean;
38
- createdAt: string;
39
- updatedAt: string;
40
- category?: ExpenseCategory;
41
- }
42
- interface NewExpense {
43
- name: string;
44
- amount: number;
45
- currency: string;
46
- frequency: string;
47
- categoryId: string;
48
- nextDueDate: string;
49
- notes?: string | null;
50
- isShared?: boolean;
51
- sharePercentage?: number;
52
- isActive?: boolean;
53
- }
54
- interface IncomeCategory {
55
- id: string;
56
- userId: string;
57
- name: string;
58
- icon: string;
59
- color: string;
60
- sortOrder: number;
61
- isDefault: boolean;
62
- createdAt: string;
63
- updatedAt: string;
64
- }
65
- interface NewIncomeCategory {
66
- name: string;
67
- icon: string;
68
- color: string;
69
- sortOrder?: number;
70
- isDefault?: boolean;
71
- }
72
- interface Income {
73
- id: string;
74
- userId: string;
75
- name: string;
76
- amount: number;
77
- currency: string;
78
- frequency: string;
79
- categoryId: string;
80
- nextPayDate: string;
81
- notes: string | null;
82
- isActive: boolean;
83
- createdAt: string;
84
- updatedAt: string;
85
- category?: IncomeCategory;
86
- }
87
- interface NewIncome {
88
- name: string;
89
- amount: number;
90
- currency: string;
91
- frequency: string;
92
- categoryId: string;
93
- nextPayDate: string;
94
- notes?: string | null;
95
- isActive?: boolean;
96
- }
97
- interface FocusCategory {
98
- id: string;
99
- userId: string;
100
- name: string;
101
- color: string;
102
- sortOrder: number;
103
- isDefault: boolean;
104
- createdAt: string;
105
- updatedAt: string;
106
- }
107
- interface NewFocusCategory {
108
- name: string;
109
- color: string;
110
- sortOrder?: number;
111
- isDefault?: boolean;
112
- }
113
- type FocusSessionStatus = 'active' | 'completed' | 'abandoned';
114
- interface FocusSession {
115
- id: string;
116
- userId: string;
117
- title: string;
118
- categoryId: string | null;
119
- targetMinutes: number;
120
- actualSeconds: number;
121
- status: FocusSessionStatus;
122
- startedAt: string;
123
- completedAt: string | null;
124
- createdAt: string;
125
- updatedAt: string;
126
- category?: FocusCategory;
127
- }
128
- interface NewFocusSession {
129
- title: string;
130
- categoryId?: string | null;
131
- targetMinutes: number;
132
- actualSeconds?: number;
133
- status?: FocusSessionStatus;
134
- startedAt?: string;
135
- completedAt?: string | null;
136
- }
137
- interface FocusSessionFilters {
138
- categoryId?: string;
139
- status?: FocusSessionStatus;
140
- startedAfter?: string;
141
- startedBefore?: string;
142
- }
143
- type ChatMessageRole = 'user' | 'assistant' | 'system';
144
- interface ChatConversation {
145
- id: string;
146
- userId: string;
147
- title: string;
148
- createdAt: string;
149
- updatedAt: string;
150
- }
151
- interface NewChatConversation {
152
- title: string;
153
- }
154
- interface ChatMessage {
155
- id: string;
156
- conversationId: string;
157
- role: ChatMessageRole;
158
- content: string;
159
- metadata: string | null;
160
- createdAt: string;
161
- }
162
- interface NewChatMessage {
163
- conversationId: string;
164
- role: ChatMessageRole;
165
- content: string;
166
- metadata?: string | null;
167
- }
168
- interface EFLink {
169
- id: string;
170
- userId: string;
171
- name: string;
172
- url: string;
173
- icon: string | null;
174
- sortOrder: number;
175
- createdAt: string;
176
- updatedAt: string;
177
- }
178
- interface NewEFLink {
179
- name: string;
180
- url: string;
181
- icon?: string | null;
182
- sortOrder?: number;
183
- }
184
- type LieuDayType = 'earned' | 'used';
185
- interface LieuDay {
186
- id: string;
187
- userId: string;
188
- type: LieuDayType;
189
- date: string;
190
- reason: string | null;
191
- createdAt: string;
192
- updatedAt: string;
193
- }
194
- interface NewLieuDay {
195
- type: LieuDayType;
196
- date: string;
197
- reason?: string | null;
198
- }
199
- type BankConnectionStatus = 'pending' | 'linked' | 'expired' | 'error';
200
- type TransactionType = 'debit' | 'credit';
201
- interface BankConnection {
202
- id: string;
203
- userId: string;
204
- provider: string;
205
- institutionId: string;
206
- institutionName: string;
207
- requisitionId: string;
208
- accountId: string | null;
209
- status: BankConnectionStatus;
210
- lastSynced: string | null;
211
- createdAt: string;
212
- updatedAt: string;
213
- }
214
- interface BankTransaction {
215
- id: string;
216
- connectionId: string | null;
217
- externalId: string;
218
- amount: number;
219
- currency: string;
220
- description: string | null;
221
- merchantName: string | null;
222
- bookingDate: string;
223
- valueDate: string | null;
224
- transactionType: TransactionType | null;
225
- createdAt: string;
226
- }
227
- interface Setting {
228
- id: string;
229
- userId: string;
230
- key: string;
231
- value: string;
232
- updatedAt: string;
233
- }
234
- interface ExchangeRate {
235
- currency: string;
236
- rateToCHF: number;
237
- updatedAt: string;
238
- }
239
-
240
- export type { BankConnectionStatus as B, ChatMessageRole as C, ExpenseCategory as E, FocusCategory as F, IncomeCategory as I, LieuDayType as L, NewExpenseCategory as N, Setting as S, TransactionType as T, Expense as a, NewExpense as b, NewIncomeCategory as c, Income as d, NewIncome as e, NewFocusCategory as f, FocusSessionStatus as g, FocusSession as h, NewFocusSession as i, FocusSessionFilters as j, ChatConversation as k, NewChatConversation as l, ChatMessage as m, NewChatMessage as n, EFLink as o, NewEFLink as p, LieuDay as q, NewLieuDay as r, BankConnection as s, BankTransaction as t, ExchangeRate as u };
@@ -1,240 +0,0 @@
1
- /**
2
- * Database Types for Vanaheim
3
- *
4
- * Shared type definitions matching the Supabase PostgreSQL schema.
5
- * Used by both desktop and mobile apps.
6
- */
7
- interface ExpenseCategory {
8
- id: string;
9
- userId: string;
10
- name: string;
11
- icon: string;
12
- color: string;
13
- sortOrder: number;
14
- isDefault: boolean;
15
- createdAt: string;
16
- updatedAt: string;
17
- }
18
- interface NewExpenseCategory {
19
- name: string;
20
- icon: string;
21
- color: string;
22
- sortOrder?: number;
23
- isDefault?: boolean;
24
- }
25
- interface Expense {
26
- id: string;
27
- userId: string;
28
- name: string;
29
- amount: number;
30
- currency: string;
31
- frequency: string;
32
- categoryId: string;
33
- nextDueDate: string;
34
- notes: string | null;
35
- isShared: boolean;
36
- sharePercentage: number;
37
- isActive: boolean;
38
- createdAt: string;
39
- updatedAt: string;
40
- category?: ExpenseCategory;
41
- }
42
- interface NewExpense {
43
- name: string;
44
- amount: number;
45
- currency: string;
46
- frequency: string;
47
- categoryId: string;
48
- nextDueDate: string;
49
- notes?: string | null;
50
- isShared?: boolean;
51
- sharePercentage?: number;
52
- isActive?: boolean;
53
- }
54
- interface IncomeCategory {
55
- id: string;
56
- userId: string;
57
- name: string;
58
- icon: string;
59
- color: string;
60
- sortOrder: number;
61
- isDefault: boolean;
62
- createdAt: string;
63
- updatedAt: string;
64
- }
65
- interface NewIncomeCategory {
66
- name: string;
67
- icon: string;
68
- color: string;
69
- sortOrder?: number;
70
- isDefault?: boolean;
71
- }
72
- interface Income {
73
- id: string;
74
- userId: string;
75
- name: string;
76
- amount: number;
77
- currency: string;
78
- frequency: string;
79
- categoryId: string;
80
- nextPayDate: string;
81
- notes: string | null;
82
- isActive: boolean;
83
- createdAt: string;
84
- updatedAt: string;
85
- category?: IncomeCategory;
86
- }
87
- interface NewIncome {
88
- name: string;
89
- amount: number;
90
- currency: string;
91
- frequency: string;
92
- categoryId: string;
93
- nextPayDate: string;
94
- notes?: string | null;
95
- isActive?: boolean;
96
- }
97
- interface FocusCategory {
98
- id: string;
99
- userId: string;
100
- name: string;
101
- color: string;
102
- sortOrder: number;
103
- isDefault: boolean;
104
- createdAt: string;
105
- updatedAt: string;
106
- }
107
- interface NewFocusCategory {
108
- name: string;
109
- color: string;
110
- sortOrder?: number;
111
- isDefault?: boolean;
112
- }
113
- type FocusSessionStatus = 'active' | 'completed' | 'abandoned';
114
- interface FocusSession {
115
- id: string;
116
- userId: string;
117
- title: string;
118
- categoryId: string | null;
119
- targetMinutes: number;
120
- actualSeconds: number;
121
- status: FocusSessionStatus;
122
- startedAt: string;
123
- completedAt: string | null;
124
- createdAt: string;
125
- updatedAt: string;
126
- category?: FocusCategory;
127
- }
128
- interface NewFocusSession {
129
- title: string;
130
- categoryId?: string | null;
131
- targetMinutes: number;
132
- actualSeconds?: number;
133
- status?: FocusSessionStatus;
134
- startedAt?: string;
135
- completedAt?: string | null;
136
- }
137
- interface FocusSessionFilters {
138
- categoryId?: string;
139
- status?: FocusSessionStatus;
140
- startedAfter?: string;
141
- startedBefore?: string;
142
- }
143
- type ChatMessageRole = 'user' | 'assistant' | 'system';
144
- interface ChatConversation {
145
- id: string;
146
- userId: string;
147
- title: string;
148
- createdAt: string;
149
- updatedAt: string;
150
- }
151
- interface NewChatConversation {
152
- title: string;
153
- }
154
- interface ChatMessage {
155
- id: string;
156
- conversationId: string;
157
- role: ChatMessageRole;
158
- content: string;
159
- metadata: string | null;
160
- createdAt: string;
161
- }
162
- interface NewChatMessage {
163
- conversationId: string;
164
- role: ChatMessageRole;
165
- content: string;
166
- metadata?: string | null;
167
- }
168
- interface EFLink {
169
- id: string;
170
- userId: string;
171
- name: string;
172
- url: string;
173
- icon: string | null;
174
- sortOrder: number;
175
- createdAt: string;
176
- updatedAt: string;
177
- }
178
- interface NewEFLink {
179
- name: string;
180
- url: string;
181
- icon?: string | null;
182
- sortOrder?: number;
183
- }
184
- type LieuDayType = 'earned' | 'used';
185
- interface LieuDay {
186
- id: string;
187
- userId: string;
188
- type: LieuDayType;
189
- date: string;
190
- reason: string | null;
191
- createdAt: string;
192
- updatedAt: string;
193
- }
194
- interface NewLieuDay {
195
- type: LieuDayType;
196
- date: string;
197
- reason?: string | null;
198
- }
199
- type BankConnectionStatus = 'pending' | 'linked' | 'expired' | 'error';
200
- type TransactionType = 'debit' | 'credit';
201
- interface BankConnection {
202
- id: string;
203
- userId: string;
204
- provider: string;
205
- institutionId: string;
206
- institutionName: string;
207
- requisitionId: string;
208
- accountId: string | null;
209
- status: BankConnectionStatus;
210
- lastSynced: string | null;
211
- createdAt: string;
212
- updatedAt: string;
213
- }
214
- interface BankTransaction {
215
- id: string;
216
- connectionId: string | null;
217
- externalId: string;
218
- amount: number;
219
- currency: string;
220
- description: string | null;
221
- merchantName: string | null;
222
- bookingDate: string;
223
- valueDate: string | null;
224
- transactionType: TransactionType | null;
225
- createdAt: string;
226
- }
227
- interface Setting {
228
- id: string;
229
- userId: string;
230
- key: string;
231
- value: string;
232
- updatedAt: string;
233
- }
234
- interface ExchangeRate {
235
- currency: string;
236
- rateToCHF: number;
237
- updatedAt: string;
238
- }
239
-
240
- export type { BankConnectionStatus as B, ChatMessageRole as C, ExpenseCategory as E, FocusCategory as F, IncomeCategory as I, LieuDayType as L, NewExpenseCategory as N, Setting as S, TransactionType as T, Expense as a, NewExpense as b, NewIncomeCategory as c, Income as d, NewIncome as e, NewFocusCategory as f, FocusSessionStatus as g, FocusSession as h, NewFocusSession as i, FocusSessionFilters as j, ChatConversation as k, NewChatConversation as l, ChatMessage as m, NewChatMessage as n, EFLink as o, NewEFLink as p, LieuDay as q, NewLieuDay as r, BankConnection as s, BankTransaction as t, ExchangeRate as u };