squarecommonblhelper 7.0.0 → 8.0.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/README.md
CHANGED
|
@@ -15,6 +15,21 @@ helper for common bl for my projects.
|
|
|
15
15
|
|
|
16
16
|
## changelog
|
|
17
17
|
|
|
18
|
+
### v8.0.1
|
|
19
|
+
|
|
20
|
+
- AuthenticationCommonBL:
|
|
21
|
+
- add username to GetUserDetailsV0ResponseZ.
|
|
22
|
+
|
|
23
|
+
### v8.0.0
|
|
24
|
+
|
|
25
|
+
- AuthenticationCommonBL:
|
|
26
|
+
- **breaking change**, rename the following types to match the standard naming convention:
|
|
27
|
+
- DeleteUserV0ResponseZ
|
|
28
|
+
- LogoutAllV0ResponseZ
|
|
29
|
+
- LogoutAppsV0ResponseZ
|
|
30
|
+
- GenerateAccountBackupCodeV0ResponseZ
|
|
31
|
+
- updateProfileDetailsV0ResponseZ
|
|
32
|
+
|
|
18
33
|
### v7.0.0
|
|
19
34
|
|
|
20
35
|
- GreetingCommonBL:
|
package/dist/authentication.d.ts
CHANGED
package/dist/authentication.js
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { fetchFileData, fetchJSONData } from "squarecommons";
|
|
2
|
-
import {
|
|
2
|
+
import { DeleteUserV0ResponseZ, GenerateAccountBackupCodeV0ResponseZ, GetUserDetailsV0ResponseZ, LogoutAllV0ResponseZ, LogoutAppsV0ResponseZ, sendResetPasswordEmailV0ResponseZ, sendVerificationEmailV0ResponseZ, updateProfileDetailsV0ResponseZ, UpdateUsernameV0ResponseZ, updateUserRecoveryMethodsV0ResponseZ, validateEmailVerificationCodeV0ResponseZ, } from "./types/AuthenticationResponses.js";
|
|
3
3
|
class AuthenticationCommonBL {
|
|
4
4
|
commonBLBaseURL;
|
|
5
5
|
constructor(commonBLBaseURL = "http://localhost:10110") {
|
|
@@ -20,7 +20,7 @@ class AuthenticationCommonBL {
|
|
|
20
20
|
{ password: password },
|
|
21
21
|
// query params
|
|
22
22
|
undefined);
|
|
23
|
-
return
|
|
23
|
+
return DeleteUserV0ResponseZ.parse(data);
|
|
24
24
|
}
|
|
25
25
|
catch (error) {
|
|
26
26
|
throw error;
|
|
@@ -83,7 +83,7 @@ class AuthenticationCommonBL {
|
|
|
83
83
|
undefined,
|
|
84
84
|
// query params
|
|
85
85
|
undefined);
|
|
86
|
-
return
|
|
86
|
+
return LogoutAllV0ResponseZ.parse(data);
|
|
87
87
|
}
|
|
88
88
|
catch (error) {
|
|
89
89
|
throw error;
|
|
@@ -104,7 +104,7 @@ class AuthenticationCommonBL {
|
|
|
104
104
|
{ app_names: appNames },
|
|
105
105
|
// query params
|
|
106
106
|
undefined);
|
|
107
|
-
return
|
|
107
|
+
return LogoutAppsV0ResponseZ.parse(data);
|
|
108
108
|
}
|
|
109
109
|
catch (error) {
|
|
110
110
|
throw error;
|
|
@@ -181,7 +181,7 @@ class AuthenticationCommonBL {
|
|
|
181
181
|
undefined,
|
|
182
182
|
// query params
|
|
183
183
|
undefined);
|
|
184
|
-
return
|
|
184
|
+
return GenerateAccountBackupCodeV0ResponseZ.parse(data);
|
|
185
185
|
}
|
|
186
186
|
catch (error) {
|
|
187
187
|
throw error;
|
|
@@ -214,7 +214,7 @@ class AuthenticationCommonBL {
|
|
|
214
214
|
undefined,
|
|
215
215
|
// query params
|
|
216
216
|
queryParams);
|
|
217
|
-
return
|
|
217
|
+
return updateProfileDetailsV0ResponseZ.parse(data);
|
|
218
218
|
}
|
|
219
219
|
catch (error) {
|
|
220
220
|
throw error;
|
|
@@ -54,6 +54,7 @@ declare const GetUserDetailsV0ResponseZ: z.ZodObject<z.objectUtil.extendShape<{
|
|
|
54
54
|
data: z.ZodObject<{
|
|
55
55
|
main: z.ZodObject<{
|
|
56
56
|
user_id: z.ZodString;
|
|
57
|
+
username: z.ZodString;
|
|
57
58
|
profile: z.ZodObject<{
|
|
58
59
|
user_profile_id: z.ZodNumber;
|
|
59
60
|
user_profile_photo_storage_token: z.ZodNullable<z.ZodString>;
|
|
@@ -92,6 +93,7 @@ declare const GetUserDetailsV0ResponseZ: z.ZodObject<z.objectUtil.extendShape<{
|
|
|
92
93
|
}>, "many">;
|
|
93
94
|
}, "strict", z.ZodTypeAny, {
|
|
94
95
|
user_id: string;
|
|
96
|
+
username: string;
|
|
95
97
|
profile: {
|
|
96
98
|
user_profile_id: number;
|
|
97
99
|
user_profile_photo_storage_token: string | null;
|
|
@@ -108,6 +110,7 @@ declare const GetUserDetailsV0ResponseZ: z.ZodObject<z.objectUtil.extendShape<{
|
|
|
108
110
|
}[];
|
|
109
111
|
}, {
|
|
110
112
|
user_id: string;
|
|
113
|
+
username: string;
|
|
111
114
|
profile: {
|
|
112
115
|
user_profile_id: number;
|
|
113
116
|
user_profile_photo_storage_token: string | null;
|
|
@@ -126,6 +129,7 @@ declare const GetUserDetailsV0ResponseZ: z.ZodObject<z.objectUtil.extendShape<{
|
|
|
126
129
|
}, "strict", z.ZodTypeAny, {
|
|
127
130
|
main: {
|
|
128
131
|
user_id: string;
|
|
132
|
+
username: string;
|
|
129
133
|
profile: {
|
|
130
134
|
user_profile_id: number;
|
|
131
135
|
user_profile_photo_storage_token: string | null;
|
|
@@ -144,6 +148,7 @@ declare const GetUserDetailsV0ResponseZ: z.ZodObject<z.objectUtil.extendShape<{
|
|
|
144
148
|
}, {
|
|
145
149
|
main: {
|
|
146
150
|
user_id: string;
|
|
151
|
+
username: string;
|
|
147
152
|
profile: {
|
|
148
153
|
user_profile_id: number;
|
|
149
154
|
user_profile_photo_storage_token: string | null;
|
|
@@ -165,6 +170,7 @@ declare const GetUserDetailsV0ResponseZ: z.ZodObject<z.objectUtil.extendShape<{
|
|
|
165
170
|
data: {
|
|
166
171
|
main: {
|
|
167
172
|
user_id: string;
|
|
173
|
+
username: string;
|
|
168
174
|
profile: {
|
|
169
175
|
user_profile_id: number;
|
|
170
176
|
user_profile_photo_storage_token: string | null;
|
|
@@ -187,6 +193,7 @@ declare const GetUserDetailsV0ResponseZ: z.ZodObject<z.objectUtil.extendShape<{
|
|
|
187
193
|
data: {
|
|
188
194
|
main: {
|
|
189
195
|
user_id: string;
|
|
196
|
+
username: string;
|
|
190
197
|
profile: {
|
|
191
198
|
user_profile_id: number;
|
|
192
199
|
user_profile_photo_storage_token: string | null;
|
|
@@ -206,7 +213,7 @@ declare const GetUserDetailsV0ResponseZ: z.ZodObject<z.objectUtil.extendShape<{
|
|
|
206
213
|
log?: any;
|
|
207
214
|
}>;
|
|
208
215
|
type GetUserDetailsV0Response = z.infer<typeof GetUserDetailsV0ResponseZ>;
|
|
209
|
-
declare const
|
|
216
|
+
declare const DeleteUserV0ResponseZ: z.ZodObject<z.objectUtil.extendShape<{
|
|
210
217
|
data: z.ZodAny;
|
|
211
218
|
message: z.ZodNullable<z.ZodString>;
|
|
212
219
|
log: z.ZodAny;
|
|
@@ -221,8 +228,8 @@ declare const DeleteUserV0Z: z.ZodObject<z.objectUtil.extendShape<{
|
|
|
221
228
|
data: null;
|
|
222
229
|
log?: any;
|
|
223
230
|
}>;
|
|
224
|
-
type
|
|
225
|
-
declare const
|
|
231
|
+
type DeleteUserV0Response = z.infer<typeof DeleteUserV0ResponseZ>;
|
|
232
|
+
declare const LogoutAllV0ResponseZ: z.ZodObject<z.objectUtil.extendShape<{
|
|
226
233
|
data: z.ZodAny;
|
|
227
234
|
message: z.ZodNullable<z.ZodString>;
|
|
228
235
|
log: z.ZodAny;
|
|
@@ -237,8 +244,8 @@ declare const LogoutAllV0Z: z.ZodObject<z.objectUtil.extendShape<{
|
|
|
237
244
|
data: null;
|
|
238
245
|
log?: any;
|
|
239
246
|
}>;
|
|
240
|
-
type
|
|
241
|
-
declare const
|
|
247
|
+
type LogoutAllV0Response = z.infer<typeof LogoutAllV0ResponseZ>;
|
|
248
|
+
declare const LogoutAppsV0ResponseZ: z.ZodObject<z.objectUtil.extendShape<{
|
|
242
249
|
data: z.ZodAny;
|
|
243
250
|
message: z.ZodNullable<z.ZodString>;
|
|
244
251
|
log: z.ZodAny;
|
|
@@ -253,8 +260,8 @@ declare const LogoutAppsV0Z: z.ZodObject<z.objectUtil.extendShape<{
|
|
|
253
260
|
data: null;
|
|
254
261
|
log?: any;
|
|
255
262
|
}>;
|
|
256
|
-
type
|
|
257
|
-
declare const
|
|
263
|
+
type LogoutAppsV0Response = z.infer<typeof LogoutAppsV0ResponseZ>;
|
|
264
|
+
declare const GenerateAccountBackupCodeV0ResponseZ: z.ZodObject<z.objectUtil.extendShape<{
|
|
258
265
|
data: z.ZodAny;
|
|
259
266
|
message: z.ZodNullable<z.ZodString>;
|
|
260
267
|
log: z.ZodAny;
|
|
@@ -300,8 +307,8 @@ declare const GenerateAccountBackupCodeZ: z.ZodObject<z.objectUtil.extendShape<{
|
|
|
300
307
|
};
|
|
301
308
|
log?: any;
|
|
302
309
|
}>;
|
|
303
|
-
type
|
|
304
|
-
declare const
|
|
310
|
+
type GenerateAccountBackupCodeV0Response = z.infer<typeof GenerateAccountBackupCodeV0ResponseZ>;
|
|
311
|
+
declare const updateProfileDetailsV0ResponseZ: z.ZodObject<z.objectUtil.extendShape<{
|
|
305
312
|
data: z.ZodAny;
|
|
306
313
|
message: z.ZodNullable<z.ZodString>;
|
|
307
314
|
log: z.ZodAny;
|
|
@@ -401,7 +408,7 @@ declare const updateProfileDetailsZ: z.ZodObject<z.objectUtil.extendShape<{
|
|
|
401
408
|
};
|
|
402
409
|
log?: any;
|
|
403
410
|
}>;
|
|
404
|
-
type
|
|
411
|
+
type updateProfileDetailsV0Response = z.infer<typeof updateProfileDetailsV0ResponseZ>;
|
|
405
412
|
declare const sendResetPasswordEmailV0ResponseZ: z.ZodObject<z.objectUtil.extendShape<{
|
|
406
413
|
data: z.ZodAny;
|
|
407
414
|
message: z.ZodNullable<z.ZodString>;
|
|
@@ -518,4 +525,4 @@ declare const validateEmailVerificationCodeV0ResponseZ: z.ZodObject<z.objectUtil
|
|
|
518
525
|
log?: any;
|
|
519
526
|
}>;
|
|
520
527
|
type validateEmailVerificationCodeV0Response = z.infer<typeof validateEmailVerificationCodeV0ResponseZ>;
|
|
521
|
-
export { UpdateUsernameV0ResponseZ, UpdateUsernameV0Response, GetUserDetailsV0ResponseZ, GetUserDetailsV0Response,
|
|
528
|
+
export { UpdateUsernameV0ResponseZ, UpdateUsernameV0Response, GetUserDetailsV0ResponseZ, GetUserDetailsV0Response, DeleteUserV0Response, DeleteUserV0ResponseZ, LogoutAllV0Response, LogoutAllV0ResponseZ, LogoutAppsV0Response, LogoutAppsV0ResponseZ, GenerateAccountBackupCodeV0Response, GenerateAccountBackupCodeV0ResponseZ, updateProfileDetailsV0ResponseZ, updateProfileDetailsV0Response, sendResetPasswordEmailV0ResponseZ, sendResetPasswordEmailV0Response, RecoveryMethodEnumZ, RecoveryMethodEnum, updateUserRecoveryMethodsV0ResponseZ, updateUserRecoveryMethodsV0Response, sendVerificationEmailV0ResponseZ, sendVerificationEmailV0Response, validateEmailVerificationCodeV0ResponseZ, validateEmailVerificationCodeV0Response, };
|
|
@@ -12,6 +12,7 @@ const GetUserDetailsV0ResponseZ = APIOutputZ.extend({
|
|
|
12
12
|
data: z.strictObject({
|
|
13
13
|
main: z.strictObject({
|
|
14
14
|
user_id: z.string(),
|
|
15
|
+
username: z.string(),
|
|
15
16
|
profile: z.strictObject({
|
|
16
17
|
user_profile_id: z.number(),
|
|
17
18
|
user_profile_photo_storage_token: z.string().nullable(),
|
|
@@ -29,16 +30,16 @@ const GetUserDetailsV0ResponseZ = APIOutputZ.extend({
|
|
|
29
30
|
}),
|
|
30
31
|
}),
|
|
31
32
|
});
|
|
32
|
-
const
|
|
33
|
+
const DeleteUserV0ResponseZ = APIOutputZ.extend({
|
|
33
34
|
data: z.null(),
|
|
34
35
|
});
|
|
35
|
-
const
|
|
36
|
+
const LogoutAllV0ResponseZ = APIOutputZ.extend({
|
|
36
37
|
data: z.null(),
|
|
37
38
|
});
|
|
38
|
-
const
|
|
39
|
+
const LogoutAppsV0ResponseZ = APIOutputZ.extend({
|
|
39
40
|
data: z.null(),
|
|
40
41
|
});
|
|
41
|
-
const
|
|
42
|
+
const GenerateAccountBackupCodeV0ResponseZ = APIOutputZ.extend({
|
|
42
43
|
data: z.strictObject({
|
|
43
44
|
main: z.strictObject({
|
|
44
45
|
user_id: z.string(),
|
|
@@ -46,7 +47,7 @@ const GenerateAccountBackupCodeZ = APIOutputZ.extend({
|
|
|
46
47
|
}),
|
|
47
48
|
}),
|
|
48
49
|
});
|
|
49
|
-
const
|
|
50
|
+
const updateProfileDetailsV0ResponseZ = APIOutputZ.extend({
|
|
50
51
|
data: z.strictObject({
|
|
51
52
|
main: z
|
|
52
53
|
.array(z.strictObject({
|
|
@@ -87,4 +88,4 @@ const validateEmailVerificationCodeV0ResponseZ = APIOutputZ.extend({
|
|
|
87
88
|
user_profile_email_verified: z.string(),
|
|
88
89
|
})),
|
|
89
90
|
});
|
|
90
|
-
export { UpdateUsernameV0ResponseZ, GetUserDetailsV0ResponseZ,
|
|
91
|
+
export { UpdateUsernameV0ResponseZ, GetUserDetailsV0ResponseZ, DeleteUserV0ResponseZ, LogoutAllV0ResponseZ, LogoutAppsV0ResponseZ, GenerateAccountBackupCodeV0ResponseZ, updateProfileDetailsV0ResponseZ, sendResetPasswordEmailV0ResponseZ, RecoveryMethodEnumZ, updateUserRecoveryMethodsV0ResponseZ, sendVerificationEmailV0ResponseZ, validateEmailVerificationCodeV0ResponseZ, };
|