denwa-nest-shared 1.2.0 → 1.2.2

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/types.d.ts CHANGED
@@ -24,6 +24,7 @@ export type QueryDataType<Entity> = {
24
24
  take: number;
25
25
  order?: FindOptionsOrder<Entity>;
26
26
  where?: FindOptionsWhere<Entity>[] | FindOptionsWhere<Entity>;
27
+ relations?: string[];
27
28
  };
28
29
  export type OkNotFoundType = IResponse<404 | 200>;
29
30
  export type OkNotFoundBadRequestType = IResponse<404 | 400 | 200>;
package/dist/types.js.map CHANGED
@@ -1 +1 @@
1
- {"version":3,"file":"types.js","sourceRoot":"","sources":["../src/types.ts"],"names":[],"mappings":"AAEA,MAAM,CAAN,IAAY,IAIX;AAJD,WAAY,IAAI;IACd,iBAAS,CAAA;IACT,iBAAS,CAAA;IACT,iBAAS,CAAA;AACX,CAAC,EAJW,IAAI,KAAJ,IAAI,QAIf;AAwED,MAAM,CAAN,IAAY,oBAMX;AAND,WAAY,oBAAoB;IAC9B,iDAA2B,CAAA;IAC3B,iDAA2B,CAAA;IAC3B,iDAA2B,CAAA;IAC3B,+CAAyB,CAAA;IACzB,6EAAuD,CAAA;AACzD,CAAC,EANW,oBAAoB,KAApB,oBAAoB,QAM/B","sourcesContent":["import { FindOptionsOrder, FindOptionsWhere } from 'typeorm';\n\nexport enum LANG {\n RU = 'ru',\n EN = 'en',\n AR = 'ar',\n}\n\nexport interface IResponse<StatusCode, Data = object> {\n statusCode: StatusCode;\n messages?: string[];\n message?: string;\n error?: string;\n data?: Data;\n}\nexport interface IPaginate {\n page: number;\n pages: number;\n previous?: number;\n next?: number;\n count: number;\n limit: number;\n}\n\nexport type QueryDataType<Entity> = {\n skip: number;\n take: number;\n order?: FindOptionsOrder<Entity>;\n where?: FindOptionsWhere<Entity>[] | FindOptionsWhere<Entity>;\n};\n\nexport type OkNotFoundType = IResponse<404 | 200>;\nexport type OkNotFoundBadRequestType = IResponse<404 | 400 | 200>;\nexport type OkNotFoundForbiddenType = IResponse<404 | 403 | 200>;\n\nexport type FilterType = 'and' | 'or';\nexport type SortOrderType = 'asc' | 'desc' | 'ASC' | 'DESC';\n\nexport interface IPreparedImage {\n name: string;\n fileExtensions?: string[];\n prefixes?: string[];\n originalFileExtension: string;\n entityId: string;\n folder?: string;\n fullPathExample: string;\n altRU?: string;\n altEN?: string;\n altAR?: string;\n}\n\nexport interface IPreparedFile {\n name: string;\n fullName: string;\n extension: string;\n entityId: string;\n fullPathExample: string;\n folder?: string;\n}\n\nexport interface IPreparedImageAndOrder extends IPreparedImage {\n order: number;\n}\n\nexport interface IPreparedFileAndOrder extends IPreparedFile {\n order: number;\n}\n\nexport interface IGetQuery {\n page?: number;\n limit?: number;\n sortField?: string;\n sortOrder?: SortOrderType;\n filterType?: FilterType;\n filter?: object;\n search?: object;\n}\n\nexport enum ImageContentTypeEnum {\n 'image/avif' = 'image/avif',\n 'image/webp' = 'image/webp',\n 'image/jpeg' = 'image/jpeg',\n 'image/png' = 'image/png',\n 'application/octet-stream' = 'application/octet-stream',\n}\n\nexport type NullToUndefined<T> = T extends null\n ? undefined\n : T extends (infer U)[]\n ? NullToUndefined<U>[]\n : T extends object\n ? { [K in keyof T]: NullToUndefined<T[K]> }\n : T;\n"]}
1
+ {"version":3,"file":"types.js","sourceRoot":"","sources":["../src/types.ts"],"names":[],"mappings":"AAEA,MAAM,CAAN,IAAY,IAIX;AAJD,WAAY,IAAI;IACd,iBAAS,CAAA;IACT,iBAAS,CAAA;IACT,iBAAS,CAAA;AACX,CAAC,EAJW,IAAI,KAAJ,IAAI,QAIf;AAyED,MAAM,CAAN,IAAY,oBAMX;AAND,WAAY,oBAAoB;IAC9B,iDAA2B,CAAA;IAC3B,iDAA2B,CAAA;IAC3B,iDAA2B,CAAA;IAC3B,+CAAyB,CAAA;IACzB,6EAAuD,CAAA;AACzD,CAAC,EANW,oBAAoB,KAApB,oBAAoB,QAM/B","sourcesContent":["import { FindOptionsOrder, FindOptionsWhere } from 'typeorm';\n\nexport enum LANG {\n RU = 'ru',\n EN = 'en',\n AR = 'ar',\n}\n\nexport interface IResponse<StatusCode, Data = object> {\n statusCode: StatusCode;\n messages?: string[];\n message?: string;\n error?: string;\n data?: Data;\n}\nexport interface IPaginate {\n page: number;\n pages: number;\n previous?: number;\n next?: number;\n count: number;\n limit: number;\n}\n\nexport type QueryDataType<Entity> = {\n skip: number;\n take: number;\n order?: FindOptionsOrder<Entity>;\n where?: FindOptionsWhere<Entity>[] | FindOptionsWhere<Entity>;\n relations?: string[];\n};\n\nexport type OkNotFoundType = IResponse<404 | 200>;\nexport type OkNotFoundBadRequestType = IResponse<404 | 400 | 200>;\nexport type OkNotFoundForbiddenType = IResponse<404 | 403 | 200>;\n\nexport type FilterType = 'and' | 'or';\nexport type SortOrderType = 'asc' | 'desc' | 'ASC' | 'DESC';\n\nexport interface IPreparedImage {\n name: string;\n fileExtensions?: string[];\n prefixes?: string[];\n originalFileExtension: string;\n entityId: string;\n folder?: string;\n fullPathExample: string;\n altRU?: string;\n altEN?: string;\n altAR?: string;\n}\n\nexport interface IPreparedFile {\n name: string;\n fullName: string;\n extension: string;\n entityId: string;\n fullPathExample: string;\n folder?: string;\n}\n\nexport interface IPreparedImageAndOrder extends IPreparedImage {\n order: number;\n}\n\nexport interface IPreparedFileAndOrder extends IPreparedFile {\n order: number;\n}\n\nexport interface IGetQuery {\n page?: number;\n limit?: number;\n sortField?: string;\n sortOrder?: SortOrderType;\n filterType?: FilterType;\n filter?: object;\n search?: object;\n}\n\nexport enum ImageContentTypeEnum {\n 'image/avif' = 'image/avif',\n 'image/webp' = 'image/webp',\n 'image/jpeg' = 'image/jpeg',\n 'image/png' = 'image/png',\n 'application/octet-stream' = 'application/octet-stream',\n}\n\nexport type NullToUndefined<T> = T extends null\n ? undefined\n : T extends (infer U)[]\n ? NullToUndefined<U>[]\n : T extends object\n ? { [K in keyof T]: NullToUndefined<T[K]> }\n : T;\n"]}
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "$schema": "https://json.schemastore.org/package.json",
3
3
  "name": "denwa-nest-shared",
4
- "version": "1.2.0",
4
+ "version": "1.2.2",
5
5
  "skills": "skills",
6
6
  "types": "./dist/index.d.ts",
7
7
  "main": "./cjs/index.js",