@opens/gateways 1.11.4 → 1.11.6
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 +60 -5
- package/dist/index.d.ts +60 -5
- package/dist/index.js +87 -3
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +87 -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';
|
|
@@ -11,6 +11,10 @@ import { GetPresignedUrlRequest, UploadPresignedUrlResponse, AudioConvertRespons
|
|
|
11
11
|
export { IUploadPresignedUrlResponse } from './assets/contracts/index.mjs';
|
|
12
12
|
import { GetContactPhonesParams, ContactPhoneSearchResponse, ContactCategoryResponse } from './contact-list/contracts/index.mjs';
|
|
13
13
|
export { ContactPhoneResponse } from './contact-list/contracts/index.mjs';
|
|
14
|
+
import { ListLiveUserRoomsRequest, LiveUserRoomResponse, GetRoomByIdRequest, RoomResponse } from './chat-webservice/contracts/index.mjs';
|
|
15
|
+
export { RoomActiveDates, RoomMemberResponse, RoomTagResponse } from './chat-webservice/contracts/index.mjs';
|
|
16
|
+
import { ListContactHistoryRequest, ContactHistoryResponse } from './call-report/contracts/index.mjs';
|
|
17
|
+
export { ContactHistoryIndex, ContactHistorySortOrder, ContactInteractionResponse, InteractionCallStepResponse, InteractionChatStepResponse, InteractionMemberResponse, InteractionOrganizationResponse } from './call-report/contracts/index.mjs';
|
|
14
18
|
|
|
15
19
|
/**
|
|
16
20
|
* Gateway for interacting with the Customer Service API.
|
|
@@ -76,6 +80,12 @@ declare class ChatConfigGateway {
|
|
|
76
80
|
*/
|
|
77
81
|
getQueueById(queueId: string): Promise<Queue>;
|
|
78
82
|
getQueues(): Promise<Queue[]>;
|
|
83
|
+
/**
|
|
84
|
+
* Lists queue memberships for a member.
|
|
85
|
+
* @param params - The member identifier and optional association filter.
|
|
86
|
+
* @returns The queue memberships for the given member.
|
|
87
|
+
*/
|
|
88
|
+
getMemberQueues(params: GetMemberQueuesRequest): Promise<QueueMember[]>;
|
|
79
89
|
/**
|
|
80
90
|
* Retrieves a Meta template configuration by its ID.
|
|
81
91
|
* @param templateId - The unique identifier of the template.
|
|
@@ -252,6 +262,43 @@ declare class ContactListGateway {
|
|
|
252
262
|
getCategoryList(): Promise<ContactCategoryResponse[]>;
|
|
253
263
|
}
|
|
254
264
|
|
|
265
|
+
/**
|
|
266
|
+
* Gateway for interacting with the Chat Webservice API.
|
|
267
|
+
*/
|
|
268
|
+
declare class ChatWebserviceGateway {
|
|
269
|
+
private readonly httpClient;
|
|
270
|
+
private readonly baseUrl;
|
|
271
|
+
constructor(httpClient: AxiosInstance, baseUrl: string);
|
|
272
|
+
/**
|
|
273
|
+
* Lists live rooms assigned to a user.
|
|
274
|
+
* @param params - The recipient, company, and open-status filters.
|
|
275
|
+
* @returns The live room entries for the user.
|
|
276
|
+
*/
|
|
277
|
+
listLiveUserRooms(params: ListLiveUserRoomsRequest): Promise<LiveUserRoomResponse[]>;
|
|
278
|
+
/**
|
|
279
|
+
* Retrieves a chat room by its identifier.
|
|
280
|
+
* @param id - The unique identifier of the room.
|
|
281
|
+
* @param params - Optional query parameters for scoping and member inclusion.
|
|
282
|
+
* @returns The chat room data.
|
|
283
|
+
*/
|
|
284
|
+
getRoomById(id: number, params?: GetRoomByIdRequest): Promise<RoomResponse>;
|
|
285
|
+
}
|
|
286
|
+
|
|
287
|
+
/**
|
|
288
|
+
* Gateway for interacting with the Call Report API.
|
|
289
|
+
*/
|
|
290
|
+
declare class CallReportGateway {
|
|
291
|
+
private readonly httpClient;
|
|
292
|
+
private readonly baseUrl;
|
|
293
|
+
constructor(httpClient: AxiosInstance, baseUrl: string);
|
|
294
|
+
/**
|
|
295
|
+
* Lists contact interaction history across chat and CDR indexes.
|
|
296
|
+
* @param params - Optional filters, pagination, and index selection.
|
|
297
|
+
* @returns The paginated contact history response.
|
|
298
|
+
*/
|
|
299
|
+
listContactHistory(params?: ListContactHistoryRequest): Promise<ContactHistoryResponse>;
|
|
300
|
+
}
|
|
301
|
+
|
|
255
302
|
/**
|
|
256
303
|
* Maps service identifiers to their corresponding gateway types.
|
|
257
304
|
* Used by the `gateway()` function to infer the correct return type
|
|
@@ -263,10 +310,12 @@ declare class ContactListGateway {
|
|
|
263
310
|
type GatewayMap = {
|
|
264
311
|
'customer-service': CustomerServiceGateway;
|
|
265
312
|
'chat-config': ChatConfigGateway;
|
|
266
|
-
|
|
313
|
+
campaigns: CampaignsGateway;
|
|
267
314
|
'chat-adapter': ChatAdapterGateway;
|
|
268
|
-
|
|
315
|
+
assets: AssetsGateway;
|
|
269
316
|
'contact-list': ContactListGateway;
|
|
317
|
+
'chat-webservice': ChatWebserviceGateway;
|
|
318
|
+
'call-report': CallReportGateway;
|
|
270
319
|
};
|
|
271
320
|
/**
|
|
272
321
|
* Parameters required to configure the SDK client.
|
|
@@ -297,6 +346,12 @@ interface GatewayClientParams {
|
|
|
297
346
|
contactList?: {
|
|
298
347
|
baseUrl: string;
|
|
299
348
|
};
|
|
349
|
+
chatWebservice?: {
|
|
350
|
+
baseUrl: string;
|
|
351
|
+
};
|
|
352
|
+
callReport?: {
|
|
353
|
+
baseUrl: string;
|
|
354
|
+
};
|
|
300
355
|
};
|
|
301
356
|
}
|
|
302
357
|
|
|
@@ -323,4 +378,4 @@ declare const configure: (params: GatewayClientParams) => void;
|
|
|
323
378
|
*/
|
|
324
379
|
declare function gateway<T extends keyof GatewayMap>(service: T): GatewayMap[T];
|
|
325
380
|
|
|
326
|
-
export { AttachmentByIdResponse, AudioConvertResponse, Campaign, CampaignContactPaginatedResponse, CampaignContactQueryParams, CampaignContactResponse, CampaignContactsDashboardData, CampaignContactsDashboardQueryParams, CampaignPaginatedResponse, CampaignQueryParams, CampaignUser, CampaignWorkGroup, CampaignWorkGroupPaginatedResponse, CampaignWorkGroupQueryParams, CompanyResponse, ConfigListByProviderResponse, ContactCategoryResponse, ContactPhoneSearchResponse, CreateCampaignContactRequest, CreateCampaignRequest, CreateCampaignWorkGroupRequest, FindOrCreateQueueRuleRequest, GetAllUsersParams, GetAllUsersResponse, GetAttachmentByIdRequest, GetConfigTemplatesParams, GetConfigTemplatesResponse, GetConfigsByProviderParams, GetContactPhonesParams, GetManagedUsersResponse, GetPresignedUrlRequest, GetRootRulesRequest, MetaTemplateConfigResponse, MetaTemplateConfigsResponse, PatchCampaignContactRequest, PatchCampaignRequest, ProviderListResponse, Queue, QueueRule, RootRulesResponse, UploadPresignedUrlResponse, WorkGroupListResponse, WorkGroupMembersResponse, WorkGroupResponse, configure, gateway };
|
|
381
|
+
export { AttachmentByIdResponse, AudioConvertResponse, Campaign, CampaignContactPaginatedResponse, CampaignContactQueryParams, CampaignContactResponse, CampaignContactsDashboardData, CampaignContactsDashboardQueryParams, CampaignPaginatedResponse, CampaignQueryParams, CampaignUser, CampaignWorkGroup, CampaignWorkGroupPaginatedResponse, CampaignWorkGroupQueryParams, CompanyResponse, ConfigListByProviderResponse, ContactCategoryResponse, ContactHistoryResponse, ContactPhoneSearchResponse, CreateCampaignContactRequest, CreateCampaignRequest, CreateCampaignWorkGroupRequest, FindOrCreateQueueRuleRequest, GetAllUsersParams, GetAllUsersResponse, GetAttachmentByIdRequest, GetConfigTemplatesParams, GetConfigTemplatesResponse, GetConfigsByProviderParams, GetContactPhonesParams, GetManagedUsersResponse, GetMemberQueuesRequest, GetPresignedUrlRequest, GetRoomByIdRequest, GetRootRulesRequest, ListContactHistoryRequest, ListLiveUserRoomsRequest, LiveUserRoomResponse, MetaTemplateConfigResponse, MetaTemplateConfigsResponse, PatchCampaignContactRequest, PatchCampaignRequest, ProviderListResponse, Queue, QueueMember, QueueRule, RoomResponse, RootRulesResponse, UploadPresignedUrlResponse, WorkGroupListResponse, WorkGroupMembersResponse, WorkGroupResponse, configure, gateway };
|