@wildix/wda-insights-client 1.0.37 → 1.0.38

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 (31) hide show
  1. package/dist-cjs/WdaInsightsClient.js +4 -5
  2. package/dist-cjs/models/models_0.js +18 -17
  3. package/dist-cjs/protocols/Aws_restJson1.js +28 -76
  4. package/dist-cjs/runtimeConfig.browser.js +1 -1
  5. package/dist-cjs/runtimeConfig.js +4 -3
  6. package/dist-cjs/runtimeExtensions.js +2 -10
  7. package/dist-es/WdaInsightsClient.js +4 -5
  8. package/dist-es/models/models_0.js +13 -12
  9. package/dist-es/protocols/Aws_restJson1.js +2 -50
  10. package/dist-es/runtimeConfig.browser.js +2 -2
  11. package/dist-es/runtimeConfig.js +5 -4
  12. package/dist-es/runtimeExtensions.js +2 -10
  13. package/dist-types/commands/CreateFilterCommand.d.ts +12 -0
  14. package/dist-types/commands/DeleteFilterCommand.d.ts +12 -0
  15. package/dist-types/commands/GetCallCharacteristicsCommand.d.ts +12 -0
  16. package/dist-types/commands/GetCallSummaryCommand.d.ts +12 -0
  17. package/dist-types/commands/GetConferenceRecordingPresignedDownloadUrlCommand.d.ts +12 -0
  18. package/dist-types/commands/GetConferenceSummaryCommand.d.ts +12 -0
  19. package/dist-types/commands/GetConferenceTimeFramesCommand.d.ts +12 -0
  20. package/dist-types/commands/ListConversationsCommand.d.ts +13 -1
  21. package/dist-types/commands/ListFiltersCommand.d.ts +12 -0
  22. package/dist-types/commands/ScheduleCallPostAnalysisCommand.d.ts +12 -0
  23. package/dist-types/commands/ScheduleCallSummaryGenerationCommand.d.ts +12 -0
  24. package/dist-types/commands/ScheduleConferencePostAnalysisCommand.d.ts +12 -0
  25. package/dist-types/commands/ScheduleConferenceSummaryGenerationCommand.d.ts +12 -0
  26. package/dist-types/commands/UpdateFilterCommand.d.ts +12 -0
  27. package/dist-types/models/models_0.d.ts +202 -201
  28. package/dist-types/runtimeConfig.browser.d.ts +2 -1
  29. package/dist-types/runtimeConfig.d.ts +2 -1
  30. package/dist-types/runtimeConfig.native.d.ts +2 -1
  31. package/package.json +37 -33
@@ -10,8 +10,11 @@ const smithy_client_1 = require("@smithy/smithy-client");
10
10
  Object.defineProperty(exports, "__Client", { enumerable: true, get: function () { return smithy_client_1.Client; } });
11
11
  const smithy_utils_1 = require("@wildix/smithy-utils");
12
12
  class WdaInsightsClient extends smithy_client_1.Client {
13
+ config;
13
14
  constructor(...[configuration]) {
14
15
  let _config_0 = (0, runtimeConfig_1.getRuntimeConfig)(configuration || {});
16
+ super(_config_0);
17
+ this.initConfig = _config_0;
15
18
  let _config_1 = (0, middleware_user_agent_1.resolveUserAgentConfig)(_config_0);
16
19
  let _config_2 = (0, middleware_retry_1.resolveRetryConfig)(_config_1);
17
20
  let _config_3 = (0, runtimeExtensions_1.resolveRuntimeExtensions)(_config_2, configuration?.extensions || []);
@@ -24,11 +27,7 @@ class WdaInsightsClient extends smithy_client_1.Client {
24
27
  path: ''
25
28
  };
26
29
  };
27
- const config = {
28
- ..._config_3,
29
- endpoint,
30
- };
31
- super(config);
30
+ const config = { ..._config_3, endpoint };
32
31
  this.config = config;
33
32
  this.middlewareStack.add(smithy_utils_1.authorizationMiddleware.bind(this, configuration.token), { step: "build" });
34
33
  this.middlewareStack.use((0, middleware_user_agent_1.getUserAgentPlugin)(this.config));
@@ -3,14 +3,14 @@ Object.defineProperty(exports, "__esModule", { value: true });
3
3
  exports.ListConversationsItemEvent = exports.ListConversationsFilterParticipant = exports.ListConversationsFilterDate = exports.ListConversationsFilterPredefinedDateType = exports.FileNotFoundException = exports.DownloadStrategy = exports.ConversationFileCategory = exports.InsightsQuality = exports.InsightsStatus = exports.FilterNotFoundException = exports.ConferenceTranscriptionStatus = exports.ConferenceParticipantType = exports.ConferenceParticipantRole = exports.PbxLicenseType = exports.ConferenceDirection = exports.ConferenceNotFoundException = exports.RecordType = exports.CallFlowTranscriptionStatus = exports.License = exports.CallDevice = exports.CallParticipantType = exports.CallParticipantRole = exports.CallFlowAttachmentType = exports.CallFlowAttachment = exports.CallRecordPauseReason = exports.CallFlowAttachmentStatus = exports.CallRecordOwner = exports.CallNotFoundException = exports.ForbiddenException = exports.ConversationStatus = exports.CallDirection = exports.ValidationException = void 0;
4
4
  const WdaInsightsServiceException_1 = require("./WdaInsightsServiceException");
5
5
  class ValidationException extends WdaInsightsServiceException_1.WdaInsightsServiceException {
6
+ name = "ValidationException";
7
+ $fault = "client";
6
8
  constructor(opts) {
7
9
  super({
8
10
  name: "ValidationException",
9
11
  $fault: "client",
10
12
  ...opts
11
13
  });
12
- this.name = "ValidationException";
13
- this.$fault = "client";
14
14
  Object.setPrototypeOf(this, ValidationException.prototype);
15
15
  }
16
16
  }
@@ -26,27 +26,27 @@ exports.ConversationStatus = {
26
26
  MISSED: "MISSED",
27
27
  };
28
28
  class ForbiddenException extends WdaInsightsServiceException_1.WdaInsightsServiceException {
29
+ name = "ForbiddenException";
30
+ $fault = "client";
29
31
  constructor(opts) {
30
32
  super({
31
33
  name: "ForbiddenException",
32
34
  $fault: "client",
33
35
  ...opts
34
36
  });
35
- this.name = "ForbiddenException";
36
- this.$fault = "client";
37
37
  Object.setPrototypeOf(this, ForbiddenException.prototype);
38
38
  }
39
39
  }
40
40
  exports.ForbiddenException = ForbiddenException;
41
41
  class CallNotFoundException extends WdaInsightsServiceException_1.WdaInsightsServiceException {
42
+ name = "CallNotFoundException";
43
+ $fault = "client";
42
44
  constructor(opts) {
43
45
  super({
44
46
  name: "CallNotFoundException",
45
47
  $fault: "client",
46
48
  ...opts
47
49
  });
48
- this.name = "CallNotFoundException";
49
- this.$fault = "client";
50
50
  Object.setPrototypeOf(this, CallNotFoundException.prototype);
51
51
  }
52
52
  }
@@ -75,7 +75,7 @@ var CallFlowAttachment;
75
75
  return visitor.voicemail(value.voicemail);
76
76
  return visitor._(value.$unknown[0], value.$unknown[1]);
77
77
  };
78
- })(CallFlowAttachment = exports.CallFlowAttachment || (exports.CallFlowAttachment = {}));
78
+ })(CallFlowAttachment || (exports.CallFlowAttachment = CallFlowAttachment = {}));
79
79
  exports.CallFlowAttachmentType = {
80
80
  FAX: "FAX",
81
81
  VOICEMAIL: "VOICEMAIL",
@@ -100,6 +100,7 @@ exports.CallDevice = {
100
100
  XBEES_WEB: "XBEES_WEB",
101
101
  };
102
102
  exports.License = {
103
+ UC: "uc",
103
104
  XBEES: "x-bees",
104
105
  };
105
106
  exports.CallFlowTranscriptionStatus = {
@@ -113,14 +114,14 @@ exports.RecordType = {
113
114
  CONFERENCE_TRANSCRIPTION: "conference_transcription",
114
115
  };
115
116
  class ConferenceNotFoundException extends WdaInsightsServiceException_1.WdaInsightsServiceException {
117
+ name = "ConferenceNotFoundException";
118
+ $fault = "client";
116
119
  constructor(opts) {
117
120
  super({
118
121
  name: "ConferenceNotFoundException",
119
122
  $fault: "client",
120
123
  ...opts
121
124
  });
122
- this.name = "ConferenceNotFoundException";
123
- this.$fault = "client";
124
125
  Object.setPrototypeOf(this, ConferenceNotFoundException.prototype);
125
126
  }
126
127
  }
@@ -153,14 +154,14 @@ exports.ConferenceTranscriptionStatus = {
153
154
  UNAVAILABLE: "UNAVAILABLE",
154
155
  };
155
156
  class FilterNotFoundException extends WdaInsightsServiceException_1.WdaInsightsServiceException {
157
+ name = "FilterNotFoundException";
158
+ $fault = "client";
156
159
  constructor(opts) {
157
160
  super({
158
161
  name: "FilterNotFoundException",
159
162
  $fault: "client",
160
163
  ...opts
161
164
  });
162
- this.name = "FilterNotFoundException";
163
- this.$fault = "client";
164
165
  Object.setPrototypeOf(this, FilterNotFoundException.prototype);
165
166
  }
166
167
  }
@@ -186,16 +187,16 @@ var DownloadStrategy;
186
187
  (function (DownloadStrategy) {
187
188
  DownloadStrategy[DownloadStrategy["DEFAULT"] = 0] = "DEFAULT";
188
189
  DownloadStrategy[DownloadStrategy["DOWNLOAD"] = 1] = "DOWNLOAD";
189
- })(DownloadStrategy = exports.DownloadStrategy || (exports.DownloadStrategy = {}));
190
+ })(DownloadStrategy || (exports.DownloadStrategy = DownloadStrategy = {}));
190
191
  class FileNotFoundException extends WdaInsightsServiceException_1.WdaInsightsServiceException {
192
+ name = "FileNotFoundException";
193
+ $fault = "client";
191
194
  constructor(opts) {
192
195
  super({
193
196
  name: "FileNotFoundException",
194
197
  $fault: "client",
195
198
  ...opts
196
199
  });
197
- this.name = "FileNotFoundException";
198
- this.$fault = "client";
199
200
  Object.setPrototypeOf(this, FileNotFoundException.prototype);
200
201
  }
201
202
  }
@@ -219,7 +220,7 @@ var ListConversationsFilterDate;
219
220
  return visitor.predefined(value.predefined);
220
221
  return visitor._(value.$unknown[0], value.$unknown[1]);
221
222
  };
222
- })(ListConversationsFilterDate = exports.ListConversationsFilterDate || (exports.ListConversationsFilterDate = {}));
223
+ })(ListConversationsFilterDate || (exports.ListConversationsFilterDate = ListConversationsFilterDate = {}));
223
224
  var ListConversationsFilterParticipant;
224
225
  (function (ListConversationsFilterParticipant) {
225
226
  ListConversationsFilterParticipant.visit = (value, visitor) => {
@@ -231,7 +232,7 @@ var ListConversationsFilterParticipant;
231
232
  return visitor.extension(value.extension);
232
233
  return visitor._(value.$unknown[0], value.$unknown[1]);
233
234
  };
234
- })(ListConversationsFilterParticipant = exports.ListConversationsFilterParticipant || (exports.ListConversationsFilterParticipant = {}));
235
+ })(ListConversationsFilterParticipant || (exports.ListConversationsFilterParticipant = ListConversationsFilterParticipant = {}));
235
236
  var ListConversationsItemEvent;
236
237
  (function (ListConversationsItemEvent) {
237
238
  ListConversationsItemEvent.visit = (value, visitor) => {
@@ -241,4 +242,4 @@ var ListConversationsItemEvent;
241
242
  return visitor.conference(value.conference);
242
243
  return visitor._(value.$unknown[0], value.$unknown[1]);
243
244
  };
244
- })(ListConversationsItemEvent = exports.ListConversationsItemEvent || (exports.ListConversationsItemEvent = {}));
245
+ })(ListConversationsItemEvent || (exports.ListConversationsItemEvent = ListConversationsItemEvent = {}));
@@ -3,10 +3,11 @@ Object.defineProperty(exports, "__esModule", { value: true });
3
3
  exports.de_UpdateFilterCommand = exports.de_ScheduleConferenceSummaryGenerationCommand = exports.de_ScheduleConferencePostAnalysisCommand = exports.de_ScheduleCallSummaryGenerationCommand = exports.de_ScheduleCallPostAnalysisCommand = exports.de_ListFiltersCommand = exports.de_ListConversationsCommand = exports.de_GetConferenceTimeFramesCommand = exports.de_GetConferenceSummaryCommand = exports.de_GetConferenceRecordingPresignedDownloadUrlCommand = exports.de_GetCallSummaryCommand = exports.de_GetCallCharacteristicsCommand = exports.de_DeleteFilterCommand = exports.de_CreateFilterCommand = exports.se_UpdateFilterCommand = exports.se_ScheduleConferenceSummaryGenerationCommand = exports.se_ScheduleConferencePostAnalysisCommand = exports.se_ScheduleCallSummaryGenerationCommand = exports.se_ScheduleCallPostAnalysisCommand = exports.se_ListFiltersCommand = exports.se_ListConversationsCommand = exports.se_GetConferenceTimeFramesCommand = exports.se_GetConferenceSummaryCommand = exports.se_GetConferenceRecordingPresignedDownloadUrlCommand = exports.se_GetCallSummaryCommand = exports.se_GetCallCharacteristicsCommand = exports.se_DeleteFilterCommand = exports.se_CreateFilterCommand = void 0;
4
4
  const WdaInsightsServiceException_1 = require("../models/WdaInsightsServiceException");
5
5
  const models_0_1 = require("../models/models_0");
6
- const core_1 = require("@smithy/core");
6
+ const core_1 = require("@aws-sdk/core");
7
+ const core_2 = require("@smithy/core");
7
8
  const smithy_client_1 = require("@smithy/smithy-client");
8
9
  const se_CreateFilterCommand = async (input, context) => {
9
- const b = (0, core_1.requestBuilder)(input, context);
10
+ const b = (0, core_2.requestBuilder)(input, context);
10
11
  const headers = {
11
12
  'content-type': 'application/json',
12
13
  };
@@ -23,7 +24,7 @@ const se_CreateFilterCommand = async (input, context) => {
23
24
  };
24
25
  exports.se_CreateFilterCommand = se_CreateFilterCommand;
25
26
  const se_DeleteFilterCommand = async (input, context) => {
26
- const b = (0, core_1.requestBuilder)(input, context);
27
+ const b = (0, core_2.requestBuilder)(input, context);
27
28
  const headers = {};
28
29
  b.bp("/v2/insights/filters/{id}");
29
30
  b.p('id', () => input.id, '{id}', false);
@@ -35,7 +36,7 @@ const se_DeleteFilterCommand = async (input, context) => {
35
36
  };
36
37
  exports.se_DeleteFilterCommand = se_DeleteFilterCommand;
37
38
  const se_GetCallCharacteristicsCommand = async (input, context) => {
38
- const b = (0, core_1.requestBuilder)(input, context);
39
+ const b = (0, core_2.requestBuilder)(input, context);
39
40
  const headers = {};
40
41
  b.bp("/v2/insights/calls/{callId}/flows/{flowIndex}/characteristics");
41
42
  b.p('callId', () => input.callId, '{callId}', false);
@@ -52,7 +53,7 @@ const se_GetCallCharacteristicsCommand = async (input, context) => {
52
53
  };
53
54
  exports.se_GetCallCharacteristicsCommand = se_GetCallCharacteristicsCommand;
54
55
  const se_GetCallSummaryCommand = async (input, context) => {
55
- const b = (0, core_1.requestBuilder)(input, context);
56
+ const b = (0, core_2.requestBuilder)(input, context);
56
57
  const headers = {};
57
58
  b.bp("/v2/insights/calls/{callId}/flows/{flowIndex}/summary");
58
59
  b.p('callId', () => input.callId, '{callId}', false);
@@ -73,7 +74,7 @@ const se_GetCallSummaryCommand = async (input, context) => {
73
74
  };
74
75
  exports.se_GetCallSummaryCommand = se_GetCallSummaryCommand;
75
76
  const se_GetConferenceRecordingPresignedDownloadUrlCommand = async (input, context) => {
76
- const b = (0, core_1.requestBuilder)(input, context);
77
+ const b = (0, core_2.requestBuilder)(input, context);
77
78
  const headers = {};
78
79
  b.bp("/v2/insights/conferences/recording/download_url");
79
80
  const query = (0, smithy_client_1.map)({
@@ -91,7 +92,7 @@ const se_GetConferenceRecordingPresignedDownloadUrlCommand = async (input, conte
91
92
  };
92
93
  exports.se_GetConferenceRecordingPresignedDownloadUrlCommand = se_GetConferenceRecordingPresignedDownloadUrlCommand;
93
94
  const se_GetConferenceSummaryCommand = async (input, context) => {
94
- const b = (0, core_1.requestBuilder)(input, context);
95
+ const b = (0, core_2.requestBuilder)(input, context);
95
96
  const headers = {};
96
97
  b.bp("/v2/insights/conferences/{conferenceId}/summary");
97
98
  b.p('conferenceId', () => input.conferenceId, '{conferenceId}', false);
@@ -111,7 +112,7 @@ const se_GetConferenceSummaryCommand = async (input, context) => {
111
112
  };
112
113
  exports.se_GetConferenceSummaryCommand = se_GetConferenceSummaryCommand;
113
114
  const se_GetConferenceTimeFramesCommand = async (input, context) => {
114
- const b = (0, core_1.requestBuilder)(input, context);
115
+ const b = (0, core_2.requestBuilder)(input, context);
115
116
  const headers = {};
116
117
  b.bp("/v2/insights/conferences/{conferenceId}/timeframes");
117
118
  b.p('conferenceId', () => input.conferenceId, '{conferenceId}', false);
@@ -131,7 +132,7 @@ const se_GetConferenceTimeFramesCommand = async (input, context) => {
131
132
  };
132
133
  exports.se_GetConferenceTimeFramesCommand = se_GetConferenceTimeFramesCommand;
133
134
  const se_ListConversationsCommand = async (input, context) => {
134
- const b = (0, core_1.requestBuilder)(input, context);
135
+ const b = (0, core_2.requestBuilder)(input, context);
135
136
  const headers = {
136
137
  'content-type': 'application/json',
137
138
  };
@@ -152,13 +153,10 @@ const se_ListConversationsCommand = async (input, context) => {
152
153
  };
153
154
  exports.se_ListConversationsCommand = se_ListConversationsCommand;
154
155
  const se_ListFiltersCommand = async (input, context) => {
155
- const b = (0, core_1.requestBuilder)(input, context);
156
- const headers = {
157
- 'content-type': 'application/json',
158
- };
156
+ const b = (0, core_2.requestBuilder)(input, context);
157
+ const headers = {};
159
158
  b.bp("/v2/insights/filters");
160
159
  let body;
161
- body = "";
162
160
  b.m("GET")
163
161
  .h(headers)
164
162
  .b(body);
@@ -166,7 +164,7 @@ const se_ListFiltersCommand = async (input, context) => {
166
164
  };
167
165
  exports.se_ListFiltersCommand = se_ListFiltersCommand;
168
166
  const se_ScheduleCallPostAnalysisCommand = async (input, context) => {
169
- const b = (0, core_1.requestBuilder)(input, context);
167
+ const b = (0, core_2.requestBuilder)(input, context);
170
168
  const headers = {};
171
169
  b.bp("/v2/insights/calls/{callId}/flows/{flowIndex}/schedule_post_analysis");
172
170
  b.p('callId', () => input.callId, '{callId}', false);
@@ -183,7 +181,7 @@ const se_ScheduleCallPostAnalysisCommand = async (input, context) => {
183
181
  };
184
182
  exports.se_ScheduleCallPostAnalysisCommand = se_ScheduleCallPostAnalysisCommand;
185
183
  const se_ScheduleCallSummaryGenerationCommand = async (input, context) => {
186
- const b = (0, core_1.requestBuilder)(input, context);
184
+ const b = (0, core_2.requestBuilder)(input, context);
187
185
  const headers = {};
188
186
  b.bp("/v2/insights/calls/{callId}/flows/{flowIndex}/schedule_summary_generation");
189
187
  b.p('callId', () => input.callId, '{callId}', false);
@@ -204,7 +202,7 @@ const se_ScheduleCallSummaryGenerationCommand = async (input, context) => {
204
202
  };
205
203
  exports.se_ScheduleCallSummaryGenerationCommand = se_ScheduleCallSummaryGenerationCommand;
206
204
  const se_ScheduleConferencePostAnalysisCommand = async (input, context) => {
207
- const b = (0, core_1.requestBuilder)(input, context);
205
+ const b = (0, core_2.requestBuilder)(input, context);
208
206
  const headers = {};
209
207
  b.bp("/v2/insights/conferences/{conferenceId}/schedule_post_analysis");
210
208
  b.p('conferenceId', () => input.conferenceId, '{conferenceId}', false);
@@ -220,7 +218,7 @@ const se_ScheduleConferencePostAnalysisCommand = async (input, context) => {
220
218
  };
221
219
  exports.se_ScheduleConferencePostAnalysisCommand = se_ScheduleConferencePostAnalysisCommand;
222
220
  const se_ScheduleConferenceSummaryGenerationCommand = async (input, context) => {
223
- const b = (0, core_1.requestBuilder)(input, context);
221
+ const b = (0, core_2.requestBuilder)(input, context);
224
222
  const headers = {};
225
223
  b.bp("/v2/insights/conferences/{conferenceId}/schedule_summary_generation");
226
224
  b.p('conferenceId', () => input.conferenceId, '{conferenceId}', false);
@@ -240,7 +238,7 @@ const se_ScheduleConferenceSummaryGenerationCommand = async (input, context) =>
240
238
  };
241
239
  exports.se_ScheduleConferenceSummaryGenerationCommand = se_ScheduleConferenceSummaryGenerationCommand;
242
240
  const se_UpdateFilterCommand = async (input, context) => {
243
- const b = (0, core_1.requestBuilder)(input, context);
241
+ const b = (0, core_2.requestBuilder)(input, context);
244
242
  const headers = {
245
243
  'content-type': 'application/json',
246
244
  };
@@ -264,7 +262,7 @@ const de_CreateFilterCommand = async (output, context) => {
264
262
  const contents = (0, smithy_client_1.map)({
265
263
  $metadata: deserializeMetadata(output),
266
264
  });
267
- const data = (0, smithy_client_1.expectNonNull)(((0, smithy_client_1.expectObject)(await parseBody(output.body, context))), "body");
265
+ const data = (0, smithy_client_1.expectNonNull)(((0, smithy_client_1.expectObject)(await (0, core_1.parseJsonBody)(output.body, context))), "body");
268
266
  const doc = (0, smithy_client_1.take)(data, {
269
267
  'item': smithy_client_1._json,
270
268
  });
@@ -290,7 +288,7 @@ const de_GetCallCharacteristicsCommand = async (output, context) => {
290
288
  const contents = (0, smithy_client_1.map)({
291
289
  $metadata: deserializeMetadata(output),
292
290
  });
293
- const data = (0, smithy_client_1.expectNonNull)(((0, smithy_client_1.expectObject)(await parseBody(output.body, context))), "body");
291
+ const data = (0, smithy_client_1.expectNonNull)(((0, smithy_client_1.expectObject)(await (0, core_1.parseJsonBody)(output.body, context))), "body");
294
292
  const doc = (0, smithy_client_1.take)(data, {
295
293
  'characteristics': _ => de_InsightsCharacteristics(_, context),
296
294
  'status': smithy_client_1.expectString,
@@ -306,7 +304,7 @@ const de_GetCallSummaryCommand = async (output, context) => {
306
304
  const contents = (0, smithy_client_1.map)({
307
305
  $metadata: deserializeMetadata(output),
308
306
  });
309
- const data = (0, smithy_client_1.expectNonNull)(((0, smithy_client_1.expectObject)(await parseBody(output.body, context))), "body");
307
+ const data = (0, smithy_client_1.expectNonNull)(((0, smithy_client_1.expectObject)(await (0, core_1.parseJsonBody)(output.body, context))), "body");
310
308
  const doc = (0, smithy_client_1.take)(data, {
311
309
  'choices': smithy_client_1._json,
312
310
  'status': smithy_client_1.expectString,
@@ -323,7 +321,7 @@ const de_GetConferenceRecordingPresignedDownloadUrlCommand = async (output, cont
323
321
  const contents = (0, smithy_client_1.map)({
324
322
  $metadata: deserializeMetadata(output),
325
323
  });
326
- const data = (0, smithy_client_1.expectNonNull)(((0, smithy_client_1.expectObject)(await parseBody(output.body, context))), "body");
324
+ const data = (0, smithy_client_1.expectNonNull)(((0, smithy_client_1.expectObject)(await (0, core_1.parseJsonBody)(output.body, context))), "body");
327
325
  const doc = (0, smithy_client_1.take)(data, {
328
326
  'presignedDownloadUrl': smithy_client_1.expectString,
329
327
  });
@@ -338,7 +336,7 @@ const de_GetConferenceSummaryCommand = async (output, context) => {
338
336
  const contents = (0, smithy_client_1.map)({
339
337
  $metadata: deserializeMetadata(output),
340
338
  });
341
- const data = (0, smithy_client_1.expectNonNull)(((0, smithy_client_1.expectObject)(await parseBody(output.body, context))), "body");
339
+ const data = (0, smithy_client_1.expectNonNull)(((0, smithy_client_1.expectObject)(await (0, core_1.parseJsonBody)(output.body, context))), "body");
342
340
  const doc = (0, smithy_client_1.take)(data, {
343
341
  'choices': smithy_client_1._json,
344
342
  'status': smithy_client_1.expectString,
@@ -355,7 +353,7 @@ const de_GetConferenceTimeFramesCommand = async (output, context) => {
355
353
  const contents = (0, smithy_client_1.map)({
356
354
  $metadata: deserializeMetadata(output),
357
355
  });
358
- const data = (0, smithy_client_1.expectNonNull)(((0, smithy_client_1.expectObject)(await parseBody(output.body, context))), "body");
356
+ const data = (0, smithy_client_1.expectNonNull)(((0, smithy_client_1.expectObject)(await (0, core_1.parseJsonBody)(output.body, context))), "body");
359
357
  const doc = (0, smithy_client_1.take)(data, {
360
358
  'timeFrames': smithy_client_1._json,
361
359
  });
@@ -370,7 +368,7 @@ const de_ListConversationsCommand = async (output, context) => {
370
368
  const contents = (0, smithy_client_1.map)({
371
369
  $metadata: deserializeMetadata(output),
372
370
  });
373
- const data = (0, smithy_client_1.expectNonNull)(((0, smithy_client_1.expectObject)(await parseBody(output.body, context))), "body");
371
+ const data = (0, smithy_client_1.expectNonNull)(((0, smithy_client_1.expectObject)(await (0, core_1.parseJsonBody)(output.body, context))), "body");
374
372
  const doc = (0, smithy_client_1.take)(data, {
375
373
  'items': smithy_client_1._json,
376
374
  'lastEvaluatedKey': smithy_client_1.expectString,
@@ -387,7 +385,7 @@ const de_ListFiltersCommand = async (output, context) => {
387
385
  const contents = (0, smithy_client_1.map)({
388
386
  $metadata: deserializeMetadata(output),
389
387
  });
390
- const data = (0, smithy_client_1.expectNonNull)(((0, smithy_client_1.expectObject)(await parseBody(output.body, context))), "body");
388
+ const data = (0, smithy_client_1.expectNonNull)(((0, smithy_client_1.expectObject)(await (0, core_1.parseJsonBody)(output.body, context))), "body");
391
389
  const doc = (0, smithy_client_1.take)(data, {
392
390
  'filters': smithy_client_1._json,
393
391
  });
@@ -446,7 +444,7 @@ const de_UpdateFilterCommand = async (output, context) => {
446
444
  const contents = (0, smithy_client_1.map)({
447
445
  $metadata: deserializeMetadata(output),
448
446
  });
449
- const data = (0, smithy_client_1.expectNonNull)(((0, smithy_client_1.expectObject)(await parseBody(output.body, context))), "body");
447
+ const data = (0, smithy_client_1.expectNonNull)(((0, smithy_client_1.expectObject)(await (0, core_1.parseJsonBody)(output.body, context))), "body");
450
448
  const doc = (0, smithy_client_1.take)(data, {
451
449
  'item': smithy_client_1._json,
452
450
  });
@@ -457,9 +455,9 @@ exports.de_UpdateFilterCommand = de_UpdateFilterCommand;
457
455
  const de_CommandError = async (output, context) => {
458
456
  const parsedOutput = {
459
457
  ...output,
460
- body: await parseErrorBody(output.body, context)
458
+ body: await (0, core_1.parseJsonErrorBody)(output.body, context)
461
459
  };
462
- const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
460
+ const errorCode = (0, core_1.loadRestJsonErrorCode)(output, parsedOutput.body);
463
461
  switch (errorCode) {
464
462
  case "ForbiddenException":
465
463
  case "smithy.framework#ForbiddenException":
@@ -629,12 +627,6 @@ const deserializeMetadata = (output) => ({
629
627
  cfId: output.headers["x-amz-cf-id"],
630
628
  });
631
629
  const collectBodyString = (streamBody, context) => (0, smithy_client_1.collectBody)(streamBody, context).then(body => context.utf8Encoder(body));
632
- const isSerializableHeaderValue = (value) => value !== undefined &&
633
- value !== null &&
634
- value !== "" &&
635
- (!Object.getOwnPropertyNames(value).includes("length") ||
636
- value.length != 0) &&
637
- (!Object.getOwnPropertyNames(value).includes("size") || value.size != 0);
638
630
  const _c = "company";
639
631
  const _ca = "category";
640
632
  const _d = "download";
@@ -643,43 +635,3 @@ const _i = "instance";
643
635
  const _l = "locale";
644
636
  const _q = "quality";
645
637
  const _t = "template";
646
- const parseBody = (streamBody, context) => collectBodyString(streamBody, context).then(encoded => {
647
- if (encoded.length) {
648
- return JSON.parse(encoded);
649
- }
650
- return {};
651
- });
652
- const parseErrorBody = async (errorBody, context) => {
653
- const value = await parseBody(errorBody, context);
654
- value.message = value.message ?? value.Message;
655
- return value;
656
- };
657
- const loadRestJsonErrorCode = (output, data) => {
658
- const findKey = (object, key) => Object.keys(object).find((k) => k.toLowerCase() === key.toLowerCase());
659
- const sanitizeErrorCode = (rawValue) => {
660
- let cleanValue = rawValue;
661
- if (typeof cleanValue === "number") {
662
- cleanValue = cleanValue.toString();
663
- }
664
- if (cleanValue.indexOf(",") >= 0) {
665
- cleanValue = cleanValue.split(",")[0];
666
- }
667
- if (cleanValue.indexOf(":") >= 0) {
668
- cleanValue = cleanValue.split(":")[0];
669
- }
670
- if (cleanValue.indexOf("#") >= 0) {
671
- cleanValue = cleanValue.split("#")[1];
672
- }
673
- return cleanValue;
674
- };
675
- const headerKey = findKey(output.headers, "x-amzn-errortype");
676
- if (headerKey !== undefined) {
677
- return sanitizeErrorCode(output.headers[headerKey]);
678
- }
679
- if (data.code !== undefined) {
680
- return sanitizeErrorCode(data.code);
681
- }
682
- if (data["__type"] !== undefined) {
683
- return sanitizeErrorCode(data["__type"]);
684
- }
685
- };
@@ -21,7 +21,7 @@ const getRuntimeConfig = (config) => {
21
21
  runtime: "browser",
22
22
  defaultsMode,
23
23
  bodyLengthChecker: config?.bodyLengthChecker ?? util_body_length_browser_1.calculateBodyLength,
24
- defaultUserAgentProvider: config?.defaultUserAgentProvider ?? (0, util_user_agent_browser_1.defaultUserAgent)({ serviceId: package_json_1.default.name, clientVersion: package_json_1.default.version }),
24
+ defaultUserAgentProvider: config?.defaultUserAgentProvider ?? (0, util_user_agent_browser_1.createDefaultUserAgentProvider)({ serviceId: package_json_1.default.name, clientVersion: package_json_1.default.version }),
25
25
  maxAttempts: config?.maxAttempts ?? util_retry_1.DEFAULT_MAX_ATTEMPTS,
26
26
  requestHandler: fetch_http_handler_1.FetchHttpHandler.create(config?.requestHandler ?? defaultConfigProvider),
27
27
  retryMode: config?.retryMode ?? (async () => (await defaultConfigProvider()).retryMode || util_retry_1.DEFAULT_RETRY_MODE),
@@ -25,12 +25,13 @@ const getRuntimeConfig = (config) => {
25
25
  runtime: "node",
26
26
  defaultsMode,
27
27
  bodyLengthChecker: config?.bodyLengthChecker ?? util_body_length_node_1.calculateBodyLength,
28
- defaultUserAgentProvider: config?.defaultUserAgentProvider ?? (0, util_user_agent_node_1.defaultUserAgent)({ serviceId: package_json_1.default.name, clientVersion: package_json_1.default.version }),
29
- maxAttempts: config?.maxAttempts ?? (0, node_config_provider_1.loadConfig)(middleware_retry_1.NODE_MAX_ATTEMPT_CONFIG_OPTIONS),
28
+ defaultUserAgentProvider: config?.defaultUserAgentProvider ?? (0, util_user_agent_node_1.createDefaultUserAgentProvider)({ serviceId: package_json_1.default.name, clientVersion: package_json_1.default.version }),
29
+ maxAttempts: config?.maxAttempts ?? (0, node_config_provider_1.loadConfig)(middleware_retry_1.NODE_MAX_ATTEMPT_CONFIG_OPTIONS, config),
30
30
  requestHandler: node_http_handler_1.NodeHttpHandler.create(config?.requestHandler ?? defaultConfigProvider),
31
- retryMode: config?.retryMode ?? (0, node_config_provider_1.loadConfig)({ ...middleware_retry_1.NODE_RETRY_MODE_CONFIG_OPTIONS, default: async () => (await defaultConfigProvider()).retryMode || util_retry_1.DEFAULT_RETRY_MODE, }),
31
+ retryMode: config?.retryMode ?? (0, node_config_provider_1.loadConfig)({ ...middleware_retry_1.NODE_RETRY_MODE_CONFIG_OPTIONS, default: async () => (await defaultConfigProvider()).retryMode || util_retry_1.DEFAULT_RETRY_MODE, }, config),
32
32
  sha256: config?.sha256 ?? hash_node_1.Hash.bind(null, "sha256"),
33
33
  streamCollector: config?.streamCollector ?? node_http_handler_1.streamCollector,
34
+ userAgentAppId: config?.userAgentAppId ?? (0, node_config_provider_1.loadConfig)(util_user_agent_node_1.NODE_APP_ID_CONFIG_OPTIONS, { profile: 'wildix' }),
34
35
  };
35
36
  };
36
37
  exports.getRuntimeConfig = getRuntimeConfig;
@@ -3,17 +3,9 @@ Object.defineProperty(exports, "__esModule", { value: true });
3
3
  exports.resolveRuntimeExtensions = void 0;
4
4
  const protocol_http_1 = require("@smithy/protocol-http");
5
5
  const smithy_client_1 = require("@smithy/smithy-client");
6
- const asPartial = (t) => t;
7
6
  const resolveRuntimeExtensions = (runtimeConfig, extensions) => {
8
- const extensionConfiguration = {
9
- ...asPartial((0, smithy_client_1.getDefaultExtensionConfiguration)(runtimeConfig)),
10
- ...asPartial((0, protocol_http_1.getHttpHandlerExtensionConfiguration)(runtimeConfig)),
11
- };
7
+ const extensionConfiguration = Object.assign((0, smithy_client_1.getDefaultExtensionConfiguration)(runtimeConfig), (0, protocol_http_1.getHttpHandlerExtensionConfiguration)(runtimeConfig));
12
8
  extensions.forEach(extension => extension.configure(extensionConfiguration));
13
- return {
14
- ...runtimeConfig,
15
- ...(0, smithy_client_1.resolveDefaultRuntimeConfig)(extensionConfiguration),
16
- ...(0, protocol_http_1.resolveHttpHandlerRuntimeConfig)(extensionConfiguration),
17
- };
9
+ return Object.assign(runtimeConfig, (0, smithy_client_1.resolveDefaultRuntimeConfig)(extensionConfiguration), (0, protocol_http_1.resolveHttpHandlerRuntimeConfig)(extensionConfiguration));
18
10
  };
19
11
  exports.resolveRuntimeExtensions = resolveRuntimeExtensions;
@@ -7,8 +7,11 @@ import { Client as __Client, } from "@smithy/smithy-client";
7
7
  import { authorizationMiddleware } from '@wildix/smithy-utils';
8
8
  export { __Client };
9
9
  export class WdaInsightsClient extends __Client {
10
+ config;
10
11
  constructor(...[configuration]) {
11
12
  let _config_0 = __getRuntimeConfig(configuration || {});
13
+ super(_config_0);
14
+ this.initConfig = _config_0;
12
15
  let _config_1 = resolveUserAgentConfig(_config_0);
13
16
  let _config_2 = resolveRetryConfig(_config_1);
14
17
  let _config_3 = resolveRuntimeExtensions(_config_2, configuration?.extensions || []);
@@ -21,11 +24,7 @@ export class WdaInsightsClient extends __Client {
21
24
  path: ''
22
25
  };
23
26
  };
24
- const config = {
25
- ..._config_3,
26
- endpoint,
27
- };
28
- super(config);
27
+ const config = { ..._config_3, endpoint };
29
28
  this.config = config;
30
29
  this.middlewareStack.add(authorizationMiddleware.bind(this, configuration.token), { step: "build" });
31
30
  this.middlewareStack.use(getUserAgentPlugin(this.config));
@@ -1,13 +1,13 @@
1
1
  import { WdaInsightsServiceException as __BaseException } from "./WdaInsightsServiceException";
2
2
  export class ValidationException extends __BaseException {
3
+ name = "ValidationException";
4
+ $fault = "client";
3
5
  constructor(opts) {
4
6
  super({
5
7
  name: "ValidationException",
6
8
  $fault: "client",
7
9
  ...opts
8
10
  });
9
- this.name = "ValidationException";
10
- this.$fault = "client";
11
11
  Object.setPrototypeOf(this, ValidationException.prototype);
12
12
  }
13
13
  }
@@ -22,26 +22,26 @@ export const ConversationStatus = {
22
22
  MISSED: "MISSED",
23
23
  };
24
24
  export class ForbiddenException extends __BaseException {
25
+ name = "ForbiddenException";
26
+ $fault = "client";
25
27
  constructor(opts) {
26
28
  super({
27
29
  name: "ForbiddenException",
28
30
  $fault: "client",
29
31
  ...opts
30
32
  });
31
- this.name = "ForbiddenException";
32
- this.$fault = "client";
33
33
  Object.setPrototypeOf(this, ForbiddenException.prototype);
34
34
  }
35
35
  }
36
36
  export class CallNotFoundException extends __BaseException {
37
+ name = "CallNotFoundException";
38
+ $fault = "client";
37
39
  constructor(opts) {
38
40
  super({
39
41
  name: "CallNotFoundException",
40
42
  $fault: "client",
41
43
  ...opts
42
44
  });
43
- this.name = "CallNotFoundException";
44
- this.$fault = "client";
45
45
  Object.setPrototypeOf(this, CallNotFoundException.prototype);
46
46
  }
47
47
  }
@@ -94,6 +94,7 @@ export const CallDevice = {
94
94
  XBEES_WEB: "XBEES_WEB",
95
95
  };
96
96
  export const License = {
97
+ UC: "uc",
97
98
  XBEES: "x-bees",
98
99
  };
99
100
  export const CallFlowTranscriptionStatus = {
@@ -107,14 +108,14 @@ export const RecordType = {
107
108
  CONFERENCE_TRANSCRIPTION: "conference_transcription",
108
109
  };
109
110
  export class ConferenceNotFoundException extends __BaseException {
111
+ name = "ConferenceNotFoundException";
112
+ $fault = "client";
110
113
  constructor(opts) {
111
114
  super({
112
115
  name: "ConferenceNotFoundException",
113
116
  $fault: "client",
114
117
  ...opts
115
118
  });
116
- this.name = "ConferenceNotFoundException";
117
- this.$fault = "client";
118
119
  Object.setPrototypeOf(this, ConferenceNotFoundException.prototype);
119
120
  }
120
121
  }
@@ -146,14 +147,14 @@ export const ConferenceTranscriptionStatus = {
146
147
  UNAVAILABLE: "UNAVAILABLE",
147
148
  };
148
149
  export class FilterNotFoundException extends __BaseException {
150
+ name = "FilterNotFoundException";
151
+ $fault = "client";
149
152
  constructor(opts) {
150
153
  super({
151
154
  name: "FilterNotFoundException",
152
155
  $fault: "client",
153
156
  ...opts
154
157
  });
155
- this.name = "FilterNotFoundException";
156
- this.$fault = "client";
157
158
  Object.setPrototypeOf(this, FilterNotFoundException.prototype);
158
159
  }
159
160
  }
@@ -180,14 +181,14 @@ export var DownloadStrategy;
180
181
  DownloadStrategy[DownloadStrategy["DOWNLOAD"] = 1] = "DOWNLOAD";
181
182
  })(DownloadStrategy || (DownloadStrategy = {}));
182
183
  export class FileNotFoundException extends __BaseException {
184
+ name = "FileNotFoundException";
185
+ $fault = "client";
183
186
  constructor(opts) {
184
187
  super({
185
188
  name: "FileNotFoundException",
186
189
  $fault: "client",
187
190
  ...opts
188
191
  });
189
- this.name = "FileNotFoundException";
190
- this.$fault = "client";
191
192
  Object.setPrototypeOf(this, FileNotFoundException.prototype);
192
193
  }
193
194
  }