@attraccess/database-entities 1.6.0 → 1.8.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/package.json +1 -1
- package/src/lib/entities/attractapCrashReport.entity.d.ts +20 -0
- package/src/lib/entities/attractapCrashReport.entity.js +153 -0
- package/src/lib/entities/attractapCrashReport.entity.js.map +1 -0
- package/src/lib/entities/conversation-participant.entity.d.ts +11 -0
- package/src/lib/entities/conversation-participant.entity.js +61 -0
- package/src/lib/entities/conversation-participant.entity.js.map +1 -0
- package/src/lib/entities/conversation.entity.d.ts +5 -0
- package/src/lib/entities/conversation.entity.js +34 -0
- package/src/lib/entities/conversation.entity.js.map +1 -0
- package/src/lib/entities/email-template.entity.d.ts +8 -1
- package/src/lib/entities/email-template.entity.js +7 -0
- package/src/lib/entities/email-template.entity.js.map +1 -1
- package/src/lib/entities/message.entity.d.ts +19 -0
- package/src/lib/entities/message.entity.js +99 -0
- package/src/lib/entities/message.entity.js.map +1 -0
- package/src/lib/entities/notification-preference.entity.d.ts +9 -0
- package/src/lib/entities/notification-preference.entity.js +58 -0
- package/src/lib/entities/notification-preference.entity.js.map +1 -0
- package/src/lib/entities/push-subscription.entity.d.ts +12 -0
- package/src/lib/entities/push-subscription.entity.js +72 -0
- package/src/lib/entities/push-subscription.entity.js.map +1 -0
- package/src/lib/entities/resource-maintenance-request.entity.d.ts +21 -0
- package/src/lib/entities/resource-maintenance-request.entity.js +113 -0
- package/src/lib/entities/resource-maintenance-request.entity.js.map +1 -0
- package/src/lib/entities/resource.entity.d.ts +9 -0
- package/src/lib/entities/resource.entity.js +88 -0
- package/src/lib/entities/resource.entity.js.map +1 -1
- package/src/lib/entities/resource.supervision.d.ts +20 -0
- package/src/lib/entities/resource.supervision.js +26 -0
- package/src/lib/entities/resource.supervision.js.map +1 -0
- package/src/lib/entities/resourceGroup.entity.d.ts +4 -0
- package/src/lib/entities/resourceGroup.entity.js +38 -0
- package/src/lib/entities/resourceGroup.entity.js.map +1 -1
- package/src/lib/entities/resourceIntroducer.entity.d.ts +5 -0
- package/src/lib/entities/resourceIntroducer.entity.js +20 -1
- package/src/lib/entities/resourceIntroducer.entity.js.map +1 -1
- package/src/lib/entities/resourceIntroduction.entity.d.ts +1 -0
- package/src/lib/entities/resourceIntroduction.entity.js +10 -0
- package/src/lib/entities/resourceIntroduction.entity.js.map +1 -1
- package/src/lib/entities/resourceUsage.entity.d.ts +2 -0
- package/src/lib/entities/resourceUsage.entity.js +20 -0
- package/src/lib/entities/resourceUsage.entity.js.map +1 -1
- package/src/lib/entities-index.d.ts +17 -2
- package/src/lib/entities-index.js +29 -2
- package/src/lib/entities-index.js.map +1 -1
|
@@ -0,0 +1,72 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.PushSubscription = void 0;
|
|
4
|
+
const tslib_1 = require("tslib");
|
|
5
|
+
const typeorm_1 = require("typeorm");
|
|
6
|
+
const swagger_1 = require("@nestjs/swagger");
|
|
7
|
+
const user_entity_1 = require("./user.entity");
|
|
8
|
+
let PushSubscription = class PushSubscription {
|
|
9
|
+
};
|
|
10
|
+
exports.PushSubscription = PushSubscription;
|
|
11
|
+
tslib_1.__decorate([
|
|
12
|
+
(0, typeorm_1.PrimaryGeneratedColumn)(),
|
|
13
|
+
(0, swagger_1.ApiProperty)({ description: 'The unique identifier of the push subscription', example: 1 }),
|
|
14
|
+
tslib_1.__metadata("design:type", Number)
|
|
15
|
+
], PushSubscription.prototype, "id", void 0);
|
|
16
|
+
tslib_1.__decorate([
|
|
17
|
+
(0, typeorm_1.Column)({ type: 'integer' }),
|
|
18
|
+
(0, swagger_1.ApiProperty)({ description: 'The ID of the user this subscription belongs to', example: 1 }),
|
|
19
|
+
tslib_1.__metadata("design:type", Number)
|
|
20
|
+
], PushSubscription.prototype, "userId", void 0);
|
|
21
|
+
tslib_1.__decorate([
|
|
22
|
+
(0, typeorm_1.Column)({ type: 'text', unique: true }),
|
|
23
|
+
(0, swagger_1.ApiProperty)({
|
|
24
|
+
description: 'The push service endpoint URL that uniquely identifies this subscription (one per device/browser)',
|
|
25
|
+
example: 'https://fcm.googleapis.com/fcm/send/abc123',
|
|
26
|
+
}),
|
|
27
|
+
tslib_1.__metadata("design:type", String)
|
|
28
|
+
], PushSubscription.prototype, "endpoint", void 0);
|
|
29
|
+
tslib_1.__decorate([
|
|
30
|
+
(0, typeorm_1.Column)({ type: 'text' }),
|
|
31
|
+
(0, swagger_1.ApiProperty)({ description: 'The P-256 ECDH public key of the subscription, used to encrypt push payloads' }),
|
|
32
|
+
tslib_1.__metadata("design:type", String)
|
|
33
|
+
], PushSubscription.prototype, "p256dh", void 0);
|
|
34
|
+
tslib_1.__decorate([
|
|
35
|
+
(0, typeorm_1.Column)({ type: 'text' }),
|
|
36
|
+
(0, swagger_1.ApiProperty)({ description: 'The authentication secret of the subscription, used to encrypt push payloads' }),
|
|
37
|
+
tslib_1.__metadata("design:type", String)
|
|
38
|
+
], PushSubscription.prototype, "auth", void 0);
|
|
39
|
+
tslib_1.__decorate([
|
|
40
|
+
(0, typeorm_1.Column)({ type: 'text', nullable: true }),
|
|
41
|
+
(0, swagger_1.ApiProperty)({
|
|
42
|
+
description: 'The user agent of the browser that created this subscription, for display/debugging',
|
|
43
|
+
example: 'Mozilla/5.0 (X11; Linux x86_64) ...',
|
|
44
|
+
nullable: true,
|
|
45
|
+
}),
|
|
46
|
+
tslib_1.__metadata("design:type", String)
|
|
47
|
+
], PushSubscription.prototype, "userAgent", void 0);
|
|
48
|
+
tslib_1.__decorate([
|
|
49
|
+
(0, typeorm_1.CreateDateColumn)(),
|
|
50
|
+
(0, swagger_1.ApiProperty)({ description: 'When this subscription was created', example: '2025-01-18T12:30:00.000Z' }),
|
|
51
|
+
tslib_1.__metadata("design:type", Date)
|
|
52
|
+
], PushSubscription.prototype, "createdAt", void 0);
|
|
53
|
+
tslib_1.__decorate([
|
|
54
|
+
(0, typeorm_1.Column)({ type: 'datetime', nullable: true }),
|
|
55
|
+
(0, swagger_1.ApiProperty)({
|
|
56
|
+
description: 'When this subscription was last re-confirmed by the client',
|
|
57
|
+
example: '2025-01-18T12:30:00.000Z',
|
|
58
|
+
nullable: true,
|
|
59
|
+
}),
|
|
60
|
+
tslib_1.__metadata("design:type", Date)
|
|
61
|
+
], PushSubscription.prototype, "lastSeenAt", void 0);
|
|
62
|
+
tslib_1.__decorate([
|
|
63
|
+
(0, typeorm_1.ManyToOne)(() => user_entity_1.User, { onDelete: 'CASCADE' }),
|
|
64
|
+
(0, typeorm_1.JoinColumn)({ name: 'userId' }),
|
|
65
|
+
(0, swagger_1.ApiProperty)({ description: 'The user this subscription belongs to', type: () => user_entity_1.User }),
|
|
66
|
+
tslib_1.__metadata("design:type", user_entity_1.User)
|
|
67
|
+
], PushSubscription.prototype, "user", void 0);
|
|
68
|
+
exports.PushSubscription = PushSubscription = tslib_1.__decorate([
|
|
69
|
+
(0, typeorm_1.Entity)(),
|
|
70
|
+
(0, typeorm_1.Index)(['userId'])
|
|
71
|
+
], PushSubscription);
|
|
72
|
+
//# sourceMappingURL=push-subscription.entity.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"push-subscription.entity.js","sourceRoot":"","sources":["../../../../../../libs/database-entities/src/lib/entities/push-subscription.entity.ts"],"names":[],"mappings":";;;;AAAA,qCAAiH;AACjH,6CAA8C;AAC9C,+CAAqC;AAI9B,IAAM,gBAAgB,GAAtB,MAAM,gBAAgB;CAgD5B,CAAA;AAhDY,4CAAgB;AAG3B;IAFC,IAAA,gCAAsB,GAAE;IACxB,IAAA,qBAAW,EAAC,EAAE,WAAW,EAAE,gDAAgD,EAAE,OAAO,EAAE,CAAC,EAAE,CAAC;;4CAC/E;AAIZ;IAFC,IAAA,gBAAM,EAAC,EAAE,IAAI,EAAE,SAAS,EAAE,CAAC;IAC3B,IAAA,qBAAW,EAAC,EAAE,WAAW,EAAE,iDAAiD,EAA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AE,IAAI,EAAE,QAAQ,EAAE,CAAC;IAC9B,IAAA,qBAAW,EAAC,EAAE,WAAW,EAAE,uCAAuC,EAAE,IAAI,EAAE,GAAG,EAAE,CAAC,kBAAI,EAAE,CAAC;sCACjF,kBAAI;8CAAC;2BA/CD,gBAAgB;IAF5B,IAAA,gBAAM,GAAE;IACR,IAAA,eAAK,EAAC,CAAC,QAAQ,CAAC,CAAC;GACL,gBAAgB,CAgD5B"}
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
import { Resource } from './resource.entity';
|
|
2
|
+
import { User } from './user.entity';
|
|
3
|
+
import { ResourceMaintenance } from './resource.maintenance';
|
|
4
|
+
export declare enum MaintenanceRequestStatus {
|
|
5
|
+
OPEN = "open",
|
|
6
|
+
RESOLVED = "resolved",
|
|
7
|
+
DISMISSED = "dismissed"
|
|
8
|
+
}
|
|
9
|
+
export declare class ResourceMaintenanceRequest {
|
|
10
|
+
id: number;
|
|
11
|
+
createdAt: Date;
|
|
12
|
+
updatedAt: Date;
|
|
13
|
+
resourceId: number;
|
|
14
|
+
resource: Resource;
|
|
15
|
+
reason: string;
|
|
16
|
+
status: MaintenanceRequestStatus;
|
|
17
|
+
createdByUser: User | null;
|
|
18
|
+
resolvedByUser: User | null;
|
|
19
|
+
resolvedAt: Date | null;
|
|
20
|
+
resultingMaintenance: ResourceMaintenance | null;
|
|
21
|
+
}
|
|
@@ -0,0 +1,113 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.ResourceMaintenanceRequest = exports.MaintenanceRequestStatus = void 0;
|
|
4
|
+
const tslib_1 = require("tslib");
|
|
5
|
+
const typeorm_1 = require("typeorm");
|
|
6
|
+
const swagger_1 = require("@nestjs/swagger");
|
|
7
|
+
const resource_entity_1 = require("./resource.entity");
|
|
8
|
+
const user_entity_1 = require("./user.entity");
|
|
9
|
+
const resource_maintenance_1 = require("./resource.maintenance");
|
|
10
|
+
var MaintenanceRequestStatus;
|
|
11
|
+
(function (MaintenanceRequestStatus) {
|
|
12
|
+
MaintenanceRequestStatus["OPEN"] = "open";
|
|
13
|
+
MaintenanceRequestStatus["RESOLVED"] = "resolved";
|
|
14
|
+
MaintenanceRequestStatus["DISMISSED"] = "dismissed";
|
|
15
|
+
})(MaintenanceRequestStatus || (exports.MaintenanceRequestStatus = MaintenanceRequestStatus = {}));
|
|
16
|
+
let ResourceMaintenanceRequest = class ResourceMaintenanceRequest {
|
|
17
|
+
};
|
|
18
|
+
exports.ResourceMaintenanceRequest = ResourceMaintenanceRequest;
|
|
19
|
+
tslib_1.__decorate([
|
|
20
|
+
(0, typeorm_1.PrimaryGeneratedColumn)(),
|
|
21
|
+
(0, swagger_1.ApiProperty)({
|
|
22
|
+
description: 'The unique identifier of the maintenance request',
|
|
23
|
+
example: 1,
|
|
24
|
+
}),
|
|
25
|
+
tslib_1.__metadata("design:type", Number)
|
|
26
|
+
], ResourceMaintenanceRequest.prototype, "id", void 0);
|
|
27
|
+
tslib_1.__decorate([
|
|
28
|
+
(0, typeorm_1.CreateDateColumn)(),
|
|
29
|
+
(0, swagger_1.ApiProperty)({
|
|
30
|
+
description: 'When the request was created',
|
|
31
|
+
}),
|
|
32
|
+
tslib_1.__metadata("design:type", Date)
|
|
33
|
+
], ResourceMaintenanceRequest.prototype, "createdAt", void 0);
|
|
34
|
+
tslib_1.__decorate([
|
|
35
|
+
(0, typeorm_1.UpdateDateColumn)(),
|
|
36
|
+
(0, swagger_1.ApiProperty)({
|
|
37
|
+
description: 'When the request was last updated',
|
|
38
|
+
}),
|
|
39
|
+
tslib_1.__metadata("design:type", Date)
|
|
40
|
+
], ResourceMaintenanceRequest.prototype, "updatedAt", void 0);
|
|
41
|
+
tslib_1.__decorate([
|
|
42
|
+
(0, typeorm_1.Column)({ type: 'int' }),
|
|
43
|
+
(0, swagger_1.ApiProperty)({
|
|
44
|
+
description: 'The ID of the resource the request is for',
|
|
45
|
+
example: 1,
|
|
46
|
+
}),
|
|
47
|
+
tslib_1.__metadata("design:type", Number)
|
|
48
|
+
], ResourceMaintenanceRequest.prototype, "resourceId", void 0);
|
|
49
|
+
tslib_1.__decorate([
|
|
50
|
+
(0, typeorm_1.ManyToOne)(() => resource_entity_1.Resource, { onDelete: 'CASCADE' }),
|
|
51
|
+
tslib_1.__metadata("design:type", resource_entity_1.Resource)
|
|
52
|
+
], ResourceMaintenanceRequest.prototype, "resource", void 0);
|
|
53
|
+
tslib_1.__decorate([
|
|
54
|
+
(0, typeorm_1.Column)({ type: 'text' }),
|
|
55
|
+
(0, swagger_1.ApiProperty)({
|
|
56
|
+
description: 'Why the user thinks the resource needs maintenance',
|
|
57
|
+
example: 'The spindle makes a grinding noise and stops mid-cut.',
|
|
58
|
+
}),
|
|
59
|
+
tslib_1.__metadata("design:type", String)
|
|
60
|
+
], ResourceMaintenanceRequest.prototype, "reason", void 0);
|
|
61
|
+
tslib_1.__decorate([
|
|
62
|
+
(0, typeorm_1.Column)({
|
|
63
|
+
type: 'simple-enum',
|
|
64
|
+
enum: MaintenanceRequestStatus,
|
|
65
|
+
default: MaintenanceRequestStatus.OPEN,
|
|
66
|
+
}),
|
|
67
|
+
(0, swagger_1.ApiProperty)({
|
|
68
|
+
description: 'The current status of the request',
|
|
69
|
+
enum: MaintenanceRequestStatus,
|
|
70
|
+
enumName: 'MaintenanceRequestStatus',
|
|
71
|
+
example: MaintenanceRequestStatus.OPEN,
|
|
72
|
+
}),
|
|
73
|
+
tslib_1.__metadata("design:type", String)
|
|
74
|
+
], ResourceMaintenanceRequest.prototype, "status", void 0);
|
|
75
|
+
tslib_1.__decorate([
|
|
76
|
+
(0, typeorm_1.ManyToOne)(() => user_entity_1.User, { nullable: true }),
|
|
77
|
+
(0, swagger_1.ApiProperty)({
|
|
78
|
+
description: 'The user who reported the resource as broken',
|
|
79
|
+
required: false,
|
|
80
|
+
}),
|
|
81
|
+
tslib_1.__metadata("design:type", user_entity_1.User)
|
|
82
|
+
], ResourceMaintenanceRequest.prototype, "createdByUser", void 0);
|
|
83
|
+
tslib_1.__decorate([
|
|
84
|
+
(0, typeorm_1.ManyToOne)(() => user_entity_1.User, { nullable: true }),
|
|
85
|
+
(0, swagger_1.ApiProperty)({
|
|
86
|
+
description: 'The maintainer who resolved or dismissed the request',
|
|
87
|
+
required: false,
|
|
88
|
+
}),
|
|
89
|
+
tslib_1.__metadata("design:type", user_entity_1.User)
|
|
90
|
+
], ResourceMaintenanceRequest.prototype, "resolvedByUser", void 0);
|
|
91
|
+
tslib_1.__decorate([
|
|
92
|
+
(0, typeorm_1.Column)({ type: 'datetime', nullable: true }),
|
|
93
|
+
(0, swagger_1.ApiProperty)({
|
|
94
|
+
description: 'When the request was resolved or dismissed',
|
|
95
|
+
required: false,
|
|
96
|
+
type: String,
|
|
97
|
+
nullable: true,
|
|
98
|
+
format: 'date-time',
|
|
99
|
+
}),
|
|
100
|
+
tslib_1.__metadata("design:type", Date)
|
|
101
|
+
], ResourceMaintenanceRequest.prototype, "resolvedAt", void 0);
|
|
102
|
+
tslib_1.__decorate([
|
|
103
|
+
(0, typeorm_1.ManyToOne)(() => resource_maintenance_1.ResourceMaintenance, { nullable: true }),
|
|
104
|
+
(0, swagger_1.ApiProperty)({
|
|
105
|
+
description: 'The maintenance created from this request (null until converted)',
|
|
106
|
+
required: false,
|
|
107
|
+
}),
|
|
108
|
+
tslib_1.__metadata("design:type", resource_maintenance_1.ResourceMaintenance)
|
|
109
|
+
], ResourceMaintenanceRequest.prototype, "resultingMaintenance", void 0);
|
|
110
|
+
exports.ResourceMaintenanceRequest = ResourceMaintenanceRequest = tslib_1.__decorate([
|
|
111
|
+
(0, typeorm_1.Entity)()
|
|
112
|
+
], ResourceMaintenanceRequest);
|
|
113
|
+
//# sourceMappingURL=resource-maintenance-request.entity.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"resource-maintenance-request.entity.js","sourceRoot":"","sources":["../../../../../../libs/database-entities/src/lib/entities/resource-mainten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{ ResourceMaintenance } from './resource.maintenance';
|
|
12
12
|
import { ResourceMaintenanceSchedule } from './resource-maintenance-schedule.entity';
|
|
13
13
|
import { ResourceType } from './resource.type';
|
|
14
|
+
import { SupervisionMode, AutoIntroductionTarget } from './resource.supervision';
|
|
14
15
|
import { ResourceBillingConfiguration } from './resource-billing-configuration.entity';
|
|
15
16
|
import { Form } from './form';
|
|
16
17
|
export declare class Resource {
|
|
@@ -24,6 +25,14 @@ export declare class Resource {
|
|
|
24
25
|
documentationMarkdown: string | null;
|
|
25
26
|
documentationUrl: string | null;
|
|
26
27
|
allowTakeOver: boolean;
|
|
28
|
+
retrainingMaxAgeDays: number | null;
|
|
29
|
+
retrainingMaxInactivityDays: number | null;
|
|
30
|
+
retrainingBlocksAccess: boolean;
|
|
31
|
+
supervisionMode: SupervisionMode;
|
|
32
|
+
supervisedUsagesUntilIntroduction: number | null;
|
|
33
|
+
autoIntroductionTarget: AutoIntroductionTarget | null;
|
|
34
|
+
autoIntroductionGroupId: number | null;
|
|
35
|
+
autoIntroductionGroup: ResourceGroup | null;
|
|
27
36
|
metadata: Record<string, unknown> | null;
|
|
28
37
|
createdAt: Date;
|
|
29
38
|
updatedAt: Date;
|
|
@@ -17,6 +17,7 @@ const attractap_entity_1 = require("./attractap.entity");
|
|
|
17
17
|
const resource_maintenance_1 = require("./resource.maintenance");
|
|
18
18
|
const resource_maintenance_schedule_entity_1 = require("./resource-maintenance-schedule.entity");
|
|
19
19
|
const resource_type_1 = require("./resource.type");
|
|
20
|
+
const resource_supervision_1 = require("./resource.supervision");
|
|
20
21
|
const resource_billing_configuration_entity_1 = require("./resource-billing-configuration.entity");
|
|
21
22
|
const form_1 = require("./form");
|
|
22
23
|
let Resource = class Resource {
|
|
@@ -113,6 +114,93 @@ tslib_1.__decorate([
|
|
|
113
114
|
}),
|
|
114
115
|
tslib_1.__metadata("design:type", Boolean)
|
|
115
116
|
], Resource.prototype, "allowTakeOver", void 0);
|
|
117
|
+
tslib_1.__decorate([
|
|
118
|
+
(0, typeorm_1.Column)({ type: 'integer', nullable: true }),
|
|
119
|
+
(0, swagger_1.ApiProperty)({
|
|
120
|
+
description: 'Days after a user was trained on this resource before retraining is required. Null disables the age-based trigger.',
|
|
121
|
+
example: 365,
|
|
122
|
+
required: false,
|
|
123
|
+
nullable: true,
|
|
124
|
+
}),
|
|
125
|
+
tslib_1.__metadata("design:type", Number)
|
|
126
|
+
], Resource.prototype, "retrainingMaxAgeDays", void 0);
|
|
127
|
+
tslib_1.__decorate([
|
|
128
|
+
(0, typeorm_1.Column)({ type: 'integer', nullable: true }),
|
|
129
|
+
(0, swagger_1.ApiProperty)({
|
|
130
|
+
description: 'Days a user may go without using this resource before retraining is required. Null disables the inactivity trigger.',
|
|
131
|
+
example: 180,
|
|
132
|
+
required: false,
|
|
133
|
+
nullable: true,
|
|
134
|
+
}),
|
|
135
|
+
tslib_1.__metadata("design:type", Number)
|
|
136
|
+
], Resource.prototype, "retrainingMaxInactivityDays", void 0);
|
|
137
|
+
tslib_1.__decorate([
|
|
138
|
+
(0, typeorm_1.Column)({ type: 'boolean', default: false }),
|
|
139
|
+
(0, swagger_1.ApiProperty)({
|
|
140
|
+
description: 'Whether to block resource access once retraining is due until the user is retrained',
|
|
141
|
+
example: false,
|
|
142
|
+
default: false,
|
|
143
|
+
}),
|
|
144
|
+
tslib_1.__metadata("design:type", Boolean)
|
|
145
|
+
], Resource.prototype, "retrainingBlocksAccess", void 0);
|
|
146
|
+
tslib_1.__decorate([
|
|
147
|
+
(0, typeorm_1.Column)({
|
|
148
|
+
type: 'simple-enum',
|
|
149
|
+
enum: resource_supervision_1.SupervisionMode,
|
|
150
|
+
default: resource_supervision_1.SupervisionMode.INTRODUCTION_REQUIRED,
|
|
151
|
+
}),
|
|
152
|
+
(0, swagger_1.ApiProperty)({
|
|
153
|
+
description: 'Controls who may start a usage session on this resource',
|
|
154
|
+
enum: resource_supervision_1.SupervisionMode,
|
|
155
|
+
enumName: 'SupervisionMode',
|
|
156
|
+
example: resource_supervision_1.SupervisionMode.INTRODUCTION_REQUIRED,
|
|
157
|
+
default: resource_supervision_1.SupervisionMode.INTRODUCTION_REQUIRED,
|
|
158
|
+
}),
|
|
159
|
+
tslib_1.__metadata("design:type", String)
|
|
160
|
+
], Resource.prototype, "supervisionMode", void 0);
|
|
161
|
+
tslib_1.__decorate([
|
|
162
|
+
(0, typeorm_1.Column)({ type: 'integer', nullable: true }),
|
|
163
|
+
(0, swagger_1.ApiProperty)({
|
|
164
|
+
description: 'Automatically create an introduction after this many supervised sessions. Null disables auto-promotion.',
|
|
165
|
+
example: 3,
|
|
166
|
+
required: false,
|
|
167
|
+
nullable: true,
|
|
168
|
+
}),
|
|
169
|
+
tslib_1.__metadata("design:type", Number)
|
|
170
|
+
], Resource.prototype, "supervisedUsagesUntilIntroduction", void 0);
|
|
171
|
+
tslib_1.__decorate([
|
|
172
|
+
(0, typeorm_1.Column)({ type: 'simple-enum', enum: resource_supervision_1.AutoIntroductionTarget, nullable: true }),
|
|
173
|
+
(0, swagger_1.ApiProperty)({
|
|
174
|
+
description: 'Target of the auto-created introduction once the supervised-usage threshold is reached',
|
|
175
|
+
enum: resource_supervision_1.AutoIntroductionTarget,
|
|
176
|
+
enumName: 'AutoIntroductionTarget',
|
|
177
|
+
example: resource_supervision_1.AutoIntroductionTarget.RESOURCE,
|
|
178
|
+
required: false,
|
|
179
|
+
nullable: true,
|
|
180
|
+
}),
|
|
181
|
+
tslib_1.__metadata("design:type", String)
|
|
182
|
+
], Resource.prototype, "autoIntroductionTarget", void 0);
|
|
183
|
+
tslib_1.__decorate([
|
|
184
|
+
(0, typeorm_1.Column)({ type: 'integer', nullable: true }),
|
|
185
|
+
(0, swagger_1.ApiProperty)({
|
|
186
|
+
description: 'The group the auto-introduction targets when autoIntroductionTarget is GROUP',
|
|
187
|
+
example: 1,
|
|
188
|
+
required: false,
|
|
189
|
+
nullable: true,
|
|
190
|
+
}),
|
|
191
|
+
tslib_1.__metadata("design:type", Number)
|
|
192
|
+
], Resource.prototype, "autoIntroductionGroupId", void 0);
|
|
193
|
+
tslib_1.__decorate([
|
|
194
|
+
(0, typeorm_1.ManyToOne)(() => resourceGroup_entity_1.ResourceGroup, { nullable: true, onDelete: 'SET NULL' }),
|
|
195
|
+
(0, typeorm_1.JoinColumn)({ name: 'autoIntroductionGroupId' }),
|
|
196
|
+
(0, swagger_1.ApiProperty)({
|
|
197
|
+
description: 'The group the auto-introduction targets when autoIntroductionTarget is GROUP',
|
|
198
|
+
type: () => resourceGroup_entity_1.ResourceGroup,
|
|
199
|
+
required: false,
|
|
200
|
+
nullable: true,
|
|
201
|
+
}),
|
|
202
|
+
tslib_1.__metadata("design:type", resourceGroup_entity_1.ResourceGroup)
|
|
203
|
+
], Resource.prototype, "autoIntroductionGroup", void 0);
|
|
116
204
|
tslib_1.__decorate([
|
|
117
205
|
(0, typeorm_1.Column)({ type: 'json', nullable: true }),
|
|
118
206
|
(0, swagger_1.ApiProperty)({
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"resource.entity.js","sourceRoot":"","sources":["../../../../../../libs/database-entities/src/lib/entities/resource.entity.ts"],"names":[],"mappings":";;;;AAAA,
|
|
1
|
+
{"version":3,"file":"resource.entity.js","sourceRoot":"","sources":["../../../../../../libs/database-entities/src/lib/entities/resource.entity.ts"],"names":[],"mappings":";;;;AAAA,qCAYiB;AACjB,6CAA8C;AAC9C,+EAAqE;AACrE,iEAAuD;AACvD,2EAAiE;AACjE,iEAAuD;AACvD,4EAAoE;AACpE,yDAAsD;AACtD,yDAAsD;AACtD,uDAAoD;AACpD,iEAA8D;AAC9D,yDAA+C;AAC/C,iEAA6D;AAC7D,iGAAqF;AACrF,mDAA+C;AAC/C,iEAAiF;AACjF,mGAAuF;AACvF,iCAA8B;AAGvB,IAAM,QAAQ,GAAd,MAAM,QAAQ;CAiPpB,CAAA;AAjPY,4BAAQ;AAMnB;IALC,IAAA,gCAAsB,GAAE;IACxB,IAAA,qBAAW,EAAC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E,CAAC,MAAM,EAAE,EAAE,CAAC,MAAM,CAAC,SAAS,CAAC;;kDAC3B;AAG/B;IADC,IAAA,mBAAS,EAAC,GAAG,EAAE,CAAC,0CAAmB,EAAE,CAAC,WAAW,EAAE,EAAE,CAAC,WAAW,CAAC,QAAQ,CAAC;;8CACvC;AAGrC;IADC,IAAA,mBAAS,EAAC,GAAG,EAAE,CAAC,kEAA2B,EAAE,CAAC,QAAQ,EAAE,EAAE,CAAC,QAAQ,CAAC,QAAQ,CAAC;;sDACzB;AAGrD;IADC,IAAA,mBAAS,EAAC,GAAG,EAAE,CAAC,oEAA4B,EAAE,CAAC,aAAa,EAAE,EAAE,CAAC,aAAa,CAAC,QAAQ,CAAC;;uDAClC;AAIvD;IAFC,IAAA,mBAAS,EAAC,GAAG,EAAE,CAAC,WAAI,EAAE,CAAC,IAAI,EAAE,EAAE,CAAC,IAAI,CAAC,QAAQ,CAAC;IAC9C,IAAA,qBAAW,EAAC,EAAE,WAAW,EAAE,oCAAoC,EAAE,IAAI,EAAE,GAAG,EAAE,CAAC,WAAI,EAAE,OAAO,EAAE,IAAI,EAAE,CAAC;;uCACrF;mBAhPJ,QAAQ;IADpB,IAAA,gBAAM,GAAE;GACI,QAAQ,CAiPpB"}
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Controls who may start a usage session on a resource.
|
|
3
|
+
*/
|
|
4
|
+
export declare enum SupervisionMode {
|
|
5
|
+
/** Today's behavior: only introduced users may start a session. */
|
|
6
|
+
INTRODUCTION_REQUIRED = "introduction_required",
|
|
7
|
+
/** Introduced users alone; non-introduced users only with a present supervisor. */
|
|
8
|
+
SUPERVISION_ALLOWED = "supervision_allowed",
|
|
9
|
+
/** Even introduced users need a present supervisor. */
|
|
10
|
+
SUPERVISION_REQUIRED = "supervision_required"
|
|
11
|
+
}
|
|
12
|
+
/**
|
|
13
|
+
* Target of an auto-created introduction once the supervised-usage threshold is reached.
|
|
14
|
+
*/
|
|
15
|
+
export declare enum AutoIntroductionTarget {
|
|
16
|
+
/** Create an introduction for this resource. */
|
|
17
|
+
RESOURCE = "resource",
|
|
18
|
+
/** Create a group introduction instead of a resource introduction. */
|
|
19
|
+
GROUP = "group"
|
|
20
|
+
}
|
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.AutoIntroductionTarget = exports.SupervisionMode = void 0;
|
|
4
|
+
/**
|
|
5
|
+
* Controls who may start a usage session on a resource.
|
|
6
|
+
*/
|
|
7
|
+
var SupervisionMode;
|
|
8
|
+
(function (SupervisionMode) {
|
|
9
|
+
/** Today's behavior: only introduced users may start a session. */
|
|
10
|
+
SupervisionMode["INTRODUCTION_REQUIRED"] = "introduction_required";
|
|
11
|
+
/** Introduced users alone; non-introduced users only with a present supervisor. */
|
|
12
|
+
SupervisionMode["SUPERVISION_ALLOWED"] = "supervision_allowed";
|
|
13
|
+
/** Even introduced users need a present supervisor. */
|
|
14
|
+
SupervisionMode["SUPERVISION_REQUIRED"] = "supervision_required";
|
|
15
|
+
})(SupervisionMode || (exports.SupervisionMode = SupervisionMode = {}));
|
|
16
|
+
/**
|
|
17
|
+
* Target of an auto-created introduction once the supervised-usage threshold is reached.
|
|
18
|
+
*/
|
|
19
|
+
var AutoIntroductionTarget;
|
|
20
|
+
(function (AutoIntroductionTarget) {
|
|
21
|
+
/** Create an introduction for this resource. */
|
|
22
|
+
AutoIntroductionTarget["RESOURCE"] = "resource";
|
|
23
|
+
/** Create a group introduction instead of a resource introduction. */
|
|
24
|
+
AutoIntroductionTarget["GROUP"] = "group";
|
|
25
|
+
})(AutoIntroductionTarget || (exports.AutoIntroductionTarget = AutoIntroductionTarget = {}));
|
|
26
|
+
//# sourceMappingURL=resource.supervision.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"resource.supervision.js","sourceRoot":"","sources":["../../../../../../libs/database-entities/src/lib/entities/resource.supervision.ts"],"names":[],"mappings":";;;AAAA;;GAEG;AACH,IAAY,eAOX;AAPD,WAAY,eAAe;IACzB,mEAAmE;IACnE,kEAA+C,CAAA;IAC/C,mFAAmF;IACnF,8DAA2C,CAAA;IAC3C,uDAAuD;IACvD,gEAA6C,CAAA;AAC/C,CAAC,EAPW,eAAe,+BAAf,eAAe,QAO1B;AAED;;GAEG;AACH,IAAY,sBAKX;AALD,WAAY,sBAAsB;IAChC,gDAAgD;IAChD,+CAAqB,CAAA;IACrB,sEAAsE;IACtE,yCAAe,CAAA;AACjB,CAAC,EALW,sBAAsB,sCAAtB,sBAAsB,QAKjC"}
|
|
@@ -5,6 +5,10 @@ export declare class ResourceGroup {
|
|
|
5
5
|
id: number;
|
|
6
6
|
name: string;
|
|
7
7
|
description: string | null;
|
|
8
|
+
retrainingMaxAgeDays: number | null;
|
|
9
|
+
retrainingMaxInactivityDays: number | null;
|
|
10
|
+
retrainingBlocksAccess: boolean;
|
|
11
|
+
isHidden: boolean;
|
|
8
12
|
createdAt: Date;
|
|
9
13
|
updatedAt: Date;
|
|
10
14
|
introductions: ResourceIntroduction[];
|
|
@@ -35,6 +35,44 @@ tslib_1.__decorate([
|
|
|
35
35
|
}),
|
|
36
36
|
tslib_1.__metadata("design:type", String)
|
|
37
37
|
], ResourceGroup.prototype, "description", void 0);
|
|
38
|
+
tslib_1.__decorate([
|
|
39
|
+
(0, typeorm_1.Column)({ type: 'integer', nullable: true }),
|
|
40
|
+
(0, swagger_1.ApiProperty)({
|
|
41
|
+
description: 'Days after a user was trained on this group before retraining is required. Null disables the age-based trigger.',
|
|
42
|
+
example: 365,
|
|
43
|
+
required: false,
|
|
44
|
+
nullable: true,
|
|
45
|
+
}),
|
|
46
|
+
tslib_1.__metadata("design:type", Number)
|
|
47
|
+
], ResourceGroup.prototype, "retrainingMaxAgeDays", void 0);
|
|
48
|
+
tslib_1.__decorate([
|
|
49
|
+
(0, typeorm_1.Column)({ type: 'integer', nullable: true }),
|
|
50
|
+
(0, swagger_1.ApiProperty)({
|
|
51
|
+
description: 'Days a user may go without using a resource in this group before retraining is required. Null disables the inactivity trigger.',
|
|
52
|
+
example: 180,
|
|
53
|
+
required: false,
|
|
54
|
+
nullable: true,
|
|
55
|
+
}),
|
|
56
|
+
tslib_1.__metadata("design:type", Number)
|
|
57
|
+
], ResourceGroup.prototype, "retrainingMaxInactivityDays", void 0);
|
|
58
|
+
tslib_1.__decorate([
|
|
59
|
+
(0, typeorm_1.Column)({ type: 'boolean', default: false }),
|
|
60
|
+
(0, swagger_1.ApiProperty)({
|
|
61
|
+
description: 'Whether to block access to grouped resources once retraining is due until the user is retrained',
|
|
62
|
+
example: false,
|
|
63
|
+
default: false,
|
|
64
|
+
}),
|
|
65
|
+
tslib_1.__metadata("design:type", Boolean)
|
|
66
|
+
], ResourceGroup.prototype, "retrainingBlocksAccess", void 0);
|
|
67
|
+
tslib_1.__decorate([
|
|
68
|
+
(0, typeorm_1.Column)({ type: 'boolean', default: false }),
|
|
69
|
+
(0, swagger_1.ApiProperty)({
|
|
70
|
+
description: 'Whether to hide this group from users who are not part of it (introducer, maintainer or introduced). Users with the canManageResources permission always see hidden groups.',
|
|
71
|
+
example: false,
|
|
72
|
+
default: false,
|
|
73
|
+
}),
|
|
74
|
+
tslib_1.__metadata("design:type", Boolean)
|
|
75
|
+
], ResourceGroup.prototype, "isHidden", void 0);
|
|
38
76
|
tslib_1.__decorate([
|
|
39
77
|
(0, typeorm_1.CreateDateColumn)(),
|
|
40
78
|
(0, swagger_1.ApiProperty)({
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"resourceGroup.entity.js","sourceRoot":"","sources":["../../../../../../libs/database-entities/src/lib/entities/resourceGroup.entity.ts"],"names":[],"mappings":";;;;AAAA,qCAQiB;AACjB,6CAA8C;AAC9C,+EAAqE;AACrE,2EAAiE;AACjE,uDAA6C;AAGtC,IAAM,aAAa,GAAnB,MAAM,aAAa;
|
|
1
|
+
{"version":3,"file":"resourceGroup.entity.js","sourceRoot":"","sources":["../../../../../../libs/database-entities/src/lib/entities/resourceGroup.entity.ts"],"names":[],"mappings":";;;;AAAA,qCAQiB;AACjB,6CAA8C;AAC9C,+EAAqE;AACrE,2EAAiE;AACjE,uDAA6C;AAGtC,IAAM,aAAa,GAAnB,MAAM,aAAa;CAgFzB,CAAA;AAhFY,sCAAa;AAMxB;IALC,IAAA,gCAAsB,GAAE;IACxB,IAAA,qBAAW,EAAC;QACX,WAAW,EAAE,6CAA6C;QAC1D,OAAO,EAAE,CAAC;KACX,CAAC;;yCACU;AAOZ;IALC,IAAA,gBAAM,EAAC,EAAE,IAAI,EAAE,MAAM,EAAE,CAAC;IACxB,IAAA,qBAAW,EAAC;QACX,WAAW,EAAE,0BAA0B;QACvC,OAAO,EAAE,YAAY;KACtB,CAAC;;2CACY;AAQd;IANC,IAAA,gBAAM,EAAC,EAAE,IAAI,EAAE,MAAM,EAAE,QAAQ,EAAE,IAAI,EAAE,CAAC;IACxC,IAAA,qBAAW,EAAC;QACX,WAAW,EAAE,wCAAwC;QACrD,OAAO,EAAE,6CAA6C;QACtD,QAAQ,EAAE,KAAK;KAChB,CAAC;;kDAC0B;AAU5B;IARC,IAAA,gBAAM,EAAC,EAAE,IAAI,EAAE,SAAS,EAAE,QAAQ,EAAE,IAAI,EAAE,CAAC;IAC3C,IAAA,qBAAW,EAAC;QACX,WAAW,EACT,iHAAiH;QACnH,OAAO,EAAE,GAAG;QACZ,QAAQ,EAAE,KAAK;QACf,QAAQ,EAAE,IAAI;KACf,CAAC;;2DACmC;AAUrC;IARC,IAAA,gBAAM,EAAC,EAAE,IAAI,EAAE,SAAS,EAAE,QAAQ,EAAE,IAAI,EAAE,CAAC;IAC3C,IAAA,qBAAW,EAAC;QACX,WAAW,EACT,gIAAgI;QAClI,OAAO,EAAE,GAAG;QACZ,QAAQ,EAAE,KAAK;QACf,QAAQ,EAAE,IAAI;KACf,CAAC;;kEAC0C;AAQ5C;IANC,IAAA,gBAAM,EAAC,EAAE,IAAI,EAAE,SAAS,EAAE,OAAO,EAAE,KAAK,EAAE,CAAC;IAC3C,IAAA,qBAAW,EAAC;QACX,WAAW,EAAE,iGAAiG;QAC9G,OAAO,EAAE,KAAK;QACd,OAAO,EAAE,KAAK;KACf,CAAC;;6DAC+B;AASjC;IAPC,IAAA,gBAAM,EAAC,EAAE,IAAI,EAAE,SAAS,EAAE,OAAO,EAAE,KAAK,EAAE,CAAC;IAC3C,IAAA,qBAAW,EAAC;QACX,WAAW,EACT,6KAA6K;QAC/K,OAAO,EAAE,KAAK;QACd,OAAO,EAAE,KAAK;KACf,CAAC;;+CACiB;AAMnB;IAJC,IAAA,0BAAgB,GAAE;IAClB,IAAA,qBAAW,EAAC;QACX,WAAW,EAAE,+BAA+B;KAC7C,CAAC;sCACU,IAAI;gDAAC;AAMjB;IAJC,IAAA,0BAAgB,GAAE;IAClB,IAAA,qBAAW,EAAC;QACX,WAAW,EAAE,oCAAoC;KAClD,CAAC;sCACU,IAAI;gDAAC;AAGjB;IADC,IAAA,mBAAS,EAAC,GAAG,EAAE,CAAC,kDAAoB,EAAE,CAAC,YAAY,EAAE,EAAE,CAAC,YAAY,CAAC,aAAa,CAAC;;oDAC7C;AAGvC;IADC,IAAA,mBAAS,EAAC,GAAG,EAAE,CAAC,8CAAkB,EAAE,CAAC,UAAU,EAAE,EAAE,CAAC,UAAU,CAAC,aAAa,CAAC;;kDAC3C;AAGnC;IADC,IAAA,oBAAU,EAAC,GAAG,EAAE,CAAC,0BAAQ,EAAE,CAAC,QAAQ,EAAE,EAAE,CAAC,QAAQ,CAAC,MAAM,EAAE,EAAE,QAAQ,EAAE,SAAS,EAAE,CAAC;;gDAC5D;wBA/EZ,aAAa;IADzB,IAAA,gBAAM,GAAE;GACI,aAAa,CAgFzB"}
|
|
@@ -1,8 +1,13 @@
|
|
|
1
1
|
import { Resource } from './resource.entity';
|
|
2
2
|
import { User } from './user.entity';
|
|
3
3
|
import { ResourceGroup } from './resourceGroup.entity';
|
|
4
|
+
export declare enum ResourceIntroducerType {
|
|
5
|
+
INTRODUCER = "introducer",
|
|
6
|
+
MAINTAINER = "maintainer"
|
|
7
|
+
}
|
|
4
8
|
export declare class ResourceIntroducer {
|
|
5
9
|
id: number;
|
|
10
|
+
type: ResourceIntroducerType;
|
|
6
11
|
resourceId: number | null;
|
|
7
12
|
userId: number;
|
|
8
13
|
resourceGroupId: number | null;
|
|
@@ -1,12 +1,17 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.ResourceIntroducer = void 0;
|
|
3
|
+
exports.ResourceIntroducer = exports.ResourceIntroducerType = 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
7
|
const resource_entity_1 = require("./resource.entity");
|
|
8
8
|
const user_entity_1 = require("./user.entity");
|
|
9
9
|
const resourceGroup_entity_1 = require("./resourceGroup.entity");
|
|
10
|
+
var ResourceIntroducerType;
|
|
11
|
+
(function (ResourceIntroducerType) {
|
|
12
|
+
ResourceIntroducerType["INTRODUCER"] = "introducer";
|
|
13
|
+
ResourceIntroducerType["MAINTAINER"] = "maintainer";
|
|
14
|
+
})(ResourceIntroducerType || (exports.ResourceIntroducerType = ResourceIntroducerType = {}));
|
|
10
15
|
let ResourceIntroducer = class ResourceIntroducer {
|
|
11
16
|
};
|
|
12
17
|
exports.ResourceIntroducer = ResourceIntroducer;
|
|
@@ -18,6 +23,20 @@ tslib_1.__decorate([
|
|
|
18
23
|
}),
|
|
19
24
|
tslib_1.__metadata("design:type", Number)
|
|
20
25
|
], ResourceIntroducer.prototype, "id", void 0);
|
|
26
|
+
tslib_1.__decorate([
|
|
27
|
+
(0, typeorm_1.Column)({
|
|
28
|
+
type: 'simple-enum',
|
|
29
|
+
enum: ResourceIntroducerType,
|
|
30
|
+
default: ResourceIntroducerType.INTRODUCER,
|
|
31
|
+
}),
|
|
32
|
+
(0, swagger_1.ApiProperty)({
|
|
33
|
+
description: "The kind of access: 'introducer' can give introductions and do maintenance; 'maintainer' can only do maintenance and control the machine",
|
|
34
|
+
enum: ResourceIntroducerType,
|
|
35
|
+
example: ResourceIntroducerType.INTRODUCER,
|
|
36
|
+
enumName: 'ResourceIntroducerType',
|
|
37
|
+
}),
|
|
38
|
+
tslib_1.__metadata("design:type", String)
|
|
39
|
+
], ResourceIntroducer.prototype, "type", void 0);
|
|
21
40
|
tslib_1.__decorate([
|
|
22
41
|
(0, typeorm_1.Column)({ type: 'integer', nullable: true }),
|
|
23
42
|
(0, swagger_1.ApiProperty)({
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"resourceIntroducer.entity.js","sourceRoot":"","sources":["../../../../../../libs/database-entities/src/lib/entities/resourceIntroducer.entity.ts"],"names":[],"mappings":";;;;AAAA,qCAA0G;AAC1G,6CAA8C;AAC9C,uDAA6C;AAC7C,+CAAqC;AACrC,iEAAuD;
|
|
1
|
+
{"version":3,"file":"resourceIntroducer.entity.js","sourceRoot":"","sources":["../../../../../../libs/database-entities/src/lib/entities/resourceIntroducer.entity.ts"],"names":[],"mappings":";;;;AAAA,qCAA0G;AAC1G,6CAA8C;AAC9C,uDAA6C;AAC7C,+CAAqC;AACrC,iEAAuD;AAEvD,IAAY,sBAGX;AAHD,WAAY,sBAAsB;IAChC,mDAAyB,CAAA;IACzB,mDAAyB,CAAA;AAC3B,CAAC,EAHW,sBAAsB,sCAAtB,sBAAsB,QAGjC;AAGM,IAAM,kBAAkB,GAAxB,MAAM,kBAAkB;CAkE9B,CAAA;AAlEY,gDAAkB;AAM7B;IALC,IAAA,gCAAsB,GAAE;IACxB,IAAA,qBAAW,EAAC;QACX,WAAW,EAAE,sDAAsD;QACnE,OAAO,EAAE,CAAC;KACX,CAAC;;8CACU;AAcZ;IAZC,IAAA,gBAAM,EAAC;QACN,IAAI,EAAE,aAAa;QACnB,IAAI,EAAE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,IAAI,EAAE,QAAQ,EAAE,CAAC;IAC9B,IAAA,qBAAW,EAAC;QACX,WAAW,EAAE,qCAAqC;QAClD,IAAI,EAAE,GAAG,EAAE,CAAC,kBAAI;KACjB,CAAC;sCACK,kBAAI;gDAAC;AAIZ;IAFC,IAAA,mBAAS,EAAC,GAAG,EAAE,CAAC,oCAAa,EAAE,SAAS,EAAE,EAAE,QAAQ,EAAE,SAAS,EAAE,CAAC;IAClE,IAAA,oBAAU,EAAC,EAAE,IAAI,EAAE,iBAAiB,EAAE,CAAC;sCACxB,oCAAa;yDAAQ;6BAjE1B,kBAAkB;IAD9B,IAAA,gBAAM,GAAE;GACI,kBAAkB,CAkE9B"}
|
|
@@ -61,6 +61,16 @@ tslib_1.__decorate([
|
|
|
61
61
|
}),
|
|
62
62
|
tslib_1.__metadata("design:type", Date)
|
|
63
63
|
], ResourceIntroduction.prototype, "completedAt", void 0);
|
|
64
|
+
tslib_1.__decorate([
|
|
65
|
+
(0, typeorm_1.Column)({ type: 'datetime', nullable: true }),
|
|
66
|
+
(0, swagger_1.ApiProperty)({
|
|
67
|
+
description: 'When the user was last notified that retraining is due (used to avoid repeat notifications)',
|
|
68
|
+
example: '2021-01-01T00:00:00.000Z',
|
|
69
|
+
required: false,
|
|
70
|
+
nullable: true,
|
|
71
|
+
}),
|
|
72
|
+
tslib_1.__metadata("design:type", Date)
|
|
73
|
+
], ResourceIntroduction.prototype, "retrainingNotifiedAt", void 0);
|
|
64
74
|
tslib_1.__decorate([
|
|
65
75
|
(0, typeorm_1.CreateDateColumn)(),
|
|
66
76
|
(0, swagger_1.ApiProperty)({
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"resourceIntroduction.entity.js","sourceRoot":"","sources":["../../../../../../libs/database-entities/src/lib/entities/resourceIntroduction.entity.ts"],"names":[],"mappings":";;;;AAAA,qCAAqH;AACrH,6CAA8C;AAC9C,uDAA6C;AAC7C,+CAAqC;AACrC,qGAA2F;AAC3F,iEAAuD;AAGhD,IAAM,oBAAoB,GAA1B,MAAM,oBAAoB;
|
|
1
|
+
{"version":3,"file":"resourceIntroduction.entity.js","sourceRoot":"","sources":["../../../../../../libs/database-entities/src/lib/entities/resourceIntroduction.entity.ts"],"names":[],"mappings":";;;;AAAA,qCAAqH;AACrH,6CAA8C;AAC9C,uDAA6C;AAC7C,+CAAqC;AACrC,qGAA2F;AAC3F,iEAAuD;AAGhD,IAAM,oBAAoB,GAA1B,MAAM,oBAAoB;CA2FhC,CAAA;AA3FY,oDAAoB;AAM/B;IALC,IAAA,gCAAsB,GAAE;IACxB,IAAA,qBAAW,EAAC;QACX,WAAW,EAAE,2CAA2C;QACxD,OAAO,EAAE,CAAC;KACX,CAAC;;gDACU;AAQZ;IANC,IAAA,gBAAM,EAAC,EAAE,IAAI,EAAE,SAAS,EAAE,QAAQ,EAAE,IAAI,EAAE,CAAC;IAC3C,IAAA,qBAAW,EAAC;QACX,WAAW,EAAE,sEAAsE;QACnF,OAAO,EAAE,CAAC;QACV,QAAQ,EAAE,KAAK;KAChB,CAAC;;wDACyB;AAO3B;IALC,IAAA,gBAAM,EAAC,EAAE,IAAI,EAAE,SAAS,EAAE,CAAC;IAC3B,IAAA,qBAAW,EAAC;QACX,WAAW,EAAE,kDAAkD;QAC/D,OAAO,EAAE,CAAC;KACX,CAAC;;4DACsB;AAOxB;IALC,IAAA,gBAAM,EAAC,EAAE,QAAQ,EAAE,IAAI,EAAE,IAAI,EAAE,SAAS,EAAE,CAAC;IAC3C,IAAA,qBAAW,EAAC;QACX,WAAW,EAAE,6CAA6C;QAC1D,OAAO,EAAE,CAAC;KACX,CAAC;;yDACmB;AAQrB;IANC,IAAA,gBAAM,EAAC,EAAE,IAAI,EAAE,SAAS,EAAE,QAAQ,EAAE,IAAI,EAAE,CAAC;IAC3C,IAAA,qBAAW,EAAC;QACX,WAAW,EAAE,sEAAsE;QACnF,OAAO,EAAE,CAAC;QACV,QAAQ,EAAE,KAAK;KAChB,CAAC;;6DAC8B;A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ACrB,IAAA,oBAAU,EAAC,EAAE,IAAI,EAAE,aAAa,EAAE,CAAC;IACnC,IAAA,qBAAW,EAAC;QACX,WAAW,EAAE,mCAAmC;QAChD,IAAI,EAAE,GAAG,EAAE,CAAC,kBAAI;KACjB,CAAC;sCACU,kBAAI;uDAAC;AAOjB;IALC,IAAA,mBAAS,EAAC,GAAG,EAAE,CAAC,wEAA+B,EAAE,CAAC,OAAO,EAAE,EAAE,CAAC,OAAO,CAAC,YAAY,CAAC;IACnF,IAAA,qBAAW,EAAC;QACX,WAAW,EAAE,0DAA0D;QACvE,IAAI,EAAE,GAAG,EAAE,CAAC,CAAC,wEAA+B,CAAC;KAC9C,CAAC;;qDAC0C;AAI5C;IAFC,IAAA,mBAAS,EAAC,GAAG,EAAE,CAAC,oCAAa,EAAE,CAAC,KAAK,EAAE,EAAE,CAAC,KAAK,CAAC,aAAa,EAAE,EAAE,QAAQ,EAAE,SAAS,EAAE,CAAC;IACvF,IAAA,oBAAU,EAAC,EAAE,IAAI,EAAE,iBAAiB,EAAE,CAAC;sCACxB,oCAAa;2DAAC;+BA1FnB,oBAAoB;IADhC,IAAA,gBAAM,GAAE;GACI,oBAAoB,CA2FhC"}
|
|
@@ -160,6 +160,26 @@ tslib_1.__decorate([
|
|
|
160
160
|
(0, swagger_1.ApiProperty)({ description: 'Whether the resource usage is finalized' }),
|
|
161
161
|
tslib_1.__metadata("design:type", Boolean)
|
|
162
162
|
], ResourceUsage.prototype, "isFinalized", void 0);
|
|
163
|
+
tslib_1.__decorate([
|
|
164
|
+
(0, typeorm_1.Column)({ nullable: true, type: 'integer' }),
|
|
165
|
+
(0, swagger_1.ApiProperty)({
|
|
166
|
+
description: 'The ID of the supervisor who supervised this session (null if unsupervised or supervisor deleted)',
|
|
167
|
+
example: 1,
|
|
168
|
+
required: false,
|
|
169
|
+
nullable: true,
|
|
170
|
+
}),
|
|
171
|
+
tslib_1.__metadata("design:type", Number)
|
|
172
|
+
], ResourceUsage.prototype, "supervisorUserId", void 0);
|
|
173
|
+
tslib_1.__decorate([
|
|
174
|
+
(0, typeorm_1.ManyToOne)(() => user_entity_1.User, { nullable: true, onDelete: 'SET NULL' }),
|
|
175
|
+
(0, typeorm_1.JoinColumn)({ name: 'supervisorUserId' }),
|
|
176
|
+
(0, swagger_1.ApiProperty)({
|
|
177
|
+
description: 'The supervisor who supervised this session',
|
|
178
|
+
required: false,
|
|
179
|
+
type: () => user_entity_1.User,
|
|
180
|
+
}),
|
|
181
|
+
tslib_1.__metadata("design:type", user_entity_1.User)
|
|
182
|
+
], ResourceUsage.prototype, "supervisorUser", void 0);
|
|
163
183
|
exports.ResourceUsage = ResourceUsage = tslib_1.__decorate([
|
|
164
184
|
(0, typeorm_1.Entity)()
|
|
165
185
|
], ResourceUsage);
|