@randock/nameshift-api-client 0.0.504 → 0.0.505
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 +3 -2
- package/README.md +3 -3
- package/dist/apis/UsersApi.d.ts +18 -18
- package/dist/apis/UsersApi.js +69 -70
- package/dist/apis/UsersPublicApi.d.ts +20 -7
- package/dist/apis/UsersPublicApi.js +54 -6
- package/dist/models/AdminUserSecurityDto.d.ts +4 -4
- package/dist/models/AdminUserSecurityDto.js +3 -4
- package/dist/models/ChangeUserSignInStepsInput.d.ts +33 -0
- package/dist/models/ChangeUserSignInStepsInput.js +51 -0
- package/dist/models/LoginPasswordInput.d.ts +38 -0
- package/dist/models/LoginPasswordInput.js +55 -0
- package/dist/models/SecondFactorMethod.d.ts +1 -0
- package/dist/models/SecondFactorMethod.js +1 -0
- package/dist/models/UserLoginAttemptResult.d.ts +1 -0
- package/dist/models/UserLoginAttemptResult.js +1 -0
- package/dist/models/UserSecurityDto.d.ts +11 -11
- package/dist/models/UserSecurityDto.js +10 -10
- package/dist/models/UserSignInFactor.d.ts +26 -0
- package/dist/models/UserSignInFactor.js +52 -0
- package/dist/models/index.d.ts +3 -2
- package/dist/models/index.js +3 -2
- package/package.json +1 -1
- package/src/apis/UsersApi.ts +73 -74
- package/src/apis/UsersPublicApi.ts +51 -6
- package/src/models/AdminUserSecurityDto.ts +12 -14
- package/src/models/ChangeUserSignInStepsInput.ts +74 -0
- package/src/models/LoginPasswordInput.ts +75 -0
- package/src/models/SecondFactorMethod.ts +1 -0
- package/src/models/UserLoginAttemptResult.ts +1 -0
- package/src/models/UserSecurityDto.ts +25 -27
- package/src/models/UserSignInFactor.ts +54 -0
- package/src/models/index.ts +3 -2
- package/dist/models/ChangeUserAuthenticationMethodInput.d.ts +0 -33
- package/dist/models/ChangeUserAuthenticationMethodInput.js +0 -52
- package/dist/models/UserAuthenticationMethod.d.ts +0 -27
- package/dist/models/UserAuthenticationMethod.js +0 -53
- package/src/models/ChangeUserAuthenticationMethodInput.ts +0 -76
- package/src/models/UserAuthenticationMethod.ts +0 -55
package/src/apis/UsersApi.ts
CHANGED
|
@@ -16,10 +16,10 @@
|
|
|
16
16
|
import * as runtime from '../runtime';
|
|
17
17
|
import type {
|
|
18
18
|
ActivateUserTotpInput,
|
|
19
|
-
ChangeUserAuthenticationMethodInput,
|
|
20
19
|
ChangeUserEmailWithOtpInput,
|
|
21
20
|
ChangeUserLoginLocationVerificationInput,
|
|
22
21
|
ChangeUserPasswordInput,
|
|
22
|
+
ChangeUserSignInStepsInput,
|
|
23
23
|
CurrentPasswordInput,
|
|
24
24
|
ListUserLoginAttempts200Response,
|
|
25
25
|
PasskeyOptionsDto,
|
|
@@ -42,14 +42,14 @@ import type {
|
|
|
42
42
|
import {
|
|
43
43
|
ActivateUserTotpInputFromJSON,
|
|
44
44
|
ActivateUserTotpInputToJSON,
|
|
45
|
-
ChangeUserAuthenticationMethodInputFromJSON,
|
|
46
|
-
ChangeUserAuthenticationMethodInputToJSON,
|
|
47
45
|
ChangeUserEmailWithOtpInputFromJSON,
|
|
48
46
|
ChangeUserEmailWithOtpInputToJSON,
|
|
49
47
|
ChangeUserLoginLocationVerificationInputFromJSON,
|
|
50
48
|
ChangeUserLoginLocationVerificationInputToJSON,
|
|
51
49
|
ChangeUserPasswordInputFromJSON,
|
|
52
50
|
ChangeUserPasswordInputToJSON,
|
|
51
|
+
ChangeUserSignInStepsInputFromJSON,
|
|
52
|
+
ChangeUserSignInStepsInputToJSON,
|
|
53
53
|
CurrentPasswordInputFromJSON,
|
|
54
54
|
CurrentPasswordInputToJSON,
|
|
55
55
|
ListUserLoginAttempts200ResponseFromJSON,
|
|
@@ -96,11 +96,6 @@ export interface UsersApiActivateUserTotpReplacementRequest {
|
|
|
96
96
|
activateUserTotpInput: ActivateUserTotpInput;
|
|
97
97
|
}
|
|
98
98
|
|
|
99
|
-
export interface UsersApiChangeUserAuthenticationMethodRequest {
|
|
100
|
-
xReauthenticationToken: string;
|
|
101
|
-
changeUserAuthenticationMethodInput: ChangeUserAuthenticationMethodInput;
|
|
102
|
-
}
|
|
103
|
-
|
|
104
99
|
export interface UsersApiChangeUserEmailWithOtpRequest {
|
|
105
100
|
changeUserEmailWithOtpInput: ChangeUserEmailWithOtpInput;
|
|
106
101
|
}
|
|
@@ -114,6 +109,11 @@ export interface UsersApiChangeUserPasswordRequest {
|
|
|
114
109
|
changeUserPasswordInput: ChangeUserPasswordInput;
|
|
115
110
|
}
|
|
116
111
|
|
|
112
|
+
export interface UsersApiChangeUserSignInStepsRequest {
|
|
113
|
+
xReauthenticationToken: string;
|
|
114
|
+
changeUserSignInStepsInput: ChangeUserSignInStepsInput;
|
|
115
|
+
}
|
|
116
|
+
|
|
117
117
|
export interface UsersApiDisableUserRecoveryCodesRequest {
|
|
118
118
|
xReauthenticationToken: string;
|
|
119
119
|
}
|
|
@@ -195,7 +195,7 @@ export interface UsersApiStartUserTotpEnrolmentRequest {
|
|
|
195
195
|
}
|
|
196
196
|
|
|
197
197
|
export interface UsersApiStartUserTotpReplacementRequest {
|
|
198
|
-
|
|
198
|
+
totpCodeInput: TotpCodeInput;
|
|
199
199
|
}
|
|
200
200
|
|
|
201
201
|
export interface UsersApiUpdateUserNotificationSettingsRequest {
|
|
@@ -295,63 +295,6 @@ export class UsersApi extends runtime.BaseAPI {
|
|
|
295
295
|
await this.activateUserTotpReplacementRaw(requestParameters, initOverrides);
|
|
296
296
|
}
|
|
297
297
|
|
|
298
|
-
/**
|
|
299
|
-
* Only to a method the factors set up allow (see allowedAuthenticationMethods). Needs the reauthentication token: a stronger method can also lock the user out of a sign-in they rely on.
|
|
300
|
-
* Change the method the user signs in with
|
|
301
|
-
*/
|
|
302
|
-
async changeUserAuthenticationMethodRaw(requestParameters: UsersApiChangeUserAuthenticationMethodRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<UserSecurityDto>> {
|
|
303
|
-
if (requestParameters['xReauthenticationToken'] == null) {
|
|
304
|
-
throw new runtime.RequiredError(
|
|
305
|
-
'xReauthenticationToken',
|
|
306
|
-
'Required parameter "xReauthenticationToken" was null or undefined when calling changeUserAuthenticationMethod().'
|
|
307
|
-
);
|
|
308
|
-
}
|
|
309
|
-
|
|
310
|
-
if (requestParameters['changeUserAuthenticationMethodInput'] == null) {
|
|
311
|
-
throw new runtime.RequiredError(
|
|
312
|
-
'changeUserAuthenticationMethodInput',
|
|
313
|
-
'Required parameter "changeUserAuthenticationMethodInput" was null or undefined when calling changeUserAuthenticationMethod().'
|
|
314
|
-
);
|
|
315
|
-
}
|
|
316
|
-
|
|
317
|
-
const queryParameters: any = {};
|
|
318
|
-
|
|
319
|
-
const headerParameters: runtime.HTTPHeaders = {};
|
|
320
|
-
|
|
321
|
-
headerParameters['Content-Type'] = 'application/json';
|
|
322
|
-
|
|
323
|
-
if (requestParameters['xReauthenticationToken'] != null) {
|
|
324
|
-
headerParameters['x-reauthentication-token'] = String(requestParameters['xReauthenticationToken']);
|
|
325
|
-
}
|
|
326
|
-
|
|
327
|
-
if (this.configuration && this.configuration.accessToken) {
|
|
328
|
-
const token = this.configuration.accessToken;
|
|
329
|
-
const tokenString = await token("bearer", []);
|
|
330
|
-
|
|
331
|
-
if (tokenString) {
|
|
332
|
-
headerParameters["Authorization"] = `Bearer ${tokenString}`;
|
|
333
|
-
}
|
|
334
|
-
}
|
|
335
|
-
const response = await this.request({
|
|
336
|
-
path: `/private/users/security/authentication-method`,
|
|
337
|
-
method: 'PATCH',
|
|
338
|
-
headers: headerParameters,
|
|
339
|
-
query: queryParameters,
|
|
340
|
-
body: ChangeUserAuthenticationMethodInputToJSON(requestParameters['changeUserAuthenticationMethodInput']),
|
|
341
|
-
}, initOverrides);
|
|
342
|
-
|
|
343
|
-
return new runtime.JSONApiResponse(response, (jsonValue) => UserSecurityDtoFromJSON(jsonValue));
|
|
344
|
-
}
|
|
345
|
-
|
|
346
|
-
/**
|
|
347
|
-
* Only to a method the factors set up allow (see allowedAuthenticationMethods). Needs the reauthentication token: a stronger method can also lock the user out of a sign-in they rely on.
|
|
348
|
-
* Change the method the user signs in with
|
|
349
|
-
*/
|
|
350
|
-
async changeUserAuthenticationMethod(requestParameters: UsersApiChangeUserAuthenticationMethodRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<UserSecurityDto> {
|
|
351
|
-
const response = await this.changeUserAuthenticationMethodRaw(requestParameters, initOverrides);
|
|
352
|
-
return await response.value();
|
|
353
|
-
}
|
|
354
|
-
|
|
355
298
|
/**
|
|
356
299
|
* Changes the seller user email after validating the OTP sent to the new address. **API key scope required:** `USER_EMAIL_WRITE`. Requests authenticated with a seller session do not need any scope.
|
|
357
300
|
* Change user email with OTP
|
|
@@ -496,6 +439,63 @@ export class UsersApi extends runtime.BaseAPI {
|
|
|
496
439
|
await this.changeUserPasswordRaw(requestParameters, initOverrides);
|
|
497
440
|
}
|
|
498
441
|
|
|
442
|
+
/**
|
|
443
|
+
* Only factors the user set up (see setUpSignInFactors), at least minSignInSteps steps, no authenticator app in the first step and no factor in two steps; otherwise a SIGN_IN_STEPS_* error. Needs the reauthentication token: other steps can also lock the user out of a sign-in they rely on.
|
|
444
|
+
* Change the steps the user signs in with
|
|
445
|
+
*/
|
|
446
|
+
async changeUserSignInStepsRaw(requestParameters: UsersApiChangeUserSignInStepsRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<UserSecurityDto>> {
|
|
447
|
+
if (requestParameters['xReauthenticationToken'] == null) {
|
|
448
|
+
throw new runtime.RequiredError(
|
|
449
|
+
'xReauthenticationToken',
|
|
450
|
+
'Required parameter "xReauthenticationToken" was null or undefined when calling changeUserSignInSteps().'
|
|
451
|
+
);
|
|
452
|
+
}
|
|
453
|
+
|
|
454
|
+
if (requestParameters['changeUserSignInStepsInput'] == null) {
|
|
455
|
+
throw new runtime.RequiredError(
|
|
456
|
+
'changeUserSignInStepsInput',
|
|
457
|
+
'Required parameter "changeUserSignInStepsInput" was null or undefined when calling changeUserSignInSteps().'
|
|
458
|
+
);
|
|
459
|
+
}
|
|
460
|
+
|
|
461
|
+
const queryParameters: any = {};
|
|
462
|
+
|
|
463
|
+
const headerParameters: runtime.HTTPHeaders = {};
|
|
464
|
+
|
|
465
|
+
headerParameters['Content-Type'] = 'application/json';
|
|
466
|
+
|
|
467
|
+
if (requestParameters['xReauthenticationToken'] != null) {
|
|
468
|
+
headerParameters['x-reauthentication-token'] = String(requestParameters['xReauthenticationToken']);
|
|
469
|
+
}
|
|
470
|
+
|
|
471
|
+
if (this.configuration && this.configuration.accessToken) {
|
|
472
|
+
const token = this.configuration.accessToken;
|
|
473
|
+
const tokenString = await token("bearer", []);
|
|
474
|
+
|
|
475
|
+
if (tokenString) {
|
|
476
|
+
headerParameters["Authorization"] = `Bearer ${tokenString}`;
|
|
477
|
+
}
|
|
478
|
+
}
|
|
479
|
+
const response = await this.request({
|
|
480
|
+
path: `/private/users/security/sign-in-steps`,
|
|
481
|
+
method: 'PATCH',
|
|
482
|
+
headers: headerParameters,
|
|
483
|
+
query: queryParameters,
|
|
484
|
+
body: ChangeUserSignInStepsInputToJSON(requestParameters['changeUserSignInStepsInput']),
|
|
485
|
+
}, initOverrides);
|
|
486
|
+
|
|
487
|
+
return new runtime.JSONApiResponse(response, (jsonValue) => UserSecurityDtoFromJSON(jsonValue));
|
|
488
|
+
}
|
|
489
|
+
|
|
490
|
+
/**
|
|
491
|
+
* Only factors the user set up (see setUpSignInFactors), at least minSignInSteps steps, no authenticator app in the first step and no factor in two steps; otherwise a SIGN_IN_STEPS_* error. Needs the reauthentication token: other steps can also lock the user out of a sign-in they rely on.
|
|
492
|
+
* Change the steps the user signs in with
|
|
493
|
+
*/
|
|
494
|
+
async changeUserSignInSteps(requestParameters: UsersApiChangeUserSignInStepsRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<UserSecurityDto> {
|
|
495
|
+
const response = await this.changeUserSignInStepsRaw(requestParameters, initOverrides);
|
|
496
|
+
return await response.value();
|
|
497
|
+
}
|
|
498
|
+
|
|
499
499
|
/**
|
|
500
500
|
* The current codes stop working.
|
|
501
501
|
* Turn recovery codes off
|
|
@@ -1468,14 +1468,14 @@ export class UsersApi extends runtime.BaseAPI {
|
|
|
1468
1468
|
}
|
|
1469
1469
|
|
|
1470
1470
|
/**
|
|
1471
|
-
* Returns the QR code URI and the secret of the new app. The current app keeps working until a code of the new one is checked.
|
|
1471
|
+
* Needs a code of the app being replaced; wrong codes count towards locking the verification step. Returns the QR code URI and the secret of the new app. The current app keeps working until a code of the new one is checked.
|
|
1472
1472
|
* Start moving to another authenticator app
|
|
1473
1473
|
*/
|
|
1474
1474
|
async startUserTotpReplacementRaw(requestParameters: UsersApiStartUserTotpReplacementRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<TotpEnrolmentDto>> {
|
|
1475
|
-
if (requestParameters['
|
|
1475
|
+
if (requestParameters['totpCodeInput'] == null) {
|
|
1476
1476
|
throw new runtime.RequiredError(
|
|
1477
|
-
'
|
|
1478
|
-
'Required parameter "
|
|
1477
|
+
'totpCodeInput',
|
|
1478
|
+
'Required parameter "totpCodeInput" was null or undefined when calling startUserTotpReplacement().'
|
|
1479
1479
|
);
|
|
1480
1480
|
}
|
|
1481
1481
|
|
|
@@ -1483,9 +1483,7 @@ export class UsersApi extends runtime.BaseAPI {
|
|
|
1483
1483
|
|
|
1484
1484
|
const headerParameters: runtime.HTTPHeaders = {};
|
|
1485
1485
|
|
|
1486
|
-
|
|
1487
|
-
headerParameters['x-reauthentication-token'] = String(requestParameters['xReauthenticationToken']);
|
|
1488
|
-
}
|
|
1486
|
+
headerParameters['Content-Type'] = 'application/json';
|
|
1489
1487
|
|
|
1490
1488
|
if (this.configuration && this.configuration.accessToken) {
|
|
1491
1489
|
const token = this.configuration.accessToken;
|
|
@@ -1500,13 +1498,14 @@ export class UsersApi extends runtime.BaseAPI {
|
|
|
1500
1498
|
method: 'POST',
|
|
1501
1499
|
headers: headerParameters,
|
|
1502
1500
|
query: queryParameters,
|
|
1501
|
+
body: TotpCodeInputToJSON(requestParameters['totpCodeInput']),
|
|
1503
1502
|
}, initOverrides);
|
|
1504
1503
|
|
|
1505
1504
|
return new runtime.JSONApiResponse(response, (jsonValue) => TotpEnrolmentDtoFromJSON(jsonValue));
|
|
1506
1505
|
}
|
|
1507
1506
|
|
|
1508
1507
|
/**
|
|
1509
|
-
* Returns the QR code URI and the secret of the new app. The current app keeps working until a code of the new one is checked.
|
|
1508
|
+
* Needs a code of the app being replaced; wrong codes count towards locking the verification step. Returns the QR code URI and the secret of the new app. The current app keeps working until a code of the new one is checked.
|
|
1510
1509
|
* Start moving to another authenticator app
|
|
1511
1510
|
*/
|
|
1512
1511
|
async startUserTotpReplacement(requestParameters: UsersApiStartUserTotpReplacementRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<TotpEnrolmentDto> {
|
|
@@ -23,6 +23,7 @@ import type {
|
|
|
23
23
|
LoginInput,
|
|
24
24
|
LoginPasskeyInput,
|
|
25
25
|
LoginPasskeyOptionsInput,
|
|
26
|
+
LoginPasswordInput,
|
|
26
27
|
LoginRecoveryCodeInput,
|
|
27
28
|
NotificationsUnsubscribeResultDto,
|
|
28
29
|
PasskeyOptionsDto,
|
|
@@ -49,6 +50,8 @@ import {
|
|
|
49
50
|
LoginPasskeyInputToJSON,
|
|
50
51
|
LoginPasskeyOptionsInputFromJSON,
|
|
51
52
|
LoginPasskeyOptionsInputToJSON,
|
|
53
|
+
LoginPasswordInputFromJSON,
|
|
54
|
+
LoginPasswordInputToJSON,
|
|
52
55
|
LoginRecoveryCodeInputFromJSON,
|
|
53
56
|
LoginRecoveryCodeInputToJSON,
|
|
54
57
|
NotificationsUnsubscribeResultDtoFromJSON,
|
|
@@ -101,6 +104,10 @@ export interface UsersPublicApiLoginWithPasskeyRequest {
|
|
|
101
104
|
loginPasskeyInput: LoginPasskeyInput;
|
|
102
105
|
}
|
|
103
106
|
|
|
107
|
+
export interface UsersPublicApiLoginWithPasswordStepRequest {
|
|
108
|
+
loginPasswordInput: LoginPasswordInput;
|
|
109
|
+
}
|
|
110
|
+
|
|
104
111
|
export interface UsersPublicApiLoginWithRecoveryCodeRequest {
|
|
105
112
|
loginCodeInput: LoginCodeInput;
|
|
106
113
|
}
|
|
@@ -327,7 +334,7 @@ export class UsersPublicApi extends runtime.BaseAPI {
|
|
|
327
334
|
}
|
|
328
335
|
|
|
329
336
|
/**
|
|
330
|
-
* Without a challenge token, any passkey of the site on the device can answer
|
|
337
|
+
* Without a challenge token, any passkey of the site on the device can answer, for users whose first sign-in step accepts a passkey. With one, the passkey proves the next step of that sign-in.
|
|
331
338
|
* Start signing in with a passkey
|
|
332
339
|
*/
|
|
333
340
|
async getLoginPasskeyOptionsRaw(requestParameters: UsersPublicApiGetLoginPasskeyOptionsRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<PasskeyOptionsDto>> {
|
|
@@ -356,7 +363,7 @@ export class UsersPublicApi extends runtime.BaseAPI {
|
|
|
356
363
|
}
|
|
357
364
|
|
|
358
365
|
/**
|
|
359
|
-
* Without a challenge token, any passkey of the site on the device can answer
|
|
366
|
+
* Without a challenge token, any passkey of the site on the device can answer, for users whose first sign-in step accepts a passkey. With one, the passkey proves the next step of that sign-in.
|
|
360
367
|
* Start signing in with a passkey
|
|
361
368
|
*/
|
|
362
369
|
async getLoginPasskeyOptions(requestParameters: UsersPublicApiGetLoginPasskeyOptionsRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<PasskeyOptionsDto> {
|
|
@@ -403,7 +410,7 @@ export class UsersPublicApi extends runtime.BaseAPI {
|
|
|
403
410
|
}
|
|
404
411
|
|
|
405
412
|
/**
|
|
406
|
-
* Sign in with a passkey, or prove
|
|
413
|
+
* Sign in with a passkey, or prove a later step with one
|
|
407
414
|
*/
|
|
408
415
|
async loginWithPasskeyRaw(requestParameters: UsersPublicApiLoginWithPasskeyRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<LoginDto>> {
|
|
409
416
|
if (requestParameters['loginPasskeyInput'] == null) {
|
|
@@ -431,13 +438,51 @@ export class UsersPublicApi extends runtime.BaseAPI {
|
|
|
431
438
|
}
|
|
432
439
|
|
|
433
440
|
/**
|
|
434
|
-
* Sign in with a passkey, or prove
|
|
441
|
+
* Sign in with a passkey, or prove a later step with one
|
|
435
442
|
*/
|
|
436
443
|
async loginWithPasskey(requestParameters: UsersPublicApiLoginWithPasskeyRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<LoginDto> {
|
|
437
444
|
const response = await this.loginWithPasskeyRaw(requestParameters, initOverrides);
|
|
438
445
|
return await response.value();
|
|
439
446
|
}
|
|
440
447
|
|
|
448
|
+
/**
|
|
449
|
+
* For users who enter the password after another step, e.g. a passkey first. Wrong passwords count towards the lock of the later steps.
|
|
450
|
+
* Prove a later sign-in step with the password
|
|
451
|
+
*/
|
|
452
|
+
async loginWithPasswordStepRaw(requestParameters: UsersPublicApiLoginWithPasswordStepRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<LoginDto>> {
|
|
453
|
+
if (requestParameters['loginPasswordInput'] == null) {
|
|
454
|
+
throw new runtime.RequiredError(
|
|
455
|
+
'loginPasswordInput',
|
|
456
|
+
'Required parameter "loginPasswordInput" was null or undefined when calling loginWithPasswordStep().'
|
|
457
|
+
);
|
|
458
|
+
}
|
|
459
|
+
|
|
460
|
+
const queryParameters: any = {};
|
|
461
|
+
|
|
462
|
+
const headerParameters: runtime.HTTPHeaders = {};
|
|
463
|
+
|
|
464
|
+
headerParameters['Content-Type'] = 'application/json';
|
|
465
|
+
|
|
466
|
+
const response = await this.request({
|
|
467
|
+
path: `/users/login/password`,
|
|
468
|
+
method: 'POST',
|
|
469
|
+
headers: headerParameters,
|
|
470
|
+
query: queryParameters,
|
|
471
|
+
body: LoginPasswordInputToJSON(requestParameters['loginPasswordInput']),
|
|
472
|
+
}, initOverrides);
|
|
473
|
+
|
|
474
|
+
return new runtime.JSONApiResponse(response, (jsonValue) => LoginDtoFromJSON(jsonValue));
|
|
475
|
+
}
|
|
476
|
+
|
|
477
|
+
/**
|
|
478
|
+
* For users who enter the password after another step, e.g. a passkey first. Wrong passwords count towards the lock of the later steps.
|
|
479
|
+
* Prove a later sign-in step with the password
|
|
480
|
+
*/
|
|
481
|
+
async loginWithPasswordStep(requestParameters: UsersPublicApiLoginWithPasswordStepRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<LoginDto> {
|
|
482
|
+
const response = await this.loginWithPasswordStepRaw(requestParameters, initOverrides);
|
|
483
|
+
return await response.value();
|
|
484
|
+
}
|
|
485
|
+
|
|
441
486
|
/**
|
|
442
487
|
* Each recovery code works once.
|
|
443
488
|
* Prove the second factor with a recovery code
|
|
@@ -477,7 +522,7 @@ export class UsersPublicApi extends runtime.BaseAPI {
|
|
|
477
522
|
}
|
|
478
523
|
|
|
479
524
|
/**
|
|
480
|
-
* For users
|
|
525
|
+
* For users whose first sign-in step is a passkey alone: the recovery code stands in for it, and the next steps are still asked for. Users who can start with the password enter it first, then the recovery code in a later step; here they get the same error as for a wrong code.
|
|
481
526
|
* Sign in with a recovery code instead of a lost passkey
|
|
482
527
|
*/
|
|
483
528
|
async loginWithRecoveryCodeInsteadOfPasskeyRaw(requestParameters: UsersPublicApiLoginWithRecoveryCodeInsteadOfPasskeyRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<LoginDto>> {
|
|
@@ -506,7 +551,7 @@ export class UsersPublicApi extends runtime.BaseAPI {
|
|
|
506
551
|
}
|
|
507
552
|
|
|
508
553
|
/**
|
|
509
|
-
* For users
|
|
554
|
+
* For users whose first sign-in step is a passkey alone: the recovery code stands in for it, and the next steps are still asked for. Users who can start with the password enter it first, then the recovery code in a later step; here they get the same error as for a wrong code.
|
|
510
555
|
* Sign in with a recovery code instead of a lost passkey
|
|
511
556
|
*/
|
|
512
557
|
async loginWithRecoveryCodeInsteadOfPasskey(requestParameters: UsersPublicApiLoginWithRecoveryCodeInsteadOfPasskeyRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<LoginDto> {
|
|
@@ -13,13 +13,13 @@
|
|
|
13
13
|
*/
|
|
14
14
|
|
|
15
15
|
import { mapValues } from '../runtime';
|
|
16
|
-
import type {
|
|
16
|
+
import type { UserSignInFactor } from './UserSignInFactor';
|
|
17
17
|
import {
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
} from './
|
|
18
|
+
UserSignInFactorFromJSON,
|
|
19
|
+
UserSignInFactorFromJSONTyped,
|
|
20
|
+
UserSignInFactorToJSON,
|
|
21
|
+
UserSignInFactorToJSONTyped,
|
|
22
|
+
} from './UserSignInFactor';
|
|
23
23
|
|
|
24
24
|
/**
|
|
25
25
|
*
|
|
@@ -58,11 +58,11 @@ export interface AdminUserSecurityDto {
|
|
|
58
58
|
*/
|
|
59
59
|
isStaff: boolean;
|
|
60
60
|
/**
|
|
61
|
-
*
|
|
62
|
-
* @type {
|
|
61
|
+
* Steps the user signs in with, in order; each step lists the factors to choose from.
|
|
62
|
+
* @type {Array<Array<UserSignInFactor>>}
|
|
63
63
|
* @memberof AdminUserSecurityDto
|
|
64
64
|
*/
|
|
65
|
-
|
|
65
|
+
signInSteps: Array<Array<UserSignInFactor>>;
|
|
66
66
|
/**
|
|
67
67
|
* Whether an authenticator app is set up.
|
|
68
68
|
* @type {boolean}
|
|
@@ -89,8 +89,6 @@ export interface AdminUserSecurityDto {
|
|
|
89
89
|
lastLoginAt: Date | null;
|
|
90
90
|
}
|
|
91
91
|
|
|
92
|
-
|
|
93
|
-
|
|
94
92
|
/**
|
|
95
93
|
* Check if a given object implements the AdminUserSecurityDto interface.
|
|
96
94
|
*/
|
|
@@ -100,7 +98,7 @@ export function instanceOfAdminUserSecurityDto(value: object): value is AdminUse
|
|
|
100
98
|
if (!('name' in value) || value['name'] === undefined) return false;
|
|
101
99
|
if (!('roles' in value) || value['roles'] === undefined) return false;
|
|
102
100
|
if (!('isStaff' in value) || value['isStaff'] === undefined) return false;
|
|
103
|
-
if (!('
|
|
101
|
+
if (!('signInSteps' in value) || value['signInSteps'] === undefined) return false;
|
|
104
102
|
if (!('totpEnabled' in value) || value['totpEnabled'] === undefined) return false;
|
|
105
103
|
if (!('passkeys' in value) || value['passkeys'] === undefined) return false;
|
|
106
104
|
if (!('loginLocationVerificationEnabled' in value) || value['loginLocationVerificationEnabled'] === undefined) return false;
|
|
@@ -123,7 +121,7 @@ export function AdminUserSecurityDtoFromJSONTyped(json: any, ignoreDiscriminator
|
|
|
123
121
|
'name': json['name'],
|
|
124
122
|
'roles': json['roles'],
|
|
125
123
|
'isStaff': json['isStaff'],
|
|
126
|
-
'
|
|
124
|
+
'signInSteps': json['signInSteps'],
|
|
127
125
|
'totpEnabled': json['totpEnabled'],
|
|
128
126
|
'passkeys': json['passkeys'],
|
|
129
127
|
'loginLocationVerificationEnabled': json['loginLocationVerificationEnabled'],
|
|
@@ -147,7 +145,7 @@ export function AdminUserSecurityDtoToJSONTyped(value?: AdminUserSecurityDto | n
|
|
|
147
145
|
'name': value['name'],
|
|
148
146
|
'roles': value['roles'],
|
|
149
147
|
'isStaff': value['isStaff'],
|
|
150
|
-
'
|
|
148
|
+
'signInSteps': value['signInSteps'],
|
|
151
149
|
'totpEnabled': value['totpEnabled'],
|
|
152
150
|
'passkeys': value['passkeys'],
|
|
153
151
|
'loginLocationVerificationEnabled': value['loginLocationVerificationEnabled'],
|
|
@@ -0,0 +1,74 @@
|
|
|
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 { UserSignInFactor } from './UserSignInFactor';
|
|
17
|
+
import {
|
|
18
|
+
UserSignInFactorFromJSON,
|
|
19
|
+
UserSignInFactorFromJSONTyped,
|
|
20
|
+
UserSignInFactorToJSON,
|
|
21
|
+
UserSignInFactorToJSONTyped,
|
|
22
|
+
} from './UserSignInFactor';
|
|
23
|
+
|
|
24
|
+
/**
|
|
25
|
+
*
|
|
26
|
+
* @export
|
|
27
|
+
* @interface ChangeUserSignInStepsInput
|
|
28
|
+
*/
|
|
29
|
+
export interface ChangeUserSignInStepsInput {
|
|
30
|
+
/**
|
|
31
|
+
* Steps to sign in with from now on, in order. Each step lists the factors the user can choose from; the authenticator app cannot be the first step, and no factor can be in two steps.
|
|
32
|
+
* @type {Array<Array<UserSignInFactor>>}
|
|
33
|
+
* @memberof ChangeUserSignInStepsInput
|
|
34
|
+
*/
|
|
35
|
+
steps: Array<Array<UserSignInFactor>>;
|
|
36
|
+
}
|
|
37
|
+
|
|
38
|
+
/**
|
|
39
|
+
* Check if a given object implements the ChangeUserSignInStepsInput interface.
|
|
40
|
+
*/
|
|
41
|
+
export function instanceOfChangeUserSignInStepsInput(value: object): value is ChangeUserSignInStepsInput {
|
|
42
|
+
if (!('steps' in value) || value['steps'] === undefined) return false;
|
|
43
|
+
return true;
|
|
44
|
+
}
|
|
45
|
+
|
|
46
|
+
export function ChangeUserSignInStepsInputFromJSON(json: any): ChangeUserSignInStepsInput {
|
|
47
|
+
return ChangeUserSignInStepsInputFromJSONTyped(json, false);
|
|
48
|
+
}
|
|
49
|
+
|
|
50
|
+
export function ChangeUserSignInStepsInputFromJSONTyped(json: any, ignoreDiscriminator: boolean): ChangeUserSignInStepsInput {
|
|
51
|
+
if (json == null) {
|
|
52
|
+
return json;
|
|
53
|
+
}
|
|
54
|
+
return {
|
|
55
|
+
|
|
56
|
+
'steps': json['steps'],
|
|
57
|
+
};
|
|
58
|
+
}
|
|
59
|
+
|
|
60
|
+
export function ChangeUserSignInStepsInputToJSON(json: any): ChangeUserSignInStepsInput {
|
|
61
|
+
return ChangeUserSignInStepsInputToJSONTyped(json, false);
|
|
62
|
+
}
|
|
63
|
+
|
|
64
|
+
export function ChangeUserSignInStepsInputToJSONTyped(value?: ChangeUserSignInStepsInput | null, ignoreDiscriminator: boolean = false): any {
|
|
65
|
+
if (value == null) {
|
|
66
|
+
return value;
|
|
67
|
+
}
|
|
68
|
+
|
|
69
|
+
return {
|
|
70
|
+
|
|
71
|
+
'steps': value['steps'],
|
|
72
|
+
};
|
|
73
|
+
}
|
|
74
|
+
|
|
@@ -0,0 +1,75 @@
|
|
|
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 LoginPasswordInput
|
|
20
|
+
*/
|
|
21
|
+
export interface LoginPasswordInput {
|
|
22
|
+
/**
|
|
23
|
+
* Challenge token returned by the previous sign-in step.
|
|
24
|
+
* @type {string}
|
|
25
|
+
* @memberof LoginPasswordInput
|
|
26
|
+
*/
|
|
27
|
+
challengeToken: string;
|
|
28
|
+
/**
|
|
29
|
+
*
|
|
30
|
+
* @type {string}
|
|
31
|
+
* @memberof LoginPasswordInput
|
|
32
|
+
*/
|
|
33
|
+
password: string;
|
|
34
|
+
}
|
|
35
|
+
|
|
36
|
+
/**
|
|
37
|
+
* Check if a given object implements the LoginPasswordInput interface.
|
|
38
|
+
*/
|
|
39
|
+
export function instanceOfLoginPasswordInput(value: object): value is LoginPasswordInput {
|
|
40
|
+
if (!('challengeToken' in value) || value['challengeToken'] === undefined) return false;
|
|
41
|
+
if (!('password' in value) || value['password'] === undefined) return false;
|
|
42
|
+
return true;
|
|
43
|
+
}
|
|
44
|
+
|
|
45
|
+
export function LoginPasswordInputFromJSON(json: any): LoginPasswordInput {
|
|
46
|
+
return LoginPasswordInputFromJSONTyped(json, false);
|
|
47
|
+
}
|
|
48
|
+
|
|
49
|
+
export function LoginPasswordInputFromJSONTyped(json: any, ignoreDiscriminator: boolean): LoginPasswordInput {
|
|
50
|
+
if (json == null) {
|
|
51
|
+
return json;
|
|
52
|
+
}
|
|
53
|
+
return {
|
|
54
|
+
|
|
55
|
+
'challengeToken': json['challengeToken'],
|
|
56
|
+
'password': json['password'],
|
|
57
|
+
};
|
|
58
|
+
}
|
|
59
|
+
|
|
60
|
+
export function LoginPasswordInputToJSON(json: any): LoginPasswordInput {
|
|
61
|
+
return LoginPasswordInputToJSONTyped(json, false);
|
|
62
|
+
}
|
|
63
|
+
|
|
64
|
+
export function LoginPasswordInputToJSONTyped(value?: LoginPasswordInput | null, ignoreDiscriminator: boolean = false): any {
|
|
65
|
+
if (value == null) {
|
|
66
|
+
return value;
|
|
67
|
+
}
|
|
68
|
+
|
|
69
|
+
return {
|
|
70
|
+
|
|
71
|
+
'challengeToken': value['challengeToken'],
|
|
72
|
+
'password': value['password'],
|
|
73
|
+
};
|
|
74
|
+
}
|
|
75
|
+
|
|
@@ -24,6 +24,7 @@ export const UserLoginAttemptResult = {
|
|
|
24
24
|
SECOND_FACTOR_FAILED: 'second_factor_failed',
|
|
25
25
|
SECOND_FACTOR_LOCKED: 'second_factor_locked',
|
|
26
26
|
PASSWORD_LOGIN_DISABLED: 'password_login_disabled',
|
|
27
|
+
PASSKEY_LOGIN_DISABLED: 'passkey_login_disabled',
|
|
27
28
|
LOCATION_CONFIRMATION_REQUIRED: 'location_confirmation_required'
|
|
28
29
|
} as const;
|
|
29
30
|
export type UserLoginAttemptResult = typeof UserLoginAttemptResult[keyof typeof UserLoginAttemptResult];
|