@randock/nameshift-api-client 0.0.502 → 0.0.504
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/.openapi-generator/FILES +35 -1
- package/README.md +3 -3
- package/dist/apis/AdminApi.d.ts +44 -1
- package/dist/apis/AdminApi.js +177 -0
- package/dist/apis/BuyersPublicApi.d.ts +3 -3
- package/dist/apis/BuyersPublicApi.js +1 -1
- package/dist/apis/PartnerApi.d.ts +14 -1
- package/dist/apis/PartnerApi.js +53 -0
- package/dist/apis/UsersApi.d.ts +285 -1
- package/dist/apis/UsersApi.js +1305 -46
- package/dist/apis/UsersPublicApi.d.ts +107 -3
- package/dist/apis/UsersPublicApi.js +388 -2
- package/dist/models/ActivateUserTotpInput.d.ts +32 -0
- package/dist/models/ActivateUserTotpInput.js +51 -0
- package/dist/models/AdminUserSecurityDto.d.ts +87 -0
- package/dist/models/AdminUserSecurityDto.js +88 -0
- package/dist/models/BuyerLoginDto.d.ts +38 -0
- package/dist/models/BuyerLoginDto.js +55 -0
- package/dist/models/BuyerNotificationDto.d.ts +1 -0
- package/dist/models/BuyerNotificationDto.js +1 -0
- package/dist/models/BuyerNotificationListItemDto.d.ts +1 -0
- package/dist/models/BuyerNotificationListItemDto.js +1 -0
- package/dist/models/ChangeUserAuthenticationMethodInput.d.ts +33 -0
- package/dist/models/ChangeUserAuthenticationMethodInput.js +52 -0
- package/dist/models/ChangeUserLoginLocationVerificationInput.d.ts +32 -0
- package/dist/models/ChangeUserLoginLocationVerificationInput.js +51 -0
- package/dist/models/ChangeUserPasswordInput.d.ts +38 -0
- package/dist/models/ChangeUserPasswordInput.js +55 -0
- package/dist/models/ConfirmLoginLocationInput.d.ts +32 -0
- package/dist/models/ConfirmLoginLocationInput.js +51 -0
- package/dist/models/CurrentPasswordInput.d.ts +32 -0
- package/dist/models/CurrentPasswordInput.js +51 -0
- package/dist/models/FeatureFlagListItemDto.d.ts +1 -0
- package/dist/models/FeatureFlagListItemDto.js +2 -1
- package/dist/models/IntersectionAccountDtoWithSettingsDtoWithNotificationsDtoWithFeatureFlagsDto.d.ts +1 -0
- package/dist/models/IntersectionAccountDtoWithSettingsDtoWithNotificationsDtoWithFeatureFlagsDto.js +2 -1
- package/dist/models/ListUserLoginAttempts200Response.d.ts +47 -0
- package/dist/models/ListUserLoginAttempts200Response.js +62 -0
- package/dist/models/LoginChallengeInput.d.ts +32 -0
- package/dist/models/LoginChallengeInput.js +51 -0
- package/dist/models/LoginCodeInput.d.ts +38 -0
- package/dist/models/LoginCodeInput.js +55 -0
- package/dist/models/LoginDto.d.ts +30 -4
- package/dist/models/LoginDto.js +13 -5
- package/dist/models/LoginPasskeyInput.d.ts +46 -0
- package/dist/models/LoginPasskeyInput.js +57 -0
- package/dist/models/LoginPasskeyOptionsInput.d.ts +32 -0
- package/dist/models/LoginPasskeyOptionsInput.js +49 -0
- package/dist/models/LoginRecoveryCodeInput.d.ts +38 -0
- package/dist/models/LoginRecoveryCodeInput.js +55 -0
- package/dist/models/LoginStatus.d.ts +26 -0
- package/dist/models/LoginStatus.js +52 -0
- package/dist/models/PartnerDomainSeoMetricsDto.d.ts +40 -0
- package/dist/models/PartnerDomainSeoMetricsDto.js +57 -0
- package/dist/models/PartnerMajesticMetricsDto.d.ts +56 -0
- package/dist/models/PartnerMajesticMetricsDto.js +67 -0
- package/dist/models/PartnerMozMetricsDto.d.ts +62 -0
- package/dist/models/PartnerMozMetricsDto.js +71 -0
- package/dist/models/PasskeyOptionsDto.d.ts +40 -0
- package/dist/models/PasskeyOptionsDto.js +55 -0
- package/dist/models/PrivateAccountGetMeResponse.d.ts +1 -0
- package/dist/models/PrivateAccountGetMeResponse.js +2 -1
- package/dist/models/ReauthenticateWithPasskeyInput.d.ts +40 -0
- package/dist/models/ReauthenticateWithPasskeyInput.js +55 -0
- package/dist/models/ReauthenticationDto.d.ts +38 -0
- package/dist/models/ReauthenticationDto.js +55 -0
- package/dist/models/RecoveryCodesDto.d.ts +32 -0
- package/dist/models/RecoveryCodesDto.js +51 -0
- package/dist/models/RegisterUserPasskeyInput.d.ts +46 -0
- package/dist/models/RegisterUserPasskeyInput.js +59 -0
- package/dist/models/RemoveUserPasskeyInput.d.ts +40 -0
- package/dist/models/RemoveUserPasskeyInput.js +55 -0
- package/dist/models/RenameUserPasskeyInput.d.ts +32 -0
- package/dist/models/{NotFoundException.js → RenameUserPasskeyInput.js} +13 -21
- package/dist/models/SecondFactorMethod.d.ts +26 -0
- package/dist/models/SecondFactorMethod.js +52 -0
- package/dist/models/SellerSecurityUserDto.d.ts +12 -0
- package/dist/models/SellerSecurityUserDto.js +4 -0
- package/dist/models/TotpCodeInput.d.ts +32 -0
- package/dist/models/TotpCodeInput.js +51 -0
- package/dist/models/TotpEnrolmentDto.d.ts +38 -0
- package/dist/models/TotpEnrolmentDto.js +55 -0
- package/dist/models/UserAuthenticationMethod.d.ts +27 -0
- package/dist/models/UserAuthenticationMethod.js +53 -0
- package/dist/models/UserLoginAttemptDto.d.ts +88 -0
- package/dist/models/UserLoginAttemptDto.js +89 -0
- package/dist/models/UserLoginAttemptMethod.d.ts +29 -0
- package/dist/models/UserLoginAttemptMethod.js +55 -0
- package/dist/models/UserLoginAttemptResult.d.ts +30 -0
- package/dist/models/UserLoginAttemptResult.js +56 -0
- package/dist/models/UserLoginLocationConfirmationDetailsDto.d.ts +62 -0
- package/dist/models/UserLoginLocationConfirmationDetailsDto.js +71 -0
- package/dist/models/UserNotificationDto.d.ts +1 -0
- package/dist/models/UserNotificationDto.js +1 -0
- package/dist/models/UserNotificationListItemDto.d.ts +1 -0
- package/dist/models/UserNotificationListItemDto.js +1 -0
- package/dist/models/UserPasskeyDto.d.ts +62 -0
- package/dist/models/UserPasskeyDto.js +71 -0
- package/dist/models/UserSecurityDto.d.ts +94 -0
- package/dist/models/UserSecurityDto.js +93 -0
- package/dist/models/index.d.ts +35 -1
- package/dist/models/index.js +35 -1
- package/package.json +1 -1
- package/src/apis/AccountsApi.ts +0 -3
- package/src/apis/AccountsPublicApi.ts +0 -3
- package/src/apis/AdminApi.ts +172 -3
- package/src/apis/AuctionsApi.ts +0 -3
- package/src/apis/BuyersApi.ts +0 -3
- package/src/apis/BuyersPublicApi.ts +6 -6
- package/src/apis/CustomerSuccessApi.ts +0 -3
- package/src/apis/DomainAppraisalRequestsApi.ts +0 -3
- package/src/apis/DomainAppraisalRequestsPublicApi.ts +0 -3
- package/src/apis/DomainsApi.ts +0 -3
- package/src/apis/DomainsPublicApi.ts +0 -3
- package/src/apis/InvoicesApi.ts +0 -3
- package/src/apis/JobsApi.ts +0 -3
- package/src/apis/LeadsPublicApi.ts +0 -3
- package/src/apis/NotificationsApi.ts +0 -3
- package/src/apis/OrdersPublicApi.ts +0 -3
- package/src/apis/PartnerApi.ts +46 -0
- package/src/apis/SubscriptionsPublicApi.ts +0 -3
- package/src/apis/UsersApi.ts +1219 -48
- package/src/apis/UsersPublicApi.ts +375 -5
- package/src/models/ActivateUserTotpInput.ts +66 -0
- package/src/models/AdminUserSecurityDto.ts +157 -0
- package/src/models/BuyerLoginDto.ts +75 -0
- package/src/models/BuyerNotificationDto.ts +1 -0
- package/src/models/BuyerNotificationListItemDto.ts +1 -0
- package/src/models/ChangeUserAuthenticationMethodInput.ts +76 -0
- package/src/models/ChangeUserLoginLocationVerificationInput.ts +66 -0
- package/src/models/ChangeUserPasswordInput.ts +75 -0
- package/src/models/ConfirmLoginLocationInput.ts +66 -0
- package/src/models/CurrentPasswordInput.ts +66 -0
- package/src/models/FeatureFlagListItemDto.ts +2 -1
- package/src/models/IntersectionAccountDtoWithSettingsDtoWithNotificationsDtoWithFeatureFlagsDto.ts +2 -1
- package/src/models/ListUserLoginAttempts200Response.ts +106 -0
- package/src/models/LoginChallengeInput.ts +66 -0
- package/src/models/LoginCodeInput.ts +75 -0
- package/src/models/LoginDto.ts +56 -8
- package/src/models/LoginPasskeyInput.ts +83 -0
- package/src/models/LoginPasskeyOptionsInput.ts +65 -0
- package/src/models/LoginRecoveryCodeInput.ts +75 -0
- package/src/models/LoginStatus.ts +54 -0
- package/src/models/PartnerDomainSeoMetricsDto.ts +90 -0
- package/src/models/PartnerMajesticMetricsDto.ts +102 -0
- package/src/models/PartnerMozMetricsDto.ts +111 -0
- package/src/models/PasskeyOptionsDto.ts +75 -0
- package/src/models/PrivateAccountGetMeResponse.ts +2 -1
- package/src/models/ReauthenticateWithPasskeyInput.ts +75 -0
- package/src/models/ReauthenticationDto.ts +75 -0
- package/src/models/RecoveryCodesDto.ts +66 -0
- package/src/models/RegisterUserPasskeyInput.ts +84 -0
- package/src/models/RemoveUserPasskeyInput.ts +75 -0
- package/src/models/RenameUserPasskeyInput.ts +66 -0
- package/src/models/SecondFactorMethod.ts +54 -0
- package/src/models/SellerSecurityUserDto.ts +16 -0
- package/src/models/TotpCodeInput.ts +66 -0
- package/src/models/TotpEnrolmentDto.ts +75 -0
- package/src/models/UserAuthenticationMethod.ts +55 -0
- package/src/models/UserLoginAttemptDto.ts +164 -0
- package/src/models/UserLoginAttemptMethod.ts +57 -0
- package/src/models/UserLoginAttemptResult.ts +58 -0
- package/src/models/UserLoginLocationConfirmationDetailsDto.ts +111 -0
- package/src/models/UserNotificationDto.ts +1 -0
- package/src/models/UserNotificationListItemDto.ts +1 -0
- package/src/models/UserPasskeyDto.ts +111 -0
- package/src/models/UserSecurityDto.ts +173 -0
- package/src/models/index.ts +35 -1
- package/dist/models/NotFoundException.d.ts +0 -44
- package/src/models/NotFoundException.ts +0 -84
|
@@ -15,29 +15,50 @@
|
|
|
15
15
|
|
|
16
16
|
import * as runtime from '../runtime';
|
|
17
17
|
import type {
|
|
18
|
+
ConfirmLoginLocationInput,
|
|
18
19
|
ForgotPasswordRequestInput,
|
|
20
|
+
LoginChallengeInput,
|
|
21
|
+
LoginCodeInput,
|
|
19
22
|
LoginDto,
|
|
20
23
|
LoginInput,
|
|
21
|
-
|
|
24
|
+
LoginPasskeyInput,
|
|
25
|
+
LoginPasskeyOptionsInput,
|
|
26
|
+
LoginRecoveryCodeInput,
|
|
22
27
|
NotificationsUnsubscribeResultDto,
|
|
28
|
+
PasskeyOptionsDto,
|
|
23
29
|
SetNewPasswordInput,
|
|
30
|
+
UserLoginLocationConfirmationDetailsDto,
|
|
24
31
|
UserPasswordResetDto,
|
|
25
32
|
UserSignedTokenInput,
|
|
26
33
|
ValidationException,
|
|
27
34
|
} from '../models/index';
|
|
28
35
|
import {
|
|
36
|
+
ConfirmLoginLocationInputFromJSON,
|
|
37
|
+
ConfirmLoginLocationInputToJSON,
|
|
29
38
|
ForgotPasswordRequestInputFromJSON,
|
|
30
39
|
ForgotPasswordRequestInputToJSON,
|
|
40
|
+
LoginChallengeInputFromJSON,
|
|
41
|
+
LoginChallengeInputToJSON,
|
|
42
|
+
LoginCodeInputFromJSON,
|
|
43
|
+
LoginCodeInputToJSON,
|
|
31
44
|
LoginDtoFromJSON,
|
|
32
45
|
LoginDtoToJSON,
|
|
33
46
|
LoginInputFromJSON,
|
|
34
47
|
LoginInputToJSON,
|
|
35
|
-
|
|
36
|
-
|
|
48
|
+
LoginPasskeyInputFromJSON,
|
|
49
|
+
LoginPasskeyInputToJSON,
|
|
50
|
+
LoginPasskeyOptionsInputFromJSON,
|
|
51
|
+
LoginPasskeyOptionsInputToJSON,
|
|
52
|
+
LoginRecoveryCodeInputFromJSON,
|
|
53
|
+
LoginRecoveryCodeInputToJSON,
|
|
37
54
|
NotificationsUnsubscribeResultDtoFromJSON,
|
|
38
55
|
NotificationsUnsubscribeResultDtoToJSON,
|
|
56
|
+
PasskeyOptionsDtoFromJSON,
|
|
57
|
+
PasskeyOptionsDtoToJSON,
|
|
39
58
|
SetNewPasswordInputFromJSON,
|
|
40
59
|
SetNewPasswordInputToJSON,
|
|
60
|
+
UserLoginLocationConfirmationDetailsDtoFromJSON,
|
|
61
|
+
UserLoginLocationConfirmationDetailsDtoToJSON,
|
|
41
62
|
UserPasswordResetDtoFromJSON,
|
|
42
63
|
UserPasswordResetDtoToJSON,
|
|
43
64
|
UserSignedTokenInputFromJSON,
|
|
@@ -46,6 +67,11 @@ import {
|
|
|
46
67
|
ValidationExceptionToJSON,
|
|
47
68
|
} from '../models/index';
|
|
48
69
|
|
|
70
|
+
export interface UsersPublicApiConfirmLoginLocationRequest {
|
|
71
|
+
confirmationId: string;
|
|
72
|
+
confirmLoginLocationInput: ConfirmLoginLocationInput;
|
|
73
|
+
}
|
|
74
|
+
|
|
49
75
|
export interface UsersPublicApiForgotPasswordRequestRequest {
|
|
50
76
|
forgotPasswordRequestInput: ForgotPasswordRequestInput;
|
|
51
77
|
}
|
|
@@ -54,10 +80,39 @@ export interface UsersPublicApiGetForgotPasswordRequestRequest {
|
|
|
54
80
|
passwordRequestId: string;
|
|
55
81
|
}
|
|
56
82
|
|
|
83
|
+
export interface UsersPublicApiGetLoginLocationConfirmationDetailsRequest {
|
|
84
|
+
confirmationId: string;
|
|
85
|
+
confirmLoginLocationInput: ConfirmLoginLocationInput;
|
|
86
|
+
}
|
|
87
|
+
|
|
88
|
+
export interface UsersPublicApiGetLoginLocationConfirmationStatusRequest {
|
|
89
|
+
loginChallengeInput: LoginChallengeInput;
|
|
90
|
+
}
|
|
91
|
+
|
|
92
|
+
export interface UsersPublicApiGetLoginPasskeyOptionsRequest {
|
|
93
|
+
loginPasskeyOptionsInput: LoginPasskeyOptionsInput;
|
|
94
|
+
}
|
|
95
|
+
|
|
57
96
|
export interface UsersPublicApiLoginRequest {
|
|
58
97
|
loginInput: LoginInput;
|
|
59
98
|
}
|
|
60
99
|
|
|
100
|
+
export interface UsersPublicApiLoginWithPasskeyRequest {
|
|
101
|
+
loginPasskeyInput: LoginPasskeyInput;
|
|
102
|
+
}
|
|
103
|
+
|
|
104
|
+
export interface UsersPublicApiLoginWithRecoveryCodeRequest {
|
|
105
|
+
loginCodeInput: LoginCodeInput;
|
|
106
|
+
}
|
|
107
|
+
|
|
108
|
+
export interface UsersPublicApiLoginWithRecoveryCodeInsteadOfPasskeyRequest {
|
|
109
|
+
loginRecoveryCodeInput: LoginRecoveryCodeInput;
|
|
110
|
+
}
|
|
111
|
+
|
|
112
|
+
export interface UsersPublicApiLoginWithTotpRequest {
|
|
113
|
+
loginCodeInput: LoginCodeInput;
|
|
114
|
+
}
|
|
115
|
+
|
|
61
116
|
export interface UsersPublicApiPostNewPasswordRequest {
|
|
62
117
|
passwordRequestId: string;
|
|
63
118
|
setNewPasswordInput: SetNewPasswordInput;
|
|
@@ -72,6 +127,50 @@ export interface UsersPublicApiUnsubscribeFromNotificationsByTokenRequest {
|
|
|
72
127
|
*/
|
|
73
128
|
export class UsersPublicApi extends runtime.BaseAPI {
|
|
74
129
|
|
|
130
|
+
/**
|
|
131
|
+
* Called by the page the email links to. It only approves the sign-in: no session is returned here.
|
|
132
|
+
* Approve a sign-in from a new location
|
|
133
|
+
*/
|
|
134
|
+
async confirmLoginLocationRaw(requestParameters: UsersPublicApiConfirmLoginLocationRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<void>> {
|
|
135
|
+
if (requestParameters['confirmationId'] == null) {
|
|
136
|
+
throw new runtime.RequiredError(
|
|
137
|
+
'confirmationId',
|
|
138
|
+
'Required parameter "confirmationId" was null or undefined when calling confirmLoginLocation().'
|
|
139
|
+
);
|
|
140
|
+
}
|
|
141
|
+
|
|
142
|
+
if (requestParameters['confirmLoginLocationInput'] == null) {
|
|
143
|
+
throw new runtime.RequiredError(
|
|
144
|
+
'confirmLoginLocationInput',
|
|
145
|
+
'Required parameter "confirmLoginLocationInput" was null or undefined when calling confirmLoginLocation().'
|
|
146
|
+
);
|
|
147
|
+
}
|
|
148
|
+
|
|
149
|
+
const queryParameters: any = {};
|
|
150
|
+
|
|
151
|
+
const headerParameters: runtime.HTTPHeaders = {};
|
|
152
|
+
|
|
153
|
+
headerParameters['Content-Type'] = 'application/json';
|
|
154
|
+
|
|
155
|
+
const response = await this.request({
|
|
156
|
+
path: `/users/login/location-confirmation/{confirmationId}/confirm`.replace(`{${"confirmationId"}}`, encodeURIComponent(String(requestParameters['confirmationId']))),
|
|
157
|
+
method: 'POST',
|
|
158
|
+
headers: headerParameters,
|
|
159
|
+
query: queryParameters,
|
|
160
|
+
body: ConfirmLoginLocationInputToJSON(requestParameters['confirmLoginLocationInput']),
|
|
161
|
+
}, initOverrides);
|
|
162
|
+
|
|
163
|
+
return new runtime.VoidApiResponse(response);
|
|
164
|
+
}
|
|
165
|
+
|
|
166
|
+
/**
|
|
167
|
+
* Called by the page the email links to. It only approves the sign-in: no session is returned here.
|
|
168
|
+
* Approve a sign-in from a new location
|
|
169
|
+
*/
|
|
170
|
+
async confirmLoginLocation(requestParameters: UsersPublicApiConfirmLoginLocationRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<void> {
|
|
171
|
+
await this.confirmLoginLocationRaw(requestParameters, initOverrides);
|
|
172
|
+
}
|
|
173
|
+
|
|
75
174
|
/**
|
|
76
175
|
* Creates a password reset request and sends a reset link to the provided email address.
|
|
77
176
|
* Request a password reset email
|
|
@@ -145,7 +244,128 @@ export class UsersPublicApi extends runtime.BaseAPI {
|
|
|
145
244
|
}
|
|
146
245
|
|
|
147
246
|
/**
|
|
148
|
-
*
|
|
247
|
+
* Approves nothing: the page the email links to shows these details and approves only when the user says so, so that mail scanners opening the link approve nothing.
|
|
248
|
+
* See the sign-in an email link asks to approve
|
|
249
|
+
*/
|
|
250
|
+
async getLoginLocationConfirmationDetailsRaw(requestParameters: UsersPublicApiGetLoginLocationConfirmationDetailsRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<UserLoginLocationConfirmationDetailsDto>> {
|
|
251
|
+
if (requestParameters['confirmationId'] == null) {
|
|
252
|
+
throw new runtime.RequiredError(
|
|
253
|
+
'confirmationId',
|
|
254
|
+
'Required parameter "confirmationId" was null or undefined when calling getLoginLocationConfirmationDetails().'
|
|
255
|
+
);
|
|
256
|
+
}
|
|
257
|
+
|
|
258
|
+
if (requestParameters['confirmLoginLocationInput'] == null) {
|
|
259
|
+
throw new runtime.RequiredError(
|
|
260
|
+
'confirmLoginLocationInput',
|
|
261
|
+
'Required parameter "confirmLoginLocationInput" was null or undefined when calling getLoginLocationConfirmationDetails().'
|
|
262
|
+
);
|
|
263
|
+
}
|
|
264
|
+
|
|
265
|
+
const queryParameters: any = {};
|
|
266
|
+
|
|
267
|
+
const headerParameters: runtime.HTTPHeaders = {};
|
|
268
|
+
|
|
269
|
+
headerParameters['Content-Type'] = 'application/json';
|
|
270
|
+
|
|
271
|
+
const response = await this.request({
|
|
272
|
+
path: `/users/login/location-confirmation/{confirmationId}/details`.replace(`{${"confirmationId"}}`, encodeURIComponent(String(requestParameters['confirmationId']))),
|
|
273
|
+
method: 'POST',
|
|
274
|
+
headers: headerParameters,
|
|
275
|
+
query: queryParameters,
|
|
276
|
+
body: ConfirmLoginLocationInputToJSON(requestParameters['confirmLoginLocationInput']),
|
|
277
|
+
}, initOverrides);
|
|
278
|
+
|
|
279
|
+
return new runtime.JSONApiResponse(response, (jsonValue) => UserLoginLocationConfirmationDetailsDtoFromJSON(jsonValue));
|
|
280
|
+
}
|
|
281
|
+
|
|
282
|
+
/**
|
|
283
|
+
* Approves nothing: the page the email links to shows these details and approves only when the user says so, so that mail scanners opening the link approve nothing.
|
|
284
|
+
* See the sign-in an email link asks to approve
|
|
285
|
+
*/
|
|
286
|
+
async getLoginLocationConfirmationDetails(requestParameters: UsersPublicApiGetLoginLocationConfirmationDetailsRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<UserLoginLocationConfirmationDetailsDto> {
|
|
287
|
+
const response = await this.getLoginLocationConfirmationDetailsRaw(requestParameters, initOverrides);
|
|
288
|
+
return await response.value();
|
|
289
|
+
}
|
|
290
|
+
|
|
291
|
+
/**
|
|
292
|
+
* Polled by the browser that started the sign-in. It, and only it, gets the session once the user opens the link in the email.
|
|
293
|
+
* Wait for the email confirming a new location
|
|
294
|
+
*/
|
|
295
|
+
async getLoginLocationConfirmationStatusRaw(requestParameters: UsersPublicApiGetLoginLocationConfirmationStatusRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<LoginDto>> {
|
|
296
|
+
if (requestParameters['loginChallengeInput'] == null) {
|
|
297
|
+
throw new runtime.RequiredError(
|
|
298
|
+
'loginChallengeInput',
|
|
299
|
+
'Required parameter "loginChallengeInput" was null or undefined when calling getLoginLocationConfirmationStatus().'
|
|
300
|
+
);
|
|
301
|
+
}
|
|
302
|
+
|
|
303
|
+
const queryParameters: any = {};
|
|
304
|
+
|
|
305
|
+
const headerParameters: runtime.HTTPHeaders = {};
|
|
306
|
+
|
|
307
|
+
headerParameters['Content-Type'] = 'application/json';
|
|
308
|
+
|
|
309
|
+
const response = await this.request({
|
|
310
|
+
path: `/users/login/location-confirmation/status`,
|
|
311
|
+
method: 'POST',
|
|
312
|
+
headers: headerParameters,
|
|
313
|
+
query: queryParameters,
|
|
314
|
+
body: LoginChallengeInputToJSON(requestParameters['loginChallengeInput']),
|
|
315
|
+
}, initOverrides);
|
|
316
|
+
|
|
317
|
+
return new runtime.JSONApiResponse(response, (jsonValue) => LoginDtoFromJSON(jsonValue));
|
|
318
|
+
}
|
|
319
|
+
|
|
320
|
+
/**
|
|
321
|
+
* Polled by the browser that started the sign-in. It, and only it, gets the session once the user opens the link in the email.
|
|
322
|
+
* Wait for the email confirming a new location
|
|
323
|
+
*/
|
|
324
|
+
async getLoginLocationConfirmationStatus(requestParameters: UsersPublicApiGetLoginLocationConfirmationStatusRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<LoginDto> {
|
|
325
|
+
const response = await this.getLoginLocationConfirmationStatusRaw(requestParameters, initOverrides);
|
|
326
|
+
return await response.value();
|
|
327
|
+
}
|
|
328
|
+
|
|
329
|
+
/**
|
|
330
|
+
* Without a challenge token, any passkey of the site on the device can answer and signs in on its own. With one, the passkey is the second factor of that sign-in.
|
|
331
|
+
* Start signing in with a passkey
|
|
332
|
+
*/
|
|
333
|
+
async getLoginPasskeyOptionsRaw(requestParameters: UsersPublicApiGetLoginPasskeyOptionsRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<PasskeyOptionsDto>> {
|
|
334
|
+
if (requestParameters['loginPasskeyOptionsInput'] == null) {
|
|
335
|
+
throw new runtime.RequiredError(
|
|
336
|
+
'loginPasskeyOptionsInput',
|
|
337
|
+
'Required parameter "loginPasskeyOptionsInput" was null or undefined when calling getLoginPasskeyOptions().'
|
|
338
|
+
);
|
|
339
|
+
}
|
|
340
|
+
|
|
341
|
+
const queryParameters: any = {};
|
|
342
|
+
|
|
343
|
+
const headerParameters: runtime.HTTPHeaders = {};
|
|
344
|
+
|
|
345
|
+
headerParameters['Content-Type'] = 'application/json';
|
|
346
|
+
|
|
347
|
+
const response = await this.request({
|
|
348
|
+
path: `/users/login/passkey/options`,
|
|
349
|
+
method: 'POST',
|
|
350
|
+
headers: headerParameters,
|
|
351
|
+
query: queryParameters,
|
|
352
|
+
body: LoginPasskeyOptionsInputToJSON(requestParameters['loginPasskeyOptionsInput']),
|
|
353
|
+
}, initOverrides);
|
|
354
|
+
|
|
355
|
+
return new runtime.JSONApiResponse(response, (jsonValue) => PasskeyOptionsDtoFromJSON(jsonValue));
|
|
356
|
+
}
|
|
357
|
+
|
|
358
|
+
/**
|
|
359
|
+
* Without a challenge token, any passkey of the site on the device can answer and signs in on its own. With one, the passkey is the second factor of that sign-in.
|
|
360
|
+
* Start signing in with a passkey
|
|
361
|
+
*/
|
|
362
|
+
async getLoginPasskeyOptions(requestParameters: UsersPublicApiGetLoginPasskeyOptionsRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<PasskeyOptionsDto> {
|
|
363
|
+
const response = await this.getLoginPasskeyOptionsRaw(requestParameters, initOverrides);
|
|
364
|
+
return await response.value();
|
|
365
|
+
}
|
|
366
|
+
|
|
367
|
+
/**
|
|
368
|
+
* Validates email and password. Returns the session token, or a challenge token and the next step: a second factor, setting up an authenticator app, or confirming a new location by email.
|
|
149
369
|
* Authenticate a seller user
|
|
150
370
|
*/
|
|
151
371
|
async loginRaw(requestParameters: UsersPublicApiLoginRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<LoginDto>> {
|
|
@@ -174,7 +394,7 @@ export class UsersPublicApi extends runtime.BaseAPI {
|
|
|
174
394
|
}
|
|
175
395
|
|
|
176
396
|
/**
|
|
177
|
-
* Validates email and password
|
|
397
|
+
* Validates email and password. Returns the session token, or a challenge token and the next step: a second factor, setting up an authenticator app, or confirming a new location by email.
|
|
178
398
|
* Authenticate a seller user
|
|
179
399
|
*/
|
|
180
400
|
async login(requestParameters: UsersPublicApiLoginRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<LoginDto> {
|
|
@@ -182,6 +402,156 @@ export class UsersPublicApi extends runtime.BaseAPI {
|
|
|
182
402
|
return await response.value();
|
|
183
403
|
}
|
|
184
404
|
|
|
405
|
+
/**
|
|
406
|
+
* Sign in with a passkey, or prove the second factor with one
|
|
407
|
+
*/
|
|
408
|
+
async loginWithPasskeyRaw(requestParameters: UsersPublicApiLoginWithPasskeyRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<LoginDto>> {
|
|
409
|
+
if (requestParameters['loginPasskeyInput'] == null) {
|
|
410
|
+
throw new runtime.RequiredError(
|
|
411
|
+
'loginPasskeyInput',
|
|
412
|
+
'Required parameter "loginPasskeyInput" was null or undefined when calling loginWithPasskey().'
|
|
413
|
+
);
|
|
414
|
+
}
|
|
415
|
+
|
|
416
|
+
const queryParameters: any = {};
|
|
417
|
+
|
|
418
|
+
const headerParameters: runtime.HTTPHeaders = {};
|
|
419
|
+
|
|
420
|
+
headerParameters['Content-Type'] = 'application/json';
|
|
421
|
+
|
|
422
|
+
const response = await this.request({
|
|
423
|
+
path: `/users/login/passkey`,
|
|
424
|
+
method: 'POST',
|
|
425
|
+
headers: headerParameters,
|
|
426
|
+
query: queryParameters,
|
|
427
|
+
body: LoginPasskeyInputToJSON(requestParameters['loginPasskeyInput']),
|
|
428
|
+
}, initOverrides);
|
|
429
|
+
|
|
430
|
+
return new runtime.JSONApiResponse(response, (jsonValue) => LoginDtoFromJSON(jsonValue));
|
|
431
|
+
}
|
|
432
|
+
|
|
433
|
+
/**
|
|
434
|
+
* Sign in with a passkey, or prove the second factor with one
|
|
435
|
+
*/
|
|
436
|
+
async loginWithPasskey(requestParameters: UsersPublicApiLoginWithPasskeyRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<LoginDto> {
|
|
437
|
+
const response = await this.loginWithPasskeyRaw(requestParameters, initOverrides);
|
|
438
|
+
return await response.value();
|
|
439
|
+
}
|
|
440
|
+
|
|
441
|
+
/**
|
|
442
|
+
* Each recovery code works once.
|
|
443
|
+
* Prove the second factor with a recovery code
|
|
444
|
+
*/
|
|
445
|
+
async loginWithRecoveryCodeRaw(requestParameters: UsersPublicApiLoginWithRecoveryCodeRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<LoginDto>> {
|
|
446
|
+
if (requestParameters['loginCodeInput'] == null) {
|
|
447
|
+
throw new runtime.RequiredError(
|
|
448
|
+
'loginCodeInput',
|
|
449
|
+
'Required parameter "loginCodeInput" was null or undefined when calling loginWithRecoveryCode().'
|
|
450
|
+
);
|
|
451
|
+
}
|
|
452
|
+
|
|
453
|
+
const queryParameters: any = {};
|
|
454
|
+
|
|
455
|
+
const headerParameters: runtime.HTTPHeaders = {};
|
|
456
|
+
|
|
457
|
+
headerParameters['Content-Type'] = 'application/json';
|
|
458
|
+
|
|
459
|
+
const response = await this.request({
|
|
460
|
+
path: `/users/login/recovery-code`,
|
|
461
|
+
method: 'POST',
|
|
462
|
+
headers: headerParameters,
|
|
463
|
+
query: queryParameters,
|
|
464
|
+
body: LoginCodeInputToJSON(requestParameters['loginCodeInput']),
|
|
465
|
+
}, initOverrides);
|
|
466
|
+
|
|
467
|
+
return new runtime.JSONApiResponse(response, (jsonValue) => LoginDtoFromJSON(jsonValue));
|
|
468
|
+
}
|
|
469
|
+
|
|
470
|
+
/**
|
|
471
|
+
* Each recovery code works once.
|
|
472
|
+
* Prove the second factor with a recovery code
|
|
473
|
+
*/
|
|
474
|
+
async loginWithRecoveryCode(requestParameters: UsersPublicApiLoginWithRecoveryCodeRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<LoginDto> {
|
|
475
|
+
const response = await this.loginWithRecoveryCodeRaw(requestParameters, initOverrides);
|
|
476
|
+
return await response.value();
|
|
477
|
+
}
|
|
478
|
+
|
|
479
|
+
/**
|
|
480
|
+
* For users who sign in without a password: the recovery code stands in for the passkey (and the authenticator app is still asked for when the method needs it). Users who sign in with a password enter it first, then the recovery code as their verification step; here they get the same error as for a wrong code.
|
|
481
|
+
* Sign in with a recovery code instead of a lost passkey
|
|
482
|
+
*/
|
|
483
|
+
async loginWithRecoveryCodeInsteadOfPasskeyRaw(requestParameters: UsersPublicApiLoginWithRecoveryCodeInsteadOfPasskeyRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<LoginDto>> {
|
|
484
|
+
if (requestParameters['loginRecoveryCodeInput'] == null) {
|
|
485
|
+
throw new runtime.RequiredError(
|
|
486
|
+
'loginRecoveryCodeInput',
|
|
487
|
+
'Required parameter "loginRecoveryCodeInput" was null or undefined when calling loginWithRecoveryCodeInsteadOfPasskey().'
|
|
488
|
+
);
|
|
489
|
+
}
|
|
490
|
+
|
|
491
|
+
const queryParameters: any = {};
|
|
492
|
+
|
|
493
|
+
const headerParameters: runtime.HTTPHeaders = {};
|
|
494
|
+
|
|
495
|
+
headerParameters['Content-Type'] = 'application/json';
|
|
496
|
+
|
|
497
|
+
const response = await this.request({
|
|
498
|
+
path: `/users/login/recovery-code-instead-of-passkey`,
|
|
499
|
+
method: 'POST',
|
|
500
|
+
headers: headerParameters,
|
|
501
|
+
query: queryParameters,
|
|
502
|
+
body: LoginRecoveryCodeInputToJSON(requestParameters['loginRecoveryCodeInput']),
|
|
503
|
+
}, initOverrides);
|
|
504
|
+
|
|
505
|
+
return new runtime.JSONApiResponse(response, (jsonValue) => LoginDtoFromJSON(jsonValue));
|
|
506
|
+
}
|
|
507
|
+
|
|
508
|
+
/**
|
|
509
|
+
* For users who sign in without a password: the recovery code stands in for the passkey (and the authenticator app is still asked for when the method needs it). Users who sign in with a password enter it first, then the recovery code as their verification step; here they get the same error as for a wrong code.
|
|
510
|
+
* Sign in with a recovery code instead of a lost passkey
|
|
511
|
+
*/
|
|
512
|
+
async loginWithRecoveryCodeInsteadOfPasskey(requestParameters: UsersPublicApiLoginWithRecoveryCodeInsteadOfPasskeyRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<LoginDto> {
|
|
513
|
+
const response = await this.loginWithRecoveryCodeInsteadOfPasskeyRaw(requestParameters, initOverrides);
|
|
514
|
+
return await response.value();
|
|
515
|
+
}
|
|
516
|
+
|
|
517
|
+
/**
|
|
518
|
+
* Accepts the code of the current period, the previous or the next one, never twice.
|
|
519
|
+
* Prove the second factor with an authenticator app code
|
|
520
|
+
*/
|
|
521
|
+
async loginWithTotpRaw(requestParameters: UsersPublicApiLoginWithTotpRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<LoginDto>> {
|
|
522
|
+
if (requestParameters['loginCodeInput'] == null) {
|
|
523
|
+
throw new runtime.RequiredError(
|
|
524
|
+
'loginCodeInput',
|
|
525
|
+
'Required parameter "loginCodeInput" was null or undefined when calling loginWithTotp().'
|
|
526
|
+
);
|
|
527
|
+
}
|
|
528
|
+
|
|
529
|
+
const queryParameters: any = {};
|
|
530
|
+
|
|
531
|
+
const headerParameters: runtime.HTTPHeaders = {};
|
|
532
|
+
|
|
533
|
+
headerParameters['Content-Type'] = 'application/json';
|
|
534
|
+
|
|
535
|
+
const response = await this.request({
|
|
536
|
+
path: `/users/login/totp`,
|
|
537
|
+
method: 'POST',
|
|
538
|
+
headers: headerParameters,
|
|
539
|
+
query: queryParameters,
|
|
540
|
+
body: LoginCodeInputToJSON(requestParameters['loginCodeInput']),
|
|
541
|
+
}, initOverrides);
|
|
542
|
+
|
|
543
|
+
return new runtime.JSONApiResponse(response, (jsonValue) => LoginDtoFromJSON(jsonValue));
|
|
544
|
+
}
|
|
545
|
+
|
|
546
|
+
/**
|
|
547
|
+
* Accepts the code of the current period, the previous or the next one, never twice.
|
|
548
|
+
* Prove the second factor with an authenticator app code
|
|
549
|
+
*/
|
|
550
|
+
async loginWithTotp(requestParameters: UsersPublicApiLoginWithTotpRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<LoginDto> {
|
|
551
|
+
const response = await this.loginWithTotpRaw(requestParameters, initOverrides);
|
|
552
|
+
return await response.value();
|
|
553
|
+
}
|
|
554
|
+
|
|
185
555
|
/**
|
|
186
556
|
* Completes the password reset flow by setting a new password for the user linked to the reset request.
|
|
187
557
|
* Set a new password from reset request
|
|
@@ -0,0 +1,66 @@
|
|
|
1
|
+
/* tslint:disable */
|
|
2
|
+
/* eslint-disable */
|
|
3
|
+
/**
|
|
4
|
+
* Nameshift
|
|
5
|
+
* Nameshift domain marketplace and management API. ## Authentication - **Bearer JWT** — Seller and buyer sessions obtained via login endpoints. - **API key** — Pass the `apikey` header for programmatic seller access. ## Audiences - **(public)** tags — Unauthenticated or buyer-facing endpoints. - **Accounts / Domains / Leads / Buyers** — Seller or buyer resources. - **Partner** — Partner integrations.
|
|
6
|
+
*
|
|
7
|
+
* The version of the OpenAPI document: 1.0
|
|
8
|
+
*
|
|
9
|
+
*
|
|
10
|
+
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
|
|
11
|
+
* https://openapi-generator.tech
|
|
12
|
+
* Do not edit the class manually.
|
|
13
|
+
*/
|
|
14
|
+
|
|
15
|
+
import { mapValues } from '../runtime';
|
|
16
|
+
/**
|
|
17
|
+
*
|
|
18
|
+
* @export
|
|
19
|
+
* @interface ActivateUserTotpInput
|
|
20
|
+
*/
|
|
21
|
+
export interface ActivateUserTotpInput {
|
|
22
|
+
/**
|
|
23
|
+
* Code the authenticator app shows, to prove it was set up.
|
|
24
|
+
* @type {string}
|
|
25
|
+
* @memberof ActivateUserTotpInput
|
|
26
|
+
*/
|
|
27
|
+
code: string;
|
|
28
|
+
}
|
|
29
|
+
|
|
30
|
+
/**
|
|
31
|
+
* Check if a given object implements the ActivateUserTotpInput interface.
|
|
32
|
+
*/
|
|
33
|
+
export function instanceOfActivateUserTotpInput(value: object): value is ActivateUserTotpInput {
|
|
34
|
+
if (!('code' in value) || value['code'] === undefined) return false;
|
|
35
|
+
return true;
|
|
36
|
+
}
|
|
37
|
+
|
|
38
|
+
export function ActivateUserTotpInputFromJSON(json: any): ActivateUserTotpInput {
|
|
39
|
+
return ActivateUserTotpInputFromJSONTyped(json, false);
|
|
40
|
+
}
|
|
41
|
+
|
|
42
|
+
export function ActivateUserTotpInputFromJSONTyped(json: any, ignoreDiscriminator: boolean): ActivateUserTotpInput {
|
|
43
|
+
if (json == null) {
|
|
44
|
+
return json;
|
|
45
|
+
}
|
|
46
|
+
return {
|
|
47
|
+
|
|
48
|
+
'code': json['code'],
|
|
49
|
+
};
|
|
50
|
+
}
|
|
51
|
+
|
|
52
|
+
export function ActivateUserTotpInputToJSON(json: any): ActivateUserTotpInput {
|
|
53
|
+
return ActivateUserTotpInputToJSONTyped(json, false);
|
|
54
|
+
}
|
|
55
|
+
|
|
56
|
+
export function ActivateUserTotpInputToJSONTyped(value?: ActivateUserTotpInput | null, ignoreDiscriminator: boolean = false): any {
|
|
57
|
+
if (value == null) {
|
|
58
|
+
return value;
|
|
59
|
+
}
|
|
60
|
+
|
|
61
|
+
return {
|
|
62
|
+
|
|
63
|
+
'code': value['code'],
|
|
64
|
+
};
|
|
65
|
+
}
|
|
66
|
+
|
|
@@ -0,0 +1,157 @@
|
|
|
1
|
+
/* tslint:disable */
|
|
2
|
+
/* eslint-disable */
|
|
3
|
+
/**
|
|
4
|
+
* Nameshift
|
|
5
|
+
* Nameshift domain marketplace and management API. ## Authentication - **Bearer JWT** — Seller and buyer sessions obtained via login endpoints. - **API key** — Pass the `apikey` header for programmatic seller access. ## Audiences - **(public)** tags — Unauthenticated or buyer-facing endpoints. - **Accounts / Domains / Leads / Buyers** — Seller or buyer resources. - **Partner** — Partner integrations.
|
|
6
|
+
*
|
|
7
|
+
* The version of the OpenAPI document: 1.0
|
|
8
|
+
*
|
|
9
|
+
*
|
|
10
|
+
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
|
|
11
|
+
* https://openapi-generator.tech
|
|
12
|
+
* Do not edit the class manually.
|
|
13
|
+
*/
|
|
14
|
+
|
|
15
|
+
import { mapValues } from '../runtime';
|
|
16
|
+
import type { UserAuthenticationMethod } from './UserAuthenticationMethod';
|
|
17
|
+
import {
|
|
18
|
+
UserAuthenticationMethodFromJSON,
|
|
19
|
+
UserAuthenticationMethodFromJSONTyped,
|
|
20
|
+
UserAuthenticationMethodToJSON,
|
|
21
|
+
UserAuthenticationMethodToJSONTyped,
|
|
22
|
+
} from './UserAuthenticationMethod';
|
|
23
|
+
|
|
24
|
+
/**
|
|
25
|
+
*
|
|
26
|
+
* @export
|
|
27
|
+
* @interface AdminUserSecurityDto
|
|
28
|
+
*/
|
|
29
|
+
export interface AdminUserSecurityDto {
|
|
30
|
+
/**
|
|
31
|
+
* User ID.
|
|
32
|
+
* @type {string}
|
|
33
|
+
* @memberof AdminUserSecurityDto
|
|
34
|
+
*/
|
|
35
|
+
userId: string;
|
|
36
|
+
/**
|
|
37
|
+
* User email.
|
|
38
|
+
* @type {string}
|
|
39
|
+
* @memberof AdminUserSecurityDto
|
|
40
|
+
*/
|
|
41
|
+
email: string;
|
|
42
|
+
/**
|
|
43
|
+
* User full name.
|
|
44
|
+
* @type {string}
|
|
45
|
+
* @memberof AdminUserSecurityDto
|
|
46
|
+
*/
|
|
47
|
+
name: string;
|
|
48
|
+
/**
|
|
49
|
+
* Roles of the user.
|
|
50
|
+
* @type {Array<string>}
|
|
51
|
+
* @memberof AdminUserSecurityDto
|
|
52
|
+
*/
|
|
53
|
+
roles: Array<string>;
|
|
54
|
+
/**
|
|
55
|
+
* Whether the user has a staff role, which requires a second factor or a passkey.
|
|
56
|
+
* @type {boolean}
|
|
57
|
+
* @memberof AdminUserSecurityDto
|
|
58
|
+
*/
|
|
59
|
+
isStaff: boolean;
|
|
60
|
+
/**
|
|
61
|
+
* Method the user signs in with.
|
|
62
|
+
* @type {UserAuthenticationMethod}
|
|
63
|
+
* @memberof AdminUserSecurityDto
|
|
64
|
+
*/
|
|
65
|
+
authenticationMethod: UserAuthenticationMethod;
|
|
66
|
+
/**
|
|
67
|
+
* Whether an authenticator app is set up.
|
|
68
|
+
* @type {boolean}
|
|
69
|
+
* @memberof AdminUserSecurityDto
|
|
70
|
+
*/
|
|
71
|
+
totpEnabled: boolean;
|
|
72
|
+
/**
|
|
73
|
+
* Number of passkeys.
|
|
74
|
+
* @type {number}
|
|
75
|
+
* @memberof AdminUserSecurityDto
|
|
76
|
+
*/
|
|
77
|
+
passkeys: number;
|
|
78
|
+
/**
|
|
79
|
+
* Whether a sign-in from a new network has to be confirmed by email.
|
|
80
|
+
* @type {boolean}
|
|
81
|
+
* @memberof AdminUserSecurityDto
|
|
82
|
+
*/
|
|
83
|
+
loginLocationVerificationEnabled: boolean;
|
|
84
|
+
/**
|
|
85
|
+
* Last successful sign-in.
|
|
86
|
+
* @type {Date}
|
|
87
|
+
* @memberof AdminUserSecurityDto
|
|
88
|
+
*/
|
|
89
|
+
lastLoginAt: Date | null;
|
|
90
|
+
}
|
|
91
|
+
|
|
92
|
+
|
|
93
|
+
|
|
94
|
+
/**
|
|
95
|
+
* Check if a given object implements the AdminUserSecurityDto interface.
|
|
96
|
+
*/
|
|
97
|
+
export function instanceOfAdminUserSecurityDto(value: object): value is AdminUserSecurityDto {
|
|
98
|
+
if (!('userId' in value) || value['userId'] === undefined) return false;
|
|
99
|
+
if (!('email' in value) || value['email'] === undefined) return false;
|
|
100
|
+
if (!('name' in value) || value['name'] === undefined) return false;
|
|
101
|
+
if (!('roles' in value) || value['roles'] === undefined) return false;
|
|
102
|
+
if (!('isStaff' in value) || value['isStaff'] === undefined) return false;
|
|
103
|
+
if (!('authenticationMethod' in value) || value['authenticationMethod'] === undefined) return false;
|
|
104
|
+
if (!('totpEnabled' in value) || value['totpEnabled'] === undefined) return false;
|
|
105
|
+
if (!('passkeys' in value) || value['passkeys'] === undefined) return false;
|
|
106
|
+
if (!('loginLocationVerificationEnabled' in value) || value['loginLocationVerificationEnabled'] === undefined) return false;
|
|
107
|
+
if (!('lastLoginAt' in value) || value['lastLoginAt'] === undefined) return false;
|
|
108
|
+
return true;
|
|
109
|
+
}
|
|
110
|
+
|
|
111
|
+
export function AdminUserSecurityDtoFromJSON(json: any): AdminUserSecurityDto {
|
|
112
|
+
return AdminUserSecurityDtoFromJSONTyped(json, false);
|
|
113
|
+
}
|
|
114
|
+
|
|
115
|
+
export function AdminUserSecurityDtoFromJSONTyped(json: any, ignoreDiscriminator: boolean): AdminUserSecurityDto {
|
|
116
|
+
if (json == null) {
|
|
117
|
+
return json;
|
|
118
|
+
}
|
|
119
|
+
return {
|
|
120
|
+
|
|
121
|
+
'userId': json['userId'],
|
|
122
|
+
'email': json['email'],
|
|
123
|
+
'name': json['name'],
|
|
124
|
+
'roles': json['roles'],
|
|
125
|
+
'isStaff': json['isStaff'],
|
|
126
|
+
'authenticationMethod': UserAuthenticationMethodFromJSON(json['authenticationMethod']),
|
|
127
|
+
'totpEnabled': json['totpEnabled'],
|
|
128
|
+
'passkeys': json['passkeys'],
|
|
129
|
+
'loginLocationVerificationEnabled': json['loginLocationVerificationEnabled'],
|
|
130
|
+
'lastLoginAt': (json['lastLoginAt'] == null ? null : new Date(json['lastLoginAt'])),
|
|
131
|
+
};
|
|
132
|
+
}
|
|
133
|
+
|
|
134
|
+
export function AdminUserSecurityDtoToJSON(json: any): AdminUserSecurityDto {
|
|
135
|
+
return AdminUserSecurityDtoToJSONTyped(json, false);
|
|
136
|
+
}
|
|
137
|
+
|
|
138
|
+
export function AdminUserSecurityDtoToJSONTyped(value?: AdminUserSecurityDto | null, ignoreDiscriminator: boolean = false): any {
|
|
139
|
+
if (value == null) {
|
|
140
|
+
return value;
|
|
141
|
+
}
|
|
142
|
+
|
|
143
|
+
return {
|
|
144
|
+
|
|
145
|
+
'userId': value['userId'],
|
|
146
|
+
'email': value['email'],
|
|
147
|
+
'name': value['name'],
|
|
148
|
+
'roles': value['roles'],
|
|
149
|
+
'isStaff': value['isStaff'],
|
|
150
|
+
'authenticationMethod': UserAuthenticationMethodToJSON(value['authenticationMethod']),
|
|
151
|
+
'totpEnabled': value['totpEnabled'],
|
|
152
|
+
'passkeys': value['passkeys'],
|
|
153
|
+
'loginLocationVerificationEnabled': value['loginLocationVerificationEnabled'],
|
|
154
|
+
'lastLoginAt': (value['lastLoginAt'] == null ? null : (value['lastLoginAt'] as any).toISOString()),
|
|
155
|
+
};
|
|
156
|
+
}
|
|
157
|
+
|