@endge/core 1.2.5
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/ReadMe.md +21 -0
- package/dist/core.js +85019 -0
- package/dist/domain/data-source-graphql.d.ts +4 -0
- package/dist/domain/data-source-mock.d.ts +4 -0
- package/dist/domain/data-source-rest.d.ts +4 -0
- package/dist/domain/declare/jsx.d.ts +68 -0
- package/dist/domain/declare/scenario.d.ts +19 -0
- package/dist/domain/dependency-graph.d.ts +19 -0
- package/dist/domain/entities/action-flow/REndgeFlow.d.ts +27 -0
- package/dist/domain/entities/data/DataSource.d.ts +8 -0
- package/dist/domain/entities/data/DependencyEdge.d.ts +48 -0
- package/dist/domain/entities/data/DependencyGraph.d.ts +25 -0
- package/dist/domain/entities/data/DependencyNode.d.ts +30 -0
- package/dist/domain/entities/debug/MemoryStore.d.ts +34 -0
- package/dist/domain/entities/debug/tools/base.d.ts +5 -0
- package/dist/domain/entities/debug/tools/tree.d.ts +12 -0
- package/dist/domain/entities/diagnostics/DiagnosticsRecordStore.d.ts +33 -0
- package/dist/domain/entities/diagnostics/DiagnosticsScopeHandle.d.ts +21 -0
- package/dist/domain/entities/diagnostics/DiagnosticsSpan.d.ts +9 -0
- package/dist/domain/entities/diagnostics/DiagnosticsTrace.d.ts +9 -0
- package/dist/domain/entities/endge/EndgeActionJsonScript.d.ts +2 -0
- package/dist/domain/entities/endge/EndgeApi.d.ts +23 -0
- package/dist/domain/entities/endge/EndgeEvent.d.ts +33 -0
- package/dist/domain/entities/endge/EndgeFederation.d.ts +64 -0
- package/dist/domain/entities/endge/EndgeModule.d.ts +36 -0
- package/dist/domain/entities/endge/EndgeModuleController.d.ts +18 -0
- package/dist/domain/entities/endge/EndgeSlotRegistry.d.ts +14 -0
- package/dist/domain/entities/reflect/RAction.d.ts +30 -0
- package/dist/domain/entities/reflect/RBehaviorBinding.d.ts +19 -0
- package/dist/domain/entities/reflect/RComponent.d.ts +25 -0
- package/dist/domain/entities/reflect/RComponentBase.d.ts +39 -0
- package/dist/domain/entities/reflect/RComponentDSL.d.ts +14 -0
- package/dist/domain/entities/reflect/RComponentTable.d.ts +21 -0
- package/dist/domain/entities/reflect/RComponentTableColumn.d.ts +64 -0
- package/dist/domain/entities/reflect/RConverter.d.ts +14 -0
- package/dist/domain/entities/reflect/REntity.d.ts +47 -0
- package/dist/domain/entities/reflect/REnvironment.d.ts +6 -0
- package/dist/domain/entities/reflect/RField.d.ts +9 -0
- package/dist/domain/entities/reflect/RFilter.d.ts +11 -0
- package/dist/domain/entities/reflect/RFolder.d.ts +23 -0
- package/dist/domain/entities/reflect/RI18nBundle.d.ts +16 -0
- package/dist/domain/entities/reflect/RIntegration.d.ts +13 -0
- package/dist/domain/entities/reflect/RNavigation.d.ts +24 -0
- package/dist/domain/entities/reflect/RPage.d.ts +45 -0
- package/dist/domain/entities/reflect/RPageTemplate.d.ts +32 -0
- package/dist/domain/entities/reflect/RParameter.d.ts +13 -0
- package/dist/domain/entities/reflect/RPolicy.d.ts +7 -0
- package/dist/domain/entities/reflect/RPresentationBinding.d.ts +20 -0
- package/dist/domain/entities/reflect/RProject.d.ts +68 -0
- package/dist/domain/entities/reflect/RQuery.d.ts +43 -0
- package/dist/domain/entities/reflect/RQueryFilter.d.ts +12 -0
- package/dist/domain/entities/reflect/RQueryRest.d.ts +21 -0
- package/dist/domain/entities/reflect/RScenario.d.ts +20 -0
- package/dist/domain/entities/reflect/RSettings.d.ts +49 -0
- package/dist/domain/entities/reflect/RStyle.d.ts +7 -0
- package/dist/domain/entities/reflect/RTenant.d.ts +8 -0
- package/dist/domain/entities/reflect/RType.d.ts +17 -0
- package/dist/domain/entities/reflect/RVersion.d.ts +29 -0
- package/dist/domain/entities/reflect/RView.d.ts +21 -0
- package/dist/domain/entities/reflect/RVocabs.d.ts +16 -0
- package/dist/domain/entities/runtime/RuntimeBindingScope.d.ts +48 -0
- package/dist/domain/entities/runtime/RuntimeContext.d.ts +26 -0
- package/dist/domain/entities/runtime/RuntimeEnvironment.d.ts +12 -0
- package/dist/domain/entities/runtime/RuntimeHostBase.d.ts +100 -0
- package/dist/domain/entities/runtime/RuntimeHostFactory.d.ts +15 -0
- package/dist/domain/entities/runtime/RuntimeHostRegistry.d.ts +56 -0
- package/dist/domain/entities/runtime/RuntimeScope.d.ts +45 -0
- package/dist/domain/entities/runtime/hosts/ActionRuntimeHost.d.ts +30 -0
- package/dist/domain/entities/runtime/hosts/ComponentRuntimeHost.d.ts +22 -0
- package/dist/domain/entities/runtime/hosts/PageRuntimeHost.d.ts +22 -0
- package/dist/domain/entities/runtime/hosts/ProjectRuntimeHost.d.ts +22 -0
- package/dist/domain/entities/runtime/hosts/QueryRuntimeHost.d.ts +22 -0
- package/dist/domain/entities/runtime/hosts/TableRuntimeHost.d.ts +22 -0
- package/dist/domain/entities/runtime/hosts/ViewRuntimeHost.d.ts +22 -0
- package/dist/domain/script-api/expose.d.ts +6 -0
- package/dist/domain/script-api/mount.d.ts +7 -0
- package/dist/domain/script-api/query.d.ts +7 -0
- package/dist/domain/script-api/watch.d.ts +7 -0
- package/dist/domain/services/AbstractSyntaxTree_JSX.d.ts +30 -0
- package/dist/domain/services/AbstractSyntaxTree_TS.d.ts +18 -0
- package/dist/domain/services/GraphQLBuilderService.d.ts +19 -0
- package/dist/domain/services/ScenarioScriptBuilderService.d.ts +19 -0
- package/dist/domain/services/auth.d.ts +17 -0
- package/dist/domain/services/component-render-host.d.ts +20 -0
- package/dist/domain/types/action.types.d.ts +65 -0
- package/dist/domain/types/api.types.d.ts +29 -0
- package/dist/domain/types/auth.types.d.ts +82 -0
- package/dist/domain/types/bootstrap.types.d.ts +35 -0
- package/dist/domain/types/codegen.types.d.ts +23 -0
- package/dist/domain/types/component.types.d.ts +8 -0
- package/dist/domain/types/configuration-contract.types.d.ts +53 -0
- package/dist/domain/types/debug/base.types.d.ts +74 -0
- package/dist/domain/types/debug/events.types.d.ts +3 -0
- package/dist/domain/types/debug/tree.types.d.ts +27 -0
- package/dist/domain/types/diagnostics.types.d.ts +235 -0
- package/dist/domain/types/document.types.d.ts +93 -0
- package/dist/domain/types/endge-flow-runtime.types.d.ts +28 -0
- package/dist/domain/types/endge-flow.types.d.ts +110 -0
- package/dist/domain/types/events.types.d.ts +29 -0
- package/dist/domain/types/faceted-cascade.d.ts +300 -0
- package/dist/domain/types/filter.types.d.ts +39 -0
- package/dist/domain/types/flow-condition.types.d.ts +39 -0
- package/dist/domain/types/forge.types.d.ts +30 -0
- package/dist/domain/types/jsx.types.d.ts +16 -0
- package/dist/domain/types/models.types.d.ts +7 -0
- package/dist/domain/types/navigation.types.d.ts +27 -0
- package/dist/domain/types/query.types.d.ts +66 -0
- package/dist/domain/types/resolve.types.d.ts +70 -0
- package/dist/domain/types/runtime-entity-map.types.d.ts +28 -0
- package/dist/domain/types/runtime-host.types.d.ts +168 -0
- package/dist/domain/types/runtime-registry.types.d.ts +38 -0
- package/dist/domain/types/runtime.types.d.ts +103 -0
- package/dist/domain/types/schema.types.d.ts +92 -0
- package/dist/domain/types/settings.types.d.ts +117 -0
- package/dist/domain/types/styles.types.d.ts +25 -0
- package/dist/domain/types/table.types.d.ts +15 -0
- package/dist/domain/types/types.d.ts +99 -0
- package/dist/domain/types/ui-composition.types.d.ts +201 -0
- package/dist/domain/types/ui.types.d.ts +17 -0
- package/dist/main.d.ts +154 -0
- package/dist/model/config/contracts/behavior/component.d.ts +2 -0
- package/dist/model/config/contracts/behavior/index.d.ts +8 -0
- package/dist/model/config/contracts/behavior/page-template.d.ts +2 -0
- package/dist/model/config/contracts/behavior/page.d.ts +30 -0
- package/dist/model/config/contracts/behavior/project.d.ts +2 -0
- package/dist/model/config/contracts/behavior/query.d.ts +2 -0
- package/dist/model/config/contracts/behavior/view.d.ts +2 -0
- package/dist/model/config/contracts/configuration/index.d.ts +3 -0
- package/dist/model/config/contracts/configuration/navigation.d.ts +3 -0
- package/dist/model/config/contracts/index.d.ts +17 -0
- package/dist/model/config/contracts/presentation/component.d.ts +2 -0
- package/dist/model/config/contracts/presentation/index.d.ts +8 -0
- package/dist/model/config/contracts/presentation/page-template.d.ts +2 -0
- package/dist/model/config/contracts/presentation/page.d.ts +2 -0
- package/dist/model/config/contracts/presentation/project.d.ts +2 -0
- package/dist/model/config/contracts/presentation/query.d.ts +2 -0
- package/dist/model/config/contracts/presentation/view.d.ts +2 -0
- package/dist/model/config/debug.d.ts +11 -0
- package/dist/model/config/events.d.ts +16 -0
- package/dist/model/config/index.d.ts +7 -0
- package/dist/model/config/persistance_config.d.ts +6 -0
- package/dist/model/config/storage_config.d.ts +4 -0
- package/dist/model/config/ui-composition-defaults.d.ts +523 -0
- package/dist/model/db/repositories/Actions_Repository.d.ts +35 -0
- package/dist/model/db/repositories/BehaviorBindings_Repository.d.ts +16 -0
- package/dist/model/db/repositories/Components_Repository.d.ts +64 -0
- package/dist/model/db/repositories/Converters_Repository.d.ts +40 -0
- package/dist/model/db/repositories/Environments_Repository.d.ts +35 -0
- package/dist/model/db/repositories/Filters_Repository.d.ts +56 -0
- package/dist/model/db/repositories/Folders_Repository.d.ts +30 -0
- package/dist/model/db/repositories/I18nBundles_Repository.d.ts +47 -0
- package/dist/model/db/repositories/Integrations_Repository.d.ts +40 -0
- package/dist/model/db/repositories/Navigations_Repository.d.ts +40 -0
- package/dist/model/db/repositories/PageTemplates_Repository.d.ts +56 -0
- package/dist/model/db/repositories/Pages_Repository.d.ts +89 -0
- package/dist/model/db/repositories/Parameters_Repository.d.ts +56 -0
- package/dist/model/db/repositories/Policies_Repository.d.ts +35 -0
- package/dist/model/db/repositories/PresentationBindings_Repository.d.ts +14 -0
- package/dist/model/db/repositories/Projects_Repository.d.ts +38 -0
- package/dist/model/db/repositories/Queries_Repository.d.ts +45 -0
- package/dist/model/db/repositories/Scenarios_Repository.d.ts +41 -0
- package/dist/model/db/repositories/Settings_Repository.d.ts +48 -0
- package/dist/model/db/repositories/Styles_Repository.d.ts +51 -0
- package/dist/model/db/repositories/Tenants_Repository.d.ts +39 -0
- package/dist/model/db/repositories/Types_Repository.d.ts +48 -0
- package/dist/model/db/repositories/Versions_Repository.d.ts +15 -0
- package/dist/model/db/repositories/Views_Repository.d.ts +65 -0
- package/dist/model/db/repositories/Vocabs_Repository.d.ts +59 -0
- package/dist/model/db/repositories/payload-api.d.ts +10 -0
- package/dist/model/db/schema-database/BaseSchemaRepositoriy.d.ts +19 -0
- package/dist/model/db/schema-database/PayloadSchemaAdapter.d.ts +34 -0
- package/dist/model/db/schema-database/SchemaStorageAdapter.d.ts +40 -0
- package/dist/model/endge/endge-app.d.ts +47 -0
- package/dist/model/endge/endge-auth.d.ts +56 -0
- package/dist/model/endge/endge-bind.d.ts +32 -0
- package/dist/model/endge/endge-bindings-behavior.d.ts +39 -0
- package/dist/model/endge/endge-bindings-presentation.d.ts +30 -0
- package/dist/model/endge/endge-bootstrap.d.ts +23 -0
- package/dist/model/endge/endge-console.d.ts +35 -0
- package/dist/model/endge/endge-contracts.d.ts +77 -0
- package/dist/model/endge/endge-debug.d.ts +37 -0
- package/dist/model/endge/endge-diagnostics.d.ts +111 -0
- package/dist/model/endge/endge-domain.d.ts +519 -0
- package/dist/model/endge/endge-events.d.ts +25 -0
- package/dist/model/endge/endge-extract.d.ts +84 -0
- package/dist/model/endge/endge-flow-registry.d.ts +21 -0
- package/dist/model/endge/endge-flow.d.ts +51 -0
- package/dist/model/endge/endge-query.d.ts +20 -0
- package/dist/model/endge/endge-render.d.ts +17 -0
- package/dist/model/endge/endge-reports.d.ts +22 -0
- package/dist/model/endge/endge-runtime-debugger.d.ts +60 -0
- package/dist/model/endge/endge-runtime.d.ts +87 -0
- package/dist/model/endge/endge-schema-database.d.ts +217 -0
- package/dist/model/endge/endge-script.d.ts +42 -0
- package/dist/model/endge/endge-sse.d.ts +19 -0
- package/dist/model/endge/endge-store.d.ts +41 -0
- package/dist/model/endge/endge-styles.d.ts +45 -0
- package/dist/model/endge/endge-testing.d.ts +16 -0
- package/dist/model/endge/endge-ui-registry.d.ts +50 -0
- package/dist/model/endge/endge-ui.d.ts +43 -0
- package/dist/model/endge/endge-updates.d.ts +34 -0
- package/dist/model/endge/endge-vars.d.ts +50 -0
- package/dist/model/endge/endge-vocabs.d.ts +47 -0
- package/dist/model/endge/endge.d.ts +98 -0
- package/dist/model/factories/DataSourceFactory.d.ts +14 -0
- package/dist/model/factories/DocumentFactory.d.ts +24 -0
- package/dist/model/helpers/endge-resolve-engine.d.ts +93 -0
- package/dist/model/helpers/raph-phases/endge-runtime-boundary.d.ts +13 -0
- package/dist/model/helpers/raph-phases/queries-phase.d.ts +7 -0
- package/dist/model/helpers/raph-phases/tables-phase.d.ts +7 -0
- package/dist/model/seed/actions/console_log.d.ts +3 -0
- package/dist/model/seed/actions/load_vocabs.d.ts +3 -0
- package/dist/model/seed/converters/arrays/split.d.ts +2 -0
- package/dist/model/seed/converters/arrays/to-array.d.ts +2 -0
- package/dist/model/seed/converters/date/date-to-date-string.d.ts +2 -0
- package/dist/model/seed/converters/date/date-to-iso-string.d.ts +2 -0
- package/dist/model/seed/converters/date/date-to-iso-z.d.ts +2 -0
- package/dist/model/seed/converters/date/date-to-time-string.d.ts +2 -0
- package/dist/model/seed/converters/date/iso-string-to-date.d.ts +2 -0
- package/dist/model/seed/converters/date/iso-string-to-time-string.d.ts +2 -0
- package/dist/model/seed/converters/date/string-to-date.d.ts +2 -0
- package/dist/model/seed/converters/date/time-string-to-date.d.ts +2 -0
- package/dist/model/seed/converters/date/timestamp-to-date.d.ts +2 -0
- package/dist/model/seed/converters/date/weekdays-range.d.ts +5 -0
- package/dist/model/seed/converters/json/json-parse.d.ts +2 -0
- package/dist/model/seed/converters/json/json-stringify.d.ts +2 -0
- package/dist/model/seed/converters/numbers/number-to-string.d.ts +2 -0
- package/dist/model/seed/converters/numbers/string-to-number.d.ts +2 -0
- package/dist/model/seed/converters/strings/default-if-empty.d.ts +2 -0
- package/dist/model/seed/converters/strings/string-to-boolean.d.ts +2 -0
- package/dist/model/seed/converters/strings/string-trim.d.ts +2 -0
- package/dist/model/services/Auth_Service.d.ts +23 -0
- package/dist/tmp/hierarchial-faceted-configuration-cascade/tmp.d.ts +82 -0
- package/dist/tools/ScheduleUpdate-sse-generator.d.ts +9 -0
- package/dist/tools/graphql-parser.d.ts +5 -0
- package/dist/tools/mock-generator.d.ts +16 -0
- package/dist/tools/openapi-parser.d.ts +4 -0
- package/dist/tools/table.d.ts +4 -0
- package/dist/tools/updates-generator.d.ts +12 -0
- package/package.json +71 -0
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
import { StoreWriter } from '../entities/runtime/RuntimeContext';
|
|
2
|
+
import { RuntimeScope } from '../entities/runtime/RuntimeScope';
|
|
3
|
+
/**
|
|
4
|
+
* Функция watch, предоставляемая в RuntimeContext.
|
|
5
|
+
* При вызове с queryId возвращает .to(...), но если .to не будет вызвана вручную - выполнится автоматически.
|
|
6
|
+
*/
|
|
7
|
+
export declare function apiWatch(scope: RuntimeScope, queryId: string): StoreWriter;
|
|
@@ -0,0 +1,30 @@
|
|
|
1
|
+
import { DependencyGraph } from '../entities/data/DependencyGraph';
|
|
2
|
+
import { RField } from '../entities/reflect/RField';
|
|
3
|
+
/**
|
|
4
|
+
* Класс для парсинга JSX-скрипта компонента:
|
|
5
|
+
* - строит DependencyGraph
|
|
6
|
+
* - сразу создаёт DependencyEdge для связей с дочерними компонентами (Aegis)
|
|
7
|
+
*/
|
|
8
|
+
export declare class AbstractSyntaxTree_JSX {
|
|
9
|
+
private jsxCode;
|
|
10
|
+
private ast;
|
|
11
|
+
private dependencyGraph;
|
|
12
|
+
private exportedNames;
|
|
13
|
+
private meId;
|
|
14
|
+
constructor(jsxCode: string, meId: string);
|
|
15
|
+
/**
|
|
16
|
+
* Парсит JSX-скрипт, сразу строя локальный DependencyGraph и Aegis-связи.
|
|
17
|
+
*/
|
|
18
|
+
parseAndBuildGraph(inputFields: Record<string, RField>, exportedNames?: Set<string>): void;
|
|
19
|
+
/**
|
|
20
|
+
* Рекурсивно обходит AST-узлы:
|
|
21
|
+
* - Добавляет зависимости (DependencyNode) для выражений
|
|
22
|
+
* - Строит DependencyEdge для Component
|
|
23
|
+
*/
|
|
24
|
+
private _walk;
|
|
25
|
+
/**
|
|
26
|
+
* Возвращает локальный DependencyGraph.
|
|
27
|
+
*/
|
|
28
|
+
getDependencyGraph(): DependencyGraph | null;
|
|
29
|
+
private _normalizeInterpolations;
|
|
30
|
+
}
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
import * as t from '@babel/types';
|
|
2
|
+
export declare class AbstractSyntaxTree_TS {
|
|
3
|
+
private script;
|
|
4
|
+
private ast;
|
|
5
|
+
private usedVariables;
|
|
6
|
+
private errors;
|
|
7
|
+
private exportedNames;
|
|
8
|
+
private readonly globalVariables;
|
|
9
|
+
constructor(script: string);
|
|
10
|
+
parse(): void;
|
|
11
|
+
extractDeclaredGlobals(): void;
|
|
12
|
+
getVariables(): string[];
|
|
13
|
+
validateInputFields(inputFields: Record<string, any>): void;
|
|
14
|
+
addError(error: string): void;
|
|
15
|
+
getExportedNames(): Set<string>;
|
|
16
|
+
getErrors(): string[];
|
|
17
|
+
getAst(): t.File | null;
|
|
18
|
+
}
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
import { DependencyGraph } from '../entities/data/DependencyGraph';
|
|
2
|
+
import { GQLQueryNode } from '../types/types';
|
|
3
|
+
/**
|
|
4
|
+
* Сервис для построения GraphQL-запроса из DependencyGraph.
|
|
5
|
+
*/
|
|
6
|
+
export declare class GraphQLBuilderService {
|
|
7
|
+
/**
|
|
8
|
+
* Построить JSON-структуру запроса.
|
|
9
|
+
*/
|
|
10
|
+
buildQueryTree(graph: DependencyGraph, marker: string): GQLQueryNode | null;
|
|
11
|
+
/**
|
|
12
|
+
* Превращает JSON-структуру запроса в строку GraphQL.
|
|
13
|
+
*/
|
|
14
|
+
toGraphQLString(node: GQLQueryNode, indent?: string): string;
|
|
15
|
+
/**
|
|
16
|
+
* Построить JSON-структуру GraphQL-запроса с типами на конечных узлах.
|
|
17
|
+
*/
|
|
18
|
+
buildQueryJSON(graph: DependencyGraph, marker: string): Record<string, any> | null;
|
|
19
|
+
}
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
export interface MemoryLink {
|
|
2
|
+
query: string;
|
|
3
|
+
mount: string;
|
|
4
|
+
}
|
|
5
|
+
export declare class ScenarioScriptBuilderService {
|
|
6
|
+
/**
|
|
7
|
+
* Ошибки, найденные при анализе
|
|
8
|
+
*/
|
|
9
|
+
errors: string[];
|
|
10
|
+
/**
|
|
11
|
+
* Структура: memoryId -> { query: string, mount: string }
|
|
12
|
+
*/
|
|
13
|
+
memoryLinks: Record<string, MemoryLink>;
|
|
14
|
+
/**
|
|
15
|
+
* Анализирует TypeScript-скрипт сценария.
|
|
16
|
+
* Результат сохраняется в свойствах this.errors и this.memoryLinks.
|
|
17
|
+
*/
|
|
18
|
+
analyze(script: string): void;
|
|
19
|
+
}
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
import { KeycloakTokenResponse, StoredAuthToken } from '../types/auth.types';
|
|
2
|
+
import { AxiosInstance } from 'axios';
|
|
3
|
+
export declare function mapTokenResponseToStored(data: KeycloakTokenResponse, now?: Date): StoredAuthToken;
|
|
4
|
+
export declare class KeycloakAuthService {
|
|
5
|
+
private readonly http;
|
|
6
|
+
private readonly tokenPath;
|
|
7
|
+
private readonly logoutPath;
|
|
8
|
+
constructor(baseUrl: string, tokenPath: string, logoutPath: string);
|
|
9
|
+
passwordGrant(payload: Record<string, string>): Promise<KeycloakTokenResponse>;
|
|
10
|
+
refreshGrant(payload: Record<string, string>): Promise<KeycloakTokenResponse>;
|
|
11
|
+
logout(payload: Record<string, string>): Promise<void>;
|
|
12
|
+
/**
|
|
13
|
+
* Получить userinfo для текущего токена.
|
|
14
|
+
* ВАЖНО: сюда нужно передавать axios-инстанс с уже выставленным Authorization.
|
|
15
|
+
*/
|
|
16
|
+
getUserInfo(authorizedHttp: AxiosInstance): Promise<any>;
|
|
17
|
+
}
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
import { RComponent } from '../types/component.types';
|
|
2
|
+
import { RuntimeScope } from '../entities/runtime/RuntimeScope';
|
|
3
|
+
import { RenderComponentInfo } from '../types/types';
|
|
4
|
+
import { UILegacyComponentRenderHost, UIResolvedLegacyComponentRenderer } from '../types/ui-composition.types';
|
|
5
|
+
export declare function resolveEndgeComponentRenderer(input: {
|
|
6
|
+
model: RComponent;
|
|
7
|
+
host: UILegacyComponentRenderHost;
|
|
8
|
+
}): UIResolvedLegacyComponentRenderer | null;
|
|
9
|
+
export declare function resolveEndgeComponentRenderInfo(input: {
|
|
10
|
+
model: RComponent;
|
|
11
|
+
host: UILegacyComponentRenderHost;
|
|
12
|
+
}): RenderComponentInfo | null;
|
|
13
|
+
export declare function renderEndgeComponent(input: {
|
|
14
|
+
h: any;
|
|
15
|
+
model: RComponent;
|
|
16
|
+
comData: Record<string, any>;
|
|
17
|
+
scope?: RuntimeScope;
|
|
18
|
+
host: UILegacyComponentRenderHost;
|
|
19
|
+
context?: Record<string, any>;
|
|
20
|
+
}): any;
|
|
@@ -0,0 +1,65 @@
|
|
|
1
|
+
import { ActionRuntimeHostContext } from './runtime-host.types';
|
|
2
|
+
import { FlowExecutionState } from './endge-flow-runtime.types';
|
|
3
|
+
import { ActionFlowDefinition } from './endge-flow.types';
|
|
4
|
+
/**
|
|
5
|
+
* Каноническое определение action как flow-графа.
|
|
6
|
+
*/
|
|
7
|
+
export type ActionDefinition = ActionFlowDefinition;
|
|
8
|
+
/**
|
|
9
|
+
* Контекст, который получают custom handlers и runtime-step handlers action-flow.
|
|
10
|
+
*/
|
|
11
|
+
export interface FlowHandlerContext {
|
|
12
|
+
/** Каноническое runtime-state текущего запуска flow. */
|
|
13
|
+
state: FlowExecutionState;
|
|
14
|
+
/** Идентификатор node внутри flow, если handler вызван из конкретного шага. */
|
|
15
|
+
nodeId?: string | null;
|
|
16
|
+
/** Идентификатор block-spec исполненного шага. */
|
|
17
|
+
blockId?: string | null;
|
|
18
|
+
/** Identity или id action, с которым связан текущий handler-вызов. */
|
|
19
|
+
actionId?: string | null;
|
|
20
|
+
/** runtime-id host или runtime-step, если он известен во время вызова. */
|
|
21
|
+
runtimeId?: string | null;
|
|
22
|
+
}
|
|
23
|
+
/**
|
|
24
|
+
* Результат работы custom/step handler.
|
|
25
|
+
*/
|
|
26
|
+
export type FlowHandlerResult = void | Promise<void>;
|
|
27
|
+
/**
|
|
28
|
+
* Сигнатура обработчика шага runtime-action: получает полный контекст host'а (input, parent, flowState и т.д.),
|
|
29
|
+
* сам извлекает вход из context.input; опционально — flowContext (nodeId, state шага).
|
|
30
|
+
*/
|
|
31
|
+
export type ActionStepHandler = (context: ActionRuntimeHostContext, flowContext?: FlowHandlerContext) => FlowHandlerResult;
|
|
32
|
+
/**
|
|
33
|
+
* Проблема, найденная при валидации или исполнении action-flow.
|
|
34
|
+
*/
|
|
35
|
+
export interface FlowValidationIssue {
|
|
36
|
+
/** Машинно-стабильный код проблемы. */
|
|
37
|
+
code: string;
|
|
38
|
+
/** Человекочитаемое описание проблемы. */
|
|
39
|
+
message: string;
|
|
40
|
+
/** Идентификатор node, если проблема относится к конкретному шагу. */
|
|
41
|
+
nodeId?: string;
|
|
42
|
+
/** Идентификатор edge, если проблема относится к конкретной связи. */
|
|
43
|
+
edgeId?: string;
|
|
44
|
+
}
|
|
45
|
+
/**
|
|
46
|
+
* Скомпилированное action-flow definition с индексами для быстрого исполнения.
|
|
47
|
+
*/
|
|
48
|
+
export interface ActionCompiledFlow {
|
|
49
|
+
/** Нормализованное flow-описание action. */
|
|
50
|
+
flow: ActionFlowDefinition;
|
|
51
|
+
/** Индекс node по id. */
|
|
52
|
+
nodesById: Map<string, ActionFlowDefinition['nodes'][number]>;
|
|
53
|
+
/** Индекс первого node-id по blockId. */
|
|
54
|
+
nodeIdByBlockId: Map<string, string>;
|
|
55
|
+
/** Индекс исходящих ребер по source node id. */
|
|
56
|
+
outgoingByNodeId: Map<string, ActionFlowDefinition['edges']>;
|
|
57
|
+
/** Индекс входящих ребер по target node id (для передачи данных с портов). */
|
|
58
|
+
incomingByNodeId: Map<string, ActionFlowDefinition['edges']>;
|
|
59
|
+
/** Индекс runtime-step по runtime-id. */
|
|
60
|
+
runtimeNodeIdByRuntimeId: Map<string, string>;
|
|
61
|
+
/** Список достижимых node от entrypoint. */
|
|
62
|
+
reachableNodeIds: string[];
|
|
63
|
+
/** Validation issues, найденные во время компиляции. */
|
|
64
|
+
issues: FlowValidationIssue[];
|
|
65
|
+
}
|
|
@@ -0,0 +1,29 @@
|
|
|
1
|
+
export type HttpMethod = 'GET' | 'POST' | 'PUT' | 'PATCH' | 'DELETE';
|
|
2
|
+
/**
|
|
3
|
+
* Опции запроса (минимальный набор).
|
|
4
|
+
*/
|
|
5
|
+
export interface RequestOptions {
|
|
6
|
+
/** Доп. заголовки */
|
|
7
|
+
headers?: Record<string, string>;
|
|
8
|
+
/** Тело запроса; объект будет сериализован в JSON */
|
|
9
|
+
body?: unknown;
|
|
10
|
+
/** AbortSignal для отмены */
|
|
11
|
+
signal?: AbortSignal;
|
|
12
|
+
/** Query-параметры */
|
|
13
|
+
query?: Record<string, string | number | boolean | null | undefined>;
|
|
14
|
+
}
|
|
15
|
+
/**
|
|
16
|
+
* Описание одного эндпоинта сервиса.
|
|
17
|
+
*/
|
|
18
|
+
export interface EndpointDescriptor {
|
|
19
|
+
method: HttpMethod;
|
|
20
|
+
path: string;
|
|
21
|
+
options?: Omit<RequestOptions, 'body'>;
|
|
22
|
+
}
|
|
23
|
+
/**
|
|
24
|
+
* Описание сервиса: базовый путь и набор эндпоинтов.
|
|
25
|
+
*/
|
|
26
|
+
export interface ServiceDescriptor {
|
|
27
|
+
basePath?: string;
|
|
28
|
+
endpoints: Record<string, EndpointDescriptor>;
|
|
29
|
+
}
|
|
@@ -0,0 +1,82 @@
|
|
|
1
|
+
export type AuthPersist = 'localStorage' | 'sessionStorage';
|
|
2
|
+
/** Поддерживаемые провайдеры авторизации. */
|
|
3
|
+
export type AuthProvider = 'none' | 'keycloak_basic';
|
|
4
|
+
/** Базовая часть конфига для Keycloak-совместимых провайдеров. */
|
|
5
|
+
export interface KeycloakBaseConfig {
|
|
6
|
+
/** Базовый URL до OpenID Connect endpoints, напр. https://host/auth/realms/my/protocol/openid-connect */
|
|
7
|
+
baseUrl: string;
|
|
8
|
+
/** Идентификатор клиента */
|
|
9
|
+
clientId: string;
|
|
10
|
+
/** Скоупы через пробел */
|
|
11
|
+
scope?: string;
|
|
12
|
+
/** Относительный путь до токен-эндпоинта (обычно /endgeToken) */
|
|
13
|
+
tokenEndpoint?: string;
|
|
14
|
+
loginEndpoint?: string;
|
|
15
|
+
logoutEndpoint?: string;
|
|
16
|
+
/** Автообновление токена перед истечением */
|
|
17
|
+
autoRefresh?: boolean;
|
|
18
|
+
/** За сколько миллисекунд до exp обновлять токен */
|
|
19
|
+
refreshSkewMs?: number;
|
|
20
|
+
/** Персистентность состояния */
|
|
21
|
+
persist?: AuthPersist;
|
|
22
|
+
}
|
|
23
|
+
/** Конфигурация для password-гранта (движок сам логинится). */
|
|
24
|
+
export interface KeycloakBasicConfig extends KeycloakBaseConfig {
|
|
25
|
+
provider: 'keycloak_basic';
|
|
26
|
+
username?: string;
|
|
27
|
+
password?: string;
|
|
28
|
+
}
|
|
29
|
+
/** Конфигурация без авторизации. */
|
|
30
|
+
export interface NoneAuthConfig {
|
|
31
|
+
provider: 'none';
|
|
32
|
+
persist?: AuthPersist;
|
|
33
|
+
}
|
|
34
|
+
/** Дискриминированный юнион конфига. */
|
|
35
|
+
export type AuthConfig = NoneAuthConfig | KeycloakBasicConfig;
|
|
36
|
+
/** Ответ Keycloak при выдаче/рефреше токена (строго типизированный). */
|
|
37
|
+
export interface KeycloakTokenResponse {
|
|
38
|
+
access_token: string;
|
|
39
|
+
expires_in: number;
|
|
40
|
+
refresh_expires_in: number;
|
|
41
|
+
refresh_token: string;
|
|
42
|
+
token_type: 'Bearer';
|
|
43
|
+
id_token?: string;
|
|
44
|
+
'not-before-policy'?: number;
|
|
45
|
+
session_state?: string;
|
|
46
|
+
scope?: string;
|
|
47
|
+
}
|
|
48
|
+
/** Состояние токена в рантайме/персисте. */
|
|
49
|
+
export interface AuthState {
|
|
50
|
+
accessToken?: string | null;
|
|
51
|
+
refreshToken?: string | null;
|
|
52
|
+
/** Время истечения accessToken в ms (Date.now() базис) */
|
|
53
|
+
expiresAtMs?: number | null;
|
|
54
|
+
/** Время истечения refreshToken в ms (Date.now() базис) */
|
|
55
|
+
refreshExpiresAtMs?: number | null;
|
|
56
|
+
/** Метаданные */
|
|
57
|
+
updatedAt?: string;
|
|
58
|
+
}
|
|
59
|
+
/** Полный снапшот для сохранения/восстановления. */
|
|
60
|
+
export interface AuthSnapshot {
|
|
61
|
+
config: AuthConfig;
|
|
62
|
+
state: AuthState;
|
|
63
|
+
/** Версия схемы для миграций */
|
|
64
|
+
version: number;
|
|
65
|
+
}
|
|
66
|
+
export interface StoredAuthToken {
|
|
67
|
+
access_token: string;
|
|
68
|
+
refresh_token?: string;
|
|
69
|
+
access_expires: string;
|
|
70
|
+
refresh_expires?: string;
|
|
71
|
+
}
|
|
72
|
+
export interface KeycloakTokenResponse {
|
|
73
|
+
access_token: string;
|
|
74
|
+
refresh_token?: string;
|
|
75
|
+
expires_in?: number;
|
|
76
|
+
refresh_expires_in?: number;
|
|
77
|
+
}
|
|
78
|
+
export type EndgeTokenMode = 'inherit' | 'manual' | 'none';
|
|
79
|
+
export interface GetAccessTokenOpts {
|
|
80
|
+
mode?: EndgeTokenMode;
|
|
81
|
+
manualToken?: string | null;
|
|
82
|
+
}
|
|
@@ -0,0 +1,35 @@
|
|
|
1
|
+
export type BootstrapStepName = string;
|
|
2
|
+
export interface BootstrapStep {
|
|
3
|
+
name: BootstrapStepName;
|
|
4
|
+
run: () => Promise<void>;
|
|
5
|
+
dependsOn?: readonly BootstrapStepName[];
|
|
6
|
+
}
|
|
7
|
+
export type BootstrapEvent = {
|
|
8
|
+
type: 'bootstrap:start';
|
|
9
|
+
steps: BootstrapStepName[];
|
|
10
|
+
} | {
|
|
11
|
+
type: 'bootstrap:plan';
|
|
12
|
+
requested: BootstrapStepName[];
|
|
13
|
+
expanded: BootstrapStepName[];
|
|
14
|
+
} | {
|
|
15
|
+
type: 'step:skip';
|
|
16
|
+
step: BootstrapStepName;
|
|
17
|
+
} | {
|
|
18
|
+
type: 'step:start';
|
|
19
|
+
step: BootstrapStepName;
|
|
20
|
+
} | {
|
|
21
|
+
type: 'step:done';
|
|
22
|
+
step: BootstrapStepName;
|
|
23
|
+
ms: number;
|
|
24
|
+
} | {
|
|
25
|
+
type: 'step:error';
|
|
26
|
+
step: BootstrapStepName;
|
|
27
|
+
error: unknown;
|
|
28
|
+
} | {
|
|
29
|
+
type: 'bootstrap:done';
|
|
30
|
+
steps: BootstrapStepName[];
|
|
31
|
+
};
|
|
32
|
+
export interface AppBootstrapOptions {
|
|
33
|
+
strict?: boolean;
|
|
34
|
+
onEvent?: (e: BootstrapEvent) => void;
|
|
35
|
+
}
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
export type EndgeProjectId = string;
|
|
2
|
+
export type EndgeEnvId = string;
|
|
3
|
+
export type EndgeTenantId = string;
|
|
4
|
+
export type EndgeFolderId = string;
|
|
5
|
+
export type EndgeSettingsId = string;
|
|
6
|
+
export type EndgeTypeId = string;
|
|
7
|
+
export type EndgeQueryId = string;
|
|
8
|
+
export type EndgeComponentId = string;
|
|
9
|
+
export type EndgeScenarioId = string;
|
|
10
|
+
export type EndgeActionId = string;
|
|
11
|
+
export type EndgeConverterId = string;
|
|
12
|
+
export type EndgeIntegrationId = string;
|
|
13
|
+
export type EndgeViewId = string;
|
|
14
|
+
export type EndgePageTemplateId = string;
|
|
15
|
+
export type EndgePageId = string;
|
|
16
|
+
export type EndgeNavigationId = string;
|
|
17
|
+
export type EndgeParameterId = string;
|
|
18
|
+
export type EndgeFilterId = string;
|
|
19
|
+
export type EndgeBehaviorBindingId = string;
|
|
20
|
+
export type EndgePresentationBindingId = string;
|
|
21
|
+
export type EndgePolicyId = string;
|
|
22
|
+
export type EndgeStyleId = string;
|
|
23
|
+
export type EndgeVocabId = string;
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
import { RComponentDSL } from '../entities/reflect/RComponentDSL';
|
|
2
|
+
import { RComponentTable } from '../entities/reflect/RComponentTable';
|
|
3
|
+
import { ComponentType } from './document.types';
|
|
4
|
+
export type RComponent = RComponentDSL | RComponentTable;
|
|
5
|
+
/**
|
|
6
|
+
* Разновидности типов компонентов, которые могут быть встроены в таблицу
|
|
7
|
+
*/
|
|
8
|
+
export type ColumnComponentType = Exclude<ComponentType, ComponentType.Table>;
|
|
@@ -0,0 +1,53 @@
|
|
|
1
|
+
import { EndgeFacetType, FacetedCascadeContractBase, FacetedCascadeSchema } from './faceted-cascade';
|
|
2
|
+
/**
|
|
3
|
+
* Канонический тип значения конфигурационного поля.
|
|
4
|
+
* Нужен для UI, валидации и безопасной навигации по runtime-config mirror.
|
|
5
|
+
*/
|
|
6
|
+
export declare enum ConfigurationValueType {
|
|
7
|
+
String = "string",
|
|
8
|
+
Number = "number",
|
|
9
|
+
Boolean = "boolean",
|
|
10
|
+
Object = "object",
|
|
11
|
+
Array = "array",
|
|
12
|
+
Enum = "enum",
|
|
13
|
+
Unknown = "unknown"
|
|
14
|
+
}
|
|
15
|
+
/**
|
|
16
|
+
* Политика runtime-мутации поля.
|
|
17
|
+
* `none` - поле вычисляется только через base/cascade.
|
|
18
|
+
* `patch` - поле допускает временный runtime patch.
|
|
19
|
+
* `replace` - поле можно полностью заменить во время исполнения.
|
|
20
|
+
*/
|
|
21
|
+
export type ConfigurationMutationPolicy = 'none' | 'patch' | 'replace';
|
|
22
|
+
/**
|
|
23
|
+
* Контракт одного конфигурационного поля сущности.
|
|
24
|
+
* Описывает не реакцию и не renderer, а сам слот конфигурации.
|
|
25
|
+
*/
|
|
26
|
+
export interface ConfigurationContract<TEntity extends string = string> extends FacetedCascadeContractBase<TEntity> {
|
|
27
|
+
facet: EndgeFacetType.Configuration;
|
|
28
|
+
/**
|
|
29
|
+
* Канонический путь поля внутри конфигурации сущности.
|
|
30
|
+
* Примеры: `tree[*].disabled`, `params.pageSize`, `layout.header.visible`.
|
|
31
|
+
*/
|
|
32
|
+
fieldPath: string;
|
|
33
|
+
/**
|
|
34
|
+
* Тип значения поля.
|
|
35
|
+
*/
|
|
36
|
+
valueType: ConfigurationValueType;
|
|
37
|
+
/**
|
|
38
|
+
* Можно ли подписываться на поле через runtime-config mirror.
|
|
39
|
+
*/
|
|
40
|
+
supportsWatch?: boolean;
|
|
41
|
+
/**
|
|
42
|
+
* Можно ли изменять поле во время исполнения без мутации base-модели.
|
|
43
|
+
*/
|
|
44
|
+
runtimeMutationPolicy?: ConfigurationMutationPolicy;
|
|
45
|
+
/**
|
|
46
|
+
* Необязательная схема для валидации и editor UI.
|
|
47
|
+
*/
|
|
48
|
+
schema?: FacetedCascadeSchema | null;
|
|
49
|
+
/**
|
|
50
|
+
* Необязательное значение по умолчанию для документации/inspectors.
|
|
51
|
+
*/
|
|
52
|
+
defaultValue?: unknown;
|
|
53
|
+
}
|
|
@@ -0,0 +1,74 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Уровни логирования
|
|
3
|
+
*/
|
|
4
|
+
export type LogLevel = 'trace' | 'debug' | 'info' | 'success' | 'warn' | 'error' | 'fatal';
|
|
5
|
+
/**
|
|
6
|
+
* Тип записи
|
|
7
|
+
*/
|
|
8
|
+
export type LogKind = 'span_start' | 'span_end' | 'event';
|
|
9
|
+
/**
|
|
10
|
+
* Корреляция (совместимо с W3C TraceContext по смыслу)
|
|
11
|
+
*/
|
|
12
|
+
export interface Correlation {
|
|
13
|
+
traceId?: string;
|
|
14
|
+
spanId?: string;
|
|
15
|
+
parentSpanId?: string;
|
|
16
|
+
}
|
|
17
|
+
/**
|
|
18
|
+
* Плоские атрибуты (namespace dotted keys)
|
|
19
|
+
*/
|
|
20
|
+
export type Attrs = Record<string, string | number | boolean | null | undefined>;
|
|
21
|
+
/**
|
|
22
|
+
* Ссылка на сущность/ресурс
|
|
23
|
+
*/
|
|
24
|
+
export interface EntityRef {
|
|
25
|
+
type: string;
|
|
26
|
+
id: string;
|
|
27
|
+
attrs?: Attrs;
|
|
28
|
+
}
|
|
29
|
+
/**
|
|
30
|
+
* Базовая запись
|
|
31
|
+
*/
|
|
32
|
+
export interface BaseRecord {
|
|
33
|
+
ts: number;
|
|
34
|
+
level: LogLevel;
|
|
35
|
+
kind: LogKind;
|
|
36
|
+
/** lane присутствует у спанов/эвентов, но не обязателен у trace-спана */
|
|
37
|
+
lane?: string;
|
|
38
|
+
/** человекочитаемое имя спана */
|
|
39
|
+
name?: string;
|
|
40
|
+
/** корреляция (trace/span ids) */
|
|
41
|
+
corr?: Correlation;
|
|
42
|
+
/** произвольные атрибуты */
|
|
43
|
+
attrs?: Attrs;
|
|
44
|
+
/** связанные сущности */
|
|
45
|
+
entities?: EntityRef[];
|
|
46
|
+
}
|
|
47
|
+
/**
|
|
48
|
+
* Спан (начало)
|
|
49
|
+
*/
|
|
50
|
+
export interface SpanStart extends BaseRecord {
|
|
51
|
+
kind: 'span_start';
|
|
52
|
+
name: string;
|
|
53
|
+
}
|
|
54
|
+
/**
|
|
55
|
+
* Спан (конец)
|
|
56
|
+
*/
|
|
57
|
+
export interface SpanEnd extends BaseRecord {
|
|
58
|
+
kind: 'span_end';
|
|
59
|
+
name: string;
|
|
60
|
+
durMs: number;
|
|
61
|
+
}
|
|
62
|
+
/**
|
|
63
|
+
* Точечное событие внутри спана
|
|
64
|
+
*/
|
|
65
|
+
export interface EventRecord extends BaseRecord {
|
|
66
|
+
kind: 'event';
|
|
67
|
+
msg: string;
|
|
68
|
+
data?: unknown;
|
|
69
|
+
err?: unknown;
|
|
70
|
+
}
|
|
71
|
+
/**
|
|
72
|
+
* Объединённый тип записи журнала
|
|
73
|
+
*/
|
|
74
|
+
export type LogRecord = SpanStart | SpanEnd | EventRecord;
|
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
import { Attrs, Correlation, EntityRef, LogLevel } from './base.types';
|
|
2
|
+
export interface BaseNode {
|
|
3
|
+
kind: 'span' | 'event';
|
|
4
|
+
ts: number;
|
|
5
|
+
level?: LogLevel;
|
|
6
|
+
lane?: string;
|
|
7
|
+
name?: string;
|
|
8
|
+
corr?: Correlation;
|
|
9
|
+
attrs?: Attrs;
|
|
10
|
+
entities?: EntityRef[];
|
|
11
|
+
}
|
|
12
|
+
/** Визуальный спан (объединяет start/end) */
|
|
13
|
+
export interface SpanNode extends BaseNode {
|
|
14
|
+
kind: 'span';
|
|
15
|
+
name: string;
|
|
16
|
+
endTs?: number;
|
|
17
|
+
durMs: number | null;
|
|
18
|
+
children: LogNode[];
|
|
19
|
+
}
|
|
20
|
+
/** Точечное событие */
|
|
21
|
+
export interface EventNode extends BaseNode {
|
|
22
|
+
kind: 'event';
|
|
23
|
+
msg: string;
|
|
24
|
+
data?: unknown;
|
|
25
|
+
err?: unknown;
|
|
26
|
+
}
|
|
27
|
+
export type LogNode = SpanNode | EventNode;
|