@onereach/types-hitl-api 0.0.35-rc.8 → 0.0.35
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 +6 -0
- package/dist/types/constants/api.js +8 -1
- package/dist/types/constants/api.js.map +1 -1
- package/dist/types/interfaces/api/agents.d.ts +46 -33
- package/dist/types/interfaces/api/index.d.ts +0 -1
- package/dist/types/interfaces/api/index.js +1 -2
- package/dist/types/interfaces/api/index.js.map +1 -1
- package/package.json +1 -1
- package/dist/types/interfaces/api/agents-meta.d.ts +0 -9
- package/dist/types/interfaces/api/agents-meta.js +0 -3
- package/dist/types/interfaces/api/agents-meta.js.map +0 -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",
|
|
@@ -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";
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"api.js","sourceRoot":"","sources":["../../../src/constants/api.ts"],"names":[],"mappings":";;;AAAA,IAAY,YAIX;AAJD,WAAY,YAAY;IACtB,uCAAuB,CAAA;IACvB,6BAAa,CAAA;IACb,mCAAmB,CAAA;AACrB,CAAC,EAJW,YAAY,GAAZ,oBAAY,KAAZ,oBAAY,QAIvB;AAED,IAAY,cAIX;AAJD,WAAY,cAAc;IACxB,qCAAmB,CAAA;IACnB,qCAAmB,CAAA;IACnB,mCAAiB,CAAA;AACnB,CAAC,EAJW,cAAc,GAAd,sBAAc,KAAd,sBAAc,QAIzB;AAED,IAAY,kBAaX;AAbD,WAAY,kBAAkB;IAC5B,uCAAiB,CAAA;IACjB,6CAAuB,CAAA;IACvB,yCAAmB,CAAA;IACnB,6CAAuB,CAA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AC7C,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"}
|
|
@@ -1,42 +1,41 @@
|
|
|
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 {
|
|
4
|
-
readonly accountId: string;
|
|
3
|
+
export interface IAgent<T extends IMeta = IMeta> {
|
|
5
4
|
readonly id: string;
|
|
5
|
+
readonly agentId: string;
|
|
6
6
|
readonly multiUserId: string;
|
|
7
|
-
readonly role:
|
|
7
|
+
readonly role: USER_ROLE;
|
|
8
8
|
readonly email: string;
|
|
9
|
-
readonly username: string;
|
|
10
|
-
readonly data: object;
|
|
11
9
|
readonly ruleGroupIds: string[];
|
|
12
|
-
readonly statusData
|
|
13
|
-
readonly meta
|
|
10
|
+
readonly statusData: Omit<IAgentStatus, 'agentId'>;
|
|
11
|
+
readonly meta: T;
|
|
14
12
|
}
|
|
15
|
-
export interface
|
|
16
|
-
readonly
|
|
17
|
-
readonly
|
|
18
|
-
readonly limit?: number;
|
|
19
|
-
readonly last?: {
|
|
20
|
-
readonly id?: string;
|
|
21
|
-
readonly accountId?: string;
|
|
22
|
-
};
|
|
13
|
+
export interface IMeta {
|
|
14
|
+
readonly name?: string;
|
|
15
|
+
readonly type?: string;
|
|
23
16
|
}
|
|
24
|
-
export interface IGetAgentsOptions {
|
|
25
|
-
readonly accountId
|
|
17
|
+
export interface IGetAgentsOptions extends ITargetAccountId {
|
|
18
|
+
readonly accountId?: string;
|
|
26
19
|
readonly agentIds?: string[];
|
|
27
20
|
readonly projection?: string[];
|
|
28
21
|
readonly limit?: number;
|
|
29
|
-
readonly
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
};
|
|
22
|
+
readonly order?: string;
|
|
23
|
+
readonly orderBy?: string;
|
|
24
|
+
readonly offset?: number;
|
|
33
25
|
}
|
|
26
|
+
export declare type IGetAgentsQuery = Partial<IGetAgentsOptions>;
|
|
34
27
|
export interface IGetAgentsResponse {
|
|
35
28
|
readonly data: Partial<IAgent>[];
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
29
|
+
}
|
|
30
|
+
export interface ISearchAgentsQuery extends ITargetAccountId {
|
|
31
|
+
readonly ruleGroupIds?: string[];
|
|
32
|
+
readonly ruleTags?: string[];
|
|
33
|
+
readonly excludeAgentIds?: string[];
|
|
34
|
+
readonly status?: string;
|
|
35
|
+
readonly projection?: string[];
|
|
36
|
+
}
|
|
37
|
+
export interface ISearchAgentsResponse {
|
|
38
|
+
readonly data: Partial<IAgent>[];
|
|
40
39
|
}
|
|
41
40
|
export interface IAgentStatus {
|
|
42
41
|
readonly agentId?: string;
|
|
@@ -52,15 +51,15 @@ export interface IAgentStatusSettings {
|
|
|
52
51
|
readonly defaultLoginStatusReason?: string;
|
|
53
52
|
readonly busyStatusReasons?: string[];
|
|
54
53
|
}
|
|
55
|
-
export interface
|
|
54
|
+
export interface IPutAgentOptions {
|
|
56
55
|
readonly accountId: string;
|
|
57
56
|
readonly agentId: string;
|
|
58
57
|
readonly ruleGroupIds?: string[];
|
|
59
58
|
readonly meta?: object;
|
|
60
59
|
readonly transaction?: any;
|
|
61
60
|
}
|
|
62
|
-
export declare type
|
|
63
|
-
export interface
|
|
61
|
+
export declare type IPutAgentQuery = ISetAgentStatusQuery;
|
|
62
|
+
export interface IPutAgentBody {
|
|
64
63
|
readonly ruleGroupIds?: string[];
|
|
65
64
|
readonly meta?: object;
|
|
66
65
|
}
|
|
@@ -72,19 +71,33 @@ export interface IPutAgentRuleGroupsOptions {
|
|
|
72
71
|
}
|
|
73
72
|
export declare type IPutAgentRuleGroupsQuery = ISetAgentStatusQuery;
|
|
74
73
|
export declare type IPutAgentRuleGroupsBody = Omit<IPutAgentRuleGroupsOptions, 'accountId' | 'agentId'>;
|
|
75
|
-
export interface
|
|
74
|
+
export interface IPutAgentMetaOptions {
|
|
75
|
+
readonly accountId: string;
|
|
76
|
+
readonly agentId: string;
|
|
77
|
+
readonly meta: object;
|
|
78
|
+
}
|
|
79
|
+
export declare type IPutAgentMetaQuery = ISetAgentStatusQuery;
|
|
80
|
+
export interface IPutAgentMetaBody {
|
|
81
|
+
readonly meta: object;
|
|
82
|
+
}
|
|
83
|
+
export interface IStatusChangeContext {
|
|
84
|
+
readonly actionType?: string;
|
|
85
|
+
readonly reason?: string;
|
|
86
|
+
readonly source?: string;
|
|
87
|
+
}
|
|
88
|
+
export interface ISetAgentStatusOptions<T extends IStatusChangeContext = IStatusChangeContext> {
|
|
76
89
|
readonly accountId: string;
|
|
77
90
|
readonly agentId: string;
|
|
78
91
|
readonly statusData: Pick<IAgentStatus, 'status' | 'busyReason'>;
|
|
79
92
|
readonly notifyStatusChange: boolean;
|
|
80
|
-
readonly
|
|
93
|
+
readonly statusChangeContext?: T;
|
|
81
94
|
}
|
|
82
95
|
export interface ISetAgentStatusQuery extends ITargetAccountId {
|
|
83
96
|
agentId: string;
|
|
84
97
|
}
|
|
85
98
|
export declare type ISetAgentStatusBody = Omit<ISetAgentStatusOptions, 'accountId' | 'agentId'>;
|
|
86
99
|
export declare type IUpdateAgentsStatusQuery = ITargetAccountId;
|
|
87
|
-
export interface IUpdateAgentsStatusBody {
|
|
100
|
+
export interface IUpdateAgentsStatusBody<T extends IStatusChangeContext = IStatusChangeContext> {
|
|
88
101
|
readonly query: string;
|
|
89
|
-
readonly
|
|
102
|
+
readonly statusChangeContext?: T;
|
|
90
103
|
}
|
|
@@ -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.
|
|
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;
|
|
30
30
|
__exportStar(require("./common"), exports);
|
|
31
31
|
exports.Settings = __importStar(require("./settings"));
|
|
32
32
|
exports.Migrations = __importStar(require("./migrations"));
|
|
@@ -43,5 +43,4 @@ 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"));
|
|
47
46
|
//# 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"}
|
package/package.json
CHANGED
|
@@ -1,9 +0,0 @@
|
|
|
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
|
-
}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"agents-meta.js","sourceRoot":"","sources":["../../../../src/interfaces/api/agents-meta.ts"],"names":[],"mappings":""}
|