@endge/core 1.2.12 → 2.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/dist/core.cjs +337 -325
- package/dist/core.js +37069 -33113
- package/dist/domain/entities/reflect/RAuthProfile.d.ts +3 -3
- package/dist/domain/entities/runtime/ComponentSFCEventBoundary.d.ts +2 -0
- package/dist/domain/entities/runtime/hosts/ComponentSFCRuntimeHost.d.ts +3 -2
- package/dist/domain/entities/runtime/hosts/CompositionRuntimeHost.d.ts +4 -0
- package/dist/domain/types/auth/auth-profile.types.d.ts +88 -26
- package/dist/domain/types/auth/auth-runtime.types.d.ts +0 -23
- package/dist/domain/types/component/sfc/ast.types.d.ts +2 -0
- package/dist/domain/types/component/sfc/intrinsic-events.types.d.ts +6 -0
- package/dist/domain/types/component/sfc/ir.types.d.ts +90 -1
- package/dist/domain/types/component/sfc/table-events.types.d.ts +1 -0
- package/dist/domain/types/component/sfc/tag-attribute-contract.types.d.ts +134 -0
- package/dist/domain/types/component/sfc/visual-projection.types.d.ts +39 -2
- package/dist/domain/types/document/document-move.type.d.ts +6 -0
- package/dist/domain/types/document/domain-export.type.d.ts +1 -0
- package/dist/domain/types/document/domain-provider.type.d.ts +24 -0
- package/dist/domain/types/kernel/bootstrap.types.d.ts +1 -1
- package/dist/domain/types/program/program.types.d.ts +4 -0
- package/dist/domain/types/runtime/runtime-host.types.d.ts +23 -1
- package/dist/domain/types/source/composition-source.types.d.ts +6 -0
- package/dist/domain/types/source/data-view-source.types.d.ts +12 -0
- package/dist/domain/types/source/filter-source.types.d.ts +2 -0
- package/dist/domain/types/source/source-expression.types.d.ts +3 -0
- package/dist/domain/types/source/store-source.types.d.ts +1 -0
- package/dist/domain/types/ui/filter-view.type.d.ts +13 -0
- package/dist/main.d.ts +6 -0
- package/dist/model/modules/domain/endge-domain-repository.d.ts +3 -0
- package/dist/model/modules/domain/endge-domain.d.ts +2 -0
- package/dist/model/modules/runtime/execution/endge-data-view.d.ts +8 -6
- package/dist/model/modules/security/auth/AuthInteractionRequiredError.d.ts +6 -0
- package/dist/model/modules/security/auth/AuthProfileRegistry.d.ts +4 -4
- package/dist/model/modules/security/auth/AuthRequestResolver.d.ts +7 -2
- package/dist/model/modules/security/auth/AuthSessionManager.d.ts +19 -21
- package/dist/model/modules/security/auth/adapters/BasicAuthAdapter.d.ts +10 -0
- package/dist/model/modules/security/auth/adapters/BearerAuthAdapter.d.ts +1 -1
- package/dist/model/modules/security/auth/adapters/OAuth2ClientCredentialsAuthAdapter.d.ts +8 -0
- package/dist/model/modules/security/auth/adapters/OidcAuthAdapter.d.ts +8 -0
- package/dist/model/modules/security/endge-auth.d.ts +14 -4
- package/dist/model/services/auth/OidcBrowserSession_Service.d.ts +26 -0
- package/dist/model/services/compiler/component-sfc/component-sfc-attributes.d.ts +9 -0
- package/dist/model/services/compiler/component-sfc/component-sfc-interactions.d.ts +12 -0
- package/dist/model/services/compiler/component-sfc/component-sfc-table-menu.d.ts +5 -0
- package/dist/test/component-sfc-interactions.bench.d.ts +1 -0
- package/dist/test/component-sfc-interactions.test.d.ts +1 -0
- package/dist/test/security/auth-profile-serializer.test.d.ts +1 -0
- package/dist/test/security/auth-test-helpers.d.ts +0 -1
- package/dist/test/security/oidc-browser-session.test.d.ts +1 -0
- package/dist/test/tools/component-sfc-edit-trigger.test.d.ts +1 -0
- package/dist/tools/component-sfc-edit-trigger.d.ts +11 -0
- package/package.json +6 -4
- package/dist/model/modules/security/auth/adapters/KeycloakAuthAdapter.d.ts +0 -25
- package/dist/model/services/auth/KeycloakAuthClient.d.ts +0 -21
|
@@ -70,6 +70,7 @@ export type EndgePortableWorkspace = Omit<EndgeWorkspaceExport, 'installedIntegr
|
|
|
70
70
|
export interface EndgeDomainBundle {
|
|
71
71
|
schemaVersion: number;
|
|
72
72
|
kind: 'workspace-snapshot';
|
|
73
|
+
domainVersion?: string;
|
|
73
74
|
workspace: EndgePortableWorkspace;
|
|
74
75
|
installedIntegrations: EndgeInstalledIntegrationExport[];
|
|
75
76
|
documents: EndgePortableDocuments;
|
|
@@ -25,6 +25,29 @@ export interface EndgeDocumentMutationResult {
|
|
|
25
25
|
document: EndgeLiveDomainDocument;
|
|
26
26
|
etag: string | null;
|
|
27
27
|
}
|
|
28
|
+
/** Документ с optimistic revision для атомарного перемещения. */
|
|
29
|
+
export interface EndgeDocumentMoveRequestItem {
|
|
30
|
+
collection: EndgeDomainCollection;
|
|
31
|
+
identity: string;
|
|
32
|
+
expectedRevision: number;
|
|
33
|
+
}
|
|
34
|
+
/** Запрос атомарного перемещения документов в одну папку. */
|
|
35
|
+
export interface EndgeDocumentsMoveRequest {
|
|
36
|
+
workspaceIdentity: string;
|
|
37
|
+
documents: EndgeDocumentMoveRequestItem[];
|
|
38
|
+
folderIdentity: string;
|
|
39
|
+
signal?: AbortSignal;
|
|
40
|
+
}
|
|
41
|
+
/** Актуальный документ и его transport-коллекция после перемещения. */
|
|
42
|
+
export interface EndgeMovedDocument {
|
|
43
|
+
collection: EndgeDomainCollection;
|
|
44
|
+
document: EndgeLiveDomainDocument;
|
|
45
|
+
}
|
|
46
|
+
/** Результат атомарного перемещения документов. */
|
|
47
|
+
export interface EndgeDocumentsMoveResult {
|
|
48
|
+
documents: EndgeMovedDocument[];
|
|
49
|
+
moved: number;
|
|
50
|
+
}
|
|
28
51
|
export interface EndgeWorkspaceMutationRequest {
|
|
29
52
|
workspaceIdentity: string;
|
|
30
53
|
document: Record<string, unknown>;
|
|
@@ -47,6 +70,7 @@ export interface EndgeDomainProvider {
|
|
|
47
70
|
updateDocument(request: EndgeDocumentMutationRequest): Promise<EndgeDocumentMutationResult>;
|
|
48
71
|
softDeleteDocument(request: EndgeDocumentMutationRequest): Promise<EndgeDocumentMutationResult>;
|
|
49
72
|
restoreDocument(request: EndgeDocumentMutationRequest): Promise<EndgeDocumentMutationResult>;
|
|
73
|
+
moveDocuments?(request: EndgeDocumentsMoveRequest): Promise<EndgeDocumentsMoveResult>;
|
|
50
74
|
updateWorkspace(request: EndgeWorkspaceMutationRequest): Promise<EndgeWorkspaceMutationResult>;
|
|
51
75
|
}
|
|
52
76
|
export type EndgeDomainRepositoryProviderId = 'service-backend' | 'bundle' | 'plain';
|
|
@@ -38,7 +38,7 @@ export interface EndgeBootContext {
|
|
|
38
38
|
vars: Record<string, unknown>;
|
|
39
39
|
/** Host-local UI policy; it does not mutate persisted Workspace configuration. */
|
|
40
40
|
ui?: EndgeUIBootOptions;
|
|
41
|
-
/** Host-owned
|
|
41
|
+
/** Host-owned browser session namespace. */
|
|
42
42
|
auth?: EndgeAuthBootOptions;
|
|
43
43
|
/**
|
|
44
44
|
* Для plain provider.
|
|
@@ -167,6 +167,10 @@ export interface DataViewProgramPayload {
|
|
|
167
167
|
sourceDocument: DataViewSourceDocument | null;
|
|
168
168
|
/** Декларативный входной и выходной тип DataView. */
|
|
169
169
|
contract?: DataViewSourceDocument['contract'];
|
|
170
|
+
/** Контракт внешних параметров одного materialized DataView instance. */
|
|
171
|
+
props?: SourceFieldDefinition[];
|
|
172
|
+
/** Row-local predicate, применяемый после pipeline steps. */
|
|
173
|
+
filter?: SourceExpressionIR | null;
|
|
170
174
|
/** Compiled manual transform. Используется только в mode=manual. */
|
|
171
175
|
transform: DataViewManualTransform | null;
|
|
172
176
|
/** Compiled pipeline steps. Используется только в mode=pipeline. */
|
|
@@ -279,8 +279,30 @@ export interface RuntimeCollectionProjectionUpdatePatch {
|
|
|
279
279
|
/** Raph-нода, которая стала верхней dirty boundary. */
|
|
280
280
|
node: RaphNode;
|
|
281
281
|
}
|
|
282
|
+
/** Одно keyed изменение строки внутри пакетного patch коллекции. */
|
|
283
|
+
export interface RuntimeCollectionItemPatch {
|
|
284
|
+
/** Текущий индекс строки; null означает, что строка удалена из результата. */
|
|
285
|
+
itemIndex: number | null;
|
|
286
|
+
/** Стабильный ключ строки из selector или актуального snapshot. */
|
|
287
|
+
itemKey: unknown;
|
|
288
|
+
/** Актуальный snapshot строки; null/undefined означает удаление. */
|
|
289
|
+
itemSnapshot: unknown;
|
|
290
|
+
/** Измененные относительные paths внутри строки. */
|
|
291
|
+
changedPaths: string[][];
|
|
292
|
+
}
|
|
293
|
+
/** Пакет keyed изменений одной коллекции за один Raph frame. */
|
|
294
|
+
export interface RuntimeCollectionProjectionBatchPatch {
|
|
295
|
+
kind: 'collection-projection-batch';
|
|
296
|
+
boundaryId: string;
|
|
297
|
+
boundaryType: 'table';
|
|
298
|
+
sourcePath: string;
|
|
299
|
+
items: RuntimeCollectionItemPatch[];
|
|
300
|
+
affectedProjections: RuntimeCollectionProjectionPatch[];
|
|
301
|
+
events: PhaseEvent[];
|
|
302
|
+
node: RaphNode;
|
|
303
|
+
}
|
|
282
304
|
/** Нейтральный patch runtime boundary для render adapter-а. */
|
|
283
|
-
export type RuntimeBoundaryPatch = RuntimeCollectionProjectionUpdatePatch;
|
|
305
|
+
export type RuntimeBoundaryPatch = RuntimeCollectionProjectionUpdatePatch | RuntimeCollectionProjectionBatchPatch;
|
|
284
306
|
export interface RuntimeHost<TType extends RuntimeEntityType = RuntimeEntityType, TContext extends RuntimeHostContext<TType> = RuntimeHostContext<TType>, TArtifactPayload = unknown> extends RuntimeHostLifecycle {
|
|
285
307
|
/** Уникальный runtime-id host. */
|
|
286
308
|
readonly id: string;
|
|
@@ -73,6 +73,12 @@ export type CompositionBindingValue = {
|
|
|
73
73
|
kind: 'filter-fields';
|
|
74
74
|
runtime: string;
|
|
75
75
|
fields: string[];
|
|
76
|
+
} | {
|
|
77
|
+
kind: 'data-view';
|
|
78
|
+
data: string;
|
|
79
|
+
path: string;
|
|
80
|
+
identity: string;
|
|
81
|
+
props: Record<string, CompositionBindingValue>;
|
|
76
82
|
} | {
|
|
77
83
|
kind: 'expression';
|
|
78
84
|
expression: SourceExpressionIR;
|
|
@@ -9,12 +9,18 @@ export type DataViewIncrementalRequest = {
|
|
|
9
9
|
} | {
|
|
10
10
|
mode: 'collection-by-key';
|
|
11
11
|
key: string;
|
|
12
|
+
} | {
|
|
13
|
+
mode: 'filter-by-key';
|
|
14
|
+
key: string;
|
|
12
15
|
};
|
|
13
16
|
export type DataViewMaterializationStrategy = {
|
|
14
17
|
kind: 'full';
|
|
15
18
|
} | {
|
|
16
19
|
kind: 'collection-by-key';
|
|
17
20
|
key: string;
|
|
21
|
+
} | {
|
|
22
|
+
kind: 'filter-by-key';
|
|
23
|
+
key: string;
|
|
18
24
|
};
|
|
19
25
|
export interface DataViewSourceContract {
|
|
20
26
|
input: SourceFieldDefinition;
|
|
@@ -23,12 +29,18 @@ export interface DataViewSourceContract {
|
|
|
23
29
|
export interface DataViewSourceDocument {
|
|
24
30
|
mode: DataViewSourceMode;
|
|
25
31
|
incremental: DataViewIncrementalRequest;
|
|
32
|
+
props: SourceFieldDefinition[];
|
|
26
33
|
contract?: DataViewSourceContract | null;
|
|
34
|
+
filter?: SourceExpressionIR | null;
|
|
27
35
|
transform?: DataViewManualTransform;
|
|
28
36
|
steps?: DataViewPipelineStep[];
|
|
29
37
|
output?: Record<string, SourceExpressionIR>;
|
|
30
38
|
expression?: SourceExpressionIR;
|
|
31
39
|
}
|
|
40
|
+
/** Runtime-контекст одного вызова parameterized DataView. */
|
|
41
|
+
export interface DataViewRunContext {
|
|
42
|
+
props?: Record<string, unknown>;
|
|
43
|
+
}
|
|
32
44
|
export interface DataViewManualTransform {
|
|
33
45
|
params: string[];
|
|
34
46
|
body: string;
|
|
@@ -58,12 +58,14 @@ export interface FilterProgramJsonOutput {
|
|
|
58
58
|
key: string;
|
|
59
59
|
kind: 'json';
|
|
60
60
|
expression: SourceExpressionIR;
|
|
61
|
+
dependencies?: string[];
|
|
61
62
|
}
|
|
62
63
|
/** Локальный predicate, вычисляемый над строкой и state фильтра. */
|
|
63
64
|
export interface FilterProgramPredicateOutput {
|
|
64
65
|
key: string;
|
|
65
66
|
kind: 'predicate';
|
|
66
67
|
expression: SourceExpressionIR;
|
|
68
|
+
dependencies?: string[];
|
|
67
69
|
}
|
|
68
70
|
export type FilterProgramOutput = FilterProgramJsonOutput | FilterProgramPredicateOutput;
|
|
69
71
|
/** Payload Filter artifact без persisted source и diagnostics envelope. */
|
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
import { ProgramMetadataMap } from '../program/program-metadata.types';
|
|
1
2
|
import { TypeSourceExpression } from './type-source.types';
|
|
2
3
|
/** Type Registry identity used by Query/Filter field contracts. */
|
|
3
4
|
export type SourceFieldType = 'String' | 'Number' | 'Boolean' | 'Date' | 'Time' | 'DateTime' | 'Object' | 'Any' | (string & {});
|
|
@@ -51,6 +52,8 @@ export interface SourceFieldDefinition {
|
|
|
51
52
|
defaultValue?: SourceExpressionIR;
|
|
52
53
|
options?: SourceFieldOption[];
|
|
53
54
|
vocab?: SourceFieldVocab;
|
|
55
|
+
/** Статическая presentation metadata поля, не влияющая на Filter state. */
|
|
56
|
+
metadata?: ProgramMetadataMap;
|
|
54
57
|
}
|
|
55
58
|
/** Default value prop, вычисляемый через output внешнего или локального Filter. */
|
|
56
59
|
export type SourceFieldDefaultSource = {
|
|
@@ -18,6 +18,7 @@ export interface StoreDerivedDescriptor {
|
|
|
18
18
|
kind: 'derived';
|
|
19
19
|
source: string;
|
|
20
20
|
dataViews: DataViewRef[];
|
|
21
|
+
materializationStrategy?: import('./data-view-source.types').DataViewMaterializationStrategy;
|
|
21
22
|
contract?: SourceFieldDefinition | null;
|
|
22
23
|
}
|
|
23
24
|
export interface StoreSourceDocument {
|
|
@@ -1,4 +1,17 @@
|
|
|
1
1
|
import { SourceFieldDefinition, SourceFieldOption } from '../source/source-expression.types';
|
|
2
|
+
export declare const ENDGE_UI_SELECT_METADATA_NAMESPACE = "endge.ui.select";
|
|
3
|
+
export declare const FILTER_SELECT_AUTO_OPTIMIZE_THRESHOLD = 10;
|
|
4
|
+
/** Presentation hints встроенного Select; неизвестные metadata adapters игнорируют. */
|
|
5
|
+
export interface FilterSelectPresentationMetadata {
|
|
6
|
+
searchable?: boolean;
|
|
7
|
+
}
|
|
8
|
+
/** Результат применения metadata и безопасных adapter defaults к Select. */
|
|
9
|
+
export interface FilterSelectPresentation {
|
|
10
|
+
searchable: boolean;
|
|
11
|
+
virtualized: boolean;
|
|
12
|
+
}
|
|
13
|
+
/** Применяет явный searchable override и автоматическую оптимизацию больших списков. */
|
|
14
|
+
export declare function resolveFilterSelectPresentation(field: Pick<SourceFieldDefinition, 'metadata'>, optionCount: number): FilterSelectPresentation;
|
|
2
15
|
/** Renderer-neutral primitive, выбранный для поля Filter view. */
|
|
3
16
|
export type FilterViewControlType = 'Input' | 'Textarea' | 'Checkbox' | 'Select';
|
|
4
17
|
/** Явное переопределение автоматически выбранного контрола. */
|
package/dist/main.d.ts
CHANGED
|
@@ -15,6 +15,8 @@ export * from './model/modules/runtime/execution/endge-query';
|
|
|
15
15
|
export * from './model/modules/runtime/execution/endge-computation';
|
|
16
16
|
export * from './model/modules/runtime/core/endge-runtime';
|
|
17
17
|
export * from './model/modules/security/endge-auth';
|
|
18
|
+
export * from './model/modules/security/auth/AuthInteractionRequiredError';
|
|
19
|
+
export * from './model/services/auth/OidcBrowserSession_Service';
|
|
18
20
|
export * from './model/modules/context/endge-i18n';
|
|
19
21
|
export * from './model/modules/context/endge-workspace';
|
|
20
22
|
export * from './model/modules/context/endge-vars';
|
|
@@ -40,6 +42,7 @@ export * from './domain/types/component/sfc/table-visibility.types';
|
|
|
40
42
|
export * from './domain/types/component/sfc/table-events.types';
|
|
41
43
|
export * from './domain/types/component/sfc/intrinsic-events.types';
|
|
42
44
|
export * from './domain/types/component/sfc/tag-input-contract.types';
|
|
45
|
+
export * from './domain/types/component/sfc/tag-attribute-contract.types';
|
|
43
46
|
export * from './domain/types/component/sfc/location.types';
|
|
44
47
|
export * from './domain/types/component/sfc/ast.types';
|
|
45
48
|
export * from './domain/types/component/sfc/ir.types';
|
|
@@ -57,6 +60,7 @@ export * from './domain/types/document/codegen.types';
|
|
|
57
60
|
export * from './domain/types/document/document.types';
|
|
58
61
|
export * from './domain/types/document/document-create.type';
|
|
59
62
|
export * from './domain/types/document/document-draft.type';
|
|
63
|
+
export * from './domain/types/document/document-move.type';
|
|
60
64
|
export * from './domain/types/document/domain-export.type';
|
|
61
65
|
export * from './domain/types/document/domain-provider.type';
|
|
62
66
|
export * from './domain/types/document/domain-snapshot.type';
|
|
@@ -161,6 +165,7 @@ export * from './domain/entities/action-flow/REndgeFlow';
|
|
|
161
165
|
export * from './tools/openapi-parser';
|
|
162
166
|
export * from './tools/graphql-parser';
|
|
163
167
|
export * from './tools/ScheduleUpdate-sse-generator';
|
|
168
|
+
export * from './tools/component-sfc-edit-trigger';
|
|
164
169
|
export * from './model/config/diagnostics.config';
|
|
165
170
|
export * from './model/adapters/diagnostics/ConsoleDiagnosticsAdapter';
|
|
166
171
|
export * from './model/adapters/diagnostics/DiagnosticsAdapterRegistry';
|
|
@@ -194,6 +199,7 @@ export * from './domain/entities/runtime/hosts/CompositionRuntimeHost';
|
|
|
194
199
|
export * from './domain/entities/runtime/hosts/StoreRuntimeHost';
|
|
195
200
|
export * from './domain/entities/runtime/hosts/ActionRuntimeHost';
|
|
196
201
|
export * from './model/services/compiler/component-sfc/component-sfc-compile';
|
|
202
|
+
export * from './model/services/compiler/component-sfc/component-sfc-attributes';
|
|
197
203
|
export * from './model/services/compiler/component-sfc/component-sfc-expression';
|
|
198
204
|
export * from './model/services/compiler/component-sfc/component-sfc-parse';
|
|
199
205
|
export * from './model/services/compiler/component-sfc/component-sfc-script';
|
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
import { DomainDocumentType } from '../../../domain/types/document/document.types';
|
|
2
2
|
import { DocumentCreateRequest, DocumentCreateResult } from '../../../domain/types/document/document-create.type';
|
|
3
|
+
import { EndgeDomainDocumentMove } from '../../../domain/types/document/document-move.type';
|
|
3
4
|
import { EndgeDomainRepositoryCapabilities } from '../../../domain/types/document/domain-provider.type';
|
|
4
5
|
import { EndgeDocumentServerState, EndgeLiveDomainSnapshot } from '../../../domain/types/document/domain-snapshot.type';
|
|
5
6
|
import { EndgeBootContext } from '../../../domain/types/kernel/bootstrap.types';
|
|
@@ -31,6 +32,8 @@ export declare class EndgeDomainRepository extends EndgeModule {
|
|
|
31
32
|
deleteDocument(documentIdOrIdentity: string, documentType: DomainDocumentType): Promise<void>;
|
|
32
33
|
restoreDocument(documentIdOrIdentity: string, documentType: DomainDocumentType): Promise<void>;
|
|
33
34
|
changeDocumentFolder(documentId: string | number, documentType: DomainDocumentType, folderIdOrIdentity: string | number | null): Promise<void>;
|
|
35
|
+
/** Атомарно переносит несколько persisted-документов в одну папку. */
|
|
36
|
+
changeDocumentsFolder(documents: readonly EndgeDomainDocumentMove[], folderIdOrIdentity: string | number): Promise<number>;
|
|
34
37
|
saveFolder(folderId: string): Promise<void>;
|
|
35
38
|
deleteFolder(folderIdentity: string): Promise<void>;
|
|
36
39
|
restoreFolder(folderIdentity: string): Promise<void>;
|
|
@@ -33,7 +33,9 @@ import { RType } from '../../../domain/entities/reflect/RType';
|
|
|
33
33
|
import { RVocabs } from '../../../domain/entities/reflect/RVocabs';
|
|
34
34
|
import { RI18nBundle } from '../../../domain/entities/reflect/RI18nBundle';
|
|
35
35
|
import { ResolvedEntityIndex } from './resolved/resolved-entity-index';
|
|
36
|
+
/** Материализует только активные документы; tombstones остаются в repository server state. */
|
|
36
37
|
export declare function normalizeSnapshotDocuments(documents: readonly EndgeLiveDomainDocument[], folderIds: ReadonlyMap<string, string>): Record<string, unknown>[];
|
|
38
|
+
/** Материализует только активные папки; tombstones остаются в repository server state. */
|
|
37
39
|
export declare function normalizeSnapshotFolders(folders: readonly EndgeLiveDomainDocument[], folderIds: ReadonlyMap<string, string>): Record<string, unknown>[];
|
|
38
40
|
/**
|
|
39
41
|
* EndgeDomain – менеджер доменных данных.
|
|
@@ -1,14 +1,14 @@
|
|
|
1
|
-
import { DataViewRef, DataViewRunTools } from '../../../../domain/types/source/data-view-source.types';
|
|
1
|
+
import { DataViewRef, DataViewRunContext, DataViewRunTools } from '../../../../domain/types/source/data-view-source.types';
|
|
2
2
|
import { DataViewProgramPayload, ProgramArtifact } from '../../../../domain/types/program/program.types';
|
|
3
3
|
import { RDataView } from '../../../../domain/entities/reflect/RDataView';
|
|
4
4
|
/** Модуль выполнения скомпилированных RDataView artifacts. */
|
|
5
5
|
export declare class EndgeDataView {
|
|
6
6
|
/** Выполняет DataView по id/identity/model над переданным input object. */
|
|
7
|
-
run(dataViewOrId: RDataView | string | number, input: unknown, tools?: Partial<DataViewRunTools
|
|
7
|
+
run(dataViewOrId: RDataView | string | number, input: unknown, tools?: Partial<DataViewRunTools>, context?: DataViewRunContext): unknown;
|
|
8
8
|
/** Выполняет уже скомпилированный DataView artifact без поиска в домене. */
|
|
9
|
-
runArtifact(artifact: ProgramArtifact<DataViewProgramPayload>, input: unknown, tools?: Partial<DataViewRunTools
|
|
9
|
+
runArtifact(artifact: ProgramArtifact<DataViewProgramPayload>, input: unknown, tools?: Partial<DataViewRunTools>, context?: DataViewRunContext): unknown;
|
|
10
10
|
/** Выполняет уже скомпилированный DataView payload. */
|
|
11
|
-
runPayload(artifact: DataViewProgramPayload, input: unknown, tools?: Partial<DataViewRunTools>, context?: {
|
|
11
|
+
runPayload(artifact: DataViewProgramPayload, input: unknown, tools?: Partial<DataViewRunTools>, context?: DataViewRunContext & {
|
|
12
12
|
children?: ProgramArtifact[];
|
|
13
13
|
}): unknown;
|
|
14
14
|
/** Вычисляет object projection один раз над целым DataView input. */
|
|
@@ -16,11 +16,11 @@ export declare class EndgeDataView {
|
|
|
16
16
|
/** Вычисляет root ValueExpression без object projection wrapper. */
|
|
17
17
|
private _runExpression;
|
|
18
18
|
/** Выполняет DataView-ссылку из query/DataView artifact. */
|
|
19
|
-
runRef(ref: DataViewRef, input: unknown, tools?: Partial<DataViewRunTools>, context?: {
|
|
19
|
+
runRef(ref: DataViewRef, input: unknown, tools?: Partial<DataViewRunTools>, context?: DataViewRunContext & {
|
|
20
20
|
children?: ProgramArtifact[];
|
|
21
21
|
}): unknown;
|
|
22
22
|
/** Выполняет DataView source без записи artifact в `Endge.program`. */
|
|
23
|
-
runSource(source: string, input: unknown, tools?: Partial<DataViewRunTools
|
|
23
|
+
runSource(source: string, input: unknown, tools?: Partial<DataViewRunTools>, context?: DataViewRunContext): unknown;
|
|
24
24
|
/** Возвращает DataView model из домена или входного экземпляра. */
|
|
25
25
|
private _resolveDataView;
|
|
26
26
|
/** Возвращает compiled artifact, компилируя DataView локально при необходимости. */
|
|
@@ -29,6 +29,8 @@ export declare class EndgeDataView {
|
|
|
29
29
|
private _runManual;
|
|
30
30
|
/** Интерпретирует декларативные pipeline steps без eval. */
|
|
31
31
|
private _runPipeline;
|
|
32
|
+
/** Заполняет отсутствующие props декларативными defaults DataView artifact. */
|
|
33
|
+
private _resolveProps;
|
|
32
34
|
/** Последовательно вычисляет whole-value steps; каждый select получает результат предыдущего. */
|
|
33
35
|
private _runSelectPipeline;
|
|
34
36
|
/** Собирает базовый output для map step из spread-источников. */
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
/** Сигнал host-приложению, что продолжение требует пользовательского OIDC flow. */
|
|
2
|
+
export declare class AuthInteractionRequiredError extends Error {
|
|
3
|
+
readonly profileIdentity: string;
|
|
4
|
+
readonly code = "auth_interaction_required";
|
|
5
|
+
constructor(profileIdentity: string);
|
|
6
|
+
}
|
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
import { RAuthProfile } from '../../../../domain/entities/reflect/RAuthProfile';
|
|
2
|
-
import { AuthAdapterContext, AuthProfileSchema,
|
|
2
|
+
import { AuthAdapterContext, AuthProfileSchema, AuthProfileTestResult } from '../../../../domain/types/auth/auth-profile.types';
|
|
3
3
|
import { AuthAdapterRegistry } from './AuthAdapterRegistry';
|
|
4
4
|
interface AuthProfileRegistryDependencies {
|
|
5
5
|
listProfiles: () => RAuthProfile[];
|
|
6
6
|
getDefaultIdentity: () => string | null;
|
|
7
|
-
|
|
7
|
+
resolveValue: (value: unknown) => string;
|
|
8
8
|
getSignal: () => AbortSignal | undefined;
|
|
9
9
|
}
|
|
10
10
|
/** Читает persisted AuthProfile и проверяет adapter-specific contracts. */
|
|
@@ -21,11 +21,11 @@ export declare class AuthProfileRegistry {
|
|
|
21
21
|
/** Проверяет все не удалённые profiles текущего Domain. */
|
|
22
22
|
validateAll(): void;
|
|
23
23
|
/** Проверяет profile в изолированной session без записи token в storage. */
|
|
24
|
-
test(profile: AuthProfileSchema
|
|
24
|
+
test(profile: AuthProfileSchema): Promise<AuthProfileTestResult>;
|
|
25
25
|
/** Требует существующий активный profile. */
|
|
26
26
|
requireActive(profileOrIdentity: AuthProfileSchema | string): AuthProfileSchema;
|
|
27
27
|
/** Создаёт adapter context с opaque host credential resolver. */
|
|
28
|
-
createAdapterContext(profile: AuthProfileSchema
|
|
28
|
+
createAdapterContext(profile: AuthProfileSchema): AuthAdapterContext;
|
|
29
29
|
private _adapterContext;
|
|
30
30
|
private _validateCommon;
|
|
31
31
|
}
|
|
@@ -1,11 +1,16 @@
|
|
|
1
1
|
import { AuthRequestPolicy, AuthResolvedSession, AuthResolveOptions } from '../../../../domain/types/auth/auth-profile.types';
|
|
2
2
|
import { AuthProfileRegistry } from './AuthProfileRegistry';
|
|
3
3
|
import { AuthSessionManager } from './AuthSessionManager';
|
|
4
|
-
|
|
4
|
+
import { AuthInteractionRequiredError } from './AuthInteractionRequiredError';
|
|
5
|
+
/** Разрешает auth policy запроса без изменения sessions других profiles. */
|
|
5
6
|
export declare class AuthRequestResolver {
|
|
6
7
|
private readonly _profiles;
|
|
7
8
|
private readonly _sessions;
|
|
8
|
-
|
|
9
|
+
private readonly _onInteractionRequired?;
|
|
10
|
+
constructor(_profiles: AuthProfileRegistry, _sessions: AuthSessionManager, _onInteractionRequired?: ((error: AuthInteractionRequiredError) => void) | undefined);
|
|
9
11
|
/** Возвращает transport-neutral credentials для none/inherit/profile policy. */
|
|
10
12
|
resolve(policy: AuthRequestPolicy, options?: AuthResolveOptions): Promise<AuthResolvedSession>;
|
|
13
|
+
/** Publishes the typed host signal before the request fails. */
|
|
14
|
+
private _throwInteractionRequired;
|
|
15
|
+
private _publishAndThrow;
|
|
11
16
|
}
|
|
@@ -1,13 +1,13 @@
|
|
|
1
|
-
import { AuthEnsureOptions,
|
|
1
|
+
import { AuthEnsureOptions, AuthProfileSchema, AuthResolvedSession, AuthSessionSource, AuthTokenSet, EndgeAuthContext } from '../../../../domain/types/auth/auth-profile.types';
|
|
2
2
|
import { AuthAdapterRegistry } from './AuthAdapterRegistry';
|
|
3
3
|
import { AuthProfileRegistry } from './AuthProfileRegistry';
|
|
4
4
|
import { AuthSessionStore } from './AuthSessionStore';
|
|
5
5
|
interface AuthSessionManagerDependencies {
|
|
6
6
|
getWorkspaceIdentity: () => string;
|
|
7
|
-
|
|
7
|
+
onSessionChange: () => void;
|
|
8
8
|
now?: () => number;
|
|
9
9
|
}
|
|
10
|
-
/** Владеет
|
|
10
|
+
/** Владеет изолированными sessions runtime auth profiles. */
|
|
11
11
|
export declare class AuthSessionManager {
|
|
12
12
|
private readonly _profiles;
|
|
13
13
|
private readonly _adapters;
|
|
@@ -15,35 +15,31 @@ export declare class AuthSessionManager {
|
|
|
15
15
|
private readonly _dependencies;
|
|
16
16
|
private readonly _states;
|
|
17
17
|
private readonly _operations;
|
|
18
|
+
private readonly _sources;
|
|
18
19
|
private readonly _now;
|
|
19
|
-
private
|
|
20
|
+
private _defaultProfile;
|
|
20
21
|
constructor(_profiles: AuthProfileRegistry, _adapters: AuthAdapterRegistry, _store: AuthSessionStore, _dependencies: AuthSessionManagerDependencies);
|
|
21
|
-
/** Identity
|
|
22
|
+
/** Identity default runtime profile. */
|
|
22
23
|
get profileIdentity(): string | null;
|
|
23
|
-
/**
|
|
24
|
-
getApplicationProfile(): AuthProfileSchema | null;
|
|
25
|
-
/** Показывает наличие действующей application session. */
|
|
24
|
+
/** Показывает наличие действующей session default runtime profile. */
|
|
26
25
|
get isAuthenticated(): boolean;
|
|
27
26
|
/** Безопасный actor/session context без tokens. */
|
|
28
27
|
get context(): EndgeAuthContext;
|
|
29
|
-
/** Claims
|
|
28
|
+
/** Claims default profile session только для presentation, не для authorization decisions. */
|
|
30
29
|
get claims(): Record<string, unknown>;
|
|
31
|
-
/** Загруженный OIDC userinfo
|
|
30
|
+
/** Загруженный OIDC userinfo default profile session. */
|
|
32
31
|
get userInfo(): Record<string, unknown> | null;
|
|
33
|
-
/** Выбирает default
|
|
32
|
+
/** Выбирает default runtime profile и восстанавливает его snapshot. */
|
|
34
33
|
configureDefault(profile: AuthProfileSchema | null): void;
|
|
35
|
-
/**
|
|
36
|
-
|
|
37
|
-
/**
|
|
38
|
-
loginWithProfile(profileIdentity: string, credentials: AuthLoginCredentials): Promise<void>;
|
|
39
|
-
private _loginWithProfile;
|
|
40
|
-
/** Гарантирует действующую application session. */
|
|
34
|
+
/** Подключает host-owned session source и запрещает смешивание с persisted snapshot profile. */
|
|
35
|
+
connect(profileIdentity: string, source: AuthSessionSource): void;
|
|
36
|
+
/** Гарантирует действующую session default runtime profile. */
|
|
41
37
|
ensureValid(options?: AuthEnsureOptions): Promise<boolean>;
|
|
42
|
-
/** Загружает userinfo для
|
|
38
|
+
/** Загружает userinfo для session default runtime profile. */
|
|
43
39
|
ensureUserInfo(): Promise<Record<string, unknown> | null>;
|
|
44
|
-
/** Завершает
|
|
40
|
+
/** Завершает session default runtime profile и всегда очищает local snapshot. */
|
|
45
41
|
logout(): Promise<void>;
|
|
46
|
-
/** Гарантирует session указанного profile, не меняя
|
|
42
|
+
/** Гарантирует session указанного profile, не меняя default profile. */
|
|
47
43
|
ensureProfile(profileInput: AuthProfileSchema, options?: AuthEnsureOptions): Promise<AuthTokenSet | null>;
|
|
48
44
|
/** Преобразует token set в transport-neutral request session. */
|
|
49
45
|
toResolvedSession(profile: AuthProfileSchema, token: AuthTokenSet): AuthResolvedSession;
|
|
@@ -53,9 +49,11 @@ export declare class AuthSessionManager {
|
|
|
53
49
|
private _authenticate;
|
|
54
50
|
private _setState;
|
|
55
51
|
private _clearState;
|
|
56
|
-
private
|
|
52
|
+
private _defaultState;
|
|
57
53
|
private _isAccessTokenUsable;
|
|
54
|
+
private _isSessionUsable;
|
|
58
55
|
private _isAccessTokenFresh;
|
|
56
|
+
private _refreshSkewMs;
|
|
59
57
|
private _isRefreshExpired;
|
|
60
58
|
private _workspaceIdentity;
|
|
61
59
|
private _singleFlight;
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import { AuthAdapterContext, AuthProfileAdapter, AuthProfileSchema, AuthTokenSet } from '../../../../../domain/types/auth/auth-profile.types';
|
|
2
|
+
/** Материализует HTTP Basic header без token session. */
|
|
3
|
+
export declare class BasicAuthAdapter implements AuthProfileAdapter {
|
|
4
|
+
readonly id = "basic";
|
|
5
|
+
readonly label = "Basic";
|
|
6
|
+
/** Проверяет строгий Basic contract. */
|
|
7
|
+
validate(profile: AuthProfileSchema): void;
|
|
8
|
+
/** Разрешает credentials и возвращает готовый Authorization header. */
|
|
9
|
+
authenticate(context: AuthAdapterContext): Promise<AuthTokenSet>;
|
|
10
|
+
}
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { AuthAdapterContext, AuthProfileAdapter, AuthProfileSchema, AuthTokenSet } from '../../../../../domain/types/auth/auth-profile.types';
|
|
2
|
-
/**
|
|
2
|
+
/** Материализует Bearer header из literal или Workspace variable. */
|
|
3
3
|
export declare class BearerAuthAdapter implements AuthProfileAdapter {
|
|
4
4
|
readonly id = "bearer";
|
|
5
5
|
readonly label = "Bearer token";
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
import { AuthAdapterContext, AuthProfileAdapter, AuthProfileSchema, AuthTokenSet } from '../../../../../domain/types/auth/auth-profile.types';
|
|
2
|
+
/** Выполняет OAuth2 Client Credentials grant. */
|
|
3
|
+
export declare class OAuth2ClientCredentialsAuthAdapter implements AuthProfileAdapter {
|
|
4
|
+
readonly id = "oauth2-client-credentials";
|
|
5
|
+
readonly label = "OAuth2 Client Credentials";
|
|
6
|
+
validate(profile: AuthProfileSchema): void;
|
|
7
|
+
authenticate(context: AuthAdapterContext): Promise<AuthTokenSet>;
|
|
8
|
+
}
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
import { AuthAdapterContext, AuthProfileAdapter, AuthProfileSchema, AuthTokenSet } from '../../../../../domain/types/auth/auth-profile.types';
|
|
2
|
+
/** Валидирует общий OIDC profile; interactive flow запускает host через session source. */
|
|
3
|
+
export declare class OidcAuthAdapter implements AuthProfileAdapter {
|
|
4
|
+
readonly id = "oidc";
|
|
5
|
+
readonly label = "OIDC";
|
|
6
|
+
validate(profile: AuthProfileSchema): void;
|
|
7
|
+
authenticate(context: AuthAdapterContext): Promise<AuthTokenSet>;
|
|
8
|
+
}
|
|
@@ -1,29 +1,39 @@
|
|
|
1
1
|
import { EndgeBootContext } from '../../../domain/types/kernel/bootstrap.types';
|
|
2
|
+
import { AuthProfileSchema, OidcBrowserSessionOptions } from '../../../domain/types/auth/auth-profile.types';
|
|
2
3
|
import { EndgeModule } from '../../../domain/entities/endge/EndgeModule';
|
|
3
4
|
import { AuthAdapterRegistry } from './auth/AuthAdapterRegistry';
|
|
4
5
|
import { AuthProfileRegistry } from './auth/AuthProfileRegistry';
|
|
5
6
|
import { AuthRequestResolver } from './auth/AuthRequestResolver';
|
|
6
7
|
import { AuthSessionManager } from './auth/AuthSessionManager';
|
|
7
|
-
|
|
8
|
+
import { OidcBrowserSession_Service } from '../../services/auth/OidcBrowserSession_Service';
|
|
9
|
+
import { AuthInteractionRequiredError } from './auth/AuthInteractionRequiredError';
|
|
10
|
+
export type AuthInteractionRequiredListener = (error: AuthInteractionRequiredError) => void;
|
|
11
|
+
/** Единый lifecycle owner runtime auth profile sessions и request authentication. */
|
|
8
12
|
export declare class EndgeAuth extends EndgeModule {
|
|
9
13
|
readonly adapters: AuthAdapterRegistry;
|
|
10
14
|
readonly profiles: AuthProfileRegistry;
|
|
11
15
|
readonly session: AuthSessionManager;
|
|
12
16
|
readonly requests: AuthRequestResolver;
|
|
13
|
-
private _credentialResolver;
|
|
14
17
|
private _signal;
|
|
18
|
+
private _storageNamespace;
|
|
15
19
|
private _abortController;
|
|
16
20
|
private _detachHostAbort;
|
|
17
21
|
private _unregisterDiagnosticsContext;
|
|
18
22
|
private readonly _store;
|
|
23
|
+
private readonly _interactionRequiredListeners;
|
|
19
24
|
/** Собирает auth subsystem и регистрирует встроенные adapters один раз. */
|
|
20
25
|
constructor();
|
|
21
|
-
/**
|
|
26
|
+
/** Subscribes a host application to requests that require an interactive OIDC flow. */
|
|
27
|
+
onInteractionRequired(listener: AuthInteractionRequiredListener): () => void;
|
|
28
|
+
/** Подключает storage namespace и безопасные context providers. */
|
|
22
29
|
setup(ctx: EndgeBootContext): void;
|
|
23
|
-
/** Валидирует Domain profiles и восстанавливает default
|
|
30
|
+
/** Валидирует Domain profiles и восстанавливает session default runtime profile. */
|
|
24
31
|
build(): void;
|
|
25
32
|
/** Сбрасывает runtime state, не удаляя persisted browser session. */
|
|
26
33
|
reset(): void;
|
|
34
|
+
/** Создаёт OIDC browser source из resolved persisted profile. */
|
|
35
|
+
createOidcSessionSource(profileInput: AuthProfileSchema | string, options: Pick<OidcBrowserSessionOptions, 'redirectUri' | 'popupRedirectUri' | 'postLogoutRedirectUri' | 'flow'>): OidcBrowserSession_Service;
|
|
27
36
|
private _resolvePublicValue;
|
|
28
37
|
private _diagnosticsAttributes;
|
|
38
|
+
private _publishInteractionRequired;
|
|
29
39
|
}
|
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
import { AuthSessionSource, AuthSessionSourceResolveOptions, AuthTokenSet, OidcBrowserSessionOptions } from '../../../domain/types/auth/auth-profile.types';
|
|
2
|
+
/** Общий browser OIDC runtime для popup и redirect Authorization Code + PKCE flows. */
|
|
3
|
+
export declare class OidcBrowserSession_Service implements AuthSessionSource {
|
|
4
|
+
readonly options: OidcBrowserSessionOptions;
|
|
5
|
+
private readonly _userStore;
|
|
6
|
+
private readonly _manager;
|
|
7
|
+
constructor(options: OidcBrowserSessionOptions);
|
|
8
|
+
/** Возвращает сохранённого пользователя без запуска интерактивного flow. */
|
|
9
|
+
hasSession(): Promise<boolean>;
|
|
10
|
+
/** Открывает внешний OIDC login в popup и сохраняет полученную session. */
|
|
11
|
+
loginPopup(): Promise<AuthTokenSet>;
|
|
12
|
+
/** Завершает callback в отдельном popup без загрузки Domain. */
|
|
13
|
+
static completeStoredPopupCallback(url?: string): Promise<void>;
|
|
14
|
+
/** Перенаправляет текущую вкладку на внешний OIDC login. */
|
|
15
|
+
loginRedirect(): Promise<never>;
|
|
16
|
+
/** Завершает redirect callback и сохраняет session. */
|
|
17
|
+
completeRedirectCallback(url?: string): Promise<AuthTokenSet>;
|
|
18
|
+
/** Завершает popup callback; результат передаётся opener через oidc-client-ts. */
|
|
19
|
+
completePopupCallback(url?: string): Promise<void>;
|
|
20
|
+
/** Возвращает актуальную session, используя refresh token только при необходимости. */
|
|
21
|
+
resolveToken(options: AuthSessionSourceResolveOptions): Promise<AuthTokenSet | null>;
|
|
22
|
+
/** Возвращает claims и при наличии endpoint дополняет их OIDC userinfo. */
|
|
23
|
+
loadUserInfo(): Promise<Record<string, unknown> | null>;
|
|
24
|
+
/** Завершает provider session выбранным host flow и всегда удаляет local user. */
|
|
25
|
+
logout(): Promise<void>;
|
|
26
|
+
}
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import { RComponentContractInput, RComponentDiagnostic } from '../../../../domain/types/component/component-core.types';
|
|
2
|
+
import { RComponentSFC_AST } from '../../../../domain/types/component/sfc/ast.types';
|
|
3
|
+
import { ComponentSFCAttributeAnalysisOptions, ComponentSFCTagAttributeContract } from '../../../../domain/types/component/sfc/tag-attribute-contract.types';
|
|
4
|
+
/** Проверяет статические значения конечных SFC-атрибутов по renderer-neutral контрактам. */
|
|
5
|
+
export declare function validateComponentSFCAttributeValues(source: string, ast: RComponentSFC_AST | null, options?: ComponentSFCAttributeAnalysisOptions): RComponentDiagnostic[];
|
|
6
|
+
/** Возвращает встроенные и подключенные извне контракты без повторов имён. */
|
|
7
|
+
export declare function resolveComponentSFCTagAttributeContracts(tag: string, options?: ComponentSFCAttributeAnalysisOptions): readonly ComponentSFCTagAttributeContract[];
|
|
8
|
+
/** Преобразует literal-union inputs пользовательского компонента в editor-контракты. */
|
|
9
|
+
export declare function createComponentSFCAttributeContractsFromInputs(inputs: readonly RComponentContractInput[]): ComponentSFCTagAttributeContract[];
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
import { RComponentDependencies, RComponentDiagnostic } from '../../../../domain/types/component/component-core.types';
|
|
2
|
+
import { RComponentSFC_AST_Attribute } from '../../../../domain/types/component/sfc/ast.types';
|
|
3
|
+
import { RComponentSFC_IR_EventModifier, RComponentSFC_IR_InteractionGroup } from '../../../../domain/types/component/sfc/ir.types';
|
|
4
|
+
import { ComponentSFCPortManifest } from '../../../../domain/types/component/sfc/ports.types';
|
|
5
|
+
export interface ComponentSFCInteractionCompileContext {
|
|
6
|
+
props: string[];
|
|
7
|
+
locals: string[];
|
|
8
|
+
}
|
|
9
|
+
/** Detects statically invalid passive/prevent combinations in shared trigger descriptors. */
|
|
10
|
+
export declare function hasComponentSFCPassivePreventConflict(source: string, suffixes?: readonly RComponentSFC_IR_EventModifier[]): boolean;
|
|
11
|
+
/** Compiles one source-owned `:on` annotation into renderer-neutral rules. */
|
|
12
|
+
export declare function compileComponentSFCInteractionAnnotation(attribute: RComponentSFC_AST_Attribute, manifest: ComponentSFCPortManifest | null, context: ComponentSFCInteractionCompileContext, dependencies: RComponentDependencies, diagnostics: RComponentDiagnostic[]): RComponentSFC_IR_InteractionGroup | null;
|