@bluecopa/core 0.1.50 → 0.1.51

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.
@@ -20,3 +20,4 @@ export * as inboxItems from './inboxItems';
20
20
  export * as permissions from './permissions';
21
21
  export * as clientIp from './clientIp';
22
22
  export * as emailEngine from './emailEngine';
23
+ export * as tcn from './tcn';
@@ -0,0 +1 @@
1
+ export declare function agentDisconnect(token: string, sessionSid: string, reason?: string): Promise<any>;
@@ -0,0 +1,5 @@
1
+ export interface TcnConnectedParty {
2
+ callType: string;
3
+ callId: string;
4
+ }
5
+ export declare function agentGetConnectedParty(token: string, sessionSid: string): Promise<TcnConnectedParty>;
@@ -0,0 +1,4 @@
1
+ export interface TcnStatusData {
2
+ currentSessionId: string;
3
+ }
4
+ export declare function agentGetStatus(token: string): Promise<TcnStatusData>;
@@ -0,0 +1 @@
1
+ export declare function agentPause(token: string, sessionSid: string): Promise<any>;
@@ -0,0 +1 @@
1
+ export declare function agentSetReady(token: string, sessionSid: string): Promise<any>;
@@ -0,0 +1,9 @@
1
+ export interface TcnSessionData {
2
+ voiceSessionSid: number;
3
+ voiceRegistration: {
4
+ username: string;
5
+ password: string;
6
+ dialUrl: string;
7
+ };
8
+ }
9
+ export declare function createSession(token: string, huntGroupSid: string, skills: Record<string, unknown>): Promise<TcnSessionData>;
@@ -0,0 +1 @@
1
+ export declare function dialManualPrepare(token: string, sessionSid: string): Promise<any>;
@@ -0,0 +1,5 @@
1
+ export interface TcnTokenData {
2
+ access_token: string;
3
+ refresh_token: string;
4
+ }
5
+ export declare function exchangeCode(code: string): Promise<TcnTokenData>;
@@ -0,0 +1,4 @@
1
+ export interface TcnSkillsData {
2
+ skills: Record<string, unknown>;
3
+ }
4
+ export declare function getAgentSkills(token: string, huntGroupSid: string): Promise<TcnSkillsData>;
@@ -0,0 +1,4 @@
1
+ export interface TcnAuthUrlResponse {
2
+ url: string;
3
+ }
4
+ export declare function getAuthUrl(): Promise<TcnAuthUrlResponse>;
@@ -0,0 +1,8 @@
1
+ export interface TcnCallData {
2
+ callerIdName?: string;
3
+ journeyRetrievedData?: {
4
+ FName?: string;
5
+ PhoneNumber?: string;
6
+ };
7
+ }
8
+ export declare function getCallData(token: string, callSid: number): Promise<TcnCallData>;
@@ -0,0 +1,6 @@
1
+ export interface TcnAgentData {
2
+ agentSid: string;
3
+ clientSid: string;
4
+ huntGroupSid: string;
5
+ }
6
+ export declare function getCurrentAgent(token: string): Promise<TcnAgentData>;
@@ -0,0 +1,9 @@
1
+ export interface TcnDialSettings {
2
+ manualDial: {
3
+ defaultCallerId?: string;
4
+ callRecording?: boolean;
5
+ defaultCountrySid?: number;
6
+ scrubCellPhones?: boolean;
7
+ };
8
+ }
9
+ export declare function getHuntGroupAgentSettings(token: string, huntGroupSid: string): Promise<TcnDialSettings>;
@@ -0,0 +1,17 @@
1
+ export * from './getAuthUrl';
2
+ export * from './exchangeCode';
3
+ export * from './refreshToken';
4
+ export * from './getCurrentAgent';
5
+ export * from './getAgentSkills';
6
+ export * from './createSession';
7
+ export * from './keepAlive';
8
+ export * from './agentGetStatus';
9
+ export * from './getHuntGroupAgentSettings';
10
+ export * from './dialManualPrepare';
11
+ export * from './processManualDial';
12
+ export * from './manualDialStart';
13
+ export * from './agentDisconnect';
14
+ export * from './agentPause';
15
+ export * from './agentSetReady';
16
+ export * from './agentGetConnectedParty';
17
+ export * from './getCallData';
@@ -0,0 +1,5 @@
1
+ export interface TcnKeepAliveData {
2
+ status: string;
3
+ statusDesc: string;
4
+ }
5
+ export declare function keepAlive(token: string, sessionSid: string): Promise<TcnKeepAliveData>;
@@ -0,0 +1 @@
1
+ export declare function manualDialStart(token: string, agentSessionSid: string, huntGroupSid: string, simpleCallData: Record<string, unknown>): Promise<any>;
@@ -0,0 +1,13 @@
1
+ export interface TcnProcessDialData {
2
+ scrubbedCall: {
3
+ callSid: string;
4
+ taskGroupSid: string;
5
+ callerId: string;
6
+ doRecord: string;
7
+ callerIdCountryCode: string;
8
+ countryCode: string;
9
+ callerIdCountrySid: number;
10
+ countrySid: number;
11
+ };
12
+ }
13
+ export declare function processManualDial(token: string, call: Record<string, unknown>): Promise<TcnProcessDialData>;
@@ -0,0 +1,2 @@
1
+ import { TcnTokenData } from './exchangeCode';
2
+ export declare function refreshToken(refreshTokenValue: string): Promise<TcnTokenData>;
package/dist/index.d.ts CHANGED
@@ -29,4 +29,15 @@ export type { EmailConversation, GetAllConversationsParams, PageChunkEmailConver
29
29
  export type { GetConversationRequest, } from './api/emailEngine/getConversation';
30
30
  export type { CreateConversationRequest, } from './api/emailEngine/createConversation';
31
31
  export type { ReplyToConversationRequest, } from './api/emailEngine/replyToConversation';
32
+ export type { TcnAuthUrlResponse } from './api/tcn/getAuthUrl';
33
+ export type { TcnTokenData } from './api/tcn/exchangeCode';
34
+ export type { TcnAgentData } from './api/tcn/getCurrentAgent';
35
+ export type { TcnSkillsData } from './api/tcn/getAgentSkills';
36
+ export type { TcnSessionData } from './api/tcn/createSession';
37
+ export type { TcnKeepAliveData } from './api/tcn/keepAlive';
38
+ export type { TcnStatusData } from './api/tcn/agentGetStatus';
39
+ export type { TcnDialSettings } from './api/tcn/getHuntGroupAgentSettings';
40
+ export type { TcnProcessDialData } from './api/tcn/processManualDial';
41
+ export type { TcnConnectedParty } from './api/tcn/agentGetConnectedParty';
42
+ export type { TcnCallData } from './api/tcn/getCallData';
32
43
  export type { FilterOnSenderId, EmailMessage, } from './api/emailEngine/getMessageBySenderId';
package/dist/index.es.js CHANGED
@@ -114,7 +114,7 @@ async function getAllUsers() {
114
114
  throw { message, status };
115
115
  }
116
116
  }
117
- const index$m = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
117
+ const index$n = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
118
118
  __proto__: null,
119
119
  getAllUsers,
120
120
  getLoggedInUserDetails
@@ -194,7 +194,7 @@ async function getAllHttpTriggers() {
194
194
  throw { message, status };
195
195
  }
196
196
  }
197
- const index$l = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
197
+ const index$m = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
198
198
  __proto__: null,
199
199
  WorkflowStatus,
200
200
  getAllHttpTriggers,
@@ -300,7 +300,7 @@ async function fileDownload({
300
300
  throw { message, status };
301
301
  }
302
302
  }
303
- const index$k = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
303
+ const index$l = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
304
304
  __proto__: null,
305
305
  fileDownload,
306
306
  fileUpload,
@@ -376,7 +376,7 @@ const runDefinition = async (props) => {
376
376
  };
377
377
  }
378
378
  };
379
- const index$j = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
379
+ const index$k = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
380
380
  __proto__: null,
381
381
  runDefinition,
382
382
  runPublishedDefinition,
@@ -414,7 +414,7 @@ const getWorksheetsByType = async (type) => {
414
414
  throw { message, status };
415
415
  }
416
416
  };
417
- const index$i = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
417
+ const index$j = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
418
418
  __proto__: null,
419
419
  getWorksheets,
420
420
  getWorksheetsByType
@@ -9858,7 +9858,7 @@ const getUniqueDuplicateName = (name, collectionToCheckIn, suffix = "Copy", conc
9858
9858
  }
9859
9859
  return newName.trim();
9860
9860
  };
9861
- const index$h = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
9861
+ const index$i = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
9862
9862
  __proto__: null,
9863
9863
  formatDate,
9864
9864
  generatePushID,
@@ -10029,7 +10029,7 @@ const getData$3 = async (metricSheetId, options) => {
10029
10029
  resultData = _.flatten(resultData);
10030
10030
  return { data: resultData };
10031
10031
  };
10032
- const index$g = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
10032
+ const index$h = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
10033
10033
  __proto__: null,
10034
10034
  getData: getData$3
10035
10035
  }, Symbol.toStringTag, { value: "Module" }));
@@ -10184,7 +10184,7 @@ async function checkSubscriptionStatus(userId, threadId) {
10184
10184
  throw { message, status };
10185
10185
  }
10186
10186
  }
10187
- const index$f = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
10187
+ const index$g = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
10188
10188
  __proto__: null,
10189
10189
  checkSubscriptionStatus,
10190
10190
  createThread,
@@ -10389,7 +10389,7 @@ const getAllDatasets = async () => {
10389
10389
  throw { message, status };
10390
10390
  }
10391
10391
  };
10392
- const index$e = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
10392
+ const index$f = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
10393
10393
  __proto__: null,
10394
10394
  getAllDatasets,
10395
10395
  getData: getData$2,
@@ -10708,7 +10708,7 @@ const deleteRow = async (tableId, rowId, idField = "_copa_id") => {
10708
10708
  throw { message, status };
10709
10709
  }
10710
10710
  };
10711
- const index$d = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
10711
+ const index$e = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
10712
10712
  __proto__: null,
10713
10713
  deleteRow,
10714
10714
  getData: getData$1,
@@ -10802,7 +10802,7 @@ async function publishWorkbook({
10802
10802
  throw { message, status };
10803
10803
  }
10804
10804
  }
10805
- const index$c = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
10805
+ const index$d = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
10806
10806
  __proto__: null,
10807
10807
  getPublishedWorkbookById,
10808
10808
  getWorkbookDetails,
@@ -11070,7 +11070,7 @@ const getRunResultById = async (runId) => {
11070
11070
  throw { message, status };
11071
11071
  }
11072
11072
  };
11073
- const index$b = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
11073
+ const index$c = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
11074
11074
  __proto__: null,
11075
11075
  createNewRun,
11076
11076
  getData,
@@ -11100,7 +11100,7 @@ async function getTaskDetails({
11100
11100
  throw { message, status };
11101
11101
  }
11102
11102
  }
11103
- const index$a = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
11103
+ const index$b = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
11104
11104
  __proto__: null,
11105
11105
  getTaskDetails
11106
11106
  }, Symbol.toStringTag, { value: "Module" }));
@@ -11146,7 +11146,7 @@ async function getAllReconWorkflows() {
11146
11146
  throw { message, status };
11147
11147
  }
11148
11148
  }
11149
- const index$9 = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
11149
+ const index$a = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
11150
11150
  __proto__: null,
11151
11151
  getAllReconWorkflows,
11152
11152
  runRecon
@@ -11247,7 +11247,7 @@ async function createOrUpdateForm({
11247
11247
  throw { message, status: status2 };
11248
11248
  }
11249
11249
  }
11250
- const index$8 = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
11250
+ const index$9 = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
11251
11251
  __proto__: null,
11252
11252
  createOrUpdateForm,
11253
11253
  getFormById,
@@ -11288,7 +11288,7 @@ async function createAuditLog(params) {
11288
11288
  throw { message, status };
11289
11289
  }
11290
11290
  }
11291
- const index$7 = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
11291
+ const index$8 = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
11292
11292
  __proto__: null,
11293
11293
  createAuditLog,
11294
11294
  getAuditLogs
@@ -11307,7 +11307,7 @@ async function getAllTemplatedPipelines() {
11307
11307
  throw { message, status };
11308
11308
  }
11309
11309
  }
11310
- const index$6 = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
11310
+ const index$7 = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
11311
11311
  __proto__: null,
11312
11312
  getAllTemplatedPipelines
11313
11313
  }, Symbol.toStringTag, { value: "Module" }));
@@ -11368,7 +11368,7 @@ async function reassignTask({
11368
11368
  throw { message, status };
11369
11369
  }
11370
11370
  }
11371
- const index$5 = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
11371
+ const index$6 = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
11372
11372
  __proto__: null,
11373
11373
  markTaskDone,
11374
11374
  reassignTask
@@ -11445,7 +11445,7 @@ async function markItemAsUnread({
11445
11445
  throw { message, status };
11446
11446
  }
11447
11447
  }
11448
- const index$4 = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
11448
+ const index$5 = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
11449
11449
  __proto__: null,
11450
11450
  getAllInboxItems,
11451
11451
  markItemAsRead,
@@ -11472,7 +11472,7 @@ async function getPermissions(params) {
11472
11472
  throw { message, status };
11473
11473
  }
11474
11474
  }
11475
- const index$3 = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
11475
+ const index$4 = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
11476
11476
  __proto__: null,
11477
11477
  getPermissions
11478
11478
  }, Symbol.toStringTag, { value: "Module" }));
@@ -11490,7 +11490,7 @@ async function getClientIp() {
11490
11490
  throw { message, status };
11491
11491
  }
11492
11492
  }
11493
- const index$2 = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
11493
+ const index$3 = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
11494
11494
  __proto__: null,
11495
11495
  getClientIp
11496
11496
  }, Symbol.toStringTag, { value: "Module" }));
@@ -11617,7 +11617,7 @@ async function getMessageBySenderId(params) {
11617
11617
  throw { message, status };
11618
11618
  }
11619
11619
  }
11620
- const index$1 = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
11620
+ const index$2 = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
11621
11621
  __proto__: null,
11622
11622
  createConversation,
11623
11623
  getAllConversations,
@@ -11625,30 +11625,278 @@ const index$1 = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.definePrope
11625
11625
  getMessageBySenderId,
11626
11626
  replyToConversation
11627
11627
  }, Symbol.toStringTag, { value: "Module" }));
11628
+ async function getAuthUrl() {
11629
+ var _a, _b, _c;
11630
+ try {
11631
+ const response = await apiClient.get("/tcn/auth-url");
11632
+ return response.data;
11633
+ } catch (error) {
11634
+ const message = ((_b = (_a = error.response) == null ? void 0 : _a.data) == null ? void 0 : _b.message) || error.message || "Failed to get auth URL";
11635
+ const status = ((_c = error.response) == null ? void 0 : _c.status) || 500;
11636
+ throw { message, status };
11637
+ }
11638
+ }
11639
+ async function exchangeCode(code) {
11640
+ var _a, _b, _c;
11641
+ try {
11642
+ const response = await apiClient.post("/tcn/exchange-code", { code });
11643
+ return response.data;
11644
+ } catch (error) {
11645
+ const message = ((_b = (_a = error.response) == null ? void 0 : _a.data) == null ? void 0 : _b.message) || error.message || "Failed to exchange code";
11646
+ const status = ((_c = error.response) == null ? void 0 : _c.status) || 500;
11647
+ throw { message, status };
11648
+ }
11649
+ }
11650
+ async function refreshToken(refreshTokenValue) {
11651
+ var _a, _b, _c;
11652
+ try {
11653
+ const response = await apiClient.post("/tcn/token", { refresh_token: refreshTokenValue });
11654
+ return response.data;
11655
+ } catch (error) {
11656
+ const message = ((_b = (_a = error.response) == null ? void 0 : _a.data) == null ? void 0 : _b.message) || error.message || "Failed to refresh token";
11657
+ const status = ((_c = error.response) == null ? void 0 : _c.status) || 500;
11658
+ throw { message, status };
11659
+ }
11660
+ }
11661
+ async function getCurrentAgent(token) {
11662
+ var _a, _b, _c;
11663
+ try {
11664
+ const response = await apiClient.post("/tcn/get-current-agent", { token });
11665
+ return response.data;
11666
+ } catch (error) {
11667
+ const message = ((_b = (_a = error.response) == null ? void 0 : _a.data) == null ? void 0 : _b.message) || error.message || "Failed to get current agent";
11668
+ const status = ((_c = error.response) == null ? void 0 : _c.status) || 500;
11669
+ throw { message, status };
11670
+ }
11671
+ }
11672
+ async function getAgentSkills(token, huntGroupSid) {
11673
+ var _a, _b, _c;
11674
+ try {
11675
+ const response = await apiClient.post("/tcn/get-agent-skills", {
11676
+ token,
11677
+ huntGroupSid
11678
+ });
11679
+ return response.data;
11680
+ } catch (error) {
11681
+ const message = ((_b = (_a = error.response) == null ? void 0 : _a.data) == null ? void 0 : _b.message) || error.message || "Failed to get agent skills";
11682
+ const status = ((_c = error.response) == null ? void 0 : _c.status) || 500;
11683
+ throw { message, status };
11684
+ }
11685
+ }
11686
+ async function createSession(token, huntGroupSid, skills) {
11687
+ var _a, _b, _c;
11688
+ try {
11689
+ const response = await apiClient.post("/tcn/create-session", {
11690
+ token,
11691
+ huntGroupSid,
11692
+ skills
11693
+ });
11694
+ return response.data;
11695
+ } catch (error) {
11696
+ const message = ((_b = (_a = error.response) == null ? void 0 : _a.data) == null ? void 0 : _b.message) || error.message || "Failed to create session";
11697
+ const status = ((_c = error.response) == null ? void 0 : _c.status) || 500;
11698
+ throw { message, status };
11699
+ }
11700
+ }
11701
+ async function keepAlive(token, sessionSid) {
11702
+ var _a, _b, _c;
11703
+ try {
11704
+ const response = await apiClient.post("/tcn/keep-alive", {
11705
+ token,
11706
+ sessionSid
11707
+ });
11708
+ return response.data;
11709
+ } catch (error) {
11710
+ const message = ((_b = (_a = error.response) == null ? void 0 : _a.data) == null ? void 0 : _b.message) || error.message || "Failed to keep alive";
11711
+ const status = ((_c = error.response) == null ? void 0 : _c.status) || 500;
11712
+ throw { message, status };
11713
+ }
11714
+ }
11715
+ async function agentGetStatus(token) {
11716
+ var _a, _b, _c;
11717
+ try {
11718
+ const response = await apiClient.post("/tcn/agent-get-status", { token });
11719
+ return response.data;
11720
+ } catch (error) {
11721
+ const message = ((_b = (_a = error.response) == null ? void 0 : _a.data) == null ? void 0 : _b.message) || error.message || "Failed to get agent status";
11722
+ const status = ((_c = error.response) == null ? void 0 : _c.status) || 500;
11723
+ throw { message, status };
11724
+ }
11725
+ }
11726
+ async function getHuntGroupAgentSettings(token, huntGroupSid) {
11727
+ var _a, _b, _c;
11728
+ try {
11729
+ const response = await apiClient.post("/tcn/get-hunt-group-agent-settings", {
11730
+ token,
11731
+ huntGroupSid
11732
+ });
11733
+ return response.data;
11734
+ } catch (error) {
11735
+ const message = ((_b = (_a = error.response) == null ? void 0 : _a.data) == null ? void 0 : _b.message) || error.message || "Failed to get hunt group settings";
11736
+ const status = ((_c = error.response) == null ? void 0 : _c.status) || 500;
11737
+ throw { message, status };
11738
+ }
11739
+ }
11740
+ async function dialManualPrepare(token, sessionSid) {
11741
+ var _a, _b, _c;
11742
+ try {
11743
+ const response = await apiClient.post("/tcn/dial-manual-prepare", {
11744
+ token,
11745
+ sessionSid
11746
+ });
11747
+ return response.data;
11748
+ } catch (error) {
11749
+ const message = ((_b = (_a = error.response) == null ? void 0 : _a.data) == null ? void 0 : _b.message) || error.message || "Failed to prepare manual dial";
11750
+ const status = ((_c = error.response) == null ? void 0 : _c.status) || 500;
11751
+ throw { message, status };
11752
+ }
11753
+ }
11754
+ async function processManualDial(token, call) {
11755
+ var _a, _b, _c;
11756
+ try {
11757
+ const response = await apiClient.post("/tcn/process-manual-dial", {
11758
+ token,
11759
+ call
11760
+ });
11761
+ return response.data;
11762
+ } catch (error) {
11763
+ const message = ((_b = (_a = error.response) == null ? void 0 : _a.data) == null ? void 0 : _b.message) || error.message || "Failed to process manual dial";
11764
+ const status = ((_c = error.response) == null ? void 0 : _c.status) || 500;
11765
+ throw { message, status };
11766
+ }
11767
+ }
11768
+ async function manualDialStart(token, agentSessionSid, huntGroupSid, simpleCallData) {
11769
+ var _a, _b, _c;
11770
+ try {
11771
+ const response = await apiClient.post("/tcn/manual-dial-start", {
11772
+ token,
11773
+ agentSessionSid,
11774
+ huntGroupSid,
11775
+ simpleCallData
11776
+ });
11777
+ return response.data;
11778
+ } catch (error) {
11779
+ const message = ((_b = (_a = error.response) == null ? void 0 : _a.data) == null ? void 0 : _b.message) || error.message || "Failed to start manual dial";
11780
+ const status = ((_c = error.response) == null ? void 0 : _c.status) || 500;
11781
+ throw { message, status };
11782
+ }
11783
+ }
11784
+ async function agentDisconnect(token, sessionSid, reason = "endcall") {
11785
+ var _a, _b, _c;
11786
+ try {
11787
+ const response = await apiClient.post("/tcn/agent-disconnect", {
11788
+ token,
11789
+ sessionSid,
11790
+ reason
11791
+ });
11792
+ return response.data;
11793
+ } catch (error) {
11794
+ const message = ((_b = (_a = error.response) == null ? void 0 : _a.data) == null ? void 0 : _b.message) || error.message || "Failed to disconnect agent";
11795
+ const status = ((_c = error.response) == null ? void 0 : _c.status) || 500;
11796
+ throw { message, status };
11797
+ }
11798
+ }
11799
+ async function agentPause(token, sessionSid) {
11800
+ var _a, _b, _c;
11801
+ try {
11802
+ const response = await apiClient.post("/tcn/agent-pause", {
11803
+ token,
11804
+ sessionSid
11805
+ });
11806
+ return response.data;
11807
+ } catch (error) {
11808
+ const message = ((_b = (_a = error.response) == null ? void 0 : _a.data) == null ? void 0 : _b.message) || error.message || "Failed to pause agent";
11809
+ const status = ((_c = error.response) == null ? void 0 : _c.status) || 500;
11810
+ throw { message, status };
11811
+ }
11812
+ }
11813
+ async function agentSetReady(token, sessionSid) {
11814
+ var _a, _b, _c;
11815
+ try {
11816
+ const response = await apiClient.post("/tcn/agent-set-ready", {
11817
+ token,
11818
+ sessionSid
11819
+ });
11820
+ return response.data;
11821
+ } catch (error) {
11822
+ const message = ((_b = (_a = error.response) == null ? void 0 : _a.data) == null ? void 0 : _b.message) || error.message || "Failed to set agent ready";
11823
+ const status = ((_c = error.response) == null ? void 0 : _c.status) || 500;
11824
+ throw { message, status };
11825
+ }
11826
+ }
11827
+ async function agentGetConnectedParty(token, sessionSid) {
11828
+ var _a, _b, _c;
11829
+ try {
11830
+ const response = await apiClient.post("/tcn/agent-get-connected-party", {
11831
+ token,
11832
+ sessionSid
11833
+ });
11834
+ return response.data;
11835
+ } catch (error) {
11836
+ const message = ((_b = (_a = error.response) == null ? void 0 : _a.data) == null ? void 0 : _b.message) || error.message || "Failed to get connected party";
11837
+ const status = ((_c = error.response) == null ? void 0 : _c.status) || 500;
11838
+ throw { message, status };
11839
+ }
11840
+ }
11841
+ async function getCallData(token, callSid) {
11842
+ var _a, _b, _c;
11843
+ try {
11844
+ const response = await apiClient.post("/tcn/get-call-data", {
11845
+ token,
11846
+ callSid
11847
+ });
11848
+ return response.data;
11849
+ } catch (error) {
11850
+ const message = ((_b = (_a = error.response) == null ? void 0 : _a.data) == null ? void 0 : _b.message) || error.message || "Failed to get call data";
11851
+ const status = ((_c = error.response) == null ? void 0 : _c.status) || 500;
11852
+ throw { message, status };
11853
+ }
11854
+ }
11855
+ const index$1 = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
11856
+ __proto__: null,
11857
+ agentDisconnect,
11858
+ agentGetConnectedParty,
11859
+ agentGetStatus,
11860
+ agentPause,
11861
+ agentSetReady,
11862
+ createSession,
11863
+ dialManualPrepare,
11864
+ exchangeCode,
11865
+ getAgentSkills,
11866
+ getAuthUrl,
11867
+ getCallData,
11868
+ getCurrentAgent,
11869
+ getHuntGroupAgentSettings,
11870
+ keepAlive,
11871
+ manualDialStart,
11872
+ processManualDial,
11873
+ refreshToken
11874
+ }, Symbol.toStringTag, { value: "Module" }));
11628
11875
  const index = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
11629
11876
  __proto__: null,
11630
11877
  apiClient,
11631
- audit: index$7,
11632
- chat: index$f,
11633
- clientIp: index$2,
11634
- dataset: index$e,
11635
- definition: index$j,
11636
- emailEngine: index$1,
11637
- files: index$k,
11638
- form: index$8,
11639
- inboxItems: index$4,
11640
- inputTable: index$d,
11641
- metric: index$g,
11642
- permissions: index$3,
11643
- process: index$5,
11644
- recon: index$9,
11645
- statement: index$b,
11646
- task: index$a,
11647
- templatedPipeline: index$6,
11648
- user: index$m,
11649
- workbook: index$c,
11650
- workflow: index$l,
11651
- worksheet: index$i
11878
+ audit: index$8,
11879
+ chat: index$g,
11880
+ clientIp: index$3,
11881
+ dataset: index$f,
11882
+ definition: index$k,
11883
+ emailEngine: index$2,
11884
+ files: index$l,
11885
+ form: index$9,
11886
+ inboxItems: index$5,
11887
+ inputTable: index$e,
11888
+ metric: index$h,
11889
+ permissions: index$4,
11890
+ process: index$6,
11891
+ recon: index$a,
11892
+ statement: index$c,
11893
+ task: index$b,
11894
+ tcn: index$1,
11895
+ templatedPipeline: index$7,
11896
+ user: index$n,
11897
+ workbook: index$d,
11898
+ workflow: index$m,
11899
+ worksheet: index$j
11652
11900
  }, Symbol.toStringTag, { value: "Module" }));
11653
11901
  const bluecopaTailwindConfig = {
11654
11902
  darkMode: "class",
@@ -11812,6 +12060,6 @@ export {
11812
12060
  getConfig as copaGetConfig,
11813
12061
  setConfig as copaSetConfig,
11814
12062
  bluecopaTailwindConfig as copaTailwindConfig,
11815
- index$h as copaUtils
12063
+ index$i as copaUtils
11816
12064
  };
11817
12065
  //# sourceMappingURL=index.es.js.map