tering-serieuze-types 2.8.0 → 2.9.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 +7 -2
- package/package.json +1 -1
- package/src/application.ts +8 -2
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:
|
|
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
package/src/application.ts
CHANGED
|
@@ -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:
|
|
55
|
+
@ApiProperty({ type: CustomApplicationProperties })
|
|
51
56
|
@IsOptional()
|
|
52
|
-
|
|
57
|
+
@Type(() => CustomApplicationProperties)
|
|
58
|
+
custom: CustomApplicationProperties;
|
|
53
59
|
}
|
|
54
60
|
|
|
55
61
|
export class WindowStateApplication extends OmitType(Application, ['icon', 'isAdminOnly']) {}
|