@onereach/types-hitl-api 0.0.41-rc.5 → 0.0.41

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.
@@ -1,7 +1,3 @@
1
- export declare type JSONProperty = string | boolean | number | null;
2
- export declare type JSONType = JSONType[] | {
3
- [key: string]: JSONProperty | JSONType;
4
- };
5
1
  export interface ITimestamps {
6
2
  readonly createdAt?: Date;
7
3
  readonly updatedAt?: Date;
@@ -1,5 +1,5 @@
1
- import { JSONType, ITimestamps, ITargetAccountId, ITargetUserId } from './common';
2
- export interface IFilter<T = JSONType> extends ITimestamps {
1
+ import { ITimestamps, ITargetAccountId, ITargetUserId } from './common';
2
+ export interface IFilter<T = any> extends ITimestamps {
3
3
  readonly id: string;
4
4
  readonly userId: string;
5
5
  readonly name: string;
@@ -1,17 +1,17 @@
1
- import { ITargetAccountId, ISessionId, ICommonArrayResponse, JSONType } from './common';
1
+ import { ITargetAccountId, ISessionId, ICommonArrayResponse } from './common';
2
2
  export interface ISessionEvent {
3
3
  readonly eventId: string;
4
4
  readonly accountId?: string;
5
5
  readonly botId?: string;
6
6
  readonly event: string;
7
7
  readonly eventCategory: string;
8
- readonly eventValue: JSONType;
8
+ readonly eventValue: any;
9
9
  readonly flowId?: string;
10
10
  readonly hitlSessionId: string;
11
11
  readonly notify: boolean;
12
12
  readonly sessionId?: string;
13
13
  readonly stepId?: string;
14
- readonly tags: JSONType;
14
+ readonly tags: any;
15
15
  readonly timestamp: Date;
16
16
  readonly transactionId?: string;
17
17
  readonly version?: number;
@@ -1,7 +1,7 @@
1
1
  import { ITriggersResponse } from '@onereach/sdk';
2
- import { ITimestamps, ITargetAccountId, ITargetUserId, IPageOptions, JSONType } from './common';
2
+ import { ITimestamps, ITargetAccountId, ITargetUserId, IPageOptions } from './common';
3
3
  import { SESSION_STATUS } from '@/constants/api';
4
- export interface ISession extends ITimestamps {
4
+ export interface ISession<Meta = any> extends ITimestamps {
5
5
  readonly hitlSessionId: string;
6
6
  readonly claimedBy: string[];
7
7
  readonly claimedByHistory: string[];
@@ -11,7 +11,7 @@ export interface ISession extends ITimestamps {
11
11
  readonly needsAction: boolean;
12
12
  readonly needsActionFrom: string[];
13
13
  readonly contactVisibilityTags: string[];
14
- readonly meta?: JSONType;
14
+ readonly meta?: Meta;
15
15
  readonly transferToBot?: ITransferToBot;
16
16
  readonly ruleTags: string[];
17
17
  readonly commands: ICommand[];
@@ -23,7 +23,7 @@ export interface ISession extends ITimestamps {
23
23
  }
24
24
  export interface ITransferToBot {
25
25
  readonly actions?: string[];
26
- readonly schema?: JSONType;
26
+ readonly schema?: any;
27
27
  readonly actionLabel?: string;
28
28
  }
29
29
  export interface ICommand {
@@ -41,7 +41,7 @@ export interface ICommandParamProperties {
41
41
  readonly source: string;
42
42
  readonly type: string;
43
43
  readonly options: string[];
44
- readonly queryParams: JSONType;
44
+ readonly queryParams: any;
45
45
  }
46
46
  export interface IGetSessionByIdOptions {
47
47
  readonly accountId: string;
@@ -154,8 +154,8 @@ export declare type ITransferToBotQuery = ITargetAccountId & ITargetUserId;
154
154
  export interface ITransferToBotBody {
155
155
  readonly params?: object;
156
156
  }
157
- export interface IUpdateSessionBody {
158
- readonly meta?: JSONType;
157
+ export interface IUpdateSessionBody<Meta = any> {
158
+ readonly meta?: Meta;
159
159
  readonly tags?: string[];
160
160
  readonly contactId?: string;
161
161
  }
@@ -166,3 +166,4 @@ export interface IInitConversationQuery extends ITargetAccountId {
166
166
  export interface IInitConversationBody {
167
167
  readonly params?: object;
168
168
  }
169
+ export { ITriggersResponse };
@@ -1,3 +1,6 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.ITriggersResponse = void 0;
4
+ const sdk_1 = require("@onereach/sdk");
5
+ Object.defineProperty(exports, "ITriggersResponse", { enumerable: true, get: function () { return sdk_1.ITriggersResponse; } });
3
6
  //# sourceMappingURL=sessions.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"sessions.js","sourceRoot":"","sources":["../../../../src/interfaces/api/sessions.ts"],"names":[],"mappings":""}
1
+ {"version":3,"file":"sessions.js","sourceRoot":"","sources":["../../../../src/interfaces/api/sessions.ts"],"names":[],"mappings":";;;AAAA,uCAAkD;AAgNzC,kGAhNA,uBAAiB,OAgNA"}
@@ -1,8 +1,8 @@
1
- import { ITargetAccountId, JSONType } from './common';
2
- export interface ISettings {
1
+ import { ITargetAccountId } from './common';
2
+ export interface ISettings<Data = any> {
3
3
  readonly category: string;
4
4
  readonly userId: string;
5
- readonly data: JSONType;
5
+ readonly data: Data;
6
6
  }
7
7
  export interface IUpdateSettingsQuery extends ITargetAccountId {
8
8
  readonly isCommon?: boolean;
@@ -18,6 +18,6 @@ export interface IGetOrUpdateSettingsResponse {
18
18
  * Multiple categories can be updated or created in a single request
19
19
  * by providing { "avatar": { ... }, "notifications": { ... }, ... }
20
20
  */
21
- export interface IUpdateSettingsBody {
22
- readonly data: Record<string, JSONType>;
21
+ export interface IUpdateSettingsBody<Data = any> {
22
+ readonly data: Record<string, Data>;
23
23
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@onereach/types-hitl-api",
3
- "version": "0.0.41-rc.5",
3
+ "version": "0.0.41",
4
4
  "author": "OneReach.ai",
5
5
  "main": "dist/types/index.types.js",
6
6
  "types": "dist/types/index.types.d.ts",