itrm-tools 1.3.35 → 1.3.37-beta.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,61 +1,59 @@
|
|
|
1
|
-
import { DefaultSchemaOptions,
|
|
1
|
+
import { DefaultSchemaOptions, Model, MongooseBulkWriteOptions, ObtainDocumentType, ResolveSchemaOptions, SchemaDefinition, SchemaDefinitionType, SchemaOptions, UpdateQuery, UpdateWithAggregationPipeline } from "mongoose";
|
|
2
2
|
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, {}, DefaultSchemaOptions> & {
|
|
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, {}, DefaultSchemaOptions> & {
|
|
11
|
+
_id: import("mongoose").Types.ObjectId;
|
|
12
|
+
} & {
|
|
13
|
+
__v: number;
|
|
14
|
+
} & {
|
|
15
|
+
id: string;
|
|
16
|
+
}) | (import("mongoose").Document<unknown, {}, S, {}, DefaultSchemaOptions> & {
|
|
17
|
+
_id?: unknown;
|
|
18
|
+
} & Required<{
|
|
19
|
+
_id: unknown;
|
|
20
|
+
}> & {
|
|
21
|
+
__v: number;
|
|
22
|
+
}) | (import("mongoose").Document<unknown, {}, S, {}, DefaultSchemaOptions> & {
|
|
11
23
|
_id?: unknown;
|
|
12
24
|
} & Required<{
|
|
13
25
|
_id: unknown;
|
|
14
26
|
}> & {
|
|
15
27
|
__v: number;
|
|
28
|
+
} & {
|
|
29
|
+
id: string;
|
|
16
30
|
})>;
|
|
17
31
|
createMany(data: S[]): Promise<any>;
|
|
18
|
-
exists(filter:
|
|
32
|
+
exists(filter: any): import("mongoose").Query<{
|
|
19
33
|
_id: import("mongodb").InferIdType<S>;
|
|
20
|
-
} | null, import("mongoose").IfAny<S, any, import("mongoose").Document<unknown, {}, S, {},
|
|
21
|
-
__v
|
|
22
|
-
}
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
__v
|
|
27
|
-
}
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
__v?: infer U;
|
|
40
|
-
} ? T_1 : T_1 & {
|
|
41
|
-
__v: number;
|
|
42
|
-
} : never : never)>, {}, S, "find", {}>;
|
|
43
|
-
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 {
|
|
44
|
-
__v?: infer U;
|
|
45
|
-
} ? T : T & {
|
|
46
|
-
__v: number;
|
|
47
|
-
} : 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 {
|
|
48
|
-
__v?: infer U;
|
|
49
|
-
} ? T_1 : T_1 & {
|
|
50
|
-
__v: number;
|
|
51
|
-
} : never : never)>, {}, S, "find", {}>;
|
|
52
|
-
updateOne(filter: FilterQuery<S>, data: UpdateWithAggregationPipeline | UpdateQuery<S>): any;
|
|
34
|
+
} | null, import("mongoose").IfAny<S, any, import("mongoose").Document<unknown, {}, S, {}, DefaultSchemaOptions> & import("mongoose").Require_id<S> & {
|
|
35
|
+
__v: number;
|
|
36
|
+
} & import("mongoose").AddDefaultId<S, {}, DefaultSchemaOptions>>, {}, S, "findOne", {}>;
|
|
37
|
+
find(filter: any): import("mongoose").Query<import("mongoose").IfAny<S, any, import("mongoose").Document<unknown, {}, S, {}, DefaultSchemaOptions> & import("mongoose").Require_id<S> & {
|
|
38
|
+
__v: number;
|
|
39
|
+
} & import("mongoose").AddDefaultId<S, {}, DefaultSchemaOptions>> | null, import("mongoose").IfAny<S, any, import("mongoose").Document<unknown, {}, S, {}, DefaultSchemaOptions> & import("mongoose").Require_id<S> & {
|
|
40
|
+
__v: number;
|
|
41
|
+
} & import("mongoose").AddDefaultId<S, {}, DefaultSchemaOptions>>, {}, S, "findOne", {}>;
|
|
42
|
+
findMany(filter: any): import("mongoose").Query<import("mongoose").IfAny<S, any, import("mongoose").Document<unknown, {}, S, {}, DefaultSchemaOptions> & import("mongoose").Require_id<S> & {
|
|
43
|
+
__v: number;
|
|
44
|
+
} & import("mongoose").AddDefaultId<S, {}, DefaultSchemaOptions>>[], import("mongoose").IfAny<S, any, import("mongoose").Document<unknown, {}, S, {}, DefaultSchemaOptions> & import("mongoose").Require_id<S> & {
|
|
45
|
+
__v: number;
|
|
46
|
+
} & import("mongoose").AddDefaultId<S, {}, DefaultSchemaOptions>>, {}, S, "find", {}>;
|
|
47
|
+
batch(filter: any, from: number, size: number): import("mongoose").Query<import("mongoose").IfAny<S, any, import("mongoose").Document<unknown, {}, S, {}, DefaultSchemaOptions> & import("mongoose").Require_id<S> & {
|
|
48
|
+
__v: number;
|
|
49
|
+
} & import("mongoose").AddDefaultId<S, {}, DefaultSchemaOptions>>[], import("mongoose").IfAny<S, any, import("mongoose").Document<unknown, {}, S, {}, DefaultSchemaOptions> & import("mongoose").Require_id<S> & {
|
|
50
|
+
__v: number;
|
|
51
|
+
} & import("mongoose").AddDefaultId<S, {}, DefaultSchemaOptions>>, {}, S, "find", {}>;
|
|
52
|
+
updateOne(filter: any, data: UpdateWithAggregationPipeline | UpdateQuery<S>): any;
|
|
53
53
|
bulkWrite(writes: any[], options?: MongooseBulkWriteOptions): Promise<any>;
|
|
54
|
-
delete(filter:
|
|
55
|
-
deleteMany(filter:
|
|
56
|
-
countDocuments(filter:
|
|
57
|
-
__v?: infer U;
|
|
58
|
-
} ? T : T & {
|
|
54
|
+
delete(filter: any): any;
|
|
55
|
+
deleteMany(filter: any): any;
|
|
56
|
+
countDocuments(filter: any): import("mongoose").Query<number, import("mongoose").IfAny<S, any, import("mongoose").Document<unknown, {}, S, {}, DefaultSchemaOptions> & import("mongoose").Require_id<S> & {
|
|
59
57
|
__v: number;
|
|
60
|
-
}
|
|
58
|
+
} & import("mongoose").AddDefaultId<S, {}, DefaultSchemaOptions>>, {}, S, "countDocuments", {}>;
|
|
61
59
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"MongooseModelManager.js","sourceRoot":"","sources":["../../../src/database/mongoose/MongooseModelManager.ts"],"names":[],"mappings":";;;AAAA,
|
|
1
|
+
{"version":3,"file":"MongooseModelManager.js","sourceRoot":"","sources":["../../../src/database/mongoose/MongooseModelManager.ts"],"names":[],"mappings":";;;AAAA,uCAA6O;AAE7O,MAAa,oBAAoB;IACtB,UAAU,CAAS;IAChB,KAAK,CAAW;IAE1B,YAAY,UAAkB,EAAE,UAAwG,EAAE,OAAmD;QACzL,IAAI,CAAC,UAAU,GAAG,UAAU,CAAC;QAC7B,IAAI,MAAM,GAAG,IAAI,iBAAM,CAAI,UAAU,EAAE,OAAO,CAAC,CAAC;QAChD,IAAI,CAAC,KAAK,GAAG,IAAA,gBAAK,EAAI,UAAU,EAAE,MAAM,CAAC,CAAC;IAC9C,CAAC;IAEM,KAAK,CAAC,MAAM,CAAC,KAAQ;QACxB,IAAI,KAAK,GAAG,MAAM,IAAI,IAAI,CAAC,KAAK,CAAC,KAAK,CAAC,CAAC;QACxC,OAAO,KAAK,CAAC,IAAI,EAAE,CAAC;IACxB,CAAC;IAEM,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AC;IACzC,CAAC;IAEM,cAAc,CAAC,MAAW;QAC7B,OAAO,IAAI,CAAC,KAAK,CAAC,cAAc,CAAC,MAAM,CAAC,CAAC;IAC7C,CAAC;CACJ;AA9DD,oDA8DC"}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "itrm-tools",
|
|
3
|
-
"version": "1.3.
|
|
3
|
+
"version": "1.3.37-beta.1",
|
|
4
4
|
"description": "",
|
|
5
5
|
"main": "dist/index.js",
|
|
6
6
|
"types": "dist/index.d.ts",
|
|
@@ -41,15 +41,15 @@
|
|
|
41
41
|
"@types/jsrsasign": "^10.5.15",
|
|
42
42
|
"@types/morgan": "^1.9.10",
|
|
43
43
|
"@types/multer": "^2.0.0",
|
|
44
|
-
"@types/node": "^
|
|
44
|
+
"@types/node": "^25.2.0",
|
|
45
45
|
"@types/swagger-ui-express": "^4.1.8",
|
|
46
46
|
"@types/uuid": "^10.0.0",
|
|
47
47
|
"@types/ws": "^8.18.1",
|
|
48
48
|
"axios-mock-adapter": "^2.1.0",
|
|
49
49
|
"jest": "^30.2.0",
|
|
50
50
|
"jest-puppeteer": "^11.0.0",
|
|
51
|
-
"mongodb-memory-server": "^
|
|
52
|
-
"puppeteer": "^24.
|
|
51
|
+
"mongodb-memory-server": "^11.0.1",
|
|
52
|
+
"puppeteer": "^24.36.1",
|
|
53
53
|
"redis": "^5.10.0",
|
|
54
54
|
"rimraf": "^6.1.2",
|
|
55
55
|
"sqlite3": "^5.1.7",
|
|
@@ -57,25 +57,25 @@
|
|
|
57
57
|
"typescript": "^5.9.3"
|
|
58
58
|
},
|
|
59
59
|
"dependencies": {
|
|
60
|
-
"@scalar/express-api-reference": "^0.8.
|
|
60
|
+
"@scalar/express-api-reference": "^0.8.39",
|
|
61
61
|
"@sequelize/core": "^7.0.0-alpha.47",
|
|
62
|
-
"axios": "^1.13.
|
|
62
|
+
"axios": "^1.13.4",
|
|
63
63
|
"axios-retry": "^4.5.0",
|
|
64
64
|
"cookie-parser": "^1.4.7",
|
|
65
|
-
"cors": "^2.8.
|
|
65
|
+
"cors": "^2.8.6",
|
|
66
66
|
"crypto-js": "^4.2.0",
|
|
67
67
|
"express": "^5.2.1",
|
|
68
68
|
"https": "^1.0.0",
|
|
69
69
|
"jose": "^6.1.3",
|
|
70
70
|
"jsrsasign": "^11.1.0",
|
|
71
|
-
"mongoose": "^
|
|
71
|
+
"mongoose": "^9.1.5",
|
|
72
72
|
"morgan": "^1.10.0",
|
|
73
73
|
"multer": "^2.0.1",
|
|
74
|
-
"pg": "^8.
|
|
74
|
+
"pg": "^8.18.0",
|
|
75
75
|
"pg-hstore": "^2.3.4",
|
|
76
76
|
"sequelize": "^6.37.7",
|
|
77
77
|
"swagger-ui-express": "^5.0.1",
|
|
78
78
|
"uuid": "^11.1.0",
|
|
79
|
-
"ws": "^8.
|
|
79
|
+
"ws": "^8.19.0"
|
|
80
80
|
}
|
|
81
81
|
}
|