@vroskus/library-datahandler 1.0.8 → 1.0.9

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/index.d.ts CHANGED
@@ -1,4 +1,4 @@
1
- import { Sequelize } from 'sequelize';
1
+ import { Op, Sequelize } from 'sequelize';
2
2
  import type { $Config, $Include, $QueryParams, $RequestContext, $Where } from './types';
3
3
  import type { $Helpers } from './helpers';
4
4
  type $RequestContextListener = (arg0: $RequestContext) => unknown;
@@ -17,7 +17,7 @@ declare class DatabaseService<C extends $Config, MC extends {
17
17
  models: MC['Classes'];
18
18
  helpers: $Helpers;
19
19
  stack: Sequelize;
20
- Op: object;
20
+ Op: typeof Op;
21
21
  requestContextListener: $RequestContextListener;
22
22
  constructor({ database, dialect, host, logging, password, port, storage, username, }: C, modelShapes: MC['Shapes']);
23
23
  setupTestEnvironment(): Promise<void>;
@@ -91,7 +91,7 @@ declare class DatabaseService<C extends $Config, MC extends {
91
91
  id: string;
92
92
  associationModelName: AM;
93
93
  associationModelId: string;
94
- pivot?: object;
94
+ pivot?: Record<string, unknown>;
95
95
  };
96
96
  }): Promise<MC['Models'][MN]>;
97
97
  removeAssociation<MN extends keyof MC['Config'], AM extends keyof MC['Config']>(request: {
@@ -100,7 +100,7 @@ declare class DatabaseService<C extends $Config, MC extends {
100
100
  id: string;
101
101
  associationModelName: AM;
102
102
  associationModelId: string;
103
- pivot?: object;
103
+ pivot?: Record<string, unknown>;
104
104
  };
105
105
  }): Promise<boolean>;
106
106
  syncAssociations<MN extends keyof MC['Config'], AM extends keyof MC['Config']>(request: {
package/dist/types.d.ts CHANGED
@@ -9,7 +9,7 @@ export type $Config = {
9
9
  username: string;
10
10
  };
11
11
  export type $Where<MCC extends Record<MN, any>, MN extends keyof MCC> = MCC[MN]['ModelQueryParams'] & {
12
- [key: string]: string | Record<string, any> | void;
12
+ [key: string]: string | number | boolean | Record<string, unknown> | void;
13
13
  };
14
14
  type $IncludeInside<MCC extends Record<MN, any>, MCS extends Record<MN, any>, MN extends keyof MCC> = MN | {
15
15
  model: MCS[MN];
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@vroskus/library-datahandler",
3
- "version": "1.0.8",
3
+ "version": "1.0.9",
4
4
  "description": "Data Handler",
5
5
  "author": "Vilius Roškus <vilius@regattas.eu>",
6
6
  "license": "MIT",