@naturalcycles/backend-lib 4.23.3 → 4.23.4

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.
@@ -20,7 +20,7 @@ export declare class HttpDB extends BaseCommonDB implements CommonDB {
20
20
  getByIds<ROW extends ObjectWithId>(table: string, ids: ROW['id'][], opt?: CommonDBOptions): Promise<ROW[]>;
21
21
  runQuery<ROW extends ObjectWithId>(query: DBQuery<ROW>, opt?: CommonDBOptions): Promise<RunQueryResult<ROW>>;
22
22
  runQueryCount<ROW extends ObjectWithId>(query: DBQuery<ROW>, opt?: CommonDBOptions): Promise<number>;
23
- saveBatch<ROW extends Partial<ObjectWithId>>(table: string, rows: ROW[], opt?: CommonDBSaveOptions<ROW>): Promise<void>;
23
+ saveBatch<ROW extends ObjectWithId>(table: string, rows: ROW[], opt?: CommonDBSaveOptions<ROW>): Promise<void>;
24
24
  deleteByIds(table: string, ids: string[], opt?: CommonDBOptions): Promise<number>;
25
25
  deleteByQuery<ROW extends ObjectWithId>(query: DBQuery<ROW>, opt?: CommonDBOptions): Promise<number>;
26
26
  streamQuery<ROW extends ObjectWithId>(_q: DBQuery<ROW>, _opt?: CommonDBStreamOptions): ReadableTyped<ROW>;
@@ -15,7 +15,7 @@ export interface RunQueryInput {
15
15
  export interface SaveBatchInput {
16
16
  table: string;
17
17
  rows: ObjectWithId[];
18
- opt?: CommonDBSaveOptions;
18
+ opt?: CommonDBSaveOptions<any>;
19
19
  }
20
20
  /**
21
21
  * Exposes CommonDB interface from provided CommonDB as HTTP endpoint (Express RequestHandler).
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@naturalcycles/backend-lib",
3
- "version": "4.23.3",
3
+ "version": "4.23.4",
4
4
  "scripts": {
5
5
  "prepare": "husky install",
6
6
  "serve": "APP_ENV=dev nodemon",
package/src/db/httpDB.ts CHANGED
@@ -105,7 +105,7 @@ export class HttpDB extends BaseCommonDB implements CommonDB {
105
105
  })
106
106
  }
107
107
 
108
- override async saveBatch<ROW extends Partial<ObjectWithId>>(
108
+ override async saveBatch<ROW extends ObjectWithId>(
109
109
  table: string,
110
110
  rows: ROW[],
111
111
  opt?: CommonDBSaveOptions<ROW>,
@@ -39,7 +39,7 @@ const runQueryInputSchema = objectSchema<RunQueryInput>({
39
39
  export interface SaveBatchInput {
40
40
  table: string
41
41
  rows: ObjectWithId[]
42
- opt?: CommonDBSaveOptions
42
+ opt?: CommonDBSaveOptions<any>
43
43
  }
44
44
 
45
45
  const saveBatchInputSchema = objectSchema<SaveBatchInput>({