@wildix/wda-history-client 1.0.24 → 1.0.26

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.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",
@@ -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",
@@ -106,11 +106,11 @@ declare const GetCallCommand_base: {
106
106
  * // "STRING_VALUE",
107
107
  * // ],
108
108
  * // recordingsData: [ // CallFlowRecordingsData
109
- * // { // RecordingsData
109
+ * // { // CallFlowRecording
110
110
  * // fileName: "STRING_VALUE", // required
111
111
  * // start: Number("long"), // required
112
112
  * // end: Number("long"), // required
113
- * // owner: "CALLEE" || "CALLER" || "SYSTEM", // required
113
+ * // owner: "callee" || "caller" || "system", // required
114
114
  * // url: "STRING_VALUE", // required
115
115
  * // pauses: [ // CallRecordPausesList // required
116
116
  * // { // CallRecordPause
@@ -145,6 +145,46 @@ declare const GetCallCommand_base: {
145
145
  * // groupName: "STRING_VALUE",
146
146
  * // },
147
147
  * // ],
148
+ * // attachments: [ // CallFlowAttachments
149
+ * // { // CallFlowAttachment Union: only one key present
150
+ * // recording: {
151
+ * // fileName: "STRING_VALUE", // required
152
+ * // start: Number("long"), // required
153
+ * // end: Number("long"), // required
154
+ * // owner: "callee" || "caller" || "system", // required
155
+ * // url: "STRING_VALUE", // required
156
+ * // pauses: [ // required
157
+ * // {
158
+ * // start: Number("long"),
159
+ * // end: Number("long"),
160
+ * // reason: "pause" || "hold",
161
+ * // },
162
+ * // ],
163
+ * // },
164
+ * // fax: { // CallFlowFax
165
+ * // url: "STRING_VALUE", // required
166
+ * // status: "STRING_VALUE",
167
+ * // destinations: [
168
+ * // {
169
+ * // phone: "STRING_VALUE",
170
+ * // name: "STRING_VALUE",
171
+ * // email: "STRING_VALUE",
172
+ * // userId: "STRING_VALUE",
173
+ * // userExtension: "STRING_VALUE",
174
+ * // userDepartment: "STRING_VALUE",
175
+ * // groupId: "STRING_VALUE",
176
+ * // groupName: "STRING_VALUE",
177
+ * // },
178
+ * // ],
179
+ * // owner: "callee" || "caller" || "system",
180
+ * // errorMsg: "STRING_VALUE",
181
+ * // },
182
+ * // voicemail: { // CallFlowVoicemail
183
+ * // url: "STRING_VALUE", // required
184
+ * // owner: "callee" || "caller" || "system",
185
+ * // },
186
+ * // },
187
+ * // ],
148
188
  * // id: "STRING_VALUE", // required
149
189
  * // pbx: "STRING_VALUE", // required
150
190
  * // time: Number("long"), // required
@@ -115,11 +115,11 @@ declare const QueryConversationsCommand_base: {
115
115
  * // "STRING_VALUE",
116
116
  * // ],
117
117
  * // recordingsData: [ // CallFlowRecordingsData
118
- * // { // RecordingsData
118
+ * // { // CallFlowRecording
119
119
  * // fileName: "STRING_VALUE", // required
120
120
  * // start: Number("long"), // required
121
121
  * // end: Number("long"), // required
122
- * // owner: "CALLEE" || "CALLER" || "SYSTEM", // required
122
+ * // owner: "callee" || "caller" || "system", // required
123
123
  * // url: "STRING_VALUE", // required
124
124
  * // pauses: [ // CallRecordPausesList // required
125
125
  * // { // CallRecordPause
@@ -154,6 +154,46 @@ declare const QueryConversationsCommand_base: {
154
154
  * // groupName: "STRING_VALUE",
155
155
  * // },
156
156
  * // ],
157
+ * // attachments: [ // CallFlowAttachments
158
+ * // { // CallFlowAttachment Union: only one key present
159
+ * // recording: {
160
+ * // fileName: "STRING_VALUE", // required
161
+ * // start: Number("long"), // required
162
+ * // end: Number("long"), // required
163
+ * // owner: "callee" || "caller" || "system", // required
164
+ * // url: "STRING_VALUE", // required
165
+ * // pauses: [ // required
166
+ * // {
167
+ * // start: Number("long"),
168
+ * // end: Number("long"),
169
+ * // reason: "pause" || "hold",
170
+ * // },
171
+ * // ],
172
+ * // },
173
+ * // fax: { // CallFlowFax
174
+ * // url: "STRING_VALUE", // required
175
+ * // status: "STRING_VALUE",
176
+ * // destinations: [
177
+ * // {
178
+ * // phone: "STRING_VALUE",
179
+ * // name: "STRING_VALUE",
180
+ * // email: "STRING_VALUE",
181
+ * // userId: "STRING_VALUE",
182
+ * // userExtension: "STRING_VALUE",
183
+ * // userDepartment: "STRING_VALUE",
184
+ * // groupId: "STRING_VALUE",
185
+ * // groupName: "STRING_VALUE",
186
+ * // },
187
+ * // ],
188
+ * // owner: "callee" || "caller" || "system",
189
+ * // errorMsg: "STRING_VALUE",
190
+ * // },
191
+ * // voicemail: { // CallFlowVoicemail
192
+ * // url: "STRING_VALUE", // required
193
+ * // owner: "callee" || "caller" || "system",
194
+ * // },
195
+ * // },
196
+ * // ],
157
197
  * // id: "STRING_VALUE", // required
158
198
  * // pbx: "STRING_VALUE", // required
159
199
  * // time: Number("long"), // required
@@ -115,11 +115,11 @@ declare const QueryUserCallsCommand_base: {
115
115
  * // "STRING_VALUE",
116
116
  * // ],
117
117
  * // recordingsData: [ // CallFlowRecordingsData
118
- * // { // RecordingsData
118
+ * // { // CallFlowRecording
119
119
  * // fileName: "STRING_VALUE", // required
120
120
  * // start: Number("long"), // required
121
121
  * // end: Number("long"), // required
122
- * // owner: "CALLEE" || "CALLER" || "SYSTEM", // required
122
+ * // owner: "callee" || "caller" || "system", // required
123
123
  * // url: "STRING_VALUE", // required
124
124
  * // pauses: [ // CallRecordPausesList // required
125
125
  * // { // CallRecordPause
@@ -154,6 +154,46 @@ declare const QueryUserCallsCommand_base: {
154
154
  * // groupName: "STRING_VALUE",
155
155
  * // },
156
156
  * // ],
157
+ * // attachments: [ // CallFlowAttachments
158
+ * // { // CallFlowAttachment Union: only one key present
159
+ * // recording: {
160
+ * // fileName: "STRING_VALUE", // required
161
+ * // start: Number("long"), // required
162
+ * // end: Number("long"), // required
163
+ * // owner: "callee" || "caller" || "system", // required
164
+ * // url: "STRING_VALUE", // required
165
+ * // pauses: [ // required
166
+ * // {
167
+ * // start: Number("long"),
168
+ * // end: Number("long"),
169
+ * // reason: "pause" || "hold",
170
+ * // },
171
+ * // ],
172
+ * // },
173
+ * // fax: { // CallFlowFax
174
+ * // url: "STRING_VALUE", // required
175
+ * // status: "STRING_VALUE",
176
+ * // destinations: [
177
+ * // {
178
+ * // phone: "STRING_VALUE",
179
+ * // name: "STRING_VALUE",
180
+ * // email: "STRING_VALUE",
181
+ * // userId: "STRING_VALUE",
182
+ * // userExtension: "STRING_VALUE",
183
+ * // userDepartment: "STRING_VALUE",
184
+ * // groupId: "STRING_VALUE",
185
+ * // groupName: "STRING_VALUE",
186
+ * // },
187
+ * // ],
188
+ * // owner: "callee" || "caller" || "system",
189
+ * // errorMsg: "STRING_VALUE",
190
+ * // },
191
+ * // voicemail: { // CallFlowVoicemail
192
+ * // url: "STRING_VALUE", // required
193
+ * // owner: "callee" || "caller" || "system",
194
+ * // },
195
+ * // },
196
+ * // ],
157
197
  * // id: "STRING_VALUE", // required
158
198
  * // pbx: "STRING_VALUE", // required
159
199
  * // time: Number("long"), // required
@@ -72,6 +72,110 @@ export interface CallFlowAttachmentDestination {
72
72
  groupId?: string;
73
73
  groupName?: string;
74
74
  }
75
+ /**
76
+ * @public
77
+ * @enum
78
+ */
79
+ export declare const CallRecordOwner: {
80
+ readonly CALLEE: "callee";
81
+ readonly CALLER: "caller";
82
+ readonly SYSTEM: "system";
83
+ };
84
+ /**
85
+ * @public
86
+ */
87
+ export type CallRecordOwner = typeof CallRecordOwner[keyof typeof CallRecordOwner];
88
+ /**
89
+ * @public
90
+ */
91
+ export interface CallFlowFax {
92
+ url: string;
93
+ status?: string;
94
+ destinations?: (CallFlowAttachmentDestination)[];
95
+ owner?: CallRecordOwner;
96
+ errorMsg?: string;
97
+ }
98
+ /**
99
+ * @public
100
+ * @enum
101
+ */
102
+ export declare const CallRecordPauseReason: {
103
+ readonly HOLD: "hold";
104
+ readonly PAUSE: "pause";
105
+ };
106
+ /**
107
+ * @public
108
+ */
109
+ export type CallRecordPauseReason = typeof CallRecordPauseReason[keyof typeof CallRecordPauseReason];
110
+ /**
111
+ * @public
112
+ */
113
+ export interface CallRecordPause {
114
+ start?: number;
115
+ end?: number;
116
+ reason?: CallRecordPauseReason;
117
+ }
118
+ /**
119
+ * @public
120
+ */
121
+ export interface CallFlowRecording {
122
+ fileName: string;
123
+ start: number;
124
+ end: number;
125
+ owner: CallRecordOwner;
126
+ url: string;
127
+ pauses: (CallRecordPause)[];
128
+ }
129
+ /**
130
+ * @public
131
+ */
132
+ export interface CallFlowVoicemail {
133
+ url: string;
134
+ owner?: CallRecordOwner;
135
+ }
136
+ /**
137
+ * @public
138
+ */
139
+ export type CallFlowAttachment = CallFlowAttachment.FaxMember | CallFlowAttachment.RecordingMember | CallFlowAttachment.VoicemailMember | CallFlowAttachment.$UnknownMember;
140
+ /**
141
+ * @public
142
+ */
143
+ export declare namespace CallFlowAttachment {
144
+ interface RecordingMember {
145
+ recording: CallFlowRecording;
146
+ fax?: never;
147
+ voicemail?: never;
148
+ $unknown?: never;
149
+ }
150
+ interface FaxMember {
151
+ recording?: never;
152
+ fax: CallFlowFax;
153
+ voicemail?: never;
154
+ $unknown?: never;
155
+ }
156
+ interface VoicemailMember {
157
+ recording?: never;
158
+ fax?: never;
159
+ voicemail: CallFlowVoicemail;
160
+ $unknown?: never;
161
+ }
162
+ /**
163
+ * @public
164
+ */
165
+ interface $UnknownMember {
166
+ recording?: never;
167
+ fax?: never;
168
+ voicemail?: never;
169
+ $unknown: [string, any];
170
+ }
171
+ interface Visitor<T> {
172
+ recording: (value: CallFlowRecording) => T;
173
+ fax: (value: CallFlowFax) => T;
174
+ voicemail: (value: CallFlowVoicemail) => T;
175
+ _: (name: string, value: any) => T;
176
+ }
177
+ const visit: <T>(value: CallFlowAttachment, visitor: Visitor<T>) => T;
178
+ }
75
179
  /**
76
180
  * @public
77
181
  * @enum
@@ -157,50 +261,6 @@ export declare const License: {
157
261
  * @public
158
262
  */
159
263
  export type License = typeof License[keyof typeof License];
160
- /**
161
- * @public
162
- * @enum
163
- */
164
- export declare const CallRecordOwner: {
165
- readonly CALLEE: "CALLEE";
166
- readonly CALLER: "CALLER";
167
- readonly SYSTEM: "SYSTEM";
168
- };
169
- /**
170
- * @public
171
- */
172
- export type CallRecordOwner = typeof CallRecordOwner[keyof typeof CallRecordOwner];
173
- /**
174
- * @public
175
- * @enum
176
- */
177
- export declare const CallRecordPauseReason: {
178
- readonly HOLD: "hold";
179
- readonly PAUSE: "pause";
180
- };
181
- /**
182
- * @public
183
- */
184
- export type CallRecordPauseReason = typeof CallRecordPauseReason[keyof typeof CallRecordPauseReason];
185
- /**
186
- * @public
187
- */
188
- export interface CallRecordPause {
189
- start?: number;
190
- end?: number;
191
- reason?: CallRecordPauseReason;
192
- }
193
- /**
194
- * @public
195
- */
196
- export interface RecordingsData {
197
- fileName: string;
198
- start: number;
199
- end: number;
200
- owner: CallRecordOwner;
201
- url: string;
202
- pauses: (CallRecordPause)[];
203
- }
204
264
  /**
205
265
  * @public
206
266
  * @enum
@@ -280,7 +340,7 @@ export interface CallRecord {
280
340
  calleeMos?: string;
281
341
  xhoppersConfId?: string;
282
342
  recordings?: (string)[];
283
- recordingsData?: (RecordingsData)[];
343
+ recordingsData?: (CallFlowRecording)[];
284
344
  mergeWith?: string;
285
345
  splitReason?: string;
286
346
  splitTransferType?: string;
@@ -294,6 +354,7 @@ export interface CallRecord {
294
354
  attachment?: string;
295
355
  attachmentType?: CallFlowAttachmentType;
296
356
  attachmentDestinations?: (CallFlowAttachmentDestination)[];
357
+ attachments?: (CallFlowAttachment)[];
297
358
  id: string;
298
359
  pbx: string;
299
360
  time: number;
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.24",
4
+ "version": "1.0.26",
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",