@randock/nameshift-api-client 0.0.504 → 0.0.506

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.
Files changed (69) hide show
  1. package/.openapi-generator/FILES +12 -2
  2. package/README.md +3 -3
  3. package/dist/apis/AdminApi.d.ts +113 -1
  4. package/dist/apis/AdminApi.js +500 -0
  5. package/dist/apis/UsersApi.d.ts +18 -18
  6. package/dist/apis/UsersApi.js +69 -70
  7. package/dist/apis/UsersPublicApi.d.ts +20 -7
  8. package/dist/apis/UsersPublicApi.js +54 -6
  9. package/dist/models/AdminUserNewsletterInput.d.ts +41 -0
  10. package/dist/models/AdminUserNewsletterInput.js +60 -0
  11. package/dist/models/AdminUserSecurityDto.d.ts +4 -4
  12. package/dist/models/AdminUserSecurityDto.js +3 -4
  13. package/dist/models/ChangeUserSignInStepsInput.d.ts +33 -0
  14. package/dist/models/ChangeUserSignInStepsInput.js +51 -0
  15. package/dist/models/CreateNewsletterInput.d.ts +171 -0
  16. package/dist/models/CreateNewsletterInput.js +98 -0
  17. package/dist/models/LoginPasswordInput.d.ts +38 -0
  18. package/dist/models/LoginPasswordInput.js +55 -0
  19. package/dist/models/NewsStoryDto.d.ts +80 -0
  20. package/dist/models/NewsStoryDto.js +83 -0
  21. package/dist/models/NewsletterDto.d.ts +251 -0
  22. package/dist/models/NewsletterDto.js +200 -0
  23. package/dist/models/NewsletterPreviewDto.d.ts +44 -0
  24. package/dist/models/NewsletterPreviewDto.js +59 -0
  25. package/dist/models/NewsletterSecondaryStoryDto.d.ts +44 -0
  26. package/dist/models/NewsletterSecondaryStoryDto.js +59 -0
  27. package/dist/models/NewsletterSecondaryStoryInput.d.ts +44 -0
  28. package/dist/models/NewsletterSecondaryStoryInput.js +59 -0
  29. package/dist/models/SecondFactorMethod.d.ts +1 -0
  30. package/dist/models/SecondFactorMethod.js +1 -0
  31. package/dist/models/SendNewsletterPreviewInput.d.ts +32 -0
  32. package/dist/models/SendNewsletterPreviewInput.js +51 -0
  33. package/dist/models/UpdateNewsletterInput.d.ts +171 -0
  34. package/dist/models/UpdateNewsletterInput.js +96 -0
  35. package/dist/models/UserLoginAttemptResult.d.ts +1 -0
  36. package/dist/models/UserLoginAttemptResult.js +1 -0
  37. package/dist/models/UserSecurityDto.d.ts +11 -11
  38. package/dist/models/UserSecurityDto.js +10 -10
  39. package/dist/models/UserSignInFactor.d.ts +26 -0
  40. package/dist/models/UserSignInFactor.js +52 -0
  41. package/dist/models/index.d.ts +12 -2
  42. package/dist/models/index.js +12 -2
  43. package/package.json +1 -1
  44. package/src/apis/AdminApi.ts +454 -0
  45. package/src/apis/UsersApi.ts +73 -74
  46. package/src/apis/UsersPublicApi.ts +51 -6
  47. package/src/models/AdminUserNewsletterInput.ts +78 -0
  48. package/src/models/AdminUserSecurityDto.ts +12 -14
  49. package/src/models/ChangeUserSignInStepsInput.ts +74 -0
  50. package/src/models/CreateNewsletterInput.ts +258 -0
  51. package/src/models/LoginPasswordInput.ts +75 -0
  52. package/src/models/NewsStoryDto.ts +138 -0
  53. package/src/models/NewsletterDto.ts +400 -0
  54. package/src/models/NewsletterPreviewDto.ts +84 -0
  55. package/src/models/NewsletterSecondaryStoryDto.ts +84 -0
  56. package/src/models/NewsletterSecondaryStoryInput.ts +84 -0
  57. package/src/models/SecondFactorMethod.ts +1 -0
  58. package/src/models/SendNewsletterPreviewInput.ts +66 -0
  59. package/src/models/UpdateNewsletterInput.ts +257 -0
  60. package/src/models/UserLoginAttemptResult.ts +1 -0
  61. package/src/models/UserSecurityDto.ts +25 -27
  62. package/src/models/UserSignInFactor.ts +54 -0
  63. package/src/models/index.ts +12 -2
  64. package/dist/models/ChangeUserAuthenticationMethodInput.d.ts +0 -33
  65. package/dist/models/ChangeUserAuthenticationMethodInput.js +0 -52
  66. package/dist/models/UserAuthenticationMethod.d.ts +0 -27
  67. package/dist/models/UserAuthenticationMethod.js +0 -53
  68. package/src/models/ChangeUserAuthenticationMethodInput.ts +0 -76
  69. package/src/models/UserAuthenticationMethod.ts +0 -55
@@ -183,69 +183,6 @@ var UsersApi = /** @class */ (function (_super) {
183
183
  });
184
184
  });
185
185
  };
186
- /**
187
- * 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.
188
- * Change the method the user signs in with
189
- */
190
- UsersApi.prototype.changeUserAuthenticationMethodRaw = function (requestParameters, initOverrides) {
191
- return __awaiter(this, void 0, void 0, function () {
192
- var queryParameters, headerParameters, token, tokenString, response;
193
- return __generator(this, function (_a) {
194
- switch (_a.label) {
195
- case 0:
196
- if (requestParameters['xReauthenticationToken'] == null) {
197
- throw new runtime.RequiredError('xReauthenticationToken', 'Required parameter "xReauthenticationToken" was null or undefined when calling changeUserAuthenticationMethod().');
198
- }
199
- if (requestParameters['changeUserAuthenticationMethodInput'] == null) {
200
- throw new runtime.RequiredError('changeUserAuthenticationMethodInput', 'Required parameter "changeUserAuthenticationMethodInput" was null or undefined when calling changeUserAuthenticationMethod().');
201
- }
202
- queryParameters = {};
203
- headerParameters = {};
204
- headerParameters['Content-Type'] = 'application/json';
205
- if (requestParameters['xReauthenticationToken'] != null) {
206
- headerParameters['x-reauthentication-token'] = String(requestParameters['xReauthenticationToken']);
207
- }
208
- if (!(this.configuration && this.configuration.accessToken)) return [3 /*break*/, 2];
209
- token = this.configuration.accessToken;
210
- return [4 /*yield*/, token("bearer", [])];
211
- case 1:
212
- tokenString = _a.sent();
213
- if (tokenString) {
214
- headerParameters["Authorization"] = "Bearer ".concat(tokenString);
215
- }
216
- _a.label = 2;
217
- case 2: return [4 /*yield*/, this.request({
218
- path: "/private/users/security/authentication-method",
219
- method: 'PATCH',
220
- headers: headerParameters,
221
- query: queryParameters,
222
- body: (0, index_1.ChangeUserAuthenticationMethodInputToJSON)(requestParameters['changeUserAuthenticationMethodInput']),
223
- }, initOverrides)];
224
- case 3:
225
- response = _a.sent();
226
- return [2 /*return*/, new runtime.JSONApiResponse(response, function (jsonValue) { return (0, index_1.UserSecurityDtoFromJSON)(jsonValue); })];
227
- }
228
- });
229
- });
230
- };
231
- /**
232
- * 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.
233
- * Change the method the user signs in with
234
- */
235
- UsersApi.prototype.changeUserAuthenticationMethod = function (requestParameters, initOverrides) {
236
- return __awaiter(this, void 0, void 0, function () {
237
- var response;
238
- return __generator(this, function (_a) {
239
- switch (_a.label) {
240
- case 0: return [4 /*yield*/, this.changeUserAuthenticationMethodRaw(requestParameters, initOverrides)];
241
- case 1:
242
- response = _a.sent();
243
- return [4 /*yield*/, response.value()];
244
- case 2: return [2 /*return*/, _a.sent()];
245
- }
246
- });
247
- });
248
- };
249
186
  /**
250
187
  * 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.
251
188
  * Change user email with OTP
@@ -424,6 +361,69 @@ var UsersApi = /** @class */ (function (_super) {
424
361
  });
425
362
  });
426
363
  };
364
+ /**
365
+ * 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.
366
+ * Change the steps the user signs in with
367
+ */
368
+ UsersApi.prototype.changeUserSignInStepsRaw = function (requestParameters, initOverrides) {
369
+ return __awaiter(this, void 0, void 0, function () {
370
+ var queryParameters, headerParameters, token, tokenString, response;
371
+ return __generator(this, function (_a) {
372
+ switch (_a.label) {
373
+ case 0:
374
+ if (requestParameters['xReauthenticationToken'] == null) {
375
+ throw new runtime.RequiredError('xReauthenticationToken', 'Required parameter "xReauthenticationToken" was null or undefined when calling changeUserSignInSteps().');
376
+ }
377
+ if (requestParameters['changeUserSignInStepsInput'] == null) {
378
+ throw new runtime.RequiredError('changeUserSignInStepsInput', 'Required parameter "changeUserSignInStepsInput" was null or undefined when calling changeUserSignInSteps().');
379
+ }
380
+ queryParameters = {};
381
+ headerParameters = {};
382
+ headerParameters['Content-Type'] = 'application/json';
383
+ if (requestParameters['xReauthenticationToken'] != null) {
384
+ headerParameters['x-reauthentication-token'] = String(requestParameters['xReauthenticationToken']);
385
+ }
386
+ if (!(this.configuration && this.configuration.accessToken)) return [3 /*break*/, 2];
387
+ token = this.configuration.accessToken;
388
+ return [4 /*yield*/, token("bearer", [])];
389
+ case 1:
390
+ tokenString = _a.sent();
391
+ if (tokenString) {
392
+ headerParameters["Authorization"] = "Bearer ".concat(tokenString);
393
+ }
394
+ _a.label = 2;
395
+ case 2: return [4 /*yield*/, this.request({
396
+ path: "/private/users/security/sign-in-steps",
397
+ method: 'PATCH',
398
+ headers: headerParameters,
399
+ query: queryParameters,
400
+ body: (0, index_1.ChangeUserSignInStepsInputToJSON)(requestParameters['changeUserSignInStepsInput']),
401
+ }, initOverrides)];
402
+ case 3:
403
+ response = _a.sent();
404
+ return [2 /*return*/, new runtime.JSONApiResponse(response, function (jsonValue) { return (0, index_1.UserSecurityDtoFromJSON)(jsonValue); })];
405
+ }
406
+ });
407
+ });
408
+ };
409
+ /**
410
+ * 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.
411
+ * Change the steps the user signs in with
412
+ */
413
+ UsersApi.prototype.changeUserSignInSteps = function (requestParameters, initOverrides) {
414
+ return __awaiter(this, void 0, void 0, function () {
415
+ var response;
416
+ return __generator(this, function (_a) {
417
+ switch (_a.label) {
418
+ case 0: return [4 /*yield*/, this.changeUserSignInStepsRaw(requestParameters, initOverrides)];
419
+ case 1:
420
+ response = _a.sent();
421
+ return [4 /*yield*/, response.value()];
422
+ case 2: return [2 /*return*/, _a.sent()];
423
+ }
424
+ });
425
+ });
426
+ };
427
427
  /**
428
428
  * The current codes stop working.
429
429
  * Turn recovery codes off
@@ -1634,7 +1634,7 @@ var UsersApi = /** @class */ (function (_super) {
1634
1634
  });
1635
1635
  };
1636
1636
  /**
1637
- * 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.
1637
+ * 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.
1638
1638
  * Start moving to another authenticator app
1639
1639
  */
1640
1640
  UsersApi.prototype.startUserTotpReplacementRaw = function (requestParameters, initOverrides) {
@@ -1643,14 +1643,12 @@ var UsersApi = /** @class */ (function (_super) {
1643
1643
  return __generator(this, function (_a) {
1644
1644
  switch (_a.label) {
1645
1645
  case 0:
1646
- if (requestParameters['xReauthenticationToken'] == null) {
1647
- throw new runtime.RequiredError('xReauthenticationToken', 'Required parameter "xReauthenticationToken" was null or undefined when calling startUserTotpReplacement().');
1646
+ if (requestParameters['totpCodeInput'] == null) {
1647
+ throw new runtime.RequiredError('totpCodeInput', 'Required parameter "totpCodeInput" was null or undefined when calling startUserTotpReplacement().');
1648
1648
  }
1649
1649
  queryParameters = {};
1650
1650
  headerParameters = {};
1651
- if (requestParameters['xReauthenticationToken'] != null) {
1652
- headerParameters['x-reauthentication-token'] = String(requestParameters['xReauthenticationToken']);
1653
- }
1651
+ headerParameters['Content-Type'] = 'application/json';
1654
1652
  if (!(this.configuration && this.configuration.accessToken)) return [3 /*break*/, 2];
1655
1653
  token = this.configuration.accessToken;
1656
1654
  return [4 /*yield*/, token("bearer", [])];
@@ -1665,6 +1663,7 @@ var UsersApi = /** @class */ (function (_super) {
1665
1663
  method: 'POST',
1666
1664
  headers: headerParameters,
1667
1665
  query: queryParameters,
1666
+ body: (0, index_1.TotpCodeInputToJSON)(requestParameters['totpCodeInput']),
1668
1667
  }, initOverrides)];
1669
1668
  case 3:
1670
1669
  response = _a.sent();
@@ -1674,7 +1673,7 @@ var UsersApi = /** @class */ (function (_super) {
1674
1673
  });
1675
1674
  };
1676
1675
  /**
1677
- * 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.
1676
+ * 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.
1678
1677
  * Start moving to another authenticator app
1679
1678
  */
1680
1679
  UsersApi.prototype.startUserTotpReplacement = function (requestParameters, initOverrides) {
@@ -10,7 +10,7 @@
10
10
  * Do not edit the class manually.
11
11
  */
12
12
  import * as runtime from '../runtime';
13
- import type { ConfirmLoginLocationInput, ForgotPasswordRequestInput, LoginChallengeInput, LoginCodeInput, LoginDto, LoginInput, LoginPasskeyInput, LoginPasskeyOptionsInput, LoginRecoveryCodeInput, NotificationsUnsubscribeResultDto, PasskeyOptionsDto, SetNewPasswordInput, UserLoginLocationConfirmationDetailsDto, UserPasswordResetDto, UserSignedTokenInput } from '../models/index';
13
+ import type { ConfirmLoginLocationInput, ForgotPasswordRequestInput, LoginChallengeInput, LoginCodeInput, LoginDto, LoginInput, LoginPasskeyInput, LoginPasskeyOptionsInput, LoginPasswordInput, LoginRecoveryCodeInput, NotificationsUnsubscribeResultDto, PasskeyOptionsDto, SetNewPasswordInput, UserLoginLocationConfirmationDetailsDto, UserPasswordResetDto, UserSignedTokenInput } from '../models/index';
14
14
  export interface UsersPublicApiConfirmLoginLocationRequest {
15
15
  confirmationId: string;
16
16
  confirmLoginLocationInput: ConfirmLoginLocationInput;
@@ -37,6 +37,9 @@ export interface UsersPublicApiLoginRequest {
37
37
  export interface UsersPublicApiLoginWithPasskeyRequest {
38
38
  loginPasskeyInput: LoginPasskeyInput;
39
39
  }
40
+ export interface UsersPublicApiLoginWithPasswordStepRequest {
41
+ loginPasswordInput: LoginPasswordInput;
42
+ }
40
43
  export interface UsersPublicApiLoginWithRecoveryCodeRequest {
41
44
  loginCodeInput: LoginCodeInput;
42
45
  }
@@ -108,12 +111,12 @@ export declare class UsersPublicApi extends runtime.BaseAPI {
108
111
  */
109
112
  getLoginLocationConfirmationStatus(requestParameters: UsersPublicApiGetLoginLocationConfirmationStatusRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<LoginDto>;
110
113
  /**
111
- * 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.
114
+ * 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.
112
115
  * Start signing in with a passkey
113
116
  */
114
117
  getLoginPasskeyOptionsRaw(requestParameters: UsersPublicApiGetLoginPasskeyOptionsRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<PasskeyOptionsDto>>;
115
118
  /**
116
- * 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.
119
+ * 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.
117
120
  * Start signing in with a passkey
118
121
  */
119
122
  getLoginPasskeyOptions(requestParameters: UsersPublicApiGetLoginPasskeyOptionsRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<PasskeyOptionsDto>;
@@ -128,13 +131,23 @@ export declare class UsersPublicApi extends runtime.BaseAPI {
128
131
  */
129
132
  login(requestParameters: UsersPublicApiLoginRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<LoginDto>;
130
133
  /**
131
- * Sign in with a passkey, or prove the second factor with one
134
+ * Sign in with a passkey, or prove a later step with one
132
135
  */
133
136
  loginWithPasskeyRaw(requestParameters: UsersPublicApiLoginWithPasskeyRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<LoginDto>>;
134
137
  /**
135
- * Sign in with a passkey, or prove the second factor with one
138
+ * Sign in with a passkey, or prove a later step with one
136
139
  */
137
140
  loginWithPasskey(requestParameters: UsersPublicApiLoginWithPasskeyRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<LoginDto>;
141
+ /**
142
+ * For users who enter the password after another step, e.g. a passkey first. Wrong passwords count towards the lock of the later steps.
143
+ * Prove a later sign-in step with the password
144
+ */
145
+ loginWithPasswordStepRaw(requestParameters: UsersPublicApiLoginWithPasswordStepRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<LoginDto>>;
146
+ /**
147
+ * For users who enter the password after another step, e.g. a passkey first. Wrong passwords count towards the lock of the later steps.
148
+ * Prove a later sign-in step with the password
149
+ */
150
+ loginWithPasswordStep(requestParameters: UsersPublicApiLoginWithPasswordStepRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<LoginDto>;
138
151
  /**
139
152
  * Each recovery code works once.
140
153
  * Prove the second factor with a recovery code
@@ -146,12 +159,12 @@ export declare class UsersPublicApi extends runtime.BaseAPI {
146
159
  */
147
160
  loginWithRecoveryCode(requestParameters: UsersPublicApiLoginWithRecoveryCodeRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<LoginDto>;
148
161
  /**
149
- * 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.
162
+ * 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.
150
163
  * Sign in with a recovery code instead of a lost passkey
151
164
  */
152
165
  loginWithRecoveryCodeInsteadOfPasskeyRaw(requestParameters: UsersPublicApiLoginWithRecoveryCodeInsteadOfPasskeyRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<LoginDto>>;
153
166
  /**
154
- * 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.
167
+ * 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.
155
168
  * Sign in with a recovery code instead of a lost passkey
156
169
  */
157
170
  loginWithRecoveryCodeInsteadOfPasskey(requestParameters: UsersPublicApiLoginWithRecoveryCodeInsteadOfPasskeyRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<LoginDto>;
@@ -316,7 +316,7 @@ var UsersPublicApi = /** @class */ (function (_super) {
316
316
  });
317
317
  };
318
318
  /**
319
- * 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.
319
+ * 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.
320
320
  * Start signing in with a passkey
321
321
  */
322
322
  UsersPublicApi.prototype.getLoginPasskeyOptionsRaw = function (requestParameters, initOverrides) {
@@ -346,7 +346,7 @@ var UsersPublicApi = /** @class */ (function (_super) {
346
346
  });
347
347
  };
348
348
  /**
349
- * 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.
349
+ * 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.
350
350
  * Start signing in with a passkey
351
351
  */
352
352
  UsersPublicApi.prototype.getLoginPasskeyOptions = function (requestParameters, initOverrides) {
@@ -412,7 +412,7 @@ var UsersPublicApi = /** @class */ (function (_super) {
412
412
  });
413
413
  };
414
414
  /**
415
- * Sign in with a passkey, or prove the second factor with one
415
+ * Sign in with a passkey, or prove a later step with one
416
416
  */
417
417
  UsersPublicApi.prototype.loginWithPasskeyRaw = function (requestParameters, initOverrides) {
418
418
  return __awaiter(this, void 0, void 0, function () {
@@ -441,7 +441,7 @@ var UsersPublicApi = /** @class */ (function (_super) {
441
441
  });
442
442
  };
443
443
  /**
444
- * Sign in with a passkey, or prove the second factor with one
444
+ * Sign in with a passkey, or prove a later step with one
445
445
  */
446
446
  UsersPublicApi.prototype.loginWithPasskey = function (requestParameters, initOverrides) {
447
447
  return __awaiter(this, void 0, void 0, function () {
@@ -457,6 +457,54 @@ var UsersPublicApi = /** @class */ (function (_super) {
457
457
  });
458
458
  });
459
459
  };
460
+ /**
461
+ * For users who enter the password after another step, e.g. a passkey first. Wrong passwords count towards the lock of the later steps.
462
+ * Prove a later sign-in step with the password
463
+ */
464
+ UsersPublicApi.prototype.loginWithPasswordStepRaw = function (requestParameters, initOverrides) {
465
+ return __awaiter(this, void 0, void 0, function () {
466
+ var queryParameters, headerParameters, response;
467
+ return __generator(this, function (_a) {
468
+ switch (_a.label) {
469
+ case 0:
470
+ if (requestParameters['loginPasswordInput'] == null) {
471
+ throw new runtime.RequiredError('loginPasswordInput', 'Required parameter "loginPasswordInput" was null or undefined when calling loginWithPasswordStep().');
472
+ }
473
+ queryParameters = {};
474
+ headerParameters = {};
475
+ headerParameters['Content-Type'] = 'application/json';
476
+ return [4 /*yield*/, this.request({
477
+ path: "/users/login/password",
478
+ method: 'POST',
479
+ headers: headerParameters,
480
+ query: queryParameters,
481
+ body: (0, index_1.LoginPasswordInputToJSON)(requestParameters['loginPasswordInput']),
482
+ }, initOverrides)];
483
+ case 1:
484
+ response = _a.sent();
485
+ return [2 /*return*/, new runtime.JSONApiResponse(response, function (jsonValue) { return (0, index_1.LoginDtoFromJSON)(jsonValue); })];
486
+ }
487
+ });
488
+ });
489
+ };
490
+ /**
491
+ * For users who enter the password after another step, e.g. a passkey first. Wrong passwords count towards the lock of the later steps.
492
+ * Prove a later sign-in step with the password
493
+ */
494
+ UsersPublicApi.prototype.loginWithPasswordStep = function (requestParameters, initOverrides) {
495
+ return __awaiter(this, void 0, void 0, function () {
496
+ var response;
497
+ return __generator(this, function (_a) {
498
+ switch (_a.label) {
499
+ case 0: return [4 /*yield*/, this.loginWithPasswordStepRaw(requestParameters, initOverrides)];
500
+ case 1:
501
+ response = _a.sent();
502
+ return [4 /*yield*/, response.value()];
503
+ case 2: return [2 /*return*/, _a.sent()];
504
+ }
505
+ });
506
+ });
507
+ };
460
508
  /**
461
509
  * Each recovery code works once.
462
510
  * Prove the second factor with a recovery code
@@ -506,7 +554,7 @@ var UsersPublicApi = /** @class */ (function (_super) {
506
554
  });
507
555
  };
508
556
  /**
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.
557
+ * 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
558
  * Sign in with a recovery code instead of a lost passkey
511
559
  */
512
560
  UsersPublicApi.prototype.loginWithRecoveryCodeInsteadOfPasskeyRaw = function (requestParameters, initOverrides) {
@@ -536,7 +584,7 @@ var UsersPublicApi = /** @class */ (function (_super) {
536
584
  });
537
585
  };
538
586
  /**
539
- * 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.
587
+ * 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.
540
588
  * Sign in with a recovery code instead of a lost passkey
541
589
  */
542
590
  UsersPublicApi.prototype.loginWithRecoveryCodeInsteadOfPasskey = function (requestParameters, initOverrides) {
@@ -0,0 +1,41 @@
1
+ /**
2
+ * Nameshift
3
+ * 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.
4
+ *
5
+ * The version of the OpenAPI document: 1.0
6
+ *
7
+ *
8
+ * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
9
+ * https://openapi-generator.tech
10
+ * Do not edit the class manually.
11
+ */
12
+ /**
13
+ *
14
+ * @export
15
+ * @interface AdminUserNewsletterInput
16
+ */
17
+ export interface AdminUserNewsletterInput {
18
+ /**
19
+ * Seller newsletter consent of the user. An admin change is recorded as such; it never overrides an unsubscribe the user made in Mailchimp, which the audience sync keeps.
20
+ * @type {string}
21
+ * @memberof AdminUserNewsletterInput
22
+ */
23
+ newsletterStatus: AdminUserNewsletterInputNewsletterStatusEnum;
24
+ }
25
+ /**
26
+ * @export
27
+ */
28
+ export declare const AdminUserNewsletterInputNewsletterStatusEnum: {
29
+ readonly SUBSCRIBED: "subscribed";
30
+ readonly UNSUBSCRIBED: "unsubscribed";
31
+ readonly NEVER_ASKED: "never_asked";
32
+ };
33
+ export type AdminUserNewsletterInputNewsletterStatusEnum = typeof AdminUserNewsletterInputNewsletterStatusEnum[keyof typeof AdminUserNewsletterInputNewsletterStatusEnum];
34
+ /**
35
+ * Check if a given object implements the AdminUserNewsletterInput interface.
36
+ */
37
+ export declare function instanceOfAdminUserNewsletterInput(value: object): value is AdminUserNewsletterInput;
38
+ export declare function AdminUserNewsletterInputFromJSON(json: any): AdminUserNewsletterInput;
39
+ export declare function AdminUserNewsletterInputFromJSONTyped(json: any, ignoreDiscriminator: boolean): AdminUserNewsletterInput;
40
+ export declare function AdminUserNewsletterInputToJSON(json: any): AdminUserNewsletterInput;
41
+ export declare function AdminUserNewsletterInputToJSONTyped(value?: AdminUserNewsletterInput | null, ignoreDiscriminator?: boolean): any;
@@ -0,0 +1,60 @@
1
+ "use strict";
2
+ /* tslint:disable */
3
+ /* eslint-disable */
4
+ /**
5
+ * Nameshift
6
+ * 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.
7
+ *
8
+ * The version of the OpenAPI document: 1.0
9
+ *
10
+ *
11
+ * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
12
+ * https://openapi-generator.tech
13
+ * Do not edit the class manually.
14
+ */
15
+ Object.defineProperty(exports, "__esModule", { value: true });
16
+ exports.AdminUserNewsletterInputNewsletterStatusEnum = void 0;
17
+ exports.instanceOfAdminUserNewsletterInput = instanceOfAdminUserNewsletterInput;
18
+ exports.AdminUserNewsletterInputFromJSON = AdminUserNewsletterInputFromJSON;
19
+ exports.AdminUserNewsletterInputFromJSONTyped = AdminUserNewsletterInputFromJSONTyped;
20
+ exports.AdminUserNewsletterInputToJSON = AdminUserNewsletterInputToJSON;
21
+ exports.AdminUserNewsletterInputToJSONTyped = AdminUserNewsletterInputToJSONTyped;
22
+ /**
23
+ * @export
24
+ */
25
+ exports.AdminUserNewsletterInputNewsletterStatusEnum = {
26
+ SUBSCRIBED: 'subscribed',
27
+ UNSUBSCRIBED: 'unsubscribed',
28
+ NEVER_ASKED: 'never_asked'
29
+ };
30
+ /**
31
+ * Check if a given object implements the AdminUserNewsletterInput interface.
32
+ */
33
+ function instanceOfAdminUserNewsletterInput(value) {
34
+ if (!('newsletterStatus' in value) || value['newsletterStatus'] === undefined)
35
+ return false;
36
+ return true;
37
+ }
38
+ function AdminUserNewsletterInputFromJSON(json) {
39
+ return AdminUserNewsletterInputFromJSONTyped(json, false);
40
+ }
41
+ function AdminUserNewsletterInputFromJSONTyped(json, ignoreDiscriminator) {
42
+ if (json == null) {
43
+ return json;
44
+ }
45
+ return {
46
+ 'newsletterStatus': json['newsletterStatus'],
47
+ };
48
+ }
49
+ function AdminUserNewsletterInputToJSON(json) {
50
+ return AdminUserNewsletterInputToJSONTyped(json, false);
51
+ }
52
+ function AdminUserNewsletterInputToJSONTyped(value, ignoreDiscriminator) {
53
+ if (ignoreDiscriminator === void 0) { ignoreDiscriminator = false; }
54
+ if (value == null) {
55
+ return value;
56
+ }
57
+ return {
58
+ 'newsletterStatus': value['newsletterStatus'],
59
+ };
60
+ }
@@ -9,7 +9,7 @@
9
9
  * https://openapi-generator.tech
10
10
  * Do not edit the class manually.
11
11
  */
12
- import type { UserAuthenticationMethod } from './UserAuthenticationMethod';
12
+ import type { UserSignInFactor } from './UserSignInFactor';
13
13
  /**
14
14
  *
15
15
  * @export
@@ -47,11 +47,11 @@ export interface AdminUserSecurityDto {
47
47
  */
48
48
  isStaff: boolean;
49
49
  /**
50
- * Method the user signs in with.
51
- * @type {UserAuthenticationMethod}
50
+ * Steps the user signs in with, in order; each step lists the factors to choose from.
51
+ * @type {Array<Array<UserSignInFactor>>}
52
52
  * @memberof AdminUserSecurityDto
53
53
  */
54
- authenticationMethod: UserAuthenticationMethod;
54
+ signInSteps: Array<Array<UserSignInFactor>>;
55
55
  /**
56
56
  * Whether an authenticator app is set up.
57
57
  * @type {boolean}
@@ -18,7 +18,6 @@ exports.AdminUserSecurityDtoFromJSON = AdminUserSecurityDtoFromJSON;
18
18
  exports.AdminUserSecurityDtoFromJSONTyped = AdminUserSecurityDtoFromJSONTyped;
19
19
  exports.AdminUserSecurityDtoToJSON = AdminUserSecurityDtoToJSON;
20
20
  exports.AdminUserSecurityDtoToJSONTyped = AdminUserSecurityDtoToJSONTyped;
21
- var UserAuthenticationMethod_1 = require("./UserAuthenticationMethod");
22
21
  /**
23
22
  * Check if a given object implements the AdminUserSecurityDto interface.
24
23
  */
@@ -33,7 +32,7 @@ function instanceOfAdminUserSecurityDto(value) {
33
32
  return false;
34
33
  if (!('isStaff' in value) || value['isStaff'] === undefined)
35
34
  return false;
36
- if (!('authenticationMethod' in value) || value['authenticationMethod'] === undefined)
35
+ if (!('signInSteps' in value) || value['signInSteps'] === undefined)
37
36
  return false;
38
37
  if (!('totpEnabled' in value) || value['totpEnabled'] === undefined)
39
38
  return false;
@@ -58,7 +57,7 @@ function AdminUserSecurityDtoFromJSONTyped(json, ignoreDiscriminator) {
58
57
  'name': json['name'],
59
58
  'roles': json['roles'],
60
59
  'isStaff': json['isStaff'],
61
- 'authenticationMethod': (0, UserAuthenticationMethod_1.UserAuthenticationMethodFromJSON)(json['authenticationMethod']),
60
+ 'signInSteps': json['signInSteps'],
62
61
  'totpEnabled': json['totpEnabled'],
63
62
  'passkeys': json['passkeys'],
64
63
  'loginLocationVerificationEnabled': json['loginLocationVerificationEnabled'],
@@ -79,7 +78,7 @@ function AdminUserSecurityDtoToJSONTyped(value, ignoreDiscriminator) {
79
78
  'name': value['name'],
80
79
  'roles': value['roles'],
81
80
  'isStaff': value['isStaff'],
82
- 'authenticationMethod': (0, UserAuthenticationMethod_1.UserAuthenticationMethodToJSON)(value['authenticationMethod']),
81
+ 'signInSteps': value['signInSteps'],
83
82
  'totpEnabled': value['totpEnabled'],
84
83
  'passkeys': value['passkeys'],
85
84
  'loginLocationVerificationEnabled': value['loginLocationVerificationEnabled'],
@@ -0,0 +1,33 @@
1
+ /**
2
+ * Nameshift
3
+ * 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.
4
+ *
5
+ * The version of the OpenAPI document: 1.0
6
+ *
7
+ *
8
+ * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
9
+ * https://openapi-generator.tech
10
+ * Do not edit the class manually.
11
+ */
12
+ import type { UserSignInFactor } from './UserSignInFactor';
13
+ /**
14
+ *
15
+ * @export
16
+ * @interface ChangeUserSignInStepsInput
17
+ */
18
+ export interface ChangeUserSignInStepsInput {
19
+ /**
20
+ * 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.
21
+ * @type {Array<Array<UserSignInFactor>>}
22
+ * @memberof ChangeUserSignInStepsInput
23
+ */
24
+ steps: Array<Array<UserSignInFactor>>;
25
+ }
26
+ /**
27
+ * Check if a given object implements the ChangeUserSignInStepsInput interface.
28
+ */
29
+ export declare function instanceOfChangeUserSignInStepsInput(value: object): value is ChangeUserSignInStepsInput;
30
+ export declare function ChangeUserSignInStepsInputFromJSON(json: any): ChangeUserSignInStepsInput;
31
+ export declare function ChangeUserSignInStepsInputFromJSONTyped(json: any, ignoreDiscriminator: boolean): ChangeUserSignInStepsInput;
32
+ export declare function ChangeUserSignInStepsInputToJSON(json: any): ChangeUserSignInStepsInput;
33
+ export declare function ChangeUserSignInStepsInputToJSONTyped(value?: ChangeUserSignInStepsInput | null, ignoreDiscriminator?: boolean): any;
@@ -0,0 +1,51 @@
1
+ "use strict";
2
+ /* tslint:disable */
3
+ /* eslint-disable */
4
+ /**
5
+ * Nameshift
6
+ * 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.
7
+ *
8
+ * The version of the OpenAPI document: 1.0
9
+ *
10
+ *
11
+ * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
12
+ * https://openapi-generator.tech
13
+ * Do not edit the class manually.
14
+ */
15
+ Object.defineProperty(exports, "__esModule", { value: true });
16
+ exports.instanceOfChangeUserSignInStepsInput = instanceOfChangeUserSignInStepsInput;
17
+ exports.ChangeUserSignInStepsInputFromJSON = ChangeUserSignInStepsInputFromJSON;
18
+ exports.ChangeUserSignInStepsInputFromJSONTyped = ChangeUserSignInStepsInputFromJSONTyped;
19
+ exports.ChangeUserSignInStepsInputToJSON = ChangeUserSignInStepsInputToJSON;
20
+ exports.ChangeUserSignInStepsInputToJSONTyped = ChangeUserSignInStepsInputToJSONTyped;
21
+ /**
22
+ * Check if a given object implements the ChangeUserSignInStepsInput interface.
23
+ */
24
+ function instanceOfChangeUserSignInStepsInput(value) {
25
+ if (!('steps' in value) || value['steps'] === undefined)
26
+ return false;
27
+ return true;
28
+ }
29
+ function ChangeUserSignInStepsInputFromJSON(json) {
30
+ return ChangeUserSignInStepsInputFromJSONTyped(json, false);
31
+ }
32
+ function ChangeUserSignInStepsInputFromJSONTyped(json, ignoreDiscriminator) {
33
+ if (json == null) {
34
+ return json;
35
+ }
36
+ return {
37
+ 'steps': json['steps'],
38
+ };
39
+ }
40
+ function ChangeUserSignInStepsInputToJSON(json) {
41
+ return ChangeUserSignInStepsInputToJSONTyped(json, false);
42
+ }
43
+ function ChangeUserSignInStepsInputToJSONTyped(value, ignoreDiscriminator) {
44
+ if (ignoreDiscriminator === void 0) { ignoreDiscriminator = false; }
45
+ if (value == null) {
46
+ return value;
47
+ }
48
+ return {
49
+ 'steps': value['steps'],
50
+ };
51
+ }