@wildix/xbees-users-client 1.2.7 → 1.2.9

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.
package/dist-cjs/Users.js CHANGED
@@ -7,6 +7,7 @@ const BatchGetUsersEmailNotificationsSettingsCommand_1 = require("./commands/Bat
7
7
  const BatchGetUsersPbxLinkDataCommand_1 = require("./commands/BatchGetUsersPbxLinkDataCommand");
8
8
  const BatchGetUsersPbxLinkDataV1Command_1 = require("./commands/BatchGetUsersPbxLinkDataV1Command");
9
9
  const ChangeUserEmailCommand_1 = require("./commands/ChangeUserEmailCommand");
10
+ const CreateAnonymousSessionCommand_1 = require("./commands/CreateAnonymousSessionCommand");
10
11
  const CreateBotApiKeyCommand_1 = require("./commands/CreateBotApiKeyCommand");
11
12
  const CreateBotCommand_1 = require("./commands/CreateBotCommand");
12
13
  const CreateSystemBotCommand_1 = require("./commands/CreateSystemBotCommand");
@@ -53,6 +54,7 @@ const commands = {
53
54
  BatchGetUsersPbxLinkDataCommand: BatchGetUsersPbxLinkDataCommand_1.BatchGetUsersPbxLinkDataCommand,
54
55
  BatchGetUsersPbxLinkDataV1Command: BatchGetUsersPbxLinkDataV1Command_1.BatchGetUsersPbxLinkDataV1Command,
55
56
  ChangeUserEmailCommand: ChangeUserEmailCommand_1.ChangeUserEmailCommand,
57
+ CreateAnonymousSessionCommand: CreateAnonymousSessionCommand_1.CreateAnonymousSessionCommand,
56
58
  CreateBotCommand: CreateBotCommand_1.CreateBotCommand,
57
59
  CreateBotApiKeyCommand: CreateBotApiKeyCommand_1.CreateBotApiKeyCommand,
58
60
  CreateSystemBotCommand: CreateSystemBotCommand_1.CreateSystemBotCommand,
@@ -0,0 +1,21 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.CreateAnonymousSessionCommand = exports.$Command = void 0;
4
+ const Aws_restJson1_1 = require("../protocols/Aws_restJson1");
5
+ const middleware_serde_1 = require("@smithy/middleware-serde");
6
+ const smithy_client_1 = require("@smithy/smithy-client");
7
+ Object.defineProperty(exports, "$Command", { enumerable: true, get: function () { return smithy_client_1.Command; } });
8
+ class CreateAnonymousSessionCommand extends smithy_client_1.Command.classBuilder()
9
+ .m(function (Command, cs, config, o) {
10
+ return [
11
+ (0, middleware_serde_1.getSerdePlugin)(config, this.serialize, this.deserialize),
12
+ ];
13
+ })
14
+ .s("Users", "CreateAnonymousSession", {})
15
+ .n("UsersClient", "CreateAnonymousSessionCommand")
16
+ .f(void 0, void 0)
17
+ .ser(Aws_restJson1_1.se_CreateAnonymousSessionCommand)
18
+ .de(Aws_restJson1_1.de_CreateAnonymousSessionCommand)
19
+ .build() {
20
+ }
21
+ exports.CreateAnonymousSessionCommand = CreateAnonymousSessionCommand;
@@ -6,6 +6,7 @@ tslib_1.__exportStar(require("./BatchGetUsersEmailNotificationsSettingsCommand")
6
6
  tslib_1.__exportStar(require("./BatchGetUsersPbxLinkDataCommand"), exports);
7
7
  tslib_1.__exportStar(require("./BatchGetUsersPbxLinkDataV1Command"), exports);
8
8
  tslib_1.__exportStar(require("./ChangeUserEmailCommand"), exports);
9
+ tslib_1.__exportStar(require("./CreateAnonymousSessionCommand"), exports);
9
10
  tslib_1.__exportStar(require("./CreateBotCommand"), exports);
10
11
  tslib_1.__exportStar(require("./CreateBotApiKeyCommand"), exports);
11
12
  tslib_1.__exportStar(require("./CreateSystemBotCommand"), exports);
@@ -1,6 +1,6 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.WorkspaceNotFoundException = exports.UserQueryPredicateNotMetException = exports.UserQuery = exports.IdentityNotFoundException = exports.IdentityAlreadyLinkedException = exports.WorkspaceType = exports.UserNotFoundException = exports.UserCompanyNotValidException = exports.CannotUnbindDefaultWorkspaceException = exports.CannotRemovePrimaryIdentityException = exports.BotSecretKeyNotValidException = exports.BotNotFoundException = exports.BotEndpoint = exports.BotLlmToolType = exports.BotLlmFunctionIntegration = exports.BotLlmFunctionIntegrationMethod = exports.BotLlmFunctionIntegrationWebhookAuthorization = exports.BotLlmEmbeddedToolType = exports.BotCapability = exports.BotToolVariableHandler = exports.BotCapabilityToolPipelineType = exports.BotApiKeyNotFoundException = exports.BotIntegrationType = exports.BotAccess = exports.AppType = exports.AccountNotFoundException = exports.PbxColleaguesSearchStrategy = exports.PbxColleaguesQueryField = exports.GetPbxColleaguesDir = exports.PbxColleagueRole = exports.PbxLicenseType = exports.ValidationException = exports.ForbiddenException = void 0;
3
+ exports.WorkspaceNotFoundException = exports.UserQueryPredicateNotMetException = exports.UserQuery = exports.IdentityNotFoundException = exports.IdentityAlreadyLinkedException = exports.WorkspaceType = exports.UserNotFoundException = exports.UserCompanyNotValidException = exports.CannotUnbindDefaultWorkspaceException = exports.CannotRemovePrimaryIdentityException = exports.BotSecretKeyNotValidException = exports.BotNotFoundException = exports.BotEndpoint = exports.BotLlmToolType = exports.BotLlmFunctionIntegration = exports.BotLlmFunctionIntegrationMethod = exports.BotLlmFunctionIntegrationWebhookAuthorization = exports.BotLlmEmbeddedToolType = exports.BotCapability = exports.BotToolVariableHandler = exports.BotCapabilityToolPipelineType = exports.BotApiKeyNotFoundException = exports.BotIntegrationType = exports.BotAccess = exports.AppType = exports.AnonymousEntryContext = exports.AccountNotFoundException = exports.PbxColleaguesSearchStrategy = exports.PbxColleaguesQueryField = exports.GetPbxColleaguesDir = exports.PbxColleagueRole = exports.PbxLicenseType = exports.ValidationException = exports.ForbiddenException = void 0;
4
4
  const UsersServiceException_1 = require("./UsersServiceException");
5
5
  class ForbiddenException extends UsersServiceException_1.UsersServiceException {
6
6
  name = "ForbiddenException";
@@ -82,6 +82,16 @@ class AccountNotFoundException extends UsersServiceException_1.UsersServiceExcep
82
82
  }
83
83
  }
84
84
  exports.AccountNotFoundException = AccountNotFoundException;
85
+ var AnonymousEntryContext;
86
+ (function (AnonymousEntryContext) {
87
+ AnonymousEntryContext.visit = (value, visitor) => {
88
+ if (value.widgetId !== undefined)
89
+ return visitor.widgetId(value.widgetId);
90
+ if (value.channelId !== undefined)
91
+ return visitor.channelId(value.channelId);
92
+ return visitor._(value.$unknown[0], value.$unknown[1]);
93
+ };
94
+ })(AnonymousEntryContext || (exports.AnonymousEntryContext = AnonymousEntryContext = {}));
85
95
  exports.AppType = {
86
96
  COLLABORATION: "collaboration",
87
97
  X_BEES: "x-bees",
@@ -1,7 +1,7 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.de_CreateBotCommand = exports.de_ChangeUserEmailCommand = exports.de_BatchGetUsersPbxLinkDataV1Command = exports.de_BatchGetUsersPbxLinkDataCommand = exports.de_BatchGetUsersEmailNotificationsSettingsCommand = exports.de_BatchGetUsersCommand = exports.se_VerifyIdentityCommand = exports.se_VerifyBotSecretKeyV1Command = exports.se_VerifyBotSecretKeyCommand = exports.se_UploadPictureV1Command = exports.se_UploadPictureCommand = exports.se_UpdateWorkspaceCommand = exports.se_UpdateUserEmailNotificationsSettingsCommand = exports.se_UpdateBotCallbackCommand = exports.se_UpdateBotCommand = exports.se_UpdateAccountCommand = exports.se_UnlinkWorkspaceCommand = exports.se_UnlinkIdentityCommand = exports.se_ToggleUnreadEmailNotificationsSubscriptionCommand = exports.se_ToggleTranscriptionEmailNotificationsSubscriptionCommand = exports.se_QueryUsersCommand = exports.se_QueryUserCommand = exports.se_QueryColleaguesCommand = exports.se_PartialUpdateUserEmailNotificationsSettingsCommand = exports.se_ListWorkspacesCommand = exports.se_ListIdentitiesCommand = exports.se_ListBotsCommand = exports.se_ListBotApiKeysCommand = exports.se_LinkIdentityCommand = exports.se_InviteCommand = exports.se_IntelligenceSearchCommand = exports.se_GetUserPbxLinkSuggestionV1Command = exports.se_GetUserPbxLinkSuggestionCommand = exports.se_GetUserPbxLinkDataCommand = exports.se_GetUserEmailNotificationsSettingsCommand = exports.se_GetUserCommand = exports.se_GetBotCallbackCommand = exports.se_GetBotCommand = exports.se_GetAppVersionCommand = exports.se_GetAccountCommand = exports.se_DeleteBotApiKeyCommand = exports.se_DeleteBotCommand = exports.se_CreateSystemBotCommand = exports.se_CreateBotApiKeyCommand = exports.se_CreateBotCommand = exports.se_ChangeUserEmailCommand = exports.se_BatchGetUsersPbxLinkDataV1Command = exports.se_BatchGetUsersPbxLinkDataCommand = exports.se_BatchGetUsersEmailNotificationsSettingsCommand = exports.se_BatchGetUsersCommand = void 0;
4
- exports.de_VerifyIdentityCommand = exports.de_VerifyBotSecretKeyV1Command = exports.de_VerifyBotSecretKeyCommand = exports.de_UploadPictureV1Command = exports.de_UploadPictureCommand = exports.de_UpdateWorkspaceCommand = exports.de_UpdateUserEmailNotificationsSettingsCommand = exports.de_UpdateBotCallbackCommand = exports.de_UpdateBotCommand = exports.de_UpdateAccountCommand = exports.de_UnlinkWorkspaceCommand = exports.de_UnlinkIdentityCommand = exports.de_ToggleUnreadEmailNotificationsSubscriptionCommand = exports.de_ToggleTranscriptionEmailNotificationsSubscriptionCommand = exports.de_QueryUsersCommand = exports.de_QueryUserCommand = exports.de_QueryColleaguesCommand = exports.de_PartialUpdateUserEmailNotificationsSettingsCommand = exports.de_ListWorkspacesCommand = exports.de_ListIdentitiesCommand = exports.de_ListBotsCommand = exports.de_ListBotApiKeysCommand = exports.de_LinkIdentityCommand = exports.de_InviteCommand = exports.de_IntelligenceSearchCommand = exports.de_GetUserPbxLinkSuggestionV1Command = exports.de_GetUserPbxLinkSuggestionCommand = exports.de_GetUserPbxLinkDataCommand = exports.de_GetUserEmailNotificationsSettingsCommand = exports.de_GetUserCommand = exports.de_GetBotCallbackCommand = exports.de_GetBotCommand = exports.de_GetAppVersionCommand = exports.de_GetAccountCommand = exports.de_DeleteBotApiKeyCommand = exports.de_DeleteBotCommand = exports.de_CreateSystemBotCommand = exports.de_CreateBotApiKeyCommand = void 0;
3
+ exports.de_ChangeUserEmailCommand = exports.de_BatchGetUsersPbxLinkDataV1Command = exports.de_BatchGetUsersPbxLinkDataCommand = exports.de_BatchGetUsersEmailNotificationsSettingsCommand = exports.de_BatchGetUsersCommand = exports.se_VerifyIdentityCommand = exports.se_VerifyBotSecretKeyV1Command = exports.se_VerifyBotSecretKeyCommand = exports.se_UploadPictureV1Command = exports.se_UploadPictureCommand = exports.se_UpdateWorkspaceCommand = exports.se_UpdateUserEmailNotificationsSettingsCommand = exports.se_UpdateBotCallbackCommand = exports.se_UpdateBotCommand = exports.se_UpdateAccountCommand = exports.se_UnlinkWorkspaceCommand = exports.se_UnlinkIdentityCommand = exports.se_ToggleUnreadEmailNotificationsSubscriptionCommand = exports.se_ToggleTranscriptionEmailNotificationsSubscriptionCommand = exports.se_QueryUsersCommand = exports.se_QueryUserCommand = exports.se_QueryColleaguesCommand = exports.se_PartialUpdateUserEmailNotificationsSettingsCommand = exports.se_ListWorkspacesCommand = exports.se_ListIdentitiesCommand = exports.se_ListBotsCommand = exports.se_ListBotApiKeysCommand = exports.se_LinkIdentityCommand = exports.se_InviteCommand = exports.se_IntelligenceSearchCommand = exports.se_GetUserPbxLinkSuggestionV1Command = exports.se_GetUserPbxLinkSuggestionCommand = exports.se_GetUserPbxLinkDataCommand = exports.se_GetUserEmailNotificationsSettingsCommand = exports.se_GetUserCommand = exports.se_GetBotCallbackCommand = exports.se_GetBotCommand = exports.se_GetAppVersionCommand = exports.se_GetAccountCommand = exports.se_DeleteBotApiKeyCommand = exports.se_DeleteBotCommand = exports.se_CreateSystemBotCommand = exports.se_CreateBotApiKeyCommand = exports.se_CreateBotCommand = exports.se_CreateAnonymousSessionCommand = exports.se_ChangeUserEmailCommand = exports.se_BatchGetUsersPbxLinkDataV1Command = exports.se_BatchGetUsersPbxLinkDataCommand = exports.se_BatchGetUsersEmailNotificationsSettingsCommand = exports.se_BatchGetUsersCommand = void 0;
4
+ exports.de_VerifyIdentityCommand = exports.de_VerifyBotSecretKeyV1Command = exports.de_VerifyBotSecretKeyCommand = exports.de_UploadPictureV1Command = exports.de_UploadPictureCommand = exports.de_UpdateWorkspaceCommand = exports.de_UpdateUserEmailNotificationsSettingsCommand = exports.de_UpdateBotCallbackCommand = exports.de_UpdateBotCommand = exports.de_UpdateAccountCommand = exports.de_UnlinkWorkspaceCommand = exports.de_UnlinkIdentityCommand = exports.de_ToggleUnreadEmailNotificationsSubscriptionCommand = exports.de_ToggleTranscriptionEmailNotificationsSubscriptionCommand = exports.de_QueryUsersCommand = exports.de_QueryUserCommand = exports.de_QueryColleaguesCommand = exports.de_PartialUpdateUserEmailNotificationsSettingsCommand = exports.de_ListWorkspacesCommand = exports.de_ListIdentitiesCommand = exports.de_ListBotsCommand = exports.de_ListBotApiKeysCommand = exports.de_LinkIdentityCommand = exports.de_InviteCommand = exports.de_IntelligenceSearchCommand = exports.de_GetUserPbxLinkSuggestionV1Command = exports.de_GetUserPbxLinkSuggestionCommand = exports.de_GetUserPbxLinkDataCommand = exports.de_GetUserEmailNotificationsSettingsCommand = exports.de_GetUserCommand = exports.de_GetBotCallbackCommand = exports.de_GetBotCommand = exports.de_GetAppVersionCommand = exports.de_GetAccountCommand = exports.de_DeleteBotApiKeyCommand = exports.de_DeleteBotCommand = exports.de_CreateSystemBotCommand = exports.de_CreateBotApiKeyCommand = exports.de_CreateBotCommand = exports.de_CreateAnonymousSessionCommand = void 0;
5
5
  const UsersServiceException_1 = require("../models/UsersServiceException");
6
6
  const models_0_1 = require("../models/models_0");
7
7
  const core_1 = require("@aws-sdk/core");
@@ -88,6 +88,24 @@ const se_ChangeUserEmailCommand = async (input, context) => {
88
88
  return b.build();
89
89
  };
90
90
  exports.se_ChangeUserEmailCommand = se_ChangeUserEmailCommand;
91
+ const se_CreateAnonymousSessionCommand = async (input, context) => {
92
+ const b = (0, core_2.requestBuilder)(input, context);
93
+ const headers = {
94
+ 'content-type': 'application/json',
95
+ };
96
+ b.bp("/v2/users/create-anonymous-session");
97
+ let body;
98
+ body = JSON.stringify((0, smithy_client_1.take)(input, {
99
+ 'captchaProof': [],
100
+ 'context': _ => (0, smithy_client_1._json)(_),
101
+ 'name': [],
102
+ }));
103
+ b.m("POST")
104
+ .h(headers)
105
+ .b(body);
106
+ return b.build();
107
+ };
108
+ exports.se_CreateAnonymousSessionCommand = se_CreateAnonymousSessionCommand;
91
109
  const se_CreateBotCommand = async (input, context) => {
92
110
  const b = (0, core_2.requestBuilder)(input, context);
93
111
  const headers = {
@@ -815,6 +833,21 @@ const de_ChangeUserEmailCommand = async (output, context) => {
815
833
  return contents;
816
834
  };
817
835
  exports.de_ChangeUserEmailCommand = de_ChangeUserEmailCommand;
836
+ const de_CreateAnonymousSessionCommand = async (output, context) => {
837
+ if (output.statusCode !== 200 && output.statusCode >= 300) {
838
+ return de_CommandError(output, context);
839
+ }
840
+ const contents = (0, smithy_client_1.map)({
841
+ $metadata: deserializeMetadata(output),
842
+ });
843
+ const data = (0, smithy_client_1.expectNonNull)(((0, smithy_client_1.expectObject)(await (0, core_1.parseJsonBody)(output.body, context))), "body");
844
+ const doc = (0, smithy_client_1.take)(data, {
845
+ 'syntheticEmail': smithy_client_1.expectString,
846
+ });
847
+ Object.assign(contents, doc);
848
+ return contents;
849
+ };
850
+ exports.de_CreateAnonymousSessionCommand = de_CreateAnonymousSessionCommand;
818
851
  const de_CreateBotCommand = async (output, context) => {
819
852
  if (output.statusCode !== 200 && output.statusCode >= 300) {
820
853
  return de_CommandError(output, context);
package/dist-es/Users.js CHANGED
@@ -4,6 +4,7 @@ import { BatchGetUsersEmailNotificationsSettingsCommand, } from "./commands/Batc
4
4
  import { BatchGetUsersPbxLinkDataCommand, } from "./commands/BatchGetUsersPbxLinkDataCommand";
5
5
  import { BatchGetUsersPbxLinkDataV1Command, } from "./commands/BatchGetUsersPbxLinkDataV1Command";
6
6
  import { ChangeUserEmailCommand, } from "./commands/ChangeUserEmailCommand";
7
+ import { CreateAnonymousSessionCommand, } from "./commands/CreateAnonymousSessionCommand";
7
8
  import { CreateBotApiKeyCommand, } from "./commands/CreateBotApiKeyCommand";
8
9
  import { CreateBotCommand, } from "./commands/CreateBotCommand";
9
10
  import { CreateSystemBotCommand, } from "./commands/CreateSystemBotCommand";
@@ -50,6 +51,7 @@ const commands = {
50
51
  BatchGetUsersPbxLinkDataCommand,
51
52
  BatchGetUsersPbxLinkDataV1Command,
52
53
  ChangeUserEmailCommand,
54
+ CreateAnonymousSessionCommand,
53
55
  CreateBotCommand,
54
56
  CreateBotApiKeyCommand,
55
57
  CreateSystemBotCommand,
@@ -0,0 +1,17 @@
1
+ import { de_CreateAnonymousSessionCommand, se_CreateAnonymousSessionCommand, } from "../protocols/Aws_restJson1";
2
+ import { getSerdePlugin } from "@smithy/middleware-serde";
3
+ import { Command as $Command } from "@smithy/smithy-client";
4
+ export { $Command };
5
+ export class CreateAnonymousSessionCommand extends $Command.classBuilder()
6
+ .m(function (Command, cs, config, o) {
7
+ return [
8
+ getSerdePlugin(config, this.serialize, this.deserialize),
9
+ ];
10
+ })
11
+ .s("Users", "CreateAnonymousSession", {})
12
+ .n("UsersClient", "CreateAnonymousSessionCommand")
13
+ .f(void 0, void 0)
14
+ .ser(se_CreateAnonymousSessionCommand)
15
+ .de(de_CreateAnonymousSessionCommand)
16
+ .build() {
17
+ }
@@ -3,6 +3,7 @@ export * from "./BatchGetUsersEmailNotificationsSettingsCommand";
3
3
  export * from "./BatchGetUsersPbxLinkDataCommand";
4
4
  export * from "./BatchGetUsersPbxLinkDataV1Command";
5
5
  export * from "./ChangeUserEmailCommand";
6
+ export * from "./CreateAnonymousSessionCommand";
6
7
  export * from "./CreateBotCommand";
7
8
  export * from "./CreateBotApiKeyCommand";
8
9
  export * from "./CreateSystemBotCommand";
@@ -76,6 +76,16 @@ export class AccountNotFoundException extends __BaseException {
76
76
  Object.setPrototypeOf(this, AccountNotFoundException.prototype);
77
77
  }
78
78
  }
79
+ export var AnonymousEntryContext;
80
+ (function (AnonymousEntryContext) {
81
+ AnonymousEntryContext.visit = (value, visitor) => {
82
+ if (value.widgetId !== undefined)
83
+ return visitor.widgetId(value.widgetId);
84
+ if (value.channelId !== undefined)
85
+ return visitor.channelId(value.channelId);
86
+ return visitor._(value.$unknown[0], value.$unknown[1]);
87
+ };
88
+ })(AnonymousEntryContext || (AnonymousEntryContext = {}));
79
89
  export const AppType = {
80
90
  COLLABORATION: "collaboration",
81
91
  X_BEES: "x-bees",
@@ -79,6 +79,23 @@ export const se_ChangeUserEmailCommand = async (input, context) => {
79
79
  .b(body);
80
80
  return b.build();
81
81
  };
82
+ export const se_CreateAnonymousSessionCommand = async (input, context) => {
83
+ const b = rb(input, context);
84
+ const headers = {
85
+ 'content-type': 'application/json',
86
+ };
87
+ b.bp("/v2/users/create-anonymous-session");
88
+ let body;
89
+ body = JSON.stringify(take(input, {
90
+ 'captchaProof': [],
91
+ 'context': _ => _json(_),
92
+ 'name': [],
93
+ }));
94
+ b.m("POST")
95
+ .h(headers)
96
+ .b(body);
97
+ return b.build();
98
+ };
82
99
  export const se_CreateBotCommand = async (input, context) => {
83
100
  const b = rb(input, context);
84
101
  const headers = {
@@ -762,6 +779,20 @@ export const de_ChangeUserEmailCommand = async (output, context) => {
762
779
  Object.assign(contents, doc);
763
780
  return contents;
764
781
  };
782
+ export const de_CreateAnonymousSessionCommand = async (output, context) => {
783
+ if (output.statusCode !== 200 && output.statusCode >= 300) {
784
+ return de_CommandError(output, context);
785
+ }
786
+ const contents = map({
787
+ $metadata: deserializeMetadata(output),
788
+ });
789
+ const data = __expectNonNull((__expectObject(await parseBody(output.body, context))), "body");
790
+ const doc = take(data, {
791
+ 'syntheticEmail': __expectString,
792
+ });
793
+ Object.assign(contents, doc);
794
+ return contents;
795
+ };
765
796
  export const de_CreateBotCommand = async (output, context) => {
766
797
  if (output.statusCode !== 200 && output.statusCode >= 300) {
767
798
  return de_CommandError(output, context);
@@ -4,6 +4,7 @@ import { BatchGetUsersEmailNotificationsSettingsCommandInput, BatchGetUsersEmail
4
4
  import { BatchGetUsersPbxLinkDataCommandInput, BatchGetUsersPbxLinkDataCommandOutput } from "./commands/BatchGetUsersPbxLinkDataCommand";
5
5
  import { BatchGetUsersPbxLinkDataV1CommandInput, BatchGetUsersPbxLinkDataV1CommandOutput } from "./commands/BatchGetUsersPbxLinkDataV1Command";
6
6
  import { ChangeUserEmailCommandInput, ChangeUserEmailCommandOutput } from "./commands/ChangeUserEmailCommand";
7
+ import { CreateAnonymousSessionCommandInput, CreateAnonymousSessionCommandOutput } from "./commands/CreateAnonymousSessionCommand";
7
8
  import { CreateBotApiKeyCommandInput, CreateBotApiKeyCommandOutput } from "./commands/CreateBotApiKeyCommand";
8
9
  import { CreateBotCommandInput, CreateBotCommandOutput } from "./commands/CreateBotCommand";
9
10
  import { CreateSystemBotCommandInput, CreateSystemBotCommandOutput } from "./commands/CreateSystemBotCommand";
@@ -75,6 +76,12 @@ export interface Users {
75
76
  changeUserEmail(args: ChangeUserEmailCommandInput, options?: __HttpHandlerOptions): Promise<ChangeUserEmailCommandOutput>;
76
77
  changeUserEmail(args: ChangeUserEmailCommandInput, cb: (err: any, data?: ChangeUserEmailCommandOutput) => void): void;
77
78
  changeUserEmail(args: ChangeUserEmailCommandInput, options: __HttpHandlerOptions, cb: (err: any, data?: ChangeUserEmailCommandOutput) => void): void;
79
+ /**
80
+ * @see {@link CreateAnonymousSessionCommand}
81
+ */
82
+ createAnonymousSession(args: CreateAnonymousSessionCommandInput, options?: __HttpHandlerOptions): Promise<CreateAnonymousSessionCommandOutput>;
83
+ createAnonymousSession(args: CreateAnonymousSessionCommandInput, cb: (err: any, data?: CreateAnonymousSessionCommandOutput) => void): void;
84
+ createAnonymousSession(args: CreateAnonymousSessionCommandInput, options: __HttpHandlerOptions, cb: (err: any, data?: CreateAnonymousSessionCommandOutput) => void): void;
78
85
  /**
79
86
  * @see {@link CreateBotCommand}
80
87
  */
@@ -3,6 +3,7 @@ import { BatchGetUsersEmailNotificationsSettingsCommandInput, BatchGetUsersEmail
3
3
  import { BatchGetUsersPbxLinkDataCommandInput, BatchGetUsersPbxLinkDataCommandOutput } from "./commands/BatchGetUsersPbxLinkDataCommand";
4
4
  import { BatchGetUsersPbxLinkDataV1CommandInput, BatchGetUsersPbxLinkDataV1CommandOutput } from "./commands/BatchGetUsersPbxLinkDataV1Command";
5
5
  import { ChangeUserEmailCommandInput, ChangeUserEmailCommandOutput } from "./commands/ChangeUserEmailCommand";
6
+ import { CreateAnonymousSessionCommandInput, CreateAnonymousSessionCommandOutput } from "./commands/CreateAnonymousSessionCommand";
6
7
  import { CreateBotApiKeyCommandInput, CreateBotApiKeyCommandOutput } from "./commands/CreateBotApiKeyCommand";
7
8
  import { CreateBotCommandInput, CreateBotCommandOutput } from "./commands/CreateBotCommand";
8
9
  import { CreateSystemBotCommandInput, CreateSystemBotCommandOutput } from "./commands/CreateSystemBotCommand";
@@ -53,11 +54,11 @@ export { __Client };
53
54
  /**
54
55
  * @public
55
56
  */
56
- export type ServiceInputTypes = BatchGetUsersCommandInput | BatchGetUsersEmailNotificationsSettingsCommandInput | BatchGetUsersPbxLinkDataCommandInput | BatchGetUsersPbxLinkDataV1CommandInput | ChangeUserEmailCommandInput | CreateBotApiKeyCommandInput | CreateBotCommandInput | CreateSystemBotCommandInput | DeleteBotApiKeyCommandInput | DeleteBotCommandInput | GetAccountCommandInput | GetAppVersionCommandInput | GetBotCallbackCommandInput | GetBotCommandInput | GetUserCommandInput | GetUserEmailNotificationsSettingsCommandInput | GetUserPbxLinkDataCommandInput | GetUserPbxLinkSuggestionCommandInput | GetUserPbxLinkSuggestionV1CommandInput | IntelligenceSearchCommandInput | InviteCommandInput | LinkIdentityCommandInput | ListBotApiKeysCommandInput | ListBotsCommandInput | ListIdentitiesCommandInput | ListWorkspacesCommandInput | PartialUpdateUserEmailNotificationsSettingsCommandInput | QueryColleaguesCommandInput | QueryUserCommandInput | QueryUsersCommandInput | ToggleTranscriptionEmailNotificationsSubscriptionCommandInput | ToggleUnreadEmailNotificationsSubscriptionCommandInput | UnlinkIdentityCommandInput | UnlinkWorkspaceCommandInput | UpdateAccountCommandInput | UpdateBotCallbackCommandInput | UpdateBotCommandInput | UpdateUserEmailNotificationsSettingsCommandInput | UpdateWorkspaceCommandInput | UploadPictureCommandInput | UploadPictureV1CommandInput | VerifyBotSecretKeyCommandInput | VerifyBotSecretKeyV1CommandInput | VerifyIdentityCommandInput;
57
+ export type ServiceInputTypes = BatchGetUsersCommandInput | BatchGetUsersEmailNotificationsSettingsCommandInput | BatchGetUsersPbxLinkDataCommandInput | BatchGetUsersPbxLinkDataV1CommandInput | ChangeUserEmailCommandInput | CreateAnonymousSessionCommandInput | CreateBotApiKeyCommandInput | CreateBotCommandInput | CreateSystemBotCommandInput | DeleteBotApiKeyCommandInput | DeleteBotCommandInput | GetAccountCommandInput | GetAppVersionCommandInput | GetBotCallbackCommandInput | GetBotCommandInput | GetUserCommandInput | GetUserEmailNotificationsSettingsCommandInput | GetUserPbxLinkDataCommandInput | GetUserPbxLinkSuggestionCommandInput | GetUserPbxLinkSuggestionV1CommandInput | IntelligenceSearchCommandInput | InviteCommandInput | LinkIdentityCommandInput | ListBotApiKeysCommandInput | ListBotsCommandInput | ListIdentitiesCommandInput | ListWorkspacesCommandInput | PartialUpdateUserEmailNotificationsSettingsCommandInput | QueryColleaguesCommandInput | QueryUserCommandInput | QueryUsersCommandInput | ToggleTranscriptionEmailNotificationsSubscriptionCommandInput | ToggleUnreadEmailNotificationsSubscriptionCommandInput | UnlinkIdentityCommandInput | UnlinkWorkspaceCommandInput | UpdateAccountCommandInput | UpdateBotCallbackCommandInput | UpdateBotCommandInput | UpdateUserEmailNotificationsSettingsCommandInput | UpdateWorkspaceCommandInput | UploadPictureCommandInput | UploadPictureV1CommandInput | VerifyBotSecretKeyCommandInput | VerifyBotSecretKeyV1CommandInput | VerifyIdentityCommandInput;
57
58
  /**
58
59
  * @public
59
60
  */
60
- export type ServiceOutputTypes = BatchGetUsersCommandOutput | BatchGetUsersEmailNotificationsSettingsCommandOutput | BatchGetUsersPbxLinkDataCommandOutput | BatchGetUsersPbxLinkDataV1CommandOutput | ChangeUserEmailCommandOutput | CreateBotApiKeyCommandOutput | CreateBotCommandOutput | CreateSystemBotCommandOutput | DeleteBotApiKeyCommandOutput | DeleteBotCommandOutput | GetAccountCommandOutput | GetAppVersionCommandOutput | GetBotCallbackCommandOutput | GetBotCommandOutput | GetUserCommandOutput | GetUserEmailNotificationsSettingsCommandOutput | GetUserPbxLinkDataCommandOutput | GetUserPbxLinkSuggestionCommandOutput | GetUserPbxLinkSuggestionV1CommandOutput | IntelligenceSearchCommandOutput | InviteCommandOutput | LinkIdentityCommandOutput | ListBotApiKeysCommandOutput | ListBotsCommandOutput | ListIdentitiesCommandOutput | ListWorkspacesCommandOutput | PartialUpdateUserEmailNotificationsSettingsCommandOutput | QueryColleaguesCommandOutput | QueryUserCommandOutput | QueryUsersCommandOutput | ToggleTranscriptionEmailNotificationsSubscriptionCommandOutput | ToggleUnreadEmailNotificationsSubscriptionCommandOutput | UnlinkIdentityCommandOutput | UnlinkWorkspaceCommandOutput | UpdateAccountCommandOutput | UpdateBotCallbackCommandOutput | UpdateBotCommandOutput | UpdateUserEmailNotificationsSettingsCommandOutput | UpdateWorkspaceCommandOutput | UploadPictureCommandOutput | UploadPictureV1CommandOutput | VerifyBotSecretKeyCommandOutput | VerifyBotSecretKeyV1CommandOutput | VerifyIdentityCommandOutput;
61
+ export type ServiceOutputTypes = BatchGetUsersCommandOutput | BatchGetUsersEmailNotificationsSettingsCommandOutput | BatchGetUsersPbxLinkDataCommandOutput | BatchGetUsersPbxLinkDataV1CommandOutput | ChangeUserEmailCommandOutput | CreateAnonymousSessionCommandOutput | CreateBotApiKeyCommandOutput | CreateBotCommandOutput | CreateSystemBotCommandOutput | DeleteBotApiKeyCommandOutput | DeleteBotCommandOutput | GetAccountCommandOutput | GetAppVersionCommandOutput | GetBotCallbackCommandOutput | GetBotCommandOutput | GetUserCommandOutput | GetUserEmailNotificationsSettingsCommandOutput | GetUserPbxLinkDataCommandOutput | GetUserPbxLinkSuggestionCommandOutput | GetUserPbxLinkSuggestionV1CommandOutput | IntelligenceSearchCommandOutput | InviteCommandOutput | LinkIdentityCommandOutput | ListBotApiKeysCommandOutput | ListBotsCommandOutput | ListIdentitiesCommandOutput | ListWorkspacesCommandOutput | PartialUpdateUserEmailNotificationsSettingsCommandOutput | QueryColleaguesCommandOutput | QueryUserCommandOutput | QueryUsersCommandOutput | ToggleTranscriptionEmailNotificationsSubscriptionCommandOutput | ToggleUnreadEmailNotificationsSubscriptionCommandOutput | UnlinkIdentityCommandOutput | UnlinkWorkspaceCommandOutput | UpdateAccountCommandOutput | UpdateBotCallbackCommandOutput | UpdateBotCommandOutput | UpdateUserEmailNotificationsSettingsCommandOutput | UpdateWorkspaceCommandOutput | UploadPictureCommandOutput | UploadPictureV1CommandOutput | VerifyBotSecretKeyCommandOutput | VerifyBotSecretKeyV1CommandOutput | VerifyIdentityCommandOutput;
61
62
  /**
62
63
  * @public
63
64
  */
@@ -0,0 +1,81 @@
1
+ import { ServiceInputTypes, ServiceOutputTypes, UsersClientResolvedConfig } from "../UsersClient";
2
+ import { CreateAnonymousSessionInput, CreateAnonymousSessionOutput } from "../models/models_0";
3
+ import { Command as $Command } from "@smithy/smithy-client";
4
+ import { MetadataBearer as __MetadataBearer } from "@smithy/types";
5
+ /**
6
+ * @public
7
+ */
8
+ export type { __MetadataBearer };
9
+ export { $Command };
10
+ /**
11
+ * @public
12
+ *
13
+ * The input for {@link CreateAnonymousSessionCommand}.
14
+ */
15
+ export interface CreateAnonymousSessionCommandInput extends CreateAnonymousSessionInput {
16
+ }
17
+ /**
18
+ * @public
19
+ *
20
+ * The output of {@link CreateAnonymousSessionCommand}.
21
+ */
22
+ export interface CreateAnonymousSessionCommandOutput extends CreateAnonymousSessionOutput, __MetadataBearer {
23
+ }
24
+ declare const CreateAnonymousSessionCommand_base: {
25
+ new (input: CreateAnonymousSessionCommandInput): import("@smithy/smithy-client").CommandImpl<CreateAnonymousSessionCommandInput, CreateAnonymousSessionCommandOutput, UsersClientResolvedConfig, ServiceInputTypes, ServiceOutputTypes>;
26
+ new (__0_0: CreateAnonymousSessionCommandInput): import("@smithy/smithy-client").CommandImpl<CreateAnonymousSessionCommandInput, CreateAnonymousSessionCommandOutput, UsersClientResolvedConfig, ServiceInputTypes, ServiceOutputTypes>;
27
+ getEndpointParameterInstructions(): import("@smithy/middleware-endpoint").EndpointParameterInstructions;
28
+ };
29
+ /**
30
+ * @public
31
+ *
32
+ * @example
33
+ * Use a bare-bones client and the command you need to make an API call.
34
+ * ```javascript
35
+ * import { UsersClient, CreateAnonymousSessionCommand } from "@wildix/xbees-users-client"; // ES Modules import
36
+ * // const { UsersClient, CreateAnonymousSessionCommand } = require("@wildix/xbees-users-client"); // CommonJS import
37
+ * const client = new UsersClient(config);
38
+ * const input = { // CreateAnonymousSessionInput
39
+ * name: "STRING_VALUE", // required
40
+ * captchaProof: "STRING_VALUE", // required
41
+ * context: { // AnonymousEntryContext Union: only one key present
42
+ * widgetId: "STRING_VALUE",
43
+ * channelId: "STRING_VALUE",
44
+ * },
45
+ * };
46
+ * const command = new CreateAnonymousSessionCommand(input);
47
+ * const response = await client.send(command);
48
+ * // { // CreateAnonymousSessionOutput
49
+ * // syntheticEmail: "STRING_VALUE", // required
50
+ * // };
51
+ *
52
+ * ```
53
+ *
54
+ * @param CreateAnonymousSessionCommandInput - {@link CreateAnonymousSessionCommandInput}
55
+ * @returns {@link CreateAnonymousSessionCommandOutput}
56
+ * @see {@link CreateAnonymousSessionCommandInput} for command's `input` shape.
57
+ * @see {@link CreateAnonymousSessionCommandOutput} for command's `response` shape.
58
+ * @see {@link UsersClientResolvedConfig | config} for UsersClient's `config` shape.
59
+ *
60
+ * @throws {@link ForbiddenException} (client fault)
61
+ *
62
+ * @throws {@link ValidationException} (client fault)
63
+ *
64
+ * @throws {@link UsersServiceException}
65
+ * <p>Base exception class for all service exceptions from Users service.</p>
66
+ *
67
+ *
68
+ */
69
+ export declare class CreateAnonymousSessionCommand extends CreateAnonymousSessionCommand_base {
70
+ /** @internal type navigation helper, not in runtime. */
71
+ protected static __types: {
72
+ api: {
73
+ input: CreateAnonymousSessionInput;
74
+ output: CreateAnonymousSessionOutput;
75
+ };
76
+ sdk: {
77
+ input: CreateAnonymousSessionCommandInput;
78
+ output: CreateAnonymousSessionCommandOutput;
79
+ };
80
+ };
81
+ }
@@ -3,6 +3,7 @@ export * from "./BatchGetUsersEmailNotificationsSettingsCommand";
3
3
  export * from "./BatchGetUsersPbxLinkDataCommand";
4
4
  export * from "./BatchGetUsersPbxLinkDataV1Command";
5
5
  export * from "./ChangeUserEmailCommand";
6
+ export * from "./CreateAnonymousSessionCommand";
6
7
  export * from "./CreateBotCommand";
7
8
  export * from "./CreateBotApiKeyCommand";
8
9
  export * from "./CreateSystemBotCommand";
@@ -258,6 +258,39 @@ export declare class AccountNotFoundException extends __BaseException {
258
258
  */
259
259
  constructor(opts: __ExceptionOptionType<AccountNotFoundException, __BaseException>);
260
260
  }
261
+ /**
262
+ * @public
263
+ */
264
+ export type AnonymousEntryContext = AnonymousEntryContext.ChannelIdMember | AnonymousEntryContext.WidgetIdMember | AnonymousEntryContext.$UnknownMember;
265
+ /**
266
+ * @public
267
+ */
268
+ export declare namespace AnonymousEntryContext {
269
+ interface WidgetIdMember {
270
+ widgetId: string;
271
+ channelId?: never;
272
+ $unknown?: never;
273
+ }
274
+ interface ChannelIdMember {
275
+ widgetId?: never;
276
+ channelId: string;
277
+ $unknown?: never;
278
+ }
279
+ /**
280
+ * @public
281
+ */
282
+ interface $UnknownMember {
283
+ widgetId?: never;
284
+ channelId?: never;
285
+ $unknown: [string, any];
286
+ }
287
+ interface Visitor<T> {
288
+ widgetId: (value: string) => T;
289
+ channelId: (value: string) => T;
290
+ _: (name: string, value: any) => T;
291
+ }
292
+ const visit: <T>(value: AnonymousEntryContext, visitor: Visitor<T>) => T;
293
+ }
261
294
  /**
262
295
  * @public
263
296
  * @enum
@@ -1228,6 +1261,20 @@ export declare class UserNotFoundException extends __BaseException {
1228
1261
  */
1229
1262
  constructor(opts: __ExceptionOptionType<UserNotFoundException, __BaseException>);
1230
1263
  }
1264
+ /**
1265
+ * @public
1266
+ */
1267
+ export interface CreateAnonymousSessionInput {
1268
+ name: string;
1269
+ captchaProof: string;
1270
+ context: AnonymousEntryContext;
1271
+ }
1272
+ /**
1273
+ * @public
1274
+ */
1275
+ export interface CreateAnonymousSessionOutput {
1276
+ syntheticEmail: string;
1277
+ }
1231
1278
  /**
1232
1279
  * @public
1233
1280
  */
@@ -3,6 +3,7 @@ import { BatchGetUsersEmailNotificationsSettingsCommandInput, BatchGetUsersEmail
3
3
  import { BatchGetUsersPbxLinkDataCommandInput, BatchGetUsersPbxLinkDataCommandOutput } from "../commands/BatchGetUsersPbxLinkDataCommand";
4
4
  import { BatchGetUsersPbxLinkDataV1CommandInput, BatchGetUsersPbxLinkDataV1CommandOutput } from "../commands/BatchGetUsersPbxLinkDataV1Command";
5
5
  import { ChangeUserEmailCommandInput, ChangeUserEmailCommandOutput } from "../commands/ChangeUserEmailCommand";
6
+ import { CreateAnonymousSessionCommandInput, CreateAnonymousSessionCommandOutput } from "../commands/CreateAnonymousSessionCommand";
6
7
  import { CreateBotApiKeyCommandInput, CreateBotApiKeyCommandOutput } from "../commands/CreateBotApiKeyCommand";
7
8
  import { CreateBotCommandInput, CreateBotCommandOutput } from "../commands/CreateBotCommand";
8
9
  import { CreateSystemBotCommandInput, CreateSystemBotCommandOutput } from "../commands/CreateSystemBotCommand";
@@ -64,6 +65,10 @@ export declare const se_BatchGetUsersPbxLinkDataV1Command: (input: BatchGetUsers
64
65
  * serializeAws_restJson1ChangeUserEmailCommand
65
66
  */
66
67
  export declare const se_ChangeUserEmailCommand: (input: ChangeUserEmailCommandInput, context: __SerdeContext) => Promise<__HttpRequest>;
68
+ /**
69
+ * serializeAws_restJson1CreateAnonymousSessionCommand
70
+ */
71
+ export declare const se_CreateAnonymousSessionCommand: (input: CreateAnonymousSessionCommandInput, context: __SerdeContext) => Promise<__HttpRequest>;
67
72
  /**
68
73
  * serializeAws_restJson1CreateBotCommand
69
74
  */
@@ -240,6 +245,10 @@ export declare const de_BatchGetUsersPbxLinkDataV1Command: (output: __HttpRespon
240
245
  * deserializeAws_restJson1ChangeUserEmailCommand
241
246
  */
242
247
  export declare const de_ChangeUserEmailCommand: (output: __HttpResponse, context: __SerdeContext) => Promise<ChangeUserEmailCommandOutput>;
248
+ /**
249
+ * deserializeAws_restJson1CreateAnonymousSessionCommand
250
+ */
251
+ export declare const de_CreateAnonymousSessionCommand: (output: __HttpResponse, context: __SerdeContext) => Promise<CreateAnonymousSessionCommandOutput>;
243
252
  /**
244
253
  * deserializeAws_restJson1CreateBotCommand
245
254
  */
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@wildix/xbees-users-client",
3
3
  "description": "@wildix/xbees-users-client client",
4
- "version": "1.2.7",
4
+ "version": "1.2.9",
5
5
  "scripts": {
6
6
  "build": "concurrently 'yarn:build:cjs' 'yarn:build:es' 'yarn:build:types'",
7
7
  "build:cjs": "tsc -p tsconfig.cjs.json",