@attraccess/database-entities 1.2.0 → 1.5.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/package.json +3 -3
- package/src/index.d.ts +2 -0
- package/src/index.js +5 -1
- package/src/index.js.map +1 -1
- package/src/lib/entities/attractap.entity.d.ts +9 -0
- package/src/lib/entities/attractap.entity.js +77 -0
- package/src/lib/entities/attractap.entity.js.map +1 -1
- package/src/lib/entities/authenticationDetail.entity.d.ts +6 -0
- package/src/lib/entities/authenticationDetail.entity.js +55 -1
- package/src/lib/entities/authenticationDetail.entity.js.map +1 -1
- package/src/lib/entities/billing-transaction.entity.js +5 -1
- package/src/lib/entities/billing-transaction.entity.js.map +1 -1
- package/src/lib/entities/email-template.entity.d.ts +4 -1
- package/src/lib/entities/email-template.entity.js +3 -0
- package/src/lib/entities/email-template.entity.js.map +1 -1
- package/src/lib/entities/form.d.ts +56 -0
- package/src/lib/entities/form.js +201 -0
- package/src/lib/entities/form.js.map +1 -0
- package/src/lib/entities/mqttServer.entity.js +3 -0
- package/src/lib/entities/mqttServer.entity.js.map +1 -1
- package/src/lib/entities/project-invitation.entity.d.ts +23 -0
- package/src/lib/entities/project-invitation.entity.js +98 -0
- package/src/lib/entities/project-invitation.entity.js.map +1 -0
- package/src/lib/entities/project-member.entity.d.ts +14 -0
- package/src/lib/entities/project-member.entity.js +61 -0
- package/src/lib/entities/project-member.entity.js.map +1 -0
- package/src/lib/entities/project.d.ts +17 -0
- package/src/lib/entities/project.js +89 -0
- package/src/lib/entities/project.js.map +1 -0
- package/src/lib/entities/resource-maintenance-schedule-time-interval-config.entity.d.ts +14 -0
- package/src/lib/entities/resource-maintenance-schedule-time-interval-config.entity.js +54 -0
- package/src/lib/entities/resource-maintenance-schedule-time-interval-config.entity.js.map +1 -0
- package/src/lib/entities/resource-maintenance-schedule-usage-count-config.entity.d.ts +11 -0
- package/src/lib/entities/resource-maintenance-schedule-usage-count-config.entity.js +40 -0
- package/src/lib/entities/resource-maintenance-schedule-usage-count-config.entity.js.map +1 -0
- package/src/lib/entities/resource-maintenance-schedule-usage-hours-config.entity.d.ts +13 -0
- package/src/lib/entities/resource-maintenance-schedule-usage-hours-config.entity.js +53 -0
- package/src/lib/entities/resource-maintenance-schedule-usage-hours-config.entity.js.map +1 -0
- package/src/lib/entities/resource-maintenance-schedule.entity.d.ts +23 -0
- package/src/lib/entities/resource-maintenance-schedule.entity.js +99 -0
- package/src/lib/entities/resource-maintenance-schedule.entity.js.map +1 -0
- package/src/lib/entities/resource.entity.d.ts +5 -0
- package/src/lib/entities/resource.entity.js +27 -0
- package/src/lib/entities/resource.entity.js.map +1 -1
- package/src/lib/entities/resource.maintenance.d.ts +6 -0
- package/src/lib/entities/resource.maintenance.js +37 -0
- package/src/lib/entities/resource.maintenance.js.map +1 -1
- package/src/lib/entities/resourceFlowLog.js +1 -0
- package/src/lib/entities/resourceFlowLog.js.map +1 -1
- package/src/lib/entities/resourceFlowNode.d.ts +7 -51
- package/src/lib/entities/resourceFlowNode.js +17 -1
- package/src/lib/entities/resourceFlowNode.js.map +1 -1
- package/src/lib/entities/resourceIntroductionHistoryItem.entity.js +1 -0
- package/src/lib/entities/resourceIntroductionHistoryItem.entity.js.map +1 -1
- package/src/lib/entities/resourceUsage.entity.d.ts +6 -0
- package/src/lib/entities/resourceUsage.entity.js +36 -0
- package/src/lib/entities/resourceUsage.entity.js.map +1 -1
- package/src/lib/entities/session.entity.js +3 -0
- package/src/lib/entities/session.entity.js.map +1 -1
- package/src/lib/entities/ssoProvider.entity.d.ts +5 -2
- package/src/lib/entities/ssoProvider.entity.js +12 -0
- package/src/lib/entities/ssoProvider.entity.js.map +1 -1
- package/src/lib/entities/ssoProvider.oidc.d.ts +2 -0
- package/src/lib/entities/ssoProvider.oidc.js +15 -0
- package/src/lib/entities/ssoProvider.oidc.js.map +1 -1
- package/src/lib/entities/ssoProvider.saml.d.ts +23 -0
- package/src/lib/entities/ssoProvider.saml.js +177 -0
- package/src/lib/entities/ssoProvider.saml.js.map +1 -0
- package/src/lib/entities/user.entity.d.ts +13 -0
- package/src/lib/entities/user.entity.js +62 -0
- package/src/lib/entities/user.entity.js.map +1 -1
- package/src/lib/entities-index.d.ts +23 -4
- package/src/lib/entities-index.js +42 -4
- package/src/lib/entities-index.js.map +1 -1
- package/src/lib/types/authenticationType.enum.d.ts +2 -1
- package/src/lib/types/authenticationType.enum.js +1 -0
- package/src/lib/types/authenticationType.enum.js.map +1 -1
- package/src/lib/types/usageDurationUnit.enum.d.ts +5 -0
- package/src/lib/types/usageDurationUnit.enum.js +10 -0
- package/src/lib/types/usageDurationUnit.enum.js.map +1 -0
- package/src/lib/entities/revokedToken.entity.d.ts +0 -5
- package/src/lib/entities/revokedToken.entity.js +0 -35
- package/src/lib/entities/revokedToken.entity.js.map +0 -1
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@attraccess/database-entities",
|
|
3
|
-
"version": "1.2
|
|
3
|
+
"version": "1.5.2",
|
|
4
4
|
"private": false,
|
|
5
5
|
"type": "commonjs",
|
|
6
6
|
"main": "./src/index.js",
|
|
@@ -18,8 +18,8 @@
|
|
|
18
18
|
"!**/*.tsbuildinfo"
|
|
19
19
|
],
|
|
20
20
|
"dependencies": {
|
|
21
|
-
"tslib": "^2.
|
|
22
|
-
"typeorm": "0.3.
|
|
21
|
+
"tslib": "^2.8.1",
|
|
22
|
+
"typeorm": "0.3.28",
|
|
23
23
|
"@nestjs/swagger": "^11.2.0",
|
|
24
24
|
"class-transformer": "^0.5.1",
|
|
25
25
|
"class-validator": "^0.14.2",
|
package/src/index.d.ts
CHANGED
|
@@ -2,3 +2,5 @@ export * from './lib/entities-index';
|
|
|
2
2
|
export * from './lib/types/authenticationType.enum';
|
|
3
3
|
export * from './lib/types/documentationType.enum';
|
|
4
4
|
export { EmailTemplateType } from './lib/entities/email-template.entity';
|
|
5
|
+
export { ProjectMemberRole } from './lib/entities/project-member.entity';
|
|
6
|
+
export { ProjectInvitationStatus } from './lib/entities/project-invitation.entity';
|
package/src/index.js
CHANGED
|
@@ -1,10 +1,14 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.EmailTemplateType = void 0;
|
|
3
|
+
exports.ProjectInvitationStatus = exports.ProjectMemberRole = exports.EmailTemplateType = void 0;
|
|
4
4
|
const tslib_1 = require("tslib");
|
|
5
5
|
tslib_1.__exportStar(require("./lib/entities-index"), exports);
|
|
6
6
|
tslib_1.__exportStar(require("./lib/types/authenticationType.enum"), exports);
|
|
7
7
|
tslib_1.__exportStar(require("./lib/types/documentationType.enum"), exports);
|
|
8
8
|
var email_template_entity_1 = require("./lib/entities/email-template.entity");
|
|
9
9
|
Object.defineProperty(exports, "EmailTemplateType", { enumerable: true, get: function () { return email_template_entity_1.EmailTemplateType; } });
|
|
10
|
+
var project_member_entity_1 = require("./lib/entities/project-member.entity");
|
|
11
|
+
Object.defineProperty(exports, "ProjectMemberRole", { enumerable: true, get: function () { return project_member_entity_1.ProjectMemberRole; } });
|
|
12
|
+
var project_invitation_entity_1 = require("./lib/entities/project-invitation.entity");
|
|
13
|
+
Object.defineProperty(exports, "ProjectInvitationStatus", { enumerable: true, get: function () { return project_invitation_entity_1.ProjectInvitationStatus; } });
|
|
10
14
|
//# sourceMappingURL=index.js.map
|
package/src/index.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../libs/database-entities/src/index.ts"],"names":[],"mappings":";;;;AAAA,+DAAqC;AACrC,8EAAoD;AACpD,6EAAmD;AACnD,8EAAyE;AAAhE,0HAAA,iBAAiB,OAAA"}
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../libs/database-entities/src/index.ts"],"names":[],"mappings":";;;;AAAA,+DAAqC;AACrC,8EAAoD;AACpD,6EAAmD;AACnD,8EAAyE;AAAhE,0HAAA,iBAAiB,OAAA;AAC1B,8EAAyE;AAAhE,0HAAA,iBAAiB,OAAA;AAC1B,sFAAmF;AAA1E,oIAAA,uBAAuB,OAAA"}
|
|
@@ -1,8 +1,15 @@
|
|
|
1
1
|
import { Resource } from './resource.entity';
|
|
2
|
+
declare class AttractapCapabilities {
|
|
3
|
+
resourceSelection: boolean;
|
|
4
|
+
resourceActionSelection: boolean;
|
|
5
|
+
cardEnrollment: boolean;
|
|
6
|
+
hasLeds: boolean;
|
|
7
|
+
}
|
|
2
8
|
export declare class AttractapFirmwareVersion {
|
|
3
9
|
name: string | null;
|
|
4
10
|
variant: string | null;
|
|
5
11
|
version: string | null;
|
|
12
|
+
capabilities: AttractapCapabilities;
|
|
6
13
|
}
|
|
7
14
|
export declare class Attractap {
|
|
8
15
|
id: number;
|
|
@@ -11,5 +18,7 @@ export declare class Attractap {
|
|
|
11
18
|
resources: Resource[];
|
|
12
19
|
lastConnection: Date;
|
|
13
20
|
firstConnection: Date;
|
|
21
|
+
ledBrightness: number;
|
|
14
22
|
firmware: AttractapFirmwareVersion;
|
|
15
23
|
}
|
|
24
|
+
export {};
|
|
@@ -6,6 +6,60 @@ const typeorm_1 = require("typeorm");
|
|
|
6
6
|
const swagger_1 = require("@nestjs/swagger");
|
|
7
7
|
const class_transformer_1 = require("class-transformer");
|
|
8
8
|
const resource_entity_1 = require("./resource.entity");
|
|
9
|
+
class AttractapCapabilities {
|
|
10
|
+
}
|
|
11
|
+
tslib_1.__decorate([
|
|
12
|
+
(0, typeorm_1.Column)({
|
|
13
|
+
type: 'boolean',
|
|
14
|
+
nullable: false,
|
|
15
|
+
default: true,
|
|
16
|
+
}),
|
|
17
|
+
(0, swagger_1.ApiProperty)({
|
|
18
|
+
description: 'Whether the reader can choose from many linked resources or can only handle one',
|
|
19
|
+
example: true,
|
|
20
|
+
default: true,
|
|
21
|
+
}),
|
|
22
|
+
tslib_1.__metadata("design:type", Boolean)
|
|
23
|
+
], AttractapCapabilities.prototype, "resourceSelection", void 0);
|
|
24
|
+
tslib_1.__decorate([
|
|
25
|
+
(0, typeorm_1.Column)({
|
|
26
|
+
type: 'boolean',
|
|
27
|
+
nullable: false,
|
|
28
|
+
default: false,
|
|
29
|
+
}),
|
|
30
|
+
(0, swagger_1.ApiProperty)({
|
|
31
|
+
description: 'Whether the reader has interface options for triggering resource actions, if not a actions is triggered immediately upon scanning a nfc card',
|
|
32
|
+
example: true,
|
|
33
|
+
default: true,
|
|
34
|
+
}),
|
|
35
|
+
tslib_1.__metadata("design:type", Boolean)
|
|
36
|
+
], AttractapCapabilities.prototype, "resourceActionSelection", void 0);
|
|
37
|
+
tslib_1.__decorate([
|
|
38
|
+
(0, typeorm_1.Column)({
|
|
39
|
+
type: 'boolean',
|
|
40
|
+
nullable: false,
|
|
41
|
+
default: true,
|
|
42
|
+
}),
|
|
43
|
+
(0, swagger_1.ApiProperty)({
|
|
44
|
+
description: 'Whether the reader can enroll new cards',
|
|
45
|
+
example: true,
|
|
46
|
+
default: true,
|
|
47
|
+
}),
|
|
48
|
+
tslib_1.__metadata("design:type", Boolean)
|
|
49
|
+
], AttractapCapabilities.prototype, "cardEnrollment", void 0);
|
|
50
|
+
tslib_1.__decorate([
|
|
51
|
+
(0, typeorm_1.Column)({
|
|
52
|
+
type: 'boolean',
|
|
53
|
+
nullable: false,
|
|
54
|
+
default: false,
|
|
55
|
+
}),
|
|
56
|
+
(0, swagger_1.ApiProperty)({
|
|
57
|
+
description: 'Whether the reader has addressable LEDs',
|
|
58
|
+
example: false,
|
|
59
|
+
default: false,
|
|
60
|
+
}),
|
|
61
|
+
tslib_1.__metadata("design:type", Boolean)
|
|
62
|
+
], AttractapCapabilities.prototype, "hasLeds", void 0);
|
|
9
63
|
class AttractapFirmwareVersion {
|
|
10
64
|
}
|
|
11
65
|
exports.AttractapFirmwareVersion = AttractapFirmwareVersion;
|
|
@@ -14,6 +68,7 @@ tslib_1.__decorate([
|
|
|
14
68
|
type: 'text',
|
|
15
69
|
nullable: true,
|
|
16
70
|
}),
|
|
71
|
+
(0, swagger_1.ApiProperty)({ description: 'The name of the firmware', example: 'Attractap', nullable: true }),
|
|
17
72
|
tslib_1.__metadata("design:type", String)
|
|
18
73
|
], AttractapFirmwareVersion.prototype, "name", void 0);
|
|
19
74
|
tslib_1.__decorate([
|
|
@@ -21,6 +76,7 @@ tslib_1.__decorate([
|
|
|
21
76
|
type: 'text',
|
|
22
77
|
nullable: true,
|
|
23
78
|
}),
|
|
79
|
+
(0, swagger_1.ApiProperty)({ description: 'The variant of the firmware', example: 'eth', nullable: true }),
|
|
24
80
|
tslib_1.__metadata("design:type", String)
|
|
25
81
|
], AttractapFirmwareVersion.prototype, "variant", void 0);
|
|
26
82
|
tslib_1.__decorate([
|
|
@@ -28,8 +84,14 @@ tslib_1.__decorate([
|
|
|
28
84
|
type: 'text',
|
|
29
85
|
nullable: true,
|
|
30
86
|
}),
|
|
87
|
+
(0, swagger_1.ApiProperty)({ description: 'The version of the firmware', example: '1.0.0', nullable: true }),
|
|
31
88
|
tslib_1.__metadata("design:type", String)
|
|
32
89
|
], AttractapFirmwareVersion.prototype, "version", void 0);
|
|
90
|
+
tslib_1.__decorate([
|
|
91
|
+
(0, typeorm_1.Column)(() => AttractapCapabilities, { prefix: 'capabilities' }),
|
|
92
|
+
(0, swagger_1.ApiProperty)({ description: 'The capabilities of the reader', type: () => AttractapCapabilities }),
|
|
93
|
+
tslib_1.__metadata("design:type", AttractapCapabilities)
|
|
94
|
+
], AttractapFirmwareVersion.prototype, "capabilities", void 0);
|
|
33
95
|
let Attractap = class Attractap {
|
|
34
96
|
};
|
|
35
97
|
exports.Attractap = Attractap;
|
|
@@ -76,6 +138,21 @@ tslib_1.__decorate([
|
|
|
76
138
|
(0, swagger_1.ApiProperty)({ description: 'The first time the reader connected to the server' }),
|
|
77
139
|
tslib_1.__metadata("design:type", Date)
|
|
78
140
|
], Attractap.prototype, "firstConnection", void 0);
|
|
141
|
+
tslib_1.__decorate([
|
|
142
|
+
(0, typeorm_1.Column)({
|
|
143
|
+
type: 'integer',
|
|
144
|
+
nullable: false,
|
|
145
|
+
default: 255,
|
|
146
|
+
}),
|
|
147
|
+
(0, swagger_1.ApiProperty)({
|
|
148
|
+
description: 'Global LED brightness for the reader (0-255)',
|
|
149
|
+
example: 255,
|
|
150
|
+
default: 255,
|
|
151
|
+
minimum: 0,
|
|
152
|
+
maximum: 255,
|
|
153
|
+
}),
|
|
154
|
+
tslib_1.__metadata("design:type", Number)
|
|
155
|
+
], Attractap.prototype, "ledBrightness", void 0);
|
|
79
156
|
tslib_1.__decorate([
|
|
80
157
|
(0, typeorm_1.Column)(() => AttractapFirmwareVersion, { prefix: 'firmware' }),
|
|
81
158
|
(0, swagger_1.ApiProperty)({ description: 'The firmware of the reader', type: () => AttractapFirmwareVersion }),
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"attractap.entity.js","sourceRoot":"","sources":["../../../../../../libs/database-entities/src/lib/entities/attractap.entity.ts"],"names":[],"mappings":";;;;AAAA,qCAAwF;AACxF,6CAA8C;AAC9C,yDAA4C;AAC5C,uDAA6C;AAE7C,MAAa,wBAAwB;
|
|
1
|
+
{"version":3,"file":"attractap.entity.js","sourceRoot":"","sources":["../../../../../../libs/database-entities/src/lib/entities/attractap.entity.ts"],"names":[],"mappings":";;;;AAAA,qCAAwF;AACxF,6CAA8C;AAC9C,yDAA4C;AAC5C,uDAA6C;AAE7C,MAAM,qBAAqB;CAiD1B;AAtCC;IAVC,IAAA,gBAAM,EAAC;QACN,IAAI,EAAE,SAAS;QACf,QAAQ,EAAE,KAAK;QACf,OAAO,EAAE,IAAI;KACd,CAAC;IACD,IAAA,qBAAW,EAAC;QACX,WAAW,EAAE,iFAAiF;QAC9F,OAAO,EAAE,IAAI;QACb,OAAO,EAAE,IAAI;KACd,CAAC;;gEAC0B;AAa5B;IAXC,IAAA,gBAAM,EAAC;QACN,IAAI,EAAE,SAAS;QACf,QAAQ,EAAE,KAAK;QACf,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,IAAA,gBAAM,EAAC;QACN,IAAI,EAAE,UAAU;QAChB,OAAO,EAAE,GAAG,EAAE,CAAC,mBAAmB;KACnC,CAAC;IACD,IAAA,qBAAW,EAAC,EAAE,WAAW,EAAE,mDAAmD,EAAE,CAAC;sCAChE,IAAI;kDAAC;AAcvB;IAZC,IAAA,gBAAM,EAAC;QACN,IAAI,EAAE,SAAS;QACf,QAAQ,EAAE,KAAK;QACf,OAAO,EAAE,GAAG;KACb,CAAC;IACD,IAAA,qBAAW,EAAC;QACX,WAAW,EAAE,8CAA8C;QAC3D,OAAO,EAAE,GAAG;QACZ,OAAO,EAAE,GAAG;QACZ,OAAO,EAAE,CAAC;QACV,OAAO,EAAE,GAAG;KACb,CAAC;;gDACqB;AAIvB;IAFC,IAAA,gBAAM,EAAC,GAAG,EAAE,CAAC,wBAAwB,EAAE,EAAE,MAAM,EAAE,UAAU,EAAE,CAAC;IAC9D,IAAA,qBAAW,EAAC,EAAE,WAAW,EAAE,4BAA4B,EAAE,IAAI,EAAE,GAAG,EAAE,CAAC,wBAAwB,EAAE,CAAC;sCACtF,wBAAwB;2CAAC;oBAtDzB,SAAS;IADrB,IAAA,gBAAM,GAAE;GACI,SAAS,CAuDrB"}
|
|
@@ -1,9 +1,15 @@
|
|
|
1
1
|
import { User } from './user.entity';
|
|
2
2
|
import { AuthenticationType } from '../types/authenticationType.enum';
|
|
3
|
+
import { SSOProviderType } from './ssoProvider.entity';
|
|
3
4
|
export declare class AuthenticationDetail {
|
|
4
5
|
id: number;
|
|
5
6
|
userId: number;
|
|
6
7
|
type: AuthenticationType;
|
|
7
8
|
password?: string;
|
|
9
|
+
providerType?: SSOProviderType | null;
|
|
10
|
+
providerId?: number | null;
|
|
11
|
+
ssoSubject?: string | null;
|
|
12
|
+
totpSecret?: string | null;
|
|
13
|
+
totpEnabledAt?: Date | null;
|
|
8
14
|
user: User;
|
|
9
15
|
}
|
|
@@ -4,8 +4,10 @@ exports.AuthenticationDetail = void 0;
|
|
|
4
4
|
const tslib_1 = require("tslib");
|
|
5
5
|
const typeorm_1 = require("typeorm");
|
|
6
6
|
const swagger_1 = require("@nestjs/swagger");
|
|
7
|
+
const class_transformer_1 = require("class-transformer");
|
|
7
8
|
const user_entity_1 = require("./user.entity");
|
|
8
9
|
const authenticationType_enum_1 = require("../types/authenticationType.enum");
|
|
10
|
+
const ssoProvider_entity_1 = require("./ssoProvider.entity");
|
|
9
11
|
let AuthenticationDetail = class AuthenticationDetail {
|
|
10
12
|
};
|
|
11
13
|
exports.AuthenticationDetail = AuthenticationDetail;
|
|
@@ -34,17 +36,67 @@ tslib_1.__decorate([
|
|
|
34
36
|
description: 'The type of authentication',
|
|
35
37
|
enum: authenticationType_enum_1.AuthenticationType,
|
|
36
38
|
example: authenticationType_enum_1.AuthenticationType.LOCAL_PASSWORD,
|
|
39
|
+
enumName: 'AuthenticationType',
|
|
37
40
|
}),
|
|
38
41
|
tslib_1.__metadata("design:type", String)
|
|
39
42
|
], AuthenticationDetail.prototype, "type", void 0);
|
|
40
43
|
tslib_1.__decorate([
|
|
41
44
|
(0, typeorm_1.Column)({ nullable: true, type: 'text' }),
|
|
45
|
+
(0, class_transformer_1.Exclude)(),
|
|
42
46
|
(0, swagger_1.ApiProperty)({
|
|
43
47
|
description: 'The hashed password (for local authentication)',
|
|
44
48
|
required: false,
|
|
45
49
|
}),
|
|
46
50
|
tslib_1.__metadata("design:type", String)
|
|
47
51
|
], AuthenticationDetail.prototype, "password", void 0);
|
|
52
|
+
tslib_1.__decorate([
|
|
53
|
+
(0, typeorm_1.Column)({
|
|
54
|
+
type: 'simple-enum',
|
|
55
|
+
enum: ssoProvider_entity_1.SSOProviderType,
|
|
56
|
+
nullable: true,
|
|
57
|
+
}),
|
|
58
|
+
(0, swagger_1.ApiProperty)({
|
|
59
|
+
description: 'The SSO provider type (for SSO authentication)',
|
|
60
|
+
enum: ssoProvider_entity_1.SSOProviderType,
|
|
61
|
+
enumName: 'SSOProviderType',
|
|
62
|
+
required: false,
|
|
63
|
+
}),
|
|
64
|
+
tslib_1.__metadata("design:type", String)
|
|
65
|
+
], AuthenticationDetail.prototype, "providerType", void 0);
|
|
66
|
+
tslib_1.__decorate([
|
|
67
|
+
(0, typeorm_1.Column)({ type: 'integer', nullable: true }),
|
|
68
|
+
(0, swagger_1.ApiProperty)({
|
|
69
|
+
description: 'The SSO provider ID (for SSO authentication)',
|
|
70
|
+
required: false,
|
|
71
|
+
}),
|
|
72
|
+
tslib_1.__metadata("design:type", Number)
|
|
73
|
+
], AuthenticationDetail.prototype, "providerId", void 0);
|
|
74
|
+
tslib_1.__decorate([
|
|
75
|
+
(0, typeorm_1.Column)({ type: 'text', nullable: true }),
|
|
76
|
+
(0, swagger_1.ApiProperty)({
|
|
77
|
+
description: 'The SSO subject/ID from the provider',
|
|
78
|
+
required: false,
|
|
79
|
+
}),
|
|
80
|
+
tslib_1.__metadata("design:type", String)
|
|
81
|
+
], AuthenticationDetail.prototype, "ssoSubject", void 0);
|
|
82
|
+
tslib_1.__decorate([
|
|
83
|
+
(0, typeorm_1.Column)({ type: 'text', nullable: true }),
|
|
84
|
+
(0, class_transformer_1.Exclude)(),
|
|
85
|
+
(0, swagger_1.ApiProperty)({
|
|
86
|
+
description: 'The TOTP secret (for authenticator apps)',
|
|
87
|
+
required: false,
|
|
88
|
+
}),
|
|
89
|
+
tslib_1.__metadata("design:type", String)
|
|
90
|
+
], AuthenticationDetail.prototype, "totpSecret", void 0);
|
|
91
|
+
tslib_1.__decorate([
|
|
92
|
+
(0, typeorm_1.Column)({ type: 'datetime', nullable: true }),
|
|
93
|
+
(0, class_transformer_1.Exclude)(),
|
|
94
|
+
(0, swagger_1.ApiProperty)({
|
|
95
|
+
description: 'When TOTP was enabled for the user',
|
|
96
|
+
required: false,
|
|
97
|
+
}),
|
|
98
|
+
tslib_1.__metadata("design:type", Date)
|
|
99
|
+
], AuthenticationDetail.prototype, "totpEnabledAt", void 0);
|
|
48
100
|
tslib_1.__decorate([
|
|
49
101
|
(0, typeorm_1.ManyToOne)(() => user_entity_1.User, (user) => user.authenticationDetails, {
|
|
50
102
|
onDelete: 'CASCADE',
|
|
@@ -53,6 +105,8 @@ tslib_1.__decorate([
|
|
|
53
105
|
tslib_1.__metadata("design:type", user_entity_1.User)
|
|
54
106
|
], AuthenticationDetail.prototype, "user", void 0);
|
|
55
107
|
exports.AuthenticationDetail = AuthenticationDetail = tslib_1.__decorate([
|
|
56
|
-
(0, typeorm_1.Entity)()
|
|
108
|
+
(0, typeorm_1.Entity)(),
|
|
109
|
+
(0, typeorm_1.Index)(['userId', 'type'], { unique: true }),
|
|
110
|
+
(0, typeorm_1.Index)(['providerType', 'providerId', 'ssoSubject'], { unique: true, where: '"providerType" IS NOT NULL AND "providerId" IS NOT NULL AND "ssoSubject" IS NOT NULL' })
|
|
57
111
|
], AuthenticationDetail);
|
|
58
112
|
//# sourceMappingURL=authenticationDetail.entity.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"authenticationDetail.entity.js","sourceRoot":"","sources":["../../../../../../libs/database-entities/src/lib/entities/authenticationDetail.entity.ts"],"names":[],"mappings":";;;;AAAA,
|
|
1
|
+
{"version":3,"file":"authenticationDetail.entity.js","sourceRoot":"","sources":["../../../../../../libs/database-entities/src/lib/entities/authenticationDetail.entity.ts"],"names":[],"mappings":";;;;AAAA,qCAA+F;AAC/F,6CAA8C;AAC9C,yDAA4C;AAC5C,+CAAqC;AACrC,8EAAsE;AACtE,6DAAuD;AAKhD,IAAM,oBAAoB,GAA1B,MAAM,oBAAoB;CAmFhC,CAAA;AAnFY,oDAAoB;AAM/B;IALC,IAAA,gCAAsB,GAAE;IACxB,IAAA,qBAAW,EAAC;QACX,WAAW,EAAE,oDAAoD;QACjE,OAAO,EAAE,CAAC;KACX,CAAC;;gDACU;AAOZ;IALC,IAAA,gBAAM,EAAC,EAAE,IAAI,EAAE,SAAS,EAAE,CAAC;IAC3B,IAAA,qBAAW,EAAC;QACX,WAAW,EAAE,oBAA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Q,EAAE,IAAI,EAAE,CAAC;IACxC,IAAA,2BAAO,GAAE;IACT,IAAA,qBAAW,EAAC;QACX,WAAW,EAAE,0CAA0C;QACvD,QAAQ,EAAE,KAAK;KAChB,CAAC;;wDACyB;AAQ3B;IANC,IAAA,gBAAM,EAAC,EAAE,IAAI,EAAE,UAAU,EAAE,QAAQ,EAAE,IAAI,EAAE,CAAC;IAC5C,IAAA,2BAAO,GAAE;IACT,IAAA,qBAAW,EAAC;QACX,WAAW,EAAE,oCAAoC;QACjD,QAAQ,EAAE,KAAK;KAChB,CAAC;sCACc,IAAI;2DAAQ;AAM5B;IAJC,IAAA,mBAAS,EAAC,GAAG,EAAE,CAAC,kBAAI,EAAE,CAAC,IAAI,EAAE,EAAE,CAAC,IAAI,CAAC,qBAAqB,EAAE;QAC3D,QAAQ,EAAE,SAAS;KACpB,CAAC;IACD,IAAA,oBAAU,EAAC,EAAE,IAAI,EAAE,QAAQ,EAAE,CAAC;sCACxB,kBAAI;kDAAC;+BAlFD,oBAAoB;IAHhC,IAAA,gBAAM,GAAE;IACR,IAAA,eAAK,EAAC,CAAC,QAAQ,EAAE,MAAM,CAAC,EAAE,EAAE,MAAM,EAAE,IAAI,EAAE,CAAC;IAC3C,IAAA,eAAK,EAAC,CAAC,cAAc,EAAE,YAAY,EAAE,YAAY,CAAC,EAAE,EAAE,MAAM,EAAE,IAAI,EAAE,KAAK,EAAE,sFAAsF,EAAE,CAAC;GACxJ,oBAAoB,CAmFhC"}
|
|
@@ -101,7 +101,11 @@ tslib_1.__decorate([
|
|
|
101
101
|
], BillingTransaction.prototype, "externalReference", void 0);
|
|
102
102
|
tslib_1.__decorate([
|
|
103
103
|
(0, typeorm_1.Column)({ type: 'simple-enum', enum: BillingTransactionStatus }),
|
|
104
|
-
(0, swagger_1.ApiProperty)({
|
|
104
|
+
(0, swagger_1.ApiProperty)({
|
|
105
|
+
description: 'The status of the billing transaction',
|
|
106
|
+
enum: BillingTransactionStatus,
|
|
107
|
+
enumName: 'BillingTransactionStatus',
|
|
108
|
+
}),
|
|
105
109
|
tslib_1.__metadata("design:type", String)
|
|
106
110
|
], BillingTransaction.prototype, "status", void 0);
|
|
107
111
|
tslib_1.__decorate([
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"billing-transaction.entity.js","sourceRoot":"","sources":["../../../../../../libs/database-entities/src/lib/entities/billing-transaction.entity.ts"],"names":[],"mappings":";;;;AAAA,qCAUiB;AACjB,6CAA8C;AAC9C,+CAAqC;AACrC,iEAAuD;AACvD,uFAAsG;AAEtG,IAAY,wBAIX;AAJD,WAAY,wBAAwB;IAClC,+CAAmB,CAAA;IACnB,mDAAuB,CAAA;IACvB,6CAAiB,CAAA;AACnB,CAAC,EAJW,wBAAwB,wCAAxB,wBAAwB,QAInC;AAGM,IAAM,kBAAkB,GAAxB,MAAM,kBAAkB;
|
|
1
|
+
{"version":3,"file":"billing-transaction.entity.js","sourceRoot":"","sources":["../../../../../../libs/database-entities/src/lib/entities/billing-transaction.entity.ts"],"names":[],"mappings":";;;;AAAA,qCAUiB;AACjB,6CAA8C;AAC9C,+CAAqC;AACrC,iEAAuD;AACvD,uFAAsG;AAEtG,IAAY,wBAIX;AAJD,WAAY,wBAAwB;IAClC,+CAAmB,CAAA;IACnB,mDAAuB,CAAA;IACvB,6CAAiB,CAAA;AACnB,CAAC,EAJW,wBAAwB,wCAAxB,wBAAwB,QAInC;AAGM,IAAM,kBAAkB,GAAxB,MAAM,kBAAkB;CAwF9B,CAAA;AAxFY,gDAAkB;AAM7B;IALC,IAAA,gCAAsB,GAAE;IACxB,IAAA,qBAAW,EAAC;QACX,WAAW,EAAE,kDAAkD;QAC/D,OAAO,EAAE,CAAC;KACX,CAAC;;8CACU;AAOZ;IALC,IAAA,gBAAM,EAAC,EAAE,IAAI,EAAE,SAAS,EAAE,CAAC;IAC3B,IAAA,qBAAW,EAAC;QACX,WAAW,EAAE,oBAAoB;QACjC,OAAO,EAAE,CAAC;KACX,CAAC;;kDAC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,IAAA,gBAAM,EAAC,EAAE,IAAI,EAAE,aAAa,EAAE,IAAI,EAAE,wBAAwB,EAAE,CAAC;IAC/D,IAAA,qBAAW,EAAC;QACX,WAAW,EAAE,uCAAuC;QACpD,IAAI,EAAE,wBAAwB;QAC9B,QAAQ,EAAE,0BAA0B;KACrC,CAAC;;kDACgC;AAUlC;IARC,IAAA,mBAAS,EAAC,GAAG,EAAE,CAAC,wDAAuB,EAAE,CAAC,UAAU,EAAE,EAAE,CAAC,UAAU,CAAC,kBAAkB,EAAE;QACvF,QAAQ,EAAE,SAAS;KACpB,CAAC;IACD,IAAA,qBAAW,EAAC;QACX,WAAW,EAAE,6CAA6C;QAC1D,IAAI,EAAE,GAAG,EAAE,CAAC,wDAAuB;QACnC,OAAO,EAAE,IAAI;KACd,CAAC;;iDACgC;6BAvFvB,kBAAkB;IAD9B,IAAA,gBAAM,GAAE;GACI,kBAAkB,CAwF9B"}
|
|
@@ -1,9 +1,12 @@
|
|
|
1
1
|
export declare enum EmailTemplateType {
|
|
2
2
|
VERIFY_EMAIL = "verify-email",
|
|
3
|
+
USER_INVITATION = "user-invitation",
|
|
3
4
|
RESET_PASSWORD = "reset-password",
|
|
4
5
|
USERNAME_CHANGED = "username-changed",
|
|
5
6
|
PASSWORD_CHANGED = "password-changed",
|
|
6
|
-
RESOURCE_USAGE_BILLING_TRANSACTION_SUMMARY = "resource-usage-billing-transaction-summary"
|
|
7
|
+
RESOURCE_USAGE_BILLING_TRANSACTION_SUMMARY = "resource-usage-billing-transaction-summary",
|
|
8
|
+
PROJECT_INVITATION = "project-invitation",
|
|
9
|
+
DELETE_ACCOUNT_CONFIRMATION = "delete-account-confirmation"
|
|
7
10
|
}
|
|
8
11
|
export declare class EmailTemplate {
|
|
9
12
|
type: EmailTemplateType;
|
|
@@ -8,10 +8,13 @@ const swagger_1 = require("@nestjs/swagger");
|
|
|
8
8
|
var EmailTemplateType;
|
|
9
9
|
(function (EmailTemplateType) {
|
|
10
10
|
EmailTemplateType["VERIFY_EMAIL"] = "verify-email";
|
|
11
|
+
EmailTemplateType["USER_INVITATION"] = "user-invitation";
|
|
11
12
|
EmailTemplateType["RESET_PASSWORD"] = "reset-password";
|
|
12
13
|
EmailTemplateType["USERNAME_CHANGED"] = "username-changed";
|
|
13
14
|
EmailTemplateType["PASSWORD_CHANGED"] = "password-changed";
|
|
14
15
|
EmailTemplateType["RESOURCE_USAGE_BILLING_TRANSACTION_SUMMARY"] = "resource-usage-billing-transaction-summary";
|
|
16
|
+
EmailTemplateType["PROJECT_INVITATION"] = "project-invitation";
|
|
17
|
+
EmailTemplateType["DELETE_ACCOUNT_CONFIRMATION"] = "delete-account-confirmation";
|
|
15
18
|
})(EmailTemplateType || (exports.EmailTemplateType = EmailTemplateType = {}));
|
|
16
19
|
let EmailTemplate = class EmailTemplate {
|
|
17
20
|
};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"email-template.entity.js","sourceRoot":"","sources":["../../../../../../libs/database-entities/src/lib/entities/email-template.entity.ts"],"names":[],"mappings":";;;;AAAA,qCAA4F;AAC5F,6CAA8C;AAE9C,oCAAoC;AACpC,IAAY,
|
|
1
|
+
{"version":3,"file":"email-template.entity.js","sourceRoot":"","sources":["../../../../../../libs/database-entities/src/lib/entities/email-template.entity.ts"],"names":[],"mappings":";;;;AAAA,qCAA4F;AAC5F,6CAA8C;AAE9C,oCAAoC;AACpC,IAAY,iBASX;AATD,WAAY,iBAAiB;IAC3B,kDAA6B,CAAA;IAC7B,wDAAmC,CAAA;IACnC,sDAAiC,CAAA;IACjC,0DAAqC,CAAA;IACrC,0DAAqC,CAAA;IACrC,8GAAyF,CAAA;IACzF,8DAAyC,CAAA;IACzC,gFAA2D,CAAA;AAC7D,CAAC,EATW,iBAAiB,iCAAjB,iBAAiB,QAS5B;AAGM,IAAM,aAAa,GAAnB,MAAM,aAAa;CAiCzB,CAAA;AAjCY,sCAAa;AAYxB;IAXC,IAAA,qBAAW,EAAC;QACX,WAAW,EAAE,sCAAsC;QACnD,OAAO,EAAE,cAAc;QACvB,IAAI,EAAE,iBAAiB;QACvB,QAAQ,EAAE,mBAAmB;KAC9B,CAAC;IACD,IAAA,uBAAa,EAAC;QACb,IAAI,EAAE,SAAS;QACf,MAAM,EAAE,GAAG;QACX,IAAI,EAAE,iBAAiB;KACxB,CAAC;;2CACuB;AAIzB;IAFC,IAAA,qBAAW,EAAC,EAAE,WAAW,EAAE,oBAAoB,EAAE,OAAO,EAAE,2BAA2B,EAAE,CAAC;IACxF,IAAA,gBAAM,EAAC,EAAE,IAAI,EAAE,SAAS,EAAE,MAAM,EAAE,GAAG,EAAE,CAAC;;8CACxB;AAIjB;IAFC,IAAA,qBAAW,EAAC,EAAE,WAAW,EAAE,gCAAgC,EAAE,CAAC;IAC9D,IAAA,gBAAM,EAAC,EAAE,IAAI,EAAE,MAAM,EAAE,CAAC;;2CACX;AAId;IAFC,IAAA,qBAAW,EAAC,EAAE,WAAW,EAAE,kCAAkC,EAAE,OAAO,EAAE,CAAC,UAAU,EAAE,SAAS,CAAC,EAAE,CAAC;IAClG,IAAA,gBAAM,EAAC,EAAE,IAAI,EAAE,cAAc,EAAE,CAAC;;gDACZ;AAIrB;IAFC,IAAA,qBAAW,EAAC,EAAE,WAAW,EAAE,4CAA4C,EAAE,CAAC;IAC1E,IAAA,0BAAgB,GAAE;sCACP,IAAI;gDAAC;AAIjB;IAFC,IAAA,qBAAW,EAAC,EAAE,WAAW,EAAE,iDAAiD,EAAE,CAAC;IAC/E,IAAA,0BAAgB,GAAE;sCACP,IAAI;gDAAC;wBAhCN,aAAa;IADzB,IAAA,gBAAM,EAAC,iBAAiB,CAAC;GACb,aAAa,CAiCzB"}
|
|
@@ -0,0 +1,56 @@
|
|
|
1
|
+
import { Resource } from './resource.entity';
|
|
2
|
+
import { User } from './user.entity';
|
|
3
|
+
import { ResourceUsage } from './resourceUsage.entity';
|
|
4
|
+
export declare enum FormFieldType {
|
|
5
|
+
TEXT = "text",
|
|
6
|
+
NUMBER = "number",
|
|
7
|
+
BOOLEAN = "boolean",
|
|
8
|
+
SELECT = "select"
|
|
9
|
+
}
|
|
10
|
+
export declare enum ResourceFormAction {
|
|
11
|
+
START = "start",
|
|
12
|
+
TAKEOVER = "takeover",
|
|
13
|
+
END = "end"
|
|
14
|
+
}
|
|
15
|
+
export declare class Form {
|
|
16
|
+
id: number;
|
|
17
|
+
createdAt: Date;
|
|
18
|
+
updatedAt: Date;
|
|
19
|
+
name: string;
|
|
20
|
+
isRequiredOnResourceUsageStart: boolean;
|
|
21
|
+
isRequiredOnResourceUsageTakeOver: boolean;
|
|
22
|
+
isRequiredOnResourceUsageEnd: boolean;
|
|
23
|
+
fields: FormField[];
|
|
24
|
+
submissions: FormSubmission[];
|
|
25
|
+
resourceId: number;
|
|
26
|
+
resource: Resource;
|
|
27
|
+
}
|
|
28
|
+
export declare class FormField {
|
|
29
|
+
id: number;
|
|
30
|
+
formId: number;
|
|
31
|
+
form: Form;
|
|
32
|
+
name: string;
|
|
33
|
+
type: FormFieldType;
|
|
34
|
+
isRequired: boolean;
|
|
35
|
+
description: string | null;
|
|
36
|
+
options: Record<string, unknown> | string[] | null;
|
|
37
|
+
}
|
|
38
|
+
interface FormSubmissionFieldData {
|
|
39
|
+
value: string;
|
|
40
|
+
fieldDefinition: FormField;
|
|
41
|
+
}
|
|
42
|
+
type FormSubmissionData = Record<string, FormSubmissionFieldData>;
|
|
43
|
+
export declare class FormSubmission {
|
|
44
|
+
id: number;
|
|
45
|
+
formId: number;
|
|
46
|
+
form: Form;
|
|
47
|
+
data: FormSubmissionData;
|
|
48
|
+
createdAt: Date;
|
|
49
|
+
updatedAt: Date;
|
|
50
|
+
userId: number;
|
|
51
|
+
user: User;
|
|
52
|
+
resourceUsageId: number;
|
|
53
|
+
resourceUsage: ResourceUsage;
|
|
54
|
+
action: ResourceFormAction;
|
|
55
|
+
}
|
|
56
|
+
export {};
|
|
@@ -0,0 +1,201 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.FormSubmission = exports.FormField = exports.Form = exports.ResourceFormAction = exports.FormFieldType = void 0;
|
|
4
|
+
const tslib_1 = require("tslib");
|
|
5
|
+
const swagger_1 = require("@nestjs/swagger");
|
|
6
|
+
const typeorm_1 = require("typeorm");
|
|
7
|
+
const resource_entity_1 = require("./resource.entity");
|
|
8
|
+
const user_entity_1 = require("./user.entity");
|
|
9
|
+
const resourceUsage_entity_1 = require("./resourceUsage.entity");
|
|
10
|
+
var FormFieldType;
|
|
11
|
+
(function (FormFieldType) {
|
|
12
|
+
FormFieldType["TEXT"] = "text";
|
|
13
|
+
FormFieldType["NUMBER"] = "number";
|
|
14
|
+
FormFieldType["BOOLEAN"] = "boolean";
|
|
15
|
+
FormFieldType["SELECT"] = "select";
|
|
16
|
+
})(FormFieldType || (exports.FormFieldType = FormFieldType = {}));
|
|
17
|
+
var ResourceFormAction;
|
|
18
|
+
(function (ResourceFormAction) {
|
|
19
|
+
ResourceFormAction["START"] = "start";
|
|
20
|
+
ResourceFormAction["TAKEOVER"] = "takeover";
|
|
21
|
+
ResourceFormAction["END"] = "end";
|
|
22
|
+
})(ResourceFormAction || (exports.ResourceFormAction = ResourceFormAction = {}));
|
|
23
|
+
let Form = class Form {
|
|
24
|
+
};
|
|
25
|
+
exports.Form = Form;
|
|
26
|
+
tslib_1.__decorate([
|
|
27
|
+
(0, typeorm_1.PrimaryGeneratedColumn)(),
|
|
28
|
+
(0, swagger_1.ApiProperty)({ description: 'The ID of the form' }),
|
|
29
|
+
tslib_1.__metadata("design:type", Number)
|
|
30
|
+
], Form.prototype, "id", void 0);
|
|
31
|
+
tslib_1.__decorate([
|
|
32
|
+
(0, typeorm_1.CreateDateColumn)(),
|
|
33
|
+
(0, swagger_1.ApiProperty)({ description: 'The date and time the form was created' }),
|
|
34
|
+
tslib_1.__metadata("design:type", Date)
|
|
35
|
+
], Form.prototype, "createdAt", void 0);
|
|
36
|
+
tslib_1.__decorate([
|
|
37
|
+
(0, typeorm_1.UpdateDateColumn)(),
|
|
38
|
+
(0, swagger_1.ApiProperty)({ description: 'The date and time the form was last updated' }),
|
|
39
|
+
tslib_1.__metadata("design:type", Date)
|
|
40
|
+
], Form.prototype, "updatedAt", void 0);
|
|
41
|
+
tslib_1.__decorate([
|
|
42
|
+
(0, typeorm_1.Column)({
|
|
43
|
+
type: 'text',
|
|
44
|
+
nullable: false,
|
|
45
|
+
}),
|
|
46
|
+
(0, swagger_1.ApiProperty)({ description: 'The name of the form' }),
|
|
47
|
+
tslib_1.__metadata("design:type", String)
|
|
48
|
+
], Form.prototype, "name", void 0);
|
|
49
|
+
tslib_1.__decorate([
|
|
50
|
+
(0, typeorm_1.Column)({ type: 'boolean', default: false }),
|
|
51
|
+
(0, swagger_1.ApiProperty)({ description: 'Whether the form is required on resource usage start' }),
|
|
52
|
+
tslib_1.__metadata("design:type", Boolean)
|
|
53
|
+
], Form.prototype, "isRequiredOnResourceUsageStart", void 0);
|
|
54
|
+
tslib_1.__decorate([
|
|
55
|
+
(0, typeorm_1.Column)({ type: 'boolean', default: false }),
|
|
56
|
+
(0, swagger_1.ApiProperty)({ description: 'Whether the form is required on resource usage take over' }),
|
|
57
|
+
tslib_1.__metadata("design:type", Boolean)
|
|
58
|
+
], Form.prototype, "isRequiredOnResourceUsageTakeOver", void 0);
|
|
59
|
+
tslib_1.__decorate([
|
|
60
|
+
(0, typeorm_1.Column)({ type: 'boolean', default: false }),
|
|
61
|
+
(0, swagger_1.ApiProperty)({ description: 'Whether the form is required on resource usage end' }),
|
|
62
|
+
tslib_1.__metadata("design:type", Boolean)
|
|
63
|
+
], Form.prototype, "isRequiredOnResourceUsageEnd", void 0);
|
|
64
|
+
tslib_1.__decorate([
|
|
65
|
+
(0, typeorm_1.OneToMany)(() => FormField, (field) => field.form),
|
|
66
|
+
(0, swagger_1.ApiProperty)({ description: 'The fields of the form', type: () => FormField, isArray: true }),
|
|
67
|
+
tslib_1.__metadata("design:type", Array)
|
|
68
|
+
], Form.prototype, "fields", void 0);
|
|
69
|
+
tslib_1.__decorate([
|
|
70
|
+
(0, typeorm_1.OneToMany)(() => FormSubmission, (submission) => submission.form),
|
|
71
|
+
(0, swagger_1.ApiProperty)({ description: 'The submissions of the form', type: () => FormSubmission, isArray: true }),
|
|
72
|
+
tslib_1.__metadata("design:type", Array)
|
|
73
|
+
], Form.prototype, "submissions", void 0);
|
|
74
|
+
tslib_1.__decorate([
|
|
75
|
+
(0, typeorm_1.Column)({ type: 'integer' }),
|
|
76
|
+
(0, swagger_1.ApiProperty)({ description: 'The ID of the resource that the form belongs to' }),
|
|
77
|
+
tslib_1.__metadata("design:type", Number)
|
|
78
|
+
], Form.prototype, "resourceId", void 0);
|
|
79
|
+
tslib_1.__decorate([
|
|
80
|
+
(0, typeorm_1.ManyToOne)(() => resource_entity_1.Resource, (resource) => resource.forms),
|
|
81
|
+
(0, typeorm_1.JoinColumn)({ name: 'resourceId' }),
|
|
82
|
+
(0, swagger_1.ApiProperty)({ description: 'The resource that the form belongs to', type: () => resource_entity_1.Resource }),
|
|
83
|
+
tslib_1.__metadata("design:type", resource_entity_1.Resource)
|
|
84
|
+
], Form.prototype, "resource", void 0);
|
|
85
|
+
exports.Form = Form = tslib_1.__decorate([
|
|
86
|
+
(0, typeorm_1.Entity)()
|
|
87
|
+
], Form);
|
|
88
|
+
let FormField = class FormField {
|
|
89
|
+
};
|
|
90
|
+
exports.FormField = FormField;
|
|
91
|
+
tslib_1.__decorate([
|
|
92
|
+
(0, typeorm_1.PrimaryGeneratedColumn)(),
|
|
93
|
+
(0, swagger_1.ApiProperty)({ description: 'The ID of the form field' }),
|
|
94
|
+
tslib_1.__metadata("design:type", Number)
|
|
95
|
+
], FormField.prototype, "id", void 0);
|
|
96
|
+
tslib_1.__decorate([
|
|
97
|
+
(0, typeorm_1.Column)({ type: 'integer' }),
|
|
98
|
+
(0, swagger_1.ApiProperty)({ description: 'The ID of the form that the field belongs to' }),
|
|
99
|
+
tslib_1.__metadata("design:type", Number)
|
|
100
|
+
], FormField.prototype, "formId", void 0);
|
|
101
|
+
tslib_1.__decorate([
|
|
102
|
+
(0, typeorm_1.ManyToOne)(() => Form, (form) => form.fields),
|
|
103
|
+
(0, typeorm_1.JoinColumn)({ name: 'formId' }),
|
|
104
|
+
(0, swagger_1.ApiProperty)({ description: 'The form that the field belongs to', type: () => Form }),
|
|
105
|
+
tslib_1.__metadata("design:type", Form)
|
|
106
|
+
], FormField.prototype, "form", void 0);
|
|
107
|
+
tslib_1.__decorate([
|
|
108
|
+
(0, typeorm_1.Column)({ type: 'text' }),
|
|
109
|
+
(0, swagger_1.ApiProperty)({ description: 'The name of the form field' }),
|
|
110
|
+
tslib_1.__metadata("design:type", String)
|
|
111
|
+
], FormField.prototype, "name", void 0);
|
|
112
|
+
tslib_1.__decorate([
|
|
113
|
+
(0, typeorm_1.Column)({ type: 'simple-enum', enum: FormFieldType }),
|
|
114
|
+
(0, swagger_1.ApiProperty)({ description: 'The type of the form field', enum: FormFieldType, enumName: 'FormFieldType' }),
|
|
115
|
+
tslib_1.__metadata("design:type", String)
|
|
116
|
+
], FormField.prototype, "type", void 0);
|
|
117
|
+
tslib_1.__decorate([
|
|
118
|
+
(0, typeorm_1.Column)({ type: 'boolean', default: false }),
|
|
119
|
+
(0, swagger_1.ApiProperty)({ description: 'Whether the form field is required' }),
|
|
120
|
+
tslib_1.__metadata("design:type", Boolean)
|
|
121
|
+
], FormField.prototype, "isRequired", void 0);
|
|
122
|
+
tslib_1.__decorate([
|
|
123
|
+
(0, typeorm_1.Column)({ type: 'text', nullable: true }),
|
|
124
|
+
(0, swagger_1.ApiProperty)({ description: 'The description of the form field' }),
|
|
125
|
+
tslib_1.__metadata("design:type", String)
|
|
126
|
+
], FormField.prototype, "description", void 0);
|
|
127
|
+
tslib_1.__decorate([
|
|
128
|
+
(0, typeorm_1.Column)({ type: 'json', nullable: true }),
|
|
129
|
+
(0, swagger_1.ApiProperty)({ description: 'The options of the form field' }),
|
|
130
|
+
tslib_1.__metadata("design:type", Object)
|
|
131
|
+
], FormField.prototype, "options", void 0);
|
|
132
|
+
exports.FormField = FormField = tslib_1.__decorate([
|
|
133
|
+
(0, typeorm_1.Entity)()
|
|
134
|
+
], FormField);
|
|
135
|
+
let FormSubmission = class FormSubmission {
|
|
136
|
+
};
|
|
137
|
+
exports.FormSubmission = FormSubmission;
|
|
138
|
+
tslib_1.__decorate([
|
|
139
|
+
(0, typeorm_1.PrimaryGeneratedColumn)(),
|
|
140
|
+
(0, swagger_1.ApiProperty)({ description: 'The ID of the form submission' }),
|
|
141
|
+
tslib_1.__metadata("design:type", Number)
|
|
142
|
+
], FormSubmission.prototype, "id", void 0);
|
|
143
|
+
tslib_1.__decorate([
|
|
144
|
+
(0, typeorm_1.Column)({ type: 'integer' }),
|
|
145
|
+
(0, swagger_1.ApiProperty)({ description: 'The ID of the form that the submission belongs to' }),
|
|
146
|
+
tslib_1.__metadata("design:type", Number)
|
|
147
|
+
], FormSubmission.prototype, "formId", void 0);
|
|
148
|
+
tslib_1.__decorate([
|
|
149
|
+
(0, typeorm_1.ManyToOne)(() => Form, (form) => form.submissions),
|
|
150
|
+
(0, typeorm_1.JoinColumn)({ name: 'formId' }),
|
|
151
|
+
(0, swagger_1.ApiProperty)({ description: 'The form that the submission belongs to', type: () => Form }),
|
|
152
|
+
tslib_1.__metadata("design:type", Form)
|
|
153
|
+
], FormSubmission.prototype, "form", void 0);
|
|
154
|
+
tslib_1.__decorate([
|
|
155
|
+
(0, typeorm_1.Column)({ type: 'json' }),
|
|
156
|
+
(0, swagger_1.ApiProperty)({
|
|
157
|
+
description: 'The data of the form submission',
|
|
158
|
+
}),
|
|
159
|
+
tslib_1.__metadata("design:type", Object)
|
|
160
|
+
], FormSubmission.prototype, "data", void 0);
|
|
161
|
+
tslib_1.__decorate([
|
|
162
|
+
(0, typeorm_1.CreateDateColumn)(),
|
|
163
|
+
(0, swagger_1.ApiProperty)({ description: 'The date and time the submission was created' }),
|
|
164
|
+
tslib_1.__metadata("design:type", Date)
|
|
165
|
+
], FormSubmission.prototype, "createdAt", void 0);
|
|
166
|
+
tslib_1.__decorate([
|
|
167
|
+
(0, typeorm_1.UpdateDateColumn)(),
|
|
168
|
+
(0, swagger_1.ApiProperty)({ description: 'The date and time the submission was last updated' }),
|
|
169
|
+
tslib_1.__metadata("design:type", Date)
|
|
170
|
+
], FormSubmission.prototype, "updatedAt", void 0);
|
|
171
|
+
tslib_1.__decorate([
|
|
172
|
+
(0, typeorm_1.Column)({ type: 'integer' }),
|
|
173
|
+
(0, swagger_1.ApiProperty)({ description: 'The ID of the user that submitted the form' }),
|
|
174
|
+
tslib_1.__metadata("design:type", Number)
|
|
175
|
+
], FormSubmission.prototype, "userId", void 0);
|
|
176
|
+
tslib_1.__decorate([
|
|
177
|
+
(0, typeorm_1.ManyToOne)(() => user_entity_1.User, (user) => user.formSubmissions),
|
|
178
|
+
(0, typeorm_1.JoinColumn)({ name: 'userId' }),
|
|
179
|
+
(0, swagger_1.ApiProperty)({ description: 'The user that submitted the form', type: () => user_entity_1.User }),
|
|
180
|
+
tslib_1.__metadata("design:type", user_entity_1.User)
|
|
181
|
+
], FormSubmission.prototype, "user", void 0);
|
|
182
|
+
tslib_1.__decorate([
|
|
183
|
+
(0, typeorm_1.Column)({ type: 'integer' }),
|
|
184
|
+
(0, swagger_1.ApiProperty)({ description: 'The ID of the resource usage that the submission belongs to' }),
|
|
185
|
+
tslib_1.__metadata("design:type", Number)
|
|
186
|
+
], FormSubmission.prototype, "resourceUsageId", void 0);
|
|
187
|
+
tslib_1.__decorate([
|
|
188
|
+
(0, typeorm_1.ManyToOne)(() => resourceUsage_entity_1.ResourceUsage, (resourceUsage) => resourceUsage.formSubmissions),
|
|
189
|
+
(0, typeorm_1.JoinColumn)({ name: 'resourceUsageId' }),
|
|
190
|
+
(0, swagger_1.ApiProperty)({ description: 'The resource usage that the submission belongs to', type: () => resourceUsage_entity_1.ResourceUsage }),
|
|
191
|
+
tslib_1.__metadata("design:type", resourceUsage_entity_1.ResourceUsage)
|
|
192
|
+
], FormSubmission.prototype, "resourceUsage", void 0);
|
|
193
|
+
tslib_1.__decorate([
|
|
194
|
+
(0, typeorm_1.Column)({ type: 'text', default: ResourceFormAction.START }),
|
|
195
|
+
(0, swagger_1.ApiProperty)({ description: 'The action that triggered the submission', enum: ResourceFormAction }),
|
|
196
|
+
tslib_1.__metadata("design:type", String)
|
|
197
|
+
], FormSubmission.prototype, "action", void 0);
|
|
198
|
+
exports.FormSubmission = FormSubmission = tslib_1.__decorate([
|
|
199
|
+
(0, typeorm_1.Entity)()
|
|
200
|
+
], FormSubmission);
|
|
201
|
+
//# sourceMappingURL=form.js.map
|