@attraccess/database-entities 0.0.9

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.
Files changed (53) hide show
  1. package/README.md +11 -0
  2. package/package.json +26 -0
  3. package/src/index.d.ts +2 -0
  4. package/src/index.js +6 -0
  5. package/src/index.js.map +1 -0
  6. package/src/lib/entities/authenticationDetail.entity.d.ts +9 -0
  7. package/src/lib/entities/authenticationDetail.entity.js +58 -0
  8. package/src/lib/entities/authenticationDetail.entity.js.map +1 -0
  9. package/src/lib/entities/mqttResourceConfig.entity.d.ts +15 -0
  10. package/src/lib/entities/mqttResourceConfig.entity.js +95 -0
  11. package/src/lib/entities/mqttResourceConfig.entity.js.map +1 -0
  12. package/src/lib/entities/mqttServer.entity.d.ts +14 -0
  13. package/src/lib/entities/mqttServer.entity.js +99 -0
  14. package/src/lib/entities/mqttServer.entity.js.map +1 -0
  15. package/src/lib/entities/resource.entity.d.ts +24 -0
  16. package/src/lib/entities/resource.entity.js +120 -0
  17. package/src/lib/entities/resource.entity.js.map +1 -0
  18. package/src/lib/entities/resourceGroup.entity.d.ts +13 -0
  19. package/src/lib/entities/resourceGroup.entity.js +67 -0
  20. package/src/lib/entities/resourceGroup.entity.js.map +1 -0
  21. package/src/lib/entities/resourceIntroduction.entity.d.ts +17 -0
  22. package/src/lib/entities/resourceIntroduction.entity.js +101 -0
  23. package/src/lib/entities/resourceIntroduction.entity.js.map +1 -0
  24. package/src/lib/entities/resourceIntroductionHistoryItem.entity.d.ts +16 -0
  25. package/src/lib/entities/resourceIntroductionHistoryItem.entity.js +87 -0
  26. package/src/lib/entities/resourceIntroductionHistoryItem.entity.js.map +1 -0
  27. package/src/lib/entities/resourceIntroductionUser.entity.d.ts +12 -0
  28. package/src/lib/entities/resourceIntroductionUser.entity.js +66 -0
  29. package/src/lib/entities/resourceIntroductionUser.entity.js.map +1 -0
  30. package/src/lib/entities/resourceUsage.entity.d.ts +14 -0
  31. package/src/lib/entities/resourceUsage.entity.js +108 -0
  32. package/src/lib/entities/resourceUsage.entity.js.map +1 -0
  33. package/src/lib/entities/revokedToken.entity.d.ts +10 -0
  34. package/src/lib/entities/revokedToken.entity.js +63 -0
  35. package/src/lib/entities/revokedToken.entity.js.map +1 -0
  36. package/src/lib/entities/ssoProvider.entity.d.ts +12 -0
  37. package/src/lib/entities/ssoProvider.entity.js +71 -0
  38. package/src/lib/entities/ssoProvider.entity.js.map +1 -0
  39. package/src/lib/entities/ssoProvider.oidc.d.ts +14 -0
  40. package/src/lib/entities/ssoProvider.oidc.js +97 -0
  41. package/src/lib/entities/ssoProvider.oidc.js.map +1 -0
  42. package/src/lib/entities/user.entity.d.ts +27 -0
  43. package/src/lib/entities/user.entity.js +144 -0
  44. package/src/lib/entities/user.entity.js.map +1 -0
  45. package/src/lib/entities/webhookConfig.entity.d.ts +20 -0
  46. package/src/lib/entities/webhookConfig.entity.js +148 -0
  47. package/src/lib/entities/webhookConfig.entity.js.map +1 -0
  48. package/src/lib/entities-index.d.ts +32 -0
  49. package/src/lib/entities-index.js +55 -0
  50. package/src/lib/entities-index.js.map +1 -0
  51. package/src/lib/types/authenticationType.enum.d.ts +4 -0
  52. package/src/lib/types/authenticationType.enum.js +9 -0
  53. package/src/lib/types/authenticationType.enum.js.map +1 -0
package/README.md ADDED
@@ -0,0 +1,11 @@
1
+ # database-entities
2
+
3
+ This library was generated with [Nx](https://nx.dev).
4
+
5
+ ## Building
6
+
7
+ Run `nx build database-entities` to build the library.
8
+
9
+ ## Running unit tests
10
+
11
+ Run `nx test database-entities` to execute the unit tests via [Jest](https://jestjs.io).
package/package.json ADDED
@@ -0,0 +1,26 @@
1
+ {
2
+ "name": "@attraccess/database-entities",
3
+ "version": "0.0.9",
4
+ "private": false,
5
+ "type": "commonjs",
6
+ "main": "./src/index.js",
7
+ "module": "./dist/index.js",
8
+ "types": "./src/index.d.ts",
9
+ "exports": {
10
+ "./package.json": "./package.json",
11
+ ".": {
12
+ "types": "./dist/index.d.ts",
13
+ "import": "./dist/index.js",
14
+ "default": "./dist/index.js"
15
+ }
16
+ },
17
+ "dependencies": {
18
+ "tslib": "^2.3.0",
19
+ "typeorm": "0.3.20",
20
+ "@nestjs/swagger": "^11.2.0",
21
+ "class-transformer": "^0.5.1",
22
+ "@nx/webpack": "20.3.3",
23
+ "glob": "^11.0.2",
24
+ "class-validator": "^0.14.2"
25
+ }
26
+ }
package/src/index.d.ts ADDED
@@ -0,0 +1,2 @@
1
+ export * from './lib/entities-index';
2
+ export * from './lib/types/authenticationType.enum';
package/src/index.js ADDED
@@ -0,0 +1,6 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ const tslib_1 = require("tslib");
4
+ tslib_1.__exportStar(require("./lib/entities-index"), exports);
5
+ tslib_1.__exportStar(require("./lib/types/authenticationType.enum"), exports);
6
+ //# sourceMappingURL=index.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../libs/database-entities/src/index.ts"],"names":[],"mappings":";;;AAAA,+DAAqC;AACrC,8EAAoD"}
@@ -0,0 +1,9 @@
1
+ import { User } from './user.entity';
2
+ import { AuthenticationType } from '../types/authenticationType.enum';
3
+ export declare class AuthenticationDetail {
4
+ id: number;
5
+ userId: number;
6
+ type: AuthenticationType;
7
+ password?: string;
8
+ user: User;
9
+ }
@@ -0,0 +1,58 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.AuthenticationDetail = 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
+ const authenticationType_enum_1 = require("../types/authenticationType.enum");
9
+ let AuthenticationDetail = class AuthenticationDetail {
10
+ };
11
+ exports.AuthenticationDetail = AuthenticationDetail;
12
+ tslib_1.__decorate([
13
+ (0, typeorm_1.PrimaryGeneratedColumn)(),
14
+ (0, swagger_1.ApiProperty)({
15
+ description: 'The unique identifier of the authentication detail',
16
+ example: 1,
17
+ }),
18
+ tslib_1.__metadata("design:type", Number)
19
+ ], AuthenticationDetail.prototype, "id", void 0);
20
+ tslib_1.__decorate([
21
+ (0, typeorm_1.Column)({ type: 'integer' }),
22
+ (0, swagger_1.ApiProperty)({
23
+ description: 'The ID of the user',
24
+ example: 1,
25
+ }),
26
+ tslib_1.__metadata("design:type", Number)
27
+ ], AuthenticationDetail.prototype, "userId", void 0);
28
+ tslib_1.__decorate([
29
+ (0, typeorm_1.Column)({
30
+ type: 'simple-enum',
31
+ enum: authenticationType_enum_1.AuthenticationType,
32
+ }),
33
+ (0, swagger_1.ApiProperty)({
34
+ description: 'The type of authentication',
35
+ enum: authenticationType_enum_1.AuthenticationType,
36
+ example: authenticationType_enum_1.AuthenticationType.LOCAL_PASSWORD,
37
+ }),
38
+ tslib_1.__metadata("design:type", String)
39
+ ], AuthenticationDetail.prototype, "type", void 0);
40
+ tslib_1.__decorate([
41
+ (0, typeorm_1.Column)({ nullable: true, type: 'text' }),
42
+ (0, swagger_1.ApiProperty)({
43
+ description: 'The hashed password (for local authentication)',
44
+ required: false,
45
+ }),
46
+ tslib_1.__metadata("design:type", String)
47
+ ], AuthenticationDetail.prototype, "password", void 0);
48
+ tslib_1.__decorate([
49
+ (0, typeorm_1.ManyToOne)(() => user_entity_1.User, (user) => user.authenticationDetails, {
50
+ onDelete: 'CASCADE',
51
+ }),
52
+ (0, typeorm_1.JoinColumn)({ name: 'userId' }),
53
+ tslib_1.__metadata("design:type", user_entity_1.User)
54
+ ], AuthenticationDetail.prototype, "user", void 0);
55
+ exports.AuthenticationDetail = AuthenticationDetail = tslib_1.__decorate([
56
+ (0, typeorm_1.Entity)()
57
+ ], AuthenticationDetail);
58
+ //# sourceMappingURL=authenticationDetail.entity.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"authenticationDetail.entity.js","sourceRoot":"","sources":["../../../../../../libs/database-entities/src/lib/entities/authenticationDetail.entity.ts"],"names":[],"mappings":";;;;AAAA,qCAAwF;AACxF,6CAA8C;AAC9C,+CAAqC;AACrC,8EAAsE;AAG/D,IAAM,oBAAoB,GAA1B,MAAM,oBAAoB;CAsChC,CAAA;AAtCY,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,oBAAoB;QACjC,OAAO,EAAE,CAAC;KACX,CAAC;;oDACc;AAWhB;IATC,IAAA,gBAAM,EAAC;QACN,IAAI,EAAE,aAAa;QACnB,IAAI,EAAE,4CAAkB;KACzB,CAAC;IACD,IAAA,qBAAW,EAAC;QACX,WAAW,EAAE,4BAA4B;QACzC,IAAI,EAAE,4CAAkB;QACxB,OAAO,EAAE,4CAAkB,CAAC,cAAc;KAC3C,CAAC;;kDACwB;AAO1B;IALC,IAAA,gBAAM,EAAC,EAAE,QAAQ,EAAE,IAAI,EAAE,IAAI,EAAE,MAAM,EAAE,CAAC;IACxC,IAAA,qBAAW,EAAC;QACX,WAAW,EAAE,gDAAgD;QAC7D,QAAQ,EAAE,KAAK;KAChB,CAAC;;sDACgB;AAMlB;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;+BArCD,oBAAoB;IADhC,IAAA,gBAAM,GAAE;GACI,oBAAoB,CAsChC"}
@@ -0,0 +1,15 @@
1
+ import { Resource } from './resource.entity';
2
+ import { MqttServer } from './mqttServer.entity';
3
+ export declare class MqttResourceConfig {
4
+ id: number;
5
+ resourceId: number;
6
+ serverId: number;
7
+ inUseTopic: string;
8
+ inUseMessage: string;
9
+ notInUseTopic: string;
10
+ notInUseMessage: string;
11
+ createdAt: Date;
12
+ updatedAt: Date;
13
+ resource: Resource;
14
+ server: MqttServer;
15
+ }
@@ -0,0 +1,95 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.MqttResourceConfig = 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 mqttServer_entity_1 = require("./mqttServer.entity");
9
+ let MqttResourceConfig = class MqttResourceConfig {
10
+ };
11
+ exports.MqttResourceConfig = MqttResourceConfig;
12
+ tslib_1.__decorate([
13
+ (0, typeorm_1.PrimaryGeneratedColumn)(),
14
+ (0, swagger_1.ApiProperty)({
15
+ description: 'The unique identifier of the MQTT resource configuration',
16
+ example: 1,
17
+ }),
18
+ tslib_1.__metadata("design:type", Number)
19
+ ], MqttResourceConfig.prototype, "id", void 0);
20
+ tslib_1.__decorate([
21
+ (0, typeorm_1.Column)({ type: 'integer' }),
22
+ (0, swagger_1.ApiProperty)({
23
+ description: 'The ID of the resource this configuration is for',
24
+ example: 1,
25
+ }),
26
+ tslib_1.__metadata("design:type", Number)
27
+ ], MqttResourceConfig.prototype, "resourceId", void 0);
28
+ tslib_1.__decorate([
29
+ (0, typeorm_1.Column)({ type: 'integer' }),
30
+ (0, swagger_1.ApiProperty)({
31
+ description: 'The ID of the MQTT server to publish to',
32
+ example: 1,
33
+ }),
34
+ tslib_1.__metadata("design:type", Number)
35
+ ], MqttResourceConfig.prototype, "serverId", void 0);
36
+ tslib_1.__decorate([
37
+ (0, typeorm_1.Column)({ type: 'text' }),
38
+ (0, swagger_1.ApiProperty)({
39
+ description: 'Topic template using Handlebars for in-use status',
40
+ example: 'resources/{{id}}/status',
41
+ }),
42
+ tslib_1.__metadata("design:type", String)
43
+ ], MqttResourceConfig.prototype, "inUseTopic", void 0);
44
+ tslib_1.__decorate([
45
+ (0, typeorm_1.Column)({ type: 'text' }),
46
+ (0, swagger_1.ApiProperty)({
47
+ description: 'Message template using Handlebars for in-use status',
48
+ example: '{"status": "in_use", "resourceId": "{{id}}", "timestamp": "{{timestamp}}"}',
49
+ }),
50
+ tslib_1.__metadata("design:type", String)
51
+ ], MqttResourceConfig.prototype, "inUseMessage", void 0);
52
+ tslib_1.__decorate([
53
+ (0, typeorm_1.Column)({ type: 'text' }),
54
+ (0, swagger_1.ApiProperty)({
55
+ description: 'Topic template using Handlebars for not-in-use status',
56
+ example: 'resources/{{id}}/status',
57
+ }),
58
+ tslib_1.__metadata("design:type", String)
59
+ ], MqttResourceConfig.prototype, "notInUseTopic", void 0);
60
+ tslib_1.__decorate([
61
+ (0, typeorm_1.Column)({ type: 'text' }),
62
+ (0, swagger_1.ApiProperty)({
63
+ description: 'Message template using Handlebars for not-in-use status',
64
+ example: '{"status": "not_in_use", "resourceId": "{{id}}", "timestamp": "{{timestamp}}"}',
65
+ }),
66
+ tslib_1.__metadata("design:type", String)
67
+ ], MqttResourceConfig.prototype, "notInUseMessage", void 0);
68
+ tslib_1.__decorate([
69
+ (0, typeorm_1.CreateDateColumn)(),
70
+ (0, swagger_1.ApiProperty)({
71
+ description: 'When the MQTT resource configuration was created',
72
+ }),
73
+ tslib_1.__metadata("design:type", Date)
74
+ ], MqttResourceConfig.prototype, "createdAt", void 0);
75
+ tslib_1.__decorate([
76
+ (0, typeorm_1.UpdateDateColumn)(),
77
+ (0, swagger_1.ApiProperty)({
78
+ description: 'When the MQTT resource configuration was last updated',
79
+ }),
80
+ tslib_1.__metadata("design:type", Date)
81
+ ], MqttResourceConfig.prototype, "updatedAt", void 0);
82
+ tslib_1.__decorate([
83
+ (0, typeorm_1.ManyToOne)(() => resource_entity_1.Resource),
84
+ (0, typeorm_1.JoinColumn)({ name: 'resourceId' }),
85
+ tslib_1.__metadata("design:type", resource_entity_1.Resource)
86
+ ], MqttResourceConfig.prototype, "resource", void 0);
87
+ tslib_1.__decorate([
88
+ (0, typeorm_1.ManyToOne)(() => mqttServer_entity_1.MqttServer, (server) => server.resourceConfigs),
89
+ (0, typeorm_1.JoinColumn)({ name: 'serverId' }),
90
+ tslib_1.__metadata("design:type", mqttServer_entity_1.MqttServer)
91
+ ], MqttResourceConfig.prototype, "server", void 0);
92
+ exports.MqttResourceConfig = MqttResourceConfig = tslib_1.__decorate([
93
+ (0, typeorm_1.Entity)()
94
+ ], MqttResourceConfig);
95
+ //# sourceMappingURL=mqttResourceConfig.entity.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"mqttResourceConfig.entity.js","sourceRoot":"","sources":["../../../../../../libs/database-entities/src/lib/entities/mqttResourceConfig.entity.ts"],"names":[],"mappings":";;;;AAAA,qCAQiB;AACjB,6CAA8C;AAC9C,uDAA6C;AAC7C,2DAAiD;AAG1C,IAAM,kBAAkB,GAAxB,MAAM,kBAAkB;CAqE9B,CAAA;AArEY,gDAAkB;AAM7B;IALC,IAAA,gCAAsB,GAAE;IACxB,IAAA,qBAAW,EAAC;QACX,WAAW,EAAE,0DAA0D;QACvE,OAAO,EAAE,CAAC;KACX,CAAC;;8CACU;AAOZ;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;;sDACkB;AAOpB;IALC,IAAA,gBAAM,EAAC,EAAE,IAAI,EAAE,SAAS,EAAE,CAAC;IAC3B,IAAA,qBAAW,EAAC;QACX,WAAW,EAAE,yCAAyC;QACtD,OAAO,EAAE,CAAC;KACX,CAAC;;oDACgB;AAOlB;IALC,IAAA,gBAAM,EAAC,EAAE,IAAI,EAAE,MAAM,EAAE,CAAC;IACxB,IAAA,qBAAW,EAAC;QACX,WAAW,EAAE,mDAAmD;QAChE,OAAO,EAAE,yBAAyB;KACnC,CAAC;;sDACkB;AAOpB;IALC,IAAA,gBAAM,EAAC,EAAE,IAAI,EAAE,MAAM,EAAE,CAAC;IACxB,IAAA,qBAAW,EAAC;QACX,WAAW,EAAE,qDAAqD;QAClE,OAAO,EAAE,4EAA4E;KACtF,CAAC;;wDACoB;AAOtB;IALC,IAAA,gBAAM,EAAC,EAAE,IAAI,EAAE,MAAM,EAAE,CAAC;IACxB,IAAA,qBAAW,EAAC;QACX,WAAW,EAAE,uDAAuD;QACpE,OAAO,EAAE,yBAAyB;KACnC,CAAC;;yDACqB;AAOvB;IALC,IAAA,gBAAM,EAAC,EAAE,IAAI,EAAE,MAAM,EAAE,CAAC;IACxB,IAAA,qBAAW,EAAC;QACX,WAAW,EAAE,yDAAyD;QACtE,OAAO,EAAE,gFAAgF;KAC1F,CAAC;;2DACuB;AAMzB;IAJC,IAAA,0BAAgB,GAAE;IAClB,IAAA,qBAAW,EAAC;QACX,WAAW,EAAE,kDAAkD;KAChE,CAAC;sCACU,IAAI;qDAAC;AAMjB;IAJC,IAAA,0BAAgB,GAAE;IAClB,IAAA,qBAAW,EAAC;QACX,WAAW,EAAE,uDAAuD;KACrE,CAAC;sCACU,IAAI;qDAAC;AAIjB;IAFC,IAAA,mBAAS,EAAC,GAAG,EAAE,CAAC,0BAAQ,CAAC;IACzB,IAAA,oBAAU,EAAC,EAAE,IAAI,EAAE,YAAY,EAAE,CAAC;sCACxB,0BAAQ;oDAAC;AAIpB;IAFC,IAAA,mBAAS,EAAC,GAAG,EAAE,CAAC,8BAAU,EAAE,CAAC,MAAM,EAAE,EAAE,CAAC,MAAM,CAAC,eAAe,CAAC;IAC/D,IAAA,oBAAU,EAAC,EAAE,IAAI,EAAE,UAAU,EAAE,CAAC;sCACxB,8BAAU;kDAAC;6BApET,kBAAkB;IAD9B,IAAA,gBAAM,GAAE;GACI,kBAAkB,CAqE9B"}
@@ -0,0 +1,14 @@
1
+ import { MqttResourceConfig } from './mqttResourceConfig.entity';
2
+ export declare class MqttServer {
3
+ id: number;
4
+ name: string;
5
+ host: string;
6
+ port: number;
7
+ username: string | null;
8
+ password: string | null;
9
+ clientId: string | null;
10
+ useTls: boolean;
11
+ createdAt: Date;
12
+ updatedAt: Date;
13
+ resourceConfigs: MqttResourceConfig[];
14
+ }
@@ -0,0 +1,99 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.MqttServer = void 0;
4
+ const tslib_1 = require("tslib");
5
+ const typeorm_1 = require("typeorm");
6
+ const swagger_1 = require("@nestjs/swagger");
7
+ const mqttResourceConfig_entity_1 = require("./mqttResourceConfig.entity");
8
+ let MqttServer = class MqttServer {
9
+ };
10
+ exports.MqttServer = MqttServer;
11
+ tslib_1.__decorate([
12
+ (0, typeorm_1.PrimaryGeneratedColumn)(),
13
+ (0, swagger_1.ApiProperty)({
14
+ description: 'The unique identifier of the MQTT server',
15
+ example: 1,
16
+ }),
17
+ tslib_1.__metadata("design:type", Number)
18
+ ], MqttServer.prototype, "id", void 0);
19
+ tslib_1.__decorate([
20
+ (0, typeorm_1.Column)({ type: 'text' }),
21
+ (0, swagger_1.ApiProperty)({
22
+ description: 'Friendly name for the MQTT server',
23
+ example: 'Workshop MQTT Server',
24
+ }),
25
+ tslib_1.__metadata("design:type", String)
26
+ ], MqttServer.prototype, "name", void 0);
27
+ tslib_1.__decorate([
28
+ (0, typeorm_1.Column)({ type: 'text' }),
29
+ (0, swagger_1.ApiProperty)({
30
+ description: 'MQTT server hostname/IP',
31
+ example: 'mqtt.example.com',
32
+ }),
33
+ tslib_1.__metadata("design:type", String)
34
+ ], MqttServer.prototype, "host", void 0);
35
+ tslib_1.__decorate([
36
+ (0, typeorm_1.Column)({ type: 'integer' }),
37
+ (0, swagger_1.ApiProperty)({
38
+ description: 'MQTT server port (default: 1883 for MQTT, 8883 for MQTTS)',
39
+ example: 1883,
40
+ }),
41
+ tslib_1.__metadata("design:type", Number)
42
+ ], MqttServer.prototype, "port", void 0);
43
+ tslib_1.__decorate([
44
+ (0, typeorm_1.Column)({ nullable: true, type: 'text' }),
45
+ (0, swagger_1.ApiProperty)({
46
+ description: 'Optional authentication username',
47
+ example: 'mqttuser',
48
+ required: false,
49
+ }),
50
+ tslib_1.__metadata("design:type", String)
51
+ ], MqttServer.prototype, "username", void 0);
52
+ tslib_1.__decorate([
53
+ (0, typeorm_1.Column)({ nullable: true, type: 'text' }),
54
+ (0, swagger_1.ApiProperty)({
55
+ description: 'Optional authentication password',
56
+ example: 'password123',
57
+ required: false,
58
+ }),
59
+ tslib_1.__metadata("design:type", String)
60
+ ], MqttServer.prototype, "password", void 0);
61
+ tslib_1.__decorate([
62
+ (0, typeorm_1.Column)({ nullable: true, type: 'text' }),
63
+ (0, swagger_1.ApiProperty)({
64
+ description: 'Client ID for MQTT connection',
65
+ example: 'attraccess-client-1',
66
+ required: false,
67
+ }),
68
+ tslib_1.__metadata("design:type", String)
69
+ ], MqttServer.prototype, "clientId", void 0);
70
+ tslib_1.__decorate([
71
+ (0, typeorm_1.Column)({ default: false, type: 'boolean' }),
72
+ (0, swagger_1.ApiProperty)({
73
+ description: 'Whether to use TLS/SSL',
74
+ example: false,
75
+ }),
76
+ tslib_1.__metadata("design:type", Boolean)
77
+ ], MqttServer.prototype, "useTls", void 0);
78
+ tslib_1.__decorate([
79
+ (0, typeorm_1.CreateDateColumn)(),
80
+ (0, swagger_1.ApiProperty)({
81
+ description: 'When the MQTT server was created',
82
+ }),
83
+ tslib_1.__metadata("design:type", Date)
84
+ ], MqttServer.prototype, "createdAt", void 0);
85
+ tslib_1.__decorate([
86
+ (0, typeorm_1.UpdateDateColumn)(),
87
+ (0, swagger_1.ApiProperty)({
88
+ description: 'When the MQTT server was last updated',
89
+ }),
90
+ tslib_1.__metadata("design:type", Date)
91
+ ], MqttServer.prototype, "updatedAt", void 0);
92
+ tslib_1.__decorate([
93
+ (0, typeorm_1.OneToMany)(() => mqttResourceConfig_entity_1.MqttResourceConfig, (config) => config.server),
94
+ tslib_1.__metadata("design:type", Array)
95
+ ], MqttServer.prototype, "resourceConfigs", void 0);
96
+ exports.MqttServer = MqttServer = tslib_1.__decorate([
97
+ (0, typeorm_1.Entity)()
98
+ ], MqttServer);
99
+ //# sourceMappingURL=mqttServer.entity.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"mqttServer.entity.js","sourceRoot":"","sources":["../../../../../../libs/database-entities/src/lib/entities/mqttServer.entity.ts"],"names":[],"mappings":";;;;AAAA,qCAAgH;AAChH,6CAA8C;AAC9C,2EAAiE;AAG1D,IAAM,UAAU,GAAhB,MAAM,UAAU;CA0EtB,CAAA;AA1EY,gCAAU;AAMrB;IALC,IAAA,gCAAsB,GAAE;IACxB,IAAA,qBAAW,EAAC;QACX,WAAW,EAAE,0CAA0C;QACvD,OAAO,EAAE,CAAC;KACX,CAAC;;sCACU;AAOZ;IALC,IAAA,gBAAM,EAAC,EAAE,IAAI,EAAE,MAAM,EAAE,CAAC;IACxB,IAAA,qBAAW,EAAC;QACX,WAAW,EAAE,mCAAmC;QAChD,OAAO,EAAE,sBAAsB;KAChC,CAAC;;wCACY;AAOd;IALC,IAAA,gBAAM,EAAC,EAAE,IAAI,EAAE,MAAM,EAAE,CAAC;IACxB,IAAA,qBAAW,EAAC;QACX,WAAW,EAAE,yBAAyB;QACtC,OAAO,EAAE,kBAAkB;KAC5B,CAAC;;wCACY;AAOd;IALC,IAAA,gBAAM,EAAC,EAAE,IAAI,EAAE,SAAS,EAAE,CAAC;IAC3B,IAAA,qBAAW,EAAC;QACX,WAAW,EAAE,2DAA2D;QACxE,OAAO,EAAE,IAAI;KACd,CAAC;;wCACY;AAQd;IANC,IAAA,gBAAM,EAAC,EAAE,QAAQ,EAAE,IAAI,EAAE,IAAI,EAAE,MAAM,EAAE,CAAC;IACxC,IAAA,qBAAW,EAAC;QACX,WAAW,EAAE,kCAAkC;QAC/C,OAAO,EAAE,UAAU;QACnB,QAAQ,EAAE,KAAK;KAChB,CAAC;;4CACuB;AAQzB;IANC,IAAA,gBAAM,EAAC,EAAE,QAAQ,EAAE,IAAI,EAAE,IAAI,EAAE,MAAM,EAAE,CAAC;IACxC,IAAA,qBAAW,EAAC;QACX,WAAW,EAAE,kCAAkC;QAC/C,OAAO,EAAE,aAAa;QACtB,QAAQ,EAAE,KAAK;KAChB,CAAC;;4CACuB;AAQzB;IANC,IAAA,gBAAM,EAAC,EAAE,QAAQ,EAAE,IAAI,EAAE,IAAI,EAAE,MAAM,EAAE,CAAC;IACxC,IAAA,qBAAW,EAAC;QACX,WAAW,EAAE,+BAA+B;QAC5C,OAAO,EAAE,qBAAqB;QAC9B,QAAQ,EAAE,KAAK;KAChB,CAAC;;4CACuB;AAOzB;IALC,IAAA,gBAAM,EAAC,EAAE,OAAO,EAAE,KAAK,EAAE,IAAI,EAAE,SAAS,EAAE,CAAC;IAC3C,IAAA,qBAAW,EAAC;QACX,WAAW,EAAE,wBAAwB;QACrC,OAAO,EAAE,KAAK;KACf,CAAC;;0CACe;AAMjB;IAJC,IAAA,0BAAgB,GAAE;IAClB,IAAA,qBAAW,EAAC;QACX,WAAW,EAAE,kCAAkC;KAChD,CAAC;sCACU,IAAI;6CAAC;AAMjB;IAJC,IAAA,0BAAgB,GAAE;IAClB,IAAA,qBAAW,EAAC;QACX,WAAW,EAAE,uCAAuC;KACrD,CAAC;sCACU,IAAI;6CAAC;AAGjB;IADC,IAAA,mBAAS,EAAC,GAAG,EAAE,CAAC,8CAAkB,EAAE,CAAC,MAAM,EAAE,EAAE,CAAC,MAAM,CAAC,MAAM,CAAC;;mDACxB;qBAzE5B,UAAU;IADtB,IAAA,gBAAM,GAAE;GACI,UAAU,CA0EtB"}
@@ -0,0 +1,24 @@
1
+ import { ResourceIntroduction } from './resourceIntroduction.entity';
2
+ import { ResourceUsage } from './resourceUsage.entity';
3
+ import { ResourceIntroductionUser } from './resourceIntroductionUser.entity';
4
+ import { MqttResourceConfig } from './mqttResourceConfig.entity';
5
+ import { WebhookConfig } from './webhookConfig.entity';
6
+ import { ResourceGroup } from './resourceGroup.entity';
7
+ export declare class Resource {
8
+ id: number;
9
+ name: string;
10
+ description: string | null;
11
+ imageFilename: string | null;
12
+ createdAt: Date;
13
+ updatedAt: Date;
14
+ introductions: ResourceIntroduction[];
15
+ usages: ResourceUsage[];
16
+ introducers: ResourceIntroductionUser[];
17
+ mqttConfig: MqttResourceConfig;
18
+ webhookConfigs: WebhookConfig[];
19
+ groups: ResourceGroup[];
20
+ }
21
+ export declare class ResourceComputedView {
22
+ id: number;
23
+ totalUsageMinutes: number;
24
+ }
@@ -0,0 +1,120 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.ResourceComputedView = exports.Resource = void 0;
4
+ const tslib_1 = require("tslib");
5
+ const typeorm_1 = require("typeorm");
6
+ const swagger_1 = require("@nestjs/swagger");
7
+ const resourceIntroduction_entity_1 = require("./resourceIntroduction.entity");
8
+ const resourceUsage_entity_1 = require("./resourceUsage.entity");
9
+ const resourceIntroductionUser_entity_1 = require("./resourceIntroductionUser.entity");
10
+ const mqttResourceConfig_entity_1 = require("./mqttResourceConfig.entity");
11
+ const webhookConfig_entity_1 = require("./webhookConfig.entity");
12
+ const resourceGroup_entity_1 = require("./resourceGroup.entity");
13
+ let Resource = class Resource {
14
+ };
15
+ exports.Resource = Resource;
16
+ tslib_1.__decorate([
17
+ (0, typeorm_1.PrimaryGeneratedColumn)(),
18
+ (0, swagger_1.ApiProperty)({
19
+ description: 'The unique identifier of the resource',
20
+ example: 1,
21
+ }),
22
+ tslib_1.__metadata("design:type", Number)
23
+ ], Resource.prototype, "id", void 0);
24
+ tslib_1.__decorate([
25
+ (0, typeorm_1.Column)({ type: 'text' }),
26
+ (0, swagger_1.ApiProperty)({
27
+ description: 'The name of the resource',
28
+ example: '3D Printer',
29
+ }),
30
+ tslib_1.__metadata("design:type", String)
31
+ ], Resource.prototype, "name", void 0);
32
+ tslib_1.__decorate([
33
+ (0, typeorm_1.Column)({ type: 'text', nullable: true }),
34
+ (0, swagger_1.ApiProperty)({
35
+ description: 'A detailed description of the resource',
36
+ example: 'Prusa i3 MK3S+ 3D printer with 0.4mm nozzle',
37
+ required: false,
38
+ }),
39
+ tslib_1.__metadata("design:type", String)
40
+ ], Resource.prototype, "description", void 0);
41
+ tslib_1.__decorate([
42
+ (0, typeorm_1.Column)({ type: 'text', nullable: true }),
43
+ (0, swagger_1.ApiProperty)({
44
+ description: 'The filename of the resource image',
45
+ example: '1234567890_abcdef.jpg',
46
+ required: false,
47
+ }),
48
+ tslib_1.__metadata("design:type", String)
49
+ ], Resource.prototype, "imageFilename", void 0);
50
+ tslib_1.__decorate([
51
+ (0, typeorm_1.CreateDateColumn)(),
52
+ (0, swagger_1.ApiProperty)({
53
+ description: 'When the resource was created',
54
+ }),
55
+ tslib_1.__metadata("design:type", Date)
56
+ ], Resource.prototype, "createdAt", void 0);
57
+ tslib_1.__decorate([
58
+ (0, typeorm_1.UpdateDateColumn)(),
59
+ (0, swagger_1.ApiProperty)({
60
+ description: 'When the resource was last updated',
61
+ }),
62
+ tslib_1.__metadata("design:type", Date)
63
+ ], Resource.prototype, "updatedAt", void 0);
64
+ tslib_1.__decorate([
65
+ (0, typeorm_1.OneToMany)(() => resourceIntroduction_entity_1.ResourceIntroduction, (introduction) => introduction.resource),
66
+ tslib_1.__metadata("design:type", Array)
67
+ ], Resource.prototype, "introductions", void 0);
68
+ tslib_1.__decorate([
69
+ (0, typeorm_1.OneToMany)(() => resourceUsage_entity_1.ResourceUsage, (usage) => usage.resource),
70
+ tslib_1.__metadata("design:type", Array)
71
+ ], Resource.prototype, "usages", void 0);
72
+ tslib_1.__decorate([
73
+ (0, typeorm_1.OneToMany)(() => resourceIntroductionUser_entity_1.ResourceIntroductionUser, (introducer) => introducer.resource),
74
+ tslib_1.__metadata("design:type", Array)
75
+ ], Resource.prototype, "introducers", void 0);
76
+ tslib_1.__decorate([
77
+ (0, typeorm_1.OneToOne)(() => mqttResourceConfig_entity_1.MqttResourceConfig, (config) => config.resource),
78
+ tslib_1.__metadata("design:type", mqttResourceConfig_entity_1.MqttResourceConfig)
79
+ ], Resource.prototype, "mqttConfig", void 0);
80
+ tslib_1.__decorate([
81
+ (0, typeorm_1.OneToMany)(() => webhookConfig_entity_1.WebhookConfig, (config) => config.resource),
82
+ tslib_1.__metadata("design:type", Array)
83
+ ], Resource.prototype, "webhookConfigs", void 0);
84
+ tslib_1.__decorate([
85
+ (0, typeorm_1.ManyToMany)(() => resourceGroup_entity_1.ResourceGroup, (group) => group.resources),
86
+ (0, typeorm_1.JoinTable)(),
87
+ (0, swagger_1.ApiProperty)({
88
+ description: 'The groups the resource belongs to',
89
+ type: resourceGroup_entity_1.ResourceGroup,
90
+ isArray: true,
91
+ }),
92
+ tslib_1.__metadata("design:type", Array)
93
+ ], Resource.prototype, "groups", void 0);
94
+ exports.Resource = Resource = tslib_1.__decorate([
95
+ (0, typeorm_1.Entity)()
96
+ ], 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
+ //# sourceMappingURL=resource.entity.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"resource.entity.js","sourceRoot":"","sources":["../../../../../../libs/database-entities/src/lib/entities/resource.entity.ts"],"names":[],"mappings":"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"}
@@ -0,0 +1,13 @@
1
+ import { ResourceIntroduction } from './resourceIntroduction.entity';
2
+ import { ResourceIntroductionUser } from './resourceIntroductionUser.entity';
3
+ import { Resource } from './resource.entity';
4
+ export declare class ResourceGroup {
5
+ id: number;
6
+ name: string;
7
+ description: string | null;
8
+ createdAt: Date;
9
+ updatedAt: Date;
10
+ introductions: ResourceIntroduction[];
11
+ introducers: ResourceIntroductionUser[];
12
+ resources: Resource[];
13
+ }
@@ -0,0 +1,67 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.ResourceGroup = void 0;
4
+ const tslib_1 = require("tslib");
5
+ const typeorm_1 = require("typeorm");
6
+ const swagger_1 = require("@nestjs/swagger");
7
+ const resourceIntroduction_entity_1 = require("./resourceIntroduction.entity");
8
+ const resourceIntroductionUser_entity_1 = require("./resourceIntroductionUser.entity");
9
+ const resource_entity_1 = require("./resource.entity");
10
+ let ResourceGroup = class ResourceGroup {
11
+ };
12
+ exports.ResourceGroup = ResourceGroup;
13
+ tslib_1.__decorate([
14
+ (0, typeorm_1.PrimaryGeneratedColumn)(),
15
+ (0, swagger_1.ApiProperty)({
16
+ description: 'The unique identifier of the resource group',
17
+ example: 1,
18
+ }),
19
+ tslib_1.__metadata("design:type", Number)
20
+ ], ResourceGroup.prototype, "id", void 0);
21
+ tslib_1.__decorate([
22
+ (0, typeorm_1.Column)({ type: 'text' }),
23
+ (0, swagger_1.ApiProperty)({
24
+ description: 'The name of the resource',
25
+ example: '3D Printer',
26
+ }),
27
+ tslib_1.__metadata("design:type", String)
28
+ ], ResourceGroup.prototype, "name", void 0);
29
+ tslib_1.__decorate([
30
+ (0, typeorm_1.Column)({ type: 'text', nullable: true }),
31
+ (0, swagger_1.ApiProperty)({
32
+ description: 'A detailed description of the resource',
33
+ example: 'Prusa i3 MK3S+ 3D printer with 0.4mm nozzle',
34
+ required: false,
35
+ }),
36
+ tslib_1.__metadata("design:type", String)
37
+ ], ResourceGroup.prototype, "description", void 0);
38
+ tslib_1.__decorate([
39
+ (0, typeorm_1.CreateDateColumn)(),
40
+ (0, swagger_1.ApiProperty)({
41
+ description: 'When the resource was created',
42
+ }),
43
+ tslib_1.__metadata("design:type", Date)
44
+ ], ResourceGroup.prototype, "createdAt", void 0);
45
+ tslib_1.__decorate([
46
+ (0, typeorm_1.UpdateDateColumn)(),
47
+ (0, swagger_1.ApiProperty)({
48
+ description: 'When the resource was last updated',
49
+ }),
50
+ tslib_1.__metadata("design:type", Date)
51
+ ], ResourceGroup.prototype, "updatedAt", void 0);
52
+ tslib_1.__decorate([
53
+ (0, typeorm_1.OneToMany)(() => resourceIntroduction_entity_1.ResourceIntroduction, (introduction) => introduction.resourceGroup),
54
+ tslib_1.__metadata("design:type", Array)
55
+ ], ResourceGroup.prototype, "introductions", void 0);
56
+ tslib_1.__decorate([
57
+ (0, typeorm_1.OneToMany)(() => resourceIntroductionUser_entity_1.ResourceIntroductionUser, (introducer) => introducer.resourceGroup),
58
+ tslib_1.__metadata("design:type", Array)
59
+ ], ResourceGroup.prototype, "introducers", void 0);
60
+ tslib_1.__decorate([
61
+ (0, typeorm_1.ManyToMany)(() => resource_entity_1.Resource, (resource) => resource.groups),
62
+ tslib_1.__metadata("design:type", Array)
63
+ ], ResourceGroup.prototype, "resources", void 0);
64
+ exports.ResourceGroup = ResourceGroup = tslib_1.__decorate([
65
+ (0, typeorm_1.Entity)()
66
+ ], ResourceGroup);
67
+ //# sourceMappingURL=resourceGroup.entity.js.map
@@ -0,0 +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,uFAA6E;AAC7E,uDAA6C;AAGtC,IAAM,aAAa,GAAnB,MAAM,aAAa;CA2CzB,CAAA;AA3CY,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;AAM5B;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,0DAAwB,EAAE,CAAC,UAAU,EAAE,EAAE,CAAC,UAAU,CAAC,aAAa,CAAC;;kDAC3C;AAGzC;IADC,IAAA,oBAAU,EAAC,GAAG,EAAE,CAAC,0BAAQ,EAAE,CAAC,QAAQ,EAAE,EAAE,CAAC,QAAQ,CAAC,MAAM,CAAC;;gDACnC;wBA1CZ,aAAa;IADzB,IAAA,gBAAM,GAAE;GACI,aAAa,CA2CzB"}
@@ -0,0 +1,17 @@
1
+ import { Resource } from './resource.entity';
2
+ import { User } from './user.entity';
3
+ import { ResourceIntroductionHistoryItem } from './resourceIntroductionHistoryItem.entity';
4
+ import { ResourceGroup } from './resourceGroup.entity';
5
+ export declare class ResourceIntroduction {
6
+ id: number;
7
+ resourceId: number;
8
+ receiverUserId: number;
9
+ tutorUserId: number;
10
+ completedAt: Date;
11
+ createdAt: Date;
12
+ resource: Resource;
13
+ receiverUser: User;
14
+ tutorUser: User;
15
+ history: ResourceIntroductionHistoryItem[];
16
+ resourceGroup: ResourceGroup;
17
+ }