@attraccess/database-entities 0.0.16 → 1.2.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 +4 -5
- package/src/index.d.ts +2 -0
- package/src/index.js +4 -0
- package/src/index.js.map +1 -1
- package/src/lib/entities/attractap.entity.d.ts +15 -0
- package/src/lib/entities/attractap.entity.js +87 -0
- package/src/lib/entities/attractap.entity.js.map +1 -0
- package/src/lib/entities/billing-transaction-item.entity.d.ts +11 -0
- package/src/lib/entities/billing-transaction-item.entity.js +65 -0
- package/src/lib/entities/billing-transaction-item.entity.js.map +1 -0
- package/src/lib/entities/billing-transaction.entity.d.ts +25 -0
- package/src/lib/entities/billing-transaction.entity.js +121 -0
- package/src/lib/entities/billing-transaction.entity.js.map +1 -0
- package/src/lib/entities/email-template.entity.d.ts +15 -0
- package/src/lib/entities/email-template.entity.js +61 -0
- package/src/lib/entities/email-template.entity.js.map +1 -0
- package/src/lib/entities/mqttServer.entity.d.ts +3 -2
- package/src/lib/entities/mqttServer.entity.js +24 -5
- package/src/lib/entities/mqttServer.entity.js.map +1 -1
- package/src/lib/entities/nfcCard.entity.d.ts +12 -0
- package/src/lib/entities/nfcCard.entity.js +77 -0
- package/src/lib/entities/nfcCard.entity.js.map +1 -0
- package/src/lib/entities/resource-billing-configuration.entity.d.ts +10 -0
- package/src/lib/entities/resource-billing-configuration.entity.js +52 -0
- package/src/lib/entities/resource-billing-configuration.entity.js.map +1 -0
- package/src/lib/entities/resource.entity.d.ts +23 -10
- package/src/lib/entities/resource.entity.js +96 -34
- package/src/lib/entities/resource.entity.js.map +1 -1
- package/src/lib/entities/resource.maintenance.d.ts +11 -0
- package/src/lib/entities/resource.maintenance.js +78 -0
- package/src/lib/entities/resource.maintenance.js.map +1 -0
- package/src/lib/entities/resource.type.d.ts +4 -0
- package/src/lib/entities/resource.type.js +9 -0
- package/src/lib/entities/resource.type.js.map +1 -0
- package/src/lib/entities/resourceFlowEdge.d.ts +12 -0
- package/src/lib/entities/resourceFlowEdge.js +86 -0
- package/src/lib/entities/resourceFlowEdge.js.map +1 -0
- package/src/lib/entities/resourceFlowLog.d.ts +18 -0
- package/src/lib/entities/resourceFlowLog.js +94 -0
- package/src/lib/entities/resourceFlowLog.js.map +1 -0
- package/src/lib/entities/resourceFlowNode.d.ts +161 -0
- package/src/lib/entities/resourceFlowNode.js +257 -0
- package/src/lib/entities/resourceFlowNode.js.map +1 -0
- package/src/lib/entities/resourceGroup.entity.d.ts +2 -2
- package/src/lib/entities/resourceGroup.entity.js +3 -3
- package/src/lib/entities/resourceGroup.entity.js.map +1 -1
- package/src/lib/entities/{resourceIntroductionUser.entity.d.ts → resourceIntroducer.entity.d.ts} +5 -4
- package/src/lib/entities/{resourceIntroductionUser.entity.js → resourceIntroducer.entity.js} +27 -17
- package/src/lib/entities/resourceIntroducer.entity.js.map +1 -0
- package/src/lib/entities/resourceIntroduction.entity.d.ts +2 -1
- package/src/lib/entities/resourceIntroduction.entity.js +14 -4
- package/src/lib/entities/resourceIntroduction.entity.js.map +1 -1
- package/src/lib/entities/resourceIntroductionHistoryItem.entity.d.ts +1 -1
- package/src/lib/entities/resourceIntroductionHistoryItem.entity.js +3 -3
- package/src/lib/entities/resourceIntroductionHistoryItem.entity.js.map +1 -1
- package/src/lib/entities/resourceUsage.entity.d.ts +4 -0
- package/src/lib/entities/resourceUsage.entity.js +24 -2
- package/src/lib/entities/resourceUsage.entity.js.map +1 -1
- package/src/lib/entities/resourceUsage.type.d.ts +6 -0
- package/src/lib/entities/resourceUsage.type.js +11 -0
- package/src/lib/entities/resourceUsage.type.js.map +1 -0
- package/src/lib/entities/revokedToken.entity.d.ts +0 -5
- package/src/lib/entities/revokedToken.entity.js +1 -29
- package/src/lib/entities/revokedToken.entity.js.map +1 -1
- package/src/lib/entities/session.entity.d.ts +12 -0
- package/src/lib/entities/session.entity.js +91 -0
- package/src/lib/entities/session.entity.js.map +1 -0
- package/src/lib/entities/setting.entity.d.ts +8 -0
- package/src/lib/entities/setting.entity.js +56 -0
- package/src/lib/entities/setting.entity.js.map +1 -0
- package/src/lib/entities/ssoProvider.oidc.d.ts +3 -0
- package/src/lib/entities/ssoProvider.oidc.js +27 -0
- package/src/lib/entities/ssoProvider.oidc.js.map +1 -1
- package/src/lib/entities/user.entity.d.ts +17 -4
- package/src/lib/entities/user.entity.js +79 -8
- package/src/lib/entities/user.entity.js.map +1 -1
- package/src/lib/entities-index.d.ts +30 -9
- package/src/lib/entities-index.js +61 -12
- package/src/lib/entities-index.js.map +1 -1
- package/src/lib/types/documentationType.enum.d.ts +7 -0
- package/src/lib/types/documentationType.enum.js +12 -0
- package/src/lib/types/documentationType.enum.js.map +1 -0
- package/src/lib/entities/mqttResourceConfig.entity.d.ts +0 -15
- package/src/lib/entities/mqttResourceConfig.entity.js +0 -95
- package/src/lib/entities/mqttResourceConfig.entity.js.map +0 -1
- package/src/lib/entities/resourceIntroductionUser.entity.js.map +0 -1
- package/src/lib/entities/webhookConfig.entity.d.ts +0 -20
- package/src/lib/entities/webhookConfig.entity.js +0 -148
- package/src/lib/entities/webhookConfig.entity.js.map +0 -1
|
@@ -0,0 +1,77 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.NFCCard = void 0;
|
|
4
|
+
const tslib_1 = require("tslib");
|
|
5
|
+
const swagger_1 = require("@nestjs/swagger");
|
|
6
|
+
const class_transformer_1 = require("class-transformer");
|
|
7
|
+
const typeorm_1 = require("typeorm");
|
|
8
|
+
const typeorm_2 = require("typeorm");
|
|
9
|
+
const user_entity_1 = require("./user.entity");
|
|
10
|
+
let NFCCard = class NFCCard {
|
|
11
|
+
};
|
|
12
|
+
exports.NFCCard = NFCCard;
|
|
13
|
+
tslib_1.__decorate([
|
|
14
|
+
(0, typeorm_2.PrimaryGeneratedColumn)(),
|
|
15
|
+
(0, swagger_1.ApiProperty)({ description: 'The ID of the NFC card' }),
|
|
16
|
+
tslib_1.__metadata("design:type", Number)
|
|
17
|
+
], NFCCard.prototype, "id", void 0);
|
|
18
|
+
tslib_1.__decorate([
|
|
19
|
+
(0, typeorm_1.Column)({
|
|
20
|
+
type: 'text',
|
|
21
|
+
nullable: false,
|
|
22
|
+
}),
|
|
23
|
+
(0, swagger_1.ApiProperty)({ description: 'The UID of the NFC card' }),
|
|
24
|
+
tslib_1.__metadata("design:type", String)
|
|
25
|
+
], NFCCard.prototype, "uid", void 0);
|
|
26
|
+
tslib_1.__decorate([
|
|
27
|
+
(0, typeorm_1.ManyToOne)(() => user_entity_1.User, (user) => user.nfcCards),
|
|
28
|
+
(0, typeorm_1.JoinColumn)({ name: 'userId' }),
|
|
29
|
+
(0, swagger_1.ApiProperty)({ description: 'The ID of the user that owns the NFC card', type: () => user_entity_1.User }),
|
|
30
|
+
tslib_1.__metadata("design:type", user_entity_1.User)
|
|
31
|
+
], NFCCard.prototype, "user", void 0);
|
|
32
|
+
tslib_1.__decorate([
|
|
33
|
+
(0, typeorm_1.Column)({
|
|
34
|
+
type: 'integer',
|
|
35
|
+
nullable: false,
|
|
36
|
+
}),
|
|
37
|
+
(0, class_transformer_1.Exclude)(),
|
|
38
|
+
tslib_1.__metadata("design:type", Number)
|
|
39
|
+
], NFCCard.prototype, "keyNo", void 0);
|
|
40
|
+
tslib_1.__decorate([
|
|
41
|
+
(0, typeorm_1.Column)({
|
|
42
|
+
type: 'text',
|
|
43
|
+
nullable: false,
|
|
44
|
+
}),
|
|
45
|
+
(0, class_transformer_1.Exclude)(),
|
|
46
|
+
tslib_1.__metadata("design:type", String)
|
|
47
|
+
], NFCCard.prototype, "key", void 0);
|
|
48
|
+
tslib_1.__decorate([
|
|
49
|
+
(0, typeorm_1.CreateDateColumn)(),
|
|
50
|
+
(0, swagger_1.ApiProperty)({ description: 'The date and time the NFC card was created' }),
|
|
51
|
+
tslib_1.__metadata("design:type", Date)
|
|
52
|
+
], NFCCard.prototype, "createdAt", void 0);
|
|
53
|
+
tslib_1.__decorate([
|
|
54
|
+
(0, typeorm_1.UpdateDateColumn)(),
|
|
55
|
+
(0, swagger_1.ApiProperty)({ description: 'The date and time the NFC card was last updated' }),
|
|
56
|
+
tslib_1.__metadata("design:type", Date)
|
|
57
|
+
], NFCCard.prototype, "updatedAt", void 0);
|
|
58
|
+
tslib_1.__decorate([
|
|
59
|
+
(0, typeorm_1.Column)({
|
|
60
|
+
type: 'datetime',
|
|
61
|
+
default: () => 'CURRENT_TIMESTAMP',
|
|
62
|
+
}),
|
|
63
|
+
(0, swagger_1.ApiProperty)({ description: 'The date and time the NFC card was last seen', type: 'string', format: 'date-time' }),
|
|
64
|
+
tslib_1.__metadata("design:type", Date)
|
|
65
|
+
], NFCCard.prototype, "lastSeen", void 0);
|
|
66
|
+
tslib_1.__decorate([
|
|
67
|
+
(0, typeorm_1.Column)({
|
|
68
|
+
type: 'boolean',
|
|
69
|
+
default: false,
|
|
70
|
+
}),
|
|
71
|
+
(0, swagger_1.ApiProperty)({ description: 'Whether the NFC card is active' }),
|
|
72
|
+
tslib_1.__metadata("design:type", Boolean)
|
|
73
|
+
], NFCCard.prototype, "isActive", void 0);
|
|
74
|
+
exports.NFCCard = NFCCard = tslib_1.__decorate([
|
|
75
|
+
(0, typeorm_1.Entity)()
|
|
76
|
+
], NFCCard);
|
|
77
|
+
//# sourceMappingURL=nfcCard.entity.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"nfcCard.entity.js","sourceRoot":"","sources":["../../../../../../libs/database-entities/src/lib/entities/nfcCard.entity.ts"],"names":[],"mappings":";;;;AAAA,6CAA8C;AAC9C,yDAA4C;AAC5C,qCAAoG;AACpG,qCAAiD;AACjD,+CAAqC;AAG9B,IAAM,OAAO,GAAb,MAAM,OAAO;CAoDnB,CAAA;AApDY,0BAAO;AAGlB;IAFC,IAAA,gCAAsB,GAAE;IACxB,IAAA,qBAAW,EAAC,EAAE,WAAW,EAAE,wBAAwB,EAAE,CAAC;;mCAC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QACN,IAAI,EAAE,SAAS;QACf,OAAO,EAAE,KAAK;KACf,CAAC;IACD,IAAA,qBAAW,EAAC,EAAE,WAAW,EAAE,gCAAgC,EAAE,CAAC;;yCAC5C;kBAnDR,OAAO;IADnB,IAAA,gBAAM,GAAE;GACI,OAAO,CAoDnB"}
|
|
@@ -0,0 +1,52 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.ResourceBillingConfiguration = 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
|
+
let ResourceBillingConfiguration = class ResourceBillingConfiguration {
|
|
9
|
+
};
|
|
10
|
+
exports.ResourceBillingConfiguration = ResourceBillingConfiguration;
|
|
11
|
+
tslib_1.__decorate([
|
|
12
|
+
(0, typeorm_1.PrimaryGeneratedColumn)(),
|
|
13
|
+
(0, swagger_1.ApiProperty)({
|
|
14
|
+
description: 'The unique identifier of the resource billing configuration',
|
|
15
|
+
example: 1,
|
|
16
|
+
}),
|
|
17
|
+
tslib_1.__metadata("design:type", Number)
|
|
18
|
+
], ResourceBillingConfiguration.prototype, "id", void 0);
|
|
19
|
+
tslib_1.__decorate([
|
|
20
|
+
(0, typeorm_1.CreateDateColumn)(),
|
|
21
|
+
(0, swagger_1.ApiProperty)({ description: 'The date and time the billing transaction was created' }),
|
|
22
|
+
tslib_1.__metadata("design:type", Date)
|
|
23
|
+
], ResourceBillingConfiguration.prototype, "createdAt", void 0);
|
|
24
|
+
tslib_1.__decorate([
|
|
25
|
+
(0, typeorm_1.UpdateDateColumn)(),
|
|
26
|
+
(0, swagger_1.ApiProperty)({ description: 'The date and time the billing transaction was last updated' }),
|
|
27
|
+
tslib_1.__metadata("design:type", Date)
|
|
28
|
+
], ResourceBillingConfiguration.prototype, "updatedAt", void 0);
|
|
29
|
+
tslib_1.__decorate([
|
|
30
|
+
(0, typeorm_1.Column)({ type: 'integer', unique: true }),
|
|
31
|
+
(0, swagger_1.ApiProperty)({ description: 'The ID of the resource' }),
|
|
32
|
+
tslib_1.__metadata("design:type", Number)
|
|
33
|
+
], ResourceBillingConfiguration.prototype, "resourceId", void 0);
|
|
34
|
+
tslib_1.__decorate([
|
|
35
|
+
(0, typeorm_1.ManyToOne)(() => resource_entity_1.Resource, (resource) => resource.billingConfigurations),
|
|
36
|
+
(0, swagger_1.ApiProperty)({ description: 'The resource', required: false }),
|
|
37
|
+
tslib_1.__metadata("design:type", resource_entity_1.Resource)
|
|
38
|
+
], ResourceBillingConfiguration.prototype, "resource", void 0);
|
|
39
|
+
tslib_1.__decorate([
|
|
40
|
+
(0, typeorm_1.Column)({ type: 'integer' }),
|
|
41
|
+
(0, swagger_1.ApiProperty)({ description: 'The credit cost per usage' }),
|
|
42
|
+
tslib_1.__metadata("design:type", Number)
|
|
43
|
+
], ResourceBillingConfiguration.prototype, "creditsPerUsage", void 0);
|
|
44
|
+
tslib_1.__decorate([
|
|
45
|
+
(0, typeorm_1.Column)({ type: 'integer' }),
|
|
46
|
+
(0, swagger_1.ApiProperty)({ description: 'The credit cost per minute' }),
|
|
47
|
+
tslib_1.__metadata("design:type", Number)
|
|
48
|
+
], ResourceBillingConfiguration.prototype, "creditsPerMinute", void 0);
|
|
49
|
+
exports.ResourceBillingConfiguration = ResourceBillingConfiguration = tslib_1.__decorate([
|
|
50
|
+
(0, typeorm_1.Entity)()
|
|
51
|
+
], ResourceBillingConfiguration);
|
|
52
|
+
//# sourceMappingURL=resource-billing-configuration.entity.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"resource-billing-configuration.entity.js","sourceRoot":"","sources":["../../../../../../libs/database-entities/src/lib/entities/resource-billing-configuration.entity.ts"],"names":[],"mappings":";;;;AAAA,qCAAgH;AAChH,6CAA8C;AAC9C,uDAA6C;AAGtC,IAAM,4B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ntroduction.entity';
|
|
2
2
|
import { ResourceUsage } from './resourceUsage.entity';
|
|
3
|
-
import {
|
|
4
|
-
import { MqttResourceConfig } from './mqttResourceConfig.entity';
|
|
5
|
-
import { WebhookConfig } from './webhookConfig.entity';
|
|
3
|
+
import { ResourceIntroducer } from './resourceIntroducer.entity';
|
|
6
4
|
import { ResourceGroup } from './resourceGroup.entity';
|
|
5
|
+
import { DocumentationType } from '../types/documentationType.enum';
|
|
6
|
+
import { ResourceFlowNode } from './resourceFlowNode';
|
|
7
|
+
import { ResourceFlowEdge } from './resourceFlowEdge';
|
|
8
|
+
import { ResourceFlowLog } from './resourceFlowLog';
|
|
9
|
+
import { Attractap } from './attractap.entity';
|
|
10
|
+
import { ResourceMaintenance } from './resource.maintenance';
|
|
11
|
+
import { ResourceType } from './resource.type';
|
|
12
|
+
import { ResourceBillingConfiguration } from './resource-billing-configuration.entity';
|
|
7
13
|
export declare class Resource {
|
|
8
14
|
id: number;
|
|
9
15
|
name: string;
|
|
16
|
+
type: ResourceType;
|
|
17
|
+
separateUnlockAndUnlatch: boolean | null;
|
|
10
18
|
description: string | null;
|
|
11
19
|
imageFilename: string | null;
|
|
20
|
+
documentationType: DocumentationType | null;
|
|
21
|
+
documentationMarkdown: string | null;
|
|
22
|
+
documentationUrl: string | null;
|
|
23
|
+
allowTakeOver: boolean;
|
|
12
24
|
createdAt: Date;
|
|
13
25
|
updatedAt: Date;
|
|
26
|
+
deletedAt: Date | null;
|
|
14
27
|
introductions: ResourceIntroduction[];
|
|
15
28
|
usages: ResourceUsage[];
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
29
|
+
flowNodes: ResourceFlowNode[];
|
|
30
|
+
flowEdges: ResourceFlowEdge[];
|
|
31
|
+
flowLogs: ResourceFlowLog[];
|
|
32
|
+
introducers: ResourceIntroducer[];
|
|
19
33
|
groups: ResourceGroup[];
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
totalUsageMinutes: number;
|
|
34
|
+
attractapReaders: Attractap[];
|
|
35
|
+
maintenances: ResourceMaintenance[];
|
|
36
|
+
billingConfigurations: ResourceBillingConfiguration[];
|
|
24
37
|
}
|
|
@@ -1,15 +1,21 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.
|
|
3
|
+
exports.Resource = 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 resourceIntroduction_entity_1 = require("./resourceIntroduction.entity");
|
|
8
8
|
const resourceUsage_entity_1 = require("./resourceUsage.entity");
|
|
9
|
-
const
|
|
10
|
-
const mqttResourceConfig_entity_1 = require("./mqttResourceConfig.entity");
|
|
11
|
-
const webhookConfig_entity_1 = require("./webhookConfig.entity");
|
|
9
|
+
const resourceIntroducer_entity_1 = require("./resourceIntroducer.entity");
|
|
12
10
|
const resourceGroup_entity_1 = require("./resourceGroup.entity");
|
|
11
|
+
const documentationType_enum_1 = require("../types/documentationType.enum");
|
|
12
|
+
const resourceFlowNode_1 = require("./resourceFlowNode");
|
|
13
|
+
const resourceFlowEdge_1 = require("./resourceFlowEdge");
|
|
14
|
+
const resourceFlowLog_1 = require("./resourceFlowLog");
|
|
15
|
+
const attractap_entity_1 = require("./attractap.entity");
|
|
16
|
+
const resource_maintenance_1 = require("./resource.maintenance");
|
|
17
|
+
const resource_type_1 = require("./resource.type");
|
|
18
|
+
const resource_billing_configuration_entity_1 = require("./resource-billing-configuration.entity");
|
|
13
19
|
let Resource = class Resource {
|
|
14
20
|
};
|
|
15
21
|
exports.Resource = Resource;
|
|
@@ -29,6 +35,24 @@ tslib_1.__decorate([
|
|
|
29
35
|
}),
|
|
30
36
|
tslib_1.__metadata("design:type", String)
|
|
31
37
|
], Resource.prototype, "name", void 0);
|
|
38
|
+
tslib_1.__decorate([
|
|
39
|
+
(0, typeorm_1.Column)({ type: 'simple-enum', enum: resource_type_1.ResourceType }),
|
|
40
|
+
(0, swagger_1.ApiProperty)({
|
|
41
|
+
description: 'The type of the resource',
|
|
42
|
+
example: resource_type_1.ResourceType.Machine,
|
|
43
|
+
enum: resource_type_1.ResourceType,
|
|
44
|
+
}),
|
|
45
|
+
tslib_1.__metadata("design:type", String)
|
|
46
|
+
], Resource.prototype, "type", void 0);
|
|
47
|
+
tslib_1.__decorate([
|
|
48
|
+
(0, typeorm_1.Column)({ type: 'boolean', default: false }),
|
|
49
|
+
(0, swagger_1.ApiProperty)({
|
|
50
|
+
description: '(only for doors) wheter the door needs seperate actions for unlocking and unlatching',
|
|
51
|
+
example: false,
|
|
52
|
+
default: false,
|
|
53
|
+
}),
|
|
54
|
+
tslib_1.__metadata("design:type", Boolean)
|
|
55
|
+
], Resource.prototype, "separateUnlockAndUnlatch", void 0);
|
|
32
56
|
tslib_1.__decorate([
|
|
33
57
|
(0, typeorm_1.Column)({ type: 'text', nullable: true }),
|
|
34
58
|
(0, swagger_1.ApiProperty)({
|
|
@@ -47,6 +71,43 @@ tslib_1.__decorate([
|
|
|
47
71
|
}),
|
|
48
72
|
tslib_1.__metadata("design:type", String)
|
|
49
73
|
], Resource.prototype, "imageFilename", void 0);
|
|
74
|
+
tslib_1.__decorate([
|
|
75
|
+
(0, typeorm_1.Column)({ type: 'text', nullable: true }),
|
|
76
|
+
(0, swagger_1.ApiProperty)({
|
|
77
|
+
description: 'The type of documentation (markdown or url)',
|
|
78
|
+
enum: documentationType_enum_1.DocumentationType,
|
|
79
|
+
required: false,
|
|
80
|
+
example: documentationType_enum_1.DocumentationType.MARKDOWN,
|
|
81
|
+
}),
|
|
82
|
+
tslib_1.__metadata("design:type", String)
|
|
83
|
+
], Resource.prototype, "documentationType", void 0);
|
|
84
|
+
tslib_1.__decorate([
|
|
85
|
+
(0, typeorm_1.Column)({ type: 'text', nullable: true }),
|
|
86
|
+
(0, swagger_1.ApiProperty)({
|
|
87
|
+
description: 'Markdown content for resource documentation',
|
|
88
|
+
required: false,
|
|
89
|
+
example: '# Resource Documentation\n\nThis is a markdown documentation for the resource.',
|
|
90
|
+
}),
|
|
91
|
+
tslib_1.__metadata("design:type", String)
|
|
92
|
+
], Resource.prototype, "documentationMarkdown", void 0);
|
|
93
|
+
tslib_1.__decorate([
|
|
94
|
+
(0, typeorm_1.Column)({ type: 'text', nullable: true }),
|
|
95
|
+
(0, swagger_1.ApiProperty)({
|
|
96
|
+
description: 'URL to external documentation',
|
|
97
|
+
required: false,
|
|
98
|
+
example: 'https://example.com/documentation',
|
|
99
|
+
}),
|
|
100
|
+
tslib_1.__metadata("design:type", String)
|
|
101
|
+
], Resource.prototype, "documentationUrl", void 0);
|
|
102
|
+
tslib_1.__decorate([
|
|
103
|
+
(0, typeorm_1.Column)({ type: 'boolean', default: false }),
|
|
104
|
+
(0, swagger_1.ApiProperty)({
|
|
105
|
+
description: 'Whether this resource allows overtaking by the next user without the prior user ending their session',
|
|
106
|
+
example: false,
|
|
107
|
+
default: false,
|
|
108
|
+
}),
|
|
109
|
+
tslib_1.__metadata("design:type", Boolean)
|
|
110
|
+
], Resource.prototype, "allowTakeOver", void 0);
|
|
50
111
|
tslib_1.__decorate([
|
|
51
112
|
(0, typeorm_1.CreateDateColumn)(),
|
|
52
113
|
(0, swagger_1.ApiProperty)({
|
|
@@ -61,6 +122,14 @@ tslib_1.__decorate([
|
|
|
61
122
|
}),
|
|
62
123
|
tslib_1.__metadata("design:type", Date)
|
|
63
124
|
], Resource.prototype, "updatedAt", void 0);
|
|
125
|
+
tslib_1.__decorate([
|
|
126
|
+
(0, typeorm_1.DeleteDateColumn)(),
|
|
127
|
+
(0, swagger_1.ApiProperty)({
|
|
128
|
+
description: 'When the resource was deleted',
|
|
129
|
+
nullable: true,
|
|
130
|
+
}),
|
|
131
|
+
tslib_1.__metadata("design:type", Date)
|
|
132
|
+
], Resource.prototype, "deletedAt", void 0);
|
|
64
133
|
tslib_1.__decorate([
|
|
65
134
|
(0, typeorm_1.OneToMany)(() => resourceIntroduction_entity_1.ResourceIntroduction, (introduction) => introduction.resource),
|
|
66
135
|
tslib_1.__metadata("design:type", Array)
|
|
@@ -70,17 +139,21 @@ tslib_1.__decorate([
|
|
|
70
139
|
tslib_1.__metadata("design:type", Array)
|
|
71
140
|
], Resource.prototype, "usages", void 0);
|
|
72
141
|
tslib_1.__decorate([
|
|
73
|
-
(0, typeorm_1.OneToMany)(() =>
|
|
142
|
+
(0, typeorm_1.OneToMany)(() => resourceFlowNode_1.ResourceFlowNode, (node) => node.resource),
|
|
74
143
|
tslib_1.__metadata("design:type", Array)
|
|
75
|
-
], Resource.prototype, "
|
|
144
|
+
], Resource.prototype, "flowNodes", void 0);
|
|
76
145
|
tslib_1.__decorate([
|
|
77
|
-
(0, typeorm_1.
|
|
78
|
-
tslib_1.__metadata("design:type",
|
|
79
|
-
], Resource.prototype, "
|
|
146
|
+
(0, typeorm_1.OneToMany)(() => resourceFlowEdge_1.ResourceFlowEdge, (edge) => edge.resource),
|
|
147
|
+
tslib_1.__metadata("design:type", Array)
|
|
148
|
+
], Resource.prototype, "flowEdges", void 0);
|
|
149
|
+
tslib_1.__decorate([
|
|
150
|
+
(0, typeorm_1.OneToMany)(() => resourceFlowLog_1.ResourceFlowLog, (log) => log.resource),
|
|
151
|
+
tslib_1.__metadata("design:type", Array)
|
|
152
|
+
], Resource.prototype, "flowLogs", void 0);
|
|
80
153
|
tslib_1.__decorate([
|
|
81
|
-
(0, typeorm_1.OneToMany)(() =>
|
|
154
|
+
(0, typeorm_1.OneToMany)(() => resourceIntroducer_entity_1.ResourceIntroducer, (introducer) => introducer.resource),
|
|
82
155
|
tslib_1.__metadata("design:type", Array)
|
|
83
|
-
], Resource.prototype, "
|
|
156
|
+
], Resource.prototype, "introducers", void 0);
|
|
84
157
|
tslib_1.__decorate([
|
|
85
158
|
(0, typeorm_1.ManyToMany)(() => resourceGroup_entity_1.ResourceGroup, (group) => group.resources),
|
|
86
159
|
(0, typeorm_1.JoinTable)(),
|
|
@@ -91,30 +164,19 @@ tslib_1.__decorate([
|
|
|
91
164
|
}),
|
|
92
165
|
tslib_1.__metadata("design:type", Array)
|
|
93
166
|
], Resource.prototype, "groups", void 0);
|
|
167
|
+
tslib_1.__decorate([
|
|
168
|
+
(0, typeorm_1.ManyToMany)(() => attractap_entity_1.Attractap, (reader) => reader.resources),
|
|
169
|
+
tslib_1.__metadata("design:type", Array)
|
|
170
|
+
], Resource.prototype, "attractapReaders", void 0);
|
|
171
|
+
tslib_1.__decorate([
|
|
172
|
+
(0, typeorm_1.OneToMany)(() => resource_maintenance_1.ResourceMaintenance, (maintenance) => maintenance.resource),
|
|
173
|
+
tslib_1.__metadata("design:type", Array)
|
|
174
|
+
], Resource.prototype, "maintenances", void 0);
|
|
175
|
+
tslib_1.__decorate([
|
|
176
|
+
(0, typeorm_1.OneToMany)(() => resource_billing_configuration_entity_1.ResourceBillingConfiguration, (configuration) => configuration.resource),
|
|
177
|
+
tslib_1.__metadata("design:type", Array)
|
|
178
|
+
], Resource.prototype, "billingConfigurations", void 0);
|
|
94
179
|
exports.Resource = Resource = tslib_1.__decorate([
|
|
95
180
|
(0, typeorm_1.Entity)()
|
|
96
181
|
], Resource);
|
|
97
|
-
let ResourceComputedView = class ResourceComputedView {
|
|
98
|
-
};
|
|
99
|
-
exports.ResourceComputedView = ResourceComputedView;
|
|
100
|
-
tslib_1.__decorate([
|
|
101
|
-
(0, typeorm_1.ViewColumn)(),
|
|
102
|
-
tslib_1.__metadata("design:type", Number)
|
|
103
|
-
], ResourceComputedView.prototype, "id", void 0);
|
|
104
|
-
tslib_1.__decorate([
|
|
105
|
-
(0, typeorm_1.ViewColumn)(),
|
|
106
|
-
tslib_1.__metadata("design:type", Number)
|
|
107
|
-
], ResourceComputedView.prototype, "totalUsageMinutes", void 0);
|
|
108
|
-
exports.ResourceComputedView = ResourceComputedView = tslib_1.__decorate([
|
|
109
|
-
(0, typeorm_1.ViewEntity)({
|
|
110
|
-
materialized: false,
|
|
111
|
-
expression: (connection) => connection
|
|
112
|
-
.createQueryBuilder()
|
|
113
|
-
.select('resource.id', 'id')
|
|
114
|
-
.addSelect('COALESCE(SUM(usage.usageInMinutes), -1)', 'totalUsageMinutes')
|
|
115
|
-
.from(Resource, 'resource')
|
|
116
|
-
.leftJoin(resourceUsage_entity_1.ResourceUsage, 'usage', 'usage.resourceId = resource.id')
|
|
117
|
-
.groupBy('resource.id'),
|
|
118
|
-
})
|
|
119
|
-
], ResourceComputedView);
|
|
120
182
|
//# sourceMappingURL=resource.entity.js.map
|
|
@@ -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,qCAUiB;AACjB,6CAA8C;AAC9C,+EAAqE;AACrE,iEAAuD;AACvD,2EAAiE;AACjE,iEAAuD;AACvD,4EAAoE;AACpE,yDAAsD;AACtD,yDAAsD;AACtD,uDAAoD;AACpD,yDAA+C;AAC/C,iEAA6D;AAC7D,mDAA+C;AAC/C,mGAAuF;AAGhF,IAAM,QAAQ,GAAd,MAAM,QAAQ;CAsIpB,CAAA;AAtIY,4BAAQ;AAMnB;IALC,IAAA,gCAAsB,GAAE;IACxB,IAAA,qBAAW,EAAC;QACX,WAAW,EAAE,uCAAuC;QACpD,OAAO,EAAE,CAAC;KACX,CAAC;;oCACU;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;;sCACY;AAQd;IANC,IAAA,gBAAM,EAAC,EAAE,IAAI,EAAE,aAAa,EAAE,IAAI,EAAE,4BAAY,EAAE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+
resourceId: number;
|
|
7
|
+
resource: Resource;
|
|
8
|
+
startTime: Date;
|
|
9
|
+
endTime: Date | null;
|
|
10
|
+
reason: string | null;
|
|
11
|
+
}
|
|
@@ -0,0 +1,78 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.ResourceMaintenance = 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
|
+
let ResourceMaintenance = class ResourceMaintenance {
|
|
9
|
+
};
|
|
10
|
+
exports.ResourceMaintenance = ResourceMaintenance;
|
|
11
|
+
tslib_1.__decorate([
|
|
12
|
+
(0, typeorm_1.PrimaryGeneratedColumn)(),
|
|
13
|
+
(0, swagger_1.ApiProperty)({
|
|
14
|
+
description: 'The unique identifier of the maintenance',
|
|
15
|
+
example: 1,
|
|
16
|
+
}),
|
|
17
|
+
tslib_1.__metadata("design:type", Number)
|
|
18
|
+
], ResourceMaintenance.prototype, "id", void 0);
|
|
19
|
+
tslib_1.__decorate([
|
|
20
|
+
(0, typeorm_1.CreateDateColumn)(),
|
|
21
|
+
(0, swagger_1.ApiProperty)({
|
|
22
|
+
description: 'When the maintenance was created',
|
|
23
|
+
}),
|
|
24
|
+
tslib_1.__metadata("design:type", Date)
|
|
25
|
+
], ResourceMaintenance.prototype, "createdAt", void 0);
|
|
26
|
+
tslib_1.__decorate([
|
|
27
|
+
(0, typeorm_1.UpdateDateColumn)(),
|
|
28
|
+
(0, swagger_1.ApiProperty)({
|
|
29
|
+
description: 'When the maintenance was last updated',
|
|
30
|
+
}),
|
|
31
|
+
tslib_1.__metadata("design:type", Date)
|
|
32
|
+
], ResourceMaintenance.prototype, "updatedAt", void 0);
|
|
33
|
+
tslib_1.__decorate([
|
|
34
|
+
(0, typeorm_1.Column)({ type: 'int' }),
|
|
35
|
+
(0, swagger_1.ApiProperty)({
|
|
36
|
+
description: 'The ID of the resource',
|
|
37
|
+
example: 1,
|
|
38
|
+
}),
|
|
39
|
+
tslib_1.__metadata("design:type", Number)
|
|
40
|
+
], ResourceMaintenance.prototype, "resourceId", void 0);
|
|
41
|
+
tslib_1.__decorate([
|
|
42
|
+
(0, typeorm_1.ManyToOne)(() => resource_entity_1.Resource, (resource) => resource.maintenances),
|
|
43
|
+
tslib_1.__metadata("design:type", resource_entity_1.Resource)
|
|
44
|
+
], ResourceMaintenance.prototype, "resource", void 0);
|
|
45
|
+
tslib_1.__decorate([
|
|
46
|
+
(0, typeorm_1.Column)({ type: 'datetime' }),
|
|
47
|
+
(0, swagger_1.ApiProperty)({
|
|
48
|
+
description: 'When the maintenance started',
|
|
49
|
+
type: String,
|
|
50
|
+
example: '2025-01-01T00:00:00.000Z',
|
|
51
|
+
format: 'date-time',
|
|
52
|
+
}),
|
|
53
|
+
tslib_1.__metadata("design:type", Date)
|
|
54
|
+
], ResourceMaintenance.prototype, "startTime", void 0);
|
|
55
|
+
tslib_1.__decorate([
|
|
56
|
+
(0, typeorm_1.Column)({ type: 'datetime', nullable: true }),
|
|
57
|
+
(0, swagger_1.ApiProperty)({
|
|
58
|
+
description: 'When the maintenance ended (null if not ended yet)',
|
|
59
|
+
required: false,
|
|
60
|
+
type: String,
|
|
61
|
+
example: '2025-01-01T00:00:00.000Z',
|
|
62
|
+
nullable: true,
|
|
63
|
+
format: 'date-time',
|
|
64
|
+
}),
|
|
65
|
+
tslib_1.__metadata("design:type", Date)
|
|
66
|
+
], ResourceMaintenance.prototype, "endTime", void 0);
|
|
67
|
+
tslib_1.__decorate([
|
|
68
|
+
(0, typeorm_1.Column)({ type: 'text', nullable: true }),
|
|
69
|
+
(0, swagger_1.ApiProperty)({
|
|
70
|
+
description: 'The reason for the maintenance',
|
|
71
|
+
required: false,
|
|
72
|
+
}),
|
|
73
|
+
tslib_1.__metadata("design:type", String)
|
|
74
|
+
], ResourceMaintenance.prototype, "reason", void 0);
|
|
75
|
+
exports.ResourceMaintenance = ResourceMaintenance = tslib_1.__decorate([
|
|
76
|
+
(0, typeorm_1.Entity)()
|
|
77
|
+
], ResourceMaintenance);
|
|
78
|
+
//# sourceMappingURL=resource.maintenance.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"resource.maintenance.js","sourceRoot":"","sources":["../../../../../../libs/database-entities/src/lib/entities/resource.maintenance.ts"],"names":[],"mappings":";;;;AAAA,qCAAgH;AAChH,6CAA8C;AAC9C,uDAA6C;AAGtC,IAAM,mBAAmB,GAAzB,MAAM,mBAAmB;CAwD/B,CAAA;AAxDY,kDAAmB;AAM9B;IALC,IAAA,gCAAsB,GAAE;IACxB,IAAA,qBAAW,EAAC;QACX,WAAW,EAAE,0CAA0C;QACvD,OAAO,EAAE,CAAC;KACX,CAAC;;+CACU;AAMZ;IAJC,IAAA,0BAAgB,GAAE;IAClB,IAAA,qBAAW,EAAC;QACX,WAAW,EAAE,kCAAkC;KAChD,CAAC;sCACU,IAAI;sDAAC;AAMjB;IAJC,IAAA,0BAAgB,GAAE;IAClB,IAAA,qBAAW,EAAC;QACX,WAAW,EAAE,uCAAuC;KACrD,CAAC;sCACU,IAAI;sDAAC;AAOjB;IALC,IAAA,gBAAM,EAAC,EAAE,IAAI,EAAE,KAAK,EAAE,CAAC;IACvB,IAAA,qBAAW,EAAC;QACX,WAAW,EAAE,wBAAwB;QACrC,OAAO,EAAE,CAAC;KACX,CAAC;;uDACkB;AAGpB;IADC,IAAA,mBAAS,EAAC,GAAG,EAAE,CAAC,0BAAQ,EAAE,CAAC,QAAQ,EAAE,EAAE,CAAC,QAAQ,CAAC,YAAY,CAAC;sCACpD,0BAAQ;qDAAC;AASpB;IAPC,IAAA,gBAAM,EAAC,EAAE,IAAI,EAAE,UAAU,EAAE,CAAC;IAC5B,IAAA,qBAAW,EAAC;QACX,WAAW,EAAE,8BAA8B;QAC3C,IAAI,EAAE,MAAM;QACZ,OAAO,EAAE,0BAA0B;QACnC,MAAM,EAAE,WAAW;KACpB,CAAC;sCACU,IAAI;sDAAC;AAWjB;IATC,IAAA,gBAAM,EAAC,EAAE,IAAI,EAAE,UAAU,EAAE,QAAQ,EAAE,IAAI,EAAE,CAAC;IAC5C,IAAA,qBAAW,EAAC;QACX,WAAW,EAAE,oDAAoD;QACjE,QAAQ,EAAE,KAAK;QACf,IAAI,EAAE,MAAM;QACZ,OAAO,EAAE,0BAA0B;QACnC,QAAQ,EAAE,IAAI;QACd,MAAM,EAAE,WAAW;KACpB,CAAC;sCACQ,IAAI;oDAAQ;AAOtB;IALC,IAAA,gBAAM,EAAC,EAAE,IAAI,EAAE,MAAM,EAAE,QAAQ,EAAE,IAAI,EAAE,CAAC;IACxC,IAAA,qBAAW,EAAC;QACX,WAAW,EAAE,gCAAgC;QAC7C,QAAQ,EAAE,KAAK;KAChB,CAAC;;mDACqB;8BAvDZ,mBAAmB;IAD/B,IAAA,gBAAM,GAAE;GACI,mBAAmB,CAwD/B"}
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.ResourceType = void 0;
|
|
4
|
+
var ResourceType;
|
|
5
|
+
(function (ResourceType) {
|
|
6
|
+
ResourceType["Machine"] = "machine";
|
|
7
|
+
ResourceType["Door"] = "door";
|
|
8
|
+
})(ResourceType || (exports.ResourceType = ResourceType = {}));
|
|
9
|
+
//# sourceMappingURL=resource.type.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"resource.type.js","sourceRoot":"","sources":["../../../../../../libs/database-entities/src/lib/entities/resource.type.ts"],"names":[],"mappings":";;;AAAA,IAAY,YAGX;AAHD,WAAY,YAAY;IACtB,mCAAmB,CAAA;IACnB,6BAAa,CAAA;AACf,CAAC,EAHW,YAAY,4BAAZ,YAAY,QAGvB"}
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
import { Resource } from './resource.entity';
|
|
2
|
+
export declare class ResourceFlowEdge {
|
|
3
|
+
id: string;
|
|
4
|
+
source: string;
|
|
5
|
+
sourceHandle: string | null;
|
|
6
|
+
target: string;
|
|
7
|
+
targetHandle: string | null;
|
|
8
|
+
createdAt: Date;
|
|
9
|
+
updatedAt: Date;
|
|
10
|
+
resourceId: number;
|
|
11
|
+
resource: Resource;
|
|
12
|
+
}
|
|
@@ -0,0 +1,86 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.ResourceFlowEdge = 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
|
+
let ResourceFlowEdge = class ResourceFlowEdge {
|
|
9
|
+
};
|
|
10
|
+
exports.ResourceFlowEdge = ResourceFlowEdge;
|
|
11
|
+
tslib_1.__decorate([
|
|
12
|
+
(0, typeorm_1.PrimaryColumn)({ type: 'text' }),
|
|
13
|
+
(0, swagger_1.ApiProperty)({
|
|
14
|
+
description: 'The unique identifier of the resource flow edge',
|
|
15
|
+
example: 'TGVgqDzCKXKVr-XGUD5V3',
|
|
16
|
+
}),
|
|
17
|
+
tslib_1.__metadata("design:type", String)
|
|
18
|
+
], ResourceFlowEdge.prototype, "id", void 0);
|
|
19
|
+
tslib_1.__decorate([
|
|
20
|
+
(0, typeorm_1.Column)({ type: 'text' }),
|
|
21
|
+
(0, swagger_1.ApiProperty)({
|
|
22
|
+
description: 'The source node id',
|
|
23
|
+
example: 'TGVgqDzCKXKVr-XGUD5V3',
|
|
24
|
+
}),
|
|
25
|
+
tslib_1.__metadata("design:type", String)
|
|
26
|
+
], ResourceFlowEdge.prototype, "source", void 0);
|
|
27
|
+
tslib_1.__decorate([
|
|
28
|
+
(0, typeorm_1.Column)({ type: 'text', nullable: true }),
|
|
29
|
+
(0, swagger_1.ApiProperty)({
|
|
30
|
+
description: 'The source handle id',
|
|
31
|
+
example: 'TGVgqDzCKXKVr-XGUD5V3',
|
|
32
|
+
}),
|
|
33
|
+
tslib_1.__metadata("design:type", String)
|
|
34
|
+
], ResourceFlowEdge.prototype, "sourceHandle", void 0);
|
|
35
|
+
tslib_1.__decorate([
|
|
36
|
+
(0, typeorm_1.Column)({ type: 'text' }),
|
|
37
|
+
(0, swagger_1.ApiProperty)({
|
|
38
|
+
description: 'The target node id',
|
|
39
|
+
example: 'TGVgqDzCKXKVr-XGUD5V3',
|
|
40
|
+
}),
|
|
41
|
+
tslib_1.__metadata("design:type", String)
|
|
42
|
+
], ResourceFlowEdge.prototype, "target", void 0);
|
|
43
|
+
tslib_1.__decorate([
|
|
44
|
+
(0, typeorm_1.Column)({ type: 'text', nullable: true }),
|
|
45
|
+
(0, swagger_1.ApiProperty)({
|
|
46
|
+
description: 'The target handle id',
|
|
47
|
+
example: 'TGVgqDzCKXKVr-XGUD5V3',
|
|
48
|
+
}),
|
|
49
|
+
tslib_1.__metadata("design:type", String)
|
|
50
|
+
], ResourceFlowEdge.prototype, "targetHandle", void 0);
|
|
51
|
+
tslib_1.__decorate([
|
|
52
|
+
(0, typeorm_1.CreateDateColumn)(),
|
|
53
|
+
(0, swagger_1.ApiProperty)({
|
|
54
|
+
description: 'When the node was created',
|
|
55
|
+
}),
|
|
56
|
+
tslib_1.__metadata("design:type", Date)
|
|
57
|
+
], ResourceFlowEdge.prototype, "createdAt", void 0);
|
|
58
|
+
tslib_1.__decorate([
|
|
59
|
+
(0, typeorm_1.UpdateDateColumn)(),
|
|
60
|
+
(0, swagger_1.ApiProperty)({
|
|
61
|
+
description: 'When the node was last updated',
|
|
62
|
+
}),
|
|
63
|
+
tslib_1.__metadata("design:type", Date)
|
|
64
|
+
], ResourceFlowEdge.prototype, "updatedAt", void 0);
|
|
65
|
+
tslib_1.__decorate([
|
|
66
|
+
(0, typeorm_1.Column)({ type: 'integer' }),
|
|
67
|
+
(0, swagger_1.ApiProperty)({
|
|
68
|
+
description: 'The id of the resource that this node belongs to',
|
|
69
|
+
example: 1,
|
|
70
|
+
}),
|
|
71
|
+
tslib_1.__metadata("design:type", Number)
|
|
72
|
+
], ResourceFlowEdge.prototype, "resourceId", void 0);
|
|
73
|
+
tslib_1.__decorate([
|
|
74
|
+
(0, typeorm_1.ManyToOne)(() => resource_entity_1.Resource, (resource) => resource.flowEdges, { onDelete: 'CASCADE' }),
|
|
75
|
+
(0, typeorm_1.JoinColumn)({ name: 'resourceId' }),
|
|
76
|
+
(0, swagger_1.ApiProperty)({
|
|
77
|
+
description: 'The resource being this edge belongs to',
|
|
78
|
+
type: () => resource_entity_1.Resource,
|
|
79
|
+
required: false,
|
|
80
|
+
}),
|
|
81
|
+
tslib_1.__metadata("design:type", resource_entity_1.Resource)
|
|
82
|
+
], ResourceFlowEdge.prototype, "resource", void 0);
|
|
83
|
+
exports.ResourceFlowEdge = ResourceFlowEdge = tslib_1.__decorate([
|
|
84
|
+
(0, typeorm_1.Entity)()
|
|
85
|
+
], ResourceFlowEdge);
|
|
86
|
+
//# sourceMappingURL=resourceFlowEdge.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"resourceFlowEdge.js","sourceRoot":"","sources":["../../../../../../libs/database-entities/src/lib/entities/resourceFlowEdge.ts"],"names":[],"mappings":";;;;AAAA,qCAAmH;AACnH,6CAA8C;AAC9C,uDAA6C;AAGtC,IAAM,gBAAgB,GAAtB,MAAM,gBAAgB;CA+D5B,CAAA;AA/DY,4CAAgB;AAM3B;IALC,IAAA,uBAAa,EAAC,EAAE,IAAI,EAAE,MAAM,EAAE,CAAC;IAC/B,IAAA,qBAAW,EAAC;QACX,WAAW,EAAE,iDAAiD;QAC9D,OAAO,EAAE,uBAAuB;KACjC,CAAC;;4CACU;AAOZ;IALC,IAAA,gBAAM,EAAC,EAAE,IAAI,EAAE,MAAM,EAAE,CAAC;IACxB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E,YAAY,EAAE,CAAC;IAClC,IAAA,qBAAW,EAAC;QACX,WAAW,EAAE,yCAAyC;QACtD,IAAI,EAAE,GAAG,EAAE,CAAC,0BAAQ;QACpB,QAAQ,EAAE,KAAK;KAChB,CAAC;sCACS,0BAAQ;kDAAC;2BA9DT,gBAAgB;IAD5B,IAAA,gBAAM,GAAE;GACI,gBAAgB,CA+D5B"}
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
import { Resource } from './resource.entity';
|
|
2
|
+
export declare enum ResourceFlowLogType {
|
|
3
|
+
FLOW_START = "flow.start",
|
|
4
|
+
NODE_PROCESSING_STARTED = "node.processing.started",
|
|
5
|
+
NODE_PROCESSING_FAILED = "node.processing.failed",
|
|
6
|
+
NODE_PROCESSING_COMPLETED = "node.processing.completed",
|
|
7
|
+
FLOW_COMPLETED = "flow.completed"
|
|
8
|
+
}
|
|
9
|
+
export declare class ResourceFlowLog {
|
|
10
|
+
id: number;
|
|
11
|
+
nodeId: string | null;
|
|
12
|
+
flowRunId: string;
|
|
13
|
+
type: ResourceFlowLogType;
|
|
14
|
+
payload?: string;
|
|
15
|
+
createdAt: Date;
|
|
16
|
+
resourceId: number;
|
|
17
|
+
resource: Resource;
|
|
18
|
+
}
|