@onereach/types-hitl-api 0.0.1-rc.1 → 0.0.2-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.
package/dist/types/common.d.ts
CHANGED
|
@@ -2,3 +2,10 @@ export declare type JSONProperty = string | boolean | number | null;
|
|
|
2
2
|
export declare type JSONType = JSONType[] | {
|
|
3
3
|
[key: string]: JSONProperty | JSONType;
|
|
4
4
|
};
|
|
5
|
+
export interface IDefaultPrimaryKey {
|
|
6
|
+
readonly id: string;
|
|
7
|
+
}
|
|
8
|
+
export interface ITimestamps {
|
|
9
|
+
readonly createdAt: string;
|
|
10
|
+
readonly updatedAt: string;
|
|
11
|
+
}
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
export interface IMigration {
|
|
2
|
+
readonly file: string;
|
|
3
|
+
}
|
|
4
|
+
export interface IMigrationResult {
|
|
5
|
+
readonly migrations: IMigration[];
|
|
6
|
+
readonly method: 'up' | 'down';
|
|
7
|
+
}
|
|
8
|
+
export interface IRunMigrationsQuery {
|
|
9
|
+
readonly name?: string;
|
|
10
|
+
}
|
|
11
|
+
export interface IGetMigrationsResponse {
|
|
12
|
+
readonly executed: IMigration[];
|
|
13
|
+
readonly pending: IMigration[];
|
|
14
|
+
}
|
package/dist/types/settings.d.ts
CHANGED
|
@@ -1,18 +1,24 @@
|
|
|
1
1
|
import { JSONType } from './common';
|
|
2
|
-
export interface
|
|
3
|
-
|
|
4
|
-
readonly
|
|
5
|
-
readonly
|
|
6
|
-
readonly accountId?: string;
|
|
2
|
+
export interface ISettingsModel {
|
|
3
|
+
readonly category: string;
|
|
4
|
+
readonly userId: string;
|
|
5
|
+
readonly data: JSONType;
|
|
7
6
|
}
|
|
8
7
|
export interface IUpdateSettingsQuery {
|
|
9
8
|
readonly isCommon?: boolean;
|
|
10
9
|
readonly accountId?: string;
|
|
11
10
|
}
|
|
11
|
+
export interface IGetSettingsQuery extends IUpdateSettingsQuery {
|
|
12
|
+
/** Skip this argument to return all saved settings */
|
|
13
|
+
readonly categories?: string[];
|
|
14
|
+
}
|
|
15
|
+
export interface IGetOrUpdateSettingsResponse {
|
|
16
|
+
readonly data: Record<string, ISettingsModel>;
|
|
17
|
+
}
|
|
12
18
|
/**
|
|
13
19
|
* Multiple categories can be updated or created in a single request
|
|
14
20
|
* by providing { "avatar": { ... }, "notifications": { ... }, ... }
|
|
15
21
|
*/
|
|
16
22
|
export interface IUpdateSettingsBody {
|
|
17
|
-
readonly data: Record<string, JSONType
|
|
23
|
+
readonly data: Record<string, JSONType>;
|
|
18
24
|
}
|