@wildix/wda-history-client 1.0.18 → 1.0.19

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,7 @@ 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");
11
12
  const smithy_client_1 = require("@smithy/smithy-client");
12
13
  const commands = {
13
14
  GetCallCommand: GetCallCommand_1.GetCallCommand,
@@ -16,6 +17,7 @@ const commands = {
16
17
  GetConferenceCommand: GetConferenceCommand_1.GetConferenceCommand,
17
18
  GetConferenceTranscriptionCommand: GetConferenceTranscriptionCommand_1.GetConferenceTranscriptionCommand,
18
19
  GetConferenceTranscriptionTextCommand: GetConferenceTranscriptionTextCommand_1.GetConferenceTranscriptionTextCommand,
20
+ QueryConversationsCommand: QueryConversationsCommand_1.QueryConversationsCommand,
19
21
  };
20
22
  class WdaHistory extends WdaHistoryClient_1.WdaHistoryClient {
21
23
  }
@@ -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;
@@ -7,3 +7,4 @@ 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);
@@ -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.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.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;
4
4
  const WdaHistoryServiceException_1 = require("./WdaHistoryServiceException");
5
5
  class ValidationException extends WdaHistoryServiceException_1.WdaHistoryServiceException {
6
6
  constructor(opts) {
@@ -166,3 +166,22 @@ class ConferenceTranscriptionNotFoundException extends WdaHistoryServiceExceptio
166
166
  }
167
167
  }
168
168
  exports.ConferenceTranscriptionNotFoundException = ConferenceTranscriptionNotFoundException;
169
+ var Conversation;
170
+ (function (Conversation) {
171
+ Conversation.visit = (value, visitor) => {
172
+ if (value.call !== undefined)
173
+ return visitor.call(value.call);
174
+ if (value.conference !== undefined)
175
+ return visitor.conference(value.conference);
176
+ return visitor._(value.$unknown[0], value.$unknown[1]);
177
+ };
178
+ })(Conversation = exports.Conversation || (exports.Conversation = {}));
179
+ exports.ConversationDirection = {
180
+ INBOUND: "INBOUND",
181
+ INTERNAL: "INTERNAL",
182
+ OUTBOUND: "OUTBOUND",
183
+ };
184
+ exports.ConversationFlag = {
185
+ FAX: "FAX",
186
+ VOICEMAIL: "VOICEMAIL",
187
+ };
@@ -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_QueryConversationsCommand = exports.de_GetConferenceTranscriptionTextCommand = exports.de_GetConferenceTranscriptionCommand = exports.de_GetConferenceCommand = exports.de_GetCallTranscriptionTextCommand = exports.de_GetCallTranscriptionCommand = exports.de_GetCallCommand = 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,29 @@ 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;
107
130
  const de_GetCallCommand = async (output, context) => {
108
131
  if (output.statusCode !== 200 && output.statusCode >= 300) {
109
132
  return de_CommandError(output, context);
@@ -198,6 +221,21 @@ const de_GetConferenceTranscriptionTextCommand = async (output, context) => {
198
221
  return contents;
199
222
  };
200
223
  exports.de_GetConferenceTranscriptionTextCommand = de_GetConferenceTranscriptionTextCommand;
224
+ const de_QueryConversationsCommand = async (output, context) => {
225
+ if (output.statusCode !== 200 && output.statusCode >= 300) {
226
+ return de_CommandError(output, context);
227
+ }
228
+ const contents = (0, smithy_client_1.map)({
229
+ $metadata: deserializeMetadata(output),
230
+ });
231
+ const data = (0, smithy_client_1.expectNonNull)(((0, smithy_client_1.expectObject)(await parseBody(output.body, context))), "body");
232
+ const doc = (0, smithy_client_1.take)(data, {
233
+ 'conversations': smithy_client_1._json,
234
+ });
235
+ Object.assign(contents, doc);
236
+ return contents;
237
+ };
238
+ exports.de_QueryConversationsCommand = de_QueryConversationsCommand;
201
239
  const de_CommandError = async (output, context) => {
202
240
  const parsedOutput = {
203
241
  ...output,
@@ -325,6 +363,7 @@ const isSerializableHeaderValue = (value) => value !== undefined &&
325
363
  value.length != 0) &&
326
364
  (!Object.getOwnPropertyNames(value).includes("size") || value.size != 0);
327
365
  const _c = "company";
366
+ const _u = "user";
328
367
  const parseBody = (streamBody, context) => collectBodyString(streamBody, context).then(encoded => {
329
368
  if (encoded.length) {
330
369
  return JSON.parse(encoded);
@@ -5,6 +5,7 @@ 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";
8
9
  import { createAggregatedClient } from "@smithy/smithy-client";
9
10
  const commands = {
10
11
  GetCallCommand,
@@ -13,6 +14,7 @@ const commands = {
13
14
  GetConferenceCommand,
14
15
  GetConferenceTranscriptionCommand,
15
16
  GetConferenceTranscriptionTextCommand,
17
+ QueryConversationsCommand,
16
18
  };
17
19
  export class WdaHistory extends WdaHistoryClient {
18
20
  }
@@ -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
+ }
@@ -4,3 +4,4 @@ export * from "./GetCallTranscriptionTextCommand";
4
4
  export * from "./GetConferenceCommand";
5
5
  export * from "./GetConferenceTranscriptionCommand";
6
6
  export * from "./GetConferenceTranscriptionTextCommand";
7
+ export * from "./QueryConversationsCommand";
@@ -157,3 +157,22 @@ export class ConferenceTranscriptionNotFoundException extends __BaseException {
157
157
  Object.setPrototypeOf(this, ConferenceTranscriptionNotFoundException.prototype);
158
158
  }
159
159
  }
160
+ export var Conversation;
161
+ (function (Conversation) {
162
+ Conversation.visit = (value, visitor) => {
163
+ if (value.call !== undefined)
164
+ return visitor.call(value.call);
165
+ if (value.conference !== undefined)
166
+ return visitor.conference(value.conference);
167
+ return visitor._(value.$unknown[0], value.$unknown[1]);
168
+ };
169
+ })(Conversation || (Conversation = {}));
170
+ export const ConversationDirection = {
171
+ INBOUND: "INBOUND",
172
+ INTERNAL: "INTERNAL",
173
+ OUTBOUND: "OUTBOUND",
174
+ };
175
+ export const ConversationFlag = {
176
+ FAX: "FAX",
177
+ VOICEMAIL: "VOICEMAIL",
178
+ };
@@ -95,6 +95,28 @@ 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
+ };
98
120
  export const de_GetCallCommand = async (output, context) => {
99
121
  if (output.statusCode !== 200 && output.statusCode >= 300) {
100
122
  return de_CommandError(output, context);
@@ -183,6 +205,20 @@ export const de_GetConferenceTranscriptionTextCommand = async (output, context)
183
205
  Object.assign(contents, doc);
184
206
  return contents;
185
207
  };
208
+ export const de_QueryConversationsCommand = async (output, context) => {
209
+ if (output.statusCode !== 200 && output.statusCode >= 300) {
210
+ return de_CommandError(output, context);
211
+ }
212
+ const contents = map({
213
+ $metadata: deserializeMetadata(output),
214
+ });
215
+ const data = __expectNonNull((__expectObject(await parseBody(output.body, context))), "body");
216
+ const doc = take(data, {
217
+ 'conversations': _json,
218
+ });
219
+ Object.assign(contents, doc);
220
+ return contents;
221
+ };
186
222
  const de_CommandError = async (output, context) => {
187
223
  const parsedOutput = {
188
224
  ...output,
@@ -310,6 +346,7 @@ const isSerializableHeaderValue = (value) => value !== undefined &&
310
346
  value.length != 0) &&
311
347
  (!Object.getOwnPropertyNames(value).includes("size") || value.size != 0);
312
348
  const _c = "company";
349
+ const _u = "user";
313
350
  const parseBody = (streamBody, context) => collectBodyString(streamBody, context).then(encoded => {
314
351
  if (encoded.length) {
315
352
  return JSON.parse(encoded);
@@ -5,6 +5,7 @@ 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";
8
9
  import { HttpHandlerOptions as __HttpHandlerOptions } from "@smithy/types";
9
10
  export interface WdaHistory {
10
11
  /**
@@ -43,6 +44,13 @@ export interface WdaHistory {
43
44
  getConferenceTranscriptionText(args: GetConferenceTranscriptionTextCommandInput, options?: __HttpHandlerOptions): Promise<GetConferenceTranscriptionTextCommandOutput>;
44
45
  getConferenceTranscriptionText(args: GetConferenceTranscriptionTextCommandInput, cb: (err: any, data?: GetConferenceTranscriptionTextCommandOutput) => void): void;
45
46
  getConferenceTranscriptionText(args: GetConferenceTranscriptionTextCommandInput, options: __HttpHandlerOptions, cb: (err: any, data?: GetConferenceTranscriptionTextCommandOutput) => void): void;
47
+ /**
48
+ * @see {@link QueryConversationsCommand}
49
+ */
50
+ queryConversations(): Promise<QueryConversationsCommandOutput>;
51
+ queryConversations(args: QueryConversationsCommandInput, options?: __HttpHandlerOptions): Promise<QueryConversationsCommandOutput>;
52
+ queryConversations(args: QueryConversationsCommandInput, cb: (err: any, data?: QueryConversationsCommandOutput) => void): void;
53
+ queryConversations(args: QueryConversationsCommandInput, options: __HttpHandlerOptions, cb: (err: any, data?: QueryConversationsCommandOutput) => void): void;
46
54
  }
47
55
  /**
48
56
  * @public
@@ -4,6 +4,7 @@ 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";
7
8
  import { RuntimeExtension, RuntimeExtensionsConfig } from "./runtimeExtensions";
8
9
  import { UserAgentInputConfig, UserAgentResolvedConfig } from "@aws-sdk/middleware-user-agent";
9
10
  import { RetryInputConfig, RetryResolvedConfig } from "@smithy/middleware-retry";
@@ -15,11 +16,11 @@ export { __Client };
15
16
  /**
16
17
  * @public
17
18
  */
18
- export type ServiceInputTypes = GetCallCommandInput | GetCallTranscriptionCommandInput | GetCallTranscriptionTextCommandInput | GetConferenceCommandInput | GetConferenceTranscriptionCommandInput | GetConferenceTranscriptionTextCommandInput;
19
+ export type ServiceInputTypes = GetCallCommandInput | GetCallTranscriptionCommandInput | GetCallTranscriptionTextCommandInput | GetConferenceCommandInput | GetConferenceTranscriptionCommandInput | GetConferenceTranscriptionTextCommandInput | QueryConversationsCommandInput;
19
20
  /**
20
21
  * @public
21
22
  */
22
- export type ServiceOutputTypes = GetCallCommandOutput | GetCallTranscriptionCommandOutput | GetCallTranscriptionTextCommandOutput | GetConferenceCommandOutput | GetConferenceTranscriptionCommandOutput | GetConferenceTranscriptionTextCommandOutput;
23
+ export type ServiceOutputTypes = GetCallCommandOutput | GetCallTranscriptionCommandOutput | GetCallTranscriptionTextCommandOutput | GetConferenceCommandOutput | GetConferenceTranscriptionCommandOutput | GetConferenceTranscriptionTextCommandOutput | QueryConversationsCommandOutput;
23
24
  /**
24
25
  * @public
25
26
  */
@@ -61,7 +61,7 @@ declare const GetConferenceTranscriptionCommand_base: {
61
61
  * // isFinal: true || false, // required
62
62
  * // start: Number("long"), // required
63
63
  * // end: Number("long"), // required
64
- * // sentiment: "STRING_VALUE", // required
64
+ * // sentiment: "STRING_VALUE",
65
65
  * // },
66
66
  * // ],
67
67
  * // },
@@ -0,0 +1,231 @@
1
+ import { ServiceInputTypes, ServiceOutputTypes, WdaHistoryClientResolvedConfig } from "../WdaHistoryClient";
2
+ import { QueryConversationsInput, QueryConversationsOutput } from "../models/models_0";
3
+ import { Command as $Command } from "@smithy/smithy-client";
4
+ import { MetadataBearer as __MetadataBearer } from "@smithy/types";
5
+ /**
6
+ * @public
7
+ */
8
+ export type { __MetadataBearer };
9
+ export { $Command };
10
+ /**
11
+ * @public
12
+ *
13
+ * The input for {@link QueryConversationsCommand}.
14
+ */
15
+ export interface QueryConversationsCommandInput extends QueryConversationsInput {
16
+ }
17
+ /**
18
+ * @public
19
+ *
20
+ * The output of {@link QueryConversationsCommand}.
21
+ */
22
+ export interface QueryConversationsCommandOutput extends QueryConversationsOutput, __MetadataBearer {
23
+ }
24
+ declare const QueryConversationsCommand_base: {
25
+ new (input: QueryConversationsCommandInput): import("@smithy/smithy-client").CommandImpl<QueryConversationsCommandInput, QueryConversationsCommandOutput, WdaHistoryClientResolvedConfig, ServiceInputTypes, ServiceOutputTypes>;
26
+ new (...[input]: [] | [QueryConversationsCommandInput]): import("@smithy/smithy-client").CommandImpl<QueryConversationsCommandInput, QueryConversationsCommandOutput, WdaHistoryClientResolvedConfig, ServiceInputTypes, ServiceOutputTypes>;
27
+ getEndpointParameterInstructions(): import("@smithy/middleware-endpoint").EndpointParameterInstructions;
28
+ };
29
+ /**
30
+ * Retrieves list of conversations using filters.
31
+ * @example
32
+ * Use a bare-bones client and the command you need to make an API call.
33
+ * ```javascript
34
+ * import { WdaHistoryClient, QueryConversationsCommand } from "@wildix/wda-history-client"; // ES Modules import
35
+ * // const { WdaHistoryClient, QueryConversationsCommand } = require("@wildix/wda-history-client"); // CommonJS import
36
+ * const client = new WdaHistoryClient(config);
37
+ * const input = { // QueryConversationsInput
38
+ * company: "STRING_VALUE",
39
+ * user: "STRING_VALUE",
40
+ * filter: { // QueryConversationsFilter
41
+ * direction: "INTERNAL" || "INBOUND" || "OUTBOUND",
42
+ * flags: [ // ConversationFlags
43
+ * "FAX" || "VOICEMAIL",
44
+ * ],
45
+ * status: "COMPLETED" || "MISSED",
46
+ * },
47
+ * limit: Number("int"),
48
+ * offset: Number("int"),
49
+ * };
50
+ * const command = new QueryConversationsCommand(input);
51
+ * const response = await client.send(command);
52
+ * // { // QueryConversationsOutput
53
+ * // conversations: [ // ConversationsList // required
54
+ * // { // Conversation Union: only one key present
55
+ * // call: { // CallRecord
56
+ * // flowIndex: Number("int"), // required
57
+ * // startTime: Number("long"), // required
58
+ * // endTime: Number("long"), // required
59
+ * // connectTime: Number("long"),
60
+ * // talkTime: Number("long"),
61
+ * // waitTime: Number("long"),
62
+ * // duration: Number("long"), // required
63
+ * // caller: { // CallParticipant
64
+ * // type: "REMOTE" || "LOCAL", // required
65
+ * // phone: "STRING_VALUE",
66
+ * // name: "STRING_VALUE",
67
+ * // company: "STRING_VALUE",
68
+ * // email: "STRING_VALUE",
69
+ * // userId: "STRING_VALUE",
70
+ * // userExtension: "STRING_VALUE",
71
+ * // userDepartment: "STRING_VALUE",
72
+ * // groupId: "STRING_VALUE",
73
+ * // groupName: "STRING_VALUE",
74
+ * // userAgent: "STRING_VALUE",
75
+ * // userDevice: "COLLABORATION_WEB" || "COLLABORATION_IOS" || "COLLABORATION_ANDROID" || "XBEES_WEB" || "XBEES_IOS" || "XBEES_ANDROID" || "WILDIX_PHONE" || "WILDIX_DEVICE" || "UNKNOWN",
76
+ * // role: "CLIENT" || "AGENT", // required
77
+ * // license: "STRING_VALUE",
78
+ * // },
79
+ * // callee: {
80
+ * // type: "REMOTE" || "LOCAL", // required
81
+ * // phone: "STRING_VALUE",
82
+ * // name: "STRING_VALUE",
83
+ * // company: "STRING_VALUE",
84
+ * // email: "STRING_VALUE",
85
+ * // userId: "STRING_VALUE",
86
+ * // userExtension: "STRING_VALUE",
87
+ * // userDepartment: "STRING_VALUE",
88
+ * // groupId: "STRING_VALUE",
89
+ * // groupName: "STRING_VALUE",
90
+ * // userAgent: "STRING_VALUE",
91
+ * // userDevice: "COLLABORATION_WEB" || "COLLABORATION_IOS" || "COLLABORATION_ANDROID" || "XBEES_WEB" || "XBEES_IOS" || "XBEES_ANDROID" || "WILDIX_PHONE" || "WILDIX_DEVICE" || "UNKNOWN",
92
+ * // role: "CLIENT" || "AGENT", // required
93
+ * // license: "STRING_VALUE",
94
+ * // },
95
+ * // service: "STRING_VALUE",
96
+ * // serviceNumber: "STRING_VALUE",
97
+ * // destination: "STRING_VALUE",
98
+ * // direction: "INTERNAL" || "INBOUND" || "OUTBOUND" || "UNDEFINED",
99
+ * // trunkName: "STRING_VALUE",
100
+ * // trunkDirection: "STRING_VALUE",
101
+ * // queueName: "STRING_VALUE",
102
+ * // queueId: "STRING_VALUE",
103
+ * // tags: [ // CallFlowTags
104
+ * // "STRING_VALUE",
105
+ * // ],
106
+ * // flags: [ // CallFlowFlags
107
+ * // "STRING_VALUE",
108
+ * // ],
109
+ * // callerMos: "STRING_VALUE",
110
+ * // calleeMos: "STRING_VALUE",
111
+ * // xhoppersConfId: "STRING_VALUE",
112
+ * // recordings: [ // CallFlowRecordings
113
+ * // "STRING_VALUE",
114
+ * // ],
115
+ * // recordingsData: [ // CallFlowRecordingsData
116
+ * // { // RecordingsData
117
+ * // fileName: "STRING_VALUE", // required
118
+ * // start: Number("long"), // required
119
+ * // end: Number("long"), // required
120
+ * // owner: "CALLEE" || "CALLER" || "SYSTEM", // required
121
+ * // url: "STRING_VALUE", // required
122
+ * // pauses: [ // CallRecordPausesList // required
123
+ * // { // CallRecordPause
124
+ * // start: Number("long"),
125
+ * // end: Number("long"),
126
+ * // reason: "pause" || "hold",
127
+ * // },
128
+ * // ],
129
+ * // },
130
+ * // ],
131
+ * // mergeWith: "STRING_VALUE",
132
+ * // splitReason: "STRING_VALUE",
133
+ * // splitTransferType: "STRING_VALUE",
134
+ * // remotePhone: "STRING_VALUE",
135
+ * // remotePhoneCountryCode: Number("int"),
136
+ * // remotePhoneCountryCodeStr: "STRING_VALUE",
137
+ * // remotePhoneLocation: "STRING_VALUE",
138
+ * // callStatus: "COMPLETED" || "MISSED",
139
+ * // transcriptionStatus: "AVAILABLE" || "UNAVAILABLE",
140
+ * // transcriptionLanguage: "STRING_VALUE",
141
+ * // attachment: "STRING_VALUE",
142
+ * // attachmentType: "VOICEMAIL" || "FAX",
143
+ * // attachmentDestinations: [ // CallFlowAttachmentDestinationList
144
+ * // { // CallFlowAttachmentDestination
145
+ * // phone: "STRING_VALUE",
146
+ * // name: "STRING_VALUE",
147
+ * // email: "STRING_VALUE",
148
+ * // userId: "STRING_VALUE",
149
+ * // userExtension: "STRING_VALUE",
150
+ * // userDepartment: "STRING_VALUE",
151
+ * // groupId: "STRING_VALUE",
152
+ * // groupName: "STRING_VALUE",
153
+ * // },
154
+ * // ],
155
+ * // id: "STRING_VALUE", // required
156
+ * // pbx: "STRING_VALUE", // required
157
+ * // time: Number("long"), // required
158
+ * // company: "STRING_VALUE", // required
159
+ * // licenses: [ // LicensesList // required
160
+ * // "x-bees",
161
+ * // ],
162
+ * // type: "call" || "call_transcription" || "conference" || "conference_transcription", // required
163
+ * // },
164
+ * // conference: { // ConferenceRecord
165
+ * // id: "STRING_VALUE", // required
166
+ * // time: Number("long"), // required
167
+ * // company: "STRING_VALUE", // required
168
+ * // pbx: "STRING_VALUE",
169
+ * // startTime: Number("long"), // required
170
+ * // endTime: Number("long"), // required
171
+ * // duration: Number("long"), // required
172
+ * // waitTime: Number("int"),
173
+ * // subject: "STRING_VALUE",
174
+ * // direction: "INTERNAL" || "INBOUND" || "OUTBOUND", // required
175
+ * // service: "STRING_VALUE",
176
+ * // status: "COMPLETED" || "MISSED",
177
+ * // participants: [ // ConferenceAnalyticsRecordParticipantList // required
178
+ * // { // ConferenceAnalyticsRecordParticipant
179
+ * // jid: "STRING_VALUE", // required
180
+ * // info: { // ConferenceParticipant
181
+ * // type: "EXTERNAL" || "EXTERNAL_DIAL_IN" || "PBX" || "PBX_SIP" || "XBS", // required
182
+ * // role: "CLIENT" || "AGENT",
183
+ * // jid: "STRING_VALUE",
184
+ * // name: "STRING_VALUE",
185
+ * // email: "STRING_VALUE",
186
+ * // phone: "STRING_VALUE",
187
+ * // department: "STRING_VALUE",
188
+ * // company: "STRING_VALUE",
189
+ * // pbxSerial: "STRING_VALUE",
190
+ * // pbxExtension: "STRING_VALUE",
191
+ * // pbxGroupId: "STRING_VALUE",
192
+ * // xbsId: "STRING_VALUE",
193
+ * // license: "basic" || "essential" || "business" || "premium" || "wizyconf",
194
+ * // },
195
+ * // totalDuration: Number("int"), // required
196
+ * // totalSpeakDuration: Number("int"), // required
197
+ * // joinTime: Number("long"), // required
198
+ * // },
199
+ * // ],
200
+ * // recordings: [ // ConferenceRecordingList
201
+ * // { // ConferenceRecording
202
+ * // url: "STRING_VALUE", // required
203
+ * // start: Number("long"), // required
204
+ * // end: Number("long"), // required
205
+ * // },
206
+ * // ],
207
+ * // transcriptionStatus: "AVAILABLE" || "UNAVAILABLE", // required
208
+ * // transcriptionLanguage: "STRING_VALUE",
209
+ * // type: "call" || "call_transcription" || "conference" || "conference_transcription", // required
210
+ * // },
211
+ * // },
212
+ * // ],
213
+ * // };
214
+ *
215
+ * ```
216
+ *
217
+ * @param QueryConversationsCommandInput - {@link QueryConversationsCommandInput}
218
+ * @returns {@link QueryConversationsCommandOutput}
219
+ * @see {@link QueryConversationsCommandInput} for command's `input` shape.
220
+ * @see {@link QueryConversationsCommandOutput} for command's `response` shape.
221
+ * @see {@link WdaHistoryClientResolvedConfig | config} for WdaHistoryClient's `config` shape.
222
+ *
223
+ * @throws {@link ValidationException} (client fault)
224
+ *
225
+ * @throws {@link WdaHistoryServiceException}
226
+ * <p>Base exception class for all service exceptions from WdaHistory service.</p>
227
+ *
228
+ * @public
229
+ */
230
+ export declare class QueryConversationsCommand extends QueryConversationsCommand_base {
231
+ }
@@ -4,3 +4,4 @@ export * from "./GetCallTranscriptionTextCommand";
4
4
  export * from "./GetConferenceCommand";
5
5
  export * from "./GetConferenceTranscriptionCommand";
6
6
  export * from "./GetConferenceTranscriptionTextCommand";
7
+ export * from "./QueryConversationsCommand";
@@ -479,7 +479,7 @@ export interface ConferenceTranscriptionChunk {
479
479
  isFinal: boolean;
480
480
  start: number;
481
481
  end: number;
482
- sentiment: string;
482
+ sentiment?: string;
483
483
  }
484
484
  /**
485
485
  * @public
@@ -510,6 +510,39 @@ export interface ConferenceTranscriptionRecord {
510
510
  type: RecordType;
511
511
  transcriptions: (ConferenceTranscription)[];
512
512
  }
513
+ /**
514
+ * @public
515
+ */
516
+ export type Conversation = Conversation.CallMember | Conversation.ConferenceMember | Conversation.$UnknownMember;
517
+ /**
518
+ * @public
519
+ */
520
+ export declare namespace Conversation {
521
+ interface CallMember {
522
+ call: CallRecord;
523
+ conference?: never;
524
+ $unknown?: never;
525
+ }
526
+ interface ConferenceMember {
527
+ call?: never;
528
+ conference: ConferenceRecord;
529
+ $unknown?: never;
530
+ }
531
+ /**
532
+ * @public
533
+ */
534
+ interface $UnknownMember {
535
+ call?: never;
536
+ conference?: never;
537
+ $unknown: [string, any];
538
+ }
539
+ interface Visitor<T> {
540
+ call: (value: CallRecord) => T;
541
+ conference: (value: ConferenceRecord) => T;
542
+ _: (name: string, value: any) => T;
543
+ }
544
+ const visit: <T>(value: Conversation, visitor: Visitor<T>) => T;
545
+ }
513
546
  /**
514
547
  * @public
515
548
  */
@@ -605,3 +638,68 @@ export interface GetConferenceTranscriptionTextOutput {
605
638
  text: string;
606
639
  chunks: (TranscriptionTextChunk)[];
607
640
  }
641
+ /**
642
+ * @public
643
+ * @enum
644
+ */
645
+ export declare const ConversationDirection: {
646
+ readonly INBOUND: "INBOUND";
647
+ readonly INTERNAL: "INTERNAL";
648
+ readonly OUTBOUND: "OUTBOUND";
649
+ };
650
+ /**
651
+ * @public
652
+ */
653
+ export type ConversationDirection = typeof ConversationDirection[keyof typeof ConversationDirection];
654
+ /**
655
+ * @public
656
+ * @enum
657
+ */
658
+ export declare const ConversationFlag: {
659
+ readonly FAX: "FAX";
660
+ readonly VOICEMAIL: "VOICEMAIL";
661
+ };
662
+ /**
663
+ * @public
664
+ */
665
+ export type ConversationFlag = typeof ConversationFlag[keyof typeof ConversationFlag];
666
+ /**
667
+ * @public
668
+ */
669
+ export interface QueryConversationsFilter {
670
+ direction?: ConversationDirection;
671
+ flags?: (ConversationFlag)[];
672
+ status?: ConversationStatus;
673
+ }
674
+ /**
675
+ * @public
676
+ */
677
+ export interface QueryConversationsInput {
678
+ /**
679
+ * Company id. eg. it_w123123. Required for s2s auth.
680
+ * @public
681
+ */
682
+ company?: string;
683
+ /**
684
+ * PBX user id. eg. 123123123. Can be applied only for s2s and pbx authorization.
685
+ * @public
686
+ */
687
+ user?: string;
688
+ filter?: QueryConversationsFilter;
689
+ /**
690
+ * The maximum number of rows to return.
691
+ * @public
692
+ */
693
+ limit?: number;
694
+ /**
695
+ * The offset from which to start.
696
+ * @public
697
+ */
698
+ offset?: number;
699
+ }
700
+ /**
701
+ * @public
702
+ */
703
+ export interface QueryConversationsOutput {
704
+ conversations: (Conversation)[];
705
+ }
@@ -4,6 +4,7 @@ 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";
7
8
  import { HttpRequest as __HttpRequest, HttpResponse as __HttpResponse } from "@smithy/protocol-http";
8
9
  import { SerdeContext as __SerdeContext } from "@smithy/types";
9
10
  /**
@@ -30,6 +31,10 @@ export declare const se_GetConferenceTranscriptionCommand: (input: GetConference
30
31
  * serializeAws_restJson1GetConferenceTranscriptionTextCommand
31
32
  */
32
33
  export declare const se_GetConferenceTranscriptionTextCommand: (input: GetConferenceTranscriptionTextCommandInput, context: __SerdeContext) => Promise<__HttpRequest>;
34
+ /**
35
+ * serializeAws_restJson1QueryConversationsCommand
36
+ */
37
+ export declare const se_QueryConversationsCommand: (input: QueryConversationsCommandInput, context: __SerdeContext) => Promise<__HttpRequest>;
33
38
  /**
34
39
  * deserializeAws_restJson1GetCallCommand
35
40
  */
@@ -54,3 +59,7 @@ export declare const de_GetConferenceTranscriptionCommand: (output: __HttpRespon
54
59
  * deserializeAws_restJson1GetConferenceTranscriptionTextCommand
55
60
  */
56
61
  export declare const de_GetConferenceTranscriptionTextCommand: (output: __HttpResponse, context: __SerdeContext) => Promise<GetConferenceTranscriptionTextCommandOutput>;
62
+ /**
63
+ * deserializeAws_restJson1QueryConversationsCommand
64
+ */
65
+ export declare const de_QueryConversationsCommand: (output: __HttpResponse, context: __SerdeContext) => Promise<QueryConversationsCommandOutput>;
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@wildix/wda-history-client",
3
3
  "description": "@wildix/wda-history-client client",
4
- "version": "1.0.18",
4
+ "version": "1.0.19",
5
5
  "scripts": {
6
6
  "build": "concurrently 'yarn:build:cjs' 'yarn:build:es' 'yarn:build:types'",
7
7
  "build:cjs": "tsc -p tsconfig.cjs.json",