@loopstack/common 0.29.0 → 0.31.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/base/base-app.d.ts +7 -0
- package/dist/base/base-app.d.ts.map +1 -0
- package/dist/base/base-app.js +17 -0
- package/dist/base/base-app.js.map +1 -0
- package/dist/base/base-tool.d.ts +2 -2
- package/dist/base/base-tool.d.ts.map +1 -1
- package/dist/base/base-tool.js +10 -13
- package/dist/base/base-tool.js.map +1 -1
- package/dist/base/base-workflow.d.ts +5 -4
- package/dist/base/base-workflow.d.ts.map +1 -1
- package/dist/base/base-workflow.js +16 -19
- package/dist/base/base-workflow.js.map +1 -1
- package/dist/base/index.d.ts +5 -4
- package/dist/base/index.d.ts.map +1 -1
- package/dist/base/index.js +5 -20
- package/dist/base/index.js.map +1 -1
- package/dist/base/server-tool.js +4 -7
- package/dist/base/server-tool.js.map +1 -1
- package/dist/base/workflow-templates.js +1 -2
- package/dist/constants/auth.constants.js +2 -5
- package/dist/constants/auth.constants.js.map +1 -1
- package/dist/constants/index.d.ts +1 -1
- package/dist/constants/index.d.ts.map +1 -1
- package/dist/constants/index.js +1 -17
- package/dist/constants/index.js.map +1 -1
- package/dist/decorators/ai-provider.decorator.js +5 -9
- package/dist/decorators/ai-provider.decorator.js.map +1 -1
- package/dist/decorators/block.decorator.d.ts +5 -5
- package/dist/decorators/block.decorator.d.ts.map +1 -1
- package/dist/decorators/block.decorator.js +49 -69
- package/dist/decorators/block.decorator.js.map +1 -1
- package/dist/decorators/capability-decorator.js +5 -9
- package/dist/decorators/capability-decorator.js.map +1 -1
- package/dist/decorators/current-user.decorator.js +2 -5
- package/dist/decorators/current-user.decorator.js.map +1 -1
- package/dist/decorators/index.d.ts +6 -6
- package/dist/decorators/index.d.ts.map +1 -1
- package/dist/decorators/index.js +6 -22
- package/dist/decorators/index.js.map +1 -1
- package/dist/decorators/public.decorator.js +3 -7
- package/dist/decorators/public.decorator.js.map +1 -1
- package/dist/decorators/roles.decorator.d.ts +1 -1
- package/dist/decorators/roles.decorator.d.ts.map +1 -1
- package/dist/decorators/roles.decorator.js +3 -7
- package/dist/decorators/roles.decorator.js.map +1 -1
- package/dist/documents/error-document.js +9 -12
- package/dist/documents/error-document.js.map +1 -1
- package/dist/documents/index.d.ts +5 -5
- package/dist/documents/index.d.ts.map +1 -1
- package/dist/documents/index.js +5 -21
- package/dist/documents/index.js.map +1 -1
- package/dist/documents/link-document.js +13 -16
- package/dist/documents/link-document.js.map +1 -1
- package/dist/documents/markdown-document.js +9 -12
- package/dist/documents/markdown-document.js.map +1 -1
- package/dist/documents/message-document.js +10 -13
- package/dist/documents/message-document.js.map +1 -1
- package/dist/documents/plain-document.js +9 -12
- package/dist/documents/plain-document.js.map +1 -1
- package/dist/dtos/execution-context.d.ts +1 -1
- package/dist/dtos/execution-context.d.ts.map +1 -1
- package/dist/dtos/execution-context.js +1 -5
- package/dist/dtos/execution-context.js.map +1 -1
- package/dist/dtos/index.d.ts +5 -5
- package/dist/dtos/index.d.ts.map +1 -1
- package/dist/dtos/index.js +5 -21
- package/dist/dtos/index.js.map +1 -1
- package/dist/dtos/run-context.d.ts +4 -4
- package/dist/dtos/run-context.d.ts.map +1 -1
- package/dist/dtos/run-context.js +2 -6
- package/dist/dtos/run-context.js.map +1 -1
- package/dist/dtos/workflow-state.dto.d.ts +3 -3
- package/dist/dtos/workflow-state.dto.d.ts.map +1 -1
- package/dist/dtos/workflow-state.dto.js +1 -5
- package/dist/dtos/workflow-state.dto.js.map +1 -1
- package/dist/dtos/workflow-transition.dto.js +1 -5
- package/dist/dtos/workflow-transition.dto.js.map +1 -1
- package/dist/dtos/workspace-environment-context.dto.d.ts +1 -1
- package/dist/dtos/workspace-environment-context.dto.d.ts.map +1 -1
- package/dist/dtos/workspace-environment-context.dto.js +10 -14
- package/dist/dtos/workspace-environment-context.dto.js.map +1 -1
- package/dist/entities/document.entity.d.ts +6 -5
- package/dist/entities/document.entity.d.ts.map +1 -1
- package/dist/entities/document.entity.js +43 -46
- package/dist/entities/document.entity.js.map +1 -1
- package/dist/entities/index.js +7 -23
- package/dist/entities/index.js.map +1 -1
- package/dist/entities/role.entity.d.ts +4 -3
- package/dist/entities/role.entity.d.ts.map +1 -1
- package/dist/entities/role.entity.js +10 -13
- package/dist/entities/role.entity.js.map +1 -1
- package/dist/entities/user.entity.d.ts +4 -3
- package/dist/entities/user.entity.d.ts.map +1 -1
- package/dist/entities/user.entity.js +15 -18
- package/dist/entities/user.entity.js.map +1 -1
- package/dist/entities/workflow-checkpoint.entity.d.ts +1 -1
- package/dist/entities/workflow-checkpoint.entity.d.ts.map +1 -1
- package/dist/entities/workflow-checkpoint.entity.js +20 -23
- package/dist/entities/workflow-checkpoint.entity.js.map +1 -1
- package/dist/entities/workflow.entity.d.ts +11 -10
- package/dist/entities/workflow.entity.d.ts.map +1 -1
- package/dist/entities/workflow.entity.js +51 -54
- package/dist/entities/workflow.entity.js.map +1 -1
- package/dist/entities/workspace-environment.entity.d.ts +3 -2
- package/dist/entities/workspace-environment.entity.d.ts.map +1 -1
- package/dist/entities/workspace-environment.entity.js +22 -25
- package/dist/entities/workspace-environment.entity.js.map +1 -1
- package/dist/entities/workspace.entity.d.ts +7 -6
- package/dist/entities/workspace.entity.d.ts.map +1 -1
- package/dist/entities/workspace.entity.js +23 -26
- package/dist/entities/workspace.entity.js.map +1 -1
- package/dist/enums/index.js +3 -19
- package/dist/enums/index.js.map +1 -1
- package/dist/enums/role-name.enum.js +2 -5
- package/dist/enums/role-name.enum.js.map +1 -1
- package/dist/enums/user-type.enum.js +2 -5
- package/dist/enums/user-type.enum.js.map +1 -1
- package/dist/enums/workflow-state.enum.js +2 -5
- package/dist/enums/workflow-state.enum.js.map +1 -1
- package/dist/index.js +12 -28
- package/dist/index.js.map +1 -1
- package/dist/interfaces/ai-provider.interface.js +1 -2
- package/dist/interfaces/block.interface.d.ts +3 -3
- package/dist/interfaces/block.interface.d.ts.map +1 -1
- package/dist/interfaces/block.interface.js +1 -2
- package/dist/interfaces/current-user.interface.d.ts +1 -1
- package/dist/interfaces/current-user.interface.d.ts.map +1 -1
- package/dist/interfaces/current-user.interface.js +1 -2
- package/dist/interfaces/document-repository.interface.d.ts +1 -1
- package/dist/interfaces/document-repository.interface.d.ts.map +1 -1
- package/dist/interfaces/document-repository.interface.js +1 -2
- package/dist/interfaces/execution-context.interface.d.ts +21 -8
- package/dist/interfaces/execution-context.interface.d.ts.map +1 -1
- package/dist/interfaces/execution-context.interface.js +1 -2
- package/dist/interfaces/handler.interface.js +1 -2
- package/dist/interfaces/index.d.ts +1 -0
- package/dist/interfaces/index.d.ts.map +1 -1
- package/dist/interfaces/index.js +19 -34
- package/dist/interfaces/index.js.map +1 -1
- package/dist/interfaces/jwt-payload.interface.d.ts +1 -1
- package/dist/interfaces/jwt-payload.interface.d.ts.map +1 -1
- package/dist/interfaces/jwt-payload.interface.js +1 -2
- package/dist/interfaces/persistence-state.interface.js +1 -2
- package/dist/interfaces/role.interface.js +1 -2
- package/dist/interfaces/sso-response.interface.js +1 -2
- package/dist/interfaces/tool-execution-interceptor.interface.d.ts +5 -3
- package/dist/interfaces/tool-execution-interceptor.interface.d.ts.map +1 -1
- package/dist/interfaces/tool-execution-interceptor.interface.js +7 -11
- package/dist/interfaces/tool-execution-interceptor.interface.js.map +1 -1
- package/dist/interfaces/transition-results.types.d.ts +1 -1
- package/dist/interfaces/transition-results.types.d.ts.map +1 -1
- package/dist/interfaces/transition-results.types.js +1 -2
- package/dist/interfaces/user.interface.d.ts +1 -1
- package/dist/interfaces/user.interface.d.ts.map +1 -1
- package/dist/interfaces/user.interface.js +1 -2
- package/dist/interfaces/workflow-execution.interface.d.ts +2 -2
- package/dist/interfaces/workflow-execution.interface.d.ts.map +1 -1
- package/dist/interfaces/workflow-execution.interface.js +1 -2
- package/dist/interfaces/workflow-memento-data.interfate.js +1 -2
- package/dist/interfaces/workflow-metadata.interface.d.ts +1 -1
- package/dist/interfaces/workflow-metadata.interface.d.ts.map +1 -1
- package/dist/interfaces/workflow-metadata.interface.js +1 -2
- package/dist/interfaces/workflow-orchestrator.interface.d.ts +4 -4
- package/dist/interfaces/workflow-orchestrator.interface.d.ts.map +1 -1
- package/dist/interfaces/workflow-orchestrator.interface.js +1 -2
- package/dist/interfaces/workflow-runner.interface.d.ts +27 -0
- package/dist/interfaces/workflow-runner.interface.d.ts.map +1 -0
- package/dist/interfaces/workflow-runner.interface.js +2 -0
- package/dist/interfaces/workflow-runner.interface.js.map +1 -0
- package/dist/interfaces/workflow-state.interface.js +1 -2
- package/dist/schema/index.js +1 -17
- package/dist/schema/index.js.map +1 -1
- package/dist/schema/runtime-metadata.schema.js +3 -6
- package/dist/schema/runtime-metadata.schema.js.map +1 -1
- package/dist/tokens.js +4 -7
- package/dist/tokens.js.map +1 -1
- package/dist/utils/block-config.builder.d.ts +1 -1
- package/dist/utils/block-config.builder.d.ts.map +1 -1
- package/dist/utils/block-config.builder.js +7 -13
- package/dist/utils/block-config.builder.js.map +1 -1
- package/dist/utils/block-metadata.utils.d.ts +5 -5
- package/dist/utils/block-metadata.utils.d.ts.map +1 -1
- package/dist/utils/block-metadata.utils.js +41 -65
- package/dist/utils/block-metadata.utils.js.map +1 -1
- package/dist/utils/deep-merge.js +1 -4
- package/dist/utils/deep-merge.js.map +1 -1
- package/dist/utils/index.js +5 -21
- package/dist/utils/index.js.map +1 -1
- package/dist/utils/normalize-object.js +1 -4
- package/dist/utils/normalize-object.js.map +1 -1
- package/dist/utils/stable-json-transformer.js +3 -10
- package/dist/utils/stable-json-transformer.js.map +1 -1
- package/dist/utils/workflow-transitions.builder.js +4 -7
- package/dist/utils/workflow-transitions.builder.js.map +1 -1
- package/package.json +3 -2
|
@@ -1,29 +1,26 @@
|
|
|
1
|
-
"use strict";
|
|
2
1
|
var __decorate = (this && this.__decorate) || function (decorators, target, key, desc) {
|
|
3
2
|
var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
|
|
4
3
|
if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
|
|
5
4
|
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
5
|
return c > 3 && r && Object.defineProperty(target, key, r), r;
|
|
7
6
|
};
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
const
|
|
11
|
-
const block_decorator_1 = require("../decorators/block.decorator");
|
|
12
|
-
exports.MessageDocumentSchema = zod_1.z
|
|
7
|
+
import { z } from 'zod';
|
|
8
|
+
import { Document } from '../decorators/block.decorator.js';
|
|
9
|
+
export const MessageDocumentSchema = z
|
|
13
10
|
.object({
|
|
14
|
-
role:
|
|
15
|
-
content:
|
|
11
|
+
role: z.string(),
|
|
12
|
+
content: z.string(),
|
|
16
13
|
})
|
|
17
14
|
.strict();
|
|
18
15
|
let MessageDocument = class MessageDocument {
|
|
19
16
|
role;
|
|
20
17
|
content;
|
|
21
18
|
};
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
uiConfig: __dirname + '/message-document.yaml',
|
|
19
|
+
MessageDocument = __decorate([
|
|
20
|
+
Document({
|
|
21
|
+
schema: MessageDocumentSchema,
|
|
22
|
+
uiConfig: import.meta.dirname + '/message-document.yaml',
|
|
27
23
|
})
|
|
28
24
|
], MessageDocument);
|
|
25
|
+
export { MessageDocument };
|
|
29
26
|
//# sourceMappingURL=message-document.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"message-document.js","sourceRoot":"","sources":["../../src/documents/message-document.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"message-document.js","sourceRoot":"","sources":["../../src/documents/message-document.ts"],"names":[],"mappings":";;;;;;AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AACxB,OAAO,EAAE,QAAQ,EAAE,MAAM,kCAAkC,CAAC;AAE5D,MAAM,CAAC,MAAM,qBAAqB,GAAG,CAAC;KACnC,MAAM,CAAC;IACN,IAAI,EAAE,CAAC,CAAC,MAAM,EAAE;IAChB,OAAO,EAAE,CAAC,CAAC,MAAM,EAAE;CACpB,CAAC;KACD,MAAM,EAAE,CAAC;AAML,IAAM,eAAe,GAArB,MAAM,eAAe;IAC1B,IAAI,CAAS;IACb,OAAO,CAAS;CACjB,CAAA;AAHY,eAAe;IAJ3B,QAAQ,CAAC;QACR,MAAM,EAAE,qBAAqB;QAC7B,QAAQ,EAAE,MAAM,CAAC,IAAI,CAAC,OAAO,GAAG,wBAAwB;KACzD,CAAC;GACW,eAAe,CAG3B"}
|
|
@@ -1,27 +1,24 @@
|
|
|
1
|
-
"use strict";
|
|
2
1
|
var __decorate = (this && this.__decorate) || function (decorators, target, key, desc) {
|
|
3
2
|
var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
|
|
4
3
|
if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
|
|
5
4
|
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
5
|
return c > 3 && r && Object.defineProperty(target, key, r), r;
|
|
7
6
|
};
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
const
|
|
11
|
-
const block_decorator_1 = require("../decorators/block.decorator");
|
|
12
|
-
exports.PlainDocumentSchema = zod_1.z
|
|
7
|
+
import { z } from 'zod';
|
|
8
|
+
import { Document } from '../decorators/block.decorator.js';
|
|
9
|
+
export const PlainDocumentSchema = z
|
|
13
10
|
.object({
|
|
14
|
-
text:
|
|
11
|
+
text: z.string(),
|
|
15
12
|
})
|
|
16
13
|
.strict();
|
|
17
14
|
let PlainDocument = class PlainDocument {
|
|
18
15
|
text;
|
|
19
16
|
};
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
uiConfig: __dirname + '/plain-document.yaml',
|
|
17
|
+
PlainDocument = __decorate([
|
|
18
|
+
Document({
|
|
19
|
+
schema: PlainDocumentSchema,
|
|
20
|
+
uiConfig: import.meta.dirname + '/plain-document.yaml',
|
|
25
21
|
})
|
|
26
22
|
], PlainDocument);
|
|
23
|
+
export { PlainDocument };
|
|
27
24
|
//# sourceMappingURL=plain-document.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"plain-document.js","sourceRoot":"","sources":["../../src/documents/plain-document.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"plain-document.js","sourceRoot":"","sources":["../../src/documents/plain-document.ts"],"names":[],"mappings":";;;;;;AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AACxB,OAAO,EAAE,QAAQ,EAAE,MAAM,kCAAkC,CAAC;AAE5D,MAAM,CAAC,MAAM,mBAAmB,GAAG,CAAC;KACjC,MAAM,CAAC;IACN,IAAI,EAAE,CAAC,CAAC,MAAM,EAAE;CACjB,CAAC;KACD,MAAM,EAAE,CAAC;AAML,IAAM,aAAa,GAAnB,MAAM,aAAa;IACxB,IAAI,CAAS;CACd,CAAA;AAFY,aAAa;IAJzB,QAAQ,CAAC;QACR,MAAM,EAAE,mBAAmB;QAC3B,QAAQ,EAAE,MAAM,CAAC,IAAI,CAAC,OAAO,GAAG,sBAAsB;KACvD,CAAC;GACW,aAAa,CAEzB"}
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { WorkflowTransitionType } from '@loopstack/contracts/types';
|
|
2
|
-
import { WorkflowTransitionDto } from './workflow-transition.dto';
|
|
2
|
+
import { WorkflowTransitionDto } from './workflow-transition.dto.js';
|
|
3
3
|
export declare class ExecutionContext {
|
|
4
4
|
error: boolean;
|
|
5
5
|
stop: boolean;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"execution-context.d.ts","sourceRoot":"","sources":["../../src/dtos/execution-context.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,sBAAsB,EAAE,MAAM,4BAA4B,CAAC;AACpE,OAAO,EAAE,qBAAqB,EAAE,MAAM,
|
|
1
|
+
{"version":3,"file":"execution-context.d.ts","sourceRoot":"","sources":["../../src/dtos/execution-context.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,sBAAsB,EAAE,MAAM,4BAA4B,CAAC;AACpE,OAAO,EAAE,qBAAqB,EAAE,MAAM,8BAA8B,CAAC;AAErE,qBAAa,gBAAgB;IAC3B,KAAK,EAAG,OAAO,CAAC;IAChB,IAAI,EAAG,OAAO,CAAC;IACf,UAAU,CAAC,EAAE,qBAAqB,CAAC;IACnC,oBAAoB,EAAG,sBAAsB,EAAE,CAAC;IAChD,gBAAgB,EAAG;QACjB,gBAAgB,EAAE,OAAO,CAAC;KAC3B,CAAC;IACF,SAAS,CAAC,EAAE,MAAM,CAAC;gBAEP,IAAI,EAAE,OAAO,CAAC,gBAAgB,CAAC;CAG5C"}
|
|
@@ -1,7 +1,4 @@
|
|
|
1
|
-
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.ExecutionContext = void 0;
|
|
4
|
-
class ExecutionContext {
|
|
1
|
+
export class ExecutionContext {
|
|
5
2
|
error;
|
|
6
3
|
stop;
|
|
7
4
|
transition;
|
|
@@ -12,5 +9,4 @@ class ExecutionContext {
|
|
|
12
9
|
Object.assign(this, data);
|
|
13
10
|
}
|
|
14
11
|
}
|
|
15
|
-
exports.ExecutionContext = ExecutionContext;
|
|
16
12
|
//# sourceMappingURL=execution-context.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"execution-context.js","sourceRoot":"","sources":["../../src/dtos/execution-context.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"execution-context.js","sourceRoot":"","sources":["../../src/dtos/execution-context.ts"],"names":[],"mappings":"AAGA,MAAM,OAAO,gBAAgB;IAC3B,KAAK,CAAW;IAChB,IAAI,CAAW;IACf,UAAU,CAAyB;IACnC,oBAAoB,CAA4B;IAChD,gBAAgB,CAEd;IACF,SAAS,CAAU;IAEnB,YAAY,IAA+B;QACzC,MAAM,CAAC,MAAM,CAAC,IAAI,EAAE,IAAI,CAAC,CAAC;IAC5B,CAAC;CACF"}
|
package/dist/dtos/index.d.ts
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
export * from './workflow-transition.dto';
|
|
2
|
-
export * from './run-context';
|
|
3
|
-
export * from './workflow-state.dto';
|
|
4
|
-
export * from './execution-context';
|
|
5
|
-
export * from './workspace-environment-context.dto';
|
|
1
|
+
export * from './workflow-transition.dto.js';
|
|
2
|
+
export * from './run-context.js';
|
|
3
|
+
export * from './workflow-state.dto.js';
|
|
4
|
+
export * from './execution-context.js';
|
|
5
|
+
export * from './workspace-environment-context.dto.js';
|
|
6
6
|
//# sourceMappingURL=index.d.ts.map
|
package/dist/dtos/index.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/dtos/index.ts"],"names":[],"mappings":"AAAA,cAAc,
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/dtos/index.ts"],"names":[],"mappings":"AAAA,cAAc,8BAA8B,CAAC;AAC7C,cAAc,kBAAkB,CAAC;AACjC,cAAc,yBAAyB,CAAC;AACxC,cAAc,wBAAwB,CAAC;AACvC,cAAc,wCAAwC,CAAC"}
|
package/dist/dtos/index.js
CHANGED
|
@@ -1,22 +1,6 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
desc = { enumerable: true, get: function() { return m[k]; } };
|
|
7
|
-
}
|
|
8
|
-
Object.defineProperty(o, k2, desc);
|
|
9
|
-
}) : (function(o, m, k, k2) {
|
|
10
|
-
if (k2 === undefined) k2 = k;
|
|
11
|
-
o[k2] = m[k];
|
|
12
|
-
}));
|
|
13
|
-
var __exportStar = (this && this.__exportStar) || function(m, exports) {
|
|
14
|
-
for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
|
|
15
|
-
};
|
|
16
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
17
|
-
__exportStar(require("./workflow-transition.dto"), exports);
|
|
18
|
-
__exportStar(require("./run-context"), exports);
|
|
19
|
-
__exportStar(require("./workflow-state.dto"), exports);
|
|
20
|
-
__exportStar(require("./execution-context"), exports);
|
|
21
|
-
__exportStar(require("./workspace-environment-context.dto"), exports);
|
|
1
|
+
export * from './workflow-transition.dto.js';
|
|
2
|
+
export * from './run-context.js';
|
|
3
|
+
export * from './workflow-state.dto.js';
|
|
4
|
+
export * from './execution-context.js';
|
|
5
|
+
export * from './workspace-environment-context.dto.js';
|
|
22
6
|
//# sourceMappingURL=index.js.map
|
package/dist/dtos/index.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/dtos/index.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/dtos/index.ts"],"names":[],"mappings":"AAAA,cAAc,8BAA8B,CAAC;AAC7C,cAAc,kBAAkB,CAAC;AACjC,cAAc,yBAAyB,CAAC;AACxC,cAAc,wBAAwB,CAAC;AACvC,cAAc,wCAAwC,CAAC"}
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { RunPayload } from '@loopstack/contracts/schemas';
|
|
2
|
-
import type { WorkflowEntity } from '../entities';
|
|
3
|
-
import type {
|
|
4
|
-
import { WorkspaceEnvironmentContextDto } from './workspace-environment-context.dto';
|
|
2
|
+
import type { WorkflowEntity } from '../entities/index.js';
|
|
3
|
+
import type { AppInterface } from '../interfaces/index.js';
|
|
4
|
+
import { WorkspaceEnvironmentContextDto } from './workspace-environment-context.dto.js';
|
|
5
5
|
export declare class RunContext {
|
|
6
6
|
root: string;
|
|
7
7
|
userId: string;
|
|
@@ -12,7 +12,7 @@ export declare class RunContext {
|
|
|
12
12
|
workflowContext?: Record<string, any>;
|
|
13
13
|
workspaceEnvironments?: WorkspaceEnvironmentContextDto[];
|
|
14
14
|
workflowEntity?: WorkflowEntity;
|
|
15
|
-
|
|
15
|
+
appInstance?: AppInterface;
|
|
16
16
|
options: {
|
|
17
17
|
stateless: boolean;
|
|
18
18
|
};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"run-context.d.ts","sourceRoot":"","sources":["../../src/dtos/run-context.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,UAAU,EAAE,MAAM,8BAA8B,CAAC;AAC1D,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,
|
|
1
|
+
{"version":3,"file":"run-context.d.ts","sourceRoot":"","sources":["../../src/dtos/run-context.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,UAAU,EAAE,MAAM,8BAA8B,CAAC;AAC1D,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,sBAAsB,CAAC;AAC3D,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,wBAAwB,CAAC;AAC3D,OAAO,EAAE,8BAA8B,EAAE,MAAM,wCAAwC,CAAC;AAExF,qBAAa,UAAU;IACrB,IAAI,EAAG,MAAM,CAAC;IACd,MAAM,EAAG,MAAM,CAAC;IAChB,WAAW,EAAG,MAAM,CAAC;IACrB,UAAU,CAAC,EAAE,MAAM,CAAC;IACpB,MAAM,EAAG,MAAM,EAAE,CAAC;IAClB,OAAO,EAAE,UAAU,CAAC;IACpB,eAAe,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,GAAG,CAAC,CAAC;IACtC,qBAAqB,CAAC,EAAE,8BAA8B,EAAE,CAAC;IAEzD,cAAc,CAAC,EAAE,cAAc,CAAC;IAEhC,WAAW,CAAC,EAAE,YAAY,CAAC;IAC3B,OAAO,EAAE;QACP,SAAS,EAAE,OAAO,CAAC;KACpB,CAAC;gBAEU,IAAI,EAAE,UAAU;CAG7B"}
|
package/dist/dtos/run-context.js
CHANGED
|
@@ -1,7 +1,4 @@
|
|
|
1
|
-
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.RunContext = void 0;
|
|
4
|
-
class RunContext {
|
|
1
|
+
export class RunContext {
|
|
5
2
|
root;
|
|
6
3
|
userId;
|
|
7
4
|
workspaceId;
|
|
@@ -11,11 +8,10 @@ class RunContext {
|
|
|
11
8
|
workflowContext;
|
|
12
9
|
workspaceEnvironments;
|
|
13
10
|
workflowEntity;
|
|
14
|
-
|
|
11
|
+
appInstance;
|
|
15
12
|
options;
|
|
16
13
|
constructor(data) {
|
|
17
14
|
Object.assign(this, data);
|
|
18
15
|
}
|
|
19
16
|
}
|
|
20
|
-
exports.RunContext = RunContext;
|
|
21
17
|
//# sourceMappingURL=run-context.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"run-context.js","sourceRoot":"","sources":["../../src/dtos/run-context.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"run-context.js","sourceRoot":"","sources":["../../src/dtos/run-context.ts"],"names":[],"mappings":"AAKA,MAAM,OAAO,UAAU;IACrB,IAAI,CAAU;IACd,MAAM,CAAU;IAChB,WAAW,CAAU;IACrB,UAAU,CAAU;IACpB,MAAM,CAAY;IAClB,OAAO,CAAa;IACpB,eAAe,CAAuB;IACtC,qBAAqB,CAAoC;IAEzD,cAAc,CAAkB;IAEhC,WAAW,CAAgB;IAC3B,OAAO,CAEL;IAEF,YAAY,IAAgB;QAC1B,MAAM,CAAC,MAAM,CAAC,IAAI,EAAE,IAAI,CAAC,CAAC;IAC5B,CAAC;CACF"}
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import type { HistoryTransition, WorkflowTransitionType } from '@loopstack/contracts/types';
|
|
2
|
-
import { DocumentEntity } from '../entities';
|
|
3
|
-
import { PersistenceState, ToolResultLookup, TransitionResultLookup } from '../interfaces';
|
|
4
|
-
import { WorkflowTransitionDto } from './workflow-transition.dto';
|
|
2
|
+
import { DocumentEntity } from '../entities/index.js';
|
|
3
|
+
import { PersistenceState, ToolResultLookup, TransitionResultLookup } from '../interfaces/index.js';
|
|
4
|
+
import { WorkflowTransitionDto } from './workflow-transition.dto.js';
|
|
5
5
|
export type InitWorkflowState = Omit<WorkflowStateDto, 'addDocuments' | 'addDocument' | 'updateDocument'>;
|
|
6
6
|
export declare class WorkflowStateDto {
|
|
7
7
|
id: string;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"workflow-state.dto.d.ts","sourceRoot":"","sources":["../../src/dtos/workflow-state.dto.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,iBAAiB,EAAE,sBAAsB,EAAE,MAAM,4BAA4B,CAAC;AAC5F,OAAO,EAAE,cAAc,EAAE,MAAM,
|
|
1
|
+
{"version":3,"file":"workflow-state.dto.d.ts","sourceRoot":"","sources":["../../src/dtos/workflow-state.dto.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,iBAAiB,EAAE,sBAAsB,EAAE,MAAM,4BAA4B,CAAC;AAC5F,OAAO,EAAE,cAAc,EAAE,MAAM,sBAAsB,CAAC;AACtD,OAAO,EAAE,gBAAgB,EAAE,gBAAgB,EAAE,sBAAsB,EAAE,MAAM,wBAAwB,CAAC;AACpG,OAAO,EAAE,qBAAqB,EAAE,MAAM,8BAA8B,CAAC;AAErE,MAAM,MAAM,iBAAiB,GAAG,IAAI,CAAC,gBAAgB,EAAE,cAAc,GAAG,aAAa,GAAG,gBAAgB,CAAC,CAAC;AAE1G,qBAAa,gBAAgB;IAC3B,EAAE,EAAG,MAAM,CAAC;IACZ,KAAK,EAAG,OAAO,CAAC;IAChB,IAAI,EAAG,OAAO,CAAC;IACf,OAAO,EAAG,iBAAiB,EAAE,CAAC;IAC9B,UAAU,CAAC,EAAE,qBAAqB,CAAC;IACnC,KAAK,EAAG,MAAM,CAAC;IACf,iBAAiB,CAAC,EAAE,sBAAsB,GAAG,IAAI,CAAC;IAClD,wBAAwB,CAAC,EAAE,gBAAgB,GAAG,IAAI,CAAC;IACnD,oBAAoB,CAAC,EAAE,sBAAsB,EAAE,GAAG,IAAI,CAAC;IACvD,SAAS,EAAG,cAAc,EAAE,CAAC;IAE7B,gBAAgB,EAAE,gBAAgB,CAEhC;gBAEU,IAAI,EAAE,iBAAiB;IAInC,YAAY,CAAC,SAAS,EAAE,cAAc,EAAE;IAYxC,cAAc,CAAC,KAAK,EAAE,MAAM,EAAE,QAAQ,EAAE,cAAc;IAQtD,WAAW,CAAC,QAAQ,EAAE,cAAc;CAYrC"}
|
|
@@ -1,7 +1,4 @@
|
|
|
1
|
-
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.WorkflowStateDto = void 0;
|
|
4
|
-
class WorkflowStateDto {
|
|
1
|
+
export class WorkflowStateDto {
|
|
5
2
|
id;
|
|
6
3
|
error;
|
|
7
4
|
stop;
|
|
@@ -45,5 +42,4 @@ class WorkflowStateDto {
|
|
|
45
42
|
this.persistenceState.documentsUpdated = true;
|
|
46
43
|
}
|
|
47
44
|
}
|
|
48
|
-
exports.WorkflowStateDto = WorkflowStateDto;
|
|
49
45
|
//# sourceMappingURL=workflow-state.dto.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"workflow-state.dto.js","sourceRoot":"","sources":["../../src/dtos/workflow-state.dto.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"workflow-state.dto.js","sourceRoot":"","sources":["../../src/dtos/workflow-state.dto.ts"],"names":[],"mappings":"AAOA,MAAM,OAAO,gBAAgB;IAC3B,EAAE,CAAU;IACZ,KAAK,CAAW;IAChB,IAAI,CAAW;IACf,OAAO,CAAuB;IAC9B,UAAU,CAAyB;IACnC,KAAK,CAAU;IACf,iBAAiB,CAAiC;IAClD,wBAAwB,CAA2B;IACnD,oBAAoB,CAAmC;IACvD,SAAS,CAAoB;IAE7B,gBAAgB,GAAqB;QACnC,gBAAgB,EAAE,KAAK;KACxB,CAAC;IAEF,YAAY,IAAuB;QACjC,MAAM,CAAC,MAAM,CAAC,IAAI,EAAE,IAAI,CAAC,CAAC;IAC5B,CAAC;IAED,YAAY,CAAC,SAA2B;QACtC,KAAK,MAAM,QAAQ,IAAI,SAAS,EAAE,CAAC;YACjC,MAAM,aAAa,GAAG,QAAQ,CAAC,EAAE,CAAC,CAAC,CAAC,IAAI,CAAC,SAAS,CAAC,SAAS,CAAC,CAAC,CAAC,EAAE,EAAE,CAAC,CAAC,CAAC,EAAE,KAAK,QAAQ,CAAC,EAAE,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC;YAE/F,IAAI,aAAa,IAAI,CAAC,CAAC,EAAE,CAAC;gBACxB,IAAI,CAAC,cAAc,CAAC,aAAa,EAAE,QAAQ,CAAC,CAAC;YAC/C,CAAC;iBAAM,CAAC;gBACN,IAAI,CAAC,WAAW,CAAC,QAAQ,CAAC,CAAC;YAC7B,CAAC;QACH,CAAC;IACH,CAAC;IAED,cAAc,CAAC,KAAa,EAAE,QAAwB;QACpD,IAAI,KAAK,IAAI,CAAC,CAAC,EAAE,CAAC;YAChB,IAAI,CAAC,SAAS,CAAC,KAAK,CAAC,GAAG,QAAQ,CAAC;QACnC,CAAC;QAED,IAAI,CAAC,gBAAgB,CAAC,gBAAgB,GAAG,IAAI,CAAC;IAChD,CAAC;IAED,WAAW,CAAC,QAAwB;QAElC,KAAK,MAAM,GAAG,IAAI,IAAI,CAAC,SAAS,EAAE,CAAC;YACjC,IAAI,GAAG,CAAC,SAAS,KAAK,QAAQ,CAAC,SAAS,IAAI,GAAG,CAAC,IAAI,EAAE,UAAU,KAAK,KAAK,EAAE,CAAC;gBAC3E,GAAG,CAAC,aAAa,GAAG,IAAI,CAAC;YAC3B,CAAC;QACH,CAAC;QAED,IAAI,CAAC,SAAS,CAAC,IAAI,CAAC,QAAQ,CAAC,CAAC;QAE9B,IAAI,CAAC,gBAAgB,CAAC,gBAAgB,GAAG,IAAI,CAAC;IAChD,CAAC;CACF"}
|
|
@@ -1,7 +1,4 @@
|
|
|
1
|
-
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.WorkflowTransitionDto = void 0;
|
|
4
|
-
class WorkflowTransitionDto {
|
|
1
|
+
export class WorkflowTransitionDto {
|
|
5
2
|
id;
|
|
6
3
|
from;
|
|
7
4
|
to;
|
|
@@ -11,5 +8,4 @@ class WorkflowTransitionDto {
|
|
|
11
8
|
Object.assign(this, data);
|
|
12
9
|
}
|
|
13
10
|
}
|
|
14
|
-
exports.WorkflowTransitionDto = WorkflowTransitionDto;
|
|
15
11
|
//# sourceMappingURL=workflow-transition.dto.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"workflow-transition.dto.js","sourceRoot":"","sources":["../../src/dtos/workflow-transition.dto.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"workflow-transition.dto.js","sourceRoot":"","sources":["../../src/dtos/workflow-transition.dto.ts"],"names":[],"mappings":"AAEA,MAAM,OAAO,qBAAqB;IAChC,EAAE,CAAU;IACZ,IAAI,CAAU;IACd,EAAE,CAAU;IACZ,OAAO,CAAU;IACjB,OAAO,CAAW;IAElB,YAAY,IAAoC;QAC9C,MAAM,CAAC,MAAM,CAAC,IAAI,EAAE,IAAI,CAAC,CAAC;IAC5B,CAAC;CACF"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"workspace-environment-context.dto.d.ts","sourceRoot":"","sources":["../../src/dtos/workspace-environment-context.dto.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,0BAA0B,EAAE,MAAM,
|
|
1
|
+
{"version":3,"file":"workspace-environment-context.dto.d.ts","sourceRoot":"","sources":["../../src/dtos/workspace-environment-context.dto.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,0BAA0B,EAAE,MAAM,sBAAsB,CAAC;AAElE,qBAAa,8BAA8B;IAEzC,MAAM,EAAE,MAAM,CAAC;IAGf,IAAI,EAAE,MAAM,CAAC;IAGb,OAAO,CAAC,EAAE,MAAM,CAAC;IAGjB,aAAa,CAAC,EAAE,MAAM,CAAC;IAGvB,QAAQ,CAAC,EAAE,MAAM,CAAC;IAGlB,QAAQ,CAAC,EAAE,MAAM,CAAC;IAGlB,SAAS,CAAC,EAAE,MAAM,CAAC;IAEnB,MAAM,CAAC,YAAY,CAAC,QAAQ,EAAE,0BAA0B,EAAE,GAAG,8BAA8B,EAAE;CAO9F"}
|
|
@@ -1,4 +1,3 @@
|
|
|
1
|
-
"use strict";
|
|
2
1
|
var __decorate = (this && this.__decorate) || function (decorators, target, key, desc) {
|
|
3
2
|
var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
|
|
4
3
|
if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
|
|
@@ -8,10 +7,8 @@ var __decorate = (this && this.__decorate) || function (decorators, target, key,
|
|
|
8
7
|
var __metadata = (this && this.__metadata) || function (k, v) {
|
|
9
8
|
if (typeof Reflect === "object" && typeof Reflect.metadata === "function") return Reflect.metadata(k, v);
|
|
10
9
|
};
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
const class_transformer_1 = require("class-transformer");
|
|
14
|
-
class WorkspaceEnvironmentContextDto {
|
|
10
|
+
import { Expose, plainToInstance } from 'class-transformer';
|
|
11
|
+
export class WorkspaceEnvironmentContextDto {
|
|
15
12
|
slotId;
|
|
16
13
|
type;
|
|
17
14
|
envName;
|
|
@@ -20,38 +17,37 @@ class WorkspaceEnvironmentContextDto {
|
|
|
20
17
|
workerId;
|
|
21
18
|
workerUrl;
|
|
22
19
|
static fromEntities(entities) {
|
|
23
|
-
return entities.map((entity) =>
|
|
20
|
+
return entities.map((entity) => plainToInstance(WorkspaceEnvironmentContextDto, entity, {
|
|
24
21
|
excludeExtraneousValues: true,
|
|
25
22
|
}));
|
|
26
23
|
}
|
|
27
24
|
}
|
|
28
|
-
exports.WorkspaceEnvironmentContextDto = WorkspaceEnvironmentContextDto;
|
|
29
25
|
__decorate([
|
|
30
|
-
|
|
26
|
+
Expose(),
|
|
31
27
|
__metadata("design:type", String)
|
|
32
28
|
], WorkspaceEnvironmentContextDto.prototype, "slotId", void 0);
|
|
33
29
|
__decorate([
|
|
34
|
-
|
|
30
|
+
Expose(),
|
|
35
31
|
__metadata("design:type", String)
|
|
36
32
|
], WorkspaceEnvironmentContextDto.prototype, "type", void 0);
|
|
37
33
|
__decorate([
|
|
38
|
-
|
|
34
|
+
Expose(),
|
|
39
35
|
__metadata("design:type", String)
|
|
40
36
|
], WorkspaceEnvironmentContextDto.prototype, "envName", void 0);
|
|
41
37
|
__decorate([
|
|
42
|
-
|
|
38
|
+
Expose(),
|
|
43
39
|
__metadata("design:type", String)
|
|
44
40
|
], WorkspaceEnvironmentContextDto.prototype, "connectionUrl", void 0);
|
|
45
41
|
__decorate([
|
|
46
|
-
|
|
42
|
+
Expose(),
|
|
47
43
|
__metadata("design:type", String)
|
|
48
44
|
], WorkspaceEnvironmentContextDto.prototype, "agentUrl", void 0);
|
|
49
45
|
__decorate([
|
|
50
|
-
|
|
46
|
+
Expose(),
|
|
51
47
|
__metadata("design:type", String)
|
|
52
48
|
], WorkspaceEnvironmentContextDto.prototype, "workerId", void 0);
|
|
53
49
|
__decorate([
|
|
54
|
-
|
|
50
|
+
Expose(),
|
|
55
51
|
__metadata("design:type", String)
|
|
56
52
|
], WorkspaceEnvironmentContextDto.prototype, "workerUrl", void 0);
|
|
57
53
|
//# sourceMappingURL=workspace-environment-context.dto.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"workspace-environment-context.dto.js","sourceRoot":"","sources":["../../src/dtos/workspace-environment-context.dto.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"workspace-environment-context.dto.js","sourceRoot":"","sources":["../../src/dtos/workspace-environment-context.dto.ts"],"names":[],"mappings":";;;;;;;;;AAAA,OAAO,EAAE,MAAM,EAAE,eAAe,EAAE,MAAM,mBAAmB,CAAC;AAG5D,MAAM,OAAO,8BAA8B;IAEzC,MAAM,CAAS;IAGf,IAAI,CAAS;IAGb,OAAO,CAAU;IAGjB,aAAa,CAAU;IAGvB,QAAQ,CAAU;IAGlB,QAAQ,CAAU;IAGlB,SAAS,CAAU;IAEnB,MAAM,CAAC,YAAY,CAAC,QAAsC;QACxD,OAAO,QAAQ,CAAC,GAAG,CAAC,CAAC,MAAM,EAAE,EAAE,CAC7B,eAAe,CAAC,8BAA8B,EAAE,MAAM,EAAE;YACtD,uBAAuB,EAAE,IAAI;SAC9B,CAAC,CACH,CAAC;IACJ,CAAC;CACF;AA3BC;IADC,MAAM,EAAE;;8DACM;AAGf;IADC,MAAM,EAAE;;4DACI;AAGb;IADC,MAAM,EAAE;;+DACQ;AAGjB;IADC,MAAM,EAAE;;qEACc;AAGvB;IADC,MAAM,EAAE;;gEACS;AAGlB;IADC,MAAM,EAAE;;gEACS;AAGlB;IADC,MAAM,EAAE;;iEACU"}
|
|
@@ -1,7 +1,8 @@
|
|
|
1
|
+
import { Relation } from 'typeorm';
|
|
1
2
|
import { z } from 'zod';
|
|
2
3
|
import type { JSONSchemaConfigType } from '@loopstack/contracts/types';
|
|
3
|
-
import { User } from './user.entity';
|
|
4
|
-
import { WorkflowEntity } from './workflow.entity';
|
|
4
|
+
import { User } from './user.entity.js';
|
|
5
|
+
import { WorkflowEntity } from './workflow.entity.js';
|
|
5
6
|
export declare class DocumentEntity<T = any> {
|
|
6
7
|
id: string;
|
|
7
8
|
messageId: string;
|
|
@@ -22,11 +23,11 @@ export declare class DocumentEntity<T = any> {
|
|
|
22
23
|
place: string | null;
|
|
23
24
|
createdAt: Date;
|
|
24
25
|
updatedAt: Date;
|
|
25
|
-
workflow: WorkflowEntity
|
|
26
|
+
workflow: Relation<WorkflowEntity>;
|
|
26
27
|
labels: string[];
|
|
27
28
|
workflowId: string;
|
|
28
|
-
dependentStates: WorkflowEntity[]
|
|
29
|
-
creator: User
|
|
29
|
+
dependentStates: Relation<WorkflowEntity[]>;
|
|
30
|
+
creator: Relation<User>;
|
|
30
31
|
createdBy: string;
|
|
31
32
|
}
|
|
32
33
|
//# sourceMappingURL=document.entity.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"document.entity.d.ts","sourceRoot":"","sources":["../../src/entities/document.entity.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"document.entity.d.ts","sourceRoot":"","sources":["../../src/entities/document.entity.ts"],"names":[],"mappings":"AAAA,OAAO,EASL,QAAQ,EAET,MAAM,SAAS,CAAC;AACjB,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AACxB,OAAO,KAAK,EAAE,oBAAoB,EAAE,MAAM,4BAA4B,CAAC;AAEvE,OAAO,EAAE,IAAI,EAAE,MAAM,kBAAkB,CAAC;AACxC,OAAO,EAAE,cAAc,EAAE,MAAM,sBAAsB,CAAC;AAEtD,qBACa,cAAc,CAAC,CAAC,GAAG,GAAG;IAEjC,EAAE,EAAG,MAAM,CAAC;IAIZ,SAAS,EAAG,MAAM,CAAC;IAInB,KAAK,EAAG,MAAM,CAAC;IAGf,SAAS,EAAG,MAAM,GAAG,IAAI,CAAC;IAI1B,WAAW,EAAG,MAAM,CAAC;IAGrB,OAAO,EAAG,CAAC,GAAG,IAAI,CAAC;IAQnB,MAAM,EAAG,oBAAoB,GAAG,IAAI,CAAC;IAGrC,KAAK,EAAG,CAAC,CAAC,QAAQ,GAAG,IAAI,CAAC;IAQ1B,EAAE,EAAG,GAAG,CAAC;IAGT,IAAI,EAAG,MAAM,EAAE,CAAC;IAGhB,IAAI,EAAG,MAAM,CAAC,MAAM,EAAE,GAAG,CAAC,GAAG,IAAI,CAAC;IAGlC,aAAa,EAAG,OAAO,CAAC;IAGxB,gBAAgB,EAAG,OAAO,CAAC;IAG3B,OAAO,EAAG,MAAM,CAAC;IAGjB,KAAK,EAAG,MAAM,CAAC;IAGf,UAAU,EAAG,MAAM,GAAG,IAAI,CAAC;IAG3B,KAAK,EAAG,MAAM,GAAG,IAAI,CAAC;IAGtB,SAAS,EAAG,IAAI,CAAC;IAGjB,SAAS,EAAG,IAAI,CAAC;IAMjB,QAAQ,EAAG,QAAQ,CAAC,cAAc,CAAC,CAAC;IAGpC,MAAM,EAAG,MAAM,EAAE,CAAC;IAGlB,UAAU,EAAG,MAAM,CAAC;IAKpB,eAAe,EAAG,QAAQ,CAAC,cAAc,EAAE,CAAC,CAAC;IAI7C,OAAO,EAAG,QAAQ,CAAC,IAAI,CAAC,CAAC;IAIzB,SAAS,EAAG,MAAM,CAAC;CACpB"}
|
|
@@ -1,4 +1,3 @@
|
|
|
1
|
-
"use strict";
|
|
2
1
|
var __decorate = (this && this.__decorate) || function (decorators, target, key, desc) {
|
|
3
2
|
var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
|
|
4
3
|
if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
|
|
@@ -8,12 +7,10 @@ var __decorate = (this && this.__decorate) || function (decorators, target, key,
|
|
|
8
7
|
var __metadata = (this && this.__metadata) || function (k, v) {
|
|
9
8
|
if (typeof Reflect === "object" && typeof Reflect.metadata === "function") return Reflect.metadata(k, v);
|
|
10
9
|
};
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
const user_entity_1 = require("./user.entity");
|
|
16
|
-
const workflow_entity_1 = require("./workflow.entity");
|
|
10
|
+
import { Column, CreateDateColumn, Entity, Index, JoinColumn, ManyToMany, ManyToOne, PrimaryGeneratedColumn, UpdateDateColumn, } from 'typeorm';
|
|
11
|
+
import { StableJsonTransformer } from '../utils/index.js';
|
|
12
|
+
import { User } from './user.entity.js';
|
|
13
|
+
import { WorkflowEntity } from './workflow.entity.js';
|
|
17
14
|
let DocumentEntity = class DocumentEntity {
|
|
18
15
|
id;
|
|
19
16
|
messageId;
|
|
@@ -41,128 +38,128 @@ let DocumentEntity = class DocumentEntity {
|
|
|
41
38
|
creator;
|
|
42
39
|
createdBy;
|
|
43
40
|
};
|
|
44
|
-
exports.DocumentEntity = DocumentEntity;
|
|
45
41
|
__decorate([
|
|
46
|
-
|
|
42
|
+
PrimaryGeneratedColumn('uuid'),
|
|
47
43
|
__metadata("design:type", String)
|
|
48
44
|
], DocumentEntity.prototype, "id", void 0);
|
|
49
45
|
__decorate([
|
|
50
|
-
|
|
51
|
-
|
|
46
|
+
Column({ type: 'varchar', name: 'message_id' }),
|
|
47
|
+
Index(),
|
|
52
48
|
__metadata("design:type", String)
|
|
53
49
|
], DocumentEntity.prototype, "messageId", void 0);
|
|
54
50
|
__decorate([
|
|
55
|
-
|
|
56
|
-
|
|
51
|
+
Column({ type: 'varchar', name: 'alias' }),
|
|
52
|
+
Index(),
|
|
57
53
|
__metadata("design:type", String)
|
|
58
54
|
], DocumentEntity.prototype, "alias", void 0);
|
|
59
55
|
__decorate([
|
|
60
|
-
|
|
56
|
+
Column({ type: 'varchar', name: 'class_name', nullable: true }),
|
|
61
57
|
__metadata("design:type", Object)
|
|
62
58
|
], DocumentEntity.prototype, "className", void 0);
|
|
63
59
|
__decorate([
|
|
64
|
-
|
|
65
|
-
|
|
60
|
+
Column({ name: 'workspace_id' }),
|
|
61
|
+
Index(),
|
|
66
62
|
__metadata("design:type", String)
|
|
67
63
|
], DocumentEntity.prototype, "workspaceId", void 0);
|
|
68
64
|
__decorate([
|
|
69
|
-
|
|
65
|
+
Column('jsonb', { nullable: true }),
|
|
70
66
|
__metadata("design:type", Object)
|
|
71
67
|
], DocumentEntity.prototype, "content", void 0);
|
|
72
68
|
__decorate([
|
|
73
|
-
|
|
69
|
+
Column({
|
|
74
70
|
type: 'jsonb',
|
|
75
|
-
transformer: new
|
|
71
|
+
transformer: new StableJsonTransformer(),
|
|
76
72
|
name: 'schema',
|
|
77
73
|
nullable: true,
|
|
78
74
|
}),
|
|
79
75
|
__metadata("design:type", Object)
|
|
80
76
|
], DocumentEntity.prototype, "schema", void 0);
|
|
81
77
|
__decorate([
|
|
82
|
-
|
|
78
|
+
Column('jsonb', { nullable: true, name: 'validation_error' }),
|
|
83
79
|
__metadata("design:type", Object)
|
|
84
80
|
], DocumentEntity.prototype, "error", void 0);
|
|
85
81
|
__decorate([
|
|
86
|
-
|
|
82
|
+
Column({
|
|
87
83
|
type: 'jsonb',
|
|
88
|
-
transformer: new
|
|
84
|
+
transformer: new StableJsonTransformer(),
|
|
89
85
|
name: 'ui',
|
|
90
86
|
nullable: true,
|
|
91
87
|
}),
|
|
92
88
|
__metadata("design:type", Object)
|
|
93
89
|
], DocumentEntity.prototype, "ui", void 0);
|
|
94
90
|
__decorate([
|
|
95
|
-
|
|
91
|
+
Column('varchar', { name: 'tags', array: true, nullable: true }),
|
|
96
92
|
__metadata("design:type", Array)
|
|
97
93
|
], DocumentEntity.prototype, "tags", void 0);
|
|
98
94
|
__decorate([
|
|
99
|
-
|
|
95
|
+
Column('jsonb', { nullable: true }),
|
|
100
96
|
__metadata("design:type", Object)
|
|
101
97
|
], DocumentEntity.prototype, "meta", void 0);
|
|
102
98
|
__decorate([
|
|
103
|
-
|
|
99
|
+
Column({ name: 'is_invalidated', default: false }),
|
|
104
100
|
__metadata("design:type", Boolean)
|
|
105
101
|
], DocumentEntity.prototype, "isInvalidated", void 0);
|
|
106
102
|
__decorate([
|
|
107
|
-
|
|
103
|
+
Column({ name: 'is_pending_removal', default: false }),
|
|
108
104
|
__metadata("design:type", Boolean)
|
|
109
105
|
], DocumentEntity.prototype, "isPendingRemoval", void 0);
|
|
110
106
|
__decorate([
|
|
111
|
-
|
|
107
|
+
Column({ default: 1 }),
|
|
112
108
|
__metadata("design:type", Number)
|
|
113
109
|
], DocumentEntity.prototype, "version", void 0);
|
|
114
110
|
__decorate([
|
|
115
|
-
|
|
111
|
+
Column({ default: 0 }),
|
|
116
112
|
__metadata("design:type", Number)
|
|
117
113
|
], DocumentEntity.prototype, "index", void 0);
|
|
118
114
|
__decorate([
|
|
119
|
-
|
|
115
|
+
Column({ type: 'varchar', nullable: true }),
|
|
120
116
|
__metadata("design:type", Object)
|
|
121
117
|
], DocumentEntity.prototype, "transition", void 0);
|
|
122
118
|
__decorate([
|
|
123
|
-
|
|
119
|
+
Column({ type: 'varchar', nullable: true }),
|
|
124
120
|
__metadata("design:type", Object)
|
|
125
121
|
], DocumentEntity.prototype, "place", void 0);
|
|
126
122
|
__decorate([
|
|
127
|
-
|
|
123
|
+
CreateDateColumn({ name: 'created_at' }),
|
|
128
124
|
__metadata("design:type", Date)
|
|
129
125
|
], DocumentEntity.prototype, "createdAt", void 0);
|
|
130
126
|
__decorate([
|
|
131
|
-
|
|
127
|
+
UpdateDateColumn({ name: 'updated_at' }),
|
|
132
128
|
__metadata("design:type", Date)
|
|
133
129
|
], DocumentEntity.prototype, "updatedAt", void 0);
|
|
134
130
|
__decorate([
|
|
135
|
-
|
|
131
|
+
ManyToOne(() => WorkflowEntity, (state) => state.documents, {
|
|
136
132
|
onDelete: 'CASCADE',
|
|
137
133
|
}),
|
|
138
|
-
|
|
139
|
-
__metadata("design:type",
|
|
134
|
+
JoinColumn({ name: 'workflow_id' }),
|
|
135
|
+
__metadata("design:type", Object)
|
|
140
136
|
], DocumentEntity.prototype, "workflow", void 0);
|
|
141
137
|
__decorate([
|
|
142
|
-
|
|
138
|
+
Column('varchar', { name: 'labels', array: true, nullable: false }),
|
|
143
139
|
__metadata("design:type", Array)
|
|
144
140
|
], DocumentEntity.prototype, "labels", void 0);
|
|
145
141
|
__decorate([
|
|
146
|
-
|
|
142
|
+
Column({ name: 'workflow_id', nullable: true }),
|
|
147
143
|
__metadata("design:type", String)
|
|
148
144
|
], DocumentEntity.prototype, "workflowId", void 0);
|
|
149
145
|
__decorate([
|
|
150
|
-
|
|
146
|
+
ManyToMany(() => WorkflowEntity, (state) => state.dependencies, {
|
|
151
147
|
onDelete: 'CASCADE',
|
|
152
148
|
}),
|
|
153
|
-
__metadata("design:type",
|
|
149
|
+
__metadata("design:type", Object)
|
|
154
150
|
], DocumentEntity.prototype, "dependentStates", void 0);
|
|
155
151
|
__decorate([
|
|
156
|
-
|
|
157
|
-
|
|
158
|
-
__metadata("design:type",
|
|
152
|
+
ManyToOne(() => User, { onDelete: 'RESTRICT' }),
|
|
153
|
+
JoinColumn({ name: 'created_by' }),
|
|
154
|
+
__metadata("design:type", Object)
|
|
159
155
|
], DocumentEntity.prototype, "creator", void 0);
|
|
160
156
|
__decorate([
|
|
161
|
-
|
|
162
|
-
|
|
157
|
+
Column({ name: 'created_by', type: 'uuid' }),
|
|
158
|
+
Index(),
|
|
163
159
|
__metadata("design:type", String)
|
|
164
160
|
], DocumentEntity.prototype, "createdBy", void 0);
|
|
165
|
-
|
|
166
|
-
|
|
161
|
+
DocumentEntity = __decorate([
|
|
162
|
+
Entity({ name: 'core_document' })
|
|
167
163
|
], DocumentEntity);
|
|
164
|
+
export { DocumentEntity };
|
|
168
165
|
//# sourceMappingURL=document.entity.js.map
|