@cv-tec/validations 0.6.0 → 0.6.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.
@@ -1,18 +1,16 @@
1
1
  import { RootClassValidation } from '../../index';
2
2
  import { ICvTheme } from '../../theme';
3
- export interface IThemeDto {
4
- $ownerId: string;
5
- $id: string;
6
- $timestamp: number;
7
- $baseTheme: string;
3
+ export type IThemeInputDto = Omit<ThemeInputDto, keyof RootClassValidation>;
4
+ export declare class ThemeInputDto extends RootClassValidation {
5
+ constructor(themeDto: IThemeInputDto);
6
+ baseTheme: string;
8
7
  themeOverride: ICvTheme;
9
8
  }
10
- export declare class ThemeDto extends RootClassValidation {
11
- constructor(themeDto: IThemeDto);
9
+ export type IThemeEntity = Omit<ThemeEntity, keyof RootClassValidation>;
10
+ export declare class ThemeEntity extends ThemeInputDto {
11
+ constructor(themeEntity: IThemeEntity);
12
12
  $ownerId: string;
13
13
  $id: string;
14
14
  $timestamp: number;
15
- $baseTheme: string;
16
- themeOverride: ICvTheme;
17
15
  }
18
16
  //# sourceMappingURL=theme.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"theme.d.ts","sourceRoot":"","sources":["../../../src/type-validation/dto/theme.ts"],"names":[],"mappings":"AACA,OAAO,EAAwB,mBAAmB,EAAE,MAAM,SAAS,CAAA;AACnE,OAAO,EAAE,QAAQ,EAAE,MAAM,SAAS,CAAA;AAGlC,MAAM,WAAW,SAAS;IACxB,QAAQ,EAAE,MAAM,CAAA;IAChB,GAAG,EAAE,MAAM,CAAA;IACX,UAAU,EAAE,MAAM,CAAA;IAClB,UAAU,EAAE,MAAM,CAAA;IAClB,aAAa,EAAE,QAAQ,CAAA;CACxB;AACD,qBAAa,QAAS,SAAQ,mBAAmB;gBACnC,QAAQ,EAAE,SAAS;IAI/B,QAAQ,EAAG,MAAM,CAAA;IAGjB,GAAG,EAAG,MAAM,CAAA;IAGZ,UAAU,EAAG,MAAM,CAAA;IAInB,UAAU,EAAG,MAAM,CAAA;IAGnB,aAAa,EAAG,QAAQ,CAAA;CACzB"}
1
+ {"version":3,"file":"theme.d.ts","sourceRoot":"","sources":["../../../src/type-validation/dto/theme.ts"],"names":[],"mappings":"AACA,OAAO,EAAwB,mBAAmB,EAAE,MAAM,SAAS,CAAA;AACnE,OAAO,EAAE,QAAQ,EAAE,MAAM,SAAS,CAAA;AAGlC,MAAM,MAAM,cAAc,GAAG,IAAI,CAAC,aAAa,EAAE,MAAM,mBAAmB,CAAC,CAAA;AAC3E,qBAAa,aAAc,SAAQ,mBAAmB;gBACxC,QAAQ,EAAE,cAAc;IAMpC,SAAS,EAAG,MAAM,CAAA;IAGlB,aAAa,EAAG,QAAQ,CAAA;CACzB;AAED,MAAM,MAAM,YAAY,GAAG,IAAI,CAAC,WAAW,EAAE,MAAM,mBAAmB,CAAC,CAAA;AAEvE,qBAAa,WAAY,SAAQ,aAAa;gBAChC,WAAW,EAAE,YAAY;IAKrC,QAAQ,EAAG,MAAM,CAAA;IAGjB,GAAG,EAAG,MAAM,CAAA;IAGZ,UAAU,EAAG,MAAM,CAAA;CACpB"}
@@ -9,35 +9,41 @@ var __metadata = (this && this.__metadata) || function (k, v) {
9
9
  if (typeof Reflect === "object" && typeof Reflect.metadata === "function") return Reflect.metadata(k, v);
10
10
  };
11
11
  Object.defineProperty(exports, "__esModule", { value: true });
12
- exports.ThemeDto = void 0;
12
+ exports.ThemeEntity = exports.ThemeInputDto = void 0;
13
13
  const validateThemeJsonShema_1 = require("../../custom-decorators/class-validators/validateThemeJsonShema");
14
14
  const index_1 = require("../../index");
15
15
  const class_validator_1 = require("class-validator");
16
- class ThemeDto extends index_1.RootClassValidation {
16
+ class ThemeInputDto extends index_1.RootClassValidation {
17
17
  constructor(themeDto) {
18
18
  super(themeDto);
19
19
  }
20
20
  }
21
- exports.ThemeDto = ThemeDto;
21
+ exports.ThemeInputDto = ThemeInputDto;
22
+ __decorate([
23
+ (0, class_validator_1.IsString)(),
24
+ (0, class_validator_1.Length)(5, 50, index_1.LENGTH_CONSTRAIN_MSG),
25
+ __metadata("design:type", String)
26
+ ], ThemeInputDto.prototype, "baseTheme", void 0);
27
+ __decorate([
28
+ (0, validateThemeJsonShema_1.ValidateThemeSchema)(),
29
+ __metadata("design:type", Object)
30
+ ], ThemeInputDto.prototype, "themeOverride", void 0);
31
+ class ThemeEntity extends ThemeInputDto {
32
+ constructor(themeEntity) {
33
+ super(themeEntity);
34
+ }
35
+ }
36
+ exports.ThemeEntity = ThemeEntity;
22
37
  __decorate([
23
38
  (0, class_validator_1.IsUUID)(),
24
39
  __metadata("design:type", String)
25
- ], ThemeDto.prototype, "$ownerId", void 0);
40
+ ], ThemeEntity.prototype, "$ownerId", void 0);
26
41
  __decorate([
27
42
  (0, class_validator_1.IsUUID)(),
28
43
  __metadata("design:type", String)
29
- ], ThemeDto.prototype, "$id", void 0);
44
+ ], ThemeEntity.prototype, "$id", void 0);
30
45
  __decorate([
31
46
  (0, class_validator_1.IsInt)(),
32
47
  __metadata("design:type", Number)
33
- ], ThemeDto.prototype, "$timestamp", void 0);
34
- __decorate([
35
- (0, class_validator_1.IsString)(),
36
- (0, class_validator_1.Length)(5, 50, index_1.LENGTH_CONSTRAIN_MSG),
37
- __metadata("design:type", String)
38
- ], ThemeDto.prototype, "$baseTheme", void 0);
39
- __decorate([
40
- (0, validateThemeJsonShema_1.ValidateThemeSchema)(),
41
- __metadata("design:type", Object)
42
- ], ThemeDto.prototype, "themeOverride", void 0);
48
+ ], ThemeEntity.prototype, "$timestamp", void 0);
43
49
  //# sourceMappingURL=theme.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"theme.js","sourceRoot":"","sources":["../../../src/type-validation/dto/theme.ts"],"names":[],"mappings":";;;;;;;;;;;;AAAA,wGAAiG;AACjG,mCAAmE;AAEnE,qDAAiE;AASjE,MAAa,QAAS,SAAQ,2BAAmB;IAC/C,YAAY,QAAmB;QAC7B,KAAK,CAAC,QAAQ,CAAC,CAAA;IACjB,CAAC;CAgBF;AAnBD,4BAmBC;AAdC;IADC,IAAA,wBAAM,GAAE;;0CACQ;AAGjB;IADC,IAAA,wBAAM,GAAE;;qCACG;AAGZ;IADC,IAAA,uBAAK,GAAE;;4CACW;AAInB;IAFC,IAAA,0BAAQ,GAAE;IACV,IAAA,wBAAM,EAAC,CAAC,EAAE,EAAE,EAAE,4BAAoB,CAAC;;4CACjB;AAGnB;IADC,IAAA,4CAAmB,GAAE;;+CACE"}
1
+ {"version":3,"file":"theme.js","sourceRoot":"","sources":["../../../src/type-validation/dto/theme.ts"],"names":[],"mappings":";;;;;;;;;;;;AAAA,wGAAiG;AACjG,mCAAmE;AAEnE,qDAAiE;AAGjE,MAAa,aAAc,SAAQ,2BAAmB;IACpD,YAAY,QAAwB;QAClC,KAAK,CAAC,QAAQ,CAAC,CAAA;IACjB,CAAC;CAQF;AAXD,sCAWC;AAJC;IAFC,IAAA,0BAAQ,GAAE;IACV,IAAA,wBAAM,EAAC,CAAC,EAAE,EAAE,EAAE,4BAAoB,CAAC;;gDAClB;AAGlB;IADC,IAAA,4CAAmB,GAAE;;oDACE;AAK1B,MAAa,WAAY,SAAQ,aAAa;IAC5C,YAAY,WAAyB;QACnC,KAAK,CAAC,WAAW,CAAC,CAAA;IACpB,CAAC;CAUF;AAbD,kCAaC;AAPC;IADC,IAAA,wBAAM,GAAE;;6CACQ;AAGjB;IADC,IAAA,wBAAM,GAAE;;wCACG;AAGZ;IADC,IAAA,uBAAK,GAAE;;+CACW"}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@cv-tec/validations",
3
- "version": "0.6.0",
3
+ "version": "0.6.1",
4
4
  "private": false,
5
5
  "main": "./dist/index.js",
6
6
  "types": "./dist/index.d.ts",