@onereach/types-hitl-api 0.0.44 → 0.0.45-rc.1

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,9 @@
1
1
  import { ITargetAccountId } from './common';
2
2
  export interface ISettings<Data = any> {
3
3
  readonly category: string;
4
+ readonly categoryItemId: string;
4
5
  readonly userId: string;
6
+ readonly ruleTags: string[];
5
7
  readonly data: Data;
6
8
  }
7
9
  export interface IUpdateSettingsQuery extends ITargetAccountId {
@@ -12,12 +14,14 @@ export interface IGetSettingsQuery extends IUpdateSettingsQuery {
12
14
  readonly categories?: string[];
13
15
  }
14
16
  export interface IGetOrUpdateSettingsResponse {
15
- readonly data: Record<string, ISettings>;
17
+ readonly data: Record<string, ISettings | ISettings[]>;
16
18
  }
17
19
  /**
18
20
  * Multiple categories can be updated or created in a single request
19
- * by providing { "avatar": { ... }, "notifications": { ... }, ... }
21
+ * by providing { "avatar": { ... }, "notifications": { ... }, ... } using data
22
+ * or pass array of settings with additional fields categoryItemId and ruleTags using settings
20
23
  */
21
24
  export interface IUpdateSettingsBody<Data = any> {
22
- readonly data: Record<string, Data>;
25
+ readonly settings?: Omit<ISettings<Data>, 'userId'>[];
26
+ readonly data?: Record<string, Data>;
23
27
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@onereach/types-hitl-api",
3
- "version": "0.0.44",
3
+ "version": "0.0.45-rc.1",
4
4
  "author": "OneReach.ai",
5
5
  "main": "dist/types/index.types.js",
6
6
  "types": "dist/types/index.types.d.ts",