@randock/nameshift-api-client 0.0.503 → 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.
Files changed (144) hide show
  1. package/.openapi-generator/FILES +33 -0
  2. package/README.md +3 -3
  3. package/dist/apis/AdminApi.d.ts +44 -1
  4. package/dist/apis/AdminApi.js +177 -0
  5. package/dist/apis/BuyersPublicApi.d.ts +3 -3
  6. package/dist/apis/BuyersPublicApi.js +1 -1
  7. package/dist/apis/UsersApi.d.ts +285 -1
  8. package/dist/apis/UsersApi.js +1304 -46
  9. package/dist/apis/UsersPublicApi.d.ts +120 -3
  10. package/dist/apis/UsersPublicApi.js +436 -2
  11. package/dist/models/ActivateUserTotpInput.d.ts +32 -0
  12. package/dist/models/ActivateUserTotpInput.js +51 -0
  13. package/dist/models/AdminUserSecurityDto.d.ts +87 -0
  14. package/dist/models/AdminUserSecurityDto.js +87 -0
  15. package/dist/models/BuyerLoginDto.d.ts +38 -0
  16. package/dist/models/BuyerLoginDto.js +55 -0
  17. package/dist/models/BuyerNotificationDto.d.ts +1 -0
  18. package/dist/models/BuyerNotificationDto.js +1 -0
  19. package/dist/models/BuyerNotificationListItemDto.d.ts +1 -0
  20. package/dist/models/BuyerNotificationListItemDto.js +1 -0
  21. package/dist/models/ChangeUserLoginLocationVerificationInput.d.ts +32 -0
  22. package/dist/models/ChangeUserLoginLocationVerificationInput.js +51 -0
  23. package/dist/models/ChangeUserPasswordInput.d.ts +38 -0
  24. package/dist/models/ChangeUserPasswordInput.js +55 -0
  25. package/dist/models/ChangeUserSignInStepsInput.d.ts +33 -0
  26. package/dist/models/ChangeUserSignInStepsInput.js +51 -0
  27. package/dist/models/ConfirmLoginLocationInput.d.ts +32 -0
  28. package/dist/models/ConfirmLoginLocationInput.js +51 -0
  29. package/dist/models/CurrentPasswordInput.d.ts +32 -0
  30. package/dist/models/CurrentPasswordInput.js +51 -0
  31. package/dist/models/FeatureFlagListItemDto.d.ts +1 -0
  32. package/dist/models/FeatureFlagListItemDto.js +2 -1
  33. package/dist/models/IntersectionAccountDtoWithSettingsDtoWithNotificationsDtoWithFeatureFlagsDto.d.ts +1 -0
  34. package/dist/models/IntersectionAccountDtoWithSettingsDtoWithNotificationsDtoWithFeatureFlagsDto.js +2 -1
  35. package/dist/models/ListUserLoginAttempts200Response.d.ts +47 -0
  36. package/dist/models/ListUserLoginAttempts200Response.js +62 -0
  37. package/dist/models/LoginChallengeInput.d.ts +32 -0
  38. package/dist/models/LoginChallengeInput.js +51 -0
  39. package/dist/models/LoginCodeInput.d.ts +38 -0
  40. package/dist/models/LoginCodeInput.js +55 -0
  41. package/dist/models/LoginDto.d.ts +30 -4
  42. package/dist/models/LoginDto.js +13 -5
  43. package/dist/models/LoginPasskeyInput.d.ts +46 -0
  44. package/dist/models/LoginPasskeyInput.js +57 -0
  45. package/dist/models/LoginPasskeyOptionsInput.d.ts +32 -0
  46. package/dist/models/LoginPasskeyOptionsInput.js +49 -0
  47. package/dist/models/LoginPasswordInput.d.ts +38 -0
  48. package/dist/models/LoginPasswordInput.js +55 -0
  49. package/dist/models/LoginRecoveryCodeInput.d.ts +38 -0
  50. package/dist/models/LoginRecoveryCodeInput.js +55 -0
  51. package/dist/models/LoginStatus.d.ts +26 -0
  52. package/dist/models/LoginStatus.js +52 -0
  53. package/dist/models/PasskeyOptionsDto.d.ts +40 -0
  54. package/dist/models/PasskeyOptionsDto.js +55 -0
  55. package/dist/models/PrivateAccountGetMeResponse.d.ts +1 -0
  56. package/dist/models/PrivateAccountGetMeResponse.js +2 -1
  57. package/dist/models/ReauthenticateWithPasskeyInput.d.ts +40 -0
  58. package/dist/models/ReauthenticateWithPasskeyInput.js +55 -0
  59. package/dist/models/ReauthenticationDto.d.ts +38 -0
  60. package/dist/models/ReauthenticationDto.js +55 -0
  61. package/dist/models/RecoveryCodesDto.d.ts +32 -0
  62. package/dist/models/RecoveryCodesDto.js +51 -0
  63. package/dist/models/RegisterUserPasskeyInput.d.ts +46 -0
  64. package/dist/models/RegisterUserPasskeyInput.js +59 -0
  65. package/dist/models/RemoveUserPasskeyInput.d.ts +40 -0
  66. package/dist/models/RemoveUserPasskeyInput.js +55 -0
  67. package/dist/models/RenameUserPasskeyInput.d.ts +32 -0
  68. package/dist/models/RenameUserPasskeyInput.js +51 -0
  69. package/dist/models/SecondFactorMethod.d.ts +27 -0
  70. package/dist/models/SecondFactorMethod.js +53 -0
  71. package/dist/models/SellerSecurityUserDto.d.ts +12 -0
  72. package/dist/models/SellerSecurityUserDto.js +4 -0
  73. package/dist/models/TotpCodeInput.d.ts +32 -0
  74. package/dist/models/TotpCodeInput.js +51 -0
  75. package/dist/models/TotpEnrolmentDto.d.ts +38 -0
  76. package/dist/models/TotpEnrolmentDto.js +55 -0
  77. package/dist/models/UserLoginAttemptDto.d.ts +88 -0
  78. package/dist/models/UserLoginAttemptDto.js +89 -0
  79. package/dist/models/UserLoginAttemptMethod.d.ts +29 -0
  80. package/dist/models/UserLoginAttemptMethod.js +55 -0
  81. package/dist/models/UserLoginAttemptResult.d.ts +31 -0
  82. package/dist/models/UserLoginAttemptResult.js +57 -0
  83. package/dist/models/UserLoginLocationConfirmationDetailsDto.d.ts +62 -0
  84. package/dist/models/UserLoginLocationConfirmationDetailsDto.js +71 -0
  85. package/dist/models/UserNotificationDto.d.ts +1 -0
  86. package/dist/models/UserNotificationDto.js +1 -0
  87. package/dist/models/UserNotificationListItemDto.d.ts +1 -0
  88. package/dist/models/UserNotificationListItemDto.js +1 -0
  89. package/dist/models/UserPasskeyDto.d.ts +62 -0
  90. package/dist/models/UserPasskeyDto.js +71 -0
  91. package/dist/models/UserSecurityDto.d.ts +94 -0
  92. package/dist/models/UserSecurityDto.js +93 -0
  93. package/dist/models/UserSignInFactor.d.ts +26 -0
  94. package/dist/models/UserSignInFactor.js +52 -0
  95. package/dist/models/index.d.ts +33 -0
  96. package/dist/models/index.js +33 -0
  97. package/package.json +1 -1
  98. package/src/apis/AdminApi.ts +172 -0
  99. package/src/apis/BuyersPublicApi.ts +6 -6
  100. package/src/apis/UsersApi.ts +1218 -48
  101. package/src/apis/UsersPublicApi.ts +420 -2
  102. package/src/models/ActivateUserTotpInput.ts +66 -0
  103. package/src/models/AdminUserSecurityDto.ts +155 -0
  104. package/src/models/BuyerLoginDto.ts +75 -0
  105. package/src/models/BuyerNotificationDto.ts +1 -0
  106. package/src/models/BuyerNotificationListItemDto.ts +1 -0
  107. package/src/models/ChangeUserLoginLocationVerificationInput.ts +66 -0
  108. package/src/models/ChangeUserPasswordInput.ts +75 -0
  109. package/src/models/ChangeUserSignInStepsInput.ts +74 -0
  110. package/src/models/ConfirmLoginLocationInput.ts +66 -0
  111. package/src/models/CurrentPasswordInput.ts +66 -0
  112. package/src/models/FeatureFlagListItemDto.ts +2 -1
  113. package/src/models/IntersectionAccountDtoWithSettingsDtoWithNotificationsDtoWithFeatureFlagsDto.ts +2 -1
  114. package/src/models/ListUserLoginAttempts200Response.ts +106 -0
  115. package/src/models/LoginChallengeInput.ts +66 -0
  116. package/src/models/LoginCodeInput.ts +75 -0
  117. package/src/models/LoginDto.ts +56 -8
  118. package/src/models/LoginPasskeyInput.ts +83 -0
  119. package/src/models/LoginPasskeyOptionsInput.ts +65 -0
  120. package/src/models/LoginPasswordInput.ts +75 -0
  121. package/src/models/LoginRecoveryCodeInput.ts +75 -0
  122. package/src/models/LoginStatus.ts +54 -0
  123. package/src/models/PasskeyOptionsDto.ts +75 -0
  124. package/src/models/PrivateAccountGetMeResponse.ts +2 -1
  125. package/src/models/ReauthenticateWithPasskeyInput.ts +75 -0
  126. package/src/models/ReauthenticationDto.ts +75 -0
  127. package/src/models/RecoveryCodesDto.ts +66 -0
  128. package/src/models/RegisterUserPasskeyInput.ts +84 -0
  129. package/src/models/RemoveUserPasskeyInput.ts +75 -0
  130. package/src/models/RenameUserPasskeyInput.ts +66 -0
  131. package/src/models/SecondFactorMethod.ts +55 -0
  132. package/src/models/SellerSecurityUserDto.ts +16 -0
  133. package/src/models/TotpCodeInput.ts +66 -0
  134. package/src/models/TotpEnrolmentDto.ts +75 -0
  135. package/src/models/UserLoginAttemptDto.ts +164 -0
  136. package/src/models/UserLoginAttemptMethod.ts +57 -0
  137. package/src/models/UserLoginAttemptResult.ts +59 -0
  138. package/src/models/UserLoginLocationConfirmationDetailsDto.ts +111 -0
  139. package/src/models/UserNotificationDto.ts +1 -0
  140. package/src/models/UserNotificationListItemDto.ts +1 -0
  141. package/src/models/UserPasskeyDto.ts +111 -0
  142. package/src/models/UserSecurityDto.ts +171 -0
  143. package/src/models/UserSignInFactor.ts +54 -0
  144. package/src/models/index.ts +33 -0
@@ -15,26 +15,53 @@
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,
24
+ LoginPasskeyInput,
25
+ LoginPasskeyOptionsInput,
26
+ LoginPasswordInput,
27
+ LoginRecoveryCodeInput,
21
28
  NotificationsUnsubscribeResultDto,
29
+ PasskeyOptionsDto,
22
30
  SetNewPasswordInput,
31
+ UserLoginLocationConfirmationDetailsDto,
23
32
  UserPasswordResetDto,
24
33
  UserSignedTokenInput,
25
34
  ValidationException,
26
35
  } from '../models/index';
27
36
  import {
37
+ ConfirmLoginLocationInputFromJSON,
38
+ ConfirmLoginLocationInputToJSON,
28
39
  ForgotPasswordRequestInputFromJSON,
29
40
  ForgotPasswordRequestInputToJSON,
41
+ LoginChallengeInputFromJSON,
42
+ LoginChallengeInputToJSON,
43
+ LoginCodeInputFromJSON,
44
+ LoginCodeInputToJSON,
30
45
  LoginDtoFromJSON,
31
46
  LoginDtoToJSON,
32
47
  LoginInputFromJSON,
33
48
  LoginInputToJSON,
49
+ LoginPasskeyInputFromJSON,
50
+ LoginPasskeyInputToJSON,
51
+ LoginPasskeyOptionsInputFromJSON,
52
+ LoginPasskeyOptionsInputToJSON,
53
+ LoginPasswordInputFromJSON,
54
+ LoginPasswordInputToJSON,
55
+ LoginRecoveryCodeInputFromJSON,
56
+ LoginRecoveryCodeInputToJSON,
34
57
  NotificationsUnsubscribeResultDtoFromJSON,
35
58
  NotificationsUnsubscribeResultDtoToJSON,
59
+ PasskeyOptionsDtoFromJSON,
60
+ PasskeyOptionsDtoToJSON,
36
61
  SetNewPasswordInputFromJSON,
37
62
  SetNewPasswordInputToJSON,
63
+ UserLoginLocationConfirmationDetailsDtoFromJSON,
64
+ UserLoginLocationConfirmationDetailsDtoToJSON,
38
65
  UserPasswordResetDtoFromJSON,
39
66
  UserPasswordResetDtoToJSON,
40
67
  UserSignedTokenInputFromJSON,
@@ -43,6 +70,11 @@ import {
43
70
  ValidationExceptionToJSON,
44
71
  } from '../models/index';
45
72
 
73
+ export interface UsersPublicApiConfirmLoginLocationRequest {
74
+ confirmationId: string;
75
+ confirmLoginLocationInput: ConfirmLoginLocationInput;
76
+ }
77
+
46
78
  export interface UsersPublicApiForgotPasswordRequestRequest {
47
79
  forgotPasswordRequestInput: ForgotPasswordRequestInput;
48
80
  }
@@ -51,10 +83,43 @@ export interface UsersPublicApiGetForgotPasswordRequestRequest {
51
83
  passwordRequestId: string;
52
84
  }
53
85
 
86
+ export interface UsersPublicApiGetLoginLocationConfirmationDetailsRequest {
87
+ confirmationId: string;
88
+ confirmLoginLocationInput: ConfirmLoginLocationInput;
89
+ }
90
+
91
+ export interface UsersPublicApiGetLoginLocationConfirmationStatusRequest {
92
+ loginChallengeInput: LoginChallengeInput;
93
+ }
94
+
95
+ export interface UsersPublicApiGetLoginPasskeyOptionsRequest {
96
+ loginPasskeyOptionsInput: LoginPasskeyOptionsInput;
97
+ }
98
+
54
99
  export interface UsersPublicApiLoginRequest {
55
100
  loginInput: LoginInput;
56
101
  }
57
102
 
103
+ export interface UsersPublicApiLoginWithPasskeyRequest {
104
+ loginPasskeyInput: LoginPasskeyInput;
105
+ }
106
+
107
+ export interface UsersPublicApiLoginWithPasswordStepRequest {
108
+ loginPasswordInput: LoginPasswordInput;
109
+ }
110
+
111
+ export interface UsersPublicApiLoginWithRecoveryCodeRequest {
112
+ loginCodeInput: LoginCodeInput;
113
+ }
114
+
115
+ export interface UsersPublicApiLoginWithRecoveryCodeInsteadOfPasskeyRequest {
116
+ loginRecoveryCodeInput: LoginRecoveryCodeInput;
117
+ }
118
+
119
+ export interface UsersPublicApiLoginWithTotpRequest {
120
+ loginCodeInput: LoginCodeInput;
121
+ }
122
+
58
123
  export interface UsersPublicApiPostNewPasswordRequest {
59
124
  passwordRequestId: string;
60
125
  setNewPasswordInput: SetNewPasswordInput;
@@ -69,6 +134,50 @@ export interface UsersPublicApiUnsubscribeFromNotificationsByTokenRequest {
69
134
  */
70
135
  export class UsersPublicApi extends runtime.BaseAPI {
71
136
 
137
+ /**
138
+ * Called by the page the email links to. It only approves the sign-in: no session is returned here.
139
+ * Approve a sign-in from a new location
140
+ */
141
+ async confirmLoginLocationRaw(requestParameters: UsersPublicApiConfirmLoginLocationRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<void>> {
142
+ if (requestParameters['confirmationId'] == null) {
143
+ throw new runtime.RequiredError(
144
+ 'confirmationId',
145
+ 'Required parameter "confirmationId" was null or undefined when calling confirmLoginLocation().'
146
+ );
147
+ }
148
+
149
+ if (requestParameters['confirmLoginLocationInput'] == null) {
150
+ throw new runtime.RequiredError(
151
+ 'confirmLoginLocationInput',
152
+ 'Required parameter "confirmLoginLocationInput" was null or undefined when calling confirmLoginLocation().'
153
+ );
154
+ }
155
+
156
+ const queryParameters: any = {};
157
+
158
+ const headerParameters: runtime.HTTPHeaders = {};
159
+
160
+ headerParameters['Content-Type'] = 'application/json';
161
+
162
+ const response = await this.request({
163
+ path: `/users/login/location-confirmation/{confirmationId}/confirm`.replace(`{${"confirmationId"}}`, encodeURIComponent(String(requestParameters['confirmationId']))),
164
+ method: 'POST',
165
+ headers: headerParameters,
166
+ query: queryParameters,
167
+ body: ConfirmLoginLocationInputToJSON(requestParameters['confirmLoginLocationInput']),
168
+ }, initOverrides);
169
+
170
+ return new runtime.VoidApiResponse(response);
171
+ }
172
+
173
+ /**
174
+ * Called by the page the email links to. It only approves the sign-in: no session is returned here.
175
+ * Approve a sign-in from a new location
176
+ */
177
+ async confirmLoginLocation(requestParameters: UsersPublicApiConfirmLoginLocationRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<void> {
178
+ await this.confirmLoginLocationRaw(requestParameters, initOverrides);
179
+ }
180
+
72
181
  /**
73
182
  * Creates a password reset request and sends a reset link to the provided email address.
74
183
  * Request a password reset email
@@ -142,7 +251,128 @@ export class UsersPublicApi extends runtime.BaseAPI {
142
251
  }
143
252
 
144
253
  /**
145
- * Validates email and password credentials and returns a JWT token with the user locale.
254
+ * 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.
255
+ * See the sign-in an email link asks to approve
256
+ */
257
+ async getLoginLocationConfirmationDetailsRaw(requestParameters: UsersPublicApiGetLoginLocationConfirmationDetailsRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<UserLoginLocationConfirmationDetailsDto>> {
258
+ if (requestParameters['confirmationId'] == null) {
259
+ throw new runtime.RequiredError(
260
+ 'confirmationId',
261
+ 'Required parameter "confirmationId" was null or undefined when calling getLoginLocationConfirmationDetails().'
262
+ );
263
+ }
264
+
265
+ if (requestParameters['confirmLoginLocationInput'] == null) {
266
+ throw new runtime.RequiredError(
267
+ 'confirmLoginLocationInput',
268
+ 'Required parameter "confirmLoginLocationInput" was null or undefined when calling getLoginLocationConfirmationDetails().'
269
+ );
270
+ }
271
+
272
+ const queryParameters: any = {};
273
+
274
+ const headerParameters: runtime.HTTPHeaders = {};
275
+
276
+ headerParameters['Content-Type'] = 'application/json';
277
+
278
+ const response = await this.request({
279
+ path: `/users/login/location-confirmation/{confirmationId}/details`.replace(`{${"confirmationId"}}`, encodeURIComponent(String(requestParameters['confirmationId']))),
280
+ method: 'POST',
281
+ headers: headerParameters,
282
+ query: queryParameters,
283
+ body: ConfirmLoginLocationInputToJSON(requestParameters['confirmLoginLocationInput']),
284
+ }, initOverrides);
285
+
286
+ return new runtime.JSONApiResponse(response, (jsonValue) => UserLoginLocationConfirmationDetailsDtoFromJSON(jsonValue));
287
+ }
288
+
289
+ /**
290
+ * 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.
291
+ * See the sign-in an email link asks to approve
292
+ */
293
+ async getLoginLocationConfirmationDetails(requestParameters: UsersPublicApiGetLoginLocationConfirmationDetailsRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<UserLoginLocationConfirmationDetailsDto> {
294
+ const response = await this.getLoginLocationConfirmationDetailsRaw(requestParameters, initOverrides);
295
+ return await response.value();
296
+ }
297
+
298
+ /**
299
+ * 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.
300
+ * Wait for the email confirming a new location
301
+ */
302
+ async getLoginLocationConfirmationStatusRaw(requestParameters: UsersPublicApiGetLoginLocationConfirmationStatusRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<LoginDto>> {
303
+ if (requestParameters['loginChallengeInput'] == null) {
304
+ throw new runtime.RequiredError(
305
+ 'loginChallengeInput',
306
+ 'Required parameter "loginChallengeInput" was null or undefined when calling getLoginLocationConfirmationStatus().'
307
+ );
308
+ }
309
+
310
+ const queryParameters: any = {};
311
+
312
+ const headerParameters: runtime.HTTPHeaders = {};
313
+
314
+ headerParameters['Content-Type'] = 'application/json';
315
+
316
+ const response = await this.request({
317
+ path: `/users/login/location-confirmation/status`,
318
+ method: 'POST',
319
+ headers: headerParameters,
320
+ query: queryParameters,
321
+ body: LoginChallengeInputToJSON(requestParameters['loginChallengeInput']),
322
+ }, initOverrides);
323
+
324
+ return new runtime.JSONApiResponse(response, (jsonValue) => LoginDtoFromJSON(jsonValue));
325
+ }
326
+
327
+ /**
328
+ * 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.
329
+ * Wait for the email confirming a new location
330
+ */
331
+ async getLoginLocationConfirmationStatus(requestParameters: UsersPublicApiGetLoginLocationConfirmationStatusRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<LoginDto> {
332
+ const response = await this.getLoginLocationConfirmationStatusRaw(requestParameters, initOverrides);
333
+ return await response.value();
334
+ }
335
+
336
+ /**
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.
338
+ * Start signing in with a passkey
339
+ */
340
+ async getLoginPasskeyOptionsRaw(requestParameters: UsersPublicApiGetLoginPasskeyOptionsRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<PasskeyOptionsDto>> {
341
+ if (requestParameters['loginPasskeyOptionsInput'] == null) {
342
+ throw new runtime.RequiredError(
343
+ 'loginPasskeyOptionsInput',
344
+ 'Required parameter "loginPasskeyOptionsInput" was null or undefined when calling getLoginPasskeyOptions().'
345
+ );
346
+ }
347
+
348
+ const queryParameters: any = {};
349
+
350
+ const headerParameters: runtime.HTTPHeaders = {};
351
+
352
+ headerParameters['Content-Type'] = 'application/json';
353
+
354
+ const response = await this.request({
355
+ path: `/users/login/passkey/options`,
356
+ method: 'POST',
357
+ headers: headerParameters,
358
+ query: queryParameters,
359
+ body: LoginPasskeyOptionsInputToJSON(requestParameters['loginPasskeyOptionsInput']),
360
+ }, initOverrides);
361
+
362
+ return new runtime.JSONApiResponse(response, (jsonValue) => PasskeyOptionsDtoFromJSON(jsonValue));
363
+ }
364
+
365
+ /**
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.
367
+ * Start signing in with a passkey
368
+ */
369
+ async getLoginPasskeyOptions(requestParameters: UsersPublicApiGetLoginPasskeyOptionsRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<PasskeyOptionsDto> {
370
+ const response = await this.getLoginPasskeyOptionsRaw(requestParameters, initOverrides);
371
+ return await response.value();
372
+ }
373
+
374
+ /**
375
+ * 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.
146
376
  * Authenticate a seller user
147
377
  */
148
378
  async loginRaw(requestParameters: UsersPublicApiLoginRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<LoginDto>> {
@@ -171,7 +401,7 @@ export class UsersPublicApi extends runtime.BaseAPI {
171
401
  }
172
402
 
173
403
  /**
174
- * Validates email and password credentials and returns a JWT token with the user locale.
404
+ * 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.
175
405
  * Authenticate a seller user
176
406
  */
177
407
  async login(requestParameters: UsersPublicApiLoginRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<LoginDto> {
@@ -179,6 +409,194 @@ export class UsersPublicApi extends runtime.BaseAPI {
179
409
  return await response.value();
180
410
  }
181
411
 
412
+ /**
413
+ * Sign in with a passkey, or prove a later step with one
414
+ */
415
+ async loginWithPasskeyRaw(requestParameters: UsersPublicApiLoginWithPasskeyRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<LoginDto>> {
416
+ if (requestParameters['loginPasskeyInput'] == null) {
417
+ throw new runtime.RequiredError(
418
+ 'loginPasskeyInput',
419
+ 'Required parameter "loginPasskeyInput" was null or undefined when calling loginWithPasskey().'
420
+ );
421
+ }
422
+
423
+ const queryParameters: any = {};
424
+
425
+ const headerParameters: runtime.HTTPHeaders = {};
426
+
427
+ headerParameters['Content-Type'] = 'application/json';
428
+
429
+ const response = await this.request({
430
+ path: `/users/login/passkey`,
431
+ method: 'POST',
432
+ headers: headerParameters,
433
+ query: queryParameters,
434
+ body: LoginPasskeyInputToJSON(requestParameters['loginPasskeyInput']),
435
+ }, initOverrides);
436
+
437
+ return new runtime.JSONApiResponse(response, (jsonValue) => LoginDtoFromJSON(jsonValue));
438
+ }
439
+
440
+ /**
441
+ * Sign in with a passkey, or prove a later step with one
442
+ */
443
+ async loginWithPasskey(requestParameters: UsersPublicApiLoginWithPasskeyRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<LoginDto> {
444
+ const response = await this.loginWithPasskeyRaw(requestParameters, initOverrides);
445
+ return await response.value();
446
+ }
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
+
486
+ /**
487
+ * Each recovery code works once.
488
+ * Prove the second factor with a recovery code
489
+ */
490
+ async loginWithRecoveryCodeRaw(requestParameters: UsersPublicApiLoginWithRecoveryCodeRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<LoginDto>> {
491
+ if (requestParameters['loginCodeInput'] == null) {
492
+ throw new runtime.RequiredError(
493
+ 'loginCodeInput',
494
+ 'Required parameter "loginCodeInput" was null or undefined when calling loginWithRecoveryCode().'
495
+ );
496
+ }
497
+
498
+ const queryParameters: any = {};
499
+
500
+ const headerParameters: runtime.HTTPHeaders = {};
501
+
502
+ headerParameters['Content-Type'] = 'application/json';
503
+
504
+ const response = await this.request({
505
+ path: `/users/login/recovery-code`,
506
+ method: 'POST',
507
+ headers: headerParameters,
508
+ query: queryParameters,
509
+ body: LoginCodeInputToJSON(requestParameters['loginCodeInput']),
510
+ }, initOverrides);
511
+
512
+ return new runtime.JSONApiResponse(response, (jsonValue) => LoginDtoFromJSON(jsonValue));
513
+ }
514
+
515
+ /**
516
+ * Each recovery code works once.
517
+ * Prove the second factor with a recovery code
518
+ */
519
+ async loginWithRecoveryCode(requestParameters: UsersPublicApiLoginWithRecoveryCodeRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<LoginDto> {
520
+ const response = await this.loginWithRecoveryCodeRaw(requestParameters, initOverrides);
521
+ return await response.value();
522
+ }
523
+
524
+ /**
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.
526
+ * Sign in with a recovery code instead of a lost passkey
527
+ */
528
+ async loginWithRecoveryCodeInsteadOfPasskeyRaw(requestParameters: UsersPublicApiLoginWithRecoveryCodeInsteadOfPasskeyRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<LoginDto>> {
529
+ if (requestParameters['loginRecoveryCodeInput'] == null) {
530
+ throw new runtime.RequiredError(
531
+ 'loginRecoveryCodeInput',
532
+ 'Required parameter "loginRecoveryCodeInput" was null or undefined when calling loginWithRecoveryCodeInsteadOfPasskey().'
533
+ );
534
+ }
535
+
536
+ const queryParameters: any = {};
537
+
538
+ const headerParameters: runtime.HTTPHeaders = {};
539
+
540
+ headerParameters['Content-Type'] = 'application/json';
541
+
542
+ const response = await this.request({
543
+ path: `/users/login/recovery-code-instead-of-passkey`,
544
+ method: 'POST',
545
+ headers: headerParameters,
546
+ query: queryParameters,
547
+ body: LoginRecoveryCodeInputToJSON(requestParameters['loginRecoveryCodeInput']),
548
+ }, initOverrides);
549
+
550
+ return new runtime.JSONApiResponse(response, (jsonValue) => LoginDtoFromJSON(jsonValue));
551
+ }
552
+
553
+ /**
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.
555
+ * Sign in with a recovery code instead of a lost passkey
556
+ */
557
+ async loginWithRecoveryCodeInsteadOfPasskey(requestParameters: UsersPublicApiLoginWithRecoveryCodeInsteadOfPasskeyRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<LoginDto> {
558
+ const response = await this.loginWithRecoveryCodeInsteadOfPasskeyRaw(requestParameters, initOverrides);
559
+ return await response.value();
560
+ }
561
+
562
+ /**
563
+ * Accepts the code of the current period, the previous or the next one, never twice.
564
+ * Prove the second factor with an authenticator app code
565
+ */
566
+ async loginWithTotpRaw(requestParameters: UsersPublicApiLoginWithTotpRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<LoginDto>> {
567
+ if (requestParameters['loginCodeInput'] == null) {
568
+ throw new runtime.RequiredError(
569
+ 'loginCodeInput',
570
+ 'Required parameter "loginCodeInput" was null or undefined when calling loginWithTotp().'
571
+ );
572
+ }
573
+
574
+ const queryParameters: any = {};
575
+
576
+ const headerParameters: runtime.HTTPHeaders = {};
577
+
578
+ headerParameters['Content-Type'] = 'application/json';
579
+
580
+ const response = await this.request({
581
+ path: `/users/login/totp`,
582
+ method: 'POST',
583
+ headers: headerParameters,
584
+ query: queryParameters,
585
+ body: LoginCodeInputToJSON(requestParameters['loginCodeInput']),
586
+ }, initOverrides);
587
+
588
+ return new runtime.JSONApiResponse(response, (jsonValue) => LoginDtoFromJSON(jsonValue));
589
+ }
590
+
591
+ /**
592
+ * Accepts the code of the current period, the previous or the next one, never twice.
593
+ * Prove the second factor with an authenticator app code
594
+ */
595
+ async loginWithTotp(requestParameters: UsersPublicApiLoginWithTotpRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<LoginDto> {
596
+ const response = await this.loginWithTotpRaw(requestParameters, initOverrides);
597
+ return await response.value();
598
+ }
599
+
182
600
  /**
183
601
  * Completes the password reset flow by setting a new password for the user linked to the reset request.
184
602
  * 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
+