itrm-tools 1.3.5-viio.1 → 1.3.5-viio.3

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.
@@ -3,11 +3,11 @@ export declare class MongooseModelManager<S> {
3
3
  collection: string;
4
4
  protected model: Model<S>;
5
5
  constructor(collection: string, definition: ObtainDocumentType<any, S, DefaultSchemaOptions> | SchemaDefinition<SchemaDefinitionType<S>>, options?: SchemaOptions | ResolveSchemaOptions<any>);
6
- create(datum: S): Promise<(import("mongoose").Document<unknown, {}, S, {}> & {
6
+ create(datum: S): Promise<(import("mongoose").Document<unknown, {}, S, {}, {}> & {
7
7
  _id: import("mongoose").Types.ObjectId;
8
8
  } & {
9
9
  __v: number;
10
- }) | (import("mongoose").Document<unknown, {}, S, {}> & {
10
+ }) | (import("mongoose").Document<unknown, {}, S, {}, {}> & {
11
11
  _id?: unknown;
12
12
  } & Required<{
13
13
  _id: unknown;
@@ -15,15 +15,41 @@ export declare class MongooseModelManager<S> {
15
15
  __v: number;
16
16
  })>;
17
17
  createMany(data: S[]): Promise<any>;
18
- exists(filter: FilterQuery<S>): import("mongoose").Query<{
19
- _id: import("mongoose").InferId<S>;
20
- } | null, import("mongoose").IfAny<S, any, import("mongoose").Document<unknown, {}, S, {}> & import("mongoose").Default__v<import("mongoose").Require_id<S>>>, {}, S, "findOne", {}>;
21
- find(filter: FilterQuery<S>): import("mongoose").Query<import("mongoose").IfAny<S, any, import("mongoose").Document<unknown, {}, S, {}> & import("mongoose").Default__v<import("mongoose").Require_id<S>>> | null, import("mongoose").IfAny<S, any, import("mongoose").Document<unknown, {}, S, {}> & import("mongoose").Default__v<import("mongoose").Require_id<S>>>, {}, S, "findOne", {}>;
22
- findMany(filter: FilterQuery<S>): import("mongoose").Query<import("mongoose").IfAny<S, any, import("mongoose").Document<unknown, {}, S, {}> & import("mongoose").Default__v<import("mongoose").Require_id<S>>>[], import("mongoose").IfAny<S, any, import("mongoose").Document<unknown, {}, S, {}> & import("mongoose").Default__v<import("mongoose").Require_id<S>>>, {}, S, "find", {}>;
23
- batch(filter: FilterQuery<S>, from: number, size: number): import("mongoose").Query<import("mongoose").IfAny<S, any, import("mongoose").Document<unknown, {}, S, {}> & import("mongoose").Default__v<import("mongoose").Require_id<S>>>[], import("mongoose").IfAny<S, any, import("mongoose").Document<unknown, {}, S, {}> & import("mongoose").Default__v<import("mongoose").Require_id<S>>>, {}, S, "find", {}>;
18
+ exists(filter: FilterQuery<S>): any;
19
+ find(filter: FilterQuery<S>): import("mongoose").Query<import("mongoose").IfAny<S, any, import("mongoose").Document<unknown, {}, S, {}, {}> & (import("mongoose").Require_id<S> extends infer T ? T extends import("mongoose").Require_id<S> ? T extends {
20
+ __v?: infer U;
21
+ } ? T : T & {
22
+ __v: number;
23
+ } : never : never)> | null, import("mongoose").IfAny<S, any, import("mongoose").Document<unknown, {}, S, {}, {}> & (import("mongoose").Require_id<S> extends infer T_1 ? T_1 extends import("mongoose").Require_id<S> ? T_1 extends {
24
+ __v?: infer U;
25
+ } ? T_1 : T_1 & {
26
+ __v: number;
27
+ } : never : never)>, {}, S, "findOne", {}>;
28
+ findMany(filter: FilterQuery<S>): import("mongoose").Query<import("mongoose").IfAny<S, any, import("mongoose").Document<unknown, {}, S, {}, {}> & (import("mongoose").Require_id<S> extends infer T ? T extends import("mongoose").Require_id<S> ? T extends {
29
+ __v?: infer U;
30
+ } ? T : T & {
31
+ __v: number;
32
+ } : never : never)>[], import("mongoose").IfAny<S, any, import("mongoose").Document<unknown, {}, S, {}, {}> & (import("mongoose").Require_id<S> extends infer T_1 ? T_1 extends import("mongoose").Require_id<S> ? T_1 extends {
33
+ __v?: infer U;
34
+ } ? T_1 : T_1 & {
35
+ __v: number;
36
+ } : never : never)>, {}, S, "find", {}>;
37
+ batch(filter: FilterQuery<S>, from: number, size: number): import("mongoose").Query<import("mongoose").IfAny<S, any, import("mongoose").Document<unknown, {}, S, {}, {}> & (import("mongoose").Require_id<S> extends infer T ? T extends import("mongoose").Require_id<S> ? T extends {
38
+ __v?: infer U;
39
+ } ? T : T & {
40
+ __v: number;
41
+ } : never : never)>[], import("mongoose").IfAny<S, any, import("mongoose").Document<unknown, {}, S, {}, {}> & (import("mongoose").Require_id<S> extends infer T_1 ? T_1 extends import("mongoose").Require_id<S> ? T_1 extends {
42
+ __v?: infer U;
43
+ } ? T_1 : T_1 & {
44
+ __v: number;
45
+ } : never : never)>, {}, S, "find", {}>;
24
46
  updateOne(filter: FilterQuery<S>, data: UpdateWithAggregationPipeline | UpdateQuery<S>): any;
25
47
  bulkWrite(writes: any[], options?: MongooseBulkWriteOptions): Promise<any>;
26
48
  delete(filter: FilterQuery<S>): any;
27
49
  deleteMany(filter: FilterQuery<S>): any;
28
- countDocuments(filter: FilterQuery<S>): import("mongoose").Query<number, import("mongoose").IfAny<S, any, import("mongoose").Document<unknown, {}, S, {}> & import("mongoose").Default__v<import("mongoose").Require_id<S>>>, {}, S, "countDocuments", {}>;
50
+ countDocuments(filter: FilterQuery<S>): import("mongoose").Query<number, import("mongoose").IfAny<S, any, import("mongoose").Document<unknown, {}, S, {}, {}> & (import("mongoose").Require_id<S> extends infer T ? T extends import("mongoose").Require_id<S> ? T extends {
51
+ __v?: infer U;
52
+ } ? T : T & {
53
+ __v: number;
54
+ } : never : never)>, {}, S, "countDocuments", {}>;
29
55
  }
package/package.json CHANGED
@@ -1,9 +1,8 @@
1
1
  {
2
2
  "name": "itrm-tools",
3
- "version": "1.3.5-viio.1",
3
+ "version": "1.3.5-viio.3",
4
4
  "main": "dist/index.js",
5
5
  "types": "dist/index.d.ts",
6
-
7
6
  "scripts": {
8
7
  "build": "rimraf ./dist && tsc",
9
8
  "publish-lib": "npm run build && npm publish",
@@ -16,52 +15,84 @@
16
15
  "test-watch-start": "jest --watch --runInBand --detectOpenHandles",
17
16
  "test-coverage": "npm run build && jest --runInBand --detectOpenHandles --silent --coverage"
18
17
  },
19
-
20
18
  "dependencies": {
21
- "@types/express": "^5.0.3",
22
19
  "@types/cors": "^2.8.19",
23
- "@types/multer": "^2.0.0",
20
+ "@types/morgan": "^1.9.10",
24
21
  "@types/ws": "^8.18.1",
25
-
26
- "express": "^5.1.0",
27
- "cors": "^2.8.5",
28
- "multer": "^2.0.1",
29
- "ws": "^8.18.3",
30
-
31
- "@sequelize/core": "^7.0.0-alpha.43",
32
- "axios": "^1.11.0",
22
+ "axios": "^1.12.2",
33
23
  "axios-retry": "^4.5.0",
24
+ "cors": "^2.8.5",
34
25
  "crypto-js": "^4.2.0",
35
26
  "https": "^1.0.0",
36
- "mongoose": "^8.18.0",
37
- "morgan": "^1.10.0",
27
+ "morgan": "^1.10.1",
28
+ "swagger-ui-express": "^5.0.1",
29
+ "ws": "^8.18.3"
30
+ },
31
+ "peerDependencies": {
32
+ "@sequelize/core": "^7.0.0-alpha.46",
33
+ "@types/express": "^5.0.3",
34
+ "express": "^5.1.0",
35
+ "mongodb": "^6.19.0",
36
+ "mongoose": "^8.18.1",
37
+ "multer": "^2.0.2",
38
38
  "pg": "^8.16.3",
39
39
  "pg-hstore": "^2.3.4",
40
- "sequelize": "^6.37.7",
41
- "swagger-ui-express": "^5.0.1"
40
+ "sequelize": "^6.37.7"
41
+ },
42
+ "peerDependenciesMeta": {
43
+ "@types/express": {
44
+ "optional": false
45
+ },
46
+ "multer": {
47
+ "optional": true
48
+ },
49
+ "sequelize": {
50
+ "optional": true
51
+ },
52
+ "pg": {
53
+ "optional": true
54
+ },
55
+ "pg-hstore": {
56
+ "optional": true
57
+ },
58
+ "@sequelize/core": {
59
+ "optional": true
60
+ },
61
+ "mongoose": {
62
+ "optional": true
63
+ },
64
+ "mongodb": {
65
+ "optional": true
66
+ }
42
67
  },
43
-
44
68
  "devDependencies": {
45
- "@sequelize/sqlite3": "^7.0.0-alpha.43",
69
+ "@sequelize/sqlite3": "^7.0.0-alpha.46",
46
70
  "@types/crypto-js": "^4.2.2",
71
+ "@types/express": "^5.0.3",
47
72
  "@types/jest": "^30.0.0",
48
- "@types/morgan": "^1.9.10",
49
- "@types/node": "^24.3.0",
73
+ "@types/multer": "^2.0.0",
74
+ "@types/node": "^24.4.0",
50
75
  "@types/swagger-ui-express": "^4.1.8",
51
76
  "@types/uuid": "^10.0.0",
52
77
  "axios-mock-adapter": "^2.1.0",
53
- "jest": "^30.1.2",
78
+ "express": "^5.1.0",
79
+ "jest": "^30.1.3",
54
80
  "jest-puppeteer": "^11.0.0",
81
+ "mongodb": "^6.19.0",
55
82
  "mongodb-memory-server": "^10.2.0",
56
- "puppeteer": "^24.18.0",
83
+ "mongoose": "^8.18.1",
84
+ "multer": "^2.0.2",
85
+ "pg": "^8.16.3",
86
+ "pg-hstore": "^2.3.4",
87
+ "puppeteer": "^24.21.0",
57
88
  "redis": "^5.8.2",
58
89
  "rimraf": "^6.0.1",
90
+ "sequelize": "^6.37.7",
59
91
  "sqlite3": "^5.1.7",
60
92
  "ts-jest": "^29.4.1",
61
93
  "typescript": "^5.9.2",
62
- "uuid": "^11.1.0"
94
+ "uuid": "^13.0.0"
63
95
  },
64
-
65
96
  "engines": {
66
97
  "node": ">=18"
67
98
  }
@@ -27,7 +27,7 @@ export class MongooseModelManager<S> {
27
27
  return this.model.bulkWrite(writes);
28
28
  }
29
29
 
30
- public exists(filter: FilterQuery<S>) {
30
+ public exists(filter: FilterQuery<S>): any {
31
31
  return this.model.exists(filter);
32
32
  }
33
33
 
@@ -46,7 +46,7 @@ export class MongooseModelManager<S> {
46
46
  public updateOne(filter: FilterQuery<S>, data: UpdateWithAggregationPipeline | UpdateQuery<S>): any {
47
47
  return this.model.updateOne(filter, data);
48
48
  }
49
-
49
+
50
50
  public bulkWrite(writes: any[], options?: MongooseBulkWriteOptions): Promise<any> {
51
51
  return this.model.bulkWrite(writes, options);
52
52
  }
@@ -62,4 +62,4 @@ export class MongooseModelManager<S> {
62
62
  public countDocuments(filter: FilterQuery<S>) {
63
63
  return this.model.countDocuments(filter);
64
64
  }
65
- }
65
+ }