@point-hub/papi 0.6.5 → 0.7.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/lib/index.js +57395 -58080
- package/lib/src/app.d.ts.map +1 -1
- package/lib/src/base-usecase.d.ts.map +1 -1
- package/lib/src/console/commands/make-command/index.command.d.ts.map +1 -1
- package/lib/src/console/commands/make-middleware/index.command.d.ts.map +1 -1
- package/lib/src/console/index.d.ts.map +1 -1
- package/lib/src/database/mongodb/mongo-error-handler.d.ts +51 -0
- package/lib/src/database/mongodb/mongo-error-handler.d.ts.map +1 -0
- package/lib/src/database/mongodb/mongo-error-handler.spec.d.ts +2 -0
- package/lib/src/database/mongodb/mongo-error-handler.spec.d.ts.map +1 -0
- package/lib/src/database/mongodb/mongo-query-builder.utils.d.ts +483 -0
- package/lib/src/database/mongodb/mongo-query-builder.utils.d.ts.map +1 -0
- package/lib/src/database/mongodb/mongo-query-builder.utils.spec.d.ts +2 -0
- package/lib/src/database/mongodb/mongo-query-builder.utils.spec.d.ts.map +1 -0
- package/lib/src/database/mongodb/mongo-test.service.d.ts +109 -0
- package/lib/src/database/mongodb/mongo-test.service.d.ts.map +1 -0
- package/lib/src/database/mongodb/mongo-test.service.spec.d.ts +2 -0
- package/lib/src/database/mongodb/mongo-test.service.spec.d.ts.map +1 -0
- package/lib/src/database/mongodb/mongo.service.d.ts +264 -0
- package/lib/src/database/mongodb/mongo.service.d.ts.map +1 -0
- package/lib/src/database/mongodb/mongo.service.spec.d.ts +2 -0
- package/lib/src/database/mongodb/mongo.service.spec.d.ts.map +1 -0
- package/lib/src/index.d.ts +7 -33
- package/lib/src/index.d.ts.map +1 -1
- package/lib/src/interfaces/types.d.ts +14 -60
- package/lib/src/interfaces/types.d.ts.map +1 -1
- package/lib/src/server.d.ts.map +1 -1
- package/lib/stub/middleware/configurable.middleware.d.ts +3 -0
- package/lib/stub/middleware/configurable.middleware.d.ts.map +1 -0
- package/lib/stub/middleware/configurable.spec.d.ts +2 -0
- package/lib/stub/middleware/configurable.spec.d.ts.map +1 -0
- package/lib/stub/middleware/new.middleware.d.ts +3 -0
- package/lib/stub/middleware/new.middleware.d.ts.map +1 -0
- package/lib/stub/middleware/new.spec.d.ts +2 -0
- package/lib/stub/middleware/new.spec.d.ts.map +1 -0
- package/package.json +9 -9
- package/stub/middleware/configurable.middleware.ts +7 -0
- package/stub/middleware/configurable.spec.ts +13 -0
- package/stub/middleware/new.middleware.ts +5 -0
- package/stub/middleware/new.spec.ts +13 -0
- package/lib/src/database/connection.d.ts +0 -37
- package/lib/src/database/connection.d.ts.map +0 -1
- package/lib/src/database/mongodb/connection.d.ts +0 -43
- package/lib/src/database/mongodb/connection.d.ts.map +0 -1
- package/lib/src/database/mongodb/mongodb-compose.d.ts +0 -23
- package/lib/src/database/mongodb/mongodb-compose.d.ts.map +0 -1
- package/lib/src/database/mongodb/mongodb-compose.spec.d.ts +0 -2
- package/lib/src/database/mongodb/mongodb-compose.spec.d.ts.map +0 -1
- package/lib/src/database/mongodb/mongodb-error-handler.d.ts +0 -10
- package/lib/src/database/mongodb/mongodb-error-handler.d.ts.map +0 -1
- package/lib/src/database/mongodb/mongodb-helper.d.ts +0 -79
- package/lib/src/database/mongodb/mongodb-helper.d.ts.map +0 -1
- package/lib/src/database/mongodb/mongodb-helper.spec.d.ts +0 -2
- package/lib/src/database/mongodb/mongodb-helper.spec.d.ts.map +0 -1
- package/lib/src/database/mongodb/mongodb-query-filters.d.ts +0 -101
- package/lib/src/database/mongodb/mongodb-query-filters.d.ts.map +0 -1
- package/lib/src/database/mongodb/mongodb-query-filters.spec.d.ts +0 -2
- package/lib/src/database/mongodb/mongodb-query-filters.spec.d.ts.map +0 -1
- package/lib/src/database/mongodb/mongodb-querystring.d.ts +0 -93
- package/lib/src/database/mongodb/mongodb-querystring.d.ts.map +0 -1
- package/lib/src/database/mongodb/mongodb-querystring.spec.d.ts +0 -2
- package/lib/src/database/mongodb/mongodb-querystring.spec.d.ts.map +0 -1
- package/lib/src/middleware/mongodb-error-handler.middleware.d.ts +0 -3
- package/lib/src/middleware/mongodb-error-handler.middleware.d.ts.map +0 -1
- package/lib/src/test/utils.d.ts +0 -13
- package/lib/src/test/utils.d.ts.map +0 -1
|
@@ -0,0 +1,109 @@
|
|
|
1
|
+
import type { ISchema } from '../../interfaces/types';
|
|
2
|
+
/**
|
|
3
|
+
* Provides utilities for managing a MongoDB database during tests.
|
|
4
|
+
*
|
|
5
|
+
* Handles database connections, collection creation, schema validation,
|
|
6
|
+
* index creation, and database cleanup.
|
|
7
|
+
*
|
|
8
|
+
* @example
|
|
9
|
+
* ```ts
|
|
10
|
+
* const database = new MongoTestService(process.env.MONGO_URI!, 'api_test')
|
|
11
|
+
*
|
|
12
|
+
* await database.open()
|
|
13
|
+
*
|
|
14
|
+
* try {
|
|
15
|
+
* await database.createCollections(listSchema)
|
|
16
|
+
* // Run tests
|
|
17
|
+
* } finally {
|
|
18
|
+
* await database.close()
|
|
19
|
+
* }
|
|
20
|
+
* ```
|
|
21
|
+
*/
|
|
22
|
+
export declare class MongoTestService {
|
|
23
|
+
private mongoClient;
|
|
24
|
+
private mongoService;
|
|
25
|
+
private db;
|
|
26
|
+
/**
|
|
27
|
+
* Creates a MongoDB test service.
|
|
28
|
+
*
|
|
29
|
+
* Initializes the MongoDB client and database reference.
|
|
30
|
+
* The connection is not established until {@link open} is called.
|
|
31
|
+
*
|
|
32
|
+
* @param uri - MongoDB connection URI.
|
|
33
|
+
* @param name - Name of the test database.
|
|
34
|
+
*/
|
|
35
|
+
constructor(uri: string, name: string);
|
|
36
|
+
/**
|
|
37
|
+
* Establishes a connection to MongoDB.
|
|
38
|
+
*
|
|
39
|
+
* @returns A promise that resolves when the connection is established.
|
|
40
|
+
*/
|
|
41
|
+
open(): Promise<void>;
|
|
42
|
+
/**
|
|
43
|
+
* Closes the MongoDB connection.
|
|
44
|
+
*
|
|
45
|
+
* @returns A promise that resolves when the connection is closed.
|
|
46
|
+
*/
|
|
47
|
+
close(): Promise<void>;
|
|
48
|
+
/**
|
|
49
|
+
* Creates collections defined in the provided schema configuration.
|
|
50
|
+
*
|
|
51
|
+
* For each collection, this method:
|
|
52
|
+
* - Creates the collection if it does not exist.
|
|
53
|
+
* - Applies the collection's JSON schema validation.
|
|
54
|
+
* - Creates unique indexes.
|
|
55
|
+
* - Creates unique sparse indexes for fields that may be missing or null.
|
|
56
|
+
*
|
|
57
|
+
* Existing collections are not dropped or recreated.
|
|
58
|
+
*
|
|
59
|
+
* @param listSchema - Grouped collection schema configurations.
|
|
60
|
+
* @returns A promise that resolves when all collections and indexes are configured.
|
|
61
|
+
*
|
|
62
|
+
* @example
|
|
63
|
+
* ```ts
|
|
64
|
+
* await database.createCollections(listSchema)
|
|
65
|
+
* ```
|
|
66
|
+
*/
|
|
67
|
+
createCollections(listSchema: ISchema[][]): Promise<void>;
|
|
68
|
+
/**
|
|
69
|
+
* Drops the entire test database, including all its collections and indexes.
|
|
70
|
+
*
|
|
71
|
+
* Use this when a complete database cleanup is required.
|
|
72
|
+
*
|
|
73
|
+
* @returns A promise that resolves when the database has been dropped.
|
|
74
|
+
*
|
|
75
|
+
* @example
|
|
76
|
+
* ```ts
|
|
77
|
+
* await database.dropDatabase()
|
|
78
|
+
* ```
|
|
79
|
+
*/
|
|
80
|
+
dropDatabase(): Promise<void>;
|
|
81
|
+
/**
|
|
82
|
+
* Drops every collection in the test database.
|
|
83
|
+
*
|
|
84
|
+
* Unlike {@link dropDatabase}, this keeps the database itself.
|
|
85
|
+
*
|
|
86
|
+
* @returns A promise that resolves when all collections have been dropped.
|
|
87
|
+
*
|
|
88
|
+
* @example
|
|
89
|
+
* ```ts
|
|
90
|
+
* await database.dropAllCollections()
|
|
91
|
+
* ```
|
|
92
|
+
*/
|
|
93
|
+
dropAllCollections(): Promise<void>;
|
|
94
|
+
/**
|
|
95
|
+
* Removes all documents from every collection in the test database.
|
|
96
|
+
*
|
|
97
|
+
* Collections, indexes, and schema validation rules are preserved.
|
|
98
|
+
*
|
|
99
|
+
* @returns A promise that resolves when all collections have been cleared.
|
|
100
|
+
*
|
|
101
|
+
* @example
|
|
102
|
+
* ```ts
|
|
103
|
+
* // Clear test data before each test.
|
|
104
|
+
* await database.reset()
|
|
105
|
+
* ```
|
|
106
|
+
*/
|
|
107
|
+
reset(): Promise<void>;
|
|
108
|
+
}
|
|
109
|
+
//# sourceMappingURL=mongo-test.service.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"mongo-test.service.d.ts","sourceRoot":"","sources":["../../../../src/database/mongodb/mongo-test.service.ts"],"names":[],"mappings":"AAEA,OAAO,KAAK,EAAE,OAAO,EAAE,MAAM,wBAAwB,CAAC;AAItD;;;;;;;;;;;;;;;;;;;GAmBG;AACH,qBAAa,gBAAgB;IAC3B,OAAO,CAAC,WAAW,CAAc;IACjC,OAAO,CAAC,YAAY,CAAe;IACnC,OAAO,CAAC,EAAE,CAAK;IAEf;;;;;;;;OAQG;gBACS,GAAG,EAAE,MAAM,EAAE,IAAI,EAAE,MAAM;IAWrC;;;;OAIG;IACU,IAAI,IAAI,OAAO,CAAC,IAAI,CAAC;IAIlC;;;;OAIG;IACU,KAAK,IAAI,OAAO,CAAC,IAAI,CAAC;IAInC;;;;;;;;;;;;;;;;;;OAkBG;IACU,iBAAiB,CAAC,UAAU,EAAE,OAAO,EAAE,EAAE,GAAG,OAAO,CAAC,IAAI,CAAC;IAkCtE;;;;;;;;;;;OAWG;IACU,YAAY,IAAI,OAAO,CAAC,IAAI,CAAC;IAI1C;;;;;;;;;;;OAWG;IACU,kBAAkB,IAAI,OAAO,CAAC,IAAI,CAAC;IAShD;;;;;;;;;;;;OAYG;IACU,KAAK,IAAI,OAAO,CAAC,IAAI,CAAC;CAOpC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"mongo-test.service.spec.d.ts","sourceRoot":"","sources":["../../../../src/database/mongodb/mongo-test.service.spec.ts"],"names":[],"mappings":""}
|
|
@@ -0,0 +1,264 @@
|
|
|
1
|
+
import { type AggregateOptions, type CreateIndexesOptions, type Db, type Document, type IndexSpecification } from 'mongodb';
|
|
2
|
+
import { type IPagination } from '../../index';
|
|
3
|
+
/**
|
|
4
|
+
* Represents the result of a paginated MongoDB query.
|
|
5
|
+
*
|
|
6
|
+
* @typeParam T - The document structure returned by the query.
|
|
7
|
+
*/
|
|
8
|
+
interface IRetrievePaginated<T> {
|
|
9
|
+
/** The documents retrieved for the current page. */
|
|
10
|
+
data: T[];
|
|
11
|
+
/** Pagination metadata, including page count and total documents. */
|
|
12
|
+
pagination: IPagination;
|
|
13
|
+
}
|
|
14
|
+
/**
|
|
15
|
+
* Options for retrieving paginated MongoDB documents.
|
|
16
|
+
*/
|
|
17
|
+
export interface IRetrievePaginatedOptions {
|
|
18
|
+
/** The page number to retrieve. */
|
|
19
|
+
page?: number;
|
|
20
|
+
/** The maximum number of documents per page. */
|
|
21
|
+
pageSize?: number;
|
|
22
|
+
/**
|
|
23
|
+
* Sort expression using field names.
|
|
24
|
+
* Prefix a field with `-` for descending order.
|
|
25
|
+
*
|
|
26
|
+
* @example
|
|
27
|
+
* '-createdAt'
|
|
28
|
+
* 'name,-createdAt'
|
|
29
|
+
*/
|
|
30
|
+
sort?: string;
|
|
31
|
+
/**
|
|
32
|
+
* Additional aggregation stages appended after pagination.
|
|
33
|
+
*
|
|
34
|
+
* Useful for operations such as `$lookup` or `$project`
|
|
35
|
+
* that should execute after `$skip` and `$limit`.
|
|
36
|
+
*/
|
|
37
|
+
afterPagination?: Document[];
|
|
38
|
+
/** Additional MongoDB aggregation options. */
|
|
39
|
+
aggregateOptions?: AggregateOptions;
|
|
40
|
+
}
|
|
41
|
+
/**
|
|
42
|
+
* Provides methods for managing MongoDB collections, indexes,
|
|
43
|
+
* schema validation, and document retrieval.
|
|
44
|
+
*
|
|
45
|
+
* Supports standard queries and aggregation-based pagination.
|
|
46
|
+
*
|
|
47
|
+
* @see https://www.mongodb.com/docs/drivers/node/current/fundamentals/indexes/
|
|
48
|
+
* @see https://www.mongodb.com/docs/manual/reference/collation/
|
|
49
|
+
* @see https://www.mongodb.com/docs/manual/core/index-sparse/
|
|
50
|
+
* @see https://www.mongodb.com/docs/manual/core/index-partial/
|
|
51
|
+
*/
|
|
52
|
+
export declare class MongoService {
|
|
53
|
+
private db;
|
|
54
|
+
/**
|
|
55
|
+
* Creates a MongoDB service instance.
|
|
56
|
+
*
|
|
57
|
+
* @param db - The MongoDB database instance used by this service.
|
|
58
|
+
*/
|
|
59
|
+
constructor(db: Db);
|
|
60
|
+
/**
|
|
61
|
+
* Creates a unique index on the specified collection.
|
|
62
|
+
*
|
|
63
|
+
* Uses case-insensitive collation to prevent duplicate values
|
|
64
|
+
* that differ only in letter casing.
|
|
65
|
+
*
|
|
66
|
+
* @param collection - The name of the collection to index.
|
|
67
|
+
* @param spec - The index specification containing the fields and sort order.
|
|
68
|
+
*
|
|
69
|
+
* @example
|
|
70
|
+
* // Create a unique index on the name field.
|
|
71
|
+
* await mongoDBService.createUnique('users', {
|
|
72
|
+
* name: 1
|
|
73
|
+
* })
|
|
74
|
+
*
|
|
75
|
+
* @example
|
|
76
|
+
* // Create a compound unique index on firstName and lastName.
|
|
77
|
+
* await mongoDBService.createUnique('users', {
|
|
78
|
+
* firstName: 1,
|
|
79
|
+
* lastName: 1
|
|
80
|
+
* })
|
|
81
|
+
*/
|
|
82
|
+
createUnique(collection: string, spec: IndexSpecification): Promise<void>;
|
|
83
|
+
/**
|
|
84
|
+
* Creates a unique sparse index on the specified collection.
|
|
85
|
+
*
|
|
86
|
+
* Documents that do not contain the indexed field are excluded
|
|
87
|
+
* from the index. Documents containing the indexed field must
|
|
88
|
+
* have unique values.
|
|
89
|
+
*
|
|
90
|
+
* Uses case-insensitive collation.
|
|
91
|
+
*
|
|
92
|
+
* @param collection - The name of the collection to index.
|
|
93
|
+
* @param spec - The index specification containing the fields and sort order.
|
|
94
|
+
*
|
|
95
|
+
* @example
|
|
96
|
+
* // Allow multiple documents without an email field,
|
|
97
|
+
* // but enforce uniqueness when email is present.
|
|
98
|
+
* await mongoDBService.createUniqueIfNotNull('users', {
|
|
99
|
+
* email: 1
|
|
100
|
+
* })
|
|
101
|
+
*/
|
|
102
|
+
createUniqueIfNotNull(collection: string, spec: IndexSpecification): Promise<void>;
|
|
103
|
+
/**
|
|
104
|
+
* Creates an index on the specified collection.
|
|
105
|
+
*
|
|
106
|
+
* Supports standard MongoDB index options, including unique,
|
|
107
|
+
* sparse, partialFilterExpression, and expireAfterSeconds.
|
|
108
|
+
*
|
|
109
|
+
* @param collection - The name of the collection to index.
|
|
110
|
+
* @param spec - The index specification containing the fields and sort order.
|
|
111
|
+
* @param options - Optional MongoDB index creation options.
|
|
112
|
+
*
|
|
113
|
+
* @example
|
|
114
|
+
* // Create a standard index on the createdAt field.
|
|
115
|
+
* await mongoDBService.createIndex('users', {
|
|
116
|
+
* createdAt: -1
|
|
117
|
+
* })
|
|
118
|
+
*
|
|
119
|
+
* @example
|
|
120
|
+
* // Create a partial index for active users.
|
|
121
|
+
* await mongoDBService.createIndex(
|
|
122
|
+
* 'users',
|
|
123
|
+
* { email: 1 },
|
|
124
|
+
* {
|
|
125
|
+
* partialFilterExpression: {
|
|
126
|
+
* status: 'active'
|
|
127
|
+
* }
|
|
128
|
+
* }
|
|
129
|
+
* )
|
|
130
|
+
*/
|
|
131
|
+
createIndex(collection: string, spec: IndexSpecification, options?: CreateIndexesOptions): Promise<void>;
|
|
132
|
+
/**
|
|
133
|
+
* Checks whether a collection exists in the current database.
|
|
134
|
+
*
|
|
135
|
+
* @param name - The name of the collection to check.
|
|
136
|
+
* @returns True if the collection exists; otherwise, false.
|
|
137
|
+
*
|
|
138
|
+
* @example
|
|
139
|
+
* const exists = await mongoDBService.isExists('users')
|
|
140
|
+
*/
|
|
141
|
+
isExists(name: string): Promise<boolean>;
|
|
142
|
+
/**
|
|
143
|
+
* Updates the JSON Schema validator of an existing MongoDB collection.
|
|
144
|
+
*
|
|
145
|
+
* Uses the `collMod` command to modify the collection's validation rules
|
|
146
|
+
* without dropping or recreating the collection.
|
|
147
|
+
*
|
|
148
|
+
* @param name - Name of the collection to update.
|
|
149
|
+
* @param schema - JSON Schema definition used to validate collection documents.
|
|
150
|
+
* @throws {Error} If the database connection is not available.
|
|
151
|
+
*/
|
|
152
|
+
updateSchema(name: string, schema: unknown): Promise<void>;
|
|
153
|
+
/**
|
|
154
|
+
* Retrieves paginated documents from a MongoDB collection using an aggregation pipeline.
|
|
155
|
+
*
|
|
156
|
+
* Executes the aggregation pipeline twice:
|
|
157
|
+
* - The count pipeline calculates the total number of documents matching the pipeline.
|
|
158
|
+
* - The data pipeline retrieves documents for the requested page, applying sorting,
|
|
159
|
+
* skipping, and limiting when applicable.
|
|
160
|
+
*
|
|
161
|
+
* @typeParam T - The expected document structure of the retrieved data.
|
|
162
|
+
*
|
|
163
|
+
* @param collection - The name of the MongoDB collection.
|
|
164
|
+
* @param pipeline - The aggregation pipeline used to filter or transform documents.
|
|
165
|
+
* @param options - Pagination, sorting, and aggregation options.
|
|
166
|
+
*
|
|
167
|
+
* @returns The retrieved documents and pagination metadata.
|
|
168
|
+
*
|
|
169
|
+
* @throws RangeError If the page or page size is invalid.
|
|
170
|
+
*
|
|
171
|
+
* @example
|
|
172
|
+
* // Retrieve the first page of active users, sorted by creation date.
|
|
173
|
+
* const result = await mongoDBService.retrievePaginated<IUser>(
|
|
174
|
+
* 'users',
|
|
175
|
+
* [
|
|
176
|
+
* {
|
|
177
|
+
* $match: {
|
|
178
|
+
* status: 'active',
|
|
179
|
+
* },
|
|
180
|
+
* },
|
|
181
|
+
* ],
|
|
182
|
+
* {
|
|
183
|
+
* page: 1,
|
|
184
|
+
* pageSize: 10,
|
|
185
|
+
* sort: '-createdAt',
|
|
186
|
+
* },
|
|
187
|
+
* );
|
|
188
|
+
*
|
|
189
|
+
* @example
|
|
190
|
+
* // Retrieve users with their associated profiles.
|
|
191
|
+
* const result = await mongoDBService.retrievePaginated<IUser>(
|
|
192
|
+
* 'users',
|
|
193
|
+
* [
|
|
194
|
+
* {
|
|
195
|
+
* $lookup: {
|
|
196
|
+
* from: 'profiles',
|
|
197
|
+
* localField: '_id',
|
|
198
|
+
* foreignField: 'user_id',
|
|
199
|
+
* as: 'profile',
|
|
200
|
+
* },
|
|
201
|
+
* },
|
|
202
|
+
* ],
|
|
203
|
+
* {
|
|
204
|
+
* page: 2,
|
|
205
|
+
* pageSize: 20,
|
|
206
|
+
* },
|
|
207
|
+
* );
|
|
208
|
+
*/
|
|
209
|
+
retrievePaginated<T extends Document>(collection: string, pipeline?: Document[], options?: IRetrievePaginatedOptions): Promise<IRetrievePaginated<T>>;
|
|
210
|
+
/**
|
|
211
|
+
* Retrieves the first document matching an aggregation pipeline.
|
|
212
|
+
*
|
|
213
|
+
* Executes the provided aggregation pipeline and returns the first
|
|
214
|
+
* matching document. Returns `null` if no document is found.
|
|
215
|
+
*
|
|
216
|
+
* @typeParam T - The expected document structure of the retrieved data.
|
|
217
|
+
*
|
|
218
|
+
* @param collection - The name of the MongoDB collection.
|
|
219
|
+
* @param pipeline - The aggregation pipeline used to filter or transform documents.
|
|
220
|
+
* @param options - MongoDB aggregation options.
|
|
221
|
+
*
|
|
222
|
+
* @returns The first matching document, or `null` if no document is found.
|
|
223
|
+
*
|
|
224
|
+
* @example
|
|
225
|
+
* // Retrieve an active user by email.
|
|
226
|
+
* const user = await mongoDBService.retrieveOne<IUser>(
|
|
227
|
+
* 'users',
|
|
228
|
+
* [
|
|
229
|
+
* {
|
|
230
|
+
* $match: {
|
|
231
|
+
* email: 'john@example.com',
|
|
232
|
+
* status: 'active',
|
|
233
|
+
* },
|
|
234
|
+
* },
|
|
235
|
+
* ],
|
|
236
|
+
* {},
|
|
237
|
+
* );
|
|
238
|
+
*
|
|
239
|
+
* @example
|
|
240
|
+
* // Retrieve a user with their associated profile.
|
|
241
|
+
* const user = await mongoDBService.retrieveOne<IUser>(
|
|
242
|
+
* 'users',
|
|
243
|
+
* [
|
|
244
|
+
* {
|
|
245
|
+
* $match: {
|
|
246
|
+
* _id: userId,
|
|
247
|
+
* },
|
|
248
|
+
* },
|
|
249
|
+
* {
|
|
250
|
+
* $lookup: {
|
|
251
|
+
* from: 'profiles',
|
|
252
|
+
* localField: '_id',
|
|
253
|
+
* foreignField: 'user_id',
|
|
254
|
+
* as: 'profile',
|
|
255
|
+
* },
|
|
256
|
+
* },
|
|
257
|
+
* ],
|
|
258
|
+
* {},
|
|
259
|
+
* );
|
|
260
|
+
*/
|
|
261
|
+
retrieveOne<T extends Document>(collection: string, pipeline: Document[] | undefined, options: AggregateOptions): Promise<T | null>;
|
|
262
|
+
}
|
|
263
|
+
export {};
|
|
264
|
+
//# sourceMappingURL=mongo.service.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"mongo.service.d.ts","sourceRoot":"","sources":["../../../../src/database/mongodb/mongo.service.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,KAAK,gBAAgB,EAAE,KAAK,oBAAoB,EAAE,KAAK,EAAE,EAAE,KAAK,QAAQ,EAAE,KAAK,kBAAkB,EAAE,MAAM,SAAS,CAAC;AAE5H,OAAO,EAAE,KAAK,WAAW,EAAqB,MAAM,aAAa,CAAC;AAElE;;;;GAIG;AACH,UAAU,kBAAkB,CAAC,CAAC;IAC5B,oDAAoD;IACpD,IAAI,EAAE,CAAC,EAAE,CAAC;IAEV,qEAAqE;IACrE,UAAU,EAAE,WAAW,CAAC;CACzB;AAED;;GAEG;AACH,MAAM,WAAW,yBAAyB;IACxC,mCAAmC;IACnC,IAAI,CAAC,EAAE,MAAM,CAAC;IAEd,gDAAgD;IAChD,QAAQ,CAAC,EAAE,MAAM,CAAC;IAElB;;;;;;;OAOG;IACH,IAAI,CAAC,EAAE,MAAM,CAAC;IAEd;;;;;OAKG;IACH,eAAe,CAAC,EAAE,QAAQ,EAAE,CAAC;IAE7B,8CAA8C;IAC9C,gBAAgB,CAA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,CAAC,GAAG,IAAI,CAAC;CAQrB"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"mongo.service.spec.d.ts","sourceRoot":"","sources":["../../../../src/database/mongodb/mongo.service.spec.ts"],"names":[],"mappings":""}
|
package/lib/src/index.d.ts
CHANGED
|
@@ -1,49 +1,23 @@
|
|
|
1
|
-
import { BaseCommand } from '@point-hub/express-cli';
|
|
2
1
|
import { ApiError, BaseError, errorHandlerMiddleware, find, invalidPathMiddleware, type TypeCodeStatus } from '@point-hub/express-error-handler';
|
|
3
|
-
import { MongoServerError } from 'mongodb';
|
|
4
|
-
import { ConsoleKernel } from './console';
|
|
5
|
-
import { DatabaseConnection } from './database/connection';
|
|
6
|
-
import { MongoDBConnection } from './database/mongodb/connection';
|
|
7
|
-
import { MongoErrorHandler } from './database/mongodb/mongodb-error-handler';
|
|
8
|
-
import { MongoDBHelper } from './database/mongodb/mongodb-helper';
|
|
9
|
-
import mongodbErrorHandlerMiddleware from './middleware/mongodb-error-handler.middleware';
|
|
10
2
|
export declare const stubDir: string;
|
|
11
3
|
export type { IUseCaseError, IUseCaseOutputFailed, IUseCaseOutputSuccess } from './base-usecase';
|
|
12
4
|
export { BaseUseCase } from './base-usecase';
|
|
13
|
-
export {
|
|
14
|
-
export
|
|
15
|
-
export
|
|
16
|
-
export {
|
|
17
|
-
export {
|
|
18
|
-
export
|
|
19
|
-
export declare const BaseMongoDBConnection: typeof MongoDBConnection;
|
|
20
|
-
export declare const BaseMongoDBHelper: typeof MongoDBHelper;
|
|
21
|
-
export declare const BaseMongoDBQuerystring: {
|
|
22
|
-
page: typeof import("./database/mongodb/mongodb-querystring").page;
|
|
23
|
-
limit: typeof import("./database/mongodb/mongodb-querystring").limit;
|
|
24
|
-
skip: typeof import("./database/mongodb/mongodb-querystring").skip;
|
|
25
|
-
sort: typeof import("./database/mongodb/mongodb-querystring").sort;
|
|
26
|
-
fields: typeof import("./database/mongodb/mongodb-querystring").fields;
|
|
27
|
-
filter: typeof import("./database/mongodb/mongodb-querystring").filter;
|
|
28
|
-
filterExludeFields: typeof import("./database/mongodb/mongodb-querystring").filterExludeFields;
|
|
29
|
-
convertStringToArray: typeof import("./database/mongodb/mongodb-querystring").convertStringToArray;
|
|
30
|
-
convertFieldObject: typeof import("./database/mongodb/mongodb-querystring").convertFieldObject;
|
|
31
|
-
convertSortObject: typeof import("./database/mongodb/mongodb-querystring").convertSortObject;
|
|
32
|
-
};
|
|
33
|
-
export { default as BaseMongoDBQueryFilters } from './database/mongodb/mongodb-query-filters';
|
|
34
|
-
export declare const BaseMongoServerError: typeof MongoServerError;
|
|
35
|
-
export declare const BaseMongoErrorHandler: typeof MongoErrorHandler;
|
|
5
|
+
export { ConsoleKernel } from './console';
|
|
6
|
+
export { BaseCommand, ExpressCli } from '@point-hub/express-cli';
|
|
7
|
+
export { MongoService } from './database/mongodb/mongo.service';
|
|
8
|
+
export { MongoErrorHandler } from './database/mongodb/mongo-error-handler';
|
|
9
|
+
export { default as MongoQueryBuilder } from './database/mongodb/mongo-query-builder.utils';
|
|
10
|
+
export { MongoTestService } from './database/mongodb/mongo-test.service';
|
|
36
11
|
export { default as BaseFactory } from '@point-hub/express-factory';
|
|
37
12
|
export declare const BaseErrorHandler: {
|
|
38
13
|
ApiError: typeof ApiError;
|
|
39
14
|
BaseError: typeof BaseError;
|
|
40
15
|
isTrustedError: (err: Error) => boolean;
|
|
41
16
|
getHttpError: typeof find;
|
|
42
|
-
mongodbErrorHandlerMiddleware: typeof mongodbErrorHandlerMiddleware;
|
|
43
17
|
errorHandlerMiddleware: typeof errorHandlerMiddleware;
|
|
44
18
|
invalidPathMiddleware: typeof invalidPathMiddleware;
|
|
45
19
|
};
|
|
46
20
|
export { Server as BaseServer } from './server';
|
|
47
21
|
export type { TypeCodeStatus };
|
|
48
|
-
export type { IAggregateOutput, IAggregateRepository, IAppInput, IBaseRouterInput,
|
|
22
|
+
export type { IAggregateOutput, IAggregateRepository, IAppInput, IBaseRouterInput, IController, IControllerInput, IControllerOutput, ICreateManyOutput, ICreateManyRepository, ICreateOutput, ICreateRepository, IDeleteManyOutput, IDeleteManyRepository, IDeleteOutput, IDeleteRepository, IDocument, IMakeControllerInput, IMakeMiddlewareInput, IMiddleware, IMiddlewareInput, IMongoDBConfig, IPagination, IPipeline, IQuery, IRetrieveManyOutput, IRetrieveManyRepository, IRetrieveRepository, ISchema, ISchemaValidation, IServerConfig, IUpdateManyOutput, IUpdateManyRepository, IUpdateOutput, IUpdateRepository, } from './interfaces/types';
|
|
49
23
|
//# sourceMappingURL=index.d.ts.map
|
package/lib/src/index.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/index.ts"],"names":[],"mappings":"AAAA,OAAO,
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/index.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,QAAQ,EACR,SAAS,EACT,sBAAsB,EACtB,IAAI,EACJ,qBAAqB,EAErB,KAAK,cAAc,EACpB,MAAM,kCAAkC,CAAC;AAE1C,eAAO,MAAM,OAAO,QAA2C,CAAC;AAEhE,YAAY,EAAE,aAAa,EAAC,oBAAoB,EAAE,qBAAqB,EAAE,MAAM,gBAAgB,CAAC;AAChG,OAAO,EAAE,WAAW,EAAE,MAAM,gBAAgB,CAAC;AAE7C,OAAO,EAAE,aAAa,EAAE,MAAM,WAAW,CAAC;AAC1C,OAAO,EAAE,WAAW,EAAE,UAAU,EAAE,MAAM,wBAAwB,CAAC;AAEjE,OAAO,EAAE,YAAY,EAAE,MAAM,kCAAkC,CAAC;AAChE,OAAO,EAAE,iBAAiB,EAAE,MAAM,wCAAwC,CAAC;AAC3E,OAAO,EAAE,OAAO,IAAI,iBAAiB,EAAE,MAAM,8CAA8C,CAAC;AAC5F,OAAO,EAAE,gBAAgB,EAAE,MAAM,uCAAuC,CAAC;AAEzE,OAAO,EAAE,OAAO,IAAI,WAAW,EAAE,MAAM,4BAA4B,CAAC;AAEpE,eAAO,MAAM,gBAAgB;;;;;;;CAO5B,CAAC;AAEF,OAAO,EAAE,MAAM,IAAI,UAAU,EAAE,MAAM,UAAU,CAAC;AAEhD,YAAY,EAAE,cAAc,EAAE,CAAC;AAC/B,YAAY,EACV,gBAAgB,EAChB,oBAAoB,EACpB,SAAS,EACT,gBAAgB,EAChB,WAAW,EACX,gBAAgB,EAChB,iBAAiB,EACjB,iBAAiB,EACjB,qBAAqB,EACrB,aAAa,EACb,iBAAiB,EACjB,iBAAiB,EACjB,qBAAqB,EACrB,aAAa,EACb,iBAAiB,EACjB,SAAS,EACT,oBAAoB,EACpB,oBAAoB,EACpB,WAAW,EACX,gBAAgB,EAChB,cAAc,EACd,WAAW,EACX,SAAS,EACT,MAAM,EACN,mBAAmB,EACnB,uBAAuB,EACvB,mBAAmB,EACnB,OAAO,EACP,iBAAiB,EACjB,aAAa,EACb,iBAAiB,EACjB,qBAAqB,EACrB,aAAa,EACb,iBAAiB,GAClB,MAAM,oBAAoB,CAAC"}
|
|
@@ -1,12 +1,13 @@
|
|
|
1
|
-
import type { Request, RequestHandler, Response } from 'express';
|
|
2
|
-
import {
|
|
1
|
+
import type { NextFunction, Request, RequestHandler, Response } from 'express';
|
|
2
|
+
import { MongoClient, ObjectId } from 'mongodb';
|
|
3
3
|
/**
|
|
4
4
|
* Controller
|
|
5
5
|
*/
|
|
6
6
|
export interface IControllerInput {
|
|
7
7
|
req: Request;
|
|
8
8
|
res: Response;
|
|
9
|
-
|
|
9
|
+
next: NextFunction;
|
|
10
|
+
mongoClient: MongoClient;
|
|
10
11
|
}
|
|
11
12
|
export interface IController {
|
|
12
13
|
(input: IControllerInput): Promise<IControllerOutput | void>;
|
|
@@ -22,7 +23,8 @@ export interface IControllerOutput {
|
|
|
22
23
|
export interface IMiddlewareInput {
|
|
23
24
|
req: Request;
|
|
24
25
|
res: Response;
|
|
25
|
-
|
|
26
|
+
next: NextFunction;
|
|
27
|
+
mongoClient: MongoClient;
|
|
26
28
|
}
|
|
27
29
|
export type IAppMiddleware = (input: IMiddlewareInput) => Promise<void> | void;
|
|
28
30
|
export type IMiddleware = RequestHandler | IAppMiddleware;
|
|
@@ -39,28 +41,22 @@ export interface ICreateRepository {
|
|
|
39
41
|
handle(document: IDocument, options?: unknown): Promise<ICreateOutput>;
|
|
40
42
|
}
|
|
41
43
|
export interface IDeleteManyRepository {
|
|
42
|
-
handle(_ids: string[], options?: unknown): Promise<IDeleteManyOutput>;
|
|
44
|
+
handle(_ids: (string | ObjectId)[], options?: unknown): Promise<IDeleteManyOutput>;
|
|
43
45
|
}
|
|
44
46
|
export interface IDeleteRepository {
|
|
45
|
-
handle(_id: string, options?: unknown): Promise<IDeleteOutput>;
|
|
46
|
-
}
|
|
47
|
-
/**
|
|
48
|
-
* @deprecated
|
|
49
|
-
*/
|
|
50
|
-
export interface IRetrieveAllRepository<TData> {
|
|
51
|
-
handle(query: IQuery, options?: unknown): Promise<TData>;
|
|
47
|
+
handle(_id: (string | ObjectId), options?: unknown): Promise<IDeleteOutput>;
|
|
52
48
|
}
|
|
53
49
|
export interface IRetrieveManyRepository<TData> {
|
|
54
50
|
handle(query: IQuery, options?: unknown): Promise<TData>;
|
|
55
51
|
}
|
|
56
52
|
export interface IRetrieveRepository<TOutput extends object> {
|
|
57
|
-
handle(_id: string, options?: unknown): Promise<TOutput>;
|
|
53
|
+
handle(_id: (string | ObjectId), options?: unknown): Promise<TOutput>;
|
|
58
54
|
}
|
|
59
55
|
export interface IUpdateManyRepository {
|
|
60
56
|
handle(filter: IDocument, document: IDocument, options?: unknown): Promise<IUpdateManyOutput>;
|
|
61
57
|
}
|
|
62
58
|
export interface IUpdateRepository {
|
|
63
|
-
handle(_id: string, document: IDocument, options?: unknown): Promise<IUpdateOutput>;
|
|
59
|
+
handle(_id: (string | ObjectId), document: IDocument, options?: unknown): Promise<IUpdateOutput>;
|
|
64
60
|
}
|
|
65
61
|
/**
|
|
66
62
|
* Database
|
|
@@ -105,13 +101,6 @@ export interface IPagination {
|
|
|
105
101
|
page_size: number;
|
|
106
102
|
total_document: number;
|
|
107
103
|
}
|
|
108
|
-
/**
|
|
109
|
-
* @deprecated
|
|
110
|
-
*/
|
|
111
|
-
export interface IRetrieveAllOutput<TData> {
|
|
112
|
-
data: TData[];
|
|
113
|
-
pagination: IPagination;
|
|
114
|
-
}
|
|
115
104
|
export interface IRetrieveManyOutput<TData> {
|
|
116
105
|
data: TData[];
|
|
117
106
|
pagination: IPagination;
|
|
@@ -134,60 +123,25 @@ export interface IAggregateOutput<TData> {
|
|
|
134
123
|
data: TData[];
|
|
135
124
|
pagination: IPagination;
|
|
136
125
|
}
|
|
137
|
-
export interface IClientSession extends ClientSession {
|
|
138
|
-
}
|
|
139
|
-
export interface IDatabase {
|
|
140
|
-
session: unknown;
|
|
141
|
-
open(): Promise<void>;
|
|
142
|
-
close(): Promise<void>;
|
|
143
|
-
database(name: string, options?: unknown): this;
|
|
144
|
-
collection(name: string, options?: unknown): this;
|
|
145
|
-
listCollections(): Promise<{
|
|
146
|
-
name: string;
|
|
147
|
-
}[]>;
|
|
148
|
-
startSession(): ClientSession;
|
|
149
|
-
endSession(): Promise<void>;
|
|
150
|
-
startTransaction(): void;
|
|
151
|
-
commitTransaction(): Promise<void>;
|
|
152
|
-
abortTransaction(): Promise<void>;
|
|
153
|
-
createIndex(name: string, spec: unknown, options?: unknown): Promise<void>;
|
|
154
|
-
createCollection(name: string, options?: unknown): Promise<void>;
|
|
155
|
-
dropCollection(name: string, options?: unknown): Promise<void>;
|
|
156
|
-
dropDatabase(options?: unknown): Promise<void>;
|
|
157
|
-
updateSchema(name: string, schema: unknown): Promise<void>;
|
|
158
|
-
command(document: IDocument, options?: unknown): Promise<IDocument>;
|
|
159
|
-
create(document: IDocument, options?: unknown): Promise<ICreateOutput>;
|
|
160
|
-
createMany(documents: IDocument[], options?: unknown): Promise<ICreateManyOutput>;
|
|
161
|
-
retrieveAll<TData>(query: IQuery, options?: unknown): Promise<IRetrieveAllOutput<TData>>;
|
|
162
|
-
retrieveMany<TData>(query: IQuery, options?: unknown): Promise<IRetrieveManyOutput<TData>>;
|
|
163
|
-
retrieve<TOutput extends object>(_id: string, options?: unknown): Promise<TOutput | null>;
|
|
164
|
-
update(filter: string | IDocument, document: IDocument, options?: unknown): Promise<IUpdateOutput>;
|
|
165
|
-
updateOne(filter: IDocument, document: IDocument, options?: unknown): Promise<IUpdateOutput>;
|
|
166
|
-
updateMany(filter: IDocument, document: IDocument, options?: unknown): Promise<IUpdateManyOutput>;
|
|
167
|
-
delete(_id: string, options?: unknown): Promise<IDeleteOutput>;
|
|
168
|
-
deleteMany(input: string[] | Record<string, unknown>, options?: unknown): Promise<IDeleteManyOutput>;
|
|
169
|
-
deleteAll(options?: unknown): Promise<IDeleteManyOutput>;
|
|
170
|
-
aggregate<TData>(pipeline?: IPipeline[], query?: IQuery, options?: unknown): Promise<IAggregateOutput<TData>>;
|
|
171
|
-
}
|
|
172
126
|
/**
|
|
173
127
|
* Express App
|
|
174
128
|
*/
|
|
175
129
|
export interface IAppInput {
|
|
176
|
-
|
|
130
|
+
mongoClient: MongoClient;
|
|
177
131
|
}
|
|
178
132
|
export interface IMakeControllerInput {
|
|
179
133
|
controller: IController;
|
|
180
|
-
|
|
134
|
+
mongoClient: MongoClient;
|
|
181
135
|
}
|
|
182
136
|
export interface IMakeMiddlewareInput {
|
|
183
137
|
middleware: IMiddleware;
|
|
184
|
-
|
|
138
|
+
mongoClient: MongoClient;
|
|
185
139
|
}
|
|
186
140
|
/**
|
|
187
141
|
* Router
|
|
188
142
|
*/
|
|
189
143
|
export interface IBaseRouterInput {
|
|
190
|
-
|
|
144
|
+
mongoClient: MongoClient;
|
|
191
145
|
}
|
|
192
146
|
/**
|
|
193
147
|
* Schema Validation
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../../src/interfaces/types.ts"],"names":[],"mappings":"AACA,OAAO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server.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,OAAO,EAAE,MAAM,SAAS,
|
|
1
|
+
{"version":3,"file":"server.d.ts","sourceRoot":"","sources":["../../src/server.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,OAAO,EAAE,MAAM,SAAS,CAAC;AAClC,OAAO,EAAE,MAAM,IAAI,UAAU,EAAE,MAAM,MAAM,CAAC;AAG5C,qBAAa,MAAM;IACjB,GAAG,EAAE,OAAO,CAAC;IACb,MAAM,EAAE,UAAU,GAAG,IAAI,CAAQ;gBAErB,GAAG,EAAE,OAAO;IAIxB,MAAM,CAAC,IAAI,EAAE,MAAM,EAAE,QAAQ,CAAC,EAAE,MAAM;IAUhC,KAAK,CAAC,IAAI,EAAE,MAAM,EAAE,QAAQ,CAAC,EAAE,MAAM;IAI3C,IAAI;IAKJ,IAAI,IAAI,WAOP;IAED,IAAI,IAAI,WAGP;IAED,IAAI,GAAG,WAEN;CACF"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"configurable.middleware.d.ts","sourceRoot":"","sources":["../../../stub/middleware/configurable.middleware.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,YAAY,EAAE,OAAO,EAAE,QAAQ,EAAE,MAAM,SAAS,CAAA;AAEzD,MAAM,CAAC,OAAO,UAAU,aAAa,CAAC,CAAC,EAAE,OAAO,CAAC,EAAE,CAAC,IACjC,KAAK,OAAO,EAAE,KAAK,QAAQ,EAAE,MAAM,YAAY,UAGjE"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"configurable.spec.d.ts","sourceRoot":"","sources":["../../../stub/middleware/configurable.spec.ts"],"names":[],"mappings":""}
|