squarecommonblhelper 11.2.1 → 11.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.
package/README.md
CHANGED
|
@@ -1,252 +1,18 @@
|
|
|
1
1
|
# squareCommonBLHelper
|
|
2
|
-
|
|
2
|
+
|
|
3
|
+
> 📌 versioning: see [CHANGELOG.md](./CHANGELOG.md).
|
|
4
|
+
|
|
3
5
|
## about
|
|
4
|
-
|
|
6
|
+
|
|
5
7
|
helper for common bl for my projects.
|
|
6
|
-
|
|
8
|
+
|
|
7
9
|
## usage
|
|
8
|
-
|
|
10
|
+
|
|
9
11
|
[Example](./example.js)
|
|
10
|
-
|
|
12
|
+
|
|
11
13
|
## env
|
|
12
|
-
|
|
14
|
+
|
|
13
15
|
1. node js - v18.17.0
|
|
14
16
|
2. npm - v9.6.7
|
|
15
|
-
|
|
16
|
-
## changelog
|
|
17
|
-
|
|
18
|
-
### v11.2.1
|
|
19
|
-
|
|
20
|
-
- AuthenticationCommonBL:
|
|
21
|
-
- fix getUserRecoveryMethodsV0 response type.
|
|
22
|
-
|
|
23
|
-
### v11.2.0
|
|
24
|
-
|
|
25
|
-
- AuthenticationCommonBL:
|
|
26
|
-
- update getUserRecoveryMethodsV0 response type.
|
|
27
|
-
|
|
28
|
-
### v11.1.0
|
|
29
|
-
|
|
30
|
-
- all:
|
|
31
|
-
- add new optional parameter logErrors to all methods.
|
|
32
|
-
|
|
33
|
-
### v11.0.0
|
|
34
|
-
|
|
35
|
-
- AuthenticationCommonBL:
|
|
36
|
-
- UpdateUserProfilePhotoV0Response now compatible with square_common_bl>=7.0.0
|
|
37
|
-
|
|
38
|
-
### v10.1.0
|
|
39
|
-
|
|
40
|
-
- AuthenticationCommonBL:
|
|
41
|
-
- add UpdateUserProfilePhotoV0ResponseZ.
|
|
42
|
-
|
|
43
|
-
### v10.0.0
|
|
44
|
-
|
|
45
|
-
- AuthenticationCommonBL:
|
|
46
|
-
- **breaking change**, rename the following types to match the standard naming convention:
|
|
47
|
-
- UpdateProfileDetailsV0ResponseZ
|
|
48
|
-
- SendResetPasswordEmailV0ResponseZ
|
|
49
|
-
- UpdateUserRecoveryMethodsV0ResponseZ
|
|
50
|
-
- SendVerificationEmailV0ResponseZ
|
|
51
|
-
- ValidateEmailVerificationCodeV0ResponseZ
|
|
52
|
-
|
|
53
|
-
### v9.3.1
|
|
54
|
-
|
|
55
|
-
- AuthenticationCommonBL:
|
|
56
|
-
- fix type of backup_code_details in GetUserDetailsV0ResponseZ.
|
|
57
|
-
|
|
58
|
-
### v9.3.0
|
|
59
|
-
|
|
60
|
-
- AuthenticationCommonBL:
|
|
61
|
-
- add backup_code_details in GetUserDetailsV0ResponseZ.
|
|
62
|
-
|
|
63
|
-
### v9.2.3
|
|
64
|
-
|
|
65
|
-
- AuthenticationCommonBL:
|
|
66
|
-
- updateUserRecoveryMethodsV0 now compatible with square_common_bl>=6.0.0
|
|
67
|
-
|
|
68
|
-
### v9.2.2
|
|
69
|
-
|
|
70
|
-
- AuthenticationCommonBL:
|
|
71
|
-
- bugfix in updateUserRecoveryMethodsV0 query parameters (string[] instead of comma separated list).
|
|
72
|
-
|
|
73
|
-
### v9.2.1
|
|
74
|
-
|
|
75
|
-
- AuthenticationCommonBL:
|
|
76
|
-
- update type of GetUserDetailsV0ResponseZ and GetUserRecoveryMethodsV0ResponseZ to include RecoveryMethodEnumZ as key instead of random string.
|
|
77
|
-
|
|
78
|
-
### v9.2.0
|
|
79
|
-
|
|
80
|
-
- AuthenticationCommonBL:
|
|
81
|
-
- add getUserRecoveryMethodsV0.
|
|
82
|
-
|
|
83
|
-
### v9.1.0
|
|
84
|
-
|
|
85
|
-
- AuthenticationCommonBL:
|
|
86
|
-
- add email_verification_details in GetUserDetailsV0ResponseZ.
|
|
87
|
-
|
|
88
|
-
### v9.0.2
|
|
89
|
-
|
|
90
|
-
- AuthenticationCommonBL:
|
|
91
|
-
- add recovery_methods in GetUserDetailsV0ResponseZ.
|
|
92
|
-
|
|
93
|
-
### v9.0.1
|
|
94
|
-
|
|
95
|
-
- AuthenticationCommonBL:
|
|
96
|
-
- add user_profile_phone_number_country_code and user_profile_email_verified in GetUserDetailsV0ResponseZ.
|
|
97
|
-
|
|
98
|
-
### v9.0.0
|
|
99
|
-
|
|
100
|
-
- AuthenticationCommonBL:
|
|
101
|
-
- **breaking change**: remove user_profile_username from GetUserDetailsV0ResponseZ.
|
|
102
|
-
|
|
103
|
-
### v8.0.1
|
|
104
|
-
|
|
105
|
-
- AuthenticationCommonBL:
|
|
106
|
-
- add username to GetUserDetailsV0ResponseZ.
|
|
107
|
-
|
|
108
|
-
### v8.0.0
|
|
109
|
-
|
|
110
|
-
- AuthenticationCommonBL:
|
|
111
|
-
- **breaking change**, rename the following types to match the standard naming convention:
|
|
112
|
-
- DeleteUserV0ResponseZ
|
|
113
|
-
- LogoutAllV0ResponseZ
|
|
114
|
-
- LogoutAppsV0ResponseZ
|
|
115
|
-
- GenerateAccountBackupCodeV0ResponseZ
|
|
116
|
-
- updateProfileDetailsV0ResponseZ
|
|
117
|
-
|
|
118
|
-
### v7.0.0
|
|
119
|
-
|
|
120
|
-
- GreetingCommonBL:
|
|
121
|
-
- **breaking change**: replace createGreetingV0 with createAnonymousGreetingV0.
|
|
122
|
-
|
|
123
|
-
### v6.1.0
|
|
124
|
-
|
|
125
|
-
- AuthenticationCommonBL:
|
|
126
|
-
- update output types of sendResetPasswordEmailV0ResponseZ and sendVerificationEmailV0ResponseZ.
|
|
127
|
-
|
|
128
|
-
### v6.0.0
|
|
129
|
-
|
|
130
|
-
- AuthenticationCommonBL:
|
|
131
|
-
- **breaking change** remove updatePasswordV0.
|
|
132
|
-
- add generateAccountBackupCodesV0.
|
|
133
|
-
- method changed of deleteUserV0 from delete to post.
|
|
134
|
-
- add updateProfileDetailsV0.
|
|
135
|
-
- add sendResetPasswordEmailV0.
|
|
136
|
-
- add updateUserRecoveryMethodsV0.
|
|
137
|
-
- add sendVerificationEmailV0.
|
|
138
|
-
- add validateEmailVerificationCodeV0.
|
|
139
|
-
|
|
140
|
-
### v5.2.1
|
|
141
|
-
|
|
142
|
-
- AuthenticationCommonBL:
|
|
143
|
-
- fix url in updateUserProfilePhotoV0.
|
|
144
|
-
|
|
145
|
-
### v5.2.0
|
|
146
|
-
|
|
147
|
-
- AuthenticationCommonBL:
|
|
148
|
-
- add updateUserProfilePhotoV0.
|
|
149
|
-
- rename getUserProfilePhoto to getUserProfilePhotoV0.
|
|
150
|
-
|
|
151
|
-
### v5.1.0
|
|
152
|
-
|
|
153
|
-
- AuthenticationCommonBL:
|
|
154
|
-
- add getUserProfilePhoto.
|
|
155
|
-
|
|
156
|
-
### v5.0.0
|
|
157
|
-
|
|
158
|
-
- AuthenticationCommonBL:
|
|
159
|
-
- change type for GetUserDetailsV0ResponseZ to make it compatible with latest changes.
|
|
160
|
-
|
|
161
|
-
### v4.2.0
|
|
162
|
-
|
|
163
|
-
- AuthenticationCommonBL:
|
|
164
|
-
- add logoutAppsV0.
|
|
165
|
-
|
|
166
|
-
### v4.1.0
|
|
167
|
-
|
|
168
|
-
- AuthenticationCommonBL:
|
|
169
|
-
- add logoutAllV0.
|
|
170
|
-
|
|
171
|
-
### v4.0.0
|
|
172
|
-
|
|
173
|
-
- AuthenticationCommonBL:
|
|
174
|
-
- change type for GetUserDetailsV0ResponseZ to make it compatible with latest changes.
|
|
175
|
-
|
|
176
|
-
### v3.0.0
|
|
177
|
-
|
|
178
|
-
- AuthenticationCommonBL:
|
|
179
|
-
- remove generateAccessTokenV0, logoutV0.
|
|
180
|
-
|
|
181
|
-
### v2.0.1
|
|
182
|
-
|
|
183
|
-
- use strictObject in zod.
|
|
184
|
-
- export types in index file.
|
|
185
|
-
|
|
186
|
-
### v2.0.0
|
|
187
|
-
|
|
188
|
-
- remove UtilsCommonBL
|
|
189
|
-
|
|
190
|
-
### v1.8.0
|
|
191
|
-
|
|
192
|
-
- AuthenticationCommonBL:
|
|
193
|
-
- add types for deleteUserV0
|
|
194
|
-
|
|
195
|
-
### v1.7.0
|
|
196
|
-
|
|
197
|
-
- AuthenticationCommonBL:
|
|
198
|
-
- add types for logoutV0
|
|
199
|
-
|
|
200
|
-
### v1.6.0
|
|
201
|
-
|
|
202
|
-
- AuthenticationCommonBL:
|
|
203
|
-
- add types for getUserDetailsV0
|
|
204
|
-
|
|
205
|
-
### v1.5.0
|
|
206
|
-
|
|
207
|
-
- AuthenticationCommonBL:
|
|
208
|
-
- add types for updatePasswordV0
|
|
209
|
-
|
|
210
|
-
### v1.4.0
|
|
211
|
-
|
|
212
|
-
- AuthenticationCommonBL:
|
|
213
|
-
- bug fix in updateUsernameV0
|
|
214
|
-
- add types for updateUsernameV0
|
|
215
|
-
|
|
216
|
-
### v1.3.0
|
|
217
|
-
|
|
218
|
-
- add types in AuthenticationCommonBL:
|
|
219
|
-
- generateAccessTokenV0
|
|
220
|
-
|
|
221
|
-
### v1.2.0
|
|
222
|
-
|
|
223
|
-
- add types in greeting:
|
|
224
|
-
- createGreetingV0
|
|
225
|
-
|
|
226
|
-
### v1.1.0
|
|
227
|
-
|
|
228
|
-
- add AuthenticationCommonBL class with the following methods:
|
|
229
|
-
- logoutV0
|
|
230
|
-
- generateAccessTokenV0
|
|
231
|
-
- deleteUserV0
|
|
232
|
-
- updateUsernameV0
|
|
233
|
-
- updatePasswordV0
|
|
234
|
-
- getUserDetailsV0
|
|
235
|
-
|
|
236
|
-
### v1.0.3
|
|
237
|
-
|
|
238
|
-
- experimental release.
|
|
239
|
-
|
|
240
|
-
### v1.0.2
|
|
241
|
-
|
|
242
|
-
- replace user_id with accessToken from greeting -> createGreetingV0.
|
|
243
|
-
|
|
244
|
-
### v1.0.1
|
|
245
|
-
|
|
246
|
-
- remove app_id from greeting -> createGreetingV0.
|
|
247
|
-
|
|
248
|
-
### v1.0.0
|
|
249
|
-
|
|
250
|
-
- initial implementation.
|
|
251
|
-
|
|
17
|
+
|
|
252
18
|
## Feedback is appreciated. Thank you!
|
package/dist/authentication.d.ts
CHANGED
|
@@ -48,6 +48,7 @@ declare class AuthenticationCommonBL {
|
|
|
48
48
|
available: number;
|
|
49
49
|
generated_at: string;
|
|
50
50
|
} | null;
|
|
51
|
+
auth_providers: string[];
|
|
51
52
|
};
|
|
52
53
|
};
|
|
53
54
|
log?: any;
|
|
@@ -97,7 +98,7 @@ declare class AuthenticationCommonBL {
|
|
|
97
98
|
};
|
|
98
99
|
log?: any;
|
|
99
100
|
}>;
|
|
100
|
-
sendResetPasswordEmailV0(username: string, logErrors?: boolean): Promise<{
|
|
101
|
+
sendResetPasswordEmailV0(username: string, redirectUrl?: string, logErrors?: boolean): Promise<{
|
|
101
102
|
message: string | null;
|
|
102
103
|
data: {
|
|
103
104
|
expires_at: string;
|
|
@@ -112,7 +113,7 @@ declare class AuthenticationCommonBL {
|
|
|
112
113
|
};
|
|
113
114
|
log?: any;
|
|
114
115
|
}>;
|
|
115
|
-
sendVerificationEmailV0(accessToken: string, logErrors?: boolean): Promise<{
|
|
116
|
+
sendVerificationEmailV0(accessToken: string, redirectUrl?: string, logErrors?: boolean): Promise<{
|
|
116
117
|
message: string | null;
|
|
117
118
|
data: {
|
|
118
119
|
expires_at: string;
|
|
@@ -143,5 +144,26 @@ declare class AuthenticationCommonBL {
|
|
|
143
144
|
};
|
|
144
145
|
log?: any;
|
|
145
146
|
}>;
|
|
147
|
+
addSelfAuthProviderV0(accessToken: string, password: string, logErrors?: boolean): Promise<{
|
|
148
|
+
message: string | null;
|
|
149
|
+
data: {
|
|
150
|
+
main: string[];
|
|
151
|
+
};
|
|
152
|
+
log?: any;
|
|
153
|
+
}>;
|
|
154
|
+
addGoogleAuthProviderV0(accessToken: string, googleIdToken: string, logErrors?: boolean): Promise<{
|
|
155
|
+
message: string | null;
|
|
156
|
+
data: {
|
|
157
|
+
main: string[];
|
|
158
|
+
};
|
|
159
|
+
log?: any;
|
|
160
|
+
}>;
|
|
161
|
+
unlinkAuthProviderV0(accessToken: string, authProvider: string, logErrors?: boolean): Promise<{
|
|
162
|
+
message: string | null;
|
|
163
|
+
data: {
|
|
164
|
+
main: string[];
|
|
165
|
+
};
|
|
166
|
+
log?: any;
|
|
167
|
+
}>;
|
|
146
168
|
}
|
|
147
169
|
export { AuthenticationCommonBL };
|
package/dist/authentication.js
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { fetchFileData, fetchJSONData } from "squarecommons";
|
|
2
|
-
import { DeleteUserV0ResponseZ, GenerateAccountBackupCodeV0ResponseZ, GetUserDetailsV0ResponseZ, GetUserRecoveryMethodsV0ResponseZ, LogoutAllV0ResponseZ, LogoutAppsV0ResponseZ, SendResetPasswordEmailV0ResponseZ, SendVerificationEmailV0ResponseZ, UpdateProfileDetailsV0ResponseZ, UpdateUsernameV0ResponseZ, UpdateUserProfilePhotoV0ResponseZ, UpdateUserRecoveryMethodsV0ResponseZ, ValidateEmailVerificationCodeV0ResponseZ, } from "./types/AuthenticationResponses.js";
|
|
2
|
+
import { DeleteUserV0ResponseZ, GenerateAccountBackupCodeV0ResponseZ, GetUserDetailsV0ResponseZ, GetUserRecoveryMethodsV0ResponseZ, LogoutAllV0ResponseZ, LogoutAppsV0ResponseZ, SendResetPasswordEmailV0ResponseZ, SendVerificationEmailV0ResponseZ, UpdateProfileDetailsV0ResponseZ, UpdateUsernameV0ResponseZ, UpdateUserProfilePhotoV0ResponseZ, UpdateUserRecoveryMethodsV0ResponseZ, ValidateEmailVerificationCodeV0ResponseZ, AddSelfAuthProviderV0ResponseZ, AddGoogleAuthProviderV0ResponseZ, UnlinkAuthProviderV0ResponseZ, } from "./types/AuthenticationResponses.js";
|
|
3
3
|
class AuthenticationCommonBL {
|
|
4
4
|
commonBLBaseURL;
|
|
5
5
|
constructor(commonBLBaseURL = "http://localhost:10110") {
|
|
@@ -256,7 +256,7 @@ class AuthenticationCommonBL {
|
|
|
256
256
|
throw error;
|
|
257
257
|
}
|
|
258
258
|
}
|
|
259
|
-
async sendResetPasswordEmailV0(username, logErrors = true) {
|
|
259
|
+
async sendResetPasswordEmailV0(username, redirectUrl, logErrors = true) {
|
|
260
260
|
try {
|
|
261
261
|
const data = await fetchJSONData(
|
|
262
262
|
// base url
|
|
@@ -268,7 +268,7 @@ class AuthenticationCommonBL {
|
|
|
268
268
|
// headers
|
|
269
269
|
undefined,
|
|
270
270
|
// body
|
|
271
|
-
{ username: username },
|
|
271
|
+
{ username: username, redirect_url: redirectUrl },
|
|
272
272
|
// query params
|
|
273
273
|
undefined,
|
|
274
274
|
// credentials
|
|
@@ -315,7 +315,7 @@ class AuthenticationCommonBL {
|
|
|
315
315
|
throw error;
|
|
316
316
|
}
|
|
317
317
|
}
|
|
318
|
-
async sendVerificationEmailV0(accessToken, logErrors = true) {
|
|
318
|
+
async sendVerificationEmailV0(accessToken, redirectUrl, logErrors = true) {
|
|
319
319
|
try {
|
|
320
320
|
const data = await fetchJSONData(
|
|
321
321
|
// base url
|
|
@@ -327,7 +327,7 @@ class AuthenticationCommonBL {
|
|
|
327
327
|
// headers
|
|
328
328
|
{ access_token: accessToken },
|
|
329
329
|
// body
|
|
330
|
-
|
|
330
|
+
{ redirect_url: redirectUrl },
|
|
331
331
|
// query params
|
|
332
332
|
undefined,
|
|
333
333
|
// credentials
|
|
@@ -390,5 +390,80 @@ class AuthenticationCommonBL {
|
|
|
390
390
|
throw error;
|
|
391
391
|
}
|
|
392
392
|
}
|
|
393
|
+
async addSelfAuthProviderV0(accessToken, password, logErrors = true) {
|
|
394
|
+
try {
|
|
395
|
+
const data = await fetchJSONData(
|
|
396
|
+
// base url
|
|
397
|
+
this.commonBLBaseURL,
|
|
398
|
+
// endpoint
|
|
399
|
+
"add_self_auth_provider/v0",
|
|
400
|
+
// method
|
|
401
|
+
"POST",
|
|
402
|
+
// headers
|
|
403
|
+
{ access_token: accessToken },
|
|
404
|
+
// body
|
|
405
|
+
{ password: password },
|
|
406
|
+
// query params
|
|
407
|
+
undefined,
|
|
408
|
+
// credentials
|
|
409
|
+
undefined,
|
|
410
|
+
// logErrors
|
|
411
|
+
logErrors);
|
|
412
|
+
return AddSelfAuthProviderV0ResponseZ.parse(data);
|
|
413
|
+
}
|
|
414
|
+
catch (error) {
|
|
415
|
+
throw error;
|
|
416
|
+
}
|
|
417
|
+
}
|
|
418
|
+
async addGoogleAuthProviderV0(accessToken, googleIdToken, logErrors = true) {
|
|
419
|
+
try {
|
|
420
|
+
const data = await fetchJSONData(
|
|
421
|
+
// base url
|
|
422
|
+
this.commonBLBaseURL,
|
|
423
|
+
// endpoint
|
|
424
|
+
"add_google_auth_provider/v0",
|
|
425
|
+
// method
|
|
426
|
+
"POST",
|
|
427
|
+
// headers
|
|
428
|
+
{ access_token: accessToken },
|
|
429
|
+
// body
|
|
430
|
+
{ google_id_token: googleIdToken },
|
|
431
|
+
// query params
|
|
432
|
+
undefined,
|
|
433
|
+
// credentials
|
|
434
|
+
undefined,
|
|
435
|
+
// logErrors
|
|
436
|
+
logErrors);
|
|
437
|
+
return AddGoogleAuthProviderV0ResponseZ.parse(data);
|
|
438
|
+
}
|
|
439
|
+
catch (error) {
|
|
440
|
+
throw error;
|
|
441
|
+
}
|
|
442
|
+
}
|
|
443
|
+
async unlinkAuthProviderV0(accessToken, authProvider, logErrors = true) {
|
|
444
|
+
try {
|
|
445
|
+
const data = await fetchJSONData(
|
|
446
|
+
// base url
|
|
447
|
+
this.commonBLBaseURL,
|
|
448
|
+
// endpoint
|
|
449
|
+
"unlink_auth_provider/v0",
|
|
450
|
+
// method
|
|
451
|
+
"POST",
|
|
452
|
+
// headers
|
|
453
|
+
{ access_token: accessToken },
|
|
454
|
+
// body
|
|
455
|
+
{ auth_provider: authProvider },
|
|
456
|
+
// query params
|
|
457
|
+
undefined,
|
|
458
|
+
// credentials
|
|
459
|
+
undefined,
|
|
460
|
+
// logErrors
|
|
461
|
+
logErrors);
|
|
462
|
+
return UnlinkAuthProviderV0ResponseZ.parse(data);
|
|
463
|
+
}
|
|
464
|
+
catch (error) {
|
|
465
|
+
throw error;
|
|
466
|
+
}
|
|
467
|
+
}
|
|
393
468
|
}
|
|
394
469
|
export { AuthenticationCommonBL };
|
|
@@ -120,6 +120,7 @@ declare const GetUserDetailsV0ResponseZ: z.ZodObject<z.objectUtil.extendShape<{
|
|
|
120
120
|
available: number;
|
|
121
121
|
generated_at: string;
|
|
122
122
|
}>>;
|
|
123
|
+
auth_providers: z.ZodArray<z.ZodString, "many">;
|
|
123
124
|
}, "strict", z.ZodTypeAny, {
|
|
124
125
|
user_id: string;
|
|
125
126
|
username: string;
|
|
@@ -148,6 +149,7 @@ declare const GetUserDetailsV0ResponseZ: z.ZodObject<z.objectUtil.extendShape<{
|
|
|
148
149
|
available: number;
|
|
149
150
|
generated_at: string;
|
|
150
151
|
} | null;
|
|
152
|
+
auth_providers: string[];
|
|
151
153
|
}, {
|
|
152
154
|
user_id: string;
|
|
153
155
|
username: string;
|
|
@@ -176,6 +178,7 @@ declare const GetUserDetailsV0ResponseZ: z.ZodObject<z.objectUtil.extendShape<{
|
|
|
176
178
|
available: number;
|
|
177
179
|
generated_at: string;
|
|
178
180
|
} | null;
|
|
181
|
+
auth_providers: string[];
|
|
179
182
|
}>;
|
|
180
183
|
}, "strict", z.ZodTypeAny, {
|
|
181
184
|
main: {
|
|
@@ -206,6 +209,7 @@ declare const GetUserDetailsV0ResponseZ: z.ZodObject<z.objectUtil.extendShape<{
|
|
|
206
209
|
available: number;
|
|
207
210
|
generated_at: string;
|
|
208
211
|
} | null;
|
|
212
|
+
auth_providers: string[];
|
|
209
213
|
};
|
|
210
214
|
}, {
|
|
211
215
|
main: {
|
|
@@ -236,6 +240,7 @@ declare const GetUserDetailsV0ResponseZ: z.ZodObject<z.objectUtil.extendShape<{
|
|
|
236
240
|
available: number;
|
|
237
241
|
generated_at: string;
|
|
238
242
|
} | null;
|
|
243
|
+
auth_providers: string[];
|
|
239
244
|
};
|
|
240
245
|
}>;
|
|
241
246
|
}>, "strict", z.ZodTypeAny, {
|
|
@@ -269,6 +274,7 @@ declare const GetUserDetailsV0ResponseZ: z.ZodObject<z.objectUtil.extendShape<{
|
|
|
269
274
|
available: number;
|
|
270
275
|
generated_at: string;
|
|
271
276
|
} | null;
|
|
277
|
+
auth_providers: string[];
|
|
272
278
|
};
|
|
273
279
|
};
|
|
274
280
|
log?: any;
|
|
@@ -303,6 +309,7 @@ declare const GetUserDetailsV0ResponseZ: z.ZodObject<z.objectUtil.extendShape<{
|
|
|
303
309
|
available: number;
|
|
304
310
|
generated_at: string;
|
|
305
311
|
} | null;
|
|
312
|
+
auth_providers: string[];
|
|
306
313
|
};
|
|
307
314
|
};
|
|
308
315
|
log?: any;
|
|
@@ -724,4 +731,82 @@ declare const UpdateUserProfilePhotoV0ResponseZ: z.ZodObject<z.objectUtil.extend
|
|
|
724
731
|
log?: any;
|
|
725
732
|
}>;
|
|
726
733
|
type UpdateUserProfilePhotoV0Response = z.infer<typeof UpdateUserProfilePhotoV0ResponseZ>;
|
|
727
|
-
|
|
734
|
+
declare const AddSelfAuthProviderV0ResponseZ: z.ZodObject<z.objectUtil.extendShape<{
|
|
735
|
+
data: z.ZodAny;
|
|
736
|
+
message: z.ZodNullable<z.ZodString>;
|
|
737
|
+
log: z.ZodAny;
|
|
738
|
+
}, {
|
|
739
|
+
data: z.ZodObject<{
|
|
740
|
+
main: z.ZodArray<z.ZodString, "many">;
|
|
741
|
+
}, "strict", z.ZodTypeAny, {
|
|
742
|
+
main: string[];
|
|
743
|
+
}, {
|
|
744
|
+
main: string[];
|
|
745
|
+
}>;
|
|
746
|
+
}>, "strict", z.ZodTypeAny, {
|
|
747
|
+
message: string | null;
|
|
748
|
+
data: {
|
|
749
|
+
main: string[];
|
|
750
|
+
};
|
|
751
|
+
log?: any;
|
|
752
|
+
}, {
|
|
753
|
+
message: string | null;
|
|
754
|
+
data: {
|
|
755
|
+
main: string[];
|
|
756
|
+
};
|
|
757
|
+
log?: any;
|
|
758
|
+
}>;
|
|
759
|
+
type AddSelfAuthProviderV0Response = z.infer<typeof AddSelfAuthProviderV0ResponseZ>;
|
|
760
|
+
declare const AddGoogleAuthProviderV0ResponseZ: z.ZodObject<z.objectUtil.extendShape<{
|
|
761
|
+
data: z.ZodAny;
|
|
762
|
+
message: z.ZodNullable<z.ZodString>;
|
|
763
|
+
log: z.ZodAny;
|
|
764
|
+
}, {
|
|
765
|
+
data: z.ZodObject<{
|
|
766
|
+
main: z.ZodArray<z.ZodString, "many">;
|
|
767
|
+
}, "strict", z.ZodTypeAny, {
|
|
768
|
+
main: string[];
|
|
769
|
+
}, {
|
|
770
|
+
main: string[];
|
|
771
|
+
}>;
|
|
772
|
+
}>, "strict", z.ZodTypeAny, {
|
|
773
|
+
message: string | null;
|
|
774
|
+
data: {
|
|
775
|
+
main: string[];
|
|
776
|
+
};
|
|
777
|
+
log?: any;
|
|
778
|
+
}, {
|
|
779
|
+
message: string | null;
|
|
780
|
+
data: {
|
|
781
|
+
main: string[];
|
|
782
|
+
};
|
|
783
|
+
log?: any;
|
|
784
|
+
}>;
|
|
785
|
+
type AddGoogleAuthProviderV0Response = z.infer<typeof AddGoogleAuthProviderV0ResponseZ>;
|
|
786
|
+
declare const UnlinkAuthProviderV0ResponseZ: z.ZodObject<z.objectUtil.extendShape<{
|
|
787
|
+
data: z.ZodAny;
|
|
788
|
+
message: z.ZodNullable<z.ZodString>;
|
|
789
|
+
log: z.ZodAny;
|
|
790
|
+
}, {
|
|
791
|
+
data: z.ZodObject<{
|
|
792
|
+
main: z.ZodArray<z.ZodString, "many">;
|
|
793
|
+
}, "strict", z.ZodTypeAny, {
|
|
794
|
+
main: string[];
|
|
795
|
+
}, {
|
|
796
|
+
main: string[];
|
|
797
|
+
}>;
|
|
798
|
+
}>, "strict", z.ZodTypeAny, {
|
|
799
|
+
message: string | null;
|
|
800
|
+
data: {
|
|
801
|
+
main: string[];
|
|
802
|
+
};
|
|
803
|
+
log?: any;
|
|
804
|
+
}, {
|
|
805
|
+
message: string | null;
|
|
806
|
+
data: {
|
|
807
|
+
main: string[];
|
|
808
|
+
};
|
|
809
|
+
log?: any;
|
|
810
|
+
}>;
|
|
811
|
+
type UnlinkAuthProviderV0Response = z.infer<typeof UnlinkAuthProviderV0ResponseZ>;
|
|
812
|
+
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, GetUserRecoveryMethodsV0ResponseZ, GetUserRecoveryMethodsV0Response, UpdateUserProfilePhotoV0ResponseZ, UpdateUserProfilePhotoV0Response, AddSelfAuthProviderV0ResponseZ, AddSelfAuthProviderV0Response, AddGoogleAuthProviderV0ResponseZ, AddGoogleAuthProviderV0Response, UnlinkAuthProviderV0ResponseZ, UnlinkAuthProviderV0Response, };
|
|
@@ -40,6 +40,7 @@ const GetUserDetailsV0ResponseZ = APIOutputZ.extend({
|
|
|
40
40
|
generated_at: z.string(),
|
|
41
41
|
})
|
|
42
42
|
.nullable(),
|
|
43
|
+
auth_providers: z.array(z.string()),
|
|
43
44
|
}),
|
|
44
45
|
}),
|
|
45
46
|
});
|
|
@@ -120,4 +121,19 @@ const UpdateUserProfilePhotoV0ResponseZ = APIOutputZ.extend({
|
|
|
120
121
|
main: z.string().nullable(),
|
|
121
122
|
}),
|
|
122
123
|
});
|
|
123
|
-
|
|
124
|
+
const AddSelfAuthProviderV0ResponseZ = APIOutputZ.extend({
|
|
125
|
+
data: z.strictObject({
|
|
126
|
+
main: z.array(z.string()),
|
|
127
|
+
}),
|
|
128
|
+
});
|
|
129
|
+
const AddGoogleAuthProviderV0ResponseZ = APIOutputZ.extend({
|
|
130
|
+
data: z.strictObject({
|
|
131
|
+
main: z.array(z.string()),
|
|
132
|
+
}),
|
|
133
|
+
});
|
|
134
|
+
const UnlinkAuthProviderV0ResponseZ = APIOutputZ.extend({
|
|
135
|
+
data: z.strictObject({
|
|
136
|
+
main: z.array(z.string()),
|
|
137
|
+
}),
|
|
138
|
+
});
|
|
139
|
+
export { UpdateUsernameV0ResponseZ, GetUserDetailsV0ResponseZ, DeleteUserV0ResponseZ, LogoutAllV0ResponseZ, LogoutAppsV0ResponseZ, GenerateAccountBackupCodeV0ResponseZ, UpdateProfileDetailsV0ResponseZ, SendResetPasswordEmailV0ResponseZ, RecoveryMethodEnumZ, UpdateUserRecoveryMethodsV0ResponseZ, SendVerificationEmailV0ResponseZ, ValidateEmailVerificationCodeV0ResponseZ, GetUserRecoveryMethodsV0ResponseZ, UpdateUserProfilePhotoV0ResponseZ, AddSelfAuthProviderV0ResponseZ, AddGoogleAuthProviderV0ResponseZ, UnlinkAuthProviderV0ResponseZ, };
|