@cyberskill/shared 1.44.0 → 1.45.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 +37 -43
- package/dist/_tsup-dts-rollup.d.ts +37 -43
- package/dist/index.cjs +1 -1
- package/dist/index.d.cts +4 -7
- package/dist/index.d.ts +4 -7
- package/dist/index.js +1 -1
- package/dist/nodejs/index.cjs +1 -1
- package/dist/nodejs/index.d.cts +3 -7
- package/dist/nodejs/index.d.ts +3 -7
- package/dist/nodejs/index.js +1 -1
- package/dist/nodejs/mongo.cjs +1 -1
- package/dist/nodejs/mongo.d.cts +5 -2
- package/dist/nodejs/mongo.d.ts +5 -2
- package/dist/nodejs/mongo.js +1 -1
- package/dist/typescript/index.cjs +1 -1
- package/dist/typescript/index.js +1 -1
- package/dist/typescript/mongo.cjs +1 -1
- package/dist/typescript/mongo.d.cts +48 -0
- package/dist/typescript/mongo.d.ts +48 -0
- package/dist/typescript/mongo.js +1 -1
- package/dist/utils/index.cjs +1 -1
- package/dist/utils/index.d.cts +1 -0
- package/dist/utils/index.d.ts +1 -0
- package/dist/utils/index.js +1 -1
- package/dist/utils/validate.cjs +1 -0
- package/dist/utils/validate.d.cts +1 -0
- package/dist/utils/validate.d.ts +1 -0
- package/dist/utils/validate.js +1 -0
- package/package.json +1 -6
- package/dist/nodejs/mongoose.cjs +0 -1
- package/dist/nodejs/mongoose.d.cts +0 -7
- package/dist/nodejs/mongoose.d.ts +0 -7
- package/dist/nodejs/mongoose.js +0 -1
- package/dist/typescript/mongoose.cjs +0 -1
- package/dist/typescript/mongoose.d.cts +0 -48
- package/dist/typescript/mongoose.d.ts +0 -48
- package/dist/typescript/mongoose.js +0 -1
|
@@ -27,7 +27,7 @@ import type { JSX } from 'react';
|
|
|
27
27
|
import { JSX as JSX_2 } from 'react/jsx-runtime';
|
|
28
28
|
import type { Locale } from 'date-fns';
|
|
29
29
|
import { Model } from 'mongoose';
|
|
30
|
-
import type
|
|
30
|
+
import type { default as mongoose_2 } from 'mongoose';
|
|
31
31
|
import mongoosePaginate from 'mongoose-paginate-v2';
|
|
32
32
|
import type { OptionalUnlessRequiredId } from 'mongodb';
|
|
33
33
|
import type { PaginateModel } from 'mongoose';
|
|
@@ -124,28 +124,6 @@ declare function createGraphqlCodegenConfig({ uri, from, to, withComponent, with
|
|
|
124
124
|
export { createGraphqlCodegenConfig }
|
|
125
125
|
export { createGraphqlCodegenConfig as createGraphqlCodegenConfig_alias_1 }
|
|
126
126
|
|
|
127
|
-
declare function createModel<T extends Partial<C_Document_2>>({ mongoose, name, schema, pagination, aggregate, virtuals, middlewares, }: I_CreateModelOptions_2<T>): I_ExtendedModel_2<T>;
|
|
128
|
-
export { createModel }
|
|
129
|
-
export { createModel as createModel_alias_1 }
|
|
130
|
-
export { createModel as createModel_alias_2 }
|
|
131
|
-
|
|
132
|
-
declare function createMongoGenericFields({ returnDateAs, }?: {
|
|
133
|
-
returnDateAs?: 'string' | 'date';
|
|
134
|
-
}): I_GenericDocument_2;
|
|
135
|
-
export { createMongoGenericFields }
|
|
136
|
-
export { createMongoGenericFields as createMongoGenericFields_alias_1 }
|
|
137
|
-
export { createMongoGenericFields as createMongoGenericFields_alias_2 }
|
|
138
|
-
|
|
139
|
-
declare function createSchema<T extends Partial<C_Document_2>>({ mongoose, schema, virtuals, standalone, }: I_CreateSchemaOptions_2<T>): T_MongooseShema_2<T>;
|
|
140
|
-
export { createSchema }
|
|
141
|
-
export { createSchema as createSchema_alias_1 }
|
|
142
|
-
export { createSchema as createSchema_alias_2 }
|
|
143
|
-
|
|
144
|
-
declare function createSlugQuery<T>(slug: string, filters?: T_FilterQuery_2<T>, id?: string): T_CreateSlugQueryResponse_2<T>;
|
|
145
|
-
export { createSlugQuery }
|
|
146
|
-
export { createSlugQuery as createSlugQuery_alias_1 }
|
|
147
|
-
export { createSlugQuery as createSlugQuery_alias_2 }
|
|
148
|
-
|
|
149
127
|
declare function deepMerge(...configs: (I_Config_2 | I_Config_2[])[]): I_Config_2;
|
|
150
128
|
export { deepMerge }
|
|
151
129
|
export { deepMerge as deepMerge_alias_1 }
|
|
@@ -5979,11 +5957,6 @@ export { getLatestPackageVersion }
|
|
|
5979
5957
|
export { getLatestPackageVersion as getLatestPackageVersion_alias_1 }
|
|
5980
5958
|
export { getLatestPackageVersion as getLatestPackageVersion_alias_2 }
|
|
5981
5959
|
|
|
5982
|
-
declare function getMongoDateTime(now?: Date): string;
|
|
5983
|
-
export { getMongoDateTime }
|
|
5984
|
-
export { getMongoDateTime as getMongoDateTime_alias_1 }
|
|
5985
|
-
export { getMongoDateTime as getMongoDateTime_alias_2 }
|
|
5986
|
-
|
|
5987
5960
|
declare function getStoredErrorLists(): Promise<I_ErrorEntry_2[]>;
|
|
5988
5961
|
export { getStoredErrorLists }
|
|
5989
5962
|
export { getStoredErrorLists as getStoredErrorLists_alias_1 }
|
|
@@ -6319,7 +6292,7 @@ declare interface I_MongooseModelMiddleware_2<T extends Partial<C_Document_2>> {
|
|
|
6319
6292
|
}
|
|
6320
6293
|
|
|
6321
6294
|
declare interface I_MongooseOptions<T extends Partial<C_Document>> {
|
|
6322
|
-
mongoose: typeof
|
|
6295
|
+
mongoose: typeof mongoose_2;
|
|
6323
6296
|
virtuals?: {
|
|
6324
6297
|
name: keyof T | string;
|
|
6325
6298
|
options?: I_VirtualOptions_2;
|
|
@@ -6331,7 +6304,7 @@ export { I_MongooseOptions as I_MongooseOptions_alias_1 }
|
|
|
6331
6304
|
export { I_MongooseOptions as I_MongooseOptions_alias_2 }
|
|
6332
6305
|
|
|
6333
6306
|
declare interface I_MongooseOptions_2<T extends Partial<C_Document_2>> {
|
|
6334
|
-
mongoose: typeof
|
|
6307
|
+
mongoose: typeof mongoose_2;
|
|
6335
6308
|
virtuals?: {
|
|
6336
6309
|
name: keyof T | string;
|
|
6337
6310
|
options?: I_VirtualOptions;
|
|
@@ -6534,6 +6507,16 @@ export { LoadingProvider }
|
|
|
6534
6507
|
export { LoadingProvider as LoadingProvider_alias_1 }
|
|
6535
6508
|
export { LoadingProvider as LoadingProvider_alias_2 }
|
|
6536
6509
|
|
|
6510
|
+
declare const mongo: {
|
|
6511
|
+
getDateTime(now?: Date): string;
|
|
6512
|
+
createGenericFields({ returnDateAs, }?: {
|
|
6513
|
+
returnDateAs?: "string" | "date";
|
|
6514
|
+
}): I_GenericDocument_2;
|
|
6515
|
+
};
|
|
6516
|
+
export { mongo }
|
|
6517
|
+
export { mongo as mongo_alias_1 }
|
|
6518
|
+
export { mongo as mongo_alias_2 }
|
|
6519
|
+
|
|
6537
6520
|
declare class MongoController<D extends Partial<C_Document_2>> {
|
|
6538
6521
|
private collection;
|
|
6539
6522
|
constructor(db: C_Db_2, collectionName: string);
|
|
@@ -6587,6 +6570,24 @@ export { MongoController }
|
|
|
6587
6570
|
export { MongoController as MongoController_alias_1 }
|
|
6588
6571
|
export { MongoController as MongoController_alias_2 }
|
|
6589
6572
|
|
|
6573
|
+
declare const mongoose: {
|
|
6574
|
+
createSchema<T extends Partial<C_Document_2>>({ mongoose, schema, virtuals, standalone, }: I_CreateSchemaOptions_2<T>): T_MongooseShema_2<T>;
|
|
6575
|
+
createModel<T extends Partial<C_Document_2>>({ mongoose: currentMongooseInstance, name, schema, pagination, aggregate, virtuals, middlewares, }: I_CreateModelOptions_2<T>): I_ExtendedModel_2<T>;
|
|
6576
|
+
createSlugQuery<T>(slug: string, filters?: T_FilterQuery_2<T>, id?: string): T_CreateSlugQueryResponse_2<T>;
|
|
6577
|
+
validator: {
|
|
6578
|
+
isEmpty<T>(): (this: T, value: unknown) => Promise<boolean>;
|
|
6579
|
+
isUnique<T extends {
|
|
6580
|
+
constructor: {
|
|
6581
|
+
findOne: (query: Record<string, unknown>) => Promise<unknown>;
|
|
6582
|
+
};
|
|
6583
|
+
}>(fields: string[]): (this: T, value: unknown) => Promise<boolean>;
|
|
6584
|
+
matchesRegex(regexArray: RegExp[]): (value: string) => Promise<boolean>;
|
|
6585
|
+
};
|
|
6586
|
+
};
|
|
6587
|
+
export { mongoose }
|
|
6588
|
+
export { mongoose as mongoose_alias_1 }
|
|
6589
|
+
export { mongoose as mongoose_alias_2 }
|
|
6590
|
+
|
|
6590
6591
|
declare class MongooseController<T extends Partial<C_Document_2>> {
|
|
6591
6592
|
private model;
|
|
6592
6593
|
constructor(model: I_ExtendedModel_2<T>);
|
|
@@ -7073,12 +7074,12 @@ export { T_MongoosePlugin }
|
|
|
7073
7074
|
export { T_MongoosePlugin as T_MongoosePlugin_alias_1 }
|
|
7074
7075
|
export { T_MongoosePlugin as T_MongoosePlugin_alias_2 }
|
|
7075
7076
|
|
|
7076
|
-
declare type T_MongooseShema<T> =
|
|
7077
|
+
declare type T_MongooseShema<T> = mongoose_2.Schema<T>;
|
|
7077
7078
|
export { T_MongooseShema }
|
|
7078
7079
|
export { T_MongooseShema as T_MongooseShema_alias_1 }
|
|
7079
7080
|
export { T_MongooseShema as T_MongooseShema_alias_2 }
|
|
7080
7081
|
|
|
7081
|
-
declare type T_MongooseShema_2<T> =
|
|
7082
|
+
declare type T_MongooseShema_2<T> = mongoose_2.Schema<T>;
|
|
7082
7083
|
|
|
7083
7084
|
declare type T_NextIntlMessageList = Record<string, AbstractIntlMessages>;
|
|
7084
7085
|
export { T_NextIntlMessageList }
|
|
@@ -7255,19 +7256,12 @@ export { useTranslateNextIntl }
|
|
|
7255
7256
|
export { useTranslateNextIntl as useTranslateNextIntl_alias_1 }
|
|
7256
7257
|
export { useTranslateNextIntl as useTranslateNextIntl_alias_2 }
|
|
7257
7258
|
|
|
7258
|
-
declare const
|
|
7259
|
+
declare const validate: {
|
|
7259
7260
|
isEmpty(value: unknown): boolean;
|
|
7260
|
-
isEmptyValidator<T>(): (this: T, value: unknown) => Promise<boolean>;
|
|
7261
|
-
isUniqueValidator<T extends {
|
|
7262
|
-
constructor: {
|
|
7263
|
-
findOne: (query: Record<string, unknown>) => Promise<unknown>;
|
|
7264
|
-
};
|
|
7265
|
-
}>(fields: string[]): (this: T, value: unknown) => Promise<boolean>;
|
|
7266
|
-
matchesRegexValidator(regexArray: RegExp[]): (value: string) => Promise<boolean>;
|
|
7267
7261
|
};
|
|
7268
|
-
export {
|
|
7269
|
-
export {
|
|
7270
|
-
export {
|
|
7262
|
+
export { validate }
|
|
7263
|
+
export { validate as validate_alias_1 }
|
|
7264
|
+
export { validate as validate_alias_2 }
|
|
7271
7265
|
|
|
7272
7266
|
declare function withNextIntl<T extends {
|
|
7273
7267
|
children: T_Children_2;
|
|
@@ -27,7 +27,7 @@ import type { JSX } from 'react';
|
|
|
27
27
|
import { JSX as JSX_2 } from 'react/jsx-runtime';
|
|
28
28
|
import type { Locale } from 'date-fns';
|
|
29
29
|
import { Model } from 'mongoose';
|
|
30
|
-
import type
|
|
30
|
+
import type { default as mongoose_2 } from 'mongoose';
|
|
31
31
|
import mongoosePaginate from 'mongoose-paginate-v2';
|
|
32
32
|
import type { OptionalUnlessRequiredId } from 'mongodb';
|
|
33
33
|
import type { PaginateModel } from 'mongoose';
|
|
@@ -124,28 +124,6 @@ declare function createGraphqlCodegenConfig({ uri, from, to, withComponent, with
|
|
|
124
124
|
export { createGraphqlCodegenConfig }
|
|
125
125
|
export { createGraphqlCodegenConfig as createGraphqlCodegenConfig_alias_1 }
|
|
126
126
|
|
|
127
|
-
declare function createModel<T extends Partial<C_Document_2>>({ mongoose, name, schema, pagination, aggregate, virtuals, middlewares, }: I_CreateModelOptions_2<T>): I_ExtendedModel_2<T>;
|
|
128
|
-
export { createModel }
|
|
129
|
-
export { createModel as createModel_alias_1 }
|
|
130
|
-
export { createModel as createModel_alias_2 }
|
|
131
|
-
|
|
132
|
-
declare function createMongoGenericFields({ returnDateAs, }?: {
|
|
133
|
-
returnDateAs?: 'string' | 'date';
|
|
134
|
-
}): I_GenericDocument_2;
|
|
135
|
-
export { createMongoGenericFields }
|
|
136
|
-
export { createMongoGenericFields as createMongoGenericFields_alias_1 }
|
|
137
|
-
export { createMongoGenericFields as createMongoGenericFields_alias_2 }
|
|
138
|
-
|
|
139
|
-
declare function createSchema<T extends Partial<C_Document_2>>({ mongoose, schema, virtuals, standalone, }: I_CreateSchemaOptions_2<T>): T_MongooseShema_2<T>;
|
|
140
|
-
export { createSchema }
|
|
141
|
-
export { createSchema as createSchema_alias_1 }
|
|
142
|
-
export { createSchema as createSchema_alias_2 }
|
|
143
|
-
|
|
144
|
-
declare function createSlugQuery<T>(slug: string, filters?: T_FilterQuery_2<T>, id?: string): T_CreateSlugQueryResponse_2<T>;
|
|
145
|
-
export { createSlugQuery }
|
|
146
|
-
export { createSlugQuery as createSlugQuery_alias_1 }
|
|
147
|
-
export { createSlugQuery as createSlugQuery_alias_2 }
|
|
148
|
-
|
|
149
127
|
declare function deepMerge(...configs: (I_Config_2 | I_Config_2[])[]): I_Config_2;
|
|
150
128
|
export { deepMerge }
|
|
151
129
|
export { deepMerge as deepMerge_alias_1 }
|
|
@@ -5979,11 +5957,6 @@ export { getLatestPackageVersion }
|
|
|
5979
5957
|
export { getLatestPackageVersion as getLatestPackageVersion_alias_1 }
|
|
5980
5958
|
export { getLatestPackageVersion as getLatestPackageVersion_alias_2 }
|
|
5981
5959
|
|
|
5982
|
-
declare function getMongoDateTime(now?: Date): string;
|
|
5983
|
-
export { getMongoDateTime }
|
|
5984
|
-
export { getMongoDateTime as getMongoDateTime_alias_1 }
|
|
5985
|
-
export { getMongoDateTime as getMongoDateTime_alias_2 }
|
|
5986
|
-
|
|
5987
5960
|
declare function getStoredErrorLists(): Promise<I_ErrorEntry_2[]>;
|
|
5988
5961
|
export { getStoredErrorLists }
|
|
5989
5962
|
export { getStoredErrorLists as getStoredErrorLists_alias_1 }
|
|
@@ -6319,7 +6292,7 @@ declare interface I_MongooseModelMiddleware_2<T extends Partial<C_Document_2>> {
|
|
|
6319
6292
|
}
|
|
6320
6293
|
|
|
6321
6294
|
declare interface I_MongooseOptions<T extends Partial<C_Document>> {
|
|
6322
|
-
mongoose: typeof
|
|
6295
|
+
mongoose: typeof mongoose_2;
|
|
6323
6296
|
virtuals?: {
|
|
6324
6297
|
name: keyof T | string;
|
|
6325
6298
|
options?: I_VirtualOptions_2;
|
|
@@ -6331,7 +6304,7 @@ export { I_MongooseOptions as I_MongooseOptions_alias_1 }
|
|
|
6331
6304
|
export { I_MongooseOptions as I_MongooseOptions_alias_2 }
|
|
6332
6305
|
|
|
6333
6306
|
declare interface I_MongooseOptions_2<T extends Partial<C_Document_2>> {
|
|
6334
|
-
mongoose: typeof
|
|
6307
|
+
mongoose: typeof mongoose_2;
|
|
6335
6308
|
virtuals?: {
|
|
6336
6309
|
name: keyof T | string;
|
|
6337
6310
|
options?: I_VirtualOptions;
|
|
@@ -6534,6 +6507,16 @@ export { LoadingProvider }
|
|
|
6534
6507
|
export { LoadingProvider as LoadingProvider_alias_1 }
|
|
6535
6508
|
export { LoadingProvider as LoadingProvider_alias_2 }
|
|
6536
6509
|
|
|
6510
|
+
declare const mongo: {
|
|
6511
|
+
getDateTime(now?: Date): string;
|
|
6512
|
+
createGenericFields({ returnDateAs, }?: {
|
|
6513
|
+
returnDateAs?: "string" | "date";
|
|
6514
|
+
}): I_GenericDocument_2;
|
|
6515
|
+
};
|
|
6516
|
+
export { mongo }
|
|
6517
|
+
export { mongo as mongo_alias_1 }
|
|
6518
|
+
export { mongo as mongo_alias_2 }
|
|
6519
|
+
|
|
6537
6520
|
declare class MongoController<D extends Partial<C_Document_2>> {
|
|
6538
6521
|
private collection;
|
|
6539
6522
|
constructor(db: C_Db_2, collectionName: string);
|
|
@@ -6587,6 +6570,24 @@ export { MongoController }
|
|
|
6587
6570
|
export { MongoController as MongoController_alias_1 }
|
|
6588
6571
|
export { MongoController as MongoController_alias_2 }
|
|
6589
6572
|
|
|
6573
|
+
declare const mongoose: {
|
|
6574
|
+
createSchema<T extends Partial<C_Document_2>>({ mongoose, schema, virtuals, standalone, }: I_CreateSchemaOptions_2<T>): T_MongooseShema_2<T>;
|
|
6575
|
+
createModel<T extends Partial<C_Document_2>>({ mongoose: currentMongooseInstance, name, schema, pagination, aggregate, virtuals, middlewares, }: I_CreateModelOptions_2<T>): I_ExtendedModel_2<T>;
|
|
6576
|
+
createSlugQuery<T>(slug: string, filters?: T_FilterQuery_2<T>, id?: string): T_CreateSlugQueryResponse_2<T>;
|
|
6577
|
+
validator: {
|
|
6578
|
+
isEmpty<T>(): (this: T, value: unknown) => Promise<boolean>;
|
|
6579
|
+
isUnique<T extends {
|
|
6580
|
+
constructor: {
|
|
6581
|
+
findOne: (query: Record<string, unknown>) => Promise<unknown>;
|
|
6582
|
+
};
|
|
6583
|
+
}>(fields: string[]): (this: T, value: unknown) => Promise<boolean>;
|
|
6584
|
+
matchesRegex(regexArray: RegExp[]): (value: string) => Promise<boolean>;
|
|
6585
|
+
};
|
|
6586
|
+
};
|
|
6587
|
+
export { mongoose }
|
|
6588
|
+
export { mongoose as mongoose_alias_1 }
|
|
6589
|
+
export { mongoose as mongoose_alias_2 }
|
|
6590
|
+
|
|
6590
6591
|
declare class MongooseController<T extends Partial<C_Document_2>> {
|
|
6591
6592
|
private model;
|
|
6592
6593
|
constructor(model: I_ExtendedModel_2<T>);
|
|
@@ -7073,12 +7074,12 @@ export { T_MongoosePlugin }
|
|
|
7073
7074
|
export { T_MongoosePlugin as T_MongoosePlugin_alias_1 }
|
|
7074
7075
|
export { T_MongoosePlugin as T_MongoosePlugin_alias_2 }
|
|
7075
7076
|
|
|
7076
|
-
declare type T_MongooseShema<T> =
|
|
7077
|
+
declare type T_MongooseShema<T> = mongoose_2.Schema<T>;
|
|
7077
7078
|
export { T_MongooseShema }
|
|
7078
7079
|
export { T_MongooseShema as T_MongooseShema_alias_1 }
|
|
7079
7080
|
export { T_MongooseShema as T_MongooseShema_alias_2 }
|
|
7080
7081
|
|
|
7081
|
-
declare type T_MongooseShema_2<T> =
|
|
7082
|
+
declare type T_MongooseShema_2<T> = mongoose_2.Schema<T>;
|
|
7082
7083
|
|
|
7083
7084
|
declare type T_NextIntlMessageList = Record<string, AbstractIntlMessages>;
|
|
7084
7085
|
export { T_NextIntlMessageList }
|
|
@@ -7255,19 +7256,12 @@ export { useTranslateNextIntl }
|
|
|
7255
7256
|
export { useTranslateNextIntl as useTranslateNextIntl_alias_1 }
|
|
7256
7257
|
export { useTranslateNextIntl as useTranslateNextIntl_alias_2 }
|
|
7257
7258
|
|
|
7258
|
-
declare const
|
|
7259
|
+
declare const validate: {
|
|
7259
7260
|
isEmpty(value: unknown): boolean;
|
|
7260
|
-
isEmptyValidator<T>(): (this: T, value: unknown) => Promise<boolean>;
|
|
7261
|
-
isUniqueValidator<T extends {
|
|
7262
|
-
constructor: {
|
|
7263
|
-
findOne: (query: Record<string, unknown>) => Promise<unknown>;
|
|
7264
|
-
};
|
|
7265
|
-
}>(fields: string[]): (this: T, value: unknown) => Promise<boolean>;
|
|
7266
|
-
matchesRegexValidator(regexArray: RegExp[]): (value: string) => Promise<boolean>;
|
|
7267
7261
|
};
|
|
7268
|
-
export {
|
|
7269
|
-
export {
|
|
7270
|
-
export {
|
|
7262
|
+
export { validate }
|
|
7263
|
+
export { validate as validate_alias_1 }
|
|
7264
|
+
export { validate as validate_alias_2 }
|
|
7271
7265
|
|
|
7272
7266
|
declare function withNextIntl<T extends {
|
|
7273
7267
|
children: T_Children_2;
|