@onereach/types-hitl-api 0.0.35-rc.1 → 0.0.35-rc.10
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/types/constants/api.d.ts +7 -0
- package/dist/types/constants/api.js +9 -1
- package/dist/types/constants/api.js.map +1 -1
- package/dist/types/interfaces/api/agents-meta.d.ts +9 -0
- package/dist/types/interfaces/api/agents-meta.js +3 -0
- package/dist/types/interfaces/api/agents-meta.js.map +1 -0
- package/dist/types/interfaces/api/agents.d.ts +28 -7
- package/dist/types/interfaces/api/index.d.ts +1 -0
- package/dist/types/interfaces/api/index.js +2 -1
- package/dist/types/interfaces/api/index.js.map +1 -1
- package/dist/types/interfaces/api/sessions.d.ts +1 -0
- package/package.json +1 -1
|
@@ -3,6 +3,12 @@ export declare enum AGENT_STATUS {
|
|
|
3
3
|
BUSY = "BUSY",
|
|
4
4
|
OFFLINE = "OFFLINE"
|
|
5
5
|
}
|
|
6
|
+
export declare enum USER_ROLE {
|
|
7
|
+
GUEST = "GUEST",
|
|
8
|
+
USER = "USER",
|
|
9
|
+
ADMIN = "ADMIN",
|
|
10
|
+
SUPER_ADMIN = "SUPER_ADMIN"
|
|
11
|
+
}
|
|
6
12
|
export declare enum SESSION_STATUS {
|
|
7
13
|
CLAIMED = "CLAIMED",
|
|
8
14
|
ONGOING = "ONGOING",
|
|
@@ -59,4 +65,5 @@ export declare const COMMANDS: {
|
|
|
59
65
|
CONTINUE: string;
|
|
60
66
|
NOT_CLAIMED: string;
|
|
61
67
|
CLAIM_TIMER: string;
|
|
68
|
+
CHANGE_CONTACT: string;
|
|
62
69
|
};
|
|
@@ -1,12 +1,19 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.COMMANDS = exports.AGENT_BROADCAST_EVENTS = exports.CONTACT_BROADCAST_EVENTS = exports.BROADCAST_EVENTS = exports.APP_ERROR_TYPE = exports.CALL_MEMBER_TYPE = exports.CALL_MEMBER_STATUS = exports.SESSION_STATUS = exports.AGENT_STATUS = void 0;
|
|
3
|
+
exports.COMMANDS = exports.AGENT_BROADCAST_EVENTS = exports.CONTACT_BROADCAST_EVENTS = exports.BROADCAST_EVENTS = exports.APP_ERROR_TYPE = exports.CALL_MEMBER_TYPE = exports.CALL_MEMBER_STATUS = exports.SESSION_STATUS = exports.USER_ROLE = exports.AGENT_STATUS = void 0;
|
|
4
4
|
var AGENT_STATUS;
|
|
5
5
|
(function (AGENT_STATUS) {
|
|
6
6
|
AGENT_STATUS["AVAILABLE"] = "AVAILABLE";
|
|
7
7
|
AGENT_STATUS["BUSY"] = "BUSY";
|
|
8
8
|
AGENT_STATUS["OFFLINE"] = "OFFLINE";
|
|
9
9
|
})(AGENT_STATUS = exports.AGENT_STATUS || (exports.AGENT_STATUS = {}));
|
|
10
|
+
var USER_ROLE;
|
|
11
|
+
(function (USER_ROLE) {
|
|
12
|
+
USER_ROLE["GUEST"] = "GUEST";
|
|
13
|
+
USER_ROLE["USER"] = "USER";
|
|
14
|
+
USER_ROLE["ADMIN"] = "ADMIN";
|
|
15
|
+
USER_ROLE["SUPER_ADMIN"] = "SUPER_ADMIN";
|
|
16
|
+
})(USER_ROLE = exports.USER_ROLE || (exports.USER_ROLE = {}));
|
|
10
17
|
var SESSION_STATUS;
|
|
11
18
|
(function (SESSION_STATUS) {
|
|
12
19
|
SESSION_STATUS["CLAIMED"] = "CLAIMED";
|
|
@@ -67,5 +74,6 @@ exports.COMMANDS = {
|
|
|
67
74
|
CONTINUE: 'continue',
|
|
68
75
|
NOT_CLAIMED: 'notclaimed',
|
|
69
76
|
CLAIM_TIMER: 'claim-timer',
|
|
77
|
+
CHANGE_CONTACT: 'change-contact',
|
|
70
78
|
};
|
|
71
79
|
//# sourceMappingURL=api.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"api.js","sourceRoot":"","sources":["../../../src/constants/api.ts"],"names":[],"mappings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AAkB,KAAlB,0BAAkB,QAa7B;AAED,IAAY,gBAIX;AAJD,WAAY,gBAAgB;IAC1B,mCAAe,CAAA;IACf,uCAAmB,CAAA;IACnB,6CAAyB,CAAA;AAC3B,CAAC,EAJW,gBAAgB,GAAhB,wBAAgB,KAAhB,wBAAgB,QAI3B;AAED,IAAY,cASX;AATD,WAAY,cAAc;IACxB,uCAAqB,CAAA;IACrB,yCAAuB,CAAA;IACvB,6CAA2B,CAAA;IAC3B,2CAAyB,CAAA;IACzB,uDAAqC,CAAA;IACrC,uDAAqC,CAAA;IACrC,mEAAiD,CAAA;IACjD,6DAA2C,CAAA;AAC7C,CAAC,EATW,cAAc,GAAd,sBAAc,KAAd,sBAAc,QASzB;AAED,oEAAoE;AACvD,QAAA,gBAAgB,GAAG;IAC9B,UAAU,EAAE,YAAY;IACxB,aAAa,EAAE,eAAe;IAC9B,cAAc,EAAE,gBAAgB;IAChC,aAAa,EAAE,eAAe;IAC9B,YAAY,EAAE,cAAc;IAC5B,UAAU,EAAE,YAAY;IACxB,wBAAwB,EAAE,0BAA0B;CACrD,CAAC;AAEW,QAAA,wBAAwB,GAAG;IACtC,MAAM,EAAE,gBAAgB;IACxB,MAAM,EAAE,gBAAgB;IACxB,KAAK,EAAE,gBAAgB;CACxB,CAAC;AAEW,QAAA,sBAAsB,GAAG;IACpC,gBAAgB,EAAE,kBAAkB;CACrC,CAAC;AAEW,QAAA,QAAQ,GAAG;IACtB,QAAQ,EAAE,UAAU;IACpB,WAAW,EAAE,YAAY;IACzB,WAAW,EAAE,aAAa;IAC1B,cAAc,EAAE,gBAAgB;CACjC,CAAC"}
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import { IAgentStatus } from '@/interfaces/api/agents';
|
|
2
|
+
import { ITimestamps } from '@/interfaces/api/common';
|
|
3
|
+
export interface IAgentMeta extends ITimestamps {
|
|
4
|
+
readonly id: string;
|
|
5
|
+
readonly agentId: string;
|
|
6
|
+
readonly ruleGroupIds: string[];
|
|
7
|
+
readonly statusData: Omit<IAgentStatus, 'agentId'>;
|
|
8
|
+
readonly meta: object;
|
|
9
|
+
}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"agents-meta.js","sourceRoot":"","sources":["../../../../src/interfaces/api/agents-meta.ts"],"names":[],"mappings":""}
|
|
@@ -1,15 +1,20 @@
|
|
|
1
|
-
import { AGENT_STATUS } from '@/constants/api';
|
|
1
|
+
import { AGENT_STATUS, USER_ROLE } from '@/constants/api';
|
|
2
2
|
import { ITargetAccountId } from '@/interfaces/api/common';
|
|
3
|
-
export interface IAgent {
|
|
3
|
+
export interface IAgent<T extends IMeta = IMeta> {
|
|
4
4
|
readonly accountId: string;
|
|
5
5
|
readonly id: string;
|
|
6
6
|
readonly multiUserId: string;
|
|
7
|
-
readonly role:
|
|
7
|
+
readonly role: USER_ROLE;
|
|
8
8
|
readonly email: string;
|
|
9
9
|
readonly username: string;
|
|
10
|
+
readonly data: object;
|
|
10
11
|
readonly ruleGroupIds: string[];
|
|
11
|
-
readonly statusData
|
|
12
|
-
readonly meta
|
|
12
|
+
readonly statusData: Omit<IAgentStatus, 'agentId'>;
|
|
13
|
+
readonly meta: T;
|
|
14
|
+
}
|
|
15
|
+
export interface IMeta {
|
|
16
|
+
readonly name?: string;
|
|
17
|
+
readonly email: string;
|
|
13
18
|
}
|
|
14
19
|
export interface IGetAgentsQuery extends ITargetAccountId {
|
|
15
20
|
readonly agentIds?: string[];
|
|
@@ -37,6 +42,16 @@ export interface IGetAgentsResponse {
|
|
|
37
42
|
readonly accountId?: string;
|
|
38
43
|
};
|
|
39
44
|
}
|
|
45
|
+
export interface ISearchAgentsQuery extends ITargetAccountId {
|
|
46
|
+
readonly ruleGroupIds?: string[];
|
|
47
|
+
readonly ruleTags?: string[];
|
|
48
|
+
readonly excludeAgentIds?: string[];
|
|
49
|
+
readonly status?: string;
|
|
50
|
+
readonly projection?: string[];
|
|
51
|
+
}
|
|
52
|
+
export interface ISearchAgentsResponse {
|
|
53
|
+
readonly data: Partial<IAgent>[];
|
|
54
|
+
}
|
|
40
55
|
export interface IAgentStatus {
|
|
41
56
|
readonly agentId?: string;
|
|
42
57
|
readonly status: AGENT_STATUS;
|
|
@@ -66,8 +81,8 @@ export interface IPutAgentMetaBody {
|
|
|
66
81
|
export interface IPutAgentRuleGroupsOptions {
|
|
67
82
|
readonly accountId: string;
|
|
68
83
|
readonly agentId: string;
|
|
69
|
-
readonly addRuleGroupIds
|
|
70
|
-
readonly removeRuleGroupIds
|
|
84
|
+
readonly addRuleGroupIds?: string[];
|
|
85
|
+
readonly removeRuleGroupIds?: string[];
|
|
71
86
|
}
|
|
72
87
|
export declare type IPutAgentRuleGroupsQuery = ISetAgentStatusQuery;
|
|
73
88
|
export declare type IPutAgentRuleGroupsBody = Omit<IPutAgentRuleGroupsOptions, 'accountId' | 'agentId'>;
|
|
@@ -76,8 +91,14 @@ export interface ISetAgentStatusOptions {
|
|
|
76
91
|
readonly agentId: string;
|
|
77
92
|
readonly statusData: Pick<IAgentStatus, 'status' | 'busyReason'>;
|
|
78
93
|
readonly notifyStatusChange: boolean;
|
|
94
|
+
readonly ctx?: object;
|
|
79
95
|
}
|
|
80
96
|
export interface ISetAgentStatusQuery extends ITargetAccountId {
|
|
81
97
|
agentId: string;
|
|
82
98
|
}
|
|
83
99
|
export declare type ISetAgentStatusBody = Omit<ISetAgentStatusOptions, 'accountId' | 'agentId'>;
|
|
100
|
+
export declare type IUpdateAgentsStatusQuery = ITargetAccountId;
|
|
101
|
+
export interface IUpdateAgentsStatusBody {
|
|
102
|
+
readonly query: string;
|
|
103
|
+
readonly ctx?: object;
|
|
104
|
+
}
|
|
@@ -26,7 +26,7 @@ var __importStar = (this && this.__importStar) || function (mod) {
|
|
|
26
26
|
return result;
|
|
27
27
|
};
|
|
28
28
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
29
|
-
exports.ContactsMeta = exports.Helpers = exports.Commands = exports.ReadEvents = exports.SessionEvents = exports.Sessions = exports.Listeners = exports.CannedMessages = exports.Filters = exports.Conferences = exports.EventTemplates = exports.RuleGroups = exports.Agents = exports.Migrations = exports.Settings = void 0;
|
|
29
|
+
exports.AgentsMeta = exports.ContactsMeta = exports.Helpers = exports.Commands = exports.ReadEvents = exports.SessionEvents = exports.Sessions = exports.Listeners = exports.CannedMessages = exports.Filters = exports.Conferences = exports.EventTemplates = exports.RuleGroups = exports.Agents = exports.Migrations = exports.Settings = void 0;
|
|
30
30
|
__exportStar(require("./common"), exports);
|
|
31
31
|
exports.Settings = __importStar(require("./settings"));
|
|
32
32
|
exports.Migrations = __importStar(require("./migrations"));
|
|
@@ -43,4 +43,5 @@ exports.ReadEvents = __importStar(require("./read-events"));
|
|
|
43
43
|
exports.Commands = __importStar(require("./commands"));
|
|
44
44
|
exports.Helpers = __importStar(require("./helpers"));
|
|
45
45
|
exports.ContactsMeta = __importStar(require("./contacts-meta"));
|
|
46
|
+
exports.AgentsMeta = __importStar(require("./agents-meta"));
|
|
46
47
|
//# sourceMappingURL=index.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../src/interfaces/api/index.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA,2CAAyB;AACzB,uDAAuC;AACvC,2DAA2C;AAC3C,mDAAmC;AACnC,4DAA4C;AAC5C,oEAAoD;AACpD,6DAA6C;AAC7C,qDAAqC;AACrC,oEAAoD;AACpD,yDAAyC;AACzC,uDAAuC;AACvC,kEAAkD;AAClD,4DAA4C;AAC5C,uDAAuC;AACvC,qDAAqC;AACrC,gEAAgD"}
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../src/interfaces/api/index.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA,2CAAyB;AACzB,uDAAuC;AACvC,2DAA2C;AAC3C,mDAAmC;AACnC,4DAA4C;AAC5C,oEAAoD;AACpD,6DAA6C;AAC7C,qDAAqC;AACrC,oEAAoD;AACpD,yDAAyC;AACzC,uDAAuC;AACvC,kEAAkD;AAClD,4DAA4C;AAC5C,uDAAuC;AACvC,qDAAqC;AACrC,gEAAgD;AAChD,4DAA4C"}
|
|
@@ -155,6 +155,7 @@ export interface ITransferToBotBody {
|
|
|
155
155
|
}
|
|
156
156
|
export interface IUpdateSessionBody {
|
|
157
157
|
readonly tags?: string[];
|
|
158
|
+
readonly contactId?: string;
|
|
158
159
|
}
|
|
159
160
|
export interface IInitConversationQuery extends ITargetAccountId {
|
|
160
161
|
readonly triggerId: string;
|