@wildix/xbees-users-client 1.3.2 → 3.1.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 (198) hide show
  1. package/dist-cjs/Users.js +3 -3
  2. package/dist-cjs/UsersClient.js +34 -26
  3. package/dist-cjs/auth/httpAuthExtensionConfiguration.js +43 -0
  4. package/dist-cjs/auth/httpAuthSchemeProvider.js +81 -0
  5. package/dist-cjs/commands/BatchGetUsersCommand.js +10 -11
  6. package/dist-cjs/commands/BatchGetUsersEmailNotificationsSettingsCommand.js +10 -11
  7. package/dist-cjs/commands/BatchGetUsersPbxLinkDataCommand.js +10 -11
  8. package/dist-cjs/commands/BatchGetUsersPbxLinkDataV1Command.js +10 -11
  9. package/dist-cjs/commands/ChangeUserEmailCommand.js +10 -11
  10. package/dist-cjs/commands/CreateAnonymousSessionCommand.js +10 -11
  11. package/dist-cjs/commands/CreateBotApiKeyCommand.js +10 -11
  12. package/dist-cjs/commands/CreateBotCommand.js +10 -11
  13. package/dist-cjs/commands/CreateSystemBotCommand.js +10 -11
  14. package/dist-cjs/commands/DeleteBotApiKeyCommand.js +10 -11
  15. package/dist-cjs/commands/DeleteBotCommand.js +10 -11
  16. package/dist-cjs/commands/GetAccountCommand.js +10 -11
  17. package/dist-cjs/commands/GetAppVersionCommand.js +10 -11
  18. package/dist-cjs/commands/GetBotCallbackCommand.js +10 -11
  19. package/dist-cjs/commands/GetBotCommand.js +10 -11
  20. package/dist-cjs/commands/GetUserCommand.js +10 -11
  21. package/dist-cjs/commands/GetUserEmailNotificationsSettingsCommand.js +10 -11
  22. package/dist-cjs/commands/GetUserPbxLinkDataCommand.js +10 -11
  23. package/dist-cjs/commands/GetUserPbxLinkSuggestionCommand.js +10 -11
  24. package/dist-cjs/commands/GetUserPbxLinkSuggestionV1Command.js +10 -11
  25. package/dist-cjs/commands/IntelligenceSearchCommand.js +10 -11
  26. package/dist-cjs/commands/InviteCommand.js +10 -11
  27. package/dist-cjs/commands/LinkIdentityCommand.js +10 -11
  28. package/dist-cjs/commands/ListBotApiKeysCommand.js +10 -11
  29. package/dist-cjs/commands/ListBotsCommand.js +10 -11
  30. package/dist-cjs/commands/ListIdentitiesCommand.js +10 -11
  31. package/dist-cjs/commands/ListWorkspacesCommand.js +10 -11
  32. package/dist-cjs/commands/PartialUpdateUserEmailNotificationsSettingsCommand.js +10 -11
  33. package/dist-cjs/commands/QueryColleaguesCommand.js +10 -11
  34. package/dist-cjs/commands/QueryUserCommand.js +10 -11
  35. package/dist-cjs/commands/QueryUsersCommand.js +10 -11
  36. package/dist-cjs/commands/ToggleTranscriptionEmailNotificationsSubscriptionCommand.js +10 -11
  37. package/dist-cjs/commands/ToggleUnreadEmailNotificationsSubscriptionCommand.js +10 -11
  38. package/dist-cjs/commands/UnlinkIdentityCommand.js +10 -11
  39. package/dist-cjs/commands/UnlinkWorkspaceCommand.js +10 -11
  40. package/dist-cjs/commands/UpdateAccountCommand.js +10 -11
  41. package/dist-cjs/commands/UpdateBotCallbackCommand.js +10 -11
  42. package/dist-cjs/commands/UpdateBotCommand.js +10 -11
  43. package/dist-cjs/commands/UpdateUserEmailNotificationsSettingsCommand.js +10 -11
  44. package/dist-cjs/commands/UpdateWorkspaceCommand.js +10 -11
  45. package/dist-cjs/commands/UploadPictureCommand.js +10 -11
  46. package/dist-cjs/commands/UploadPictureV1Command.js +10 -11
  47. package/dist-cjs/commands/VerifyBotSecretKeyCommand.js +10 -11
  48. package/dist-cjs/commands/VerifyBotSecretKeyV1Command.js +10 -11
  49. package/dist-cjs/commands/VerifyIdentityCommand.js +10 -11
  50. package/dist-cjs/commands/index.js +4 -4
  51. package/dist-cjs/endpoint/EndpointParameters.js +16 -0
  52. package/dist-cjs/endpoint/bdd.js +28 -0
  53. package/dist-cjs/endpoint/endpointResolver.js +16 -0
  54. package/dist-cjs/index.js +4 -1
  55. package/dist-cjs/models/UsersServiceException.js +3 -3
  56. package/dist-cjs/models/enums.js +86 -0
  57. package/dist-cjs/models/errors.js +225 -0
  58. package/dist-cjs/models/models_0.js +0 -400
  59. package/dist-cjs/runtimeConfig.browser.js +11 -11
  60. package/dist-cjs/runtimeConfig.js +22 -18
  61. package/dist-cjs/runtimeConfig.shared.js +35 -10
  62. package/dist-cjs/runtimeExtensions.js +6 -5
  63. package/dist-cjs/schemas/schemas_0.js +1463 -0
  64. package/dist-es/Users.js +10 -10
  65. package/dist-es/UsersClient.js +30 -22
  66. package/dist-es/auth/httpAuthExtensionConfiguration.js +38 -0
  67. package/dist-es/auth/httpAuthSchemeProvider.js +75 -0
  68. package/dist-es/commands/BatchGetUsersCommand.js +9 -10
  69. package/dist-es/commands/BatchGetUsersEmailNotificationsSettingsCommand.js +9 -10
  70. package/dist-es/commands/BatchGetUsersPbxLinkDataCommand.js +9 -10
  71. package/dist-es/commands/BatchGetUsersPbxLinkDataV1Command.js +9 -10
  72. package/dist-es/commands/ChangeUserEmailCommand.js +9 -10
  73. package/dist-es/commands/CreateAnonymousSessionCommand.js +9 -10
  74. package/dist-es/commands/CreateBotApiKeyCommand.js +9 -10
  75. package/dist-es/commands/CreateBotCommand.js +9 -10
  76. package/dist-es/commands/CreateSystemBotCommand.js +9 -10
  77. package/dist-es/commands/DeleteBotApiKeyCommand.js +9 -10
  78. package/dist-es/commands/DeleteBotCommand.js +9 -10
  79. package/dist-es/commands/GetAccountCommand.js +9 -10
  80. package/dist-es/commands/GetAppVersionCommand.js +9 -10
  81. package/dist-es/commands/GetBotCallbackCommand.js +9 -10
  82. package/dist-es/commands/GetBotCommand.js +9 -10
  83. package/dist-es/commands/GetUserCommand.js +9 -10
  84. package/dist-es/commands/GetUserEmailNotificationsSettingsCommand.js +9 -10
  85. package/dist-es/commands/GetUserPbxLinkDataCommand.js +9 -10
  86. package/dist-es/commands/GetUserPbxLinkSuggestionCommand.js +9 -10
  87. package/dist-es/commands/GetUserPbxLinkSuggestionV1Command.js +9 -10
  88. package/dist-es/commands/IntelligenceSearchCommand.js +9 -10
  89. package/dist-es/commands/InviteCommand.js +9 -10
  90. package/dist-es/commands/LinkIdentityCommand.js +9 -10
  91. package/dist-es/commands/ListBotApiKeysCommand.js +9 -10
  92. package/dist-es/commands/ListBotsCommand.js +9 -10
  93. package/dist-es/commands/ListIdentitiesCommand.js +9 -10
  94. package/dist-es/commands/ListWorkspacesCommand.js +9 -10
  95. package/dist-es/commands/PartialUpdateUserEmailNotificationsSettingsCommand.js +9 -10
  96. package/dist-es/commands/QueryColleaguesCommand.js +9 -10
  97. package/dist-es/commands/QueryUserCommand.js +9 -10
  98. package/dist-es/commands/QueryUsersCommand.js +9 -10
  99. package/dist-es/commands/ToggleTranscriptionEmailNotificationsSubscriptionCommand.js +9 -10
  100. package/dist-es/commands/ToggleUnreadEmailNotificationsSubscriptionCommand.js +9 -10
  101. package/dist-es/commands/UnlinkIdentityCommand.js +9 -10
  102. package/dist-es/commands/UnlinkWorkspaceCommand.js +9 -10
  103. package/dist-es/commands/UpdateAccountCommand.js +9 -10
  104. package/dist-es/commands/UpdateBotCallbackCommand.js +9 -10
  105. package/dist-es/commands/UpdateBotCommand.js +9 -10
  106. package/dist-es/commands/UpdateUserEmailNotificationsSettingsCommand.js +9 -10
  107. package/dist-es/commands/UpdateWorkspaceCommand.js +9 -10
  108. package/dist-es/commands/UploadPictureCommand.js +9 -10
  109. package/dist-es/commands/UploadPictureV1Command.js +9 -10
  110. package/dist-es/commands/VerifyBotSecretKeyCommand.js +9 -10
  111. package/dist-es/commands/VerifyBotSecretKeyV1Command.js +9 -10
  112. package/dist-es/commands/VerifyIdentityCommand.js +9 -10
  113. package/dist-es/commands/index.js +4 -4
  114. package/dist-es/endpoint/EndpointParameters.js +12 -0
  115. package/dist-es/endpoint/bdd.js +25 -0
  116. package/dist-es/endpoint/endpointResolver.js +12 -0
  117. package/dist-es/index.js +4 -1
  118. package/dist-es/models/UsersServiceException.js +1 -1
  119. package/dist-es/models/enums.js +83 -0
  120. package/dist-es/models/errors.js +205 -0
  121. package/dist-es/models/models_0.js +1 -382
  122. package/dist-es/runtimeConfig.browser.js +7 -7
  123. package/dist-es/runtimeConfig.js +17 -13
  124. package/dist-es/runtimeConfig.shared.js +29 -4
  125. package/dist-es/runtimeExtensions.js +6 -5
  126. package/dist-es/schemas/schemas_0.js +1456 -0
  127. package/dist-types/Users.d.ts +46 -46
  128. package/dist-types/UsersClient.d.ts +75 -57
  129. package/dist-types/auth/httpAuthExtensionConfiguration.d.ts +29 -0
  130. package/dist-types/auth/httpAuthSchemeProvider.d.ts +81 -0
  131. package/dist-types/commands/BatchGetUsersCommand.d.ts +11 -7
  132. package/dist-types/commands/BatchGetUsersEmailNotificationsSettingsCommand.d.ts +11 -7
  133. package/dist-types/commands/BatchGetUsersPbxLinkDataCommand.d.ts +11 -7
  134. package/dist-types/commands/BatchGetUsersPbxLinkDataV1Command.d.ts +11 -7
  135. package/dist-types/commands/ChangeUserEmailCommand.d.ts +11 -7
  136. package/dist-types/commands/CreateAnonymousSessionCommand.d.ts +11 -7
  137. package/dist-types/commands/CreateBotApiKeyCommand.d.ts +11 -7
  138. package/dist-types/commands/CreateBotCommand.d.ts +11 -7
  139. package/dist-types/commands/CreateSystemBotCommand.d.ts +11 -7
  140. package/dist-types/commands/DeleteBotApiKeyCommand.d.ts +11 -7
  141. package/dist-types/commands/DeleteBotCommand.d.ts +11 -7
  142. package/dist-types/commands/GetAccountCommand.d.ts +11 -7
  143. package/dist-types/commands/GetAppVersionCommand.d.ts +11 -7
  144. package/dist-types/commands/GetBotCallbackCommand.d.ts +11 -7
  145. package/dist-types/commands/GetBotCommand.d.ts +11 -7
  146. package/dist-types/commands/GetUserCommand.d.ts +11 -7
  147. package/dist-types/commands/GetUserEmailNotificationsSettingsCommand.d.ts +11 -7
  148. package/dist-types/commands/GetUserPbxLinkDataCommand.d.ts +11 -7
  149. package/dist-types/commands/GetUserPbxLinkSuggestionCommand.d.ts +11 -7
  150. package/dist-types/commands/GetUserPbxLinkSuggestionV1Command.d.ts +11 -7
  151. package/dist-types/commands/IntelligenceSearchCommand.d.ts +11 -7
  152. package/dist-types/commands/InviteCommand.d.ts +11 -7
  153. package/dist-types/commands/LinkIdentityCommand.d.ts +11 -7
  154. package/dist-types/commands/ListBotApiKeysCommand.d.ts +11 -7
  155. package/dist-types/commands/ListBotsCommand.d.ts +11 -7
  156. package/dist-types/commands/ListIdentitiesCommand.d.ts +11 -7
  157. package/dist-types/commands/ListWorkspacesCommand.d.ts +11 -7
  158. package/dist-types/commands/PartialUpdateUserEmailNotificationsSettingsCommand.d.ts +11 -7
  159. package/dist-types/commands/QueryColleaguesCommand.d.ts +11 -7
  160. package/dist-types/commands/QueryUserCommand.d.ts +11 -7
  161. package/dist-types/commands/QueryUsersCommand.d.ts +11 -7
  162. package/dist-types/commands/ToggleTranscriptionEmailNotificationsSubscriptionCommand.d.ts +11 -7
  163. package/dist-types/commands/ToggleUnreadEmailNotificationsSubscriptionCommand.d.ts +11 -7
  164. package/dist-types/commands/UnlinkIdentityCommand.d.ts +11 -7
  165. package/dist-types/commands/UnlinkWorkspaceCommand.d.ts +11 -7
  166. package/dist-types/commands/UpdateAccountCommand.d.ts +11 -7
  167. package/dist-types/commands/UpdateBotCallbackCommand.d.ts +11 -7
  168. package/dist-types/commands/UpdateBotCommand.d.ts +11 -7
  169. package/dist-types/commands/UpdateUserEmailNotificationsSettingsCommand.d.ts +11 -7
  170. package/dist-types/commands/UpdateWorkspaceCommand.d.ts +11 -7
  171. package/dist-types/commands/UploadPictureCommand.d.ts +11 -7
  172. package/dist-types/commands/UploadPictureV1Command.d.ts +12 -8
  173. package/dist-types/commands/VerifyBotSecretKeyCommand.d.ts +11 -7
  174. package/dist-types/commands/VerifyBotSecretKeyV1Command.d.ts +11 -7
  175. package/dist-types/commands/VerifyIdentityCommand.d.ts +11 -7
  176. package/dist-types/commands/index.d.ts +4 -4
  177. package/dist-types/endpoint/EndpointParameters.d.ts +41 -0
  178. package/dist-types/endpoint/bdd.d.ts +2 -0
  179. package/dist-types/endpoint/endpointResolver.d.ts +8 -0
  180. package/dist-types/extensionConfiguration.d.ts +4 -3
  181. package/dist-types/index.d.ts +5 -1
  182. package/dist-types/models/UsersServiceException.d.ts +1 -1
  183. package/dist-types/models/enums.d.ts +196 -0
  184. package/dist-types/models/errors.d.ts +189 -0
  185. package/dist-types/models/models_0.d.ts +75 -435
  186. package/dist-types/runtimeConfig.browser.d.ts +39 -16
  187. package/dist-types/runtimeConfig.d.ts +38 -15
  188. package/dist-types/runtimeConfig.native.d.ts +40 -17
  189. package/dist-types/runtimeConfig.shared.d.ts +24 -3
  190. package/dist-types/runtimeExtensions.d.ts +1 -1
  191. package/dist-types/schemas/schemas_0.d.ts +217 -0
  192. package/package.json +14 -40
  193. package/dist-cjs/models/index.js +0 -4
  194. package/dist-cjs/protocols/Aws_restJson1.js +0 -1915
  195. package/dist-es/models/index.js +0 -1
  196. package/dist-es/protocols/Aws_restJson1.js +0 -1821
  197. package/dist-types/models/index.d.ts +0 -1
  198. package/dist-types/protocols/Aws_restJson1.d.ts +0 -407
@@ -1,1915 +0,0 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
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
- const UsersServiceException_1 = require("../models/UsersServiceException");
6
- const models_0_1 = require("../models/models_0");
7
- const core_1 = require("@aws-sdk/core");
8
- const core_2 = require("@smithy/core");
9
- const smithy_client_1 = require("@smithy/smithy-client");
10
- const se_BatchGetUsersCommand = async (input, context) => {
11
- const b = (0, core_2.requestBuilder)(input, context);
12
- const headers = {
13
- 'content-type': 'application/json',
14
- };
15
- b.bp("/v2/users/batch-get-users");
16
- let body;
17
- body = JSON.stringify((0, smithy_client_1.take)(input, {
18
- 'id': _ => (0, smithy_client_1._json)(_),
19
- }));
20
- b.m("POST")
21
- .h(headers)
22
- .b(body);
23
- return b.build();
24
- };
25
- exports.se_BatchGetUsersCommand = se_BatchGetUsersCommand;
26
- const se_BatchGetUsersEmailNotificationsSettingsCommand = async (input, context) => {
27
- const b = (0, core_2.requestBuilder)(input, context);
28
- const headers = {
29
- 'content-type': 'application/json',
30
- };
31
- b.bp("/v2/users/batch-get-users-email-notifications-settings");
32
- let body;
33
- body = JSON.stringify((0, smithy_client_1.take)(input, {
34
- 'usersIds': _ => (0, smithy_client_1._json)(_),
35
- }));
36
- b.m("POST")
37
- .h(headers)
38
- .b(body);
39
- return b.build();
40
- };
41
- exports.se_BatchGetUsersEmailNotificationsSettingsCommand = se_BatchGetUsersEmailNotificationsSettingsCommand;
42
- const se_BatchGetUsersPbxLinkDataCommand = async (input, context) => {
43
- const b = (0, core_2.requestBuilder)(input, context);
44
- const headers = {
45
- 'content-type': 'application/json',
46
- };
47
- b.bp("/v2/users/batch-get-users-pbx-link-data");
48
- let body;
49
- body = JSON.stringify((0, smithy_client_1.take)(input, {
50
- 'id': _ => (0, smithy_client_1._json)(_),
51
- }));
52
- b.m("POST")
53
- .h(headers)
54
- .b(body);
55
- return b.build();
56
- };
57
- exports.se_BatchGetUsersPbxLinkDataCommand = se_BatchGetUsersPbxLinkDataCommand;
58
- const se_BatchGetUsersPbxLinkDataV1Command = async (input, context) => {
59
- const b = (0, core_2.requestBuilder)(input, context);
60
- const headers = {
61
- 'content-type': 'application/json',
62
- };
63
- b.bp("/v2/users/BatchGetUsersPbxLinkData");
64
- let body;
65
- body = JSON.stringify((0, smithy_client_1.take)(input, {
66
- 'id': _ => (0, smithy_client_1._json)(_),
67
- }));
68
- b.m("POST")
69
- .h(headers)
70
- .b(body);
71
- return b.build();
72
- };
73
- exports.se_BatchGetUsersPbxLinkDataV1Command = se_BatchGetUsersPbxLinkDataV1Command;
74
- const se_ChangeUserEmailCommand = async (input, context) => {
75
- const b = (0, core_2.requestBuilder)(input, context);
76
- const headers = {
77
- 'content-type': 'application/json',
78
- };
79
- b.bp("/v2/users/change-email");
80
- let body;
81
- body = JSON.stringify((0, smithy_client_1.take)(input, {
82
- 'newData': _ => (0, smithy_client_1._json)(_),
83
- 'oldData': _ => (0, smithy_client_1._json)(_),
84
- }));
85
- b.m("PUT")
86
- .h(headers)
87
- .b(body);
88
- return b.build();
89
- };
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;
109
- const se_CreateBotCommand = async (input, context) => {
110
- const b = (0, core_2.requestBuilder)(input, context);
111
- const headers = {
112
- 'content-type': 'application/json',
113
- };
114
- b.bp("/v2/users/bots");
115
- const query = (0, smithy_client_1.map)({
116
- [_c]: [, input[_c]],
117
- });
118
- let body;
119
- body = JSON.stringify((0, smithy_client_1.take)(input, {
120
- 'access': [],
121
- 'callback': _ => se_BotCallback(_, context),
122
- 'category': [],
123
- 'groupId': [],
124
- 'name': [],
125
- 'picture': [],
126
- 'searchable': [],
127
- }));
128
- b.m("POST")
129
- .h(headers)
130
- .q(query)
131
- .b(body);
132
- return b.build();
133
- };
134
- exports.se_CreateBotCommand = se_CreateBotCommand;
135
- const se_CreateBotApiKeyCommand = async (input, context) => {
136
- const b = (0, core_2.requestBuilder)(input, context);
137
- const headers = {
138
- 'content-type': 'application/json',
139
- };
140
- b.bp("/v2/users/bots/{botId}/keys");
141
- b.p('botId', () => input.botId, '{botId}', false);
142
- const query = (0, smithy_client_1.map)({
143
- [_c]: [, input[_c]],
144
- });
145
- let body;
146
- body = JSON.stringify((0, smithy_client_1.take)(input, {
147
- 'name': [],
148
- }));
149
- b.m("POST")
150
- .h(headers)
151
- .q(query)
152
- .b(body);
153
- return b.build();
154
- };
155
- exports.se_CreateBotApiKeyCommand = se_CreateBotApiKeyCommand;
156
- const se_CreateSystemBotCommand = async (input, context) => {
157
- const b = (0, core_2.requestBuilder)(input, context);
158
- const headers = {
159
- 'content-type': 'application/json',
160
- };
161
- b.bp("/v2/users/system-bots");
162
- const query = (0, smithy_client_1.map)({
163
- [_c]: [, input[_c]],
164
- });
165
- let body;
166
- body = JSON.stringify((0, smithy_client_1.take)(input, {
167
- 'name': [],
168
- 'picture': [],
169
- }));
170
- b.m("POST")
171
- .h(headers)
172
- .q(query)
173
- .b(body);
174
- return b.build();
175
- };
176
- exports.se_CreateSystemBotCommand = se_CreateSystemBotCommand;
177
- const se_DeleteBotCommand = async (input, context) => {
178
- const b = (0, core_2.requestBuilder)(input, context);
179
- const headers = {};
180
- b.bp("/v2/users/bots/{botId}");
181
- b.p('botId', () => input.botId, '{botId}', false);
182
- const query = (0, smithy_client_1.map)({
183
- [_c]: [, input[_c]],
184
- });
185
- let body;
186
- b.m("DELETE")
187
- .h(headers)
188
- .q(query)
189
- .b(body);
190
- return b.build();
191
- };
192
- exports.se_DeleteBotCommand = se_DeleteBotCommand;
193
- const se_DeleteBotApiKeyCommand = async (input, context) => {
194
- const b = (0, core_2.requestBuilder)(input, context);
195
- const headers = {};
196
- b.bp("/v2/users/bots/{botId}/keys/{apiKeySecret}");
197
- b.p('botId', () => input.botId, '{botId}', false);
198
- b.p('apiKeySecret', () => input.apiKeySecret, '{apiKeySecret}', false);
199
- const query = (0, smithy_client_1.map)({
200
- [_c]: [, input[_c]],
201
- });
202
- let body;
203
- b.m("DELETE")
204
- .h(headers)
205
- .q(query)
206
- .b(body);
207
- return b.build();
208
- };
209
- exports.se_DeleteBotApiKeyCommand = se_DeleteBotApiKeyCommand;
210
- const se_GetAccountCommand = async (input, context) => {
211
- const b = (0, core_2.requestBuilder)(input, context);
212
- const headers = {};
213
- b.bp("/v2/users/accounts/{accountId}");
214
- b.p('accountId', () => input.accountId, '{accountId}', false);
215
- let body;
216
- b.m("GET")
217
- .h(headers)
218
- .b(body);
219
- return b.build();
220
- };
221
- exports.se_GetAccountCommand = se_GetAccountCommand;
222
- const se_GetAppVersionCommand = async (input, context) => {
223
- const b = (0, core_2.requestBuilder)(input, context);
224
- const headers = {};
225
- b.bp("/v2/users/app-version");
226
- const query = (0, smithy_client_1.map)({
227
- [_aT]: [, (0, smithy_client_1.expectNonNull)(input[_aT], `appType`)],
228
- });
229
- let body;
230
- b.m("GET")
231
- .h(headers)
232
- .q(query)
233
- .b(body);
234
- return b.build();
235
- };
236
- exports.se_GetAppVersionCommand = se_GetAppVersionCommand;
237
- const se_GetBotCommand = async (input, context) => {
238
- const b = (0, core_2.requestBuilder)(input, context);
239
- const headers = {};
240
- b.bp("/v2/users/bots/{botId}");
241
- b.p('botId', () => input.botId, '{botId}', false);
242
- const query = (0, smithy_client_1.map)({
243
- [_c]: [, input[_c]],
244
- });
245
- let body;
246
- b.m("GET")
247
- .h(headers)
248
- .q(query)
249
- .b(body);
250
- return b.build();
251
- };
252
- exports.se_GetBotCommand = se_GetBotCommand;
253
- const se_GetBotCallbackCommand = async (input, context) => {
254
- const b = (0, core_2.requestBuilder)(input, context);
255
- const headers = {};
256
- b.bp("/v2/users/bots/{botId}/callback");
257
- b.p('botId', () => input.botId, '{botId}', false);
258
- const query = (0, smithy_client_1.map)({
259
- [_c]: [, input[_c]],
260
- });
261
- let body;
262
- b.m("GET")
263
- .h(headers)
264
- .q(query)
265
- .b(body);
266
- return b.build();
267
- };
268
- exports.se_GetBotCallbackCommand = se_GetBotCallbackCommand;
269
- const se_GetUserCommand = async (input, context) => {
270
- const b = (0, core_2.requestBuilder)(input, context);
271
- const headers = {};
272
- b.bp("/v2/users/cloud/{userId}");
273
- b.p('userId', () => input.userId, '{userId}', false);
274
- let body;
275
- b.m("GET")
276
- .h(headers)
277
- .b(body);
278
- return b.build();
279
- };
280
- exports.se_GetUserCommand = se_GetUserCommand;
281
- const se_GetUserEmailNotificationsSettingsCommand = async (input, context) => {
282
- const b = (0, core_2.requestBuilder)(input, context);
283
- const headers = {};
284
- b.bp("/v2/users/cloud/{userId}/notifications/email");
285
- b.p('userId', () => input.userId, '{userId}', false);
286
- let body;
287
- b.m("GET")
288
- .h(headers)
289
- .b(body);
290
- return b.build();
291
- };
292
- exports.se_GetUserEmailNotificationsSettingsCommand = se_GetUserEmailNotificationsSettingsCommand;
293
- const se_GetUserPbxLinkDataCommand = async (input, context) => {
294
- const b = (0, core_2.requestBuilder)(input, context);
295
- const headers = {};
296
- b.bp("/v2/users/cloud/{userId}/pbx-link-data");
297
- b.p('userId', () => input.userId, '{userId}', false);
298
- let body;
299
- b.m("GET")
300
- .h(headers)
301
- .b(body);
302
- return b.build();
303
- };
304
- exports.se_GetUserPbxLinkDataCommand = se_GetUserPbxLinkDataCommand;
305
- const se_GetUserPbxLinkSuggestionCommand = async (input, context) => {
306
- const b = (0, core_2.requestBuilder)(input, context);
307
- const headers = {};
308
- b.bp("/v2/users/get-user-pbx-link-suggestion");
309
- const query = (0, smithy_client_1.map)({
310
- [_e]: [, input[_e]],
311
- });
312
- let body;
313
- b.m("GET")
314
- .h(headers)
315
- .q(query)
316
- .b(body);
317
- return b.build();
318
- };
319
- exports.se_GetUserPbxLinkSuggestionCommand = se_GetUserPbxLinkSuggestionCommand;
320
- const se_GetUserPbxLinkSuggestionV1Command = async (input, context) => {
321
- const b = (0, core_2.requestBuilder)(input, context);
322
- const headers = {};
323
- b.bp("/v2/users/GetUserPbxLinkSuggestion");
324
- const query = (0, smithy_client_1.map)({
325
- [_e]: [, input[_e]],
326
- });
327
- let body;
328
- b.m("GET")
329
- .h(headers)
330
- .q(query)
331
- .b(body);
332
- return b.build();
333
- };
334
- exports.se_GetUserPbxLinkSuggestionV1Command = se_GetUserPbxLinkSuggestionV1Command;
335
- const se_IntelligenceSearchCommand = async (input, context) => {
336
- const b = (0, core_2.requestBuilder)(input, context);
337
- const headers = {};
338
- b.bp("/v2/users/intelligence-search");
339
- const query = (0, smithy_client_1.map)({
340
- [_c]: [, input[_c]],
341
- [_s]: [, (0, smithy_client_1.expectNonNull)(input[_s], `search`)],
342
- [_eE]: [, input[_eE]],
343
- });
344
- let body;
345
- b.m("GET")
346
- .h(headers)
347
- .q(query)
348
- .b(body);
349
- return b.build();
350
- };
351
- exports.se_IntelligenceSearchCommand = se_IntelligenceSearchCommand;
352
- const se_InviteCommand = async (input, context) => {
353
- const b = (0, core_2.requestBuilder)(input, context);
354
- const headers = {
355
- 'content-type': 'application/json',
356
- };
357
- b.bp("/v2/users/invite");
358
- const query = (0, smithy_client_1.map)({
359
- [_c]: [, input[_cI]],
360
- });
361
- let body;
362
- body = JSON.stringify((0, smithy_client_1.take)(input, {
363
- 'invitees': _ => (0, smithy_client_1._json)(_),
364
- }));
365
- b.m("POST")
366
- .h(headers)
367
- .q(query)
368
- .b(body);
369
- return b.build();
370
- };
371
- exports.se_InviteCommand = se_InviteCommand;
372
- const se_LinkIdentityCommand = async (input, context) => {
373
- const b = (0, core_2.requestBuilder)(input, context);
374
- const headers = {
375
- 'content-type': 'application/json',
376
- };
377
- b.bp("/v2/users/accounts/{accountId}/identities");
378
- b.p('accountId', () => input.accountId, '{accountId}', false);
379
- let body;
380
- body = JSON.stringify((0, smithy_client_1.take)(input, {
381
- 'identity': [],
382
- }));
383
- b.m("POST")
384
- .h(headers)
385
- .b(body);
386
- return b.build();
387
- };
388
- exports.se_LinkIdentityCommand = se_LinkIdentityCommand;
389
- const se_ListBotApiKeysCommand = async (input, context) => {
390
- const b = (0, core_2.requestBuilder)(input, context);
391
- const headers = {};
392
- b.bp("/v2/users/bots/{botId}/keys");
393
- b.p('botId', () => input.botId, '{botId}', false);
394
- const query = (0, smithy_client_1.map)({
395
- [_c]: [, input[_c]],
396
- });
397
- let body;
398
- b.m("GET")
399
- .h(headers)
400
- .q(query)
401
- .b(body);
402
- return b.build();
403
- };
404
- exports.se_ListBotApiKeysCommand = se_ListBotApiKeysCommand;
405
- const se_ListBotsCommand = async (input, context) => {
406
- const b = (0, core_2.requestBuilder)(input, context);
407
- const headers = {};
408
- b.bp("/v2/users/bots");
409
- const query = (0, smithy_client_1.map)({
410
- [_c]: [, input[_c]],
411
- });
412
- let body;
413
- b.m("GET")
414
- .h(headers)
415
- .q(query)
416
- .b(body);
417
- return b.build();
418
- };
419
- exports.se_ListBotsCommand = se_ListBotsCommand;
420
- const se_ListIdentitiesCommand = async (input, context) => {
421
- const b = (0, core_2.requestBuilder)(input, context);
422
- const headers = {};
423
- b.bp("/v2/users/accounts/{accountId}/identities");
424
- b.p('accountId', () => input.accountId, '{accountId}', false);
425
- let body;
426
- b.m("GET")
427
- .h(headers)
428
- .b(body);
429
- return b.build();
430
- };
431
- exports.se_ListIdentitiesCommand = se_ListIdentitiesCommand;
432
- const se_ListWorkspacesCommand = async (input, context) => {
433
- const b = (0, core_2.requestBuilder)(input, context);
434
- const headers = {};
435
- b.bp("/v2/users/accounts/{accountId}/workspaces");
436
- b.p('accountId', () => input.accountId, '{accountId}', false);
437
- let body;
438
- b.m("GET")
439
- .h(headers)
440
- .b(body);
441
- return b.build();
442
- };
443
- exports.se_ListWorkspacesCommand = se_ListWorkspacesCommand;
444
- const se_PartialUpdateUserEmailNotificationsSettingsCommand = async (input, context) => {
445
- const b = (0, core_2.requestBuilder)(input, context);
446
- const headers = {
447
- 'content-type': 'application/json',
448
- };
449
- b.bp("/v2/users/cloud/{userId}/notifications/email");
450
- b.p('userId', () => input.userId, '{userId}', false);
451
- let body;
452
- body = JSON.stringify((0, smithy_client_1.take)(input, {
453
- 'transcription': [],
454
- 'unread': [],
455
- }));
456
- b.m("PATCH")
457
- .h(headers)
458
- .b(body);
459
- return b.build();
460
- };
461
- exports.se_PartialUpdateUserEmailNotificationsSettingsCommand = se_PartialUpdateUserEmailNotificationsSettingsCommand;
462
- const se_QueryColleaguesCommand = async (input, context) => {
463
- const b = (0, core_2.requestBuilder)(input, context);
464
- const headers = {
465
- 'content-type': 'application/json',
466
- };
467
- b.bp("/v2/users/query-colleagues");
468
- const query = (0, smithy_client_1.map)({
469
- [_c]: [, input[_c]],
470
- });
471
- let body;
472
- body = JSON.stringify((0, smithy_client_1.take)(input, {
473
- 'invite': [],
474
- 'query': _ => (0, smithy_client_1._json)(_),
475
- }));
476
- b.m("POST")
477
- .h(headers)
478
- .q(query)
479
- .b(body);
480
- return b.build();
481
- };
482
- exports.se_QueryColleaguesCommand = se_QueryColleaguesCommand;
483
- const se_QueryUserCommand = async (input, context) => {
484
- const b = (0, core_2.requestBuilder)(input, context);
485
- const headers = {
486
- 'content-type': 'application/json',
487
- };
488
- b.bp("/v2/users/query-user");
489
- let body;
490
- body = JSON.stringify((0, smithy_client_1.take)(input, {
491
- 'predicate': _ => (0, smithy_client_1._json)(_),
492
- 'query': _ => (0, smithy_client_1._json)(_),
493
- }));
494
- b.m("POST")
495
- .h(headers)
496
- .b(body);
497
- return b.build();
498
- };
499
- exports.se_QueryUserCommand = se_QueryUserCommand;
500
- const se_QueryUsersCommand = async (input, context) => {
501
- const b = (0, core_2.requestBuilder)(input, context);
502
- const headers = {
503
- 'content-type': 'application/json',
504
- };
505
- b.bp("/v2/users/query-users");
506
- let body;
507
- body = JSON.stringify((0, smithy_client_1.take)(input, {
508
- 'predicate': _ => (0, smithy_client_1._json)(_),
509
- 'queries': _ => (0, smithy_client_1._json)(_),
510
- }));
511
- b.m("POST")
512
- .h(headers)
513
- .b(body);
514
- return b.build();
515
- };
516
- exports.se_QueryUsersCommand = se_QueryUsersCommand;
517
- const se_ToggleTranscriptionEmailNotificationsSubscriptionCommand = async (input, context) => {
518
- const b = (0, core_2.requestBuilder)(input, context);
519
- const headers = {
520
- 'content-type': 'application/json',
521
- };
522
- b.bp("/v2/users/toggle-transcription-email-notifications-subscription");
523
- let body;
524
- body = JSON.stringify((0, smithy_client_1.take)(input, {
525
- 'subscribe': [],
526
- 'unsubscribeToken': [],
527
- }));
528
- b.m("POST")
529
- .h(headers)
530
- .b(body);
531
- return b.build();
532
- };
533
- exports.se_ToggleTranscriptionEmailNotificationsSubscriptionCommand = se_ToggleTranscriptionEmailNotificationsSubscriptionCommand;
534
- const se_ToggleUnreadEmailNotificationsSubscriptionCommand = async (input, context) => {
535
- const b = (0, core_2.requestBuilder)(input, context);
536
- const headers = {
537
- 'content-type': 'application/json',
538
- };
539
- b.bp("/v2/users/toggle-unread-email-notifications-subscription");
540
- let body;
541
- body = JSON.stringify((0, smithy_client_1.take)(input, {
542
- 'subscribe': [],
543
- 'unsubscribeToken': [],
544
- }));
545
- b.m("POST")
546
- .h(headers)
547
- .b(body);
548
- return b.build();
549
- };
550
- exports.se_ToggleUnreadEmailNotificationsSubscriptionCommand = se_ToggleUnreadEmailNotificationsSubscriptionCommand;
551
- const se_UnlinkIdentityCommand = async (input, context) => {
552
- const b = (0, core_2.requestBuilder)(input, context);
553
- const headers = {};
554
- b.bp("/v2/users/accounts/{accountId}/identities/{identity}");
555
- b.p('accountId', () => input.accountId, '{accountId}', false);
556
- b.p('identity', () => input.identity, '{identity}', false);
557
- let body;
558
- b.m("DELETE")
559
- .h(headers)
560
- .b(body);
561
- return b.build();
562
- };
563
- exports.se_UnlinkIdentityCommand = se_UnlinkIdentityCommand;
564
- const se_UnlinkWorkspaceCommand = async (input, context) => {
565
- const b = (0, core_2.requestBuilder)(input, context);
566
- const headers = {};
567
- b.bp("/v2/users/accounts/{accountId}/workspaces/{workspaceId}");
568
- b.p('workspaceId', () => input.workspaceId, '{workspaceId}', false);
569
- b.p('accountId', () => input.accountId, '{accountId}', false);
570
- let body;
571
- b.m("DELETE")
572
- .h(headers)
573
- .b(body);
574
- return b.build();
575
- };
576
- exports.se_UnlinkWorkspaceCommand = se_UnlinkWorkspaceCommand;
577
- const se_UpdateAccountCommand = async (input, context) => {
578
- const b = (0, core_2.requestBuilder)(input, context);
579
- const headers = {
580
- 'content-type': 'application/json',
581
- };
582
- b.bp("/v2/users/accounts/{accountId}");
583
- b.p('accountId', () => input.accountId, '{accountId}', false);
584
- let body;
585
- body = JSON.stringify((0, smithy_client_1.take)(input, {
586
- 'defaultWorkspace': [],
587
- 'primaryIdentity': [],
588
- }));
589
- b.m("PUT")
590
- .h(headers)
591
- .b(body);
592
- return b.build();
593
- };
594
- exports.se_UpdateAccountCommand = se_UpdateAccountCommand;
595
- const se_UpdateBotCommand = async (input, context) => {
596
- const b = (0, core_2.requestBuilder)(input, context);
597
- const headers = {
598
- 'content-type': 'application/json',
599
- };
600
- b.bp("/v2/users/bots/{botId}");
601
- b.p('botId', () => input.botId, '{botId}', false);
602
- const query = (0, smithy_client_1.map)({
603
- [_c]: [, input[_c]],
604
- });
605
- let body;
606
- body = JSON.stringify((0, smithy_client_1.take)(input, {
607
- 'access': [],
608
- 'category': [],
609
- 'groupId': [],
610
- 'name': [],
611
- 'picture': [],
612
- 'searchable': [],
613
- }));
614
- b.m("PUT")
615
- .h(headers)
616
- .q(query)
617
- .b(body);
618
- return b.build();
619
- };
620
- exports.se_UpdateBotCommand = se_UpdateBotCommand;
621
- const se_UpdateBotCallbackCommand = async (input, context) => {
622
- const b = (0, core_2.requestBuilder)(input, context);
623
- const headers = {
624
- 'content-type': 'application/json',
625
- };
626
- b.bp("/v2/users/bots/{botId}/callback");
627
- b.p('botId', () => input.botId, '{botId}', false);
628
- const query = (0, smithy_client_1.map)({
629
- [_c]: [, input[_c]],
630
- });
631
- let body;
632
- body = JSON.stringify((0, smithy_client_1.take)(input, {
633
- 'callback': _ => se_BotCallback(_, context),
634
- }));
635
- b.m("PUT")
636
- .h(headers)
637
- .q(query)
638
- .b(body);
639
- return b.build();
640
- };
641
- exports.se_UpdateBotCallbackCommand = se_UpdateBotCallbackCommand;
642
- const se_UpdateUserEmailNotificationsSettingsCommand = async (input, context) => {
643
- const b = (0, core_2.requestBuilder)(input, context);
644
- const headers = {
645
- 'content-type': 'application/json',
646
- };
647
- b.bp("/v2/users/cloud/{userId}/notifications/email");
648
- b.p('userId', () => input.userId, '{userId}', false);
649
- let body;
650
- body = JSON.stringify((0, smithy_client_1.take)(input, {
651
- 'transcription': [],
652
- 'unread': [],
653
- }));
654
- b.m("POST")
655
- .h(headers)
656
- .b(body);
657
- return b.build();
658
- };
659
- exports.se_UpdateUserEmailNotificationsSettingsCommand = se_UpdateUserEmailNotificationsSettingsCommand;
660
- const se_UpdateWorkspaceCommand = async (input, context) => {
661
- const b = (0, core_2.requestBuilder)(input, context);
662
- const headers = {
663
- 'content-type': 'application/json',
664
- };
665
- b.bp("/v2/users/accounts/{accountId}/workspaces/{workspaceId}");
666
- b.p('accountId', () => input.accountId, '{accountId}', false);
667
- b.p('workspaceId', () => input.workspaceId, '{workspaceId}', false);
668
- let body;
669
- body = JSON.stringify((0, smithy_client_1.take)(input, {
670
- 'active': [],
671
- 'type': [],
672
- }));
673
- b.m("PUT")
674
- .h(headers)
675
- .b(body);
676
- return b.build();
677
- };
678
- exports.se_UpdateWorkspaceCommand = se_UpdateWorkspaceCommand;
679
- const se_UploadPictureCommand = async (input, context) => {
680
- const b = (0, core_2.requestBuilder)(input, context);
681
- const headers = {
682
- 'content-type': 'application/json',
683
- };
684
- b.bp("/v2/users/upload-picture");
685
- let body;
686
- body = JSON.stringify((0, smithy_client_1.take)(input, {
687
- 'picture': [],
688
- }));
689
- b.m("POST")
690
- .h(headers)
691
- .b(body);
692
- return b.build();
693
- };
694
- exports.se_UploadPictureCommand = se_UploadPictureCommand;
695
- const se_UploadPictureV1Command = async (input, context) => {
696
- const b = (0, core_2.requestBuilder)(input, context);
697
- const headers = {
698
- 'content-type': 'application/json',
699
- };
700
- b.bp("/v2/users/UploadPicture");
701
- let body;
702
- body = JSON.stringify((0, smithy_client_1.take)(input, {
703
- 'picture': [],
704
- }));
705
- b.m("POST")
706
- .h(headers)
707
- .b(body);
708
- return b.build();
709
- };
710
- exports.se_UploadPictureV1Command = se_UploadPictureV1Command;
711
- const se_VerifyBotSecretKeyCommand = async (input, context) => {
712
- const b = (0, core_2.requestBuilder)(input, context);
713
- const headers = {
714
- 'content-type': 'application/json',
715
- };
716
- b.bp("/v2/users/verify-bot-secret-key");
717
- let body;
718
- body = JSON.stringify((0, smithy_client_1.take)(input, {
719
- 'secret': [],
720
- }));
721
- b.m("POST")
722
- .h(headers)
723
- .b(body);
724
- return b.build();
725
- };
726
- exports.se_VerifyBotSecretKeyCommand = se_VerifyBotSecretKeyCommand;
727
- const se_VerifyBotSecretKeyV1Command = async (input, context) => {
728
- const b = (0, core_2.requestBuilder)(input, context);
729
- const headers = {
730
- 'content-type': 'application/json',
731
- };
732
- b.bp("/v2/users/auth/VerifyBotSecretKey");
733
- let body;
734
- body = JSON.stringify((0, smithy_client_1.take)(input, {
735
- 'secret': [],
736
- }));
737
- b.m("POST")
738
- .h(headers)
739
- .b(body);
740
- return b.build();
741
- };
742
- exports.se_VerifyBotSecretKeyV1Command = se_VerifyBotSecretKeyV1Command;
743
- const se_VerifyIdentityCommand = async (input, context) => {
744
- const b = (0, core_2.requestBuilder)(input, context);
745
- const headers = {
746
- 'content-type': 'application/json',
747
- };
748
- b.bp("/v2/users/accounts/{accountId}/identities/verify");
749
- b.p('accountId', () => input.accountId, '{accountId}', false);
750
- let body;
751
- body = JSON.stringify((0, smithy_client_1.take)(input, {
752
- 'identity': [],
753
- 'otp': [],
754
- }));
755
- b.m("POST")
756
- .h(headers)
757
- .b(body);
758
- return b.build();
759
- };
760
- exports.se_VerifyIdentityCommand = se_VerifyIdentityCommand;
761
- const de_BatchGetUsersCommand = async (output, context) => {
762
- if (output.statusCode !== 200 && output.statusCode >= 300) {
763
- return de_CommandError(output, context);
764
- }
765
- const contents = (0, smithy_client_1.map)({
766
- $metadata: deserializeMetadata(output),
767
- });
768
- const data = (0, smithy_client_1.expectNonNull)(((0, smithy_client_1.expectObject)(await (0, core_1.parseJsonBody)(output.body, context))), "body");
769
- const doc = (0, smithy_client_1.take)(data, {
770
- 'users': smithy_client_1._json,
771
- });
772
- Object.assign(contents, doc);
773
- return contents;
774
- };
775
- exports.de_BatchGetUsersCommand = de_BatchGetUsersCommand;
776
- const de_BatchGetUsersEmailNotificationsSettingsCommand = async (output, context) => {
777
- if (output.statusCode !== 200 && output.statusCode >= 300) {
778
- return de_CommandError(output, context);
779
- }
780
- const contents = (0, smithy_client_1.map)({
781
- $metadata: deserializeMetadata(output),
782
- });
783
- const data = (0, smithy_client_1.expectNonNull)(((0, smithy_client_1.expectObject)(await (0, core_1.parseJsonBody)(output.body, context))), "body");
784
- const doc = (0, smithy_client_1.take)(data, {
785
- 'notifications': smithy_client_1._json,
786
- });
787
- Object.assign(contents, doc);
788
- return contents;
789
- };
790
- exports.de_BatchGetUsersEmailNotificationsSettingsCommand = de_BatchGetUsersEmailNotificationsSettingsCommand;
791
- const de_BatchGetUsersPbxLinkDataCommand = async (output, context) => {
792
- if (output.statusCode !== 200 && output.statusCode >= 300) {
793
- return de_CommandError(output, context);
794
- }
795
- const contents = (0, smithy_client_1.map)({
796
- $metadata: deserializeMetadata(output),
797
- });
798
- const data = (0, smithy_client_1.expectNonNull)(((0, smithy_client_1.expectObject)(await (0, core_1.parseJsonBody)(output.body, context))), "body");
799
- const doc = (0, smithy_client_1.take)(data, {
800
- 'users': smithy_client_1._json,
801
- });
802
- Object.assign(contents, doc);
803
- return contents;
804
- };
805
- exports.de_BatchGetUsersPbxLinkDataCommand = de_BatchGetUsersPbxLinkDataCommand;
806
- const de_BatchGetUsersPbxLinkDataV1Command = async (output, context) => {
807
- if (output.statusCode !== 200 && output.statusCode >= 300) {
808
- return de_CommandError(output, context);
809
- }
810
- const contents = (0, smithy_client_1.map)({
811
- $metadata: deserializeMetadata(output),
812
- });
813
- const data = (0, smithy_client_1.expectNonNull)(((0, smithy_client_1.expectObject)(await (0, core_1.parseJsonBody)(output.body, context))), "body");
814
- const doc = (0, smithy_client_1.take)(data, {
815
- 'users': smithy_client_1._json,
816
- });
817
- Object.assign(contents, doc);
818
- return contents;
819
- };
820
- exports.de_BatchGetUsersPbxLinkDataV1Command = de_BatchGetUsersPbxLinkDataV1Command;
821
- const de_ChangeUserEmailCommand = async (output, context) => {
822
- if (output.statusCode !== 200 && output.statusCode >= 300) {
823
- return de_CommandError(output, context);
824
- }
825
- const contents = (0, smithy_client_1.map)({
826
- $metadata: deserializeMetadata(output),
827
- });
828
- const data = (0, smithy_client_1.expectNonNull)(((0, smithy_client_1.expectObject)(await (0, core_1.parseJsonBody)(output.body, context))), "body");
829
- const doc = (0, smithy_client_1.take)(data, {
830
- 'sfnArn': smithy_client_1.expectString,
831
- });
832
- Object.assign(contents, doc);
833
- return contents;
834
- };
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;
851
- const de_CreateBotCommand = async (output, context) => {
852
- if (output.statusCode !== 200 && output.statusCode >= 300) {
853
- return de_CommandError(output, context);
854
- }
855
- const contents = (0, smithy_client_1.map)({
856
- $metadata: deserializeMetadata(output),
857
- });
858
- const data = (0, smithy_client_1.expectNonNull)(((0, smithy_client_1.expectObject)(await (0, core_1.parseJsonBody)(output.body, context))), "body");
859
- const doc = (0, smithy_client_1.take)(data, {
860
- 'bot': smithy_client_1._json,
861
- });
862
- Object.assign(contents, doc);
863
- return contents;
864
- };
865
- exports.de_CreateBotCommand = de_CreateBotCommand;
866
- const de_CreateBotApiKeyCommand = async (output, context) => {
867
- if (output.statusCode !== 200 && output.statusCode >= 300) {
868
- return de_CommandError(output, context);
869
- }
870
- const contents = (0, smithy_client_1.map)({
871
- $metadata: deserializeMetadata(output),
872
- });
873
- const data = (0, smithy_client_1.expectNonNull)(((0, smithy_client_1.expectObject)(await (0, core_1.parseJsonBody)(output.body, context))), "body");
874
- const doc = (0, smithy_client_1.take)(data, {
875
- 'bot': smithy_client_1._json,
876
- 'key': smithy_client_1._json,
877
- });
878
- Object.assign(contents, doc);
879
- return contents;
880
- };
881
- exports.de_CreateBotApiKeyCommand = de_CreateBotApiKeyCommand;
882
- const de_CreateSystemBotCommand = async (output, context) => {
883
- if (output.statusCode !== 200 && output.statusCode >= 300) {
884
- return de_CommandError(output, context);
885
- }
886
- const contents = (0, smithy_client_1.map)({
887
- $metadata: deserializeMetadata(output),
888
- });
889
- const data = (0, smithy_client_1.expectNonNull)(((0, smithy_client_1.expectObject)(await (0, core_1.parseJsonBody)(output.body, context))), "body");
890
- const doc = (0, smithy_client_1.take)(data, {
891
- 'id': smithy_client_1.expectString,
892
- });
893
- Object.assign(contents, doc);
894
- return contents;
895
- };
896
- exports.de_CreateSystemBotCommand = de_CreateSystemBotCommand;
897
- const de_DeleteBotCommand = async (output, context) => {
898
- if (output.statusCode !== 200 && output.statusCode >= 300) {
899
- return de_CommandError(output, context);
900
- }
901
- const contents = (0, smithy_client_1.map)({
902
- $metadata: deserializeMetadata(output),
903
- });
904
- await (0, smithy_client_1.collectBody)(output.body, context);
905
- return contents;
906
- };
907
- exports.de_DeleteBotCommand = de_DeleteBotCommand;
908
- const de_DeleteBotApiKeyCommand = async (output, context) => {
909
- if (output.statusCode !== 200 && output.statusCode >= 300) {
910
- return de_CommandError(output, context);
911
- }
912
- const contents = (0, smithy_client_1.map)({
913
- $metadata: deserializeMetadata(output),
914
- });
915
- await (0, smithy_client_1.collectBody)(output.body, context);
916
- return contents;
917
- };
918
- exports.de_DeleteBotApiKeyCommand = de_DeleteBotApiKeyCommand;
919
- const de_GetAccountCommand = async (output, context) => {
920
- if (output.statusCode !== 200 && output.statusCode >= 300) {
921
- return de_CommandError(output, context);
922
- }
923
- const contents = (0, smithy_client_1.map)({
924
- $metadata: deserializeMetadata(output),
925
- });
926
- const data = (0, smithy_client_1.expectNonNull)(((0, smithy_client_1.expectObject)(await (0, core_1.parseJsonBody)(output.body, context))), "body");
927
- const doc = (0, smithy_client_1.take)(data, {
928
- 'account': smithy_client_1._json,
929
- 'identities': smithy_client_1._json,
930
- 'workspaces': smithy_client_1._json,
931
- });
932
- Object.assign(contents, doc);
933
- return contents;
934
- };
935
- exports.de_GetAccountCommand = de_GetAccountCommand;
936
- const de_GetAppVersionCommand = async (output, context) => {
937
- if (output.statusCode !== 200 && output.statusCode >= 300) {
938
- return de_CommandError(output, context);
939
- }
940
- const contents = (0, smithy_client_1.map)({
941
- $metadata: deserializeMetadata(output),
942
- });
943
- const data = (0, smithy_client_1.expectNonNull)(((0, smithy_client_1.expectObject)(await (0, core_1.parseJsonBody)(output.body, context))), "body");
944
- const doc = (0, smithy_client_1.take)(data, {
945
- 'version': smithy_client_1.expectString,
946
- });
947
- Object.assign(contents, doc);
948
- return contents;
949
- };
950
- exports.de_GetAppVersionCommand = de_GetAppVersionCommand;
951
- const de_GetBotCommand = async (output, context) => {
952
- if (output.statusCode !== 200 && output.statusCode >= 300) {
953
- return de_CommandError(output, context);
954
- }
955
- const contents = (0, smithy_client_1.map)({
956
- $metadata: deserializeMetadata(output),
957
- });
958
- const data = (0, smithy_client_1.expectNonNull)(((0, smithy_client_1.expectObject)(await (0, core_1.parseJsonBody)(output.body, context))), "body");
959
- const doc = (0, smithy_client_1.take)(data, {
960
- 'bot': smithy_client_1._json,
961
- });
962
- Object.assign(contents, doc);
963
- return contents;
964
- };
965
- exports.de_GetBotCommand = de_GetBotCommand;
966
- const de_GetBotCallbackCommand = async (output, context) => {
967
- if (output.statusCode !== 200 && output.statusCode >= 300) {
968
- return de_CommandError(output, context);
969
- }
970
- const contents = (0, smithy_client_1.map)({
971
- $metadata: deserializeMetadata(output),
972
- });
973
- const data = (0, smithy_client_1.expectNonNull)(((0, smithy_client_1.expectObject)(await (0, core_1.parseJsonBody)(output.body, context))), "body");
974
- const doc = (0, smithy_client_1.take)(data, {
975
- 'callback': _ => de_BotCallback(_, context),
976
- });
977
- Object.assign(contents, doc);
978
- return contents;
979
- };
980
- exports.de_GetBotCallbackCommand = de_GetBotCallbackCommand;
981
- const de_GetUserCommand = async (output, context) => {
982
- if (output.statusCode !== 200 && output.statusCode >= 300) {
983
- return de_CommandError(output, context);
984
- }
985
- const contents = (0, smithy_client_1.map)({
986
- $metadata: deserializeMetadata(output),
987
- });
988
- const data = (0, smithy_client_1.expectNonNull)(((0, smithy_client_1.expectObject)(await (0, core_1.parseJsonBody)(output.body, context))), "body");
989
- const doc = (0, smithy_client_1.take)(data, {
990
- 'user': smithy_client_1._json,
991
- });
992
- Object.assign(contents, doc);
993
- return contents;
994
- };
995
- exports.de_GetUserCommand = de_GetUserCommand;
996
- const de_GetUserEmailNotificationsSettingsCommand = async (output, context) => {
997
- if (output.statusCode !== 200 && output.statusCode >= 300) {
998
- return de_CommandError(output, context);
999
- }
1000
- const contents = (0, smithy_client_1.map)({
1001
- $metadata: deserializeMetadata(output),
1002
- });
1003
- const data = (0, smithy_client_1.expectNonNull)(((0, smithy_client_1.expectObject)(await (0, core_1.parseJsonBody)(output.body, context))), "body");
1004
- const doc = (0, smithy_client_1.take)(data, {
1005
- 'notifications': smithy_client_1._json,
1006
- });
1007
- Object.assign(contents, doc);
1008
- return contents;
1009
- };
1010
- exports.de_GetUserEmailNotificationsSettingsCommand = de_GetUserEmailNotificationsSettingsCommand;
1011
- const de_GetUserPbxLinkDataCommand = async (output, context) => {
1012
- if (output.statusCode !== 200 && output.statusCode >= 300) {
1013
- return de_CommandError(output, context);
1014
- }
1015
- const contents = (0, smithy_client_1.map)({
1016
- $metadata: deserializeMetadata(output),
1017
- });
1018
- const data = (0, smithy_client_1.expectNonNull)(((0, smithy_client_1.expectObject)(await (0, core_1.parseJsonBody)(output.body, context))), "body");
1019
- const doc = (0, smithy_client_1.take)(data, {
1020
- 'user': smithy_client_1._json,
1021
- });
1022
- Object.assign(contents, doc);
1023
- return contents;
1024
- };
1025
- exports.de_GetUserPbxLinkDataCommand = de_GetUserPbxLinkDataCommand;
1026
- const de_GetUserPbxLinkSuggestionCommand = async (output, context) => {
1027
- if (output.statusCode !== 200 && output.statusCode >= 300) {
1028
- return de_CommandError(output, context);
1029
- }
1030
- const contents = (0, smithy_client_1.map)({
1031
- $metadata: deserializeMetadata(output),
1032
- });
1033
- const data = (0, smithy_client_1.expectNonNull)(((0, smithy_client_1.expectObject)(await (0, core_1.parseJsonBody)(output.body, context))), "body");
1034
- const doc = (0, smithy_client_1.take)(data, {
1035
- 'suggestion': smithy_client_1._json,
1036
- });
1037
- Object.assign(contents, doc);
1038
- return contents;
1039
- };
1040
- exports.de_GetUserPbxLinkSuggestionCommand = de_GetUserPbxLinkSuggestionCommand;
1041
- const de_GetUserPbxLinkSuggestionV1Command = async (output, context) => {
1042
- if (output.statusCode !== 200 && output.statusCode >= 300) {
1043
- return de_CommandError(output, context);
1044
- }
1045
- const contents = (0, smithy_client_1.map)({
1046
- $metadata: deserializeMetadata(output),
1047
- });
1048
- const data = (0, smithy_client_1.expectNonNull)(((0, smithy_client_1.expectObject)(await (0, core_1.parseJsonBody)(output.body, context))), "body");
1049
- const doc = (0, smithy_client_1.take)(data, {
1050
- 'suggestion': smithy_client_1._json,
1051
- });
1052
- Object.assign(contents, doc);
1053
- return contents;
1054
- };
1055
- exports.de_GetUserPbxLinkSuggestionV1Command = de_GetUserPbxLinkSuggestionV1Command;
1056
- const de_IntelligenceSearchCommand = async (output, context) => {
1057
- if (output.statusCode !== 200 && output.statusCode >= 300) {
1058
- return de_CommandError(output, context);
1059
- }
1060
- const contents = (0, smithy_client_1.map)({
1061
- $metadata: deserializeMetadata(output),
1062
- });
1063
- const data = (0, smithy_client_1.expectNonNull)(((0, smithy_client_1.expectObject)(await (0, core_1.parseJsonBody)(output.body, context))), "body");
1064
- const doc = (0, smithy_client_1.take)(data, {
1065
- 'items': smithy_client_1._json,
1066
- });
1067
- Object.assign(contents, doc);
1068
- return contents;
1069
- };
1070
- exports.de_IntelligenceSearchCommand = de_IntelligenceSearchCommand;
1071
- const de_InviteCommand = async (output, context) => {
1072
- if (output.statusCode !== 200 && output.statusCode >= 300) {
1073
- return de_CommandError(output, context);
1074
- }
1075
- const contents = (0, smithy_client_1.map)({
1076
- $metadata: deserializeMetadata(output),
1077
- });
1078
- const data = (0, smithy_client_1.expectNonNull)(((0, smithy_client_1.expectObject)(await (0, core_1.parseJsonBody)(output.body, context))), "body");
1079
- const doc = (0, smithy_client_1.take)(data, {
1080
- 'skippedInvitees': smithy_client_1._json,
1081
- 'users': smithy_client_1._json,
1082
- });
1083
- Object.assign(contents, doc);
1084
- return contents;
1085
- };
1086
- exports.de_InviteCommand = de_InviteCommand;
1087
- const de_LinkIdentityCommand = async (output, context) => {
1088
- if (output.statusCode !== 200 && output.statusCode >= 300) {
1089
- return de_CommandError(output, context);
1090
- }
1091
- const contents = (0, smithy_client_1.map)({
1092
- $metadata: deserializeMetadata(output),
1093
- });
1094
- const data = (0, smithy_client_1.expectNonNull)(((0, smithy_client_1.expectObject)(await (0, core_1.parseJsonBody)(output.body, context))), "body");
1095
- const doc = (0, smithy_client_1.take)(data, {
1096
- 'identity': smithy_client_1._json,
1097
- });
1098
- Object.assign(contents, doc);
1099
- return contents;
1100
- };
1101
- exports.de_LinkIdentityCommand = de_LinkIdentityCommand;
1102
- const de_ListBotApiKeysCommand = async (output, context) => {
1103
- if (output.statusCode !== 200 && output.statusCode >= 300) {
1104
- return de_CommandError(output, context);
1105
- }
1106
- const contents = (0, smithy_client_1.map)({
1107
- $metadata: deserializeMetadata(output),
1108
- });
1109
- const data = (0, smithy_client_1.expectNonNull)(((0, smithy_client_1.expectObject)(await (0, core_1.parseJsonBody)(output.body, context))), "body");
1110
- const doc = (0, smithy_client_1.take)(data, {
1111
- 'keys': smithy_client_1._json,
1112
- });
1113
- Object.assign(contents, doc);
1114
- return contents;
1115
- };
1116
- exports.de_ListBotApiKeysCommand = de_ListBotApiKeysCommand;
1117
- const de_ListBotsCommand = async (output, context) => {
1118
- if (output.statusCode !== 200 && output.statusCode >= 300) {
1119
- return de_CommandError(output, context);
1120
- }
1121
- const contents = (0, smithy_client_1.map)({
1122
- $metadata: deserializeMetadata(output),
1123
- });
1124
- const data = (0, smithy_client_1.expectNonNull)(((0, smithy_client_1.expectObject)(await (0, core_1.parseJsonBody)(output.body, context))), "body");
1125
- const doc = (0, smithy_client_1.take)(data, {
1126
- 'bots': smithy_client_1._json,
1127
- });
1128
- Object.assign(contents, doc);
1129
- return contents;
1130
- };
1131
- exports.de_ListBotsCommand = de_ListBotsCommand;
1132
- const de_ListIdentitiesCommand = async (output, context) => {
1133
- if (output.statusCode !== 200 && output.statusCode >= 300) {
1134
- return de_CommandError(output, context);
1135
- }
1136
- const contents = (0, smithy_client_1.map)({
1137
- $metadata: deserializeMetadata(output),
1138
- });
1139
- const data = (0, smithy_client_1.expectNonNull)(((0, smithy_client_1.expectObject)(await (0, core_1.parseJsonBody)(output.body, context))), "body");
1140
- const doc = (0, smithy_client_1.take)(data, {
1141
- 'identities': smithy_client_1._json,
1142
- });
1143
- Object.assign(contents, doc);
1144
- return contents;
1145
- };
1146
- exports.de_ListIdentitiesCommand = de_ListIdentitiesCommand;
1147
- const de_ListWorkspacesCommand = async (output, context) => {
1148
- if (output.statusCode !== 200 && output.statusCode >= 300) {
1149
- return de_CommandError(output, context);
1150
- }
1151
- const contents = (0, smithy_client_1.map)({
1152
- $metadata: deserializeMetadata(output),
1153
- });
1154
- const data = (0, smithy_client_1.expectNonNull)(((0, smithy_client_1.expectObject)(await (0, core_1.parseJsonBody)(output.body, context))), "body");
1155
- const doc = (0, smithy_client_1.take)(data, {
1156
- 'workspaces': smithy_client_1._json,
1157
- });
1158
- Object.assign(contents, doc);
1159
- return contents;
1160
- };
1161
- exports.de_ListWorkspacesCommand = de_ListWorkspacesCommand;
1162
- const de_PartialUpdateUserEmailNotificationsSettingsCommand = async (output, context) => {
1163
- if (output.statusCode !== 200 && output.statusCode >= 300) {
1164
- return de_CommandError(output, context);
1165
- }
1166
- const contents = (0, smithy_client_1.map)({
1167
- $metadata: deserializeMetadata(output),
1168
- });
1169
- const data = (0, smithy_client_1.expectNonNull)(((0, smithy_client_1.expectObject)(await (0, core_1.parseJsonBody)(output.body, context))), "body");
1170
- const doc = (0, smithy_client_1.take)(data, {
1171
- 'notifications': smithy_client_1._json,
1172
- });
1173
- Object.assign(contents, doc);
1174
- return contents;
1175
- };
1176
- exports.de_PartialUpdateUserEmailNotificationsSettingsCommand = de_PartialUpdateUserEmailNotificationsSettingsCommand;
1177
- const de_QueryColleaguesCommand = async (output, context) => {
1178
- if (output.statusCode !== 200 && output.statusCode >= 300) {
1179
- return de_CommandError(output, context);
1180
- }
1181
- const contents = (0, smithy_client_1.map)({
1182
- $metadata: deserializeMetadata(output),
1183
- });
1184
- const data = (0, smithy_client_1.expectNonNull)(((0, smithy_client_1.expectObject)(await (0, core_1.parseJsonBody)(output.body, context))), "body");
1185
- const doc = (0, smithy_client_1.take)(data, {
1186
- 'colleagues': smithy_client_1._json,
1187
- });
1188
- Object.assign(contents, doc);
1189
- return contents;
1190
- };
1191
- exports.de_QueryColleaguesCommand = de_QueryColleaguesCommand;
1192
- const de_QueryUserCommand = async (output, context) => {
1193
- if (output.statusCode !== 200 && output.statusCode >= 300) {
1194
- return de_CommandError(output, context);
1195
- }
1196
- const contents = (0, smithy_client_1.map)({
1197
- $metadata: deserializeMetadata(output),
1198
- });
1199
- const data = (0, smithy_client_1.expectNonNull)(((0, smithy_client_1.expectObject)(await (0, core_1.parseJsonBody)(output.body, context))), "body");
1200
- const doc = (0, smithy_client_1.take)(data, {
1201
- 'user': smithy_client_1._json,
1202
- });
1203
- Object.assign(contents, doc);
1204
- return contents;
1205
- };
1206
- exports.de_QueryUserCommand = de_QueryUserCommand;
1207
- const de_QueryUsersCommand = async (output, context) => {
1208
- if (output.statusCode !== 200 && output.statusCode >= 300) {
1209
- return de_CommandError(output, context);
1210
- }
1211
- const contents = (0, smithy_client_1.map)({
1212
- $metadata: deserializeMetadata(output),
1213
- });
1214
- const data = (0, smithy_client_1.expectNonNull)(((0, smithy_client_1.expectObject)(await (0, core_1.parseJsonBody)(output.body, context))), "body");
1215
- const doc = (0, smithy_client_1.take)(data, {
1216
- 'users': smithy_client_1._json,
1217
- });
1218
- Object.assign(contents, doc);
1219
- return contents;
1220
- };
1221
- exports.de_QueryUsersCommand = de_QueryUsersCommand;
1222
- const de_ToggleTranscriptionEmailNotificationsSubscriptionCommand = async (output, context) => {
1223
- if (output.statusCode !== 200 && output.statusCode >= 300) {
1224
- return de_CommandError(output, context);
1225
- }
1226
- const contents = (0, smithy_client_1.map)({
1227
- $metadata: deserializeMetadata(output),
1228
- });
1229
- await (0, smithy_client_1.collectBody)(output.body, context);
1230
- return contents;
1231
- };
1232
- exports.de_ToggleTranscriptionEmailNotificationsSubscriptionCommand = de_ToggleTranscriptionEmailNotificationsSubscriptionCommand;
1233
- const de_ToggleUnreadEmailNotificationsSubscriptionCommand = async (output, context) => {
1234
- if (output.statusCode !== 200 && output.statusCode >= 300) {
1235
- return de_CommandError(output, context);
1236
- }
1237
- const contents = (0, smithy_client_1.map)({
1238
- $metadata: deserializeMetadata(output),
1239
- });
1240
- await (0, smithy_client_1.collectBody)(output.body, context);
1241
- return contents;
1242
- };
1243
- exports.de_ToggleUnreadEmailNotificationsSubscriptionCommand = de_ToggleUnreadEmailNotificationsSubscriptionCommand;
1244
- const de_UnlinkIdentityCommand = async (output, context) => {
1245
- if (output.statusCode !== 200 && output.statusCode >= 300) {
1246
- return de_CommandError(output, context);
1247
- }
1248
- const contents = (0, smithy_client_1.map)({
1249
- $metadata: deserializeMetadata(output),
1250
- });
1251
- await (0, smithy_client_1.collectBody)(output.body, context);
1252
- return contents;
1253
- };
1254
- exports.de_UnlinkIdentityCommand = de_UnlinkIdentityCommand;
1255
- const de_UnlinkWorkspaceCommand = async (output, context) => {
1256
- if (output.statusCode !== 200 && output.statusCode >= 300) {
1257
- return de_CommandError(output, context);
1258
- }
1259
- const contents = (0, smithy_client_1.map)({
1260
- $metadata: deserializeMetadata(output),
1261
- });
1262
- await (0, smithy_client_1.collectBody)(output.body, context);
1263
- return contents;
1264
- };
1265
- exports.de_UnlinkWorkspaceCommand = de_UnlinkWorkspaceCommand;
1266
- const de_UpdateAccountCommand = async (output, context) => {
1267
- if (output.statusCode !== 200 && output.statusCode >= 300) {
1268
- return de_CommandError(output, context);
1269
- }
1270
- const contents = (0, smithy_client_1.map)({
1271
- $metadata: deserializeMetadata(output),
1272
- });
1273
- const data = (0, smithy_client_1.expectNonNull)(((0, smithy_client_1.expectObject)(await (0, core_1.parseJsonBody)(output.body, context))), "body");
1274
- const doc = (0, smithy_client_1.take)(data, {
1275
- 'account': smithy_client_1._json,
1276
- });
1277
- Object.assign(contents, doc);
1278
- return contents;
1279
- };
1280
- exports.de_UpdateAccountCommand = de_UpdateAccountCommand;
1281
- const de_UpdateBotCommand = async (output, context) => {
1282
- if (output.statusCode !== 200 && output.statusCode >= 300) {
1283
- return de_CommandError(output, context);
1284
- }
1285
- const contents = (0, smithy_client_1.map)({
1286
- $metadata: deserializeMetadata(output),
1287
- });
1288
- const data = (0, smithy_client_1.expectNonNull)(((0, smithy_client_1.expectObject)(await (0, core_1.parseJsonBody)(output.body, context))), "body");
1289
- const doc = (0, smithy_client_1.take)(data, {
1290
- 'bot': smithy_client_1._json,
1291
- });
1292
- Object.assign(contents, doc);
1293
- return contents;
1294
- };
1295
- exports.de_UpdateBotCommand = de_UpdateBotCommand;
1296
- const de_UpdateBotCallbackCommand = async (output, context) => {
1297
- if (output.statusCode !== 200 && output.statusCode >= 300) {
1298
- return de_CommandError(output, context);
1299
- }
1300
- const contents = (0, smithy_client_1.map)({
1301
- $metadata: deserializeMetadata(output),
1302
- });
1303
- const data = (0, smithy_client_1.expectNonNull)(((0, smithy_client_1.expectObject)(await (0, core_1.parseJsonBody)(output.body, context))), "body");
1304
- const doc = (0, smithy_client_1.take)(data, {
1305
- 'callback': _ => de_BotCallback(_, context),
1306
- });
1307
- Object.assign(contents, doc);
1308
- return contents;
1309
- };
1310
- exports.de_UpdateBotCallbackCommand = de_UpdateBotCallbackCommand;
1311
- const de_UpdateUserEmailNotificationsSettingsCommand = async (output, context) => {
1312
- if (output.statusCode !== 200 && output.statusCode >= 300) {
1313
- return de_CommandError(output, context);
1314
- }
1315
- const contents = (0, smithy_client_1.map)({
1316
- $metadata: deserializeMetadata(output),
1317
- });
1318
- const data = (0, smithy_client_1.expectNonNull)(((0, smithy_client_1.expectObject)(await (0, core_1.parseJsonBody)(output.body, context))), "body");
1319
- const doc = (0, smithy_client_1.take)(data, {
1320
- 'notifications': smithy_client_1._json,
1321
- });
1322
- Object.assign(contents, doc);
1323
- return contents;
1324
- };
1325
- exports.de_UpdateUserEmailNotificationsSettingsCommand = de_UpdateUserEmailNotificationsSettingsCommand;
1326
- const de_UpdateWorkspaceCommand = async (output, context) => {
1327
- if (output.statusCode !== 200 && output.statusCode >= 300) {
1328
- return de_CommandError(output, context);
1329
- }
1330
- const contents = (0, smithy_client_1.map)({
1331
- $metadata: deserializeMetadata(output),
1332
- });
1333
- const data = (0, smithy_client_1.expectNonNull)(((0, smithy_client_1.expectObject)(await (0, core_1.parseJsonBody)(output.body, context))), "body");
1334
- const doc = (0, smithy_client_1.take)(data, {
1335
- 'workspace': smithy_client_1._json,
1336
- });
1337
- Object.assign(contents, doc);
1338
- return contents;
1339
- };
1340
- exports.de_UpdateWorkspaceCommand = de_UpdateWorkspaceCommand;
1341
- const de_UploadPictureCommand = async (output, context) => {
1342
- if (output.statusCode !== 200 && output.statusCode >= 300) {
1343
- return de_CommandError(output, context);
1344
- }
1345
- const contents = (0, smithy_client_1.map)({
1346
- $metadata: deserializeMetadata(output),
1347
- });
1348
- const data = (0, smithy_client_1.expectNonNull)(((0, smithy_client_1.expectObject)(await (0, core_1.parseJsonBody)(output.body, context))), "body");
1349
- const doc = (0, smithy_client_1.take)(data, {
1350
- 'url': smithy_client_1.expectString,
1351
- });
1352
- Object.assign(contents, doc);
1353
- return contents;
1354
- };
1355
- exports.de_UploadPictureCommand = de_UploadPictureCommand;
1356
- const de_UploadPictureV1Command = async (output, context) => {
1357
- if (output.statusCode !== 200 && output.statusCode >= 300) {
1358
- return de_CommandError(output, context);
1359
- }
1360
- const contents = (0, smithy_client_1.map)({
1361
- $metadata: deserializeMetadata(output),
1362
- });
1363
- const data = (0, smithy_client_1.expectNonNull)(((0, smithy_client_1.expectObject)(await (0, core_1.parseJsonBody)(output.body, context))), "body");
1364
- const doc = (0, smithy_client_1.take)(data, {
1365
- 'url': smithy_client_1.expectString,
1366
- });
1367
- Object.assign(contents, doc);
1368
- return contents;
1369
- };
1370
- exports.de_UploadPictureV1Command = de_UploadPictureV1Command;
1371
- const de_VerifyBotSecretKeyCommand = async (output, context) => {
1372
- if (output.statusCode !== 200 && output.statusCode >= 300) {
1373
- return de_CommandError(output, context);
1374
- }
1375
- const contents = (0, smithy_client_1.map)({
1376
- $metadata: deserializeMetadata(output),
1377
- });
1378
- const data = (0, smithy_client_1.expectNonNull)(((0, smithy_client_1.expectObject)(await (0, core_1.parseJsonBody)(output.body, context))), "body");
1379
- const doc = (0, smithy_client_1.take)(data, {
1380
- 'company': smithy_client_1.expectString,
1381
- 'id': smithy_client_1.expectString,
1382
- 'name': smithy_client_1.expectString,
1383
- });
1384
- Object.assign(contents, doc);
1385
- return contents;
1386
- };
1387
- exports.de_VerifyBotSecretKeyCommand = de_VerifyBotSecretKeyCommand;
1388
- const de_VerifyBotSecretKeyV1Command = async (output, context) => {
1389
- if (output.statusCode !== 200 && output.statusCode >= 300) {
1390
- return de_CommandError(output, context);
1391
- }
1392
- const contents = (0, smithy_client_1.map)({
1393
- $metadata: deserializeMetadata(output),
1394
- });
1395
- const data = (0, smithy_client_1.expectNonNull)(((0, smithy_client_1.expectObject)(await (0, core_1.parseJsonBody)(output.body, context))), "body");
1396
- const doc = (0, smithy_client_1.take)(data, {
1397
- 'company': smithy_client_1.expectString,
1398
- 'id': smithy_client_1.expectString,
1399
- 'name': smithy_client_1.expectString,
1400
- });
1401
- Object.assign(contents, doc);
1402
- return contents;
1403
- };
1404
- exports.de_VerifyBotSecretKeyV1Command = de_VerifyBotSecretKeyV1Command;
1405
- const de_VerifyIdentityCommand = async (output, context) => {
1406
- if (output.statusCode !== 200 && output.statusCode >= 300) {
1407
- return de_CommandError(output, context);
1408
- }
1409
- const contents = (0, smithy_client_1.map)({
1410
- $metadata: deserializeMetadata(output),
1411
- });
1412
- const data = (0, smithy_client_1.expectNonNull)(((0, smithy_client_1.expectObject)(await (0, core_1.parseJsonBody)(output.body, context))), "body");
1413
- const doc = (0, smithy_client_1.take)(data, {
1414
- 'identity': smithy_client_1._json,
1415
- });
1416
- Object.assign(contents, doc);
1417
- return contents;
1418
- };
1419
- exports.de_VerifyIdentityCommand = de_VerifyIdentityCommand;
1420
- const de_CommandError = async (output, context) => {
1421
- const parsedOutput = {
1422
- ...output,
1423
- body: await (0, core_1.parseJsonErrorBody)(output.body, context)
1424
- };
1425
- const errorCode = (0, core_1.loadRestJsonErrorCode)(output, parsedOutput.body);
1426
- switch (errorCode) {
1427
- case "ForbiddenException":
1428
- case "smithy.framework#ForbiddenException":
1429
- throw await de_ForbiddenExceptionRes(parsedOutput, context);
1430
- case "ValidationException":
1431
- case "smithy.framework#ValidationException":
1432
- throw await de_ValidationExceptionRes(parsedOutput, context);
1433
- case "UserCompanyNotValidException":
1434
- case "wildix.xbees.users#UserCompanyNotValidException":
1435
- throw await de_UserCompanyNotValidExceptionRes(parsedOutput, context);
1436
- case "UserNotFoundException":
1437
- case "wildix.xbees.users#UserNotFoundException":
1438
- throw await de_UserNotFoundExceptionRes(parsedOutput, context);
1439
- case "ChannelNotFoundException":
1440
- case "wildix.xbees.conversations#ChannelNotFoundException":
1441
- throw await de_ChannelNotFoundExceptionRes(parsedOutput, context);
1442
- case "PublicAccessIsRestrictedException":
1443
- case "wildix.xbees.users#PublicAccessIsRestrictedException":
1444
- throw await de_PublicAccessIsRestrictedExceptionRes(parsedOutput, context);
1445
- case "WidgetNotFoundException":
1446
- case "wildix.xbees.kite#WidgetNotFoundException":
1447
- throw await de_WidgetNotFoundExceptionRes(parsedOutput, context);
1448
- case "BotNotFoundException":
1449
- case "wildix.xbees.users#BotNotFoundException":
1450
- throw await de_BotNotFoundExceptionRes(parsedOutput, context);
1451
- case "BotApiKeyNotFoundException":
1452
- case "wildix.xbees.users#BotApiKeyNotFoundException":
1453
- throw await de_BotApiKeyNotFoundExceptionRes(parsedOutput, context);
1454
- case "AccountNotFoundException":
1455
- case "wildix.xbees.users#AccountNotFoundException":
1456
- throw await de_AccountNotFoundExceptionRes(parsedOutput, context);
1457
- case "IdentityAlreadyLinkedException":
1458
- case "wildix.xbees.users#IdentityAlreadyLinkedException":
1459
- throw await de_IdentityAlreadyLinkedExceptionRes(parsedOutput, context);
1460
- case "UserQueryPredicateNotMetException":
1461
- case "wildix.xbees.users#UserQueryPredicateNotMetException":
1462
- throw await de_UserQueryPredicateNotMetExceptionRes(parsedOutput, context);
1463
- case "CannotRemovePrimaryIdentityException":
1464
- case "wildix.xbees.users#CannotRemovePrimaryIdentityException":
1465
- throw await de_CannotRemovePrimaryIdentityExceptionRes(parsedOutput, context);
1466
- case "IdentityNotFoundException":
1467
- case "wildix.xbees.users#IdentityNotFoundException":
1468
- throw await de_IdentityNotFoundExceptionRes(parsedOutput, context);
1469
- case "CannotUnbindDefaultWorkspaceException":
1470
- case "wildix.xbees.users#CannotUnbindDefaultWorkspaceException":
1471
- throw await de_CannotUnbindDefaultWorkspaceExceptionRes(parsedOutput, context);
1472
- case "WorkspaceNotFoundException":
1473
- case "wildix.xbees.users#WorkspaceNotFoundException":
1474
- throw await de_WorkspaceNotFoundExceptionRes(parsedOutput, context);
1475
- case "BotSecretKeyNotValidException":
1476
- case "wildix.xbees.users#BotSecretKeyNotValidException":
1477
- throw await de_BotSecretKeyNotValidExceptionRes(parsedOutput, context);
1478
- default:
1479
- const parsedBody = parsedOutput.body;
1480
- return throwDefaultError({
1481
- output,
1482
- parsedBody,
1483
- errorCode
1484
- });
1485
- }
1486
- };
1487
- const throwDefaultError = (0, smithy_client_1.withBaseException)(UsersServiceException_1.UsersServiceException);
1488
- const de_ForbiddenExceptionRes = async (parsedOutput, context) => {
1489
- const contents = (0, smithy_client_1.map)({});
1490
- const data = parsedOutput.body;
1491
- const doc = (0, smithy_client_1.take)(data, {
1492
- 'message': smithy_client_1.expectString,
1493
- });
1494
- Object.assign(contents, doc);
1495
- const exception = new models_0_1.ForbiddenException({
1496
- $metadata: deserializeMetadata(parsedOutput),
1497
- ...contents
1498
- });
1499
- return (0, smithy_client_1.decorateServiceException)(exception, parsedOutput.body);
1500
- };
1501
- const de_ValidationExceptionRes = async (parsedOutput, context) => {
1502
- const contents = (0, smithy_client_1.map)({});
1503
- const data = parsedOutput.body;
1504
- const doc = (0, smithy_client_1.take)(data, {
1505
- 'message': smithy_client_1.expectString,
1506
- });
1507
- Object.assign(contents, doc);
1508
- const exception = new models_0_1.ValidationException({
1509
- $metadata: deserializeMetadata(parsedOutput),
1510
- ...contents
1511
- });
1512
- return (0, smithy_client_1.decorateServiceException)(exception, parsedOutput.body);
1513
- };
1514
- const de_ChannelNotFoundExceptionRes = async (parsedOutput, context) => {
1515
- const contents = (0, smithy_client_1.map)({});
1516
- const data = parsedOutput.body;
1517
- const doc = (0, smithy_client_1.take)(data, {
1518
- 'message': smithy_client_1.expectString,
1519
- });
1520
- Object.assign(contents, doc);
1521
- const exception = new models_0_1.ChannelNotFoundException({
1522
- $metadata: deserializeMetadata(parsedOutput),
1523
- ...contents
1524
- });
1525
- return (0, smithy_client_1.decorateServiceException)(exception, parsedOutput.body);
1526
- };
1527
- const de_WidgetNotFoundExceptionRes = async (parsedOutput, context) => {
1528
- const contents = (0, smithy_client_1.map)({});
1529
- const data = parsedOutput.body;
1530
- const doc = (0, smithy_client_1.take)(data, {
1531
- 'message': smithy_client_1.expectString,
1532
- });
1533
- Object.assign(contents, doc);
1534
- const exception = new models_0_1.WidgetNotFoundException({
1535
- $metadata: deserializeMetadata(parsedOutput),
1536
- ...contents
1537
- });
1538
- return (0, smithy_client_1.decorateServiceException)(exception, parsedOutput.body);
1539
- };
1540
- const de_AccountNotFoundExceptionRes = async (parsedOutput, context) => {
1541
- const contents = (0, smithy_client_1.map)({});
1542
- const data = parsedOutput.body;
1543
- const doc = (0, smithy_client_1.take)(data, {
1544
- 'message': smithy_client_1.expectString,
1545
- });
1546
- Object.assign(contents, doc);
1547
- const exception = new models_0_1.AccountNotFoundException({
1548
- $metadata: deserializeMetadata(parsedOutput),
1549
- ...contents
1550
- });
1551
- return (0, smithy_client_1.decorateServiceException)(exception, parsedOutput.body);
1552
- };
1553
- const de_BotApiKeyNotFoundExceptionRes = async (parsedOutput, context) => {
1554
- const contents = (0, smithy_client_1.map)({});
1555
- const data = parsedOutput.body;
1556
- const doc = (0, smithy_client_1.take)(data, {
1557
- 'message': smithy_client_1.expectString,
1558
- });
1559
- Object.assign(contents, doc);
1560
- const exception = new models_0_1.BotApiKeyNotFoundException({
1561
- $metadata: deserializeMetadata(parsedOutput),
1562
- ...contents
1563
- });
1564
- return (0, smithy_client_1.decorateServiceException)(exception, parsedOutput.body);
1565
- };
1566
- const de_BotNotFoundExceptionRes = async (parsedOutput, context) => {
1567
- const contents = (0, smithy_client_1.map)({});
1568
- const data = parsedOutput.body;
1569
- const doc = (0, smithy_client_1.take)(data, {
1570
- 'message': smithy_client_1.expectString,
1571
- });
1572
- Object.assign(contents, doc);
1573
- const exception = new models_0_1.BotNotFoundException({
1574
- $metadata: deserializeMetadata(parsedOutput),
1575
- ...contents
1576
- });
1577
- return (0, smithy_client_1.decorateServiceException)(exception, parsedOutput.body);
1578
- };
1579
- const de_BotSecretKeyNotValidExceptionRes = async (parsedOutput, context) => {
1580
- const contents = (0, smithy_client_1.map)({});
1581
- const data = parsedOutput.body;
1582
- const doc = (0, smithy_client_1.take)(data, {
1583
- 'message': smithy_client_1.expectString,
1584
- });
1585
- Object.assign(contents, doc);
1586
- const exception = new models_0_1.BotSecretKeyNotValidException({
1587
- $metadata: deserializeMetadata(parsedOutput),
1588
- ...contents
1589
- });
1590
- return (0, smithy_client_1.decorateServiceException)(exception, parsedOutput.body);
1591
- };
1592
- const de_CannotRemovePrimaryIdentityExceptionRes = async (parsedOutput, context) => {
1593
- const contents = (0, smithy_client_1.map)({});
1594
- const data = parsedOutput.body;
1595
- const doc = (0, smithy_client_1.take)(data, {
1596
- 'message': smithy_client_1.expectString,
1597
- });
1598
- Object.assign(contents, doc);
1599
- const exception = new models_0_1.CannotRemovePrimaryIdentityException({
1600
- $metadata: deserializeMetadata(parsedOutput),
1601
- ...contents
1602
- });
1603
- return (0, smithy_client_1.decorateServiceException)(exception, parsedOutput.body);
1604
- };
1605
- const de_CannotUnbindDefaultWorkspaceExceptionRes = async (parsedOutput, context) => {
1606
- const contents = (0, smithy_client_1.map)({});
1607
- const data = parsedOutput.body;
1608
- const doc = (0, smithy_client_1.take)(data, {
1609
- 'message': smithy_client_1.expectString,
1610
- });
1611
- Object.assign(contents, doc);
1612
- const exception = new models_0_1.CannotUnbindDefaultWorkspaceException({
1613
- $metadata: deserializeMetadata(parsedOutput),
1614
- ...contents
1615
- });
1616
- return (0, smithy_client_1.decorateServiceException)(exception, parsedOutput.body);
1617
- };
1618
- const de_IdentityAlreadyLinkedExceptionRes = async (parsedOutput, context) => {
1619
- const contents = (0, smithy_client_1.map)({});
1620
- const data = parsedOutput.body;
1621
- const doc = (0, smithy_client_1.take)(data, {
1622
- 'message': smithy_client_1.expectString,
1623
- });
1624
- Object.assign(contents, doc);
1625
- const exception = new models_0_1.IdentityAlreadyLinkedException({
1626
- $metadata: deserializeMetadata(parsedOutput),
1627
- ...contents
1628
- });
1629
- return (0, smithy_client_1.decorateServiceException)(exception, parsedOutput.body);
1630
- };
1631
- const de_IdentityNotFoundExceptionRes = async (parsedOutput, context) => {
1632
- const contents = (0, smithy_client_1.map)({});
1633
- const data = parsedOutput.body;
1634
- const doc = (0, smithy_client_1.take)(data, {
1635
- 'message': smithy_client_1.expectString,
1636
- });
1637
- Object.assign(contents, doc);
1638
- const exception = new models_0_1.IdentityNotFoundException({
1639
- $metadata: deserializeMetadata(parsedOutput),
1640
- ...contents
1641
- });
1642
- return (0, smithy_client_1.decorateServiceException)(exception, parsedOutput.body);
1643
- };
1644
- const de_PublicAccessIsRestrictedExceptionRes = async (parsedOutput, context) => {
1645
- const contents = (0, smithy_client_1.map)({});
1646
- const data = parsedOutput.body;
1647
- const doc = (0, smithy_client_1.take)(data, {
1648
- 'message': smithy_client_1.expectString,
1649
- });
1650
- Object.assign(contents, doc);
1651
- const exception = new models_0_1.PublicAccessIsRestrictedException({
1652
- $metadata: deserializeMetadata(parsedOutput),
1653
- ...contents
1654
- });
1655
- return (0, smithy_client_1.decorateServiceException)(exception, parsedOutput.body);
1656
- };
1657
- const de_UserCompanyNotValidExceptionRes = async (parsedOutput, context) => {
1658
- const contents = (0, smithy_client_1.map)({});
1659
- const data = parsedOutput.body;
1660
- const doc = (0, smithy_client_1.take)(data, {
1661
- 'message': smithy_client_1.expectString,
1662
- });
1663
- Object.assign(contents, doc);
1664
- const exception = new models_0_1.UserCompanyNotValidException({
1665
- $metadata: deserializeMetadata(parsedOutput),
1666
- ...contents
1667
- });
1668
- return (0, smithy_client_1.decorateServiceException)(exception, parsedOutput.body);
1669
- };
1670
- const de_UserNotFoundExceptionRes = async (parsedOutput, context) => {
1671
- const contents = (0, smithy_client_1.map)({});
1672
- const data = parsedOutput.body;
1673
- const doc = (0, smithy_client_1.take)(data, {
1674
- 'message': smithy_client_1.expectString,
1675
- });
1676
- Object.assign(contents, doc);
1677
- const exception = new models_0_1.UserNotFoundException({
1678
- $metadata: deserializeMetadata(parsedOutput),
1679
- ...contents
1680
- });
1681
- return (0, smithy_client_1.decorateServiceException)(exception, parsedOutput.body);
1682
- };
1683
- const de_UserQueryPredicateNotMetExceptionRes = async (parsedOutput, context) => {
1684
- const contents = (0, smithy_client_1.map)({});
1685
- const data = parsedOutput.body;
1686
- const doc = (0, smithy_client_1.take)(data, {
1687
- 'message': smithy_client_1.expectString,
1688
- });
1689
- Object.assign(contents, doc);
1690
- const exception = new models_0_1.UserQueryPredicateNotMetException({
1691
- $metadata: deserializeMetadata(parsedOutput),
1692
- ...contents
1693
- });
1694
- return (0, smithy_client_1.decorateServiceException)(exception, parsedOutput.body);
1695
- };
1696
- const de_WorkspaceNotFoundExceptionRes = async (parsedOutput, context) => {
1697
- const contents = (0, smithy_client_1.map)({});
1698
- const data = parsedOutput.body;
1699
- const doc = (0, smithy_client_1.take)(data, {
1700
- 'message': smithy_client_1.expectString,
1701
- });
1702
- Object.assign(contents, doc);
1703
- const exception = new models_0_1.WorkspaceNotFoundException({
1704
- $metadata: deserializeMetadata(parsedOutput),
1705
- ...contents
1706
- });
1707
- return (0, smithy_client_1.decorateServiceException)(exception, parsedOutput.body);
1708
- };
1709
- const se_Document = (input, context) => {
1710
- return input;
1711
- };
1712
- const se_BotCallback = (input, context) => {
1713
- return (0, smithy_client_1.take)(input, {
1714
- 'endpoint': _ => se_BotEndpoint(_, context),
1715
- });
1716
- };
1717
- const se_BotDialogflowCxEndpoint = (input, context) => {
1718
- return (0, smithy_client_1.take)(input, {
1719
- 'agent': [],
1720
- 'credentials': _ => se_Document(_, context),
1721
- 'language': [],
1722
- 'location': [],
1723
- });
1724
- };
1725
- const se_BotEndpoint = (input, context) => {
1726
- return models_0_1.BotEndpoint.visit(input, {
1727
- dialogflowCx: value => ({ "dialogflowCx": se_BotDialogflowCxEndpoint(value, context) }),
1728
- llm: value => ({ "llm": se_BotLlmEndpoint(value, context) }),
1729
- openAiAssistant: value => ({ "openAiAssistant": (0, smithy_client_1._json)(value) }),
1730
- sqs: value => ({ "sqs": (0, smithy_client_1._json)(value) }),
1731
- webhook: value => ({ "webhook": (0, smithy_client_1._json)(value) }),
1732
- _: (name, value) => ({ [name]: value })
1733
- });
1734
- };
1735
- const se_BotLlmEmbeddedTool = (input, context) => {
1736
- return (0, smithy_client_1.take)(input, {
1737
- 'annotations': smithy_client_1._json,
1738
- 'name': [],
1739
- 'parameters': _ => se_Document(_, context),
1740
- 'type': [],
1741
- });
1742
- };
1743
- const se_BotLlmEmbeddedToolsList = (input, context) => {
1744
- return input.filter((e) => e != null).map(entry => {
1745
- return se_BotLlmEmbeddedTool(entry, context);
1746
- });
1747
- };
1748
- const se_BotLlmEndpoint = (input, context) => {
1749
- return (0, smithy_client_1.take)(input, {
1750
- 'capabilities': smithy_client_1._json,
1751
- 'embeddedTools': _ => se_BotLlmEmbeddedToolsList(_, context),
1752
- 'guidelines': smithy_client_1._json,
1753
- 'model': [],
1754
- 'prompt': [],
1755
- 'tools': _ => se_BotLlmToolsList(_, context),
1756
- });
1757
- };
1758
- const se_BotLlmFunctionDefinition = (input, context) => {
1759
- return (0, smithy_client_1.take)(input, {
1760
- 'description': [],
1761
- 'integration': _ => se_BotLlmFunctionIntegration(_, context),
1762
- 'name': [],
1763
- 'parameters': _ => se_Document(_, context),
1764
- });
1765
- };
1766
- const se_BotLlmFunctionIntegration = (input, context) => {
1767
- return models_0_1.BotLlmFunctionIntegration.visit(input, {
1768
- webhook: value => ({ "webhook": se_BotLlmFunctionIntegrationWebhook(value, context) }),
1769
- _: (name, value) => ({ [name]: value })
1770
- });
1771
- };
1772
- const se_BotLlmFunctionIntegrationWebhook = (input, context) => {
1773
- return (0, smithy_client_1.take)(input, {
1774
- 'async': [],
1775
- 'authorization': smithy_client_1._json,
1776
- 'headers': smithy_client_1._json,
1777
- 'method': [],
1778
- 'parameters': _ => se_Document(_, context),
1779
- 'timeout': [],
1780
- 'url': [],
1781
- });
1782
- };
1783
- const se_BotLlmTool = (input, context) => {
1784
- return (0, smithy_client_1.take)(input, {
1785
- 'annotations': smithy_client_1._json,
1786
- 'function': _ => se_BotLlmFunctionDefinition(_, context),
1787
- 'type': [],
1788
- });
1789
- };
1790
- const se_BotLlmToolsList = (input, context) => {
1791
- return input.filter((e) => e != null).map(entry => {
1792
- return se_BotLlmTool(entry, context);
1793
- });
1794
- };
1795
- const de_Document = (output, context) => {
1796
- return output;
1797
- };
1798
- const de_BotCallback = (output, context) => {
1799
- return (0, smithy_client_1.take)(output, {
1800
- 'endpoint': (_) => de_BotEndpoint((0, core_1.awsExpectUnion)(_), context),
1801
- });
1802
- };
1803
- const de_BotDialogflowCxEndpoint = (output, context) => {
1804
- return (0, smithy_client_1.take)(output, {
1805
- 'agent': smithy_client_1.expectString,
1806
- 'credentials': (_) => de_Document(_, context),
1807
- 'language': smithy_client_1.expectString,
1808
- 'location': smithy_client_1.expectString,
1809
- });
1810
- };
1811
- const de_BotEndpoint = (output, context) => {
1812
- if (output.dialogflowCx != null) {
1813
- return {
1814
- dialogflowCx: de_BotDialogflowCxEndpoint(output.dialogflowCx, context)
1815
- };
1816
- }
1817
- if (output.llm != null) {
1818
- return {
1819
- llm: de_BotLlmEndpoint(output.llm, context)
1820
- };
1821
- }
1822
- if (output.openAiAssistant != null) {
1823
- return {
1824
- openAiAssistant: (0, smithy_client_1._json)(output.openAiAssistant)
1825
- };
1826
- }
1827
- if (output.sqs != null) {
1828
- return {
1829
- sqs: (0, smithy_client_1._json)(output.sqs)
1830
- };
1831
- }
1832
- if (output.webhook != null) {
1833
- return {
1834
- webhook: (0, smithy_client_1._json)(output.webhook)
1835
- };
1836
- }
1837
- return { $unknown: Object.entries(output)[0] };
1838
- };
1839
- const de_BotLlmEmbeddedTool = (output, context) => {
1840
- return (0, smithy_client_1.take)(output, {
1841
- 'annotations': smithy_client_1._json,
1842
- 'name': smithy_client_1.expectString,
1843
- 'parameters': (_) => de_Document(_, context),
1844
- 'type': smithy_client_1.expectString,
1845
- });
1846
- };
1847
- const de_BotLlmEmbeddedToolsList = (output, context) => {
1848
- const retVal = (output || []).filter((e) => e != null).map((entry) => {
1849
- return de_BotLlmEmbeddedTool(entry, context);
1850
- });
1851
- return retVal;
1852
- };
1853
- const de_BotLlmEndpoint = (output, context) => {
1854
- return (0, smithy_client_1.take)(output, {
1855
- 'capabilities': smithy_client_1._json,
1856
- 'embeddedTools': (_) => de_BotLlmEmbeddedToolsList(_, context),
1857
- 'guidelines': smithy_client_1._json,
1858
- 'model': smithy_client_1.expectString,
1859
- 'prompt': smithy_client_1.expectString,
1860
- 'tools': (_) => de_BotLlmToolsList(_, context),
1861
- });
1862
- };
1863
- const de_BotLlmFunctionDefinition = (output, context) => {
1864
- return (0, smithy_client_1.take)(output, {
1865
- 'description': smithy_client_1.expectString,
1866
- 'integration': (_) => de_BotLlmFunctionIntegration((0, core_1.awsExpectUnion)(_), context),
1867
- 'name': smithy_client_1.expectString,
1868
- 'parameters': (_) => de_Document(_, context),
1869
- });
1870
- };
1871
- const de_BotLlmFunctionIntegration = (output, context) => {
1872
- if (output.webhook != null) {
1873
- return {
1874
- webhook: de_BotLlmFunctionIntegrationWebhook(output.webhook, context)
1875
- };
1876
- }
1877
- return { $unknown: Object.entries(output)[0] };
1878
- };
1879
- const de_BotLlmFunctionIntegrationWebhook = (output, context) => {
1880
- return (0, smithy_client_1.take)(output, {
1881
- 'async': smithy_client_1.expectBoolean,
1882
- 'authorization': (_) => (0, smithy_client_1._json)((0, core_1.awsExpectUnion)(_)),
1883
- 'headers': smithy_client_1._json,
1884
- 'method': smithy_client_1.expectString,
1885
- 'parameters': (_) => de_Document(_, context),
1886
- 'timeout': smithy_client_1.expectInt32,
1887
- 'url': smithy_client_1.expectString,
1888
- });
1889
- };
1890
- const de_BotLlmTool = (output, context) => {
1891
- return (0, smithy_client_1.take)(output, {
1892
- 'annotations': smithy_client_1._json,
1893
- 'function': (_) => de_BotLlmFunctionDefinition(_, context),
1894
- 'type': smithy_client_1.expectString,
1895
- });
1896
- };
1897
- const de_BotLlmToolsList = (output, context) => {
1898
- const retVal = (output || []).filter((e) => e != null).map((entry) => {
1899
- return de_BotLlmTool(entry, context);
1900
- });
1901
- return retVal;
1902
- };
1903
- const deserializeMetadata = (output) => ({
1904
- httpStatusCode: output.statusCode,
1905
- requestId: output.headers["x-amzn-requestid"] ?? output.headers["x-amzn-request-id"] ?? output.headers["x-amz-request-id"],
1906
- extendedRequestId: output.headers["x-amz-id-2"],
1907
- cfId: output.headers["x-amz-cf-id"],
1908
- });
1909
- const collectBodyString = (streamBody, context) => (0, smithy_client_1.collectBody)(streamBody, context).then(body => context.utf8Encoder(body));
1910
- const _aT = "appType";
1911
- const _c = "company";
1912
- const _cI = "companyId";
1913
- const _e = "email";
1914
- const _eE = "excludeExtension";
1915
- const _s = "search";