@solidxai/core 0.1.8-beta.1 → 0.1.8-beta.11
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +197 -0
- package/dist/controllers/authentication.controller.d.ts +32 -2
- package/dist/controllers/authentication.controller.d.ts.map +1 -1
- package/dist/controllers/authentication.controller.js +80 -3
- package/dist/controllers/authentication.controller.js.map +1 -1
- package/dist/dtos/create-api-key.dto.d.ts +5 -0
- package/dist/dtos/create-api-key.dto.d.ts.map +1 -0
- package/dist/dtos/create-api-key.dto.js +34 -0
- package/dist/dtos/create-api-key.dto.js.map +1 -0
- package/dist/dtos/post-chatter-message.dto.d.ts +1 -0
- package/dist/dtos/post-chatter-message.dto.d.ts.map +1 -1
- package/dist/dtos/post-chatter-message.dto.js +6 -1
- package/dist/dtos/post-chatter-message.dto.js.map +1 -1
- package/dist/dtos/register-private.dto.d.ts +3 -5
- package/dist/dtos/register-private.dto.d.ts.map +1 -1
- package/dist/dtos/register-private.dto.js +6 -18
- package/dist/dtos/register-private.dto.js.map +1 -1
- package/dist/dtos/sso-exchange.dto.d.ts +4 -0
- package/dist/dtos/sso-exchange.dto.d.ts.map +1 -0
- package/dist/dtos/sso-exchange.dto.js +26 -0
- package/dist/dtos/sso-exchange.dto.js.map +1 -0
- package/dist/dtos/update-api-key.dto.d.ts +4 -0
- package/dist/dtos/update-api-key.dto.d.ts.map +1 -0
- package/dist/dtos/update-api-key.dto.js +28 -0
- package/dist/dtos/update-api-key.dto.js.map +1 -0
- package/dist/entities/agent-event.entity.d.ts +3 -12
- package/dist/entities/agent-event.entity.d.ts.map +1 -1
- package/dist/entities/agent-event.entity.js +21 -46
- package/dist/entities/agent-event.entity.js.map +1 -1
- package/dist/entities/agent-session.entity.d.ts +2 -11
- package/dist/entities/agent-session.entity.d.ts.map +1 -1
- package/dist/entities/agent-session.entity.js +15 -40
- package/dist/entities/agent-session.entity.js.map +1 -1
- package/dist/entities/field-metadata.entity.js +1 -1
- package/dist/entities/field-metadata.entity.js.map +1 -1
- package/dist/entities/legacy-common.entity.d.ts +9 -9
- package/dist/entities/legacy-common.entity.d.ts.map +1 -1
- package/dist/entities/legacy-common.entity.js +7 -7
- package/dist/entities/legacy-common.entity.js.map +1 -1
- package/dist/entities/setting.entity.d.ts +1 -0
- package/dist/entities/setting.entity.d.ts.map +1 -1
- package/dist/entities/setting.entity.js +5 -1
- package/dist/entities/setting.entity.js.map +1 -1
- package/dist/entities/sms-template.entity.d.ts.map +1 -1
- package/dist/entities/sms-template.entity.js +2 -1
- package/dist/entities/sms-template.entity.js.map +1 -1
- package/dist/entities/user-api-key.entity.d.ts +12 -0
- package/dist/entities/user-api-key.entity.d.ts.map +1 -0
- package/dist/entities/user-api-key.entity.js +62 -0
- package/dist/entities/user-api-key.entity.js.map +1 -0
- package/dist/entities/user.entity.d.ts +3 -0
- package/dist/entities/user.entity.d.ts.map +1 -1
- package/dist/entities/user.entity.js +12 -1
- package/dist/entities/user.entity.js.map +1 -1
- package/dist/enums/auth-type.enum.d.ts +2 -1
- package/dist/enums/auth-type.enum.d.ts.map +1 -1
- package/dist/enums/auth-type.enum.js +2 -1
- package/dist/enums/auth-type.enum.js.map +1 -1
- package/dist/guards/api-key.guard.d.ts +11 -0
- package/dist/guards/api-key.guard.d.ts.map +1 -0
- package/dist/guards/api-key.guard.js +43 -0
- package/dist/guards/api-key.guard.js.map +1 -0
- package/dist/guards/authentication.guard.d.ts +4 -2
- package/dist/guards/authentication.guard.d.ts.map +1 -1
- package/dist/guards/authentication.guard.js +7 -3
- package/dist/guards/authentication.guard.js.map +1 -1
- package/dist/helpers/bootstrap.helper.d.ts.map +1 -1
- package/dist/helpers/bootstrap.helper.js +12 -1
- package/dist/helpers/bootstrap.helper.js.map +1 -1
- package/dist/helpers/field-crud-managers/SelectionDynamicFieldCrudManager.d.ts.map +1 -1
- package/dist/helpers/field-crud-managers/SelectionDynamicFieldCrudManager.js +15 -6
- package/dist/helpers/field-crud-managers/SelectionDynamicFieldCrudManager.js.map +1 -1
- package/dist/helpers/typeorm-db-helper.d.ts.map +1 -1
- package/dist/helpers/typeorm-db-helper.js +9 -0
- package/dist/helpers/typeorm-db-helper.js.map +1 -1
- package/dist/index.d.ts +2 -0
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +2 -0
- package/dist/index.js.map +1 -1
- package/dist/interfaces.d.ts +12 -0
- package/dist/interfaces.d.ts.map +1 -1
- package/dist/interfaces.js.map +1 -1
- package/dist/jobs/database/chatter-queue-publisher-database.service.d.ts +1 -1
- package/dist/jobs/database/chatter-queue-publisher-database.service.d.ts.map +1 -1
- package/dist/jobs/database/chatter-queue-publisher-database.service.js.map +1 -1
- package/dist/jobs/database/chatter-queue-subscriber-database.service.d.ts +1 -1
- package/dist/jobs/database/chatter-queue-subscriber-database.service.d.ts.map +1 -1
- package/dist/jobs/database/chatter-queue-subscriber-database.service.js.map +1 -1
- package/dist/jobs/rabbitmq/chatter-queue-publisher.service.d.ts +1 -12
- package/dist/jobs/rabbitmq/chatter-queue-publisher.service.d.ts.map +1 -1
- package/dist/jobs/rabbitmq/chatter-queue-publisher.service.js.map +1 -1
- package/dist/jobs/rabbitmq/chatter-queue-subscriber.service.d.ts +1 -1
- package/dist/jobs/rabbitmq/chatter-queue-subscriber.service.d.ts.map +1 -1
- package/dist/jobs/rabbitmq/chatter-queue-subscriber.service.js.map +1 -1
- package/dist/jobs/redis/chatter-queue-subscriber-redis.service.d.ts +1 -1
- package/dist/jobs/redis/chatter-queue-subscriber-redis.service.d.ts.map +1 -1
- package/dist/jobs/redis/chatter-queue-subscriber-redis.service.js.map +1 -1
- package/dist/repository/user-api-key.repository.d.ts +12 -0
- package/dist/repository/user-api-key.repository.d.ts.map +1 -0
- package/dist/repository/user-api-key.repository.js +34 -0
- package/dist/repository/user-api-key.repository.js.map +1 -0
- package/dist/seeders/module-test-data.service.d.ts +5 -0
- package/dist/seeders/module-test-data.service.d.ts.map +1 -1
- package/dist/seeders/module-test-data.service.js +131 -4
- package/dist/seeders/module-test-data.service.js.map +1 -1
- package/dist/seeders/seed-data/solid-core-metadata.json +287 -197
- package/dist/services/api-key.service.d.ts +20 -0
- package/dist/services/api-key.service.d.ts.map +1 -0
- package/dist/services/api-key.service.js +98 -0
- package/dist/services/api-key.service.js.map +1 -0
- package/dist/services/authentication.service.d.ts +19 -1
- package/dist/services/authentication.service.d.ts.map +1 -1
- package/dist/services/authentication.service.js +31 -5
- package/dist/services/authentication.service.js.map +1 -1
- package/dist/services/chatter-message.service.d.ts.map +1 -1
- package/dist/services/chatter-message.service.js +6 -0
- package/dist/services/chatter-message.service.js.map +1 -1
- package/dist/services/encryption.service.d.ts +8 -0
- package/dist/services/encryption.service.d.ts.map +1 -0
- package/dist/services/encryption.service.js +75 -0
- package/dist/services/encryption.service.js.map +1 -0
- package/dist/services/export-transaction.service.d.ts.map +1 -1
- package/dist/services/export-transaction.service.js +0 -23
- package/dist/services/export-transaction.service.js.map +1 -1
- package/dist/services/field-metadata.service.d.ts +1 -3
- package/dist/services/field-metadata.service.d.ts.map +1 -1
- package/dist/services/field-metadata.service.js +6 -13
- package/dist/services/field-metadata.service.js.map +1 -1
- package/dist/services/file/disk-file.service.d.ts +1 -0
- package/dist/services/file/disk-file.service.d.ts.map +1 -1
- package/dist/services/file/disk-file.service.js +11 -3
- package/dist/services/file/disk-file.service.js.map +1 -1
- package/dist/services/media.service.d.ts +0 -1
- package/dist/services/media.service.d.ts.map +1 -1
- package/dist/services/media.service.js +10 -11
- package/dist/services/media.service.js.map +1 -1
- package/dist/services/setting.service.d.ts +1 -0
- package/dist/services/setting.service.d.ts.map +1 -1
- package/dist/services/setting.service.js +35 -7
- package/dist/services/setting.service.js.map +1 -1
- package/dist/services/settings/default-settings-provider.service.d.ts +12 -0
- package/dist/services/settings/default-settings-provider.service.d.ts.map +1 -1
- package/dist/services/settings/default-settings-provider.service.js +7 -3
- package/dist/services/settings/default-settings-provider.service.js.map +1 -1
- package/dist/services/sso-code-storage.service.d.ts +15 -0
- package/dist/services/sso-code-storage.service.d.ts.map +1 -0
- package/dist/services/sso-code-storage.service.js +47 -0
- package/dist/services/sso-code-storage.service.js.map +1 -0
- package/dist/services/user.service.d.ts.map +1 -1
- package/dist/services/user.service.js +3 -2
- package/dist/services/user.service.js.map +1 -1
- package/dist/solid-core.module.d.ts.map +1 -1
- package/dist/solid-core.module.js +10 -0
- package/dist/solid-core.module.js.map +1 -1
- package/dist/subscribers/audit.subscriber.d.ts +1 -1
- package/dist/subscribers/audit.subscriber.d.ts.map +1 -1
- package/dist/subscribers/audit.subscriber.js.map +1 -1
- package/package.json +1 -1
- package/src/controllers/authentication.controller.ts +59 -3
- package/src/dtos/create-api-key.dto.ts +14 -0
- package/src/dtos/post-chatter-message.dto.ts +4 -0
- package/src/dtos/register-private.dto.ts +5 -14
- package/src/dtos/sso-exchange.dto.ts +7 -0
- package/src/dtos/update-api-key.dto.ts +9 -0
- package/src/entities/agent-event.entity.ts +21 -55
- package/src/entities/agent-session.entity.ts +15 -47
- package/src/entities/field-metadata.entity.ts +1 -1
- package/src/entities/legacy-common.entity.ts +15 -15
- package/src/entities/setting.entity.ts +3 -0
- package/src/entities/sms-template.entity.ts +3 -2
- package/src/entities/user-api-key.entity.ts +37 -0
- package/src/entities/user.entity.ts +8 -0
- package/src/enums/auth-type.enum.ts +1 -0
- package/src/guards/api-key.guard.ts +32 -0
- package/src/guards/authentication.guard.ts +6 -3
- package/src/helpers/bootstrap.helper.ts +16 -1
- package/src/helpers/field-crud-managers/SelectionDynamicFieldCrudManager.ts +17 -6
- package/src/helpers/typeorm-db-helper.ts +11 -0
- package/src/index.ts +2 -0
- package/src/interfaces.ts +16 -0
- package/src/jobs/database/chatter-queue-publisher-database.service.ts +1 -1
- package/src/jobs/database/chatter-queue-subscriber-database.service.ts +1 -1
- package/src/jobs/rabbitmq/chatter-queue-publisher.service.ts +1 -15
- package/src/jobs/rabbitmq/chatter-queue-subscriber.service.ts +1 -1
- package/src/jobs/redis/chatter-queue-subscriber-redis.service.ts +1 -1
- package/src/repository/user-api-key.repository.ts +17 -0
- package/src/seeders/module-test-data.service.ts +165 -6
- package/src/seeders/seed-data/solid-core-metadata.json +287 -197
- package/src/services/api-key.service.ts +111 -0
- package/src/services/authentication.service.ts +35 -3
- package/src/services/chatter-message.service.ts +7 -0
- package/src/services/encryption.service.ts +43 -0
- package/src/services/export-transaction.service.ts +0 -26
- package/src/services/field-metadata.service.ts +5 -12
- package/src/services/file/disk-file.service.ts +15 -7
- package/src/services/media.service.ts +12 -51
- package/src/services/setting.service.ts +38 -9
- package/src/services/settings/default-settings-provider.service.ts +7 -3
- package/src/services/sso-code-storage.service.ts +36 -0
- package/src/services/user.service.ts +3 -2
- package/src/solid-core.module.ts +10 -0
- package/src/subscribers/audit.subscriber.ts +1 -1
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __decorate = (this && this.__decorate) || function (decorators, target, key, desc) {
|
|
3
|
+
var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
|
|
4
|
+
if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
|
|
5
|
+
else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
|
|
6
|
+
return c > 3 && r && Object.defineProperty(target, key, r), r;
|
|
7
|
+
};
|
|
8
|
+
var __metadata = (this && this.__metadata) || function (k, v) {
|
|
9
|
+
if (typeof Reflect === "object" && typeof Reflect.metadata === "function") return Reflect.metadata(k, v);
|
|
10
|
+
};
|
|
11
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
12
|
+
exports.UpdateApiKeyDto = void 0;
|
|
13
|
+
const openapi = require("@nestjs/swagger");
|
|
14
|
+
const swagger_1 = require("@nestjs/swagger");
|
|
15
|
+
const class_validator_1 = require("class-validator");
|
|
16
|
+
class UpdateApiKeyDto {
|
|
17
|
+
static _OPENAPI_METADATA_FACTORY() {
|
|
18
|
+
return { isActive: { required: true, type: () => Boolean } };
|
|
19
|
+
}
|
|
20
|
+
}
|
|
21
|
+
exports.UpdateApiKeyDto = UpdateApiKeyDto;
|
|
22
|
+
__decorate([
|
|
23
|
+
(0, swagger_1.ApiProperty)({ example: true }),
|
|
24
|
+
(0, class_validator_1.IsBoolean)(),
|
|
25
|
+
(0, class_validator_1.IsNotEmpty)(),
|
|
26
|
+
__metadata("design:type", Boolean)
|
|
27
|
+
], UpdateApiKeyDto.prototype, "isActive", void 0);
|
|
28
|
+
//# sourceMappingURL=update-api-key.dto.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"update-api-key.dto.js","sourceRoot":"","sources":["../../src/dtos/update-api-key.dto.ts"],"names":[],"mappings":";;;;;;;;;;;;;AAAA,6CAA8C;AAC9C,qDAAwD;AAExD,MAAa,eAAe;;;;CAK3B;AALD,0CAKC;AADG;IAHC,IAAA,qBAAW,EAAC,EAAE,OAAO,EAAE,IAAI,EAAE,CAAC;IAC9B,IAAA,2BAAS,GAAE;IACX,IAAA,4BAAU,GAAE;;iDACK","sourcesContent":["import { ApiProperty } from '@nestjs/swagger';\nimport { IsBoolean, IsNotEmpty } from 'class-validator';\n\nexport class UpdateApiKeyDto {\n @ApiProperty({ example: true })\n @IsBoolean()\n @IsNotEmpty()\n isActive: boolean;\n}\n"]}
|
|
@@ -1,10 +1,10 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
1
|
+
import { CommonEntity } from 'src/entities/common.entity';
|
|
2
|
+
export declare class AgentEvent extends CommonEntity {
|
|
3
3
|
sessionId: string;
|
|
4
4
|
turnNumber: number;
|
|
5
5
|
stepNumber: number;
|
|
6
6
|
eventType: string;
|
|
7
|
-
eventData:
|
|
7
|
+
eventData: any;
|
|
8
8
|
content: string;
|
|
9
9
|
toolName: string;
|
|
10
10
|
toolArguments: string;
|
|
@@ -15,14 +15,5 @@ export declare class AgentEvent {
|
|
|
15
15
|
inputTokens: number;
|
|
16
16
|
outputTokens: number;
|
|
17
17
|
modelUsed: string;
|
|
18
|
-
createdAt: Date;
|
|
19
|
-
updatedAt: Date;
|
|
20
|
-
deletedAt: Date;
|
|
21
|
-
deletedTracker: string;
|
|
22
|
-
publishedAt: Date;
|
|
23
|
-
localeName: string;
|
|
24
|
-
defaultEntityLocaleId: number;
|
|
25
|
-
createdBy: number;
|
|
26
|
-
updatedBy: number;
|
|
27
18
|
}
|
|
28
19
|
//# sourceMappingURL=agent-event.entity.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"agent-event.entity.d.ts","sourceRoot":"","sources":["../../src/entities/agent-event.entity.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"agent-event.entity.d.ts","sourceRoot":"","sources":["../../src/entities/agent-event.entity.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,YAAY,EAAE,MAAM,4BAA4B,CAAC;AAG1D,qBACa,UAAW,SAAQ,YAAY;IAG1C,SAAS,EAAE,MAAM,CAAC;IAGlB,UAAU,EAAE,MAAM,CAAC;IAGnB,UAAU,EAAE,MAAM,CAAC;IAInB,SAAS,EAAE,MAAM,CAAC;IAGlB,SAAS,EAAE,GAAG,CAAC;IAGf,OAAO,EAAE,MAAM,CAAC;IAIhB,QAAQ,EAAE,MAAM,CAAC;IAGjB,aAAa,EAAE,MAAM,CAAC;IAGtB,UAAU,EAAE,MAAM,CAAC;IAGnB,cAAc,EAAE,MAAM,CAAC;IAGvB,UAAU,EAAE,MAAM,CAAC;IAGnB,IAAI,EAAE,MAAM,CAAC;IAGb,WAAW,EAAE,MAAM,CAAC;IAGpB,YAAY,EAAE,MAAM,CAAC;IAGrB,SAAS,EAAE,MAAM,CAAC;CACnB"}
|
|
@@ -12,103 +12,78 @@ Object.defineProperty(exports, "__esModule", { value: true });
|
|
|
12
12
|
exports.AgentEvent = void 0;
|
|
13
13
|
const openapi = require("@nestjs/swagger");
|
|
14
14
|
const typeorm_1 = require("typeorm");
|
|
15
|
-
const
|
|
16
|
-
|
|
15
|
+
const common_entity_1 = require("./common.entity");
|
|
16
|
+
const typeorm_db_helper_1 = require("../helpers/typeorm-db-helper");
|
|
17
|
+
let AgentEvent = class AgentEvent extends common_entity_1.CommonEntity {
|
|
17
18
|
static _OPENAPI_METADATA_FACTORY() {
|
|
18
|
-
return {
|
|
19
|
+
return { sessionId: { required: true, type: () => String }, turnNumber: { required: true, type: () => Number }, stepNumber: { required: true, type: () => Number }, eventType: { required: true, type: () => String }, eventData: { required: true, type: () => Object }, content: { required: true, type: () => String }, toolName: { required: true, type: () => String }, toolArguments: { required: true, type: () => String }, toolOutput: { required: true, type: () => String }, toolReturncode: { required: true, type: () => Number }, durationMs: { required: true, type: () => Number }, cost: { required: true, type: () => Number }, inputTokens: { required: true, type: () => Number }, outputTokens: { required: true, type: () => Number }, modelUsed: { required: true, type: () => String } };
|
|
19
20
|
}
|
|
20
21
|
};
|
|
21
22
|
exports.AgentEvent = AgentEvent;
|
|
22
23
|
__decorate([
|
|
23
|
-
(0, class_transformer_1.Expose)(),
|
|
24
|
-
(0, typeorm_1.PrimaryGeneratedColumn)({ type: 'integer' }),
|
|
25
|
-
__metadata("design:type", Number)
|
|
26
|
-
], AgentEvent.prototype, "id", void 0);
|
|
27
|
-
__decorate([
|
|
28
|
-
(0, class_transformer_1.Expose)(),
|
|
29
24
|
(0, typeorm_1.Index)(),
|
|
30
|
-
(0, typeorm_1.Column)({
|
|
25
|
+
(0, typeorm_1.Column)({}),
|
|
31
26
|
__metadata("design:type", String)
|
|
32
27
|
], AgentEvent.prototype, "sessionId", void 0);
|
|
33
28
|
__decorate([
|
|
34
|
-
(0,
|
|
35
|
-
(0, typeorm_1.Column)({ type: 'integer', name: 'turn_number' }),
|
|
29
|
+
(0, typeorm_1.Column)({}),
|
|
36
30
|
__metadata("design:type", Number)
|
|
37
31
|
], AgentEvent.prototype, "turnNumber", void 0);
|
|
38
32
|
__decorate([
|
|
39
|
-
(0,
|
|
40
|
-
(0, typeorm_1.Column)({ type: 'integer', nullable: true, name: 'step_number' }),
|
|
33
|
+
(0, typeorm_1.Column)({ nullable: true }),
|
|
41
34
|
__metadata("design:type", Number)
|
|
42
35
|
], AgentEvent.prototype, "stepNumber", void 0);
|
|
43
36
|
__decorate([
|
|
44
|
-
(0, class_transformer_1.Expose)(),
|
|
45
37
|
(0, typeorm_1.Index)(),
|
|
46
|
-
(0, typeorm_1.Column)({
|
|
38
|
+
(0, typeorm_1.Column)({}),
|
|
47
39
|
__metadata("design:type", String)
|
|
48
40
|
], AgentEvent.prototype, "eventType", void 0);
|
|
49
41
|
__decorate([
|
|
50
|
-
(0,
|
|
51
|
-
(
|
|
52
|
-
__metadata("design:type", String)
|
|
42
|
+
(0, typeorm_1.Column)({ type: "simple-json", nullable: true, ...(0, typeorm_db_helper_1.getColumnType)('simpleJsonLargeText') }),
|
|
43
|
+
__metadata("design:type", Object)
|
|
53
44
|
], AgentEvent.prototype, "eventData", void 0);
|
|
54
45
|
__decorate([
|
|
55
|
-
(0,
|
|
56
|
-
(0, typeorm_1.Column)({ type: 'text', nullable: true, name: 'content' }),
|
|
46
|
+
(0, typeorm_1.Column)({ nullable: true, ...(0, typeorm_db_helper_1.getColumnType)('longText') }),
|
|
57
47
|
__metadata("design:type", String)
|
|
58
48
|
], AgentEvent.prototype, "content", void 0);
|
|
59
49
|
__decorate([
|
|
60
|
-
(0, class_transformer_1.Expose)(),
|
|
61
50
|
(0, typeorm_1.Index)(),
|
|
62
|
-
(0, typeorm_1.Column)({
|
|
51
|
+
(0, typeorm_1.Column)({ nullable: true }),
|
|
63
52
|
__metadata("design:type", String)
|
|
64
53
|
], AgentEvent.prototype, "toolName", void 0);
|
|
65
54
|
__decorate([
|
|
66
|
-
(0,
|
|
67
|
-
(0, typeorm_1.Column)({ type: 'text', nullable: true, name: 'tool_arguments' }),
|
|
55
|
+
(0, typeorm_1.Column)({ type: "simple-json", nullable: true, ...(0, typeorm_db_helper_1.getColumnType)('simpleJsonLargeText') }),
|
|
68
56
|
__metadata("design:type", String)
|
|
69
57
|
], AgentEvent.prototype, "toolArguments", void 0);
|
|
70
58
|
__decorate([
|
|
71
|
-
(0,
|
|
72
|
-
(0, typeorm_1.Column)({ type: 'text', nullable: true, name: 'tool_output' }),
|
|
59
|
+
(0, typeorm_1.Column)({ nullable: true, ...(0, typeorm_db_helper_1.getColumnType)('longText') }),
|
|
73
60
|
__metadata("design:type", String)
|
|
74
61
|
], AgentEvent.prototype, "toolOutput", void 0);
|
|
75
62
|
__decorate([
|
|
76
|
-
(0,
|
|
77
|
-
(0, typeorm_1.Column)({ type: 'integer', nullable: true, name: 'tool_returncode' }),
|
|
63
|
+
(0, typeorm_1.Column)({ nullable: true }),
|
|
78
64
|
__metadata("design:type", Number)
|
|
79
65
|
], AgentEvent.prototype, "toolReturncode", void 0);
|
|
80
66
|
__decorate([
|
|
81
|
-
(0,
|
|
82
|
-
(0, typeorm_1.Column)({ type: 'double precision', nullable: true, name: 'duration_ms' }),
|
|
67
|
+
(0, typeorm_1.Column)({ nullable: true, ...(0, typeorm_db_helper_1.getColumnType)('decimal') }),
|
|
83
68
|
__metadata("design:type", Number)
|
|
84
69
|
], AgentEvent.prototype, "durationMs", void 0);
|
|
85
70
|
__decorate([
|
|
86
|
-
(0,
|
|
87
|
-
(0, typeorm_1.Column)({ type: 'double precision', nullable: true, name: 'cost' }),
|
|
71
|
+
(0, typeorm_1.Column)({ nullable: true, ...(0, typeorm_db_helper_1.getColumnType)('decimal') }),
|
|
88
72
|
__metadata("design:type", Number)
|
|
89
73
|
], AgentEvent.prototype, "cost", void 0);
|
|
90
74
|
__decorate([
|
|
91
|
-
(0,
|
|
92
|
-
(0, typeorm_1.Column)({ type: 'integer', nullable: true, name: 'input_tokens' }),
|
|
75
|
+
(0, typeorm_1.Column)({ nullable: true }),
|
|
93
76
|
__metadata("design:type", Number)
|
|
94
77
|
], AgentEvent.prototype, "inputTokens", void 0);
|
|
95
78
|
__decorate([
|
|
96
|
-
(0,
|
|
97
|
-
(0, typeorm_1.Column)({ type: 'integer', nullable: true, name: 'output_tokens' }),
|
|
79
|
+
(0, typeorm_1.Column)({ nullable: true }),
|
|
98
80
|
__metadata("design:type", Number)
|
|
99
81
|
], AgentEvent.prototype, "outputTokens", void 0);
|
|
100
82
|
__decorate([
|
|
101
|
-
(0,
|
|
102
|
-
(0, typeorm_1.Column)({ type: 'varchar', length: 255, nullable: true, name: 'model_used' }),
|
|
83
|
+
(0, typeorm_1.Column)({ nullable: true }),
|
|
103
84
|
__metadata("design:type", String)
|
|
104
85
|
], AgentEvent.prototype, "modelUsed", void 0);
|
|
105
|
-
__decorate([
|
|
106
|
-
(0, class_transformer_1.Expose)(),
|
|
107
|
-
(0, typeorm_1.Column)({ type: 'timestamp without time zone', name: 'created_at' }),
|
|
108
|
-
__metadata("design:type", Date)
|
|
109
|
-
], AgentEvent.prototype, "createdAt", void 0);
|
|
110
86
|
exports.AgentEvent = AgentEvent = __decorate([
|
|
111
|
-
(0,
|
|
112
|
-
(0, typeorm_1.Entity)({ name: 'ss_agent_events', synchronize: false })
|
|
87
|
+
(0, typeorm_1.Entity)({ name: 'ss_agent_events' })
|
|
113
88
|
], AgentEvent);
|
|
114
89
|
//# sourceMappingURL=agent-event.entity.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"agent-event.entity.js","sourceRoot":"","sources":["../../src/entities/agent-event.entity.ts"],"names":[],"mappings":";;;;;;;;;;;;;AAAA,
|
|
1
|
+
{"version":3,"file":"agent-event.entity.js","sourceRoot":"","sources":["../../src/entities/agent-event.entity.ts"],"names":[],"mappings":";;;;;;;;;;;;;AAAA,qCAAgD;AAChD,mDAA0D;AAC1D,oEAA8D;AAGvD,IAAM,UAAU,GAAhB,MAAM,UAAW,SAAQ,4BAAY;;;;CAgD3C,CAAA;AAhDY,gCAAU;AAGrB;IAFC,IAAA,eAAK,GAAE;I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AAQ,EAAE,IAAI,EAAE,CAAC;;+CACP;AAGpB;IADC,IAAA,gBAAM,EAAC,EAAE,QAAQ,EAAE,IAAI,EAAE,CAAC;;gDACN;AAGrB;IADC,IAAA,gBAAM,EAAC,EAAE,QAAQ,EAAE,IAAI,EAAE,CAAC;;6CACT;qBA/CP,UAAU;IADtB,IAAA,gBAAM,EAAC,EAAE,IAAI,EAAE,iBAAiB,EAAE,CAAC;GACvB,UAAU,CAgDtB","sourcesContent":["import { Column, Entity, Index } from 'typeorm';\nimport { CommonEntity } from 'src/entities/common.entity';\nimport { getColumnType } from 'src/helpers/typeorm-db-helper';\n\n@Entity({ name: 'ss_agent_events' })\nexport class AgentEvent extends CommonEntity {\n @Index()\n @Column({ })\n sessionId: string;\n\n @Column({ })\n turnNumber: number;\n\n @Column({ nullable: true })\n stepNumber: number;\n\n @Index()\n @Column({ })\n eventType: string;\n\n @Column({ type: \"simple-json\", nullable: true, ...getColumnType('simpleJsonLargeText') })\n eventData: any;\n\n @Column({ nullable: true, ...getColumnType('longText') })\n content: string;\n\n @Index()\n @Column({ nullable: true })\n toolName: string;\n\n @Column({ type: \"simple-json\", nullable: true, ...getColumnType('simpleJsonLargeText') })\n toolArguments: string;\n\n @Column({ nullable: true, ...getColumnType('longText') })\n toolOutput: string;\n\n @Column({ nullable: true })\n toolReturncode: number;\n\n @Column({ nullable: true, ...getColumnType('decimal') })\n durationMs: number;\n\n @Column({ nullable: true, ...getColumnType('decimal') })\n cost: number;\n\n @Column({ nullable: true })\n inputTokens: number;\n\n @Column({ nullable: true })\n outputTokens: number;\n\n @Column({ nullable: true })\n modelUsed: string;\n}\n"]}
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
1
|
+
import { CommonEntity } from 'src/entities/common.entity';
|
|
2
|
+
export declare class AgentSession extends CommonEntity {
|
|
3
3
|
sessionId: string;
|
|
4
4
|
userId: number;
|
|
5
5
|
projectRoot: string;
|
|
@@ -10,14 +10,5 @@ export declare class AgentSession {
|
|
|
10
10
|
totalInputTokens: number;
|
|
11
11
|
totalOutputTokens: number;
|
|
12
12
|
summary: string;
|
|
13
|
-
createdAt: Date;
|
|
14
|
-
updatedAt: Date;
|
|
15
|
-
deletedAt: Date;
|
|
16
|
-
deletedTracker: string;
|
|
17
|
-
publishedAt: Date;
|
|
18
|
-
localeName: string;
|
|
19
|
-
defaultEntityLocaleId: number;
|
|
20
|
-
createdBy: number;
|
|
21
|
-
updatedBy: number;
|
|
22
13
|
}
|
|
23
14
|
//# sourceMappingURL=agent-session.entity.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"agent-session.entity.d.ts","sourceRoot":"","sources":["../../src/entities/agent-session.entity.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"agent-session.entity.d.ts","sourceRoot":"","sources":["../../src/entities/agent-session.entity.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,YAAY,EAAE,MAAM,4BAA4B,CAAC;AAG1D,qBACa,YAAa,SAAQ,YAAY;IAG5C,SAAS,EAAE,MAAM,CAAC;IAIlB,MAAM,EAAE,MAAM,CAAC;IAGf,WAAW,EAAE,MAAM,CAAC;IAGpB,SAAS,EAAE,MAAM,CAAC;IAIlB,MAAM,EAAE,MAAM,CAAC;IAGf,SAAS,EAAE,MAAM,CAAC;IAGlB,UAAU,EAAE,MAAM,CAAC;IAGnB,gBAAgB,EAAE,MAAM,CAAC;IAGzB,iBAAiB,EAAE,MAAM,CAAC;IAG1B,OAAO,EAAE,MAAM,CAAC;CACjB"}
|
|
@@ -12,83 +12,58 @@ Object.defineProperty(exports, "__esModule", { value: true });
|
|
|
12
12
|
exports.AgentSession = void 0;
|
|
13
13
|
const openapi = require("@nestjs/swagger");
|
|
14
14
|
const typeorm_1 = require("typeorm");
|
|
15
|
-
const
|
|
16
|
-
|
|
15
|
+
const common_entity_1 = require("./common.entity");
|
|
16
|
+
const typeorm_db_helper_1 = require("../helpers/typeorm-db-helper");
|
|
17
|
+
let AgentSession = class AgentSession extends common_entity_1.CommonEntity {
|
|
17
18
|
static _OPENAPI_METADATA_FACTORY() {
|
|
18
|
-
return {
|
|
19
|
+
return { sessionId: { required: true, type: () => String }, userId: { required: true, type: () => Number }, projectRoot: { required: true, type: () => String }, modelName: { required: true, type: () => String }, status: { required: true, type: () => String }, totalCost: { required: true, type: () => Number }, totalSteps: { required: true, type: () => Number }, totalInputTokens: { required: true, type: () => Number }, totalOutputTokens: { required: true, type: () => Number }, summary: { required: true, type: () => String } };
|
|
19
20
|
}
|
|
20
21
|
};
|
|
21
22
|
exports.AgentSession = AgentSession;
|
|
22
23
|
__decorate([
|
|
23
|
-
(0, class_transformer_1.Expose)(),
|
|
24
|
-
(0, typeorm_1.PrimaryGeneratedColumn)({ type: 'integer' }),
|
|
25
|
-
__metadata("design:type", Number)
|
|
26
|
-
], AgentSession.prototype, "id", void 0);
|
|
27
|
-
__decorate([
|
|
28
|
-
(0, class_transformer_1.Expose)(),
|
|
29
24
|
(0, typeorm_1.Index)({ unique: true }),
|
|
30
|
-
(0, typeorm_1.Column)({
|
|
25
|
+
(0, typeorm_1.Column)({}),
|
|
31
26
|
__metadata("design:type", String)
|
|
32
27
|
], AgentSession.prototype, "sessionId", void 0);
|
|
33
28
|
__decorate([
|
|
34
|
-
(0, class_transformer_1.Expose)(),
|
|
35
29
|
(0, typeorm_1.Index)(),
|
|
36
|
-
(0, typeorm_1.Column)({
|
|
30
|
+
(0, typeorm_1.Column)({ nullable: true }),
|
|
37
31
|
__metadata("design:type", Number)
|
|
38
32
|
], AgentSession.prototype, "userId", void 0);
|
|
39
33
|
__decorate([
|
|
40
|
-
(0,
|
|
41
|
-
(0, typeorm_1.Column)({ type: 'text', nullable: true, name: 'project_root' }),
|
|
34
|
+
(0, typeorm_1.Column)({ nullable: true, ...(0, typeorm_db_helper_1.getColumnType)('longText') }),
|
|
42
35
|
__metadata("design:type", String)
|
|
43
36
|
], AgentSession.prototype, "projectRoot", void 0);
|
|
44
37
|
__decorate([
|
|
45
|
-
(0,
|
|
46
|
-
(0, typeorm_1.Column)({ type: 'varchar', length: 255, name: 'model_name' }),
|
|
38
|
+
(0, typeorm_1.Column)({}),
|
|
47
39
|
__metadata("design:type", String)
|
|
48
40
|
], AgentSession.prototype, "modelName", void 0);
|
|
49
41
|
__decorate([
|
|
50
|
-
(0, class_transformer_1.Expose)(),
|
|
51
42
|
(0, typeorm_1.Index)(),
|
|
52
|
-
(0, typeorm_1.Column)({
|
|
43
|
+
(0, typeorm_1.Column)({}),
|
|
53
44
|
__metadata("design:type", String)
|
|
54
45
|
], AgentSession.prototype, "status", void 0);
|
|
55
46
|
__decorate([
|
|
56
|
-
(0,
|
|
57
|
-
(0, typeorm_1.Column)({ type: 'double precision', name: 'total_cost', default: 0 }),
|
|
47
|
+
(0, typeorm_1.Column)({ default: 0, ...(0, typeorm_db_helper_1.getColumnType)('decimal') }),
|
|
58
48
|
__metadata("design:type", Number)
|
|
59
49
|
], AgentSession.prototype, "totalCost", void 0);
|
|
60
50
|
__decorate([
|
|
61
|
-
(0,
|
|
62
|
-
(0, typeorm_1.Column)({ type: 'integer', name: 'total_steps', default: 0 }),
|
|
51
|
+
(0, typeorm_1.Column)({ default: 0 }),
|
|
63
52
|
__metadata("design:type", Number)
|
|
64
53
|
], AgentSession.prototype, "totalSteps", void 0);
|
|
65
54
|
__decorate([
|
|
66
|
-
(0,
|
|
67
|
-
(0, typeorm_1.Column)({ type: 'integer', name: 'total_input_tokens', default: 0 }),
|
|
55
|
+
(0, typeorm_1.Column)({ default: 0 }),
|
|
68
56
|
__metadata("design:type", Number)
|
|
69
57
|
], AgentSession.prototype, "totalInputTokens", void 0);
|
|
70
58
|
__decorate([
|
|
71
|
-
(0,
|
|
72
|
-
(0, typeorm_1.Column)({ type: 'integer', name: 'total_output_tokens', default: 0 }),
|
|
59
|
+
(0, typeorm_1.Column)({ default: 0 }),
|
|
73
60
|
__metadata("design:type", Number)
|
|
74
61
|
], AgentSession.prototype, "totalOutputTokens", void 0);
|
|
75
62
|
__decorate([
|
|
76
|
-
(0,
|
|
77
|
-
(0, typeorm_1.Column)({ type: 'text', nullable: true, name: 'summary' }),
|
|
63
|
+
(0, typeorm_1.Column)({ nullable: true, ...(0, typeorm_db_helper_1.getColumnType)('longText') }),
|
|
78
64
|
__metadata("design:type", String)
|
|
79
65
|
], AgentSession.prototype, "summary", void 0);
|
|
80
|
-
__decorate([
|
|
81
|
-
(0, class_transformer_1.Expose)(),
|
|
82
|
-
(0, typeorm_1.Column)({ type: 'timestamp without time zone', name: 'created_at' }),
|
|
83
|
-
__metadata("design:type", Date)
|
|
84
|
-
], AgentSession.prototype, "createdAt", void 0);
|
|
85
|
-
__decorate([
|
|
86
|
-
(0, class_transformer_1.Expose)(),
|
|
87
|
-
(0, typeorm_1.Column)({ type: 'timestamp without time zone', name: 'updated_at' }),
|
|
88
|
-
__metadata("design:type", Date)
|
|
89
|
-
], AgentSession.prototype, "updatedAt", void 0);
|
|
90
66
|
exports.AgentSession = AgentSession = __decorate([
|
|
91
|
-
(0,
|
|
92
|
-
(0, typeorm_1.Entity)({ name: 'ss_agent_sessions', synchronize: false })
|
|
67
|
+
(0, typeorm_1.Entity)({ name: 'ss_agent_sessions' })
|
|
93
68
|
], AgentSession);
|
|
94
69
|
//# sourceMappingURL=agent-session.entity.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"agent-session.entity.js","sourceRoot":"","sources":["../../src/entities/agent-session.entity.ts"],"names":[],"mappings":";;;;;;;;;;;;;AAAA,
|
|
1
|
+
{"version":3,"file":"agent-session.entity.js","sourceRoot":"","sources":["../../src/entities/agent-session.entity.ts"],"names":[],"mappings":";;;;;;;;;;;;;AAAA,qCAAgD;AAChD,mDAA0D;AAC1D,oEAA8D;AAGvD,IAAM,YAAY,GAAlB,MAAM,YAAa,SAAQ,4BAAY;;;;CAiC7C,CAAA;AAjCY,oCAAY;AAGvB;IAFC,IAAA,eAAK,EAAC,EAAE,MAAM,EAAE,IAAI,EAAE,CAAC;IACvB,IAAA,gBAAM,EAAC,EAAG,CAAC;;+CACM;AAIlB;IAFC,IAAA,eAAK,GAAE;IACP,IAAA,gBAAM,EAAC,EAAE,QAAQ,EAAE,IAAI,EAAE,CAAC;;4CACZ;AAGf;IADC,IAAA,gBAAM,EAAC,EAAE,QAAQ,EAAE,IAAI,EAAE,GAAG,IAAA,iCAAa,EAAC,UAAU,CAAC,EAAE,CAAC;;iDACrC;AAGpB;IADC,IAAA,gBAAM,EAAC,EAAG,CAAC;;+CACM;AAIlB;IAFC,IAAA,eAAK,GAAE;IACP,IAAA,gBAAM,EAAC,EAAG,CAAC;;4CACG;AAGf;IADC,IAAA,gBAAM,EAAC,EAAE,OAAO,EAAE,CAAC,EAAE,GAAG,IAAA,iCAAa,EAAC,SAAS,CAAC,EAAE,CAAC;;+CAClC;AAGlB;IADC,IAAA,gBAAM,EAAC,EAAE,OAAO,EAAE,CAAC,EAAE,CAAC;;gDACJ;AAGnB;IADC,IAAA,gBAAM,EAAC,EAAE,OAAO,EAAE,CAAC,EAAE,CAAC;;sDACE;AAGzB;IADC,IAAA,gBAAM,EAAC,EAAE,OAAO,EAAE,CAAC,EAAE,CAAC;;uDACG;AAG1B;IADC,IAAA,gBAAM,EAAC,EAAE,QAAQ,EAAE,IAAI,EAAE,GAAG,IAAA,iCAAa,EAAC,UAAU,CAAC,EAAE,CAAC;;6CACzC;uBAhCL,YAAY;IADxB,IAAA,gBAAM,EAAC,EAAE,IAAI,EAAE,mBAAmB,EAAE,CAAC;GACzB,YAAY,CAiCxB","sourcesContent":["import { Column, Entity, Index } from 'typeorm';\nimport { CommonEntity } from 'src/entities/common.entity';\nimport { getColumnType } from 'src/helpers/typeorm-db-helper';\n\n@Entity({ name: 'ss_agent_sessions' })\nexport class AgentSession extends CommonEntity {\n @Index({ unique: true })\n @Column({ })\n sessionId: string;\n\n @Index()\n @Column({ nullable: true })\n userId: number;\n\n @Column({ nullable: true, ...getColumnType('longText') })\n projectRoot: string;\n\n @Column({ })\n modelName: string;\n\n @Index()\n @Column({ })\n status: string;\n\n @Column({ default: 0, ...getColumnType('decimal') })\n totalCost: number;\n\n @Column({ default: 0 })\n totalSteps: number;\n\n @Column({ default: 0 })\n totalInputTokens: number;\n\n @Column({ default: 0 })\n totalOutputTokens: number;\n\n @Column({ nullable: true, ...getColumnType('longText') })\n summary: string;\n}\n"]}
|
|
@@ -163,7 +163,7 @@ __decorate([
|
|
|
163
163
|
__metadata("design:type", Array)
|
|
164
164
|
], FieldMetadata.prototype, "selectionStaticValues", void 0);
|
|
165
165
|
__decorate([
|
|
166
|
-
(0, typeorm_1.Column)({ name: 'selection_value_type', nullable: true }),
|
|
166
|
+
(0, typeorm_1.Column)({ name: 'selection_value_type', nullable: true, default: 'string' }),
|
|
167
167
|
__metadata("design:type", String)
|
|
168
168
|
], FieldMetadata.prototype, "selectionValueType", void 0);
|
|
169
169
|
__decorate([
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"field-metadata.entity.js","sourceRoot":"","sources":["../../src/entities/field-metadata.entity.ts"],"names":[],"mappings":";;;;;;;;;;;;;AACA,mDAA0D;AAC1D,qCAAuE;AACvE,qGAAwF;AACxF,mEAAwD;AACxD,gEAA8D;AAGvD,IAAM,aAAa,GAAnB,MAAM,aAAc,SAAQ,4BAAY;IAAxC;;QAkHH,uBAAkB,GAAW,QAAQ,CAAC;QAuCtC,wBAAmB,GAAY,KAAK,CAAC;KAOxC;;gzFAPkC,KAAK;;CAOvC,CAAA;AAhKY,sCAAa;AAItB;IADC,IAAA,gBAAM,EAAC,EAAE,IAAI,EAAE,MAAM,EAAE,CAAC;;2CACZ;AAGb;IADC,IAAA,gBAAM,EAAC,EAAE,IAAI,EAAE,cAAc,EAAE,CAAC;;kDACb;AAGpB;IADC,IAAA,gBAAM,EAAC,EAAE,IAAI,EAAE,aAAa,EAAE,QAAQ,EAAE,IAAI,EAAE,MAAM,EAAE,IAAI,EAAE,CAAC;;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,CAAC;;mDAC7B;wBA/Jb,aAAa;IADzB,IAAA,gBAAM,EAAC,mBAAmB,CAAC;GACf,aAAa,CAgKzB","sourcesContent":["import { ComputedFieldTriggerConfig } from \"src/dtos/create-field-metadata.dto\";\nimport { CommonEntity } from \"src/entities/common.entity\";\nimport { Column, Entity, Index, JoinColumn, ManyToOne } from \"typeorm\";\nimport { MediaStorageProviderMetadata } from \"./media-storage-provider-metadata.entity\";\nimport { ModelMetadata } from \"./model-metadata.entity\";\nimport { ERROR_MESSAGES } from \"src/constants/error-messages\";\n\n@Entity(\"ss_field_metadata\")\nexport class FieldMetadata extends CommonEntity {\n\n // @Index({ unique: true })\n @Column({ name: \"name\" })\n name: string;\n\n @Column({ name: \"display_name\" })\n displayName: string;\n\n @Column({ name: \"description\", nullable: true, length: 1024 })\n description: string;\n\n /** int, char etc... */\n @Column({ name: 'type' })\n type: string;\n\n @Column({ name: 'orm_type', nullable: true })\n ormType: string;\n\n @Index()\n @ManyToOne(() => ModelMetadata, (model) => model.fields, { onDelete: 'CASCADE' })\n @JoinColumn({ name: 'model_id', referencedColumnName: 'id' })\n model: ModelMetadata;\n\n @Column({ name: 'default_value', nullable: true })\n defaultValue: string;\n\n @Column({ name: 'regex_pattern', nullable: true })\n regexPattern: string;\n\n @Column({ name: 'regex_pattern_not_matching_error_msg', nullable: true, default: ERROR_MESSAGES.DEFAULT_REGEX_PATTERN_NOT_MATCHING_ERROR_MSG })\n regexPatternNotMatchingErrorMsg: string;\n\n @Column({ name: \"required\", default: false })\n required: boolean;\n\n @Column({ name: \"unique\", default: false })\n unique: boolean;\n\n @Column({ name: \"encrypt\", default: false })\n encrypt: boolean;\n\n @Column({ name: 'encryption_type', nullable: true })\n encryptionType: string;\n\n @Column({ name: 'decrypt_when', nullable: true })\n decryptWhen: string;\n\n @Column({ name: \"index\", default: false })\n index: boolean;\n\n @Column({ name: 'length', nullable: true })\n length: number;\n\n @Column({ name: 'max', nullable: true })\n max: number;\n\n @Column({ name: 'min', nullable: true })\n min: number;\n\n @Column({ name: \"private\", default: false })\n private: boolean;\n\n @Column({ name: 'media_types', nullable: true, type: \"simple-json\" })\n mediaTypes: string[];\n\n @Column({ name: 'media_max_size_kb', nullable: true })\n mediaMaxSizeKb: number;\n\n @ManyToOne(() => MediaStorageProviderMetadata, { onDelete: 'SET NULL' })\n @JoinColumn({ name: 'media_storage_provider_id' })\n mediaStorageProvider: MediaStorageProviderMetadata;\n\n // @Column({ name: 'media_embedded', default: true })\n // mediaEmbedded: boolean;\n\n @Column({ name: 'relation_type', nullable: true })\n relationType: string;\n\n @Column({ name: 'relation_model_singular_name', nullable: true })\n relationCoModelSingularName: string;\n\n @Column({ name: \"relation_create_inverse\", default: false })\n relationCreateInverse: boolean;\n\n @Column({ name: \"relation_cascade\", nullable: true })\n relationCascade: string;\n\n @Column({ name: 'relation_model_module_name', nullable: true })\n relationModelModuleName: string;\n\n // This field will be used to set the inverse field name in the related model e.g required for many to many relation\n @Column({ name: 'relation_model_field_name', nullable: true })\n relationCoModelFieldName: string;\n\n @Column({ name: 'is_relation_many_to_many_owner', nullable: true })\n isRelationManyToManyOwner: boolean;\n\n // We can store a filter json like this {\"fieldName\": ${someVarWhichWillComeFromParentModel... or can be hard coded...}}\n // {\"type\": \"INDUSTRY\"} .... Eg. static fixedFilter \n // {\"country_id\", \"${country}\"} ... Eg. dynamic fixedFilter \n @Column({ name: 'relation_field_fixed_filter', nullable: true })\n relationFieldFixedFilter: string;\n\n @Column({ name: 'selection_dynamic_provider', nullable: true })\n selectionDynamicProvider: string;\n\n @Column({ name: 'selection_dynamic_provider_ctxt', nullable: true })\n selectionDynamicProviderCtxt: string;\n\n @Column({ name: 'selection_static_values', nullable: true, type: 'simple-array' })\n selectionStaticValues: string[];\n\n @Column({ name: 'selection_value_type', nullable: true })\n selectionValueType: string = 'string';\n\n // @Column({ name: \"computed\", default: false })\n // computed: boolean;\n\n @Column({ name: 'computed_field_value_provider', nullable: true })\n computedFieldValueProvider: string;\n\n @Column({ name: 'computed_field_value_provider_ctxt', nullable: true })\n computedFieldValueProviderCtxt: string;\n\n @Column({ name: 'computed_field_value_type', nullable: true })\n computedFieldValueType: string;\n\n @Column({ name: 'computed_field_trigger_config', nullable: true, type: 'simple-json' })\n computedFieldTriggerConfig: ComputedFieldTriggerConfig[];\n\n @Column({ name: 'uuid', nullable: true })\n uuid: string;\n\n @Column({ default: false })\n isSystem: boolean;\n\n @Column({ default: false })\n isMarkedForRemoval: boolean;\n\n @Column({ name: 'column_name', nullable: true })\n columnName: string;\n\n @Column({ name: 'relation_co_model_column_name', nullable: true })\n relationCoModelColumnName: string;\n\n @Column({ name: \"is_user_key\", default: false })\n isUserKey: boolean;\n\n @Column({ name: 'relation_join_table_name', nullable: true })\n relationJoinTableName: string;\n\n @Column({ name: 'enable_audit_tracking', default: false })\n enableAuditTracking: boolean = false;\n\n @Column({ name: \"is_multiSelect\", default: false })\n isMultiSelect: boolean;\n\n @Column({ name: \"is_primary_key\", default: false })\n isPrimaryKey: boolean;\n}"]}
|
|
1
|
+
{"version":3,"file":"field-metadata.entity.js","sourceRoot":"","sources":["../../src/entities/field-metadata.entity.ts"],"names":[],"mappings":";;;;;;;;;;;;;AACA,mDAA0D;AAC1D,qCAAuE;AACvE,qGAAwF;AACxF,mEAAwD;AACxD,gEAA8D;AAGvD,IAAM,aAAa,GAAnB,MAAM,aAAc,SAAQ,4BAAY;IAAxC;;QAkHH,uBAAkB,GAAW,QAAQ,CAAC;QAuCtC,wBAAmB,GAAY,KAAK,CAAC;KAOxC;;gzFAPkC,KAAK;;CAOvC,CAAA;AAhKY,sCAAa;AAItB;IADC,IAAA,gBAAM,EAAC,EAAE,IAAI,EAAE,MAAM,EAAE,CAAC;;2CACZ;AAGb;IADC,IAAA,gBAAM,EAAC,EAAE,IAAI,EAAE,cAAc,EAAE,CAAC;;kDACb;AAGpB;IADC,IAAA,gBAAM,EAAC,EAAE,IAAI,EAAE,aAAa,EAAE,QAAQ,EAAE,IAAI,EAAE,MA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AAE,IAAI,EAAE,gBAAgB,EAAE,OAAO,EAAE,KAAK,EAAE,CAAC;;mDAC7B;wBA/Jb,aAAa;IADzB,IAAA,gBAAM,EAAC,mBAAmB,CAAC;GACf,aAAa,CAgKzB","sourcesContent":["import { ComputedFieldTriggerConfig } from \"src/dtos/create-field-metadata.dto\";\nimport { CommonEntity } from \"src/entities/common.entity\";\nimport { Column, Entity, Index, JoinColumn, ManyToOne } from \"typeorm\";\nimport { MediaStorageProviderMetadata } from \"./media-storage-provider-metadata.entity\";\nimport { ModelMetadata } from \"./model-metadata.entity\";\nimport { ERROR_MESSAGES } from \"src/constants/error-messages\";\n\n@Entity(\"ss_field_metadata\")\nexport class FieldMetadata extends CommonEntity {\n\n // @Index({ unique: true })\n @Column({ name: \"name\" })\n name: string;\n\n @Column({ name: \"display_name\" })\n displayName: string;\n\n @Column({ name: \"description\", nullable: true, length: 1024 })\n description: string;\n\n /** int, char etc... */\n @Column({ name: 'type' })\n type: string;\n\n @Column({ name: 'orm_type', nullable: true })\n ormType: string;\n\n @Index()\n @ManyToOne(() => ModelMetadata, (model) => model.fields, { onDelete: 'CASCADE' })\n @JoinColumn({ name: 'model_id', referencedColumnName: 'id' })\n model: ModelMetadata;\n\n @Column({ name: 'default_value', nullable: true })\n defaultValue: string;\n\n @Column({ name: 'regex_pattern', nullable: true })\n regexPattern: string;\n\n @Column({ name: 'regex_pattern_not_matching_error_msg', nullable: true, default: ERROR_MESSAGES.DEFAULT_REGEX_PATTERN_NOT_MATCHING_ERROR_MSG })\n regexPatternNotMatchingErrorMsg: string;\n\n @Column({ name: \"required\", default: false })\n required: boolean;\n\n @Column({ name: \"unique\", default: false })\n unique: boolean;\n\n @Column({ name: \"encrypt\", default: false })\n encrypt: boolean;\n\n @Column({ name: 'encryption_type', nullable: true })\n encryptionType: string;\n\n @Column({ name: 'decrypt_when', nullable: true })\n decryptWhen: string;\n\n @Column({ name: \"index\", default: false })\n index: boolean;\n\n @Column({ name: 'length', nullable: true })\n length: number;\n\n @Column({ name: 'max', nullable: true })\n max: number;\n\n @Column({ name: 'min', nullable: true })\n min: number;\n\n @Column({ name: \"private\", default: false })\n private: boolean;\n\n @Column({ name: 'media_types', nullable: true, type: \"simple-json\" })\n mediaTypes: string[];\n\n @Column({ name: 'media_max_size_kb', nullable: true })\n mediaMaxSizeKb: number;\n\n @ManyToOne(() => MediaStorageProviderMetadata, { onDelete: 'SET NULL' })\n @JoinColumn({ name: 'media_storage_provider_id' })\n mediaStorageProvider: MediaStorageProviderMetadata;\n\n // @Column({ name: 'media_embedded', default: true })\n // mediaEmbedded: boolean;\n\n @Column({ name: 'relation_type', nullable: true })\n relationType: string;\n\n @Column({ name: 'relation_model_singular_name', nullable: true })\n relationCoModelSingularName: string;\n\n @Column({ name: \"relation_create_inverse\", default: false })\n relationCreateInverse: boolean;\n\n @Column({ name: \"relation_cascade\", nullable: true })\n relationCascade: string;\n\n @Column({ name: 'relation_model_module_name', nullable: true })\n relationModelModuleName: string;\n\n // This field will be used to set the inverse field name in the related model e.g required for many to many relation\n @Column({ name: 'relation_model_field_name', nullable: true })\n relationCoModelFieldName: string;\n\n @Column({ name: 'is_relation_many_to_many_owner', nullable: true })\n isRelationManyToManyOwner: boolean;\n\n // We can store a filter json like this {\"fieldName\": ${someVarWhichWillComeFromParentModel... or can be hard coded...}}\n // {\"type\": \"INDUSTRY\"} .... Eg. static fixedFilter \n // {\"country_id\", \"${country}\"} ... Eg. dynamic fixedFilter \n @Column({ name: 'relation_field_fixed_filter', nullable: true })\n relationFieldFixedFilter: string;\n\n @Column({ name: 'selection_dynamic_provider', nullable: true })\n selectionDynamicProvider: string;\n\n @Column({ name: 'selection_dynamic_provider_ctxt', nullable: true })\n selectionDynamicProviderCtxt: string;\n\n @Column({ name: 'selection_static_values', nullable: true, type: 'simple-array' })\n selectionStaticValues: string[];\n\n @Column({ name: 'selection_value_type', nullable: true, default: 'string' })\n selectionValueType: string = 'string';\n\n // @Column({ name: \"computed\", default: false })\n // computed: boolean;\n\n @Column({ name: 'computed_field_value_provider', nullable: true })\n computedFieldValueProvider: string;\n\n @Column({ name: 'computed_field_value_provider_ctxt', nullable: true })\n computedFieldValueProviderCtxt: string;\n\n @Column({ name: 'computed_field_value_type', nullable: true })\n computedFieldValueType: string;\n\n @Column({ name: 'computed_field_trigger_config', nullable: true, type: 'simple-json' })\n computedFieldTriggerConfig: ComputedFieldTriggerConfig[];\n\n @Column({ name: 'uuid', nullable: true })\n uuid: string;\n\n @Column({ default: false })\n isSystem: boolean;\n\n @Column({ default: false })\n isMarkedForRemoval: boolean;\n\n @Column({ name: 'column_name', nullable: true })\n columnName: string;\n\n @Column({ name: 'relation_co_model_column_name', nullable: true })\n relationCoModelColumnName: string;\n\n @Column({ name: \"is_user_key\", default: false })\n isUserKey: boolean;\n\n @Column({ name: 'relation_join_table_name', nullable: true })\n relationJoinTableName: string;\n\n @Column({ name: 'enable_audit_tracking', default: false })\n enableAuditTracking: boolean = false;\n\n @Column({ name: \"is_multiSelect\", default: false })\n isMultiSelect: boolean;\n\n @Column({ name: \"is_primary_key\", default: false })\n isPrimaryKey: boolean;\n}"]}
|
|
@@ -1,13 +1,13 @@
|
|
|
1
1
|
export declare const LEGACY_TABLE_FIELDS_PREFIX = "ss";
|
|
2
2
|
export declare abstract class LegacyCommonEntity {
|
|
3
|
-
createdAt: Date;
|
|
4
|
-
updatedAt: Date;
|
|
5
|
-
deletedAt: Date;
|
|
6
|
-
deletedTracker: string;
|
|
7
|
-
publishedAt: Date;
|
|
8
|
-
localeName: string;
|
|
9
|
-
defaultEntityLocaleId: number;
|
|
10
|
-
createdBy: number;
|
|
11
|
-
updatedBy: number;
|
|
3
|
+
createdAt: Date | null;
|
|
4
|
+
updatedAt: Date | null;
|
|
5
|
+
deletedAt: Date | null;
|
|
6
|
+
deletedTracker: string | null;
|
|
7
|
+
publishedAt: Date | null;
|
|
8
|
+
localeName: string | null;
|
|
9
|
+
defaultEntityLocaleId: number | null;
|
|
10
|
+
createdBy: number | null;
|
|
11
|
+
updatedBy: number | null;
|
|
12
12
|
}
|
|
13
13
|
//# sourceMappingURL=legacy-common.entity.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"legacy-common.entity.d.ts","sourceRoot":"","sources":["../../src/entities/legacy-common.entity.ts"],"names":[],"mappings":"AAIA,eAAO,MAAM,0BAA0B,OAAO,CAAC;AAE/C,8BACsB,kBAAkB;IAOpC,SAAS,EAAE,IAAI,CAAC;
|
|
1
|
+
{"version":3,"file":"legacy-common.entity.d.ts","sourceRoot":"","sources":["../../src/entities/legacy-common.entity.ts"],"names":[],"mappings":"AAIA,eAAO,MAAM,0BAA0B,OAAO,CAAC;AAE/C,8BACsB,kBAAkB;IAOpC,SAAS,EAAE,IAAI,GAAG,IAAI,CAAC;IAGvB,SAAS,EAAE,IAAI,GAAG,IAAI,CAAC;IAIvB,SAAS,EAAE,IAAI,GAAG,IAAI,CAAC;IAGvB,cAAc,EAAE,MAAM,GAAG,IAAI,CAAC;IAI9B,WAAW,EAAE,IAAI,GAAG,IAAI,CAAC;IAIzB,UAAU,EAAE,MAAM,GAAG,IAAI,CAAC;IAI1B,qBAAqB,EAAE,MAAM,GAAG,IAAI,CAAC;IAgBrC,SAAS,EAAE,MAAM,GAAG,IAAI,CAAC;IAIzB,SAAS,EAAE,MAAM,GAAG,IAAI,CAAC;CAC5B"}
|
|
@@ -17,25 +17,25 @@ const typeorm_1 = require("typeorm");
|
|
|
17
17
|
exports.LEGACY_TABLE_FIELDS_PREFIX = 'ss';
|
|
18
18
|
let LegacyCommonEntity = class LegacyCommonEntity {
|
|
19
19
|
static _OPENAPI_METADATA_FACTORY() {
|
|
20
|
-
return { createdAt: { required: true, type: () => Date }, updatedAt: { required: true, type: () => Date }, deletedAt: { required: true, type: () => Date }, deletedTracker: { required: true, type: () => String }, publishedAt: { required: true, type: () => Date }, localeName: { required: true, type: () => String }, defaultEntityLocaleId: { required: true, type: () => Number }, createdBy: { required: true, type: () => Number }, updatedBy: { required: true, type: () => Number } };
|
|
20
|
+
return { createdAt: { required: true, type: () => Date, nullable: true }, updatedAt: { required: true, type: () => Date, nullable: true }, deletedAt: { required: true, type: () => Date, nullable: true }, deletedTracker: { required: true, type: () => String, nullable: true }, publishedAt: { required: true, type: () => Date, nullable: true }, localeName: { required: true, type: () => String, nullable: true }, defaultEntityLocaleId: { required: true, type: () => Number, nullable: true }, createdBy: { required: true, type: () => Number, nullable: true }, updatedBy: { required: true, type: () => Number, nullable: true } };
|
|
21
21
|
}
|
|
22
22
|
};
|
|
23
23
|
exports.LegacyCommonEntity = LegacyCommonEntity;
|
|
24
24
|
__decorate([
|
|
25
|
-
(0, typeorm_1.CreateDateColumn)({ name: `${exports.LEGACY_TABLE_FIELDS_PREFIX}_created_at`, transformer: local_date_time_transformer_1.LocalDateTimeTransformer }),
|
|
25
|
+
(0, typeorm_1.CreateDateColumn)({ name: `${exports.LEGACY_TABLE_FIELDS_PREFIX}_created_at`, transformer: local_date_time_transformer_1.LocalDateTimeTransformer, nullable: true }),
|
|
26
26
|
__metadata("design:type", Date)
|
|
27
27
|
], LegacyCommonEntity.prototype, "createdAt", void 0);
|
|
28
28
|
__decorate([
|
|
29
|
-
(0, typeorm_1.UpdateDateColumn)({ name: `${exports.LEGACY_TABLE_FIELDS_PREFIX}_updated_at`, transformer: local_date_time_transformer_1.LocalDateTimeTransformer }),
|
|
29
|
+
(0, typeorm_1.UpdateDateColumn)({ name: `${exports.LEGACY_TABLE_FIELDS_PREFIX}_updated_at`, transformer: local_date_time_transformer_1.LocalDateTimeTransformer, nullable: true }),
|
|
30
30
|
__metadata("design:type", Date)
|
|
31
31
|
], LegacyCommonEntity.prototype, "updatedAt", void 0);
|
|
32
32
|
__decorate([
|
|
33
|
-
(0, typeorm_1.DeleteDateColumn)({ name: `${exports.LEGACY_TABLE_FIELDS_PREFIX}_deleted_at`, transformer: local_date_time_transformer_1.LocalDateTimeTransformer }),
|
|
33
|
+
(0, typeorm_1.DeleteDateColumn)({ name: `${exports.LEGACY_TABLE_FIELDS_PREFIX}_deleted_at`, transformer: local_date_time_transformer_1.LocalDateTimeTransformer, nullable: true }),
|
|
34
34
|
(0, typeorm_1.Index)(),
|
|
35
35
|
__metadata("design:type", Date)
|
|
36
36
|
], LegacyCommonEntity.prototype, "deletedAt", void 0);
|
|
37
37
|
__decorate([
|
|
38
|
-
(0, typeorm_1.Column)({ name: `${exports.LEGACY_TABLE_FIELDS_PREFIX}_deleted_tracker`, default: "not-deleted" }),
|
|
38
|
+
(0, typeorm_1.Column)({ name: `${exports.LEGACY_TABLE_FIELDS_PREFIX}_deleted_tracker`, default: "not-deleted", nullable: true }),
|
|
39
39
|
__metadata("design:type", String)
|
|
40
40
|
], LegacyCommonEntity.prototype, "deletedTracker", void 0);
|
|
41
41
|
__decorate([
|
|
@@ -45,12 +45,12 @@ __decorate([
|
|
|
45
45
|
], LegacyCommonEntity.prototype, "publishedAt", void 0);
|
|
46
46
|
__decorate([
|
|
47
47
|
(0, class_transformer_1.Expose)(),
|
|
48
|
-
(0, typeorm_1.Column)({ type: "varchar", name: `${exports.LEGACY_TABLE_FIELDS_PREFIX}_locale_name`, default: null }),
|
|
48
|
+
(0, typeorm_1.Column)({ type: "varchar", name: `${exports.LEGACY_TABLE_FIELDS_PREFIX}_locale_name`, default: null, nullable: true }),
|
|
49
49
|
__metadata("design:type", String)
|
|
50
50
|
], LegacyCommonEntity.prototype, "localeName", void 0);
|
|
51
51
|
__decorate([
|
|
52
52
|
(0, class_transformer_1.Expose)(),
|
|
53
|
-
(0, typeorm_1.Column)({ type: "int", name: `${exports.LEGACY_TABLE_FIELDS_PREFIX}_default_entity_locale_id`, default: null }),
|
|
53
|
+
(0, typeorm_1.Column)({ type: "int", name: `${exports.LEGACY_TABLE_FIELDS_PREFIX}_default_entity_locale_id`, default: null, nullable: true }),
|
|
54
54
|
__metadata("design:type", Number)
|
|
55
55
|
], LegacyCommonEntity.prototype, "defaultEntityLocaleId", void 0);
|
|
56
56
|
__decorate([
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"legacy-common.entity.js","sourceRoot":"","sources":["../../src/entities/legacy-common.entity.ts"],"names":[],"mappings":";;;;;;;;;;;;;AAAA,yDAAoD;AACpD,qGAAgG;AAChG,qCAA8F;AAEjF,QAAA,0BAA0B,GAAG,IAAI,CAAC;AAGxC,IAAe,kBAAkB,GAAjC,MAAe,kBAAkB;;;;CAkDvC,CAAA;AAlDqB,gDAAkB;AAOpC;IADC,IAAA,0BAAgB,EAAC,EAAE,IAAI,EAAE,GAAG,kCAA0B,aAAa,EAAE,WAAW,EAAE,sDAAwB,EAAE,CAAC;
|
|
1
|
+
{"version":3,"file":"legacy-common.entity.js","sourceRoot":"","sources":["../../src/entities/legacy-common.entity.ts"],"names":[],"mappings":";;;;;;;;;;;;;AAAA,yDAAoD;AACpD,qGAAgG;AAChG,qCAA8F;AAEjF,QAAA,0BAA0B,GAAG,IAAI,CAAC;AAGxC,IAAe,kBAAkB,GAAjC,MAAe,kBAAkB;;;;CAkDvC,CAAA;AAlDqB,gDAAkB;AAOpC;IADC,IAAA,0BAAgB,EAAC,EAAE,IAAI,EAAE,GAAG,kCAA0B,aAAa,EAAE,WAAW,EAAE,sDAAwB,EAAE,QAAQ,EAAE,IAAI,EAAE,CAAC;8BACnH,IAAI;qDAAQ;AAGvB;IADC,IAAA,0BAAgB,EAAC,EAAE,IAAI,EAAE,GAAG,kCAA0B,aAAa,EAAE,WAAW,EAAE,sDAAwB,EAAE,QAAQ,EAAE,IAAI,EAAE,CAAC;8BACnH,IAAI;qDAAQ;AAIvB;IAFC,IAAA,0BAAgB,EAAC,EAAE,IAAI,EAAE,GAAG,kCAA0B,aAAa,EAAE,WAAW,EAAE,sDAAwB,EAAE,QAAQ,EAAE,IAAI,EAAE,CAAC;IAC7H,IAAA,eAAK,GAAE;8BACG,IAAI;qDAAQ;AAGvB;IADC,IAAA,gBAAM,EAAC,EAAE,IAAI,EAAE,GAAG,kCAA0B,kBAAkB,EAAE,OAAO,EAAE,aAAa,EAAE,QAAQ,EAAE,IAAI,EAAE,CAAC;;0DAC5E;AAI9B;IAFC,IAAA,0BAAM,GAAE;IACR,IAAA,gBAAM,EAAC,EAAE,IAAI,EAAE,GAAG,kCAA0B,eAAe,EAAE,OAAO,EAAE,IAAI,EAAE,QAAQ,EAAE,IAAI,EAAE,WAAW,EAAE,sDAAwB,EAAE,CAAC;8BACxH,IAAI;uDAAQ;AAIzB;IAFC,IAAA,0BAAM,GAAE;IACR,IAAA,gBAAM,EAAC,EAAE,IAAI,EAAE,SAAS,EAAE,IAAI,EAAE,GAAG,kCAA0B,cAAc,EAAE,OAAO,EAAE,IAAI,EAAE,QAAQ,EAAE,IAAI,EAAE,CAAC;;sDACpF;AAI1B;IAFC,IAAA,0BAAM,GAAE;IACR,IAAA,gBAAM,EAAC,EAAE,IAAI,EAAE,KAAK,EAAE,IAAI,EAAE,GAAG,kCAA0B,2BAA2B,EAAE,OAAO,EAAE,IAAI,EAAE,QAAQ,EAAE,IAAI,EAAE,CAAC;;iEAClF;AAgBrC;IAFC,IAAA,0BAAM,GAAE;IACR,IAAA,gBAAM,EAAC,EAAE,IAAI,EAAE,GAAG,kCAA0B,gBAAgB,EAAE,QAAQ,EAAE,IAAI,EAAE,CAAC;;qDACvD;AAIzB;IAFC,IAAA,0BAAM,GAAE;IACR,IAAA,gBAAM,EAAC,EAAE,IAAI,EAAE,GAAG,kCAA0B,gBAAgB,EAAE,QAAQ,EAAE,IAAI,EAAE,CAAC;;qDACvD;6BAjDP,kBAAkB;IADvC,IAAA,2BAAO,GAAE;GACY,kBAAkB,CAkDvC","sourcesContent":["import { Exclude, Expose } from \"class-transformer\";\nimport { LocalDateTimeTransformer } from \"src/transformers/typeorm/local-date-time-transformer\";\nimport { Column, CreateDateColumn, DeleteDateColumn, Index, UpdateDateColumn } from \"typeorm\";\n\nexport const LEGACY_TABLE_FIELDS_PREFIX = 'ss';\n\n@Exclude()\nexport abstract class LegacyCommonEntity {\n // @Expose()\n // @Column({ type: 'integer', name: `${LEGACY_TABLE_FIELDS_PREFIX}_id`, unique: true })\n // @Generated(\"increment\")\n // id: number\n\n @CreateDateColumn({ name: `${LEGACY_TABLE_FIELDS_PREFIX}_created_at`, transformer: LocalDateTimeTransformer, nullable: true })\n createdAt: Date | null;\n\n @UpdateDateColumn({ name: `${LEGACY_TABLE_FIELDS_PREFIX}_updated_at`, transformer: LocalDateTimeTransformer, nullable: true })\n updatedAt: Date | null;\n\n @DeleteDateColumn({ name: `${LEGACY_TABLE_FIELDS_PREFIX}_deleted_at`, transformer: LocalDateTimeTransformer, nullable: true })\n @Index()\n deletedAt: Date | null;\n\n @Column({ name: `${LEGACY_TABLE_FIELDS_PREFIX}_deleted_tracker`, default: \"not-deleted\", nullable: true })\n deletedTracker: string | null;\n\n @Expose()\n @Column({ name: `${LEGACY_TABLE_FIELDS_PREFIX}_published_at`, default: null, nullable: true, transformer: LocalDateTimeTransformer })\n publishedAt: Date | null;\n\n @Expose()\n @Column({ type: \"varchar\", name: `${LEGACY_TABLE_FIELDS_PREFIX}_locale_name`, default: null, nullable: true })\n localeName: string | null;\n\n @Expose()\n @Column({ type: \"int\", name: `${LEGACY_TABLE_FIELDS_PREFIX}_default_entity_locale_id`, default: null, nullable: true })\n defaultEntityLocaleId: number | null;\n\n // @Expose()\n // @Type( () => require('./user.entity').User?.default ?? require('./user.entity').User )\n // @ManyToOne(() => require('./user.entity').User?.default ?? require('./user.entity').User, { nullable: true })\n // @JoinColumn({ name: `${LEGACY_TABLE_FIELDS_PREFIX}_created_by_id` })\n // createdBy: User;\n\n // @Expose()\n // @Type( () => require('./user.entity').User?.default ?? require('./user.entity').User )\n // @ManyToOne(() => require('./user.entity').User?.default ?? require('./user.entity').User, { nullable: true })\n // @JoinColumn({ name: `${LEGACY_TABLE_FIELDS_PREFIX}_updated_by_id` })\n // updatedBy: User; \n\n @Expose()\n @Column({ name: `${LEGACY_TABLE_FIELDS_PREFIX}_created_by_id`, nullable: true })\n createdBy: number | null;\n\n @Expose()\n @Column({ name: `${LEGACY_TABLE_FIELDS_PREFIX}_updated_by_id`, nullable: true })\n updatedBy: number | null;\n}\n"]}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"setting.entity.d.ts","sourceRoot":"","sources":["../../src/entities/setting.entity.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,YAAY,EAAE,MAAM,4BAA4B,CAAA;AAEzD,OAAO,EAAE,IAAI,EAAE,MAAM,0BAA0B,CAAA;AAC/C,OAAO,EAAE,cAAc,EAAE,MAAM,0BAA0B,CAAC;AAE1D,qBACa,OAAQ,SAAQ,YAAY;IAIrC,GAAG,EAAE,MAAM,CAAC;IAGZ,KAAK,EAAE,MAAM,CAAC;IAGd,IAAI,EAAE,MAAM,CAAC;IAGb,KAAK,EAAE,MAAM,CAAC;
|
|
1
|
+
{"version":3,"file":"setting.entity.d.ts","sourceRoot":"","sources":["../../src/entities/setting.entity.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,YAAY,EAAE,MAAM,4BAA4B,CAAA;AAEzD,OAAO,EAAE,IAAI,EAAE,MAAM,0BAA0B,CAAA;AAC/C,OAAO,EAAE,cAAc,EAAE,MAAM,0BAA0B,CAAC;AAE1D,qBACa,OAAQ,SAAQ,YAAY;IAIrC,GAAG,EAAE,MAAM,CAAC;IAGZ,KAAK,EAAE,MAAM,CAAC;IAGd,IAAI,EAAE,MAAM,CAAC;IAGb,KAAK,EAAE,MAAM,CAAC;IAGd,SAAS,EAAE,OAAO,CAAC;IAKnB,IAAI,EAAE,IAAI,CAAC;IAKX,cAAc,EAAE,cAAc,CAAC;CAClC"}
|
|
@@ -17,7 +17,7 @@ const user_entity_1 = require("./user.entity");
|
|
|
17
17
|
const module_metadata_entity_1 = require("./module-metadata.entity");
|
|
18
18
|
let Setting = class Setting extends common_entity_1.CommonEntity {
|
|
19
19
|
static _OPENAPI_METADATA_FACTORY() {
|
|
20
|
-
return { key: { required: true, type: () => String }, value: { required: true, type: () => String }, type: { required: true, type: () => String }, level: { required: true, type: () => String }, user: { required: true, type: () => require("./user.entity").User }, moduleMetadata: { required: true, type: () => require("./module-metadata.entity").ModuleMetadata } };
|
|
20
|
+
return { key: { required: true, type: () => String }, value: { required: true, type: () => String }, type: { required: true, type: () => String }, level: { required: true, type: () => String }, encrypted: { required: true, type: () => Boolean }, user: { required: true, type: () => require("./user.entity").User }, moduleMetadata: { required: true, type: () => require("./module-metadata.entity").ModuleMetadata } };
|
|
21
21
|
}
|
|
22
22
|
};
|
|
23
23
|
exports.Setting = Setting;
|
|
@@ -38,6 +38,10 @@ __decorate([
|
|
|
38
38
|
(0, typeorm_1.Column)({ name: "level", type: "varchar", nullable: true }),
|
|
39
39
|
__metadata("design:type", String)
|
|
40
40
|
], Setting.prototype, "level", void 0);
|
|
41
|
+
__decorate([
|
|
42
|
+
(0, typeorm_1.Column)({ name: "encrypted", type: "boolean", default: false }),
|
|
43
|
+
__metadata("design:type", Boolean)
|
|
44
|
+
], Setting.prototype, "encrypted", void 0);
|
|
41
45
|
__decorate([
|
|
42
46
|
(0, typeorm_1.Index)(),
|
|
43
47
|
(0, typeorm_1.ManyToOne)(() => user_entity_1.User, { nullable: true }),
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"setting.entity.js","sourceRoot":"","sources":["../../src/entities/setting.entity.ts"],"names":[],"mappings":";;;;;;;;;;;;;AAAA,mDAAyD;AACzD,qCAAuE;AACvE,+CAA+C;AAC/C,qEAA0D;AAGnD,IAAM,OAAO,GAAb,MAAM,OAAQ,SAAQ,4BAAY;;;;
|
|
1
|
+
{"version":3,"file":"setting.entity.js","sourceRoot":"","sources":["../../src/entities/setting.entity.ts"],"names":[],"mappings":";;;;;;;;;;;;;AAAA,mDAAyD;AACzD,qCAAuE;AACvE,+CAA+C;AAC/C,qEAA0D;AAGnD,IAAM,OAAO,GAAb,MAAM,OAAQ,SAAQ,4BAAY;;;;CA2BxC,CAAA;AA3BY,0BAAO;AAIhB;IAFC,IAAA,eAAK,EAAC,EAAE,MAAM,EAAE,IAAI,EAAE,CAAC;IACvB,IAAA,gBAAM,EAAC,EAAE,IAAI,EAAE,SAAS,EAAE,QAAQ,EAAE,KAAK,EAAE,CAAC;;oCACjC;AAGZ;IADC,IAAA,gBAAM,EAAC,EAAE,IAAI,EAAE,SAAS,EAAE,QAAQ,EAAE,IAAI,EAAE,CAAC;;sCAC9B;AAGd;IADC,IAAA,gBAAM,EAAC,EAAE,IAAI,EAAE,MAAM,EAAE,IAAI,EAAE,SAAS,EAAE,QAAQ,EAAE,IAAI,EAAE,CAAC;;qCAC7C;AAGb;IADC,IAAA,gBAAM,EAAC,EAAE,IAAI,EAAE,OAAO,EAAE,IAAI,EAAE,SAAS,EAAE,QAAQ,EAAE,IAAI,EAAE,CAAC;;sCAC7C;AAGd;IADC,IAAA,gBAAM,EAAC,EAAE,IAAI,EAAE,WAAW,EAAE,IAAI,EAAE,SAAS,EAAE,OAAO,EAAE,KAAK,EAAE,CAAC;;0CAC5C;AAKnB;IAHC,IAAA,eAAK,GAAE;IACP,IAAA,mBAAS,EAAC,GAAG,EAAE,CAAC,kBAAI,EAAE,EAAE,QAAQ,EAAE,IAAI,EAAE,CAAC;IACzC,IAAA,oBAAU,GAAE;8BACP,kBAAI;qCAAC;AAKX;IAHC,IAAA,eAAK,GAAE;IACP,IAAA,mBAAS,EAAC,GAAG,EAAE,CAAC,uCAAc,EAAE,EAAE,QAAQ,EAAE,IAAI,EAAE,CAAC;IACnD,IAAA,oBAAU,GAAE;8BACG,uCAAc;+CAAC;kBA1BtB,OAAO;IADnB,IAAA,gBAAM,EAAC,YAAY,CAAC;GACR,OAAO,CA2BnB","sourcesContent":["import { CommonEntity } from 'src/entities/common.entity'\nimport { Entity, Column, Index, JoinColumn, ManyToOne } from 'typeorm';\nimport { User } from 'src/entities/user.entity'\nimport { ModuleMetadata } from './module-metadata.entity';\n\n@Entity(\"ss_setting\")\nexport class Setting extends CommonEntity {\n\n @Index({ unique: true })\n @Column({ type: \"varchar\", nullable: false })\n key: string;\n\n @Column({ type: \"varchar\", nullable: true })\n value: string;\n\n @Column({ name: \"type\", type: \"varchar\", nullable: true })\n type: string;\n\n @Column({ name: \"level\", type: \"varchar\", nullable: true })\n level: string;\n\n @Column({ name: \"encrypted\", type: \"boolean\", default: false })\n encrypted: boolean;\n\n @Index()\n @ManyToOne(() => User, { nullable: true })\n @JoinColumn()\n user: User;\n\n @Index()\n @ManyToOne(() => ModuleMetadata, { nullable: true })\n @JoinColumn()\n moduleMetadata: ModuleMetadata;\n}\n"]}
|