@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.
Files changed (89) hide show
  1. package/package.json +4 -5
  2. package/src/index.d.ts +2 -0
  3. package/src/index.js +4 -0
  4. package/src/index.js.map +1 -1
  5. package/src/lib/entities/attractap.entity.d.ts +15 -0
  6. package/src/lib/entities/attractap.entity.js +87 -0
  7. package/src/lib/entities/attractap.entity.js.map +1 -0
  8. package/src/lib/entities/billing-transaction-item.entity.d.ts +11 -0
  9. package/src/lib/entities/billing-transaction-item.entity.js +65 -0
  10. package/src/lib/entities/billing-transaction-item.entity.js.map +1 -0
  11. package/src/lib/entities/billing-transaction.entity.d.ts +25 -0
  12. package/src/lib/entities/billing-transaction.entity.js +121 -0
  13. package/src/lib/entities/billing-transaction.entity.js.map +1 -0
  14. package/src/lib/entities/email-template.entity.d.ts +15 -0
  15. package/src/lib/entities/email-template.entity.js +61 -0
  16. package/src/lib/entities/email-template.entity.js.map +1 -0
  17. package/src/lib/entities/mqttServer.entity.d.ts +3 -2
  18. package/src/lib/entities/mqttServer.entity.js +24 -5
  19. package/src/lib/entities/mqttServer.entity.js.map +1 -1
  20. package/src/lib/entities/nfcCard.entity.d.ts +12 -0
  21. package/src/lib/entities/nfcCard.entity.js +77 -0
  22. package/src/lib/entities/nfcCard.entity.js.map +1 -0
  23. package/src/lib/entities/resource-billing-configuration.entity.d.ts +10 -0
  24. package/src/lib/entities/resource-billing-configuration.entity.js +52 -0
  25. package/src/lib/entities/resource-billing-configuration.entity.js.map +1 -0
  26. package/src/lib/entities/resource.entity.d.ts +23 -10
  27. package/src/lib/entities/resource.entity.js +96 -34
  28. package/src/lib/entities/resource.entity.js.map +1 -1
  29. package/src/lib/entities/resource.maintenance.d.ts +11 -0
  30. package/src/lib/entities/resource.maintenance.js +78 -0
  31. package/src/lib/entities/resource.maintenance.js.map +1 -0
  32. package/src/lib/entities/resource.type.d.ts +4 -0
  33. package/src/lib/entities/resource.type.js +9 -0
  34. package/src/lib/entities/resource.type.js.map +1 -0
  35. package/src/lib/entities/resourceFlowEdge.d.ts +12 -0
  36. package/src/lib/entities/resourceFlowEdge.js +86 -0
  37. package/src/lib/entities/resourceFlowEdge.js.map +1 -0
  38. package/src/lib/entities/resourceFlowLog.d.ts +18 -0
  39. package/src/lib/entities/resourceFlowLog.js +94 -0
  40. package/src/lib/entities/resourceFlowLog.js.map +1 -0
  41. package/src/lib/entities/resourceFlowNode.d.ts +161 -0
  42. package/src/lib/entities/resourceFlowNode.js +257 -0
  43. package/src/lib/entities/resourceFlowNode.js.map +1 -0
  44. package/src/lib/entities/resourceGroup.entity.d.ts +2 -2
  45. package/src/lib/entities/resourceGroup.entity.js +3 -3
  46. package/src/lib/entities/resourceGroup.entity.js.map +1 -1
  47. package/src/lib/entities/{resourceIntroductionUser.entity.d.ts → resourceIntroducer.entity.d.ts} +5 -4
  48. package/src/lib/entities/{resourceIntroductionUser.entity.js → resourceIntroducer.entity.js} +27 -17
  49. package/src/lib/entities/resourceIntroducer.entity.js.map +1 -0
  50. package/src/lib/entities/resourceIntroduction.entity.d.ts +2 -1
  51. package/src/lib/entities/resourceIntroduction.entity.js +14 -4
  52. package/src/lib/entities/resourceIntroduction.entity.js.map +1 -1
  53. package/src/lib/entities/resourceIntroductionHistoryItem.entity.d.ts +1 -1
  54. package/src/lib/entities/resourceIntroductionHistoryItem.entity.js +3 -3
  55. package/src/lib/entities/resourceIntroductionHistoryItem.entity.js.map +1 -1
  56. package/src/lib/entities/resourceUsage.entity.d.ts +4 -0
  57. package/src/lib/entities/resourceUsage.entity.js +24 -2
  58. package/src/lib/entities/resourceUsage.entity.js.map +1 -1
  59. package/src/lib/entities/resourceUsage.type.d.ts +6 -0
  60. package/src/lib/entities/resourceUsage.type.js +11 -0
  61. package/src/lib/entities/resourceUsage.type.js.map +1 -0
  62. package/src/lib/entities/revokedToken.entity.d.ts +0 -5
  63. package/src/lib/entities/revokedToken.entity.js +1 -29
  64. package/src/lib/entities/revokedToken.entity.js.map +1 -1
  65. package/src/lib/entities/session.entity.d.ts +12 -0
  66. package/src/lib/entities/session.entity.js +91 -0
  67. package/src/lib/entities/session.entity.js.map +1 -0
  68. package/src/lib/entities/setting.entity.d.ts +8 -0
  69. package/src/lib/entities/setting.entity.js +56 -0
  70. package/src/lib/entities/setting.entity.js.map +1 -0
  71. package/src/lib/entities/ssoProvider.oidc.d.ts +3 -0
  72. package/src/lib/entities/ssoProvider.oidc.js +27 -0
  73. package/src/lib/entities/ssoProvider.oidc.js.map +1 -1
  74. package/src/lib/entities/user.entity.d.ts +17 -4
  75. package/src/lib/entities/user.entity.js +79 -8
  76. package/src/lib/entities/user.entity.js.map +1 -1
  77. package/src/lib/entities-index.d.ts +30 -9
  78. package/src/lib/entities-index.js +61 -12
  79. package/src/lib/entities-index.js.map +1 -1
  80. package/src/lib/types/documentationType.enum.d.ts +7 -0
  81. package/src/lib/types/documentationType.enum.js +12 -0
  82. package/src/lib/types/documentationType.enum.js.map +1 -0
  83. package/src/lib/entities/mqttResourceConfig.entity.d.ts +0 -15
  84. package/src/lib/entities/mqttResourceConfig.entity.js +0 -95
  85. package/src/lib/entities/mqttResourceConfig.entity.js.map +0 -1
  86. package/src/lib/entities/resourceIntroductionUser.entity.js.map +0 -1
  87. package/src/lib/entities/webhookConfig.entity.d.ts +0 -20
  88. package/src/lib/entities/webhookConfig.entity.js +0 -148
  89. package/src/lib/entities/webhookConfig.entity.js.map +0 -1
@@ -1,15 +1,15 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.ResourceIntroductionUser = void 0;
3
+ exports.ResourceIntroducer = 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
- let ResourceIntroductionUser = class ResourceIntroductionUser {
10
+ let ResourceIntroducer = class ResourceIntroducer {
11
11
  };
12
- exports.ResourceIntroductionUser = ResourceIntroductionUser;
12
+ exports.ResourceIntroducer = ResourceIntroducer;
13
13
  tslib_1.__decorate([
14
14
  (0, typeorm_1.PrimaryGeneratedColumn)(),
15
15
  (0, swagger_1.ApiProperty)({
@@ -17,15 +17,16 @@ tslib_1.__decorate([
17
17
  example: 1,
18
18
  }),
19
19
  tslib_1.__metadata("design:type", Number)
20
- ], ResourceIntroductionUser.prototype, "id", void 0);
20
+ ], ResourceIntroducer.prototype, "id", void 0);
21
21
  tslib_1.__decorate([
22
- (0, typeorm_1.Column)({ type: 'integer' }),
22
+ (0, typeorm_1.Column)({ type: 'integer', nullable: true }),
23
23
  (0, swagger_1.ApiProperty)({
24
- description: 'The ID of the resource',
24
+ description: 'The ID of the resource (if permission is for a specific resource)',
25
25
  example: 1,
26
+ required: false,
26
27
  }),
27
28
  tslib_1.__metadata("design:type", Number)
28
- ], ResourceIntroductionUser.prototype, "resourceId", void 0);
29
+ ], ResourceIntroducer.prototype, "resourceId", void 0);
29
30
  tslib_1.__decorate([
30
31
  (0, typeorm_1.Column)({ type: 'integer' }),
31
32
  (0, swagger_1.ApiProperty)({
@@ -33,19 +34,28 @@ tslib_1.__decorate([
33
34
  example: 1,
34
35
  }),
35
36
  tslib_1.__metadata("design:type", Number)
36
- ], ResourceIntroductionUser.prototype, "userId", void 0);
37
+ ], ResourceIntroducer.prototype, "userId", void 0);
38
+ tslib_1.__decorate([
39
+ (0, typeorm_1.Column)({ type: 'integer', nullable: true }),
40
+ (0, swagger_1.ApiProperty)({
41
+ description: 'The ID of the resource group (if permission is for a group)',
42
+ example: 1,
43
+ required: false,
44
+ }),
45
+ tslib_1.__metadata("design:type", Number)
46
+ ], ResourceIntroducer.prototype, "resourceGroupId", void 0);
37
47
  tslib_1.__decorate([
38
48
  (0, typeorm_1.CreateDateColumn)(),
39
49
  (0, swagger_1.ApiProperty)({
40
50
  description: 'When the permission was granted',
41
51
  }),
42
52
  tslib_1.__metadata("design:type", Date)
43
- ], ResourceIntroductionUser.prototype, "grantedAt", void 0);
53
+ ], ResourceIntroducer.prototype, "grantedAt", void 0);
44
54
  tslib_1.__decorate([
45
- (0, typeorm_1.ManyToOne)(() => resource_entity_1.Resource),
55
+ (0, typeorm_1.ManyToOne)(() => resource_entity_1.Resource, undefined, { onDelete: 'CASCADE' }),
46
56
  (0, typeorm_1.JoinColumn)({ name: 'resourceId' }),
47
57
  tslib_1.__metadata("design:type", resource_entity_1.Resource)
48
- ], ResourceIntroductionUser.prototype, "resource", void 0);
58
+ ], ResourceIntroducer.prototype, "resource", void 0);
49
59
  tslib_1.__decorate([
50
60
  (0, typeorm_1.ManyToOne)(() => user_entity_1.User),
51
61
  (0, typeorm_1.JoinColumn)({ name: 'userId' }),
@@ -54,13 +64,13 @@ tslib_1.__decorate([
54
64
  type: () => user_entity_1.User,
55
65
  }),
56
66
  tslib_1.__metadata("design:type", user_entity_1.User)
57
- ], ResourceIntroductionUser.prototype, "user", void 0);
67
+ ], ResourceIntroducer.prototype, "user", void 0);
58
68
  tslib_1.__decorate([
59
- (0, typeorm_1.ManyToOne)(() => resourceGroup_entity_1.ResourceGroup),
69
+ (0, typeorm_1.ManyToOne)(() => resourceGroup_entity_1.ResourceGroup, undefined, { onDelete: 'CASCADE' }),
60
70
  (0, typeorm_1.JoinColumn)({ name: 'resourceGroupId' }),
61
71
  tslib_1.__metadata("design:type", resourceGroup_entity_1.ResourceGroup)
62
- ], ResourceIntroductionUser.prototype, "resourceGroup", void 0);
63
- exports.ResourceIntroductionUser = ResourceIntroductionUser = tslib_1.__decorate([
72
+ ], ResourceIntroducer.prototype, "resourceGroup", void 0);
73
+ exports.ResourceIntroducer = ResourceIntroducer = tslib_1.__decorate([
64
74
  (0, typeorm_1.Entity)()
65
- ], ResourceIntroductionUser);
66
- //# sourceMappingURL=resourceIntroductionUser.entity.js.map
75
+ ], ResourceIntroducer);
76
+ //# sourceMappingURL=resourceIntroducer.entity.js.map
@@ -0,0 +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;AAGhD,IAAM,kBAAkB,GAAxB,MAAM,kBAAkB;CAoD9B,CAAA;AApDY,gDAAkB;AAM7B;IALC,IAAA,gCAAsB,GAAE;IACxB,IAAA,qBAAW,EAAC;QACX,WAAW,EAAE,sDAAsD;QACnE,OAAO,EAAE,CAAC;KACX,CAAC;;8CACU;AAQZ;IANC,IAAA,gBAAM,EAAC,EAAE,IAAI,EAAE,SAAS,EAAE,QAAQ,EAAE,IAAI,EAAE,CAAC;IAC3C,IAAA,qBAAW,EAAC;QACX,WAAW,EAAE,mEAAmE;QAChF,OAAO,EAAE,CAAC;QACV,QAAQ,EAAE,KAAK;KAChB,CAAC;;sDACyB;AAO3B;IALC,IAAA,gBAAM,EAAC,EAAE,IAAI,EAAE,SAAS,EAAE,CAAC;IAC3B,IAAA,qBAAW,EAAC;QACX,WAAW,EAAE,+CAA+C;QAC5D,OAAO,EAAE,CAAC;KACX,CAAC;;kDACc;AAQhB;IANC,IAAA,gBAAM,EAAC,EAAE,IAAI,EAAE,SAAS,EAAE,QAAQ,EAAE,IAAI,EAAE,CAAC;IAC3C,IAAA,qBAAW,EAAC;QACX,WAAW,EAAE,6DAA6D;QAC1E,OAAO,EAAE,CAAC;QACV,QAAQ,EAAE,KAAK;KAChB,CAAC;;2DAC8B;AAMhC;IAJC,IAAA,0BAAgB,GAAE;IAClB,IAAA,qBAAW,EAAC;QACX,WAAW,EAAE,iCAAiC;KAC/C,CAAC;sCACU,IAAI;qDAAC;AAIjB;IAFC,IAAA,mBAAS,EAAC,GAAG,EAAE,CAAC,0BAAQ,EAAE,SAAS,EAAE,EAAE,QAAQ,EAAE,SAAS,EAAE,CAAC;IAC7D,IAAA,oBAAU,EAAC,EAAE,IAAI,EAAE,YAAY,EAAE,CAAC;sCACxB,0BAAQ;oDAAQ;AAQ3B;IANC,IAAA,mBAAS,EAAC,GAAG,EAAE,CAAC,kBAAI,CAAC;IACrB,IAAA,oBAAU,EAAC,EAAE,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;6BAnD1B,kBAAkB;IAD9B,IAAA,gBAAM,GAAE;GACI,kBAAkB,CAoD9B"}
@@ -4,9 +4,10 @@ import { ResourceIntroductionHistoryItem } from './resourceIntroductionHistoryIt
4
4
  import { ResourceGroup } from './resourceGroup.entity';
5
5
  export declare class ResourceIntroduction {
6
6
  id: number;
7
- resourceId: number;
7
+ resourceId: number | null;
8
8
  receiverUserId: number;
9
9
  tutorUserId: number;
10
+ resourceGroupId: number | null;
10
11
  completedAt: Date;
11
12
  createdAt: Date;
12
13
  resource: Resource;
@@ -20,10 +20,11 @@ tslib_1.__decorate([
20
20
  tslib_1.__metadata("design:type", Number)
21
21
  ], ResourceIntroduction.prototype, "id", void 0);
22
22
  tslib_1.__decorate([
23
- (0, typeorm_1.Column)({ type: 'integer' }),
23
+ (0, typeorm_1.Column)({ type: 'integer', nullable: true }),
24
24
  (0, swagger_1.ApiProperty)({
25
- description: 'The ID of the resource',
25
+ description: 'The ID of the resource (if this is a resource-specific introduction)',
26
26
  example: 1,
27
+ required: false,
27
28
  }),
28
29
  tslib_1.__metadata("design:type", Number)
29
30
  ], ResourceIntroduction.prototype, "resourceId", void 0);
@@ -43,6 +44,15 @@ tslib_1.__decorate([
43
44
  }),
44
45
  tslib_1.__metadata("design:type", Number)
45
46
  ], ResourceIntroduction.prototype, "tutorUserId", void 0);
47
+ tslib_1.__decorate([
48
+ (0, typeorm_1.Column)({ type: 'integer', nullable: true }),
49
+ (0, swagger_1.ApiProperty)({
50
+ description: 'The ID of the resource group (if this is a group-level introduction)',
51
+ example: 1,
52
+ required: false,
53
+ }),
54
+ tslib_1.__metadata("design:type", Number)
55
+ ], ResourceIntroduction.prototype, "resourceGroupId", void 0);
46
56
  tslib_1.__decorate([
47
57
  (0, typeorm_1.Column)({ type: 'datetime', default: () => "datetime('now')" }),
48
58
  (0, swagger_1.ApiProperty)({
@@ -60,7 +70,7 @@ tslib_1.__decorate([
60
70
  tslib_1.__metadata("design:type", Date)
61
71
  ], ResourceIntroduction.prototype, "createdAt", void 0);
62
72
  tslib_1.__decorate([
63
- (0, typeorm_1.ManyToOne)(() => resource_entity_1.Resource, (resource) => resource.introductions),
73
+ (0, typeorm_1.ManyToOne)(() => resource_entity_1.Resource, (resource) => resource.introductions, { onDelete: 'CASCADE' }),
64
74
  (0, typeorm_1.JoinColumn)({ name: 'resourceId' }),
65
75
  tslib_1.__metadata("design:type", resource_entity_1.Resource)
66
76
  ], ResourceIntroduction.prototype, "resource", void 0);
@@ -91,7 +101,7 @@ tslib_1.__decorate([
91
101
  tslib_1.__metadata("design:type", Array)
92
102
  ], ResourceIntroduction.prototype, "history", void 0);
93
103
  tslib_1.__decorate([
94
- (0, typeorm_1.ManyToOne)(() => resourceGroup_entity_1.ResourceGroup, (group) => group.introductions),
104
+ (0, typeorm_1.ManyToOne)(() => resourceGroup_entity_1.ResourceGroup, (group) => group.introductions, { onDelete: 'CASCADE' }),
95
105
  (0, typeorm_1.JoinColumn)({ name: 'resourceGroupId' }),
96
106
  tslib_1.__metadata("design:type", resourceGroup_entity_1.ResourceGroup)
97
107
  ], ResourceIntroduction.prototype, "resourceGroup", void 0);
@@ -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;CAyEhC,CAAA;AAzEY,oDAAoB;AAM/B;IALC,IAAA,gCAAsB,GAAE;IACxB,IAAA,qBAAW,EAAC;QACX,WAAW,EAAE,2CAA2C;QACxD,OAAO,EAAE,CAAC;KACX,CAAC;;gDACU;AAOZ;IALC,IAAA,gBAAM,EAAC,EAAE,IAAI,EAAE,SAAS,EAAE,CAAC;IAC3B,IAAA,qBAAW,EAAC;QACX,WAAW,EAAE,wBAAwB;QACrC,OAAO,EAAE,CAAC;KACX,CAAC;;wDACkB;AAOpB;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;AAOrB;IALC,IAAA,gBAAM,EAAC,EAAE,IAAI,EAAE,UAAU,EAAE,OAAO,EAAE,GAAG,EAAE,CAAC,iBAAiB,EAAE,CAAC;IAC9D,IAAA,qBAAW,EAAC;QACX,WAAW,EAAE,qCAAqC;QAClD,OAAO,EAAE,0BAA0B;KACpC,CAAC;sCACY,IAAI;yDAAC;AAOnB;IALC,IAAA,0BAAgB,GAA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aAAa,CAAC;IAC9D,IAAA,oBAAU,EAAC,EAAE,IAAI,EAAE,iBAAiB,EAAE,CAAC;sCACxB,oCAAa;2DAAC;+BAxEnB,oBAAoB;IADhC,IAAA,gBAAM,GAAE;GACI,oBAAoB,CAyEhC"}
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;CAkFhC,CAAA;AAlFY,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,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E,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;+BAjFnB,oBAAoB;IADhC,IAAA,gBAAM,GAAE;GACI,oBAAoB,CAkFhC"}
@@ -2,7 +2,7 @@ import { ResourceIntroduction } from './resourceIntroduction.entity';
2
2
  import { User } from './user.entity';
3
3
  export declare enum IntroductionHistoryAction {
4
4
  REVOKE = "revoke",
5
- UNREVOKE = "unrevoke"
5
+ GRANT = "grant"
6
6
  }
7
7
  export declare class ResourceIntroductionHistoryItem {
8
8
  id: number;
@@ -9,7 +9,7 @@ const user_entity_1 = require("./user.entity");
9
9
  var IntroductionHistoryAction;
10
10
  (function (IntroductionHistoryAction) {
11
11
  IntroductionHistoryAction["REVOKE"] = "revoke";
12
- IntroductionHistoryAction["UNREVOKE"] = "unrevoke";
12
+ IntroductionHistoryAction["GRANT"] = "grant";
13
13
  })(IntroductionHistoryAction || (exports.IntroductionHistoryAction = IntroductionHistoryAction = {}));
14
14
  let ResourceIntroductionHistoryItem = class ResourceIntroductionHistoryItem {
15
15
  };
@@ -36,7 +36,7 @@ tslib_1.__decorate([
36
36
  enum: IntroductionHistoryAction,
37
37
  }),
38
38
  (0, swagger_1.ApiProperty)({
39
- description: 'The action performed (revoke or unrevoke)',
39
+ description: 'The action performed (revoke or grant)',
40
40
  enum: IntroductionHistoryAction,
41
41
  example: IntroductionHistoryAction.REVOKE,
42
42
  }),
@@ -68,7 +68,7 @@ tslib_1.__decorate([
68
68
  tslib_1.__metadata("design:type", Date)
69
69
  ], ResourceIntroductionHistoryItem.prototype, "createdAt", void 0);
70
70
  tslib_1.__decorate([
71
- (0, typeorm_1.ManyToOne)(() => resourceIntroduction_entity_1.ResourceIntroduction, (introduction) => introduction.history),
71
+ (0, typeorm_1.ManyToOne)(() => resourceIntroduction_entity_1.ResourceIntroduction, (introduction) => introduction.history, { onDelete: 'CASCADE' }),
72
72
  (0, typeorm_1.JoinColumn)({ name: 'introductionId' }),
73
73
  tslib_1.__metadata("design:type", resourceIntroduction_entity_1.ResourceIntroduction)
74
74
  ], ResourceIntroductionHistoryItem.prototype, "introduction", void 0);
@@ -1 +1 @@
1
- {"version":3,"file":"resourceIntroductionHistoryItem.entity.js","sourceRoot":"","sources":["../../../../../../libs/database-entities/src/lib/entities/resourceIntroductionHistoryItem.entity.ts"],"names":[],"mappings":";;;;AAAA,qCAOiB;AACjB,6CAA8C;AAC9C,+EAAqE;AACrE,+CAAqC;AAErC,IAAY,yBAGX;AAHD,WAAY,yBAAyB;IACnC,8CAAiB,CAAA;IACjB,kDAAqB,CAAA;AACvB,CAAC,EAHW,yBAAyB,yCAAzB,yBAAyB,QAGpC;AAGM,IAAM,+BAA+B,GAArC,MAAM,+BAA+B;CA2D3C,CAAA;AA3DY,0EAA+B;AAM1C;IALC,IAAA,gCAAsB,GAAE;IACxB,IAAA,qBAAW,EAAC;QACX,WAAW,EAAE,yDAAyD;QACtE,OAAO,EAAE,CAAC;KACX,CAAC;;2DACU;AAOZ;IALC,IAAA,gBAAM,EAAC,EAAE,IAAI,EAAE,SAAS,EAAE,CAAC;IAC3B,IAAA,qBAAW,EAAC;QACX,WAAW,EAAE,oCAAoC;QACjD,OAAO,EAAE,CAAC;KACX,CA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Z,+BAA+B;IAD3C,IAAA,gBAAM,GAAE;GACI,+BAA+B,CA2D3C"}
1
+ {"version":3,"file":"resourceIntroductionHistoryItem.entity.js","sourceRoot":"","sources":["../../../../../../libs/database-entities/src/lib/entities/resourceIntroductionHistoryItem.entity.ts"],"names":[],"mappings":";;;;AAAA,qCAA0G;AAC1G,6CAA8C;AAC9C,+EAAqE;AACrE,+CAAqC;AAErC,IAAY,yBAGX;AAHD,WAAY,yBAAyB;IACnC,8CAAiB,CAAA;IACjB,4CAAe,CAAA;AACjB,CAAC,EAHW,yBAAyB,yCAAzB,yBAAyB,QAGpC;AAGM,IAAM,+BAA+B,GAArC,MAAM,+BAA+B;CA2D3C,CAAA;AA3DY,0EAA+B;AAM1C;IALC,IAAA,gCAAsB,GAAE;IACxB,IAAA,qBAAW,EAAC;QACX,WAAW,EAAE,yDAAyD;QACtE,OAAO,EAAE,CAAC;KACX,CAAC;;2DACU;AAOZ;IALC,IAAA,gBAAM,EAAC,EAAE,IAAI,EAAE,SAAS,EAAE,CAAC;IAC3B,IAAA,qBAAW,EAAC;QACX,WAAW,EAAE,oCAAoC;QACjD,OAAO,EAAE,CAAC;KACX,CAAC;;uEACsB;AAWxB;IATC,IAAA,gBAAM,EAAC;QACN,IAAI,EAAE,aAAa;QACnB,IAAI,EAAE,yBAAyB;KAChC,CAAC;IACD,IAAA,qBAAW,EAAC;QACX,WAAW,EAAE,wCAAwC;QACrD,IAAI,EAAE,yBAAyB;QAC/B,OAAO,EAAE,yBAAyB,CAAC,MAAM;KAC1C,CAAC;;+DACiC;AAOnC;IALC,IAAA,gBAAM,EAAC,EAAE,IAAI,EAAE,SAAS,EAAE,CAAC;IAC3B,IAAA,qBAAW,EAAC;QACX,WAAW,EAAE,6CAA6C;QAC1D,OAAO,EAAE,CAAC;KACX,CAAC;;0EACyB;AAQ3B;IANC,IAAA,gBAAM,EAAC,EAAE,IAAI,EAAE,MAAM,EAAE,QAAQ,EAAE,IAAI,EAAE,CAAC;IACxC,IAAA,qBAAW,EAAC;QACX,WAAW,EAAE,uDAAuD;QACpE,OAAO,EAAE,iDAAiD;QAC1D,QAAQ,EAAE,KAAK;KAChB,CAAC;;gEACsB;AAOxB;IALC,IAAA,0BAAgB,GAAE;IAClB,IAAA,qBAAW,EAAC;QACX,WAAW,EAAE,+BAA+B;QAC5C,OAAO,EAAE,0BAA0B;KACpC,CAAC;sCACU,IAAI;kEAAC;AAIjB;IAFC,IAAA,mBAAS,EAAC,GAAG,EAAE,CAAC,kDAAoB,EAAE,CAAC,YAAY,EAAE,EAAE,CAAC,YAAY,CAAC,OAAO,EAAE,EAAE,QAAQ,EAAE,SAAS,EAAE,CAAC;IACtG,IAAA,oBAAU,EAAC,EAAE,IAAI,EAAE,gBAAgB,EAAE,CAAC;sCACxB,kDAAoB;qEAAC;AAQpC;IANC,IAAA,mBAAS,EAAC,GAAG,EAAE,CAAC,kBAAI,CAAC;IACrB,IAAA,oBAAU,EAAC,EAAE,IAAI,EAAE,mBAAmB,EAAE,CAAC;IACzC,IAAA,qBAAW,EAAC;QACX,WAAW,EAAE,mCAAmC;QAChD,IAAI,EAAE,GAAG,EAAE,CAAC,kBAAI;KACjB,CAAC;sCACgB,kBAAI;wEAAC;0CA1DZ,+BAA+B;IAD3C,IAAA,gBAAM,GAAE;GACI,+BAA+B,CA2D3C"}
@@ -1,7 +1,10 @@
1
1
  import { Resource } from './resource.entity';
2
2
  import { User } from './user.entity';
3
+ import { ResourceUsageAction } from './resourceUsage.type';
4
+ import { BillingTransaction } from './billing-transaction.entity';
3
5
  export declare class ResourceUsage {
4
6
  id: number;
7
+ usageAction: ResourceUsageAction;
5
8
  resourceId: number;
6
9
  userId: number | null;
7
10
  startTime: Date;
@@ -11,4 +14,5 @@ export declare class ResourceUsage {
11
14
  resource: Resource;
12
15
  user: User | null;
13
16
  usageInMinutes: number;
17
+ billingTransaction: BillingTransaction | null;
14
18
  }
@@ -6,6 +6,8 @@ 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
+ const resourceUsage_type_1 = require("./resourceUsage.type");
10
+ const billing_transaction_entity_1 = require("./billing-transaction.entity");
9
11
  let ResourceUsage = class ResourceUsage {
10
12
  };
11
13
  exports.ResourceUsage = ResourceUsage;
@@ -17,6 +19,15 @@ tslib_1.__decorate([
17
19
  }),
18
20
  tslib_1.__metadata("design:type", Number)
19
21
  ], ResourceUsage.prototype, "id", void 0);
22
+ tslib_1.__decorate([
23
+ (0, typeorm_1.Column)({ type: 'simple-enum', enum: resourceUsage_type_1.ResourceUsageAction }),
24
+ (0, swagger_1.ApiProperty)({
25
+ description: 'The type of usage',
26
+ example: resourceUsage_type_1.ResourceUsageAction.Usage,
27
+ enum: resourceUsage_type_1.ResourceUsageAction,
28
+ }),
29
+ tslib_1.__metadata("design:type", String)
30
+ ], ResourceUsage.prototype, "usageAction", void 0);
20
31
  tslib_1.__decorate([
21
32
  (0, typeorm_1.Column)({
22
33
  type: 'integer',
@@ -70,8 +81,13 @@ tslib_1.__decorate([
70
81
  tslib_1.__metadata("design:type", String)
71
82
  ], ResourceUsage.prototype, "endNotes", void 0);
72
83
  tslib_1.__decorate([
73
- (0, typeorm_1.ManyToOne)(() => resource_entity_1.Resource, (resource) => resource.usages),
84
+ (0, typeorm_1.ManyToOne)(() => resource_entity_1.Resource, (resource) => resource.usages, { onDelete: 'CASCADE' }),
74
85
  (0, typeorm_1.JoinColumn)({ name: 'resourceId' }),
86
+ (0, swagger_1.ApiProperty)({
87
+ description: 'The resource being used',
88
+ type: () => resource_entity_1.Resource,
89
+ required: false,
90
+ }),
75
91
  tslib_1.__metadata("design:type", resource_entity_1.Resource)
76
92
  ], ResourceUsage.prototype, "resource", void 0);
77
93
  tslib_1.__decorate([
@@ -79,7 +95,6 @@ tslib_1.__decorate([
79
95
  (0, typeorm_1.JoinColumn)({ name: 'userId' }),
80
96
  (0, swagger_1.ApiProperty)({
81
97
  description: 'The user who used the resource',
82
- example: 1,
83
98
  required: false,
84
99
  type: () => user_entity_1.User,
85
100
  }),
@@ -102,6 +117,13 @@ tslib_1.__decorate([
102
117
  }),
103
118
  tslib_1.__metadata("design:type", Number)
104
119
  ], ResourceUsage.prototype, "usageInMinutes", void 0);
120
+ tslib_1.__decorate([
121
+ (0, typeorm_1.OneToOne)(() => billing_transaction_entity_1.BillingTransaction, (billingTransaction) => billingTransaction.resourceUsage, {
122
+ onDelete: 'CASCADE',
123
+ nullable: true,
124
+ }),
125
+ tslib_1.__metadata("design:type", billing_transaction_entity_1.BillingTransaction)
126
+ ], ResourceUsage.prototype, "billingTransaction", void 0);
105
127
  exports.ResourceUsage = ResourceUsage = tslib_1.__decorate([
106
128
  (0, typeorm_1.Entity)()
107
129
  ], ResourceUsage);
@@ -1 +1 @@
1
- {"version":3,"file":"resourceUsage.entity.js","sourceRoot":"","sources":["../../../../../../libs/database-entities/src/lib/entities/resourceUsage.entity.ts"],"names":[],"mappings":";;;;AAAA,qCAA0G;AAC1G,6CAA8C;AAC9C,uDAA6C;AAC7C,+CAAqC;AAG9B,IAAM,aAAa,GAAnB,MAAM,aAAa;CAmFzB,CAAA;AAnFY,sCAAa;AAMxB;IALC,IAAA,gCAAsB,GAAE;IACxB,IAAA,qBAAW,EAAC;QACX,WAAW,EAAE,6CAA6C;QAC1D,OAAO,EAAE,CAAC;KACX,CAAC;;yCACU;AASZ;IAPC,IAAA,gBAAM,EAAC;QACN,IAAI,EAAE,SAAS;KAChB,CAAC;IACD,IAAA,qBAAW,EAAC;QACX,WAAW,EAAE,mCAAmC;QAChD,OAAO,EAAE,CAAC;KACX,CAAC;;iDACkB;AAQpB;IANC,IAAA,gBAAM,EAAC,EAAE,QAAQ,EAAE,IAAI,EAAE,IAAI,EAAE,SAAS,EAAE,CAAC;IAC3C,IAAA,qBAAW,EAAC;QACX,WAAW,EAAE,kEAAkE;QAC/E,OAAO,EAAE,CAAC;QACV,QAAQ,EAAE,K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WAAW,EAAE,gCAAgC;QAC7C,OAAO,EAAE,CAAC;QACV,QAAQ,EAAE,KAAK;QACf,IAAI,EAAE,GAAG,EAAE,CAAC,kBAAI;KACjB,CAAC;sCACK,kBAAI;2CAAQ;AAgBnB;IAdC,IAAA,gBAAM,EAAC;QACN,aAAa,EAAE,QAAQ;QACvB,YAAY,EAAE;;;QAGV;QACJ,MAAM,EAAE,KAAK;QACb,MAAM,EAAE,KAAK;QACb,IAAI,EAAE,SAAS;KAChB,CAAC;IACD,IAAA,qBAAW,EAAC;QACX,WAAW,EAAE,8CAA8C;QAC3D,OAAO,EAAE,GAAG;KACb,CAAC;;qDACsB;wBAlFb,aAAa;IADzB,IAAA,gBAAM,GAAE;GACI,aAAa,CAmFzB"}
1
+ {"version":3,"file":"resourceUsage.entity.js","sourceRoot":"","sources":["../../../../../../libs/database-entities/src/lib/entities/resourceUsage.entity.ts"],"names":[],"mappings":";;;;AAAA,qCAAoH;AACpH,6CAA8C;AAC9C,uDAA6C;AAC7C,+CAAqC;AACrC,6DAA2D;AAC3D,6EAAkE;AAG3D,IAAM,aAAa,GAAnB,MAAM,aAAa;CAqGzB,CAAA;AArGY,sCAAa;AAMxB;IALC,IAAA,gCAAsB,GAAE;IACxB,IAAA,qBAAW,EAAC;QACX,WAAW,EAAE,6CAA6C;QAC1D,OAAO,EAAE,CAAC;KACX,CAAC;;yCACU;AAQZ;IANC,IAAA,gBAAM,EAAC,EAAE,IAAI,EAAE,aAAa,EAAE,IAAI,EAAE,wCAAmB,EAAE,CAAC;IAC1D,IAAA,qBAAW,EAAC;QACX,WAAW,EAAE,mBAAmB;QAChC,OAAO,EAAE,wCAAmB,CAAC,KAAK;QAClC,IAAI,EAAE,wCAAmB;KAC1B,CAAC;;kDACgC;AASlC;IAPC,IAAA,gBAAM,EAAC;QACN,IAAI,EAAE,SAAS;KAChB,CAAC;IACD,IAAA,qBAAW,EAAC;QACX,WAAW,EAAE,mCAAmC;QAChD,OAAO,EAAE,CAAC;KACX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WAAW,EAAE,yBAAyB;QACtC,IAAI,EAAE,GAAG,EAAE,CAAC,0BAAQ;QACpB,QAAQ,EAAE,KAAK;KAChB,CAAC;sCACS,0BAAQ;+CAAC;AASpB;IAPC,IAAA,mBAAS,EAAC,GAAG,EAAE,CAAC,kBAAI,EAAE,CAAC,IAAI,EAAE,EAAE,CAAC,IAAI,CAAC,cAAc,EAAE,EAAE,QAAQ,EAAE,IAAI,EAAE,CAAC;IACxE,IAAA,oBAAU,EAAC,EAAE,IAAI,EAAE,QAAQ,EAAE,CAAC;IAC9B,IAAA,qBAAW,EAAC;QACX,WAAW,EAAE,gCAAgC;QAC7C,QAAQ,EAAE,KAAK;QACf,IAAI,EAAE,GAAG,EAAE,CAAC,kBAAI;KACjB,CAAC;sCACK,kBAAI;2CAAQ;AAgBnB;IAdC,IAAA,gBAAM,EAAC;QACN,aAAa,EAAE,QAAQ;QACvB,YAAY,EAAE;;;QAGV;QACJ,MAAM,EAAE,KAAK;QACb,MAAM,EAAE,KAAK;QACb,IAAI,EAAE,SAAS;KAChB,CAAC;IACD,IAAA,qBAAW,EAAC;QACX,WAAW,EAAE,8CAA8C;QAC3D,OAAO,EAAE,GAAG;KACb,CAAC;;qDACsB;AAMxB;IAJC,IAAA,kBAAQ,EAAC,GAAG,EAAE,CAAC,+CAAkB,EAAE,CAAC,kBAAkB,EAAE,EAAE,CAAC,kBAAkB,CAAC,aAAa,EAAE;QAC5F,QAAQ,EAAE,SAAS;QACnB,QAAQ,EAAE,IAAI;KACf,CAAC;sCACmB,+CAAkB;yDAAQ;wBApGpC,aAAa;IADzB,IAAA,gBAAM,GAAE;GACI,aAAa,CAqGzB"}
@@ -0,0 +1,6 @@
1
+ export declare enum ResourceUsageAction {
2
+ Usage = "usage",
3
+ DoorLock = "door.lock",
4
+ DoorUnlock = "door.unlock",
5
+ DoorUnlatch = "door.unlatch"
6
+ }
@@ -0,0 +1,11 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.ResourceUsageAction = void 0;
4
+ var ResourceUsageAction;
5
+ (function (ResourceUsageAction) {
6
+ ResourceUsageAction["Usage"] = "usage";
7
+ ResourceUsageAction["DoorLock"] = "door.lock";
8
+ ResourceUsageAction["DoorUnlock"] = "door.unlock";
9
+ ResourceUsageAction["DoorUnlatch"] = "door.unlatch";
10
+ })(ResourceUsageAction || (exports.ResourceUsageAction = ResourceUsageAction = {}));
11
+ //# sourceMappingURL=resourceUsage.type.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"resourceUsage.type.js","sourceRoot":"","sources":["../../../../../../libs/database-entities/src/lib/entities/resourceUsage.type.ts"],"names":[],"mappings":";;;AAAA,IAAY,mBAKX;AALD,WAAY,mBAAmB;IAC7B,sCAAe,CAAA;IACf,6CAAsB,CAAA;IACtB,iDAA0B,CAAA;IAC1B,mDAA4B,CAAA;AAC9B,CAAC,EALW,mBAAmB,mCAAnB,mBAAmB,QAK9B"}
@@ -1,10 +1,5 @@
1
- import { User } from './user.entity';
2
1
  export declare class RevokedToken {
3
2
  id: number;
4
- userId: number;
5
- token: string;
6
3
  tokenId: string;
7
- expiresAt: Date;
8
4
  revokedAt: Date;
9
- user: User;
10
5
  }
@@ -4,7 +4,6 @@ exports.RevokedToken = void 0;
4
4
  const tslib_1 = require("tslib");
5
5
  const typeorm_1 = require("typeorm");
6
6
  const swagger_1 = require("@nestjs/swagger");
7
- const user_entity_1 = require("./user.entity");
8
7
  let RevokedToken = class RevokedToken {
9
8
  };
10
9
  exports.RevokedToken = RevokedToken;
@@ -16,35 +15,13 @@ tslib_1.__decorate([
16
15
  }),
17
16
  tslib_1.__metadata("design:type", Number)
18
17
  ], RevokedToken.prototype, "id", void 0);
19
- tslib_1.__decorate([
20
- (0, typeorm_1.Column)({ type: 'integer' }),
21
- (0, swagger_1.ApiProperty)({
22
- description: 'The ID of the user who owned the token',
23
- example: 1,
24
- }),
25
- tslib_1.__metadata("design:type", Number)
26
- ], RevokedToken.prototype, "userId", void 0);
27
18
  tslib_1.__decorate([
28
19
  (0, typeorm_1.Column)({ type: 'text' }),
29
20
  (0, swagger_1.ApiProperty)({
30
- description: 'The JWT token that was revoked',
31
- }),
32
- tslib_1.__metadata("design:type", String)
33
- ], RevokedToken.prototype, "token", void 0);
34
- tslib_1.__decorate([
35
- (0, typeorm_1.Column)({ type: 'text' }),
36
- (0, swagger_1.ApiProperty)({
37
- description: 'The unique identifier of the token',
21
+ description: "The JWT token's ID that was revoked",
38
22
  }),
39
23
  tslib_1.__metadata("design:type", String)
40
24
  ], RevokedToken.prototype, "tokenId", void 0);
41
- tslib_1.__decorate([
42
- (0, typeorm_1.Column)({ type: 'datetime' }),
43
- (0, swagger_1.ApiProperty)({
44
- description: 'When the token expires',
45
- }),
46
- tslib_1.__metadata("design:type", Date)
47
- ], RevokedToken.prototype, "expiresAt", void 0);
48
25
  tslib_1.__decorate([
49
26
  (0, typeorm_1.CreateDateColumn)(),
50
27
  (0, swagger_1.ApiProperty)({
@@ -52,11 +29,6 @@ tslib_1.__decorate([
52
29
  }),
53
30
  tslib_1.__metadata("design:type", Date)
54
31
  ], RevokedToken.prototype, "revokedAt", void 0);
55
- tslib_1.__decorate([
56
- (0, typeorm_1.ManyToOne)(() => user_entity_1.User, (user) => user.revokedTokens),
57
- (0, typeorm_1.JoinColumn)({ name: 'userId' }),
58
- tslib_1.__metadata("design:type", user_entity_1.User)
59
- ], RevokedToken.prototype, "user", void 0);
60
32
  exports.RevokedToken = RevokedToken = tslib_1.__decorate([
61
33
  (0, typeorm_1.Entity)()
62
34
  ], RevokedToken);
@@ -1 +1 @@
1
- {"version":3,"file":"revokedToken.entity.js","sourceRoot":"","sources":["../../../../../../libs/database-entities/src/lib/entities/revokedToken.entity.ts"],"names":[],"mappings":";;;;AAAA,qCAOiB;AACjB,6CAA8C;AAC9C,+CAAqC;AAG9B,IAAM,YAAY,GAAlB,MAAM,YAAY;CA0CxB,CAAA;AA1CY,oCAAY;AAMvB;IALC,IAAA,gCAAsB,GAAE;IACxB,IAAA,qBAAW,EAAC;QACX,WAAW,EAAE,4CAA4C;QACzD,OAAO,EAAE,CAAC;KACX,CAAC;;wCACU;AAOZ;IALC,IAAA,gBAAM,EAAC,EAAE,IAAI,EAAE,SAAS,EAAE,CAAC;IAC3B,IAAA,qBAAW,EAAC;QACX,WAAW,EAAE,wCAAwC;QACrD,OAAO,EAAE,CAAC;KACX,CAAC;;4CACc;AAMhB;IAJC,IAAA,gBAAM,EAAC,EAAE,IAAI,EAAE,MAAM,EAAE,CAAC;IACxB,IAAA,qBAAW,EAAC;QACX,WAAW,EAAE,gCAAgC;KAC9C,CAAC;;2CACa;AAMf;IAJC,IAAA,gBAAM,EAAC,EAAE,IAAI,EAAE,MAAM,EAAE,CAAC;IACxB,IAAA,qBAAW,EAAC;QACX,WAAW,EAAE,oCAAoC;KAClD,CAAC;;6CACe;AAMjB;IAJC,IAAA,gBAAM,EAAC,EAAE,IAAI,EAAE,UAAU,EAAE,CAAC;IAC5B,IAAA,qBAAW,EAAC;QACX,WAAW,EAAE,wBAAwB;KACtC,CAAC;sCACU,IAAI;+CAAC;AAMjB;IAJC,IAAA,0BAAgB,GAAE;IAClB,IAAA,qBAAW,EAAC;QACX,WAAW,EAAE,4BAA4B;KAC1C,CAAC;sCACU,IAAI;+CAAC;AAIjB;IAFC,IAAA,mBAAS,EAAC,GAAG,EAAE,CAAC,kBAAI,EAAE,CAAC,IAAI,EAAE,EAAE,CAAC,IAAI,CAAC,aAAa,CAAC;IACnD,IAAA,oBAAU,EAAC,EAAE,IAAI,EAAE,QAAQ,EAAE,CAAC;sCACxB,kBAAI;0CAAC;uBAzCD,YAAY;IADxB,IAAA,gBAAM,GAAE;GACI,YAAY,CA0CxB"}
1
+ {"version":3,"file":"revokedToken.entity.js","sourceRoot":"","sources":["../../../../../../libs/database-entities/src/lib/entities/revokedToken.entity.ts"],"names":[],"mappings":";;;;AAAA,qCAAmF;AACnF,6CAA8C;AAGvC,IAAM,YAAY,GAAlB,MAAM,YAAY;CAmBxB,CAAA;AAnBY,oCAAY;AAMvB;IALC,IAAA,gCAAsB,GAAE;IACxB,IAAA,qBAAW,EAAC;QACX,WAAW,EAAE,4CAA4C;QACzD,OAAO,EAAE,CAAC;KACX,CAAC;;wCACU;AAMZ;IAJC,IAAA,gBAAM,EAAC,EAAE,IAAI,EAAE,MAAM,EAAE,CAAC;IACxB,IAAA,qBAAW,EAAC;QACX,WAAW,EAAE,qCAAqC;KACnD,CAAC;;6CACe;AAMjB;IAJC,IAAA,0BAAgB,GAAE;IAClB,IAAA,qBAAW,EAAC;QACX,WAAW,EAAE,4BAA4B;KAC1C,CAAC;sCACU,IAAI;+CAAC;uBAlBN,YAAY;IADxB,IAAA,gBAAM,GAAE;GACI,YAAY,CAmBxB"}
@@ -0,0 +1,12 @@
1
+ import { User } from './user.entity';
2
+ export declare class Session {
3
+ id: number;
4
+ token: string;
5
+ userId: number;
6
+ userAgent: string | null;
7
+ ipAddress: string | null;
8
+ expiresAt: Date;
9
+ createdAt: Date;
10
+ lastAccessedAt: Date;
11
+ user: User;
12
+ }
@@ -0,0 +1,91 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.Session = 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 Session = class Session {
9
+ };
10
+ exports.Session = Session;
11
+ tslib_1.__decorate([
12
+ (0, typeorm_1.PrimaryGeneratedColumn)(),
13
+ (0, swagger_1.ApiProperty)({
14
+ description: 'The unique identifier of the session',
15
+ example: 1,
16
+ }),
17
+ tslib_1.__metadata("design:type", Number)
18
+ ], Session.prototype, "id", void 0);
19
+ tslib_1.__decorate([
20
+ (0, typeorm_1.Column)({ type: 'text', unique: true }),
21
+ (0, swagger_1.ApiProperty)({
22
+ description: 'The session token',
23
+ example: 'abc123def456...',
24
+ }),
25
+ tslib_1.__metadata("design:type", String)
26
+ ], Session.prototype, "token", void 0);
27
+ tslib_1.__decorate([
28
+ (0, typeorm_1.Column)({ type: 'int' }),
29
+ (0, swagger_1.ApiProperty)({
30
+ description: 'The ID of the user this session belongs to',
31
+ example: 1,
32
+ }),
33
+ tslib_1.__metadata("design:type", Number)
34
+ ], Session.prototype, "userId", void 0);
35
+ tslib_1.__decorate([
36
+ (0, typeorm_1.Column)({ type: 'text', nullable: true }),
37
+ (0, swagger_1.ApiProperty)({
38
+ description: 'The user agent string from the request that created this session',
39
+ example: 'Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36',
40
+ nullable: true,
41
+ }),
42
+ tslib_1.__metadata("design:type", String)
43
+ ], Session.prototype, "userAgent", void 0);
44
+ tslib_1.__decorate([
45
+ (0, typeorm_1.Column)({ type: 'text', nullable: true }),
46
+ (0, swagger_1.ApiProperty)({
47
+ description: 'The IP address from the request that created this session',
48
+ example: '192.168.1.100',
49
+ nullable: true,
50
+ }),
51
+ tslib_1.__metadata("design:type", String)
52
+ ], Session.prototype, "ipAddress", void 0);
53
+ tslib_1.__decorate([
54
+ (0, typeorm_1.Column)({ type: 'datetime' }),
55
+ (0, swagger_1.ApiProperty)({
56
+ description: 'When this session expires',
57
+ example: '2025-01-19T12:00:00.000Z',
58
+ }),
59
+ tslib_1.__metadata("design:type", Date)
60
+ ], Session.prototype, "expiresAt", void 0);
61
+ tslib_1.__decorate([
62
+ (0, typeorm_1.CreateDateColumn)(),
63
+ (0, swagger_1.ApiProperty)({
64
+ description: 'When this session was created',
65
+ example: '2025-01-18T12:00:00.000Z',
66
+ }),
67
+ tslib_1.__metadata("design:type", Date)
68
+ ], Session.prototype, "createdAt", void 0);
69
+ tslib_1.__decorate([
70
+ (0, typeorm_1.UpdateDateColumn)(),
71
+ (0, swagger_1.ApiProperty)({
72
+ description: 'When this session was last accessed',
73
+ example: '2025-01-18T12:30:00.000Z',
74
+ }),
75
+ tslib_1.__metadata("design:type", Date)
76
+ ], Session.prototype, "lastAccessedAt", void 0);
77
+ tslib_1.__decorate([
78
+ (0, typeorm_1.ManyToOne)(() => user_entity_1.User, { onDelete: 'CASCADE' }),
79
+ (0, swagger_1.ApiProperty)({
80
+ description: 'The user this session belongs to',
81
+ type: () => user_entity_1.User,
82
+ }),
83
+ tslib_1.__metadata("design:type", user_entity_1.User)
84
+ ], Session.prototype, "user", void 0);
85
+ exports.Session = Session = tslib_1.__decorate([
86
+ (0, typeorm_1.Entity)(),
87
+ (0, typeorm_1.Index)(['token'], { unique: true }),
88
+ (0, typeorm_1.Index)(['userId']),
89
+ (0, typeorm_1.Index)(['expiresAt'])
90
+ ], Session);
91
+ //# sourceMappingURL=session.entity.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"session.entity.js","sourceRoot":"","sources":["../../../../../../libs/database-entities/src/lib/entities/session.entity.ts"],"names":[],"mappings":";;;;AAAA,qCAAuH;AACvH,6CAA8C;AAC9C,+CAAqC;AAM9B,IAAM,OAAO,GAAb,MAAM,OAAO;CAiEnB,CAAA;AAjEY,0BAAO;AAMlB;IALC,IAAA,gCAAsB,GAAE;IACxB,IAAA,qBAAW,EAAC;QACX,WAAW,EAAE,sCAAsC;QACnD,OAAO,EAAE,CAAC;KACX,CAAC;;mCACU;AAOZ;IALC,IAAA,gBAAM,EAAC,EAAE,IAAI,EAAE,MAAM,EAAE,MAAM,EAAE,IAAI,EAAE,CAAC;IACtC,IAAA,qBAAW,EAAC;QACX,WAAW,EAAE,mBAAmB;QAChC,OAAO,EAAE,iBAAiB;KAC3B,CAAC;;sCACa;AAOf;IALC,IAAA,gBAAM,EAAC,EAAE,IAAI,EAAE,KAAK,EAAE,CAAC;IACvB,IAAA,qBAAW,EAAC;QACX,WAAW,EAAE,4CAA4C;QACzD,OAAO,EAAE,CAAC;KACX,CAAC;;uCACc;AAQhB;IANC,IAAA,gBAAM,EAAC,EAAE,IAAI,EAAE,MAAM,EAAE,QAAQ,EAAE,IAAI,EAAE,CAAC;IACxC,IAAA,qBAA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OAAO,CAiEnB"}
@@ -0,0 +1,8 @@
1
+ export declare class Setting {
2
+ id: number;
3
+ parent: string | null;
4
+ key: string;
5
+ value: string;
6
+ createdAt: Date;
7
+ updatedAt: Date;
8
+ }
@@ -0,0 +1,56 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.Setting = void 0;
4
+ const tslib_1 = require("tslib");
5
+ const typeorm_1 = require("typeorm");
6
+ const swagger_1 = require("@nestjs/swagger");
7
+ let Setting = class Setting {
8
+ };
9
+ exports.Setting = Setting;
10
+ tslib_1.__decorate([
11
+ (0, typeorm_1.PrimaryGeneratedColumn)(),
12
+ (0, swagger_1.ApiProperty)({
13
+ description: 'The unique identifier of the setting',
14
+ example: 1,
15
+ }),
16
+ tslib_1.__metadata("design:type", Number)
17
+ ], Setting.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 parent "object" this settings key belongs to' }),
24
+ tslib_1.__metadata("design:type", String)
25
+ ], Setting.prototype, "parent", void 0);
26
+ tslib_1.__decorate([
27
+ (0, typeorm_1.Column)({
28
+ type: 'text',
29
+ nullable: false,
30
+ }),
31
+ (0, swagger_1.ApiProperty)({ description: 'The key of the setting' }),
32
+ tslib_1.__metadata("design:type", String)
33
+ ], Setting.prototype, "key", void 0);
34
+ tslib_1.__decorate([
35
+ (0, typeorm_1.Column)({
36
+ type: 'text',
37
+ nullable: false,
38
+ }),
39
+ (0, swagger_1.ApiProperty)({ description: 'The value of the setting' }),
40
+ tslib_1.__metadata("design:type", String)
41
+ ], Setting.prototype, "value", void 0);
42
+ tslib_1.__decorate([
43
+ (0, typeorm_1.CreateDateColumn)(),
44
+ (0, swagger_1.ApiProperty)({ description: 'The date and time the setting was created' }),
45
+ tslib_1.__metadata("design:type", Date)
46
+ ], Setting.prototype, "createdAt", void 0);
47
+ tslib_1.__decorate([
48
+ (0, typeorm_1.UpdateDateColumn)(),
49
+ (0, swagger_1.ApiProperty)({ description: 'The date and time the setting was last updated' }),
50
+ tslib_1.__metadata("design:type", Date)
51
+ ], Setting.prototype, "updatedAt", void 0);
52
+ exports.Setting = Setting = tslib_1.__decorate([
53
+ (0, typeorm_1.Entity)(),
54
+ (0, typeorm_1.Unique)('settings_identifier', ['parent', 'key'])
55
+ ], Setting);
56
+ //# sourceMappingURL=setting.entity.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"setting.entity.js","sourceRoot":"","sources":["../../../../../../libs/database-entities/src/lib/entities/setting.entity.ts"],"names":[],"mappings":";;;;AAAA,qCAA6G;AAC7G,6CAA8C;AAIvC,IAAM,OAAO,GAAb,MAAM,OAAO;CAoCnB,CAAA;AApCY,0BAAO;AAMlB;IALC,IAAA,gCAAsB,GAAE;IACxB,IAAA,qBAAW,EAAC;QACX,WAAW,EAAE,sCAAsC;QACnD,OAAO,EAAE,CAAC;KACX,CAAC;;mCACU;AAOZ;IALC,IAAA,gBAAM,EAAC;QACN,IAAI,EAAE,MAAM;QACZ,QAAQ,EAAE,KAAK;KAChB,CAAC;IACD,IAAA,qBAAW,EAAC,EAAE,WAAW,EAAE,kDAAkD,EAAE,CAAC;;uCAC1D;AAOvB;IALC,IAAA,gBAAM,EAAC;QACN,IAAI,EAAE,MAAM;QACZ,QAAQ,EAAE,KAAK;KAChB,CAAC;IACD,IAAA,qBAAW,EAAC,EAAE,WAAW,EAAE,wBAAwB,EAAE,CAAC;;oCAC1C;AAOb;IALC,IAAA,gBAAM,EAAC;QACN,IAAI,EAAE,MAAM;QACZ,QAAQ,EAAE,KAAK;KAChB,CAAC;IACD,IAAA,qBAAW,EAAC,EAAE,WAAW,EAAE,0BAA0B,EAAE,CAAC;;sCAC1C;AAIf;IAFC,IAAA,0BAAgB,GAAE;IAClB,IAAA,qBAAW,EAAC,EAAE,WAAW,EAAE,2CAA2C,EAAE,CAAC;sCAC9D,IAAI;0CAAC;AAIjB;IAFC,IAAA,0BAAgB,GAAE;IAClB,IAAA,qBAAW,EAAC,EAAE,WAAW,EAAE,gDAAgD,EAAE,CAAC;sCACnE,IAAI;0CAAC;kBAnCN,OAAO;IAFnB,IAAA,gBAAM,GAAE;IACR,IAAA,gBAAM,EAAC,qBAAqB,EAAE,CAAC,QAAQ,EAAE,KAAK,CAAC,CAAC;GACpC,OAAO,CAoCnB"}
@@ -8,6 +8,9 @@ export declare class SSOProviderOIDCConfiguration {
8
8
  userInfoURL: string;
9
9
  clientId: string;
10
10
  clientSecret: string;
11
+ scopes: string[] | null;
12
+ usernameClaimPaths: string[] | null;
13
+ emailClaimPaths: string[] | null;
11
14
  createdAt: Date;
12
15
  updatedAt: Date;
13
16
  ssoProvider: SSOProvider;