@solidxai/core 0.1.8-beta.3 → 0.1.8-beta.5
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/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/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 +20 -45
- 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 +14 -39
- package/dist/entities/agent-session.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/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/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 +0 -92
- 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/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/package.json +1 -1
- package/src/dtos/post-chatter-message.dto.ts +4 -0
- package/src/entities/agent-event.entity.ts +20 -54
- package/src/entities/agent-session.entity.ts +14 -46
- package/src/entities/legacy-common.entity.ts +15 -15
- package/src/helpers/typeorm-db-helper.ts +11 -0
- package/src/seeders/module-test-data.service.ts +165 -6
- package/src/seeders/seed-data/solid-core-metadata.json +0 -92
- package/src/services/chatter-message.service.ts +7 -0
- package/src/services/export-transaction.service.ts +0 -26
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"post-chatter-message.dto.d.ts","sourceRoot":"","sources":["../../src/dtos/post-chatter-message.dto.ts"],"names":[],"mappings":"AAEA,qBAAa,qBAAqB;IAG9B,eAAe,EAAE,MAAM,CAAC;IAIxB,WAAW,EAAE,MAAM,CAAC;IAIpB,WAAW,EAAE,MAAM,CAAC;IAIpB,cAAc,CAAC,EAAE,MAAM,CAAC;
|
|
1
|
+
{"version":3,"file":"post-chatter-message.dto.d.ts","sourceRoot":"","sources":["../../src/dtos/post-chatter-message.dto.ts"],"names":[],"mappings":"AAEA,qBAAa,qBAAqB;IAG9B,eAAe,EAAE,MAAM,CAAC;IAIxB,WAAW,EAAE,MAAM,CAAC;IAIpB,WAAW,EAAE,MAAM,CAAC;IAIpB,cAAc,CAAC,EAAE,MAAM,CAAC;IAIxB,YAAY,CAAC,EAAE,MAAM,CAAC;CACzB"}
|
|
@@ -14,7 +14,7 @@ const openapi = require("@nestjs/swagger");
|
|
|
14
14
|
const class_validator_1 = require("class-validator");
|
|
15
15
|
class PostChatterMessageDto {
|
|
16
16
|
static _OPENAPI_METADATA_FACTORY() {
|
|
17
|
-
return { coModelEntityId: { required: true, type: () => Number }, coModelName: { required: true, type: () => String }, messageBody: { required: true, type: () => String }, messageSubType: { required: false, type: () => String } };
|
|
17
|
+
return { coModelEntityId: { required: true, type: () => Number }, coModelName: { required: true, type: () => String }, messageBody: { required: true, type: () => String }, messageSubType: { required: false, type: () => String }, modelUserKey: { required: false, type: () => String } };
|
|
18
18
|
}
|
|
19
19
|
}
|
|
20
20
|
exports.PostChatterMessageDto = PostChatterMessageDto;
|
|
@@ -38,4 +38,9 @@ __decorate([
|
|
|
38
38
|
(0, class_validator_1.IsOptional)(),
|
|
39
39
|
__metadata("design:type", String)
|
|
40
40
|
], PostChatterMessageDto.prototype, "messageSubType", void 0);
|
|
41
|
+
__decorate([
|
|
42
|
+
(0, class_validator_1.IsString)(),
|
|
43
|
+
(0, class_validator_1.IsOptional)(),
|
|
44
|
+
__metadata("design:type", String)
|
|
45
|
+
], PostChatterMessageDto.prototype, "modelUserKey", void 0);
|
|
41
46
|
//# sourceMappingURL=post-chatter-message.dto.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"post-chatter-message.dto.js","sourceRoot":"","sources":["../../src/dtos/post-chatter-message.dto.ts"],"names":[],"mappings":";;;;;;;;;;;;;AAAA,qDAA6E;AAE7E,MAAa,qBAAqB;;;;
|
|
1
|
+
{"version":3,"file":"post-chatter-message.dto.js","sourceRoot":"","sources":["../../src/dtos/post-chatter-message.dto.ts"],"names":[],"mappings":";;;;;;;;;;;;;AAAA,qDAA6E;AAE7E,MAAa,qBAAqB;;;;CAoBjC;AApBD,sDAoBC;AAjBG;IAFC,IAAA,0BAAQ,GAAE;IACV,IAAA,4BAAU,GAAE;;8DACW;AAIxB;IAFC,IAAA,0BAAQ,GAAE;IACV,IAAA,4BAAU,GAAE;;0DACO;AAIpB;IAFC,IAAA,0BAAQ,GAAE;IACV,IAAA,4BAAU,GAAE;;0DACO;AAIpB;IAFC,IAAA,0BAAQ,GAAE;IACV,IAAA,4BAAU,GAAE;;6DACW;AAIxB;IAFC,IAAA,0BAAQ,GAAE;IACV,IAAA,4BAAU,GAAE;;2DACS","sourcesContent":["import { IsNotEmpty, IsNumber, IsString, IsOptional } from 'class-validator';\n\nexport class PostChatterMessageDto {\n @IsNumber()\n @IsNotEmpty()\n coModelEntityId: number;\n\n @IsString()\n @IsNotEmpty()\n coModelName: string;\n\n @IsString()\n @IsNotEmpty()\n messageBody: string;\n\n @IsString()\n @IsOptional()\n messageSubType?: string;\n\n @IsString()\n @IsOptional()\n modelUserKey?: string;\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, class_transformer_1.Exclude)(),
|
|
112
87
|
(0, typeorm_1.Entity)({ name: 'ss_agent_events', synchronize: false })
|
|
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;IACP,IAAA,gBAAM,EAAC,EAAG,CAAC;;6CACM;AAGlB;IADC,IAAA,gBAAM,EAAC,EAAG,CAAC;;8CACO;AAGnB;IADC,IAAA,gBAAM,EAAC,EAAE,QAAQ,EAAE,IAAI,EAAE,CAAC;;8CACR;AAInB;IAFC,IAAA,eAAK,GAAE;IACP,IAAA,gBAAM,EAAC,EAAG,CAAC;;6CACM;AAGlB;IADC,IAAA,gBAAM,EAAC,EAAE,IAAI,EAAE,aAAa,EAAE,QAAQ,EAAE,IAAI,EAAE,GAAG,IAAA,iCAAa,EAAC,qBAAqB,CAAC,EAAE,CAAC;;6CAC1E;AAGf;IADC,IAAA,gBAAM,EAAC,EAAE,QAAQ,EAAE,IAAI,EAAE,GAAG,IAAA,iCAAa,EAAC,UAAU,CAAC,EAAE,CAAC;;2CACzC;AAIhB;IAFC,IAAA,eAAK,GAAE;IACP,IAAA,gBAAM,EAAC,EAAE,QAAQ,EAAE,IAAI,EAAE,CAAC;;4CACV;AAGjB;IADC,IAAA,gBAAM,EAAC,EAAE,IAAI,EAAE,aAAa,EAAE,QAAQ,EAAE,IAAI,EAAE,GAAG,IAAA,iCAAa,EAAC,qBAAqB,CAAC,EAAE,CAAC;;iDACnE;AAGtB;IADC,IAAA,gBAAM,EAAC,EAAE,QAAQ,EAAE,IAAI,EAAE,GAAG,IAAA,iCAAa,EAAC,UAAU,CAAC,EAAE,CAAC;;8CACtC;AAGnB;IADC,IAAA,gBAAM,EAAC,EAAE,QAAQ,EAAE,IAAI,EAAE,CAAC;;kDACJ;AAGvB;IADC,IAAA,gBAAM,EAAC,EAAE,QAAQ,EAAE,IAAI,EAAE,GAAG,IAAA,iCAAa,EAAC,SAAS,CAAC,EAAE,CAAC;;8CACrC;AAGnB;IADC,IAAA,gBAAM,EAAC,EAAE,QAAQ,EAAE,IAAI,EAAE,GAAG,IAAA,iCAAa,EAAC,SAAS,CAAC,EAAE,CAAC;;wCAC3C;AAGb;IADC,IAAA,gBAAM,EAAC,EAAE,QAAQ,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,WAAW,EAAE,KAAK,EAAE,CAAC;GAC3C,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', synchronize: false })\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, class_transformer_1.Exclude)(),
|
|
92
67
|
(0, typeorm_1.Entity)({ name: 'ss_agent_sessions', synchronize: false })
|
|
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,WAAW,EAAE,KAAK,EAAE,CAAC;GAC7C,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', synchronize: false })\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"]}
|
|
@@ -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":"typeorm-db-helper.d.ts","sourceRoot":"","sources":["../../src/helpers/typeorm-db-helper.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,aAAa,EAAE,MAAM,SAAS,CAAC;
|
|
1
|
+
{"version":3,"file":"typeorm-db-helper.d.ts","sourceRoot":"","sources":["../../src/helpers/typeorm-db-helper.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,aAAa,EAAE,MAAM,SAAS,CAAC;AA+CxC,wBAAgB,aAAa,CAAC,SAAS,EAAE,MAAM,GAAG,aAAa,CAe9D"}
|
|
@@ -28,6 +28,13 @@ const SIMPLE_JSON_LARGE_TEXT_MAP = {
|
|
|
28
28
|
},
|
|
29
29
|
[create_model_metadata_dto_1.DatasourceType.oracle]: { type: "clob" },
|
|
30
30
|
};
|
|
31
|
+
const DECIMAL_MAP = {
|
|
32
|
+
[create_model_metadata_dto_1.DatasourceType.postgres]: { type: "float4" },
|
|
33
|
+
[create_model_metadata_dto_1.DatasourceType.mssql]: { type: "float" },
|
|
34
|
+
[create_model_metadata_dto_1.DatasourceType.mysql]: { type: "float" },
|
|
35
|
+
[create_model_metadata_dto_1.DatasourceType.mariadb]: { type: "float" },
|
|
36
|
+
[create_model_metadata_dto_1.DatasourceType.oracle]: { type: "float" },
|
|
37
|
+
};
|
|
31
38
|
const solidCoreDbType = Object.values(create_model_metadata_dto_1.DatasourceType).includes(process.env.SOLID_CORE_DB_TYPE)
|
|
32
39
|
? process.env.SOLID_CORE_DB_TYPE
|
|
33
40
|
: create_model_metadata_dto_1.DatasourceType.postgres;
|
|
@@ -38,6 +45,8 @@ function getColumnType(solidType) {
|
|
|
38
45
|
return LONG_TEXT_MAP[solidCoreDbType];
|
|
39
46
|
case "simpleJsonLargeText":
|
|
40
47
|
return SIMPLE_JSON_LARGE_TEXT_MAP[solidCoreDbType];
|
|
48
|
+
case "decimal":
|
|
49
|
+
return DECIMAL_MAP[solidCoreDbType];
|
|
41
50
|
default:
|
|
42
51
|
return {};
|
|
43
52
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"typeorm-db-helper.js","sourceRoot":"","sources":["../../src/helpers/typeorm-db-helper.ts"],"names":[],"mappings":";;
|
|
1
|
+
{"version":3,"file":"typeorm-db-helper.js","sourceRoot":"","sources":["../../src/helpers/typeorm-db-helper.ts"],"names":[],"mappings":"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","sourcesContent":["import { ColumnOptions } from \"typeorm\";\nimport { DatasourceType } from \"src/dtos/create-model-metadata.dto\";\n\nconst LONG_TEXT_MAP: Record<DatasourceType, ColumnOptions> = {\n [DatasourceType.postgres]: { type: \"text\" },\n [DatasourceType.mssql]: { type: \"nvarchar\", length: \"max\" },\n [DatasourceType.mysql]: { type: \"longtext\" },\n [DatasourceType.mariadb]: { type: \"longtext\" },\n [DatasourceType.oracle]: { type: \"clob\" },\n};\n\n// For simple-json columns that may contain large payloads: on MySQL/MariaDB the default\n// TEXT backing store is limited to 64 KB, so we override the type to longtext and supply\n// an explicit JSON transformer so TypeORM still serialises/deserialises correctly.\nconst SIMPLE_JSON_LARGE_TEXT_MAP: Record<DatasourceType, ColumnOptions> = {\n [DatasourceType.postgres]: {},\n [DatasourceType.mssql]: {},\n [DatasourceType.mysql]: {\n type: \"longtext\",\n transformer: {\n to: (value: any) => (value !== undefined && value !== null ? JSON.stringify(value) : value),\n from: (value: any) => (value !== null && value !== undefined ? JSON.parse(value) : value),\n },\n },\n [DatasourceType.mariadb]: {\n type: \"longtext\",\n transformer: {\n to: (value: any) => (value !== undefined && value !== null ? JSON.stringify(value) : value),\n from: (value: any) => (value !== null && value !== undefined ? JSON.parse(value) : value),\n },\n },\n [DatasourceType.oracle]: { type: \"clob\" },\n};\n\nconst DECIMAL_MAP: Record<DatasourceType, ColumnOptions> = {\n [DatasourceType.postgres]: { type: \"float4\" },\n [DatasourceType.mssql]: { type: \"float\" },\n [DatasourceType.mysql]: { type: \"float\" },\n [DatasourceType.mariadb]: { type: \"float\" },\n [DatasourceType.oracle]: { type: \"float\" },\n};\n\nconst solidCoreDbType: DatasourceType =\n Object.values(DatasourceType).includes(process.env.SOLID_CORE_DB_TYPE as DatasourceType)\n ? (process.env.SOLID_CORE_DB_TYPE as DatasourceType)\n : DatasourceType.postgres;\n\nexport function getColumnType(solidType: string): ColumnOptions {\n switch (solidType) {\n case \"longText\":\n case \"richText\":\n return LONG_TEXT_MAP[solidCoreDbType];\n\n case \"simpleJsonLargeText\":\n return SIMPLE_JSON_LARGE_TEXT_MAP[solidCoreDbType];\n\n case \"decimal\":\n return DECIMAL_MAP[solidCoreDbType];\n\n default:\n return {};\n }\n}"]}
|
|
@@ -11,6 +11,11 @@ export declare class ModuleTestDataService {
|
|
|
11
11
|
deleteTestDatasources(): Promise<void>;
|
|
12
12
|
private get testDataFiles();
|
|
13
13
|
private seedTestData;
|
|
14
|
+
private seedMultiRelations;
|
|
15
|
+
private seedEntityMedia;
|
|
16
|
+
private get entityManager();
|
|
17
|
+
private get modelMetadataService();
|
|
18
|
+
private get mediaRepository();
|
|
14
19
|
private resolveRepository;
|
|
15
20
|
private generateDbRunName;
|
|
16
21
|
private getTimestamp;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"module-test-data.service.d.ts","sourceRoot":"","sources":["../../src/seeders/module-test-data.service.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,gBAAgB,EAAE,SAAS,EAAE,MAAM,cAAc,CAAC;
|
|
1
|
+
{"version":3,"file":"module-test-data.service.d.ts","sourceRoot":"","sources":["../../src/seeders/module-test-data.service.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,gBAAgB,EAAE,SAAS,EAAE,MAAM,cAAc,CAAC;AAY3D,OAAO,EAAE,aAAa,EAAE,MAAM,4BAA4B,CAAC;AAK3D,qBACa,qBAAqB;IAI9B,OAAO,CAAC,QAAQ,CAAC,SAAS;IAC1B,OAAO,CAAC,QAAQ,CAAC,gBAAgB;IACjC,OAAO,CAAC,QAAQ,CAAC,aAAa;IALhC,OAAO,CAAC,QAAQ,CAAC,MAAM,CAA0C;gBAG9C,SAAS,EAAE,SAAS,EACpB,gBAAgB,EAAE,gBAAgB,EAClC,aAAa,EAAE,aAAa;IAGzC,aAAa,CAAC,aAAa,CAAC,EAAE,MAAM,EAAE,GAAG,OAAO,CAAC,IAAI,CAAC;IAmBtD,qBAAqB,IAAI,OAAO,CAAC,IAAI,CAAC;IAqEtC,qBAAqB,IAAI,OAAO,CAAC,IAAI,CAAC;IAoD5C,OAAO,KAAK,aAAa,GAexB;YAEa,YAAY;YAkHZ,kBAAkB;YAsDlB,eAAe;IAsD7B,OAAO,KAAK,aAAa,GAExB;IAED,OAAO,KAAK,oBAAoB,GAE/B;IAED,OAAO,KAAK,eAAe,GAE1B;IAED,OAAO,CAAC,iBAAiB;IAqBzB,OAAO,CAAC,iBAAiB;IAczB,OAAO,CAAC,YAAY;IAMpB,OAAO,CAAC,oBAAoB;YA4Bd,yBAAyB;IA6BvC,OAAO,CAAC,uBAAuB;IAa/B,OAAO,CAAC,kBAAkB;YAmCZ,uBAAuB;YA4BvB,eAAe;CA4B9B"}
|