@wildix/xbees-users-client 4.3.2 → 4.3.3-wms26787.2

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 (42) hide show
  1. package/dist-cjs/Users.js +10 -6
  2. package/dist-cjs/auth/httpAuthSchemeProvider.js +30 -17
  3. package/dist-cjs/commands/{LinkIdentityCommand.js → ApplyIdentityRemovalCommand.js} +6 -6
  4. package/dist-cjs/commands/ConfirmIdentityChallengeCommand.js +20 -0
  5. package/dist-cjs/commands/ResendIdentityChallengeCodeCommand.js +20 -0
  6. package/dist-cjs/commands/{UnlinkIdentityCommand.js → ResetUserChatHistoryCommand.js} +6 -6
  7. package/dist-cjs/commands/{VerifyIdentityCommand.js → StartIdentityChallengeCommand.js} +6 -6
  8. package/dist-cjs/commands/index.js +5 -3
  9. package/dist-cjs/models/enums.js +17 -1
  10. package/dist-cjs/models/errors.js +106 -24
  11. package/dist-cjs/schemas/schemas_0.js +199 -85
  12. package/dist-es/Users.js +10 -6
  13. package/dist-es/auth/httpAuthSchemeProvider.js +30 -17
  14. package/dist-es/commands/{UnlinkIdentityCommand.js → ApplyIdentityRemovalCommand.js} +5 -5
  15. package/dist-es/commands/ConfirmIdentityChallengeCommand.js +16 -0
  16. package/dist-es/commands/ResendIdentityChallengeCodeCommand.js +16 -0
  17. package/dist-es/commands/{VerifyIdentityCommand.js → ResetUserChatHistoryCommand.js} +5 -5
  18. package/dist-es/commands/{LinkIdentityCommand.js → StartIdentityChallengeCommand.js} +5 -5
  19. package/dist-es/commands/index.js +5 -3
  20. package/dist-es/models/enums.js +16 -0
  21. package/dist-es/models/errors.js +96 -20
  22. package/dist-es/schemas/schemas_0.js +195 -81
  23. package/dist-types/Users.d.ts +35 -21
  24. package/dist-types/UsersClient.d.ts +7 -5
  25. package/dist-types/commands/ApplyIdentityRemovalCommand.d.ts +93 -0
  26. package/dist-types/commands/ConfirmIdentityChallengeCommand.d.ts +138 -0
  27. package/dist-types/commands/ListIdentitiesCommand.d.ts +4 -2
  28. package/dist-types/commands/QueryUserCommand.d.ts +1 -1
  29. package/dist-types/commands/QueryUsersCommand.d.ts +1 -1
  30. package/dist-types/commands/ResendIdentityChallengeCodeCommand.d.ts +96 -0
  31. package/dist-types/commands/ResetUserChatHistoryCommand.d.ts +89 -0
  32. package/dist-types/commands/StartIdentityChallengeCommand.d.ts +139 -0
  33. package/dist-types/commands/UpdateAccountCommand.d.ts +2 -1
  34. package/dist-types/commands/index.d.ts +5 -3
  35. package/dist-types/models/enums.d.ts +70 -0
  36. package/dist-types/models/errors.d.ts +102 -17
  37. package/dist-types/models/models_0.d.ts +302 -83
  38. package/dist-types/schemas/schemas_0.d.ts +24 -9
  39. package/package.json +5 -5
  40. package/dist-types/commands/LinkIdentityCommand.d.ts +0 -89
  41. package/dist-types/commands/UnlinkIdentityCommand.d.ts +0 -85
  42. package/dist-types/commands/VerifyIdentityCommand.d.ts +0 -90
@@ -0,0 +1,89 @@
1
+ import { Command as $Command } from "@smithy/core/client";
2
+ import type { MetadataBearer as __MetadataBearer } from "@smithy/types";
3
+ import type { ResetUserChatHistoryInput, ResetUserChatHistoryOutput } from "../models/models_0";
4
+ import type { ServiceInputTypes, ServiceOutputTypes, UsersClientResolvedConfig } from "../UsersClient";
5
+ /**
6
+ * @public
7
+ */
8
+ export type { __MetadataBearer };
9
+ export { $Command };
10
+ /**
11
+ * @public
12
+ *
13
+ * The input for {@link ResetUserChatHistoryCommand}.
14
+ */
15
+ export interface ResetUserChatHistoryCommandInput extends ResetUserChatHistoryInput {
16
+ }
17
+ /**
18
+ * @public
19
+ *
20
+ * The output of {@link ResetUserChatHistoryCommand}.
21
+ */
22
+ export interface ResetUserChatHistoryCommandOutput extends ResetUserChatHistoryOutput, __MetadataBearer {
23
+ }
24
+ declare const ResetUserChatHistoryCommand_base: {
25
+ new (input: ResetUserChatHistoryCommandInput): import("@smithy/core/client").CommandImpl<ResetUserChatHistoryCommandInput, ResetUserChatHistoryCommandOutput, UsersClientResolvedConfig, ServiceInputTypes, ServiceOutputTypes>;
26
+ new (input: ResetUserChatHistoryCommandInput): import("@smithy/core/client").CommandImpl<ResetUserChatHistoryCommandInput, ResetUserChatHistoryCommandOutput, UsersClientResolvedConfig, ServiceInputTypes, ServiceOutputTypes>;
27
+ getEndpointParameterInstructions(): import("@smithy/types").EndpointParameterInstructions;
28
+ };
29
+ /**
30
+ * Starts a PBX user's x-bees history over when a PBX admin removes the user with their chat history. Every workspace of the caller's company linked to this PBX user, or reached by the given email or mobile phone, is marked deleted. When the user stays on the PBX, a new work workspace is created for each affected account first and becomes its default. Available only with PBX authorization: the company comes from the token. A request repeated with the same requestId within 24 hours returns the first result.
31
+ * @example
32
+ * Use a bare-bones client and the command you need to make an API call.
33
+ * ```javascript
34
+ * import { UsersClient, ResetUserChatHistoryCommand } from "@wildix/xbees-users-client"; // ES Modules import
35
+ * // const { UsersClient, ResetUserChatHistoryCommand } = require("@wildix/xbees-users-client"); // CommonJS import
36
+ * // import type { UsersClientConfig } from "@wildix/xbees-users-client";
37
+ * const config = {}; // type is UsersClientConfig
38
+ * const client = new UsersClient(config);
39
+ * const input = { // ResetUserChatHistoryInput
40
+ * requestId: "STRING_VALUE", // required
41
+ * pbxUserId: "STRING_VALUE", // required
42
+ * email: "STRING_VALUE",
43
+ * mobilePhone: "STRING_VALUE",
44
+ * userRemains: true || false, // required
45
+ * };
46
+ * const command = new ResetUserChatHistoryCommand(input);
47
+ * const response = await client.send(command);
48
+ * // { // ResetUserChatHistoryOutput
49
+ * // deletedWorkspaceIds: [ // UsersIdList // required
50
+ * // "STRING_VALUE",
51
+ * // ],
52
+ * // createdWorkspaceIds: [ // required
53
+ * // "STRING_VALUE",
54
+ * // ],
55
+ * // };
56
+ *
57
+ * ```
58
+ *
59
+ * @param ResetUserChatHistoryCommandInput - {@link ResetUserChatHistoryCommandInput}
60
+ * @returns {@link ResetUserChatHistoryCommandOutput}
61
+ * @see {@link ResetUserChatHistoryCommandInput} for command's `input` shape.
62
+ * @see {@link ResetUserChatHistoryCommandOutput} for command's `response` shape.
63
+ * @see {@link UsersClientResolvedConfig | config} for UsersClient's `config` shape.
64
+ *
65
+ * @throws {@link ForbiddenException} (client fault)
66
+ *
67
+ * @throws {@link ValidationException} (client fault)
68
+ *
69
+ * @throws {@link RateLimitExceededException} (client fault)
70
+ *
71
+ * @throws {@link UsersServiceException}
72
+ * <p>Base exception class for all service exceptions from Users service.</p>
73
+ *
74
+ *
75
+ * @public
76
+ */
77
+ export declare class ResetUserChatHistoryCommand extends ResetUserChatHistoryCommand_base {
78
+ /** @internal type navigation helper, not in runtime. */
79
+ protected static __types: {
80
+ api: {
81
+ input: ResetUserChatHistoryInput;
82
+ output: ResetUserChatHistoryOutput;
83
+ };
84
+ sdk: {
85
+ input: ResetUserChatHistoryCommandInput;
86
+ output: ResetUserChatHistoryCommandOutput;
87
+ };
88
+ };
89
+ }
@@ -0,0 +1,139 @@
1
+ import { Command as $Command } from "@smithy/core/client";
2
+ import type { MetadataBearer as __MetadataBearer } from "@smithy/types";
3
+ import type { StartIdentityChallengeInput, StartIdentityChallengeOutput } from "../models/models_0";
4
+ import type { ServiceInputTypes, ServiceOutputTypes, UsersClientResolvedConfig } from "../UsersClient";
5
+ /**
6
+ * @public
7
+ */
8
+ export type { __MetadataBearer };
9
+ export { $Command };
10
+ /**
11
+ * @public
12
+ *
13
+ * The input for {@link StartIdentityChallengeCommand}.
14
+ */
15
+ export interface StartIdentityChallengeCommandInput extends StartIdentityChallengeInput {
16
+ }
17
+ /**
18
+ * @public
19
+ *
20
+ * The output of {@link StartIdentityChallengeCommand}.
21
+ */
22
+ export interface StartIdentityChallengeCommandOutput extends StartIdentityChallengeOutput, __MetadataBearer {
23
+ }
24
+ declare const StartIdentityChallengeCommand_base: {
25
+ new (input: StartIdentityChallengeCommandInput): import("@smithy/core/client").CommandImpl<StartIdentityChallengeCommandInput, StartIdentityChallengeCommandOutput, UsersClientResolvedConfig, ServiceInputTypes, ServiceOutputTypes>;
26
+ new (input: StartIdentityChallengeCommandInput): import("@smithy/core/client").CommandImpl<StartIdentityChallengeCommandInput, StartIdentityChallengeCommandOutput, UsersClientResolvedConfig, ServiceInputTypes, ServiceOutputTypes>;
27
+ getEndpointParameterInstructions(): import("@smithy/types").EndpointParameterInstructions;
28
+ };
29
+ /**
30
+ * Starts a change of the account's sign-in methods. Every change is confirmed with codes; there is no confirmation window, so each change asks for new codes.
31
+ *
32
+ * The service validates and normalizes `target` (email in lower case, phone in E.164 within the SMS sign-in country allowlist), checks the limits and, for a phone target that gets a code, the Turnstile token (`captchaToken`) and, for a US or Canadian number, the SMS consent (`smsConsent`, `termsAccepted`). Then it sends the first code and returns the challenge. The flow per `operation`:
33
+ *
34
+ * - `add`: the address must not be used by another account (`IdentityAlreadyLinkedException`, checked before any code is sent). An address already pending in this account starts a new `add` challenge; its pending record is overwritten when the primary code is accepted. A code goes to the primary (`step: primaryCode`). After it is confirmed, the address is stored as pending and a code goes to it (`step: targetCode`); after that one is confirmed, the address is verified (`step: done`).
35
+ * - `verify`: the target must be a pending address of the account. A code goes to it only (`step: targetCode`); once confirmed, it is verified (`step: done`).
36
+ * - `makePrimary`: the target must be a verified address that is not the primary. A code goes to the primary (`step: primaryCode`), then to the target (`step: targetCode`); once both are confirmed, the target becomes the primary (`step: done`). The old primary stays a sign-in method.
37
+ * - `remove`: the target must be an address of the account other than the primary (`CannotRemovePrimaryIdentityException`). A code goes to the primary (`step: primaryCode`); once confirmed, `step` is `readyToApply` and `ApplyIdentityRemoval` removes the address. Every response carries `dryRun`.
38
+ *
39
+ * A challenge is bound to the account, the operation and the target, and is single use. A Turnstile token that Cloudflare rejects (or a missing one) gives `ValidationException`. If Turnstile cannot be reached or times out, or the code cannot be delivered (the WNS email or SMS send fails or times out), `ServiceUnavailableException` is returned: no challenge is created and nothing is spent; the call may be retried. Available via s2s (service-to-service) or the x-bees token of the account owner; API keys are refused.
40
+ *
41
+ * @example
42
+ * Use a bare-bones client and the command you need to make an API call.
43
+ * ```javascript
44
+ * import { UsersClient, StartIdentityChallengeCommand } from "@wildix/xbees-users-client"; // ES Modules import
45
+ * // const { UsersClient, StartIdentityChallengeCommand } = require("@wildix/xbees-users-client"); // CommonJS import
46
+ * // import type { UsersClientConfig } from "@wildix/xbees-users-client";
47
+ * const config = {}; // type is UsersClientConfig
48
+ * const client = new UsersClient(config);
49
+ * const input = { // StartIdentityChallengeInput
50
+ * accountId: "STRING_VALUE", // required
51
+ * operation: "add" || "verify" || "makePrimary" || "remove", // required
52
+ * target: { // IdentityTarget
53
+ * type: "email" || "phone", // required
54
+ * value: "STRING_VALUE", // required
55
+ * },
56
+ * captchaToken: "STRING_VALUE",
57
+ * smsConsent: true || false,
58
+ * termsAccepted: true || false,
59
+ * language: "STRING_VALUE",
60
+ * appType: "x-bees" || "x-hoppers" || "collaboration",
61
+ * };
62
+ * const command = new StartIdentityChallengeCommand(input);
63
+ * const response = await client.send(command);
64
+ * // { // StartIdentityChallengeOutput
65
+ * // challengeId: "STRING_VALUE", // required
66
+ * // step: "primaryCode" || "targetCode" || "readyToApply" || "done", // required
67
+ * // resendAfter: Number("int"),
68
+ * // dryRun: { // IdentityRemovalDryRun
69
+ * // endsThisSession: true || false, // required
70
+ * // lostWorkspaces: [ // IdentityRemovalLostWorkspaceList // required
71
+ * // { // IdentityRemovalLostWorkspace
72
+ * // workspaceId: "STRING_VALUE", // required
73
+ * // companyName: "STRING_VALUE", // required
74
+ * // },
75
+ * // ],
76
+ * // signsOutDevices: true || false, // required
77
+ * // },
78
+ * // identity: { // Identity
79
+ * // identity: "STRING_VALUE", // required
80
+ * // account: "STRING_VALUE", // required
81
+ * // type: "email" || "phone", // required
82
+ * // verified: true || false, // required
83
+ * // primary: true || false, // required
84
+ * // },
85
+ * // };
86
+ *
87
+ * ```
88
+ *
89
+ * @param StartIdentityChallengeCommandInput - {@link StartIdentityChallengeCommandInput}
90
+ * @returns {@link StartIdentityChallengeCommandOutput}
91
+ * @see {@link StartIdentityChallengeCommandInput} for command's `input` shape.
92
+ * @see {@link StartIdentityChallengeCommandOutput} for command's `response` shape.
93
+ * @see {@link UsersClientResolvedConfig | config} for UsersClient's `config` shape.
94
+ *
95
+ * @throws {@link AccountNotFoundException} (client fault)
96
+ *
97
+ * @throws {@link IdentityAlreadyLinkedException} (client fault)
98
+ * The address is already used by another account (verified there, or pending in an account that has been signed in to), or is already a verified sign-in method of this account. The message does not say whose account it is.
99
+ *
100
+ * @throws {@link IdentityNotFoundException} (client fault)
101
+ * The address is not a sign-in method of the account (or no longer is).
102
+ *
103
+ * @throws {@link CannotRemovePrimaryIdentityException} (client fault)
104
+ * The primary sign-in method cannot be removed; make another verified address primary first.
105
+ *
106
+ * @throws {@link RateLimitedException} (client fault)
107
+ * A limit on sending codes or starting challenges was hit (per address, per IP or per account). No code was sent.
108
+ *
109
+ * @throws {@link TooManyAttemptsException} (client fault)
110
+ * Too many wrong codes: the challenge, or confirmation codes for this address, are blocked for a while. Confirming and resending are refused until `retryAfter` seconds pass.
111
+ *
112
+ * @throws {@link ValidationException} (client fault)
113
+ *
114
+ * @throws {@link ServiceUnavailableException} (server fault)
115
+ * The service is temporarily unable to handle the request; retry later.
116
+ *
117
+ * @throws {@link ForbiddenException} (client fault)
118
+ *
119
+ * @throws {@link RateLimitExceededException} (client fault)
120
+ *
121
+ * @throws {@link UsersServiceException}
122
+ * <p>Base exception class for all service exceptions from Users service.</p>
123
+ *
124
+ *
125
+ * @public
126
+ */
127
+ export declare class StartIdentityChallengeCommand extends StartIdentityChallengeCommand_base {
128
+ /** @internal type navigation helper, not in runtime. */
129
+ protected static __types: {
130
+ api: {
131
+ input: StartIdentityChallengeInput;
132
+ output: StartIdentityChallengeOutput;
133
+ };
134
+ sdk: {
135
+ input: StartIdentityChallengeCommandInput;
136
+ output: StartIdentityChallengeCommandOutput;
137
+ };
138
+ };
139
+ }
@@ -27,7 +27,7 @@ declare const UpdateAccountCommand_base: {
27
27
  getEndpointParameterInstructions(): import("@smithy/types").EndpointParameterInstructions;
28
28
  };
29
29
  /**
30
- * Updates the account. Allows changing default workspace and primary identity. Available via s2s (service-to-service) or the x-bees token of the account owner; API keys are refused.
30
+ * Updates the account: the default workspace, and (s2s only) the primary identity. Available via s2s (service-to-service) or the x-bees token of the account owner; API keys are refused. A user changes the primary with a `makePrimary` identity challenge (`StartIdentityChallenge`); `primaryIdentity` from an x-bees token is refused with `ForbiddenException`.
31
31
  * @example
32
32
  * Use a bare-bones client and the command you need to make an API call.
33
33
  * ```javascript
@@ -62,6 +62,7 @@ declare const UpdateAccountCommand_base: {
62
62
  * @throws {@link AccountNotFoundException} (client fault)
63
63
  *
64
64
  * @throws {@link IdentityNotFoundException} (client fault)
65
+ * The address is not a sign-in method of the account (or no longer is).
65
66
  *
66
67
  * @throws {@link WorkspaceNotFoundException} (client fault)
67
68
  *
@@ -1,8 +1,10 @@
1
+ export * from "./ApplyIdentityRemovalCommand";
1
2
  export * from "./BatchGetUsersCommand";
2
3
  export * from "./BatchGetUsersEmailNotificationsSettingsCommand";
3
4
  export * from "./BatchGetUsersPbxLinkDataCommand";
4
5
  export * from "./BatchGetUsersPbxLinkDataV1Command";
5
6
  export * from "./ChangeUserEmailCommand";
7
+ export * from "./ConfirmIdentityChallengeCommand";
6
8
  export * from "./CreateAnonymousSessionCommand";
7
9
  export * from "./CreateBotApiKeyCommand";
8
10
  export * from "./CreateBotCommand";
@@ -20,7 +22,6 @@ export * from "./GetUserPbxLinkSuggestionCommand";
20
22
  export * from "./GetUserPbxLinkSuggestionV1Command";
21
23
  export * from "./IntelligenceSearchCommand";
22
24
  export * from "./InviteCommand";
23
- export * from "./LinkIdentityCommand";
24
25
  export * from "./ListBotApiKeysCommand";
25
26
  export * from "./ListBotsCommand";
26
27
  export * from "./ListIdentitiesCommand";
@@ -29,9 +30,11 @@ export * from "./PartialUpdateUserEmailNotificationsSettingsCommand";
29
30
  export * from "./QueryColleaguesCommand";
30
31
  export * from "./QueryUserCommand";
31
32
  export * from "./QueryUsersCommand";
33
+ export * from "./ResendIdentityChallengeCodeCommand";
34
+ export * from "./ResetUserChatHistoryCommand";
35
+ export * from "./StartIdentityChallengeCommand";
32
36
  export * from "./ToggleTranscriptionEmailNotificationsSubscriptionCommand";
33
37
  export * from "./ToggleUnreadEmailNotificationsSubscriptionCommand";
34
- export * from "./UnlinkIdentityCommand";
35
38
  export * from "./UnlinkWorkspaceCommand";
36
39
  export * from "./UpdateAccountCommand";
37
40
  export * from "./UpdateBotCallbackCommand";
@@ -42,4 +45,3 @@ export * from "./UploadPictureCommand";
42
45
  export * from "./UploadPictureV1Command";
43
46
  export * from "./VerifyBotSecretKeyCommand";
44
47
  export * from "./VerifyBotSecretKeyV1Command";
45
- export * from "./VerifyIdentityCommand";
@@ -204,6 +204,76 @@ export declare const BotLlmToolType: {
204
204
  * @public
205
205
  */
206
206
  export type BotLlmToolType = (typeof BotLlmToolType)[keyof typeof BotLlmToolType];
207
+ /**
208
+ * @public
209
+ * @enum
210
+ */
211
+ export declare const IdentityType: {
212
+ /**
213
+ * An email address.
214
+ */
215
+ readonly EMAIL: "email";
216
+ /**
217
+ * A phone number.
218
+ */
219
+ readonly PHONE: "phone";
220
+ };
221
+ /**
222
+ * @public
223
+ */
224
+ export type IdentityType = (typeof IdentityType)[keyof typeof IdentityType];
225
+ /**
226
+ * @public
227
+ * @enum
228
+ */
229
+ export declare const IdentityChallengeStep: {
230
+ /**
231
+ * The change is applied and the challenge is used up.
232
+ */
233
+ readonly DONE: "done";
234
+ /**
235
+ * A code has been sent to the current primary; confirm it with `ConfirmIdentityChallenge`.
236
+ */
237
+ readonly PRIMARY_CODE: "primaryCode";
238
+ /**
239
+ * Remove only: the primary code is accepted; call `ApplyIdentityRemoval` to remove the address.
240
+ */
241
+ readonly READY_TO_APPLY: "readyToApply";
242
+ /**
243
+ * A code has been sent to the target address; confirm it with `ConfirmIdentityChallenge`.
244
+ */
245
+ readonly TARGET_CODE: "targetCode";
246
+ };
247
+ /**
248
+ * @public
249
+ */
250
+ export type IdentityChallengeStep = (typeof IdentityChallengeStep)[keyof typeof IdentityChallengeStep];
251
+ /**
252
+ * @public
253
+ * @enum
254
+ */
255
+ export declare const IdentityChallengeOperation: {
256
+ /**
257
+ * Add a new address to the account: a code to the primary, then a code to the new address. After the primary code the address is stored as pending (not verified); after the target code it is verified.
258
+ */
259
+ readonly ADD: "add";
260
+ /**
261
+ * Make a verified address the primary: a code to the current primary, then a code to the new primary. The old primary stays a sign-in method.
262
+ */
263
+ readonly MAKE_PRIMARY: "makePrimary";
264
+ /**
265
+ * Remove an address that is not the primary: a code to the primary, then `ApplyIdentityRemoval`. No code goes to the address being removed.
266
+ */
267
+ readonly REMOVE: "remove";
268
+ /**
269
+ * Verify a pending address of the account: a code to that address only, since the primary was confirmed when the address was added.
270
+ */
271
+ readonly VERIFY: "verify";
272
+ };
273
+ /**
274
+ * @public
275
+ */
276
+ export type IdentityChallengeOperation = (typeof IdentityChallengeOperation)[keyof typeof IdentityChallengeOperation];
207
277
  /**
208
278
  * @public
209
279
  * @enum
@@ -42,6 +42,18 @@ export declare class RateLimitExceededException extends __BaseException {
42
42
  */
43
43
  constructor(opts: __ExceptionOptionType<RateLimitExceededException, __BaseException>);
44
44
  }
45
+ /**
46
+ * The service is temporarily unable to handle the request; retry later.
47
+ * @public
48
+ */
49
+ export declare class ServiceUnavailableException extends __BaseException {
50
+ readonly name: "ServiceUnavailableException";
51
+ readonly $fault: "server";
52
+ /**
53
+ * @internal
54
+ */
55
+ constructor(opts: __ExceptionOptionType<ServiceUnavailableException, __BaseException>);
56
+ }
45
57
  /**
46
58
  * @public
47
59
  */
@@ -86,6 +98,42 @@ export declare class AccountNotFoundException extends __BaseException {
86
98
  */
87
99
  constructor(opts: __ExceptionOptionType<AccountNotFoundException, __BaseException>);
88
100
  }
101
+ /**
102
+ * The primary sign-in method cannot be removed; make another verified address primary first.
103
+ * @public
104
+ */
105
+ export declare class CannotRemovePrimaryIdentityException extends __BaseException {
106
+ readonly name: "CannotRemovePrimaryIdentityException";
107
+ readonly $fault: "client";
108
+ /**
109
+ * @internal
110
+ */
111
+ constructor(opts: __ExceptionOptionType<CannotRemovePrimaryIdentityException, __BaseException>);
112
+ }
113
+ /**
114
+ * The challenge is unknown, already used, expired, or belongs to another account; the message does not say which. The challenge cannot go on: start the change again with `StartIdentityChallenge`.
115
+ * @public
116
+ */
117
+ export declare class ChallengeNotFoundException extends __BaseException {
118
+ readonly name: "ChallengeNotFoundException";
119
+ readonly $fault: "client";
120
+ /**
121
+ * @internal
122
+ */
123
+ constructor(opts: __ExceptionOptionType<ChallengeNotFoundException, __BaseException>);
124
+ }
125
+ /**
126
+ * The address is not a sign-in method of the account (or no longer is).
127
+ * @public
128
+ */
129
+ export declare class IdentityNotFoundException extends __BaseException {
130
+ readonly name: "IdentityNotFoundException";
131
+ readonly $fault: "client";
132
+ /**
133
+ * @internal
134
+ */
135
+ constructor(opts: __ExceptionOptionType<IdentityNotFoundException, __BaseException>);
136
+ }
89
137
  /**
90
138
  * @public
91
139
  */
@@ -130,17 +178,6 @@ export declare class BotSecretKeyNotValidException extends __BaseException {
130
178
  */
131
179
  constructor(opts: __ExceptionOptionType<BotSecretKeyNotValidException, __BaseException>);
132
180
  }
133
- /**
134
- * @public
135
- */
136
- export declare class CannotRemovePrimaryIdentityException extends __BaseException {
137
- readonly name: "CannotRemovePrimaryIdentityException";
138
- readonly $fault: "client";
139
- /**
140
- * @internal
141
- */
142
- constructor(opts: __ExceptionOptionType<CannotRemovePrimaryIdentityException, __BaseException>);
143
- }
144
181
  /**
145
182
  * @public
146
183
  */
@@ -175,17 +212,19 @@ export declare class UserNotFoundException extends __BaseException {
175
212
  constructor(opts: __ExceptionOptionType<UserNotFoundException, __BaseException>);
176
213
  }
177
214
  /**
215
+ * The code of the current step has expired. Call `ResendIdentityChallengeCode` to send a new one.
178
216
  * @public
179
217
  */
180
- export declare class PublicAccessIsRestrictedException extends __BaseException {
181
- readonly name: "PublicAccessIsRestrictedException";
218
+ export declare class CodeExpiredException extends __BaseException {
219
+ readonly name: "CodeExpiredException";
182
220
  readonly $fault: "client";
183
221
  /**
184
222
  * @internal
185
223
  */
186
- constructor(opts: __ExceptionOptionType<PublicAccessIsRestrictedException, __BaseException>);
224
+ constructor(opts: __ExceptionOptionType<CodeExpiredException, __BaseException>);
187
225
  }
188
226
  /**
227
+ * The address is already used by another account (verified there, or pending in an account that has been signed in to), or is already a verified sign-in method of this account. The message does not say whose account it is.
189
228
  * @public
190
229
  */
191
230
  export declare class IdentityAlreadyLinkedException extends __BaseException {
@@ -197,15 +236,61 @@ export declare class IdentityAlreadyLinkedException extends __BaseException {
197
236
  constructor(opts: __ExceptionOptionType<IdentityAlreadyLinkedException, __BaseException>);
198
237
  }
199
238
  /**
239
+ * The code does not match the code sent for the current step. The challenge stays open: the user may correct the code and try again, up to the attempts limit.
200
240
  * @public
201
241
  */
202
- export declare class IdentityNotFoundException extends __BaseException {
203
- readonly name: "IdentityNotFoundException";
242
+ export declare class IncorrectCodeException extends __BaseException {
243
+ readonly name: "IncorrectCodeException";
204
244
  readonly $fault: "client";
205
245
  /**
206
246
  * @internal
207
247
  */
208
- constructor(opts: __ExceptionOptionType<IdentityNotFoundException, __BaseException>);
248
+ constructor(opts: __ExceptionOptionType<IncorrectCodeException, __BaseException>);
249
+ }
250
+ /**
251
+ * A limit on sending codes or starting challenges was hit (per address, per IP or per account). No code was sent.
252
+ * @public
253
+ */
254
+ export declare class RateLimitedException extends __BaseException {
255
+ readonly name: "RateLimitedException";
256
+ readonly $fault: "client";
257
+ /**
258
+ * Seconds until the caller may try again.
259
+ * @public
260
+ */
261
+ retryAfter: number;
262
+ /**
263
+ * @internal
264
+ */
265
+ constructor(opts: __ExceptionOptionType<RateLimitedException, __BaseException>);
266
+ }
267
+ /**
268
+ * Too many wrong codes: the challenge, or confirmation codes for this address, are blocked for a while. Confirming and resending are refused until `retryAfter` seconds pass.
269
+ * @public
270
+ */
271
+ export declare class TooManyAttemptsException extends __BaseException {
272
+ readonly name: "TooManyAttemptsException";
273
+ readonly $fault: "client";
274
+ /**
275
+ * Seconds until the block ends.
276
+ * @public
277
+ */
278
+ retryAfter: number;
279
+ /**
280
+ * @internal
281
+ */
282
+ constructor(opts: __ExceptionOptionType<TooManyAttemptsException, __BaseException>);
283
+ }
284
+ /**
285
+ * @public
286
+ */
287
+ export declare class PublicAccessIsRestrictedException extends __BaseException {
288
+ readonly name: "PublicAccessIsRestrictedException";
289
+ readonly $fault: "client";
290
+ /**
291
+ * @internal
292
+ */
293
+ constructor(opts: __ExceptionOptionType<PublicAccessIsRestrictedException, __BaseException>);
209
294
  }
210
295
  /**
211
296
  * @public