@wildix/wda-history-client 1.2.0 → 1.2.1

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.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;
3
+ exports.ConversationUserDirection = exports.ConversationFlag = exports.ConversationDirection = exports.Conversation = exports.ConferenceTranscriptionNotFoundException = exports.ConferenceTranscriptionStatus = exports.ConferenceParticipantType = exports.ConferenceParticipantRole = exports.PbxLicenseType = exports.ConferenceDirection = exports.ConferenceNotFoundException = 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.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
  name = "ValidationException";
@@ -114,6 +114,10 @@ exports.RecordType = {
114
114
  CONFERENCE: "conference",
115
115
  CONFERENCE_TRANSCRIPTION: "conference_transcription",
116
116
  };
117
+ exports.CallTranscriptionSpeaker = {
118
+ CALLEE: "callee",
119
+ CALLER: "caller",
120
+ };
117
121
  class CallTranscriptionNotFoundException extends WdaHistoryServiceException_1.WdaHistoryServiceException {
118
122
  name = "CallTranscriptionNotFoundException";
119
123
  $fault = "client";
@@ -127,10 +131,6 @@ class CallTranscriptionNotFoundException extends WdaHistoryServiceException_1.Wd
127
131
  }
128
132
  }
129
133
  exports.CallTranscriptionNotFoundException = CallTranscriptionNotFoundException;
130
- exports.CallTranscriptionSpeaker = {
131
- CALLEE: "callee",
132
- CALLER: "caller",
133
- };
134
134
  class ConferenceNotFoundException extends WdaHistoryServiceException_1.WdaHistoryServiceException {
135
135
  name = "ConferenceNotFoundException";
136
136
  $fault = "client";
@@ -197,6 +197,7 @@ const de_GetCallTranscriptionCommand = async (output, context) => {
197
197
  });
198
198
  const data = (0, smithy_client_1.expectNonNull)(((0, smithy_client_1.expectObject)(await (0, core_1.parseJsonBody)(output.body, context))), "body");
199
199
  const doc = (0, smithy_client_1.take)(data, {
200
+ 'interaction': _ => de_CallTranscriptionInteractionRecord(_, context),
200
201
  'transcription': smithy_client_1._json,
201
202
  });
202
203
  Object.assign(contents, doc);
@@ -244,6 +245,7 @@ const de_GetConferenceTranscriptionCommand = async (output, context) => {
244
245
  });
245
246
  const data = (0, smithy_client_1.expectNonNull)(((0, smithy_client_1.expectObject)(await (0, core_1.parseJsonBody)(output.body, context))), "body");
246
247
  const doc = (0, smithy_client_1.take)(data, {
248
+ 'interaction': _ => de_ConferenceTranscriptionInteractionRecord(_, context),
247
249
  'transcription': smithy_client_1._json,
248
250
  });
249
251
  Object.assign(contents, doc);
@@ -450,6 +452,28 @@ const se_QueryUserCallsFilter = (input, context) => {
450
452
  'userDirection': [],
451
453
  });
452
454
  };
455
+ const de_CallTranscriptionInteractionRecord = (output, context) => {
456
+ return (0, smithy_client_1.take)(output, {
457
+ 'interruptions': smithy_client_1.expectInt32,
458
+ 'longestCustomerStory': smithy_client_1.expectInt32,
459
+ 'longestMonologue': smithy_client_1.expectInt32,
460
+ 'participants': smithy_client_1._json,
461
+ 'patience': smithy_client_1.limitedParseFloat32,
462
+ 'talkRatio': smithy_client_1.expectInt32,
463
+ 'wordsPerMinute': smithy_client_1.expectInt32,
464
+ });
465
+ };
466
+ const de_ConferenceTranscriptionInteractionRecord = (output, context) => {
467
+ return (0, smithy_client_1.take)(output, {
468
+ 'interruptions': smithy_client_1.expectInt32,
469
+ 'longestCustomerStory': smithy_client_1.expectInt32,
470
+ 'longestMonologue': smithy_client_1.expectInt32,
471
+ 'participants': smithy_client_1._json,
472
+ 'patience': smithy_client_1.limitedParseFloat32,
473
+ 'talkRatio': smithy_client_1.expectInt32,
474
+ 'wordsPerMinute': smithy_client_1.expectInt32,
475
+ });
476
+ };
453
477
  const deserializeMetadata = (output) => ({
454
478
  httpStatusCode: output.statusCode,
455
479
  requestId: output.headers["x-amzn-requestid"] ?? output.headers["x-amzn-request-id"] ?? output.headers["x-amz-request-id"],
@@ -108,6 +108,10 @@ export const RecordType = {
108
108
  CONFERENCE: "conference",
109
109
  CONFERENCE_TRANSCRIPTION: "conference_transcription",
110
110
  };
111
+ export const CallTranscriptionSpeaker = {
112
+ CALLEE: "callee",
113
+ CALLER: "caller",
114
+ };
111
115
  export class CallTranscriptionNotFoundException extends __BaseException {
112
116
  name = "CallTranscriptionNotFoundException";
113
117
  $fault = "client";
@@ -120,10 +124,6 @@ export class CallTranscriptionNotFoundException extends __BaseException {
120
124
  Object.setPrototypeOf(this, CallTranscriptionNotFoundException.prototype);
121
125
  }
122
126
  }
123
- export const CallTranscriptionSpeaker = {
124
- CALLEE: "callee",
125
- CALLER: "caller",
126
- };
127
127
  export class ConferenceNotFoundException extends __BaseException {
128
128
  name = "ConferenceNotFoundException";
129
129
  $fault = "client";
@@ -2,7 +2,7 @@ import { WdaHistoryServiceException as __BaseException } from "../models/WdaHist
2
2
  import { CallNotFoundException, CallTranscriptionNotFoundException, 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, expectNonNull as __expectNonNull, expectObject as __expectObject, expectString as __expectString, serializeDateTime as __serializeDateTime, _json, collectBody, map, take, withBaseException, } from "@smithy/smithy-client";
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";
6
6
  export const se_GetCallCommand = async (input, context) => {
7
7
  const b = rb(input, context);
8
8
  const headers = {};
@@ -184,6 +184,7 @@ export const de_GetCallTranscriptionCommand = async (output, context) => {
184
184
  });
185
185
  const data = __expectNonNull((__expectObject(await parseBody(output.body, context))), "body");
186
186
  const doc = take(data, {
187
+ 'interaction': _ => de_CallTranscriptionInteractionRecord(_, context),
187
188
  'transcription': _json,
188
189
  });
189
190
  Object.assign(contents, doc);
@@ -228,6 +229,7 @@ export const de_GetConferenceTranscriptionCommand = async (output, context) => {
228
229
  });
229
230
  const data = __expectNonNull((__expectObject(await parseBody(output.body, context))), "body");
230
231
  const doc = take(data, {
232
+ 'interaction': _ => de_ConferenceTranscriptionInteractionRecord(_, context),
231
233
  'transcription': _json,
232
234
  });
233
235
  Object.assign(contents, doc);
@@ -429,6 +431,28 @@ const se_QueryUserCallsFilter = (input, context) => {
429
431
  'userDirection': [],
430
432
  });
431
433
  };
434
+ const de_CallTranscriptionInteractionRecord = (output, context) => {
435
+ return take(output, {
436
+ 'interruptions': __expectInt32,
437
+ 'longestCustomerStory': __expectInt32,
438
+ 'longestMonologue': __expectInt32,
439
+ 'participants': _json,
440
+ 'patience': __limitedParseFloat32,
441
+ 'talkRatio': __expectInt32,
442
+ 'wordsPerMinute': __expectInt32,
443
+ });
444
+ };
445
+ const de_ConferenceTranscriptionInteractionRecord = (output, context) => {
446
+ return take(output, {
447
+ 'interruptions': __expectInt32,
448
+ 'longestCustomerStory': __expectInt32,
449
+ 'longestMonologue': __expectInt32,
450
+ 'participants': _json,
451
+ 'patience': __limitedParseFloat32,
452
+ 'talkRatio': __expectInt32,
453
+ 'wordsPerMinute': __expectInt32,
454
+ });
455
+ };
432
456
  const deserializeMetadata = (output) => ({
433
457
  httpStatusCode: output.statusCode,
434
458
  requestId: output.headers["x-amzn-requestid"] ?? output.headers["x-amzn-request-id"] ?? output.headers["x-amz-request-id"],
@@ -68,6 +68,29 @@ declare const GetCallTranscriptionCommand_base: {
68
68
  * // },
69
69
  * // ],
70
70
  * // },
71
+ * // interaction: { // CallTranscriptionInteractionRecord
72
+ * // talkRatio: Number("int"),
73
+ * // wordsPerMinute: Number("int"),
74
+ * // interruptions: Number("int"),
75
+ * // patience: Number("float"),
76
+ * // longestMonologue: Number("int"),
77
+ * // longestCustomerStory: Number("int"),
78
+ * // participants: [ // CallTranscriptionInteractionParticipantsRecordsList
79
+ * // { // CallTranscriptionInteractionParticipantRecord
80
+ * // speaker: "callee" || "caller", // required
81
+ * // wordsPerMinute: Number("int"),
82
+ * // talkRatio: Number("int"),
83
+ * // interruptions: [ // CallTranscriptionInterruptionsList
84
+ * // { // CallTranscriptionInterruption
85
+ * // time: Number("long"), // required
86
+ * // chunks: [ // StringList // required
87
+ * // "STRING_VALUE",
88
+ * // ],
89
+ * // },
90
+ * // ],
91
+ * // },
92
+ * // ],
93
+ * // },
71
94
  * // };
72
95
  *
73
96
  * ```
@@ -66,6 +66,29 @@ declare const GetConferenceTranscriptionCommand_base: {
66
66
  * // },
67
67
  * // ],
68
68
  * // },
69
+ * // interaction: { // ConferenceTranscriptionInteractionRecord
70
+ * // talkRatio: Number("int"),
71
+ * // wordsPerMinute: Number("int"),
72
+ * // interruptions: Number("int"),
73
+ * // patience: Number("float"),
74
+ * // longestMonologue: Number("int"),
75
+ * // longestCustomerStory: Number("int"),
76
+ * // participants: [ // ConferenceTranscriptionInteractionParticipantsRecordsList
77
+ * // { // ConferenceTranscriptionInteractionParticipantRecord
78
+ * // jid: "STRING_VALUE", // required
79
+ * // wordsPerMinute: Number("int"),
80
+ * // talkRatio: Number("int"),
81
+ * // interruptions: [ // ConferenceTranscriptionInterruptionsList
82
+ * // { // ConferenceTranscriptionInterruption
83
+ * // time: Number("long"), // required
84
+ * // chunks: [ // StringList // required
85
+ * // "STRING_VALUE",
86
+ * // ],
87
+ * // },
88
+ * // ],
89
+ * // },
90
+ * // ],
91
+ * // },
69
92
  * // };
70
93
  *
71
94
  * ```
@@ -424,13 +424,17 @@ export interface CallRecord {
424
424
  /**
425
425
  * @public
426
426
  */
427
- export declare class CallTranscriptionNotFoundException extends __BaseException {
428
- readonly name: "CallTranscriptionNotFoundException";
429
- readonly $fault: "client";
427
+ export interface CallTranscriptionInterruption {
430
428
  /**
431
- * @internal
429
+ * Time in milliseconds from the start of the call (e.g., flowStartTime) when the interruption occurred.
430
+ * @public
432
431
  */
433
- constructor(opts: __ExceptionOptionType<CallTranscriptionNotFoundException, __BaseException>);
432
+ time: number;
433
+ /**
434
+ * IDs of the chunks involved in the interruption — including the interrupting speaker and the chunk that was interrupted.
435
+ * @public
436
+ */
437
+ chunks: (string)[];
434
438
  }
435
439
  /**
436
440
  * @public
@@ -444,6 +448,78 @@ export declare const CallTranscriptionSpeaker: {
444
448
  * @public
445
449
  */
446
450
  export type CallTranscriptionSpeaker = typeof CallTranscriptionSpeaker[keyof typeof CallTranscriptionSpeaker];
451
+ /**
452
+ * @public
453
+ */
454
+ export interface CallTranscriptionInteractionParticipantRecord {
455
+ speaker: CallTranscriptionSpeaker;
456
+ /**
457
+ * Average words per minute spoken by the participant during the call.
458
+ * @public
459
+ */
460
+ wordsPerMinute?: number | undefined;
461
+ /**
462
+ * Percentage of the call duration during which the participant was speaking.
463
+ * @public
464
+ */
465
+ talkRatio?: number | undefined;
466
+ /**
467
+ * List of interruptions where this participant was interrupted during the conversation.
468
+ * @public
469
+ */
470
+ interruptions?: (CallTranscriptionInterruption)[] | undefined;
471
+ }
472
+ /**
473
+ * @public
474
+ */
475
+ export interface CallTranscriptionInteractionRecord {
476
+ /**
477
+ * Percentage of the call duration during which the agent was speaking.
478
+ * @public
479
+ */
480
+ talkRatio?: number | undefined;
481
+ /**
482
+ * Average words per minute spoken by the agent during their speaking time.
483
+ * @public
484
+ */
485
+ wordsPerMinute?: number | undefined;
486
+ /**
487
+ * Number of times the agent interrupted another participant during the conversation.
488
+ * @public
489
+ */
490
+ interruptions?: number | undefined;
491
+ /**
492
+ * Average time in seconds the agent waited after another participant finished speaking before responding.
493
+ * @public
494
+ */
495
+ patience?: number | undefined;
496
+ /**
497
+ * Duration in seconds of the agent's longest uninterrupted monologue.
498
+ * @public
499
+ */
500
+ longestMonologue?: number | undefined;
501
+ /**
502
+ * Duration in seconds of another participant’s longest uninterrupted story or response.
503
+ * @public
504
+ */
505
+ longestCustomerStory?: number | undefined;
506
+ /**
507
+ * Detailed statistics for each call participant.
508
+ * @public
509
+ */
510
+ participants?: (CallTranscriptionInteractionParticipantRecord)[] | undefined;
511
+ }
512
+ /**
513
+ * @public
514
+ */
515
+ export declare class CallTranscriptionNotFoundException extends __BaseException {
516
+ readonly name: "CallTranscriptionNotFoundException";
517
+ readonly $fault: "client";
518
+ /**
519
+ * @internal
520
+ */
521
+ constructor(opts: __ExceptionOptionType<CallTranscriptionNotFoundException, __BaseException>);
522
+ }
447
523
  /**
448
524
  * @public
449
525
  */
@@ -636,6 +712,86 @@ export interface ConferenceTranscription {
636
712
  end: number;
637
713
  chunks: (ConferenceTranscriptionChunk)[];
638
714
  }
715
+ /**
716
+ * @public
717
+ */
718
+ export interface ConferenceTranscriptionInterruption {
719
+ /**
720
+ * Time in milliseconds from the start of the call (e.g., flowStartTime) when the interruption occurred.
721
+ * @public
722
+ */
723
+ time: number;
724
+ /**
725
+ * IDs of the conversation chunks involved in the interruption, including both the interrupting and interrupted speakers.
726
+ * @public
727
+ */
728
+ chunks: (string)[];
729
+ }
730
+ /**
731
+ * @public
732
+ */
733
+ export interface ConferenceTranscriptionInteractionParticipantRecord {
734
+ /**
735
+ * Unique identifier (JID) of the participant.
736
+ * @public
737
+ */
738
+ jid: string;
739
+ /**
740
+ * Average words per minute spoken by the participant during the call.
741
+ * @public
742
+ */
743
+ wordsPerMinute?: number | undefined;
744
+ /**
745
+ * Percentage of the call duration during which the participant was speaking.
746
+ * @public
747
+ */
748
+ talkRatio?: number | undefined;
749
+ /**
750
+ * List of interruptions where this participant interrupted or was interrupted during the conversation.
751
+ * @public
752
+ */
753
+ interruptions?: (ConferenceTranscriptionInterruption)[] | undefined;
754
+ }
755
+ /**
756
+ * @public
757
+ */
758
+ export interface ConferenceTranscriptionInteractionRecord {
759
+ /**
760
+ * Percentage of the call duration during which the agent was speaking.
761
+ * @public
762
+ */
763
+ talkRatio?: number | undefined;
764
+ /**
765
+ * Average words per minute spoken by the agent during their speaking time.
766
+ * @public
767
+ */
768
+ wordsPerMinute?: number | undefined;
769
+ /**
770
+ * Number of times the agent interrupted another participant during the conversation.
771
+ * @public
772
+ */
773
+ interruptions?: number | undefined;
774
+ /**
775
+ * Average time in seconds the agent waited after another participant finished speaking before responding.
776
+ * @public
777
+ */
778
+ patience?: number | undefined;
779
+ /**
780
+ * Duration in seconds of the agent's longest uninterrupted monologue.
781
+ * @public
782
+ */
783
+ longestMonologue?: number | undefined;
784
+ /**
785
+ * Duration in seconds of another participant’s longest uninterrupted story or response.
786
+ * @public
787
+ */
788
+ longestCustomerStory?: number | undefined;
789
+ /**
790
+ * Detailed statistics for each participant in the call.
791
+ * @public
792
+ */
793
+ participants?: (ConferenceTranscriptionInteractionParticipantRecord)[] | undefined;
794
+ }
639
795
  /**
640
796
  * @public
641
797
  */
@@ -717,6 +873,11 @@ export interface GetCallTranscriptionInput {
717
873
  */
718
874
  export interface GetCallTranscriptionOutput {
719
875
  transcription: CallTranscriptionRecord;
876
+ /**
877
+ * Aggregated interaction metrics and participant statistics derived from the call transcription.
878
+ * @public
879
+ */
880
+ interaction?: CallTranscriptionInteractionRecord | undefined;
720
881
  }
721
882
  /**
722
883
  * @public
@@ -769,6 +930,11 @@ export interface GetConferenceTranscriptionInput {
769
930
  */
770
931
  export interface GetConferenceTranscriptionOutput {
771
932
  transcription: ConferenceTranscriptionRecord;
933
+ /**
934
+ * Aggregated interaction metrics and participant statistics derived from the conference transcription.
935
+ * @public
936
+ */
937
+ interaction?: ConferenceTranscriptionInteractionRecord | undefined;
772
938
  }
773
939
  /**
774
940
  * @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.0",
4
+ "version": "1.2.1",
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",