@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
@@ -10,16 +10,45 @@
10
10
  * Do not edit the class manually.
11
11
  */
12
12
  import * as runtime from '../runtime';
13
- import type { ForgotPasswordRequestInput, LoginDto, LoginInput, NotificationsUnsubscribeResultDto, SetNewPasswordInput, 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
+ export interface UsersPublicApiConfirmLoginLocationRequest {
15
+ confirmationId: string;
16
+ confirmLoginLocationInput: ConfirmLoginLocationInput;
17
+ }
14
18
  export interface UsersPublicApiForgotPasswordRequestRequest {
15
19
  forgotPasswordRequestInput: ForgotPasswordRequestInput;
16
20
  }
17
21
  export interface UsersPublicApiGetForgotPasswordRequestRequest {
18
22
  passwordRequestId: string;
19
23
  }
24
+ export interface UsersPublicApiGetLoginLocationConfirmationDetailsRequest {
25
+ confirmationId: string;
26
+ confirmLoginLocationInput: ConfirmLoginLocationInput;
27
+ }
28
+ export interface UsersPublicApiGetLoginLocationConfirmationStatusRequest {
29
+ loginChallengeInput: LoginChallengeInput;
30
+ }
31
+ export interface UsersPublicApiGetLoginPasskeyOptionsRequest {
32
+ loginPasskeyOptionsInput: LoginPasskeyOptionsInput;
33
+ }
20
34
  export interface UsersPublicApiLoginRequest {
21
35
  loginInput: LoginInput;
22
36
  }
37
+ export interface UsersPublicApiLoginWithPasskeyRequest {
38
+ loginPasskeyInput: LoginPasskeyInput;
39
+ }
40
+ export interface UsersPublicApiLoginWithPasswordStepRequest {
41
+ loginPasswordInput: LoginPasswordInput;
42
+ }
43
+ export interface UsersPublicApiLoginWithRecoveryCodeRequest {
44
+ loginCodeInput: LoginCodeInput;
45
+ }
46
+ export interface UsersPublicApiLoginWithRecoveryCodeInsteadOfPasskeyRequest {
47
+ loginRecoveryCodeInput: LoginRecoveryCodeInput;
48
+ }
49
+ export interface UsersPublicApiLoginWithTotpRequest {
50
+ loginCodeInput: LoginCodeInput;
51
+ }
23
52
  export interface UsersPublicApiPostNewPasswordRequest {
24
53
  passwordRequestId: string;
25
54
  setNewPasswordInput: SetNewPasswordInput;
@@ -31,6 +60,16 @@ export interface UsersPublicApiUnsubscribeFromNotificationsByTokenRequest {
31
60
  *
32
61
  */
33
62
  export declare class UsersPublicApi extends runtime.BaseAPI {
63
+ /**
64
+ * Called by the page the email links to. It only approves the sign-in: no session is returned here.
65
+ * Approve a sign-in from a new location
66
+ */
67
+ confirmLoginLocationRaw(requestParameters: UsersPublicApiConfirmLoginLocationRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<void>>;
68
+ /**
69
+ * Called by the page the email links to. It only approves the sign-in: no session is returned here.
70
+ * Approve a sign-in from a new location
71
+ */
72
+ confirmLoginLocation(requestParameters: UsersPublicApiConfirmLoginLocationRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<void>;
34
73
  /**
35
74
  * Creates a password reset request and sends a reset link to the provided email address.
36
75
  * Request a password reset email
@@ -52,15 +91,93 @@ export declare class UsersPublicApi extends runtime.BaseAPI {
52
91
  */
53
92
  getForgotPasswordRequest(requestParameters: UsersPublicApiGetForgotPasswordRequestRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<UserPasswordResetDto>;
54
93
  /**
55
- * Validates email and password credentials and returns a JWT token with the user locale.
94
+ * 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.
95
+ * See the sign-in an email link asks to approve
96
+ */
97
+ getLoginLocationConfirmationDetailsRaw(requestParameters: UsersPublicApiGetLoginLocationConfirmationDetailsRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<UserLoginLocationConfirmationDetailsDto>>;
98
+ /**
99
+ * 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.
100
+ * See the sign-in an email link asks to approve
101
+ */
102
+ getLoginLocationConfirmationDetails(requestParameters: UsersPublicApiGetLoginLocationConfirmationDetailsRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<UserLoginLocationConfirmationDetailsDto>;
103
+ /**
104
+ * 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.
105
+ * Wait for the email confirming a new location
106
+ */
107
+ getLoginLocationConfirmationStatusRaw(requestParameters: UsersPublicApiGetLoginLocationConfirmationStatusRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<LoginDto>>;
108
+ /**
109
+ * 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.
110
+ * Wait for the email confirming a new location
111
+ */
112
+ getLoginLocationConfirmationStatus(requestParameters: UsersPublicApiGetLoginLocationConfirmationStatusRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<LoginDto>;
113
+ /**
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.
115
+ * Start signing in with a passkey
116
+ */
117
+ getLoginPasskeyOptionsRaw(requestParameters: UsersPublicApiGetLoginPasskeyOptionsRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<PasskeyOptionsDto>>;
118
+ /**
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.
120
+ * Start signing in with a passkey
121
+ */
122
+ getLoginPasskeyOptions(requestParameters: UsersPublicApiGetLoginPasskeyOptionsRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<PasskeyOptionsDto>;
123
+ /**
124
+ * 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.
56
125
  * Authenticate a seller user
57
126
  */
58
127
  loginRaw(requestParameters: UsersPublicApiLoginRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<LoginDto>>;
59
128
  /**
60
- * Validates email and password credentials and returns a JWT token with the user locale.
129
+ * 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.
61
130
  * Authenticate a seller user
62
131
  */
63
132
  login(requestParameters: UsersPublicApiLoginRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<LoginDto>;
133
+ /**
134
+ * Sign in with a passkey, or prove a later step with one
135
+ */
136
+ loginWithPasskeyRaw(requestParameters: UsersPublicApiLoginWithPasskeyRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<LoginDto>>;
137
+ /**
138
+ * Sign in with a passkey, or prove a later step with one
139
+ */
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>;
151
+ /**
152
+ * Each recovery code works once.
153
+ * Prove the second factor with a recovery code
154
+ */
155
+ loginWithRecoveryCodeRaw(requestParameters: UsersPublicApiLoginWithRecoveryCodeRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<LoginDto>>;
156
+ /**
157
+ * Each recovery code works once.
158
+ * Prove the second factor with a recovery code
159
+ */
160
+ loginWithRecoveryCode(requestParameters: UsersPublicApiLoginWithRecoveryCodeRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<LoginDto>;
161
+ /**
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.
163
+ * Sign in with a recovery code instead of a lost passkey
164
+ */
165
+ loginWithRecoveryCodeInsteadOfPasskeyRaw(requestParameters: UsersPublicApiLoginWithRecoveryCodeInsteadOfPasskeyRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<LoginDto>>;
166
+ /**
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.
168
+ * Sign in with a recovery code instead of a lost passkey
169
+ */
170
+ loginWithRecoveryCodeInsteadOfPasskey(requestParameters: UsersPublicApiLoginWithRecoveryCodeInsteadOfPasskeyRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<LoginDto>;
171
+ /**
172
+ * Accepts the code of the current period, the previous or the next one, never twice.
173
+ * Prove the second factor with an authenticator app code
174
+ */
175
+ loginWithTotpRaw(requestParameters: UsersPublicApiLoginWithTotpRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<LoginDto>>;
176
+ /**
177
+ * Accepts the code of the current period, the previous or the next one, never twice.
178
+ * Prove the second factor with an authenticator app code
179
+ */
180
+ loginWithTotp(requestParameters: UsersPublicApiLoginWithTotpRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<LoginDto>;
64
181
  /**
65
182
  * Completes the password reset flow by setting a new password for the user linked to the reset request.
66
183
  * Set a new password from reset request
@@ -75,6 +75,55 @@ var UsersPublicApi = /** @class */ (function (_super) {
75
75
  function UsersPublicApi() {
76
76
  return _super !== null && _super.apply(this, arguments) || this;
77
77
  }
78
+ /**
79
+ * Called by the page the email links to. It only approves the sign-in: no session is returned here.
80
+ * Approve a sign-in from a new location
81
+ */
82
+ UsersPublicApi.prototype.confirmLoginLocationRaw = function (requestParameters, initOverrides) {
83
+ return __awaiter(this, void 0, void 0, function () {
84
+ var queryParameters, headerParameters, response;
85
+ return __generator(this, function (_a) {
86
+ switch (_a.label) {
87
+ case 0:
88
+ if (requestParameters['confirmationId'] == null) {
89
+ throw new runtime.RequiredError('confirmationId', 'Required parameter "confirmationId" was null or undefined when calling confirmLoginLocation().');
90
+ }
91
+ if (requestParameters['confirmLoginLocationInput'] == null) {
92
+ throw new runtime.RequiredError('confirmLoginLocationInput', 'Required parameter "confirmLoginLocationInput" was null or undefined when calling confirmLoginLocation().');
93
+ }
94
+ queryParameters = {};
95
+ headerParameters = {};
96
+ headerParameters['Content-Type'] = 'application/json';
97
+ return [4 /*yield*/, this.request({
98
+ path: "/users/login/location-confirmation/{confirmationId}/confirm".replace("{".concat("confirmationId", "}"), encodeURIComponent(String(requestParameters['confirmationId']))),
99
+ method: 'POST',
100
+ headers: headerParameters,
101
+ query: queryParameters,
102
+ body: (0, index_1.ConfirmLoginLocationInputToJSON)(requestParameters['confirmLoginLocationInput']),
103
+ }, initOverrides)];
104
+ case 1:
105
+ response = _a.sent();
106
+ return [2 /*return*/, new runtime.VoidApiResponse(response)];
107
+ }
108
+ });
109
+ });
110
+ };
111
+ /**
112
+ * Called by the page the email links to. It only approves the sign-in: no session is returned here.
113
+ * Approve a sign-in from a new location
114
+ */
115
+ UsersPublicApi.prototype.confirmLoginLocation = function (requestParameters, initOverrides) {
116
+ return __awaiter(this, void 0, void 0, function () {
117
+ return __generator(this, function (_a) {
118
+ switch (_a.label) {
119
+ case 0: return [4 /*yield*/, this.confirmLoginLocationRaw(requestParameters, initOverrides)];
120
+ case 1:
121
+ _a.sent();
122
+ return [2 /*return*/];
123
+ }
124
+ });
125
+ });
126
+ };
78
127
  /**
79
128
  * Creates a password reset request and sends a reset link to the provided email address.
80
129
  * Request a password reset email
@@ -168,7 +217,154 @@ var UsersPublicApi = /** @class */ (function (_super) {
168
217
  });
169
218
  };
170
219
  /**
171
- * Validates email and password credentials and returns a JWT token with the user locale.
220
+ * 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.
221
+ * See the sign-in an email link asks to approve
222
+ */
223
+ UsersPublicApi.prototype.getLoginLocationConfirmationDetailsRaw = function (requestParameters, initOverrides) {
224
+ return __awaiter(this, void 0, void 0, function () {
225
+ var queryParameters, headerParameters, response;
226
+ return __generator(this, function (_a) {
227
+ switch (_a.label) {
228
+ case 0:
229
+ if (requestParameters['confirmationId'] == null) {
230
+ throw new runtime.RequiredError('confirmationId', 'Required parameter "confirmationId" was null or undefined when calling getLoginLocationConfirmationDetails().');
231
+ }
232
+ if (requestParameters['confirmLoginLocationInput'] == null) {
233
+ throw new runtime.RequiredError('confirmLoginLocationInput', 'Required parameter "confirmLoginLocationInput" was null or undefined when calling getLoginLocationConfirmationDetails().');
234
+ }
235
+ queryParameters = {};
236
+ headerParameters = {};
237
+ headerParameters['Content-Type'] = 'application/json';
238
+ return [4 /*yield*/, this.request({
239
+ path: "/users/login/location-confirmation/{confirmationId}/details".replace("{".concat("confirmationId", "}"), encodeURIComponent(String(requestParameters['confirmationId']))),
240
+ method: 'POST',
241
+ headers: headerParameters,
242
+ query: queryParameters,
243
+ body: (0, index_1.ConfirmLoginLocationInputToJSON)(requestParameters['confirmLoginLocationInput']),
244
+ }, initOverrides)];
245
+ case 1:
246
+ response = _a.sent();
247
+ return [2 /*return*/, new runtime.JSONApiResponse(response, function (jsonValue) { return (0, index_1.UserLoginLocationConfirmationDetailsDtoFromJSON)(jsonValue); })];
248
+ }
249
+ });
250
+ });
251
+ };
252
+ /**
253
+ * 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.
254
+ * See the sign-in an email link asks to approve
255
+ */
256
+ UsersPublicApi.prototype.getLoginLocationConfirmationDetails = function (requestParameters, initOverrides) {
257
+ return __awaiter(this, void 0, void 0, function () {
258
+ var response;
259
+ return __generator(this, function (_a) {
260
+ switch (_a.label) {
261
+ case 0: return [4 /*yield*/, this.getLoginLocationConfirmationDetailsRaw(requestParameters, initOverrides)];
262
+ case 1:
263
+ response = _a.sent();
264
+ return [4 /*yield*/, response.value()];
265
+ case 2: return [2 /*return*/, _a.sent()];
266
+ }
267
+ });
268
+ });
269
+ };
270
+ /**
271
+ * 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.
272
+ * Wait for the email confirming a new location
273
+ */
274
+ UsersPublicApi.prototype.getLoginLocationConfirmationStatusRaw = function (requestParameters, initOverrides) {
275
+ return __awaiter(this, void 0, void 0, function () {
276
+ var queryParameters, headerParameters, response;
277
+ return __generator(this, function (_a) {
278
+ switch (_a.label) {
279
+ case 0:
280
+ if (requestParameters['loginChallengeInput'] == null) {
281
+ throw new runtime.RequiredError('loginChallengeInput', 'Required parameter "loginChallengeInput" was null or undefined when calling getLoginLocationConfirmationStatus().');
282
+ }
283
+ queryParameters = {};
284
+ headerParameters = {};
285
+ headerParameters['Content-Type'] = 'application/json';
286
+ return [4 /*yield*/, this.request({
287
+ path: "/users/login/location-confirmation/status",
288
+ method: 'POST',
289
+ headers: headerParameters,
290
+ query: queryParameters,
291
+ body: (0, index_1.LoginChallengeInputToJSON)(requestParameters['loginChallengeInput']),
292
+ }, initOverrides)];
293
+ case 1:
294
+ response = _a.sent();
295
+ return [2 /*return*/, new runtime.JSONApiResponse(response, function (jsonValue) { return (0, index_1.LoginDtoFromJSON)(jsonValue); })];
296
+ }
297
+ });
298
+ });
299
+ };
300
+ /**
301
+ * 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.
302
+ * Wait for the email confirming a new location
303
+ */
304
+ UsersPublicApi.prototype.getLoginLocationConfirmationStatus = function (requestParameters, initOverrides) {
305
+ return __awaiter(this, void 0, void 0, function () {
306
+ var response;
307
+ return __generator(this, function (_a) {
308
+ switch (_a.label) {
309
+ case 0: return [4 /*yield*/, this.getLoginLocationConfirmationStatusRaw(requestParameters, initOverrides)];
310
+ case 1:
311
+ response = _a.sent();
312
+ return [4 /*yield*/, response.value()];
313
+ case 2: return [2 /*return*/, _a.sent()];
314
+ }
315
+ });
316
+ });
317
+ };
318
+ /**
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
+ * Start signing in with a passkey
321
+ */
322
+ UsersPublicApi.prototype.getLoginPasskeyOptionsRaw = function (requestParameters, initOverrides) {
323
+ return __awaiter(this, void 0, void 0, function () {
324
+ var queryParameters, headerParameters, response;
325
+ return __generator(this, function (_a) {
326
+ switch (_a.label) {
327
+ case 0:
328
+ if (requestParameters['loginPasskeyOptionsInput'] == null) {
329
+ throw new runtime.RequiredError('loginPasskeyOptionsInput', 'Required parameter "loginPasskeyOptionsInput" was null or undefined when calling getLoginPasskeyOptions().');
330
+ }
331
+ queryParameters = {};
332
+ headerParameters = {};
333
+ headerParameters['Content-Type'] = 'application/json';
334
+ return [4 /*yield*/, this.request({
335
+ path: "/users/login/passkey/options",
336
+ method: 'POST',
337
+ headers: headerParameters,
338
+ query: queryParameters,
339
+ body: (0, index_1.LoginPasskeyOptionsInputToJSON)(requestParameters['loginPasskeyOptionsInput']),
340
+ }, initOverrides)];
341
+ case 1:
342
+ response = _a.sent();
343
+ return [2 /*return*/, new runtime.JSONApiResponse(response, function (jsonValue) { return (0, index_1.PasskeyOptionsDtoFromJSON)(jsonValue); })];
344
+ }
345
+ });
346
+ });
347
+ };
348
+ /**
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
+ * Start signing in with a passkey
351
+ */
352
+ UsersPublicApi.prototype.getLoginPasskeyOptions = function (requestParameters, initOverrides) {
353
+ return __awaiter(this, void 0, void 0, function () {
354
+ var response;
355
+ return __generator(this, function (_a) {
356
+ switch (_a.label) {
357
+ case 0: return [4 /*yield*/, this.getLoginPasskeyOptionsRaw(requestParameters, initOverrides)];
358
+ case 1:
359
+ response = _a.sent();
360
+ return [4 /*yield*/, response.value()];
361
+ case 2: return [2 /*return*/, _a.sent()];
362
+ }
363
+ });
364
+ });
365
+ };
366
+ /**
367
+ * 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.
172
368
  * Authenticate a seller user
173
369
  */
174
370
  UsersPublicApi.prototype.loginRaw = function (requestParameters, initOverrides) {
@@ -198,7 +394,7 @@ var UsersPublicApi = /** @class */ (function (_super) {
198
394
  });
199
395
  };
200
396
  /**
201
- * Validates email and password credentials and returns a JWT token with the user locale.
397
+ * Validates email and password. Returns the session token, or a challenge token and the next step: a second factor, setting up an authenticator app, or confirming a new location by email.
202
398
  * Authenticate a seller user
203
399
  */
204
400
  UsersPublicApi.prototype.login = function (requestParameters, initOverrides) {
@@ -215,6 +411,244 @@ var UsersPublicApi = /** @class */ (function (_super) {
215
411
  });
216
412
  });
217
413
  };
414
+ /**
415
+ * Sign in with a passkey, or prove a later step with one
416
+ */
417
+ UsersPublicApi.prototype.loginWithPasskeyRaw = function (requestParameters, initOverrides) {
418
+ return __awaiter(this, void 0, void 0, function () {
419
+ var queryParameters, headerParameters, response;
420
+ return __generator(this, function (_a) {
421
+ switch (_a.label) {
422
+ case 0:
423
+ if (requestParameters['loginPasskeyInput'] == null) {
424
+ throw new runtime.RequiredError('loginPasskeyInput', 'Required parameter "loginPasskeyInput" was null or undefined when calling loginWithPasskey().');
425
+ }
426
+ queryParameters = {};
427
+ headerParameters = {};
428
+ headerParameters['Content-Type'] = 'application/json';
429
+ return [4 /*yield*/, this.request({
430
+ path: "/users/login/passkey",
431
+ method: 'POST',
432
+ headers: headerParameters,
433
+ query: queryParameters,
434
+ body: (0, index_1.LoginPasskeyInputToJSON)(requestParameters['loginPasskeyInput']),
435
+ }, initOverrides)];
436
+ case 1:
437
+ response = _a.sent();
438
+ return [2 /*return*/, new runtime.JSONApiResponse(response, function (jsonValue) { return (0, index_1.LoginDtoFromJSON)(jsonValue); })];
439
+ }
440
+ });
441
+ });
442
+ };
443
+ /**
444
+ * Sign in with a passkey, or prove a later step with one
445
+ */
446
+ UsersPublicApi.prototype.loginWithPasskey = function (requestParameters, initOverrides) {
447
+ return __awaiter(this, void 0, void 0, function () {
448
+ var response;
449
+ return __generator(this, function (_a) {
450
+ switch (_a.label) {
451
+ case 0: return [4 /*yield*/, this.loginWithPasskeyRaw(requestParameters, initOverrides)];
452
+ case 1:
453
+ response = _a.sent();
454
+ return [4 /*yield*/, response.value()];
455
+ case 2: return [2 /*return*/, _a.sent()];
456
+ }
457
+ });
458
+ });
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
+ };
508
+ /**
509
+ * Each recovery code works once.
510
+ * Prove the second factor with a recovery code
511
+ */
512
+ UsersPublicApi.prototype.loginWithRecoveryCodeRaw = function (requestParameters, initOverrides) {
513
+ return __awaiter(this, void 0, void 0, function () {
514
+ var queryParameters, headerParameters, response;
515
+ return __generator(this, function (_a) {
516
+ switch (_a.label) {
517
+ case 0:
518
+ if (requestParameters['loginCodeInput'] == null) {
519
+ throw new runtime.RequiredError('loginCodeInput', 'Required parameter "loginCodeInput" was null or undefined when calling loginWithRecoveryCode().');
520
+ }
521
+ queryParameters = {};
522
+ headerParameters = {};
523
+ headerParameters['Content-Type'] = 'application/json';
524
+ return [4 /*yield*/, this.request({
525
+ path: "/users/login/recovery-code",
526
+ method: 'POST',
527
+ headers: headerParameters,
528
+ query: queryParameters,
529
+ body: (0, index_1.LoginCodeInputToJSON)(requestParameters['loginCodeInput']),
530
+ }, initOverrides)];
531
+ case 1:
532
+ response = _a.sent();
533
+ return [2 /*return*/, new runtime.JSONApiResponse(response, function (jsonValue) { return (0, index_1.LoginDtoFromJSON)(jsonValue); })];
534
+ }
535
+ });
536
+ });
537
+ };
538
+ /**
539
+ * Each recovery code works once.
540
+ * Prove the second factor with a recovery code
541
+ */
542
+ UsersPublicApi.prototype.loginWithRecoveryCode = function (requestParameters, initOverrides) {
543
+ return __awaiter(this, void 0, void 0, function () {
544
+ var response;
545
+ return __generator(this, function (_a) {
546
+ switch (_a.label) {
547
+ case 0: return [4 /*yield*/, this.loginWithRecoveryCodeRaw(requestParameters, initOverrides)];
548
+ case 1:
549
+ response = _a.sent();
550
+ return [4 /*yield*/, response.value()];
551
+ case 2: return [2 /*return*/, _a.sent()];
552
+ }
553
+ });
554
+ });
555
+ };
556
+ /**
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.
558
+ * Sign in with a recovery code instead of a lost passkey
559
+ */
560
+ UsersPublicApi.prototype.loginWithRecoveryCodeInsteadOfPasskeyRaw = function (requestParameters, initOverrides) {
561
+ return __awaiter(this, void 0, void 0, function () {
562
+ var queryParameters, headerParameters, response;
563
+ return __generator(this, function (_a) {
564
+ switch (_a.label) {
565
+ case 0:
566
+ if (requestParameters['loginRecoveryCodeInput'] == null) {
567
+ throw new runtime.RequiredError('loginRecoveryCodeInput', 'Required parameter "loginRecoveryCodeInput" was null or undefined when calling loginWithRecoveryCodeInsteadOfPasskey().');
568
+ }
569
+ queryParameters = {};
570
+ headerParameters = {};
571
+ headerParameters['Content-Type'] = 'application/json';
572
+ return [4 /*yield*/, this.request({
573
+ path: "/users/login/recovery-code-instead-of-passkey",
574
+ method: 'POST',
575
+ headers: headerParameters,
576
+ query: queryParameters,
577
+ body: (0, index_1.LoginRecoveryCodeInputToJSON)(requestParameters['loginRecoveryCodeInput']),
578
+ }, initOverrides)];
579
+ case 1:
580
+ response = _a.sent();
581
+ return [2 /*return*/, new runtime.JSONApiResponse(response, function (jsonValue) { return (0, index_1.LoginDtoFromJSON)(jsonValue); })];
582
+ }
583
+ });
584
+ });
585
+ };
586
+ /**
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.
588
+ * Sign in with a recovery code instead of a lost passkey
589
+ */
590
+ UsersPublicApi.prototype.loginWithRecoveryCodeInsteadOfPasskey = function (requestParameters, initOverrides) {
591
+ return __awaiter(this, void 0, void 0, function () {
592
+ var response;
593
+ return __generator(this, function (_a) {
594
+ switch (_a.label) {
595
+ case 0: return [4 /*yield*/, this.loginWithRecoveryCodeInsteadOfPasskeyRaw(requestParameters, initOverrides)];
596
+ case 1:
597
+ response = _a.sent();
598
+ return [4 /*yield*/, response.value()];
599
+ case 2: return [2 /*return*/, _a.sent()];
600
+ }
601
+ });
602
+ });
603
+ };
604
+ /**
605
+ * Accepts the code of the current period, the previous or the next one, never twice.
606
+ * Prove the second factor with an authenticator app code
607
+ */
608
+ UsersPublicApi.prototype.loginWithTotpRaw = function (requestParameters, initOverrides) {
609
+ return __awaiter(this, void 0, void 0, function () {
610
+ var queryParameters, headerParameters, response;
611
+ return __generator(this, function (_a) {
612
+ switch (_a.label) {
613
+ case 0:
614
+ if (requestParameters['loginCodeInput'] == null) {
615
+ throw new runtime.RequiredError('loginCodeInput', 'Required parameter "loginCodeInput" was null or undefined when calling loginWithTotp().');
616
+ }
617
+ queryParameters = {};
618
+ headerParameters = {};
619
+ headerParameters['Content-Type'] = 'application/json';
620
+ return [4 /*yield*/, this.request({
621
+ path: "/users/login/totp",
622
+ method: 'POST',
623
+ headers: headerParameters,
624
+ query: queryParameters,
625
+ body: (0, index_1.LoginCodeInputToJSON)(requestParameters['loginCodeInput']),
626
+ }, initOverrides)];
627
+ case 1:
628
+ response = _a.sent();
629
+ return [2 /*return*/, new runtime.JSONApiResponse(response, function (jsonValue) { return (0, index_1.LoginDtoFromJSON)(jsonValue); })];
630
+ }
631
+ });
632
+ });
633
+ };
634
+ /**
635
+ * Accepts the code of the current period, the previous or the next one, never twice.
636
+ * Prove the second factor with an authenticator app code
637
+ */
638
+ UsersPublicApi.prototype.loginWithTotp = function (requestParameters, initOverrides) {
639
+ return __awaiter(this, void 0, void 0, function () {
640
+ var response;
641
+ return __generator(this, function (_a) {
642
+ switch (_a.label) {
643
+ case 0: return [4 /*yield*/, this.loginWithTotpRaw(requestParameters, initOverrides)];
644
+ case 1:
645
+ response = _a.sent();
646
+ return [4 /*yield*/, response.value()];
647
+ case 2: return [2 /*return*/, _a.sent()];
648
+ }
649
+ });
650
+ });
651
+ };
218
652
  /**
219
653
  * Completes the password reset flow by setting a new password for the user linked to the reset request.
220
654
  * Set a new password from reset request
@@ -0,0 +1,32 @@
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 ActivateUserTotpInput
16
+ */
17
+ export interface ActivateUserTotpInput {
18
+ /**
19
+ * Code the authenticator app shows, to prove it was set up.
20
+ * @type {string}
21
+ * @memberof ActivateUserTotpInput
22
+ */
23
+ code: string;
24
+ }
25
+ /**
26
+ * Check if a given object implements the ActivateUserTotpInput interface.
27
+ */
28
+ export declare function instanceOfActivateUserTotpInput(value: object): value is ActivateUserTotpInput;
29
+ export declare function ActivateUserTotpInputFromJSON(json: any): ActivateUserTotpInput;
30
+ export declare function ActivateUserTotpInputFromJSONTyped(json: any, ignoreDiscriminator: boolean): ActivateUserTotpInput;
31
+ export declare function ActivateUserTotpInputToJSON(json: any): ActivateUserTotpInput;
32
+ export declare function ActivateUserTotpInputToJSONTyped(value?: ActivateUserTotpInput | null, ignoreDiscriminator?: boolean): any;