@onereach/types-hitl-api 0.0.31 → 0.0.32-rc.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/types/constants/{index.d.ts → api.d.ts} +5 -0
- package/dist/types/constants/{index.js → api.js} +8 -2
- package/dist/types/constants/api.js.map +1 -0
- package/dist/types/index.types.d.ts +2 -2
- package/dist/types/index.types.js +2 -2
- package/dist/types/index.types.js.map +1 -1
- package/dist/types/interfaces/{agents.d.ts → api/agents.d.ts} +1 -1
- package/dist/types/interfaces/{agents.js → api/agents.js} +0 -0
- package/dist/types/interfaces/{agents.js.map → api/agents.js.map} +1 -1
- package/dist/types/interfaces/{canned-messages.d.ts → api/canned-messages.d.ts} +8 -8
- package/dist/types/interfaces/{canned-messages.js → api/canned-messages.js} +0 -0
- package/dist/types/interfaces/api/canned-messages.js.map +1 -0
- package/dist/types/interfaces/{common.d.ts → api/common.d.ts} +7 -0
- package/dist/types/interfaces/{common.js → api/common.js} +0 -0
- package/dist/types/interfaces/{common.js.map → api/common.js.map} +1 -1
- package/dist/types/interfaces/{conferences.d.ts → api/conferences.d.ts} +5 -5
- package/dist/types/interfaces/{conferences.js → api/conferences.js} +0 -0
- package/dist/types/interfaces/api/conferences.js.map +1 -0
- package/dist/types/interfaces/{event-templates.d.ts → api/event-templates.d.ts} +2 -2
- package/dist/types/interfaces/{event-templates.js → api/event-templates.js} +0 -0
- package/dist/types/interfaces/api/event-templates.js.map +1 -0
- package/dist/types/interfaces/{filters.d.ts → api/filters.d.ts} +5 -5
- package/dist/types/interfaces/{filters.js → api/filters.js} +0 -0
- package/dist/types/interfaces/api/filters.js.map +1 -0
- package/dist/types/interfaces/{index.types.d.ts → api/index.d.ts} +4 -4
- package/dist/types/interfaces/{index.types.js → api/index.js} +6 -6
- package/dist/types/interfaces/api/index.js.map +1 -0
- package/dist/types/interfaces/api/listeners.d.ts +37 -0
- package/dist/types/interfaces/api/listeners.js +10 -0
- package/dist/types/interfaces/api/listeners.js.map +1 -0
- package/dist/types/interfaces/api/meta.d.ts +5 -0
- package/dist/types/interfaces/api/meta.js +3 -0
- package/dist/types/interfaces/api/meta.js.map +1 -0
- package/dist/types/interfaces/{migrations.d.ts → api/migrations.d.ts} +0 -0
- package/dist/types/interfaces/{migrations.js → api/migrations.js} +0 -0
- package/dist/types/interfaces/api/migrations.js.map +1 -0
- package/dist/types/interfaces/api/read-events.d.ts +24 -0
- package/dist/types/interfaces/api/read-events.js +3 -0
- package/dist/types/interfaces/api/read-events.js.map +1 -0
- package/dist/types/interfaces/{rule-groups.d.ts → api/rule-groups.d.ts} +2 -2
- package/dist/types/interfaces/{rule-groups.js → api/rule-groups.js} +0 -0
- package/dist/types/interfaces/api/rule-groups.js.map +1 -0
- package/dist/types/interfaces/api/session-events.d.ts +24 -0
- package/dist/types/interfaces/api/session-events.js +3 -0
- package/dist/types/interfaces/api/session-events.js.map +1 -0
- package/dist/types/interfaces/api/sessions.d.ts +157 -0
- package/dist/types/interfaces/{sessions.js → api/sessions.js} +0 -0
- package/dist/types/interfaces/api/sessions.js.map +1 -0
- package/dist/types/interfaces/{settings.d.ts → api/settings.d.ts} +2 -2
- package/dist/types/interfaces/{settings.js → api/settings.js} +0 -0
- package/dist/types/interfaces/api/settings.js.map +1 -0
- package/package.json +1 -1
- package/dist/types/constants/index.js.map +0 -1
- package/dist/types/interfaces/canned-messages.js.map +0 -1
- package/dist/types/interfaces/conferences.js.map +0 -1
- package/dist/types/interfaces/event-templates.js.map +0 -1
- package/dist/types/interfaces/filters.js.map +0 -1
- package/dist/types/interfaces/index.types.js.map +0 -1
- package/dist/types/interfaces/migrations.js.map +0 -1
- package/dist/types/interfaces/rule-groups.js.map +0 -1
- package/dist/types/interfaces/sessions.d.ts +0 -18
- package/dist/types/interfaces/sessions.js.map +0 -1
- package/dist/types/interfaces/settings.js.map +0 -1
|
@@ -3,6 +3,11 @@ export declare enum AGENT_STATUS {
|
|
|
3
3
|
BUSY = "BUSY",
|
|
4
4
|
OFFLINE = "OFFLINE"
|
|
5
5
|
}
|
|
6
|
+
export declare enum SESSION_STATUS {
|
|
7
|
+
CLAIMED = "CLAIMED",
|
|
8
|
+
ONGOING = "ONGOING",
|
|
9
|
+
CLOSED = "CLOSED"
|
|
10
|
+
}
|
|
6
11
|
export declare enum CALL_MEMBER_STATUS {
|
|
7
12
|
JOINED = "JOINED",
|
|
8
13
|
CONNECTED = "CONNECTED",
|
|
@@ -1,12 +1,18 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.APP_ERROR_TYPE = exports.CALL_MEMBER_TYPE = exports.CALL_MEMBER_STATUS = exports.AGENT_STATUS = void 0;
|
|
3
|
+
exports.APP_ERROR_TYPE = exports.CALL_MEMBER_TYPE = exports.CALL_MEMBER_STATUS = exports.SESSION_STATUS = 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 SESSION_STATUS;
|
|
11
|
+
(function (SESSION_STATUS) {
|
|
12
|
+
SESSION_STATUS["CLAIMED"] = "CLAIMED";
|
|
13
|
+
SESSION_STATUS["ONGOING"] = "ONGOING";
|
|
14
|
+
SESSION_STATUS["CLOSED"] = "CLOSED";
|
|
15
|
+
})(SESSION_STATUS = exports.SESSION_STATUS || (exports.SESSION_STATUS = {}));
|
|
10
16
|
var CALL_MEMBER_STATUS;
|
|
11
17
|
(function (CALL_MEMBER_STATUS) {
|
|
12
18
|
CALL_MEMBER_STATUS["JOINED"] = "JOINED";
|
|
@@ -39,4 +45,4 @@ var APP_ERROR_TYPE;
|
|
|
39
45
|
APP_ERROR_TYPE["MIGRATION_CONFLICT"] = "migrations-already-running";
|
|
40
46
|
APP_ERROR_TYPE["MIGRATION_DATA_COPY"] = "migration-data-copy";
|
|
41
47
|
})(APP_ERROR_TYPE = exports.APP_ERROR_TYPE || (exports.APP_ERROR_TYPE = {}));
|
|
42
|
-
//# sourceMappingURL=
|
|
48
|
+
//# sourceMappingURL=api.js.map
|
|
@@ -0,0 +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,CAAA;IACvB,2CAAqB,CAAA;IACrB,yCAAmB,CAAA;IACnB,qCAAe,CAAA;IACf,qCAAe,CAAA;IACf,mCAAa,CAAA;IACb,qDAA+B,CAAA;IAC/B,mDAA6B,CAAA;IAC7B,yCAAmB,CAAA;AACrB,CAAC,EAbW,kBAAkB,GAAlB,0BAAkB,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"}
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
export * from './constants';
|
|
2
|
-
export * from './interfaces/
|
|
1
|
+
export * from './constants/api';
|
|
2
|
+
export * from './interfaces/api';
|
|
@@ -14,6 +14,6 @@ var __exportStar = (this && this.__exportStar) || function(m, exports) {
|
|
|
14
14
|
for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
|
|
15
15
|
};
|
|
16
16
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
17
|
-
__exportStar(require("./constants"), exports);
|
|
18
|
-
__exportStar(require("./interfaces/
|
|
17
|
+
__exportStar(require("./constants/api"), exports);
|
|
18
|
+
__exportStar(require("./interfaces/api"), exports);
|
|
19
19
|
//# sourceMappingURL=index.types.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.types.js","sourceRoot":"","sources":["../../src/index.types.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;AAAA,
|
|
1
|
+
{"version":3,"file":"index.types.js","sourceRoot":"","sources":["../../src/index.types.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;AAAA,kDAAgC;AAChC,mDAAiC"}
|
|
File without changes
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"agents.js","sourceRoot":"","sources":["
|
|
1
|
+
{"version":3,"file":"agents.js","sourceRoot":"","sources":["../../../../src/interfaces/api/agents.ts"],"names":[],"mappings":""}
|
|
@@ -1,12 +1,12 @@
|
|
|
1
1
|
import { ITargetAccountId, ITargetUserId, ITimestamps } from './common';
|
|
2
|
-
export interface
|
|
2
|
+
export interface ICannedMessage extends ITimestamps {
|
|
3
3
|
readonly id: string;
|
|
4
4
|
readonly category: string;
|
|
5
5
|
readonly text: string;
|
|
6
|
-
readonly userId
|
|
7
|
-
readonly label
|
|
8
|
-
readonly ruleTags
|
|
9
|
-
readonly attachments
|
|
6
|
+
readonly userId: string;
|
|
7
|
+
readonly label: string;
|
|
8
|
+
readonly ruleTags: string[];
|
|
9
|
+
readonly attachments: ICannedMessageAttachment[];
|
|
10
10
|
}
|
|
11
11
|
export interface ICannedMessageAttachment {
|
|
12
12
|
readonly key: string;
|
|
@@ -18,14 +18,14 @@ export interface IGetCannedMessagesQuery extends ITargetAccountId, ITargetUserId
|
|
|
18
18
|
readonly ignoreRuleTags?: boolean;
|
|
19
19
|
}
|
|
20
20
|
export interface IGetCannedMessagesResponse {
|
|
21
|
-
readonly data:
|
|
21
|
+
readonly data: ICannedMessage[];
|
|
22
22
|
}
|
|
23
23
|
export interface ICreateCannedMessageQuery extends ITargetAccountId, ITargetUserId {
|
|
24
24
|
readonly isCommon?: boolean;
|
|
25
25
|
}
|
|
26
|
-
export declare type ICreateCannedMessageBody = Pick<
|
|
26
|
+
export declare type ICreateCannedMessageBody = Pick<ICannedMessage, 'category' | 'text'> & Pick<Partial<ICannedMessage>, 'label' | 'ruleTags' | 'attachments'>;
|
|
27
27
|
export declare type IUpdateCannedMessageQuery = ITargetAccountId;
|
|
28
|
-
export declare type IUpdateCannedMessageBody = Pick<
|
|
28
|
+
export declare type IUpdateCannedMessageBody = Pick<ICannedMessage, 'id'> & Omit<Partial<ICannedMessage>, 'id' | 'userId'>;
|
|
29
29
|
export interface IDeleteCannedMessageQuery {
|
|
30
30
|
readonly id: string;
|
|
31
31
|
}
|
|
File without changes
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"canned-messages.js","sourceRoot":"","sources":["../../../../src/interfaces/api/canned-messages.ts"],"names":[],"mappings":""}
|
|
@@ -15,3 +15,10 @@ export interface ITargetAccountId {
|
|
|
15
15
|
export interface ITargetUserId {
|
|
16
16
|
readonly agentId?: string;
|
|
17
17
|
}
|
|
18
|
+
export interface IPageOptions {
|
|
19
|
+
readonly gt?: string;
|
|
20
|
+
readonly gte?: string;
|
|
21
|
+
readonly lt?: string;
|
|
22
|
+
readonly lte?: string;
|
|
23
|
+
readonly uniqueId?: string;
|
|
24
|
+
}
|
|
File without changes
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"common.js","sourceRoot":"","sources":["
|
|
1
|
+
{"version":3,"file":"common.js","sourceRoot":"","sources":["../../../../src/interfaces/api/common.ts"],"names":[],"mappings":""}
|
|
@@ -1,13 +1,13 @@
|
|
|
1
1
|
import { ITargetAccountId } from './common';
|
|
2
|
-
import { CALL_MEMBER_STATUS, CALL_MEMBER_TYPE } from '
|
|
3
|
-
export interface
|
|
2
|
+
import { CALL_MEMBER_STATUS, CALL_MEMBER_TYPE } from '@/constants/api';
|
|
3
|
+
export interface IConferenceMember {
|
|
4
4
|
readonly hitlSessionId: string;
|
|
5
5
|
readonly memberId: string;
|
|
6
6
|
readonly identifier: string;
|
|
7
7
|
readonly type: CALL_MEMBER_TYPE;
|
|
8
8
|
readonly status: CALL_MEMBER_STATUS;
|
|
9
9
|
readonly state: IConferenceMemberState;
|
|
10
|
-
readonly joinedAt
|
|
10
|
+
readonly joinedAt: Date;
|
|
11
11
|
readonly disconnectedAt?: Date;
|
|
12
12
|
}
|
|
13
13
|
export interface IConferenceMemberState {
|
|
@@ -19,10 +19,10 @@ export interface IGetConferenceMembersQuery extends ITargetAccountId {
|
|
|
19
19
|
readonly memberId?: string;
|
|
20
20
|
}
|
|
21
21
|
export interface IGetConferenceMembersResponse {
|
|
22
|
-
readonly data:
|
|
22
|
+
readonly data: IConferenceMember[];
|
|
23
23
|
}
|
|
24
24
|
export declare type IAddOrUpdateConferenceMemberQuery = ITargetAccountId;
|
|
25
|
-
export declare type IAddOrUpdateConferenceMemberBody = Pick<
|
|
25
|
+
export declare type IAddOrUpdateConferenceMemberBody = Pick<IConferenceMember, 'hitlSessionId' | 'memberId'> & Omit<Partial<IConferenceMember>, 'hitlSessionId' | 'memberId' | 'joinedAt'>;
|
|
26
26
|
export interface ICleanUpConferenceQuery extends ITargetAccountId {
|
|
27
27
|
readonly memberId?: string;
|
|
28
28
|
readonly hitlSessionId?: string;
|
|
File without changes
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"conferences.js","sourceRoot":"","sources":["../../../../src/interfaces/api/conferences.ts"],"names":[],"mappings":""}
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { ITargetAccountId } from './common';
|
|
2
|
-
export interface
|
|
2
|
+
export interface IEventTemplate {
|
|
3
3
|
readonly templateId: string;
|
|
4
4
|
readonly eventType: string;
|
|
5
5
|
readonly rule: string;
|
|
@@ -17,7 +17,7 @@ export interface IGetEventTemplatesQuery extends ITargetAccountId {
|
|
|
17
17
|
readonly templateId?: string;
|
|
18
18
|
}
|
|
19
19
|
export interface IGetEventTemplatesResponse {
|
|
20
|
-
readonly data:
|
|
20
|
+
readonly data: IEventTemplate[];
|
|
21
21
|
}
|
|
22
22
|
export declare type ICreateEventTemplateQuery = ITargetAccountId;
|
|
23
23
|
export interface ICreateEventTemplateBody {
|
|
File without changes
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"event-templates.js","sourceRoot":"","sources":["../../../../src/interfaces/api/event-templates.ts"],"names":[],"mappings":""}
|
|
@@ -1,22 +1,22 @@
|
|
|
1
1
|
import { JSONType, ITimestamps, ITargetAccountId, ITargetUserId } from './common';
|
|
2
|
-
export interface
|
|
2
|
+
export interface IFilter<T = JSONType> extends ITimestamps {
|
|
3
3
|
readonly id: string;
|
|
4
|
-
readonly userId
|
|
4
|
+
readonly userId: string;
|
|
5
5
|
readonly name: string;
|
|
6
6
|
readonly settings: T;
|
|
7
7
|
readonly order: number;
|
|
8
|
-
readonly isDefault
|
|
8
|
+
readonly isDefault: boolean;
|
|
9
9
|
}
|
|
10
10
|
export interface IGetFiltersQuery extends ITargetAccountId, ITargetUserId {
|
|
11
11
|
readonly id?: string;
|
|
12
12
|
}
|
|
13
13
|
export interface IGetFiltersResponse {
|
|
14
|
-
readonly data:
|
|
14
|
+
readonly data: IFilter[];
|
|
15
15
|
}
|
|
16
16
|
export interface ICreateFilterQuery extends ITargetAccountId, ITargetUserId {
|
|
17
17
|
readonly isCommon?: boolean;
|
|
18
18
|
}
|
|
19
|
-
export declare type ICreateFilterBody = Pick<
|
|
19
|
+
export declare type ICreateFilterBody = Pick<IFilter, 'name' | 'settings' | 'order' | 'isDefault'>;
|
|
20
20
|
export declare type IUpdateFilterQuery = ITargetAccountId;
|
|
21
21
|
export interface IUpdateFilterBody extends Partial<ICreateFilterBody> {
|
|
22
22
|
readonly id: string;
|
|
File without changes
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"filters.js","sourceRoot":"","sources":["../../../../src/interfaces/api/filters.ts"],"names":[],"mappings":""}
|
|
@@ -1,7 +1,3 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* TODO: Right now only includes types for available features.
|
|
3
|
-
* Should be removed later, when all features are enabled.
|
|
4
|
-
*/
|
|
5
1
|
export * from './common';
|
|
6
2
|
export * as Settings from './settings';
|
|
7
3
|
export * as Migrations from './migrations';
|
|
@@ -11,4 +7,8 @@ export * as EventTemplates from './event-templates';
|
|
|
11
7
|
export * as Conferences from './conferences';
|
|
12
8
|
export * as Filters from './filters';
|
|
13
9
|
export * as CannedMessages from './canned-messages';
|
|
10
|
+
export * as Listeners from './listeners';
|
|
14
11
|
export * as Sessions from './sessions';
|
|
12
|
+
export * as SessionEvents from './session-events';
|
|
13
|
+
export * as ReadEvents from './read-events';
|
|
14
|
+
export * as Meta from './meta';
|
|
@@ -26,11 +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.Sessions = exports.CannedMessages = exports.Filters = exports.Conferences = exports.EventTemplates = exports.RuleGroups = exports.Agents = exports.Migrations = exports.Settings = void 0;
|
|
30
|
-
/**
|
|
31
|
-
* TODO: Right now only includes types for available features.
|
|
32
|
-
* Should be removed later, when all features are enabled.
|
|
33
|
-
*/
|
|
29
|
+
exports.Meta = 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;
|
|
34
30
|
__exportStar(require("./common"), exports);
|
|
35
31
|
exports.Settings = __importStar(require("./settings"));
|
|
36
32
|
exports.Migrations = __importStar(require("./migrations"));
|
|
@@ -40,5 +36,9 @@ exports.EventTemplates = __importStar(require("./event-templates"));
|
|
|
40
36
|
exports.Conferences = __importStar(require("./conferences"));
|
|
41
37
|
exports.Filters = __importStar(require("./filters"));
|
|
42
38
|
exports.CannedMessages = __importStar(require("./canned-messages"));
|
|
39
|
+
exports.Listeners = __importStar(require("./listeners"));
|
|
43
40
|
exports.Sessions = __importStar(require("./sessions"));
|
|
44
|
-
|
|
41
|
+
exports.SessionEvents = __importStar(require("./session-events"));
|
|
42
|
+
exports.ReadEvents = __importStar(require("./read-events"));
|
|
43
|
+
exports.Meta = __importStar(require("./meta"));
|
|
44
|
+
//# sourceMappingURL=index.js.map
|
|
@@ -0,0 +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,+CAA+B"}
|
|
@@ -0,0 +1,37 @@
|
|
|
1
|
+
import { ChannelType } from '@onereach/orbes/services/channels/channel';
|
|
2
|
+
import { ITargetAccountId, ITargetUserId, ITimestamps } from './common';
|
|
3
|
+
export interface IListener extends ITimestamps {
|
|
4
|
+
readonly callbackId: string;
|
|
5
|
+
readonly callback: IListenerCallback;
|
|
6
|
+
readonly hitlSessionIds: string[];
|
|
7
|
+
readonly type: CALLBACK_TYPE;
|
|
8
|
+
readonly userId: string;
|
|
9
|
+
readonly version: string;
|
|
10
|
+
}
|
|
11
|
+
/** Implicitly inherits ChannelTarget interface from Orbes */
|
|
12
|
+
export interface IListenerCallback {
|
|
13
|
+
readonly type: ChannelType;
|
|
14
|
+
readonly expire?: number;
|
|
15
|
+
readonly name?: string;
|
|
16
|
+
readonly v: 0;
|
|
17
|
+
readonly appId?: string;
|
|
18
|
+
readonly deviceId?: number | string;
|
|
19
|
+
}
|
|
20
|
+
export declare enum CALLBACK_TYPE {
|
|
21
|
+
CALLBACK = "callback",
|
|
22
|
+
EVENT = "event",
|
|
23
|
+
APPS = "apps"
|
|
24
|
+
}
|
|
25
|
+
export interface IGetListenersQuery extends ITargetAccountId, ITargetUserId {
|
|
26
|
+
readonly callbackId?: string;
|
|
27
|
+
}
|
|
28
|
+
export interface IGetListenersResponse {
|
|
29
|
+
readonly data: IListener[];
|
|
30
|
+
}
|
|
31
|
+
export declare type ICreateListenerQuery = ITargetAccountId & ITargetUserId;
|
|
32
|
+
export declare type ICreateListenerBody = Pick<IListener, 'callback'> & Pick<Partial<IListener>, 'type' | 'version' | 'hitlSessionIds'>;
|
|
33
|
+
export declare type IUpdateListenerQuery = ITargetAccountId;
|
|
34
|
+
export declare type IUpdateListenerBody = Pick<IListener, 'callbackId' | 'hitlSessionIds'>;
|
|
35
|
+
export interface IDeleteListenerQuery extends ITargetAccountId {
|
|
36
|
+
readonly callbackId: string;
|
|
37
|
+
}
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.CALLBACK_TYPE = void 0;
|
|
4
|
+
var CALLBACK_TYPE;
|
|
5
|
+
(function (CALLBACK_TYPE) {
|
|
6
|
+
CALLBACK_TYPE["CALLBACK"] = "callback";
|
|
7
|
+
CALLBACK_TYPE["EVENT"] = "event";
|
|
8
|
+
CALLBACK_TYPE["APPS"] = "apps";
|
|
9
|
+
})(CALLBACK_TYPE = exports.CALLBACK_TYPE || (exports.CALLBACK_TYPE = {}));
|
|
10
|
+
//# sourceMappingURL=listeners.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"listeners.js","sourceRoot":"","sources":["../../../../src/interfaces/api/listeners.ts"],"names":[],"mappings":";;;AAsBA,IAAY,aAIX;AAJD,WAAY,aAAa;IACvB,sCAAqB,CAAA;IACrB,gCAAe,CAAA;IACf,8BAAa,CAAA;AACf,CAAC,EAJW,aAAa,GAAb,qBAAa,KAAb,qBAAa,QAIxB"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"meta.js","sourceRoot":"","sources":["../../../../src/interfaces/api/meta.ts"],"names":[],"mappings":""}
|
|
File without changes
|
|
File without changes
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"migrations.js","sourceRoot":"","sources":["../../../../src/interfaces/api/migrations.ts"],"names":[],"mappings":""}
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
import { ITargetAccountId, ITargetUserId } from './common';
|
|
2
|
+
export interface IReadEvent {
|
|
3
|
+
readonly userId: string;
|
|
4
|
+
readonly eventId: string;
|
|
5
|
+
readonly eventTimestamp: Date;
|
|
6
|
+
readonly sessionId: string;
|
|
7
|
+
}
|
|
8
|
+
export declare type IGetNewEventsAmountQuery = ITargetAccountId & ITargetUserId;
|
|
9
|
+
export interface IGetNewEventsAmountBody {
|
|
10
|
+
readonly sessionIds: string[];
|
|
11
|
+
}
|
|
12
|
+
export interface IGetNewEventsAmountResponse {
|
|
13
|
+
readonly data: {
|
|
14
|
+
readonly [sessionId: string]: {
|
|
15
|
+
nEvents: number;
|
|
16
|
+
};
|
|
17
|
+
};
|
|
18
|
+
}
|
|
19
|
+
export declare type ISaveLastReadEventQuery = ITargetAccountId & ITargetUserId;
|
|
20
|
+
export interface ISaveLastReadEventBody {
|
|
21
|
+
readonly sessionId: string;
|
|
22
|
+
readonly eventId: string;
|
|
23
|
+
readonly eventTimestamp: string;
|
|
24
|
+
}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"read-events.js","sourceRoot":"","sources":["../../../../src/interfaces/api/read-events.ts"],"names":[],"mappings":""}
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { ITimestamps, ITargetAccountId } from './common';
|
|
2
|
-
export interface
|
|
2
|
+
export interface IRuleGroup extends ITimestamps {
|
|
3
3
|
readonly groupId: string;
|
|
4
4
|
readonly name: string;
|
|
5
5
|
readonly rules: string[];
|
|
@@ -19,7 +19,7 @@ export interface ISearchRuleGroupsBody {
|
|
|
19
19
|
readonly groupIdList?: string[];
|
|
20
20
|
}
|
|
21
21
|
export interface ISearchRuleGroupsResponse {
|
|
22
|
-
readonly data:
|
|
22
|
+
readonly data: IRuleGroup[];
|
|
23
23
|
}
|
|
24
24
|
export declare type ICreateRuleGroupQuery = ITargetAccountId;
|
|
25
25
|
export interface ICreateRuleGroupBody {
|
|
File without changes
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"rule-groups.js","sourceRoot":"","sources":["../../../../src/interfaces/api/rule-groups.ts"],"names":[],"mappings":""}
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
import { ITargetAccountId, JSONType } from './common';
|
|
2
|
+
export interface ISessionEvent {
|
|
3
|
+
readonly eventId: string;
|
|
4
|
+
readonly accountId?: string;
|
|
5
|
+
readonly botId?: string;
|
|
6
|
+
readonly event: string;
|
|
7
|
+
readonly eventCategory: string;
|
|
8
|
+
readonly eventValue: JSONType;
|
|
9
|
+
readonly flowId?: string;
|
|
10
|
+
readonly hitlSessionId: string;
|
|
11
|
+
readonly notify: boolean;
|
|
12
|
+
readonly sessionId?: string;
|
|
13
|
+
readonly stepId?: string;
|
|
14
|
+
readonly tags: JSONType;
|
|
15
|
+
readonly timestamp: Date;
|
|
16
|
+
readonly transactionId?: string;
|
|
17
|
+
readonly version?: number;
|
|
18
|
+
}
|
|
19
|
+
export interface IGetSessionEventsQuery extends ITargetAccountId {
|
|
20
|
+
readonly sessionId: string;
|
|
21
|
+
}
|
|
22
|
+
export interface IGetSessionEventsResponse {
|
|
23
|
+
readonly data: ISessionEvent[];
|
|
24
|
+
}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"session-events.js","sourceRoot":"","sources":["../../../../src/interfaces/api/session-events.ts"],"names":[],"mappings":""}
|
|
@@ -0,0 +1,157 @@
|
|
|
1
|
+
import { ITriggersResponse } from '@onereach/sdk';
|
|
2
|
+
import { JSONType, ITimestamps, ITargetAccountId, ITargetUserId, IPageOptions } from './common';
|
|
3
|
+
import { SESSION_STATUS } from '@/constants/api';
|
|
4
|
+
export interface ISession extends ITimestamps {
|
|
5
|
+
readonly hitlSessionId: string;
|
|
6
|
+
readonly claimedBy: string[];
|
|
7
|
+
readonly claimedByHistory: string[];
|
|
8
|
+
readonly contactId: string;
|
|
9
|
+
readonly closedAt?: Date;
|
|
10
|
+
readonly isArchived: boolean;
|
|
11
|
+
readonly needsAction: boolean;
|
|
12
|
+
readonly needsActionFrom: string[];
|
|
13
|
+
readonly contactVisibilityTags: string[];
|
|
14
|
+
readonly meta?: JSONType;
|
|
15
|
+
readonly transferToBot?: ITransferToBot;
|
|
16
|
+
readonly ruleTags: string[];
|
|
17
|
+
readonly commands: ICommand[];
|
|
18
|
+
readonly status: SESSION_STATUS;
|
|
19
|
+
readonly tags: string[];
|
|
20
|
+
readonly transcripts?: string;
|
|
21
|
+
readonly eventTimestamp?: Date;
|
|
22
|
+
readonly type: string;
|
|
23
|
+
}
|
|
24
|
+
export interface ITransferToBot {
|
|
25
|
+
readonly actions?: string[];
|
|
26
|
+
readonly schema?: JSONType;
|
|
27
|
+
readonly actionLabel?: string;
|
|
28
|
+
}
|
|
29
|
+
export interface ICommand {
|
|
30
|
+
readonly params: ICommandParam[];
|
|
31
|
+
readonly name: string;
|
|
32
|
+
readonly ruleTags: string[];
|
|
33
|
+
readonly allowUnclaimed: boolean;
|
|
34
|
+
}
|
|
35
|
+
interface ICommandParam {
|
|
36
|
+
readonly properties: ICommandParamProperties;
|
|
37
|
+
readonly name: string;
|
|
38
|
+
}
|
|
39
|
+
interface ICommandParamProperties {
|
|
40
|
+
readonly source: string;
|
|
41
|
+
readonly type: string;
|
|
42
|
+
readonly options: string[];
|
|
43
|
+
readonly queryParams: JSONType;
|
|
44
|
+
}
|
|
45
|
+
export interface IGetSessionByIdOptions {
|
|
46
|
+
readonly accountId: string;
|
|
47
|
+
readonly hitlSessionId: string;
|
|
48
|
+
readonly agentId: string;
|
|
49
|
+
readonly projection?: string[];
|
|
50
|
+
}
|
|
51
|
+
export interface IGetSessionsOptions {
|
|
52
|
+
readonly accountId: string;
|
|
53
|
+
readonly agentId: string;
|
|
54
|
+
readonly contactId?: string;
|
|
55
|
+
readonly projection?: string[];
|
|
56
|
+
readonly limit?: number;
|
|
57
|
+
readonly status?: string[];
|
|
58
|
+
readonly order?: string;
|
|
59
|
+
readonly orderBy?: string;
|
|
60
|
+
readonly page?: IPageOptions;
|
|
61
|
+
}
|
|
62
|
+
export declare type IGetSessionsQuery = IGetSessionByIdOptions & IGetSessionsOptions & ITargetAccountId & ITargetUserId;
|
|
63
|
+
export interface IGetSessionsResponse {
|
|
64
|
+
readonly data: ISession[];
|
|
65
|
+
readonly page?: {
|
|
66
|
+
readonly value?: string;
|
|
67
|
+
readonly uniqueId?: string;
|
|
68
|
+
readonly nextId?: string;
|
|
69
|
+
};
|
|
70
|
+
}
|
|
71
|
+
export interface IContactSearchOptions {
|
|
72
|
+
readonly projection?: string[];
|
|
73
|
+
readonly from?: number;
|
|
74
|
+
readonly size?: number;
|
|
75
|
+
readonly sort?: string;
|
|
76
|
+
}
|
|
77
|
+
export interface ISessionSearchOptions {
|
|
78
|
+
readonly projection?: string[];
|
|
79
|
+
readonly limit?: number;
|
|
80
|
+
readonly offset?: number;
|
|
81
|
+
readonly order?: string;
|
|
82
|
+
readonly orderBy?: string;
|
|
83
|
+
readonly page?: {
|
|
84
|
+
readonly nextId?: string;
|
|
85
|
+
};
|
|
86
|
+
}
|
|
87
|
+
export interface IDateRangeOptions {
|
|
88
|
+
readonly from: string;
|
|
89
|
+
readonly to: string;
|
|
90
|
+
}
|
|
91
|
+
export interface ISearchSessionsOptions {
|
|
92
|
+
readonly accountId: string;
|
|
93
|
+
readonly agentId: string;
|
|
94
|
+
readonly dateRange?: IDateRangeOptions;
|
|
95
|
+
readonly claimedBy?: string;
|
|
96
|
+
readonly tags?: string[];
|
|
97
|
+
readonly status?: string[];
|
|
98
|
+
readonly needsAction?: boolean;
|
|
99
|
+
readonly searchPhrase?: string;
|
|
100
|
+
readonly type?: string;
|
|
101
|
+
readonly meta?: Record<string, string>;
|
|
102
|
+
readonly sessionsSearchOptions?: ISessionSearchOptions;
|
|
103
|
+
}
|
|
104
|
+
export declare type ISearchSessionsQuery = ISearchSessionsOptions & ITargetAccountId & ITargetUserId;
|
|
105
|
+
export interface ISearchSessionsWithContactsResponse {
|
|
106
|
+
readonly data: ISession[];
|
|
107
|
+
readonly page?: {
|
|
108
|
+
readonly value?: string;
|
|
109
|
+
readonly uniqueId?: string;
|
|
110
|
+
readonly nextId?: string;
|
|
111
|
+
};
|
|
112
|
+
readonly contacts: {
|
|
113
|
+
data: object[];
|
|
114
|
+
total: number;
|
|
115
|
+
};
|
|
116
|
+
}
|
|
117
|
+
export interface IContactSearchParams {
|
|
118
|
+
readonly name?: string;
|
|
119
|
+
readonly phoneNumbers?: string;
|
|
120
|
+
readonly emails?: string;
|
|
121
|
+
readonly tags?: string[];
|
|
122
|
+
}
|
|
123
|
+
export interface ISearchSessionsWithContactsOptions {
|
|
124
|
+
readonly accountId: string;
|
|
125
|
+
readonly agentId: string;
|
|
126
|
+
readonly contact?: IContactSearchParams;
|
|
127
|
+
readonly dateRange?: IDateRangeOptions;
|
|
128
|
+
readonly searchPhrase?: string;
|
|
129
|
+
readonly tags?: string[];
|
|
130
|
+
readonly sessionsSearchOptions?: ISessionSearchOptions;
|
|
131
|
+
readonly contactsSearchOptions?: IContactSearchOptions;
|
|
132
|
+
}
|
|
133
|
+
export declare type ISearchSessionsWithContactsQuery = ISearchSessionsWithContactsOptions & ITargetAccountId & ITargetUserId;
|
|
134
|
+
export interface IGetQueueSessionOptions {
|
|
135
|
+
readonly accountId: string;
|
|
136
|
+
readonly agentId: string;
|
|
137
|
+
readonly ruleTags?: string[];
|
|
138
|
+
}
|
|
139
|
+
export interface IGetQueueSessionResponse {
|
|
140
|
+
readonly data: ISession | null;
|
|
141
|
+
}
|
|
142
|
+
export declare type IGetQueueSessionQuery = IGetQueueSessionOptions & ITargetAccountId;
|
|
143
|
+
export interface ISessionActionParams {
|
|
144
|
+
readonly sessionId?: string;
|
|
145
|
+
}
|
|
146
|
+
export interface IClaimSessionQuery extends ITargetAccountId {
|
|
147
|
+
readonly claimBy?: string[];
|
|
148
|
+
}
|
|
149
|
+
export interface IClaimSessionBody {
|
|
150
|
+
readonly params?: object;
|
|
151
|
+
}
|
|
152
|
+
export declare type ITransferToBotQuery = ITargetAccountId & ITargetUserId;
|
|
153
|
+
export interface ITransferToBotBody {
|
|
154
|
+
readonly params?: object;
|
|
155
|
+
}
|
|
156
|
+
export declare type IGetInitTriggersResponse = ITriggersResponse[];
|
|
157
|
+
export {};
|
|
File without changes
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"sessions.js","sourceRoot":"","sources":["../../../../src/interfaces/api/sessions.ts"],"names":[],"mappings":""}
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { ITargetAccountId, JSONType } from './common';
|
|
2
|
-
export interface
|
|
2
|
+
export interface ISettings {
|
|
3
3
|
readonly category: string;
|
|
4
4
|
readonly userId: string;
|
|
5
5
|
readonly data: JSONType;
|
|
@@ -12,7 +12,7 @@ export interface IGetSettingsQuery extends IUpdateSettingsQuery {
|
|
|
12
12
|
readonly categories?: string[];
|
|
13
13
|
}
|
|
14
14
|
export interface IGetOrUpdateSettingsResponse {
|
|
15
|
-
readonly data: Record<string,
|
|
15
|
+
readonly data: Record<string, ISettings>;
|
|
16
16
|
}
|
|
17
17
|
/**
|
|
18
18
|
* Multiple categories can be updated or created in a single request
|
|
File without changes
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"settings.js","sourceRoot":"","sources":["../../../../src/interfaces/api/settings.ts"],"names":[],"mappings":""}
|
package/package.json
CHANGED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/constants/index.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,kBAaX;AAbD,WAAY,kBAAkB;IAC5B,uCAAiB,CAAA;IACjB,6CAAuB,CAAA;IACvB,yCAAmB,CAAA;IACnB,6CAAuB,CAAA;IACvB,2CAAqB,CAAA;IACrB,yCAAmB,CAAA;IACnB,qCAAe,CAAA;IACf,qCAAe,CAAA;IACf,mCAAa,CAAA;IACb,qDAA+B,CAAA;IAC/B,mDAA6B,CAAA;IAC7B,yCAAmB,CAAA;AACrB,CAAC,EAbW,kBAAkB,GAAlB,0BAAkB,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"}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"canned-messages.js","sourceRoot":"","sources":["../../../src/interfaces/canned-messages.ts"],"names":[],"mappings":""}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"conferences.js","sourceRoot":"","sources":["../../../src/interfaces/conferences.ts"],"names":[],"mappings":""}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"event-templates.js","sourceRoot":"","sources":["../../../src/interfaces/event-templates.ts"],"names":[],"mappings":""}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"filters.js","sourceRoot":"","sources":["../../../src/interfaces/filters.ts"],"names":[],"mappings":""}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"index.types.js","sourceRoot":"","sources":["../../../src/interfaces/index.types.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA;;;GAGG;AACH,2CAAyB;AACzB,uDAAuC;AACvC,2DAA2C;AAC3C,mDAAmC;AACnC,4DAA4C;AAC5C,oEAAoD;AACpD,6DAA6C;AAC7C,qDAAqC;AACrC,oEAAoD;AACpD,uDAAuC"}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"migrations.js","sourceRoot":"","sources":["../../../src/interfaces/migrations.ts"],"names":[],"mappings":""}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"rule-groups.js","sourceRoot":"","sources":["../../../src/interfaces/rule-groups.ts"],"names":[],"mappings":""}
|
|
@@ -1,18 +0,0 @@
|
|
|
1
|
-
import { ITriggersResponse } from '@onereach/sdk';
|
|
2
|
-
export interface IGetSessionsListQuery {
|
|
3
|
-
readonly status?: string[];
|
|
4
|
-
readonly contactId?: string;
|
|
5
|
-
readonly offset?: number;
|
|
6
|
-
readonly limit?: number;
|
|
7
|
-
readonly orderBy?: string;
|
|
8
|
-
readonly order?: string;
|
|
9
|
-
readonly projection?: string[];
|
|
10
|
-
readonly agentId?: string;
|
|
11
|
-
readonly accountId?: string;
|
|
12
|
-
}
|
|
13
|
-
export interface IGetSessionQuery {
|
|
14
|
-
readonly projection?: string[];
|
|
15
|
-
readonly agentId?: string;
|
|
16
|
-
readonly accountId?: string;
|
|
17
|
-
}
|
|
18
|
-
export declare type IGetInitTriggersResponse = ITriggersResponse[];
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"sessions.js","sourceRoot":"","sources":["../../../src/interfaces/sessions.ts"],"names":[],"mappings":""}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"settings.js","sourceRoot":"","sources":["../../../src/interfaces/settings.ts"],"names":[],"mappings":""}
|