@onereach/types-hitl-api 1.0.10 → 1.0.11-rc.10

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -70,7 +70,6 @@ export declare const BROADCAST_EVENTS: {
70
70
  };
71
71
  export declare const CONTACT_BROADCAST_EVENTS: {
72
72
  DELETE: string;
73
- UPSERT: string;
74
73
  CREATE: string;
75
74
  UPDATE: string;
76
75
  MERGE: string;
@@ -80,7 +80,6 @@ exports.BROADCAST_EVENTS = {
80
80
  };
81
81
  exports.CONTACT_BROADCAST_EVENTS = {
82
82
  DELETE: 'DELETE_CONTACT',
83
- UPSERT: 'UPSERT_CONTACT',
84
83
  CREATE: 'CREATE_CONTACT',
85
84
  UPDATE: 'UPDATE_CONTACT',
86
85
  MERGE: 'MERGE_CONTACTS',
@@ -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,4BAAZ,YAAY,QAIvB;AAED,IAAY,SAMX;AAND,WAAY,SAAS;IACnB,kCAAqB,CAAA;IACrB,4BAAe,CAAA;IACf,0BAAa,CAAA;IACb,4BAAe,CAAA;IACf,wCAA2B,CAAA;AAC7B,CAAC,EANW,SAAS,yBAAT,SAAS,QAMpB;AAED,IAAY,cAIX;AAJD,WAAY,cAAc;IACxB,qCAAmB,CAAA;IACnB,qCAAmB,CAAA;IACnB,mCAAiB,CAAA;AACnB,CAAC,EAJW,cAAc,8BAAd,cAAc,QAIzB;AAED,IAAY,oBAMX;AAND,WAAY,oBAAoB;IAC9B,uCAAe,CAAA;IACf,2CAAmB,CAAA;IACnB,qCAAa,CAAA;IACb,+CAAuB,CAAA;IACvB,uCAAe,CAAA;AACjB,CAAC,EANW,oBAAoB,oCAApB,oBAAoB,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argetAccountId, ITimestamps } from './common';
2
+ export interface IAgentGroup extends ITimestamps {
3
+ readonly id: string;
4
+ readonly name: string;
5
+ readonly meta: object;
6
+ }
7
+ export interface IAgentGroupMember {
8
+ id: string;
9
+ agentGroupId: string;
10
+ agentId: string;
11
+ }
12
+ export interface IAgentGroupWithMembers extends IAgentGroup {
13
+ readonly agentIds: string[];
14
+ }
15
+ export interface IGetAgentGroupQuery extends ITargetAccountId {
16
+ readonly id?: string;
17
+ readonly agentIds?: string[];
18
+ readonly name?: string;
19
+ readonly offset?: number;
20
+ readonly limit?: number;
21
+ readonly orderBy?: string;
22
+ readonly order?: string;
23
+ }
24
+ export interface IGetAgentGroupsResponse {
25
+ readonly data: IAgentGroupWithMembers[];
26
+ }
27
+ export type ICreateAgentGroupQuery = ITargetAccountId;
28
+ export type ICreateAgentGroupBody = Omit<IAgentGroupWithMembers, 'id'>;
29
+ export type IUpdateAgentGroupQuery = ITargetAccountId;
30
+ export interface IPatchGroupMembers {
31
+ readonly addAgentIds?: string[];
32
+ readonly removeAgentIds?: string[];
33
+ }
34
+ export interface IUpdateAgentGroupBody extends IAgentGroup {
35
+ readonly agentIds: string[] | IPatchGroupMembers;
36
+ }
37
+ export interface IDeleteAgentGroupQuery extends ITargetAccountId {
38
+ readonly id: string;
39
+ }
@@ -0,0 +1,3 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ //# sourceMappingURL=agent-groups.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"agent-groups.js","sourceRoot":"","sources":["../../../../src/interfaces/api/agent-groups.ts"],"names":[],"mappings":""}
@@ -20,3 +20,4 @@ export * as ContactRuleGroups from './contact-rule-groups';
20
20
  export * as SessionRelations from './session-relations';
21
21
  export * as Contacts from './contacts';
22
22
  export * as DraftMessages from './draft-messages';
23
+ export * as AgentGroups from './agent-groups';
@@ -36,7 +36,7 @@ var __importStar = (this && this.__importStar) || (function () {
36
36
  };
37
37
  })();
38
38
  Object.defineProperty(exports, "__esModule", { value: true });
39
- exports.DraftMessages = exports.Contacts = exports.SessionRelations = exports.ContactRuleGroups = exports.Versions = exports.ContactsMeta = exports.Helpers = exports.Tasks = 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;
39
+ exports.AgentGroups = exports.DraftMessages = exports.Contacts = exports.SessionRelations = exports.ContactRuleGroups = exports.Versions = exports.ContactsMeta = exports.Helpers = exports.Tasks = 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;
40
40
  __exportStar(require("./common"), exports);
41
41
  exports.Settings = __importStar(require("./settings"));
42
42
  exports.Migrations = __importStar(require("./migrations"));
@@ -59,4 +59,5 @@ exports.ContactRuleGroups = __importStar(require("./contact-rule-groups"));
59
59
  exports.SessionRelations = __importStar(require("./session-relations"));
60
60
  exports.Contacts = __importStar(require("./contacts"));
61
61
  exports.DraftMessages = __importStar(require("./draft-messages"));
62
+ exports.AgentGroups = __importStar(require("./agent-groups"));
62
63
  //# 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,iDAAiC;AACjC,qDAAqC;AACrC,gEAAgD;AAChD,uDAAuC;AACvC,2EAA2D;AAC3D,wEAAwD;AACxD,uDAAuC;AACvC,kEAAkD"}
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,iDAAiC;AACjC,qDAAqC;AACrC,gEAAgD;AAChD,uDAAuC;AACvC,2EAA2D;AAC3D,wEAAwD;AACxD,uDAAuC;AACvC,kEAAkD;AAClD,8DAA8C"}
@@ -4,6 +4,8 @@ export interface ISession<Meta = any> extends ITimestamps {
4
4
  readonly hitlSessionId: string;
5
5
  readonly claimedBy: string[];
6
6
  readonly claimedByHistory: string[];
7
+ readonly claimedByGroups: string[];
8
+ readonly claimedByGroupAgents: string[];
7
9
  readonly contactId: string;
8
10
  readonly closedAt?: Date | null;
9
11
  readonly isArchived: boolean;
@@ -119,6 +121,7 @@ export interface ISearchSessionsOptions {
119
121
  readonly dateRange?: IDateRangeOptions;
120
122
  readonly claimedBy?: string;
121
123
  readonly claimedByHistory?: string;
124
+ readonly claimedByGroups?: string;
122
125
  readonly tags?: string[] | ITagsQuery;
123
126
  readonly status?: string[];
124
127
  readonly needsAction?: boolean;
@@ -146,7 +149,9 @@ export interface ISessionSearchGroupedByContactsOptions {
146
149
  export interface ISearchSessionsGroupedByContactsOptions {
147
150
  readonly accountId: string;
148
151
  readonly agentId: string;
152
+ readonly claimedByGroupsAnyOf?: string[];
149
153
  readonly claimedBy?: string[];
154
+ readonly claimedByAnyOf?: string[];
150
155
  readonly tags?: string[] | ITagsQuery;
151
156
  readonly needsAction?: boolean;
152
157
  readonly type?: string;
@@ -213,6 +218,7 @@ export interface ITriggersResponse {
213
218
  export type IGetInitTriggersResponse = ITriggersResponse[];
214
219
  export interface IClaimSessionQuery extends ITargetAccountId {
215
220
  readonly claimBy?: string[];
221
+ readonly claimByGroups?: string[];
216
222
  }
217
223
  export interface IClaimSessionBody {
218
224
  readonly params?: object;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@onereach/types-hitl-api",
3
- "version": "1.0.10",
3
+ "version": "1.0.11-rc.10",
4
4
  "author": "OneReach.ai",
5
5
  "main": "dist/types/index.types.js",
6
6
  "types": "dist/types/index.types.d.ts",