webitel-sdk 0.1.128 → 0.1.131

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 (52) hide show
  1. package/bundles/index.esm.js +86 -28
  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 +97 -29
  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/call-service-api.js +14 -7
  10. package/esm2015/api/call-service-api.js.map +1 -1
  11. package/esm2015/api/member-service-api.js +28 -14
  12. package/esm2015/api/member-service-api.js.map +1 -1
  13. package/esm2015/enums/queues/queue-type.enum.js +2 -2
  14. package/esm2015/enums/queues/queue-type.enum.js.map +1 -1
  15. package/esm2015/socket/agent.js +9 -2
  16. package/esm2015/socket/agent.js.map +1 -1
  17. package/esm2015/socket/call.js +1 -1
  18. package/esm2015/socket/client.js +18 -1
  19. package/esm2015/socket/client.js.map +1 -1
  20. package/esm2015/socket/task.js +11 -3
  21. package/esm2015/socket/task.js.map +1 -1
  22. package/esm2015/version.js +6 -0
  23. package/esm2015/version.js.map +1 -0
  24. package/esm5/api/call-service-api.js +14 -7
  25. package/esm5/api/call-service-api.js.map +1 -1
  26. package/esm5/api/member-service-api.js +28 -14
  27. package/esm5/api/member-service-api.js.map +1 -1
  28. package/esm5/enums/queues/queue-type.enum.js +2 -2
  29. package/esm5/enums/queues/queue-type.enum.js.map +1 -1
  30. package/esm5/socket/agent.js +10 -2
  31. package/esm5/socket/agent.js.map +1 -1
  32. package/esm5/socket/call.js +1 -1
  33. package/esm5/socket/client.js +24 -2
  34. package/esm5/socket/client.js.map +1 -1
  35. package/esm5/socket/task.js +15 -3
  36. package/esm5/socket/task.js.map +1 -1
  37. package/esm5/version.js +6 -0
  38. package/esm5/version.js.map +1 -0
  39. package/package.json +1 -1
  40. package/types/api/call-service-api.d.ts +8 -4
  41. package/types/api/call-service-api.d.ts.map +1 -1
  42. package/types/api/member-service-api.d.ts +16 -8
  43. package/types/api/member-service-api.d.ts.map +1 -1
  44. package/types/enums/queues/queue-type.enum.d.ts +2 -2
  45. package/types/enums/queues/queue-type.enum.d.ts.map +1 -1
  46. package/types/socket/agent.d.ts.map +1 -1
  47. package/types/socket/client.d.ts +1 -0
  48. package/types/socket/client.d.ts.map +1 -1
  49. package/types/socket/task.d.ts +10 -2
  50. package/types/socket/task.d.ts.map +1 -1
  51. package/types/version.d.ts +3 -0
  52. package/types/version.d.ts.map +1 -0
@@ -7129,10 +7129,11 @@ const CallServiceApiAxiosParamCreator = function (configuration) {
7129
7129
  * @param {Array<string>} [tags]
7130
7130
  * @param {Array<string>} [amdResult]
7131
7131
  * @param {string} [fts]
7132
+ * @param {Array<string>} [directions]
7132
7133
  * @param {*} [options] Override http request option.
7133
7134
  * @throws {RequiredError}
7134
7135
  */
7135
- searchHistoryCall: async (page, size, q, sort, fields, createdAtFrom, createdAtTo, userId, agentId, queueId, teamId, memberId, gatewayId, durationFrom, durationTo, skipParent, parentId, cause, hasFile, domainId, number, direction, answeredAtFrom, answeredAtTo, missed, storedAtFrom, storedAtTo, id, transferFrom, transferTo, dependencyId, tags, amdResult, fts, options = {}) => {
7136
+ searchHistoryCall: async (page, size, q, sort, fields, createdAtFrom, createdAtTo, userId, agentId, queueId, teamId, memberId, gatewayId, durationFrom, durationTo, skipParent, parentId, cause, hasFile, domainId, number, direction, answeredAtFrom, answeredAtTo, missed, storedAtFrom, storedAtTo, id, transferFrom, transferTo, dependencyId, tags, amdResult, fts, directions, options = {}) => {
7136
7137
  const localVarPath = `/calls/history`;
7137
7138
  const localVarUrlObj = parse(localVarPath, true);
7138
7139
  let baseOptions;
@@ -7255,6 +7256,9 @@ const CallServiceApiAxiosParamCreator = function (configuration) {
7255
7256
  if (fts !== undefined) {
7256
7257
  localVarQueryParameter['fts'] = fts;
7257
7258
  }
7259
+ if (directions) {
7260
+ localVarQueryParameter['directions'] = directions;
7261
+ }
7258
7262
  localVarUrlObj.query = {
7259
7263
  ...localVarUrlObj.query,
7260
7264
  ...localVarQueryParameter,
@@ -7676,11 +7680,12 @@ const CallServiceApiFp = function (configuration) {
7676
7680
  * @param {Array<string>} [tags]
7677
7681
  * @param {Array<string>} [amdResult]
7678
7682
  * @param {string} [fts]
7683
+ * @param {Array<string>} [directions]
7679
7684
  * @param {*} [options] Override http request option.
7680
7685
  * @throws {RequiredError}
7681
7686
  */
7682
- async searchHistoryCall(page, size, q, sort, fields, createdAtFrom, createdAtTo, userId, agentId, queueId, teamId, memberId, gatewayId, durationFrom, durationTo, skipParent, parentId, cause, hasFile, domainId, number, direction, answeredAtFrom, answeredAtTo, missed, storedAtFrom, storedAtTo, id, transferFrom, transferTo, dependencyId, tags, amdResult, fts, options) {
7683
- const localVarAxiosArgs = await CallServiceApiAxiosParamCreator(configuration).searchHistoryCall(page, size, q, sort, fields, createdAtFrom, createdAtTo, userId, agentId, queueId, teamId, memberId, gatewayId, durationFrom, durationTo, skipParent, parentId, cause, hasFile, domainId, number, direction, answeredAtFrom, answeredAtTo, missed, storedAtFrom, storedAtTo, id, transferFrom, transferTo, dependencyId, tags, amdResult, fts, options);
7687
+ async searchHistoryCall(page, size, q, sort, fields, createdAtFrom, createdAtTo, userId, agentId, queueId, teamId, memberId, gatewayId, durationFrom, durationTo, skipParent, parentId, cause, hasFile, domainId, number, direction, answeredAtFrom, answeredAtTo, missed, storedAtFrom, storedAtTo, id, transferFrom, transferTo, dependencyId, tags, amdResult, fts, directions, options) {
7688
+ const localVarAxiosArgs = await CallServiceApiAxiosParamCreator(configuration).searchHistoryCall(page, size, q, sort, fields, createdAtFrom, createdAtTo, userId, agentId, queueId, teamId, memberId, gatewayId, durationFrom, durationTo, skipParent, parentId, cause, hasFile, domainId, number, direction, answeredAtFrom, answeredAtTo, missed, storedAtFrom, storedAtTo, id, transferFrom, transferTo, dependencyId, tags, amdResult, fts, directions, options);
7684
7689
  return (axios = globalAxios, basePath = BASE_PATH) => {
7685
7690
  const axiosRequestArgs = {
7686
7691
  ...localVarAxiosArgs.options,
@@ -7940,12 +7945,13 @@ const CallServiceApiFactory = function (configuration, basePath, axios) {
7940
7945
  * @param {Array<string>} [tags]
7941
7946
  * @param {Array<string>} [amdResult]
7942
7947
  * @param {string} [fts]
7948
+ * @param {Array<string>} [directions]
7943
7949
  * @param {*} [options] Override http request option.
7944
7950
  * @throws {RequiredError}
7945
7951
  */
7946
- searchHistoryCall(page, size, q, sort, fields, createdAtFrom, createdAtTo, userId, agentId, queueId, teamId, memberId, gatewayId, durationFrom, durationTo, skipParent, parentId, cause, hasFile, domainId, number, direction, answeredAtFrom, answeredAtTo, missed, storedAtFrom, storedAtTo, id, transferFrom, transferTo, dependencyId, tags, amdResult, fts, options) {
7952
+ searchHistoryCall(page, size, q, sort, fields, createdAtFrom, createdAtTo, userId, agentId, queueId, teamId, memberId, gatewayId, durationFrom, durationTo, skipParent, parentId, cause, hasFile, domainId, number, direction, answeredAtFrom, answeredAtTo, missed, storedAtFrom, storedAtTo, id, transferFrom, transferTo, dependencyId, tags, amdResult, fts, directions, options) {
7947
7953
  return CallServiceApiFp(configuration)
7948
- .searchHistoryCall(page, size, q, sort, fields, createdAtFrom, createdAtTo, userId, agentId, queueId, teamId, memberId, gatewayId, durationFrom, durationTo, skipParent, parentId, cause, hasFile, domainId, number, direction, answeredAtFrom, answeredAtTo, missed, storedAtFrom, storedAtTo, id, transferFrom, transferTo, dependencyId, tags, amdResult, fts, options)
7954
+ .searchHistoryCall(page, size, q, sort, fields, createdAtFrom, createdAtTo, userId, agentId, queueId, teamId, memberId, gatewayId, durationFrom, durationTo, skipParent, parentId, cause, hasFile, domainId, number, direction, answeredAtFrom, answeredAtTo, missed, storedAtFrom, storedAtTo, id, transferFrom, transferTo, dependencyId, tags, amdResult, fts, directions, options)
7949
7955
  .then((request) => request(axios, basePath));
7950
7956
  },
7951
7957
  /**
@@ -8202,13 +8208,14 @@ class CallServiceApi extends BaseAPI {
8202
8208
  * @param {Array<string>} [tags]
8203
8209
  * @param {Array<string>} [amdResult]
8204
8210
  * @param {string} [fts]
8211
+ * @param {Array<string>} [directions]
8205
8212
  * @param {*} [options] Override http request option.
8206
8213
  * @throws {RequiredError}
8207
8214
  * @memberof CallServiceApi
8208
8215
  */
8209
- searchHistoryCall(page, size, q, sort, fields, createdAtFrom, createdAtTo, userId, agentId, queueId, teamId, memberId, gatewayId, durationFrom, durationTo, skipParent, parentId, cause, hasFile, domainId, number, direction, answeredAtFrom, answeredAtTo, missed, storedAtFrom, storedAtTo, id, transferFrom, transferTo, dependencyId, tags, amdResult, fts, options) {
8216
+ searchHistoryCall(page, size, q, sort, fields, createdAtFrom, createdAtTo, userId, agentId, queueId, teamId, memberId, gatewayId, durationFrom, durationTo, skipParent, parentId, cause, hasFile, domainId, number, direction, answeredAtFrom, answeredAtTo, missed, storedAtFrom, storedAtTo, id, transferFrom, transferTo, dependencyId, tags, amdResult, fts, directions, options) {
8210
8217
  return CallServiceApiFp(this.configuration)
8211
- .searchHistoryCall(page, size, q, sort, fields, createdAtFrom, createdAtTo, userId, agentId, queueId, teamId, memberId, gatewayId, durationFrom, durationTo, skipParent, parentId, cause, hasFile, domainId, number, direction, answeredAtFrom, answeredAtTo, missed, storedAtFrom, storedAtTo, id, transferFrom, transferTo, dependencyId, tags, amdResult, fts, options)
8218
+ .searchHistoryCall(page, size, q, sort, fields, createdAtFrom, createdAtTo, userId, agentId, queueId, teamId, memberId, gatewayId, durationFrom, durationTo, skipParent, parentId, cause, hasFile, domainId, number, direction, answeredAtFrom, answeredAtTo, missed, storedAtFrom, storedAtTo, id, transferFrom, transferTo, dependencyId, tags, amdResult, fts, directions, options)
8212
8219
  .then((request) => request(this.axios, this.basePath));
8213
8220
  }
8214
8221
  /**
@@ -12843,10 +12850,11 @@ const MemberServiceApiAxiosParamCreator = function (configuration) {
12843
12850
  * @param {string} [name]
12844
12851
  * @param {string} [attemptsFrom]
12845
12852
  * @param {string} [attemptsTo]
12853
+ * @param {Array<number>} [agentId]
12846
12854
  * @param {*} [options] Override http request option.
12847
12855
  * @throws {RequiredError}
12848
12856
  */
12849
- searchMemberInQueue: async (queueId, page, size, q, sort, fields, id, bucketId, destination, createdAtFrom, createdAtTo, offeringAtFrom, offeringAtTo, stopCause, priorityFrom, priorityTo, name, attemptsFrom, attemptsTo, options = {}) => {
12857
+ searchMemberInQueue: async (queueId, page, size, q, sort, fields, id, bucketId, destination, createdAtFrom, createdAtTo, offeringAtFrom, offeringAtTo, stopCause, priorityFrom, priorityTo, name, attemptsFrom, attemptsTo, agentId, options = {}) => {
12850
12858
  // verify required parameter 'queueId' is not null or undefined
12851
12859
  if (queueId === null || queueId === undefined) {
12852
12860
  throw new RequiredError('queueId', 'Required parameter queueId was null or undefined when calling searchMemberInQueue.');
@@ -12925,6 +12933,9 @@ const MemberServiceApiAxiosParamCreator = function (configuration) {
12925
12933
  if (attemptsTo !== undefined) {
12926
12934
  localVarQueryParameter['attempts.to'] = attemptsTo;
12927
12935
  }
12936
+ if (agentId) {
12937
+ localVarQueryParameter['agent_id'] = agentId;
12938
+ }
12928
12939
  localVarUrlObj.query = {
12929
12940
  ...localVarUrlObj.query,
12930
12941
  ...localVarQueryParameter,
@@ -12965,10 +12976,11 @@ const MemberServiceApiAxiosParamCreator = function (configuration) {
12965
12976
  * @param {string} [name]
12966
12977
  * @param {string} [attemptsFrom]
12967
12978
  * @param {string} [attemptsTo]
12979
+ * @param {Array<number>} [agentId]
12968
12980
  * @param {*} [options] Override http request option.
12969
12981
  * @throws {RequiredError}
12970
12982
  */
12971
- searchMembers: async (page, size, q, sort, fields, id, queueId, bucketId, destination, createdAtFrom, createdAtTo, offeringAtFrom, offeringAtTo, stopCause, priorityFrom, priorityTo, name, attemptsFrom, attemptsTo, options = {}) => {
12983
+ searchMembers: async (page, size, q, sort, fields, id, queueId, bucketId, destination, createdAtFrom, createdAtTo, offeringAtFrom, offeringAtTo, stopCause, priorityFrom, priorityTo, name, attemptsFrom, attemptsTo, agentId, options = {}) => {
12972
12984
  const localVarPath = `/call_center/members`;
12973
12985
  const localVarUrlObj = parse(localVarPath, true);
12974
12986
  let baseOptions;
@@ -13046,6 +13058,9 @@ const MemberServiceApiAxiosParamCreator = function (configuration) {
13046
13058
  if (attemptsTo !== undefined) {
13047
13059
  localVarQueryParameter['attempts.to'] = attemptsTo;
13048
13060
  }
13061
+ if (agentId) {
13062
+ localVarQueryParameter['agent_id'] = agentId;
13063
+ }
13049
13064
  localVarUrlObj.query = {
13050
13065
  ...localVarUrlObj.query,
13051
13066
  ...localVarQueryParameter,
@@ -13440,11 +13455,12 @@ const MemberServiceApiFp = function (configuration) {
13440
13455
  * @param {string} [name]
13441
13456
  * @param {string} [attemptsFrom]
13442
13457
  * @param {string} [attemptsTo]
13458
+ * @param {Array<number>} [agentId]
13443
13459
  * @param {*} [options] Override http request option.
13444
13460
  * @throws {RequiredError}
13445
13461
  */
13446
- async searchMemberInQueue(queueId, page, size, q, sort, fields, id, bucketId, destination, createdAtFrom, createdAtTo, offeringAtFrom, offeringAtTo, stopCause, priorityFrom, priorityTo, name, attemptsFrom, attemptsTo, options) {
13447
- const localVarAxiosArgs = await MemberServiceApiAxiosParamCreator(configuration).searchMemberInQueue(queueId, page, size, q, sort, fields, id, bucketId, destination, createdAtFrom, createdAtTo, offeringAtFrom, offeringAtTo, stopCause, priorityFrom, priorityTo, name, attemptsFrom, attemptsTo, options);
13462
+ async searchMemberInQueue(queueId, page, size, q, sort, fields, id, bucketId, destination, createdAtFrom, createdAtTo, offeringAtFrom, offeringAtTo, stopCause, priorityFrom, priorityTo, name, attemptsFrom, attemptsTo, agentId, options) {
13463
+ const localVarAxiosArgs = await MemberServiceApiAxiosParamCreator(configuration).searchMemberInQueue(queueId, page, size, q, sort, fields, id, bucketId, destination, createdAtFrom, createdAtTo, offeringAtFrom, offeringAtTo, stopCause, priorityFrom, priorityTo, name, attemptsFrom, attemptsTo, agentId, options);
13448
13464
  return (axios = globalAxios, basePath = BASE_PATH) => {
13449
13465
  const axiosRequestArgs = {
13450
13466
  ...localVarAxiosArgs.options,
@@ -13475,11 +13491,12 @@ const MemberServiceApiFp = function (configuration) {
13475
13491
  * @param {string} [name]
13476
13492
  * @param {string} [attemptsFrom]
13477
13493
  * @param {string} [attemptsTo]
13494
+ * @param {Array<number>} [agentId]
13478
13495
  * @param {*} [options] Override http request option.
13479
13496
  * @throws {RequiredError}
13480
13497
  */
13481
- async searchMembers(page, size, q, sort, fields, id, queueId, bucketId, destination, createdAtFrom, createdAtTo, offeringAtFrom, offeringAtTo, stopCause, priorityFrom, priorityTo, name, attemptsFrom, attemptsTo, options) {
13482
- const localVarAxiosArgs = await MemberServiceApiAxiosParamCreator(configuration).searchMembers(page, size, q, sort, fields, id, queueId, bucketId, destination, createdAtFrom, createdAtTo, offeringAtFrom, offeringAtTo, stopCause, priorityFrom, priorityTo, name, attemptsFrom, attemptsTo, options);
13498
+ async searchMembers(page, size, q, sort, fields, id, queueId, bucketId, destination, createdAtFrom, createdAtTo, offeringAtFrom, offeringAtTo, stopCause, priorityFrom, priorityTo, name, attemptsFrom, attemptsTo, agentId, options) {
13499
+ const localVarAxiosArgs = await MemberServiceApiAxiosParamCreator(configuration).searchMembers(page, size, q, sort, fields, id, queueId, bucketId, destination, createdAtFrom, createdAtTo, offeringAtFrom, offeringAtTo, stopCause, priorityFrom, priorityTo, name, attemptsFrom, attemptsTo, agentId, options);
13483
13500
  return (axios = globalAxios, basePath = BASE_PATH) => {
13484
13501
  const axiosRequestArgs = {
13485
13502
  ...localVarAxiosArgs.options,
@@ -13745,12 +13762,13 @@ const MemberServiceApiFactory = function (configuration, basePath, axios) {
13745
13762
  * @param {string} [name]
13746
13763
  * @param {string} [attemptsFrom]
13747
13764
  * @param {string} [attemptsTo]
13765
+ * @param {Array<number>} [agentId]
13748
13766
  * @param {*} [options] Override http request option.
13749
13767
  * @throws {RequiredError}
13750
13768
  */
13751
- searchMemberInQueue(queueId, page, size, q, sort, fields, id, bucketId, destination, createdAtFrom, createdAtTo, offeringAtFrom, offeringAtTo, stopCause, priorityFrom, priorityTo, name, attemptsFrom, attemptsTo, options) {
13769
+ searchMemberInQueue(queueId, page, size, q, sort, fields, id, bucketId, destination, createdAtFrom, createdAtTo, offeringAtFrom, offeringAtTo, stopCause, priorityFrom, priorityTo, name, attemptsFrom, attemptsTo, agentId, options) {
13752
13770
  return MemberServiceApiFp(configuration)
13753
- .searchMemberInQueue(queueId, page, size, q, sort, fields, id, bucketId, destination, createdAtFrom, createdAtTo, offeringAtFrom, offeringAtTo, stopCause, priorityFrom, priorityTo, name, attemptsFrom, attemptsTo, options)
13771
+ .searchMemberInQueue(queueId, page, size, q, sort, fields, id, bucketId, destination, createdAtFrom, createdAtTo, offeringAtFrom, offeringAtTo, stopCause, priorityFrom, priorityTo, name, attemptsFrom, attemptsTo, agentId, options)
13754
13772
  .then((request) => request(axios, basePath));
13755
13773
  },
13756
13774
  /**
@@ -13775,12 +13793,13 @@ const MemberServiceApiFactory = function (configuration, basePath, axios) {
13775
13793
  * @param {string} [name]
13776
13794
  * @param {string} [attemptsFrom]
13777
13795
  * @param {string} [attemptsTo]
13796
+ * @param {Array<number>} [agentId]
13778
13797
  * @param {*} [options] Override http request option.
13779
13798
  * @throws {RequiredError}
13780
13799
  */
13781
- searchMembers(page, size, q, sort, fields, id, queueId, bucketId, destination, createdAtFrom, createdAtTo, offeringAtFrom, offeringAtTo, stopCause, priorityFrom, priorityTo, name, attemptsFrom, attemptsTo, options) {
13800
+ searchMembers(page, size, q, sort, fields, id, queueId, bucketId, destination, createdAtFrom, createdAtTo, offeringAtFrom, offeringAtTo, stopCause, priorityFrom, priorityTo, name, attemptsFrom, attemptsTo, agentId, options) {
13782
13801
  return MemberServiceApiFp(configuration)
13783
- .searchMembers(page, size, q, sort, fields, id, queueId, bucketId, destination, createdAtFrom, createdAtTo, offeringAtFrom, offeringAtTo, stopCause, priorityFrom, priorityTo, name, attemptsFrom, attemptsTo, options)
13802
+ .searchMembers(page, size, q, sort, fields, id, queueId, bucketId, destination, createdAtFrom, createdAtTo, offeringAtFrom, offeringAtTo, stopCause, priorityFrom, priorityTo, name, attemptsFrom, attemptsTo, agentId, options)
13784
13803
  .then((request) => request(axios, basePath));
13785
13804
  },
13786
13805
  /**
@@ -14050,13 +14069,14 @@ class MemberServiceApi extends BaseAPI {
14050
14069
  * @param {string} [name]
14051
14070
  * @param {string} [attemptsFrom]
14052
14071
  * @param {string} [attemptsTo]
14072
+ * @param {Array<number>} [agentId]
14053
14073
  * @param {*} [options] Override http request option.
14054
14074
  * @throws {RequiredError}
14055
14075
  * @memberof MemberServiceApi
14056
14076
  */
14057
- searchMemberInQueue(queueId, page, size, q, sort, fields, id, bucketId, destination, createdAtFrom, createdAtTo, offeringAtFrom, offeringAtTo, stopCause, priorityFrom, priorityTo, name, attemptsFrom, attemptsTo, options) {
14077
+ searchMemberInQueue(queueId, page, size, q, sort, fields, id, bucketId, destination, createdAtFrom, createdAtTo, offeringAtFrom, offeringAtTo, stopCause, priorityFrom, priorityTo, name, attemptsFrom, attemptsTo, agentId, options) {
14058
14078
  return MemberServiceApiFp(this.configuration)
14059
- .searchMemberInQueue(queueId, page, size, q, sort, fields, id, bucketId, destination, createdAtFrom, createdAtTo, offeringAtFrom, offeringAtTo, stopCause, priorityFrom, priorityTo, name, attemptsFrom, attemptsTo, options)
14079
+ .searchMemberInQueue(queueId, page, size, q, sort, fields, id, bucketId, destination, createdAtFrom, createdAtTo, offeringAtFrom, offeringAtTo, stopCause, priorityFrom, priorityTo, name, attemptsFrom, attemptsTo, agentId, options)
14060
14080
  .then((request) => request(this.axios, this.basePath));
14061
14081
  }
14062
14082
  /**
@@ -14081,13 +14101,14 @@ class MemberServiceApi extends BaseAPI {
14081
14101
  * @param {string} [name]
14082
14102
  * @param {string} [attemptsFrom]
14083
14103
  * @param {string} [attemptsTo]
14104
+ * @param {Array<number>} [agentId]
14084
14105
  * @param {*} [options] Override http request option.
14085
14106
  * @throws {RequiredError}
14086
14107
  * @memberof MemberServiceApi
14087
14108
  */
14088
- searchMembers(page, size, q, sort, fields, id, queueId, bucketId, destination, createdAtFrom, createdAtTo, offeringAtFrom, offeringAtTo, stopCause, priorityFrom, priorityTo, name, attemptsFrom, attemptsTo, options) {
14109
+ searchMembers(page, size, q, sort, fields, id, queueId, bucketId, destination, createdAtFrom, createdAtTo, offeringAtFrom, offeringAtTo, stopCause, priorityFrom, priorityTo, name, attemptsFrom, attemptsTo, agentId, options) {
14089
14110
  return MemberServiceApiFp(this.configuration)
14090
- .searchMembers(page, size, q, sort, fields, id, queueId, bucketId, destination, createdAtFrom, createdAtTo, offeringAtFrom, offeringAtTo, stopCause, priorityFrom, priorityTo, name, attemptsFrom, attemptsTo, options)
14111
+ .searchMembers(page, size, q, sort, fields, id, queueId, bucketId, destination, createdAtFrom, createdAtTo, offeringAtFrom, offeringAtTo, stopCause, priorityFrom, priorityTo, name, attemptsFrom, attemptsTo, agentId, options)
14091
14112
  .then((request) => request(this.axios, this.basePath));
14092
14113
  }
14093
14114
  /**
@@ -24538,6 +24559,12 @@ async function getMediaStream(constraints) {
24538
24559
  });
24539
24560
  }
24540
24561
 
24562
+ // tslint:disable-next-line: variable-name prefer-const
24563
+ const getVersion = () => {
24564
+ return '"0.1.131"';
24565
+ };
24566
+ var version = getVersion();
24567
+
24541
24568
  var JobState;
24542
24569
  (function (JobState) {
24543
24570
  JobState["Distribute"] = "distribute";
@@ -24545,6 +24572,7 @@ var JobState;
24545
24572
  JobState["Bridged"] = "bridged";
24546
24573
  JobState["Missed"] = "missed";
24547
24574
  JobState["Processing"] = "processing";
24575
+ JobState["Closed"] = "closed";
24548
24576
  JobState["Destroy"] = "destroy";
24549
24577
  })(JobState || (JobState = {}));
24550
24578
  var ChannelName;
@@ -24624,6 +24652,9 @@ class Task {
24624
24652
  this.answeredAt = t;
24625
24653
  this.lastStatusChange = Date.now();
24626
24654
  }
24655
+ setOffering(e) {
24656
+ this.offeringAt = e.timestamp;
24657
+ }
24627
24658
  setBridged(e) {
24628
24659
  this.bridgedAt = e.timestamp;
24629
24660
  this.lastStatusChange = Date.now();
@@ -24642,8 +24673,9 @@ class Task {
24642
24673
  }
24643
24674
  this._processing = p;
24644
24675
  }
24645
- setWaiting(now) {
24676
+ setClosed(now) {
24646
24677
  this.stopAt = now;
24678
+ this.state = JobState.Closed;
24647
24679
  }
24648
24680
  setTransferred(d) {
24649
24681
  this.distribute = d;
@@ -24677,14 +24709,17 @@ class Task {
24677
24709
  }
24678
24710
  return res;
24679
24711
  }
24712
+ get isMember() {
24713
+ return !!this.memberId;
24714
+ }
24680
24715
  get displayNumber() {
24681
24716
  return this.communication.destination;
24682
24717
  }
24683
24718
  get displayName() {
24684
- return this.communication.display;
24719
+ return this.distribute.member_name || null;
24685
24720
  }
24686
24721
  get display() {
24687
- return `${this.displayNumber} (${this.displayName})`;
24722
+ return `${this.displayName} (${this.displayNumber})`;
24688
24723
  }
24689
24724
  get renewalSec() {
24690
24725
  if (!this._processing || !this._processing.renewal_sec) {
@@ -24847,9 +24882,16 @@ class Agent {
24847
24882
  }
24848
24883
  break;
24849
24884
  case ChannelState.Offering:
24885
+ const evOffering = e;
24850
24886
  task = this.task.get(e.attempt_id);
24851
24887
  if (task) {
24852
- task.offeringAt = e.timestamp;
24888
+ task.setOffering(evOffering);
24889
+ if (evOffering.offering.auto_answer &&
24890
+ task.channel === ChannelType.Job) {
24891
+ task.accept().catch((err) => {
24892
+ this.client.emit('error', err);
24893
+ });
24894
+ }
24853
24895
  }
24854
24896
  break;
24855
24897
  case ChannelState.Bridged:
@@ -24929,7 +24971,7 @@ class Agent {
24929
24971
  if (e.attempt_id) {
24930
24972
  task = this.task.get(e.attempt_id);
24931
24973
  if (task) {
24932
- task.setWaiting(e.timestamp);
24974
+ task.setClosed(e.timestamp);
24933
24975
  this.task.delete(e.attempt_id);
24934
24976
  this.client.reportingChannelTask(task);
24935
24977
  }
@@ -25124,7 +25166,7 @@ class Call {
25124
25166
  });
25125
25167
  }
25126
25168
  get isMember() {
25127
- return !!(this.task && this.task.memberId);
25169
+ return !!(this.task && this.task.isMember);
25128
25170
  }
25129
25171
  setActive(e) {
25130
25172
  if (!this.answeredAt) {
@@ -26002,10 +26044,16 @@ class Client extends EventEmitter {
26002
26044
  get version() {
26003
26045
  return this.connectionInfo.server_version;
26004
26046
  }
26047
+ get buildVersion() {
26048
+ return version;
26049
+ }
26005
26050
  get instanceId() {
26006
26051
  return this.connectionInfo.sock_id;
26007
26052
  }
26008
26053
  async agentSession() {
26054
+ if (this.agent) {
26055
+ return this.agent;
26056
+ }
26009
26057
  const info = await this.request(WEBSOCKET_AGENT_SESSION);
26010
26058
  this.agent = new Agent(this, info);
26011
26059
  const taskList = (await this.agentActiveTasks(this.agent.agentId));
@@ -26013,7 +26061,7 @@ class Client extends EventEmitter {
26013
26061
  for (const t of taskList.items) {
26014
26062
  const task = new Task(this, {
26015
26063
  status: t.status,
26016
- timestamp: Date.now() - t.duration * 1000,
26064
+ timestamp: Date.now(),
26017
26065
  channel: t.channel,
26018
26066
  attempt_id: t.attempt_id,
26019
26067
  }, t);
@@ -26026,6 +26074,15 @@ class Client extends EventEmitter {
26026
26074
  if (t.leaving_at) {
26027
26075
  task.closedAt = t.leaving_at;
26028
26076
  }
26077
+ if (t.leaving_at && t.processing_sec) {
26078
+ task.startProcessingAt = t.leaving_at;
26079
+ task.setProcessing(t.leaving_at, {
26080
+ sec: t.processing_sec || 0,
26081
+ timeout: t.processing_timeout_at || null,
26082
+ renewal_sec: t.processing_renewal_sec || 0,
26083
+ });
26084
+ }
26085
+ task.form = t.form || null;
26029
26086
  this.agent.task.set(task.id, task);
26030
26087
  }
26031
26088
  for (const call of this.allCall()) {
@@ -26505,6 +26562,7 @@ function isDestroyJob(state) {
26505
26562
  ChannelState.Missed.toString(),
26506
26563
  ChannelState.Waiting,
26507
26564
  ChannelState.WrapTime,
26565
+ JobState.Closed,
26508
26566
  ].indexOf(state) > -1);
26509
26567
  }
26510
26568