@wildix/wda-history-client 1.0.29 → 1.0.30

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.
@@ -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 WdaHistoryClient 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 WdaHistoryClient 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.ConversationUserDirection = exports.ConversationFlag = exports.ConversationDirection = exports.Conversation = exports.ConferenceTranscriptionNotFoundException = exports.ConferenceTranscriptionStatus = exports.ConferenceParticipantType = exports.ConferenceParticipantRole = exports.PbxLicenseType = exports.ConferenceDirection = exports.ConferenceNotFoundException = exports.CallTranscriptionSpeaker = exports.CallTranscriptionNotFoundException = 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 WdaHistoryServiceException_1 = require("./WdaHistoryServiceException");
5
5
  class ValidationException extends WdaHistoryServiceException_1.WdaHistoryServiceException {
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 WdaHistoryServiceException_1.WdaHistoryServiceException {
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 WdaHistoryServiceException_1.WdaHistoryServiceException {
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 CallTranscriptionNotFoundException extends WdaHistoryServiceException_1.WdaHistoryServiceException {
117
+ name = "CallTranscriptionNotFoundException";
118
+ $fault = "client";
116
119
  constructor(opts) {
117
120
  super({
118
121
  name: "CallTranscriptionNotFoundException",
119
122
  $fault: "client",
120
123
  ...opts
121
124
  });
122
- this.name = "CallTranscriptionNotFoundException";
123
- this.$fault = "client";
124
125
  Object.setPrototypeOf(this, CallTranscriptionNotFoundException.prototype);
125
126
  }
126
127
  }
@@ -130,14 +131,14 @@ exports.CallTranscriptionSpeaker = {
130
131
  CALLER: "caller",
131
132
  };
132
133
  class ConferenceNotFoundException extends WdaHistoryServiceException_1.WdaHistoryServiceException {
134
+ name = "ConferenceNotFoundException";
135
+ $fault = "client";
133
136
  constructor(opts) {
134
137
  super({
135
138
  name: "ConferenceNotFoundException",
136
139
  $fault: "client",
137
140
  ...opts
138
141
  });
139
- this.name = "ConferenceNotFoundException";
140
- this.$fault = "client";
141
142
  Object.setPrototypeOf(this, ConferenceNotFoundException.prototype);
142
143
  }
143
144
  }
@@ -170,14 +171,14 @@ exports.ConferenceTranscriptionStatus = {
170
171
  UNAVAILABLE: "UNAVAILABLE",
171
172
  };
172
173
  class ConferenceTranscriptionNotFoundException extends WdaHistoryServiceException_1.WdaHistoryServiceException {
174
+ name = "ConferenceTranscriptionNotFoundException";
175
+ $fault = "client";
173
176
  constructor(opts) {
174
177
  super({
175
178
  name: "ConferenceTranscriptionNotFoundException",
176
179
  $fault: "client",
177
180
  ...opts
178
181
  });
179
- this.name = "ConferenceTranscriptionNotFoundException";
180
- this.$fault = "client";
181
182
  Object.setPrototypeOf(this, ConferenceTranscriptionNotFoundException.prototype);
182
183
  }
183
184
  }
@@ -191,7 +192,7 @@ var Conversation;
191
192
  return visitor.conference(value.conference);
192
193
  return visitor._(value.$unknown[0], value.$unknown[1]);
193
194
  };
194
- })(Conversation = exports.Conversation || (exports.Conversation = {}));
195
+ })(Conversation || (exports.Conversation = Conversation = {}));
195
196
  exports.ConversationDirection = {
196
197
  INBOUND: "INBOUND",
197
198
  INTERNAL: "INTERNAL",
@@ -3,10 +3,11 @@ Object.defineProperty(exports, "__esModule", { value: true });
3
3
  exports.de_QueryUserCallsCommand = exports.de_QueryConversationsCommand = exports.de_GetConferenceTranscriptionTextCommand = exports.de_GetConferenceTranscriptionCommand = exports.de_GetConferenceCommand = exports.de_GetCallTranscriptionTextCommand = exports.de_GetCallTranscriptionCommand = exports.de_GetCallCommand = exports.se_QueryUserCallsCommand = exports.se_QueryConversationsCommand = exports.se_GetConferenceTranscriptionTextCommand = exports.se_GetConferenceTranscriptionCommand = exports.se_GetConferenceCommand = exports.se_GetCallTranscriptionTextCommand = exports.se_GetCallTranscriptionCommand = exports.se_GetCallCommand = void 0;
4
4
  const WdaHistoryServiceException_1 = require("../models/WdaHistoryServiceException");
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_GetCallCommand = 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
  b.bp("/v2/history/calls/{callId}/flows/{flowIndex}");
12
13
  b.p('callId', () => input.callId, '{callId}', false);
@@ -23,7 +24,7 @@ const se_GetCallCommand = async (input, context) => {
23
24
  };
24
25
  exports.se_GetCallCommand = se_GetCallCommand;
25
26
  const se_GetCallTranscriptionCommand = 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/history/calls/{callId}/flows/{flowIndex}/transcription");
29
30
  b.p('callId', () => input.callId, '{callId}', false);
@@ -40,7 +41,7 @@ const se_GetCallTranscriptionCommand = async (input, context) => {
40
41
  };
41
42
  exports.se_GetCallTranscriptionCommand = se_GetCallTranscriptionCommand;
42
43
  const se_GetCallTranscriptionTextCommand = async (input, context) => {
43
- const b = (0, core_1.requestBuilder)(input, context);
44
+ const b = (0, core_2.requestBuilder)(input, context);
44
45
  const headers = {};
45
46
  b.bp("/v2/history/calls/{callId}/flows/{flowIndex}/transcription/text");
46
47
  b.p('callId', () => input.callId, '{callId}', false);
@@ -57,7 +58,7 @@ const se_GetCallTranscriptionTextCommand = async (input, context) => {
57
58
  };
58
59
  exports.se_GetCallTranscriptionTextCommand = se_GetCallTranscriptionTextCommand;
59
60
  const se_GetConferenceCommand = async (input, context) => {
60
- const b = (0, core_1.requestBuilder)(input, context);
61
+ const b = (0, core_2.requestBuilder)(input, context);
61
62
  const headers = {};
62
63
  b.bp("/v2/history/conferences/{conferenceId}");
63
64
  b.p('conferenceId', () => input.conferenceId, '{conferenceId}', false);
@@ -73,7 +74,7 @@ const se_GetConferenceCommand = async (input, context) => {
73
74
  };
74
75
  exports.se_GetConferenceCommand = se_GetConferenceCommand;
75
76
  const se_GetConferenceTranscriptionCommand = 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/history/conferences/{conferenceId}/transcription");
79
80
  b.p('conferenceId', () => input.conferenceId, '{conferenceId}', false);
@@ -89,7 +90,7 @@ const se_GetConferenceTranscriptionCommand = async (input, context) => {
89
90
  };
90
91
  exports.se_GetConferenceTranscriptionCommand = se_GetConferenceTranscriptionCommand;
91
92
  const se_GetConferenceTranscriptionTextCommand = async (input, context) => {
92
- const b = (0, core_1.requestBuilder)(input, context);
93
+ const b = (0, core_2.requestBuilder)(input, context);
93
94
  const headers = {};
94
95
  b.bp("/v2/history/conferences/{conferenceId}/transcription/text");
95
96
  b.p('conferenceId', () => input.conferenceId, '{conferenceId}', false);
@@ -105,7 +106,7 @@ const se_GetConferenceTranscriptionTextCommand = async (input, context) => {
105
106
  };
106
107
  exports.se_GetConferenceTranscriptionTextCommand = se_GetConferenceTranscriptionTextCommand;
107
108
  const se_QueryConversationsCommand = async (input, context) => {
108
- const b = (0, core_1.requestBuilder)(input, context);
109
+ const b = (0, core_2.requestBuilder)(input, context);
109
110
  const headers = {
110
111
  'content-type': 'application/json',
111
112
  };
@@ -128,7 +129,7 @@ const se_QueryConversationsCommand = async (input, context) => {
128
129
  };
129
130
  exports.se_QueryConversationsCommand = se_QueryConversationsCommand;
130
131
  const se_QueryUserCallsCommand = async (input, context) => {
131
- const b = (0, core_1.requestBuilder)(input, context);
132
+ const b = (0, core_2.requestBuilder)(input, context);
132
133
  const headers = {
133
134
  'content-type': 'application/json',
134
135
  };
@@ -157,7 +158,7 @@ const de_GetCallCommand = async (output, context) => {
157
158
  const contents = (0, smithy_client_1.map)({
158
159
  $metadata: deserializeMetadata(output),
159
160
  });
160
- const data = (0, smithy_client_1.expectNonNull)(((0, smithy_client_1.expectObject)(await parseBody(output.body, context))), "body");
161
+ const data = (0, smithy_client_1.expectNonNull)(((0, smithy_client_1.expectObject)(await (0, core_1.parseJsonBody)(output.body, context))), "body");
161
162
  const doc = (0, smithy_client_1.take)(data, {
162
163
  'call': smithy_client_1._json,
163
164
  });
@@ -172,7 +173,7 @@ const de_GetCallTranscriptionCommand = async (output, context) => {
172
173
  const contents = (0, smithy_client_1.map)({
173
174
  $metadata: deserializeMetadata(output),
174
175
  });
175
- const data = (0, smithy_client_1.expectNonNull)(((0, smithy_client_1.expectObject)(await parseBody(output.body, context))), "body");
176
+ const data = (0, smithy_client_1.expectNonNull)(((0, smithy_client_1.expectObject)(await (0, core_1.parseJsonBody)(output.body, context))), "body");
176
177
  const doc = (0, smithy_client_1.take)(data, {
177
178
  'transcription': smithy_client_1._json,
178
179
  });
@@ -187,7 +188,7 @@ const de_GetCallTranscriptionTextCommand = async (output, context) => {
187
188
  const contents = (0, smithy_client_1.map)({
188
189
  $metadata: deserializeMetadata(output),
189
190
  });
190
- const data = (0, smithy_client_1.expectNonNull)(((0, smithy_client_1.expectObject)(await parseBody(output.body, context))), "body");
191
+ const data = (0, smithy_client_1.expectNonNull)(((0, smithy_client_1.expectObject)(await (0, core_1.parseJsonBody)(output.body, context))), "body");
191
192
  const doc = (0, smithy_client_1.take)(data, {
192
193
  'chunks': smithy_client_1._json,
193
194
  'filename': smithy_client_1.expectString,
@@ -204,7 +205,7 @@ const de_GetConferenceCommand = async (output, context) => {
204
205
  const contents = (0, smithy_client_1.map)({
205
206
  $metadata: deserializeMetadata(output),
206
207
  });
207
- const data = (0, smithy_client_1.expectNonNull)(((0, smithy_client_1.expectObject)(await parseBody(output.body, context))), "body");
208
+ const data = (0, smithy_client_1.expectNonNull)(((0, smithy_client_1.expectObject)(await (0, core_1.parseJsonBody)(output.body, context))), "body");
208
209
  const doc = (0, smithy_client_1.take)(data, {
209
210
  'conference': smithy_client_1._json,
210
211
  });
@@ -219,7 +220,7 @@ const de_GetConferenceTranscriptionCommand = async (output, context) => {
219
220
  const contents = (0, smithy_client_1.map)({
220
221
  $metadata: deserializeMetadata(output),
221
222
  });
222
- const data = (0, smithy_client_1.expectNonNull)(((0, smithy_client_1.expectObject)(await parseBody(output.body, context))), "body");
223
+ const data = (0, smithy_client_1.expectNonNull)(((0, smithy_client_1.expectObject)(await (0, core_1.parseJsonBody)(output.body, context))), "body");
223
224
  const doc = (0, smithy_client_1.take)(data, {
224
225
  'transcription': smithy_client_1._json,
225
226
  });
@@ -234,7 +235,7 @@ const de_GetConferenceTranscriptionTextCommand = async (output, context) => {
234
235
  const contents = (0, smithy_client_1.map)({
235
236
  $metadata: deserializeMetadata(output),
236
237
  });
237
- const data = (0, smithy_client_1.expectNonNull)(((0, smithy_client_1.expectObject)(await parseBody(output.body, context))), "body");
238
+ const data = (0, smithy_client_1.expectNonNull)(((0, smithy_client_1.expectObject)(await (0, core_1.parseJsonBody)(output.body, context))), "body");
238
239
  const doc = (0, smithy_client_1.take)(data, {
239
240
  'chunks': smithy_client_1._json,
240
241
  'filename': smithy_client_1.expectString,
@@ -251,7 +252,7 @@ const de_QueryConversationsCommand = async (output, context) => {
251
252
  const contents = (0, smithy_client_1.map)({
252
253
  $metadata: deserializeMetadata(output),
253
254
  });
254
- const data = (0, smithy_client_1.expectNonNull)(((0, smithy_client_1.expectObject)(await parseBody(output.body, context))), "body");
255
+ const data = (0, smithy_client_1.expectNonNull)(((0, smithy_client_1.expectObject)(await (0, core_1.parseJsonBody)(output.body, context))), "body");
255
256
  const doc = (0, smithy_client_1.take)(data, {
256
257
  'conversations': smithy_client_1._json,
257
258
  });
@@ -266,7 +267,7 @@ const de_QueryUserCallsCommand = async (output, context) => {
266
267
  const contents = (0, smithy_client_1.map)({
267
268
  $metadata: deserializeMetadata(output),
268
269
  });
269
- const data = (0, smithy_client_1.expectNonNull)(((0, smithy_client_1.expectObject)(await parseBody(output.body, context))), "body");
270
+ const data = (0, smithy_client_1.expectNonNull)(((0, smithy_client_1.expectObject)(await (0, core_1.parseJsonBody)(output.body, context))), "body");
270
271
  const doc = (0, smithy_client_1.take)(data, {
271
272
  'calls': smithy_client_1._json,
272
273
  });
@@ -277,9 +278,9 @@ exports.de_QueryUserCallsCommand = de_QueryUserCallsCommand;
277
278
  const de_CommandError = async (output, context) => {
278
279
  const parsedOutput = {
279
280
  ...output,
280
- body: await parseErrorBody(output.body, context)
281
+ body: await (0, core_1.parseJsonErrorBody)(output.body, context)
281
282
  };
282
- const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
283
+ const errorCode = (0, core_1.loadRestJsonErrorCode)(output, parsedOutput.body);
283
284
  switch (errorCode) {
284
285
  case "CallNotFoundException":
285
286
  case "wildix.wda.history#CallNotFoundException":
@@ -394,51 +395,5 @@ const deserializeMetadata = (output) => ({
394
395
  cfId: output.headers["x-amz-cf-id"],
395
396
  });
396
397
  const collectBodyString = (streamBody, context) => (0, smithy_client_1.collectBody)(streamBody, context).then(body => context.utf8Encoder(body));
397
- const isSerializableHeaderValue = (value) => value !== undefined &&
398
- value !== null &&
399
- value !== "" &&
400
- (!Object.getOwnPropertyNames(value).includes("length") ||
401
- value.length != 0) &&
402
- (!Object.getOwnPropertyNames(value).includes("size") || value.size != 0);
403
398
  const _c = "company";
404
399
  const _u = "user";
405
- const parseBody = (streamBody, context) => collectBodyString(streamBody, context).then(encoded => {
406
- if (encoded.length) {
407
- return JSON.parse(encoded);
408
- }
409
- return {};
410
- });
411
- const parseErrorBody = async (errorBody, context) => {
412
- const value = await parseBody(errorBody, context);
413
- value.message = value.message ?? value.Message;
414
- return value;
415
- };
416
- const loadRestJsonErrorCode = (output, data) => {
417
- const findKey = (object, key) => Object.keys(object).find((k) => k.toLowerCase() === key.toLowerCase());
418
- const sanitizeErrorCode = (rawValue) => {
419
- let cleanValue = rawValue;
420
- if (typeof cleanValue === "number") {
421
- cleanValue = cleanValue.toString();
422
- }
423
- if (cleanValue.indexOf(",") >= 0) {
424
- cleanValue = cleanValue.split(",")[0];
425
- }
426
- if (cleanValue.indexOf(":") >= 0) {
427
- cleanValue = cleanValue.split(":")[0];
428
- }
429
- if (cleanValue.indexOf("#") >= 0) {
430
- cleanValue = cleanValue.split("#")[1];
431
- }
432
- return cleanValue;
433
- };
434
- const headerKey = findKey(output.headers, "x-amzn-errortype");
435
- if (headerKey !== undefined) {
436
- return sanitizeErrorCode(output.headers[headerKey]);
437
- }
438
- if (data.code !== undefined) {
439
- return sanitizeErrorCode(data.code);
440
- }
441
- if (data["__type"] !== undefined) {
442
- return sanitizeErrorCode(data["__type"]);
443
- }
444
- };
@@ -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;
@@ -4,11 +4,14 @@ import { getUserAgentPlugin, resolveUserAgentConfig, } from "@aws-sdk/middleware
4
4
  import { getContentLengthPlugin } from "@smithy/middleware-content-length";
5
5
  import { getRetryPlugin, resolveRetryConfig, } from "@smithy/middleware-retry";
6
6
  import { Client as __Client, } from "@smithy/smithy-client";
7
- import { authorizationMiddleware } from "@wildix/smithy-utils";
7
+ import { authorizationMiddleware } from '@wildix/smithy-utils';
8
8
  export { __Client };
9
9
  export class WdaHistoryClient 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 WdaHistoryClient 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 { WdaHistoryServiceException as __BaseException } from "./WdaHistoryServiceException";
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 CallTranscriptionNotFoundException extends __BaseException {
111
+ name = "CallTranscriptionNotFoundException";
112
+ $fault = "client";
110
113
  constructor(opts) {
111
114
  super({
112
115
  name: "CallTranscriptionNotFoundException",
113
116
  $fault: "client",
114
117
  ...opts
115
118
  });
116
- this.name = "CallTranscriptionNotFoundException";
117
- this.$fault = "client";
118
119
  Object.setPrototypeOf(this, CallTranscriptionNotFoundException.prototype);
119
120
  }
120
121
  }
@@ -123,14 +124,14 @@ export const CallTranscriptionSpeaker = {
123
124
  CALLER: "caller",
124
125
  };
125
126
  export class ConferenceNotFoundException extends __BaseException {
127
+ name = "ConferenceNotFoundException";
128
+ $fault = "client";
126
129
  constructor(opts) {
127
130
  super({
128
131
  name: "ConferenceNotFoundException",
129
132
  $fault: "client",
130
133
  ...opts
131
134
  });
132
- this.name = "ConferenceNotFoundException";
133
- this.$fault = "client";
134
135
  Object.setPrototypeOf(this, ConferenceNotFoundException.prototype);
135
136
  }
136
137
  }
@@ -162,14 +163,14 @@ export const ConferenceTranscriptionStatus = {
162
163
  UNAVAILABLE: "UNAVAILABLE",
163
164
  };
164
165
  export class ConferenceTranscriptionNotFoundException extends __BaseException {
166
+ name = "ConferenceTranscriptionNotFoundException";
167
+ $fault = "client";
165
168
  constructor(opts) {
166
169
  super({
167
170
  name: "ConferenceTranscriptionNotFoundException",
168
171
  $fault: "client",
169
172
  ...opts
170
173
  });
171
- this.name = "ConferenceTranscriptionNotFoundException";
172
- this.$fault = "client";
173
174
  Object.setPrototypeOf(this, ConferenceTranscriptionNotFoundException.prototype);
174
175
  }
175
176
  }
@@ -1,5 +1,6 @@
1
1
  import { WdaHistoryServiceException as __BaseException } from "../models/WdaHistoryServiceException";
2
2
  import { CallNotFoundException, CallTranscriptionNotFoundException, ConferenceNotFoundException, ConferenceTranscriptionNotFoundException, ForbiddenException, ValidationException, } from "../models/models_0";
3
+ import { loadRestJsonErrorCode, parseJsonBody as parseBody, parseJsonErrorBody as parseErrorBody, } from "@aws-sdk/core";
3
4
  import { requestBuilder as rb } from "@smithy/core";
4
5
  import { decorateServiceException as __decorateServiceException, expectNonNull as __expectNonNull, expectObject as __expectObject, expectString as __expectString, _json, collectBody, map, take, withBaseException, } from "@smithy/smithy-client";
5
6
  export const se_GetCallCommand = async (input, context) => {
@@ -375,51 +376,5 @@ const deserializeMetadata = (output) => ({
375
376
  cfId: output.headers["x-amz-cf-id"],
376
377
  });
377
378
  const collectBodyString = (streamBody, context) => collectBody(streamBody, context).then(body => context.utf8Encoder(body));
378
- const isSerializableHeaderValue = (value) => value !== undefined &&
379
- value !== null &&
380
- value !== "" &&
381
- (!Object.getOwnPropertyNames(value).includes("length") ||
382
- value.length != 0) &&
383
- (!Object.getOwnPropertyNames(value).includes("size") || value.size != 0);
384
379
  const _c = "company";
385
380
  const _u = "user";
386
- const parseBody = (streamBody, context) => collectBodyString(streamBody, context).then(encoded => {
387
- if (encoded.length) {
388
- return JSON.parse(encoded);
389
- }
390
- return {};
391
- });
392
- const parseErrorBody = async (errorBody, context) => {
393
- const value = await parseBody(errorBody, context);
394
- value.message = value.message ?? value.Message;
395
- return value;
396
- };
397
- const loadRestJsonErrorCode = (output, data) => {
398
- const findKey = (object, key) => Object.keys(object).find((k) => k.toLowerCase() === key.toLowerCase());
399
- const sanitizeErrorCode = (rawValue) => {
400
- let cleanValue = rawValue;
401
- if (typeof cleanValue === "number") {
402
- cleanValue = cleanValue.toString();
403
- }
404
- if (cleanValue.indexOf(",") >= 0) {
405
- cleanValue = cleanValue.split(",")[0];
406
- }
407
- if (cleanValue.indexOf(":") >= 0) {
408
- cleanValue = cleanValue.split(":")[0];
409
- }
410
- if (cleanValue.indexOf("#") >= 0) {
411
- cleanValue = cleanValue.split("#")[1];
412
- }
413
- return cleanValue;
414
- };
415
- const headerKey = findKey(output.headers, "x-amzn-errortype");
416
- if (headerKey !== undefined) {
417
- return sanitizeErrorCode(output.headers[headerKey]);
418
- }
419
- if (data.code !== undefined) {
420
- return sanitizeErrorCode(data.code);
421
- }
422
- if (data["__type"] !== undefined) {
423
- return sanitizeErrorCode(data["__type"]);
424
- }
425
- };
@@ -1,6 +1,6 @@
1
1
  import packageInfo from "../package.json";
2
2
  import { Sha256 } from "@aws-crypto/sha256-browser";
3
- import { defaultUserAgent } from "@aws-sdk/util-user-agent-browser";
3
+ import { createDefaultUserAgentProvider } from "@aws-sdk/util-user-agent-browser";
4
4
  import { FetchHttpHandler as RequestHandler, streamCollector, } from "@smithy/fetch-http-handler";
5
5
  import { calculateBodyLength } from "@smithy/util-body-length-browser";
6
6
  import { DEFAULT_MAX_ATTEMPTS, DEFAULT_RETRY_MODE, } from "@smithy/util-retry";
@@ -17,7 +17,7 @@ export const getRuntimeConfig = (config) => {
17
17
  runtime: "browser",
18
18
  defaultsMode,
19
19
  bodyLengthChecker: config?.bodyLengthChecker ?? calculateBodyLength,
20
- defaultUserAgentProvider: config?.defaultUserAgentProvider ?? defaultUserAgent({ serviceId: packageInfo.name, clientVersion: packageInfo.version }),
20
+ defaultUserAgentProvider: config?.defaultUserAgentProvider ?? createDefaultUserAgentProvider({ serviceId: packageInfo.name, clientVersion: packageInfo.version }),
21
21
  maxAttempts: config?.maxAttempts ?? DEFAULT_MAX_ATTEMPTS,
22
22
  requestHandler: RequestHandler.create(config?.requestHandler ?? defaultConfigProvider),
23
23
  retryMode: config?.retryMode ?? (async () => (await defaultConfigProvider()).retryMode || DEFAULT_RETRY_MODE),
@@ -1,5 +1,5 @@
1
1
  import packageInfo from "../package.json";
2
- import { defaultUserAgent } from "@aws-sdk/util-user-agent-node";
2
+ import { NODE_APP_ID_CONFIG_OPTIONS, createDefaultUserAgentProvider, } from "@aws-sdk/util-user-agent-node";
3
3
  import { Hash } from "@smithy/hash-node";
4
4
  import { NODE_MAX_ATTEMPT_CONFIG_OPTIONS, NODE_RETRY_MODE_CONFIG_OPTIONS, } from "@smithy/middleware-retry";
5
5
  import { loadConfig as loadNodeConfig } from "@smithy/node-config-provider";
@@ -21,11 +21,12 @@ export const getRuntimeConfig = (config) => {
21
21
  runtime: "node",
22
22
  defaultsMode,
23
23
  bodyLengthChecker: config?.bodyLengthChecker ?? calculateBodyLength,
24
- defaultUserAgentProvider: config?.defaultUserAgentProvider ?? defaultUserAgent({ serviceId: packageInfo.name, clientVersion: packageInfo.version }),
25
- maxAttempts: config?.maxAttempts ?? loadNodeConfig(NODE_MAX_ATTEMPT_CONFIG_OPTIONS),
24
+ defaultUserAgentProvider: config?.defaultUserAgentProvider ?? createDefaultUserAgentProvider({ serviceId: packageInfo.name, clientVersion: packageInfo.version }),
25
+ maxAttempts: config?.maxAttempts ?? loadNodeConfig(NODE_MAX_ATTEMPT_CONFIG_OPTIONS, config),
26
26
  requestHandler: RequestHandler.create(config?.requestHandler ?? defaultConfigProvider),
27
- retryMode: config?.retryMode ?? loadNodeConfig({ ...NODE_RETRY_MODE_CONFIG_OPTIONS, default: async () => (await defaultConfigProvider()).retryMode || DEFAULT_RETRY_MODE, }),
27
+ retryMode: config?.retryMode ?? loadNodeConfig({ ...NODE_RETRY_MODE_CONFIG_OPTIONS, default: async () => (await defaultConfigProvider()).retryMode || DEFAULT_RETRY_MODE, }, config),
28
28
  sha256: config?.sha256 ?? Hash.bind(null, "sha256"),
29
29
  streamCollector: config?.streamCollector ?? streamCollector,
30
+ userAgentAppId: config?.userAgentAppId ?? loadNodeConfig(NODE_APP_ID_CONFIG_OPTIONS, { profile: 'wildix' }),
30
31
  };
31
32
  };