@onereach/types-hitl-api 0.0.35-rc.9 → 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/interfaces/api/agents.d.ts +33 -30
- 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
|
@@ -1,42 +1,31 @@
|
|
|
1
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
7
|
readonly role: USER_ROLE;
|
|
8
8
|
readonly email: string;
|
|
9
|
-
readonly username: string;
|
|
10
|
-
readonly data: object;
|
|
11
9
|
readonly ruleGroupIds: string[];
|
|
12
10
|
readonly statusData: Omit<IAgentStatus, 'agentId'>;
|
|
13
|
-
readonly meta:
|
|
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
|
-
readonly last?: {
|
|
37
|
-
readonly id?: string;
|
|
38
|
-
readonly accountId?: string;
|
|
39
|
-
};
|
|
40
29
|
}
|
|
41
30
|
export interface ISearchAgentsQuery extends ITargetAccountId {
|
|
42
31
|
readonly ruleGroupIds?: string[];
|
|
@@ -62,15 +51,15 @@ export interface IAgentStatusSettings {
|
|
|
62
51
|
readonly defaultLoginStatusReason?: string;
|
|
63
52
|
readonly busyStatusReasons?: string[];
|
|
64
53
|
}
|
|
65
|
-
export interface
|
|
54
|
+
export interface IPutAgentOptions {
|
|
66
55
|
readonly accountId: string;
|
|
67
56
|
readonly agentId: string;
|
|
68
57
|
readonly ruleGroupIds?: string[];
|
|
69
58
|
readonly meta?: object;
|
|
70
59
|
readonly transaction?: any;
|
|
71
60
|
}
|
|
72
|
-
export declare type
|
|
73
|
-
export interface
|
|
61
|
+
export declare type IPutAgentQuery = ISetAgentStatusQuery;
|
|
62
|
+
export interface IPutAgentBody {
|
|
74
63
|
readonly ruleGroupIds?: string[];
|
|
75
64
|
readonly meta?: object;
|
|
76
65
|
}
|
|
@@ -82,19 +71,33 @@ export interface IPutAgentRuleGroupsOptions {
|
|
|
82
71
|
}
|
|
83
72
|
export declare type IPutAgentRuleGroupsQuery = ISetAgentStatusQuery;
|
|
84
73
|
export declare type IPutAgentRuleGroupsBody = Omit<IPutAgentRuleGroupsOptions, 'accountId' | 'agentId'>;
|
|
85
|
-
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> {
|
|
86
89
|
readonly accountId: string;
|
|
87
90
|
readonly agentId: string;
|
|
88
91
|
readonly statusData: Pick<IAgentStatus, 'status' | 'busyReason'>;
|
|
89
92
|
readonly notifyStatusChange: boolean;
|
|
90
|
-
readonly
|
|
93
|
+
readonly statusChangeContext?: T;
|
|
91
94
|
}
|
|
92
95
|
export interface ISetAgentStatusQuery extends ITargetAccountId {
|
|
93
96
|
agentId: string;
|
|
94
97
|
}
|
|
95
98
|
export declare type ISetAgentStatusBody = Omit<ISetAgentStatusOptions, 'accountId' | 'agentId'>;
|
|
96
99
|
export declare type IUpdateAgentsStatusQuery = ITargetAccountId;
|
|
97
|
-
export interface IUpdateAgentsStatusBody {
|
|
100
|
+
export interface IUpdateAgentsStatusBody<T extends IStatusChangeContext = IStatusChangeContext> {
|
|
98
101
|
readonly query: string;
|
|
99
|
-
readonly
|
|
102
|
+
readonly statusChangeContext?: T;
|
|
100
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":""}
|