grm-shared-library 1.1.8 → 1.1.10

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.
Files changed (27) hide show
  1. package/dist/cjs/modules/dms/dtos/image-file-upload-options.dto.js +63 -0
  2. package/dist/cjs/modules/dms/dtos/image-file-upload-options.dto.js.map +1 -0
  3. package/dist/cjs/modules/dms/index.js +7 -3
  4. package/dist/cjs/modules/dms/index.js.map +1 -1
  5. package/dist/cjs/modules/dms/interfaces/{image-file-by-user.js → image-files-by-user.js} +1 -1
  6. package/dist/cjs/modules/dms/interfaces/image-files-by-user.js.map +1 -0
  7. package/dist/cjs/modules/dms/interfaces/{image-file-user-storage-info.js → image-files-user-storage-info.js} +1 -1
  8. package/dist/cjs/modules/dms/interfaces/image-files-user-storage-info.js.map +1 -0
  9. package/dist/esm/modules/dms/dtos/image-file-upload-options.dto.js +59 -0
  10. package/dist/esm/modules/dms/dtos/image-file-upload-options.dto.js.map +1 -0
  11. package/dist/esm/modules/dms/index.js +7 -3
  12. package/dist/esm/modules/dms/index.js.map +1 -1
  13. package/dist/esm/modules/dms/interfaces/image-files-by-user.js +2 -0
  14. package/dist/esm/modules/dms/interfaces/image-files-by-user.js.map +1 -0
  15. package/dist/esm/modules/dms/interfaces/image-files-user-storage-info.js +2 -0
  16. package/dist/esm/modules/dms/interfaces/image-files-user-storage-info.js.map +1 -0
  17. package/dist/types/modules/dms/dtos/image-file-upload-options.dto.d.ts +11 -0
  18. package/dist/types/modules/dms/index.d.ts +4 -3
  19. package/dist/types/modules/dms/interfaces/{image-file-by-user.d.ts → image-files-by-user.d.ts} +1 -1
  20. package/dist/types/modules/dms/interfaces/{image-file-user-storage-info.d.ts → image-files-user-storage-info.d.ts} +1 -1
  21. package/package.json +1 -1
  22. package/dist/cjs/modules/dms/interfaces/image-file-by-user.js.map +0 -1
  23. package/dist/cjs/modules/dms/interfaces/image-file-user-storage-info.js.map +0 -1
  24. package/dist/esm/modules/dms/interfaces/image-file-by-user.js +0 -2
  25. package/dist/esm/modules/dms/interfaces/image-file-by-user.js.map +0 -1
  26. package/dist/esm/modules/dms/interfaces/image-file-user-storage-info.js +0 -2
  27. package/dist/esm/modules/dms/interfaces/image-file-user-storage-info.js.map +0 -1
@@ -0,0 +1,63 @@
1
+ "use strict";
2
+ var __decorate = (this && this.__decorate) || function (decorators, target, key, desc) {
3
+ var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
4
+ if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
5
+ else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
6
+ return c > 3 && r && Object.defineProperty(target, key, r), r;
7
+ };
8
+ var __metadata = (this && this.__metadata) || function (k, v) {
9
+ if (typeof Reflect === "object" && typeof Reflect.metadata === "function") return Reflect.metadata(k, v);
10
+ };
11
+ Object.defineProperty(exports, "__esModule", { value: true });
12
+ exports.ImageFileUploadOptionsDto = void 0;
13
+ const class_validator_1 = require("class-validator");
14
+ class ImageFileUploadOptionsDto {
15
+ }
16
+ exports.ImageFileUploadOptionsDto = ImageFileUploadOptionsDto;
17
+ __decorate([
18
+ (0, class_validator_1.IsNumber)(),
19
+ (0, class_validator_1.IsNotEmpty)(),
20
+ __metadata("design:type", Number)
21
+ ], ImageFileUploadOptionsDto.prototype, "userId", void 0);
22
+ __decorate([
23
+ (0, class_validator_1.IsString)(),
24
+ (0, class_validator_1.IsOptional)(),
25
+ __metadata("design:type", String)
26
+ ], ImageFileUploadOptionsDto.prototype, "folder", void 0);
27
+ __decorate([
28
+ (0, class_validator_1.IsNumber)(),
29
+ (0, class_validator_1.IsOptional)(),
30
+ __metadata("design:type", Number)
31
+ ], ImageFileUploadOptionsDto.prototype, "maxSizeInMB", void 0);
32
+ __decorate([
33
+ (0, class_validator_1.IsString)({ each: true }),
34
+ (0, class_validator_1.IsOptional)(),
35
+ __metadata("design:type", Array)
36
+ ], ImageFileUploadOptionsDto.prototype, "allowedMimeTypes", void 0);
37
+ __decorate([
38
+ (0, class_validator_1.IsBoolean)(),
39
+ (0, class_validator_1.IsOptional)(),
40
+ __metadata("design:type", Boolean)
41
+ ], ImageFileUploadOptionsDto.prototype, "generateThumbnail", void 0);
42
+ __decorate([
43
+ (0, class_validator_1.IsBoolean)(),
44
+ (0, class_validator_1.IsOptional)(),
45
+ __metadata("design:type", Boolean)
46
+ ], ImageFileUploadOptionsDto.prototype, "makePublic", void 0);
47
+ __decorate([
48
+ (0, class_validator_1.IsArray)(),
49
+ (0, class_validator_1.IsString)({ each: true }),
50
+ (0, class_validator_1.IsOptional)(),
51
+ __metadata("design:type", Array)
52
+ ], ImageFileUploadOptionsDto.prototype, "tags", void 0);
53
+ __decorate([
54
+ (0, class_validator_1.IsString)(),
55
+ (0, class_validator_1.IsOptional)(),
56
+ __metadata("design:type", String)
57
+ ], ImageFileUploadOptionsDto.prototype, "alt", void 0);
58
+ __decorate([
59
+ (0, class_validator_1.IsString)(),
60
+ (0, class_validator_1.IsOptional)(),
61
+ __metadata("design:type", String)
62
+ ], ImageFileUploadOptionsDto.prototype, "caption", void 0);
63
+ //# sourceMappingURL=image-file-upload-options.dto.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"image-file-upload-options.dto.js","sourceRoot":"","sources":["../../../../../src/modules/dms/dtos/image-file-upload-options.dto.ts"],"names":[],"mappings":";;;;;;;;;;;;AAAA,qDAAiG;AAEjG,MAAa,yBAAyB;CAqCrC;AArCD,8DAqCC;AAlCG;IAFC,IAAA,0BAAQ,GAAE;IACV,IAAA,4BAAU,GAAE;;yDACG;AAIhB;IAFC,IAAA,0BAAQ,GAAE;IACV,IAAA,4BAAU,GAAE;;yDACG;AAIhB;IAFC,IAAA,0BAAQ,GAAE;IACV,IAAA,4BAAU,GAAE;;8DACQ;AAIrB;IAFC,IAAA,0BAAQ,EAAC,EAAE,IAAI,EAAE,IAAI,EAAE,CAAC;IACxB,IAAA,4BAAU,GAAE;;mEACe;AAI5B;IAFC,IAAA,2BAAS,GAAE;IACX,IAAA,4BAAU,GAAE;;oEACe;AAI5B;IAFC,IAAA,2BAAS,GAAE;IACX,IAAA,4BAAU,GAAE;;6DACQ;AAKrB;IAHC,IAAA,yBAAO,GAAE;IACT,IAAA,0BAAQ,EAAC,EAAE,IAAI,EAAE,IAAI,EAAE,CAAC;IACxB,IAAA,4BAAU,GAAE;;uDACG;AAIhB;IAFC,IAAA,0BAAQ,GAAE;IACV,IAAA,4BAAU,GAAE;;sDACA;AAIb;IAFC,IAAA,0BAAQ,GAAE;IACV,IAAA,4BAAU,GAAE;;0DACI"}
@@ -14,10 +14,14 @@ var __exportStar = (this && this.__exportStar) || function(m, exports) {
14
14
  for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
15
15
  };
16
16
  Object.defineProperty(exports, "__esModule", { value: true });
17
+ // Interfaces
17
18
  __exportStar(require("./interfaces/image-file"), exports);
18
- __exportStar(require("./enums/file-status"), exports);
19
19
  __exportStar(require("./interfaces/image-file-upload-options"), exports);
20
20
  __exportStar(require("./interfaces/image-file-metadata"), exports);
21
- __exportStar(require("./interfaces/image-file-user-storage-info"), exports);
22
- __exportStar(require("./interfaces/image-file-by-user"), exports);
21
+ __exportStar(require("./interfaces/image-files-user-storage-info"), exports);
22
+ __exportStar(require("./interfaces/image-files-by-user"), exports);
23
+ // Enums
24
+ __exportStar(require("./enums/file-status"), exports);
25
+ // DTOs
26
+ __exportStar(require("./dtos/image-file-upload-options.dto"), exports);
23
27
  //# sourceMappingURL=index.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../src/modules/dms/index.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;AAAA,0DAAwC;AACxC,sDAAoC;AACpC,yEAAuD;AACvD,mEAAiD;AACjD,4EAA0D;AAC1D,kEAAgD"}
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../src/modules/dms/index.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;AAAA,aAAa;AACb,0DAAwC;AACxC,yEAAuD;AACvD,mEAAiD;AACjD,6EAA2D;AAC3D,mEAAiD;AAEjD,QAAQ;AACR,sDAAoC;AAEpC,OAAO;AACP,uEAAqD"}
@@ -1,3 +1,3 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
- //# sourceMappingURL=image-file-by-user.js.map
3
+ //# sourceMappingURL=image-files-by-user.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"image-files-by-user.js","sourceRoot":"","sources":["../../../../../src/modules/dms/interfaces/image-files-by-user.ts"],"names":[],"mappings":""}
@@ -1,3 +1,3 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
- //# sourceMappingURL=image-file-user-storage-info.js.map
3
+ //# sourceMappingURL=image-files-user-storage-info.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"image-files-user-storage-info.js","sourceRoot":"","sources":["../../../../../src/modules/dms/interfaces/image-files-user-storage-info.ts"],"names":[],"mappings":""}
@@ -0,0 +1,59 @@
1
+ var __decorate = (this && this.__decorate) || function (decorators, target, key, desc) {
2
+ var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
3
+ if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
4
+ else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
5
+ return c > 3 && r && Object.defineProperty(target, key, r), r;
6
+ };
7
+ var __metadata = (this && this.__metadata) || function (k, v) {
8
+ if (typeof Reflect === "object" && typeof Reflect.metadata === "function") return Reflect.metadata(k, v);
9
+ };
10
+ import { IsArray, IsBoolean, IsNotEmpty, IsNumber, IsOptional, IsString } from "class-validator";
11
+ export class ImageFileUploadOptionsDto {
12
+ }
13
+ __decorate([
14
+ IsNumber(),
15
+ IsNotEmpty(),
16
+ __metadata("design:type", Number)
17
+ ], ImageFileUploadOptionsDto.prototype, "userId", void 0);
18
+ __decorate([
19
+ IsString(),
20
+ IsOptional(),
21
+ __metadata("design:type", String)
22
+ ], ImageFileUploadOptionsDto.prototype, "folder", void 0);
23
+ __decorate([
24
+ IsNumber(),
25
+ IsOptional(),
26
+ __metadata("design:type", Number)
27
+ ], ImageFileUploadOptionsDto.prototype, "maxSizeInMB", void 0);
28
+ __decorate([
29
+ IsString({ each: true }),
30
+ IsOptional(),
31
+ __metadata("design:type", Array)
32
+ ], ImageFileUploadOptionsDto.prototype, "allowedMimeTypes", void 0);
33
+ __decorate([
34
+ IsBoolean(),
35
+ IsOptional(),
36
+ __metadata("design:type", Boolean)
37
+ ], ImageFileUploadOptionsDto.prototype, "generateThumbnail", void 0);
38
+ __decorate([
39
+ IsBoolean(),
40
+ IsOptional(),
41
+ __metadata("design:type", Boolean)
42
+ ], ImageFileUploadOptionsDto.prototype, "makePublic", void 0);
43
+ __decorate([
44
+ IsArray(),
45
+ IsString({ each: true }),
46
+ IsOptional(),
47
+ __metadata("design:type", Array)
48
+ ], ImageFileUploadOptionsDto.prototype, "tags", void 0);
49
+ __decorate([
50
+ IsString(),
51
+ IsOptional(),
52
+ __metadata("design:type", String)
53
+ ], ImageFileUploadOptionsDto.prototype, "alt", void 0);
54
+ __decorate([
55
+ IsString(),
56
+ IsOptional(),
57
+ __metadata("design:type", String)
58
+ ], ImageFileUploadOptionsDto.prototype, "caption", void 0);
59
+ //# sourceMappingURL=image-file-upload-options.dto.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"image-file-upload-options.dto.js","sourceRoot":"","sources":["../../../../../src/modules/dms/dtos/image-file-upload-options.dto.ts"],"names":[],"mappings":";;;;;;;;;AAAA,OAAO,EAAE,OAAO,EAAE,SAAS,EAAE,UAAU,EAAE,QAAQ,EAAE,UAAU,EAAE,QAAQ,EAAE,MAAM,iBAAiB,CAAC;AAEjG,MAAM,OAAO,yBAAyB;CAqCrC;AAlCG;IAFC,QAAQ,EAAE;IACV,UAAU,EAAE;;yDACG;AAIhB;IAFC,QAAQ,EAAE;IACV,UAAU,EAAE;;yDACG;AAIhB;IAFC,QAAQ,EAAE;IACV,UAAU,EAAE;;8DACQ;AAIrB;IAFC,QAAQ,CAAC,EAAE,IAAI,EAAE,IAAI,EAAE,CAAC;IACxB,UAAU,EAAE;;mEACe;AAI5B;IAFC,SAAS,EAAE;IACX,UAAU,EAAE;;oEACe;AAI5B;IAFC,SAAS,EAAE;IACX,UAAU,EAAE;;6DACQ;AAKrB;IAHC,OAAO,EAAE;IACT,QAAQ,CAAC,EAAE,IAAI,EAAE,IAAI,EAAE,CAAC;IACxB,UAAU,EAAE;;uDACG;AAIhB;IAFC,QAAQ,EAAE;IACV,UAAU,EAAE;;sDACA;AAIb;IAFC,QAAQ,EAAE;IACV,UAAU,EAAE;;0DACI"}
@@ -1,7 +1,11 @@
1
+ // Interfaces
1
2
  export * from './interfaces/image-file';
2
- export * from './enums/file-status';
3
3
  export * from './interfaces/image-file-upload-options';
4
4
  export * from './interfaces/image-file-metadata';
5
- export * from './interfaces/image-file-user-storage-info';
6
- export * from './interfaces/image-file-by-user';
5
+ export * from './interfaces/image-files-user-storage-info';
6
+ export * from './interfaces/image-files-by-user';
7
+ // Enums
8
+ export * from './enums/file-status';
9
+ // DTOs
10
+ export * from './dtos/image-file-upload-options.dto';
7
11
  //# sourceMappingURL=index.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../src/modules/dms/index.ts"],"names":[],"mappings":"AAAA,cAAc,yBAAyB,CAAC;AACxC,cAAc,qBAAqB,CAAC;AACpC,cAAc,wCAAwC,CAAC;AACvD,cAAc,kCAAkC,CAAC;AACjD,cAAc,2CAA2C,CAAC;AAC1D,cAAc,iCAAiC,CAAC"}
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../src/modules/dms/index.ts"],"names":[],"mappings":"AAAA,aAAa;AACb,cAAc,yBAAyB,CAAC;AACxC,cAAc,wCAAwC,CAAC;AACvD,cAAc,kCAAkC,CAAC;AACjD,cAAc,4CAA4C,CAAC;AAC3D,cAAc,kCAAkC,CAAC;AAEjD,QAAQ;AACR,cAAc,qBAAqB,CAAC;AAEpC,OAAO;AACP,cAAc,sCAAsC,CAAC"}
@@ -0,0 +1,2 @@
1
+ export {};
2
+ //# sourceMappingURL=image-files-by-user.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"image-files-by-user.js","sourceRoot":"","sources":["../../../../../src/modules/dms/interfaces/image-files-by-user.ts"],"names":[],"mappings":""}
@@ -0,0 +1,2 @@
1
+ export {};
2
+ //# sourceMappingURL=image-files-user-storage-info.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"image-files-user-storage-info.js","sourceRoot":"","sources":["../../../../../src/modules/dms/interfaces/image-files-user-storage-info.ts"],"names":[],"mappings":""}
@@ -0,0 +1,11 @@
1
+ export declare class ImageFileUploadOptionsDto {
2
+ userId: number;
3
+ folder?: string;
4
+ maxSizeInMB?: number;
5
+ allowedMimeTypes?: string[];
6
+ generateThumbnail?: boolean;
7
+ makePublic?: boolean;
8
+ tags?: string[];
9
+ alt?: string;
10
+ caption?: string;
11
+ }
@@ -1,6 +1,7 @@
1
1
  export * from './interfaces/image-file';
2
- export * from './enums/file-status';
3
2
  export * from './interfaces/image-file-upload-options';
4
3
  export * from './interfaces/image-file-metadata';
5
- export * from './interfaces/image-file-user-storage-info';
6
- export * from './interfaces/image-file-by-user';
4
+ export * from './interfaces/image-files-user-storage-info';
5
+ export * from './interfaces/image-files-by-user';
6
+ export * from './enums/file-status';
7
+ export * from './dtos/image-file-upload-options.dto';
@@ -1,5 +1,5 @@
1
1
  import { ImageFile } from "./image-file";
2
- export interface ImageFileByUser {
2
+ export interface ImageFilesByUser {
3
3
  userId: number;
4
4
  images: ImageFile[];
5
5
  total: number;
@@ -1,4 +1,4 @@
1
- export interface ImageFileUserStorageInfo {
1
+ export interface ImageFilesUserStorageInfo {
2
2
  userId: number;
3
3
  totalSize: number;
4
4
  fileCount: number;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "grm-shared-library",
3
- "version": "1.1.8",
3
+ "version": "1.1.10",
4
4
  "main": "dist/cjs/index.js",
5
5
  "module": "dist/esm/index.js",
6
6
  "types": "dist/types/index.d.ts",
@@ -1 +0,0 @@
1
- {"version":3,"file":"image-file-by-user.js","sourceRoot":"","sources":["../../../../../src/modules/dms/interfaces/image-file-by-user.ts"],"names":[],"mappings":""}
@@ -1 +0,0 @@
1
- {"version":3,"file":"image-file-user-storage-info.js","sourceRoot":"","sources":["../../../../../src/modules/dms/interfaces/image-file-user-storage-info.ts"],"names":[],"mappings":""}
@@ -1,2 +0,0 @@
1
- export {};
2
- //# sourceMappingURL=image-file-by-user.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"image-file-by-user.js","sourceRoot":"","sources":["../../../../../src/modules/dms/interfaces/image-file-by-user.ts"],"names":[],"mappings":""}
@@ -1,2 +0,0 @@
1
- export {};
2
- //# sourceMappingURL=image-file-user-storage-info.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"image-file-user-storage-info.js","sourceRoot":"","sources":["../../../../../src/modules/dms/interfaces/image-file-user-storage-info.ts"],"names":[],"mappings":""}