@wildix/wda-history-client 1.2.21 → 1.2.24

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.
@@ -1,6 +1,6 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.ConversationUserDirection = exports.ConversationFlag = exports.ConversationDirection = exports.Conversation = exports.ConferenceTranscriptionNotFoundException = exports.ConferenceTranscriptionStatus = exports.ConferenceParticipantType = exports.ConferenceParticipantRole = exports.PbxLicenseType = exports.ConferenceDirection = exports.ConferenceNotFoundException = exports.MessageWhatsAppStatus = exports.MessageType = exports.MessageSmsStatus = exports.Element = exports.ActionElement = exports.ButtonVariant = exports.ButtonHandler = exports.ChatTranscriptionNotFoundException = exports.ChatTag = exports.ChatStatus = exports.ChatParticipantType = exports.ChatParticipantRole = exports.ChatDirection = exports.ChannelWhatsAppStatus = exports.ChannelContextSource = exports.ChannelContextEventAttendeeStatus = exports.ChannelType = exports.ChannelAccess = exports.ChatNotFoundException = exports.CallTranscriptionNotFoundException = exports.CallTranscriptionSpeaker = 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.ConversationStatus = exports.CallDirection = exports.ValidationException = exports.ForbiddenException = 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.MessageWhatsAppStatus = exports.MessageType = exports.MessageSmsStatus = exports.Element = exports.ActionElement = exports.ButtonVariant = exports.ButtonHandler = exports.ChatTranscriptionNotFoundException = exports.ChatTag = exports.ChatStatus = exports.ChatParticipantType = exports.ChatParticipantRole = exports.ChatDirection = exports.ChannelWhatsAppStatus = exports.ChannelContextSource = exports.ChannelContextEventAttendeeStatus = exports.ChannelType = exports.ChannelAccess = exports.ChatNotFoundException = exports.TranscriptionSentiment = exports.CallTranscriptionNotFoundException = exports.CallTranscriptionSpeaker = 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.ConversationStatus = exports.CallDirection = exports.ValidationException = exports.ForbiddenException = void 0;
4
4
  const WdaHistoryServiceException_1 = require("./WdaHistoryServiceException");
5
5
  class ForbiddenException extends WdaHistoryServiceException_1.WdaHistoryServiceException {
6
6
  name = "ForbiddenException";
@@ -134,6 +134,12 @@ class CallTranscriptionNotFoundException extends WdaHistoryServiceException_1.Wd
134
134
  }
135
135
  }
136
136
  exports.CallTranscriptionNotFoundException = CallTranscriptionNotFoundException;
137
+ exports.TranscriptionSentiment = {
138
+ MIXED: "MIXED",
139
+ NEGATIVE: "NEGATIVE",
140
+ NEUTRAL: "NEUTRAL",
141
+ POSITIVE: "POSITIVE",
142
+ };
137
143
  class ChatNotFoundException extends WdaHistoryServiceException_1.WdaHistoryServiceException {
138
144
  name = "ChatNotFoundException";
139
145
  $fault = "client";
@@ -246,7 +246,7 @@ const de_GetCallTranscriptionCommand = async (output, context) => {
246
246
  const data = (0, smithy_client_1.expectNonNull)(((0, smithy_client_1.expectObject)(await (0, core_1.parseJsonBody)(output.body, context))), "body");
247
247
  const doc = (0, smithy_client_1.take)(data, {
248
248
  'interaction': _ => de_CallTranscriptionInteractionRecord(_, context),
249
- 'transcription': smithy_client_1._json,
249
+ 'transcription': _ => de_CallTranscriptionRecord(_, context),
250
250
  });
251
251
  Object.assign(contents, doc);
252
252
  return contents;
@@ -590,6 +590,20 @@ const de_CallTranscriptionInteractionRecord = (output, context) => {
590
590
  'wordsPerMinute': smithy_client_1.expectInt32,
591
591
  });
592
592
  };
593
+ const de_CallTranscriptionRecord = (output, context) => {
594
+ return (0, smithy_client_1.take)(output, {
595
+ 'callStartTime': smithy_client_1.expectLong,
596
+ 'chunks': (_) => de_CallTranscriptionChunksList(_, context),
597
+ 'company': smithy_client_1.expectString,
598
+ 'flowIndex': smithy_client_1.expectInt32,
599
+ 'flowStartTime': smithy_client_1.expectLong,
600
+ 'id': smithy_client_1.expectString,
601
+ 'licenses': smithy_client_1._json,
602
+ 'pbx': smithy_client_1.expectString,
603
+ 'time': smithy_client_1.expectLong,
604
+ 'type': smithy_client_1.expectString,
605
+ });
606
+ };
593
607
  const de_ConferenceTranscriptionInteractionRecord = (output, context) => {
594
608
  return (0, smithy_client_1.take)(output, {
595
609
  'interruptions': smithy_client_1.expectInt32,
@@ -601,6 +615,27 @@ const de_ConferenceTranscriptionInteractionRecord = (output, context) => {
601
615
  'wordsPerMinute': smithy_client_1.expectInt32,
602
616
  });
603
617
  };
618
+ const de_CallTranscriptionChunk = (output, context) => {
619
+ return (0, smithy_client_1.take)(output, {
620
+ 'confidence': smithy_client_1.limitedParseDouble,
621
+ 'end': smithy_client_1.expectLong,
622
+ 'id': smithy_client_1.expectString,
623
+ 'isFinal': smithy_client_1.expectBoolean,
624
+ 'language': smithy_client_1.expectString,
625
+ 'sentiment': smithy_client_1.expectString,
626
+ 'shouldComputeSentiment': smithy_client_1.expectBoolean,
627
+ 'speaker': smithy_client_1.expectString,
628
+ 'start': smithy_client_1.expectLong,
629
+ 'text': smithy_client_1.expectString,
630
+ 'time': smithy_client_1.expectLong,
631
+ });
632
+ };
633
+ const de_CallTranscriptionChunksList = (output, context) => {
634
+ const retVal = (output || []).filter((e) => e != null).map((entry) => {
635
+ return de_CallTranscriptionChunk(entry, context);
636
+ });
637
+ return retVal;
638
+ };
604
639
  const deserializeMetadata = (output) => ({
605
640
  httpStatusCode: output.statusCode,
606
641
  requestId: output.headers["x-amzn-requestid"] ?? output.headers["x-amzn-request-id"] ?? output.headers["x-amz-request-id"],
@@ -127,6 +127,12 @@ export class CallTranscriptionNotFoundException extends __BaseException {
127
127
  Object.setPrototypeOf(this, CallTranscriptionNotFoundException.prototype);
128
128
  }
129
129
  }
130
+ export const TranscriptionSentiment = {
131
+ MIXED: "MIXED",
132
+ NEGATIVE: "NEGATIVE",
133
+ NEUTRAL: "NEUTRAL",
134
+ POSITIVE: "POSITIVE",
135
+ };
130
136
  export class ChatNotFoundException extends __BaseException {
131
137
  name = "ChatNotFoundException";
132
138
  $fault = "client";
@@ -2,7 +2,7 @@ import { WdaHistoryServiceException as __BaseException } from "../models/WdaHist
2
2
  import { CallNotFoundException, CallTranscriptionNotFoundException, ChatNotFoundException, ChatTranscriptionNotFoundException, ConferenceNotFoundException, ConferenceTranscriptionNotFoundException, ForbiddenException, ValidationException, } from "../models/models_0";
3
3
  import { loadRestJsonErrorCode, parseJsonBody as parseBody, parseJsonErrorBody as parseErrorBody, } from "@aws-sdk/core";
4
4
  import { requestBuilder as rb } from "@smithy/core";
5
- import { decorateServiceException as __decorateServiceException, expectInt32 as __expectInt32, expectNonNull as __expectNonNull, expectObject as __expectObject, expectString as __expectString, limitedParseFloat32 as __limitedParseFloat32, serializeDateTime as __serializeDateTime, _json, collectBody, map, take, withBaseException, } from "@smithy/smithy-client";
5
+ import { decorateServiceException as __decorateServiceException, expectBoolean as __expectBoolean, expectInt32 as __expectInt32, expectLong as __expectLong, expectNonNull as __expectNonNull, expectObject as __expectObject, expectString as __expectString, limitedParseDouble as __limitedParseDouble, limitedParseFloat32 as __limitedParseFloat32, serializeDateTime as __serializeDateTime, _json, collectBody, map, take, withBaseException, } from "@smithy/smithy-client";
6
6
  export const se_GetCallCommand = async (input, context) => {
7
7
  const b = rb(input, context);
8
8
  const headers = {};
@@ -230,7 +230,7 @@ export const de_GetCallTranscriptionCommand = async (output, context) => {
230
230
  const data = __expectNonNull((__expectObject(await parseBody(output.body, context))), "body");
231
231
  const doc = take(data, {
232
232
  'interaction': _ => de_CallTranscriptionInteractionRecord(_, context),
233
- 'transcription': _json,
233
+ 'transcription': _ => de_CallTranscriptionRecord(_, context),
234
234
  });
235
235
  Object.assign(contents, doc);
236
236
  return contents;
@@ -563,6 +563,20 @@ const de_CallTranscriptionInteractionRecord = (output, context) => {
563
563
  'wordsPerMinute': __expectInt32,
564
564
  });
565
565
  };
566
+ const de_CallTranscriptionRecord = (output, context) => {
567
+ return take(output, {
568
+ 'callStartTime': __expectLong,
569
+ 'chunks': (_) => de_CallTranscriptionChunksList(_, context),
570
+ 'company': __expectString,
571
+ 'flowIndex': __expectInt32,
572
+ 'flowStartTime': __expectLong,
573
+ 'id': __expectString,
574
+ 'licenses': _json,
575
+ 'pbx': __expectString,
576
+ 'time': __expectLong,
577
+ 'type': __expectString,
578
+ });
579
+ };
566
580
  const de_ConferenceTranscriptionInteractionRecord = (output, context) => {
567
581
  return take(output, {
568
582
  'interruptions': __expectInt32,
@@ -574,6 +588,27 @@ const de_ConferenceTranscriptionInteractionRecord = (output, context) => {
574
588
  'wordsPerMinute': __expectInt32,
575
589
  });
576
590
  };
591
+ const de_CallTranscriptionChunk = (output, context) => {
592
+ return take(output, {
593
+ 'confidence': __limitedParseDouble,
594
+ 'end': __expectLong,
595
+ 'id': __expectString,
596
+ 'isFinal': __expectBoolean,
597
+ 'language': __expectString,
598
+ 'sentiment': __expectString,
599
+ 'shouldComputeSentiment': __expectBoolean,
600
+ 'speaker': __expectString,
601
+ 'start': __expectLong,
602
+ 'text': __expectString,
603
+ 'time': __expectLong,
604
+ });
605
+ };
606
+ const de_CallTranscriptionChunksList = (output, context) => {
607
+ const retVal = (output || []).filter((e) => e != null).map((entry) => {
608
+ return de_CallTranscriptionChunk(entry, context);
609
+ });
610
+ return retVal;
611
+ };
577
612
  const deserializeMetadata = (output) => ({
578
613
  httpStatusCode: output.statusCode,
579
614
  requestId: output.headers["x-amzn-requestid"] ?? output.headers["x-amzn-request-id"] ?? output.headers["x-amz-request-id"],
@@ -100,6 +100,7 @@ declare const GetCallCommand_base: {
100
100
  * // trunkDirection: "STRING_VALUE",
101
101
  * // queueName: "STRING_VALUE",
102
102
  * // queueId: "STRING_VALUE",
103
+ * // queuePosition: Number("int"),
103
104
  * // tags: [ // CallFlowTags
104
105
  * // "STRING_VALUE",
105
106
  * // ],
@@ -64,7 +64,9 @@ declare const GetCallTranscriptionCommand_base: {
64
64
  * // isFinal: true || false, // required
65
65
  * // start: Number("long"), // required
66
66
  * // end: Number("long"), // required
67
- * // sentiment: "STRING_VALUE",
67
+ * // confidence: Number("double"),
68
+ * // sentiment: "POSITIVE" || "NEGATIVE" || "MIXED" || "NEUTRAL",
69
+ * // shouldComputeSentiment: true || false,
68
70
  * // },
69
71
  * // ],
70
72
  * // },
@@ -183,6 +183,7 @@ declare const GetChatTranscriptionCommand_base: {
183
183
  * // whatsappStatus: "trying" || "sent" || "delivered" || "error",
184
184
  * // sms: true || false,
185
185
  * // smsStatus: "sent" || "delivered" || "trying" || "error",
186
+ * // markdown: true || false,
186
187
  * // type: "regular" || "system" || "deleted", // required
187
188
  * // giphy: {
188
189
  * // id: "STRING_VALUE", // required
@@ -179,6 +179,7 @@ declare const GetChatTranscriptionTextCommand_base: {
179
179
  * // whatsappStatus: "trying" || "sent" || "delivered" || "error",
180
180
  * // sms: true || false,
181
181
  * // smsStatus: "sent" || "delivered" || "trying" || "error",
182
+ * // markdown: true || false,
182
183
  * // type: "regular" || "system" || "deleted", // required
183
184
  * // giphy: {
184
185
  * // id: "STRING_VALUE", // required
@@ -60,7 +60,7 @@ declare const GetConferenceTranscriptionCommand_base: {
60
60
  * // isFinal: true || false, // required
61
61
  * // start: Number("long"), // required
62
62
  * // end: Number("long"), // required
63
- * // sentiment: "STRING_VALUE",
63
+ * // sentiment: "POSITIVE" || "NEGATIVE" || "MIXED" || "NEUTRAL",
64
64
  * // },
65
65
  * // ],
66
66
  * // },
@@ -117,6 +117,7 @@ declare const QueryConversationsCommand_base: {
117
117
  * // trunkDirection: "STRING_VALUE",
118
118
  * // queueName: "STRING_VALUE",
119
119
  * // queueId: "STRING_VALUE",
120
+ * // queuePosition: Number("int"),
120
121
  * // tags: [ // CallFlowTags
121
122
  * // "STRING_VALUE",
122
123
  * // ],
@@ -117,6 +117,7 @@ declare const QueryUserCallsCommand_base: {
117
117
  * // trunkDirection: "STRING_VALUE",
118
118
  * // queueName: "STRING_VALUE",
119
119
  * // queueId: "STRING_VALUE",
120
+ * // queuePosition: Number("int"),
120
121
  * // tags: [ // CallFlowTags
121
122
  * // "STRING_VALUE",
122
123
  * // ],
@@ -103,6 +103,7 @@ declare const UpdateCallCommand_base: {
103
103
  * // trunkDirection: "STRING_VALUE",
104
104
  * // queueName: "STRING_VALUE",
105
105
  * // queueId: "STRING_VALUE",
106
+ * // queuePosition: Number("int"),
106
107
  * // tags: [ // CallFlowTags
107
108
  * // "STRING_VALUE",
108
109
  * // ],
@@ -401,6 +401,11 @@ export interface CallRecord {
401
401
  trunkDirection?: string | undefined;
402
402
  queueName?: string | undefined;
403
403
  queueId?: string | undefined;
404
+ /**
405
+ * Position of the call in the queue (1-based). Updated from consume events and emitted on live progress and record flows.
406
+ * @public
407
+ */
408
+ queuePosition?: number | undefined;
404
409
  tags?: (string)[] | undefined;
405
410
  flags?: (string)[] | undefined;
406
411
  callerMos?: string | undefined;
@@ -560,6 +565,20 @@ export declare class CallTranscriptionNotFoundException extends __BaseException
560
565
  */
561
566
  constructor(opts: __ExceptionOptionType<CallTranscriptionNotFoundException, __BaseException>);
562
567
  }
568
+ /**
569
+ * @public
570
+ * @enum
571
+ */
572
+ export declare const TranscriptionSentiment: {
573
+ readonly MIXED: "MIXED";
574
+ readonly NEGATIVE: "NEGATIVE";
575
+ readonly NEUTRAL: "NEUTRAL";
576
+ readonly POSITIVE: "POSITIVE";
577
+ };
578
+ /**
579
+ * @public
580
+ */
581
+ export type TranscriptionSentiment = typeof TranscriptionSentiment[keyof typeof TranscriptionSentiment];
563
582
  /**
564
583
  * @public
565
584
  */
@@ -572,7 +591,21 @@ export interface CallTranscriptionChunk {
572
591
  isFinal: boolean;
573
592
  start: number;
574
593
  end: number;
575
- sentiment?: string | undefined;
594
+ /**
595
+ * Transcription confidence score (accuracy level) in range from 0.0 to 1.0. Value -1.0 indicates confidence is unavailable.
596
+ * @public
597
+ */
598
+ confidence?: number | undefined;
599
+ /**
600
+ * Sentiment label for a transcription chunk. Shared between calls and conferences.
601
+ * @public
602
+ */
603
+ sentiment?: TranscriptionSentiment | undefined;
604
+ /**
605
+ * Tristate gate populated upstream from caller/callee user-level licenses. `true` = at least one participant is on a whitelisted tier (currently `business` or `premium`). `false` = both participants are known and neither is whitelisted. Absent or null means upstream had no license info — downstream should fall through and compute sentiment (fail-open) to preserve the pre-feature behaviour.
606
+ * @public
607
+ */
608
+ shouldComputeSentiment?: boolean | undefined;
576
609
  }
577
610
  /**
578
611
  * @public
@@ -1170,6 +1203,7 @@ export interface Message {
1170
1203
  whatsappStatus?: MessageWhatsAppStatus | undefined;
1171
1204
  sms?: boolean | undefined;
1172
1205
  smsStatus?: MessageSmsStatus | undefined;
1206
+ markdown?: boolean | undefined;
1173
1207
  type: MessageType;
1174
1208
  giphy?: MessageGiphy | undefined;
1175
1209
  silent?: boolean | undefined;
@@ -1357,7 +1391,11 @@ export interface ConferenceTranscriptionChunk {
1357
1391
  isFinal: boolean;
1358
1392
  start: number;
1359
1393
  end: number;
1360
- sentiment?: string | undefined;
1394
+ /**
1395
+ * Sentiment label for a transcription chunk. Shared between calls and conferences.
1396
+ * @public
1397
+ */
1398
+ sentiment?: TranscriptionSentiment | undefined;
1361
1399
  }
1362
1400
  /**
1363
1401
  * @public
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.2.21",
4
+ "version": "1.2.24",
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",