@wildix/wim-wilma-client 0.0.11 → 3.1.12

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 (183) hide show
  1. package/dist-cjs/Wilma.js +25 -3
  2. package/dist-cjs/WilmaClient.js +34 -26
  3. package/dist-cjs/auth/httpAuthExtensionConfiguration.js +43 -0
  4. package/dist-cjs/auth/httpAuthSchemeProvider.js +52 -0
  5. package/dist-cjs/commands/CreateAgentCommand.js +10 -11
  6. package/dist-cjs/commands/CreateGuidelineCommand.js +10 -11
  7. package/dist-cjs/commands/CreateGuidelinesDirectoryCommand.js +10 -11
  8. package/dist-cjs/commands/CreateSkillCommand.js +20 -0
  9. package/dist-cjs/commands/CreateSkillFileUploadCommand.js +20 -0
  10. package/dist-cjs/commands/DeleteAgentCommand.js +10 -11
  11. package/dist-cjs/commands/DeleteChatCommand.js +10 -11
  12. package/dist-cjs/commands/DeleteFileCommand.js +20 -0
  13. package/dist-cjs/commands/DeleteGuidelineCommand.js +10 -11
  14. package/dist-cjs/commands/DeleteGuidelinesDirectoryCommand.js +10 -11
  15. package/dist-cjs/commands/DeleteSkillCommand.js +20 -0
  16. package/dist-cjs/commands/DeleteSkillFileCommand.js +20 -0
  17. package/dist-cjs/commands/DislikeAnswerCommand.js +10 -11
  18. package/dist-cjs/commands/DownloadFileCommand.js +20 -0
  19. package/dist-cjs/commands/ExecuteAgentCommand.js +10 -11
  20. package/dist-cjs/commands/GetAgentCommand.js +10 -11
  21. package/dist-cjs/commands/GetChatCommand.js +10 -11
  22. package/dist-cjs/commands/GetFileCommand.js +20 -0
  23. package/dist-cjs/commands/GetGuidelineCommand.js +10 -11
  24. package/dist-cjs/commands/GetOrganizationSettingsCommand.js +10 -11
  25. package/dist-cjs/commands/GetSettingsCommand.js +10 -11
  26. package/dist-cjs/commands/GetSkillCommand.js +20 -0
  27. package/dist-cjs/commands/GetSkillFileDownloadCommand.js +20 -0
  28. package/dist-cjs/commands/LikeAnswerCommand.js +10 -11
  29. package/dist-cjs/commands/ListAgentFeedbacksCommand.js +10 -11
  30. package/dist-cjs/commands/ListAgentsCommand.js +10 -11
  31. package/dist-cjs/commands/ListAgentsNamesCommand.js +10 -11
  32. package/dist-cjs/commands/ListChatsCommand.js +10 -11
  33. package/dist-cjs/commands/ListFeedbacksCommand.js +10 -11
  34. package/dist-cjs/commands/ListGuidelinesCommand.js +10 -11
  35. package/dist-cjs/commands/ListGuidelinesDirectoriesCommand.js +10 -11
  36. package/dist-cjs/commands/ListGuidelinesNamesCommand.js +10 -11
  37. package/dist-cjs/commands/ListSkillsCommand.js +20 -0
  38. package/dist-cjs/commands/PatchOrganizationSettingsCommand.js +10 -11
  39. package/dist-cjs/commands/PatchSettingsCommand.js +10 -11
  40. package/dist-cjs/commands/UpdateAgentCommand.js +10 -11
  41. package/dist-cjs/commands/UpdateGuidelineAccessCommand.js +10 -11
  42. package/dist-cjs/commands/UpdateGuidelineCommand.js +10 -11
  43. package/dist-cjs/commands/UpdateGuidelinesDirectoryCommand.js +10 -11
  44. package/dist-cjs/commands/UpdateSkillCommand.js +20 -0
  45. package/dist-cjs/commands/index.js +12 -1
  46. package/dist-cjs/endpoint/EndpointParameters.js +16 -0
  47. package/dist-cjs/endpoint/bdd.js +28 -0
  48. package/dist-cjs/endpoint/endpointResolver.js +16 -0
  49. package/dist-cjs/index.js +4 -1
  50. package/dist-cjs/models/WilmaServiceException.js +3 -3
  51. package/dist-cjs/models/enums.js +45 -0
  52. package/dist-cjs/models/errors.js +43 -0
  53. package/dist-cjs/models/models_0.js +0 -96
  54. package/dist-cjs/runtimeConfig.browser.js +11 -11
  55. package/dist-cjs/runtimeConfig.js +22 -18
  56. package/dist-cjs/runtimeConfig.shared.js +30 -10
  57. package/dist-cjs/runtimeExtensions.js +6 -5
  58. package/dist-cjs/schemas/schemas_0.js +1110 -0
  59. package/dist-es/Wilma.js +27 -5
  60. package/dist-es/WilmaClient.js +30 -22
  61. package/dist-es/auth/httpAuthExtensionConfiguration.js +38 -0
  62. package/dist-es/auth/httpAuthSchemeProvider.js +46 -0
  63. package/dist-es/commands/CreateAgentCommand.js +9 -10
  64. package/dist-es/commands/CreateGuidelineCommand.js +9 -10
  65. package/dist-es/commands/CreateGuidelinesDirectoryCommand.js +9 -10
  66. package/dist-es/commands/CreateSkillCommand.js +16 -0
  67. package/dist-es/commands/CreateSkillFileUploadCommand.js +16 -0
  68. package/dist-es/commands/DeleteAgentCommand.js +9 -10
  69. package/dist-es/commands/DeleteChatCommand.js +9 -10
  70. package/dist-es/commands/DeleteFileCommand.js +16 -0
  71. package/dist-es/commands/DeleteGuidelineCommand.js +9 -10
  72. package/dist-es/commands/DeleteGuidelinesDirectoryCommand.js +9 -10
  73. package/dist-es/commands/DeleteSkillCommand.js +16 -0
  74. package/dist-es/commands/DeleteSkillFileCommand.js +16 -0
  75. package/dist-es/commands/DislikeAnswerCommand.js +9 -10
  76. package/dist-es/commands/DownloadFileCommand.js +16 -0
  77. package/dist-es/commands/ExecuteAgentCommand.js +9 -10
  78. package/dist-es/commands/GetAgentCommand.js +9 -10
  79. package/dist-es/commands/GetChatCommand.js +9 -10
  80. package/dist-es/commands/GetFileCommand.js +16 -0
  81. package/dist-es/commands/GetGuidelineCommand.js +9 -10
  82. package/dist-es/commands/GetOrganizationSettingsCommand.js +9 -10
  83. package/dist-es/commands/GetSettingsCommand.js +9 -10
  84. package/dist-es/commands/GetSkillCommand.js +16 -0
  85. package/dist-es/commands/GetSkillFileDownloadCommand.js +16 -0
  86. package/dist-es/commands/LikeAnswerCommand.js +9 -10
  87. package/dist-es/commands/ListAgentFeedbacksCommand.js +9 -10
  88. package/dist-es/commands/ListAgentsCommand.js +9 -10
  89. package/dist-es/commands/ListAgentsNamesCommand.js +9 -10
  90. package/dist-es/commands/ListChatsCommand.js +9 -10
  91. package/dist-es/commands/ListFeedbacksCommand.js +9 -10
  92. package/dist-es/commands/ListGuidelinesCommand.js +9 -10
  93. package/dist-es/commands/ListGuidelinesDirectoriesCommand.js +9 -10
  94. package/dist-es/commands/ListGuidelinesNamesCommand.js +9 -10
  95. package/dist-es/commands/ListSkillsCommand.js +16 -0
  96. package/dist-es/commands/PatchOrganizationSettingsCommand.js +9 -10
  97. package/dist-es/commands/PatchSettingsCommand.js +9 -10
  98. package/dist-es/commands/UpdateAgentCommand.js +9 -10
  99. package/dist-es/commands/UpdateGuidelineAccessCommand.js +9 -10
  100. package/dist-es/commands/UpdateGuidelineCommand.js +9 -10
  101. package/dist-es/commands/UpdateGuidelinesDirectoryCommand.js +9 -10
  102. package/dist-es/commands/UpdateSkillCommand.js +16 -0
  103. package/dist-es/commands/index.js +12 -1
  104. package/dist-es/endpoint/EndpointParameters.js +12 -0
  105. package/dist-es/endpoint/bdd.js +25 -0
  106. package/dist-es/endpoint/endpointResolver.js +12 -0
  107. package/dist-es/index.js +4 -1
  108. package/dist-es/models/WilmaServiceException.js +1 -1
  109. package/dist-es/models/enums.js +42 -0
  110. package/dist-es/models/errors.js +37 -0
  111. package/dist-es/models/models_0.js +1 -92
  112. package/dist-es/runtimeConfig.browser.js +7 -7
  113. package/dist-es/runtimeConfig.js +17 -13
  114. package/dist-es/runtimeConfig.shared.js +24 -4
  115. package/dist-es/runtimeExtensions.js +6 -5
  116. package/dist-es/schemas/schemas_0.js +1104 -0
  117. package/dist-types/Wilma.d.ts +108 -30
  118. package/dist-types/WilmaClient.d.ts +72 -43
  119. package/dist-types/auth/httpAuthExtensionConfiguration.d.ts +29 -0
  120. package/dist-types/auth/httpAuthSchemeProvider.d.ts +81 -0
  121. package/dist-types/commands/CreateAgentCommand.d.ts +127 -25
  122. package/dist-types/commands/CreateGuidelineCommand.d.ts +11 -7
  123. package/dist-types/commands/CreateGuidelinesDirectoryCommand.d.ts +11 -7
  124. package/dist-types/commands/CreateSkillCommand.d.ts +103 -0
  125. package/dist-types/commands/CreateSkillFileUploadCommand.d.ts +99 -0
  126. package/dist-types/commands/DeleteAgentCommand.d.ts +11 -7
  127. package/dist-types/commands/DeleteChatCommand.d.ts +11 -7
  128. package/dist-types/commands/DeleteFileCommand.d.ts +80 -0
  129. package/dist-types/commands/DeleteGuidelineCommand.d.ts +11 -7
  130. package/dist-types/commands/DeleteGuidelinesDirectoryCommand.d.ts +11 -7
  131. package/dist-types/commands/DeleteSkillCommand.d.ts +80 -0
  132. package/dist-types/commands/DeleteSkillFileCommand.d.ts +83 -0
  133. package/dist-types/commands/DislikeAnswerCommand.d.ts +11 -7
  134. package/dist-types/commands/DownloadFileCommand.d.ts +95 -0
  135. package/dist-types/commands/ExecuteAgentCommand.d.ts +28 -7
  136. package/dist-types/commands/GetAgentCommand.d.ts +69 -16
  137. package/dist-types/commands/GetChatCommand.d.ts +11 -7
  138. package/dist-types/commands/GetFileCommand.d.ts +93 -0
  139. package/dist-types/commands/GetGuidelineCommand.d.ts +11 -7
  140. package/dist-types/commands/GetOrganizationSettingsCommand.d.ts +11 -7
  141. package/dist-types/commands/GetSettingsCommand.d.ts +11 -7
  142. package/dist-types/commands/GetSkillCommand.d.ts +103 -0
  143. package/dist-types/commands/GetSkillFileDownloadCommand.d.ts +86 -0
  144. package/dist-types/commands/LikeAnswerCommand.d.ts +11 -7
  145. package/dist-types/commands/ListAgentFeedbacksCommand.d.ts +11 -7
  146. package/dist-types/commands/ListAgentsCommand.d.ts +69 -16
  147. package/dist-types/commands/ListAgentsNamesCommand.d.ts +11 -7
  148. package/dist-types/commands/ListChatsCommand.d.ts +11 -7
  149. package/dist-types/commands/ListFeedbacksCommand.d.ts +11 -7
  150. package/dist-types/commands/ListGuidelinesCommand.d.ts +11 -7
  151. package/dist-types/commands/ListGuidelinesDirectoriesCommand.d.ts +11 -7
  152. package/dist-types/commands/ListGuidelinesNamesCommand.d.ts +11 -7
  153. package/dist-types/commands/ListSkillsCommand.d.ts +92 -0
  154. package/dist-types/commands/PatchOrganizationSettingsCommand.d.ts +11 -7
  155. package/dist-types/commands/PatchSettingsCommand.d.ts +11 -7
  156. package/dist-types/commands/UpdateAgentCommand.d.ts +127 -25
  157. package/dist-types/commands/UpdateGuidelineAccessCommand.d.ts +11 -7
  158. package/dist-types/commands/UpdateGuidelineCommand.d.ts +11 -7
  159. package/dist-types/commands/UpdateGuidelinesDirectoryCommand.d.ts +11 -7
  160. package/dist-types/commands/UpdateSkillCommand.d.ts +106 -0
  161. package/dist-types/commands/index.d.ts +12 -1
  162. package/dist-types/endpoint/EndpointParameters.d.ts +41 -0
  163. package/dist-types/endpoint/bdd.d.ts +2 -0
  164. package/dist-types/endpoint/endpointResolver.d.ts +8 -0
  165. package/dist-types/extensionConfiguration.d.ts +4 -3
  166. package/dist-types/index.d.ts +5 -1
  167. package/dist-types/models/WilmaServiceException.d.ts +1 -1
  168. package/dist-types/models/enums.d.ts +129 -0
  169. package/dist-types/models/errors.d.ts +35 -0
  170. package/dist-types/models/models_0.d.ts +640 -162
  171. package/dist-types/runtimeConfig.browser.d.ts +37 -13
  172. package/dist-types/runtimeConfig.d.ts +36 -12
  173. package/dist-types/runtimeConfig.native.d.ts +37 -13
  174. package/dist-types/runtimeConfig.shared.d.ts +20 -3
  175. package/dist-types/runtimeExtensions.d.ts +1 -1
  176. package/dist-types/schemas/schemas_0.d.ts +172 -0
  177. package/package.json +14 -40
  178. package/dist-cjs/models/index.js +0 -4
  179. package/dist-cjs/protocols/Aws_restJson1.js +0 -1125
  180. package/dist-es/models/index.js +0 -1
  181. package/dist-es/protocols/Aws_restJson1.js +0 -1063
  182. package/dist-types/models/index.d.ts +0 -1
  183. package/dist-types/protocols/Aws_restJson1.d.ts +0 -263
@@ -1,1125 +0,0 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.de_ListGuidelinesCommand = exports.de_ListFeedbacksCommand = exports.de_ListChatsCommand = exports.de_ListAgentsNamesCommand = exports.de_ListAgentsCommand = exports.de_ListAgentFeedbacksCommand = exports.de_LikeAnswerCommand = exports.de_GetSettingsCommand = exports.de_GetOrganizationSettingsCommand = exports.de_GetGuidelineCommand = exports.de_GetChatCommand = exports.de_GetAgentCommand = exports.de_ExecuteAgentCommand = exports.de_DislikeAnswerCommand = exports.de_DeleteGuidelinesDirectoryCommand = exports.de_DeleteGuidelineCommand = exports.de_DeleteChatCommand = exports.de_DeleteAgentCommand = exports.de_CreateGuidelinesDirectoryCommand = exports.de_CreateGuidelineCommand = exports.de_CreateAgentCommand = exports.se_UpdateGuidelinesDirectoryCommand = exports.se_UpdateGuidelineAccessCommand = exports.se_UpdateGuidelineCommand = exports.se_UpdateAgentCommand = exports.se_PatchSettingsCommand = exports.se_PatchOrganizationSettingsCommand = exports.se_ListGuidelinesNamesCommand = exports.se_ListGuidelinesDirectoriesCommand = exports.se_ListGuidelinesCommand = exports.se_ListFeedbacksCommand = exports.se_ListChatsCommand = exports.se_ListAgentsNamesCommand = exports.se_ListAgentsCommand = exports.se_ListAgentFeedbacksCommand = exports.se_LikeAnswerCommand = exports.se_GetSettingsCommand = exports.se_GetOrganizationSettingsCommand = exports.se_GetGuidelineCommand = exports.se_GetChatCommand = exports.se_GetAgentCommand = exports.se_ExecuteAgentCommand = exports.se_DislikeAnswerCommand = exports.se_DeleteGuidelinesDirectoryCommand = exports.se_DeleteGuidelineCommand = exports.se_DeleteChatCommand = exports.se_DeleteAgentCommand = exports.se_CreateGuidelinesDirectoryCommand = exports.se_CreateGuidelineCommand = exports.se_CreateAgentCommand = void 0;
4
- exports.de_UpdateGuidelinesDirectoryCommand = exports.de_UpdateGuidelineAccessCommand = exports.de_UpdateGuidelineCommand = exports.de_UpdateAgentCommand = exports.de_PatchSettingsCommand = exports.de_PatchOrganizationSettingsCommand = exports.de_ListGuidelinesNamesCommand = exports.de_ListGuidelinesDirectoriesCommand = void 0;
5
- const WilmaServiceException_1 = require("../models/WilmaServiceException");
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_CreateAgentCommand = async (input, context) => {
11
- const b = (0, core_2.requestBuilder)(input, context);
12
- const headers = {
13
- 'content-type': 'application/json',
14
- };
15
- b.bp("/v1/wilma/agents/agents");
16
- const query = (0, smithy_client_1.map)({
17
- [_c]: [, input[_c]],
18
- });
19
- let body;
20
- body = JSON.stringify((0, smithy_client_1.take)(input, {
21
- 'capabilities': _ => (0, smithy_client_1._json)(_),
22
- 'category': [],
23
- 'instructions': [],
24
- 'model': [],
25
- 'name': [],
26
- 'variables': _ => (0, smithy_client_1._json)(_),
27
- }));
28
- b.m("POST")
29
- .h(headers)
30
- .q(query)
31
- .b(body);
32
- return b.build();
33
- };
34
- exports.se_CreateAgentCommand = se_CreateAgentCommand;
35
- const se_CreateGuidelineCommand = async (input, context) => {
36
- const b = (0, core_2.requestBuilder)(input, context);
37
- const headers = {
38
- 'content-type': 'application/json',
39
- };
40
- b.bp("/v1/wilma/guidelines");
41
- const query = (0, smithy_client_1.map)({
42
- [_c]: [, input[_c]],
43
- [_u]: [, input[_u]],
44
- });
45
- let body;
46
- body = JSON.stringify((0, smithy_client_1.take)(input, {
47
- 'access': _ => (0, smithy_client_1._json)(_),
48
- 'content': [],
49
- 'description': [],
50
- 'directory': [],
51
- 'name': [],
52
- 'scope': [],
53
- }));
54
- b.m("POST")
55
- .h(headers)
56
- .q(query)
57
- .b(body);
58
- return b.build();
59
- };
60
- exports.se_CreateGuidelineCommand = se_CreateGuidelineCommand;
61
- const se_CreateGuidelinesDirectoryCommand = async (input, context) => {
62
- const b = (0, core_2.requestBuilder)(input, context);
63
- const headers = {
64
- 'content-type': 'application/json',
65
- };
66
- b.bp("/v1/wilma/guidelines-directories");
67
- const query = (0, smithy_client_1.map)({
68
- [_c]: [, input[_c]],
69
- [_u]: [, input[_u]],
70
- });
71
- let body;
72
- body = JSON.stringify((0, smithy_client_1.take)(input, {
73
- 'path': [],
74
- }));
75
- b.m("POST")
76
- .h(headers)
77
- .q(query)
78
- .b(body);
79
- return b.build();
80
- };
81
- exports.se_CreateGuidelinesDirectoryCommand = se_CreateGuidelinesDirectoryCommand;
82
- const se_DeleteAgentCommand = async (input, context) => {
83
- const b = (0, core_2.requestBuilder)(input, context);
84
- const headers = {};
85
- b.bp("/v1/wilma/agents/{agentId}");
86
- b.p('agentId', () => input.agentId, '{agentId}', false);
87
- const query = (0, smithy_client_1.map)({
88
- [_c]: [, input[_c]],
89
- });
90
- let body;
91
- b.m("DELETE")
92
- .h(headers)
93
- .q(query)
94
- .b(body);
95
- return b.build();
96
- };
97
- exports.se_DeleteAgentCommand = se_DeleteAgentCommand;
98
- const se_DeleteChatCommand = async (input, context) => {
99
- const b = (0, core_2.requestBuilder)(input, context);
100
- const headers = {};
101
- b.bp("/v1/wilma/chats/{chatId}");
102
- b.p('chatId', () => input.chatId, '{chatId}', false);
103
- const query = (0, smithy_client_1.map)({
104
- [_c]: [, input[_c]],
105
- [_u]: [, input[_u]],
106
- });
107
- let body;
108
- b.m("DELETE")
109
- .h(headers)
110
- .q(query)
111
- .b(body);
112
- return b.build();
113
- };
114
- exports.se_DeleteChatCommand = se_DeleteChatCommand;
115
- const se_DeleteGuidelineCommand = async (input, context) => {
116
- const b = (0, core_2.requestBuilder)(input, context);
117
- const headers = {};
118
- b.bp("/v1/wilma/guidelines/{guidelineId}");
119
- b.p('guidelineId', () => input.guidelineId, '{guidelineId}', false);
120
- const query = (0, smithy_client_1.map)({
121
- [_c]: [, input[_c]],
122
- [_u]: [, input[_u]],
123
- });
124
- let body;
125
- b.m("DELETE")
126
- .h(headers)
127
- .q(query)
128
- .b(body);
129
- return b.build();
130
- };
131
- exports.se_DeleteGuidelineCommand = se_DeleteGuidelineCommand;
132
- const se_DeleteGuidelinesDirectoryCommand = async (input, context) => {
133
- const b = (0, core_2.requestBuilder)(input, context);
134
- const headers = {};
135
- b.bp("/v1/wilma/guidelines-directories");
136
- const query = (0, smithy_client_1.map)({
137
- [_c]: [, input[_c]],
138
- [_u]: [, input[_u]],
139
- [_p]: [, (0, smithy_client_1.expectNonNull)(input[_p], `path`)],
140
- });
141
- let body;
142
- b.m("DELETE")
143
- .h(headers)
144
- .q(query)
145
- .b(body);
146
- return b.build();
147
- };
148
- exports.se_DeleteGuidelinesDirectoryCommand = se_DeleteGuidelinesDirectoryCommand;
149
- const se_DislikeAnswerCommand = async (input, context) => {
150
- const b = (0, core_2.requestBuilder)(input, context);
151
- const headers = {
152
- 'content-type': 'application/json',
153
- };
154
- b.bp("/v1/wilma/dislike");
155
- const query = (0, smithy_client_1.map)({
156
- [_c]: [, input[_c]],
157
- [_u]: [, input[_u]],
158
- });
159
- let body;
160
- body = JSON.stringify((0, smithy_client_1.take)(input, {
161
- 'chatId': [],
162
- 'messageId': [],
163
- 'text': [],
164
- }));
165
- b.m("POST")
166
- .h(headers)
167
- .q(query)
168
- .b(body);
169
- return b.build();
170
- };
171
- exports.se_DislikeAnswerCommand = se_DislikeAnswerCommand;
172
- const se_ExecuteAgentCommand = async (input, context) => {
173
- const b = (0, core_2.requestBuilder)(input, context);
174
- const headers = {
175
- 'content-type': 'application/json',
176
- };
177
- b.bp("/v1/wilma/agents/agents/{agentId}/execute");
178
- b.p('agentId', () => input.agentId, '{agentId}', false);
179
- const query = (0, smithy_client_1.map)({
180
- [_c]: [, input[_c]],
181
- });
182
- let body;
183
- body = JSON.stringify((0, smithy_client_1.take)(input, {
184
- 'data': [],
185
- 'service': [],
186
- 'user': [],
187
- 'variables': _ => se_Document(_, context),
188
- }));
189
- b.m("POST")
190
- .h(headers)
191
- .q(query)
192
- .b(body);
193
- return b.build();
194
- };
195
- exports.se_ExecuteAgentCommand = se_ExecuteAgentCommand;
196
- const se_GetAgentCommand = async (input, context) => {
197
- const b = (0, core_2.requestBuilder)(input, context);
198
- const headers = {};
199
- b.bp("/v1/wilma/agents/agents/{agentId}");
200
- b.p('agentId', () => input.agentId, '{agentId}', false);
201
- const query = (0, smithy_client_1.map)({
202
- [_c]: [, input[_c]],
203
- });
204
- let body;
205
- b.m("GET")
206
- .h(headers)
207
- .q(query)
208
- .b(body);
209
- return b.build();
210
- };
211
- exports.se_GetAgentCommand = se_GetAgentCommand;
212
- const se_GetChatCommand = async (input, context) => {
213
- const b = (0, core_2.requestBuilder)(input, context);
214
- const headers = {};
215
- b.bp("/v1/wilma/chats/{chatId}");
216
- b.p('chatId', () => input.chatId, '{chatId}', false);
217
- const query = (0, smithy_client_1.map)({
218
- [_c]: [, input[_c]],
219
- [_u]: [, input[_u]],
220
- });
221
- let body;
222
- b.m("GET")
223
- .h(headers)
224
- .q(query)
225
- .b(body);
226
- return b.build();
227
- };
228
- exports.se_GetChatCommand = se_GetChatCommand;
229
- const se_GetGuidelineCommand = async (input, context) => {
230
- const b = (0, core_2.requestBuilder)(input, context);
231
- const headers = {};
232
- b.bp("/v1/wilma/guidelines/{guidelineId}");
233
- b.p('guidelineId', () => input.guidelineId, '{guidelineId}', false);
234
- const query = (0, smithy_client_1.map)({
235
- [_c]: [, input[_c]],
236
- [_u]: [, input[_u]],
237
- });
238
- let body;
239
- b.m("GET")
240
- .h(headers)
241
- .q(query)
242
- .b(body);
243
- return b.build();
244
- };
245
- exports.se_GetGuidelineCommand = se_GetGuidelineCommand;
246
- const se_GetOrganizationSettingsCommand = async (input, context) => {
247
- const b = (0, core_2.requestBuilder)(input, context);
248
- const headers = {};
249
- b.bp("/v1/wilma/settings/organization");
250
- const query = (0, smithy_client_1.map)({
251
- [_c]: [, input[_c]],
252
- });
253
- let body;
254
- b.m("GET")
255
- .h(headers)
256
- .q(query)
257
- .b(body);
258
- return b.build();
259
- };
260
- exports.se_GetOrganizationSettingsCommand = se_GetOrganizationSettingsCommand;
261
- const se_GetSettingsCommand = async (input, context) => {
262
- const b = (0, core_2.requestBuilder)(input, context);
263
- const headers = {};
264
- b.bp("/v1/wilma/settings");
265
- const query = (0, smithy_client_1.map)({
266
- [_c]: [, input[_c]],
267
- [_u]: [, input[_u]],
268
- });
269
- let body;
270
- b.m("GET")
271
- .h(headers)
272
- .q(query)
273
- .b(body);
274
- return b.build();
275
- };
276
- exports.se_GetSettingsCommand = se_GetSettingsCommand;
277
- const se_LikeAnswerCommand = async (input, context) => {
278
- const b = (0, core_2.requestBuilder)(input, context);
279
- const headers = {
280
- 'content-type': 'application/json',
281
- };
282
- b.bp("/v1/wilma/like");
283
- const query = (0, smithy_client_1.map)({
284
- [_c]: [, input[_c]],
285
- [_u]: [, input[_u]],
286
- });
287
- let body;
288
- body = JSON.stringify((0, smithy_client_1.take)(input, {
289
- 'chatId': [],
290
- 'messageId': [],
291
- 'text': [],
292
- }));
293
- b.m("POST")
294
- .h(headers)
295
- .q(query)
296
- .b(body);
297
- return b.build();
298
- };
299
- exports.se_LikeAnswerCommand = se_LikeAnswerCommand;
300
- const se_ListAgentFeedbacksCommand = async (input, context) => {
301
- const b = (0, core_2.requestBuilder)(input, context);
302
- const headers = {};
303
- b.bp("/v1/wilma/agents/{agentId}/feedbacks");
304
- b.p('agentId', () => input.agentId, '{agentId}', false);
305
- const query = (0, smithy_client_1.map)({
306
- [_c]: [, input[_c]],
307
- [_eSK]: [, input[_eSK]],
308
- });
309
- let body;
310
- b.m("GET")
311
- .h(headers)
312
- .q(query)
313
- .b(body);
314
- return b.build();
315
- };
316
- exports.se_ListAgentFeedbacksCommand = se_ListAgentFeedbacksCommand;
317
- const se_ListAgentsCommand = async (input, context) => {
318
- const b = (0, core_2.requestBuilder)(input, context);
319
- const headers = {};
320
- b.bp("/v1/wilma/agents");
321
- const query = (0, smithy_client_1.map)({
322
- [_c]: [, input[_c]],
323
- });
324
- let body;
325
- b.m("GET")
326
- .h(headers)
327
- .q(query)
328
- .b(body);
329
- return b.build();
330
- };
331
- exports.se_ListAgentsCommand = se_ListAgentsCommand;
332
- const se_ListAgentsNamesCommand = async (input, context) => {
333
- const b = (0, core_2.requestBuilder)(input, context);
334
- const headers = {};
335
- b.bp("/v1/wilma/agents-names");
336
- const query = (0, smithy_client_1.map)({
337
- [_c]: [, input[_c]],
338
- });
339
- let body;
340
- b.m("GET")
341
- .h(headers)
342
- .q(query)
343
- .b(body);
344
- return b.build();
345
- };
346
- exports.se_ListAgentsNamesCommand = se_ListAgentsNamesCommand;
347
- const se_ListChatsCommand = async (input, context) => {
348
- const b = (0, core_2.requestBuilder)(input, context);
349
- const headers = {};
350
- b.bp("/v1/wilma/chats");
351
- const query = (0, smithy_client_1.map)({
352
- [_c]: [, input[_c]],
353
- [_u]: [, input[_u]],
354
- [_eSK]: [, input[_eSK]],
355
- });
356
- let body;
357
- b.m("GET")
358
- .h(headers)
359
- .q(query)
360
- .b(body);
361
- return b.build();
362
- };
363
- exports.se_ListChatsCommand = se_ListChatsCommand;
364
- const se_ListFeedbacksCommand = async (input, context) => {
365
- const b = (0, core_2.requestBuilder)(input, context);
366
- const headers = {};
367
- b.bp("/v1/wilma/feedbacks");
368
- const query = (0, smithy_client_1.map)({
369
- [_c]: [, input[_c]],
370
- [_eSK]: [, input[_eSK]],
371
- });
372
- let body;
373
- b.m("GET")
374
- .h(headers)
375
- .q(query)
376
- .b(body);
377
- return b.build();
378
- };
379
- exports.se_ListFeedbacksCommand = se_ListFeedbacksCommand;
380
- const se_ListGuidelinesCommand = async (input, context) => {
381
- const b = (0, core_2.requestBuilder)(input, context);
382
- const headers = {};
383
- b.bp("/v1/wilma/guidelines");
384
- const query = (0, smithy_client_1.map)({
385
- [_c]: [, input[_c]],
386
- [_u]: [, input[_u]],
387
- });
388
- let body;
389
- b.m("GET")
390
- .h(headers)
391
- .q(query)
392
- .b(body);
393
- return b.build();
394
- };
395
- exports.se_ListGuidelinesCommand = se_ListGuidelinesCommand;
396
- const se_ListGuidelinesDirectoriesCommand = async (input, context) => {
397
- const b = (0, core_2.requestBuilder)(input, context);
398
- const headers = {};
399
- b.bp("/v1/wilma/guidelines-directories");
400
- const query = (0, smithy_client_1.map)({
401
- [_c]: [, input[_c]],
402
- [_u]: [, input[_u]],
403
- });
404
- let body;
405
- b.m("GET")
406
- .h(headers)
407
- .q(query)
408
- .b(body);
409
- return b.build();
410
- };
411
- exports.se_ListGuidelinesDirectoriesCommand = se_ListGuidelinesDirectoriesCommand;
412
- const se_ListGuidelinesNamesCommand = async (input, context) => {
413
- const b = (0, core_2.requestBuilder)(input, context);
414
- const headers = {};
415
- b.bp("/v1/wilma/guidelines-names");
416
- const query = (0, smithy_client_1.map)({
417
- [_c]: [, input[_c]],
418
- [_u]: [, input[_u]],
419
- });
420
- let body;
421
- b.m("GET")
422
- .h(headers)
423
- .q(query)
424
- .b(body);
425
- return b.build();
426
- };
427
- exports.se_ListGuidelinesNamesCommand = se_ListGuidelinesNamesCommand;
428
- const se_PatchOrganizationSettingsCommand = async (input, context) => {
429
- const b = (0, core_2.requestBuilder)(input, context);
430
- const headers = {
431
- 'content-type': 'application/json',
432
- };
433
- b.bp("/v1/wilma/settings/organization");
434
- const query = (0, smithy_client_1.map)({
435
- [_c]: [, input[_c]],
436
- });
437
- let body;
438
- body = JSON.stringify((0, smithy_client_1.take)(input, {
439
- 'agents': _ => (0, smithy_client_1._json)(_),
440
- 'guidelines': _ => (0, smithy_client_1._json)(_),
441
- 'knowledgeBases': _ => (0, smithy_client_1._json)(_),
442
- 'tools': _ => (0, smithy_client_1._json)(_),
443
- }));
444
- b.m("PATCH")
445
- .h(headers)
446
- .q(query)
447
- .b(body);
448
- return b.build();
449
- };
450
- exports.se_PatchOrganizationSettingsCommand = se_PatchOrganizationSettingsCommand;
451
- const se_PatchSettingsCommand = async (input, context) => {
452
- const b = (0, core_2.requestBuilder)(input, context);
453
- const headers = {
454
- 'content-type': 'application/json',
455
- };
456
- b.bp("/v1/wilma/settings");
457
- const query = (0, smithy_client_1.map)({
458
- [_c]: [, input[_c]],
459
- [_u]: [, input[_u]],
460
- });
461
- let body;
462
- body = JSON.stringify((0, smithy_client_1.take)(input, {
463
- 'about': _ => (0, smithy_client_1._json)(_),
464
- 'guidelines': _ => (0, smithy_client_1._json)(_),
465
- 'integrations': _ => (0, smithy_client_1._json)(_),
466
- 'style': _ => (0, smithy_client_1._json)(_),
467
- }));
468
- b.m("PATCH")
469
- .h(headers)
470
- .q(query)
471
- .b(body);
472
- return b.build();
473
- };
474
- exports.se_PatchSettingsCommand = se_PatchSettingsCommand;
475
- const se_UpdateAgentCommand = async (input, context) => {
476
- const b = (0, core_2.requestBuilder)(input, context);
477
- const headers = {
478
- 'content-type': 'application/json',
479
- };
480
- b.bp("/v1/wilma/agents/{agentId}");
481
- b.p('agentId', () => input.agentId, '{agentId}', false);
482
- const query = (0, smithy_client_1.map)({
483
- [_c]: [, input[_c]],
484
- });
485
- let body;
486
- body = JSON.stringify((0, smithy_client_1.take)(input, {
487
- 'capabilities': _ => (0, smithy_client_1._json)(_),
488
- 'category': [],
489
- 'instructions': [],
490
- 'model': [],
491
- 'name': [],
492
- 'variables': _ => (0, smithy_client_1._json)(_),
493
- }));
494
- b.m("PUT")
495
- .h(headers)
496
- .q(query)
497
- .b(body);
498
- return b.build();
499
- };
500
- exports.se_UpdateAgentCommand = se_UpdateAgentCommand;
501
- const se_UpdateGuidelineCommand = async (input, context) => {
502
- const b = (0, core_2.requestBuilder)(input, context);
503
- const headers = {
504
- 'content-type': 'application/json',
505
- };
506
- b.bp("/v1/wilma/guidelines/{guidelineId}");
507
- b.p('guidelineId', () => input.guidelineId, '{guidelineId}', false);
508
- const query = (0, smithy_client_1.map)({
509
- [_c]: [, input[_c]],
510
- [_u]: [, input[_u]],
511
- });
512
- let body;
513
- body = JSON.stringify((0, smithy_client_1.take)(input, {
514
- 'content': [],
515
- 'description': [],
516
- 'directory': [],
517
- 'name': [],
518
- }));
519
- b.m("PUT")
520
- .h(headers)
521
- .q(query)
522
- .b(body);
523
- return b.build();
524
- };
525
- exports.se_UpdateGuidelineCommand = se_UpdateGuidelineCommand;
526
- const se_UpdateGuidelineAccessCommand = async (input, context) => {
527
- const b = (0, core_2.requestBuilder)(input, context);
528
- const headers = {
529
- 'content-type': 'application/json',
530
- };
531
- b.bp("/v1/wilma/guidelines/{guidelineId}/access");
532
- b.p('guidelineId', () => input.guidelineId, '{guidelineId}', false);
533
- const query = (0, smithy_client_1.map)({
534
- [_c]: [, input[_c]],
535
- [_u]: [, input[_u]],
536
- });
537
- let body;
538
- body = JSON.stringify((0, smithy_client_1.take)(input, {
539
- 'access': _ => (0, smithy_client_1._json)(_),
540
- }));
541
- b.m("PATCH")
542
- .h(headers)
543
- .q(query)
544
- .b(body);
545
- return b.build();
546
- };
547
- exports.se_UpdateGuidelineAccessCommand = se_UpdateGuidelineAccessCommand;
548
- const se_UpdateGuidelinesDirectoryCommand = async (input, context) => {
549
- const b = (0, core_2.requestBuilder)(input, context);
550
- const headers = {
551
- 'content-type': 'application/json',
552
- };
553
- b.bp("/v1/wilma/guidelines-directories");
554
- const query = (0, smithy_client_1.map)({
555
- [_c]: [, input[_c]],
556
- [_u]: [, input[_u]],
557
- });
558
- let body;
559
- body = JSON.stringify((0, smithy_client_1.take)(input, {
560
- 'currentPath': [],
561
- 'newPath': [],
562
- }));
563
- b.m("PUT")
564
- .h(headers)
565
- .q(query)
566
- .b(body);
567
- return b.build();
568
- };
569
- exports.se_UpdateGuidelinesDirectoryCommand = se_UpdateGuidelinesDirectoryCommand;
570
- const de_CreateAgentCommand = async (output, context) => {
571
- if (output.statusCode !== 200 && output.statusCode >= 300) {
572
- return de_CommandError(output, context);
573
- }
574
- const contents = (0, smithy_client_1.map)({
575
- $metadata: deserializeMetadata(output),
576
- });
577
- const data = (0, smithy_client_1.expectNonNull)(((0, smithy_client_1.expectObject)(await (0, core_1.parseJsonBody)(output.body, context))), "body");
578
- const doc = (0, smithy_client_1.take)(data, {
579
- 'agent': smithy_client_1._json,
580
- });
581
- Object.assign(contents, doc);
582
- return contents;
583
- };
584
- exports.de_CreateAgentCommand = de_CreateAgentCommand;
585
- const de_CreateGuidelineCommand = async (output, context) => {
586
- if (output.statusCode !== 200 && output.statusCode >= 300) {
587
- return de_CommandError(output, context);
588
- }
589
- const contents = (0, smithy_client_1.map)({
590
- $metadata: deserializeMetadata(output),
591
- });
592
- const data = (0, smithy_client_1.expectNonNull)(((0, smithy_client_1.expectObject)(await (0, core_1.parseJsonBody)(output.body, context))), "body");
593
- const doc = (0, smithy_client_1.take)(data, {
594
- 'guideline': smithy_client_1._json,
595
- });
596
- Object.assign(contents, doc);
597
- return contents;
598
- };
599
- exports.de_CreateGuidelineCommand = de_CreateGuidelineCommand;
600
- const de_CreateGuidelinesDirectoryCommand = async (output, context) => {
601
- if (output.statusCode !== 200 && output.statusCode >= 300) {
602
- return de_CommandError(output, context);
603
- }
604
- const contents = (0, smithy_client_1.map)({
605
- $metadata: deserializeMetadata(output),
606
- });
607
- const data = (0, smithy_client_1.expectNonNull)(((0, smithy_client_1.expectObject)(await (0, core_1.parseJsonBody)(output.body, context))), "body");
608
- const doc = (0, smithy_client_1.take)(data, {
609
- 'directory': smithy_client_1._json,
610
- });
611
- Object.assign(contents, doc);
612
- return contents;
613
- };
614
- exports.de_CreateGuidelinesDirectoryCommand = de_CreateGuidelinesDirectoryCommand;
615
- const de_DeleteAgentCommand = async (output, context) => {
616
- if (output.statusCode !== 200 && output.statusCode >= 300) {
617
- return de_CommandError(output, context);
618
- }
619
- const contents = (0, smithy_client_1.map)({
620
- $metadata: deserializeMetadata(output),
621
- });
622
- await (0, smithy_client_1.collectBody)(output.body, context);
623
- return contents;
624
- };
625
- exports.de_DeleteAgentCommand = de_DeleteAgentCommand;
626
- const de_DeleteChatCommand = async (output, context) => {
627
- if (output.statusCode !== 200 && output.statusCode >= 300) {
628
- return de_CommandError(output, context);
629
- }
630
- const contents = (0, smithy_client_1.map)({
631
- $metadata: deserializeMetadata(output),
632
- });
633
- await (0, smithy_client_1.collectBody)(output.body, context);
634
- return contents;
635
- };
636
- exports.de_DeleteChatCommand = de_DeleteChatCommand;
637
- const de_DeleteGuidelineCommand = async (output, context) => {
638
- if (output.statusCode !== 200 && output.statusCode >= 300) {
639
- return de_CommandError(output, context);
640
- }
641
- const contents = (0, smithy_client_1.map)({
642
- $metadata: deserializeMetadata(output),
643
- });
644
- await (0, smithy_client_1.collectBody)(output.body, context);
645
- return contents;
646
- };
647
- exports.de_DeleteGuidelineCommand = de_DeleteGuidelineCommand;
648
- const de_DeleteGuidelinesDirectoryCommand = async (output, context) => {
649
- if (output.statusCode !== 200 && output.statusCode >= 300) {
650
- return de_CommandError(output, context);
651
- }
652
- const contents = (0, smithy_client_1.map)({
653
- $metadata: deserializeMetadata(output),
654
- });
655
- await (0, smithy_client_1.collectBody)(output.body, context);
656
- return contents;
657
- };
658
- exports.de_DeleteGuidelinesDirectoryCommand = de_DeleteGuidelinesDirectoryCommand;
659
- const de_DislikeAnswerCommand = async (output, context) => {
660
- if (output.statusCode !== 200 && output.statusCode >= 300) {
661
- return de_CommandError(output, context);
662
- }
663
- const contents = (0, smithy_client_1.map)({
664
- $metadata: deserializeMetadata(output),
665
- });
666
- await (0, smithy_client_1.collectBody)(output.body, context);
667
- return contents;
668
- };
669
- exports.de_DislikeAnswerCommand = de_DislikeAnswerCommand;
670
- const de_ExecuteAgentCommand = async (output, context) => {
671
- if (output.statusCode !== 200 && output.statusCode >= 300) {
672
- return de_CommandError(output, context);
673
- }
674
- const contents = (0, smithy_client_1.map)({
675
- $metadata: deserializeMetadata(output),
676
- });
677
- const data = (0, smithy_client_1.expectNonNull)(((0, smithy_client_1.expectObject)(await (0, core_1.parseJsonBody)(output.body, context))), "body");
678
- const doc = (0, smithy_client_1.take)(data, {
679
- 'result': _ => de_AgentExecutionResult(_, context),
680
- });
681
- Object.assign(contents, doc);
682
- return contents;
683
- };
684
- exports.de_ExecuteAgentCommand = de_ExecuteAgentCommand;
685
- const de_GetAgentCommand = async (output, context) => {
686
- if (output.statusCode !== 200 && output.statusCode >= 300) {
687
- return de_CommandError(output, context);
688
- }
689
- const contents = (0, smithy_client_1.map)({
690
- $metadata: deserializeMetadata(output),
691
- });
692
- const data = (0, smithy_client_1.expectNonNull)(((0, smithy_client_1.expectObject)(await (0, core_1.parseJsonBody)(output.body, context))), "body");
693
- const doc = (0, smithy_client_1.take)(data, {
694
- 'agent': smithy_client_1._json,
695
- });
696
- Object.assign(contents, doc);
697
- return contents;
698
- };
699
- exports.de_GetAgentCommand = de_GetAgentCommand;
700
- const de_GetChatCommand = async (output, context) => {
701
- if (output.statusCode !== 200 && output.statusCode >= 300) {
702
- return de_CommandError(output, context);
703
- }
704
- const contents = (0, smithy_client_1.map)({
705
- $metadata: deserializeMetadata(output),
706
- });
707
- const data = (0, smithy_client_1.expectNonNull)(((0, smithy_client_1.expectObject)(await (0, core_1.parseJsonBody)(output.body, context))), "body");
708
- const doc = (0, smithy_client_1.take)(data, {
709
- 'chat': _ => de_Chat(_, context),
710
- 'history': _ => de_ChatHistory(_, context),
711
- });
712
- Object.assign(contents, doc);
713
- return contents;
714
- };
715
- exports.de_GetChatCommand = de_GetChatCommand;
716
- const de_GetGuidelineCommand = async (output, context) => {
717
- if (output.statusCode !== 200 && output.statusCode >= 300) {
718
- return de_CommandError(output, context);
719
- }
720
- const contents = (0, smithy_client_1.map)({
721
- $metadata: deserializeMetadata(output),
722
- });
723
- const data = (0, smithy_client_1.expectNonNull)(((0, smithy_client_1.expectObject)(await (0, core_1.parseJsonBody)(output.body, context))), "body");
724
- const doc = (0, smithy_client_1.take)(data, {
725
- 'guideline': smithy_client_1._json,
726
- });
727
- Object.assign(contents, doc);
728
- return contents;
729
- };
730
- exports.de_GetGuidelineCommand = de_GetGuidelineCommand;
731
- const de_GetOrganizationSettingsCommand = async (output, context) => {
732
- if (output.statusCode !== 200 && output.statusCode >= 300) {
733
- return de_CommandError(output, context);
734
- }
735
- const contents = (0, smithy_client_1.map)({
736
- $metadata: deserializeMetadata(output),
737
- });
738
- const data = (0, smithy_client_1.expectNonNull)(((0, smithy_client_1.expectObject)(await (0, core_1.parseJsonBody)(output.body, context))), "body");
739
- const doc = (0, smithy_client_1.take)(data, {
740
- 'agents': smithy_client_1._json,
741
- 'guidelines': smithy_client_1._json,
742
- 'knowledgeBases': smithy_client_1._json,
743
- 'tools': smithy_client_1._json,
744
- });
745
- Object.assign(contents, doc);
746
- return contents;
747
- };
748
- exports.de_GetOrganizationSettingsCommand = de_GetOrganizationSettingsCommand;
749
- const de_GetSettingsCommand = async (output, context) => {
750
- if (output.statusCode !== 200 && output.statusCode >= 300) {
751
- return de_CommandError(output, context);
752
- }
753
- const contents = (0, smithy_client_1.map)({
754
- $metadata: deserializeMetadata(output),
755
- });
756
- const data = (0, smithy_client_1.expectNonNull)(((0, smithy_client_1.expectObject)(await (0, core_1.parseJsonBody)(output.body, context))), "body");
757
- const doc = (0, smithy_client_1.take)(data, {
758
- 'about': smithy_client_1._json,
759
- 'agents': smithy_client_1._json,
760
- 'guidelines': smithy_client_1._json,
761
- 'guidelinesSettings': smithy_client_1._json,
762
- 'integrations': smithy_client_1._json,
763
- 'style': smithy_client_1._json,
764
- });
765
- Object.assign(contents, doc);
766
- return contents;
767
- };
768
- exports.de_GetSettingsCommand = de_GetSettingsCommand;
769
- const de_LikeAnswerCommand = async (output, context) => {
770
- if (output.statusCode !== 200 && output.statusCode >= 300) {
771
- return de_CommandError(output, context);
772
- }
773
- const contents = (0, smithy_client_1.map)({
774
- $metadata: deserializeMetadata(output),
775
- });
776
- await (0, smithy_client_1.collectBody)(output.body, context);
777
- return contents;
778
- };
779
- exports.de_LikeAnswerCommand = de_LikeAnswerCommand;
780
- const de_ListAgentFeedbacksCommand = async (output, context) => {
781
- if (output.statusCode !== 200 && output.statusCode >= 300) {
782
- return de_CommandError(output, context);
783
- }
784
- const contents = (0, smithy_client_1.map)({
785
- $metadata: deserializeMetadata(output),
786
- });
787
- const data = (0, smithy_client_1.expectNonNull)(((0, smithy_client_1.expectObject)(await (0, core_1.parseJsonBody)(output.body, context))), "body");
788
- const doc = (0, smithy_client_1.take)(data, {
789
- 'feedbacks': smithy_client_1._json,
790
- 'lastEvaluatedKey': smithy_client_1.expectString,
791
- });
792
- Object.assign(contents, doc);
793
- return contents;
794
- };
795
- exports.de_ListAgentFeedbacksCommand = de_ListAgentFeedbacksCommand;
796
- const de_ListAgentsCommand = async (output, context) => {
797
- if (output.statusCode !== 200 && output.statusCode >= 300) {
798
- return de_CommandError(output, context);
799
- }
800
- const contents = (0, smithy_client_1.map)({
801
- $metadata: deserializeMetadata(output),
802
- });
803
- const data = (0, smithy_client_1.expectNonNull)(((0, smithy_client_1.expectObject)(await (0, core_1.parseJsonBody)(output.body, context))), "body");
804
- const doc = (0, smithy_client_1.take)(data, {
805
- 'agents': smithy_client_1._json,
806
- });
807
- Object.assign(contents, doc);
808
- return contents;
809
- };
810
- exports.de_ListAgentsCommand = de_ListAgentsCommand;
811
- const de_ListAgentsNamesCommand = async (output, context) => {
812
- if (output.statusCode !== 200 && output.statusCode >= 300) {
813
- return de_CommandError(output, context);
814
- }
815
- const contents = (0, smithy_client_1.map)({
816
- $metadata: deserializeMetadata(output),
817
- });
818
- const data = (0, smithy_client_1.expectNonNull)(((0, smithy_client_1.expectObject)(await (0, core_1.parseJsonBody)(output.body, context))), "body");
819
- const doc = (0, smithy_client_1.take)(data, {
820
- 'agents': smithy_client_1._json,
821
- });
822
- Object.assign(contents, doc);
823
- return contents;
824
- };
825
- exports.de_ListAgentsNamesCommand = de_ListAgentsNamesCommand;
826
- const de_ListChatsCommand = async (output, context) => {
827
- if (output.statusCode !== 200 && output.statusCode >= 300) {
828
- return de_CommandError(output, context);
829
- }
830
- const contents = (0, smithy_client_1.map)({
831
- $metadata: deserializeMetadata(output),
832
- });
833
- const data = (0, smithy_client_1.expectNonNull)(((0, smithy_client_1.expectObject)(await (0, core_1.parseJsonBody)(output.body, context))), "body");
834
- const doc = (0, smithy_client_1.take)(data, {
835
- 'chats': _ => de_ChatsList(_, context),
836
- 'lastEvaluatedKey': smithy_client_1.expectString,
837
- });
838
- Object.assign(contents, doc);
839
- return contents;
840
- };
841
- exports.de_ListChatsCommand = de_ListChatsCommand;
842
- const de_ListFeedbacksCommand = async (output, context) => {
843
- if (output.statusCode !== 200 && output.statusCode >= 300) {
844
- return de_CommandError(output, context);
845
- }
846
- const contents = (0, smithy_client_1.map)({
847
- $metadata: deserializeMetadata(output),
848
- });
849
- const data = (0, smithy_client_1.expectNonNull)(((0, smithy_client_1.expectObject)(await (0, core_1.parseJsonBody)(output.body, context))), "body");
850
- const doc = (0, smithy_client_1.take)(data, {
851
- 'feedbacks': smithy_client_1._json,
852
- 'lastEvaluatedKey': smithy_client_1.expectString,
853
- });
854
- Object.assign(contents, doc);
855
- return contents;
856
- };
857
- exports.de_ListFeedbacksCommand = de_ListFeedbacksCommand;
858
- const de_ListGuidelinesCommand = async (output, context) => {
859
- if (output.statusCode !== 200 && output.statusCode >= 300) {
860
- return de_CommandError(output, context);
861
- }
862
- const contents = (0, smithy_client_1.map)({
863
- $metadata: deserializeMetadata(output),
864
- });
865
- const data = (0, smithy_client_1.expectNonNull)(((0, smithy_client_1.expectObject)(await (0, core_1.parseJsonBody)(output.body, context))), "body");
866
- const doc = (0, smithy_client_1.take)(data, {
867
- 'guidelines': smithy_client_1._json,
868
- });
869
- Object.assign(contents, doc);
870
- return contents;
871
- };
872
- exports.de_ListGuidelinesCommand = de_ListGuidelinesCommand;
873
- const de_ListGuidelinesDirectoriesCommand = async (output, context) => {
874
- if (output.statusCode !== 200 && output.statusCode >= 300) {
875
- return de_CommandError(output, context);
876
- }
877
- const contents = (0, smithy_client_1.map)({
878
- $metadata: deserializeMetadata(output),
879
- });
880
- const data = (0, smithy_client_1.expectNonNull)(((0, smithy_client_1.expectObject)(await (0, core_1.parseJsonBody)(output.body, context))), "body");
881
- const doc = (0, smithy_client_1.take)(data, {
882
- 'directories': smithy_client_1._json,
883
- });
884
- Object.assign(contents, doc);
885
- return contents;
886
- };
887
- exports.de_ListGuidelinesDirectoriesCommand = de_ListGuidelinesDirectoriesCommand;
888
- const de_ListGuidelinesNamesCommand = async (output, context) => {
889
- if (output.statusCode !== 200 && output.statusCode >= 300) {
890
- return de_CommandError(output, context);
891
- }
892
- const contents = (0, smithy_client_1.map)({
893
- $metadata: deserializeMetadata(output),
894
- });
895
- const data = (0, smithy_client_1.expectNonNull)(((0, smithy_client_1.expectObject)(await (0, core_1.parseJsonBody)(output.body, context))), "body");
896
- const doc = (0, smithy_client_1.take)(data, {
897
- 'guidelines': smithy_client_1._json,
898
- });
899
- Object.assign(contents, doc);
900
- return contents;
901
- };
902
- exports.de_ListGuidelinesNamesCommand = de_ListGuidelinesNamesCommand;
903
- const de_PatchOrganizationSettingsCommand = async (output, context) => {
904
- if (output.statusCode !== 200 && output.statusCode >= 300) {
905
- return de_CommandError(output, context);
906
- }
907
- const contents = (0, smithy_client_1.map)({
908
- $metadata: deserializeMetadata(output),
909
- });
910
- const data = (0, smithy_client_1.expectNonNull)(((0, smithy_client_1.expectObject)(await (0, core_1.parseJsonBody)(output.body, context))), "body");
911
- const doc = (0, smithy_client_1.take)(data, {
912
- 'agents': smithy_client_1._json,
913
- 'guidelines': smithy_client_1._json,
914
- 'knowledgeBases': smithy_client_1._json,
915
- 'tools': smithy_client_1._json,
916
- });
917
- Object.assign(contents, doc);
918
- return contents;
919
- };
920
- exports.de_PatchOrganizationSettingsCommand = de_PatchOrganizationSettingsCommand;
921
- const de_PatchSettingsCommand = async (output, context) => {
922
- if (output.statusCode !== 200 && output.statusCode >= 300) {
923
- return de_CommandError(output, context);
924
- }
925
- const contents = (0, smithy_client_1.map)({
926
- $metadata: deserializeMetadata(output),
927
- });
928
- const data = (0, smithy_client_1.expectNonNull)(((0, smithy_client_1.expectObject)(await (0, core_1.parseJsonBody)(output.body, context))), "body");
929
- const doc = (0, smithy_client_1.take)(data, {
930
- 'about': smithy_client_1._json,
931
- 'agents': smithy_client_1._json,
932
- 'guidelines': smithy_client_1._json,
933
- 'guidelinesSettings': smithy_client_1._json,
934
- 'integrations': smithy_client_1._json,
935
- 'style': smithy_client_1._json,
936
- });
937
- Object.assign(contents, doc);
938
- return contents;
939
- };
940
- exports.de_PatchSettingsCommand = de_PatchSettingsCommand;
941
- const de_UpdateAgentCommand = async (output, context) => {
942
- if (output.statusCode !== 200 && output.statusCode >= 300) {
943
- return de_CommandError(output, context);
944
- }
945
- const contents = (0, smithy_client_1.map)({
946
- $metadata: deserializeMetadata(output),
947
- });
948
- const data = (0, smithy_client_1.expectNonNull)(((0, smithy_client_1.expectObject)(await (0, core_1.parseJsonBody)(output.body, context))), "body");
949
- const doc = (0, smithy_client_1.take)(data, {
950
- 'agent': smithy_client_1._json,
951
- });
952
- Object.assign(contents, doc);
953
- return contents;
954
- };
955
- exports.de_UpdateAgentCommand = de_UpdateAgentCommand;
956
- const de_UpdateGuidelineCommand = async (output, context) => {
957
- if (output.statusCode !== 200 && output.statusCode >= 300) {
958
- return de_CommandError(output, context);
959
- }
960
- const contents = (0, smithy_client_1.map)({
961
- $metadata: deserializeMetadata(output),
962
- });
963
- const data = (0, smithy_client_1.expectNonNull)(((0, smithy_client_1.expectObject)(await (0, core_1.parseJsonBody)(output.body, context))), "body");
964
- const doc = (0, smithy_client_1.take)(data, {
965
- 'guideline': smithy_client_1._json,
966
- });
967
- Object.assign(contents, doc);
968
- return contents;
969
- };
970
- exports.de_UpdateGuidelineCommand = de_UpdateGuidelineCommand;
971
- const de_UpdateGuidelineAccessCommand = async (output, context) => {
972
- if (output.statusCode !== 200 && output.statusCode >= 300) {
973
- return de_CommandError(output, context);
974
- }
975
- const contents = (0, smithy_client_1.map)({
976
- $metadata: deserializeMetadata(output),
977
- });
978
- const data = (0, smithy_client_1.expectNonNull)(((0, smithy_client_1.expectObject)(await (0, core_1.parseJsonBody)(output.body, context))), "body");
979
- const doc = (0, smithy_client_1.take)(data, {
980
- 'guideline': smithy_client_1._json,
981
- });
982
- Object.assign(contents, doc);
983
- return contents;
984
- };
985
- exports.de_UpdateGuidelineAccessCommand = de_UpdateGuidelineAccessCommand;
986
- const de_UpdateGuidelinesDirectoryCommand = async (output, context) => {
987
- if (output.statusCode !== 200 && output.statusCode >= 300) {
988
- return de_CommandError(output, context);
989
- }
990
- const contents = (0, smithy_client_1.map)({
991
- $metadata: deserializeMetadata(output),
992
- });
993
- const data = (0, smithy_client_1.expectNonNull)(((0, smithy_client_1.expectObject)(await (0, core_1.parseJsonBody)(output.body, context))), "body");
994
- const doc = (0, smithy_client_1.take)(data, {
995
- 'directory': smithy_client_1._json,
996
- });
997
- Object.assign(contents, doc);
998
- return contents;
999
- };
1000
- exports.de_UpdateGuidelinesDirectoryCommand = de_UpdateGuidelinesDirectoryCommand;
1001
- const de_CommandError = async (output, context) => {
1002
- const parsedOutput = {
1003
- ...output,
1004
- body: await (0, core_1.parseJsonErrorBody)(output.body, context)
1005
- };
1006
- const errorCode = (0, core_1.loadRestJsonErrorCode)(output, parsedOutput.body);
1007
- switch (errorCode) {
1008
- case "ValidationException":
1009
- case "smithy.framework#ValidationException":
1010
- throw await de_ValidationExceptionRes(parsedOutput, context);
1011
- case "ForbiddenException":
1012
- case "smithy.framework#ForbiddenException":
1013
- throw await de_ForbiddenExceptionRes(parsedOutput, context);
1014
- case "NotFoundException":
1015
- case "smithy.framework#NotFoundException":
1016
- throw await de_NotFoundExceptionRes(parsedOutput, context);
1017
- default:
1018
- const parsedBody = parsedOutput.body;
1019
- return throwDefaultError({
1020
- output,
1021
- parsedBody,
1022
- errorCode
1023
- });
1024
- }
1025
- };
1026
- const throwDefaultError = (0, smithy_client_1.withBaseException)(WilmaServiceException_1.WilmaServiceException);
1027
- const de_ForbiddenExceptionRes = async (parsedOutput, context) => {
1028
- const contents = (0, smithy_client_1.map)({});
1029
- const data = parsedOutput.body;
1030
- const doc = (0, smithy_client_1.take)(data, {
1031
- 'message': smithy_client_1.expectString,
1032
- });
1033
- Object.assign(contents, doc);
1034
- const exception = new models_0_1.ForbiddenException({
1035
- $metadata: deserializeMetadata(parsedOutput),
1036
- ...contents
1037
- });
1038
- return (0, smithy_client_1.decorateServiceException)(exception, parsedOutput.body);
1039
- };
1040
- const de_NotFoundExceptionRes = async (parsedOutput, context) => {
1041
- const contents = (0, smithy_client_1.map)({});
1042
- const data = parsedOutput.body;
1043
- const doc = (0, smithy_client_1.take)(data, {
1044
- 'message': smithy_client_1.expectString,
1045
- });
1046
- Object.assign(contents, doc);
1047
- const exception = new models_0_1.NotFoundException({
1048
- $metadata: deserializeMetadata(parsedOutput),
1049
- ...contents
1050
- });
1051
- return (0, smithy_client_1.decorateServiceException)(exception, parsedOutput.body);
1052
- };
1053
- const de_ValidationExceptionRes = async (parsedOutput, context) => {
1054
- const contents = (0, smithy_client_1.map)({});
1055
- const data = parsedOutput.body;
1056
- const doc = (0, smithy_client_1.take)(data, {
1057
- 'message': smithy_client_1.expectString,
1058
- });
1059
- Object.assign(contents, doc);
1060
- const exception = new models_0_1.ValidationException({
1061
- $metadata: deserializeMetadata(parsedOutput),
1062
- ...contents
1063
- });
1064
- return (0, smithy_client_1.decorateServiceException)(exception, parsedOutput.body);
1065
- };
1066
- const se_Document = (input, context) => {
1067
- return input;
1068
- };
1069
- const de_Document = (output, context) => {
1070
- return output;
1071
- };
1072
- const de_AgentExecutionResult = (output, context) => {
1073
- return (0, smithy_client_1.take)(output, {
1074
- 'error': smithy_client_1._json,
1075
- 'output': (_) => de_Document(_, context),
1076
- });
1077
- };
1078
- const de_Chat = (output, context) => {
1079
- return (0, smithy_client_1.take)(output, {
1080
- 'agentId': smithy_client_1.expectString,
1081
- 'createdAt': smithy_client_1.expectString,
1082
- 'id': smithy_client_1.expectString,
1083
- 'mentions': (_) => de_Document(_, context),
1084
- 'options': (_) => de_Document(_, context),
1085
- 'target': smithy_client_1.expectString,
1086
- 'title': smithy_client_1.expectString,
1087
- 'updatedAt': smithy_client_1.expectString,
1088
- });
1089
- };
1090
- const de_ChatHistory = (output, context) => {
1091
- return (0, smithy_client_1.take)(output, {
1092
- 'mentions': (_) => de_ChatMentionsList(_, context),
1093
- 'messages': (_) => de_ChatMessagesList(_, context),
1094
- 'version': smithy_client_1.expectString,
1095
- });
1096
- };
1097
- const de_ChatMentionsList = (output, context) => {
1098
- const retVal = (output || []).filter((e) => e != null).map((entry) => {
1099
- return de_Document(entry, context);
1100
- });
1101
- return retVal;
1102
- };
1103
- const de_ChatMessagesList = (output, context) => {
1104
- const retVal = (output || []).filter((e) => e != null).map((entry) => {
1105
- return de_Document(entry, context);
1106
- });
1107
- return retVal;
1108
- };
1109
- const de_ChatsList = (output, context) => {
1110
- const retVal = (output || []).filter((e) => e != null).map((entry) => {
1111
- return de_Chat(entry, context);
1112
- });
1113
- return retVal;
1114
- };
1115
- const deserializeMetadata = (output) => ({
1116
- httpStatusCode: output.statusCode,
1117
- requestId: output.headers["x-amzn-requestid"] ?? output.headers["x-amzn-request-id"] ?? output.headers["x-amz-request-id"],
1118
- extendedRequestId: output.headers["x-amz-id-2"],
1119
- cfId: output.headers["x-amz-cf-id"],
1120
- });
1121
- const collectBodyString = (streamBody, context) => (0, smithy_client_1.collectBody)(streamBody, context).then(body => context.utf8Encoder(body));
1122
- const _c = "company";
1123
- const _eSK = "exclusiveStartKey";
1124
- const _p = "path";
1125
- const _u = "user";