@wildix/xbees-users-client 4.3.3-wms28830.1 → 4.4.0-stage.1

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 (57) hide show
  1. package/dist-cjs/Users.js +17 -7
  2. package/dist-cjs/auth/httpAuthSchemeProvider.js +35 -16
  3. package/dist-cjs/commands/ApplyAccountWorkspaceChangesCommand.js +20 -0
  4. package/dist-cjs/commands/{LinkIdentityCommand.js → ApplyIdentityRemovalCommand.js} +6 -6
  5. package/dist-cjs/commands/ConfirmIdentityChallengeCommand.js +20 -0
  6. package/dist-cjs/commands/{VerifyIdentityCommand.js → ListAccountEmailChangesCommand.js} +6 -6
  7. package/dist-cjs/commands/ResendIdentityChallengeCodeCommand.js +20 -0
  8. package/dist-cjs/commands/{UnlinkIdentityCommand.js → StartIdentityChallengeCommand.js} +6 -6
  9. package/dist-cjs/commands/index.js +6 -3
  10. package/dist-cjs/index.js +1 -0
  11. package/dist-cjs/models/enums.js +88 -5
  12. package/dist-cjs/models/errors.js +144 -24
  13. package/dist-cjs/pagination/Interfaces.js +2 -0
  14. package/dist-cjs/pagination/ListAccountEmailChangesPaginator.js +7 -0
  15. package/dist-cjs/pagination/index.js +5 -0
  16. package/dist-cjs/schemas/schemas_0.js +431 -151
  17. package/dist-es/Users.js +17 -7
  18. package/dist-es/auth/httpAuthSchemeProvider.js +35 -16
  19. package/dist-es/commands/ApplyAccountWorkspaceChangesCommand.js +16 -0
  20. package/dist-es/commands/{UnlinkIdentityCommand.js → ApplyIdentityRemovalCommand.js} +5 -5
  21. package/dist-es/commands/ConfirmIdentityChallengeCommand.js +16 -0
  22. package/dist-es/commands/{LinkIdentityCommand.js → ListAccountEmailChangesCommand.js} +5 -5
  23. package/dist-es/commands/ResendIdentityChallengeCodeCommand.js +16 -0
  24. package/dist-es/commands/{VerifyIdentityCommand.js → StartIdentityChallengeCommand.js} +5 -5
  25. package/dist-es/commands/index.js +6 -3
  26. package/dist-es/index.js +1 -0
  27. package/dist-es/models/enums.js +87 -4
  28. package/dist-es/models/errors.js +132 -20
  29. package/dist-es/pagination/Interfaces.js +1 -0
  30. package/dist-es/pagination/ListAccountEmailChangesPaginator.js +4 -0
  31. package/dist-es/pagination/index.js +2 -0
  32. package/dist-es/schemas/schemas_0.js +427 -147
  33. package/dist-types/Users.d.ts +46 -18
  34. package/dist-types/UsersClient.d.ts +8 -5
  35. package/dist-types/commands/ApplyAccountWorkspaceChangesCommand.d.ts +193 -0
  36. package/dist-types/commands/ApplyIdentityRemovalCommand.d.ts +93 -0
  37. package/dist-types/commands/ConfirmIdentityChallengeCommand.d.ts +138 -0
  38. package/dist-types/commands/ListAccountEmailChangesCommand.d.ts +101 -0
  39. package/dist-types/commands/ListIdentitiesCommand.d.ts +4 -2
  40. package/dist-types/commands/QueryUserCommand.d.ts +1 -1
  41. package/dist-types/commands/QueryUsersCommand.d.ts +1 -1
  42. package/dist-types/commands/ResendIdentityChallengeCodeCommand.d.ts +96 -0
  43. package/dist-types/commands/StartIdentityChallengeCommand.d.ts +139 -0
  44. package/dist-types/commands/UpdateAccountCommand.d.ts +2 -1
  45. package/dist-types/commands/index.d.ts +6 -3
  46. package/dist-types/index.d.ts +1 -0
  47. package/dist-types/models/enums.d.ts +344 -8
  48. package/dist-types/models/errors.d.ts +158 -17
  49. package/dist-types/models/models_0.d.ts +659 -69
  50. package/dist-types/pagination/Interfaces.d.ts +8 -0
  51. package/dist-types/pagination/ListAccountEmailChangesPaginator.d.ts +7 -0
  52. package/dist-types/pagination/index.d.ts +2 -0
  53. package/dist-types/schemas/schemas_0.d.ts +40 -9
  54. package/package.json +5 -5
  55. package/dist-types/commands/LinkIdentityCommand.d.ts +0 -89
  56. package/dist-types/commands/UnlinkIdentityCommand.d.ts +0 -85
  57. package/dist-types/commands/VerifyIdentityCommand.d.ts +0 -90
@@ -0,0 +1,138 @@
1
+ import { Command as $Command } from "@smithy/core/client";
2
+ import type { MetadataBearer as __MetadataBearer } from "@smithy/types";
3
+ import type { ConfirmIdentityChallengeInput, ConfirmIdentityChallengeOutput } 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 ConfirmIdentityChallengeCommand}.
14
+ */
15
+ export interface ConfirmIdentityChallengeCommandInput extends ConfirmIdentityChallengeInput {
16
+ }
17
+ /**
18
+ * @public
19
+ *
20
+ * The output of {@link ConfirmIdentityChallengeCommand}.
21
+ */
22
+ export interface ConfirmIdentityChallengeCommandOutput extends ConfirmIdentityChallengeOutput, __MetadataBearer {
23
+ }
24
+ declare const ConfirmIdentityChallengeCommand_base: {
25
+ new (input: ConfirmIdentityChallengeCommandInput): import("@smithy/core/client").CommandImpl<ConfirmIdentityChallengeCommandInput, ConfirmIdentityChallengeCommandOutput, UsersClientResolvedConfig, ServiceInputTypes, ServiceOutputTypes>;
26
+ new (input: ConfirmIdentityChallengeCommandInput): import("@smithy/core/client").CommandImpl<ConfirmIdentityChallengeCommandInput, ConfirmIdentityChallengeCommandOutput, UsersClientResolvedConfig, ServiceInputTypes, ServiceOutputTypes>;
27
+ getEndpointParameterInstructions(): import("@smithy/types").EndpointParameterInstructions;
28
+ };
29
+ /**
30
+ * Confirms the code of the current step of a challenge started by `StartIdentityChallenge` and advances it:
31
+ *
32
+ * - `add`: the primary code stores the address as pending and sends a code to it (`step: targetCode`); the target code verifies it (`step: done`, with `identity`). If another account verified the address meanwhile, `IdentityAlreadyLinkedException` is returned and the pending address is dropped.
33
+ * - `verify`: the target code verifies the pending address (`step: done`, with `identity`). If another account verified the address meanwhile, `IdentityAlreadyLinkedException` is returned and the pending address is dropped, as for `add`.
34
+ * - `makePrimary`: the primary code sends a code to the target (`step: targetCode`); the target code makes it the primary (`step: done`, with `identity`).
35
+ * - `remove`: the primary code makes the challenge `readyToApply`; call `ApplyIdentityRemoval`. The response carries `dryRun`.
36
+ *
37
+ * A wrong code gives `IncorrectCodeException` and the challenge stays open; too many wrong codes give `TooManyAttemptsException`. A challenge that is unknown, already used, expired, or of another account gives `ChallengeNotFoundException` (which one is not revealed); the app starts the dialog again. If the next code cannot be delivered (the WNS email or SMS send fails or times out), `ServiceUnavailableException` is returned: the confirmed code is not spent, the challenge stays at its step and nothing is half-applied; the call may be retried. The Turnstile token is checked by `StartIdentityChallenge` only (rejected: `ValidationException`; unreachable: `ServiceUnavailableException`); this call does not check it again. Available via s2s (service-to-service) or the x-bees token of the account owner; API keys are refused.
38
+ *
39
+ * @example
40
+ * Use a bare-bones client and the command you need to make an API call.
41
+ * ```javascript
42
+ * import { UsersClient, ConfirmIdentityChallengeCommand } from "@wildix/xbees-users-client"; // ES Modules import
43
+ * // const { UsersClient, ConfirmIdentityChallengeCommand } = require("@wildix/xbees-users-client"); // CommonJS import
44
+ * // import type { UsersClientConfig } from "@wildix/xbees-users-client";
45
+ * const config = {}; // type is UsersClientConfig
46
+ * const client = new UsersClient(config);
47
+ * const input = { // ConfirmIdentityChallengeInput
48
+ * accountId: "STRING_VALUE", // required
49
+ * challengeId: "STRING_VALUE", // required
50
+ * code: "STRING_VALUE", // required
51
+ * };
52
+ * const command = new ConfirmIdentityChallengeCommand(input);
53
+ * const response = await client.send(command);
54
+ * // { // ConfirmIdentityChallengeOutput
55
+ * // challengeId: "STRING_VALUE", // required
56
+ * // step: "primaryCode" || "targetCode" || "readyToApply" || "done", // required
57
+ * // resendAfter: Number("int"),
58
+ * // dryRun: { // IdentityRemovalDryRun
59
+ * // endsThisSession: true || false, // required
60
+ * // lostWorkspaces: [ // IdentityRemovalLostWorkspaceList // required
61
+ * // { // IdentityRemovalLostWorkspace
62
+ * // workspaceId: "STRING_VALUE", // required
63
+ * // companyName: "STRING_VALUE", // required
64
+ * // },
65
+ * // ],
66
+ * // signsOutDevices: true || false, // required
67
+ * // },
68
+ * // identity: { // Identity
69
+ * // identity: "STRING_VALUE", // required
70
+ * // account: "STRING_VALUE", // required
71
+ * // type: "email" || "phone", // required
72
+ * // verified: true || false, // required
73
+ * // primary: true || false, // required
74
+ * // },
75
+ * // };
76
+ *
77
+ * ```
78
+ *
79
+ * @param ConfirmIdentityChallengeCommandInput - {@link ConfirmIdentityChallengeCommandInput}
80
+ * @returns {@link ConfirmIdentityChallengeCommandOutput}
81
+ * @see {@link ConfirmIdentityChallengeCommandInput} for command's `input` shape.
82
+ * @see {@link ConfirmIdentityChallengeCommandOutput} for command's `response` shape.
83
+ * @see {@link UsersClientResolvedConfig | config} for UsersClient's `config` shape.
84
+ *
85
+ * @throws {@link AccountNotFoundException} (client fault)
86
+ *
87
+ * @throws {@link IncorrectCodeException} (client fault)
88
+ * 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.
89
+ *
90
+ * @throws {@link CodeExpiredException} (client fault)
91
+ * The code of the current step has expired. Call `ResendIdentityChallengeCode` to send a new one.
92
+ *
93
+ * @throws {@link TooManyAttemptsException} (client fault)
94
+ * 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.
95
+ *
96
+ * @throws {@link RateLimitedException} (client fault)
97
+ * A limit on sending codes or starting challenges was hit (per address, per IP or per account). No code was sent.
98
+ *
99
+ * @throws {@link IdentityAlreadyLinkedException} (client fault)
100
+ * 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.
101
+ *
102
+ * @throws {@link IdentityNotFoundException} (client fault)
103
+ * The address is not a sign-in method of the account (or no longer is).
104
+ *
105
+ * @throws {@link CannotRemovePrimaryIdentityException} (client fault)
106
+ * The primary sign-in method cannot be removed; make another verified address primary first.
107
+ *
108
+ * @throws {@link ChallengeNotFoundException} (client fault)
109
+ * 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`.
110
+ *
111
+ * @throws {@link ValidationException} (client fault)
112
+ *
113
+ * @throws {@link ServiceUnavailableException} (server fault)
114
+ * The service is temporarily unable to handle the request; retry later.
115
+ *
116
+ * @throws {@link ForbiddenException} (client fault)
117
+ *
118
+ * @throws {@link RateLimitExceededException} (client fault)
119
+ *
120
+ * @throws {@link UsersServiceException}
121
+ * <p>Base exception class for all service exceptions from Users service.</p>
122
+ *
123
+ *
124
+ * @public
125
+ */
126
+ export declare class ConfirmIdentityChallengeCommand extends ConfirmIdentityChallengeCommand_base {
127
+ /** @internal type navigation helper, not in runtime. */
128
+ protected static __types: {
129
+ api: {
130
+ input: ConfirmIdentityChallengeInput;
131
+ output: ConfirmIdentityChallengeOutput;
132
+ };
133
+ sdk: {
134
+ input: ConfirmIdentityChallengeCommandInput;
135
+ output: ConfirmIdentityChallengeCommandOutput;
136
+ };
137
+ };
138
+ }
@@ -0,0 +1,101 @@
1
+ import { Command as $Command } from "@smithy/core/client";
2
+ import type { MetadataBearer as __MetadataBearer } from "@smithy/types";
3
+ import type { ListAccountEmailChangesInput, ListAccountEmailChangesOutput } 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 ListAccountEmailChangesCommand}.
14
+ */
15
+ export interface ListAccountEmailChangesCommandInput extends ListAccountEmailChangesInput {
16
+ }
17
+ /**
18
+ * @public
19
+ *
20
+ * The output of {@link ListAccountEmailChangesCommand}.
21
+ */
22
+ export interface ListAccountEmailChangesCommandOutput extends ListAccountEmailChangesOutput, __MetadataBearer {
23
+ }
24
+ declare const ListAccountEmailChangesCommand_base: {
25
+ new (input: ListAccountEmailChangesCommandInput): import("@smithy/core/client").CommandImpl<ListAccountEmailChangesCommandInput, ListAccountEmailChangesCommandOutput, UsersClientResolvedConfig, ServiceInputTypes, ServiceOutputTypes>;
26
+ new (input: ListAccountEmailChangesCommandInput): import("@smithy/core/client").CommandImpl<ListAccountEmailChangesCommandInput, ListAccountEmailChangesCommandOutput, UsersClientResolvedConfig, ServiceInputTypes, ServiceOutputTypes>;
27
+ getEndpointParameterInstructions(): import("@smithy/types").EndpointParameterInstructions;
28
+ };
29
+ /**
30
+ * Lists the executions of the change-email state machine (the one ChangeUserEmail starts) whose old or new email is one of `emails`, newest first by `startedAt`. Read-only: it starts, stops and changes nothing (POST only to keep the emails out of URLs and access logs).
31
+ *
32
+ * Callers: s2s (service-to-service) only, and only the service clients allowed to read account history; any other caller gets ForbiddenException. x-bees tokens and API keys are refused.
33
+ *
34
+ * Step Functions keeps an execution for 90 days after it closes; older email changes are not returned. Emails are compared case-insensitively. The owner examines a bounded number of executions per call, so a page can hold fewer than `limit` executions, even none, while `nextToken` is present: continue until `nextToken` is absent or the caller has enough. The execution input holds no account id, so executions carry none.
35
+ *
36
+ * @example
37
+ * Use a bare-bones client and the command you need to make an API call.
38
+ * ```javascript
39
+ * import { UsersClient, ListAccountEmailChangesCommand } from "@wildix/xbees-users-client"; // ES Modules import
40
+ * // const { UsersClient, ListAccountEmailChangesCommand } = require("@wildix/xbees-users-client"); // CommonJS import
41
+ * // import type { UsersClientConfig } from "@wildix/xbees-users-client";
42
+ * const config = {}; // type is UsersClientConfig
43
+ * const client = new UsersClient(config);
44
+ * const input = { // ListAccountEmailChangesInput
45
+ * emails: [ // AccountEmailChangeEmailList // required
46
+ * "STRING_VALUE",
47
+ * ],
48
+ * limit: Number("int"),
49
+ * nextToken: "STRING_VALUE",
50
+ * };
51
+ * const command = new ListAccountEmailChangesCommand(input);
52
+ * const response = await client.send(command);
53
+ * // { // ListAccountEmailChangesOutput
54
+ * // executions: [ // AccountEmailChangeList // required
55
+ * // { // AccountEmailChange
56
+ * // executionArn: "STRING_VALUE", // required
57
+ * // status: "RUNNING" || "SUCCEEDED" || "FAILED" || "TIMED_OUT" || "ABORTED" || "PENDING_REDRIVE", // required
58
+ * // startedAt: "STRING_VALUE", // required
59
+ * // stoppedAt: "STRING_VALUE",
60
+ * // oldEmail: "STRING_VALUE", // required
61
+ * // newEmail: "STRING_VALUE", // required
62
+ * // oldCompanyId: "STRING_VALUE",
63
+ * // newCompanyId: "STRING_VALUE",
64
+ * // },
65
+ * // ],
66
+ * // nextToken: "STRING_VALUE",
67
+ * // };
68
+ *
69
+ * ```
70
+ *
71
+ * @param ListAccountEmailChangesCommandInput - {@link ListAccountEmailChangesCommandInput}
72
+ * @returns {@link ListAccountEmailChangesCommandOutput}
73
+ * @see {@link ListAccountEmailChangesCommandInput} for command's `input` shape.
74
+ * @see {@link ListAccountEmailChangesCommandOutput} for command's `response` shape.
75
+ * @see {@link UsersClientResolvedConfig | config} for UsersClient's `config` shape.
76
+ *
77
+ * @throws {@link ValidationException} (client fault)
78
+ *
79
+ * @throws {@link ForbiddenException} (client fault)
80
+ *
81
+ * @throws {@link RateLimitExceededException} (client fault)
82
+ *
83
+ * @throws {@link UsersServiceException}
84
+ * <p>Base exception class for all service exceptions from Users service.</p>
85
+ *
86
+ *
87
+ * @public
88
+ */
89
+ export declare class ListAccountEmailChangesCommand extends ListAccountEmailChangesCommand_base {
90
+ /** @internal type navigation helper, not in runtime. */
91
+ protected static __types: {
92
+ api: {
93
+ input: ListAccountEmailChangesInput;
94
+ output: ListAccountEmailChangesOutput;
95
+ };
96
+ sdk: {
97
+ input: ListAccountEmailChangesCommandInput;
98
+ output: ListAccountEmailChangesCommandOutput;
99
+ };
100
+ };
101
+ }
@@ -27,7 +27,7 @@ declare const ListIdentitiesCommand_base: {
27
27
  getEndpointParameterInstructions(): import("@smithy/types").EndpointParameterInstructions;
28
28
  };
29
29
  /**
30
- * Lists all identities (login methods) for the current account. Available via s2s (service-to-service) or the x-bees token of the account owner; API keys are refused.
30
+ * Lists the sign-in methods of the account: the verified identities and the pending ones (being added, `verified: false`), each with its type and whether it is the primary. The technical address behind a phone sign-in never appears; a phone appears as its E.164 number. Available via s2s (service-to-service) or the x-bees token of the account owner; API keys are refused.
31
31
  * @example
32
32
  * Use a bare-bones client and the command you need to make an API call.
33
33
  * ```javascript
@@ -46,7 +46,9 @@ declare const ListIdentitiesCommand_base: {
46
46
  * // { // Identity
47
47
  * // identity: "STRING_VALUE", // required
48
48
  * // account: "STRING_VALUE", // required
49
- * // verified: true || false,
49
+ * // type: "email" || "phone", // required
50
+ * // verified: true || false, // required
51
+ * // primary: true || false, // required
50
52
  * // },
51
53
  * // ],
52
54
  * // };
@@ -27,7 +27,7 @@ declare const QueryUserCommand_base: {
27
27
  getEndpointParameterInstructions(): import("@smithy/types").EndpointParameterInstructions;
28
28
  };
29
29
  /**
30
- * Searches for a single user using a query with optional predicate validation.
30
+ * Searches for a single user using a query with optional predicate validation. A user with a workspace in the caller's company is returned in that workspace; otherwise, and for a service token, in the user's default workspace.
31
31
  * @example
32
32
  * Use a bare-bones client and the command you need to make an API call.
33
33
  * ```javascript
@@ -27,7 +27,7 @@ declare const QueryUsersCommand_base: {
27
27
  getEndpointParameterInstructions(): import("@smithy/types").EndpointParameterInstructions;
28
28
  };
29
29
  /**
30
- * Searches for multiple users using queries with optional predicate validation.
30
+ * Searches for multiple users using queries with optional predicate validation. A user with a workspace in the caller's company is returned in that workspace; otherwise, and for a service token, in the user's default workspace.
31
31
  * @example
32
32
  * Use a bare-bones client and the command you need to make an API call.
33
33
  * ```javascript
@@ -0,0 +1,96 @@
1
+ import { Command as $Command } from "@smithy/core/client";
2
+ import type { MetadataBearer as __MetadataBearer } from "@smithy/types";
3
+ import type { ResendIdentityChallengeCodeInput, ResendIdentityChallengeCodeOutput } 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 ResendIdentityChallengeCodeCommand}.
14
+ */
15
+ export interface ResendIdentityChallengeCodeCommandInput extends ResendIdentityChallengeCodeInput {
16
+ }
17
+ /**
18
+ * @public
19
+ *
20
+ * The output of {@link ResendIdentityChallengeCodeCommand}.
21
+ */
22
+ export interface ResendIdentityChallengeCodeCommandOutput extends ResendIdentityChallengeCodeOutput, __MetadataBearer {
23
+ }
24
+ declare const ResendIdentityChallengeCodeCommand_base: {
25
+ new (input: ResendIdentityChallengeCodeCommandInput): import("@smithy/core/client").CommandImpl<ResendIdentityChallengeCodeCommandInput, ResendIdentityChallengeCodeCommandOutput, UsersClientResolvedConfig, ServiceInputTypes, ServiceOutputTypes>;
26
+ new (input: ResendIdentityChallengeCodeCommandInput): import("@smithy/core/client").CommandImpl<ResendIdentityChallengeCodeCommandInput, ResendIdentityChallengeCodeCommandOutput, UsersClientResolvedConfig, ServiceInputTypes, ServiceOutputTypes>;
27
+ getEndpointParameterInstructions(): import("@smithy/types").EndpointParameterInstructions;
28
+ };
29
+ /**
30
+ * Sends the code of the current step of a challenge again (to the primary at `primaryCode`, to the target at `targetCode`); the previous code of that step stops working. Allowed once `resendAfter` seconds of the previous send have passed, within the sending limits. A challenge that is unknown, already used, expired, or of another account gives `ChallengeNotFoundException` (which one is not revealed); the app starts the dialog again. A challenge that is not waiting for a code gives `ValidationException`. If the code cannot be delivered (the WNS email or SMS send fails or times out), `ServiceUnavailableException` is returned: no send is counted and the previous code keeps working; the call may be retried. Available via s2s (service-to-service) or the x-bees token of the account owner; API keys are refused.
31
+ * @example
32
+ * Use a bare-bones client and the command you need to make an API call.
33
+ * ```javascript
34
+ * import { UsersClient, ResendIdentityChallengeCodeCommand } from "@wildix/xbees-users-client"; // ES Modules import
35
+ * // const { UsersClient, ResendIdentityChallengeCodeCommand } = 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 = { // ResendIdentityChallengeCodeInput
40
+ * accountId: "STRING_VALUE", // required
41
+ * challengeId: "STRING_VALUE", // required
42
+ * };
43
+ * const command = new ResendIdentityChallengeCodeCommand(input);
44
+ * const response = await client.send(command);
45
+ * // { // ResendIdentityChallengeCodeOutput
46
+ * // step: "primaryCode" || "targetCode" || "readyToApply" || "done", // required
47
+ * // resendAfter: Number("int"), // required
48
+ * // };
49
+ *
50
+ * ```
51
+ *
52
+ * @param ResendIdentityChallengeCodeCommandInput - {@link ResendIdentityChallengeCodeCommandInput}
53
+ * @returns {@link ResendIdentityChallengeCodeCommandOutput}
54
+ * @see {@link ResendIdentityChallengeCodeCommandInput} for command's `input` shape.
55
+ * @see {@link ResendIdentityChallengeCodeCommandOutput} for command's `response` shape.
56
+ * @see {@link UsersClientResolvedConfig | config} for UsersClient's `config` shape.
57
+ *
58
+ * @throws {@link AccountNotFoundException} (client fault)
59
+ *
60
+ * @throws {@link RateLimitedException} (client fault)
61
+ * A limit on sending codes or starting challenges was hit (per address, per IP or per account). No code was sent.
62
+ *
63
+ * @throws {@link TooManyAttemptsException} (client fault)
64
+ * 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.
65
+ *
66
+ * @throws {@link ChallengeNotFoundException} (client fault)
67
+ * 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`.
68
+ *
69
+ * @throws {@link ValidationException} (client fault)
70
+ *
71
+ * @throws {@link ServiceUnavailableException} (server fault)
72
+ * The service is temporarily unable to handle the request; retry later.
73
+ *
74
+ * @throws {@link ForbiddenException} (client fault)
75
+ *
76
+ * @throws {@link RateLimitExceededException} (client fault)
77
+ *
78
+ * @throws {@link UsersServiceException}
79
+ * <p>Base exception class for all service exceptions from Users service.</p>
80
+ *
81
+ *
82
+ * @public
83
+ */
84
+ export declare class ResendIdentityChallengeCodeCommand extends ResendIdentityChallengeCodeCommand_base {
85
+ /** @internal type navigation helper, not in runtime. */
86
+ protected static __types: {
87
+ api: {
88
+ input: ResendIdentityChallengeCodeInput;
89
+ output: ResendIdentityChallengeCodeOutput;
90
+ };
91
+ sdk: {
92
+ input: ResendIdentityChallengeCodeCommandInput;
93
+ output: ResendIdentityChallengeCodeCommandOutput;
94
+ };
95
+ };
96
+ }
@@ -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,11 @@
1
+ export * from "./ApplyAccountWorkspaceChangesCommand";
2
+ export * from "./ApplyIdentityRemovalCommand";
1
3
  export * from "./BatchGetUsersCommand";
2
4
  export * from "./BatchGetUsersEmailNotificationsSettingsCommand";
3
5
  export * from "./BatchGetUsersPbxLinkDataCommand";
4
6
  export * from "./BatchGetUsersPbxLinkDataV1Command";
5
7
  export * from "./ChangeUserEmailCommand";
8
+ export * from "./ConfirmIdentityChallengeCommand";
6
9
  export * from "./CreateAnonymousSessionCommand";
7
10
  export * from "./CreateBotApiKeyCommand";
8
11
  export * from "./CreateBotCommand";
@@ -20,7 +23,7 @@ export * from "./GetUserPbxLinkSuggestionCommand";
20
23
  export * from "./GetUserPbxLinkSuggestionV1Command";
21
24
  export * from "./IntelligenceSearchCommand";
22
25
  export * from "./InviteCommand";
23
- export * from "./LinkIdentityCommand";
26
+ export * from "./ListAccountEmailChangesCommand";
24
27
  export * from "./ListBotApiKeysCommand";
25
28
  export * from "./ListBotsCommand";
26
29
  export * from "./ListIdentitiesCommand";
@@ -29,10 +32,11 @@ export * from "./PartialUpdateUserEmailNotificationsSettingsCommand";
29
32
  export * from "./QueryColleaguesCommand";
30
33
  export * from "./QueryUserCommand";
31
34
  export * from "./QueryUsersCommand";
35
+ export * from "./ResendIdentityChallengeCodeCommand";
32
36
  export * from "./ResetUserChatHistoryCommand";
37
+ export * from "./StartIdentityChallengeCommand";
33
38
  export * from "./ToggleTranscriptionEmailNotificationsSubscriptionCommand";
34
39
  export * from "./ToggleUnreadEmailNotificationsSubscriptionCommand";
35
- export * from "./UnlinkIdentityCommand";
36
40
  export * from "./UnlinkWorkspaceCommand";
37
41
  export * from "./UpdateAccountCommand";
38
42
  export * from "./UpdateBotCallbackCommand";
@@ -43,4 +47,3 @@ export * from "./UploadPictureCommand";
43
47
  export * from "./UploadPictureV1Command";
44
48
  export * from "./VerifyBotSecretKeyCommand";
45
49
  export * from "./VerifyBotSecretKeyV1Command";
46
- export * from "./VerifyIdentityCommand";
@@ -5,6 +5,7 @@ export type { RuntimeExtension } from "./runtimeExtensions";
5
5
  export type { UsersExtensionConfiguration } from "./extensionConfiguration";
6
6
  export * from "./commands";
7
7
  export * from "./schemas/schemas_0";
8
+ export * from "./pagination";
8
9
  export * from "./models/enums";
9
10
  export * from "./models/errors";
10
11
  export * from "./models/models_0";