webitel-sdk 23.7.5 → 23.7.7

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.
Files changed (46) hide show
  1. package/bundles/index.esm.js +95 -36
  2. package/bundles/index.esm.js.map +1 -1
  3. package/bundles/index.esm.min.js +1 -1
  4. package/bundles/index.esm.min.js.map +1 -1
  5. package/bundles/index.umd.js +96 -37
  6. package/bundles/index.umd.js.map +1 -1
  7. package/bundles/index.umd.min.js +1 -1
  8. package/bundles/index.umd.min.js.map +1 -1
  9. package/esm2015/api/calendar-service-api.js +28 -7
  10. package/esm2015/api/calendar-service-api.js.map +1 -1
  11. package/esm2015/api/config-service-api.js +14 -7
  12. package/esm2015/api/config-service-api.js.map +1 -1
  13. package/esm2015/api/index.js +1 -0
  14. package/esm2015/api/index.js.map +1 -1
  15. package/esm2015/api/logger-config-status.js +13 -0
  16. package/esm2015/api/logger-config-status.js.map +1 -0
  17. package/esm2015/api/logger-service-api.js +14 -14
  18. package/esm2015/api/logger-service-api.js.map +1 -1
  19. package/esm2015/socket/agent.js +26 -8
  20. package/esm2015/socket/agent.js.map +1 -1
  21. package/esm5/api/calendar-service-api.js +28 -7
  22. package/esm5/api/calendar-service-api.js.map +1 -1
  23. package/esm5/api/config-service-api.js +14 -7
  24. package/esm5/api/config-service-api.js.map +1 -1
  25. package/esm5/api/index.js +1 -0
  26. package/esm5/api/index.js.map +1 -1
  27. package/esm5/api/logger-config-status.js +13 -0
  28. package/esm5/api/logger-config-status.js.map +1 -0
  29. package/esm5/api/logger-service-api.js +14 -14
  30. package/esm5/api/logger-service-api.js.map +1 -1
  31. package/esm5/socket/agent.js +27 -9
  32. package/esm5/socket/agent.js.map +1 -1
  33. package/package.json +1 -1
  34. package/types/api/calendar-service-api.d.ts +16 -4
  35. package/types/api/calendar-service-api.d.ts.map +1 -1
  36. package/types/api/config-service-api.d.ts +8 -4
  37. package/types/api/config-service-api.d.ts.map +1 -1
  38. package/types/api/index.d.ts +1 -0
  39. package/types/api/index.d.ts.map +1 -1
  40. package/types/api/logger-config-status.d.ts +25 -0
  41. package/types/api/logger-config-status.d.ts.map +1 -0
  42. package/types/api/logger-log.d.ts +6 -0
  43. package/types/api/logger-log.d.ts.map +1 -1
  44. package/types/api/logger-service-api.d.ts +8 -8
  45. package/types/socket/agent.d.ts +2 -1
  46. package/types/socket/agent.d.ts.map +1 -1
@@ -7205,10 +7205,13 @@ const CalendarServiceApiAxiosParamCreator = function (configuration) {
7205
7205
  * @param {number} [page]
7206
7206
  * @param {number} [size]
7207
7207
  * @param {string} [q]
7208
+ * @param {string} [sort]
7209
+ * @param {Array<string>} [fields]
7210
+ * @param {Array<number>} [id]
7208
7211
  * @param {*} [options] Override http request option.
7209
7212
  * @throws {RequiredError}
7210
7213
  */
7211
- searchTimezones: async (page, size, q, options = {}) => {
7214
+ searchTimezones: async (page, size, q, sort, fields, id, options = {}) => {
7212
7215
  const localVarPath = `/calendars/timezones`;
7213
7216
  const localVarUrlObj = parse(localVarPath, true);
7214
7217
  let baseOptions;
@@ -7238,6 +7241,15 @@ const CalendarServiceApiAxiosParamCreator = function (configuration) {
7238
7241
  if (q !== undefined) {
7239
7242
  localVarQueryParameter['q'] = q;
7240
7243
  }
7244
+ if (sort !== undefined) {
7245
+ localVarQueryParameter['sort'] = sort;
7246
+ }
7247
+ if (fields) {
7248
+ localVarQueryParameter['fields'] = fields;
7249
+ }
7250
+ if (id) {
7251
+ localVarQueryParameter['id'] = id;
7252
+ }
7241
7253
  localVarUrlObj.query = {
7242
7254
  ...localVarUrlObj.query,
7243
7255
  ...localVarQueryParameter,
@@ -7406,11 +7418,14 @@ const CalendarServiceApiFp = function (configuration) {
7406
7418
  * @param {number} [page]
7407
7419
  * @param {number} [size]
7408
7420
  * @param {string} [q]
7421
+ * @param {string} [sort]
7422
+ * @param {Array<string>} [fields]
7423
+ * @param {Array<number>} [id]
7409
7424
  * @param {*} [options] Override http request option.
7410
7425
  * @throws {RequiredError}
7411
7426
  */
7412
- async searchTimezones(page, size, q, options) {
7413
- const localVarAxiosArgs = await CalendarServiceApiAxiosParamCreator(configuration).searchTimezones(page, size, q, options);
7427
+ async searchTimezones(page, size, q, sort, fields, id, options) {
7428
+ const localVarAxiosArgs = await CalendarServiceApiAxiosParamCreator(configuration).searchTimezones(page, size, q, sort, fields, id, options);
7414
7429
  return (axios = globalAxios, basePath = BASE_PATH) => {
7415
7430
  const axiosRequestArgs = {
7416
7431
  ...localVarAxiosArgs.options,
@@ -7506,12 +7521,15 @@ const CalendarServiceApiFactory = function (configuration, basePath, axios) {
7506
7521
  * @param {number} [page]
7507
7522
  * @param {number} [size]
7508
7523
  * @param {string} [q]
7524
+ * @param {string} [sort]
7525
+ * @param {Array<string>} [fields]
7526
+ * @param {Array<number>} [id]
7509
7527
  * @param {*} [options] Override http request option.
7510
7528
  * @throws {RequiredError}
7511
7529
  */
7512
- searchTimezones(page, size, q, options) {
7530
+ searchTimezones(page, size, q, sort, fields, id, options) {
7513
7531
  return CalendarServiceApiFp(configuration)
7514
- .searchTimezones(page, size, q, options)
7532
+ .searchTimezones(page, size, q, sort, fields, id, options)
7515
7533
  .then((request) => request(axios, basePath));
7516
7534
  },
7517
7535
  /**
@@ -7601,13 +7619,16 @@ class CalendarServiceApi extends BaseAPI {
7601
7619
  * @param {number} [page]
7602
7620
  * @param {number} [size]
7603
7621
  * @param {string} [q]
7622
+ * @param {string} [sort]
7623
+ * @param {Array<string>} [fields]
7624
+ * @param {Array<number>} [id]
7604
7625
  * @param {*} [options] Override http request option.
7605
7626
  * @throws {RequiredError}
7606
7627
  * @memberof CalendarServiceApi
7607
7628
  */
7608
- searchTimezones(page, size, q, options) {
7629
+ searchTimezones(page, size, q, sort, fields, id, options) {
7609
7630
  return CalendarServiceApiFp(this.configuration)
7610
- .searchTimezones(page, size, q, options)
7631
+ .searchTimezones(page, size, q, sort, fields, id, options)
7611
7632
  .then((request) => request(this.axios, this.basePath));
7612
7633
  }
7613
7634
  /**
@@ -11605,10 +11626,11 @@ const ConfigServiceApiAxiosParamCreator = function (configuration) {
11605
11626
  },
11606
11627
  /**
11607
11628
  *
11629
+ * @param {boolean} [includeExisting]
11608
11630
  * @param {*} [options] Override http request option.
11609
11631
  * @throws {RequiredError}
11610
11632
  */
11611
- readSystemObjects: async (options = {}) => {
11633
+ readSystemObjects: async (includeExisting, options = {}) => {
11612
11634
  const localVarPath = `/logger/available_objects`;
11613
11635
  const localVarUrlObj = parse(localVarPath, true);
11614
11636
  let baseOptions;
@@ -11629,6 +11651,9 @@ const ConfigServiceApiAxiosParamCreator = function (configuration) {
11629
11651
  : await configuration.apiKey;
11630
11652
  localVarHeaderParameter['X-Webitel-Access'] = localVarApiKeyValue;
11631
11653
  }
11654
+ if (includeExisting !== undefined) {
11655
+ localVarQueryParameter['include_existing'] = includeExisting;
11656
+ }
11632
11657
  localVarUrlObj.query = {
11633
11658
  ...localVarUrlObj.query,
11634
11659
  ...localVarQueryParameter,
@@ -11862,11 +11887,12 @@ const ConfigServiceApiFp = function (configuration) {
11862
11887
  },
11863
11888
  /**
11864
11889
  *
11890
+ * @param {boolean} [includeExisting]
11865
11891
  * @param {*} [options] Override http request option.
11866
11892
  * @throws {RequiredError}
11867
11893
  */
11868
- async readSystemObjects(options) {
11869
- const localVarAxiosArgs = await ConfigServiceApiAxiosParamCreator(configuration).readSystemObjects(options);
11894
+ async readSystemObjects(includeExisting, options) {
11895
+ const localVarAxiosArgs = await ConfigServiceApiAxiosParamCreator(configuration).readSystemObjects(includeExisting, options);
11870
11896
  return (axios = globalAxios, basePath = BASE_PATH) => {
11871
11897
  const axiosRequestArgs = {
11872
11898
  ...localVarAxiosArgs.options,
@@ -11978,12 +12004,13 @@ const ConfigServiceApiFactory = function (configuration, basePath, axios) {
11978
12004
  },
11979
12005
  /**
11980
12006
  *
12007
+ * @param {boolean} [includeExisting]
11981
12008
  * @param {*} [options] Override http request option.
11982
12009
  * @throws {RequiredError}
11983
12010
  */
11984
- readSystemObjects(options) {
12011
+ readSystemObjects(includeExisting, options) {
11985
12012
  return ConfigServiceApiFp(configuration)
11986
- .readSystemObjects(options)
12013
+ .readSystemObjects(includeExisting, options)
11987
12014
  .then((request) => request(axios, basePath));
11988
12015
  },
11989
12016
  /**
@@ -12085,13 +12112,14 @@ class ConfigServiceApi extends BaseAPI {
12085
12112
  }
12086
12113
  /**
12087
12114
  *
12115
+ * @param {boolean} [includeExisting]
12088
12116
  * @param {*} [options] Override http request option.
12089
12117
  * @throws {RequiredError}
12090
12118
  * @memberof ConfigServiceApi
12091
12119
  */
12092
- readSystemObjects(options) {
12120
+ readSystemObjects(includeExisting, options) {
12093
12121
  return ConfigServiceApiFp(this.configuration)
12094
- .readSystemObjects(options)
12122
+ .readSystemObjects(includeExisting, options)
12095
12123
  .then((request) => request(this.axios, this.basePath));
12096
12124
  }
12097
12125
  /**
@@ -17398,7 +17426,7 @@ const LoggerServiceApiAxiosParamCreator = function (configuration) {
17398
17426
  return {
17399
17427
  /**
17400
17428
  *
17401
- * @param {number} configId REQUIRED filter
17429
+ * @param {number} configId
17402
17430
  * @param {number} [page]
17403
17431
  * @param {number} [size]
17404
17432
  * @param {string} [q]
@@ -17406,7 +17434,7 @@ const LoggerServiceApiAxiosParamCreator = function (configuration) {
17406
17434
  * @param {Array<string>} [fields]
17407
17435
  * @param {number} [userId]
17408
17436
  * @param {string} [userName]
17409
- * @param {'DEFAULT_NO_ACTION' | 'CREATE' | 'UPDATE' | 'READ' | 'DELETE'} [action] GENERAL filters.
17437
+ * @param {'DEFAULT_NO_ACTION' | 'CREATE' | 'UPDATE' | 'READ' | 'DELETE'} [action]
17410
17438
  * @param {string} [userIp]
17411
17439
  * @param {string} [dateFrom]
17412
17440
  * @param {string} [dateTo]
@@ -17463,13 +17491,13 @@ const LoggerServiceApiAxiosParamCreator = function (configuration) {
17463
17491
  localVarQueryParameter['action'] = action;
17464
17492
  }
17465
17493
  if (userIp !== undefined) {
17466
- localVarQueryParameter['userIp'] = userIp;
17494
+ localVarQueryParameter['user_ip'] = userIp;
17467
17495
  }
17468
17496
  if (dateFrom !== undefined) {
17469
- localVarQueryParameter['dateFrom'] = dateFrom;
17497
+ localVarQueryParameter['date_from'] = dateFrom;
17470
17498
  }
17471
17499
  if (dateTo !== undefined) {
17472
- localVarQueryParameter['dateTo'] = dateTo;
17500
+ localVarQueryParameter['date_to'] = dateTo;
17473
17501
  }
17474
17502
  localVarUrlObj.query = {
17475
17503
  ...localVarUrlObj.query,
@@ -17556,13 +17584,13 @@ const LoggerServiceApiAxiosParamCreator = function (configuration) {
17556
17584
  localVarQueryParameter['action'] = action;
17557
17585
  }
17558
17586
  if (userIp !== undefined) {
17559
- localVarQueryParameter['userIp'] = userIp;
17587
+ localVarQueryParameter['user_ip'] = userIp;
17560
17588
  }
17561
17589
  if (dateFrom !== undefined) {
17562
- localVarQueryParameter['dateFrom'] = dateFrom;
17590
+ localVarQueryParameter['date_from'] = dateFrom;
17563
17591
  }
17564
17592
  if (dateTo !== undefined) {
17565
- localVarQueryParameter['dateTo'] = dateTo;
17593
+ localVarQueryParameter['date_to'] = dateTo;
17566
17594
  }
17567
17595
  localVarUrlObj.query = {
17568
17596
  ...localVarUrlObj.query,
@@ -17592,7 +17620,7 @@ const LoggerServiceApiFp = function (configuration) {
17592
17620
  return {
17593
17621
  /**
17594
17622
  *
17595
- * @param {number} configId REQUIRED filter
17623
+ * @param {number} configId
17596
17624
  * @param {number} [page]
17597
17625
  * @param {number} [size]
17598
17626
  * @param {string} [q]
@@ -17600,7 +17628,7 @@ const LoggerServiceApiFp = function (configuration) {
17600
17628
  * @param {Array<string>} [fields]
17601
17629
  * @param {number} [userId]
17602
17630
  * @param {string} [userName]
17603
- * @param {'DEFAULT_NO_ACTION' | 'CREATE' | 'UPDATE' | 'READ' | 'DELETE'} [action] GENERAL filters.
17631
+ * @param {'DEFAULT_NO_ACTION' | 'CREATE' | 'UPDATE' | 'READ' | 'DELETE'} [action]
17604
17632
  * @param {string} [userIp]
17605
17633
  * @param {string} [dateFrom]
17606
17634
  * @param {string} [dateTo]
@@ -17654,7 +17682,7 @@ const LoggerServiceApiFactory = function (configuration, basePath, axios) {
17654
17682
  return {
17655
17683
  /**
17656
17684
  *
17657
- * @param {number} configId REQUIRED filter
17685
+ * @param {number} configId
17658
17686
  * @param {number} [page]
17659
17687
  * @param {number} [size]
17660
17688
  * @param {string} [q]
@@ -17662,7 +17690,7 @@ const LoggerServiceApiFactory = function (configuration, basePath, axios) {
17662
17690
  * @param {Array<string>} [fields]
17663
17691
  * @param {number} [userId]
17664
17692
  * @param {string} [userName]
17665
- * @param {'DEFAULT_NO_ACTION' | 'CREATE' | 'UPDATE' | 'READ' | 'DELETE'} [action] GENERAL filters.
17693
+ * @param {'DEFAULT_NO_ACTION' | 'CREATE' | 'UPDATE' | 'READ' | 'DELETE'} [action]
17666
17694
  * @param {string} [userIp]
17667
17695
  * @param {string} [dateFrom]
17668
17696
  * @param {string} [dateTo]
@@ -17707,7 +17735,7 @@ const LoggerServiceApiFactory = function (configuration, basePath, axios) {
17707
17735
  class LoggerServiceApi extends BaseAPI {
17708
17736
  /**
17709
17737
  *
17710
- * @param {number} configId REQUIRED filter
17738
+ * @param {number} configId
17711
17739
  * @param {number} [page]
17712
17740
  * @param {number} [size]
17713
17741
  * @param {string} [q]
@@ -17715,7 +17743,7 @@ class LoggerServiceApi extends BaseAPI {
17715
17743
  * @param {Array<string>} [fields]
17716
17744
  * @param {number} [userId]
17717
17745
  * @param {string} [userName]
17718
- * @param {'DEFAULT_NO_ACTION' | 'CREATE' | 'UPDATE' | 'READ' | 'DELETE'} [action] GENERAL filters.
17746
+ * @param {'DEFAULT_NO_ACTION' | 'CREATE' | 'UPDATE' | 'READ' | 'DELETE'} [action]
17719
17747
  * @param {string} [userIp]
17720
17748
  * @param {string} [dateFrom]
17721
17749
  * @param {string} [dateTo]
@@ -37478,6 +37506,19 @@ var LoggerACTION;
37478
37506
  * Do not edit the class manually.
37479
37507
  */
37480
37508
 
37509
+ // tslint:disable
37510
+ /**
37511
+ * Webitel engine API
37512
+ * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator)
37513
+ *
37514
+ * The version of the OpenAPI document: 23.07.0
37515
+ * Contact: support@webitel.com
37516
+ *
37517
+ * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
37518
+ * https://openapi-generator.tech
37519
+ * Do not edit the class manually.
37520
+ */
37521
+
37481
37522
  // tslint:disable
37482
37523
  /**
37483
37524
  * Webitel engine API
@@ -39284,7 +39325,8 @@ class Agent {
39284
39325
  this._channels = new Map();
39285
39326
  this.initChannels(info.channels);
39286
39327
  this._listOfflineMembers = null;
39287
- this.waitingList = [];
39328
+ this.waitingListChats = [];
39329
+ this.waitingListCalls = [];
39288
39330
  this.lastStatusChange = Date.now() - this.info.status_duration * 1000;
39289
39331
  }
39290
39332
  get agentId() {
@@ -39327,18 +39369,26 @@ class Agent {
39327
39369
  setWaitingList(e) {
39328
39370
  if (e) {
39329
39371
  const list = e.list;
39330
- this.waitingList.length = 0;
39331
- this.waitingList = this.waitingList.concat(...list);
39372
+ this.waitingListCalls.length = 0;
39373
+ this.waitingListChats.length = 0;
39374
+ for (const el of list) {
39375
+ switch (el.channel) {
39376
+ case ChannelType.Call:
39377
+ this.waitingListCalls.push(el);
39378
+ break;
39379
+ case ChannelType.Chat:
39380
+ this.waitingListChats.push(el);
39381
+ break;
39382
+ default:
39383
+ }
39384
+ }
39332
39385
  }
39333
39386
  }
39334
39387
  deleteWaitingAttempt(e) {
39335
39388
  if (e) {
39336
39389
  const attemptId = e.attempt_id;
39337
- for (let i = 0; i < this.waitingList.length; i++) {
39338
- if (this.waitingList[i].attempt_id === attemptId) {
39339
- this.waitingList.splice(i, 1);
39340
- break;
39341
- }
39390
+ if (!removeWaitingList(this.waitingListCalls, attemptId)) {
39391
+ removeWaitingList(this.waitingListChats, attemptId);
39342
39392
  }
39343
39393
  }
39344
39394
  }
@@ -39551,6 +39601,15 @@ class Agent {
39551
39601
  }
39552
39602
  }
39553
39603
  }
39604
+ function removeWaitingList(list, attemptId) {
39605
+ for (let i = 0; i < list.length; i++) {
39606
+ if (list[i].attempt_id === attemptId) {
39607
+ list.splice(i, 1);
39608
+ return true;
39609
+ }
39610
+ }
39611
+ return false;
39612
+ }
39554
39613
 
39555
39614
  var CallReportingStatus;
39556
39615
  (function (CallReportingStatus) {