@solidxai/core 0.1.8-beta.0 → 0.1.8-beta.10
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/controllers/agent-event.controller.d.ts +35 -0
- package/dist/controllers/agent-event.controller.d.ts.map +1 -0
- package/dist/controllers/agent-event.controller.js +147 -0
- package/dist/controllers/agent-event.controller.js.map +1 -0
- package/dist/controllers/agent-session.controller.d.ts +35 -0
- package/dist/controllers/agent-session.controller.d.ts.map +1 -0
- package/dist/controllers/agent-session.controller.js +147 -0
- package/dist/controllers/agent-session.controller.js.map +1 -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-agent-event.dto.d.ts +19 -0
- package/dist/dtos/create-agent-event.dto.d.ts.map +1 -0
- package/dist/dtos/create-agent-event.dto.js +118 -0
- package/dist/dtos/create-agent-event.dto.js.map +1 -0
- package/dist/dtos/create-agent-session.dto.d.ts +15 -0
- package/dist/dtos/create-agent-session.dto.d.ts.map +1 -0
- package/dist/dtos/create-agent-session.dto.js +94 -0
- package/dist/dtos/create-agent-session.dto.js.map +1 -0
- 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-agent-event.dto.d.ts +19 -0
- package/dist/dtos/update-agent-event.dto.d.ts.map +1 -0
- package/dist/dtos/update-agent-event.dto.js +117 -0
- package/dist/dtos/update-agent-event.dto.js.map +1 -0
- package/dist/dtos/update-agent-session.dto.d.ts +15 -0
- package/dist/dtos/update-agent-session.dto.d.ts.map +1 -0
- package/dist/dtos/update-agent-session.dto.js +93 -0
- package/dist/dtos/update-agent-session.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 +19 -0
- package/dist/entities/agent-event.entity.d.ts.map +1 -0
- package/dist/entities/agent-event.entity.js +89 -0
- package/dist/entities/agent-event.entity.js.map +1 -0
- package/dist/entities/agent-session.entity.d.ts +14 -0
- package/dist/entities/agent-session.entity.d.ts.map +1 -0
- package/dist/entities/agent-session.entity.js +69 -0
- package/dist/entities/agent-session.entity.js.map +1 -0
- 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/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 +9 -0
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +9 -0
- package/dist/index.js.map +1 -1
- package/dist/repository/agent-event.repository.d.ts +12 -0
- package/dist/repository/agent-event.repository.d.ts.map +1 -0
- package/dist/repository/agent-event.repository.js +34 -0
- package/dist/repository/agent-event.repository.js.map +1 -0
- package/dist/repository/agent-session.repository.d.ts +12 -0
- package/dist/repository/agent-session.repository.d.ts.map +1 -0
- package/dist/repository/agent-session.repository.js +34 -0
- package/dist/repository/agent-session.repository.js.map +1 -0
- 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 +987 -83
- package/dist/services/agent-event.service.d.ts +12 -0
- package/dist/services/agent-event.service.d.ts.map +1 -0
- package/dist/services/agent-event.service.js +38 -0
- package/dist/services/agent-event.service.js.map +1 -0
- package/dist/services/agent-session.service.d.ts +12 -0
- package/dist/services/agent-session.service.d.ts.map +1 -0
- package/dist/services/agent-session.service.js +38 -0
- package/dist/services/agent-session.service.js.map +1 -0
- 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/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/model-metadata.service.d.ts.map +1 -1
- package/dist/services/model-metadata.service.js +6 -0
- package/dist/services/model-metadata.service.js.map +1 -1
- package/dist/services/module-metadata.service.d.ts.map +1 -1
- package/dist/services/module-metadata.service.js +6 -0
- package/dist/services/module-metadata.service.js.map +1 -1
- package/dist/services/settings/default-settings-provider.service.d.ts.map +1 -1
- package/dist/services/settings/default-settings-provider.service.js +5 -2
- 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-activity-history.service.d.ts +1 -0
- package/dist/services/user-activity-history.service.d.ts.map +1 -1
- package/dist/services/user-activity-history.service.js +17 -10
- package/dist/services/user-activity-history.service.js.map +1 -1
- 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/services/view-metadata.service.js +1 -1
- package/dist/services/view-metadata.service.js.map +1 -1
- package/dist/solid-core.module.d.ts.map +1 -1
- package/dist/solid-core.module.js +26 -0
- package/dist/solid-core.module.js.map +1 -1
- package/package.json +1 -1
- package/src/controllers/agent-event.controller.ts +70 -0
- package/src/controllers/agent-session.controller.ts +70 -0
- package/src/controllers/authentication.controller.ts +59 -3
- package/src/dtos/create-agent-event.dto.ts +84 -0
- package/src/dtos/create-agent-session.dto.ts +64 -0
- 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-agent-event.dto.ts +83 -0
- package/src/dtos/update-agent-session.dto.ts +63 -0
- package/src/dtos/update-api-key.dto.ts +9 -0
- package/src/entities/agent-event.entity.ts +54 -0
- package/src/entities/agent-session.entity.ts +39 -0
- package/src/entities/field-metadata.entity.ts +1 -1
- package/src/entities/legacy-common.entity.ts +15 -15
- 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 +9 -0
- package/src/repository/agent-event.repository.ts +17 -0
- package/src/repository/agent-session.repository.ts +17 -0
- 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 +987 -83
- package/src/services/agent-event.service.ts +19 -0
- package/src/services/agent-session.service.ts +19 -0
- 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/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/model-metadata.service.ts +1 -0
- package/src/services/module-metadata.service.ts +1 -2
- package/src/services/settings/default-settings-provider.service.ts +5 -2
- package/src/services/sso-code-storage.service.ts +36 -0
- package/src/services/user-activity-history.service.ts +16 -10
- package/src/services/user.service.ts +3 -2
- package/src/services/view-metadata.service.ts +1 -1
- package/src/solid-core.module.ts +26 -0
|
@@ -0,0 +1,93 @@
|
|
|
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.UpdateAgentSessionDto = 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 UpdateAgentSessionDto {
|
|
17
|
+
static _OPENAPI_METADATA_FACTORY() {
|
|
18
|
+
return { id: { required: true, type: () => Number }, 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 }, updatedAt: { required: true, type: () => Date } };
|
|
19
|
+
}
|
|
20
|
+
}
|
|
21
|
+
exports.UpdateAgentSessionDto = UpdateAgentSessionDto;
|
|
22
|
+
__decorate([
|
|
23
|
+
(0, class_validator_1.IsOptional)(),
|
|
24
|
+
(0, class_validator_1.IsInt)(),
|
|
25
|
+
__metadata("design:type", Number)
|
|
26
|
+
], UpdateAgentSessionDto.prototype, "id", void 0);
|
|
27
|
+
__decorate([
|
|
28
|
+
(0, class_validator_1.IsOptional)(),
|
|
29
|
+
(0, class_validator_1.IsString)(),
|
|
30
|
+
(0, swagger_1.ApiProperty)(),
|
|
31
|
+
__metadata("design:type", String)
|
|
32
|
+
], UpdateAgentSessionDto.prototype, "sessionId", void 0);
|
|
33
|
+
__decorate([
|
|
34
|
+
(0, class_validator_1.IsOptional)(),
|
|
35
|
+
(0, class_validator_1.IsInt)(),
|
|
36
|
+
(0, swagger_1.ApiProperty)(),
|
|
37
|
+
__metadata("design:type", Number)
|
|
38
|
+
], UpdateAgentSessionDto.prototype, "userId", void 0);
|
|
39
|
+
__decorate([
|
|
40
|
+
(0, class_validator_1.IsOptional)(),
|
|
41
|
+
(0, class_validator_1.IsString)(),
|
|
42
|
+
(0, swagger_1.ApiProperty)(),
|
|
43
|
+
__metadata("design:type", String)
|
|
44
|
+
], UpdateAgentSessionDto.prototype, "projectRoot", void 0);
|
|
45
|
+
__decorate([
|
|
46
|
+
(0, class_validator_1.IsOptional)(),
|
|
47
|
+
(0, class_validator_1.IsString)(),
|
|
48
|
+
(0, swagger_1.ApiProperty)(),
|
|
49
|
+
__metadata("design:type", String)
|
|
50
|
+
], UpdateAgentSessionDto.prototype, "modelName", void 0);
|
|
51
|
+
__decorate([
|
|
52
|
+
(0, class_validator_1.IsOptional)(),
|
|
53
|
+
(0, class_validator_1.IsString)(),
|
|
54
|
+
(0, swagger_1.ApiProperty)(),
|
|
55
|
+
__metadata("design:type", String)
|
|
56
|
+
], UpdateAgentSessionDto.prototype, "status", void 0);
|
|
57
|
+
__decorate([
|
|
58
|
+
(0, class_validator_1.IsOptional)(),
|
|
59
|
+
(0, class_validator_1.IsNumber)(),
|
|
60
|
+
(0, swagger_1.ApiProperty)(),
|
|
61
|
+
__metadata("design:type", Number)
|
|
62
|
+
], UpdateAgentSessionDto.prototype, "totalCost", void 0);
|
|
63
|
+
__decorate([
|
|
64
|
+
(0, class_validator_1.IsOptional)(),
|
|
65
|
+
(0, class_validator_1.IsInt)(),
|
|
66
|
+
(0, swagger_1.ApiProperty)(),
|
|
67
|
+
__metadata("design:type", Number)
|
|
68
|
+
], UpdateAgentSessionDto.prototype, "totalSteps", void 0);
|
|
69
|
+
__decorate([
|
|
70
|
+
(0, class_validator_1.IsOptional)(),
|
|
71
|
+
(0, class_validator_1.IsInt)(),
|
|
72
|
+
(0, swagger_1.ApiProperty)(),
|
|
73
|
+
__metadata("design:type", Number)
|
|
74
|
+
], UpdateAgentSessionDto.prototype, "totalInputTokens", void 0);
|
|
75
|
+
__decorate([
|
|
76
|
+
(0, class_validator_1.IsOptional)(),
|
|
77
|
+
(0, class_validator_1.IsInt)(),
|
|
78
|
+
(0, swagger_1.ApiProperty)(),
|
|
79
|
+
__metadata("design:type", Number)
|
|
80
|
+
], UpdateAgentSessionDto.prototype, "totalOutputTokens", void 0);
|
|
81
|
+
__decorate([
|
|
82
|
+
(0, class_validator_1.IsOptional)(),
|
|
83
|
+
(0, class_validator_1.IsString)(),
|
|
84
|
+
(0, swagger_1.ApiProperty)(),
|
|
85
|
+
__metadata("design:type", String)
|
|
86
|
+
], UpdateAgentSessionDto.prototype, "summary", void 0);
|
|
87
|
+
__decorate([
|
|
88
|
+
(0, class_validator_1.IsOptional)(),
|
|
89
|
+
(0, class_validator_1.IsDate)(),
|
|
90
|
+
(0, swagger_1.ApiProperty)(),
|
|
91
|
+
__metadata("design:type", Date)
|
|
92
|
+
], UpdateAgentSessionDto.prototype, "updatedAt", void 0);
|
|
93
|
+
//# sourceMappingURL=update-agent-session.dto.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"update-agent-session.dto.js","sourceRoot":"","sources":["../../src/dtos/update-agent-session.dto.ts"],"names":[],"mappings":";;;;;;;;;;;;;AAAA,6CAA8C;AAC9C,qDAAgF;AAEhF,MAAa,qBAAqB;;;;CA2DjC;AA3DD,sDA2DC;AAxDC;IAFC,IAAA,4BAAU,GAAE;IACZ,IAAA,uBAAK,GAAE;;iDACG;AAKX;IAHC,IAAA,4BAAU,GAAE;IACZ,IAAA,0BAAQ,GAAE;IACV,IAAA,qBAAW,GAAE;;wDACI;AAKlB;IAHC,IAAA,4BAAU,GAAE;IACZ,IAAA,uBAAK,GAAE;IACP,IAAA,qBAAW,GAAE;;qDACC;AAKf;IAHC,IAAA,4BAAU,GAAE;IACZ,IAAA,0BAAQ,GAAE;IACV,IAAA,qBAAW,GAAE;;0DACM;AAKpB;IAHC,IAAA,4BAAU,GAAE;IACZ,IAAA,0BAAQ,GAAE;IACV,IAAA,qBAAW,GAAE;;wDACI;AAKlB;IAHC,IAAA,4BAAU,GAAE;IACZ,IAAA,0BAAQ,GAAE;IACV,IAAA,qBAAW,GAAE;;qDACC;AAKf;IAHC,IAAA,4BAAU,GAAE;IACZ,IAAA,0BAAQ,GAAE;IACV,IAAA,qBAAW,GAAE;;wDACI;AAKlB;IAHC,IAAA,4BAAU,GAAE;IACZ,IAAA,uBAAK,GAAE;IACP,IAAA,qBAAW,GAAE;;yDACK;AAKnB;IAHC,IAAA,4BAAU,GAAE;IACZ,IAAA,uBAAK,GAAE;IACP,IAAA,qBAAW,GAAE;;+DACW;AAKzB;IAHC,IAAA,4BAAU,GAAE;IACZ,IAAA,uBAAK,GAAE;IACP,IAAA,qBAAW,GAAE;;gEACY;AAK1B;IAHC,IAAA,4BAAU,GAAE;IACZ,IAAA,0BAAQ,GAAE;IACV,IAAA,qBAAW,GAAE;;sDACE;AAKhB;IAHC,IAAA,4BAAU,GAAE;IACZ,IAAA,wBAAM,GAAE;IACR,IAAA,qBAAW,GAAE;8BACH,IAAI;wDAAC","sourcesContent":["import { ApiProperty } from '@nestjs/swagger';\nimport { IsDate, IsInt, IsNumber, IsOptional, IsString } from 'class-validator';\n\nexport class UpdateAgentSessionDto {\n @IsOptional()\n @IsInt()\n id: number;\n\n @IsOptional()\n @IsString()\n @ApiProperty()\n sessionId: string;\n\n @IsOptional()\n @IsInt()\n @ApiProperty()\n userId: number;\n\n @IsOptional()\n @IsString()\n @ApiProperty()\n projectRoot: string;\n\n @IsOptional()\n @IsString()\n @ApiProperty()\n modelName: string;\n\n @IsOptional()\n @IsString()\n @ApiProperty()\n status: string;\n\n @IsOptional()\n @IsNumber()\n @ApiProperty()\n totalCost: number;\n\n @IsOptional()\n @IsInt()\n @ApiProperty()\n totalSteps: number;\n\n @IsOptional()\n @IsInt()\n @ApiProperty()\n totalInputTokens: number;\n\n @IsOptional()\n @IsInt()\n @ApiProperty()\n totalOutputTokens: number;\n\n @IsOptional()\n @IsString()\n @ApiProperty()\n summary: string;\n\n @IsOptional()\n @IsDate()\n @ApiProperty()\n updatedAt: Date;\n}\n"]}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"update-api-key.dto.d.ts","sourceRoot":"","sources":["../../src/dtos/update-api-key.dto.ts"],"names":[],"mappings":"AAGA,qBAAa,eAAe;IAIxB,QAAQ,EAAE,OAAO,CAAC;CACrB"}
|
|
@@ -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"]}
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
import { CommonEntity } from 'src/entities/common.entity';
|
|
2
|
+
export declare class AgentEvent extends CommonEntity {
|
|
3
|
+
sessionId: string;
|
|
4
|
+
turnNumber: number;
|
|
5
|
+
stepNumber: number;
|
|
6
|
+
eventType: string;
|
|
7
|
+
eventData: any;
|
|
8
|
+
content: string;
|
|
9
|
+
toolName: string;
|
|
10
|
+
toolArguments: string;
|
|
11
|
+
toolOutput: string;
|
|
12
|
+
toolReturncode: number;
|
|
13
|
+
durationMs: number;
|
|
14
|
+
cost: number;
|
|
15
|
+
inputTokens: number;
|
|
16
|
+
outputTokens: number;
|
|
17
|
+
modelUsed: string;
|
|
18
|
+
}
|
|
19
|
+
//# sourceMappingURL=agent-event.entity.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
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"}
|
|
@@ -0,0 +1,89 @@
|
|
|
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.AgentEvent = void 0;
|
|
13
|
+
const openapi = require("@nestjs/swagger");
|
|
14
|
+
const typeorm_1 = require("typeorm");
|
|
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 {
|
|
18
|
+
static _OPENAPI_METADATA_FACTORY() {
|
|
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 } };
|
|
20
|
+
}
|
|
21
|
+
};
|
|
22
|
+
exports.AgentEvent = AgentEvent;
|
|
23
|
+
__decorate([
|
|
24
|
+
(0, typeorm_1.Index)(),
|
|
25
|
+
(0, typeorm_1.Column)({}),
|
|
26
|
+
__metadata("design:type", String)
|
|
27
|
+
], AgentEvent.prototype, "sessionId", void 0);
|
|
28
|
+
__decorate([
|
|
29
|
+
(0, typeorm_1.Column)({}),
|
|
30
|
+
__metadata("design:type", Number)
|
|
31
|
+
], AgentEvent.prototype, "turnNumber", void 0);
|
|
32
|
+
__decorate([
|
|
33
|
+
(0, typeorm_1.Column)({ nullable: true }),
|
|
34
|
+
__metadata("design:type", Number)
|
|
35
|
+
], AgentEvent.prototype, "stepNumber", void 0);
|
|
36
|
+
__decorate([
|
|
37
|
+
(0, typeorm_1.Index)(),
|
|
38
|
+
(0, typeorm_1.Column)({}),
|
|
39
|
+
__metadata("design:type", String)
|
|
40
|
+
], AgentEvent.prototype, "eventType", void 0);
|
|
41
|
+
__decorate([
|
|
42
|
+
(0, typeorm_1.Column)({ type: "simple-json", nullable: true, ...(0, typeorm_db_helper_1.getColumnType)('simpleJsonLargeText') }),
|
|
43
|
+
__metadata("design:type", Object)
|
|
44
|
+
], AgentEvent.prototype, "eventData", void 0);
|
|
45
|
+
__decorate([
|
|
46
|
+
(0, typeorm_1.Column)({ nullable: true, ...(0, typeorm_db_helper_1.getColumnType)('longText') }),
|
|
47
|
+
__metadata("design:type", String)
|
|
48
|
+
], AgentEvent.prototype, "content", void 0);
|
|
49
|
+
__decorate([
|
|
50
|
+
(0, typeorm_1.Index)(),
|
|
51
|
+
(0, typeorm_1.Column)({ nullable: true }),
|
|
52
|
+
__metadata("design:type", String)
|
|
53
|
+
], AgentEvent.prototype, "toolName", void 0);
|
|
54
|
+
__decorate([
|
|
55
|
+
(0, typeorm_1.Column)({ type: "simple-json", nullable: true, ...(0, typeorm_db_helper_1.getColumnType)('simpleJsonLargeText') }),
|
|
56
|
+
__metadata("design:type", String)
|
|
57
|
+
], AgentEvent.prototype, "toolArguments", void 0);
|
|
58
|
+
__decorate([
|
|
59
|
+
(0, typeorm_1.Column)({ nullable: true, ...(0, typeorm_db_helper_1.getColumnType)('longText') }),
|
|
60
|
+
__metadata("design:type", String)
|
|
61
|
+
], AgentEvent.prototype, "toolOutput", void 0);
|
|
62
|
+
__decorate([
|
|
63
|
+
(0, typeorm_1.Column)({ nullable: true }),
|
|
64
|
+
__metadata("design:type", Number)
|
|
65
|
+
], AgentEvent.prototype, "toolReturncode", void 0);
|
|
66
|
+
__decorate([
|
|
67
|
+
(0, typeorm_1.Column)({ nullable: true, ...(0, typeorm_db_helper_1.getColumnType)('decimal') }),
|
|
68
|
+
__metadata("design:type", Number)
|
|
69
|
+
], AgentEvent.prototype, "durationMs", void 0);
|
|
70
|
+
__decorate([
|
|
71
|
+
(0, typeorm_1.Column)({ nullable: true, ...(0, typeorm_db_helper_1.getColumnType)('decimal') }),
|
|
72
|
+
__metadata("design:type", Number)
|
|
73
|
+
], AgentEvent.prototype, "cost", void 0);
|
|
74
|
+
__decorate([
|
|
75
|
+
(0, typeorm_1.Column)({ nullable: true }),
|
|
76
|
+
__metadata("design:type", Number)
|
|
77
|
+
], AgentEvent.prototype, "inputTokens", void 0);
|
|
78
|
+
__decorate([
|
|
79
|
+
(0, typeorm_1.Column)({ nullable: true }),
|
|
80
|
+
__metadata("design:type", Number)
|
|
81
|
+
], AgentEvent.prototype, "outputTokens", void 0);
|
|
82
|
+
__decorate([
|
|
83
|
+
(0, typeorm_1.Column)({ nullable: true }),
|
|
84
|
+
__metadata("design:type", String)
|
|
85
|
+
], AgentEvent.prototype, "modelUsed", void 0);
|
|
86
|
+
exports.AgentEvent = AgentEvent = __decorate([
|
|
87
|
+
(0, typeorm_1.Entity)({ name: 'ss_agent_events' })
|
|
88
|
+
], AgentEvent);
|
|
89
|
+
//# sourceMappingURL=agent-event.entity.js.map
|
|
@@ -0,0 +1 @@
|
|
|
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,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} 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"]}
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
import { CommonEntity } from 'src/entities/common.entity';
|
|
2
|
+
export declare class AgentSession extends CommonEntity {
|
|
3
|
+
sessionId: string;
|
|
4
|
+
userId: number;
|
|
5
|
+
projectRoot: string;
|
|
6
|
+
modelName: string;
|
|
7
|
+
status: string;
|
|
8
|
+
totalCost: number;
|
|
9
|
+
totalSteps: number;
|
|
10
|
+
totalInputTokens: number;
|
|
11
|
+
totalOutputTokens: number;
|
|
12
|
+
summary: string;
|
|
13
|
+
}
|
|
14
|
+
//# sourceMappingURL=agent-session.entity.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
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"}
|
|
@@ -0,0 +1,69 @@
|
|
|
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.AgentSession = void 0;
|
|
13
|
+
const openapi = require("@nestjs/swagger");
|
|
14
|
+
const typeorm_1 = require("typeorm");
|
|
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 {
|
|
18
|
+
static _OPENAPI_METADATA_FACTORY() {
|
|
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 } };
|
|
20
|
+
}
|
|
21
|
+
};
|
|
22
|
+
exports.AgentSession = AgentSession;
|
|
23
|
+
__decorate([
|
|
24
|
+
(0, typeorm_1.Index)({ unique: true }),
|
|
25
|
+
(0, typeorm_1.Column)({}),
|
|
26
|
+
__metadata("design:type", String)
|
|
27
|
+
], AgentSession.prototype, "sessionId", void 0);
|
|
28
|
+
__decorate([
|
|
29
|
+
(0, typeorm_1.Index)(),
|
|
30
|
+
(0, typeorm_1.Column)({ nullable: true }),
|
|
31
|
+
__metadata("design:type", Number)
|
|
32
|
+
], AgentSession.prototype, "userId", void 0);
|
|
33
|
+
__decorate([
|
|
34
|
+
(0, typeorm_1.Column)({ nullable: true, ...(0, typeorm_db_helper_1.getColumnType)('longText') }),
|
|
35
|
+
__metadata("design:type", String)
|
|
36
|
+
], AgentSession.prototype, "projectRoot", void 0);
|
|
37
|
+
__decorate([
|
|
38
|
+
(0, typeorm_1.Column)({}),
|
|
39
|
+
__metadata("design:type", String)
|
|
40
|
+
], AgentSession.prototype, "modelName", void 0);
|
|
41
|
+
__decorate([
|
|
42
|
+
(0, typeorm_1.Index)(),
|
|
43
|
+
(0, typeorm_1.Column)({}),
|
|
44
|
+
__metadata("design:type", String)
|
|
45
|
+
], AgentSession.prototype, "status", void 0);
|
|
46
|
+
__decorate([
|
|
47
|
+
(0, typeorm_1.Column)({ default: 0, ...(0, typeorm_db_helper_1.getColumnType)('decimal') }),
|
|
48
|
+
__metadata("design:type", Number)
|
|
49
|
+
], AgentSession.prototype, "totalCost", void 0);
|
|
50
|
+
__decorate([
|
|
51
|
+
(0, typeorm_1.Column)({ default: 0 }),
|
|
52
|
+
__metadata("design:type", Number)
|
|
53
|
+
], AgentSession.prototype, "totalSteps", void 0);
|
|
54
|
+
__decorate([
|
|
55
|
+
(0, typeorm_1.Column)({ default: 0 }),
|
|
56
|
+
__metadata("design:type", Number)
|
|
57
|
+
], AgentSession.prototype, "totalInputTokens", void 0);
|
|
58
|
+
__decorate([
|
|
59
|
+
(0, typeorm_1.Column)({ default: 0 }),
|
|
60
|
+
__metadata("design:type", Number)
|
|
61
|
+
], AgentSession.prototype, "totalOutputTokens", void 0);
|
|
62
|
+
__decorate([
|
|
63
|
+
(0, typeorm_1.Column)({ nullable: true, ...(0, typeorm_db_helper_1.getColumnType)('longText') }),
|
|
64
|
+
__metadata("design:type", String)
|
|
65
|
+
], AgentSession.prototype, "summary", void 0);
|
|
66
|
+
exports.AgentSession = AgentSession = __decorate([
|
|
67
|
+
(0, typeorm_1.Entity)({ name: 'ss_agent_sessions' })
|
|
68
|
+
], AgentSession);
|
|
69
|
+
//# sourceMappingURL=agent-session.entity.js.map
|
|
@@ -0,0 +1 @@
|
|
|
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;;kDAC1C;AAIpB;IADC,IAAA,gBAAM,EAAC,EAAE,IAAI,EAAE,MAAM,EAAE,CAAC;;2CACZ;AAGb;IADC,IAAA,gBAAM,EAAC,EAAE,IAAI,EAAE,UAAU,EAAE,QAAQ,EAAE,IAAI,EAAE,CAAC;;8CAC7B;AAKhB;IAHC,IAAA,eAAK,GAAE;IACP,IAAA,mBAAS,EAAC,GAAG,EAAE,CAAC,qCAAa,EAAE,CAAC,KAAK,EAAE,EAAE,CAAC,KAAK,CAAC,MAAM,E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EAAE,MAAM,EAAE,QAAQ,EAAE,IAAI,EAAE,CAAC;;2CAC5B;AAGb;IADC,IAAA,gBAAM,EAAC,EAAE,OAAO,EAAE,KAAK,EAAE,CAAC;;+CACT;AAGlB;IADC,IAAA,gBAAM,EAAC,EAAE,OAAO,EAAE,KAAK,EAAE,CAAC;;yDACC;AAG5B;IADC,IAAA,gBAAM,EAAC,EAAE,IAAI,EAAE,aAAa,EAAE,QAAQ,EAAE,IAAI,EAAE,CAAC;;iDAC7B;AAGnB;IADC,IAAA,gBAAM,EAAC,EAAE,IAAI,EAAE,+BAA+B,EAAE,QAAQ,EAAE,IAAI,EAAE,CAAC;;gEAChC;AAGlC;IADC,IAAA,gBAAM,EAAC,EAAE,IAAI,EAAE,aAAa,EAAE,OAAO,EAAE,KAAK,EAAE,CAAC;;gDAC7B;AAGnB;IADC,IAAA,gBAAM,EAAC,EAAE,IAAI,EAAE,0BAA0B,EAAE,QAAQ,EAAE,IAAI,EAAE,CAAC;;4DAC/B;AAG9B;IADC,IAAA,gBAAM,EAAC,EAAE,IAAI,EAAE,uBAAuB,EAAE,OAAO,EAAE,KAAK,EAAE,CAAC;;0DACrB;AAGrC;IADC,IAAA,gBAAM,EAAC,EAAE,IAAI,EAAE,gBAAgB,EAAE,OAAO,EAAE,KAAK,EAAE,CAAC;;oDAC5B;AAGvB;IADC,IAAA,gBAAM,EAAC,EAAE,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 })\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,MAAM,EAAE,IAAI,EAAE,CAAC;;kDAC1C;AAIpB;IADC,IAAA,gBAAM,EAAC,EAAE,IAAI,EAAE,MAAM,EAAE,CAAC;;2CACZ;AAGb;IADC,IAAA,gBAAM,EAAC,EAAE,IAAI,EAAE,UAAU,EAAE,QAAQ,EAAE,IAAI,EAAE,CAAC;;8CAC7B;AAKhB;IAHC,IAAA,eAAK,GAAE;IACP,IAAA,mBAAS,EAAC,GAAG,EAAE,CAAC,qCAAa,EAAE,CAAC,KAAK,EAAE,EA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;;iEAC9B;AAGzD;IADC,IAAA,gBAAM,EAAC,EAAE,IAAI,EAAE,MAAM,EAAE,QAAQ,EAAE,IAAI,EAAE,CAAC;;2CAC5B;AAGb;IADC,IAAA,gBAAM,EAAC,EAAE,OAAO,EAAE,KAAK,EAAE,CAAC;;+CACT;AAGlB;IADC,IAAA,gBAAM,EAAC,EAAE,OAAO,EAAE,KAAK,EAAE,CAAC;;yDACC;AAG5B;IADC,IAAA,gBAAM,EAAC,EAAE,IAAI,EAAE,aAAa,EAAE,QAAQ,EAAE,IAAI,EAAE,CAAC;;iDAC7B;AAGnB;IADC,IAAA,gBAAM,EAAC,EAAE,IAAI,EAAE,+BAA+B,EAAE,QAAQ,EAAE,IAAI,EAAE,CAAC;;gEAChC;AAGlC;IADC,IAAA,gBAAM,EAAC,EAAE,IAAI,EAAE,aAAa,EAAE,OAAO,EAAE,KAAK,EAAE,CAAC;;gDAC7B;AAGnB;IADC,IAAA,gBAAM,EAAC,EAAE,IAAI,EAAE,0BAA0B,EAAE,QAAQ,EAAE,IAAI,EAAE,CAAC;;4DAC/B;AAG9B;IADC,IAAA,gBAAM,EAAC,EAAE,IAAI,EAAE,uBAAuB,EAAE,OAAO,EAAE,KAAK,EAAE,CAAC;;0DACrB;AAGrC;IADC,IAAA,gBAAM,EAAC,EAAE,IAAI,EAAE,gBAAgB,EAAE,OAAO,EAAE,KAAK,EAAE,CAAC;;oDAC5B;AAGvB;IADC,IAAA,gBAAM,EAAC,EAAE,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,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AA,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":"sms-template.entity.d.ts","sourceRoot":"","sources":["../../src/entities/sms-template.entity.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,YAAY,EAAE,MAAM,4BAA4B,CAAC;
|
|
1
|
+
{"version":3,"file":"sms-template.entity.d.ts","sourceRoot":"","sources":["../../src/entities/sms-template.entity.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,YAAY,EAAE,MAAM,4BAA4B,CAAC;AAI1D,qBACa,WAAY,SAAQ,YAAY;IAGzC,IAAI,EAAE,MAAM,CAAC;IAEb,WAAW,EAAE,MAAM,CAAC;IAEpB,IAAI,EAAE,MAAM,CAAC;IAEb,qBAAqB,EAAE,MAAM,CAAC;IAE9B,WAAW,EAAE,MAAM,CAAC;IAEpB,MAAM,EAAE,OAAO,CAAQ;IAEvB,IAAI,EAAE,MAAM,CAAC;CAChB"}
|
|
@@ -13,6 +13,7 @@ exports.SmsTemplate = void 0;
|
|
|
13
13
|
const openapi = require("@nestjs/swagger");
|
|
14
14
|
const common_entity_1 = require("./common.entity");
|
|
15
15
|
const typeorm_1 = require("typeorm");
|
|
16
|
+
const typeorm_db_helper_1 = require("../helpers/typeorm-db-helper");
|
|
16
17
|
let SmsTemplate = class SmsTemplate extends common_entity_1.CommonEntity {
|
|
17
18
|
constructor() {
|
|
18
19
|
super(...arguments);
|
|
@@ -33,7 +34,7 @@ __decorate([
|
|
|
33
34
|
__metadata("design:type", String)
|
|
34
35
|
], SmsTemplate.prototype, "displayName", void 0);
|
|
35
36
|
__decorate([
|
|
36
|
-
(0, typeorm_1.Column)({ name: "body",
|
|
37
|
+
(0, typeorm_1.Column)({ name: "body", ...(0, typeorm_db_helper_1.getColumnType)('longText'), nullable: true }),
|
|
37
38
|
__metadata("design:type", String)
|
|
38
39
|
], SmsTemplate.prototype, "body", void 0);
|
|
39
40
|
__decorate([
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"sms-template.entity.js","sourceRoot":"","sources":["../../src/entities/sms-template.entity.ts"],"names":[],"mappings":";;;;;;;;;;;;;AAAA,mDAA0D;AAC1D,qCAAgD;
|
|
1
|
+
{"version":3,"file":"sms-template.entity.js","sourceRoot":"","sources":["../../src/entities/sms-template.entity.ts"],"names":[],"mappings":";;;;;;;;;;;;;AAAA,mDAA0D;AAC1D,qCAAgD;AAChD,oEAA8D;AAGvD,IAAM,WAAW,GAAjB,MAAM,WAAY,SAAQ,4BAAY;IAAtC;;QAaH,WAAM,GAAY,IAAI,CAAC;KAG1B;;8UAHqB,IAAI;;CAGzB,CAAA;AAhBY,kCAAW;AAGpB;IAFC,IAAA,eAAK,EAAC,EAAE,MAAM,EAAE,IAAI,EAAE,CAAC;IACvB,IAAA,gBAAM,EAAC,EAAE,IAAI,EAAE,MAAM,EAAE,IAAI,EAAE,SAAS,EAAE,CAAC;;yCAC7B;AAEb;IADC,IAAA,gBAAM,EAAC,EAAE,IAAI,EAAE,cAAc,EAAE,IAAI,EAAE,SAAS,EAAE,CAAC;;gDAC9B;AAEpB;IADC,IAAA,gBAAM,EAAC,EAAE,IAAI,EAAE,MAAM,EAAE,GAAG,IAAA,iCAAa,EAAC,UAAU,CAAC,EAAE,QAAQ,EAAE,IAAI,EAAE,CAAC;;yCAC1D;AAEb;IADC,IAAA,gBAAM,EAAC,EAAE,IAAI,EAAE,SAAS,EAAE,QAAQ,EAAE,IAAI,EAAE,CAAC;;0DACd;AAE9B;IADC,IAAA,gBAAM,EAAC,EAAE,IAAI,EAAE,aAAa,EAAE,QAAQ,EAAE,IAAI,EAAE,CAAC;;gDAC5B;AAEpB;IADC,IAAA,gBAAM,EAAC,EAAE,IAAI,EAAE,QAAQ,EAAE,QAAQ,EAAE,IAAI,EAAE,OAAO,EAAE,IAAI,EAAE,CAAC;;2CACnC;AAEvB;IADC,IAAA,gBAAM,EAAC,EAAE,IAAI,EAAE,MAAM,EAAE,IAAI,EAAE,SAAS,EAAE,QAAQ,EAAE,IAAI,EAAE,CAAC;;yCAC7C;sBAfJ,WAAW;IADvB,IAAA,gBAAM,EAAC,iBAAiB,CAAC;GACb,WAAW,CAgBvB","sourcesContent":["import { CommonEntity } from 'src/entities/common.entity';\nimport { Column, Entity, Index } from 'typeorm';\nimport { getColumnType } from 'src/helpers/typeorm-db-helper';\n\n@Entity(\"ss_sms_template\")\nexport class SmsTemplate extends CommonEntity {\n @Index({ unique: true })\n @Column({ name: \"name\", type: \"varchar\" })\n name: string;\n @Column({ name: \"display_name\", type: \"varchar\" })\n displayName: string;\n @Column({ name: \"body\", ...getColumnType('longText'), nullable: true })\n body: string;\n @Column({ type: \"varchar\", nullable: true })\n smsProviderTemplateId: string;\n @Column({ name: \"description\", nullable: true })\n description: string;\n @Column({ name: \"active\", nullable: true, default: true })\n active: boolean = true;\n @Column({ name: \"type\", type: \"varchar\", nullable: true })\n type: string;\n}"]}
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
import { CommonEntity } from "src/entities/common.entity";
|
|
2
|
+
import { User } from "./user.entity";
|
|
3
|
+
export declare class UserApiKey extends CommonEntity {
|
|
4
|
+
name: string;
|
|
5
|
+
hashedKey: string;
|
|
6
|
+
maskedKey: string;
|
|
7
|
+
isActive: boolean;
|
|
8
|
+
expiresAt: Date;
|
|
9
|
+
lastUsedAt: Date;
|
|
10
|
+
user: User;
|
|
11
|
+
}
|
|
12
|
+
//# sourceMappingURL=user-api-key.entity.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"user-api-key.entity.d.ts","sourceRoot":"","sources":["../../src/entities/user-api-key.entity.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,YAAY,EAAE,MAAM,4BAA4B,CAAC;AAE1D,OAAO,EAAE,IAAI,EAAE,MAAM,eAAe,CAAC;AAErC,qBAEa,UAAW,SAAQ,YAAY;IAIxC,IAAI,EAAE,MAAM,CAAC;IAKb,SAAS,EAAE,MAAM,CAAC;IAIlB,SAAS,EAAE,MAAM,CAAC;IAIlB,QAAQ,EAAE,OAAO,CAAC;IAIlB,SAAS,EAAE,IAAI,CAAC;IAIhB,UAAU,EAAE,IAAI,CAAC;IAGjB,IAAI,EAAE,IAAI,CAAC;CACd"}
|