@wildix/wda-history-client 1.0.21 → 1.0.23

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.
@@ -8,6 +8,8 @@ const GetCallTranscriptionTextCommand_1 = require("./commands/GetCallTranscripti
8
8
  const GetConferenceCommand_1 = require("./commands/GetConferenceCommand");
9
9
  const GetConferenceTranscriptionCommand_1 = require("./commands/GetConferenceTranscriptionCommand");
10
10
  const GetConferenceTranscriptionTextCommand_1 = require("./commands/GetConferenceTranscriptionTextCommand");
11
+ const QueryConversationsCommand_1 = require("./commands/QueryConversationsCommand");
12
+ const QueryUserCallsCommand_1 = require("./commands/QueryUserCallsCommand");
11
13
  const smithy_client_1 = require("@smithy/smithy-client");
12
14
  const commands = {
13
15
  GetCallCommand: GetCallCommand_1.GetCallCommand,
@@ -16,6 +18,8 @@ const commands = {
16
18
  GetConferenceCommand: GetConferenceCommand_1.GetConferenceCommand,
17
19
  GetConferenceTranscriptionCommand: GetConferenceTranscriptionCommand_1.GetConferenceTranscriptionCommand,
18
20
  GetConferenceTranscriptionTextCommand: GetConferenceTranscriptionTextCommand_1.GetConferenceTranscriptionTextCommand,
21
+ QueryConversationsCommand: QueryConversationsCommand_1.QueryConversationsCommand,
22
+ QueryUserCallsCommand: QueryUserCallsCommand_1.QueryUserCallsCommand,
19
23
  };
20
24
  class WdaHistory extends WdaHistoryClient_1.WdaHistoryClient {
21
25
  }
@@ -0,0 +1,21 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.QueryConversationsCommand = exports.$Command = void 0;
4
+ const Aws_restJson1_1 = require("../protocols/Aws_restJson1");
5
+ const middleware_serde_1 = require("@smithy/middleware-serde");
6
+ const smithy_client_1 = require("@smithy/smithy-client");
7
+ Object.defineProperty(exports, "$Command", { enumerable: true, get: function () { return smithy_client_1.Command; } });
8
+ class QueryConversationsCommand extends smithy_client_1.Command.classBuilder()
9
+ .m(function (Command, cs, config, o) {
10
+ return [
11
+ (0, middleware_serde_1.getSerdePlugin)(config, this.serialize, this.deserialize),
12
+ ];
13
+ })
14
+ .s("WdaHistory", "QueryConversations", {})
15
+ .n("WdaHistoryClient", "QueryConversationsCommand")
16
+ .f(void 0, void 0)
17
+ .ser(Aws_restJson1_1.se_QueryConversationsCommand)
18
+ .de(Aws_restJson1_1.de_QueryConversationsCommand)
19
+ .build() {
20
+ }
21
+ exports.QueryConversationsCommand = QueryConversationsCommand;
@@ -0,0 +1,21 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.QueryUserCallsCommand = exports.$Command = void 0;
4
+ const Aws_restJson1_1 = require("../protocols/Aws_restJson1");
5
+ const middleware_serde_1 = require("@smithy/middleware-serde");
6
+ const smithy_client_1 = require("@smithy/smithy-client");
7
+ Object.defineProperty(exports, "$Command", { enumerable: true, get: function () { return smithy_client_1.Command; } });
8
+ class QueryUserCallsCommand extends smithy_client_1.Command.classBuilder()
9
+ .m(function (Command, cs, config, o) {
10
+ return [
11
+ (0, middleware_serde_1.getSerdePlugin)(config, this.serialize, this.deserialize),
12
+ ];
13
+ })
14
+ .s("WdaHistory", "QueryUserCalls", {})
15
+ .n("WdaHistoryClient", "QueryUserCallsCommand")
16
+ .f(void 0, void 0)
17
+ .ser(Aws_restJson1_1.se_QueryUserCallsCommand)
18
+ .de(Aws_restJson1_1.de_QueryUserCallsCommand)
19
+ .build() {
20
+ }
21
+ exports.QueryUserCallsCommand = QueryUserCallsCommand;
@@ -7,3 +7,5 @@ tslib_1.__exportStar(require("./GetCallTranscriptionTextCommand"), exports);
7
7
  tslib_1.__exportStar(require("./GetConferenceCommand"), exports);
8
8
  tslib_1.__exportStar(require("./GetConferenceTranscriptionCommand"), exports);
9
9
  tslib_1.__exportStar(require("./GetConferenceTranscriptionTextCommand"), exports);
10
+ tslib_1.__exportStar(require("./QueryConversationsCommand"), exports);
11
+ tslib_1.__exportStar(require("./QueryUserCallsCommand"), exports);
@@ -1,6 +1,6 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.ConferenceTranscriptionNotFoundException = exports.ConferenceTranscriptionStatus = exports.ConferenceParticipantType = exports.ConferenceParticipantRole = exports.PbxLicenseType = exports.ConferenceDirection = exports.ConferenceNotFoundException = exports.CallTranscriptionSpeaker = exports.CallTranscriptionNotFoundException = exports.RecordType = exports.CallFlowTranscriptionStatus = exports.CallRecordPauseReason = exports.CallRecordOwner = exports.License = exports.CallDevice = exports.CallParticipantType = exports.CallParticipantRole = exports.CallFlowAttachmentType = exports.CallNotFoundException = exports.ForbiddenException = exports.ConversationStatus = exports.CallDirection = exports.ValidationException = void 0;
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.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
6
  constructor(opts) {
@@ -51,6 +51,27 @@ class CallNotFoundException extends WdaHistoryServiceException_1.WdaHistoryServi
51
51
  }
52
52
  }
53
53
  exports.CallNotFoundException = CallNotFoundException;
54
+ exports.CallRecordOwner = {
55
+ CALLEE: "CALLEE",
56
+ CALLER: "CALLER",
57
+ SYSTEM: "SYSTEM",
58
+ };
59
+ exports.CallRecordPauseReason = {
60
+ HOLD: "hold",
61
+ PAUSE: "pause",
62
+ };
63
+ var CallFlowAttachment;
64
+ (function (CallFlowAttachment) {
65
+ CallFlowAttachment.visit = (value, visitor) => {
66
+ if (value.recording !== undefined)
67
+ return visitor.recording(value.recording);
68
+ if (value.fax !== undefined)
69
+ return visitor.fax(value.fax);
70
+ if (value.voicemail !== undefined)
71
+ return visitor.voicemail(value.voicemail);
72
+ return visitor._(value.$unknown[0], value.$unknown[1]);
73
+ };
74
+ })(CallFlowAttachment = exports.CallFlowAttachment || (exports.CallFlowAttachment = {}));
54
75
  exports.CallFlowAttachmentType = {
55
76
  FAX: "FAX",
56
77
  VOICEMAIL: "VOICEMAIL",
@@ -77,15 +98,6 @@ exports.CallDevice = {
77
98
  exports.License = {
78
99
  XBEES: "x-bees",
79
100
  };
80
- exports.CallRecordOwner = {
81
- CALLEE: "CALLEE",
82
- CALLER: "CALLER",
83
- SYSTEM: "SYSTEM",
84
- };
85
- exports.CallRecordPauseReason = {
86
- HOLD: "hold",
87
- PAUSE: "pause",
88
- };
89
101
  exports.CallFlowTranscriptionStatus = {
90
102
  AVAILABLE: "AVAILABLE",
91
103
  UNAVAILABLE: "UNAVAILABLE",
@@ -166,3 +178,26 @@ class ConferenceTranscriptionNotFoundException extends WdaHistoryServiceExceptio
166
178
  }
167
179
  }
168
180
  exports.ConferenceTranscriptionNotFoundException = ConferenceTranscriptionNotFoundException;
181
+ var Conversation;
182
+ (function (Conversation) {
183
+ Conversation.visit = (value, visitor) => {
184
+ if (value.call !== undefined)
185
+ return visitor.call(value.call);
186
+ if (value.conference !== undefined)
187
+ return visitor.conference(value.conference);
188
+ return visitor._(value.$unknown[0], value.$unknown[1]);
189
+ };
190
+ })(Conversation = exports.Conversation || (exports.Conversation = {}));
191
+ exports.ConversationDirection = {
192
+ INBOUND: "INBOUND",
193
+ INTERNAL: "INTERNAL",
194
+ OUTBOUND: "OUTBOUND",
195
+ };
196
+ exports.ConversationFlag = {
197
+ FAX: "FAX",
198
+ VOICEMAIL: "VOICEMAIL",
199
+ };
200
+ exports.ConversationUserDirection = {
201
+ INCOMING: "INCOMING",
202
+ OUTGOING: "OUTGOING",
203
+ };
@@ -1,6 +1,6 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.de_GetConferenceTranscriptionTextCommand = exports.de_GetConferenceTranscriptionCommand = exports.de_GetConferenceCommand = exports.de_GetCallTranscriptionTextCommand = exports.de_GetCallTranscriptionCommand = exports.de_GetCallCommand = exports.se_GetConferenceTranscriptionTextCommand = exports.se_GetConferenceTranscriptionCommand = exports.se_GetConferenceCommand = exports.se_GetCallTranscriptionTextCommand = exports.se_GetCallTranscriptionCommand = exports.se_GetCallCommand = void 0;
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
6
  const core_1 = require("@smithy/core");
@@ -104,6 +104,52 @@ const se_GetConferenceTranscriptionTextCommand = async (input, context) => {
104
104
  return b.build();
105
105
  };
106
106
  exports.se_GetConferenceTranscriptionTextCommand = se_GetConferenceTranscriptionTextCommand;
107
+ const se_QueryConversationsCommand = async (input, context) => {
108
+ const b = (0, core_1.requestBuilder)(input, context);
109
+ const headers = {
110
+ 'content-type': 'application/json',
111
+ };
112
+ b.bp("/v2/history/conversations");
113
+ const query = (0, smithy_client_1.map)({
114
+ [_c]: [, input[_c]],
115
+ [_u]: [, input[_u]],
116
+ });
117
+ let body;
118
+ body = JSON.stringify((0, smithy_client_1.take)(input, {
119
+ 'filter': _ => (0, smithy_client_1._json)(_),
120
+ 'limit': [],
121
+ 'offset': [],
122
+ }));
123
+ b.m("POST")
124
+ .h(headers)
125
+ .q(query)
126
+ .b(body);
127
+ return b.build();
128
+ };
129
+ exports.se_QueryConversationsCommand = se_QueryConversationsCommand;
130
+ const se_QueryUserCallsCommand = async (input, context) => {
131
+ const b = (0, core_1.requestBuilder)(input, context);
132
+ const headers = {
133
+ 'content-type': 'application/json',
134
+ };
135
+ b.bp("/v2/history/user/calls");
136
+ const query = (0, smithy_client_1.map)({
137
+ [_c]: [, input[_c]],
138
+ [_u]: [, input[_u]],
139
+ });
140
+ let body;
141
+ body = JSON.stringify((0, smithy_client_1.take)(input, {
142
+ 'filter': _ => (0, smithy_client_1._json)(_),
143
+ 'limit': [],
144
+ 'offset': [],
145
+ }));
146
+ b.m("POST")
147
+ .h(headers)
148
+ .q(query)
149
+ .b(body);
150
+ return b.build();
151
+ };
152
+ exports.se_QueryUserCallsCommand = se_QueryUserCallsCommand;
107
153
  const de_GetCallCommand = async (output, context) => {
108
154
  if (output.statusCode !== 200 && output.statusCode >= 300) {
109
155
  return de_CommandError(output, context);
@@ -198,6 +244,36 @@ const de_GetConferenceTranscriptionTextCommand = async (output, context) => {
198
244
  return contents;
199
245
  };
200
246
  exports.de_GetConferenceTranscriptionTextCommand = de_GetConferenceTranscriptionTextCommand;
247
+ const de_QueryConversationsCommand = async (output, context) => {
248
+ if (output.statusCode !== 200 && output.statusCode >= 300) {
249
+ return de_CommandError(output, context);
250
+ }
251
+ const contents = (0, smithy_client_1.map)({
252
+ $metadata: deserializeMetadata(output),
253
+ });
254
+ const data = (0, smithy_client_1.expectNonNull)(((0, smithy_client_1.expectObject)(await parseBody(output.body, context))), "body");
255
+ const doc = (0, smithy_client_1.take)(data, {
256
+ 'conversations': smithy_client_1._json,
257
+ });
258
+ Object.assign(contents, doc);
259
+ return contents;
260
+ };
261
+ exports.de_QueryConversationsCommand = de_QueryConversationsCommand;
262
+ const de_QueryUserCallsCommand = async (output, context) => {
263
+ if (output.statusCode !== 200 && output.statusCode >= 300) {
264
+ return de_CommandError(output, context);
265
+ }
266
+ const contents = (0, smithy_client_1.map)({
267
+ $metadata: deserializeMetadata(output),
268
+ });
269
+ const data = (0, smithy_client_1.expectNonNull)(((0, smithy_client_1.expectObject)(await parseBody(output.body, context))), "body");
270
+ const doc = (0, smithy_client_1.take)(data, {
271
+ 'calls': smithy_client_1._json,
272
+ });
273
+ Object.assign(contents, doc);
274
+ return contents;
275
+ };
276
+ exports.de_QueryUserCallsCommand = de_QueryUserCallsCommand;
201
277
  const de_CommandError = async (output, context) => {
202
278
  const parsedOutput = {
203
279
  ...output,
@@ -325,6 +401,7 @@ const isSerializableHeaderValue = (value) => value !== undefined &&
325
401
  value.length != 0) &&
326
402
  (!Object.getOwnPropertyNames(value).includes("size") || value.size != 0);
327
403
  const _c = "company";
404
+ const _u = "user";
328
405
  const parseBody = (streamBody, context) => collectBodyString(streamBody, context).then(encoded => {
329
406
  if (encoded.length) {
330
407
  return JSON.parse(encoded);
@@ -5,6 +5,8 @@ import { GetCallTranscriptionTextCommand, } from "./commands/GetCallTranscriptio
5
5
  import { GetConferenceCommand, } from "./commands/GetConferenceCommand";
6
6
  import { GetConferenceTranscriptionCommand, } from "./commands/GetConferenceTranscriptionCommand";
7
7
  import { GetConferenceTranscriptionTextCommand, } from "./commands/GetConferenceTranscriptionTextCommand";
8
+ import { QueryConversationsCommand, } from "./commands/QueryConversationsCommand";
9
+ import { QueryUserCallsCommand, } from "./commands/QueryUserCallsCommand";
8
10
  import { createAggregatedClient } from "@smithy/smithy-client";
9
11
  const commands = {
10
12
  GetCallCommand,
@@ -13,6 +15,8 @@ const commands = {
13
15
  GetConferenceCommand,
14
16
  GetConferenceTranscriptionCommand,
15
17
  GetConferenceTranscriptionTextCommand,
18
+ QueryConversationsCommand,
19
+ QueryUserCallsCommand,
16
20
  };
17
21
  export class WdaHistory extends WdaHistoryClient {
18
22
  }
@@ -0,0 +1,17 @@
1
+ import { de_QueryConversationsCommand, se_QueryConversationsCommand, } from "../protocols/Aws_restJson1";
2
+ import { getSerdePlugin } from "@smithy/middleware-serde";
3
+ import { Command as $Command } from "@smithy/smithy-client";
4
+ export { $Command };
5
+ export class QueryConversationsCommand extends $Command.classBuilder()
6
+ .m(function (Command, cs, config, o) {
7
+ return [
8
+ getSerdePlugin(config, this.serialize, this.deserialize),
9
+ ];
10
+ })
11
+ .s("WdaHistory", "QueryConversations", {})
12
+ .n("WdaHistoryClient", "QueryConversationsCommand")
13
+ .f(void 0, void 0)
14
+ .ser(se_QueryConversationsCommand)
15
+ .de(de_QueryConversationsCommand)
16
+ .build() {
17
+ }
@@ -0,0 +1,17 @@
1
+ import { de_QueryUserCallsCommand, se_QueryUserCallsCommand, } from "../protocols/Aws_restJson1";
2
+ import { getSerdePlugin } from "@smithy/middleware-serde";
3
+ import { Command as $Command } from "@smithy/smithy-client";
4
+ export { $Command };
5
+ export class QueryUserCallsCommand extends $Command.classBuilder()
6
+ .m(function (Command, cs, config, o) {
7
+ return [
8
+ getSerdePlugin(config, this.serialize, this.deserialize),
9
+ ];
10
+ })
11
+ .s("WdaHistory", "QueryUserCalls", {})
12
+ .n("WdaHistoryClient", "QueryUserCallsCommand")
13
+ .f(void 0, void 0)
14
+ .ser(se_QueryUserCallsCommand)
15
+ .de(de_QueryUserCallsCommand)
16
+ .build() {
17
+ }
@@ -4,3 +4,5 @@ export * from "./GetCallTranscriptionTextCommand";
4
4
  export * from "./GetConferenceCommand";
5
5
  export * from "./GetConferenceTranscriptionCommand";
6
6
  export * from "./GetConferenceTranscriptionTextCommand";
7
+ export * from "./QueryConversationsCommand";
8
+ export * from "./QueryUserCallsCommand";
@@ -45,6 +45,27 @@ export class CallNotFoundException extends __BaseException {
45
45
  Object.setPrototypeOf(this, CallNotFoundException.prototype);
46
46
  }
47
47
  }
48
+ export const CallRecordOwner = {
49
+ CALLEE: "CALLEE",
50
+ CALLER: "CALLER",
51
+ SYSTEM: "SYSTEM",
52
+ };
53
+ export const CallRecordPauseReason = {
54
+ HOLD: "hold",
55
+ PAUSE: "pause",
56
+ };
57
+ export var CallFlowAttachment;
58
+ (function (CallFlowAttachment) {
59
+ CallFlowAttachment.visit = (value, visitor) => {
60
+ if (value.recording !== undefined)
61
+ return visitor.recording(value.recording);
62
+ if (value.fax !== undefined)
63
+ return visitor.fax(value.fax);
64
+ if (value.voicemail !== undefined)
65
+ return visitor.voicemail(value.voicemail);
66
+ return visitor._(value.$unknown[0], value.$unknown[1]);
67
+ };
68
+ })(CallFlowAttachment || (CallFlowAttachment = {}));
48
69
  export const CallFlowAttachmentType = {
49
70
  FAX: "FAX",
50
71
  VOICEMAIL: "VOICEMAIL",
@@ -71,15 +92,6 @@ export const CallDevice = {
71
92
  export const License = {
72
93
  XBEES: "x-bees",
73
94
  };
74
- export const CallRecordOwner = {
75
- CALLEE: "CALLEE",
76
- CALLER: "CALLER",
77
- SYSTEM: "SYSTEM",
78
- };
79
- export const CallRecordPauseReason = {
80
- HOLD: "hold",
81
- PAUSE: "pause",
82
- };
83
95
  export const CallFlowTranscriptionStatus = {
84
96
  AVAILABLE: "AVAILABLE",
85
97
  UNAVAILABLE: "UNAVAILABLE",
@@ -157,3 +169,26 @@ export class ConferenceTranscriptionNotFoundException extends __BaseException {
157
169
  Object.setPrototypeOf(this, ConferenceTranscriptionNotFoundException.prototype);
158
170
  }
159
171
  }
172
+ export var Conversation;
173
+ (function (Conversation) {
174
+ Conversation.visit = (value, visitor) => {
175
+ if (value.call !== undefined)
176
+ return visitor.call(value.call);
177
+ if (value.conference !== undefined)
178
+ return visitor.conference(value.conference);
179
+ return visitor._(value.$unknown[0], value.$unknown[1]);
180
+ };
181
+ })(Conversation || (Conversation = {}));
182
+ export const ConversationDirection = {
183
+ INBOUND: "INBOUND",
184
+ INTERNAL: "INTERNAL",
185
+ OUTBOUND: "OUTBOUND",
186
+ };
187
+ export const ConversationFlag = {
188
+ FAX: "FAX",
189
+ VOICEMAIL: "VOICEMAIL",
190
+ };
191
+ export const ConversationUserDirection = {
192
+ INCOMING: "INCOMING",
193
+ OUTGOING: "OUTGOING",
194
+ };
@@ -95,6 +95,50 @@ export const se_GetConferenceTranscriptionTextCommand = async (input, context) =
95
95
  .b(body);
96
96
  return b.build();
97
97
  };
98
+ export const se_QueryConversationsCommand = async (input, context) => {
99
+ const b = rb(input, context);
100
+ const headers = {
101
+ 'content-type': 'application/json',
102
+ };
103
+ b.bp("/v2/history/conversations");
104
+ const query = map({
105
+ [_c]: [, input[_c]],
106
+ [_u]: [, input[_u]],
107
+ });
108
+ let body;
109
+ body = JSON.stringify(take(input, {
110
+ 'filter': _ => _json(_),
111
+ 'limit': [],
112
+ 'offset': [],
113
+ }));
114
+ b.m("POST")
115
+ .h(headers)
116
+ .q(query)
117
+ .b(body);
118
+ return b.build();
119
+ };
120
+ export const se_QueryUserCallsCommand = async (input, context) => {
121
+ const b = rb(input, context);
122
+ const headers = {
123
+ 'content-type': 'application/json',
124
+ };
125
+ b.bp("/v2/history/user/calls");
126
+ const query = map({
127
+ [_c]: [, input[_c]],
128
+ [_u]: [, input[_u]],
129
+ });
130
+ let body;
131
+ body = JSON.stringify(take(input, {
132
+ 'filter': _ => _json(_),
133
+ 'limit': [],
134
+ 'offset': [],
135
+ }));
136
+ b.m("POST")
137
+ .h(headers)
138
+ .q(query)
139
+ .b(body);
140
+ return b.build();
141
+ };
98
142
  export const de_GetCallCommand = async (output, context) => {
99
143
  if (output.statusCode !== 200 && output.statusCode >= 300) {
100
144
  return de_CommandError(output, context);
@@ -183,6 +227,34 @@ export const de_GetConferenceTranscriptionTextCommand = async (output, context)
183
227
  Object.assign(contents, doc);
184
228
  return contents;
185
229
  };
230
+ export const de_QueryConversationsCommand = async (output, context) => {
231
+ if (output.statusCode !== 200 && output.statusCode >= 300) {
232
+ return de_CommandError(output, context);
233
+ }
234
+ const contents = map({
235
+ $metadata: deserializeMetadata(output),
236
+ });
237
+ const data = __expectNonNull((__expectObject(await parseBody(output.body, context))), "body");
238
+ const doc = take(data, {
239
+ 'conversations': _json,
240
+ });
241
+ Object.assign(contents, doc);
242
+ return contents;
243
+ };
244
+ export const de_QueryUserCallsCommand = async (output, context) => {
245
+ if (output.statusCode !== 200 && output.statusCode >= 300) {
246
+ return de_CommandError(output, context);
247
+ }
248
+ const contents = map({
249
+ $metadata: deserializeMetadata(output),
250
+ });
251
+ const data = __expectNonNull((__expectObject(await parseBody(output.body, context))), "body");
252
+ const doc = take(data, {
253
+ 'calls': _json,
254
+ });
255
+ Object.assign(contents, doc);
256
+ return contents;
257
+ };
186
258
  const de_CommandError = async (output, context) => {
187
259
  const parsedOutput = {
188
260
  ...output,
@@ -310,6 +382,7 @@ const isSerializableHeaderValue = (value) => value !== undefined &&
310
382
  value.length != 0) &&
311
383
  (!Object.getOwnPropertyNames(value).includes("size") || value.size != 0);
312
384
  const _c = "company";
385
+ const _u = "user";
313
386
  const parseBody = (streamBody, context) => collectBodyString(streamBody, context).then(encoded => {
314
387
  if (encoded.length) {
315
388
  return JSON.parse(encoded);
@@ -5,6 +5,8 @@ import { GetCallTranscriptionTextCommandInput, GetCallTranscriptionTextCommandOu
5
5
  import { GetConferenceCommandInput, GetConferenceCommandOutput } from "./commands/GetConferenceCommand";
6
6
  import { GetConferenceTranscriptionCommandInput, GetConferenceTranscriptionCommandOutput } from "./commands/GetConferenceTranscriptionCommand";
7
7
  import { GetConferenceTranscriptionTextCommandInput, GetConferenceTranscriptionTextCommandOutput } from "./commands/GetConferenceTranscriptionTextCommand";
8
+ import { QueryConversationsCommandInput, QueryConversationsCommandOutput } from "./commands/QueryConversationsCommand";
9
+ import { QueryUserCallsCommandInput, QueryUserCallsCommandOutput } from "./commands/QueryUserCallsCommand";
8
10
  import { HttpHandlerOptions as __HttpHandlerOptions } from "@smithy/types";
9
11
  export interface WdaHistory {
10
12
  /**
@@ -43,6 +45,20 @@ export interface WdaHistory {
43
45
  getConferenceTranscriptionText(args: GetConferenceTranscriptionTextCommandInput, options?: __HttpHandlerOptions): Promise<GetConferenceTranscriptionTextCommandOutput>;
44
46
  getConferenceTranscriptionText(args: GetConferenceTranscriptionTextCommandInput, cb: (err: any, data?: GetConferenceTranscriptionTextCommandOutput) => void): void;
45
47
  getConferenceTranscriptionText(args: GetConferenceTranscriptionTextCommandInput, options: __HttpHandlerOptions, cb: (err: any, data?: GetConferenceTranscriptionTextCommandOutput) => void): void;
48
+ /**
49
+ * @see {@link QueryConversationsCommand}
50
+ */
51
+ queryConversations(): Promise<QueryConversationsCommandOutput>;
52
+ queryConversations(args: QueryConversationsCommandInput, options?: __HttpHandlerOptions): Promise<QueryConversationsCommandOutput>;
53
+ queryConversations(args: QueryConversationsCommandInput, cb: (err: any, data?: QueryConversationsCommandOutput) => void): void;
54
+ queryConversations(args: QueryConversationsCommandInput, options: __HttpHandlerOptions, cb: (err: any, data?: QueryConversationsCommandOutput) => void): void;
55
+ /**
56
+ * @see {@link QueryUserCallsCommand}
57
+ */
58
+ queryUserCalls(): Promise<QueryUserCallsCommandOutput>;
59
+ queryUserCalls(args: QueryUserCallsCommandInput, options?: __HttpHandlerOptions): Promise<QueryUserCallsCommandOutput>;
60
+ queryUserCalls(args: QueryUserCallsCommandInput, cb: (err: any, data?: QueryUserCallsCommandOutput) => void): void;
61
+ queryUserCalls(args: QueryUserCallsCommandInput, options: __HttpHandlerOptions, cb: (err: any, data?: QueryUserCallsCommandOutput) => void): void;
46
62
  }
47
63
  /**
48
64
  * @public
@@ -4,6 +4,8 @@ import { GetCallTranscriptionTextCommandInput, GetCallTranscriptionTextCommandOu
4
4
  import { GetConferenceCommandInput, GetConferenceCommandOutput } from "./commands/GetConferenceCommand";
5
5
  import { GetConferenceTranscriptionCommandInput, GetConferenceTranscriptionCommandOutput } from "./commands/GetConferenceTranscriptionCommand";
6
6
  import { GetConferenceTranscriptionTextCommandInput, GetConferenceTranscriptionTextCommandOutput } from "./commands/GetConferenceTranscriptionTextCommand";
7
+ import { QueryConversationsCommandInput, QueryConversationsCommandOutput } from "./commands/QueryConversationsCommand";
8
+ import { QueryUserCallsCommandInput, QueryUserCallsCommandOutput } from "./commands/QueryUserCallsCommand";
7
9
  import { RuntimeExtension, RuntimeExtensionsConfig } from "./runtimeExtensions";
8
10
  import { UserAgentInputConfig, UserAgentResolvedConfig } from "@aws-sdk/middleware-user-agent";
9
11
  import { RetryInputConfig, RetryResolvedConfig } from "@smithy/middleware-retry";
@@ -15,11 +17,11 @@ export { __Client };
15
17
  /**
16
18
  * @public
17
19
  */
18
- export type ServiceInputTypes = GetCallCommandInput | GetCallTranscriptionCommandInput | GetCallTranscriptionTextCommandInput | GetConferenceCommandInput | GetConferenceTranscriptionCommandInput | GetConferenceTranscriptionTextCommandInput;
20
+ export type ServiceInputTypes = GetCallCommandInput | GetCallTranscriptionCommandInput | GetCallTranscriptionTextCommandInput | GetConferenceCommandInput | GetConferenceTranscriptionCommandInput | GetConferenceTranscriptionTextCommandInput | QueryConversationsCommandInput | QueryUserCallsCommandInput;
19
21
  /**
20
22
  * @public
21
23
  */
22
- export type ServiceOutputTypes = GetCallCommandOutput | GetCallTranscriptionCommandOutput | GetCallTranscriptionTextCommandOutput | GetConferenceCommandOutput | GetConferenceTranscriptionCommandOutput | GetConferenceTranscriptionTextCommandOutput;
24
+ export type ServiceOutputTypes = GetCallCommandOutput | GetCallTranscriptionCommandOutput | GetCallTranscriptionTextCommandOutput | GetConferenceCommandOutput | GetConferenceTranscriptionCommandOutput | GetConferenceTranscriptionTextCommandOutput | QueryConversationsCommandOutput | QueryUserCallsCommandOutput;
23
25
  /**
24
26
  * @public
25
27
  */
@@ -105,20 +105,44 @@ declare const GetCallCommand_base: {
105
105
  * // recordings: [ // CallFlowRecordings
106
106
  * // "STRING_VALUE",
107
107
  * // ],
108
- * // recordingsData: [ // CallFlowRecordingsData
109
- * // { // RecordingsData
110
- * // fileName: "STRING_VALUE", // required
111
- * // start: Number("long"), // required
112
- * // end: Number("long"), // required
113
- * // owner: "CALLEE" || "CALLER" || "SYSTEM", // required
114
- * // url: "STRING_VALUE", // required
115
- * // pauses: [ // CallRecordPausesList // required
116
- * // { // CallRecordPause
117
- * // start: Number("long"),
118
- * // end: Number("long"),
119
- * // reason: "pause" || "hold",
120
- * // },
121
- * // ],
108
+ * // recordingsData: [ // CallFlowAttachments
109
+ * // { // CallFlowAttachment Union: only one key present
110
+ * // recording: { // CallFlowRecording
111
+ * // fileName: "STRING_VALUE", // required
112
+ * // start: Number("long"), // required
113
+ * // end: Number("long"), // required
114
+ * // owner: "CALLEE" || "CALLER" || "SYSTEM", // required
115
+ * // url: "STRING_VALUE", // required
116
+ * // pauses: [ // CallRecordPausesList // required
117
+ * // { // CallRecordPause
118
+ * // start: Number("long"),
119
+ * // end: Number("long"),
120
+ * // reason: "pause" || "hold",
121
+ * // },
122
+ * // ],
123
+ * // },
124
+ * // fax: { // CallFlowFax
125
+ * // url: "STRING_VALUE", // required
126
+ * // status: "STRING_VALUE", // required
127
+ * // destinations: [ // CallFlowAttachmentDestinationList
128
+ * // { // CallFlowAttachmentDestination
129
+ * // phone: "STRING_VALUE",
130
+ * // name: "STRING_VALUE",
131
+ * // email: "STRING_VALUE",
132
+ * // userId: "STRING_VALUE",
133
+ * // userExtension: "STRING_VALUE",
134
+ * // userDepartment: "STRING_VALUE",
135
+ * // groupId: "STRING_VALUE",
136
+ * // groupName: "STRING_VALUE",
137
+ * // },
138
+ * // ],
139
+ * // owner: "CALLEE" || "CALLER" || "SYSTEM",
140
+ * // errorMsg: "STRING_VALUE",
141
+ * // },
142
+ * // voicemail: { // CallFlowVoicemail
143
+ * // url: "STRING_VALUE", // required
144
+ * // owner: "CALLEE" || "CALLER" || "SYSTEM",
145
+ * // },
122
146
  * // },
123
147
  * // ],
124
148
  * // mergeWith: "STRING_VALUE",
@@ -133,8 +157,8 @@ declare const GetCallCommand_base: {
133
157
  * // transcriptionLanguage: "STRING_VALUE",
134
158
  * // attachment: "STRING_VALUE",
135
159
  * // attachmentType: "VOICEMAIL" || "FAX",
136
- * // attachmentDestinations: [ // CallFlowAttachmentDestinationList
137
- * // { // CallFlowAttachmentDestination
160
+ * // attachmentDestinations: [
161
+ * // {
138
162
  * // phone: "STRING_VALUE",
139
163
  * // name: "STRING_VALUE",
140
164
  * // email: "STRING_VALUE",
@@ -145,6 +169,46 @@ declare const GetCallCommand_base: {
145
169
  * // groupName: "STRING_VALUE",
146
170
  * // },
147
171
  * // ],
172
+ * // attachments: [
173
+ * // {// Union: only one key present
174
+ * // recording: {
175
+ * // fileName: "STRING_VALUE", // required
176
+ * // start: Number("long"), // required
177
+ * // end: Number("long"), // required
178
+ * // owner: "CALLEE" || "CALLER" || "SYSTEM", // required
179
+ * // url: "STRING_VALUE", // required
180
+ * // pauses: [ // required
181
+ * // {
182
+ * // start: Number("long"),
183
+ * // end: Number("long"),
184
+ * // reason: "pause" || "hold",
185
+ * // },
186
+ * // ],
187
+ * // },
188
+ * // fax: {
189
+ * // url: "STRING_VALUE", // required
190
+ * // status: "STRING_VALUE", // required
191
+ * // destinations: [
192
+ * // {
193
+ * // phone: "STRING_VALUE",
194
+ * // name: "STRING_VALUE",
195
+ * // email: "STRING_VALUE",
196
+ * // userId: "STRING_VALUE",
197
+ * // userExtension: "STRING_VALUE",
198
+ * // userDepartment: "STRING_VALUE",
199
+ * // groupId: "STRING_VALUE",
200
+ * // groupName: "STRING_VALUE",
201
+ * // },
202
+ * // ],
203
+ * // owner: "CALLEE" || "CALLER" || "SYSTEM",
204
+ * // errorMsg: "STRING_VALUE",
205
+ * // },
206
+ * // voicemail: {
207
+ * // url: "STRING_VALUE", // required
208
+ * // owner: "CALLEE" || "CALLER" || "SYSTEM",
209
+ * // },
210
+ * // },
211
+ * // ],
148
212
  * // id: "STRING_VALUE", // required
149
213
  * // pbx: "STRING_VALUE", // required
150
214
  * // time: Number("long"), // required