@cyberskill/shared 1.38.0 → 1.39.0
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/_tsup-dts-rollup.d.cts +154 -109
- package/dist/_tsup-dts-rollup.d.ts +154 -109
- package/dist/index.cjs +1 -1
- package/dist/index.d.cts +32 -26
- package/dist/index.d.ts +32 -26
- package/dist/index.js +1 -1
- package/dist/nodejs/index.cjs +1 -1
- package/dist/nodejs/index.d.cts +2 -2
- package/dist/nodejs/index.d.ts +2 -2
- package/dist/nodejs/index.js +1 -1
- package/dist/nodejs/mongo.cjs +1 -1
- package/dist/nodejs/mongo.d.cts +1 -1
- package/dist/nodejs/mongo.d.ts +1 -1
- package/dist/nodejs/mongo.js +1 -1
- package/dist/nodejs/mongoose.cjs +1 -1
- package/dist/nodejs/mongoose.d.cts +1 -1
- package/dist/nodejs/mongoose.d.ts +1 -1
- package/dist/nodejs/mongoose.js +1 -1
- package/dist/typescript/api-response.cjs +1 -0
- package/dist/typescript/api-response.d.cts +3 -0
- package/dist/typescript/api-response.d.ts +3 -0
- package/dist/typescript/api-response.js +0 -0
- package/dist/typescript/index.cjs +1 -1
- package/dist/typescript/index.d.cts +30 -24
- package/dist/typescript/index.d.ts +30 -24
- package/dist/typescript/index.js +1 -1
- package/dist/typescript/mongo.cjs +1 -0
- package/dist/typescript/mongo.d.cts +8 -0
- package/dist/typescript/mongo.d.ts +8 -0
- package/dist/typescript/mongo.js +1 -0
- package/dist/typescript/mongoose.cjs +1 -1
- package/dist/typescript/mongoose.d.cts +20 -25
- package/dist/typescript/mongoose.d.ts +20 -25
- package/dist/typescript/mongoose.js +1 -1
- package/package.json +5 -5
|
@@ -14,6 +14,8 @@ import { Context } from 'react';
|
|
|
14
14
|
import { Db } from 'mongodb';
|
|
15
15
|
import type { DeleteResult } from 'mongodb';
|
|
16
16
|
import { Document as Document_2 } from 'mongoose';
|
|
17
|
+
import type { ErrorHandlingMiddlewareFunction } from 'mongoose';
|
|
18
|
+
import type { ErrorHandlingMiddlewareWithOption } from 'mongoose';
|
|
17
19
|
import type { Filter } from 'mongodb';
|
|
18
20
|
import type { FilterQuery } from 'mongoose';
|
|
19
21
|
import { FlatConfigComposer } from 'eslint-flat-config-utils';
|
|
@@ -34,6 +36,9 @@ import type { PaginateResult } from 'mongoose';
|
|
|
34
36
|
import type { PipelineStage } from 'mongoose';
|
|
35
37
|
import type { PopulateOption } from 'mongoose';
|
|
36
38
|
import type { PopulateOptions } from 'mongoose';
|
|
39
|
+
import type { PostMiddlewareFunction } from 'mongoose';
|
|
40
|
+
import type { PreMiddlewareFunction } from 'mongoose';
|
|
41
|
+
import type { PreSaveMiddlewareFunction } from 'mongoose';
|
|
37
42
|
import type { ProjectionType } from 'mongoose';
|
|
38
43
|
import type { QueryOptions } from 'mongoose';
|
|
39
44
|
import type { QueryWithHelpers } from 'mongoose';
|
|
@@ -71,7 +76,7 @@ export { ApolloProvider }
|
|
|
71
76
|
export { ApolloProvider as ApolloProvider_alias_1 }
|
|
72
77
|
export { ApolloProvider as ApolloProvider_alias_2 }
|
|
73
78
|
|
|
74
|
-
declare class C_Collection<
|
|
79
|
+
declare class C_Collection<T extends Partial<C_Document>> extends Collection<T> {
|
|
75
80
|
}
|
|
76
81
|
export { C_Collection }
|
|
77
82
|
export { C_Collection as C_Collection_alias_1 }
|
|
@@ -119,6 +124,14 @@ declare function createGraphqlCodegenConfig({ uri, from, to, withComponent, with
|
|
|
119
124
|
export { createGraphqlCodegenConfig }
|
|
120
125
|
export { createGraphqlCodegenConfig as createGraphqlCodegenConfig_alias_1 }
|
|
121
126
|
|
|
127
|
+
declare function createMongoGenericFields({ isNew, returnDateAs, }?: {
|
|
128
|
+
isNew?: boolean;
|
|
129
|
+
returnDateAs?: 'string' | 'date';
|
|
130
|
+
}): I_GenericDocument_2;
|
|
131
|
+
export { createMongoGenericFields }
|
|
132
|
+
export { createMongoGenericFields as createMongoGenericFields_alias_1 }
|
|
133
|
+
export { createMongoGenericFields as createMongoGenericFields_alias_2 }
|
|
134
|
+
|
|
122
135
|
declare function deepMerge(...configs: (I_Config_2 | I_Config_2[])[]): I_Config_2;
|
|
123
136
|
export { deepMerge }
|
|
124
137
|
export { deepMerge as deepMerge_alias_1 }
|
|
@@ -5937,12 +5950,12 @@ export { fileExists }
|
|
|
5937
5950
|
export { fileExists as fileExists_alias_1 }
|
|
5938
5951
|
export { fileExists as fileExists_alias_2 }
|
|
5939
5952
|
|
|
5940
|
-
declare function generateModel<
|
|
5953
|
+
declare function generateModel<T extends Partial<C_Document_2>>({ mongoose, name, schema, pagination, aggregate, virtuals, middlewares, }: I_GenerateModelOptions_2<T>): I_ExtendedModel_2<T>;
|
|
5941
5954
|
export { generateModel }
|
|
5942
5955
|
export { generateModel as generateModel_alias_1 }
|
|
5943
5956
|
export { generateModel as generateModel_alias_2 }
|
|
5944
5957
|
|
|
5945
|
-
declare function generateSchema<
|
|
5958
|
+
declare function generateSchema<T extends Partial<C_Document_2>>({ mongoose, schema, virtuals, standalone, }: I_GenerateSchemaOptions_2<T>): T_MongooseShema_2<T>;
|
|
5946
5959
|
export { generateSchema }
|
|
5947
5960
|
export { generateSchema as generateSchema_alias_1 }
|
|
5948
5961
|
export { generateSchema as generateSchema_alias_2 }
|
|
@@ -5957,7 +5970,7 @@ export { generateSlug }
|
|
|
5957
5970
|
export { generateSlug as generateSlug_alias_1 }
|
|
5958
5971
|
export { generateSlug as generateSlug_alias_2 }
|
|
5959
5972
|
|
|
5960
|
-
declare function generateSlugQuery<
|
|
5973
|
+
declare function generateSlugQuery<T>(slug: string, filters?: T_FilterQuery_2<T>, id?: string): T_GenerateSlugQueryResponse_2<T>;
|
|
5961
5974
|
export { generateSlugQuery }
|
|
5962
5975
|
export { generateSlugQuery as generateSlugQuery_alias_1 }
|
|
5963
5976
|
export { generateSlugQuery as generateSlugQuery_alias_2 }
|
|
@@ -5967,24 +5980,11 @@ export { getLatestPackageVersion }
|
|
|
5967
5980
|
export { getLatestPackageVersion as getLatestPackageVersion_alias_1 }
|
|
5968
5981
|
export { getLatestPackageVersion as getLatestPackageVersion_alias_2 }
|
|
5969
5982
|
|
|
5970
|
-
declare function getMongoDateTime(): string;
|
|
5983
|
+
declare function getMongoDateTime(now?: Date): string;
|
|
5971
5984
|
export { getMongoDateTime }
|
|
5972
5985
|
export { getMongoDateTime as getMongoDateTime_alias_1 }
|
|
5973
5986
|
export { getMongoDateTime as getMongoDateTime_alias_2 }
|
|
5974
5987
|
|
|
5975
|
-
declare function getMongoGenericFields<T extends 'date' | 'string'>({ isNew, returnDateAs, }?: {
|
|
5976
|
-
isNew?: boolean;
|
|
5977
|
-
returnDateAs?: T;
|
|
5978
|
-
}): {
|
|
5979
|
-
id?: string;
|
|
5980
|
-
isDel: boolean;
|
|
5981
|
-
createdAt: T extends 'string' ? string : Date;
|
|
5982
|
-
updatedAt: T extends 'string' ? string : Date;
|
|
5983
|
-
};
|
|
5984
|
-
export { getMongoGenericFields }
|
|
5985
|
-
export { getMongoGenericFields as getMongoGenericFields_alias_1 }
|
|
5986
|
-
export { getMongoGenericFields as getMongoGenericFields_alias_2 }
|
|
5987
|
-
|
|
5988
5988
|
declare function getStoredErrorLists(): Promise<I_ErrorEntry_2[]>;
|
|
5989
5989
|
export { getStoredErrorLists }
|
|
5990
5990
|
export { getStoredErrorLists as getStoredErrorLists_alias_1 }
|
|
@@ -6102,60 +6102,67 @@ export { I_EslintError }
|
|
|
6102
6102
|
export { I_EslintError as I_EslintError_alias_1 }
|
|
6103
6103
|
export { I_EslintError as I_EslintError_alias_2 }
|
|
6104
6104
|
|
|
6105
|
-
declare interface I_ExtendedModel<
|
|
6105
|
+
declare interface I_ExtendedModel<T extends Partial<C_Document>> extends Model<T>, PaginateModel<T>, AggregatePaginateModel<T> {
|
|
6106
6106
|
}
|
|
6107
6107
|
export { I_ExtendedModel }
|
|
6108
6108
|
export { I_ExtendedModel as I_ExtendedModel_alias_1 }
|
|
6109
6109
|
export { I_ExtendedModel as I_ExtendedModel_alias_2 }
|
|
6110
6110
|
|
|
6111
|
-
declare interface I_ExtendedModel_2<
|
|
6112
|
-
extends Model<
|
|
6113
|
-
AggregatePaginateModel<
|
|
6111
|
+
declare interface I_ExtendedModel_2<T extends Partial<C_Document_2>>
|
|
6112
|
+
extends Model<T>, PaginateModel<T>,
|
|
6113
|
+
AggregatePaginateModel<T> { }
|
|
6114
6114
|
|
|
6115
|
-
declare interface I_GenerateModelOptions<
|
|
6116
|
-
schema: T_Input_MongooseSchema<
|
|
6115
|
+
declare interface I_GenerateModelOptions<T extends Partial<C_Document>> extends I_MongooseOptions<T> {
|
|
6116
|
+
schema: T_Input_MongooseSchema<T>;
|
|
6117
6117
|
name: string;
|
|
6118
6118
|
aggregate?: boolean;
|
|
6119
|
-
middlewares?: I_MongooseModelMiddleware[];
|
|
6119
|
+
middlewares?: I_MongooseModelMiddleware<T>[];
|
|
6120
6120
|
pagination?: boolean;
|
|
6121
6121
|
}
|
|
6122
6122
|
export { I_GenerateModelOptions }
|
|
6123
6123
|
export { I_GenerateModelOptions as I_GenerateModelOptions_alias_1 }
|
|
6124
6124
|
export { I_GenerateModelOptions as I_GenerateModelOptions_alias_2 }
|
|
6125
6125
|
|
|
6126
|
-
declare interface I_GenerateModelOptions_2<
|
|
6127
|
-
extends I_MongooseOptions_2<
|
|
6128
|
-
schema: T_Input_MongooseSchema_2<
|
|
6126
|
+
declare interface I_GenerateModelOptions_2<T extends Partial<C_Document_2>>
|
|
6127
|
+
extends I_MongooseOptions_2<T> {
|
|
6128
|
+
schema: T_Input_MongooseSchema_2<T>;
|
|
6129
6129
|
name: string;
|
|
6130
6130
|
aggregate?: boolean;
|
|
6131
|
-
middlewares?: I_MongooseModelMiddleware_2[];
|
|
6131
|
+
middlewares?: I_MongooseModelMiddleware_2<T>[];
|
|
6132
6132
|
pagination?: boolean;
|
|
6133
6133
|
}
|
|
6134
6134
|
|
|
6135
|
-
declare interface I_GenerateSchemaOptions<
|
|
6136
|
-
schema: T_Input_MongooseSchema<
|
|
6135
|
+
declare interface I_GenerateSchemaOptions<T extends Partial<C_Document>> extends I_MongooseOptions<T> {
|
|
6136
|
+
schema: T_Input_MongooseSchema<T>;
|
|
6137
6137
|
standalone?: boolean;
|
|
6138
6138
|
}
|
|
6139
6139
|
export { I_GenerateSchemaOptions }
|
|
6140
6140
|
export { I_GenerateSchemaOptions as I_GenerateSchemaOptions_alias_1 }
|
|
6141
6141
|
export { I_GenerateSchemaOptions as I_GenerateSchemaOptions_alias_2 }
|
|
6142
6142
|
|
|
6143
|
-
declare interface I_GenerateSchemaOptions_2<
|
|
6144
|
-
extends I_MongooseOptions_2<
|
|
6145
|
-
schema: T_Input_MongooseSchema_2<
|
|
6143
|
+
declare interface I_GenerateSchemaOptions_2<T extends Partial<C_Document_2>>
|
|
6144
|
+
extends I_MongooseOptions_2<T> {
|
|
6145
|
+
schema: T_Input_MongooseSchema_2<T>;
|
|
6146
6146
|
standalone?: boolean;
|
|
6147
6147
|
}
|
|
6148
6148
|
|
|
6149
6149
|
declare interface I_GenericDocument extends Partial<C_Document> {
|
|
6150
6150
|
id?: string;
|
|
6151
|
-
isDel
|
|
6152
|
-
createdAt
|
|
6153
|
-
updatedAt
|
|
6151
|
+
isDel: boolean;
|
|
6152
|
+
createdAt: string | Date;
|
|
6153
|
+
updatedAt: string | Date;
|
|
6154
6154
|
}
|
|
6155
6155
|
export { I_GenericDocument }
|
|
6156
6156
|
export { I_GenericDocument as I_GenericDocument_alias_1 }
|
|
6157
6157
|
export { I_GenericDocument as I_GenericDocument_alias_2 }
|
|
6158
6158
|
|
|
6159
|
+
declare interface I_GenericDocument_2 extends Partial<C_Document_2> {
|
|
6160
|
+
id?: string;
|
|
6161
|
+
isDel: boolean;
|
|
6162
|
+
createdAt: string | Date;
|
|
6163
|
+
updatedAt: string | Date;
|
|
6164
|
+
}
|
|
6165
|
+
|
|
6159
6166
|
declare interface I_GraphqlCodegenConfig {
|
|
6160
6167
|
uri: string;
|
|
6161
6168
|
from: string;
|
|
@@ -6181,17 +6188,6 @@ declare interface I_GraphqlCodegenConfig_2 {
|
|
|
6181
6188
|
withRefetchFn?: boolean;
|
|
6182
6189
|
}
|
|
6183
6190
|
|
|
6184
|
-
declare interface I_HookNextFunction {
|
|
6185
|
-
(error?: Error | null): void;
|
|
6186
|
-
}
|
|
6187
|
-
export { I_HookNextFunction }
|
|
6188
|
-
export { I_HookNextFunction as I_HookNextFunction_alias_1 }
|
|
6189
|
-
export { I_HookNextFunction as I_HookNextFunction_alias_2 }
|
|
6190
|
-
|
|
6191
|
-
declare interface I_HookNextFunction_2 {
|
|
6192
|
-
(error?: Error | null): void;
|
|
6193
|
-
}
|
|
6194
|
-
|
|
6195
6191
|
declare interface I_Input_CreateMany<T> {
|
|
6196
6192
|
docs: T[];
|
|
6197
6193
|
}
|
|
@@ -6308,37 +6304,39 @@ declare interface I_LoadingProps_2 {
|
|
|
6308
6304
|
message?: string;
|
|
6309
6305
|
}
|
|
6310
6306
|
|
|
6311
|
-
declare interface I_MongooseModelMiddleware {
|
|
6312
|
-
method:
|
|
6313
|
-
|
|
6307
|
+
declare interface I_MongooseModelMiddleware<T extends Partial<C_Document>> {
|
|
6308
|
+
method: T_MongooseModelMiddlewareMethod;
|
|
6309
|
+
pre?: T_MongooseModelMiddlewarePreFunction<T & T_QueryWithHelpers<T>>;
|
|
6310
|
+
post?: T_MongooseModelMiddlewarePostFunction<T>;
|
|
6314
6311
|
}
|
|
6315
6312
|
export { I_MongooseModelMiddleware }
|
|
6316
6313
|
export { I_MongooseModelMiddleware as I_MongooseModelMiddleware_alias_1 }
|
|
6317
6314
|
export { I_MongooseModelMiddleware as I_MongooseModelMiddleware_alias_2 }
|
|
6318
6315
|
|
|
6319
|
-
declare interface I_MongooseModelMiddleware_2 {
|
|
6320
|
-
method:
|
|
6321
|
-
|
|
6316
|
+
declare interface I_MongooseModelMiddleware_2<T extends Partial<C_Document_2>> {
|
|
6317
|
+
method: T_MongooseModelMiddlewareMethod_2;
|
|
6318
|
+
pre?: T_MongooseModelMiddlewarePreFunction_2<T & T_QueryWithHelpers_2<T>>;
|
|
6319
|
+
post?: T_MongooseModelMiddlewarePostFunction_2<T>;
|
|
6322
6320
|
}
|
|
6323
6321
|
|
|
6324
|
-
declare interface I_MongooseOptions<
|
|
6322
|
+
declare interface I_MongooseOptions<T extends Partial<C_Document>> {
|
|
6325
6323
|
mongoose: typeof mongoose;
|
|
6326
6324
|
virtuals?: {
|
|
6327
|
-
name: keyof
|
|
6325
|
+
name: keyof T | string;
|
|
6328
6326
|
options?: I_VirtualOptions_2;
|
|
6329
|
-
get?: (this:
|
|
6327
|
+
get?: (this: T) => void;
|
|
6330
6328
|
}[];
|
|
6331
6329
|
}
|
|
6332
6330
|
export { I_MongooseOptions }
|
|
6333
6331
|
export { I_MongooseOptions as I_MongooseOptions_alias_1 }
|
|
6334
6332
|
export { I_MongooseOptions as I_MongooseOptions_alias_2 }
|
|
6335
6333
|
|
|
6336
|
-
declare interface I_MongooseOptions_2<
|
|
6334
|
+
declare interface I_MongooseOptions_2<T extends Partial<C_Document_2>> {
|
|
6337
6335
|
mongoose: typeof mongoose;
|
|
6338
6336
|
virtuals?: {
|
|
6339
|
-
name: keyof
|
|
6337
|
+
name: keyof T | string;
|
|
6340
6338
|
options?: I_VirtualOptions;
|
|
6341
|
-
get?: (this:
|
|
6339
|
+
get?: (this: T) => void;
|
|
6342
6340
|
}[];
|
|
6343
6341
|
}
|
|
6344
6342
|
|
|
@@ -6386,12 +6384,12 @@ declare interface I_NextIntlLanguage_2 {
|
|
|
6386
6384
|
timezone: Timezone;
|
|
6387
6385
|
}
|
|
6388
6386
|
|
|
6389
|
-
declare type I_Return<
|
|
6387
|
+
declare type I_Return<T = void, E = unknown> = I_ReturnSuccess<T, E> | I_ReturnFailure;
|
|
6390
6388
|
export { I_Return }
|
|
6391
6389
|
export { I_Return as I_Return_alias_1 }
|
|
6392
6390
|
export { I_Return as I_Return_alias_2 }
|
|
6393
6391
|
|
|
6394
|
-
declare type I_Return_2<
|
|
6392
|
+
declare type I_Return_2<T = void, E = unknown> = I_ReturnSuccess_2<T, E> | I_ReturnFailure_2;
|
|
6395
6393
|
|
|
6396
6394
|
declare interface I_ReturnFailure {
|
|
6397
6395
|
success: false;
|
|
@@ -6408,9 +6406,9 @@ declare interface I_ReturnFailure_2 {
|
|
|
6408
6406
|
code: number | string;
|
|
6409
6407
|
}
|
|
6410
6408
|
|
|
6411
|
-
declare interface I_ReturnSuccess<
|
|
6409
|
+
declare interface I_ReturnSuccess<T, E = unknown> {
|
|
6412
6410
|
success: true;
|
|
6413
|
-
result:
|
|
6411
|
+
result: T & E;
|
|
6414
6412
|
message?: string;
|
|
6415
6413
|
code?: number | string;
|
|
6416
6414
|
}
|
|
@@ -6418,9 +6416,9 @@ export { I_ReturnSuccess }
|
|
|
6418
6416
|
export { I_ReturnSuccess as I_ReturnSuccess_alias_1 }
|
|
6419
6417
|
export { I_ReturnSuccess as I_ReturnSuccess_alias_2 }
|
|
6420
6418
|
|
|
6421
|
-
declare interface I_ReturnSuccess_2<
|
|
6419
|
+
declare interface I_ReturnSuccess_2<T, E = unknown> {
|
|
6422
6420
|
success: true;
|
|
6423
|
-
result:
|
|
6421
|
+
result: T & E;
|
|
6424
6422
|
message?: string;
|
|
6425
6423
|
code?: number | string;
|
|
6426
6424
|
}
|
|
@@ -6590,24 +6588,26 @@ export { MongoController }
|
|
|
6590
6588
|
export { MongoController as MongoController_alias_1 }
|
|
6591
6589
|
export { MongoController as MongoController_alias_2 }
|
|
6592
6590
|
|
|
6593
|
-
declare class MongooseController<
|
|
6591
|
+
declare class MongooseController<T extends Partial<C_Document_2>> {
|
|
6594
6592
|
private model;
|
|
6595
|
-
constructor(model: I_ExtendedModel_2<
|
|
6593
|
+
constructor(model: I_ExtendedModel_2<T>);
|
|
6596
6594
|
private getModelName;
|
|
6597
|
-
findOne(filter?: T_FilterQuery_2<
|
|
6598
|
-
findAll(filter?: T_FilterQuery_2<
|
|
6599
|
-
findPaging(filter?: T_FilterQuery_2<
|
|
6600
|
-
findPagingAggregate(pipeline: T_PipelineStage_2[], options?: T_PaginateOptionsWithPopulate_2): Promise<I_Return_2<T_AggregatePaginateResult_2<
|
|
6601
|
-
count(filter?: T_FilterQuery_2<
|
|
6602
|
-
createOne(doc:
|
|
6603
|
-
createMany(docs: (
|
|
6604
|
-
updateOne(filter?: T_FilterQuery_2<
|
|
6605
|
-
updateMany(filter?: T_FilterQuery_2<
|
|
6606
|
-
deleteOne(filter?: T_FilterQuery_2<
|
|
6607
|
-
deleteMany(filter?: T_FilterQuery_2<
|
|
6608
|
-
generateShortId(id: string): Promise<I_Return_2<string>>;
|
|
6609
|
-
generateSlug(fieldName: string, fields:
|
|
6610
|
-
|
|
6595
|
+
findOne(filter?: T_FilterQuery_2<T>, projection?: T_ProjectionType_2<T>, options?: T_QueryOptions_2<T>, populate?: T_Input_Populate_2): Promise<I_Return_2<T>>;
|
|
6596
|
+
findAll(filter?: T_FilterQuery_2<T>, projection?: T_ProjectionType_2<T>, options?: T_QueryOptions_2<T>, populate?: T_Input_Populate_2): Promise<I_Return_2<T[]>>;
|
|
6597
|
+
findPaging(filter?: T_FilterQuery_2<T>, options?: T_PaginateOptionsWithPopulate_2): Promise<I_Return_2<T_PaginateResult_2<T>>>;
|
|
6598
|
+
findPagingAggregate(pipeline: T_PipelineStage_2[], options?: T_PaginateOptionsWithPopulate_2): Promise<I_Return_2<T_AggregatePaginateResult_2<T>>>;
|
|
6599
|
+
count(filter?: T_FilterQuery_2<T>): Promise<I_Return_2<number>>;
|
|
6600
|
+
createOne(doc: T | Partial<T>): Promise<I_Return_2<T>>;
|
|
6601
|
+
createMany(docs: (T | Partial<T>)[], options?: T_InsertManyOptions_2): Promise<I_Return_2<T[]>>;
|
|
6602
|
+
updateOne(filter?: T_FilterQuery_2<T>, update?: T_UpdateQuery_2<T>, options?: I_UpdateOptionsExtended_2): Promise<I_Return_2<T>>;
|
|
6603
|
+
updateMany(filter?: T_FilterQuery_2<T>, update?: T_UpdateQuery_2<T>, options?: I_UpdateOptionsExtended_2): Promise<I_Return_2<T_UpdateResult_2>>;
|
|
6604
|
+
deleteOne(filter?: T_FilterQuery_2<T>, options?: I_DeleteOptionsExtended_2): Promise<I_Return_2<T>>;
|
|
6605
|
+
deleteMany(filter?: T_FilterQuery_2<T>, options?: I_DeleteOptionsExtended_2): Promise<I_Return_2<T_DeleteResult_2>>;
|
|
6606
|
+
generateShortId(id: string, length?: number): Promise<I_Return_2<string>>;
|
|
6607
|
+
generateSlug(fieldName: string, fields: T, filters?: T_FilterQuery_2<T>): Promise<I_Return_2<string | {
|
|
6608
|
+
[key: string]: string;
|
|
6609
|
+
}>>;
|
|
6610
|
+
aggregate(pipeline: T_PipelineStage_2[]): Promise<I_Return_2<T[]>>;
|
|
6611
6611
|
}
|
|
6612
6612
|
export { MongooseController }
|
|
6613
6613
|
export { MongooseController as MongooseController_alias_1 }
|
|
@@ -6961,12 +6961,26 @@ export { T_DeleteResult as T_DeleteResult_alias_2 }
|
|
|
6961
6961
|
|
|
6962
6962
|
declare type T_DeleteResult_2 = DeleteResult;
|
|
6963
6963
|
|
|
6964
|
-
declare type
|
|
6964
|
+
declare type T_ErrorHandlingMiddlewareFunction<T> = ErrorHandlingMiddlewareFunction<T>;
|
|
6965
|
+
export { T_ErrorHandlingMiddlewareFunction }
|
|
6966
|
+
export { T_ErrorHandlingMiddlewareFunction as T_ErrorHandlingMiddlewareFunction_alias_1 }
|
|
6967
|
+
export { T_ErrorHandlingMiddlewareFunction as T_ErrorHandlingMiddlewareFunction_alias_2 }
|
|
6968
|
+
|
|
6969
|
+
declare type T_ErrorHandlingMiddlewareFunction_2<T> = ErrorHandlingMiddlewareFunction<T>;
|
|
6970
|
+
|
|
6971
|
+
declare type T_ErrorHandlingMiddlewareWithOption<T> = ErrorHandlingMiddlewareWithOption<T>;
|
|
6972
|
+
export { T_ErrorHandlingMiddlewareWithOption }
|
|
6973
|
+
export { T_ErrorHandlingMiddlewareWithOption as T_ErrorHandlingMiddlewareWithOption_alias_1 }
|
|
6974
|
+
export { T_ErrorHandlingMiddlewareWithOption as T_ErrorHandlingMiddlewareWithOption_alias_2 }
|
|
6975
|
+
|
|
6976
|
+
declare type T_ErrorHandlingMiddlewareWithOption_2<T> = ErrorHandlingMiddlewareWithOption<T>;
|
|
6977
|
+
|
|
6978
|
+
declare type T_Filter<T> = Filter<T>;
|
|
6965
6979
|
export { T_Filter }
|
|
6966
6980
|
export { T_Filter as T_Filter_alias_1 }
|
|
6967
6981
|
export { T_Filter as T_Filter_alias_2 }
|
|
6968
6982
|
|
|
6969
|
-
declare type T_Filter_2<
|
|
6983
|
+
declare type T_Filter_2<T> = Filter<T>;
|
|
6970
6984
|
|
|
6971
6985
|
declare type T_FilterQuery<T> = FilterQuery<T>;
|
|
6972
6986
|
export { T_FilterQuery }
|
|
@@ -6975,7 +6989,7 @@ export { T_FilterQuery as T_FilterQuery_alias_2 }
|
|
|
6975
6989
|
|
|
6976
6990
|
declare type T_FilterQuery_2<T> = FilterQuery<T>;
|
|
6977
6991
|
|
|
6978
|
-
declare type T_GenerateSlugQueryResponse<
|
|
6992
|
+
declare type T_GenerateSlugQueryResponse<T> = T_FilterQuery<T> & {
|
|
6979
6993
|
$or: Array<{
|
|
6980
6994
|
slug: string;
|
|
6981
6995
|
} | {
|
|
@@ -6990,27 +7004,23 @@ export { T_GenerateSlugQueryResponse }
|
|
|
6990
7004
|
export { T_GenerateSlugQueryResponse as T_GenerateSlugQueryResponse_alias_1 }
|
|
6991
7005
|
export { T_GenerateSlugQueryResponse as T_GenerateSlugQueryResponse_alias_2 }
|
|
6992
7006
|
|
|
6993
|
-
declare type T_GenerateSlugQueryResponse_2<
|
|
7007
|
+
declare type T_GenerateSlugQueryResponse_2<T> = T_FilterQuery_2<T> & {
|
|
6994
7008
|
$or: Array<{ slug: string } | { slugHistory: string }>;
|
|
6995
7009
|
} & { id?: { $ne: string } };
|
|
6996
7010
|
|
|
6997
|
-
declare type T_Input_MongooseSchema<
|
|
7011
|
+
declare type T_Input_MongooseSchema<T> = SchemaDefinition<T>;
|
|
6998
7012
|
export { T_Input_MongooseSchema }
|
|
6999
7013
|
export { T_Input_MongooseSchema as T_Input_MongooseSchema_alias_1 }
|
|
7000
7014
|
export { T_Input_MongooseSchema as T_Input_MongooseSchema_alias_2 }
|
|
7001
7015
|
|
|
7002
|
-
declare type T_Input_MongooseSchema_2<
|
|
7016
|
+
declare type T_Input_MongooseSchema_2<T> = SchemaDefinition<T>;
|
|
7003
7017
|
|
|
7004
7018
|
declare type T_Input_Populate = string | string[] | T_PopulateOptions | T_PopulateOptions[];
|
|
7005
7019
|
export { T_Input_Populate }
|
|
7006
7020
|
export { T_Input_Populate as T_Input_Populate_alias_1 }
|
|
7007
7021
|
export { T_Input_Populate as T_Input_Populate_alias_2 }
|
|
7008
7022
|
|
|
7009
|
-
declare type T_Input_Populate_2 =
|
|
7010
|
-
| string
|
|
7011
|
-
| string[]
|
|
7012
|
-
| T_PopulateOptions_2
|
|
7013
|
-
| T_PopulateOptions_2[];
|
|
7023
|
+
declare type T_Input_Populate_2 = string | string[] | T_PopulateOptions_2 | T_PopulateOptions_2[];
|
|
7014
7024
|
|
|
7015
7025
|
declare type T_InsertManyOptions = InsertManyOptions;
|
|
7016
7026
|
export { T_InsertManyOptions }
|
|
@@ -7019,45 +7029,52 @@ export { T_InsertManyOptions as T_InsertManyOptions_alias_2 }
|
|
|
7019
7029
|
|
|
7020
7030
|
declare type T_InsertManyOptions_2 = InsertManyOptions;
|
|
7021
7031
|
|
|
7022
|
-
declare type T_InsertManyResult<
|
|
7032
|
+
declare type T_InsertManyResult<T> = InsertManyResult<T>;
|
|
7023
7033
|
export { T_InsertManyResult }
|
|
7024
7034
|
export { T_InsertManyResult as T_InsertManyResult_alias_1 }
|
|
7025
7035
|
export { T_InsertManyResult as T_InsertManyResult_alias_2 }
|
|
7026
7036
|
|
|
7027
|
-
declare type T_InsertManyResult_2<
|
|
7037
|
+
declare type T_InsertManyResult_2<T> = InsertManyResult<T>;
|
|
7028
7038
|
|
|
7029
|
-
declare type T_InsertOneResult<
|
|
7039
|
+
declare type T_InsertOneResult<T> = InsertOneResult<T>;
|
|
7030
7040
|
export { T_InsertOneResult }
|
|
7031
7041
|
export { T_InsertOneResult as T_InsertOneResult_alias_1 }
|
|
7032
7042
|
export { T_InsertOneResult as T_InsertOneResult_alias_2 }
|
|
7033
7043
|
|
|
7034
|
-
declare type T_InsertOneResult_2<
|
|
7044
|
+
declare type T_InsertOneResult_2<T> = InsertOneResult<T>;
|
|
7045
|
+
|
|
7046
|
+
declare type T_MongooseModelMiddlewareMethod = string | RegExp;
|
|
7047
|
+
export { T_MongooseModelMiddlewareMethod }
|
|
7048
|
+
export { T_MongooseModelMiddlewareMethod as T_MongooseModelMiddlewareMethod_alias_1 }
|
|
7049
|
+
export { T_MongooseModelMiddlewareMethod as T_MongooseModelMiddlewareMethod_alias_2 }
|
|
7035
7050
|
|
|
7036
|
-
declare type
|
|
7037
|
-
export { T_MiddlewareContext }
|
|
7038
|
-
export { T_MiddlewareContext as T_MiddlewareContext_alias_1 }
|
|
7039
|
-
export { T_MiddlewareContext as T_MiddlewareContext_alias_2 }
|
|
7051
|
+
declare type T_MongooseModelMiddlewareMethod_2 = string | RegExp;
|
|
7040
7052
|
|
|
7041
|
-
declare type
|
|
7053
|
+
declare type T_MongooseModelMiddlewarePostFunction<T> = T_PostMiddlewareFunction<T> & T_ErrorHandlingMiddlewareFunction<T> & T_ErrorHandlingMiddlewareWithOption<T>;
|
|
7054
|
+
export { T_MongooseModelMiddlewarePostFunction }
|
|
7055
|
+
export { T_MongooseModelMiddlewarePostFunction as T_MongooseModelMiddlewarePostFunction_alias_1 }
|
|
7056
|
+
export { T_MongooseModelMiddlewarePostFunction as T_MongooseModelMiddlewarePostFunction_alias_2 }
|
|
7042
7057
|
|
|
7043
|
-
declare type
|
|
7044
|
-
export { T_MongooseModelMiddlewareFunction }
|
|
7045
|
-
export { T_MongooseModelMiddlewareFunction as T_MongooseModelMiddlewareFunction_alias_1 }
|
|
7046
|
-
export { T_MongooseModelMiddlewareFunction as T_MongooseModelMiddlewareFunction_alias_2 }
|
|
7058
|
+
declare type T_MongooseModelMiddlewarePostFunction_2<T> = T_PostMiddlewareFunction_2<T> & T_ErrorHandlingMiddlewareFunction_2<T> & T_ErrorHandlingMiddlewareWithOption_2<T>;
|
|
7047
7059
|
|
|
7048
|
-
declare type
|
|
7060
|
+
declare type T_MongooseModelMiddlewarePreFunction<T> = T_PreMiddlewareFunction<T> & T_PreSaveMiddlewareFunction<T>;
|
|
7061
|
+
export { T_MongooseModelMiddlewarePreFunction }
|
|
7062
|
+
export { T_MongooseModelMiddlewarePreFunction as T_MongooseModelMiddlewarePreFunction_alias_1 }
|
|
7063
|
+
export { T_MongooseModelMiddlewarePreFunction as T_MongooseModelMiddlewarePreFunction_alias_2 }
|
|
7064
|
+
|
|
7065
|
+
declare type T_MongooseModelMiddlewarePreFunction_2<T> = T_PreMiddlewareFunction_2<T> & T_PreSaveMiddlewareFunction_2<T>;
|
|
7049
7066
|
|
|
7050
7067
|
declare type T_MongoosePlugin = (schema: Schema, options?: Record<string, unknown>) => void;
|
|
7051
7068
|
export { T_MongoosePlugin }
|
|
7052
7069
|
export { T_MongoosePlugin as T_MongoosePlugin_alias_1 }
|
|
7053
7070
|
export { T_MongoosePlugin as T_MongoosePlugin_alias_2 }
|
|
7054
7071
|
|
|
7055
|
-
declare type T_MongooseShema<
|
|
7072
|
+
declare type T_MongooseShema<T> = mongoose.Schema<T>;
|
|
7056
7073
|
export { T_MongooseShema }
|
|
7057
7074
|
export { T_MongooseShema as T_MongooseShema_alias_1 }
|
|
7058
7075
|
export { T_MongooseShema as T_MongooseShema_alias_2 }
|
|
7059
7076
|
|
|
7060
|
-
declare type T_MongooseShema_2<
|
|
7077
|
+
declare type T_MongooseShema_2<T> = mongoose.Schema<T>;
|
|
7061
7078
|
|
|
7062
7079
|
declare type T_NextIntlMessageList = Record<string, AbstractIntlMessages>;
|
|
7063
7080
|
export { T_NextIntlMessageList }
|
|
@@ -7116,6 +7133,27 @@ export { T_PopulateOptions as T_PopulateOptions_alias_2 }
|
|
|
7116
7133
|
|
|
7117
7134
|
declare type T_PopulateOptions_2 = PopulateOptions;
|
|
7118
7135
|
|
|
7136
|
+
declare type T_PostMiddlewareFunction<T> = PostMiddlewareFunction<T>;
|
|
7137
|
+
export { T_PostMiddlewareFunction }
|
|
7138
|
+
export { T_PostMiddlewareFunction as T_PostMiddlewareFunction_alias_1 }
|
|
7139
|
+
export { T_PostMiddlewareFunction as T_PostMiddlewareFunction_alias_2 }
|
|
7140
|
+
|
|
7141
|
+
declare type T_PostMiddlewareFunction_2<T> = PostMiddlewareFunction<T>;
|
|
7142
|
+
|
|
7143
|
+
declare type T_PreMiddlewareFunction<T> = PreMiddlewareFunction<T>;
|
|
7144
|
+
export { T_PreMiddlewareFunction }
|
|
7145
|
+
export { T_PreMiddlewareFunction as T_PreMiddlewareFunction_alias_1 }
|
|
7146
|
+
export { T_PreMiddlewareFunction as T_PreMiddlewareFunction_alias_2 }
|
|
7147
|
+
|
|
7148
|
+
declare type T_PreMiddlewareFunction_2<T> = PreMiddlewareFunction<T>;
|
|
7149
|
+
|
|
7150
|
+
declare type T_PreSaveMiddlewareFunction<T> = PreSaveMiddlewareFunction<T>;
|
|
7151
|
+
export { T_PreSaveMiddlewareFunction }
|
|
7152
|
+
export { T_PreSaveMiddlewareFunction as T_PreSaveMiddlewareFunction_alias_1 }
|
|
7153
|
+
export { T_PreSaveMiddlewareFunction as T_PreSaveMiddlewareFunction_alias_2 }
|
|
7154
|
+
|
|
7155
|
+
declare type T_PreSaveMiddlewareFunction_2<T> = PreSaveMiddlewareFunction<T>;
|
|
7156
|
+
|
|
7119
7157
|
declare type T_ProjectionType<T> = ProjectionType<T>;
|
|
7120
7158
|
export { T_ProjectionType }
|
|
7121
7159
|
export { T_ProjectionType as T_ProjectionType_alias_1 }
|
|
@@ -7130,6 +7168,13 @@ export { T_QueryOptions as T_QueryOptions_alias_2 }
|
|
|
7130
7168
|
|
|
7131
7169
|
declare type T_QueryOptions_2<T> = QueryOptions<T>;
|
|
7132
7170
|
|
|
7171
|
+
declare type T_QueryWithHelpers<T> = QueryWithHelpers<T, T>;
|
|
7172
|
+
export { T_QueryWithHelpers }
|
|
7173
|
+
export { T_QueryWithHelpers as T_QueryWithHelpers_alias_1 }
|
|
7174
|
+
export { T_QueryWithHelpers as T_QueryWithHelpers_alias_2 }
|
|
7175
|
+
|
|
7176
|
+
declare type T_QueryWithHelpers_2<T> = QueryWithHelpers<T, T>;
|
|
7177
|
+
|
|
7133
7178
|
declare interface T_ThrowResponseArgs {
|
|
7134
7179
|
message?: string;
|
|
7135
7180
|
status?: {
|