@or-sdk/hitl 0.35.2-beta.3703.0 → 0.35.2-beta.3709.0
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/cjs/api/Agents.js.map +1 -1
- package/dist/cjs/types/agents.js.map +1 -1
- package/dist/cjs/types/listeners.js +1 -2
- package/dist/cjs/types/listeners.js.map +1 -1
- package/dist/esm/api/Agents.js.map +1 -1
- package/dist/esm/types/agents.js +1 -3
- package/dist/esm/types/agents.js.map +1 -1
- package/dist/esm/types/listeners.js +1 -2
- package/dist/esm/types/listeners.js.map +1 -1
- package/dist/types/api/Agents.d.ts.map +1 -1
- package/dist/types/types/agents.d.ts +14 -36
- package/dist/types/types/agents.d.ts.map +1 -1
- package/dist/types/types/listeners.d.ts +1 -2
- package/dist/types/types/listeners.d.ts.map +1 -1
- package/package.json +2 -2
- package/src/api/Agents.ts +37 -292
- package/src/types/agents.ts +27 -56
- package/src/types/listeners.ts +1 -3
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Agents.js","sourceRoot":"","sources":["../../../src/api/Agents.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA,gDAAwB;AAExB,0CAAmD;AAmBnD,uCAAsC;AAEtC;IAA4B,0BAAQ;IAApC;;
|
|
1
|
+
{"version":3,"file":"Agents.js","sourceRoot":"","sources":["../../../src/api/Agents.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA,gDAAwB;AAExB,0CAAmD;AAmBnD,uCAAsC;AAEtC;IAA4B,0BAAQ;IAApC;;IAwOA,CAAC;IA1NqB,gBAAS,GAA7B;4DACE,OAA8B;;YAA9B,wBAAA,EAAA,YAA8B;;gBAExB,KAAK,GAAG,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,4BAAqB,GAAG,mBAAmB,CAAC;IAC5C,uBAAgB,GAAG,QAAQ,CAAC;IAC5B,wCAAiC,GAAG,cAAc,CAAC;IAgOtE,aAAC;CAAA,AAxOD,CAA4B,mBAAQ,GAwOnC;AAxOY,wBAAM"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"agents.js","sourceRoot":"","sources":["../../../src/types/agents.ts"],"names":[],"mappings":";;;AAAA,2DAKkC;
|
|
1
|
+
{"version":3,"file":"agents.js","sourceRoot":"","sources":["../../../src/types/agents.ts"],"names":[],"mappings":";;;AAAA,2DAKkC;AAyDzB,6FA5DP,6BAAY,OA4DO;AAAE,uGA3DrB,uCAAsB,OA2DqB;AAAE,0FA1D7C,0BAAS,OA0D6C"}
|
|
@@ -2,6 +2,5 @@
|
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
3
|
exports.CALLBACK_TYPE = void 0;
|
|
4
4
|
var types_hitl_api_1 = require("@onereach/types-hitl-api");
|
|
5
|
-
|
|
6
|
-
exports.CALLBACK_TYPE = CALLBACK_TYPE;
|
|
5
|
+
Object.defineProperty(exports, "CALLBACK_TYPE", { enumerable: true, get: function () { return types_hitl_api_1.CALLBACK_TYPE; } });
|
|
7
6
|
//# sourceMappingURL=listeners.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"listeners.js","sourceRoot":"","sources":["../../../src/types/listeners.ts"],"names":[],"mappings":";;;AAAA,
|
|
1
|
+
{"version":3,"file":"listeners.js","sourceRoot":"","sources":["../../../src/types/listeners.ts"],"names":[],"mappings":";;;AAAA,2DAAoE;AA0B3D,8FA1BW,8BAAa,OA0BX"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Agents.js","sourceRoot":"","sources":["../../../src/api/Agents.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;AAAA,OAAO,GAAG,MAAM,OAAO,CAAC;AAExB,OAAO,EAAE,mBAAmB,EAAE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KAAK,EACb,KAAK;wBACL,IAAI,IACD,IAAI,CAAC,eAAe,CAAC,OAAO,CAAC,EAChC,CAAC;gBAEL,CAAC;gBAAC,OAAO,CAAM,EAAE,CAAC;oBAChB,IAAI,CAAC,CAAC,OAAO,KAAK,qDAAqD;wBAAE,MAAM,CAAC,CAAC;gBACnF,CAAC;YACH,CAAC;YAED,OAAO,MAAM,CAAC;QAChB,CAAC;KAAA;;AAtOgB,iBAAU,GAAG,QAAQ,CAAC;AACtB,uBAAgB,GAAG,QAAQ,CAAC;AAC5B,sBAAe,GAAG,UAAU,CAAC;AAC7B,2BAAoB,GAAG,cAAc,CAAC;AACtC,4BAAqB,GAAG,aAAa,CAAC;AACtC,4BAAqB,GAAG,mBAAmB,CAAC;AAC5C,uBAAgB,GAAG,QAAQ,CAAC;AAC5B,wCAAiC,GAAG,cAAc,CAAC"}
|
package/dist/esm/types/agents.js
CHANGED
|
@@ -1,5 +1,3 @@
|
|
|
1
1
|
import { AGENT_STATUS, AGENT_BROADCAST_EVENTS, USER_ROLE, } from '@onereach/types-hitl-api';
|
|
2
|
-
export { AGENT_STATUS };
|
|
3
|
-
export { AGENT_BROADCAST_EVENTS };
|
|
4
|
-
export { USER_ROLE };
|
|
2
|
+
export { AGENT_STATUS, AGENT_BROADCAST_EVENTS, USER_ROLE };
|
|
5
3
|
//# sourceMappingURL=agents.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"agents.js","sourceRoot":"","sources":["../../../src/types/agents.ts"],"names":[],"mappings":"AAAA,OAAO,EAEL,YAAY,EACZ,sBAAsB,EACtB,SAAS,GACV,MAAM,0BAA0B,CAAC;
|
|
1
|
+
{"version":3,"file":"agents.js","sourceRoot":"","sources":["../../../src/types/agents.ts"],"names":[],"mappings":"AAAA,OAAO,EAEL,YAAY,EACZ,sBAAsB,EACtB,SAAS,GACV,MAAM,0BAA0B,CAAC;AAyDlC,OAAO,EAAE,YAAY,EAAE,sBAAsB,EAAE,SAAS,EAAE,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"listeners.js","sourceRoot":"","sources":["../../../src/types/listeners.ts"],"names":[],"mappings":"AAAA,OAAO,
|
|
1
|
+
{"version":3,"file":"listeners.js","sourceRoot":"","sources":["../../../src/types/listeners.ts"],"names":[],"mappings":"AAAA,OAAO,EAAa,aAAa,EAAE,MAAM,0BAA0B,CAAC;AA0BpE,OAAO,EAAE,aAAa,EAAE,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Agents.d.ts","sourceRoot":"","sources":["../../../src/api/Agents.ts"],"names":[],"mappings":"AAGA,OAAO,EACL,KAAK,EACL,sBAAsB,EACtB,wBAAwB,EACxB,2BAA2B,EAC3B,kBAAkB,EAClB,qBAAqB,EACrB,gBAAgB,EAChB,iBAAiB,EACjB,mBAAmB,EACnB,oBAAoB,EACpB,kBAAkB,EAClB,mBAAmB,EACnB,4BAA4B,EAC5B,6BAA6B,EAC7B,gCAAgC,EACjC,MAAM,iBAAiB,CAAC;AAEzB,OAAO,EAAE,QAAQ,EAAE,MAAM,YAAY,CAAC;AAEtC,qBAAa,MAAO,SAAQ,QAAQ;IAClC,SAAS,CAAC,MAAM,CAAC,UAAU,SAAY;IACvC,SAAS,CAAC,MAAM,CAAC,gBAAgB,SAAY;IAC7C,SAAS,CAAC,MAAM,CAAC,eAAe,SAAc;IAC9C,SAAS,CAAC,MAAM,CAAC,oBAAoB,SAAkB;IACvD,SAAS,CAAC,MAAM,CAAC,qBAAqB,SAAiB;IACvD,SAAS,CAAC,MAAM,CAAC,qBAAqB,SAAuB;IAC7D,SAAS,CAAC,MAAM,CAAC,gBAAgB,SAAY;IAC7C,SAAS,CAAC,MAAM,CAAC,iCAAiC,SAAkB;
|
|
1
|
+
{"version":3,"file":"Agents.d.ts","sourceRoot":"","sources":["../../../src/api/Agents.ts"],"names":[],"mappings":"AAGA,OAAO,EACL,KAAK,EACL,sBAAsB,EACtB,wBAAwB,E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6BAA6B,CAAC;WAoBrB,cAAc,CAChC,OAAO,GAAE,kBAAuB,GAC/B,OAAO,CAAC,sBAAsB,CAAC;WAmBd,eAAe,CACjC,OAAO,GAAE,kBAAuB,GAC/B,OAAO,CAAC,sBAAsB,CAAC;WAiBd,cAAc,CAChC,EAAE,OAAO,EAAE,GAAG,OAAO,EAAE,EAAE,qBAAqB,GAC7C,OAAO,CAAC,IAAI,CAAC;WAoBI,yBAAyB,CAC3C,EAAE,UAAc,EAAE,GAAG,OAAO,EAAE,EAAE,gCAAgC;CA8BnE"}
|
|
@@ -1,14 +1,8 @@
|
|
|
1
1
|
import { Agents, AGENT_STATUS, AGENT_BROADCAST_EVENTS, USER_ROLE } from '@onereach/types-hitl-api';
|
|
2
2
|
import { ApiVersionOptions, NoAccountId } from './common';
|
|
3
|
-
export
|
|
4
|
-
}
|
|
5
|
-
export interface Agent extends Omit<Agents.IAgent, 'agentId'> {
|
|
6
|
-
role: USER_ROLE;
|
|
7
|
-
statusData: AgentStatus;
|
|
8
|
-
}
|
|
3
|
+
export type Agent = Omit<Agents.IAgent, 'agentId'>;
|
|
9
4
|
export type DefaultMeta = object;
|
|
10
|
-
export
|
|
11
|
-
}
|
|
5
|
+
export type DefaultStatusChangeContext = Agents.IStatusChangeContext;
|
|
12
6
|
export interface GetAgentsResponse {
|
|
13
7
|
readonly data: Partial<Agent>[];
|
|
14
8
|
readonly last?: {
|
|
@@ -16,42 +10,26 @@ export interface GetAgentsResponse {
|
|
|
16
10
|
readonly accountId?: string;
|
|
17
11
|
};
|
|
18
12
|
}
|
|
19
|
-
export
|
|
20
|
-
}
|
|
13
|
+
export type GetAgentsOptions = ApiVersionOptions & NoAccountId<Agents.IGetAgentsOptions>;
|
|
21
14
|
export interface GetCompleteAgentsOptions extends ApiVersionOptions {
|
|
22
15
|
readonly accountId?: string;
|
|
23
16
|
}
|
|
24
|
-
export
|
|
25
|
-
}
|
|
17
|
+
export type GetCompleteAgentByIdOptions = ApiVersionOptions & Agents.IGetCompleteAgentByIdParams & NoAccountId<Agents.IGetCompleteAgentByIdQuery>;
|
|
26
18
|
export interface SearchAgentsResponse {
|
|
27
19
|
readonly data: Partial<Agent>[];
|
|
28
20
|
}
|
|
29
|
-
export
|
|
30
|
-
|
|
31
|
-
export
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
export
|
|
35
|
-
}
|
|
36
|
-
export interface UpdateAgentOptions extends ApiVersionOptions, NoAccountId<Agents.IPutAgentQuery>, Agents.IPutAgentBody {
|
|
37
|
-
}
|
|
38
|
-
export interface UpdateAgentRuleGroupsResponse extends Partial<Agent> {
|
|
39
|
-
}
|
|
40
|
-
export interface UpdateAgentRuleGroupsOptions extends ApiVersionOptions, NoAccountId<Agents.IPutAgentRuleGroupsOptions> {
|
|
41
|
-
}
|
|
42
|
-
export interface GetAgentStatusResponse extends Agents.AgentStatus {
|
|
43
|
-
}
|
|
21
|
+
export type SearchAgentsOptions = ApiVersionOptions & Agents.ISearchAgentsBody;
|
|
22
|
+
export type UpdateAgentResponse = Partial<Agent>;
|
|
23
|
+
export type UpdateAgentOptions = ApiVersionOptions & NoAccountId<Agents.IPutAgentQuery> & Agents.IPutAgentBody;
|
|
24
|
+
export type UpdateAgentRuleGroupsResponse = Partial<Agent>;
|
|
25
|
+
export type UpdateAgentRuleGroupsOptions = ApiVersionOptions & NoAccountId<Agents.IPutAgentRuleGroupsOptions>;
|
|
26
|
+
export type GetAgentStatusResponse = Agents.IAgentStatus | Agents.AgentStatus;
|
|
44
27
|
export interface AgentStatusOptions extends ApiVersionOptions {
|
|
45
28
|
readonly agentId?: string;
|
|
46
29
|
}
|
|
47
|
-
export
|
|
48
|
-
|
|
49
|
-
statusData: AgentStatus;
|
|
50
|
-
}
|
|
51
|
-
export interface UpdateAgentsStatusByQueryOptions extends ApiVersionOptions, NoAccountId<Agents.IUpdateAgentsStatusQuery>, Agents.IUpdateAgentsStatusBody {
|
|
30
|
+
export type SetAgentStatusOptions = ApiVersionOptions & NoAccountId<Agents.ISetAgentStatusQuery> & Agents.ISetAgentStatusBody;
|
|
31
|
+
export type UpdateAgentsStatusByQueryOptions = ApiVersionOptions & NoAccountId<Agents.IUpdateAgentsStatusQuery> & Agents.IUpdateAgentsStatusBody & {
|
|
52
32
|
readonly maxRetries?: number;
|
|
53
|
-
}
|
|
54
|
-
export { AGENT_STATUS };
|
|
55
|
-
export { AGENT_BROADCAST_EVENTS };
|
|
56
|
-
export { USER_ROLE };
|
|
33
|
+
};
|
|
34
|
+
export { AGENT_STATUS, AGENT_BROADCAST_EVENTS, USER_ROLE };
|
|
57
35
|
//# sourceMappingURL=agents.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"agents.d.ts","sourceRoot":"","sources":["../../../src/types/agents.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,MAAM,EACN,YAAY,EACZ,sBAAsB,EACtB,SAAS,EACV,MAAM,0BAA0B,CAAC;AAElC,OAAO,EAAE,iBAAiB,EAAE,WAAW,EAAE,MAAM,UAAU,CAAC;AAG1D,MAAM,
|
|
1
|
+
{"version":3,"file":"agents.d.ts","sourceRoot":"","sources":["../../../src/types/agents.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,MAAM,EACN,YAAY,EACZ,sBAAsB,EACtB,SAAS,EACV,MAAM,0BAA0B,CAAC;AAElC,OAAO,EAAE,iBAAiB,EAAE,WAAW,EAAE,MAAM,UAAU,CAAC;AAG1D,MAAM,MAAM,KAAK,GAAG,IAAI,CAAC,MAAM,CAAC,MAAM,EAAE,SAAS,CAAC,CAAC;AACnD,MAAM,MAAM,WAAW,GAAG,MAAM,CAAC;AACjC,MAAM,MAAM,0BAA0B,GAAG,MAAM,CAAC,oBAAoB,CAAC;AAErE,MAAM,WAAW,iBAAiB;IAChC,QAAQ,CAAC,IAAI,EAAE,OAAO,CAAC,KAAK,CAAC,EAAE,CAAC;IAChC,QAAQ,CAAC,IAAI,CAAC,EAAE;QACd,QAAQ,CAAC,EAAE,CAAC,E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G,iBAAiB,GAC5D,WAAW,CAAC,MAAM,CAAC,wBAAwB,CAAC,GAC5C,MAAM,CAAC,uBAAuB,GAC9B;IAAE,QAAQ,CAAC,UAAU,CAAC,EAAE,MAAM,CAAC;CAAE,CAAC;AAEtC,OAAO,EAAE,YAAY,EAAE,sBAAsB,EAAE,SAAS,EAAE,CAAC"}
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { Listeners } from '@onereach/types-hitl-api';
|
|
1
|
+
import { Listeners, CALLBACK_TYPE } from '@onereach/types-hitl-api';
|
|
2
2
|
import { ApiVersionOptions, NoAccountId } from './common';
|
|
3
3
|
export type Listener = Listeners.IListener;
|
|
4
4
|
export type GetListenersOptions = ApiVersionOptions & NoAccountId<Listeners.IGetListenersQuery>;
|
|
@@ -7,6 +7,5 @@ export type GetListenerByIdOptions = ApiVersionOptions & Listeners.ICallbackId &
|
|
|
7
7
|
export type CreateListenersOptions = ApiVersionOptions & NoAccountId<Listeners.ICreateListenerQuery> & Listeners.ICreateListenerBody;
|
|
8
8
|
export type UpdateListenersOptions = ApiVersionOptions & Listeners.ICallbackId & Listeners.IUpdateListenerBody;
|
|
9
9
|
export type DeleteListenersOptions = ApiVersionOptions & Listeners.ICallbackId;
|
|
10
|
-
declare const CALLBACK_TYPE: typeof Listeners.CALLBACK_TYPE;
|
|
11
10
|
export { CALLBACK_TYPE };
|
|
12
11
|
//# sourceMappingURL=listeners.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"listeners.d.ts","sourceRoot":"","sources":["../../../src/types/listeners.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,SAAS,EAAE,MAAM,0BAA0B,CAAC;
|
|
1
|
+
{"version":3,"file":"listeners.d.ts","sourceRoot":"","sources":["../../../src/types/listeners.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,SAAS,EAAE,aAAa,EAAE,MAAM,0BAA0B,CAAC;AAEpE,OAAO,EAAE,iBAAiB,EAAE,WAAW,EAAE,MAAM,UAAU,CAAC;AAE1D,MAAM,MAAM,QAAQ,GAAG,SAAS,CAAC,SAAS,CAAC;AAE3C,MAAM,MAAM,mBAAmB,GAAG,iBAAiB,GAC/C,WAAW,CAAC,SAAS,CAAC,kBAAkB,CAAC,CAAC;AAC9C,MAAM,MAAM,oBAAoB,GAC5B,SAAS,CAAC,qBAAqB,CAAC;AAEpC,MAAM,MAAM,sBAAsB,GAAG,iBAAiB,GAClD,SAAS,CAAC,WAAW,GACrB,WAAW,CAAC,SAAS,CAAC,kBAAkB,CAAC,CAAC;AAE9C,MAAM,MAAM,sBAAsB,GAAG,iBAAiB,GAClD,WAAW,CAAC,SAAS,CAAC,oBAAoB,CAAC,GAC3C,SAAS,CAAC,mBAAmB,CAAC;AAElC,MAAM,MAAM,sBAAsB,GAAG,iBAAiB,GAClD,SAAS,CAAC,WAAW,GACrB,SAAS,CAAC,mBAAmB,CAAC;AAElC,MAAM,MAAM,sBAAsB,GAAG,iBAAiB,GAClD,SAAS,CAAC,WAAW,CAAC;AAE1B,OAAO,EAAE,aAAa,EAAE,CAAC"}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@or-sdk/hitl",
|
|
3
|
-
"version": "0.35.2-beta.
|
|
3
|
+
"version": "0.35.2-beta.3709.0",
|
|
4
4
|
"license": "Apache-2.0",
|
|
5
5
|
"main": "dist/cjs/index.js",
|
|
6
6
|
"module": "dist/esm/index.js",
|
|
@@ -18,7 +18,7 @@
|
|
|
18
18
|
"dev": "pnpm build:watch:esm"
|
|
19
19
|
},
|
|
20
20
|
"dependencies": {
|
|
21
|
-
"@onereach/types-hitl-api": "0.0.
|
|
21
|
+
"@onereach/types-hitl-api": "0.0.83-rc.1",
|
|
22
22
|
"@or-sdk/base": "^0.42.0",
|
|
23
23
|
"urijs": "^1.19.8"
|
|
24
24
|
},
|
package/src/api/Agents.ts
CHANGED
|
@@ -32,56 +32,15 @@ export class Agents extends HITLBase {
|
|
|
32
32
|
protected static UPDATE_AGENTS_STATUS_BY_QUERY_URL = 'status/query';
|
|
33
33
|
|
|
34
34
|
/**
|
|
35
|
-
*
|
|
36
|
-
*
|
|
37
|
-
* @param options - Configuration options for the agent list request
|
|
38
|
-
*
|
|
39
|
-
* Options can include:
|
|
40
|
-
* - `agentIds` - (Optional, string[]) List of specific agent identifiers to retrieve
|
|
41
|
-
* - `projection` - (Optional, string[]) List of fields to include in the response
|
|
42
|
-
* - `limit` - (Optional, number) Maximum number of agents to return
|
|
43
|
-
* - `offset` - (Optional, number) Number of agents to skip for pagination
|
|
44
|
-
* - `orderBy` - (Optional, string) Field name to order the results by
|
|
45
|
-
* - `order` - (Optional, 'asc'|'desc') Order direction
|
|
46
|
-
* - `version` - (Optional, number) API version
|
|
47
|
-
*
|
|
48
|
-
* @returns {Promise<GetAgentsResponse>} Promise resolving to:
|
|
49
|
-
* - `data` - Array of partial agent objects {@link Agent}
|
|
50
|
-
* - `last` - Optional pagination information:
|
|
51
|
-
* - `id` - Optional ID of the last agent in the list
|
|
52
|
-
* - `accountId` - Optional account ID of the last agent
|
|
53
|
-
*
|
|
54
|
-
* @example
|
|
55
|
-
* ```typescript
|
|
56
|
-
* const response = await Agents.getAgents({
|
|
57
|
-
* limit: 10,
|
|
58
|
-
* offset: 0,
|
|
59
|
-
* orderBy: 'createdAt',
|
|
60
|
-
* order: 'desc'
|
|
61
|
-
* });
|
|
62
|
-
* ```
|
|
63
|
-
*
|
|
64
|
-
* @example
|
|
65
|
-
* Using projection and filtering by specific agents:
|
|
66
|
-
* ```typescript
|
|
67
|
-
* const response = await Agents.getAgents({
|
|
68
|
-
* agentIds: ['agent1', 'agent2'],
|
|
69
|
-
* projection: ['id', 'name', 'statusData'],
|
|
70
|
-
* orderBy: 'name',
|
|
71
|
-
* order: 'asc'
|
|
72
|
-
* });
|
|
73
|
-
* ```
|
|
74
|
-
*
|
|
75
|
-
* @remarks
|
|
76
|
-
* Makes a GET request to the `/agents` endpoint
|
|
77
|
-
* @public
|
|
35
|
+
* @description Get agents list with hitl info
|
|
36
|
+
* @param options
|
|
78
37
|
*/
|
|
79
38
|
public static async getAgents(
|
|
80
|
-
options: GetAgentsOptions = {}
|
|
39
|
+
options: GetAgentsOptions = {}
|
|
81
40
|
): Promise<GetAgentsResponse> {
|
|
82
41
|
const route = this.getBaseUrl(options);
|
|
83
42
|
const params = Object.fromEntries(
|
|
84
|
-
Object.entries(options).filter(([key]) => !DEFAULT_OMIT_FIELDS.includes(key))
|
|
43
|
+
Object.entries(options).filter(([key]) => !DEFAULT_OMIT_FIELDS.includes(key))
|
|
85
44
|
);
|
|
86
45
|
|
|
87
46
|
return this.request({
|
|
@@ -92,30 +51,11 @@ export class Agents extends HITLBase {
|
|
|
92
51
|
}
|
|
93
52
|
|
|
94
53
|
/**
|
|
95
|
-
* Get Agents list with full info (additional data from Users API DB)
|
|
96
|
-
*
|
|
97
|
-
* @param options - Configuration options for the complete agent list request
|
|
98
|
-
*
|
|
99
|
-
* Options can include:
|
|
100
|
-
* - `accountId` - (Optional, string) Account identifier to filter agents
|
|
101
|
-
* - `version` - (Optional, number) API version
|
|
102
|
-
* - `timeout` - (Optional, number) Search timeout in milliseconds
|
|
103
|
-
*
|
|
104
|
-
* @returns {Promise<GetAgentsResponse>} Promise resolving to:
|
|
105
|
-
* - `data` - Array of partial agent objects with complete information
|
|
106
|
-
* - `last` - Optional pagination information
|
|
107
|
-
*
|
|
108
|
-
* @example
|
|
109
|
-
* ```typescript
|
|
110
|
-
* const response = await Agents.getCompleteAgents();
|
|
111
|
-
* ```
|
|
112
|
-
*
|
|
113
|
-
* @remarks
|
|
114
|
-
* Makes a GET request to the `/agents/complete` endpoint
|
|
115
|
-
* @public
|
|
54
|
+
* @description Get Agents list with full info (additional data from Users API DB)
|
|
55
|
+
* @param options
|
|
116
56
|
*/
|
|
117
57
|
public static async getCompleteAgents(
|
|
118
|
-
options: GetCompleteAgentsOptions = {}
|
|
58
|
+
options: GetCompleteAgentsOptions = {}
|
|
119
59
|
): Promise<GetAgentsResponse> {
|
|
120
60
|
const baseUrl = this.getBaseUrl(options);
|
|
121
61
|
const route = new URI(baseUrl).segment(this.AGENTS_COMPLETE).href();
|
|
@@ -129,33 +69,12 @@ export class Agents extends HITLBase {
|
|
|
129
69
|
}
|
|
130
70
|
|
|
131
71
|
/**
|
|
132
|
-
* Get Agent with full info (additional data from Users API DB)
|
|
133
|
-
*
|
|
134
|
-
* @param options - Configuration options for retrieving a complete agent
|
|
135
|
-
*
|
|
136
|
-
* Options can include:
|
|
137
|
-
* - `agentId` - (Required, string) Identifier of the agent to retrieve
|
|
138
|
-
* - `multiUserId` - (Optional, string) Multi-user identifier
|
|
139
|
-
* - `accountId` - (Optional, string) Account identifier
|
|
140
|
-
* - `version` - (Optional, number) API version
|
|
141
|
-
* - `timeout` - (Optional, number) Search timeout in milliseconds
|
|
142
|
-
*
|
|
143
|
-
* @returns {Promise<Agent>} Promise resolving to a complete agent object
|
|
144
|
-
*
|
|
145
|
-
* @example
|
|
146
|
-
* ```typescript
|
|
147
|
-
* const agent = await Agents.getCompleteAgentById({
|
|
148
|
-
* agentId: 'agent-id',
|
|
149
|
-
* multiUserId: 'multi456'
|
|
150
|
-
* });
|
|
151
|
-
* ```
|
|
152
|
-
*
|
|
153
|
-
* @remarks
|
|
154
|
-
* Makes a GET request to the `/agents/complete/:agentId` endpoint
|
|
155
|
-
* @public
|
|
72
|
+
* @description Get Agent with full info (additional data from Users API DB)
|
|
73
|
+
* @param options
|
|
156
74
|
*/
|
|
157
75
|
public static async getCompleteAgentById(
|
|
158
|
-
|
|
76
|
+
// FIXME: not sure accountId can exist here. Added hack to make it build
|
|
77
|
+
{ accountId, multiUserId, ...options }: GetCompleteAgentByIdOptions & { accountId?: string; }
|
|
159
78
|
): Promise<Agent> {
|
|
160
79
|
const baseUrl = this.getBaseUrl(options);
|
|
161
80
|
const route = new URI(baseUrl)
|
|
@@ -174,43 +93,16 @@ export class Agents extends HITLBase {
|
|
|
174
93
|
}
|
|
175
94
|
|
|
176
95
|
/**
|
|
177
|
-
* Search Agents by Rule Groups, status etc.
|
|
178
|
-
*
|
|
179
|
-
* @param options - Configuration options for the agent search
|
|
180
|
-
*
|
|
181
|
-
* Options can include:
|
|
182
|
-
* - `contactRuleGroupIds` - (Optional, string[]) Array of contact rule group identifiers
|
|
183
|
-
* - `excludeAgentIds` - (Optional, string[]) Array of agent IDs to exclude
|
|
184
|
-
* - `projection` - (Optional, string[]) List of fields to include in response
|
|
185
|
-
* - `ruleGroupIds` - (Optional, string[]) Array of rule group identifiers to filter by
|
|
186
|
-
* - `ruleTags` - (Optional, string[]) Array of rule tags to filter by
|
|
187
|
-
* - `statuses` - (Optional, IAgentsStatusForSearch[]) Array of agent statuses
|
|
188
|
-
* - `timeout` - (Optional, number) Search timeout in milliseconds
|
|
189
|
-
* - `version` - (Optional, string|number) API version
|
|
190
|
-
*
|
|
191
|
-
* @returns {Promise<SearchAgentsResponse>} Promise resolving to:
|
|
192
|
-
* - `data` - Array of partial agent objects matching the search criteria
|
|
193
|
-
*
|
|
194
|
-
* @example
|
|
195
|
-
* ```typescript
|
|
196
|
-
* const response = await Agents.searchAgents({
|
|
197
|
-
* ruleGroupIds: ['group1', 'group2'],
|
|
198
|
-
* statuses: ['AVAILABLE', 'BUSY'],
|
|
199
|
-
* projection: ['id', 'name', 'statusData']
|
|
200
|
-
* });
|
|
201
|
-
* ```
|
|
202
|
-
*
|
|
203
|
-
* @remarks
|
|
204
|
-
* Makes a POST request to the `/agents/search` endpoint
|
|
205
|
-
* @public
|
|
96
|
+
* @description Search Agents by Rule Groups, status etc.
|
|
97
|
+
* @param options
|
|
206
98
|
*/
|
|
207
99
|
public static async searchAgents(
|
|
208
|
-
options: SearchAgentsOptions = {}
|
|
100
|
+
options: SearchAgentsOptions = {}
|
|
209
101
|
): Promise<SearchAgentsResponse> {
|
|
210
102
|
const baseUrl = this.getBaseUrl(options);
|
|
211
103
|
const route = new URI(baseUrl).segment(this.AGENT_SEARCH_URL).href();
|
|
212
104
|
const data = Object.fromEntries(
|
|
213
|
-
Object.entries(options).filter(([key]) => !DEFAULT_OMIT_FIELDS.includes(key))
|
|
105
|
+
Object.entries(options).filter(([key]) => !DEFAULT_OMIT_FIELDS.includes(key))
|
|
214
106
|
);
|
|
215
107
|
|
|
216
108
|
return this.request({
|
|
@@ -222,42 +114,15 @@ export class Agents extends HITLBase {
|
|
|
222
114
|
}
|
|
223
115
|
|
|
224
116
|
/**
|
|
225
|
-
* Update Agent
|
|
226
|
-
*
|
|
227
|
-
* @param options - Configuration options for the agent update
|
|
228
|
-
*
|
|
229
|
-
* Options can include:
|
|
230
|
-
* - `agentId` - (Required, string) Identifier of the agent to update
|
|
231
|
-
* - `ruleGroupIds` - (Optional, string[]) Array of rule group identifiers
|
|
232
|
-
* - `contactRuleGroupIds` - (Optional, string[]) Array of contact rule group identifiers
|
|
233
|
-
* - `meta` - (Optional, Object) Metadata object for the agent
|
|
234
|
-
* - `version` - (Optional, number) API version
|
|
235
|
-
* - `timeout` - (Optional, number) Search timeout in milliseconds
|
|
236
|
-
*
|
|
237
|
-
* @returns {Promise<UpdateAgentResponse>} Promise resolving to a partial agent object with updated information
|
|
238
|
-
*
|
|
239
|
-
* @example
|
|
240
|
-
* ```typescript
|
|
241
|
-
* const updatedAgent = await Agents.updateAgent({
|
|
242
|
-
* agentId: 'agent-id',
|
|
243
|
-
* ruleGroupIds: ['group1', 'group2'],
|
|
244
|
-
* meta: {
|
|
245
|
-
* department: 'Support',
|
|
246
|
-
* skills: ['chat', 'voice']
|
|
247
|
-
* }
|
|
248
|
-
* });
|
|
249
|
-
* ```
|
|
250
|
-
*
|
|
251
|
-
* @remarks
|
|
252
|
-
* Makes a PUT request to the `/agents` endpoint with agentId as a query parameter
|
|
253
|
-
* @public
|
|
117
|
+
* @description Update Agent
|
|
118
|
+
* @param options
|
|
254
119
|
*/
|
|
255
120
|
public static async updateAgent(
|
|
256
|
-
{ agentId, ...options }: UpdateAgentOptions
|
|
121
|
+
{ agentId, ...options }: UpdateAgentOptions
|
|
257
122
|
): Promise<UpdateAgentResponse> {
|
|
258
123
|
const route = this.getBaseUrl(options);
|
|
259
124
|
const data = Object.fromEntries(
|
|
260
|
-
Object.entries(options).filter(([key]) => !DEFAULT_OMIT_FIELDS.includes(key))
|
|
125
|
+
Object.entries(options).filter(([key]) => !DEFAULT_OMIT_FIELDS.includes(key))
|
|
261
126
|
);
|
|
262
127
|
|
|
263
128
|
return this.request({
|
|
@@ -270,38 +135,16 @@ export class Agents extends HITLBase {
|
|
|
270
135
|
}
|
|
271
136
|
|
|
272
137
|
/**
|
|
273
|
-
* Update Rule Groups for Agent
|
|
274
|
-
*
|
|
275
|
-
* @param options - Configuration options for updating agent rule groups
|
|
276
|
-
*
|
|
277
|
-
* Options can include:
|
|
278
|
-
* - `agentId` - (Required, string) Identifier of the agent
|
|
279
|
-
* - `addRuleGroupIds` - (Optional, string[]) Array of rule group IDs to add
|
|
280
|
-
* - `removeRuleGroupIds` - (Optional, string[]) Array of rule group IDs to remove
|
|
281
|
-
* - `version` - (Optional, number) API version
|
|
282
|
-
* - `timeout` - (Optional, number) Search timeout in milliseconds
|
|
283
|
-
* @returns {Promise<UpdateAgentRuleGroupsResponse>} Promise resolving to a partial agent object with updated rule groups
|
|
284
|
-
*
|
|
285
|
-
* @example
|
|
286
|
-
* ```typescript
|
|
287
|
-
* const updatedAgent = await Agents.updateAgentRuleGroups({
|
|
288
|
-
* agentId: 'agent-id',
|
|
289
|
-
* addRuleGroupIds: ['group1', 'group2'],
|
|
290
|
-
* removeRuleGroupIds: ['group3', 'group4']
|
|
291
|
-
* });
|
|
292
|
-
* ```
|
|
293
|
-
*
|
|
294
|
-
* @remarks
|
|
295
|
-
* Makes a PUT request to the `/agents/rule-groups` endpoint with agentId as a query parameter
|
|
296
|
-
* @public
|
|
138
|
+
* @description Update Rule Groups for Agent
|
|
139
|
+
* @param options
|
|
297
140
|
*/
|
|
298
141
|
public static async updateAgentRuleGroups(
|
|
299
|
-
{ agentId, ...options }: UpdateAgentRuleGroupsOptions
|
|
142
|
+
{ agentId, ...options }: UpdateAgentRuleGroupsOptions
|
|
300
143
|
): Promise<UpdateAgentRuleGroupsResponse> {
|
|
301
144
|
const baseUrl = this.getBaseUrl(options);
|
|
302
145
|
const route = new URI(baseUrl).segment(this.AGENT_RULE_GROUPS_URL).href();
|
|
303
146
|
const data = Object.fromEntries(
|
|
304
|
-
Object.entries(options).filter(([key]) => !DEFAULT_OMIT_FIELDS.includes(key))
|
|
147
|
+
Object.entries(options).filter(([key]) => !DEFAULT_OMIT_FIELDS.includes(key))
|
|
305
148
|
);
|
|
306
149
|
|
|
307
150
|
return this.request({
|
|
@@ -314,31 +157,11 @@ export class Agents extends HITLBase {
|
|
|
314
157
|
}
|
|
315
158
|
|
|
316
159
|
/**
|
|
317
|
-
* Get Agent status
|
|
318
|
-
*
|
|
319
|
-
* @param options - Configuration options for retrieving agent status
|
|
320
|
-
*
|
|
321
|
-
* Options can include:
|
|
322
|
-
* - `agentId` - (Optional, string) Identifier of the agent
|
|
323
|
-
* - `version` - (Optional, number) API version
|
|
324
|
-
* - `timeout` - (Optional, number) Search timeout in milliseconds
|
|
325
|
-
*
|
|
326
|
-
* @returns {Promise<GetAgentStatusResponse>} Promise resolving to agent status object
|
|
327
|
-
*
|
|
328
|
-
* @example
|
|
329
|
-
* ```typescript
|
|
330
|
-
* const status = await Agents.getAgentStatus({
|
|
331
|
-
* agentId: 'agent-id',
|
|
332
|
-
* version: 2
|
|
333
|
-
* });
|
|
334
|
-
* ```
|
|
335
|
-
*
|
|
336
|
-
* @remarks
|
|
337
|
-
* Makes a GET request to the `/agents/agent-status` endpoint or `/agents/status` endpoint if version is 2
|
|
338
|
-
* @public
|
|
160
|
+
* @description Get Agent status
|
|
161
|
+
* @param options
|
|
339
162
|
*/
|
|
340
163
|
public static async getAgentStatus(
|
|
341
|
-
options: AgentStatusOptions = {}
|
|
164
|
+
options: AgentStatusOptions = {}
|
|
342
165
|
): Promise<GetAgentStatusResponse> {
|
|
343
166
|
const version = options.version;
|
|
344
167
|
const baseUrl = this.getBaseUrl(options);
|
|
@@ -355,28 +178,11 @@ export class Agents extends HITLBase {
|
|
|
355
178
|
}
|
|
356
179
|
|
|
357
180
|
/**
|
|
358
|
-
* Send an Agent status "ping" message to keep Agent "online"
|
|
359
|
-
*
|
|
360
|
-
* @param options - Configuration options for the agent status ping
|
|
361
|
-
*
|
|
362
|
-
* Options can include:
|
|
363
|
-
* - `agentId` - (Optional, string) Identifier of the agent
|
|
364
|
-
* - `version` - (Optional, number) API version
|
|
365
|
-
* - `timeout` - (Optional, number) Search timeout in milliseconds
|
|
366
|
-
*
|
|
367
|
-
* @returns {Promise<GetAgentStatusResponse>} Promise resolving to updated agent status
|
|
368
|
-
*
|
|
369
|
-
* @example
|
|
370
|
-
* ```typescript
|
|
371
|
-
* const status = await Agents.pingAgentStatus();
|
|
372
|
-
* ```
|
|
373
|
-
*
|
|
374
|
-
* @remarks
|
|
375
|
-
* Makes a PUT request to the `/agents/ping-agent-status` endpoint
|
|
376
|
-
* @public
|
|
181
|
+
* @description Send an Agent status "ping" message to keep Agent "online"
|
|
182
|
+
* @param options
|
|
377
183
|
*/
|
|
378
184
|
public static async pingAgentStatus(
|
|
379
|
-
options: AgentStatusOptions = {}
|
|
185
|
+
options: AgentStatusOptions = {}
|
|
380
186
|
): Promise<GetAgentStatusResponse> {
|
|
381
187
|
const baseUrl = this.getBaseUrl(options);
|
|
382
188
|
const route = new URI(baseUrl).segment(this.PING_AGENT_STATUS_URL).href();
|
|
@@ -391,54 +197,16 @@ export class Agents extends HITLBase {
|
|
|
391
197
|
}
|
|
392
198
|
|
|
393
199
|
/**
|
|
394
|
-
* Set Agent status
|
|
395
|
-
*
|
|
396
|
-
* @param options - Configuration options for setting agent status
|
|
397
|
-
*
|
|
398
|
-
* Options can include:
|
|
399
|
-
* - `agentId` - (Required, string) Identifier of the agent
|
|
400
|
-
* - `statusData` - (Required, Object) Status information:
|
|
401
|
-
* - `status` - (Required, string) Agent status value
|
|
402
|
-
* - `busyReason` - (Optional, string) Reason for busy status
|
|
403
|
-
* - `expireIn` - (Optional, number) Time in seconds until status expires
|
|
404
|
-
* - `notifyStatusChange` - (Optional, boolean) Flag to notify about status change
|
|
405
|
-
* - `statusChangeContext` - (Optional, Object) Context data for status change
|
|
406
|
-
* - `version` - (Optional, number) API version
|
|
407
|
-
* - `timeout` - (Optional, number) Search timeout in milliseconds
|
|
408
|
-
* @returns {Promise<void>} Promise that resolves when status is successfully set
|
|
409
|
-
*
|
|
410
|
-
* @example
|
|
411
|
-
* ```typescript
|
|
412
|
-
* await Agents.setAgentStatus({
|
|
413
|
-
* agentId: 'agent-id',
|
|
414
|
-
* statusData: {
|
|
415
|
-
* key: 'busy',
|
|
416
|
-
* order: 1,
|
|
417
|
-
* status: 'BUSY',
|
|
418
|
-
* isBasic: true,
|
|
419
|
-
* expireIn: 60,
|
|
420
|
-
* canToggle: ['on', 'off']
|
|
421
|
-
* },
|
|
422
|
-
* statusChangeContext: {
|
|
423
|
-
* type: 'Manual',
|
|
424
|
-
* source: 'Agent UI'
|
|
425
|
-
* },
|
|
426
|
-
* notifyStatusChange: false,
|
|
427
|
-
* version: 2
|
|
428
|
-
* });
|
|
429
|
-
* ```
|
|
430
|
-
*
|
|
431
|
-
* @remarks
|
|
432
|
-
* Makes a PUT request to the `/agents/status` endpoint with agentId as a query parameter
|
|
433
|
-
* @public
|
|
200
|
+
* @description Set Agent status
|
|
201
|
+
* @param options
|
|
434
202
|
*/
|
|
435
203
|
public static async setAgentStatus(
|
|
436
|
-
{ agentId, ...options }: SetAgentStatusOptions
|
|
204
|
+
{ agentId, ...options }: SetAgentStatusOptions
|
|
437
205
|
): Promise<void> {
|
|
438
206
|
const baseUrl = this.getBaseUrl(options);
|
|
439
207
|
const route = new URI(baseUrl).segment(this.AGENT_STATUS_URL).href();
|
|
440
208
|
const data = Object.fromEntries(
|
|
441
|
-
Object.entries(options).filter(([key]) => !DEFAULT_OMIT_FIELDS.includes(key))
|
|
209
|
+
Object.entries(options).filter(([key]) => !DEFAULT_OMIT_FIELDS.includes(key))
|
|
442
210
|
);
|
|
443
211
|
|
|
444
212
|
return this.request({
|
|
@@ -451,41 +219,18 @@ export class Agents extends HITLBase {
|
|
|
451
219
|
}
|
|
452
220
|
|
|
453
221
|
/**
|
|
454
|
-
* Update Agents status by providing a raw SQL query
|
|
455
|
-
*
|
|
456
|
-
* @param options - Configuration options for updating agents' status
|
|
457
|
-
*
|
|
458
|
-
* Options can include:
|
|
459
|
-
* - `query` - (Required, string) SQL query or filter conditions to select agents
|
|
460
|
-
* - `statusChangeContext` - (Optional, Object) Context data for status change
|
|
461
|
-
* - `maxRetries` - (Optional, number) Number of retry attempts for concurrent updates
|
|
462
|
-
* - `version` - (Optional, number) API version
|
|
463
|
-
* - `timeout` - (Optional, number) Search timeout in milliseconds
|
|
464
|
-
*
|
|
465
|
-
* @returns {Promise<any>} Promise resolving to the result of the batch update operation
|
|
466
|
-
*
|
|
467
|
-
* @example
|
|
468
|
-
* ```typescript
|
|
469
|
-
* const result = await Agents.updateAgentsStatusByQuery({
|
|
470
|
-
* query: `UPDATE hitl.agents SET status_data = jsonb_set(status_data, '{key}', '"busy"') WHERE status_data->>'key'='available' RETURNING*`,
|
|
471
|
-
* maxRetries: 5,
|
|
472
|
-
* version: 2
|
|
473
|
-
* });
|
|
474
|
-
* ```
|
|
475
|
-
*
|
|
476
|
-
* @remarks
|
|
477
|
-
* Makes a PUT request to the `/agents/status/query` endpoint with retry mechanism for concurrent updates
|
|
478
|
-
* @public
|
|
222
|
+
* @description Update Agents status by providing a raw SQL query
|
|
223
|
+
* @param options
|
|
479
224
|
*/
|
|
480
225
|
public static async updateAgentsStatusByQuery(
|
|
481
|
-
{ maxRetries = 3, ...options }: UpdateAgentsStatusByQueryOptions
|
|
226
|
+
{ maxRetries = 3, ...options }: UpdateAgentsStatusByQueryOptions
|
|
482
227
|
) {
|
|
483
228
|
const baseUrl = this.getBaseUrl(options);
|
|
484
229
|
const route = new URI(baseUrl)
|
|
485
230
|
.segment(this.UPDATE_AGENTS_STATUS_BY_QUERY_URL)
|
|
486
231
|
.href();
|
|
487
232
|
const data = Object.fromEntries(
|
|
488
|
-
Object.entries(options).filter(([key]) => !DEFAULT_OMIT_FIELDS.includes(key))
|
|
233
|
+
Object.entries(options).filter(([key]) => !DEFAULT_OMIT_FIELDS.includes(key))
|
|
489
234
|
);
|
|
490
235
|
|
|
491
236
|
let result;
|
package/src/types/agents.ts
CHANGED
|
@@ -7,14 +7,10 @@ import {
|
|
|
7
7
|
|
|
8
8
|
import { ApiVersionOptions, NoAccountId } from './common';
|
|
9
9
|
|
|
10
|
-
/* eslint-disable @typescript-eslint/
|
|
11
|
-
export
|
|
12
|
-
export interface Agent extends Omit<Agents.IAgent, 'agentId'> {
|
|
13
|
-
role: USER_ROLE,
|
|
14
|
-
statusData: AgentStatus,
|
|
15
|
-
}
|
|
10
|
+
/* eslint-disable @typescript-eslint/indent */
|
|
11
|
+
export type Agent = Omit<Agents.IAgent, 'agentId'>;
|
|
16
12
|
export type DefaultMeta = object;
|
|
17
|
-
export
|
|
13
|
+
export type DefaultStatusChangeContext = Agents.IStatusChangeContext;
|
|
18
14
|
|
|
19
15
|
export interface GetAgentsResponse {
|
|
20
16
|
readonly data: Partial<Agent>[];
|
|
@@ -24,69 +20,44 @@ export interface GetAgentsResponse {
|
|
|
24
20
|
};
|
|
25
21
|
}
|
|
26
22
|
|
|
27
|
-
export
|
|
28
|
-
|
|
29
|
-
|
|
23
|
+
export type GetAgentsOptions = ApiVersionOptions
|
|
24
|
+
& NoAccountId<Agents.IGetAgentsOptions>;
|
|
25
|
+
|
|
30
26
|
|
|
31
27
|
export interface GetCompleteAgentsOptions extends ApiVersionOptions {
|
|
32
28
|
readonly accountId?: string;
|
|
33
29
|
}
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
Agents.IGetCompleteAgentByIdParams,
|
|
38
|
-
NoAccountId<Agents.IGetCompleteAgentByIdQuery>{}
|
|
30
|
+
export type GetCompleteAgentByIdOptions = ApiVersionOptions
|
|
31
|
+
& Agents.IGetCompleteAgentByIdParams
|
|
32
|
+
& NoAccountId<Agents.IGetCompleteAgentByIdQuery>;
|
|
39
33
|
|
|
40
34
|
export interface SearchAgentsResponse {
|
|
41
35
|
readonly data: Partial<Agent>[];
|
|
42
36
|
}
|
|
37
|
+
export type SearchAgentsOptions = ApiVersionOptions
|
|
38
|
+
& Agents.ISearchAgentsBody;
|
|
43
39
|
|
|
44
|
-
export
|
|
45
|
-
export
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
statuses?: AgentsStatusForSearch[],
|
|
49
|
-
}
|
|
50
|
-
|
|
51
|
-
export interface UpdateAgentResponse
|
|
52
|
-
extends Partial<Agent>{}
|
|
53
|
-
export interface UpdateAgentOptions
|
|
54
|
-
extends ApiVersionOptions,
|
|
55
|
-
NoAccountId<Agents.IPutAgentQuery>,
|
|
56
|
-
Agents.IPutAgentBody{}
|
|
40
|
+
export type UpdateAgentResponse = Partial<Agent>;
|
|
41
|
+
export type UpdateAgentOptions = ApiVersionOptions
|
|
42
|
+
& NoAccountId<Agents.IPutAgentQuery>
|
|
43
|
+
& Agents.IPutAgentBody;
|
|
57
44
|
|
|
58
|
-
export
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
extends ApiVersionOptions,
|
|
62
|
-
NoAccountId<Agents.IPutAgentRuleGroupsOptions>{}
|
|
45
|
+
export type UpdateAgentRuleGroupsResponse = Partial<Agent>;
|
|
46
|
+
export type UpdateAgentRuleGroupsOptions = ApiVersionOptions
|
|
47
|
+
& NoAccountId<Agents.IPutAgentRuleGroupsOptions>;
|
|
63
48
|
|
|
64
|
-
|
|
65
|
-
export interface GetAgentStatusResponse extends Agents.AgentStatus {}
|
|
49
|
+
export type GetAgentStatusResponse = Agents.IAgentStatus | Agents.AgentStatus;
|
|
66
50
|
export interface AgentStatusOptions extends ApiVersionOptions {
|
|
67
51
|
readonly agentId?: string;
|
|
68
52
|
}
|
|
69
53
|
|
|
70
|
-
export
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
Agents.ISetAgentStatusBody {
|
|
74
|
-
statusChangeContext?: DefaultStatusChangeContext,
|
|
75
|
-
statusData: AgentStatus
|
|
76
|
-
}
|
|
77
|
-
|
|
78
|
-
export interface UpdateAgentsStatusByQueryOptions extends
|
|
79
|
-
ApiVersionOptions,
|
|
80
|
-
NoAccountId<Agents.IUpdateAgentsStatusQuery>,
|
|
81
|
-
Agents.IUpdateAgentsStatusBody {
|
|
82
|
-
readonly maxRetries?: number;
|
|
83
|
-
}
|
|
84
|
-
|
|
85
|
-
/** Agent status enumeration defining possible states of an agent */
|
|
86
|
-
export { AGENT_STATUS };
|
|
54
|
+
export type SetAgentStatusOptions = ApiVersionOptions
|
|
55
|
+
& NoAccountId<Agents.ISetAgentStatusQuery>
|
|
56
|
+
& Agents.ISetAgentStatusBody;
|
|
87
57
|
|
|
88
|
-
|
|
89
|
-
|
|
58
|
+
export type UpdateAgentsStatusByQueryOptions = ApiVersionOptions
|
|
59
|
+
& NoAccountId<Agents.IUpdateAgentsStatusQuery>
|
|
60
|
+
& Agents.IUpdateAgentsStatusBody
|
|
61
|
+
& { readonly maxRetries?: number; };
|
|
90
62
|
|
|
91
|
-
|
|
92
|
-
export { USER_ROLE };
|
|
63
|
+
export { AGENT_STATUS, AGENT_BROADCAST_EVENTS, USER_ROLE };
|
package/src/types/listeners.ts
CHANGED
|
@@ -1,8 +1,7 @@
|
|
|
1
|
-
import { Listeners } from '@onereach/types-hitl-api';
|
|
1
|
+
import { Listeners, CALLBACK_TYPE } from '@onereach/types-hitl-api';
|
|
2
2
|
|
|
3
3
|
import { ApiVersionOptions, NoAccountId } from './common';
|
|
4
4
|
|
|
5
|
-
/* eslint-disable @typescript-eslint/indent */
|
|
6
5
|
export type Listener = Listeners.IListener;
|
|
7
6
|
|
|
8
7
|
export type GetListenersOptions = ApiVersionOptions
|
|
@@ -25,5 +24,4 @@ export type UpdateListenersOptions = ApiVersionOptions
|
|
|
25
24
|
export type DeleteListenersOptions = ApiVersionOptions
|
|
26
25
|
& Listeners.ICallbackId;
|
|
27
26
|
|
|
28
|
-
const CALLBACK_TYPE = Listeners.CALLBACK_TYPE;
|
|
29
27
|
export { CALLBACK_TYPE };
|