@wildix/xbees-users-client 4.4.0-stage.1 → 4.4.0-wms29809.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 (41) hide show
  1. package/dist-cjs/Users.js +6 -10
  2. package/dist-cjs/auth/httpAuthSchemeProvider.js +18 -31
  3. package/dist-cjs/commands/{ApplyIdentityRemovalCommand.js → LinkIdentityCommand.js} +6 -6
  4. package/dist-cjs/commands/{ResetUserChatHistoryCommand.js → UnlinkIdentityCommand.js} +6 -6
  5. package/dist-cjs/commands/{StartIdentityChallengeCommand.js → VerifyIdentityCommand.js} +6 -6
  6. package/dist-cjs/commands/index.js +3 -5
  7. package/dist-cjs/models/enums.js +3 -25
  8. package/dist-cjs/models/errors.js +24 -106
  9. package/dist-cjs/schemas/schemas_0.js +69 -180
  10. package/dist-es/Users.js +6 -10
  11. package/dist-es/auth/httpAuthSchemeProvider.js +18 -31
  12. package/dist-es/commands/{ApplyIdentityRemovalCommand.js → LinkIdentityCommand.js} +5 -5
  13. package/dist-es/commands/{ResetUserChatHistoryCommand.js → UnlinkIdentityCommand.js} +5 -5
  14. package/dist-es/commands/{StartIdentityChallengeCommand.js → VerifyIdentityCommand.js} +5 -5
  15. package/dist-es/commands/index.js +3 -5
  16. package/dist-es/models/enums.js +2 -24
  17. package/dist-es/models/errors.js +20 -96
  18. package/dist-es/schemas/schemas_0.js +65 -176
  19. package/dist-types/Users.d.ts +21 -35
  20. package/dist-types/UsersClient.d.ts +5 -7
  21. package/dist-types/commands/ApplyAccountWorkspaceChangesCommand.d.ts +9 -8
  22. package/dist-types/commands/LinkIdentityCommand.d.ts +89 -0
  23. package/dist-types/commands/ListIdentitiesCommand.d.ts +2 -4
  24. package/dist-types/commands/UnlinkIdentityCommand.d.ts +85 -0
  25. package/dist-types/commands/UpdateAccountCommand.d.ts +1 -2
  26. package/dist-types/commands/VerifyIdentityCommand.d.ts +90 -0
  27. package/dist-types/commands/index.d.ts +3 -5
  28. package/dist-types/models/enums.d.ts +9 -103
  29. package/dist-types/models/errors.d.ts +17 -102
  30. package/dist-types/models/models_0.d.ts +80 -299
  31. package/dist-types/schemas/schemas_0.d.ts +9 -24
  32. package/package.json +1 -1
  33. package/dist-cjs/commands/ConfirmIdentityChallengeCommand.js +0 -20
  34. package/dist-cjs/commands/ResendIdentityChallengeCodeCommand.js +0 -20
  35. package/dist-es/commands/ConfirmIdentityChallengeCommand.js +0 -16
  36. package/dist-es/commands/ResendIdentityChallengeCodeCommand.js +0 -16
  37. package/dist-types/commands/ApplyIdentityRemovalCommand.d.ts +0 -93
  38. package/dist-types/commands/ConfirmIdentityChallengeCommand.d.ts +0 -138
  39. package/dist-types/commands/ResendIdentityChallengeCodeCommand.d.ts +0 -96
  40. package/dist-types/commands/ResetUserChatHistoryCommand.d.ts +0 -89
  41. package/dist-types/commands/StartIdentityChallengeCommand.d.ts +0 -139
@@ -1,16 +0,0 @@
1
- import { Command as $Command } from "@smithy/core/client";
2
- import { getEndpointPlugin } from "@smithy/core/endpoints";
3
- import { commonParams } from "../endpoint/EndpointParameters";
4
- import { ConfirmIdentityChallenge$ } from "../schemas/schemas_0";
5
- export { $Command };
6
- export class ConfirmIdentityChallengeCommand extends $Command
7
- .classBuilder()
8
- .ep(commonParams)
9
- .m(function (Command, cs, config, o) {
10
- return [getEndpointPlugin(config, Command.getEndpointParameterInstructions())];
11
- })
12
- .s("Users", "ConfirmIdentityChallenge", {})
13
- .n("UsersClient", "ConfirmIdentityChallengeCommand")
14
- .sc(ConfirmIdentityChallenge$)
15
- .build() {
16
- }
@@ -1,16 +0,0 @@
1
- import { Command as $Command } from "@smithy/core/client";
2
- import { getEndpointPlugin } from "@smithy/core/endpoints";
3
- import { commonParams } from "../endpoint/EndpointParameters";
4
- import { ResendIdentityChallengeCode$ } from "../schemas/schemas_0";
5
- export { $Command };
6
- export class ResendIdentityChallengeCodeCommand extends $Command
7
- .classBuilder()
8
- .ep(commonParams)
9
- .m(function (Command, cs, config, o) {
10
- return [getEndpointPlugin(config, Command.getEndpointParameterInstructions())];
11
- })
12
- .s("Users", "ResendIdentityChallengeCode", {})
13
- .n("UsersClient", "ResendIdentityChallengeCodeCommand")
14
- .sc(ResendIdentityChallengeCode$)
15
- .build() {
16
- }
@@ -1,93 +0,0 @@
1
- import { Command as $Command } from "@smithy/core/client";
2
- import type { MetadataBearer as __MetadataBearer } from "@smithy/types";
3
- import type { ApplyIdentityRemovalInput, ApplyIdentityRemovalOutput } 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 ApplyIdentityRemovalCommand}.
14
- */
15
- export interface ApplyIdentityRemovalCommandInput extends ApplyIdentityRemovalInput {
16
- }
17
- /**
18
- * @public
19
- *
20
- * The output of {@link ApplyIdentityRemovalCommand}.
21
- */
22
- export interface ApplyIdentityRemovalCommandOutput extends ApplyIdentityRemovalOutput, __MetadataBearer {
23
- }
24
- declare const ApplyIdentityRemovalCommand_base: {
25
- new (input: ApplyIdentityRemovalCommandInput): import("@smithy/core/client").CommandImpl<ApplyIdentityRemovalCommandInput, ApplyIdentityRemovalCommandOutput, UsersClientResolvedConfig, ServiceInputTypes, ServiceOutputTypes>;
26
- new (input: ApplyIdentityRemovalCommandInput): import("@smithy/core/client").CommandImpl<ApplyIdentityRemovalCommandInput, ApplyIdentityRemovalCommandOutput, UsersClientResolvedConfig, ServiceInputTypes, ServiceOutputTypes>;
27
- getEndpointParameterInstructions(): import("@smithy/types").EndpointParameterInstructions;
28
- };
29
- /**
30
- * Removes the address of a `remove` challenge whose primary code has been confirmed (`step: readyToApply`); uses up the challenge. Signs out and revokes the sessions and devices signed in with the address (including the calling session, when it signed in with it), and deactivates the company workspaces for which it was the last link, as the challenge's `dryRun` said. 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 `readyToApply` gives `ValidationException`. If the Cognito cleanup (signing out and revoking the sessions and devices) fails, `ServiceUnavailableException` is returned: the challenge is not used up and 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, ApplyIdentityRemovalCommand } from "@wildix/xbees-users-client"; // ES Modules import
35
- * // const { UsersClient, ApplyIdentityRemovalCommand } = 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 = { // ApplyIdentityRemovalInput
40
- * accountId: "STRING_VALUE", // required
41
- * challengeId: "STRING_VALUE", // required
42
- * };
43
- * const command = new ApplyIdentityRemovalCommand(input);
44
- * const response = await client.send(command);
45
- * // {};
46
- *
47
- * ```
48
- *
49
- * @param ApplyIdentityRemovalCommandInput - {@link ApplyIdentityRemovalCommandInput}
50
- * @returns {@link ApplyIdentityRemovalCommandOutput}
51
- * @see {@link ApplyIdentityRemovalCommandInput} for command's `input` shape.
52
- * @see {@link ApplyIdentityRemovalCommandOutput} for command's `response` shape.
53
- * @see {@link UsersClientResolvedConfig | config} for UsersClient's `config` shape.
54
- *
55
- * @throws {@link AccountNotFoundException} (client fault)
56
- *
57
- * @throws {@link IdentityNotFoundException} (client fault)
58
- * The address is not a sign-in method of the account (or no longer is).
59
- *
60
- * @throws {@link CannotRemovePrimaryIdentityException} (client fault)
61
- * The primary sign-in method cannot be removed; make another verified address primary first.
62
- *
63
- * @throws {@link ChallengeNotFoundException} (client fault)
64
- * 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`.
65
- *
66
- * @throws {@link ValidationException} (client fault)
67
- *
68
- * @throws {@link ServiceUnavailableException} (server fault)
69
- * The service is temporarily unable to handle the request; retry later.
70
- *
71
- * @throws {@link ForbiddenException} (client fault)
72
- *
73
- * @throws {@link RateLimitExceededException} (client fault)
74
- *
75
- * @throws {@link UsersServiceException}
76
- * <p>Base exception class for all service exceptions from Users service.</p>
77
- *
78
- *
79
- * @public
80
- */
81
- export declare class ApplyIdentityRemovalCommand extends ApplyIdentityRemovalCommand_base {
82
- /** @internal type navigation helper, not in runtime. */
83
- protected static __types: {
84
- api: {
85
- input: ApplyIdentityRemovalInput;
86
- output: {};
87
- };
88
- sdk: {
89
- input: ApplyIdentityRemovalCommandInput;
90
- output: ApplyIdentityRemovalCommandOutput;
91
- };
92
- };
93
- }
@@ -1,138 +0,0 @@
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
- }
@@ -1,96 +0,0 @@
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
- }
@@ -1,89 +0,0 @@
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
- }
@@ -1,139 +0,0 @@
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
- }