@spfn/auth 0.1.0-alpha.87 → 0.1.0-alpha.88

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.
@@ -54,13 +54,6 @@ type ClientRegisterParams = {
54
54
  * Interceptor automatically generates and injects publicKey fields
55
55
  */
56
56
  declare const login: (params: ClientLoginParams) => Promise<{
57
- success: false;
58
- error: {
59
- details?: any;
60
- code: string;
61
- message: string;
62
- };
63
- } | {
64
57
  message?: string | undefined;
65
58
  success: true;
66
59
  data: {
@@ -69,6 +62,13 @@ declare const login: (params: ClientLoginParams) => Promise<{
69
62
  userId: string;
70
63
  passwordChangeRequired: boolean;
71
64
  };
65
+ } | {
66
+ success: false;
67
+ error: {
68
+ details?: any;
69
+ message: string;
70
+ code: string;
71
+ };
72
72
  }>;
73
73
  /**
74
74
  * Register new account
@@ -79,8 +79,8 @@ declare const register: (params: ClientRegisterParams) => Promise<{
79
79
  success: false;
80
80
  error: {
81
81
  details?: any;
82
- code: string;
83
82
  message: string;
83
+ code: string;
84
84
  };
85
85
  } | {
86
86
  message?: string | undefined;
@@ -100,8 +100,8 @@ declare const logout: () => Promise<{
100
100
  success: false;
101
101
  error: {
102
102
  details?: any;
103
- code: string;
104
103
  message: string;
104
+ code: string;
105
105
  };
106
106
  } | {
107
107
  message?: string | undefined;
@@ -119,8 +119,8 @@ declare const rotateKey: () => Promise<{
119
119
  success: false;
120
120
  error: {
121
121
  details?: any;
122
- code: string;
123
122
  message: string;
123
+ code: string;
124
124
  };
125
125
  } | {
126
126
  message?: string | undefined;
@@ -135,13 +135,6 @@ declare const rotateKey: () => Promise<{
135
135
  */
136
136
  declare const authApi: {
137
137
  readonly login: (params: ClientLoginParams) => Promise<{
138
- success: false;
139
- error: {
140
- details?: any;
141
- code: string;
142
- message: string;
143
- };
144
- } | {
145
138
  message?: string | undefined;
146
139
  success: true;
147
140
  data: {
@@ -150,13 +143,20 @@ declare const authApi: {
150
143
  userId: string;
151
144
  passwordChangeRequired: boolean;
152
145
  };
146
+ } | {
147
+ success: false;
148
+ error: {
149
+ details?: any;
150
+ message: string;
151
+ code: string;
152
+ };
153
153
  }>;
154
154
  readonly register: (params: ClientRegisterParams) => Promise<{
155
155
  success: false;
156
156
  error: {
157
157
  details?: any;
158
- code: string;
159
158
  message: string;
159
+ code: string;
160
160
  };
161
161
  } | {
162
162
  message?: string | undefined;
@@ -171,8 +171,8 @@ declare const authApi: {
171
171
  success: false;
172
172
  error: {
173
173
  details?: any;
174
- code: string;
175
174
  message: string;
175
+ code: string;
176
176
  };
177
177
  } | {
178
178
  message?: string | undefined;
@@ -185,8 +185,8 @@ declare const authApi: {
185
185
  success: false;
186
186
  error: {
187
187
  details?: any;
188
- code: string;
189
188
  message: string;
189
+ code: string;
190
190
  };
191
191
  } | {
192
192
  message?: string | undefined;
@@ -199,19 +199,19 @@ declare const authApi: {
199
199
  readonly sendVerificationCode: (options: {
200
200
  body: SendVerificationCodeBody;
201
201
  }) => Promise<{
202
+ success: false;
203
+ error: {
204
+ details?: any;
205
+ message: string;
206
+ code: string;
207
+ };
208
+ } | {
202
209
  message?: string | undefined;
203
210
  success: true;
204
211
  data: {
205
212
  success: boolean;
206
213
  expiresAt: string;
207
214
  };
208
- } | {
209
- success: false;
210
- error: {
211
- details?: any;
212
- code: string;
213
- message: string;
214
- };
215
215
  }>;
216
216
  readonly verifyCode: (options: {
217
217
  body: VerifyCodeBody;
@@ -219,8 +219,8 @@ declare const authApi: {
219
219
  success: false;
220
220
  error: {
221
221
  details?: any;
222
- code: string;
223
222
  message: string;
223
+ code: string;
224
224
  };
225
225
  } | {
226
226
  message?: string | undefined;
@@ -236,8 +236,8 @@ declare const authApi: {
236
236
  success: false;
237
237
  error: {
238
238
  details?: any;
239
- code: string;
240
239
  message: string;
240
+ code: string;
241
241
  };
242
242
  } | {
243
243
  message?: string | undefined;
@@ -254,8 +254,8 @@ declare const authApi: {
254
254
  success: false;
255
255
  error: {
256
256
  details?: any;
257
- code: string;
258
257
  message: string;
258
+ code: string;
259
259
  };
260
260
  } | {
261
261
  message?: string | undefined;
@@ -270,8 +270,8 @@ declare const authApi: {
270
270
  success: false;
271
271
  error: {
272
272
  details?: any;
273
- code: string;
274
273
  message: string;
274
+ code: string;
275
275
  };
276
276
  } | {
277
277
  message?: string | undefined;
@@ -300,8 +300,8 @@ declare const authApi: {
300
300
  success: false;
301
301
  error: {
302
302
  details?: any;
303
- code: string;
304
303
  message: string;
304
+ code: string;
305
305
  };
306
306
  } | {
307
307
  message?: string | undefined;
@@ -321,8 +321,8 @@ declare const authApi: {
321
321
  success: false;
322
322
  error: {
323
323
  details?: any;
324
- code: string;
325
324
  message: string;
325
+ code: string;
326
326
  };
327
327
  } | {
328
328
  message?: string | undefined;
@@ -342,8 +342,8 @@ declare const authApi: {
342
342
  success: false;
343
343
  error: {
344
344
  details?: any;
345
- code: string;
346
345
  message: string;
346
+ code: string;
347
347
  };
348
348
  } | {
349
349
  message?: string | undefined;
@@ -379,8 +379,8 @@ declare const authApi: {
379
379
  success: false;
380
380
  error: {
381
381
  details?: any;
382
- code: string;
383
382
  message: string;
383
+ code: string;
384
384
  };
385
385
  } | {
386
386
  message?: string | undefined;
@@ -397,8 +397,8 @@ declare const authApi: {
397
397
  success: false;
398
398
  error: {
399
399
  details?: any;
400
- code: string;
401
400
  message: string;
401
+ code: string;
402
402
  };
403
403
  } | {
404
404
  message?: string | undefined;
@@ -414,8 +414,8 @@ declare const authApi: {
414
414
  success: false;
415
415
  error: {
416
416
  details?: any;
417
- code: string;
418
417
  message: string;
418
+ code: string;
419
419
  };
420
420
  } | {
421
421
  message?: string | undefined;
@@ -431,8 +431,8 @@ declare const authApi: {
431
431
  success: false;
432
432
  error: {
433
433
  details?: any;
434
- code: string;
435
434
  message: string;
435
+ code: string;
436
436
  };
437
437
  } | {
438
438
  message?: string | undefined;
@@ -22,8 +22,8 @@ declare const verifyCode: (options: {
22
22
  success: false;
23
23
  error: {
24
24
  details?: any;
25
- code: string;
26
25
  message: string;
26
+ code: string;
27
27
  };
28
28
  } | {
29
29
  message?: string | undefined;
@@ -19,19 +19,19 @@ type SendVerificationCodeBody = InferContract<typeof sendVerificationCodeContrac
19
19
  declare const sendVerificationCode: (options: {
20
20
  body: SendVerificationCodeBody;
21
21
  }) => Promise<{
22
+ success: false;
23
+ error: {
24
+ details?: any;
25
+ message: string;
26
+ code: string;
27
+ };
28
+ } | {
22
29
  message?: string | undefined;
23
30
  success: true;
24
31
  data: {
25
32
  success: boolean;
26
33
  expiresAt: string;
27
34
  };
28
- } | {
29
- success: false;
30
- error: {
31
- details?: any;
32
- code: string;
33
- message: string;
34
- };
35
35
  }>;
36
36
 
37
37
  export { type SendVerificationCodeBody, type SendVerificationCodeResponse, sendVerificationCode };
@@ -22,8 +22,8 @@ declare const checkAccountExists: (options: {
22
22
  success: false;
23
23
  error: {
24
24
  details?: any;
25
- code: string;
26
25
  message: string;
26
+ code: string;
27
27
  };
28
28
  } | {
29
29
  message?: string | undefined;
@@ -22,8 +22,8 @@ declare const acceptInvitation: (options: {
22
22
  success: false;
23
23
  error: {
24
24
  details?: any;
25
- code: string;
26
25
  message: string;
26
+ code: string;
27
27
  };
28
28
  } | {
29
29
  message?: string | undefined;
@@ -22,8 +22,8 @@ declare const cancelInvitation: (options: {
22
22
  success: false;
23
23
  error: {
24
24
  details?: any;
25
- code: string;
26
25
  message: string;
26
+ code: string;
27
27
  };
28
28
  } | {
29
29
  message?: string | undefined;
@@ -22,8 +22,8 @@ declare const deleteInvitation: (options: {
22
22
  success: false;
23
23
  error: {
24
24
  details?: any;
25
- code: string;
26
25
  message: string;
26
+ code: string;
27
27
  };
28
28
  } | {
29
29
  message?: string | undefined;
@@ -22,8 +22,8 @@ declare const resendInvitation: (options: {
22
22
  success: false;
23
23
  error: {
24
24
  details?: any;
25
- code: string;
26
25
  message: string;
26
+ code: string;
27
27
  };
28
28
  } | {
29
29
  message?: string | undefined;
@@ -26,8 +26,8 @@ declare const getInvitation: (options: {
26
26
  success: false;
27
27
  error: {
28
28
  details?: any;
29
- code: string;
30
29
  message: string;
30
+ code: string;
31
31
  };
32
32
  } | {
33
33
  message?: string | undefined;
@@ -50,8 +50,8 @@ declare const createInvitation: (options: {
50
50
  success: false;
51
51
  error: {
52
52
  details?: any;
53
- code: string;
54
53
  message: string;
54
+ code: string;
55
55
  };
56
56
  } | {
57
57
  message?: string | undefined;
@@ -74,8 +74,8 @@ declare const listInvitations: (options: {
74
74
  success: false;
75
75
  error: {
76
76
  details?: any;
77
- code: string;
78
77
  message: string;
78
+ code: string;
79
79
  };
80
80
  } | {
81
81
  message?: string | undefined;
@@ -22,8 +22,8 @@ declare const rotateKey: (options: {
22
22
  success: false;
23
23
  error: {
24
24
  details?: any;
25
- code: string;
26
25
  message: string;
26
+ code: string;
27
27
  };
28
28
  } | {
29
29
  message?: string | undefined;
@@ -19,13 +19,6 @@ type LoginBody = InferContract<typeof loginContract>['body'];
19
19
  declare const login: (options: {
20
20
  body: LoginBody;
21
21
  }) => Promise<{
22
- success: false;
23
- error: {
24
- details?: any;
25
- code: string;
26
- message: string;
27
- };
28
- } | {
29
22
  message?: string | undefined;
30
23
  success: true;
31
24
  data: {
@@ -34,6 +27,13 @@ declare const login: (options: {
34
27
  userId: string;
35
28
  passwordChangeRequired: boolean;
36
29
  };
30
+ } | {
31
+ success: false;
32
+ error: {
33
+ details?: any;
34
+ message: string;
35
+ code: string;
36
+ };
37
37
  }>;
38
38
 
39
39
  export { type LoginBody, type LoginResponse, login };
@@ -22,8 +22,8 @@ declare const logout: (options: {
22
22
  success: false;
23
23
  error: {
24
24
  details?: any;
25
- code: string;
26
25
  message: string;
26
+ code: string;
27
27
  };
28
28
  } | {
29
29
  message?: string | undefined;
@@ -22,8 +22,8 @@ declare const getMe: (options: {
22
22
  success: false;
23
23
  error: {
24
24
  details?: any;
25
- code: string;
26
25
  message: string;
26
+ code: string;
27
27
  };
28
28
  } | {
29
29
  message?: string | undefined;
@@ -22,8 +22,8 @@ declare const changePassword: (options: {
22
22
  success: false;
23
23
  error: {
24
24
  details?: any;
25
- code: string;
26
25
  message: string;
26
+ code: string;
27
27
  };
28
28
  } | {
29
29
  message?: string | undefined;
@@ -22,8 +22,8 @@ declare const register: (options: {
22
22
  success: false;
23
23
  error: {
24
24
  details?: any;
25
- code: string;
26
25
  message: string;
26
+ code: string;
27
27
  };
28
28
  } | {
29
29
  message?: string | undefined;
@@ -39,19 +39,19 @@ declare const authApi: {
39
39
  readonly sendVerificationCode: (options: {
40
40
  body: SendVerificationCodeBody;
41
41
  }) => Promise<{
42
+ success: false;
43
+ error: {
44
+ details?: any;
45
+ message: string;
46
+ code: string;
47
+ };
48
+ } | {
42
49
  message?: string | undefined;
43
50
  success: true;
44
51
  data: {
45
52
  success: boolean;
46
53
  expiresAt: string;
47
54
  };
48
- } | {
49
- success: false;
50
- error: {
51
- details?: any;
52
- code: string;
53
- message: string;
54
- };
55
55
  }>;
56
56
  readonly verifyCode: (options: {
57
57
  body: VerifyCodeBody;
@@ -59,8 +59,8 @@ declare const authApi: {
59
59
  success: false;
60
60
  error: {
61
61
  details?: any;
62
- code: string;
63
62
  message: string;
63
+ code: string;
64
64
  };
65
65
  } | {
66
66
  message?: string | undefined;
@@ -76,8 +76,8 @@ declare const authApi: {
76
76
  success: false;
77
77
  error: {
78
78
  details?: any;
79
- code: string;
80
79
  message: string;
80
+ code: string;
81
81
  };
82
82
  } | {
83
83
  message?: string | undefined;
@@ -94,8 +94,8 @@ declare const authApi: {
94
94
  success: false;
95
95
  error: {
96
96
  details?: any;
97
- code: string;
98
97
  message: string;
98
+ code: string;
99
99
  };
100
100
  } | {
101
101
  message?: string | undefined;
@@ -109,13 +109,6 @@ declare const authApi: {
109
109
  readonly login: (options: {
110
110
  body: LoginBody;
111
111
  }) => Promise<{
112
- success: false;
113
- error: {
114
- details?: any;
115
- code: string;
116
- message: string;
117
- };
118
- } | {
119
112
  message?: string | undefined;
120
113
  success: true;
121
114
  data: {
@@ -124,6 +117,13 @@ declare const authApi: {
124
117
  userId: string;
125
118
  passwordChangeRequired: boolean;
126
119
  };
120
+ } | {
121
+ success: false;
122
+ error: {
123
+ details?: any;
124
+ message: string;
125
+ code: string;
126
+ };
127
127
  }>;
128
128
  readonly logout: (options: {
129
129
  body: LogoutBody;
@@ -131,8 +131,8 @@ declare const authApi: {
131
131
  success: false;
132
132
  error: {
133
133
  details?: any;
134
- code: string;
135
134
  message: string;
135
+ code: string;
136
136
  };
137
137
  } | {
138
138
  message?: string | undefined;
@@ -147,8 +147,8 @@ declare const authApi: {
147
147
  success: false;
148
148
  error: {
149
149
  details?: any;
150
- code: string;
151
150
  message: string;
151
+ code: string;
152
152
  };
153
153
  } | {
154
154
  message?: string | undefined;
@@ -164,8 +164,8 @@ declare const authApi: {
164
164
  success: false;
165
165
  error: {
166
166
  details?: any;
167
- code: string;
168
167
  message: string;
168
+ code: string;
169
169
  };
170
170
  } | {
171
171
  message?: string | undefined;
@@ -180,8 +180,8 @@ declare const authApi: {
180
180
  success: false;
181
181
  error: {
182
182
  details?: any;
183
- code: string;
184
183
  message: string;
184
+ code: string;
185
185
  };
186
186
  } | {
187
187
  message?: string | undefined;
@@ -210,8 +210,8 @@ declare const authApi: {
210
210
  success: false;
211
211
  error: {
212
212
  details?: any;
213
- code: string;
214
213
  message: string;
214
+ code: string;
215
215
  };
216
216
  } | {
217
217
  message?: string | undefined;
@@ -231,8 +231,8 @@ declare const authApi: {
231
231
  success: false;
232
232
  error: {
233
233
  details?: any;
234
- code: string;
235
234
  message: string;
235
+ code: string;
236
236
  };
237
237
  } | {
238
238
  message?: string | undefined;
@@ -252,8 +252,8 @@ declare const authApi: {
252
252
  success: false;
253
253
  error: {
254
254
  details?: any;
255
- code: string;
256
255
  message: string;
256
+ code: string;
257
257
  };
258
258
  } | {
259
259
  message?: string | undefined;
@@ -289,8 +289,8 @@ declare const authApi: {
289
289
  success: false;
290
290
  error: {
291
291
  details?: any;
292
- code: string;
293
292
  message: string;
293
+ code: string;
294
294
  };
295
295
  } | {
296
296
  message?: string | undefined;
@@ -307,8 +307,8 @@ declare const authApi: {
307
307
  success: false;
308
308
  error: {
309
309
  details?: any;
310
- code: string;
311
310
  message: string;
311
+ code: string;
312
312
  };
313
313
  } | {
314
314
  message?: string | undefined;
@@ -324,8 +324,8 @@ declare const authApi: {
324
324
  success: false;
325
325
  error: {
326
326
  details?: any;
327
- code: string;
328
327
  message: string;
328
+ code: string;
329
329
  };
330
330
  } | {
331
331
  message?: string | undefined;
@@ -341,8 +341,8 @@ declare const authApi: {
341
341
  success: false;
342
342
  error: {
343
343
  details?: any;
344
- code: string;
345
344
  message: string;
345
+ code: string;
346
346
  };
347
347
  } | {
348
348
  message?: string | undefined;
@@ -1,5 +1,5 @@
1
1
  {
2
- "id": "aff66ff0-ff89-4e72-a716-41084ec7e906",
2
+ "id": "ac983222-8132-4c70-87d1-d0617ad520e8",
3
3
  "prevId": "00000000-0000-0000-0000-000000000000",
4
4
  "version": "7",
5
5
  "dialect": "postgresql",
@@ -5,8 +5,8 @@
5
5
  {
6
6
  "idx": 0,
7
7
  "version": "7",
8
- "when": 1762700086988,
9
- "tag": "0000_familiar_firebrand",
8
+ "when": 1762701473183,
9
+ "tag": "0000_skinny_christian_walker",
10
10
  "breakpoints": true
11
11
  }
12
12
  ]
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@spfn/auth",
3
- "version": "0.1.0-alpha.87",
3
+ "version": "0.1.0-alpha.88",
4
4
  "type": "module",
5
5
  "description": "Authentication, authorization, and RBAC module for SPFN",
6
6
  "main": "./dist/index.js",
@@ -85,7 +85,7 @@
85
85
  "jsonwebtoken": "^9.0.2",
86
86
  "postgres": "^3.4.0",
87
87
  "jose": "^6.1.0",
88
- "@spfn/core": "0.1.0-alpha.86"
88
+ "@spfn/core": "0.1.0-alpha.88"
89
89
  },
90
90
  "devDependencies": {
91
91
  "@types/bcrypt": "^5.0.2",
@@ -97,15 +97,15 @@
97
97
  "drizzle-kit": "^0.31.6",
98
98
  "glob": "^11.0.3",
99
99
  "hono": "^4.9.0",
100
- "next": "^15.0.0",
101
- "tsup": "^8.3.5",
102
- "tsx": "^4.19.2",
100
+ "next": "^16.0.1",
101
+ "tsup": "^8.5.0",
102
+ "tsx": "^4.20.6",
103
103
  "typescript": "^5.3.3",
104
104
  "vitest": "^4.0.6",
105
- "spfn": "0.1.0-alpha.86"
105
+ "spfn": "0.1.0-alpha.88"
106
106
  },
107
107
  "peerDependencies": {
108
- "next": ">=13.0.0"
108
+ "next": "^16.0.1"
109
109
  },
110
110
  "peerDependenciesMeta": {
111
111
  "next": {