@opens/gateways 1.11.5 → 1.11.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.
- package/dist/call-report/contracts/index.d.mts +126 -0
- package/dist/call-report/contracts/index.d.ts +126 -0
- package/dist/call-report/contracts/index.js +19 -0
- package/dist/call-report/contracts/index.js.map +1 -0
- package/dist/call-report/contracts/index.mjs +1 -0
- package/dist/call-report/contracts/index.mjs.map +1 -0
- package/dist/chat-config/contracts/index.d.mts +8 -1
- package/dist/chat-config/contracts/index.d.ts +8 -1
- package/dist/chat-webservice/contracts/index.d.mts +97 -0
- package/dist/chat-webservice/contracts/index.d.ts +97 -0
- package/dist/chat-webservice/contracts/index.js +19 -0
- package/dist/chat-webservice/contracts/index.js.map +1 -0
- package/dist/chat-webservice/contracts/index.mjs +1 -0
- package/dist/chat-webservice/contracts/index.mjs.map +1 -0
- package/dist/index.d.mts +61 -6
- package/dist/index.d.ts +61 -6
- package/dist/index.js +88 -3
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +88 -3
- package/dist/index.mjs.map +1 -1
- package/package.json +1 -1
|
@@ -0,0 +1,126 @@
|
|
|
1
|
+
/** Supported Elasticsearch indexes for contact history queries. */
|
|
2
|
+
type ContactHistoryIndex = 'chat' | 'cdr';
|
|
3
|
+
/** Sort order for contact history results. */
|
|
4
|
+
type ContactHistorySortOrder = 'asc' | 'desc';
|
|
5
|
+
/** Query parameters for listing contact interaction history across indexes. */
|
|
6
|
+
interface ListContactHistoryRequest {
|
|
7
|
+
companyId?: string;
|
|
8
|
+
contactIds?: string[];
|
|
9
|
+
indexes?: ContactHistoryIndex[];
|
|
10
|
+
operatorIds?: string[];
|
|
11
|
+
chatStatus?: string[];
|
|
12
|
+
chatProviders?: string[];
|
|
13
|
+
currentScore?: number;
|
|
14
|
+
searchAfter?: string[];
|
|
15
|
+
queueIds?: string[];
|
|
16
|
+
order?: ContactHistorySortOrder;
|
|
17
|
+
limit?: number;
|
|
18
|
+
}
|
|
19
|
+
/** Member associated with a contact interaction. */
|
|
20
|
+
interface InteractionMemberResponse {
|
|
21
|
+
id: number;
|
|
22
|
+
recipientId: string;
|
|
23
|
+
provider: string;
|
|
24
|
+
chatRoomId: number;
|
|
25
|
+
origin: string;
|
|
26
|
+
channel: string;
|
|
27
|
+
companyId: string;
|
|
28
|
+
}
|
|
29
|
+
/** Chat routing step recorded for a contact interaction. */
|
|
30
|
+
interface InteractionChatStepResponse {
|
|
31
|
+
id: string;
|
|
32
|
+
chatRoomId: number;
|
|
33
|
+
duration: number;
|
|
34
|
+
actionId: string;
|
|
35
|
+
queueId: unknown;
|
|
36
|
+
nextQueueId: unknown;
|
|
37
|
+
wasTransferred: unknown;
|
|
38
|
+
createdAt: string;
|
|
39
|
+
updatedAt: string;
|
|
40
|
+
}
|
|
41
|
+
/** Organization linked to a contact interaction. */
|
|
42
|
+
interface InteractionOrganizationResponse {
|
|
43
|
+
id: number;
|
|
44
|
+
callId: number;
|
|
45
|
+
organizationId: number;
|
|
46
|
+
createdAt: string;
|
|
47
|
+
updatedAt: string;
|
|
48
|
+
}
|
|
49
|
+
/** Call step recorded for a contact interaction. */
|
|
50
|
+
interface InteractionCallStepResponse {
|
|
51
|
+
id: number;
|
|
52
|
+
callId: number;
|
|
53
|
+
companyId: string;
|
|
54
|
+
status: string;
|
|
55
|
+
fromNumber: string;
|
|
56
|
+
fromId: string;
|
|
57
|
+
contextId: string;
|
|
58
|
+
toNumber: string;
|
|
59
|
+
toId: string;
|
|
60
|
+
transferToNumber: unknown;
|
|
61
|
+
transferToId: unknown;
|
|
62
|
+
waitTime: number;
|
|
63
|
+
talkTime: number;
|
|
64
|
+
queue: unknown;
|
|
65
|
+
createdAt: string;
|
|
66
|
+
updatedAt: string;
|
|
67
|
+
hourlyTalkTime: unknown[];
|
|
68
|
+
hourlyWaitTime: unknown[];
|
|
69
|
+
}
|
|
70
|
+
/** Contact interaction entry returned by the Call Report API. */
|
|
71
|
+
interface ContactInteractionResponse {
|
|
72
|
+
id: number;
|
|
73
|
+
status?: string;
|
|
74
|
+
companyId: string;
|
|
75
|
+
currentAttendanceGroupId: unknown;
|
|
76
|
+
answeredAt?: string;
|
|
77
|
+
createdAt: string;
|
|
78
|
+
updatedAt: string;
|
|
79
|
+
waitTime?: number;
|
|
80
|
+
wasTransferred: unknown;
|
|
81
|
+
type: string;
|
|
82
|
+
wasFinishedSilently?: boolean;
|
|
83
|
+
totalTime?: number;
|
|
84
|
+
attendanceTime?: number;
|
|
85
|
+
campaignId: unknown;
|
|
86
|
+
chatConfigId?: string;
|
|
87
|
+
protocol: string;
|
|
88
|
+
score: unknown;
|
|
89
|
+
csatFeedback?: string | null;
|
|
90
|
+
createdBy?: string;
|
|
91
|
+
clientIdentifier?: string;
|
|
92
|
+
closedBy: unknown;
|
|
93
|
+
creatorProvider?: string;
|
|
94
|
+
subject?: string;
|
|
95
|
+
routedAt: unknown;
|
|
96
|
+
activeDates: unknown;
|
|
97
|
+
activeWeekDays: unknown;
|
|
98
|
+
members?: InteractionMemberResponse[];
|
|
99
|
+
tags: unknown[];
|
|
100
|
+
tagsGroups: unknown[];
|
|
101
|
+
invitations?: unknown[];
|
|
102
|
+
chatSteps?: InteractionChatStepResponse[];
|
|
103
|
+
organizations: InteractionOrganizationResponse[];
|
|
104
|
+
_index: string;
|
|
105
|
+
linkedId?: string;
|
|
106
|
+
callId?: string;
|
|
107
|
+
csatScore: unknown;
|
|
108
|
+
hungUpByAgent?: boolean;
|
|
109
|
+
sentToCsat?: boolean;
|
|
110
|
+
hungupAt?: string;
|
|
111
|
+
elasticId?: string;
|
|
112
|
+
widgetId: unknown;
|
|
113
|
+
wasCalledback: unknown;
|
|
114
|
+
hasCallback: unknown;
|
|
115
|
+
totalWaitTime?: number;
|
|
116
|
+
totalTalkTime?: number;
|
|
117
|
+
totalDuration?: number;
|
|
118
|
+
steps?: InteractionCallStepResponse[];
|
|
119
|
+
}
|
|
120
|
+
/** Paginated response returned by the Call Report API for multi-index history. */
|
|
121
|
+
interface ContactHistoryResponse {
|
|
122
|
+
currentScore: string[];
|
|
123
|
+
data: ContactInteractionResponse[];
|
|
124
|
+
}
|
|
125
|
+
|
|
126
|
+
export type { ContactHistoryIndex, ContactHistoryResponse, ContactHistorySortOrder, ContactInteractionResponse, InteractionCallStepResponse, InteractionChatStepResponse, InteractionMemberResponse, InteractionOrganizationResponse, ListContactHistoryRequest };
|
|
@@ -0,0 +1,126 @@
|
|
|
1
|
+
/** Supported Elasticsearch indexes for contact history queries. */
|
|
2
|
+
type ContactHistoryIndex = 'chat' | 'cdr';
|
|
3
|
+
/** Sort order for contact history results. */
|
|
4
|
+
type ContactHistorySortOrder = 'asc' | 'desc';
|
|
5
|
+
/** Query parameters for listing contact interaction history across indexes. */
|
|
6
|
+
interface ListContactHistoryRequest {
|
|
7
|
+
companyId?: string;
|
|
8
|
+
contactIds?: string[];
|
|
9
|
+
indexes?: ContactHistoryIndex[];
|
|
10
|
+
operatorIds?: string[];
|
|
11
|
+
chatStatus?: string[];
|
|
12
|
+
chatProviders?: string[];
|
|
13
|
+
currentScore?: number;
|
|
14
|
+
searchAfter?: string[];
|
|
15
|
+
queueIds?: string[];
|
|
16
|
+
order?: ContactHistorySortOrder;
|
|
17
|
+
limit?: number;
|
|
18
|
+
}
|
|
19
|
+
/** Member associated with a contact interaction. */
|
|
20
|
+
interface InteractionMemberResponse {
|
|
21
|
+
id: number;
|
|
22
|
+
recipientId: string;
|
|
23
|
+
provider: string;
|
|
24
|
+
chatRoomId: number;
|
|
25
|
+
origin: string;
|
|
26
|
+
channel: string;
|
|
27
|
+
companyId: string;
|
|
28
|
+
}
|
|
29
|
+
/** Chat routing step recorded for a contact interaction. */
|
|
30
|
+
interface InteractionChatStepResponse {
|
|
31
|
+
id: string;
|
|
32
|
+
chatRoomId: number;
|
|
33
|
+
duration: number;
|
|
34
|
+
actionId: string;
|
|
35
|
+
queueId: unknown;
|
|
36
|
+
nextQueueId: unknown;
|
|
37
|
+
wasTransferred: unknown;
|
|
38
|
+
createdAt: string;
|
|
39
|
+
updatedAt: string;
|
|
40
|
+
}
|
|
41
|
+
/** Organization linked to a contact interaction. */
|
|
42
|
+
interface InteractionOrganizationResponse {
|
|
43
|
+
id: number;
|
|
44
|
+
callId: number;
|
|
45
|
+
organizationId: number;
|
|
46
|
+
createdAt: string;
|
|
47
|
+
updatedAt: string;
|
|
48
|
+
}
|
|
49
|
+
/** Call step recorded for a contact interaction. */
|
|
50
|
+
interface InteractionCallStepResponse {
|
|
51
|
+
id: number;
|
|
52
|
+
callId: number;
|
|
53
|
+
companyId: string;
|
|
54
|
+
status: string;
|
|
55
|
+
fromNumber: string;
|
|
56
|
+
fromId: string;
|
|
57
|
+
contextId: string;
|
|
58
|
+
toNumber: string;
|
|
59
|
+
toId: string;
|
|
60
|
+
transferToNumber: unknown;
|
|
61
|
+
transferToId: unknown;
|
|
62
|
+
waitTime: number;
|
|
63
|
+
talkTime: number;
|
|
64
|
+
queue: unknown;
|
|
65
|
+
createdAt: string;
|
|
66
|
+
updatedAt: string;
|
|
67
|
+
hourlyTalkTime: unknown[];
|
|
68
|
+
hourlyWaitTime: unknown[];
|
|
69
|
+
}
|
|
70
|
+
/** Contact interaction entry returned by the Call Report API. */
|
|
71
|
+
interface ContactInteractionResponse {
|
|
72
|
+
id: number;
|
|
73
|
+
status?: string;
|
|
74
|
+
companyId: string;
|
|
75
|
+
currentAttendanceGroupId: unknown;
|
|
76
|
+
answeredAt?: string;
|
|
77
|
+
createdAt: string;
|
|
78
|
+
updatedAt: string;
|
|
79
|
+
waitTime?: number;
|
|
80
|
+
wasTransferred: unknown;
|
|
81
|
+
type: string;
|
|
82
|
+
wasFinishedSilently?: boolean;
|
|
83
|
+
totalTime?: number;
|
|
84
|
+
attendanceTime?: number;
|
|
85
|
+
campaignId: unknown;
|
|
86
|
+
chatConfigId?: string;
|
|
87
|
+
protocol: string;
|
|
88
|
+
score: unknown;
|
|
89
|
+
csatFeedback?: string | null;
|
|
90
|
+
createdBy?: string;
|
|
91
|
+
clientIdentifier?: string;
|
|
92
|
+
closedBy: unknown;
|
|
93
|
+
creatorProvider?: string;
|
|
94
|
+
subject?: string;
|
|
95
|
+
routedAt: unknown;
|
|
96
|
+
activeDates: unknown;
|
|
97
|
+
activeWeekDays: unknown;
|
|
98
|
+
members?: InteractionMemberResponse[];
|
|
99
|
+
tags: unknown[];
|
|
100
|
+
tagsGroups: unknown[];
|
|
101
|
+
invitations?: unknown[];
|
|
102
|
+
chatSteps?: InteractionChatStepResponse[];
|
|
103
|
+
organizations: InteractionOrganizationResponse[];
|
|
104
|
+
_index: string;
|
|
105
|
+
linkedId?: string;
|
|
106
|
+
callId?: string;
|
|
107
|
+
csatScore: unknown;
|
|
108
|
+
hungUpByAgent?: boolean;
|
|
109
|
+
sentToCsat?: boolean;
|
|
110
|
+
hungupAt?: string;
|
|
111
|
+
elasticId?: string;
|
|
112
|
+
widgetId: unknown;
|
|
113
|
+
wasCalledback: unknown;
|
|
114
|
+
hasCallback: unknown;
|
|
115
|
+
totalWaitTime?: number;
|
|
116
|
+
totalTalkTime?: number;
|
|
117
|
+
totalDuration?: number;
|
|
118
|
+
steps?: InteractionCallStepResponse[];
|
|
119
|
+
}
|
|
120
|
+
/** Paginated response returned by the Call Report API for multi-index history. */
|
|
121
|
+
interface ContactHistoryResponse {
|
|
122
|
+
currentScore: string[];
|
|
123
|
+
data: ContactInteractionResponse[];
|
|
124
|
+
}
|
|
125
|
+
|
|
126
|
+
export type { ContactHistoryIndex, ContactHistoryResponse, ContactHistorySortOrder, ContactInteractionResponse, InteractionCallStepResponse, InteractionChatStepResponse, InteractionMemberResponse, InteractionOrganizationResponse, ListContactHistoryRequest };
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __defProp = Object.defineProperty;
|
|
3
|
+
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
|
|
4
|
+
var __getOwnPropNames = Object.getOwnPropertyNames;
|
|
5
|
+
var __hasOwnProp = Object.prototype.hasOwnProperty;
|
|
6
|
+
var __copyProps = (to, from, except, desc) => {
|
|
7
|
+
if (from && typeof from === "object" || typeof from === "function") {
|
|
8
|
+
for (let key of __getOwnPropNames(from))
|
|
9
|
+
if (!__hasOwnProp.call(to, key) && key !== except)
|
|
10
|
+
__defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
|
|
11
|
+
}
|
|
12
|
+
return to;
|
|
13
|
+
};
|
|
14
|
+
var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
|
|
15
|
+
|
|
16
|
+
// src/call-report/contracts/index.ts
|
|
17
|
+
var contracts_exports = {};
|
|
18
|
+
module.exports = __toCommonJS(contracts_exports);
|
|
19
|
+
//# sourceMappingURL=index.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":["../../../src/call-report/contracts/index.ts"],"sourcesContent":["export * from './contact-history';\n"],"mappings":";;;;;;;;;;;;;;;;AAAA;AAAA;","names":[]}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
//# sourceMappingURL=index.mjs.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":[],"sourcesContent":[],"mappings":"","names":[]}
|
|
@@ -51,6 +51,12 @@ interface GetConfigsByProviderParams {
|
|
|
51
51
|
providerName?: string;
|
|
52
52
|
}
|
|
53
53
|
|
|
54
|
+
/** Query parameters for listing queue memberships of a member. */
|
|
55
|
+
interface GetMemberQueuesRequest {
|
|
56
|
+
memberId: string;
|
|
57
|
+
association?: boolean;
|
|
58
|
+
}
|
|
59
|
+
/** Queue membership entry returned by the Chat Config API. */
|
|
54
60
|
interface QueueMember {
|
|
55
61
|
id: string;
|
|
56
62
|
memberId: string;
|
|
@@ -67,6 +73,7 @@ interface QueueMember {
|
|
|
67
73
|
createdAt: string;
|
|
68
74
|
updatedAt: string;
|
|
69
75
|
queueId: string;
|
|
76
|
+
queue?: Queue;
|
|
70
77
|
}
|
|
71
78
|
type DistributionType = {
|
|
72
79
|
id: string;
|
|
@@ -218,4 +225,4 @@ type RootRulesResponse = {
|
|
|
218
225
|
data: Rule[];
|
|
219
226
|
};
|
|
220
227
|
|
|
221
|
-
export type { Config, ConfigListByProviderResponse, ConfigProvider, DistributionType, FindOrCreateQueueRuleRequest, GetConfigsByProviderParams, GetRootRulesRequest, MetaTemplateButton, MetaTemplateConfigResponse, MetaTemplateConfigsResponse, Provider, ProviderListResponse, Queue, QueueListResponse, QueueMember, QueueRule, RootRulesResponse, Rule };
|
|
228
|
+
export type { Config, ConfigListByProviderResponse, ConfigProvider, DistributionType, FindOrCreateQueueRuleRequest, GetConfigsByProviderParams, GetMemberQueuesRequest, GetRootRulesRequest, MetaTemplateButton, MetaTemplateConfigResponse, MetaTemplateConfigsResponse, Provider, ProviderListResponse, Queue, QueueListResponse, QueueMember, QueueRule, RootRulesResponse, Rule };
|
|
@@ -51,6 +51,12 @@ interface GetConfigsByProviderParams {
|
|
|
51
51
|
providerName?: string;
|
|
52
52
|
}
|
|
53
53
|
|
|
54
|
+
/** Query parameters for listing queue memberships of a member. */
|
|
55
|
+
interface GetMemberQueuesRequest {
|
|
56
|
+
memberId: string;
|
|
57
|
+
association?: boolean;
|
|
58
|
+
}
|
|
59
|
+
/** Queue membership entry returned by the Chat Config API. */
|
|
54
60
|
interface QueueMember {
|
|
55
61
|
id: string;
|
|
56
62
|
memberId: string;
|
|
@@ -67,6 +73,7 @@ interface QueueMember {
|
|
|
67
73
|
createdAt: string;
|
|
68
74
|
updatedAt: string;
|
|
69
75
|
queueId: string;
|
|
76
|
+
queue?: Queue;
|
|
70
77
|
}
|
|
71
78
|
type DistributionType = {
|
|
72
79
|
id: string;
|
|
@@ -218,4 +225,4 @@ type RootRulesResponse = {
|
|
|
218
225
|
data: Rule[];
|
|
219
226
|
};
|
|
220
227
|
|
|
221
|
-
export type { Config, ConfigListByProviderResponse, ConfigProvider, DistributionType, FindOrCreateQueueRuleRequest, GetConfigsByProviderParams, GetRootRulesRequest, MetaTemplateButton, MetaTemplateConfigResponse, MetaTemplateConfigsResponse, Provider, ProviderListResponse, Queue, QueueListResponse, QueueMember, QueueRule, RootRulesResponse, Rule };
|
|
228
|
+
export type { Config, ConfigListByProviderResponse, ConfigProvider, DistributionType, FindOrCreateQueueRuleRequest, GetConfigsByProviderParams, GetMemberQueuesRequest, GetRootRulesRequest, MetaTemplateButton, MetaTemplateConfigResponse, MetaTemplateConfigsResponse, Provider, ProviderListResponse, Queue, QueueListResponse, QueueMember, QueueRule, RootRulesResponse, Rule };
|
|
@@ -0,0 +1,97 @@
|
|
|
1
|
+
/** Query parameters for listing live rooms assigned to a user. */
|
|
2
|
+
interface ListLiveUserRoomsRequest {
|
|
3
|
+
recipientId: string;
|
|
4
|
+
companyId: string;
|
|
5
|
+
isOpen: boolean;
|
|
6
|
+
}
|
|
7
|
+
/** Query parameters for fetching a room by its identifier. */
|
|
8
|
+
interface GetRoomByIdRequest {
|
|
9
|
+
companyId?: string;
|
|
10
|
+
includeMembers?: boolean;
|
|
11
|
+
}
|
|
12
|
+
/** Date range used to determine room activity windows. */
|
|
13
|
+
interface RoomActiveDates {
|
|
14
|
+
gte: string;
|
|
15
|
+
lte: string;
|
|
16
|
+
}
|
|
17
|
+
/** Tag associated with a chat room. */
|
|
18
|
+
interface RoomTagResponse {
|
|
19
|
+
id: string;
|
|
20
|
+
chatRoomId: number;
|
|
21
|
+
tagId: number;
|
|
22
|
+
tagName: string;
|
|
23
|
+
companyId: string;
|
|
24
|
+
createdAt: string;
|
|
25
|
+
updatedAt: string;
|
|
26
|
+
}
|
|
27
|
+
/** Member participating in a chat room. */
|
|
28
|
+
interface RoomMemberResponse {
|
|
29
|
+
id: number;
|
|
30
|
+
exited: boolean;
|
|
31
|
+
new: boolean;
|
|
32
|
+
recipientId: string;
|
|
33
|
+
subject?: string;
|
|
34
|
+
origin: string;
|
|
35
|
+
chatRoomId: number;
|
|
36
|
+
externalClientId?: string;
|
|
37
|
+
provider: string;
|
|
38
|
+
providerAccessToken?: string;
|
|
39
|
+
channel: string;
|
|
40
|
+
companyId: string;
|
|
41
|
+
createdAt: string;
|
|
42
|
+
updatedAt: string;
|
|
43
|
+
}
|
|
44
|
+
/** Chat room entity returned by the Chat Webservice API. */
|
|
45
|
+
interface RoomResponse {
|
|
46
|
+
id: number;
|
|
47
|
+
subject: string;
|
|
48
|
+
companyId: string;
|
|
49
|
+
chatConfigId: string;
|
|
50
|
+
status: string;
|
|
51
|
+
open: boolean;
|
|
52
|
+
inTransfer: boolean;
|
|
53
|
+
closedBy: string;
|
|
54
|
+
latestTransferId: string;
|
|
55
|
+
waitTime: number;
|
|
56
|
+
attendanceTime: number;
|
|
57
|
+
score: number;
|
|
58
|
+
csatFeedback?: string | null;
|
|
59
|
+
currentRule: string;
|
|
60
|
+
queueId: string;
|
|
61
|
+
campaignId?: string;
|
|
62
|
+
createdBy: string;
|
|
63
|
+
creatorProvider: string;
|
|
64
|
+
lastClientMsgAt: string;
|
|
65
|
+
lastOperatorMsgAt: string;
|
|
66
|
+
createdAt: string;
|
|
67
|
+
updatedAt: string;
|
|
68
|
+
inactivityLimit: number;
|
|
69
|
+
wasTransferred: boolean;
|
|
70
|
+
wasFinishedSilently: boolean;
|
|
71
|
+
type: string;
|
|
72
|
+
answeredAt: string;
|
|
73
|
+
protocol: string;
|
|
74
|
+
activeDates: RoomActiveDates;
|
|
75
|
+
activeWeekDays: number[];
|
|
76
|
+
priority: number;
|
|
77
|
+
topic: string;
|
|
78
|
+
routedAt: string;
|
|
79
|
+
locale: string;
|
|
80
|
+
tags?: RoomTagResponse[];
|
|
81
|
+
members?: RoomMemberResponse[];
|
|
82
|
+
new?: boolean;
|
|
83
|
+
unreadMessagesCount?: number;
|
|
84
|
+
}
|
|
85
|
+
/** Live room entry for a user, including membership metadata and the nested room. */
|
|
86
|
+
interface LiveUserRoomResponse {
|
|
87
|
+
id: number;
|
|
88
|
+
recipientId: string;
|
|
89
|
+
unreadMessagesCount: string | number;
|
|
90
|
+
exited: boolean;
|
|
91
|
+
new: boolean;
|
|
92
|
+
provider: string;
|
|
93
|
+
channel: string;
|
|
94
|
+
room: RoomResponse;
|
|
95
|
+
}
|
|
96
|
+
|
|
97
|
+
export type { GetRoomByIdRequest, ListLiveUserRoomsRequest, LiveUserRoomResponse, RoomActiveDates, RoomMemberResponse, RoomResponse, RoomTagResponse };
|
|
@@ -0,0 +1,97 @@
|
|
|
1
|
+
/** Query parameters for listing live rooms assigned to a user. */
|
|
2
|
+
interface ListLiveUserRoomsRequest {
|
|
3
|
+
recipientId: string;
|
|
4
|
+
companyId: string;
|
|
5
|
+
isOpen: boolean;
|
|
6
|
+
}
|
|
7
|
+
/** Query parameters for fetching a room by its identifier. */
|
|
8
|
+
interface GetRoomByIdRequest {
|
|
9
|
+
companyId?: string;
|
|
10
|
+
includeMembers?: boolean;
|
|
11
|
+
}
|
|
12
|
+
/** Date range used to determine room activity windows. */
|
|
13
|
+
interface RoomActiveDates {
|
|
14
|
+
gte: string;
|
|
15
|
+
lte: string;
|
|
16
|
+
}
|
|
17
|
+
/** Tag associated with a chat room. */
|
|
18
|
+
interface RoomTagResponse {
|
|
19
|
+
id: string;
|
|
20
|
+
chatRoomId: number;
|
|
21
|
+
tagId: number;
|
|
22
|
+
tagName: string;
|
|
23
|
+
companyId: string;
|
|
24
|
+
createdAt: string;
|
|
25
|
+
updatedAt: string;
|
|
26
|
+
}
|
|
27
|
+
/** Member participating in a chat room. */
|
|
28
|
+
interface RoomMemberResponse {
|
|
29
|
+
id: number;
|
|
30
|
+
exited: boolean;
|
|
31
|
+
new: boolean;
|
|
32
|
+
recipientId: string;
|
|
33
|
+
subject?: string;
|
|
34
|
+
origin: string;
|
|
35
|
+
chatRoomId: number;
|
|
36
|
+
externalClientId?: string;
|
|
37
|
+
provider: string;
|
|
38
|
+
providerAccessToken?: string;
|
|
39
|
+
channel: string;
|
|
40
|
+
companyId: string;
|
|
41
|
+
createdAt: string;
|
|
42
|
+
updatedAt: string;
|
|
43
|
+
}
|
|
44
|
+
/** Chat room entity returned by the Chat Webservice API. */
|
|
45
|
+
interface RoomResponse {
|
|
46
|
+
id: number;
|
|
47
|
+
subject: string;
|
|
48
|
+
companyId: string;
|
|
49
|
+
chatConfigId: string;
|
|
50
|
+
status: string;
|
|
51
|
+
open: boolean;
|
|
52
|
+
inTransfer: boolean;
|
|
53
|
+
closedBy: string;
|
|
54
|
+
latestTransferId: string;
|
|
55
|
+
waitTime: number;
|
|
56
|
+
attendanceTime: number;
|
|
57
|
+
score: number;
|
|
58
|
+
csatFeedback?: string | null;
|
|
59
|
+
currentRule: string;
|
|
60
|
+
queueId: string;
|
|
61
|
+
campaignId?: string;
|
|
62
|
+
createdBy: string;
|
|
63
|
+
creatorProvider: string;
|
|
64
|
+
lastClientMsgAt: string;
|
|
65
|
+
lastOperatorMsgAt: string;
|
|
66
|
+
createdAt: string;
|
|
67
|
+
updatedAt: string;
|
|
68
|
+
inactivityLimit: number;
|
|
69
|
+
wasTransferred: boolean;
|
|
70
|
+
wasFinishedSilently: boolean;
|
|
71
|
+
type: string;
|
|
72
|
+
answeredAt: string;
|
|
73
|
+
protocol: string;
|
|
74
|
+
activeDates: RoomActiveDates;
|
|
75
|
+
activeWeekDays: number[];
|
|
76
|
+
priority: number;
|
|
77
|
+
topic: string;
|
|
78
|
+
routedAt: string;
|
|
79
|
+
locale: string;
|
|
80
|
+
tags?: RoomTagResponse[];
|
|
81
|
+
members?: RoomMemberResponse[];
|
|
82
|
+
new?: boolean;
|
|
83
|
+
unreadMessagesCount?: number;
|
|
84
|
+
}
|
|
85
|
+
/** Live room entry for a user, including membership metadata and the nested room. */
|
|
86
|
+
interface LiveUserRoomResponse {
|
|
87
|
+
id: number;
|
|
88
|
+
recipientId: string;
|
|
89
|
+
unreadMessagesCount: string | number;
|
|
90
|
+
exited: boolean;
|
|
91
|
+
new: boolean;
|
|
92
|
+
provider: string;
|
|
93
|
+
channel: string;
|
|
94
|
+
room: RoomResponse;
|
|
95
|
+
}
|
|
96
|
+
|
|
97
|
+
export type { GetRoomByIdRequest, ListLiveUserRoomsRequest, LiveUserRoomResponse, RoomActiveDates, RoomMemberResponse, RoomResponse, RoomTagResponse };
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __defProp = Object.defineProperty;
|
|
3
|
+
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
|
|
4
|
+
var __getOwnPropNames = Object.getOwnPropertyNames;
|
|
5
|
+
var __hasOwnProp = Object.prototype.hasOwnProperty;
|
|
6
|
+
var __copyProps = (to, from, except, desc) => {
|
|
7
|
+
if (from && typeof from === "object" || typeof from === "function") {
|
|
8
|
+
for (let key of __getOwnPropNames(from))
|
|
9
|
+
if (!__hasOwnProp.call(to, key) && key !== except)
|
|
10
|
+
__defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
|
|
11
|
+
}
|
|
12
|
+
return to;
|
|
13
|
+
};
|
|
14
|
+
var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
|
|
15
|
+
|
|
16
|
+
// src/chat-webservice/contracts/index.ts
|
|
17
|
+
var contracts_exports = {};
|
|
18
|
+
module.exports = __toCommonJS(contracts_exports);
|
|
19
|
+
//# sourceMappingURL=index.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":["../../../src/chat-webservice/contracts/index.ts"],"sourcesContent":["export * from './room';\n"],"mappings":";;;;;;;;;;;;;;;;AAAA;AAAA;","names":[]}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
//# sourceMappingURL=index.mjs.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":[],"sourcesContent":[],"mappings":"","names":[]}
|
package/dist/index.d.mts
CHANGED
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import { AxiosInstance } from 'axios';
|
|
2
2
|
import { CompanyResponse, WorkGroupListResponse, WorkGroupResponse, WorkGroupMembersResponse, GetAllUsersParams, GetAllUsersResponse, GetManagedUsersResponse } from './customer-service/contracts/index.mjs';
|
|
3
3
|
export { CompanyData, ManagedUser, User, WorkGroup, WorkGroupMember } from './customer-service/contracts/index.mjs';
|
|
4
|
-
import { ProviderListResponse, GetConfigsByProviderParams, ConfigListByProviderResponse, Queue, MetaTemplateConfigResponse, MetaTemplateConfigsResponse, FindOrCreateQueueRuleRequest, QueueRule, GetRootRulesRequest, RootRulesResponse } from './chat-config/contracts/index.mjs';
|
|
5
|
-
export { Config, ConfigProvider, DistributionType, MetaTemplateButton, Provider, QueueListResponse,
|
|
4
|
+
import { ProviderListResponse, GetConfigsByProviderParams, ConfigListByProviderResponse, Queue, GetMemberQueuesRequest, QueueMember, MetaTemplateConfigResponse, MetaTemplateConfigsResponse, FindOrCreateQueueRuleRequest, QueueRule, GetRootRulesRequest, RootRulesResponse } from './chat-config/contracts/index.mjs';
|
|
5
|
+
export { Config, ConfigProvider, DistributionType, MetaTemplateButton, Provider, QueueListResponse, Rule } from './chat-config/contracts/index.mjs';
|
|
6
6
|
import { CampaignQueryParams, CampaignPaginatedResponse, Campaign, CreateCampaignRequest, PatchCampaignRequest, CampaignContactQueryParams, CampaignContactPaginatedResponse, CampaignContactResponse, CreateCampaignContactRequest, PatchCampaignContactRequest, CampaignContactsDashboardQueryParams, CampaignContactsDashboardData, CampaignUser, CampaignWorkGroupQueryParams, CampaignWorkGroupPaginatedResponse, CreateCampaignWorkGroupRequest, CampaignWorkGroup } from './campaigns/contracts/index.mjs';
|
|
7
7
|
export { CampaignContactCampaignStatus, CampaignContactDispatchStatus, CampaignContactFilter, CampaignContactLikeQueryOperators, CampaignContactQueryOperators, CampaignContactQueryValue, CampaignContactSortDirection, CampaignContactSortParams, CampaignContactsDashboardChannelPerformance, CampaignContactsDashboardEvolutionItem, CampaignContactsDashboardExactQueryOperators, CampaignContactsDashboardFunnelItem, CampaignContactsDashboardInterval, CampaignContactsDashboardMetrics, CampaignContactsDashboardQueryValue, CampaignContactsDashboardRangeQueryOperators, CampaignContactsDashboardStatusDistribution, CampaignContactsDashboardStatusMetrics, CampaignContactsDashboardSummary, CampaignContactsDashboardTopCampaign, CampaignProvider, CampaignRetryConfig, CampaignSchedule, CampaignStatus, WhatsAppPayload, WhatsAppTemplateComponent } from './campaigns/contracts/index.mjs';
|
|
8
8
|
import { GetConfigTemplatesParams, GetConfigTemplatesResponse } from './chat-adapter/contracts/index.mjs';
|
|
@@ -13,6 +13,10 @@ import { GetContactPhonesParams, ContactPhoneSearchResponse, ContactCategoryResp
|
|
|
13
13
|
export { ContactPhoneResponse } from './contact-list/contracts/index.mjs';
|
|
14
14
|
import { GetIntegrationPartnersByCompanyRequest, IntegrationPartner, GetIntegrationHooksCatalogRequest, HookCatalogItem, CreateIntegrationPartnerRequest, DeleteIntegrationPartnerParams, CreateIntegrationActionRequest, IntegrationAction, UpdateIntegrationActionParams, CreateIntegrationFieldRequest, IntegrationField, UpdateIntegrationFieldParams, DeleteIntegrationFieldParams, DeleteIntegrationActionParams } from './integrations/contracts/index.mjs';
|
|
15
15
|
export { UpdateIntegrationActionRequest, UpdateIntegrationFieldRequest } from './integrations/contracts/index.mjs';
|
|
16
|
+
import { ListLiveUserRoomsRequest, LiveUserRoomResponse, GetRoomByIdRequest, RoomResponse } from './chat-webservice/contracts/index.mjs';
|
|
17
|
+
export { RoomActiveDates, RoomMemberResponse, RoomTagResponse } from './chat-webservice/contracts/index.mjs';
|
|
18
|
+
import { ListContactHistoryRequest, ContactHistoryResponse } from './call-report/contracts/index.mjs';
|
|
19
|
+
export { ContactHistoryIndex, ContactHistorySortOrder, ContactInteractionResponse, InteractionCallStepResponse, InteractionChatStepResponse, InteractionMemberResponse, InteractionOrganizationResponse } from './call-report/contracts/index.mjs';
|
|
16
20
|
|
|
17
21
|
/**
|
|
18
22
|
* Gateway for interacting with the Customer Service API.
|
|
@@ -78,6 +82,12 @@ declare class ChatConfigGateway {
|
|
|
78
82
|
*/
|
|
79
83
|
getQueueById(queueId: string): Promise<Queue>;
|
|
80
84
|
getQueues(): Promise<Queue[]>;
|
|
85
|
+
/**
|
|
86
|
+
* Lists queue memberships for a member.
|
|
87
|
+
* @param params - The member identifier and optional association filter.
|
|
88
|
+
* @returns The queue memberships for the given member.
|
|
89
|
+
*/
|
|
90
|
+
getMemberQueues(params: GetMemberQueuesRequest): Promise<QueueMember[]>;
|
|
81
91
|
/**
|
|
82
92
|
* Retrieves a Meta template configuration by its ID.
|
|
83
93
|
* @param templateId - The unique identifier of the template.
|
|
@@ -325,6 +335,43 @@ declare class IntegrationsGateway {
|
|
|
325
335
|
deleteAction({ actionId }: DeleteIntegrationActionParams): Promise<void>;
|
|
326
336
|
}
|
|
327
337
|
|
|
338
|
+
/**
|
|
339
|
+
* Gateway for interacting with the Chat Webservice API.
|
|
340
|
+
*/
|
|
341
|
+
declare class ChatWebserviceGateway {
|
|
342
|
+
private readonly httpClient;
|
|
343
|
+
private readonly baseUrl;
|
|
344
|
+
constructor(httpClient: AxiosInstance, baseUrl: string);
|
|
345
|
+
/**
|
|
346
|
+
* Lists live rooms assigned to a user.
|
|
347
|
+
* @param params - The recipient, company, and open-status filters.
|
|
348
|
+
* @returns The live room entries for the user.
|
|
349
|
+
*/
|
|
350
|
+
listLiveUserRooms(params: ListLiveUserRoomsRequest): Promise<LiveUserRoomResponse[]>;
|
|
351
|
+
/**
|
|
352
|
+
* Retrieves a chat room by its identifier.
|
|
353
|
+
* @param id - The unique identifier of the room.
|
|
354
|
+
* @param params - Optional query parameters for scoping and member inclusion.
|
|
355
|
+
* @returns The chat room data.
|
|
356
|
+
*/
|
|
357
|
+
getRoomById(id: number, params?: GetRoomByIdRequest): Promise<RoomResponse>;
|
|
358
|
+
}
|
|
359
|
+
|
|
360
|
+
/**
|
|
361
|
+
* Gateway for interacting with the Call Report API.
|
|
362
|
+
*/
|
|
363
|
+
declare class CallReportGateway {
|
|
364
|
+
private readonly httpClient;
|
|
365
|
+
private readonly baseUrl;
|
|
366
|
+
constructor(httpClient: AxiosInstance, baseUrl: string);
|
|
367
|
+
/**
|
|
368
|
+
* Lists contact interaction history across chat and CDR indexes.
|
|
369
|
+
* @param params - Optional filters, pagination, and index selection.
|
|
370
|
+
* @returns The paginated contact history response.
|
|
371
|
+
*/
|
|
372
|
+
listContactHistory(params?: ListContactHistoryRequest): Promise<ContactHistoryResponse>;
|
|
373
|
+
}
|
|
374
|
+
|
|
328
375
|
/**
|
|
329
376
|
* Maps service identifiers to their corresponding gateway types.
|
|
330
377
|
* Used by the `gateway()` function to infer the correct return type
|
|
@@ -336,11 +383,13 @@ declare class IntegrationsGateway {
|
|
|
336
383
|
type GatewayMap = {
|
|
337
384
|
'customer-service': CustomerServiceGateway;
|
|
338
385
|
'chat-config': ChatConfigGateway;
|
|
339
|
-
|
|
386
|
+
campaigns: CampaignsGateway;
|
|
340
387
|
'chat-adapter': ChatAdapterGateway;
|
|
341
|
-
|
|
388
|
+
assets: AssetsGateway;
|
|
342
389
|
'contact-list': ContactListGateway;
|
|
343
|
-
|
|
390
|
+
integrations: IntegrationsGateway;
|
|
391
|
+
'chat-webservice': ChatWebserviceGateway;
|
|
392
|
+
'call-report': CallReportGateway;
|
|
344
393
|
};
|
|
345
394
|
/**
|
|
346
395
|
* Parameters required to configure the SDK client.
|
|
@@ -374,6 +423,12 @@ interface GatewayClientParams {
|
|
|
374
423
|
integrations?: {
|
|
375
424
|
baseUrl: string;
|
|
376
425
|
};
|
|
426
|
+
chatWebservice?: {
|
|
427
|
+
baseUrl: string;
|
|
428
|
+
};
|
|
429
|
+
callReport?: {
|
|
430
|
+
baseUrl: string;
|
|
431
|
+
};
|
|
377
432
|
};
|
|
378
433
|
}
|
|
379
434
|
|
|
@@ -400,4 +455,4 @@ declare const configure: (params: GatewayClientParams) => void;
|
|
|
400
455
|
*/
|
|
401
456
|
declare function gateway<T extends keyof GatewayMap>(service: T): GatewayMap[T];
|
|
402
457
|
|
|
403
|
-
export { AttachmentByIdResponse, AudioConvertResponse, Campaign, CampaignContactPaginatedResponse, CampaignContactQueryParams, CampaignContactResponse, CampaignContactsDashboardData, CampaignContactsDashboardQueryParams, CampaignPaginatedResponse, CampaignQueryParams, CampaignUser, CampaignWorkGroup, CampaignWorkGroupPaginatedResponse, CampaignWorkGroupQueryParams, CompanyResponse, ConfigListByProviderResponse, ContactCategoryResponse, ContactPhoneSearchResponse, CreateCampaignContactRequest, CreateCampaignRequest, CreateCampaignWorkGroupRequest, CreateIntegrationActionRequest, CreateIntegrationFieldRequest, CreateIntegrationPartnerRequest, DeleteIntegrationActionParams, DeleteIntegrationFieldParams, DeleteIntegrationPartnerParams, FindOrCreateQueueRuleRequest, GetAllUsersParams, GetAllUsersResponse, GetAttachmentByIdRequest, GetConfigTemplatesParams, GetConfigTemplatesResponse, GetConfigsByProviderParams, GetContactPhonesParams, GetIntegrationHooksCatalogRequest, GetIntegrationPartnersByCompanyRequest, GetManagedUsersResponse, GetPresignedUrlRequest, GetRootRulesRequest, HookCatalogItem, IntegrationAction, IntegrationField, IntegrationPartner, MetaTemplateConfigResponse, MetaTemplateConfigsResponse, PatchCampaignContactRequest, PatchCampaignRequest, ProviderListResponse, Queue, QueueRule, RootRulesResponse, UpdateIntegrationActionParams, UpdateIntegrationFieldParams, UploadPresignedUrlResponse, WorkGroupListResponse, WorkGroupMembersResponse, WorkGroupResponse, configure, gateway };
|
|
458
|
+
export { AttachmentByIdResponse, AudioConvertResponse, Campaign, CampaignContactPaginatedResponse, CampaignContactQueryParams, CampaignContactResponse, CampaignContactsDashboardData, CampaignContactsDashboardQueryParams, CampaignPaginatedResponse, CampaignQueryParams, CampaignUser, CampaignWorkGroup, CampaignWorkGroupPaginatedResponse, CampaignWorkGroupQueryParams, CompanyResponse, ConfigListByProviderResponse, ContactCategoryResponse, ContactHistoryResponse, ContactPhoneSearchResponse, CreateCampaignContactRequest, CreateCampaignRequest, CreateCampaignWorkGroupRequest, CreateIntegrationActionRequest, CreateIntegrationFieldRequest, CreateIntegrationPartnerRequest, DeleteIntegrationActionParams, DeleteIntegrationFieldParams, DeleteIntegrationPartnerParams, FindOrCreateQueueRuleRequest, GetAllUsersParams, GetAllUsersResponse, GetAttachmentByIdRequest, GetConfigTemplatesParams, GetConfigTemplatesResponse, GetConfigsByProviderParams, GetContactPhonesParams, GetIntegrationHooksCatalogRequest, GetIntegrationPartnersByCompanyRequest, GetManagedUsersResponse, GetMemberQueuesRequest, GetPresignedUrlRequest, GetRoomByIdRequest, GetRootRulesRequest, HookCatalogItem, IntegrationAction, IntegrationField, IntegrationPartner, ListContactHistoryRequest, ListLiveUserRoomsRequest, LiveUserRoomResponse, MetaTemplateConfigResponse, MetaTemplateConfigsResponse, PatchCampaignContactRequest, PatchCampaignRequest, ProviderListResponse, Queue, QueueMember, QueueRule, RoomResponse, RootRulesResponse, UpdateIntegrationActionParams, UpdateIntegrationFieldParams, UploadPresignedUrlResponse, WorkGroupListResponse, WorkGroupMembersResponse, WorkGroupResponse, configure, gateway };
|