@fonderie/vue-auth 0.5.0 → 0.6.1

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.cjs CHANGED
@@ -20,39 +20,55 @@ var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: tru
20
20
  // src/index.ts
21
21
  var index_exports = {};
22
22
  __export(index_exports, {
23
- FonderieApiError: () => import_client8.FonderieApiError,
23
+ FonderieApiError: () => import_client12.FonderieApiError,
24
24
  TOKEN_KEY: () => TOKEN_KEY,
25
25
  clearToken: () => clearToken,
26
- isMfaRequired: () => import_client8.isMfaRequired,
26
+ isMfaRequired: () => import_client12.isMfaRequired,
27
27
  persistToken: () => persistToken,
28
28
  readToken: () => readToken,
29
+ useAccountData: () => useAccountData,
30
+ useChangePassword: () => useChangePassword,
29
31
  useForgotPassword: () => useForgotPassword,
30
32
  useLogin: () => useLogin,
31
33
  useLogout: () => useLogout,
32
34
  useMfaLogin: () => useMfaLogin,
35
+ useMfaSetup: () => useMfaSetup,
36
+ useProfile: () => useProfile,
33
37
  useRegister: () => useRegister,
34
38
  useResetPassword: () => useResetPassword,
35
39
  useSession: () => useSession,
36
40
  useVerifyEmail: () => useVerifyEmail
37
41
  });
38
42
  module.exports = __toCommonJS(index_exports);
39
- var import_client8 = require("@fonderie/client");
43
+ var import_client12 = require("@fonderie/client");
40
44
 
41
- // src/composables/useForgotPassword.ts
45
+ // src/composables/useAccountData.ts
42
46
  var import_client = require("@fonderie/client");
43
47
  var import_vue = require("@fonderie/vue");
44
48
  var import_vue2 = require("vue");
45
- function useForgotPassword(client) {
46
- const auth = (0, import_vue.useFonderieSubClient)(client, (c) => c.auth, "useForgotPassword");
49
+
50
+ // src/storage.ts
51
+ var TOKEN_KEY = "fonderie_access_token";
52
+ function persistToken(token) {
53
+ localStorage.setItem(TOKEN_KEY, token);
54
+ }
55
+ function clearToken() {
56
+ localStorage.removeItem(TOKEN_KEY);
57
+ }
58
+ function readToken() {
59
+ return localStorage.getItem(TOKEN_KEY);
60
+ }
61
+
62
+ // src/composables/useAccountData.ts
63
+ function useAccountData(client) {
64
+ const auth = (0, import_vue.useFonderieSubClient)(client, (c) => c.auth, "useAccountData");
47
65
  const isLoading = (0, import_vue2.ref)(false);
48
66
  const error = (0, import_vue2.ref)(null);
49
- const sent = (0, import_vue2.ref)(false);
50
- async function forgotPassword(email) {
67
+ async function run(op) {
51
68
  isLoading.value = true;
52
69
  error.value = null;
53
70
  try {
54
- await auth.forgotPassword(email);
55
- sent.value = true;
71
+ return await op();
56
72
  } catch (err) {
57
73
  const apiError = err instanceof import_client.FonderieApiError ? err : new import_client.FonderieApiError("unknown", String(err), 0);
58
74
  error.value = apiError;
@@ -61,40 +77,92 @@ function useForgotPassword(client) {
61
77
  isLoading.value = false;
62
78
  }
63
79
  }
64
- return { forgotPassword, isLoading, error, sent };
80
+ function exportData() {
81
+ return run(async () => {
82
+ const { result } = await auth.exportData();
83
+ return result;
84
+ });
85
+ }
86
+ function deleteUser() {
87
+ return run(async () => {
88
+ await auth.deleteUser();
89
+ auth.setAccessToken(void 0);
90
+ clearToken();
91
+ });
92
+ }
93
+ return { exportData, deleteUser, isLoading, error };
65
94
  }
66
95
 
67
- // src/composables/useLogin.ts
96
+ // src/composables/useChangePassword.ts
68
97
  var import_client2 = require("@fonderie/client");
69
98
  var import_vue3 = require("@fonderie/vue");
70
99
  var import_vue4 = require("vue");
71
-
72
- // src/storage.ts
73
- var TOKEN_KEY = "fonderie_access_token";
74
- function persistToken(token) {
75
- localStorage.setItem(TOKEN_KEY, token);
76
- }
77
- function clearToken() {
78
- localStorage.removeItem(TOKEN_KEY);
100
+ function useChangePassword(client) {
101
+ const auth = (0, import_vue3.useFonderieSubClient)(client, (c) => c.auth, "useChangePassword");
102
+ const isLoading = (0, import_vue4.ref)(false);
103
+ const error = (0, import_vue4.ref)(null);
104
+ const done = (0, import_vue4.ref)(false);
105
+ async function changePassword(input) {
106
+ isLoading.value = true;
107
+ error.value = null;
108
+ done.value = false;
109
+ try {
110
+ await auth.changePassword(input);
111
+ done.value = true;
112
+ } catch (err) {
113
+ const apiError = err instanceof import_client2.FonderieApiError ? err : new import_client2.FonderieApiError("unknown", String(err), 0);
114
+ error.value = apiError;
115
+ throw apiError;
116
+ } finally {
117
+ isLoading.value = false;
118
+ }
119
+ }
120
+ return { changePassword, isLoading, error, done };
79
121
  }
80
- function readToken() {
81
- return localStorage.getItem(TOKEN_KEY);
122
+
123
+ // src/composables/useForgotPassword.ts
124
+ var import_client3 = require("@fonderie/client");
125
+ var import_vue5 = require("@fonderie/vue");
126
+ var import_vue6 = require("vue");
127
+ function useForgotPassword(client) {
128
+ const auth = (0, import_vue5.useFonderieSubClient)(client, (c) => c.auth, "useForgotPassword");
129
+ const isLoading = (0, import_vue6.ref)(false);
130
+ const error = (0, import_vue6.ref)(null);
131
+ const sent = (0, import_vue6.ref)(false);
132
+ async function forgotPassword(email) {
133
+ isLoading.value = true;
134
+ error.value = null;
135
+ try {
136
+ await auth.forgotPassword(email);
137
+ sent.value = true;
138
+ } catch (err) {
139
+ const apiError = err instanceof import_client3.FonderieApiError ? err : new import_client3.FonderieApiError("unknown", String(err), 0);
140
+ error.value = apiError;
141
+ throw apiError;
142
+ } finally {
143
+ isLoading.value = false;
144
+ }
145
+ }
146
+ return { forgotPassword, isLoading, error, sent };
82
147
  }
83
148
 
84
149
  // src/composables/useLogin.ts
150
+ var import_client4 = require("@fonderie/client");
151
+ var import_vue7 = require("@fonderie/vue");
152
+ var import_vue8 = require("vue");
85
153
  function useLogin(client) {
86
- const auth = (0, import_vue3.useFonderieSubClient)(client, (c) => c.auth, "useLogin");
87
- const isLoading = (0, import_vue4.ref)(false);
88
- const error = (0, import_vue4.ref)(null);
89
- const data = (0, import_vue4.ref)(null);
90
- const mfaPending = (0, import_vue4.ref)(null);
154
+ const auth = (0, import_vue7.useFonderieSubClient)(client, (c) => c.auth, "useLogin");
155
+ const isLoading = (0, import_vue8.ref)(false);
156
+ const error = (0, import_vue8.ref)(null);
157
+ const data = (0, import_vue8.ref)(null);
158
+ const mfaPending = (0, import_vue8.ref)(null);
91
159
  async function login(input) {
92
160
  isLoading.value = true;
93
161
  error.value = null;
94
162
  mfaPending.value = null;
95
163
  try {
96
164
  const { result } = await auth.login(input);
97
- if ((0, import_client2.isMfaRequired)(result)) {
165
+ if ((0, import_client4.isMfaRequired)(result)) {
98
166
  mfaPending.value = result;
99
167
  return result;
100
168
  }
@@ -103,7 +171,7 @@ function useLogin(client) {
103
171
  data.value = result;
104
172
  return result;
105
173
  } catch (err) {
106
- const apiError = err instanceof import_client2.FonderieApiError ? err : new import_client2.FonderieApiError("unknown", String(err), 0);
174
+ const apiError = err instanceof import_client4.FonderieApiError ? err : new import_client4.FonderieApiError("unknown", String(err), 0);
107
175
  error.value = apiError;
108
176
  throw apiError;
109
177
  } finally {
@@ -114,20 +182,20 @@ function useLogin(client) {
114
182
  }
115
183
 
116
184
  // src/composables/useLogout.ts
117
- var import_client3 = require("@fonderie/client");
118
- var import_vue5 = require("@fonderie/vue");
119
- var import_vue6 = require("vue");
185
+ var import_client5 = require("@fonderie/client");
186
+ var import_vue9 = require("@fonderie/vue");
187
+ var import_vue10 = require("vue");
120
188
  function useLogout(client) {
121
- const auth = (0, import_vue5.useFonderieSubClient)(client, (c) => c.auth, "useLogout");
122
- const isLoading = (0, import_vue6.ref)(false);
123
- const error = (0, import_vue6.ref)(null);
189
+ const auth = (0, import_vue9.useFonderieSubClient)(client, (c) => c.auth, "useLogout");
190
+ const isLoading = (0, import_vue10.ref)(false);
191
+ const error = (0, import_vue10.ref)(null);
124
192
  async function logout(refreshToken) {
125
193
  isLoading.value = true;
126
194
  error.value = null;
127
195
  try {
128
196
  await auth.logout(refreshToken);
129
197
  } catch (err) {
130
- const apiError = err instanceof import_client3.FonderieApiError ? err : new import_client3.FonderieApiError("unknown", String(err), 0);
198
+ const apiError = err instanceof import_client5.FonderieApiError ? err : new import_client5.FonderieApiError("unknown", String(err), 0);
131
199
  error.value = apiError;
132
200
  } finally {
133
201
  auth.setAccessToken(void 0);
@@ -139,14 +207,14 @@ function useLogout(client) {
139
207
  }
140
208
 
141
209
  // src/composables/useMfaLogin.ts
142
- var import_client4 = require("@fonderie/client");
143
- var import_vue7 = require("@fonderie/vue");
144
- var import_vue8 = require("vue");
210
+ var import_client6 = require("@fonderie/client");
211
+ var import_vue11 = require("@fonderie/vue");
212
+ var import_vue12 = require("vue");
145
213
  function useMfaLogin(client) {
146
- const auth = (0, import_vue7.useFonderieSubClient)(client, (c) => c.auth, "useMfaLogin");
147
- const isLoading = (0, import_vue8.ref)(false);
148
- const error = (0, import_vue8.ref)(null);
149
- const data = (0, import_vue8.ref)(null);
214
+ const auth = (0, import_vue11.useFonderieSubClient)(client, (c) => c.auth, "useMfaLogin");
215
+ const isLoading = (0, import_vue12.ref)(false);
216
+ const error = (0, import_vue12.ref)(null);
217
+ const data = (0, import_vue12.ref)(null);
150
218
  async function verifyLogin(mfaToken, code) {
151
219
  isLoading.value = true;
152
220
  error.value = null;
@@ -157,7 +225,7 @@ function useMfaLogin(client) {
157
225
  data.value = result;
158
226
  return result;
159
227
  } catch (err) {
160
- const apiError = err instanceof import_client4.FonderieApiError ? err : new import_client4.FonderieApiError("unknown", String(err), 0);
228
+ const apiError = err instanceof import_client6.FonderieApiError ? err : new import_client6.FonderieApiError("unknown", String(err), 0);
161
229
  error.value = apiError;
162
230
  throw apiError;
163
231
  } finally {
@@ -167,15 +235,128 @@ function useMfaLogin(client) {
167
235
  return { verifyLogin, isLoading, error, data };
168
236
  }
169
237
 
238
+ // src/composables/useMfaSetup.ts
239
+ var import_client7 = require("@fonderie/client");
240
+ var import_vue13 = require("@fonderie/vue");
241
+ var import_vue14 = require("vue");
242
+ function useMfaSetup(client) {
243
+ const auth = (0, import_vue13.useFonderieSubClient)(client, (c) => c.auth, "useMfaSetup");
244
+ const setupData = (0, import_vue14.ref)(null);
245
+ const isLoading = (0, import_vue14.ref)(false);
246
+ const error = (0, import_vue14.ref)(null);
247
+ async function run(op) {
248
+ isLoading.value = true;
249
+ error.value = null;
250
+ try {
251
+ return await op();
252
+ } catch (err) {
253
+ const apiError = err instanceof import_client7.FonderieApiError ? err : new import_client7.FonderieApiError("unknown", String(err), 0);
254
+ error.value = apiError;
255
+ throw apiError;
256
+ } finally {
257
+ isLoading.value = false;
258
+ }
259
+ }
260
+ function setup() {
261
+ return run(async () => {
262
+ const { result } = await auth.mfa.setup();
263
+ setupData.value = result;
264
+ return result;
265
+ });
266
+ }
267
+ function verify(code) {
268
+ return run(async () => {
269
+ const { result } = await auth.mfa.verify(code);
270
+ auth.setAccessToken(result.tokens.access);
271
+ persistToken(result.tokens.access);
272
+ return result;
273
+ });
274
+ }
275
+ function disable(code) {
276
+ return run(async () => {
277
+ await auth.mfa.disable(code);
278
+ });
279
+ }
280
+ function regenerateBackupCodes(code) {
281
+ return run(async () => {
282
+ const { result } = await auth.mfa.regenerateBackupCodes(code);
283
+ return result.backupCodes;
284
+ });
285
+ }
286
+ return { setup, setupData, verify, disable, regenerateBackupCodes, isLoading, error };
287
+ }
288
+
289
+ // src/composables/useProfile.ts
290
+ var import_client8 = require("@fonderie/client");
291
+ var import_vue15 = require("@fonderie/vue");
292
+ var import_vue16 = require("vue");
293
+ function useProfile(client) {
294
+ const auth = (0, import_vue15.useFonderieSubClient)(client, (c) => c.auth, "useProfile");
295
+ const user = (0, import_vue16.ref)(null);
296
+ const isLoading = (0, import_vue16.ref)(true);
297
+ const error = (0, import_vue16.ref)(null);
298
+ async function refresh() {
299
+ isLoading.value = true;
300
+ error.value = null;
301
+ try {
302
+ const { result } = await auth.getUser();
303
+ user.value = result.user;
304
+ } catch (err) {
305
+ const apiError = err instanceof import_client8.FonderieApiError ? err : new import_client8.FonderieApiError("unknown", String(err), 0);
306
+ error.value = apiError;
307
+ } finally {
308
+ isLoading.value = false;
309
+ }
310
+ }
311
+ async function mutate(op) {
312
+ error.value = null;
313
+ try {
314
+ return await op();
315
+ } catch (err) {
316
+ const apiError = err instanceof import_client8.FonderieApiError ? err : new import_client8.FonderieApiError("unknown", String(err), 0);
317
+ error.value = apiError;
318
+ throw apiError;
319
+ }
320
+ }
321
+ function updateProfile(input) {
322
+ return mutate(async () => {
323
+ const { result } = await auth.updateProfile(input);
324
+ user.value = result.user;
325
+ return result.user;
326
+ });
327
+ }
328
+ function updatePreferences(input) {
329
+ return mutate(async () => {
330
+ const { result } = await auth.updatePreferences(input);
331
+ user.value = result.user;
332
+ return result.user;
333
+ });
334
+ }
335
+ function updateEmail(email) {
336
+ return mutate(async () => {
337
+ await auth.updateEmail(email);
338
+ await refresh();
339
+ });
340
+ }
341
+ function updatePhone(phone) {
342
+ return mutate(async () => {
343
+ await auth.updatePhone(phone);
344
+ await refresh();
345
+ });
346
+ }
347
+ void refresh();
348
+ return { user, refresh, updateProfile, updatePreferences, updateEmail, updatePhone, isLoading, error };
349
+ }
350
+
170
351
  // src/composables/useRegister.ts
171
- var import_client5 = require("@fonderie/client");
172
- var import_vue9 = require("@fonderie/vue");
173
- var import_vue10 = require("vue");
352
+ var import_client9 = require("@fonderie/client");
353
+ var import_vue17 = require("@fonderie/vue");
354
+ var import_vue18 = require("vue");
174
355
  function useRegister(client) {
175
- const auth = (0, import_vue9.useFonderieSubClient)(client, (c) => c.auth, "useRegister");
176
- const isLoading = (0, import_vue10.ref)(false);
177
- const error = (0, import_vue10.ref)(null);
178
- const data = (0, import_vue10.ref)(null);
356
+ const auth = (0, import_vue17.useFonderieSubClient)(client, (c) => c.auth, "useRegister");
357
+ const isLoading = (0, import_vue18.ref)(false);
358
+ const error = (0, import_vue18.ref)(null);
359
+ const data = (0, import_vue18.ref)(null);
179
360
  async function register(input) {
180
361
  isLoading.value = true;
181
362
  error.value = null;
@@ -186,7 +367,7 @@ function useRegister(client) {
186
367
  data.value = result;
187
368
  return result;
188
369
  } catch (err) {
189
- const apiError = err instanceof import_client5.FonderieApiError ? err : new import_client5.FonderieApiError("unknown", String(err), 0);
370
+ const apiError = err instanceof import_client9.FonderieApiError ? err : new import_client9.FonderieApiError("unknown", String(err), 0);
190
371
  error.value = apiError;
191
372
  throw apiError;
192
373
  } finally {
@@ -197,14 +378,14 @@ function useRegister(client) {
197
378
  }
198
379
 
199
380
  // src/composables/useResetPassword.ts
200
- var import_client6 = require("@fonderie/client");
201
- var import_vue11 = require("@fonderie/vue");
202
- var import_vue12 = require("vue");
381
+ var import_client10 = require("@fonderie/client");
382
+ var import_vue19 = require("@fonderie/vue");
383
+ var import_vue20 = require("vue");
203
384
  function useResetPassword(client) {
204
- const auth = (0, import_vue11.useFonderieSubClient)(client, (c) => c.auth, "useResetPassword");
205
- const isLoading = (0, import_vue12.ref)(false);
206
- const error = (0, import_vue12.ref)(null);
207
- const done = (0, import_vue12.ref)(false);
385
+ const auth = (0, import_vue19.useFonderieSubClient)(client, (c) => c.auth, "useResetPassword");
386
+ const isLoading = (0, import_vue20.ref)(false);
387
+ const error = (0, import_vue20.ref)(null);
388
+ const done = (0, import_vue20.ref)(false);
208
389
  async function resetPassword(input) {
209
390
  isLoading.value = true;
210
391
  error.value = null;
@@ -212,7 +393,7 @@ function useResetPassword(client) {
212
393
  await auth.resetPassword(input);
213
394
  done.value = true;
214
395
  } catch (err) {
215
- const apiError = err instanceof import_client6.FonderieApiError ? err : new import_client6.FonderieApiError("unknown", String(err), 0);
396
+ const apiError = err instanceof import_client10.FonderieApiError ? err : new import_client10.FonderieApiError("unknown", String(err), 0);
216
397
  error.value = apiError;
217
398
  throw apiError;
218
399
  } finally {
@@ -223,13 +404,13 @@ function useResetPassword(client) {
223
404
  }
224
405
 
225
406
  // src/composables/useSession.ts
226
- var import_vue13 = require("@fonderie/vue");
227
- var import_vue14 = require("vue");
407
+ var import_vue21 = require("@fonderie/vue");
408
+ var import_vue22 = require("vue");
228
409
  function useSession(client) {
229
- const auth = (0, import_vue13.useFonderieSubClient)(client, (c) => c.auth, "useSession");
230
- const user = (0, import_vue14.ref)(null);
231
- const isLoading = (0, import_vue14.ref)(true);
232
- const isAuthenticated = (0, import_vue14.ref)(false);
410
+ const auth = (0, import_vue21.useFonderieSubClient)(client, (c) => c.auth, "useSession");
411
+ const user = (0, import_vue22.ref)(null);
412
+ const isLoading = (0, import_vue22.ref)(true);
413
+ const isAuthenticated = (0, import_vue22.ref)(false);
233
414
  async function refresh() {
234
415
  isLoading.value = true;
235
416
  try {
@@ -262,14 +443,30 @@ function useSession(client) {
262
443
  }
263
444
 
264
445
  // src/composables/useVerifyEmail.ts
265
- var import_client7 = require("@fonderie/client");
266
- var import_vue15 = require("@fonderie/vue");
267
- var import_vue16 = require("vue");
446
+ var import_client11 = require("@fonderie/client");
447
+ var import_vue23 = require("@fonderie/vue");
448
+ var import_vue24 = require("vue");
268
449
  function useVerifyEmail(client) {
269
- const auth = (0, import_vue15.useFonderieSubClient)(client, (c) => c.auth, "useVerifyEmail");
270
- const isLoading = (0, import_vue16.ref)(false);
271
- const error = (0, import_vue16.ref)(null);
272
- const data = (0, import_vue16.ref)(null);
450
+ const auth = (0, import_vue23.useFonderieSubClient)(client, (c) => c.auth, "useVerifyEmail");
451
+ const isLoading = (0, import_vue24.ref)(false);
452
+ const error = (0, import_vue24.ref)(null);
453
+ const data = (0, import_vue24.ref)(null);
454
+ const resent = (0, import_vue24.ref)(false);
455
+ async function resend() {
456
+ isLoading.value = true;
457
+ error.value = null;
458
+ resent.value = false;
459
+ try {
460
+ await auth.sendVerificationEmail();
461
+ resent.value = true;
462
+ } catch (err) {
463
+ const apiError = err instanceof import_client11.FonderieApiError ? err : new import_client11.FonderieApiError("unknown", String(err), 0);
464
+ error.value = apiError;
465
+ throw apiError;
466
+ } finally {
467
+ isLoading.value = false;
468
+ }
469
+ }
273
470
  async function verifyEmail(pin) {
274
471
  isLoading.value = true;
275
472
  error.value = null;
@@ -278,14 +475,14 @@ function useVerifyEmail(client) {
278
475
  data.value = result;
279
476
  return result;
280
477
  } catch (err) {
281
- const apiError = err instanceof import_client7.FonderieApiError ? err : new import_client7.FonderieApiError("unknown", String(err), 0);
478
+ const apiError = err instanceof import_client11.FonderieApiError ? err : new import_client11.FonderieApiError("unknown", String(err), 0);
282
479
  error.value = apiError;
283
480
  throw apiError;
284
481
  } finally {
285
482
  isLoading.value = false;
286
483
  }
287
484
  }
288
- return { verifyEmail, isLoading, error, data };
485
+ return { verifyEmail, resend, resent, isLoading, error, data };
289
486
  }
290
487
  // Annotate the CommonJS export names for ESM import in node:
291
488
  0 && (module.exports = {
@@ -295,10 +492,14 @@ function useVerifyEmail(client) {
295
492
  isMfaRequired,
296
493
  persistToken,
297
494
  readToken,
495
+ useAccountData,
496
+ useChangePassword,
298
497
  useForgotPassword,
299
498
  useLogin,
300
499
  useLogout,
301
500
  useMfaLogin,
501
+ useMfaSetup,
502
+ useProfile,
302
503
  useRegister,
303
504
  useResetPassword,
304
505
  useSession,
@@ -1 +1 @@
1
- {"version":3,"sources":["../src/index.ts","../src/composables/useForgotPassword.ts","../src/composables/useLogin.ts","../src/storage.ts","../src/composables/useLogout.ts","../src/composables/useMfaLogin.ts","../src/composables/useRegister.ts","../src/composables/useResetPassword.ts","../src/composables/useSession.ts","../src/composables/useVerifyEmail.ts"],"sourcesContent":["export type {\n\tAuthClient,\n\tILoginInput,\n\tILoginResult,\n\tIMfaRequiredResult,\n\tIRegisterInput,\n\tIRegisterResult,\n\tIResetPasswordInput,\n\tITokens,\n\tIUserDTO,\n\tIVerifyEmailResult,\n} from '@fonderie/client';\n\nexport { FonderieApiError, isMfaRequired } from '@fonderie/client';\n\nexport type { IUseMfaLoginReturn } from './composables';\nexport {\n\tuseForgotPassword,\n\tuseLogin,\n\tuseLogout,\n\tuseMfaLogin,\n\tuseRegister,\n\tuseResetPassword,\n\tuseSession,\n\tuseVerifyEmail,\n} from './composables';\n\n// Token persistence primitives — for wiring app-level flows (e.g. the\n// client's auth.onTokensChanged) to the same storage the hooks use.\nexport { clearToken, persistToken, readToken, TOKEN_KEY } from './storage';\n","import type { AuthClient } from '@fonderie/client';\nimport { FonderieApiError } from '@fonderie/client';\nimport { useFonderieSubClient } from '@fonderie/vue';\nimport { ref } from 'vue';\n\nexport function useForgotPassword(client?: AuthClient) {\n\tconst auth = useFonderieSubClient(client, (c) => c.auth, 'useForgotPassword');\n\tconst isLoading = ref(false);\n\tconst error = ref<FonderieApiError | null>(null);\n\tconst sent = ref(false);\n\n\tasync function forgotPassword(email: string) {\n\t\tisLoading.value = true;\n\t\terror.value = null;\n\t\ttry {\n\t\t\tawait auth.forgotPassword(email);\n\t\t\tsent.value = true;\n\t\t} catch (err) {\n\t\t\tconst apiError =\n\t\t\t\terr instanceof FonderieApiError ? err : new FonderieApiError('unknown', String(err), 0);\n\t\t\terror.value = apiError;\n\t\t\tthrow apiError;\n\t\t} finally {\n\t\t\tisLoading.value = false;\n\t\t}\n\t}\n\n\treturn { forgotPassword, isLoading, error, sent };\n}\n","import type { AuthClient, ILoginInput, ILoginResult, IMfaRequiredResult } from '@fonderie/client';\nimport { FonderieApiError, isMfaRequired } from '@fonderie/client';\nimport { useFonderieSubClient } from '@fonderie/vue';\nimport { ref } from 'vue';\nimport { persistToken } from '../storage';\n\nexport function useLogin(client?: AuthClient) {\n\tconst auth = useFonderieSubClient(client, (c) => c.auth, 'useLogin');\n\tconst isLoading = ref(false);\n\tconst error = ref<FonderieApiError | null>(null);\n\tconst data = ref<ILoginResult | null>(null);\n\t// Set when the account requires MFA: complete the login with\n\t// client.auth.mfa.verifyLogin(mfaPending.value.mfaToken, code).\n\tconst mfaPending = ref<IMfaRequiredResult | null>(null);\n\n\tasync function login(input: ILoginInput) {\n\t\tisLoading.value = true;\n\t\terror.value = null;\n\t\tmfaPending.value = null;\n\t\ttry {\n\t\t\tconst { result } = await auth.login(input);\n\t\t\tif (isMfaRequired(result)) {\n\t\t\t\tmfaPending.value = result;\n\t\t\t\treturn result;\n\t\t\t}\n\t\t\tauth.setAccessToken(result.tokens.access);\n\t\t\tpersistToken(result.tokens.access);\n\t\t\tdata.value = result;\n\t\t\treturn result;\n\t\t} catch (err) {\n\t\t\tconst apiError =\n\t\t\t\terr instanceof FonderieApiError ? err : new FonderieApiError('unknown', String(err), 0);\n\t\t\terror.value = apiError;\n\t\t\tthrow apiError;\n\t\t} finally {\n\t\t\tisLoading.value = false;\n\t\t}\n\t}\n\n\treturn { login, isLoading, error, data, mfaPending };\n}\n","export const TOKEN_KEY = 'fonderie_access_token';\n\nexport function persistToken(token: string) {\n\tlocalStorage.setItem(TOKEN_KEY, token);\n}\n\nexport function clearToken() {\n\tlocalStorage.removeItem(TOKEN_KEY);\n}\n\nexport function readToken(): string | null {\n\treturn localStorage.getItem(TOKEN_KEY);\n}\n","import type { AuthClient } from '@fonderie/client';\nimport { FonderieApiError } from '@fonderie/client';\nimport { useFonderieSubClient } from '@fonderie/vue';\nimport { ref } from 'vue';\nimport { clearToken } from '../storage';\n\nexport function useLogout(client?: AuthClient) {\n\tconst auth = useFonderieSubClient(client, (c) => c.auth, 'useLogout');\n\tconst isLoading = ref(false);\n\tconst error = ref<FonderieApiError | null>(null);\n\n\tasync function logout(refreshToken?: string) {\n\t\tisLoading.value = true;\n\t\terror.value = null;\n\t\ttry {\n\t\t\tawait auth.logout(refreshToken);\n\t\t} catch (err) {\n\t\t\tconst apiError =\n\t\t\t\terr instanceof FonderieApiError ? err : new FonderieApiError('unknown', String(err), 0);\n\t\t\terror.value = apiError;\n\t\t} finally {\n\t\t\tauth.setAccessToken(undefined);\n\t\t\tclearToken();\n\t\t\tisLoading.value = false;\n\t\t}\n\t}\n\n\treturn { logout, isLoading, error };\n}\n","import type { AuthClient, ILoginResult } from '@fonderie/client';\nimport { FonderieApiError } from '@fonderie/client';\nimport { useFonderieSubClient } from '@fonderie/vue';\nimport type { Ref } from 'vue';\nimport { ref } from 'vue';\nimport { persistToken } from '../storage';\n\nexport interface IUseMfaLoginReturn {\n\t// Completes a login that returned MFA_REQUIRED: verifies the TOTP code\n\t// against the temporary mfaToken from useLogin's mfaPending, then persists\n\t// the issued tokens exactly like a normal login.\n\tverifyLogin: (mfaToken: string, code: string) => Promise<ILoginResult>;\n\tisLoading: Ref<boolean>;\n\terror: Ref<FonderieApiError | null>;\n\tdata: Ref<ILoginResult | null>;\n}\n\nexport function useMfaLogin(client?: AuthClient): IUseMfaLoginReturn {\n\tconst auth = useFonderieSubClient(client, (c) => c.auth, 'useMfaLogin');\n\tconst isLoading = ref(false);\n\tconst error = ref<FonderieApiError | null>(null);\n\tconst data = ref<ILoginResult | null>(null);\n\n\tasync function verifyLogin(mfaToken: string, code: string) {\n\t\tisLoading.value = true;\n\t\terror.value = null;\n\t\ttry {\n\t\t\tconst { result } = await auth.mfa.verifyLogin(mfaToken, code);\n\t\t\tauth.setAccessToken(result.tokens.access);\n\t\t\tpersistToken(result.tokens.access);\n\t\t\tdata.value = result;\n\t\t\treturn result;\n\t\t} catch (err) {\n\t\t\tconst apiError =\n\t\t\t\terr instanceof FonderieApiError ? err : new FonderieApiError('unknown', String(err), 0);\n\t\t\terror.value = apiError;\n\t\t\tthrow apiError;\n\t\t} finally {\n\t\t\tisLoading.value = false;\n\t\t}\n\t}\n\n\treturn { verifyLogin, isLoading, error, data };\n}\n","import type { AuthClient, IRegisterInput, IRegisterResult } from '@fonderie/client';\nimport { FonderieApiError } from '@fonderie/client';\nimport { useFonderieSubClient } from '@fonderie/vue';\nimport { ref } from 'vue';\nimport { persistToken } from '../storage';\n\nexport function useRegister(client?: AuthClient) {\n\tconst auth = useFonderieSubClient(client, (c) => c.auth, 'useRegister');\n\tconst isLoading = ref(false);\n\tconst error = ref<FonderieApiError | null>(null);\n\tconst data = ref<IRegisterResult | null>(null);\n\n\tasync function register(input: IRegisterInput) {\n\t\tisLoading.value = true;\n\t\terror.value = null;\n\t\ttry {\n\t\t\tconst { result } = await auth.register(input);\n\t\t\tauth.setAccessToken(result.tokens.access);\n\t\t\tpersistToken(result.tokens.access);\n\t\t\tdata.value = result;\n\t\t\treturn result;\n\t\t} catch (err) {\n\t\t\tconst apiError =\n\t\t\t\terr instanceof FonderieApiError ? err : new FonderieApiError('unknown', String(err), 0);\n\t\t\terror.value = apiError;\n\t\t\tthrow apiError;\n\t\t} finally {\n\t\t\tisLoading.value = false;\n\t\t}\n\t}\n\n\treturn { register, isLoading, error, data };\n}\n","import type { AuthClient, IResetPasswordInput } from '@fonderie/client';\nimport { FonderieApiError } from '@fonderie/client';\nimport { useFonderieSubClient } from '@fonderie/vue';\nimport { ref } from 'vue';\n\nexport function useResetPassword(client?: AuthClient) {\n\tconst auth = useFonderieSubClient(client, (c) => c.auth, 'useResetPassword');\n\tconst isLoading = ref(false);\n\tconst error = ref<FonderieApiError | null>(null);\n\tconst done = ref(false);\n\n\tasync function resetPassword(input: IResetPasswordInput) {\n\t\tisLoading.value = true;\n\t\terror.value = null;\n\t\ttry {\n\t\t\tawait auth.resetPassword(input);\n\t\t\tdone.value = true;\n\t\t} catch (err) {\n\t\t\tconst apiError =\n\t\t\t\terr instanceof FonderieApiError ? err : new FonderieApiError('unknown', String(err), 0);\n\t\t\terror.value = apiError;\n\t\t\tthrow apiError;\n\t\t} finally {\n\t\t\tisLoading.value = false;\n\t\t}\n\t}\n\n\treturn { resetPassword, isLoading, error, done };\n}\n","import type { AuthClient, IUserDTO } from '@fonderie/client';\nimport { useFonderieSubClient } from '@fonderie/vue';\nimport { ref } from 'vue';\nimport { clearToken, readToken } from '../storage';\n\nexport function useSession(client?: AuthClient) {\n\tconst auth = useFonderieSubClient(client, (c) => c.auth, 'useSession');\n\tconst user = ref<IUserDTO | null>(null);\n\tconst isLoading = ref(true);\n\tconst isAuthenticated = ref(false);\n\n\tasync function refresh() {\n\t\tisLoading.value = true;\n\t\ttry {\n\t\t\tconst { result } = await auth.getUser();\n\t\t\tuser.value = result.user;\n\t\t\tisAuthenticated.value = true;\n\t\t} catch {\n\t\t\tuser.value = null;\n\t\t\tisAuthenticated.value = false;\n\t\t\tauth.setAccessToken(undefined);\n\t\t\tclearToken();\n\t\t} finally {\n\t\t\tisLoading.value = false;\n\t\t}\n\t}\n\n\tasync function logout(refreshToken?: string) {\n\t\ttry {\n\t\t\tawait auth.logout(refreshToken);\n\t\t} catch {\n\t\t\t// Session is being torn down regardless of server response.\n\t\t}\n\t\tauth.setAccessToken(undefined);\n\t\tclearToken();\n\t\tuser.value = null;\n\t\tisAuthenticated.value = false;\n\t}\n\n\tconst token = readToken();\n\tif (token) auth.setAccessToken(token);\n\tvoid refresh();\n\n\treturn { user, isLoading, isAuthenticated, refresh, logout };\n}\n","import type { AuthClient, IVerifyEmailResult } from '@fonderie/client';\nimport { FonderieApiError } from '@fonderie/client';\nimport { useFonderieSubClient } from '@fonderie/vue';\nimport { ref } from 'vue';\n\nexport function useVerifyEmail(client?: AuthClient) {\n\tconst auth = useFonderieSubClient(client, (c) => c.auth, 'useVerifyEmail');\n\tconst isLoading = ref(false);\n\tconst error = ref<FonderieApiError | null>(null);\n\tconst data = ref<IVerifyEmailResult | null>(null);\n\n\tasync function verifyEmail(pin: string) {\n\t\tisLoading.value = true;\n\t\terror.value = null;\n\t\ttry {\n\t\t\tconst { result } = await auth.verifyEmail(pin);\n\t\t\tdata.value = result;\n\t\t\treturn result;\n\t\t} catch (err) {\n\t\t\tconst apiError =\n\t\t\t\terr instanceof FonderieApiError ? err : new FonderieApiError('unknown', String(err), 0);\n\t\t\terror.value = apiError;\n\t\t\tthrow apiError;\n\t\t} finally {\n\t\t\tisLoading.value = false;\n\t\t}\n\t}\n\n\treturn { verifyEmail, isLoading, error, data };\n}\n"],"mappings":";;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAaA,IAAAA,iBAAgD;;;ACZhD,oBAAiC;AACjC,iBAAqC;AACrC,IAAAC,cAAoB;AAEb,SAAS,kBAAkB,QAAqB;AACtD,QAAM,WAAO,iCAAqB,QAAQ,CAAC,MAAM,EAAE,MAAM,mBAAmB;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Q;AAAA,EACzB;AAEA,QAAM,QAAQ,UAAU;AACxB,MAAI,MAAO,MAAK,eAAe,KAAK;AACpC,OAAK,QAAQ;AAEb,SAAO,EAAE,MAAM,WAAW,iBAAiB,SAAS,OAAO;AAC5D;;;AC3CA,IAAAC,iBAAiC;AACjC,IAAAC,eAAqC;AACrC,IAAAA,eAAoB;AAEb,SAAS,eAAe,QAAqB;AACnD,QAAM,WAAO,mCAAqB,QAAQ,CAAC,MAAM,EAAE,MAAM,gBAAgB;AACzE,QAAM,gBAAY,kBAAI,KAAK;AAC3B,QAAM,YAAQ,kBAA6B,IAAI;AAC/C,QAAM,WAAO,kBAA+B,IAAI;AAEhD,iBAAe,YAAY,KAAa;AACvC,cAAU,QAAQ;AAClB,UAAM,QAAQ;AACd,QAAI;AACH,YAAM,EAAE,OAAO,IAAI,MAAM,KAAK,YAAY,GAAG;AAC7C,WAAK,QAAQ;AACb,aAAO;AAAA,IACR,SAAS,KAAK;AACb,YAAM,WACL,eAAe,kCAAmB,MAAM,IAAI,gCAAiB,WAAW,OAAO,GAAG,GAAG,CAAC;AACvF,YAAM,QAAQ;AACd,YAAM;AAAA,IACP,UAAE;AACD,gBAAU,QAAQ;AAAA,IACnB;AAAA,EACD;AAEA,SAAO,EAAE,aAAa,WAAW,OAAO,KAAK;AAC9C;","names":["import_client","import_vue","import_client","import_vue","import_client","import_vue","import_client","import_vue","import_client","import_vue","import_client","import_vue","import_vue","import_client","import_vue"]}
1
+ {"version":3,"sources":["../src/index.ts","../src/composables/useAccountData.ts","../src/storage.ts","../src/composables/useChangePassword.ts","../src/composables/useForgotPassword.ts","../src/composables/useLogin.ts","../src/composables/useLogout.ts","../src/composables/useMfaLogin.ts","../src/composables/useMfaSetup.ts","../src/composables/useProfile.ts","../src/composables/useRegister.ts","../src/composables/useResetPassword.ts","../src/composables/useSession.ts","../src/composables/useVerifyEmail.ts"],"sourcesContent":["export type {\n\tAuthClient,\n\tIChangePasswordInput,\n\tILoginInput,\n\tILoginResult,\n\tIMfaEnabledResult,\n\tIMfaRequiredResult,\n\tIMfaSetupResult,\n\tIRegisterInput,\n\tIRegisterResult,\n\tIResetPasswordInput,\n\tITokens,\n\tIUpdatePreferencesInput,\n\tIUpdateProfileInput,\n\tIUserDTO,\n\tIVerifyEmailResult,\n} from '@fonderie/client';\n\nexport { FonderieApiError, isMfaRequired } from '@fonderie/client';\n\nexport type {\n\tIUseAccountDataReturn,\n\tIUseChangePasswordReturn,\n\tIUseMfaLoginReturn,\n\tIUseMfaSetupReturn,\n\tIUseProfileReturn,\n} from './composables';\nexport {\n\tuseAccountData,\n\tuseChangePassword,\n\tuseForgotPassword,\n\tuseLogin,\n\tuseLogout,\n\tuseMfaLogin,\n\tuseMfaSetup,\n\tuseProfile,\n\tuseRegister,\n\tuseResetPassword,\n\tuseSession,\n\tuseVerifyEmail,\n} from './composables';\n\n// Token persistence primitives — for wiring app-level flows (e.g. the\n// client's auth.onTokensChanged) to the same storage the hooks use.\nexport { clearToken, persistToken, readToken, TOKEN_KEY } from './storage';\n","import type { AuthClient } from '@fonderie/client';\nimport { FonderieApiError } from '@fonderie/client';\nimport { useFonderieSubClient } from '@fonderie/vue';\nimport type { Ref } from 'vue';\nimport { ref } from 'vue';\nimport { clearToken } from '../storage';\n\nexport interface IUseAccountDataReturn {\n\t// GET /users/export — the caller's own data as a portable bundle (SAR).\n\texportData: () => Promise<unknown>;\n\t// Deletes the account, then tears the session down like a logout.\n\tdeleteUser: () => Promise<void>;\n\tisLoading: Ref<boolean>;\n\terror: Ref<FonderieApiError | null>;\n}\n\nexport function useAccountData(client?: AuthClient): IUseAccountDataReturn {\n\tconst auth = useFonderieSubClient(client, (c) => c.auth, 'useAccountData');\n\tconst isLoading = ref(false);\n\tconst error = ref<FonderieApiError | null>(null);\n\n\tasync function run<T>(op: () => Promise<T>): Promise<T> {\n\t\tisLoading.value = true;\n\t\terror.value = null;\n\t\ttry {\n\t\t\treturn await op();\n\t\t} catch (err) {\n\t\t\tconst apiError =\n\t\t\t\terr instanceof FonderieApiError ? err : new FonderieApiError('unknown', String(err), 0);\n\t\t\terror.value = apiError;\n\t\t\tthrow apiError;\n\t\t} finally {\n\t\t\tisLoading.value = false;\n\t\t}\n\t}\n\n\tfunction exportData() {\n\t\treturn run(async () => {\n\t\t\tconst { result } = await auth.exportData();\n\t\t\treturn result;\n\t\t});\n\t}\n\n\tfunction deleteUser() {\n\t\treturn run(async () => {\n\t\t\tawait auth.deleteUser();\n\t\t\tauth.setAccessToken(undefined);\n\t\t\tclearToken();\n\t\t});\n\t}\n\n\treturn { exportData, deleteUser, isLoading, error };\n}\n","export const TOKEN_KEY = 'fonderie_access_token';\n\nexport function persistToken(token: string) {\n\tlocalStorage.setItem(TOKEN_KEY, token);\n}\n\nexport function clearToken() {\n\tlocalStorage.removeItem(TOKEN_KEY);\n}\n\nexport function readToken(): string | null {\n\treturn localStorage.getItem(TOKEN_KEY);\n}\n","import type { AuthClient, IChangePasswordInput } from '@fonderie/client';\nimport { FonderieApiError } from '@fonderie/client';\nimport { useFonderieSubClient } from '@fonderie/vue';\nimport type { Ref } from 'vue';\nimport { ref } from 'vue';\n\nexport interface IUseChangePasswordReturn {\n\tchangePassword: (input: IChangePasswordInput) => Promise<void>;\n\tisLoading: Ref<boolean>;\n\terror: Ref<FonderieApiError | null>;\n\tdone: Ref<boolean>;\n}\n\nexport function useChangePassword(client?: AuthClient): IUseChangePasswordReturn {\n\tconst auth = useFonderieSubClient(client, (c) => c.auth, 'useChangePassword');\n\tconst isLoading = ref(false);\n\tconst error = ref<FonderieApiError | null>(null);\n\tconst done = ref(false);\n\n\tasync function changePassword(input: IChangePasswordInput) {\n\t\tisLoading.value = true;\n\t\terror.value = null;\n\t\tdone.value = false;\n\t\ttry {\n\t\t\tawait auth.changePassword(input);\n\t\t\tdone.value = true;\n\t\t} catch (err) {\n\t\t\tconst apiError =\n\t\t\t\terr instanceof FonderieApiError ? err : new FonderieApiError('unknown', String(err), 0);\n\t\t\terror.value = apiError;\n\t\t\tthrow apiError;\n\t\t} finally {\n\t\t\tisLoading.value = false;\n\t\t}\n\t}\n\n\treturn { changePassword, isLoading, error, done };\n}\n","import type { AuthClient } from '@fonderie/client';\nimport { FonderieApiError } from '@fonderie/client';\nimport { useFonderieSubClient } from '@fonderie/vue';\nimport { ref } from 'vue';\n\nexport function useForgotPassword(client?: AuthClient) {\n\tconst auth = useFonderieSubClient(client, (c) => c.auth, 'useForgotPassword');\n\tconst isLoading = ref(false);\n\tconst error = ref<FonderieApiError | null>(null);\n\tconst sent = ref(false);\n\n\tasync function forgotPassword(email: string) {\n\t\tisLoading.value = true;\n\t\terror.value = null;\n\t\ttry {\n\t\t\tawait auth.forgotPassword(email);\n\t\t\tsent.value = true;\n\t\t} catch (err) {\n\t\t\tconst apiError =\n\t\t\t\terr instanceof FonderieApiError ? err : new FonderieApiError('unknown', String(err), 0);\n\t\t\terror.value = apiError;\n\t\t\tthrow apiError;\n\t\t} finally {\n\t\t\tisLoading.value = false;\n\t\t}\n\t}\n\n\treturn { forgotPassword, isLoading, error, sent };\n}\n","import type { AuthClient, ILoginInput, ILoginResult, IMfaRequiredResult } from '@fonderie/client';\nimport { FonderieApiError, isMfaRequired } from '@fonderie/client';\nimport { useFonderieSubClient } from '@fonderie/vue';\nimport { ref } from 'vue';\nimport { persistToken } from '../storage';\n\nexport function useLogin(client?: AuthClient) {\n\tconst auth = useFonderieSubClient(client, (c) => c.auth, 'useLogin');\n\tconst isLoading = ref(false);\n\tconst error = ref<FonderieApiError | null>(null);\n\tconst data = ref<ILoginResult | null>(null);\n\t// Set when the account requires MFA: complete the login with\n\t// client.auth.mfa.verifyLogin(mfaPending.value.mfaToken, code).\n\tconst mfaPending = ref<IMfaRequiredResult | null>(null);\n\n\tasync function login(input: ILoginInput) {\n\t\tisLoading.value = true;\n\t\terror.value = null;\n\t\tmfaPending.value = null;\n\t\ttry {\n\t\t\tconst { result } = await auth.login(input);\n\t\t\tif (isMfaRequired(result)) {\n\t\t\t\tmfaPending.value = result;\n\t\t\t\treturn result;\n\t\t\t}\n\t\t\tauth.setAccessToken(result.tokens.access);\n\t\t\tpersistToken(result.tokens.access);\n\t\t\tdata.value = result;\n\t\t\treturn result;\n\t\t} catch (err) {\n\t\t\tconst apiError =\n\t\t\t\terr instanceof FonderieApiError ? err : new FonderieApiError('unknown', String(err), 0);\n\t\t\terror.value = apiError;\n\t\t\tthrow apiError;\n\t\t} finally {\n\t\t\tisLoading.value = false;\n\t\t}\n\t}\n\n\treturn { login, isLoading, error, data, mfaPending };\n}\n","import type { AuthClient } from '@fonderie/client';\nimport { FonderieApiError } from '@fonderie/client';\nimport { useFonderieSubClient } from '@fonderie/vue';\nimport { ref } from 'vue';\nimport { clearToken } from '../storage';\n\nexport function useLogout(client?: AuthClient) {\n\tconst auth = useFonderieSubClient(client, (c) => c.auth, 'useLogout');\n\tconst isLoading = ref(false);\n\tconst error = ref<FonderieApiError | null>(null);\n\n\tasync function logout(refreshToken?: string) {\n\t\tisLoading.value = true;\n\t\terror.value = null;\n\t\ttry {\n\t\t\tawait auth.logout(refreshToken);\n\t\t} catch (err) {\n\t\t\tconst apiError =\n\t\t\t\terr instanceof FonderieApiError ? err : new FonderieApiError('unknown', String(err), 0);\n\t\t\terror.value = apiError;\n\t\t} finally {\n\t\t\tauth.setAccessToken(undefined);\n\t\t\tclearToken();\n\t\t\tisLoading.value = false;\n\t\t}\n\t}\n\n\treturn { logout, isLoading, error };\n}\n","import type { AuthClient, ILoginResult } from '@fonderie/client';\nimport { FonderieApiError } from '@fonderie/client';\nimport { useFonderieSubClient } from '@fonderie/vue';\nimport type { Ref } from 'vue';\nimport { ref } from 'vue';\nimport { persistToken } from '../storage';\n\nexport interface IUseMfaLoginReturn {\n\t// Completes a login that returned MFA_REQUIRED: verifies the TOTP code\n\t// against the temporary mfaToken from useLogin's mfaPending, then persists\n\t// the issued tokens exactly like a normal login.\n\tverifyLogin: (mfaToken: string, code: string) => Promise<ILoginResult>;\n\tisLoading: Ref<boolean>;\n\terror: Ref<FonderieApiError | null>;\n\tdata: Ref<ILoginResult | null>;\n}\n\nexport function useMfaLogin(client?: AuthClient): IUseMfaLoginReturn {\n\tconst auth = useFonderieSubClient(client, (c) => c.auth, 'useMfaLogin');\n\tconst isLoading = ref(false);\n\tconst error = ref<FonderieApiError | null>(null);\n\tconst data = ref<ILoginResult | null>(null);\n\n\tasync function verifyLogin(mfaToken: string, code: string) {\n\t\tisLoading.value = true;\n\t\terror.value = null;\n\t\ttry {\n\t\t\tconst { result } = await auth.mfa.verifyLogin(mfaToken, code);\n\t\t\tauth.setAccessToken(result.tokens.access);\n\t\t\tpersistToken(result.tokens.access);\n\t\t\tdata.value = result;\n\t\t\treturn result;\n\t\t} catch (err) {\n\t\t\tconst apiError =\n\t\t\t\terr instanceof FonderieApiError ? err : new FonderieApiError('unknown', String(err), 0);\n\t\t\terror.value = apiError;\n\t\t\tthrow apiError;\n\t\t} finally {\n\t\t\tisLoading.value = false;\n\t\t}\n\t}\n\n\treturn { verifyLogin, isLoading, error, data };\n}\n","import type { AuthClient, IMfaEnabledResult, IMfaSetupResult } from '@fonderie/client';\nimport { FonderieApiError } from '@fonderie/client';\nimport { useFonderieSubClient } from '@fonderie/vue';\nimport type { Ref } from 'vue';\nimport { ref } from 'vue';\nimport { persistToken } from '../storage';\n\nexport interface IUseMfaSetupReturn {\n\t// Step 1: request enrollment — returns a data-URI QR code to scan and the\n\t// one-time backup codes generated at setup.\n\tsetup: () => Promise<IMfaSetupResult>;\n\tsetupData: Ref<IMfaSetupResult | null>;\n\t// Step 2: verify the first TOTP code. The server rotates the session's\n\t// tokens on success — the composable persists them exactly like a login,\n\t// so the session stays valid after enrollment.\n\tverify: (code: string) => Promise<IMfaEnabledResult>;\n\tdisable: (code: string) => Promise<void>;\n\tregenerateBackupCodes: (code: string) => Promise<string[]>;\n\tisLoading: Ref<boolean>;\n\terror: Ref<FonderieApiError | null>;\n}\n\nexport function useMfaSetup(client?: AuthClient): IUseMfaSetupReturn {\n\tconst auth = useFonderieSubClient(client, (c) => c.auth, 'useMfaSetup');\n\tconst setupData = ref<IMfaSetupResult | null>(null);\n\tconst isLoading = ref(false);\n\tconst error = ref<FonderieApiError | null>(null);\n\n\tasync function run<T>(op: () => Promise<T>): Promise<T> {\n\t\tisLoading.value = true;\n\t\terror.value = null;\n\t\ttry {\n\t\t\treturn await op();\n\t\t} catch (err) {\n\t\t\tconst apiError =\n\t\t\t\terr instanceof FonderieApiError ? err : new FonderieApiError('unknown', String(err), 0);\n\t\t\terror.value = apiError;\n\t\t\tthrow apiError;\n\t\t} finally {\n\t\t\tisLoading.value = false;\n\t\t}\n\t}\n\n\tfunction setup() {\n\t\treturn run(async () => {\n\t\t\tconst { result } = await auth.mfa.setup();\n\t\t\tsetupData.value = result;\n\t\t\treturn result;\n\t\t});\n\t}\n\n\tfunction verify(code: string) {\n\t\treturn run(async () => {\n\t\t\tconst { result } = await auth.mfa.verify(code);\n\t\t\tauth.setAccessToken(result.tokens.access);\n\t\t\tpersistToken(result.tokens.access);\n\t\t\treturn result;\n\t\t});\n\t}\n\n\tfunction disable(code: string) {\n\t\treturn run(async () => {\n\t\t\tawait auth.mfa.disable(code);\n\t\t});\n\t}\n\n\tfunction regenerateBackupCodes(code: string) {\n\t\treturn run(async () => {\n\t\t\tconst { result } = await auth.mfa.regenerateBackupCodes(code);\n\t\t\treturn result.backupCodes;\n\t\t});\n\t}\n\n\treturn { setup, setupData, verify, disable, regenerateBackupCodes, isLoading, error };\n}\n","import type {\n\tAuthClient,\n\tIUpdatePreferencesInput,\n\tIUpdateProfileInput,\n\tIUserDTO,\n} from '@fonderie/client';\nimport { FonderieApiError } from '@fonderie/client';\nimport { useFonderieSubClient } from '@fonderie/vue';\nimport type { Ref } from 'vue';\nimport { ref } from 'vue';\n\nexport interface IUseProfileReturn {\n\tuser: Ref<IUserDTO | null>;\n\trefresh: () => Promise<void>;\n\tupdateProfile: (input: IUpdateProfileInput) => Promise<IUserDTO>;\n\tupdatePreferences: (input: IUpdatePreferencesInput) => Promise<IUserDTO>;\n\t// Email/phone changes re-fetch the profile (their endpoints don't return it).\n\tupdateEmail: (email: string) => Promise<void>;\n\tupdatePhone: (phone: string) => Promise<void>;\n\tisLoading: Ref<boolean>;\n\terror: Ref<FonderieApiError | null>;\n}\n\nexport function useProfile(client?: AuthClient): IUseProfileReturn {\n\tconst auth = useFonderieSubClient(client, (c) => c.auth, 'useProfile');\n\tconst user = ref<IUserDTO | null>(null);\n\tconst isLoading = ref(true);\n\tconst error = ref<FonderieApiError | null>(null);\n\n\tasync function refresh() {\n\t\tisLoading.value = true;\n\t\terror.value = null;\n\t\ttry {\n\t\t\tconst { result } = await auth.getUser();\n\t\t\tuser.value = result.user;\n\t\t} catch (err) {\n\t\t\tconst apiError =\n\t\t\t\terr instanceof FonderieApiError ? err : new FonderieApiError('unknown', String(err), 0);\n\t\t\terror.value = apiError;\n\t\t} finally {\n\t\t\tisLoading.value = false;\n\t\t}\n\t}\n\n\tasync function mutate<T>(op: () => Promise<T>): Promise<T> {\n\t\terror.value = null;\n\t\ttry {\n\t\t\treturn await op();\n\t\t} catch (err) {\n\t\t\tconst apiError =\n\t\t\t\terr instanceof FonderieApiError ? err : new FonderieApiError('unknown', String(err), 0);\n\t\t\terror.value = apiError;\n\t\t\tthrow apiError;\n\t\t}\n\t}\n\n\tfunction updateProfile(input: IUpdateProfileInput) {\n\t\treturn mutate(async () => {\n\t\t\tconst { result } = await auth.updateProfile(input);\n\t\t\tuser.value = result.user;\n\t\t\treturn result.user;\n\t\t});\n\t}\n\n\tfunction updatePreferences(input: IUpdatePreferencesInput) {\n\t\treturn mutate(async () => {\n\t\t\tconst { result } = await auth.updatePreferences(input);\n\t\t\tuser.value = result.user;\n\t\t\treturn result.user;\n\t\t});\n\t}\n\n\tfunction updateEmail(email: string) {\n\t\treturn mutate(async () => {\n\t\t\tawait auth.updateEmail(email);\n\t\t\tawait refresh();\n\t\t});\n\t}\n\n\tfunction updatePhone(phone: string) {\n\t\treturn mutate(async () => {\n\t\t\tawait auth.updatePhone(phone);\n\t\t\tawait refresh();\n\t\t});\n\t}\n\n\tvoid refresh();\n\n\treturn { user, refresh, updateProfile, updatePreferences, updateEmail, updatePhone, isLoading, error };\n}\n","import type { AuthClient, IRegisterInput, IRegisterResult } from '@fonderie/client';\nimport { FonderieApiError } from '@fonderie/client';\nimport { useFonderieSubClient } from '@fonderie/vue';\nimport { ref } from 'vue';\nimport { persistToken } from '../storage';\n\nexport function useRegister(client?: AuthClient) {\n\tconst auth = useFonderieSubClient(client, (c) => c.auth, 'useRegister');\n\tconst isLoading = ref(false);\n\tconst error = ref<FonderieApiError | null>(null);\n\tconst data = ref<IRegisterResult | null>(null);\n\n\tasync function register(input: IRegisterInput) {\n\t\tisLoading.value = true;\n\t\terror.value = null;\n\t\ttry {\n\t\t\tconst { result } = await auth.register(input);\n\t\t\tauth.setAccessToken(result.tokens.access);\n\t\t\tpersistToken(result.tokens.access);\n\t\t\tdata.value = result;\n\t\t\treturn result;\n\t\t} catch (err) {\n\t\t\tconst apiError =\n\t\t\t\terr instanceof FonderieApiError ? err : new FonderieApiError('unknown', String(err), 0);\n\t\t\terror.value = apiError;\n\t\t\tthrow apiError;\n\t\t} finally {\n\t\t\tisLoading.value = false;\n\t\t}\n\t}\n\n\treturn { register, isLoading, error, data };\n}\n","import type { AuthClient, IResetPasswordInput } from '@fonderie/client';\nimport { FonderieApiError } from '@fonderie/client';\nimport { useFonderieSubClient } from '@fonderie/vue';\nimport { ref } from 'vue';\n\nexport function useResetPassword(client?: AuthClient) {\n\tconst auth = useFonderieSubClient(client, (c) => c.auth, 'useResetPassword');\n\tconst isLoading = ref(false);\n\tconst error = ref<FonderieApiError | null>(null);\n\tconst done = ref(false);\n\n\tasync function resetPassword(input: IResetPasswordInput) {\n\t\tisLoading.value = true;\n\t\terror.value = null;\n\t\ttry {\n\t\t\tawait auth.resetPassword(input);\n\t\t\tdone.value = true;\n\t\t} catch (err) {\n\t\t\tconst apiError =\n\t\t\t\terr instanceof FonderieApiError ? err : new FonderieApiError('unknown', String(err), 0);\n\t\t\terror.value = apiError;\n\t\t\tthrow apiError;\n\t\t} finally {\n\t\t\tisLoading.value = false;\n\t\t}\n\t}\n\n\treturn { resetPassword, isLoading, error, done };\n}\n","import type { AuthClient, IUserDTO } from '@fonderie/client';\nimport { useFonderieSubClient } from '@fonderie/vue';\nimport { ref } from 'vue';\nimport { clearToken, readToken } from '../storage';\n\nexport function useSession(client?: AuthClient) {\n\tconst auth = useFonderieSubClient(client, (c) => c.auth, 'useSession');\n\tconst user = ref<IUserDTO | null>(null);\n\tconst isLoading = ref(true);\n\tconst isAuthenticated = ref(false);\n\n\tasync function refresh() {\n\t\tisLoading.value = true;\n\t\ttry {\n\t\t\tconst { result } = await auth.getUser();\n\t\t\tuser.value = result.user;\n\t\t\tisAuthenticated.value = true;\n\t\t} catch {\n\t\t\tuser.value = null;\n\t\t\tisAuthenticated.value = false;\n\t\t\tauth.setAccessToken(undefined);\n\t\t\tclearToken();\n\t\t} finally {\n\t\t\tisLoading.value = false;\n\t\t}\n\t}\n\n\tasync function logout(refreshToken?: string) {\n\t\ttry {\n\t\t\tawait auth.logout(refreshToken);\n\t\t} catch {\n\t\t\t// Session is being torn down regardless of server response.\n\t\t}\n\t\tauth.setAccessToken(undefined);\n\t\tclearToken();\n\t\tuser.value = null;\n\t\tisAuthenticated.value = false;\n\t}\n\n\tconst token = readToken();\n\tif (token) auth.setAccessToken(token);\n\tvoid refresh();\n\n\treturn { user, isLoading, isAuthenticated, refresh, logout };\n}\n","import type { AuthClient, IVerifyEmailResult } from '@fonderie/client';\nimport { FonderieApiError } from '@fonderie/client';\nimport { useFonderieSubClient } from '@fonderie/vue';\nimport { ref } from 'vue';\n\nexport function useVerifyEmail(client?: AuthClient) {\n\tconst auth = useFonderieSubClient(client, (c) => c.auth, 'useVerifyEmail');\n\tconst isLoading = ref(false);\n\tconst error = ref<FonderieApiError | null>(null);\n\tconst data = ref<IVerifyEmailResult | null>(null);\n\tconst resent = ref(false);\n\n\t// Re-sends the verification email — the other half of the same lifecycle,\n\t// so one composable owns both and screens don't split loading/error handling.\n\tasync function resend() {\n\t\tisLoading.value = true;\n\t\terror.value = null;\n\t\tresent.value = false;\n\t\ttry {\n\t\t\tawait auth.sendVerificationEmail();\n\t\t\tresent.value = true;\n\t\t} catch (err) {\n\t\t\tconst apiError =\n\t\t\t\terr instanceof FonderieApiError ? err : new FonderieApiError('unknown', String(err), 0);\n\t\t\terror.value = apiError;\n\t\t\tthrow apiError;\n\t\t} finally {\n\t\t\tisLoading.value = false;\n\t\t}\n\t}\n\n\tasync function verifyEmail(pin: string) {\n\t\tisLoading.value = true;\n\t\terror.value = null;\n\t\ttry {\n\t\t\tconst { result } = await auth.verifyEmail(pin);\n\t\t\tdata.value = result;\n\t\t\treturn result;\n\t\t} catch (err) {\n\t\t\tconst apiError =\n\t\t\t\terr instanceof FonderieApiError ? err : new FonderieApiError('unknown', String(err), 0);\n\t\t\terror.value = apiError;\n\t\t\tthrow apiError;\n\t\t} finally {\n\t\t\tisLoading.value = false;\n\t\t}\n\t}\n\n\treturn { verifyEmail, resend, resent, isLoading, error, data };\n}\n"],"mappings":";;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAkBA,IAAAA,kBAAgD;;;ACjBhD,oBAAiC;AACjC,iBAAqC;AAErC,IAAAC,cAAoB;;;ACJb,IAAM,YAAY;AAElB,SAAS,aAAa,OAAe;AAC3C,eAAa,QAAQ,WAAW,KAAK;AACtC;AAEO,SAAS,aAAa;AAC5B,eAAa,WAAW,SAAS;AAClC;AAEO,SAAS,YAA2B;AAC1C,SAAO,aAAa,QAAQ,SAAS;AACtC;;;ADIO,SAAS,eAAe,QAA4C;AAC1E,QAAM,WAAO,iCAAqB,QAAQ,CAAC,MAAM,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M,QAAQ;AACd,QAAI;AACH,YAAM,EAAE,OAAO,IAAI,MAAM,KAAK,YAAY,GAAG;AAC7C,WAAK,QAAQ;AACb,aAAO;AAAA,IACR,SAAS,KAAK;AACb,YAAM,WACL,eAAe,mCAAmB,MAAM,IAAI,iCAAiB,WAAW,OAAO,GAAG,GAAG,CAAC;AACvF,YAAM,QAAQ;AACd,YAAM;AAAA,IACP,UAAE;AACD,gBAAU,QAAQ;AAAA,IACnB;AAAA,EACD;AAEA,SAAO,EAAE,aAAa,QAAQ,QAAQ,WAAW,OAAO,KAAK;AAC9D;","names":["import_client","import_vue","import_client","import_vue","import_client","import_vue","import_client","import_vue","import_client","import_vue","import_client","import_vue","import_client","import_vue","import_client","import_vue","import_client","import_vue","import_client","import_vue","import_vue","import_client","import_vue"]}