@attraccess/database-entities 1.10.0 → 1.11.0-beta.1

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 (130) hide show
  1. package/package.json +7 -2
  2. package/src/index.d.ts +1 -0
  3. package/src/lib/entities/attractap-credential-event.entity.d.ts +14 -0
  4. package/src/lib/entities/attractap-credential-event.entity.js +58 -0
  5. package/src/lib/entities/attractap-credential-event.entity.js.map +1 -0
  6. package/src/lib/entities/attractap-installation.entity.d.ts +12 -0
  7. package/src/lib/entities/attractap-installation.entity.js +45 -0
  8. package/src/lib/entities/attractap-installation.entity.js.map +1 -0
  9. package/src/lib/entities/attractap-secure-boot-key.entity.d.ts +21 -0
  10. package/src/lib/entities/attractap-secure-boot-key.entity.js +53 -0
  11. package/src/lib/entities/attractap-secure-boot-key.entity.js.map +1 -0
  12. package/src/lib/entities/attractap.entity.d.ts +12 -0
  13. package/src/lib/entities/attractap.entity.js +88 -0
  14. package/src/lib/entities/attractap.entity.js.map +1 -1
  15. package/src/lib/entities/attractapCrashReport.entity.d.ts +5 -0
  16. package/src/lib/entities/attractapCrashReport.entity.js +26 -1
  17. package/src/lib/entities/attractapCrashReport.entity.js.map +1 -1
  18. package/src/lib/entities/audit-log.entity.d.ts +4 -1
  19. package/src/lib/entities/audit-log.entity.js +3 -1
  20. package/src/lib/entities/audit-log.entity.js.map +1 -1
  21. package/src/lib/entities/billing-transaction-item.entity.d.ts +23 -0
  22. package/src/lib/entities/billing-transaction-item.entity.js +24 -0
  23. package/src/lib/entities/billing-transaction-item.entity.js.map +1 -1
  24. package/src/lib/entities/billing-transaction.entity.d.ts +2 -0
  25. package/src/lib/entities/billing-transaction.entity.js +13 -0
  26. package/src/lib/entities/billing-transaction.entity.js.map +1 -1
  27. package/src/lib/entities/csv-export-template.entity.d.ts +23 -0
  28. package/src/lib/entities/csv-export-template.entity.js +110 -0
  29. package/src/lib/entities/csv-export-template.entity.js.map +1 -0
  30. package/src/lib/entities/dashboard-pin.entity.d.ts +15 -0
  31. package/src/lib/entities/dashboard-pin.entity.js +45 -0
  32. package/src/lib/entities/dashboard-pin.entity.js.map +1 -0
  33. package/src/lib/entities/flow.entity.d.ts +19 -0
  34. package/src/lib/entities/flow.entity.js +62 -0
  35. package/src/lib/entities/flow.entity.js.map +1 -0
  36. package/src/lib/entities/mcp-oauth-client.entity.d.ts +8 -0
  37. package/src/lib/entities/mcp-oauth-client.entity.js +33 -0
  38. package/src/lib/entities/mcp-oauth-client.entity.js.map +1 -0
  39. package/src/lib/entities/mcp-oauth-grant.entity.d.ts +20 -0
  40. package/src/lib/entities/mcp-oauth-grant.entity.js +58 -0
  41. package/src/lib/entities/mcp-oauth-grant.entity.js.map +1 -0
  42. package/src/lib/entities/mcp-oauth-token.entity.d.ts +18 -0
  43. package/src/lib/entities/mcp-oauth-token.entity.js +51 -0
  44. package/src/lib/entities/mcp-oauth-token.entity.js.map +1 -0
  45. package/src/lib/entities/nfcCardPendingChange.entity.d.ts +20 -0
  46. package/src/lib/entities/nfcCardPendingChange.entity.js +55 -0
  47. package/src/lib/entities/nfcCardPendingChange.entity.js.map +1 -0
  48. package/src/lib/entities/plugin-ble-endpoint.entity.d.ts +19 -0
  49. package/src/lib/entities/plugin-ble-endpoint.entity.js +63 -0
  50. package/src/lib/entities/plugin-ble-endpoint.entity.js.map +1 -0
  51. package/src/lib/entities/reader-ui-settings.entity.d.ts +32 -0
  52. package/src/lib/entities/reader-ui-settings.entity.js +101 -0
  53. package/src/lib/entities/reader-ui-settings.entity.js.map +1 -0
  54. package/src/lib/entities/resource-flow-node/companion-schemas.d.ts +15 -0
  55. package/src/lib/entities/resource-flow-node/companion-schemas.js +27 -0
  56. package/src/lib/entities/resource-flow-node/companion-schemas.js.map +1 -0
  57. package/src/lib/entities/resource-flow-node/external-effect-policy.d.ts +19 -0
  58. package/src/lib/entities/resource-flow-node/external-effect-policy.js +24 -0
  59. package/src/lib/entities/resource-flow-node/external-effect-policy.js.map +1 -0
  60. package/src/lib/entities/resource-flow-node/health-schemas.d.ts +18 -0
  61. package/src/lib/entities/resource-flow-node/health-schemas.js +34 -0
  62. package/src/lib/entities/resource-flow-node/health-schemas.js.map +1 -0
  63. package/src/lib/entities/resource-flow-node/http-schema.d.ts +25 -0
  64. package/src/lib/entities/resource-flow-node/http-schema.js +20 -0
  65. package/src/lib/entities/resource-flow-node/http-schema.js.map +1 -0
  66. package/src/lib/entities/resource-flow-node/metering-schemas.d.ts +28 -0
  67. package/src/lib/entities/resource-flow-node/metering-schemas.js +48 -0
  68. package/src/lib/entities/resource-flow-node/metering-schemas.js.map +1 -0
  69. package/src/lib/entities/resource-flow-node/mqtt-schemas.d.ts +33 -0
  70. package/src/lib/entities/resource-flow-node/mqtt-schemas.js +43 -0
  71. package/src/lib/entities/resource-flow-node/mqtt-schemas.js.map +1 -0
  72. package/src/lib/entities/resource-flow-node/node-type.d.ts +43 -0
  73. package/src/lib/entities/resource-flow-node/node-type.js +48 -0
  74. package/src/lib/entities/resource-flow-node/node-type.js.map +1 -0
  75. package/src/lib/entities/resource-flow-node/processing-schemas.d.ts +35 -0
  76. package/src/lib/entities/resource-flow-node/processing-schemas.js +32 -0
  77. package/src/lib/entities/resource-flow-node/processing-schemas.js.map +1 -0
  78. package/src/lib/entities/resource-flow-node/resource-schemas.d.ts +27 -0
  79. package/src/lib/entities/resource-flow-node/resource-schemas.js +44 -0
  80. package/src/lib/entities/resource-flow-node/resource-schemas.js.map +1 -0
  81. package/src/lib/entities/resource-flow-node/schema-registry.d.ts +180 -0
  82. package/src/lib/entities/resource-flow-node/schema-registry.js +80 -0
  83. package/src/lib/entities/resource-flow-node/schema-registry.js.map +1 -0
  84. package/src/lib/entities/resource-flow-node/variable-schemas.d.ts +38 -0
  85. package/src/lib/entities/resource-flow-node/variable-schemas.js +31 -0
  86. package/src/lib/entities/resource-flow-node/variable-schemas.js.map +1 -0
  87. package/src/lib/entities/resource-meter.entity.d.ts +16 -0
  88. package/src/lib/entities/resource-meter.entity.js +52 -0
  89. package/src/lib/entities/resource-meter.entity.js.map +1 -0
  90. package/src/lib/entities/resource-metering.entity.d.ts +102 -0
  91. package/src/lib/entities/resource-metering.entity.js +271 -0
  92. package/src/lib/entities/resource-metering.entity.js.map +1 -0
  93. package/src/lib/entities/resource-usage-lifecycle-attempt.entity.js +3 -1
  94. package/src/lib/entities/resource-usage-lifecycle-attempt.entity.js.map +1 -1
  95. package/src/lib/entities/resource.entity.d.ts +22 -21
  96. package/src/lib/entities/resource.entity.js +104 -93
  97. package/src/lib/entities/resource.entity.js.map +1 -1
  98. package/src/lib/entities/resourceFlowEdge.d.ts +5 -2
  99. package/src/lib/entities/resourceFlowEdge.js +28 -3
  100. package/src/lib/entities/resourceFlowEdge.js.map +1 -1
  101. package/src/lib/entities/resourceFlowNode.d.ts +18 -377
  102. package/src/lib/entities/resourceFlowNode.js +76 -310
  103. package/src/lib/entities/resourceFlowNode.js.map +1 -1
  104. package/src/lib/entities/resourceIntroduction.entity.js +1 -0
  105. package/src/lib/entities/resourceIntroduction.entity.js.map +1 -1
  106. package/src/lib/entities/resourceUsage.entity.d.ts +15 -9
  107. package/src/lib/entities/resourceUsage.entity.js +59 -50
  108. package/src/lib/entities/resourceUsage.entity.js.map +1 -1
  109. package/src/lib/entities/{nfcCard.entity.js → rfidCard.entity.js} +1 -1
  110. package/src/lib/entities/rfidCard.entity.js.map +1 -0
  111. package/src/lib/entities/session.entity.d.ts +6 -0
  112. package/src/lib/entities/session.entity.js +33 -1
  113. package/src/lib/entities/session.entity.js.map +1 -1
  114. package/src/lib/entities/ssoProvider.oidc.d.ts +7 -0
  115. package/src/lib/entities/ssoProvider.oidc.js +43 -1
  116. package/src/lib/entities/ssoProvider.oidc.js.map +1 -1
  117. package/src/lib/entities/ssoProvider.saml.d.ts +3 -0
  118. package/src/lib/entities/ssoProvider.saml.js +26 -0
  119. package/src/lib/entities/ssoProvider.saml.js.map +1 -1
  120. package/src/lib/entities/user.entity.d.ts +19 -18
  121. package/src/lib/entities/user.entity.js +75 -70
  122. package/src/lib/entities/user.entity.js.map +1 -1
  123. package/src/lib/entities-index.d.ts +156 -52
  124. package/src/lib/entities-index.js +344 -215
  125. package/src/lib/entities-index.js.map +1 -1
  126. package/src/lib/types/sso-session-context.d.ts +32 -0
  127. package/src/lib/types/sso-session-context.js +3 -0
  128. package/src/lib/types/sso-session-context.js.map +1 -0
  129. package/src/lib/entities/nfcCard.entity.js.map +0 -1
  130. /package/src/lib/entities/{nfcCard.entity.d.ts → rfidCard.entity.d.ts} +0 -0
@@ -0,0 +1,52 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.ResourceMeter = void 0;
4
+ const tslib_1 = require("tslib");
5
+ const typeorm_1 = require("typeorm");
6
+ const resource_entity_1 = require("./resource.entity");
7
+ /** A user-defined counter. Values use fixed-point billionths, with no physical unit. */
8
+ let ResourceMeter = class ResourceMeter {
9
+ };
10
+ exports.ResourceMeter = ResourceMeter;
11
+ tslib_1.__decorate([
12
+ (0, typeorm_1.PrimaryGeneratedColumn)(),
13
+ tslib_1.__metadata("design:type", Number)
14
+ ], ResourceMeter.prototype, "id", void 0);
15
+ tslib_1.__decorate([
16
+ (0, typeorm_1.Column)({ type: 'integer' }),
17
+ tslib_1.__metadata("design:type", Number)
18
+ ], ResourceMeter.prototype, "resourceId", void 0);
19
+ tslib_1.__decorate([
20
+ (0, typeorm_1.ManyToOne)(() => resource_entity_1.Resource, { onDelete: 'CASCADE' }),
21
+ (0, typeorm_1.JoinColumn)({ name: 'resourceId' }),
22
+ tslib_1.__metadata("design:type", resource_entity_1.Resource)
23
+ ], ResourceMeter.prototype, "resource", void 0);
24
+ tslib_1.__decorate([
25
+ (0, typeorm_1.Column)({ type: 'varchar' }),
26
+ tslib_1.__metadata("design:type", String)
27
+ ], ResourceMeter.prototype, "name", void 0);
28
+ tslib_1.__decorate([
29
+ (0, typeorm_1.Column)({ type: 'integer', default: 0 }),
30
+ tslib_1.__metadata("design:type", Number)
31
+ ], ResourceMeter.prototype, "creditsPerUnit", void 0);
32
+ tslib_1.__decorate([
33
+ (0, typeorm_1.Column)({ type: 'varchar', default: 'shared' }),
34
+ tslib_1.__metadata("design:type", String)
35
+ ], ResourceMeter.prototype, "allocation", void 0);
36
+ tslib_1.__decorate([
37
+ (0, typeorm_1.Column)({ type: 'varchar', default: '0' }),
38
+ tslib_1.__metadata("design:type", String)
39
+ ], ResourceMeter.prototype, "lifetimeValue", void 0);
40
+ tslib_1.__decorate([
41
+ (0, typeorm_1.Column)({ type: 'varchar', nullable: true }),
42
+ tslib_1.__metadata("design:type", String)
43
+ ], ResourceMeter.prototype, "counterValue", void 0);
44
+ tslib_1.__decorate([
45
+ (0, typeorm_1.Column)({ type: 'datetime', nullable: true }),
46
+ tslib_1.__metadata("design:type", Date)
47
+ ], ResourceMeter.prototype, "latestObservedAt", void 0);
48
+ exports.ResourceMeter = ResourceMeter = tslib_1.__decorate([
49
+ (0, typeorm_1.Entity)(),
50
+ (0, typeorm_1.Index)('IDX_resource_meter_name', ['resourceId', 'name'], { unique: true })
51
+ ], ResourceMeter);
52
+ //# sourceMappingURL=resource-meter.entity.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"resource-meter.entity.js","sourceRoot":"","sources":["../../../../../../libs/database-entities/src/lib/entities/resource-meter.entity.ts"],"names":[],"mappings":";;;;AAAA,qCAA+F;AAC/F,uDAA6C;AAK7C,wFAAwF;AAGjF,IAAM,aAAa,GAAnB,MAAM,aAAa;CA6BzB,CAAA;AA7BY,sCAAa;AAExB;IADC,IAAA,gCAAsB,GAAE;;yCACb;AAGZ;IADC,IAAA,gBAAM,EAAC,EAAE,IAAI,EAAE,SAAS,EAAE,CAAC;;iDACR;AAIpB;IAFC,IAAA,mBAAS,EAAC,GAAG,EAAE,CAAC,0BAAQ,EAAE,EAAE,QAAQ,EAAE,SAAS,EAAE,CAAC;IAClD,IAAA,oBAAU,EAAC,EAAE,IAAI,EAAE,YAAY,EAAE,CAAC;sCACxB,0BAAQ;+CAAC;AAGpB;IADC,IAAA,gBAAM,EAAC,EAAE,IAAI,EAAE,SAAS,EAAE,CAAC;;2CACd;AAGd;IADC,IAAA,gBAAM,EAAC,EAAE,IAAI,EAAE,SAAS,EAAE,OAAO,EAAE,CAAC,EAAE,CAAC;;qDAChB;AAIxB;IADC,IAAA,gBAAM,EAAC,EAAE,IAAI,EAAE,SAAS,EAAE,OAAO,EAAE,QAAQ,EAAE,CAAC;;iDACV;AAGrC;IADC,IAAA,gBAAM,EAAC,EAAE,IAAI,EAAE,SAAS,EAAE,OAAO,EAAE,GAAG,EAAE,CAAC;;oDACnB;AAGvB;IADC,IAAA,gBAAM,EAAC,EAAE,IAAI,EAAE,SAAS,EAAE,QAAQ,EAAE,IAAI,EAAE,CAAC;;mDACf;AAG7B;IADC,IAAA,gBAAM,EAAC,EAAE,IAAI,EAAE,UAAU,EAAE,QAAQ,EAAE,IAAI,EAAE,CAAC;sCAC1B,IAAI;uDAAQ;wBA5BpB,aAAa;IAFzB,IAAA,gBAAM,GAAE;IACR,IAAA,eAAK,EAAC,yBAAyB,EAAE,CAAC,YAAY,EAAE,MAAM,CAAC,EAAE,EAAE,MAAM,EAAE,IAAI,EAAE,CAAC;GAC9D,aAAa,CA6BzB"}
@@ -0,0 +1,102 @@
1
+ import { ResourceMeter } from './resource-meter.entity';
2
+ import { Resource } from './resource.entity';
3
+ import { ResourceUsage } from './resourceUsage.entity';
4
+ export declare enum ResourceMeteringSessionStatus {
5
+ /** Metering is initialized; the usage is running (or being started). */
6
+ Active = "active",
7
+ /** The final total was collected and the meter charge is part of the usage bill. */
8
+ Settled = "settled",
9
+ /** The usage ended but no valid final total is available yet; retryable. */
10
+ Pending = "pending",
11
+ /** The final total can no longer be obtained (or was rejected); needs an operator decision. */
12
+ Failed = "failed",
13
+ /** An operator decided not to charge meter for this usage. */
14
+ Waived = "waived"
15
+ }
16
+ /** `boundary` is a reading at a session start or stop of a shared meter: it closes a time segment without resetting the meter. */
17
+ export type ResourceMeteringOperationKind = 'start' | 'interim' | 'final' | 'boundary';
18
+ export type ResourceMeteringOperationStatus = 'pending' | 'completed' | 'failed' | 'expired';
19
+ /** Logical metering session: one per usage and meter. Meter values are integer billionths stored as text. */
20
+ export declare class ResourceMeteringSession {
21
+ id: string;
22
+ resourceId: number;
23
+ resource: Resource;
24
+ usageId: number;
25
+ usage: ResourceUsage;
26
+ status: ResourceMeteringSessionStatus;
27
+ meterId: number;
28
+ meter: ResourceMeter;
29
+ meterName: string;
30
+ /** Collection strategy captured at start, independent of later flow edits. */
31
+ collectionMode: 'requested' | 'increment';
32
+ /** Rate captured when the session started. */
33
+ creditsPerUnit: number;
34
+ /**
35
+ * `own`: the session accumulates its own total on the meter, because it never overlapped another session.
36
+ * `segmented`: its consumption is the sum of its shares of the meter's shared time segments.
37
+ * `per-session`: a measuring point of its own, read and settled independently of other sessions.
38
+ */
39
+ accounting: 'own' | 'segmented' | 'per-session';
40
+ /** Set when the start branch reported a lifetime-counter reading to subtract from later totals. */
41
+ baselineValue: string | null;
42
+ source: string | null;
43
+ /** Highest accepted total since the reset, used to reject counter decreases. */
44
+ latestValue: string | null;
45
+ latestObservedAt: Date | null;
46
+ consumedValue: string | null;
47
+ chargeCredits: number | null;
48
+ finalOperationId: string | null;
49
+ failureReason: string | null;
50
+ /** Set when the physical meter may have been reset for a different session; the total is unreliable. */
51
+ compromisedReason: string | null;
52
+ settledAt: Date | null;
53
+ createdAt: Date;
54
+ updatedAt: Date;
55
+ }
56
+ /** One request/reply to the flow-defined meter; the audit trail behind a charge. */
57
+ export declare class ResourceMeteringOperation {
58
+ id: string;
59
+ meterId: number;
60
+ meter: ResourceMeter;
61
+ sessionId: string | null;
62
+ session: ResourceMeteringSession;
63
+ resourceId: number;
64
+ kind: ResourceMeteringOperationKind;
65
+ status: ResourceMeteringOperationStatus;
66
+ requestedAt: Date;
67
+ completedAt: Date | null;
68
+ reportedValue: string | null;
69
+ readingMode: 'total' | 'increment' | null;
70
+ /** Total consumed since the session's reset (baseline already subtracted). */
71
+ totalValue: string | null;
72
+ observedAt: Date | null;
73
+ source: string | null;
74
+ error: string | null;
75
+ createdAt: Date;
76
+ }
77
+ export type ResourceMeteringSegmentStatus = 'open' | 'closed' | 'abandoned';
78
+ /** A session taking part in a shared segment, with the rate it captured for the meter. Earliest started first. */
79
+ export interface ResourceMeteringSegmentParticipant {
80
+ usageId: number;
81
+ creditsPerUnit: number;
82
+ }
83
+ /**
84
+ * A time span of a shared meter in which the same sessions were active. Its consumption is the difference between
85
+ * the readings at its two boundaries and is split equally among the participants. A segment whose closing reading
86
+ * failed stays open and absorbs the next one, so its participants are everyone who was active at any point in it.
87
+ */
88
+ export declare class ResourceMeteringSegment {
89
+ id: string;
90
+ resourceId: number;
91
+ resource: Resource;
92
+ meterId: number;
93
+ meter: ResourceMeter;
94
+ status: ResourceMeteringSegmentStatus;
95
+ startedAt: Date;
96
+ endedAt: Date | null;
97
+ /** Meter counter at the opening boundary. Fixed-point billionths as text. */
98
+ startValue: string;
99
+ endValue: string | null;
100
+ participants: ResourceMeteringSegmentParticipant[];
101
+ createdAt: Date;
102
+ }
@@ -0,0 +1,271 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.ResourceMeteringSegment = exports.ResourceMeteringOperation = exports.ResourceMeteringSession = exports.ResourceMeteringSessionStatus = void 0;
4
+ const tslib_1 = require("tslib");
5
+ const typeorm_1 = require("typeorm");
6
+ const resource_meter_entity_1 = require("./resource-meter.entity");
7
+ const resource_entity_1 = require("./resource.entity");
8
+ const resourceUsage_entity_1 = require("./resourceUsage.entity");
9
+ var ResourceMeteringSessionStatus;
10
+ (function (ResourceMeteringSessionStatus) {
11
+ /** Metering is initialized; the usage is running (or being started). */
12
+ ResourceMeteringSessionStatus["Active"] = "active";
13
+ /** The final total was collected and the meter charge is part of the usage bill. */
14
+ ResourceMeteringSessionStatus["Settled"] = "settled";
15
+ /** The usage ended but no valid final total is available yet; retryable. */
16
+ ResourceMeteringSessionStatus["Pending"] = "pending";
17
+ /** The final total can no longer be obtained (or was rejected); needs an operator decision. */
18
+ ResourceMeteringSessionStatus["Failed"] = "failed";
19
+ /** An operator decided not to charge meter for this usage. */
20
+ ResourceMeteringSessionStatus["Waived"] = "waived";
21
+ })(ResourceMeteringSessionStatus || (exports.ResourceMeteringSessionStatus = ResourceMeteringSessionStatus = {}));
22
+ /** Logical metering session: one per usage and meter. Meter values are integer billionths stored as text. */
23
+ let ResourceMeteringSession = class ResourceMeteringSession {
24
+ };
25
+ exports.ResourceMeteringSession = ResourceMeteringSession;
26
+ tslib_1.__decorate([
27
+ (0, typeorm_1.PrimaryColumn)({ type: 'varchar' }),
28
+ tslib_1.__metadata("design:type", String)
29
+ ], ResourceMeteringSession.prototype, "id", void 0);
30
+ tslib_1.__decorate([
31
+ (0, typeorm_1.Column)({ type: 'integer' }),
32
+ tslib_1.__metadata("design:type", Number)
33
+ ], ResourceMeteringSession.prototype, "resourceId", void 0);
34
+ tslib_1.__decorate([
35
+ (0, typeorm_1.ManyToOne)(() => resource_entity_1.Resource, { onDelete: 'CASCADE' }),
36
+ (0, typeorm_1.JoinColumn)({ name: 'resourceId' }),
37
+ tslib_1.__metadata("design:type", resource_entity_1.Resource)
38
+ ], ResourceMeteringSession.prototype, "resource", void 0);
39
+ tslib_1.__decorate([
40
+ (0, typeorm_1.Column)({ type: 'integer' }),
41
+ tslib_1.__metadata("design:type", Number)
42
+ ], ResourceMeteringSession.prototype, "usageId", void 0);
43
+ tslib_1.__decorate([
44
+ (0, typeorm_1.ManyToOne)(() => resourceUsage_entity_1.ResourceUsage, { onDelete: 'CASCADE' }),
45
+ (0, typeorm_1.JoinColumn)({ name: 'usageId' }),
46
+ tslib_1.__metadata("design:type", resourceUsage_entity_1.ResourceUsage)
47
+ ], ResourceMeteringSession.prototype, "usage", void 0);
48
+ tslib_1.__decorate([
49
+ (0, typeorm_1.Column)({ type: 'varchar' }),
50
+ tslib_1.__metadata("design:type", String)
51
+ ], ResourceMeteringSession.prototype, "status", void 0);
52
+ tslib_1.__decorate([
53
+ (0, typeorm_1.Column)({ type: 'integer' }),
54
+ tslib_1.__metadata("design:type", Number)
55
+ ], ResourceMeteringSession.prototype, "meterId", void 0);
56
+ tslib_1.__decorate([
57
+ (0, typeorm_1.ManyToOne)(() => resource_meter_entity_1.ResourceMeter, { onDelete: 'CASCADE' }),
58
+ (0, typeorm_1.JoinColumn)({ name: 'meterId' }),
59
+ tslib_1.__metadata("design:type", resource_meter_entity_1.ResourceMeter)
60
+ ], ResourceMeteringSession.prototype, "meter", void 0);
61
+ tslib_1.__decorate([
62
+ (0, typeorm_1.Column)({ type: 'varchar' }),
63
+ tslib_1.__metadata("design:type", String)
64
+ ], ResourceMeteringSession.prototype, "meterName", void 0);
65
+ tslib_1.__decorate([
66
+ (0, typeorm_1.Column)({ type: 'varchar', default: 'requested' }),
67
+ tslib_1.__metadata("design:type", String)
68
+ ], ResourceMeteringSession.prototype, "collectionMode", void 0);
69
+ tslib_1.__decorate([
70
+ (0, typeorm_1.Column)({ type: 'integer' }),
71
+ tslib_1.__metadata("design:type", Number)
72
+ ], ResourceMeteringSession.prototype, "creditsPerUnit", void 0);
73
+ tslib_1.__decorate([
74
+ (0, typeorm_1.Column)({ type: 'varchar', default: 'own' }),
75
+ tslib_1.__metadata("design:type", String)
76
+ ], ResourceMeteringSession.prototype, "accounting", void 0);
77
+ tslib_1.__decorate([
78
+ (0, typeorm_1.Column)({ type: 'varchar', nullable: true }),
79
+ tslib_1.__metadata("design:type", String)
80
+ ], ResourceMeteringSession.prototype, "baselineValue", void 0);
81
+ tslib_1.__decorate([
82
+ (0, typeorm_1.Column)({ type: 'varchar', nullable: true }),
83
+ tslib_1.__metadata("design:type", String)
84
+ ], ResourceMeteringSession.prototype, "source", void 0);
85
+ tslib_1.__decorate([
86
+ (0, typeorm_1.Column)({ type: 'varchar', nullable: true }),
87
+ tslib_1.__metadata("design:type", String)
88
+ ], ResourceMeteringSession.prototype, "latestValue", void 0);
89
+ tslib_1.__decorate([
90
+ (0, typeorm_1.Column)({ type: 'datetime', nullable: true }),
91
+ tslib_1.__metadata("design:type", Date)
92
+ ], ResourceMeteringSession.prototype, "latestObservedAt", void 0);
93
+ tslib_1.__decorate([
94
+ (0, typeorm_1.Column)({ type: 'varchar', nullable: true }),
95
+ tslib_1.__metadata("design:type", String)
96
+ ], ResourceMeteringSession.prototype, "consumedValue", void 0);
97
+ tslib_1.__decorate([
98
+ (0, typeorm_1.Column)({ type: 'integer', nullable: true }),
99
+ tslib_1.__metadata("design:type", Number)
100
+ ], ResourceMeteringSession.prototype, "chargeCredits", void 0);
101
+ tslib_1.__decorate([
102
+ (0, typeorm_1.Column)({ type: 'varchar', nullable: true }),
103
+ tslib_1.__metadata("design:type", String)
104
+ ], ResourceMeteringSession.prototype, "finalOperationId", void 0);
105
+ tslib_1.__decorate([
106
+ (0, typeorm_1.Column)({ type: 'text', nullable: true }),
107
+ tslib_1.__metadata("design:type", String)
108
+ ], ResourceMeteringSession.prototype, "failureReason", void 0);
109
+ tslib_1.__decorate([
110
+ (0, typeorm_1.Column)({ type: 'text', nullable: true }),
111
+ tslib_1.__metadata("design:type", String)
112
+ ], ResourceMeteringSession.prototype, "compromisedReason", void 0);
113
+ tslib_1.__decorate([
114
+ (0, typeorm_1.Column)({ type: 'datetime', nullable: true }),
115
+ tslib_1.__metadata("design:type", Date)
116
+ ], ResourceMeteringSession.prototype, "settledAt", void 0);
117
+ tslib_1.__decorate([
118
+ (0, typeorm_1.CreateDateColumn)(),
119
+ tslib_1.__metadata("design:type", Date)
120
+ ], ResourceMeteringSession.prototype, "createdAt", void 0);
121
+ tslib_1.__decorate([
122
+ (0, typeorm_1.UpdateDateColumn)(),
123
+ tslib_1.__metadata("design:type", Date)
124
+ ], ResourceMeteringSession.prototype, "updatedAt", void 0);
125
+ exports.ResourceMeteringSession = ResourceMeteringSession = tslib_1.__decorate([
126
+ (0, typeorm_1.Entity)(),
127
+ (0, typeorm_1.Index)('IDX_resource_metering_session_usage', ['usageId', 'meterId'], { unique: true }),
128
+ (0, typeorm_1.Index)('IDX_resource_metering_session_resource', ['resourceId'])
129
+ ], ResourceMeteringSession);
130
+ /** One request/reply to the flow-defined meter; the audit trail behind a charge. */
131
+ let ResourceMeteringOperation = class ResourceMeteringOperation {
132
+ };
133
+ exports.ResourceMeteringOperation = ResourceMeteringOperation;
134
+ tslib_1.__decorate([
135
+ (0, typeorm_1.PrimaryColumn)({ type: 'varchar' }),
136
+ tslib_1.__metadata("design:type", String)
137
+ ], ResourceMeteringOperation.prototype, "id", void 0);
138
+ tslib_1.__decorate([
139
+ (0, typeorm_1.Column)({ type: 'integer' }),
140
+ tslib_1.__metadata("design:type", Number)
141
+ ], ResourceMeteringOperation.prototype, "meterId", void 0);
142
+ tslib_1.__decorate([
143
+ (0, typeorm_1.ManyToOne)(() => resource_meter_entity_1.ResourceMeter, { onDelete: 'CASCADE' }),
144
+ (0, typeorm_1.JoinColumn)({ name: 'meterId' }),
145
+ tslib_1.__metadata("design:type", resource_meter_entity_1.ResourceMeter)
146
+ ], ResourceMeteringOperation.prototype, "meter", void 0);
147
+ tslib_1.__decorate([
148
+ (0, typeorm_1.Column)({ type: 'varchar', nullable: true }),
149
+ tslib_1.__metadata("design:type", String)
150
+ ], ResourceMeteringOperation.prototype, "sessionId", void 0);
151
+ tslib_1.__decorate([
152
+ (0, typeorm_1.ManyToOne)(() => ResourceMeteringSession, { onDelete: 'CASCADE' }),
153
+ (0, typeorm_1.JoinColumn)({ name: 'sessionId' }),
154
+ tslib_1.__metadata("design:type", ResourceMeteringSession)
155
+ ], ResourceMeteringOperation.prototype, "session", void 0);
156
+ tslib_1.__decorate([
157
+ (0, typeorm_1.Column)({ type: 'integer' }),
158
+ tslib_1.__metadata("design:type", Number)
159
+ ], ResourceMeteringOperation.prototype, "resourceId", void 0);
160
+ tslib_1.__decorate([
161
+ (0, typeorm_1.Column)({ type: 'varchar' }),
162
+ tslib_1.__metadata("design:type", String)
163
+ ], ResourceMeteringOperation.prototype, "kind", void 0);
164
+ tslib_1.__decorate([
165
+ (0, typeorm_1.Column)({ type: 'varchar' }),
166
+ tslib_1.__metadata("design:type", String)
167
+ ], ResourceMeteringOperation.prototype, "status", void 0);
168
+ tslib_1.__decorate([
169
+ (0, typeorm_1.Column)({ type: 'datetime' }),
170
+ tslib_1.__metadata("design:type", Date)
171
+ ], ResourceMeteringOperation.prototype, "requestedAt", void 0);
172
+ tslib_1.__decorate([
173
+ (0, typeorm_1.Column)({ type: 'datetime', nullable: true }),
174
+ tslib_1.__metadata("design:type", Date)
175
+ ], ResourceMeteringOperation.prototype, "completedAt", void 0);
176
+ tslib_1.__decorate([
177
+ (0, typeorm_1.Column)({ type: 'varchar', nullable: true }),
178
+ tslib_1.__metadata("design:type", String)
179
+ ], ResourceMeteringOperation.prototype, "reportedValue", void 0);
180
+ tslib_1.__decorate([
181
+ (0, typeorm_1.Column)({ type: 'varchar', nullable: true }),
182
+ tslib_1.__metadata("design:type", String)
183
+ ], ResourceMeteringOperation.prototype, "readingMode", void 0);
184
+ tslib_1.__decorate([
185
+ (0, typeorm_1.Column)({ type: 'varchar', nullable: true }),
186
+ tslib_1.__metadata("design:type", String)
187
+ ], ResourceMeteringOperation.prototype, "totalValue", void 0);
188
+ tslib_1.__decorate([
189
+ (0, typeorm_1.Column)({ type: 'datetime', nullable: true }),
190
+ tslib_1.__metadata("design:type", Date)
191
+ ], ResourceMeteringOperation.prototype, "observedAt", void 0);
192
+ tslib_1.__decorate([
193
+ (0, typeorm_1.Column)({ type: 'varchar', nullable: true }),
194
+ tslib_1.__metadata("design:type", String)
195
+ ], ResourceMeteringOperation.prototype, "source", void 0);
196
+ tslib_1.__decorate([
197
+ (0, typeorm_1.Column)({ type: 'text', nullable: true }),
198
+ tslib_1.__metadata("design:type", String)
199
+ ], ResourceMeteringOperation.prototype, "error", void 0);
200
+ tslib_1.__decorate([
201
+ (0, typeorm_1.CreateDateColumn)(),
202
+ tslib_1.__metadata("design:type", Date)
203
+ ], ResourceMeteringOperation.prototype, "createdAt", void 0);
204
+ exports.ResourceMeteringOperation = ResourceMeteringOperation = tslib_1.__decorate([
205
+ (0, typeorm_1.Entity)(),
206
+ (0, typeorm_1.Index)('IDX_resource_metering_operation_session', ['sessionId'])
207
+ ], ResourceMeteringOperation);
208
+ /**
209
+ * A time span of a shared meter in which the same sessions were active. Its consumption is the difference between
210
+ * the readings at its two boundaries and is split equally among the participants. A segment whose closing reading
211
+ * failed stays open and absorbs the next one, so its participants are everyone who was active at any point in it.
212
+ */
213
+ let ResourceMeteringSegment = class ResourceMeteringSegment {
214
+ };
215
+ exports.ResourceMeteringSegment = ResourceMeteringSegment;
216
+ tslib_1.__decorate([
217
+ (0, typeorm_1.PrimaryColumn)({ type: 'varchar' }),
218
+ tslib_1.__metadata("design:type", String)
219
+ ], ResourceMeteringSegment.prototype, "id", void 0);
220
+ tslib_1.__decorate([
221
+ (0, typeorm_1.Column)({ type: 'integer' }),
222
+ tslib_1.__metadata("design:type", Number)
223
+ ], ResourceMeteringSegment.prototype, "resourceId", void 0);
224
+ tslib_1.__decorate([
225
+ (0, typeorm_1.ManyToOne)(() => resource_entity_1.Resource, { onDelete: 'CASCADE' }),
226
+ (0, typeorm_1.JoinColumn)({ name: 'resourceId' }),
227
+ tslib_1.__metadata("design:type", resource_entity_1.Resource)
228
+ ], ResourceMeteringSegment.prototype, "resource", void 0);
229
+ tslib_1.__decorate([
230
+ (0, typeorm_1.Column)({ type: 'integer' }),
231
+ tslib_1.__metadata("design:type", Number)
232
+ ], ResourceMeteringSegment.prototype, "meterId", void 0);
233
+ tslib_1.__decorate([
234
+ (0, typeorm_1.ManyToOne)(() => resource_meter_entity_1.ResourceMeter, { onDelete: 'CASCADE' }),
235
+ (0, typeorm_1.JoinColumn)({ name: 'meterId' }),
236
+ tslib_1.__metadata("design:type", resource_meter_entity_1.ResourceMeter)
237
+ ], ResourceMeteringSegment.prototype, "meter", void 0);
238
+ tslib_1.__decorate([
239
+ (0, typeorm_1.Column)({ type: 'varchar' }),
240
+ tslib_1.__metadata("design:type", String)
241
+ ], ResourceMeteringSegment.prototype, "status", void 0);
242
+ tslib_1.__decorate([
243
+ (0, typeorm_1.Column)({ type: 'datetime' }),
244
+ tslib_1.__metadata("design:type", Date)
245
+ ], ResourceMeteringSegment.prototype, "startedAt", void 0);
246
+ tslib_1.__decorate([
247
+ (0, typeorm_1.Column)({ type: 'datetime', nullable: true }),
248
+ tslib_1.__metadata("design:type", Date)
249
+ ], ResourceMeteringSegment.prototype, "endedAt", void 0);
250
+ tslib_1.__decorate([
251
+ (0, typeorm_1.Column)({ type: 'varchar' }),
252
+ tslib_1.__metadata("design:type", String)
253
+ ], ResourceMeteringSegment.prototype, "startValue", void 0);
254
+ tslib_1.__decorate([
255
+ (0, typeorm_1.Column)({ type: 'varchar', nullable: true }),
256
+ tslib_1.__metadata("design:type", String)
257
+ ], ResourceMeteringSegment.prototype, "endValue", void 0);
258
+ tslib_1.__decorate([
259
+ (0, typeorm_1.Column)({ type: 'simple-json' }),
260
+ tslib_1.__metadata("design:type", Array)
261
+ ], ResourceMeteringSegment.prototype, "participants", void 0);
262
+ tslib_1.__decorate([
263
+ (0, typeorm_1.CreateDateColumn)(),
264
+ tslib_1.__metadata("design:type", Date)
265
+ ], ResourceMeteringSegment.prototype, "createdAt", void 0);
266
+ exports.ResourceMeteringSegment = ResourceMeteringSegment = tslib_1.__decorate([
267
+ (0, typeorm_1.Entity)(),
268
+ (0, typeorm_1.Index)('IDX_resource_metering_segment_meter', ['meterId', 'status']),
269
+ (0, typeorm_1.Index)('IDX_resource_metering_segment_meter_ended', ['meterId', 'endedAt'])
270
+ ], ResourceMeteringSegment);
271
+ //# sourceMappingURL=resource-metering.entity.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"resource-metering.entity.js","sourceRoot":"","sources":["../../../../../../libs/database-entities/src/lib/entities/resource-metering.entity.ts"],"names":[],"mappings":";;;;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AI,EAAE,aAAa,EAAE,CAAC;;6DACoB;AAGpD;IADC,IAAA,0BAAgB,GAAE;sCACP,IAAI;0DAAC;kCAtCN,uBAAuB;IAHnC,IAAA,gBAAM,GAAE;IACR,IAAA,eAAK,EAAC,qCAAqC,EAAE,CAAC,SAAS,EAAE,QAAQ,CAAC,CAAC;IACnE,IAAA,eAAK,EAAC,2CAA2C,EAAE,CAAC,SAAS,EAAE,SAAS,CAAC,CAAC;GAC9D,uBAAuB,CAuCnC"}
@@ -51,6 +51,8 @@ tslib_1.__decorate([
51
51
  ], ResourceUsageLifecycleAttempt.prototype, "createdAt", void 0);
52
52
  exports.ResourceUsageLifecycleAttempt = ResourceUsageLifecycleAttempt = tslib_1.__decorate([
53
53
  (0, typeorm_1.Entity)(),
54
- (0, typeorm_1.Index)('IDX_resource_usage_lifecycle_attempt_resource', ['resourceId'], { unique: true })
54
+ (0, typeorm_1.Index)('IDX_resource_usage_lifecycle_attempt_resource', ['resourceId']),
55
+ (0, typeorm_1.Index)('IDX_resource_usage_lifecycle_attempt_candidate', ['candidateUsageId'], { unique: true }),
56
+ (0, typeorm_1.Index)('IDX_resource_usage_lifecycle_attempt_previous', ['previousUsageId'], { unique: true })
55
57
  ], ResourceUsageLifecycleAttempt);
56
58
  //# sourceMappingURL=resource-usage-lifecycle-attempt.entity.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"resource-usage-lifecycle-attempt.entity.js","sourceRoot":"","sources":["../../../../../../libs/database-entities/src/lib/entities/resource-usage-lifecycle-attempt.entity.ts"],"names":[],"mappings":";;;;AAAA,qCAAwG;AACxG,uDAA6C;AAS7C,sGAAsG;AAG/F,IAAM,6BAA6B,GAAnC,MAAM,6BAA6B;CA+BzC,CAAA;AA/BY,sEAA6B;AAExC;IADC,IAAA,uBAAa,EAAC,EAAE,IAAI,EAAE,SAAS,EAAE,CAAC;;yDACvB;AAGZ;IADC,IAAA,gBAAM,EAAC,EAAE,IAAI,EAAE,SAAS,EAAE,CAAC;;iEACR;AAIpB;IAFC,IAAA,mBAAS,EAAC,GAAG,EAAE,CAAC,0BAAQ,EAAE,EAAE,QAAQ,EAAE,SAAS,EAAE,CAAC;IAClD,IAAA,oBAAU,EAAC,EAAE,IAAI,EAAE,YAAY,EAAE,CAAC;sCACxB,0BAAQ;+DAAC;AAGpB;IADC,IAAA,gBAAM,EAAC,EAAE,IAAI,EAAE,SAAS,EAAE,CAAC;;2DACQ;AAGpC;IADC,IAAA,gBAAM,EAAC,EAAE,IAAI,EAAE,SAAS,EAAE,QAAQ,EAAE,IAAI,EAAE,CAAC;;uEACX;AAGjC;IADC,IAAA,gBAAM,EAAC,EAAE,IAAI,EAAE,SAAS,EAAE,QAAQ,EAAE,IAAI,EAAE,CAAC;;sEACZ;AAGhC;IADC,IAAA,gBAAM,EAAC,EAAE,IAAI,EAAE,UAAU,EAAE,CAAC;sCACZ,IAAI;qEAAC;AAGtB;IADC,IAAA,gBAAM,EAAC,EAAE,IAAI,EAAE,aAAa,EAAE,CAAC;;sEACG;AAGnC;IADC,IAAA,gBAAM,EAAC,EAAE,IAAI,EAAE,aAAa,EAAE,CAAC;;mEACM;AAGtC;IADC,IAAA,0BAAgB,GAAE;sCACP,IAAI;gEAAC;wCA9BN,6BAA6B;IAFzC,IAAA,gBAAM,GAAE;IACR,IAAA,eAAK,EAAC,+CAA+C,EAAE,CAAC,YAAY,CAAC,EAAE,EAAE,MAAM,EAAE,IAAI,EAAE,CAAC;GAC5E,6BAA6B,CA+BzC"}
1
+ {"version":3,"file":"resource-usage-lifecycle-attempt.entity.js","sourceRoot":"","sources":["../../../../../../libs/database-entities/src/lib/entities/resource-usage-lifecycle-attempt.entity.ts"],"names":[],"mappings":";;;;AAAA,qCAAwG;AACxG,uDAA6C;AAS7C,sGAAsG;AAK/F,IAAM,6BAA6B,GAAnC,MAAM,6BAA6B;CA+BzC,CAAA;AA/BY,sEAA6B;AAExC;IADC,IAAA,uBAAa,EAAC,EAAE,IAAI,EAAE,SAAS,EAAE,CAA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ResourceUsage } from './resourceUsage.entity';
3
- import { ResourceIntroducer } from './resourceIntroducer.entity';
4
- import { ResourceGroup } from './resourceGroup.entity';
5
1
  import { DocumentationType } from '../types/documentationType.enum';
6
- import { ResourceFlowNode } from './resourceFlowNode';
7
- import { ResourceFlowEdge } from './resourceFlowEdge';
8
- import { ResourceFlowVariable } from './resourceFlowVariable';
9
2
  import { Attractap } from './attractap.entity';
10
- import { ResourceMaintenance } from './resource.maintenance';
11
- import { ResourceMaintenanceSchedule } from './resource-maintenance-schedule.entity';
12
- import { ResourceType } from './resource.type';
13
- import { SupervisionMode, AutoIntroductionTarget } from './resource.supervision';
14
- import { ResourceBillingConfiguration } from './resource-billing-configuration.entity';
15
3
  import { Form } from './form';
4
+ import { ResourceBillingConfiguration } from './resource-billing-configuration.entity';
5
+ import { ResourceMaintenanceSchedule } from './resource-maintenance-schedule.entity';
16
6
  import { ResourceOperatingInterval } from './resource-operating-interval.entity';
7
+ import { ResourceMaintenance } from './resource.maintenance';
8
+ import { ResourceType } from './resource.type';
9
+ import { ResourceFlowEdge } from './resourceFlowEdge';
10
+ import { ResourceFlowNode } from './resourceFlowNode';
11
+ import { ResourceFlowVariable } from './resourceFlowVariable';
12
+ import { ResourceGroup } from './resourceGroup.entity';
13
+ import { ResourceIntroducer } from './resourceIntroducer.entity';
14
+ import { ResourceIntroduction } from './resourceIntroduction.entity';
15
+ import { ResourceUsage } from './resourceUsage.entity';
16
+ import { AutoIntroductionTarget, SupervisionMode } from './resource.supervision';
17
17
  export declare class Resource {
18
- id: number;
19
- name: string;
20
- type: ResourceType;
21
- separateUnlockAndUnlatch: boolean | null;
22
- description: string | null;
23
- imageFilename: string | null;
24
- documentationType: DocumentationType | null;
25
- documentationMarkdown: string | null;
26
- documentationUrl: string | null;
27
18
  allowTakeOver: boolean;
19
+ maxParallelSessions: number;
28
20
  retrainingMaxAgeDays: number | null;
29
21
  retrainingMaxInactivityDays: number | null;
30
22
  retrainingBlocksAccess: boolean;
@@ -33,6 +25,15 @@ export declare class Resource {
33
25
  autoIntroductionTarget: AutoIntroductionTarget | null;
34
26
  autoIntroductionGroupId: number | null;
35
27
  autoIntroductionGroup: ResourceGroup | null;
28
+ id: number;
29
+ name: string;
30
+ type: ResourceType;
31
+ separateUnlockAndUnlatch: boolean | null;
32
+ description: string | null;
33
+ imageFilename: string | null;
34
+ documentationType: DocumentationType | null;
35
+ documentationMarkdown: string | null;
36
+ documentationUrl: string | null;
36
37
  metadata: Record<string, unknown> | null;
37
38
  createdAt: Date;
38
39
  updatedAt: Date;