o2g-node-sdk 2.5.0 → 2.5.2

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.
package/README.md CHANGED
@@ -50,6 +50,11 @@ await O2G.telephony.makeCall("1234", "5678");
50
50
  await O2G.shutdown();
51
51
  ```
52
52
 
53
+ ## Getting Started
54
+
55
+ New to TypeScript or Node.js? Follow the [Getting Started guide](GETTING_STARTED.md)
56
+ for a complete step-by-step walkthrough from installing the tools to your first login.
57
+
53
58
  ## Sessions
54
59
 
55
60
  Three types of sessions are supported:
@@ -166,20 +171,26 @@ await O2G.callCenterPilot.monitorStart("60141");
166
171
  ### Search the directory
167
172
 
168
173
  ```typescript
169
- import { O2G, Criteria, SearchResult } from 'o2g-node-sdk';
174
+ import { O2G, Criteria, FilterItem, OperationFilter, SearchResult } from 'o2g-node-sdk';
170
175
 
171
- const criteria = new Criteria({ lastName: "Smith" });
176
+ // Search users whose last name begins with "Smith"
177
+ const criteria = Criteria.create(FilterItem.LAST_NAME, OperationFilter.BEGINS_WITH, "Smith");
172
178
  await O2G.directory.search(criteria, 10);
173
179
 
174
180
  let finished = false;
175
181
  while (!finished) {
176
182
  const result = await O2G.directory.getResults();
177
- if (result?.resultCode === SearchResult.ResultCode.OK) {
178
- result.items.forEach(item => console.log(item.firstName, item.lastName));
179
- } else if (result?.resultCode === SearchResult.ResultCode.FINISH) {
180
- finished = true;
181
- } else {
183
+ if (result?.status === SearchResult.Status.NOK) {
184
+ // Search still in progress — wait before retrying
182
185
  await new Promise(resolve => setTimeout(resolve, 500));
186
+ } else if (result?.status === SearchResult.Status.OK) {
187
+ // Process available results
188
+ result.items?.forEach(item => {
189
+ item.contacts?.forEach(contact => console.log(contact.firstName, contact.lastName));
190
+ });
191
+ } else {
192
+ // FINISH or TIMEOUT — search is complete
193
+ finished = true;
183
194
  }
184
195
  }
185
196
  ```
@@ -227,10 +238,10 @@ await O2G.callCenterAgent.setReady();
227
238
  This SDK follows the O2G API version it targets:
228
239
 
229
240
  - **Major**: O2G API major version (currently 2)
230
- - **Minor**: O2G API patch version (currently 7.44)
241
+ - **Minor**: O2G API patch version (currently 7.55)
231
242
  - **Patch**: SDK release number
232
243
 
233
- For example, `2.4.0` targets O2G API version 2.7.4.
244
+ For example, `2.5.0` targets O2G API version 2.7.5.
234
245
 
235
246
  ## License
236
247
 
@@ -7167,8 +7167,11 @@ class RsiRest extends rest_service_1.RestService {
7167
7167
  return null;
7168
7168
  }
7169
7169
  }
7170
- async enableRsiPoint(rsiNumber) {
7171
- const uriPost = util_uri_1.default.appendPath(this._uri, assert_1.AssertUtil.notNullOrEmpty(rsiNumber, 'rsiNumber'), 'enable');
7170
+ async enableRsiPoint(rsiNumber, backup) {
7171
+ let uriPost = util_uri_1.default.appendPath(this._uri, assert_1.AssertUtil.notNullOrEmpty(rsiNumber, 'rsiNumber'), 'enable');
7172
+ if (backup) {
7173
+ uriPost = util_uri_1.default.appendQuery(uriPost, "backup");
7174
+ }
7172
7175
  const httpResponse = await this._httpClient.post(uriPost);
7173
7176
  return httpResponse.isSuccessStatusCode();
7174
7177
  }
@@ -15279,10 +15282,11 @@ class Rsi extends events_1.default {
15279
15282
  /**
15280
15283
  * Enables the specified rsi point.
15281
15284
  *
15282
- * @param rsiNumber the rsi point extension number
15285
+ * @param rsiNumber the rsi point extension number.
15286
+ * @param [backup=false] true to enable the RSI point in backup mode.
15283
15287
  */
15284
- async enableRsiPoint(rsiNumber) {
15285
- return __classPrivateFieldGet(this, _Rsi_rsiRest, "f").enableRsiPoint(rsiNumber);
15288
+ async enableRsiPoint(rsiNumber, backup = false) {
15289
+ return __classPrivateFieldGet(this, _Rsi_rsiRest, "f").enableRsiPoint(rsiNumber, backup);
15286
15290
  }
15287
15291
  /**
15288
15292
  * Disables the specified rsi point.
@@ -24218,6 +24222,283 @@ var DataObservationPeriod;
24218
24222
  })(DataObservationPeriod || (exports.DataObservationPeriod = DataObservationPeriod = {}));
24219
24223
 
24220
24224
 
24225
+ /***/ },
24226
+
24227
+ /***/ "./src/types/cc-stats/data/pil-aband-call-stat-row.ts"
24228
+ /*!************************************************************!*\
24229
+ !*** ./src/types/cc-stats/data/pil-aband-call-stat-row.ts ***!
24230
+ \************************************************************/
24231
+ (__unused_webpack_module, exports, __webpack_require__) {
24232
+
24233
+ "use strict";
24234
+
24235
+ /*
24236
+ * Copyright 2026 ALE International
24237
+ *
24238
+ * Permission is hereby granted, free of charge, to any person obtaining a copy of this
24239
+ * software and associated documentation files (the "Software"), to deal in the Software
24240
+ * without restriction, including without limitation the rights to use, copy, modify, merge,
24241
+ * publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons
24242
+ * to whom the Software is furnished to do so, subject to the following conditions:
24243
+ *
24244
+ * The above copyright notice and this permission notice shall be included in all copies or
24245
+ * substantial portions of the Software.
24246
+ *
24247
+ * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING
24248
+ * BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
24249
+ * NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM,
24250
+ * DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
24251
+ * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
24252
+ */
24253
+ var __classPrivateFieldSet = (this && this.__classPrivateFieldSet) || function (receiver, state, value, kind, f) {
24254
+ if (kind === "m") throw new TypeError("Private method is not writable");
24255
+ if (kind === "a" && !f) throw new TypeError("Private accessor was defined without a setter");
24256
+ if (typeof state === "function" ? receiver !== state || !f : !state.has(receiver)) throw new TypeError("Cannot write private member to an object whose class did not declare it");
24257
+ return (kind === "a" ? f.call(receiver, value) : f ? f.value = value : state.set(receiver, value)), value;
24258
+ };
24259
+ var __classPrivateFieldGet = (this && this.__classPrivateFieldGet) || function (receiver, state, kind, f) {
24260
+ if (kind === "a" && !f) throw new TypeError("Private accessor was defined without a getter");
24261
+ if (typeof state === "function" ? receiver !== state || !f : !state.has(receiver)) throw new TypeError("Cannot read private member from an object whose class did not declare it");
24262
+ return kind === "m" ? f : kind === "a" ? f.call(receiver) : f ? f.value : state.get(receiver);
24263
+ };
24264
+ var _PilotAbandonedCallsStatisticsRow_date, _PilotAbandonedCallsStatisticsRow_queueName, _PilotAbandonedCallsStatisticsRow_pilotName, _PilotAbandonedCallsStatisticsRow_pilotNumber, _PilotAbandonedCallsStatisticsRow_waitingTime;
24265
+ Object.defineProperty(exports, "__esModule", ({ value: true }));
24266
+ exports.PilotAbandonedCallsStatisticsRow = void 0;
24267
+ const stat_value_1 = __webpack_require__(/*! ./stat-value */ "./src/types/cc-stats/data/stat-value.ts");
24268
+ const pilot_abandoned_calls_attributes_1 = __webpack_require__(/*! ../pilot-abandoned-calls-attributes */ "./src/types/cc-stats/pilot-abandoned-calls-attributes.ts");
24269
+ /**
24270
+ * Represents a single row of abandoned call statistics for a CCD pilot.
24271
+ * <p>
24272
+ * Each row corresponds to one abandoned call event and provides the caller's
24273
+ * waiting time, the pilot and queue involved, and a set of boolean flags
24274
+ * indicating at which point in the call flow the caller hung up.
24275
+ * <p>
24276
+ * Boolean flag fields follow the O2G convention: `true` when the value is `1`,
24277
+ * absent (treated as `false`) when the field is not present in the response.
24278
+ * <p>
24279
+ * Rows are returned as part of a {@link StatisticsData} object via
24280
+ * {@link CallCenterStatistics.getDayData} or {@link CallCenterStatistics.getDaysData}.
24281
+ *
24282
+ * @see StatsPilotAbandonedCallAttributes
24283
+ * @see CallCenterStatistics.getDayData
24284
+ * @see CallCenterStatistics.getDaysData
24285
+ */
24286
+ class PilotAbandonedCallsStatisticsRow {
24287
+ /**
24288
+ * @internal
24289
+ */
24290
+ constructor(json) {
24291
+ this.values = new Map();
24292
+ _PilotAbandonedCallsStatisticsRow_date.set(this, void 0);
24293
+ _PilotAbandonedCallsStatisticsRow_queueName.set(this, void 0);
24294
+ _PilotAbandonedCallsStatisticsRow_pilotName.set(this, void 0);
24295
+ _PilotAbandonedCallsStatisticsRow_pilotNumber.set(this, void 0);
24296
+ _PilotAbandonedCallsStatisticsRow_waitingTime.set(this, void 0);
24297
+ this.initializeFromJson(json);
24298
+ }
24299
+ initializeFromJson(json) {
24300
+ if (json.date !== undefined)
24301
+ __classPrivateFieldSet(this, _PilotAbandonedCallsStatisticsRow_date, json.date, "f");
24302
+ if (json.queueName !== undefined)
24303
+ __classPrivateFieldSet(this, _PilotAbandonedCallsStatisticsRow_queueName, json.queueName, "f");
24304
+ if (json.pilotName !== undefined)
24305
+ __classPrivateFieldSet(this, _PilotAbandonedCallsStatisticsRow_pilotName, json.pilotName, "f");
24306
+ if (json.pilotNumber !== undefined)
24307
+ __classPrivateFieldSet(this, _PilotAbandonedCallsStatisticsRow_pilotNumber, json.pilotNumber, "f");
24308
+ if (json.waitingTime !== undefined)
24309
+ __classPrivateFieldSet(this, _PilotAbandonedCallsStatisticsRow_waitingTime, json.waitingTime, "f");
24310
+ for (const key in json) {
24311
+ const value = json[key];
24312
+ if (value !== undefined && typeof value !== 'string' && typeof value !== 'number' && value !== null)
24313
+ continue;
24314
+ const attr = Object.values(pilot_abandoned_calls_attributes_1.StatsPilotAbandonedCallsAttributes).find((e) => e === key);
24315
+ if (attr && (typeof value === 'string' || typeof value === 'number' || value === null)) {
24316
+ this.values.set(attr, new stat_value_1.StatValue(value));
24317
+ }
24318
+ }
24319
+ }
24320
+ /**
24321
+ * @internal
24322
+ */
24323
+ static fromJson(json) {
24324
+ return new PilotAbandonedCallsStatisticsRow(json);
24325
+ }
24326
+ /**
24327
+ * Returns the value of the specified statistical attribute for this row.
24328
+ * <p>
24329
+ * Always returns a {@link StatValue} — if the attribute is not present in
24330
+ * the data, a `StatValue` wrapping `null` is returned.
24331
+ *
24332
+ * @param attr the attribute to retrieve
24333
+ * @returns the {@link StatValue} for the specified attribute
24334
+ */
24335
+ get(attr) {
24336
+ if (attr === pilot_abandoned_calls_attributes_1.StatsPilotAbandonedCallsAttributes.ALL) {
24337
+ return new stat_value_1.StatValue(null);
24338
+ }
24339
+ return this.values.get(attr) ?? new stat_value_1.StatValue(null);
24340
+ }
24341
+ /**
24342
+ * The date this row was recorded.
24343
+ * <p>
24344
+ * For a single-day request the format is `yyyy-MM-dd'T'HH:mm`;
24345
+ * for a multi-day request the format is `yyyy-MM-dd`.
24346
+ *
24347
+ * @returns the date as a JavaScript `Date`, or `null` if not set
24348
+ */
24349
+ get dateValue() {
24350
+ if (!__classPrivateFieldGet(this, _PilotAbandonedCallsStatisticsRow_date, "f"))
24351
+ return null;
24352
+ const [year, month, day] = __classPrivateFieldGet(this, _PilotAbandonedCallsStatisticsRow_date, "f").split('-').map(Number);
24353
+ return new Date(year, month - 1, day);
24354
+ }
24355
+ /**
24356
+ * The name of the queue associated with this abandoned call.
24357
+ *
24358
+ * @returns the queue name, or `null` if not set
24359
+ */
24360
+ get queueNameValue() {
24361
+ return __classPrivateFieldGet(this, _PilotAbandonedCallsStatisticsRow_queueName, "f") ?? null;
24362
+ }
24363
+ /**
24364
+ * The total time in seconds the caller waited before hanging up.
24365
+ *
24366
+ * @returns the waiting time in seconds, or `null` if not set
24367
+ */
24368
+ get waitingTime() {
24369
+ return __classPrivateFieldGet(this, _PilotAbandonedCallsStatisticsRow_waitingTime, "f") ?? null;
24370
+ }
24371
+ /**
24372
+ * The name of the pilot on which the call was abandoned.
24373
+ *
24374
+ * @returns the pilot name, or `null` if not set
24375
+ */
24376
+ get pilotNameValue() {
24377
+ return __classPrivateFieldGet(this, _PilotAbandonedCallsStatisticsRow_pilotName, "f") ?? null;
24378
+ }
24379
+ /**
24380
+ * The phone number of the pilot on which the call was abandoned.
24381
+ *
24382
+ * @returns the pilot number, or `null` if not set
24383
+ */
24384
+ get pilotNumberValue() {
24385
+ return __classPrivateFieldGet(this, _PilotAbandonedCallsStatisticsRow_pilotNumber, "f") ?? null;
24386
+ }
24387
+ /**
24388
+ * Whether the caller abandoned during the greeting voice guide.
24389
+ * <p>
24390
+ * `true` when the value is `1`; `false` when absent.
24391
+ *
24392
+ * @returns `true` if the caller abandoned on the greeting voice guide; `false` otherwise
24393
+ */
24394
+ get abandonedOnGreetingVG() {
24395
+ return this.get(pilot_abandoned_calls_attributes_1.StatsPilotAbandonedCallsAttributes.abandonedOnGreetingVG).asBoolean() ?? false;
24396
+ }
24397
+ /**
24398
+ * Whether the caller abandoned during the 1st waiting voice guide.
24399
+ * <p>
24400
+ * `true` when the value is `1`; `false` when absent.
24401
+ *
24402
+ * @returns `true` if the caller abandoned on the 1st waiting voice guide; `false` otherwise
24403
+ */
24404
+ get abandonedOn1stWaitingVG() {
24405
+ return this.get(pilot_abandoned_calls_attributes_1.StatsPilotAbandonedCallsAttributes.abandonedOn1stWaitingVG).asBoolean() ?? false;
24406
+ }
24407
+ /**
24408
+ * Whether the caller abandoned during the 2nd waiting voice guide.
24409
+ * <p>
24410
+ * `true` when the value is `1`; `false` when absent.
24411
+ *
24412
+ * @returns `true` if the caller abandoned on the 2nd waiting voice guide; `false` otherwise
24413
+ */
24414
+ get abandonedOn2ndWaitingVG() {
24415
+ return this.get(pilot_abandoned_calls_attributes_1.StatsPilotAbandonedCallsAttributes.abandonedOn2ndWaitingVG).asBoolean() ?? false;
24416
+ }
24417
+ /**
24418
+ * Whether the caller abandoned during the 3rd waiting voice guide.
24419
+ * <p>
24420
+ * `true` when the value is `1`; `false` when absent.
24421
+ *
24422
+ * @returns `true` if the caller abandoned on the 3rd waiting voice guide; `false` otherwise
24423
+ */
24424
+ get abandonedOn3rdWaitingVG() {
24425
+ return this.get(pilot_abandoned_calls_attributes_1.StatsPilotAbandonedCallsAttributes.abandonedOn3rdWaitingVG).asBoolean() ?? false;
24426
+ }
24427
+ /**
24428
+ * Whether the caller abandoned during the 4th waiting voice guide.
24429
+ * <p>
24430
+ * `true` when the value is `1`; `false` when absent.
24431
+ *
24432
+ * @returns `true` if the caller abandoned on the 4th waiting voice guide; `false` otherwise
24433
+ */
24434
+ get abandonedOn4thWaitingVG() {
24435
+ return this.get(pilot_abandoned_calls_attributes_1.StatsPilotAbandonedCallsAttributes.abandonedOn4thWaitingVG).asBoolean() ?? false;
24436
+ }
24437
+ /**
24438
+ * Whether the caller abandoned during the 5th waiting voice guide.
24439
+ * <p>
24440
+ * `true` when the value is `1`; `false` when absent.
24441
+ *
24442
+ * @returns `true` if the caller abandoned on the 5th waiting voice guide; `false` otherwise
24443
+ */
24444
+ get abandonedOn5thWaitingVG() {
24445
+ return this.get(pilot_abandoned_calls_attributes_1.StatsPilotAbandonedCallsAttributes.abandonedOn5thWaitingVG).asBoolean() ?? false;
24446
+ }
24447
+ /**
24448
+ * Whether the caller abandoned during the 6th waiting voice guide.
24449
+ * <p>
24450
+ * `true` when the value is `1`; `false` when absent.
24451
+ *
24452
+ * @returns `true` if the caller abandoned on the 6th waiting voice guide; `false` otherwise
24453
+ */
24454
+ get abandonedOn6thWaitingVG() {
24455
+ return this.get(pilot_abandoned_calls_attributes_1.StatsPilotAbandonedCallsAttributes.abandonedOn6thWaitingVG).asBoolean() ?? false;
24456
+ }
24457
+ /**
24458
+ * Whether the caller abandoned while ringing an agent.
24459
+ * <p>
24460
+ * `true` when the value is `1`; `false` when absent.
24461
+ *
24462
+ * @returns `true` if the caller abandoned on ringing; `false` otherwise
24463
+ */
24464
+ get abandonedOnRinging() {
24465
+ return this.get(pilot_abandoned_calls_attributes_1.StatsPilotAbandonedCallsAttributes.abandonedOnRinging).asBoolean() ?? false;
24466
+ }
24467
+ /**
24468
+ * Whether the caller abandoned during the general forwarding voice guide.
24469
+ * <p>
24470
+ * `true` when the value is `1`; `false` when absent.
24471
+ *
24472
+ * @returns `true` if the caller abandoned on the general forwarding voice guide; `false` otherwise
24473
+ */
24474
+ get abandonedOnGeneralFwdVG() {
24475
+ return this.get(pilot_abandoned_calls_attributes_1.StatsPilotAbandonedCallsAttributes.abandonedOnGeneralFwdVG).asBoolean() ?? false;
24476
+ }
24477
+ /**
24478
+ * Whether the caller abandoned during the blocked voice guide.
24479
+ * <p>
24480
+ * `true` when the value is `1`; `false` when absent.
24481
+ *
24482
+ * @returns `true` if the caller abandoned on the blocked voice guide; `false` otherwise
24483
+ */
24484
+ get abandonedOnBlockedVG() {
24485
+ return this.get(pilot_abandoned_calls_attributes_1.StatsPilotAbandonedCallsAttributes.abandonedOnBlockedVG).asBoolean() ?? false;
24486
+ }
24487
+ /**
24488
+ * Whether the caller abandoned while waiting on a direct call to a busy agent.
24489
+ * <p>
24490
+ * `true` when the value is `1`; `false` when absent.
24491
+ *
24492
+ * @returns `true` if the caller abandoned on direct call waiting; `false` otherwise
24493
+ */
24494
+ get abandonedOnDirectCallWaiting() {
24495
+ return this.get(pilot_abandoned_calls_attributes_1.StatsPilotAbandonedCallsAttributes.abandonedOnDirectCallWaiting).asBoolean() ?? false;
24496
+ }
24497
+ }
24498
+ exports.PilotAbandonedCallsStatisticsRow = PilotAbandonedCallsStatisticsRow;
24499
+ _PilotAbandonedCallsStatisticsRow_date = new WeakMap(), _PilotAbandonedCallsStatisticsRow_queueName = new WeakMap(), _PilotAbandonedCallsStatisticsRow_pilotName = new WeakMap(), _PilotAbandonedCallsStatisticsRow_pilotNumber = new WeakMap(), _PilotAbandonedCallsStatisticsRow_waitingTime = new WeakMap();
24500
+
24501
+
24221
24502
  /***/ },
24222
24503
 
24223
24504
  /***/ "./src/types/cc-stats/data/pil-stats-row.ts"
@@ -25343,6 +25624,24 @@ class StatValue {
25343
25624
  return null;
25344
25625
  return this.value.toString();
25345
25626
  }
25627
+ /**
25628
+ * Returns the value as a boolean.
25629
+ * <p>
25630
+ * The following values are interpreted as `true`: `"true"`, `"1"`, `1`.
25631
+ * The following values are interpreted as `false`: `"false"`, `"0"`, `0`.
25632
+ * All other values return `false`.
25633
+ *
25634
+ * @returns the boolean value, or `false` if the value is not set or cannot be interpreted as a boolean
25635
+ */
25636
+ asBoolean() {
25637
+ if (this.value === null)
25638
+ return false;
25639
+ if (this.value === 1 || this.value === 'true' || this.value === '1')
25640
+ return true;
25641
+ if (this.value === 0 || this.value === 'false' || this.value === '0')
25642
+ return false;
25643
+ return false;
25644
+ }
25346
25645
  /**
25347
25646
  * Returns the value as a duration string in `hh:mm:ss` format.
25348
25647
  *
@@ -25394,10 +25693,11 @@ var __classPrivateFieldGet = (this && this.__classPrivateFieldGet) || function (
25394
25693
  if (typeof state === "function" ? receiver !== state || !f : !state.has(receiver)) throw new TypeError("Cannot read private member from an object whose class did not declare it");
25395
25694
  return kind === "m" ? f : kind === "a" ? f.call(receiver) : f ? f.value : state.get(receiver);
25396
25695
  };
25397
- var _ObjectStatistics_timeSlot, _ObjectStatistics_selectedPeriod, _ObjectStatistics_rows, _StatisticsData_supervisor, _StatisticsData_agentsStats, _StatisticsData_pilotsStats;
25696
+ var _BasicObjectStatistics_selectedPeriod, _BasicObjectStatistics_rows, _ObjectStatistics_timeSlot, _StatisticsData_supervisor, _StatisticsData_agentsStats, _StatisticsData_pilotsStats, _StatisticsData_pilotAbandonedCalls;
25398
25697
  Object.defineProperty(exports, "__esModule", ({ value: true }));
25399
- exports.StatisticsData = exports.ObjectStatistics = void 0;
25698
+ exports.StatisticsData = exports.ObjectStatistics = exports.BasicObjectStatistics = void 0;
25400
25699
  const ag_stats_row_1 = __webpack_require__(/*! ./ag-stats-row */ "./src/types/cc-stats/data/ag-stats-row.ts");
25700
+ const pil_aband_call_stat_row_1 = __webpack_require__(/*! ./pil-aband-call-stat-row */ "./src/types/cc-stats/data/pil-aband-call-stat-row.ts");
25401
25701
  const pil_stats_row_1 = __webpack_require__(/*! ./pil-stats-row */ "./src/types/cc-stats/data/pil-stats-row.ts");
25402
25702
  const selected_period_1 = __webpack_require__(/*! ./selected-period */ "./src/types/cc-stats/data/selected-period.ts");
25403
25703
  /**
@@ -25417,17 +25717,64 @@ const selected_period_1 = __webpack_require__(/*! ./selected-period */ "./src/ty
25417
25717
  * @see CallCenterStatistics.getDayData
25418
25718
  * @see CallCenterStatistics.getDaysData
25419
25719
  */
25420
- class ObjectStatistics {
25720
+ class BasicObjectStatistics {
25721
+ /**
25722
+ * @internal
25723
+ */
25724
+ constructor(selectedPeriod, rows) {
25725
+ _BasicObjectStatistics_selectedPeriod.set(this, void 0);
25726
+ _BasicObjectStatistics_rows.set(this, void 0);
25727
+ __classPrivateFieldSet(this, _BasicObjectStatistics_selectedPeriod, selectedPeriod, "f");
25728
+ __classPrivateFieldSet(this, _BasicObjectStatistics_rows, rows, "f");
25729
+ }
25730
+ /**
25731
+ * The selected period during which these statistics were collected.
25732
+ */
25733
+ get selectedPeriod() {
25734
+ return __classPrivateFieldGet(this, _BasicObjectStatistics_selectedPeriod, "f") ?? null;
25735
+ }
25736
+ /**
25737
+ * The list of statistics rows collected for this time slot and period.
25738
+ */
25739
+ get rows() {
25740
+ return __classPrivateFieldGet(this, _BasicObjectStatistics_rows, "f") ?? null;
25741
+ }
25742
+ /**
25743
+ * @internal
25744
+ */
25745
+ static fromJson(json, rowFactory) {
25746
+ const selectedPeriod = selected_period_1.SelectedPeriod.fromJson(json.selectedPeriod);
25747
+ const rows = json.rows?.map(rowFactory);
25748
+ return new BasicObjectStatistics(selectedPeriod, rows);
25749
+ }
25750
+ }
25751
+ exports.BasicObjectStatistics = BasicObjectStatistics;
25752
+ _BasicObjectStatistics_selectedPeriod = new WeakMap(), _BasicObjectStatistics_rows = new WeakMap();
25753
+ /**
25754
+ * Represents the statistical results for a specific observation period and time slot.
25755
+ * <p>
25756
+ * Each `ObjectStatistics<T>` instance groups the data rows collected for a given
25757
+ * {@link SelectedPeriod} and an optional time slot (e.g. a 15-minute or hourly interval).
25758
+ * <p>
25759
+ * The class is generic and can represent either agent-level or pilot-level statistics:
25760
+ * <ul>
25761
+ * <li>`ObjectStatistics<AgentStatisticsRow>` — for agent statistics</li>
25762
+ * <li>`ObjectStatistics<PilotStatisticsRow>` — for pilot statistics</li>
25763
+ * </ul>
25764
+ *
25765
+ * @template T the type of the statistics row, either `AgentStatisticsRow` or `PilotStatisticsRow`
25766
+ * @see StatisticsData
25767
+ * @see CallCenterStatistics.getDayData
25768
+ * @see CallCenterStatistics.getDaysData
25769
+ */
25770
+ class ObjectStatistics extends BasicObjectStatistics {
25421
25771
  /**
25422
25772
  * @internal
25423
25773
  */
25424
25774
  constructor(timeSlot, selectedPeriod, rows) {
25775
+ super(selectedPeriod, rows);
25425
25776
  _ObjectStatistics_timeSlot.set(this, void 0);
25426
- _ObjectStatistics_selectedPeriod.set(this, void 0);
25427
- _ObjectStatistics_rows.set(this, void 0);
25428
25777
  __classPrivateFieldSet(this, _ObjectStatistics_timeSlot, timeSlot, "f");
25429
- __classPrivateFieldSet(this, _ObjectStatistics_selectedPeriod, selectedPeriod, "f");
25430
- __classPrivateFieldSet(this, _ObjectStatistics_rows, rows, "f");
25431
25778
  }
25432
25779
  /**
25433
25780
  * The start date and time of this time slot.
@@ -25440,18 +25787,6 @@ class ObjectStatistics {
25440
25787
  return null;
25441
25788
  return new Date(__classPrivateFieldGet(this, _ObjectStatistics_timeSlot, "f"));
25442
25789
  }
25443
- /**
25444
- * The selected period during which these statistics were collected.
25445
- */
25446
- get selectedPeriod() {
25447
- return __classPrivateFieldGet(this, _ObjectStatistics_selectedPeriod, "f") ?? null;
25448
- }
25449
- /**
25450
- * The list of statistics rows collected for this time slot and period.
25451
- */
25452
- get rows() {
25453
- return __classPrivateFieldGet(this, _ObjectStatistics_rows, "f") ?? null;
25454
- }
25455
25790
  /**
25456
25791
  * @internal
25457
25792
  */
@@ -25462,7 +25797,7 @@ class ObjectStatistics {
25462
25797
  }
25463
25798
  }
25464
25799
  exports.ObjectStatistics = ObjectStatistics;
25465
- _ObjectStatistics_timeSlot = new WeakMap(), _ObjectStatistics_selectedPeriod = new WeakMap(), _ObjectStatistics_rows = new WeakMap();
25800
+ _ObjectStatistics_timeSlot = new WeakMap();
25466
25801
  /**
25467
25802
  * Represents the statistical data returned for a requester, including agent-level
25468
25803
  * and pilot-level statistics grouped by time slot and observation period.
@@ -25477,13 +25812,15 @@ class StatisticsData {
25477
25812
  /**
25478
25813
  * @internal
25479
25814
  */
25480
- constructor(supervisor, agentsStats, pilotsStats) {
25815
+ constructor(supervisor, agentsStats, pilotsStats, pilotAbandonedCalls) {
25481
25816
  _StatisticsData_supervisor.set(this, void 0);
25482
25817
  _StatisticsData_agentsStats.set(this, void 0);
25483
25818
  _StatisticsData_pilotsStats.set(this, void 0);
25819
+ _StatisticsData_pilotAbandonedCalls.set(this, void 0);
25484
25820
  __classPrivateFieldSet(this, _StatisticsData_supervisor, supervisor, "f");
25485
25821
  __classPrivateFieldSet(this, _StatisticsData_agentsStats, agentsStats, "f");
25486
25822
  __classPrivateFieldSet(this, _StatisticsData_pilotsStats, pilotsStats, "f");
25823
+ __classPrivateFieldSet(this, _StatisticsData_pilotAbandonedCalls, pilotAbandonedCalls, "f");
25487
25824
  }
25488
25825
  /**
25489
25826
  * The identifier of the requester (supervisor) for whom the statistics were retrieved.
@@ -25503,17 +25840,24 @@ class StatisticsData {
25503
25840
  get pilotsStats() {
25504
25841
  return __classPrivateFieldGet(this, _StatisticsData_pilotsStats, "f");
25505
25842
  }
25843
+ /**
25844
+ * The pilot abandoned calls.
25845
+ */
25846
+ get pilotAbandonedCalls() {
25847
+ return __classPrivateFieldGet(this, _StatisticsData_pilotAbandonedCalls, "f");
25848
+ }
25506
25849
  /**
25507
25850
  * @internal
25508
25851
  */
25509
25852
  static fromJson(json) {
25510
25853
  const agentsStats = json.agentsStats?.map((statJson) => ObjectStatistics.fromJson(statJson, ag_stats_row_1.AgentStatisticsRow.fromJson));
25511
25854
  const pilotsStats = json.pilotsStats?.map((statJson) => ObjectStatistics.fromJson(statJson, pil_stats_row_1.PilotStatisticsRow.fromJson));
25855
+ const pilotAbandonedCalls = json.pilotAbandonedCalls ? BasicObjectStatistics.fromJson(json.pilotAbandonedCalls, pil_aband_call_stat_row_1.PilotAbandonedCallsStatisticsRow.fromJson) : undefined;
25512
25856
  return new StatisticsData(json.supervisor, agentsStats, pilotsStats);
25513
25857
  }
25514
25858
  }
25515
25859
  exports.StatisticsData = StatisticsData;
25516
- _StatisticsData_supervisor = new WeakMap(), _StatisticsData_agentsStats = new WeakMap(), _StatisticsData_pilotsStats = new WeakMap();
25860
+ _StatisticsData_supervisor = new WeakMap(), _StatisticsData_agentsStats = new WeakMap(), _StatisticsData_pilotsStats = new WeakMap(), _StatisticsData_pilotAbandonedCalls = new WeakMap();
25517
25861
 
25518
25862
 
25519
25863
  /***/ },
@@ -25646,6 +25990,86 @@ var Language;
25646
25990
  })(Language || (exports.Language = Language = {}));
25647
25991
 
25648
25992
 
25993
+ /***/ },
25994
+
25995
+ /***/ "./src/types/cc-stats/pilot-abandoned-calls-attributes.ts"
25996
+ /*!****************************************************************!*\
25997
+ !*** ./src/types/cc-stats/pilot-abandoned-calls-attributes.ts ***!
25998
+ \****************************************************************/
25999
+ (__unused_webpack_module, exports) {
26000
+
26001
+ "use strict";
26002
+
26003
+ /*
26004
+ * Copyright 2026 ALE International
26005
+ *
26006
+ * Permission is hereby granted, free of charge, to any person obtaining a copy of this
26007
+ * software and associated documentation files (the "Software"), to deal in the Software
26008
+ * without restriction, including without limitation the rights to use, copy, modify, merge,
26009
+ * publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons
26010
+ * to whom the Software is furnished to do so, subject to the following conditions:
26011
+ *
26012
+ * The above copyright notice and this permission notice shall be included in all copies or
26013
+ * substantial portions of the Software.
26014
+ *
26015
+ * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING
26016
+ * BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
26017
+ * NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM,
26018
+ * DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
26019
+ * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
26020
+ */
26021
+ Object.defineProperty(exports, "__esModule", ({ value: true }));
26022
+ exports.StatsPilotAbandonedCallsAttributes = void 0;
26023
+ /**
26024
+ * `StatsPilotAbandonedCallsAttributes` defines the set of statistical attributes
26025
+ * available for abandoned calls on a CCD pilot.
26026
+ *
26027
+ * These attributes are used in reports generated by `CallCenterStatisticsService`
26028
+ * to provide insight into call abandonment patterns on a pilot, including when
26029
+ * and where in the call flow the caller hung up.
26030
+ *
26031
+ * **Note:** The `ALL` attribute is intended for use in context creation only and
26032
+ * should not be used in production reporting contexts.
26033
+ *
26034
+ * @since 2.7.5
26035
+ */
26036
+ var StatsPilotAbandonedCallsAttributes;
26037
+ (function (StatsPilotAbandonedCallsAttributes) {
26038
+ /** Total time in seconds the caller waited before hanging up. */
26039
+ StatsPilotAbandonedCallsAttributes["waitingTime"] = "waitingTime";
26040
+ /** The name of the pilot. */
26041
+ StatsPilotAbandonedCallsAttributes["pilotName"] = "pilotName";
26042
+ /** The number of the pilot. */
26043
+ StatsPilotAbandonedCallsAttributes["pilotNumber"] = "pilotNumber";
26044
+ /** The phone number of the caller. */
26045
+ StatsPilotAbandonedCallsAttributes["callerNumber"] = "callerNumber";
26046
+ /** The caller abandoned during the greeting voice guide. */
26047
+ StatsPilotAbandonedCallsAttributes["abandonedOnGreetingVG"] = "abandonedOnGreetingVG";
26048
+ /** The caller abandoned during the 1st waiting voice guide. */
26049
+ StatsPilotAbandonedCallsAttributes["abandonedOn1stWaitingVG"] = "abandonedOn1stWaitingVG";
26050
+ /** The caller abandoned during the 2nd waiting voice guide. */
26051
+ StatsPilotAbandonedCallsAttributes["abandonedOn2ndWaitingVG"] = "abandonedOn2ndWaitingVG";
26052
+ /** The caller abandoned during the 3rd waiting voice guide. */
26053
+ StatsPilotAbandonedCallsAttributes["abandonedOn3rdWaitingVG"] = "abandonedOn3rdWaitingVG";
26054
+ /** The caller abandoned during the 4th waiting voice guide. */
26055
+ StatsPilotAbandonedCallsAttributes["abandonedOn4thWaitingVG"] = "abandonedOn4thWaitingVG";
26056
+ /** The caller abandoned during the 5th waiting voice guide. */
26057
+ StatsPilotAbandonedCallsAttributes["abandonedOn5thWaitingVG"] = "abandonedOn5thWaitingVG";
26058
+ /** The caller abandoned during the 6th waiting voice guide. */
26059
+ StatsPilotAbandonedCallsAttributes["abandonedOn6thWaitingVG"] = "abandonedOn6thWaitingVG";
26060
+ /** The caller abandoned while ringing an agent. */
26061
+ StatsPilotAbandonedCallsAttributes["abandonedOnRinging"] = "abandonedOnRinging";
26062
+ /** The caller abandoned during the general forwarding voice guide. */
26063
+ StatsPilotAbandonedCallsAttributes["abandonedOnGeneralFwdVG"] = "abandonedOnGeneralFwdVG";
26064
+ /** The caller abandoned during the blocked voice guide. */
26065
+ StatsPilotAbandonedCallsAttributes["abandonedOnBlockedVG"] = "abandonedOnBlockedVG";
26066
+ /** The caller abandoned while waiting on a direct call to a busy agent. */
26067
+ StatsPilotAbandonedCallsAttributes["abandonedOnDirectCallWaiting"] = "abandonedOnDirectCallWaiting";
26068
+ /** All attributes — for use in context creation only. */
26069
+ StatsPilotAbandonedCallsAttributes["ALL"] = "ALL";
26070
+ })(StatsPilotAbandonedCallsAttributes || (exports.StatsPilotAbandonedCallsAttributes = StatsPilotAbandonedCallsAttributes = {}));
26071
+
26072
+
25649
26073
  /***/ },
25650
26074
 
25651
26075
  /***/ "./src/types/cc-stats/pilot-attributes.ts"