@flusys/nestjs-entity-builder 9.0.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/README.md +111 -0
- package/config/entity-builder.constants.d.ts +6 -0
- package/config/event-actions.d.ts +8 -0
- package/config/index.d.ts +3 -0
- package/config/message-keys.d.ts +542 -0
- package/controllers/entity-definition.controller.d.ts +40 -0
- package/controllers/field-definition.controller.d.ts +22 -0
- package/controllers/flow-definition.controller.d.ts +51 -0
- package/controllers/flow-execution.controller.d.ts +21 -0
- package/controllers/flow-runtime.controller.d.ts +24 -0
- package/controllers/index.d.ts +5 -0
- package/docs/entity-builder-swagger.config.d.ts +3 -0
- package/docs/index.d.ts +1 -0
- package/dtos/entity-definition.dto.d.ts +58 -0
- package/dtos/field-definition.dto.d.ts +42 -0
- package/dtos/flow.dto.d.ts +76 -0
- package/dtos/index.d.ts +3 -0
- package/dtos/schema-change.dto.d.ts +53 -0
- package/entities/entity-definition.entity.d.ts +15 -0
- package/entities/field-definition.entity.d.ts +23 -0
- package/entities/flow-definition.entity.d.ts +14 -0
- package/entities/flow-execution.entity.d.ts +19 -0
- package/entities/flow-version.entity.d.ts +10 -0
- package/entities/index.d.ts +14 -0
- package/entities/schema-change-log.entity.d.ts +15 -0
- package/enums/ddl-operation.enum.d.ts +13 -0
- package/enums/entity-status.enum.d.ts +5 -0
- package/enums/field-type.enum.d.ts +15 -0
- package/enums/index.d.ts +3 -0
- package/fesm/21.js +576 -0
- package/fesm/362.js +1074 -0
- package/fesm/458.js +649 -0
- package/fesm/582.js +1247 -0
- package/fesm/677.js +7534 -0
- package/fesm/719.js +3597 -0
- package/fesm/794.js +979 -0
- package/fesm/913.js +1620 -0
- package/fesm/config/index.js +126 -0
- package/fesm/controllers/index.js +27 -0
- package/fesm/docs/index.js +82 -0
- package/fesm/dtos/index.js +327 -0
- package/fesm/entities/index.js +18 -0
- package/fesm/enums/index.js +97 -0
- package/fesm/guards/index.js +226 -0
- package/fesm/index.js +548 -0
- package/fesm/interfaces/index.js +80 -0
- package/fesm/modules/index.js +25 -0
- package/fesm/rule-engine/index.js +21 -0
- package/fesm/runtime.js +85 -0
- package/fesm/services/index.js +526 -0
- package/flow-engine/flow-api-key.d.ts +6 -0
- package/flow-engine/flow-code-sandbox.d.ts +5 -0
- package/flow-engine/flow-engine.d.ts +22 -0
- package/flow-engine/flow-graph.validator.d.ts +20 -0
- package/flow-engine/flow-http.client.d.ts +15 -0
- package/flow-engine/flow-input.validator.d.ts +7 -0
- package/flow-engine/flow-node-handlers.d.ts +5 -0
- package/flow-engine/flow-rate-limiter.d.ts +8 -0
- package/flow-engine/flow-reference.d.ts +7 -0
- package/flow-engine/flow-run.types.d.ts +131 -0
- package/flow-engine/flow.errors.d.ts +27 -0
- package/flow-engine/flow.types.d.ts +315 -0
- package/flow-engine/index.d.ts +4 -0
- package/flow-engine/redact.d.ts +3 -0
- package/flow-engine/ssrf-guard.d.ts +6 -0
- package/guards/flow-access.guard.d.ts +11 -0
- package/guards/index.d.ts +1 -0
- package/index.d.ts +11 -0
- package/interfaces/entity-builder-module.interface.d.ts +28 -0
- package/interfaces/field-definition.interface.d.ts +33 -0
- package/interfaces/flow-definition.interface.d.ts +24 -0
- package/interfaces/generic-record.interface.d.ts +15 -0
- package/interfaces/index.d.ts +5 -0
- package/interfaces/reference-provider.interface.d.ts +8 -0
- package/interfaces/schema-dialect-adapter.interface.d.ts +15 -0
- package/modules/entity-builder.module.d.ts +10 -0
- package/modules/index.d.ts +1 -0
- package/package.json +93 -0
- package/rule-engine/index.d.ts +3 -0
- package/rule-engine/rule-engine.service.d.ts +40 -0
- package/rule-engine/rule-evaluation-context.interface.d.ts +28 -0
- package/rule-engine/rule-ip.d.ts +3 -0
- package/rule-engine/rule-permission.d.ts +10 -0
- package/rule-engine/rule-regex.d.ts +4 -0
- package/rule-engine/rule-values.d.ts +5 -0
- package/rule-engine/rule.interface.d.ts +79 -0
- package/services/database-error.mapper.d.ts +2 -0
- package/services/definition-cache.service.d.ts +8 -0
- package/services/entity-builder-config.service.d.ts +12 -0
- package/services/entity-builder-datasource.provider.d.ts +24 -0
- package/services/entity-definition.service.d.ts +17 -0
- package/services/entity-flow-scaffold.d.ts +27 -0
- package/services/entity-permission.service.d.ts +8 -0
- package/services/field-definition.service.d.ts +17 -0
- package/services/field-type-conversion.d.ts +15 -0
- package/services/field-value-validator.d.ts +17 -0
- package/services/flow-definition.service.d.ts +62 -0
- package/services/flow-execution.service.d.ts +38 -0
- package/services/flow-executor.service.d.ts +41 -0
- package/services/flow-reference.provider.d.ts +13 -0
- package/services/flow-runtime.service.d.ts +30 -0
- package/services/generic-entity-service.factory.d.ts +12 -0
- package/services/generic-entity.service.d.ts +67 -0
- package/services/identifier-rules.d.ts +9 -0
- package/services/index.d.ts +26 -0
- package/services/reference-rewrite.d.ts +7 -0
- package/services/reference-scanner.service.d.ts +10 -0
- package/services/schema-change-executor.service.d.ts +39 -0
- package/services/schema-change.types.d.ts +59 -0
- package/services/schema-columns.d.ts +26 -0
- package/services/schema-dialect-adapter.service.d.ts +13 -0
- package/services/schema-evolution.service.d.ts +67 -0
- package/services/schema-registry.service.d.ts +13 -0
- package/services/schema-sync.service.d.ts +28 -0
|
@@ -0,0 +1,51 @@
|
|
|
1
|
+
import { type ILoggedUserInfo, SingleResponseDto } from '@flusys/nestjs-shared';
|
|
2
|
+
import { CreateFlowDefinitionDto, FlowDefinitionResponseDto, FlowIdDto, FlowVersionRefDto, PublishFlowDto, TestFlowDto, UpdateFlowDefinitionDto, ValidateFlowDto } from '../dtos/flow.dto.js';
|
|
3
|
+
import { type IFlowDefinition, type IFlowVersion } from '../interfaces/flow-definition.interface.js';
|
|
4
|
+
import { type IFlowValidationResult } from '../flow-engine/flow-graph.validator.js';
|
|
5
|
+
import { FlowDefinitionService } from '../services/flow-definition.service.js';
|
|
6
|
+
import { FlowRuntimeService } from '../services/flow-runtime.service.js';
|
|
7
|
+
declare const FlowDefinitionController_base: abstract new (service: FlowDefinitionService) => {
|
|
8
|
+
readonly enabledEndpoints: import("@flusys/nestjs-shared").ApiEndpoint[] | "all";
|
|
9
|
+
service: FlowDefinitionService;
|
|
10
|
+
isEnabled(endpoint: import("@flusys/nestjs-shared").ApiEndpoint): boolean;
|
|
11
|
+
insert(addDto: CreateFlowDefinitionDto, user: ILoggedUserInfo | null): Promise<SingleResponseDto<FlowDefinitionResponseDto>>;
|
|
12
|
+
insertMany(addDto: CreateFlowDefinitionDto[], user: ILoggedUserInfo | null): Promise<import("@flusys/nestjs-shared").BulkResponseDto<FlowDefinitionResponseDto>>;
|
|
13
|
+
getById(id: string, body: import("@flusys/nestjs-shared").GetByIdBodyDto, user: ILoggedUserInfo | null): Promise<SingleResponseDto<FlowDefinitionResponseDto>>;
|
|
14
|
+
getByIds(body: import("@flusys/nestjs-shared").GetByIdsDto, user: ILoggedUserInfo | null): Promise<import("@flusys/nestjs-shared").ListResponseDto<FlowDefinitionResponseDto>>;
|
|
15
|
+
update(updateDto: UpdateFlowDefinitionDto, user: ILoggedUserInfo | null): Promise<SingleResponseDto<FlowDefinitionResponseDto>>;
|
|
16
|
+
updateMany(updateDtos: UpdateFlowDefinitionDto[], user: ILoggedUserInfo | null): Promise<import("@flusys/nestjs-shared").BulkResponseDto<FlowDefinitionResponseDto>>;
|
|
17
|
+
bulkUpsert(dtos: (CreateFlowDefinitionDto | UpdateFlowDefinitionDto)[], user: ILoggedUserInfo | null): Promise<import("@flusys/nestjs-shared").BulkResponseDto<FlowDefinitionResponseDto>>;
|
|
18
|
+
getByFilter(filter: Record<string, any>, user: ILoggedUserInfo | null): Promise<SingleResponseDto<FlowDefinitionResponseDto>>;
|
|
19
|
+
getAll(filterAndPaginationDto: import("@flusys/nestjs-shared").FilterAndPaginationDto, user: ILoggedUserInfo | null, search?: string): Promise<import("@flusys/nestjs-shared").ListResponseDto<FlowDefinitionResponseDto>>;
|
|
20
|
+
delete(deleteDto: import("@flusys/nestjs-shared").DeleteDto, user: ILoggedUserInfo | null): Promise<import("@flusys/nestjs-shared").MessageResponseDto>;
|
|
21
|
+
};
|
|
22
|
+
export declare class FlowDefinitionController extends FlowDefinitionController_base {
|
|
23
|
+
flowDefinitionService: FlowDefinitionService;
|
|
24
|
+
private readonly runtime;
|
|
25
|
+
constructor(flowDefinitionService: FlowDefinitionService, runtime: FlowRuntimeService);
|
|
26
|
+
validate(dto: ValidateFlowDto): Promise<SingleResponseDto<IFlowValidationResult>>;
|
|
27
|
+
publish(dto: PublishFlowDto, user: ILoggedUserInfo): Promise<SingleResponseDto<IFlowDefinition>>;
|
|
28
|
+
versions(dto: FlowIdDto): Promise<SingleResponseDto<IFlowVersion[]>>;
|
|
29
|
+
version(dto: FlowVersionRefDto): Promise<SingleResponseDto<IFlowVersion>>;
|
|
30
|
+
restoreVersion(dto: FlowVersionRefDto, user: ILoggedUserInfo): Promise<SingleResponseDto<IFlowDefinition>>;
|
|
31
|
+
discardDraft(dto: FlowIdDto, user: ILoggedUserInfo): Promise<SingleResponseDto<IFlowDefinition>>;
|
|
32
|
+
testRun(dto: TestFlowDto, user: ILoggedUserInfo, req: {
|
|
33
|
+
ip?: string;
|
|
34
|
+
headers: Record<string, unknown>;
|
|
35
|
+
}): Promise<{
|
|
36
|
+
success: boolean;
|
|
37
|
+
message: string;
|
|
38
|
+
messageKey: "entity_builder.flow.test.success";
|
|
39
|
+
data: {
|
|
40
|
+
warnings: import("@flusys/nestjs-shared").IMessageRef[];
|
|
41
|
+
status: "success" | "failed" | "rejected";
|
|
42
|
+
statusCode: number;
|
|
43
|
+
body: unknown;
|
|
44
|
+
error?: string;
|
|
45
|
+
trace: import("../index.js").IFlowTraceEntry[];
|
|
46
|
+
durationMs: number;
|
|
47
|
+
savedUpTo?: import("../index.js").IFlowSavePoint;
|
|
48
|
+
};
|
|
49
|
+
}>;
|
|
50
|
+
}
|
|
51
|
+
export {};
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
import { SingleResponseDto } from '@flusys/nestjs-shared';
|
|
2
|
+
import { IdBodyDto, ListFlowExecutionsDto } from '../dtos/flow.dto.js';
|
|
3
|
+
import { FlowExecutionService } from '../services/flow-execution.service.js';
|
|
4
|
+
export declare class FlowExecutionController {
|
|
5
|
+
private readonly executions;
|
|
6
|
+
constructor(executions: FlowExecutionService);
|
|
7
|
+
list(dto: ListFlowExecutionsDto): Promise<{
|
|
8
|
+
success: boolean;
|
|
9
|
+
message: string;
|
|
10
|
+
messageKey: "entity_builder.flow.executions.success";
|
|
11
|
+
data: import("../index.js").FlowExecution[];
|
|
12
|
+
meta: {
|
|
13
|
+
total: number;
|
|
14
|
+
page: number;
|
|
15
|
+
pageSize: number;
|
|
16
|
+
count: number;
|
|
17
|
+
hasMore: boolean;
|
|
18
|
+
};
|
|
19
|
+
}>;
|
|
20
|
+
get(dto: IdBodyDto): Promise<SingleResponseDto<unknown>>;
|
|
21
|
+
}
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
import { type FlowDefinition } from '../entities/flow-definition.entity.js';
|
|
2
|
+
import { type IFlowEndpoint } from '../flow-engine/flow.types.js';
|
|
3
|
+
import { FlowRuntimeService } from '../services/flow-runtime.service.js';
|
|
4
|
+
type FlowRequest = {
|
|
5
|
+
flowDefinition: FlowDefinition;
|
|
6
|
+
flowEndpoint: IFlowEndpoint;
|
|
7
|
+
user?: never;
|
|
8
|
+
ip?: string;
|
|
9
|
+
headers: Record<string, unknown>;
|
|
10
|
+
query?: Record<string, unknown>;
|
|
11
|
+
path?: string;
|
|
12
|
+
};
|
|
13
|
+
export declare class FlowRuntimeController {
|
|
14
|
+
private readonly runtime;
|
|
15
|
+
constructor(runtime: FlowRuntimeService);
|
|
16
|
+
run(_slug: string, body: unknown, req: FlowRequest, res: {
|
|
17
|
+
status(code: number): unknown;
|
|
18
|
+
}): Promise<unknown>;
|
|
19
|
+
runEndpoint(_slug: string, _endpoint: string, body: unknown, req: FlowRequest, res: {
|
|
20
|
+
status(code: number): unknown;
|
|
21
|
+
}): Promise<unknown>;
|
|
22
|
+
private answer;
|
|
23
|
+
}
|
|
24
|
+
export {};
|
package/docs/index.d.ts
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export { entityBuilderSwaggerConfig } from './entity-builder-swagger.config.js';
|
|
@@ -0,0 +1,58 @@
|
|
|
1
|
+
import { IdentityResponseDto } from '@flusys/nestjs-shared/dtos';
|
|
2
|
+
import { type EntityFlowEndpoint } from '../config/entity-builder.constants.js';
|
|
3
|
+
import { EntityStatus } from '../enums/entity-status.enum.js';
|
|
4
|
+
import { CreateFieldDefinitionDto } from './field-definition.dto.js';
|
|
5
|
+
export declare class CreateEntityDefinitionDto {
|
|
6
|
+
code: string;
|
|
7
|
+
label: string;
|
|
8
|
+
description?: string;
|
|
9
|
+
isSoftDeleteEnabled?: boolean;
|
|
10
|
+
isAuditEnabled?: boolean;
|
|
11
|
+
uiConfig?: Record<string, unknown>;
|
|
12
|
+
}
|
|
13
|
+
declare const UpdateEntityDefinitionDto_base: import("@nestjs/common").Type<Partial<CreateEntityDefinitionDto>>;
|
|
14
|
+
export declare class UpdateEntityDefinitionDto extends UpdateEntityDefinitionDto_base {
|
|
15
|
+
id: string;
|
|
16
|
+
}
|
|
17
|
+
declare const EntityFieldSpecDto_base: import("@nestjs/common").Type<Omit<CreateFieldDefinitionDto, "entityDefinitionId">>;
|
|
18
|
+
export declare class EntityFieldSpecDto extends EntityFieldSpecDto_base {
|
|
19
|
+
}
|
|
20
|
+
export declare class EntityFlowNamesDto {
|
|
21
|
+
insert?: string;
|
|
22
|
+
insertMany?: string;
|
|
23
|
+
getById?: string;
|
|
24
|
+
getByIds?: string;
|
|
25
|
+
getAll?: string;
|
|
26
|
+
getByFilter?: string;
|
|
27
|
+
update?: string;
|
|
28
|
+
updateMany?: string;
|
|
29
|
+
bulkUpsert?: string;
|
|
30
|
+
delete?: string;
|
|
31
|
+
}
|
|
32
|
+
export declare class EntityFlowInputLabelsDto {
|
|
33
|
+
id?: string;
|
|
34
|
+
ids?: string;
|
|
35
|
+
search?: string;
|
|
36
|
+
}
|
|
37
|
+
export declare class EntityFlowTextsDto {
|
|
38
|
+
names?: EntityFlowNamesDto;
|
|
39
|
+
inputLabels?: EntityFlowInputLabelsDto;
|
|
40
|
+
noMatchMessage?: string;
|
|
41
|
+
}
|
|
42
|
+
export declare class CreateDynamicEntityDto extends CreateEntityDefinitionDto {
|
|
43
|
+
fields?: EntityFieldSpecDto[];
|
|
44
|
+
flowEndpoints?: EntityFlowEndpoint[];
|
|
45
|
+
flowTexts?: EntityFlowTextsDto;
|
|
46
|
+
}
|
|
47
|
+
export declare class EntityDefinitionResponseDto extends IdentityResponseDto {
|
|
48
|
+
code: string;
|
|
49
|
+
label: string;
|
|
50
|
+
description: string | null;
|
|
51
|
+
tableName: string;
|
|
52
|
+
status: EntityStatus;
|
|
53
|
+
schemaVersion: number;
|
|
54
|
+
isSoftDeleteEnabled: boolean;
|
|
55
|
+
isAuditEnabled: boolean;
|
|
56
|
+
uiConfig: Record<string, unknown> | null;
|
|
57
|
+
}
|
|
58
|
+
export {};
|
|
@@ -0,0 +1,42 @@
|
|
|
1
|
+
import { IdentityResponseDto } from '@flusys/nestjs-shared/dtos';
|
|
2
|
+
import { FieldType } from '../enums/field-type.enum.js';
|
|
3
|
+
export declare class CreateFieldDefinitionDto {
|
|
4
|
+
entityDefinitionId: string;
|
|
5
|
+
code: string;
|
|
6
|
+
label: string;
|
|
7
|
+
fieldType: FieldType;
|
|
8
|
+
nullable?: boolean;
|
|
9
|
+
unique?: boolean;
|
|
10
|
+
isIndexed?: boolean;
|
|
11
|
+
defaultValue?: unknown;
|
|
12
|
+
validationRules?: Record<string, unknown>;
|
|
13
|
+
selectOptions?: unknown[];
|
|
14
|
+
relationTargetEntityId?: string;
|
|
15
|
+
order?: number;
|
|
16
|
+
uiConfig?: Record<string, unknown>;
|
|
17
|
+
isSearchable?: boolean;
|
|
18
|
+
}
|
|
19
|
+
declare const UpdateFieldDefinitionDto_base: import("@nestjs/common").Type<Partial<CreateFieldDefinitionDto>>;
|
|
20
|
+
export declare class UpdateFieldDefinitionDto extends UpdateFieldDefinitionDto_base {
|
|
21
|
+
id: string;
|
|
22
|
+
}
|
|
23
|
+
export declare class FieldDefinitionResponseDto extends IdentityResponseDto {
|
|
24
|
+
entityDefinitionId: string;
|
|
25
|
+
code: string;
|
|
26
|
+
label: string;
|
|
27
|
+
fieldType: FieldType;
|
|
28
|
+
dbType: string;
|
|
29
|
+
nullable: boolean;
|
|
30
|
+
unique: boolean;
|
|
31
|
+
isIndexed: boolean;
|
|
32
|
+
defaultValue: unknown | null;
|
|
33
|
+
validationRules: Record<string, unknown> | null;
|
|
34
|
+
selectOptions: unknown[] | null;
|
|
35
|
+
relationTargetEntityId: string | null;
|
|
36
|
+
order: number;
|
|
37
|
+
uiConfig: Record<string, unknown> | null;
|
|
38
|
+
isSearchable: boolean;
|
|
39
|
+
isSystemField: boolean;
|
|
40
|
+
deprecatedAt: Date | null;
|
|
41
|
+
}
|
|
42
|
+
export {};
|
|
@@ -0,0 +1,76 @@
|
|
|
1
|
+
import { IdentityResponseDto } from '@flusys/nestjs-shared/dtos';
|
|
2
|
+
import { type IFlowSnapshot } from '../interfaces/flow-definition.interface.js';
|
|
3
|
+
import { type FlowInput, type IFlowEdge, type IFlowNode } from '../flow-engine/flow.types.js';
|
|
4
|
+
export declare class CreateFlowDefinitionDto {
|
|
5
|
+
name: string;
|
|
6
|
+
slug: string;
|
|
7
|
+
description?: string;
|
|
8
|
+
isActive?: boolean;
|
|
9
|
+
retainExecutions?: number;
|
|
10
|
+
nodes: IFlowNode[];
|
|
11
|
+
edges: IFlowEdge[];
|
|
12
|
+
}
|
|
13
|
+
declare const UpdateFlowDefinitionDto_base: import("@nestjs/common").Type<Partial<CreateFlowDefinitionDto>>;
|
|
14
|
+
export declare class UpdateFlowDefinitionDto extends UpdateFlowDefinitionDto_base {
|
|
15
|
+
id: string;
|
|
16
|
+
}
|
|
17
|
+
declare const FlowDraftDto_base: import("@nestjs/common").Type<Omit<CreateFlowDefinitionDto, "name">>;
|
|
18
|
+
export declare class FlowDraftDto extends FlowDraftDto_base {
|
|
19
|
+
name?: string;
|
|
20
|
+
id?: string;
|
|
21
|
+
version?: unknown;
|
|
22
|
+
draft?: unknown;
|
|
23
|
+
createdAt?: unknown;
|
|
24
|
+
updatedAt?: unknown;
|
|
25
|
+
deletedAt?: unknown;
|
|
26
|
+
createdById?: unknown;
|
|
27
|
+
updatedById?: unknown;
|
|
28
|
+
deletedById?: unknown;
|
|
29
|
+
}
|
|
30
|
+
export declare class TestFlowRequestDto {
|
|
31
|
+
headers?: Record<string, string>;
|
|
32
|
+
query?: Record<string, string>;
|
|
33
|
+
ip?: string;
|
|
34
|
+
}
|
|
35
|
+
export declare class TestFlowDto {
|
|
36
|
+
flowId?: string;
|
|
37
|
+
definition?: FlowDraftDto;
|
|
38
|
+
endpoint?: string;
|
|
39
|
+
input?: FlowInput;
|
|
40
|
+
mode?: 'dry_run' | 'live';
|
|
41
|
+
request?: TestFlowRequestDto;
|
|
42
|
+
}
|
|
43
|
+
export declare class ValidateFlowDto {
|
|
44
|
+
definition: FlowDraftDto;
|
|
45
|
+
}
|
|
46
|
+
export declare class FlowIdDto {
|
|
47
|
+
flowId: string;
|
|
48
|
+
}
|
|
49
|
+
export declare class PublishFlowDto {
|
|
50
|
+
id: string;
|
|
51
|
+
note?: string;
|
|
52
|
+
}
|
|
53
|
+
export declare class FlowVersionRefDto extends FlowIdDto {
|
|
54
|
+
version: number;
|
|
55
|
+
}
|
|
56
|
+
export declare class IdBodyDto {
|
|
57
|
+
id: string;
|
|
58
|
+
}
|
|
59
|
+
export declare class ListFlowExecutionsDto {
|
|
60
|
+
flowId?: string;
|
|
61
|
+
status?: string;
|
|
62
|
+
page?: number;
|
|
63
|
+
pageSize?: number;
|
|
64
|
+
}
|
|
65
|
+
export declare class FlowDefinitionResponseDto extends IdentityResponseDto {
|
|
66
|
+
name: string;
|
|
67
|
+
slug: string;
|
|
68
|
+
description: string | null;
|
|
69
|
+
isActive: boolean;
|
|
70
|
+
retainExecutions: number;
|
|
71
|
+
nodes: IFlowNode[];
|
|
72
|
+
edges: IFlowEdge[];
|
|
73
|
+
version: number;
|
|
74
|
+
draft: IFlowSnapshot | null;
|
|
75
|
+
}
|
|
76
|
+
export {};
|
package/dtos/index.d.ts
ADDED
|
@@ -0,0 +1,53 @@
|
|
|
1
|
+
import { EntityStatus } from '../enums/entity-status.enum.js';
|
|
2
|
+
import { FieldType } from '../enums/field-type.enum.js';
|
|
3
|
+
import { EntityFieldSpecDto } from './entity-definition.dto.js';
|
|
4
|
+
export declare enum SchemaChangeAction {
|
|
5
|
+
ADD_FIELD = "add_field",
|
|
6
|
+
UPDATE_FIELD = "update_field",
|
|
7
|
+
DEPRECATE_FIELD = "deprecate_field",
|
|
8
|
+
RESTORE_FIELD = "restore_field",
|
|
9
|
+
PURGE_FIELD = "purge_field",
|
|
10
|
+
UPDATE_ENTITY = "update_entity",
|
|
11
|
+
DROP_ENTITY = "drop_entity",
|
|
12
|
+
REPAIR = "repair"
|
|
13
|
+
}
|
|
14
|
+
export declare const FIELD_CHANGE_KEYS: readonly ["label", "code", "fieldType", "nullable", "unique", "isIndexed", "defaultValue", "validationRules", "selectOptions", "order", "uiConfig", "isSearchable", "relationTargetEntityId"];
|
|
15
|
+
export declare const ENTITY_CHANGE_KEYS: readonly ["label", "description", "uiConfig", "isSoftDeleteEnabled", "isAuditEnabled", "status"];
|
|
16
|
+
export declare class FieldChangesDto {
|
|
17
|
+
label?: string;
|
|
18
|
+
code?: string;
|
|
19
|
+
fieldType?: FieldType;
|
|
20
|
+
nullable?: boolean;
|
|
21
|
+
unique?: boolean;
|
|
22
|
+
isIndexed?: boolean;
|
|
23
|
+
isSearchable?: boolean;
|
|
24
|
+
defaultValue?: unknown;
|
|
25
|
+
validationRules?: Record<string, unknown> | null;
|
|
26
|
+
selectOptions?: unknown[] | null;
|
|
27
|
+
order?: number;
|
|
28
|
+
uiConfig?: Record<string, unknown> | null;
|
|
29
|
+
relationTargetEntityId?: string | null;
|
|
30
|
+
}
|
|
31
|
+
export declare class EntityChangesDto {
|
|
32
|
+
label?: string;
|
|
33
|
+
description?: string | null;
|
|
34
|
+
uiConfig?: Record<string, unknown> | null;
|
|
35
|
+
isSoftDeleteEnabled?: boolean;
|
|
36
|
+
isAuditEnabled?: boolean;
|
|
37
|
+
status?: EntityStatus;
|
|
38
|
+
}
|
|
39
|
+
export declare class SchemaChangeRequestDto {
|
|
40
|
+
action: SchemaChangeAction;
|
|
41
|
+
entityDefinitionId?: string;
|
|
42
|
+
fieldDefinitionId?: string;
|
|
43
|
+
field?: EntityFieldSpecDto;
|
|
44
|
+
changes?: Record<string, unknown>;
|
|
45
|
+
backfillValue?: unknown;
|
|
46
|
+
rewriteReferences?: boolean;
|
|
47
|
+
confirmCode?: string;
|
|
48
|
+
confirm?: boolean;
|
|
49
|
+
expectedUpdatedAt?: string;
|
|
50
|
+
}
|
|
51
|
+
export declare class SchemaCheckRequestDto {
|
|
52
|
+
entityDefinitionId: string;
|
|
53
|
+
}
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
import { Identity } from '@flusys/nestjs-shared';
|
|
2
|
+
import type { FieldDefinition } from './field-definition.entity.js';
|
|
3
|
+
import { EntityStatus } from '../enums/entity-status.enum.js';
|
|
4
|
+
export declare class EntityDefinition extends Identity {
|
|
5
|
+
code: string;
|
|
6
|
+
label: string;
|
|
7
|
+
description: string | null;
|
|
8
|
+
tableName: string;
|
|
9
|
+
status: EntityStatus;
|
|
10
|
+
schemaVersion: number;
|
|
11
|
+
isSoftDeleteEnabled: boolean;
|
|
12
|
+
isAuditEnabled: boolean;
|
|
13
|
+
uiConfig: Record<string, unknown> | null;
|
|
14
|
+
fields?: FieldDefinition[];
|
|
15
|
+
}
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
import { Identity } from '@flusys/nestjs-shared';
|
|
2
|
+
import type { EntityDefinition } from './entity-definition.entity.js';
|
|
3
|
+
import { FieldType } from '../enums/field-type.enum.js';
|
|
4
|
+
export declare class FieldDefinition extends Identity {
|
|
5
|
+
entityDefinition?: EntityDefinition;
|
|
6
|
+
entityDefinitionId: string;
|
|
7
|
+
code: string;
|
|
8
|
+
label: string;
|
|
9
|
+
fieldType: FieldType;
|
|
10
|
+
dbType: string;
|
|
11
|
+
nullable: boolean;
|
|
12
|
+
unique: boolean;
|
|
13
|
+
isIndexed: boolean;
|
|
14
|
+
defaultValue: unknown | null;
|
|
15
|
+
validationRules: Record<string, unknown> | null;
|
|
16
|
+
selectOptions: unknown[] | null;
|
|
17
|
+
relationTargetEntityId: string | null;
|
|
18
|
+
order: number;
|
|
19
|
+
uiConfig: Record<string, unknown> | null;
|
|
20
|
+
isSearchable: boolean;
|
|
21
|
+
isSystemField: boolean;
|
|
22
|
+
deprecatedAt: Date | null;
|
|
23
|
+
}
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
import { Identity } from '@flusys/nestjs-shared';
|
|
2
|
+
import type { IFlowEdge, IFlowNode } from '../flow-engine/flow.types.js';
|
|
3
|
+
import type { IFlowSnapshot } from '../interfaces/flow-definition.interface.js';
|
|
4
|
+
export declare class FlowDefinition extends Identity {
|
|
5
|
+
name: string;
|
|
6
|
+
slug: string;
|
|
7
|
+
description: string | null;
|
|
8
|
+
isActive: boolean;
|
|
9
|
+
retainExecutions: number;
|
|
10
|
+
nodes: IFlowNode[];
|
|
11
|
+
edges: IFlowEdge[];
|
|
12
|
+
version: number;
|
|
13
|
+
draft: IFlowSnapshot | null;
|
|
14
|
+
}
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
import { Identity } from '@flusys/nestjs-shared';
|
|
2
|
+
import type { IFlowTraceEntry } from '../flow-engine/flow-run.types.js';
|
|
3
|
+
export declare class FlowExecution extends Identity {
|
|
4
|
+
flowId: string | null;
|
|
5
|
+
flowSlug: string;
|
|
6
|
+
flowVersion: number | null;
|
|
7
|
+
status: string;
|
|
8
|
+
trigger: string;
|
|
9
|
+
mode: string;
|
|
10
|
+
statusCode: number;
|
|
11
|
+
input: Record<string, unknown> | null;
|
|
12
|
+
output: string | null;
|
|
13
|
+
error: string | null;
|
|
14
|
+
trace: IFlowTraceEntry[] | null;
|
|
15
|
+
durationMs: number;
|
|
16
|
+
startedAt: Date;
|
|
17
|
+
actorId: string | null;
|
|
18
|
+
callerIp: string | null;
|
|
19
|
+
}
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import { Identity } from '@flusys/nestjs-shared';
|
|
2
|
+
import type { IFlowSnapshot } from '../interfaces/flow-definition.interface.js';
|
|
3
|
+
export declare class FlowVersion extends Identity {
|
|
4
|
+
flowId: string;
|
|
5
|
+
version: number;
|
|
6
|
+
definition: IFlowSnapshot;
|
|
7
|
+
note: string | null;
|
|
8
|
+
publishedAt: Date | null;
|
|
9
|
+
publishedById: string | null;
|
|
10
|
+
}
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
export * from './entity-definition.entity.js';
|
|
2
|
+
export * from './field-definition.entity.js';
|
|
3
|
+
export * from './schema-change-log.entity.js';
|
|
4
|
+
export * from './flow-definition.entity.js';
|
|
5
|
+
export * from './flow-execution.entity.js';
|
|
6
|
+
export * from './flow-version.entity.js';
|
|
7
|
+
import { EntityDefinition } from './entity-definition.entity.js';
|
|
8
|
+
import { FieldDefinition } from './field-definition.entity.js';
|
|
9
|
+
import { SchemaChangeLog } from './schema-change-log.entity.js';
|
|
10
|
+
import { FlowDefinition } from './flow-definition.entity.js';
|
|
11
|
+
import { FlowExecution } from './flow-execution.entity.js';
|
|
12
|
+
import { FlowVersion } from './flow-version.entity.js';
|
|
13
|
+
export declare const EntityBuilderEntities: (typeof EntityDefinition | typeof FieldDefinition | typeof SchemaChangeLog | typeof FlowDefinition | typeof FlowExecution | typeof FlowVersion)[];
|
|
14
|
+
export declare function getEntityBuilderEntities(): typeof EntityBuilderEntities;
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
import { Identity } from '@flusys/nestjs-shared';
|
|
2
|
+
import { DdlOperation } from '../enums/ddl-operation.enum.js';
|
|
3
|
+
export declare class SchemaChangeLog extends Identity {
|
|
4
|
+
entityDefinitionId: string | null;
|
|
5
|
+
entityCode: string | null;
|
|
6
|
+
operation: DdlOperation;
|
|
7
|
+
tableName: string;
|
|
8
|
+
fieldDefinitionId: string | null;
|
|
9
|
+
diff: Record<string, unknown>;
|
|
10
|
+
generatedSql: string[];
|
|
11
|
+
downSql: string[] | null;
|
|
12
|
+
status: string;
|
|
13
|
+
errorMessage: string | null;
|
|
14
|
+
performedById: string | null;
|
|
15
|
+
}
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
export declare enum DdlOperation {
|
|
2
|
+
CREATE_TABLE = "CREATE_TABLE",
|
|
3
|
+
ADD_COLUMN = "ADD_COLUMN",
|
|
4
|
+
CREATE_INDEX = "CREATE_INDEX",
|
|
5
|
+
MARK_DEPRECATED = "MARK_DEPRECATED",
|
|
6
|
+
RESTORE_FIELD = "RESTORE_FIELD",
|
|
7
|
+
ALTER_FIELD = "ALTER_FIELD",
|
|
8
|
+
RENAME_FIELD = "RENAME_FIELD",
|
|
9
|
+
DROP_COLUMN = "DROP_COLUMN",
|
|
10
|
+
ALTER_ENTITY = "ALTER_ENTITY",
|
|
11
|
+
DROP_TABLE = "DROP_TABLE",
|
|
12
|
+
REPAIR = "REPAIR"
|
|
13
|
+
}
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
export declare enum FieldType {
|
|
2
|
+
TEXT = "TEXT",
|
|
3
|
+
LONG_TEXT = "LONG_TEXT",
|
|
4
|
+
INTEGER = "INTEGER",
|
|
5
|
+
DECIMAL = "DECIMAL",
|
|
6
|
+
BOOLEAN = "BOOLEAN",
|
|
7
|
+
DATE = "DATE",
|
|
8
|
+
DATETIME = "DATETIME",
|
|
9
|
+
EMAIL = "EMAIL",
|
|
10
|
+
SINGLE_SELECT = "SINGLE_SELECT",
|
|
11
|
+
MULTI_SELECT = "MULTI_SELECT",
|
|
12
|
+
RELATION = "RELATION",
|
|
13
|
+
JSON = "JSON",
|
|
14
|
+
FILE = "FILE"
|
|
15
|
+
}
|
package/enums/index.d.ts
ADDED