tering-serieuze-types 2.8.0 → 2.10.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/index.js CHANGED
@@ -34,6 +34,7 @@ __export(src_exports, {
34
34
  BigBrotherItem: () => BigBrotherItem,
35
35
  Button: () => Button,
36
36
  City: () => City,
37
+ CustomApplicationProperties: () => CustomApplicationProperties,
37
38
  DeletePodDto: () => DeletePodDto,
38
39
  EmulateFireDepartmentDto: () => EmulateFireDepartmentDto,
39
40
  Jingle: () => Jingle,
@@ -63,6 +64,8 @@ module.exports = __toCommonJS(src_exports);
63
64
  var import_swagger = require("@nestjs/swagger");
64
65
  var import_class_validator = require("class-validator");
65
66
  var import_class_transformer = require("class-transformer");
67
+ var CustomApplicationProperties = class {
68
+ };
66
69
  var Application = class {
67
70
  name;
68
71
  icon;
@@ -122,8 +125,9 @@ __decorateClass([
122
125
  (0, import_class_validator.IsNumber)()
123
126
  ], Application.prototype, "y", 2);
124
127
  __decorateClass([
125
- (0, import_swagger.ApiProperty)({ type: Object }),
126
- (0, import_class_validator.IsOptional)()
128
+ (0, import_swagger.ApiProperty)({ type: CustomApplicationProperties }),
129
+ (0, import_class_validator.IsOptional)(),
130
+ (0, import_class_transformer.Type)(() => CustomApplicationProperties)
127
131
  ], Application.prototype, "custom", 2);
128
132
  var WindowStateApplication = class extends (0, import_swagger.OmitType)(Application, ["icon", "isAdminOnly"]) {
129
133
  };
@@ -533,6 +537,7 @@ var P2000Payload = class {
533
537
  BigBrotherItem,
534
538
  Button,
535
539
  City,
540
+ CustomApplicationProperties,
536
541
  DeletePodDto,
537
542
  EmulateFireDepartmentDto,
538
543
  Jingle,
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "tering-serieuze-types",
3
- "version": "2.8.0",
3
+ "version": "2.10.0",
4
4
  "description": "Tering serieuze types",
5
5
  "author": "Frank",
6
6
  "repository": {
@@ -24,10 +24,10 @@
24
24
  "eslint-config-airbnb-base": "^15.0.0",
25
25
  "eslint-config-prettier": "^9.1.0",
26
26
  "eslint-plugin-prettier": "^5.1.3",
27
- "prettier": "^3.2.5"
27
+ "prettier": "^3.4.2"
28
28
  },
29
29
  "dependencies": {
30
- "@nestjs/swagger": "^7.1.16",
30
+ "@nestjs/swagger": "^11.0.2",
31
31
  "@simplewebauthn/types": "^10.0.0",
32
32
  "class-transformer": "^0.5.1",
33
33
  "class-validator": "^0.14.1"
@@ -2,6 +2,11 @@ import { ApiProperty, OmitType } from '@nestjs/swagger';
2
2
  import { IsBoolean, IsNotEmpty, IsNumber, IsOptional, IsString, ValidateNested } from 'class-validator';
3
3
  import { Type } from 'class-transformer';
4
4
 
5
+ export class CustomApplicationProperties {
6
+ // eslint-disable-next-line no-undef
7
+ [key: string]: string | number | boolean | string[] | number[] | boolean[] | (number | string)[];
8
+ }
9
+
5
10
  export class Application {
6
11
  @ApiProperty({ type: String })
7
12
  @IsNotEmpty()
@@ -47,9 +52,10 @@ export class Application {
47
52
  @IsNumber()
48
53
  y: number;
49
54
 
50
- @ApiProperty({ type: Object })
55
+ @ApiProperty({ type: CustomApplicationProperties })
51
56
  @IsOptional()
52
- custom: any;
57
+ @Type(() => CustomApplicationProperties)
58
+ custom: CustomApplicationProperties;
53
59
  }
54
60
 
55
61
  export class WindowStateApplication extends OmitType(Application, ['icon', 'isAdminOnly']) {}