@endge/core 10.0.0 → 11.1.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.
Files changed (82) hide show
  1. package/dist/core.js +38624 -38584
  2. package/dist/features/core/kernel/config/kernel.config.d.ts +2 -2
  3. package/dist/features/core/kernel/constants/kernel.constants.d.ts +1 -3
  4. package/dist/features/core/kernel/types/bootstrap.types.d.ts +1 -1
  5. package/dist/features/core/modules/bridge/config/bridge.config.d.ts +12 -0
  6. package/dist/features/core/modules/bridge/debug/EndgeBridgeDebug_Module.d.ts +4 -1
  7. package/dist/features/core/modules/commands/domain/commands.types.d.ts +3 -8
  8. package/dist/features/core/modules/commands/services/context/SetFacetCommand.d.ts +9 -0
  9. package/dist/features/core/modules/commands/types/context-command-target.type.d.ts +1 -3
  10. package/dist/features/core/modules/compiler/EndgeCompiler_Module.d.ts +3 -6
  11. package/dist/features/core/modules/compiler/services/action/action-compile.d.ts +2 -0
  12. package/dist/features/core/modules/compiler/services/computation/computation-compile.d.ts +2 -0
  13. package/dist/features/core/modules/configuration/EndgeConfiguration_Module.d.ts +2 -2
  14. package/dist/features/core/modules/configuration/domain/endge-configuration.d.ts +1 -1
  15. package/dist/features/core/modules/configuration/domain/tooltip.config.d.ts +1 -1
  16. package/dist/features/core/modules/configuration/domain/types/configuration.type.d.ts +3 -1
  17. package/dist/features/core/modules/context/EndgeContext_Module.d.ts +15 -21
  18. package/dist/features/core/modules/context/domain/context-persistence.types.d.ts +8 -8
  19. package/dist/features/core/modules/domain/EndgeDomain_Module.d.ts +18 -201
  20. package/dist/features/core/modules/domain/documents/document-metadata.d.ts +7 -0
  21. package/dist/features/core/modules/domain/documents/domain-document-descriptors.d.ts +4 -10
  22. package/dist/features/core/modules/domain/documents/service-document-serializer.d.ts +0 -1
  23. package/dist/features/core/modules/domain/entities/RComponentBase.d.ts +0 -1
  24. package/dist/features/core/modules/domain/entities/RComposition.d.ts +1 -1
  25. package/dist/features/core/modules/domain/entities/REntity.d.ts +2 -0
  26. package/dist/features/core/modules/domain/entities/RFacet.d.ts +14 -0
  27. package/dist/features/core/modules/domain/entities/RFacetDocument.d.ts +12 -0
  28. package/dist/features/core/modules/domain/entities/RFolder.d.ts +5 -0
  29. package/dist/features/core/modules/domain/entities/RWorkspace.d.ts +3 -1
  30. package/dist/features/core/modules/domain/types/document/codegen.types.d.ts +14 -4
  31. package/dist/features/core/modules/domain/types/document/document-metadata.types.d.ts +38 -0
  32. package/dist/features/core/modules/domain/types/document/document.types.d.ts +4 -15
  33. package/dist/features/core/modules/domain/types/document/domain-export.type.d.ts +4 -7
  34. package/dist/features/core/modules/domain/types/document/domain-provider.type.d.ts +68 -1
  35. package/dist/features/core/modules/domain/types/document/domain-snapshot.type.d.ts +6 -1
  36. package/dist/features/core/modules/domain/types/document/query.types.d.ts +0 -48
  37. package/dist/features/core/modules/domain-repository/EndgeDomainRepository_Module.d.ts +31 -4
  38. package/dist/features/core/modules/events/domain/events.types.d.ts +1 -3
  39. package/dist/features/core/modules/i18n/services/composition-i18n-catalog-projection.d.ts +1 -3
  40. package/dist/features/core/modules/program/domain/types/program.types.d.ts +1 -1
  41. package/dist/features/core/modules/runtime/EndgeRuntime_Module.d.ts +2 -6
  42. package/dist/features/core/modules/runtime/domain/execution-context.types.d.ts +5 -12
  43. package/dist/features/core/modules/runtime/domain/runtime-entity-map.types.d.ts +0 -3
  44. package/dist/features/core/modules/runtime/domain/runtime-host.types.d.ts +0 -4
  45. package/dist/features/core/modules/runtime/domain/runtime.types.d.ts +1 -2
  46. package/dist/features/core/modules/runtime/execution/endge-simulation.d.ts +1 -1
  47. package/dist/features/core/modules/runtime/hosts/CompositionRuntimeHost.d.ts +2 -3
  48. package/dist/features/core/modules/runtime/hosts/SimulationRuntimeHost.d.ts +2 -2
  49. package/dist/features/core/modules/runtime/services/strategies/CompositionRuntimeStrategy.d.ts +1 -1
  50. package/dist/features/core/modules/runtime/services/transports/BrowserWebSocketStreamTransportFactory.d.ts +6 -0
  51. package/dist/features/core/modules/source/EndgeSource_Module.d.ts +2 -2
  52. package/dist/features/core/modules/source/domain/types/composition-source.types.d.ts +14 -1
  53. package/dist/features/core/modules/source/domain/types/configuration-source.types.d.ts +2 -0
  54. package/dist/features/core/modules/source/domain/types/simulation-source.types.d.ts +4 -6
  55. package/dist/features/core/modules/source/domain/types/source-engine.types.d.ts +9 -4
  56. package/dist/features/core/modules/source/domain/types/store-source.types.d.ts +2 -0
  57. package/dist/features/core/modules/source/domain/types/stream-source.types.d.ts +15 -1
  58. package/dist/features/core/modules/source/domain/types/type-source.types.d.ts +2 -0
  59. package/dist/features/core/modules/source/domain/types/update-source.types.d.ts +2 -0
  60. package/dist/features/core/modules/source/services/SimulationSourceResolver.d.ts +3 -2
  61. package/dist/features/core/modules/source/services/compilers/action-source-compile.d.ts +2 -0
  62. package/dist/features/core/modules/source/services/compilers/composition-source-compile.d.ts +1 -1
  63. package/dist/features/core/modules/source/services/component-sfc/component-sfc-metadata-source-patch.d.ts +2 -2
  64. package/dist/features/core/modules/source/services/strategies/CompositionSourceEngineStrategy.d.ts +2 -2
  65. package/dist/features/core/modules/source/services/strategies/SimulationSourceEngineStrategy.d.ts +2 -2
  66. package/dist/features/core/modules/source/templates/simulation.default.source.d.ts +1 -1
  67. package/dist/features/core/modules/workspace/domain/workspace.types.d.ts +5 -0
  68. package/dist/main.d.ts +4 -9
  69. package/package.json +2 -2
  70. package/dist/features/core/modules/commands/services/context/SetEnvironmentCommand.d.ts +0 -9
  71. package/dist/features/core/modules/commands/services/context/SetProjectCommand.d.ts +0 -9
  72. package/dist/features/core/modules/commands/services/context/SetTenantCommand.d.ts +0 -9
  73. package/dist/features/core/modules/domain/entities/REnvironment.d.ts +0 -9
  74. package/dist/features/core/modules/domain/entities/RParameter.d.ts +0 -11
  75. package/dist/features/core/modules/domain/entities/RProject.d.ts +0 -64
  76. package/dist/features/core/modules/domain/entities/RQueryFilter.d.ts +0 -12
  77. package/dist/features/core/modules/domain/entities/RTenant.d.ts +0 -10
  78. package/dist/features/core/modules/runtime/domain/runtime-project-session.types.d.ts +0 -31
  79. package/dist/features/core/modules/runtime/execution/endge-project.d.ts +0 -6
  80. package/dist/features/core/modules/runtime/hosts/ProjectRuntimeHost.d.ts +0 -21
  81. package/dist/features/core/modules/runtime/services/strategies/ProjectRuntimeStrategy.d.ts +0 -9
  82. package/dist/features/core/modules/source/templates/project.default.source.d.ts +0 -2
@@ -7,7 +7,8 @@ import { RComputation } from './entities/RComputation';
7
7
  import { RConfiguration } from './entities/RConfiguration';
8
8
  import { RConverter } from './entities/RConverter';
9
9
  import { RDataView } from './entities/RDataView';
10
- import { REnvironment } from './entities/REnvironment';
10
+ import { RFacet } from './entities/RFacet';
11
+ import { RFacetDocument } from './entities/RFacetDocument';
11
12
  import { RFilter } from './entities/RFilter';
12
13
  import { RI18nBundle } from './entities/RI18nBundle';
13
14
  import { RIntegration } from './entities/RIntegration';
@@ -15,15 +16,12 @@ import { RMock } from './entities/RMock';
15
16
  import { RNavigation } from './entities/RNavigation';
16
17
  import { RPage } from './entities/RPage';
17
18
  import { RPageTemplate } from './entities/RPageTemplate';
18
- import { RParameter } from './entities/RParameter';
19
19
  import { RPolicy } from './entities/RPolicy';
20
- import { RProject } from './entities/RProject';
21
20
  import { RQuery } from './entities/RQuery';
22
21
  import { RSimulation } from './entities/RSimulation';
23
22
  import { RStore } from './entities/RStore';
24
23
  import { RStream } from './entities/RStream';
25
24
  import { RStyle } from './entities/RStyle';
26
- import { RTenant } from './entities/RTenant';
27
25
  import { RType } from './entities/RType';
28
26
  import { RUpdate } from './entities/RUpdate';
29
27
  import { RVersion } from './entities/RVersion';
@@ -31,7 +29,6 @@ import { RVocabs } from './entities/RVocabs';
31
29
  import { RComponent } from './types/component/component.types';
32
30
  import { EndgeDomainBundle, EndgeDomainPlain } from './types/document/domain-export.type';
33
31
  import { EndgeLiveDomainDocument, EndgeLiveDomainSnapshot } from './types/document/domain-snapshot.type';
34
- import { FilterFieldSchema } from './types/document/query.types';
35
32
  import { RFolder } from './entities/RFolder';
36
33
  import { ResolvedEntityIndex } from './resolved/resolved-entity-index';
37
34
  import { EndgeModule } from '../../../federation/EndgeModule';
@@ -46,9 +43,9 @@ export declare function normalizeSnapshotFolders(folders: readonly EndgeLiveDoma
46
43
  */
47
44
  /** Результат parsePlain: все распарсенные сущности без добавления в домен. */
48
45
  export interface EndgeDomainParsed {
49
- parameters: RParameter[];
46
+ facets: RFacet[];
47
+ facetDocuments: RFacetDocument[];
50
48
  filters: RFilter[];
51
- projects: RProject[];
52
49
  types: RType[];
53
50
  queries: RQuery[];
54
51
  dataViews: RDataView[];
@@ -62,8 +59,6 @@ export interface EndgeDomainParsed {
62
59
  actions: RAction[];
63
60
  converters: RConverter[];
64
61
  integrations: RIntegration[];
65
- environments: REnvironment[];
66
- tenants: RTenant[];
67
62
  policies: RPolicy[];
68
63
  styles: RStyle[];
69
64
  configurations: RConfiguration[];
@@ -81,8 +76,10 @@ export interface EndgeDomainParsed {
81
76
  export declare class EndgeDomain_Module extends EndgeModule<EndgeBootContext> {
82
77
  /** Несохраняемые дескрипторы, материализованные ядром, плагинами и компилятором. */
83
78
  readonly resolved: ResolvedEntityIndex;
84
- private _projectsById;
85
- private _projectsByIdentity;
79
+ private _facetsById;
80
+ private _facetsByIdentity;
81
+ private _facetDocumentsById;
82
+ private _facetDocumentsByIdentity;
86
83
  private _typesById;
87
84
  private _typesByIdentity;
88
85
  private _queriesById;
@@ -116,16 +113,10 @@ export declare class EndgeDomain_Module extends EndgeModule<EndgeBootContext> {
116
113
  private _integrationsByIdentity;
117
114
  private _foldersById;
118
115
  private _foldersByIdentity;
119
- private _parametersById;
120
- private _parametersByIdentity;
121
116
  private _filtersById;
122
117
  private _filtersByIdentity;
123
118
  private _versionsById;
124
119
  private _versionsByIdentity;
125
- private _environmentsById;
126
- private _environmentsByIdentity;
127
- private _tenantsById;
128
- private _tenantsByIdentity;
129
120
  private _policiesById;
130
121
  private _policiesByIdentity;
131
122
  private _stylesById;
@@ -176,50 +167,6 @@ export declare class EndgeDomain_Module extends EndgeModule<EndgeBootContext> {
176
167
  mergeFromSnapshot(snapshot: EndgeLiveDomainSnapshot): void;
177
168
  /** Нормализует immutable workspace bundle без создания фиктивного server-side state. */
178
169
  mergeFromBundle(bundle: EndgeDomainBundle): void;
179
- /**
180
- * Методы для работы с проектами
181
- */
182
- getProjects(): RProject[];
183
- /**
184
- * Возвращает Project по id.
185
- */
186
- getProjectById(id: number): RProject | null;
187
- /**
188
- * Возвращает Project по identity.
189
- */
190
- getProjectByIdentity(identity: string): RProject | null;
191
- /**
192
- * Возвращает Project по id или identity.
193
- */
194
- getProject(idOrIdentity: string | number): RProject | null;
195
- /**
196
- * Добавляет Project в домен и обновляет индексы.
197
- */
198
- addProject(project: RProject): void;
199
- /**
200
- * Удаляет Project из домена по id.
201
- */
202
- removeProjectById(id: number): void;
203
- /**
204
- * Удаляет Project из домена по identity.
205
- */
206
- removeProjectByIdentity(identity: string): void;
207
- /**
208
- * Удаляет Project из домена.
209
- */
210
- removeProject(identity: string): void;
211
- /**
212
- * Проверяет наличие Project по id.
213
- */
214
- hasProjectById(id: number): boolean;
215
- /**
216
- * Проверяет наличие Project по identity.
217
- */
218
- hasProjectByIdentity(identity: string): boolean;
219
- /**
220
- * Проверяет наличие Project по id или identity.
221
- */
222
- hasProject(identity: string): boolean;
223
170
  /**
224
171
  * Методы для работы с типами
225
172
  */
@@ -634,94 +581,6 @@ export declare class EndgeDomain_Module extends EndgeModule<EndgeBootContext> {
634
581
  * Проверяет наличие Integration по id или identity.
635
582
  */
636
583
  hasIntegration(identity: string): boolean;
637
- /**
638
- * Методы для работы с окружениями
639
- */
640
- getEnvironments(): REnvironment[];
641
- /**
642
- * Возвращает Environment по id.
643
- */
644
- getEnvironmentById(id: string | number): REnvironment | null;
645
- /**
646
- * Возвращает Environment по identity.
647
- */
648
- getEnvironmentByIdentity(identity: string): REnvironment | null;
649
- /**
650
- * Возвращает Environment по id или identity.
651
- */
652
- getEnvironment(idOrIdentity: string | number): REnvironment | null;
653
- /**
654
- * Добавляет Environment в домен и обновляет индексы.
655
- */
656
- addEnvironment(environment: REnvironment): void;
657
- /**
658
- * Удаляет Environment из домена по id.
659
- */
660
- removeEnvironmentById(id: string | number): void;
661
- /**
662
- * Удаляет Environment из домена по identity.
663
- */
664
- removeEnvironmentByIdentity(identity: string): void;
665
- /**
666
- * Удаляет Environment из домена.
667
- */
668
- removeEnvironment(identity: string): void;
669
- /**
670
- * Проверяет наличие Environment по id.
671
- */
672
- hasEnvironmentById(id: string | number): boolean;
673
- /**
674
- * Проверяет наличие Environment по identity.
675
- */
676
- hasEnvironmentByIdentity(identity: string): boolean;
677
- /**
678
- * Проверяет наличие Environment по id или identity.
679
- */
680
- hasEnvironment(identity: string): boolean;
681
- /**
682
- * Методы для работы с тенантами
683
- */
684
- getTenants(): RTenant[];
685
- /**
686
- * Возвращает Tenant по id.
687
- */
688
- getTenantById(id: string | number): RTenant | null;
689
- /**
690
- * Возвращает Tenant по identity.
691
- */
692
- getTenantByIdentity(identity: string): RTenant | null;
693
- /**
694
- * Возвращает Tenant по id или identity.
695
- */
696
- getTenant(idOrIdentity: string | number): RTenant | null;
697
- /**
698
- * Добавляет Tenant в домен и обновляет индексы.
699
- */
700
- addTenant(tenant: RTenant): void;
701
- /**
702
- * Удаляет Tenant из домена по id.
703
- */
704
- removeTenantById(id: string | number): void;
705
- /**
706
- * Удаляет Tenant из домена по identity.
707
- */
708
- removeTenantByIdentity(identity: string): void;
709
- /**
710
- * Удаляет Tenant из домена.
711
- */
712
- removeTenant(identity: string): void;
713
- /**
714
- * Проверяет наличие Tenant по id.
715
- */
716
- hasTenantById(id: string | number): boolean;
717
- /**
718
- * Проверяет наличие Tenant по identity.
719
- */
720
- hasTenantByIdentity(identity: string): boolean;
721
- /**
722
- * Проверяет наличие Tenant по id или identity.
723
- */
724
- hasTenant(identity: string): boolean;
725
584
  /**
726
585
  * Методы для работы с политиками
727
586
  */
@@ -1110,58 +969,6 @@ export declare class EndgeDomain_Module extends EndgeModule<EndgeBootContext> {
1110
969
  * Проверяет наличие Folder по id или identity.
1111
970
  */
1112
971
  hasFolder(identity: string): boolean;
1113
- /**
1114
- * Методы для работы с параметрами
1115
- */
1116
- getParameters(): RParameter[];
1117
- /**
1118
- * Возвращает Parameter по id.
1119
- */
1120
- getParameterById(id: string | number): RParameter | null;
1121
- /**
1122
- * Возвращает Parameter по identity.
1123
- */
1124
- getParameterByIdentity(identity: string): RParameter | null;
1125
- /**
1126
- * Возвращает Parameter по id или identity.
1127
- */
1128
- getParameter(idOrIdentity: string | number): RParameter | null;
1129
- /**
1130
- * Возвращает Parameter по identity.
1131
- */
1132
- getParameterIdentity(identity: string): RParameter | null;
1133
- /**
1134
- * Возвращает поле Parameter по identity и имени поля.
1135
- */
1136
- getParameterField(identity: string, field: string): FilterFieldSchema | null;
1137
- /**
1138
- * Добавляет Parameter в домен и обновляет индексы.
1139
- */
1140
- addParameter(parameter: RParameter): void;
1141
- /**
1142
- * Удаляет Parameter из домена по id.
1143
- */
1144
- removeParameterById(id: string | number): void;
1145
- /**
1146
- * Удаляет Parameter из домена по identity.
1147
- */
1148
- removeParameterByIdentity(identity: string): void;
1149
- /**
1150
- * Удаляет Parameter из домена.
1151
- */
1152
- removeParameter(identity: string): void;
1153
- /**
1154
- * Проверяет наличие Parameter по id.
1155
- */
1156
- hasParameterById(id: string | number): boolean;
1157
- /**
1158
- * Проверяет наличие Parameter по identity.
1159
- */
1160
- hasParameterByIdentity(identity: string): boolean;
1161
- /**
1162
- * Проверяет наличие Parameter по id или identity.
1163
- */
1164
- hasParameter(identity: string): boolean;
1165
972
  /**
1166
973
  * Методы для работы с фильтрами
1167
974
  */
@@ -1254,6 +1061,16 @@ export declare class EndgeDomain_Module extends EndgeModule<EndgeBootContext> {
1254
1061
  * Проверяет наличие Version по id или identity.
1255
1062
  */
1256
1063
  hasVersion(identity: string): boolean;
1064
+ private static _facetDocumentKey;
1065
+ /** Возвращает активные фасеты в единственном persisted-порядке специфичности. */
1066
+ getFacets(): RFacet[];
1067
+ getFacet(idOrIdentity: string | number): RFacet | null;
1068
+ addFacet(facet: RFacet): void;
1069
+ removeFacet(idOrIdentity: string | number): void;
1070
+ getFacetDocuments(facetIdentity: string): RFacetDocument[];
1071
+ getFacetDocument(facetIdentity: string, identityOrId: string | number): RFacetDocument | null;
1072
+ addFacetDocument(document: RFacetDocument): void;
1073
+ removeFacetDocument(facetIdentity: string, identityOrId: string | number): void;
1257
1074
  /** Возвращает полный persisted Domain для диагностического дерева. */
1258
1075
  createDiagnosticsSnapshot(): EndgeDomainPlain;
1259
1076
  /** Преобразует EndgeDomain_Module в JSON-объект. */
@@ -0,0 +1,7 @@
1
+ import { DocumentMetadataInput, DocumentMetadataPatchResult, DocumentMetadataProjection } from '../types/document/document-metadata.types';
2
+ import { DomainDocumentType } from '../types/document/document.types';
3
+ import { ProgramMetadataMap } from '../../program/domain/types/program-metadata.types';
4
+ /** Читает пользовательские metadata документа через объявленный descriptor backing. */
5
+ export declare function inspectDocumentMetadata(type: DomainDocumentType, input: DocumentMetadataInput): DocumentMetadataProjection;
6
+ /** Патчит только metadata backing документа, не переписывая остальной Source или системные meta siblings. */
7
+ export declare function patchDocumentMetadata(type: DomainDocumentType, input: DocumentMetadataInput, metadata: ProgramMetadataMap): DocumentMetadataPatchResult;
@@ -1,6 +1,7 @@
1
1
  import { DocumentSerializationContext } from './service-document-serializer';
2
2
  import { DocumentDraftOptions } from '../types/document/document-draft.type';
3
- import { DomainDocumentType, ComponentType, DomainSectionType, FilterType, ParameterType, QueryType } from '../types/document/document.types';
3
+ import { DocumentMetadataBacking } from '../types/document/document-metadata.types';
4
+ import { DomainDocumentType, ComponentType, DomainSectionType, FilterType, QueryType } from '../types/document/document.types';
4
5
  import { EndgeDomainCollection } from '../types/document/domain-provider.type';
5
6
  import { ProgramEntityType } from '../../program/domain/types/program.types';
6
7
  import { RuntimeEntityType } from '../../runtime/domain/runtime-entity-map.types';
@@ -15,7 +16,6 @@ import { RComputation } from '../entities/RComputation';
15
16
  import { RConfiguration } from '../entities/RConfiguration';
16
17
  import { RConverter } from '../entities/RConverter';
17
18
  import { RDataView } from '../entities/RDataView';
18
- import { REnvironment } from '../entities/REnvironment';
19
19
  import { RFilter } from '../entities/RFilter';
20
20
  import { RI18nBundle } from '../entities/RI18nBundle';
21
21
  import { RIntegration } from '../entities/RIntegration';
@@ -23,20 +23,17 @@ import { RMock } from '../entities/RMock';
23
23
  import { RNavigation } from '../entities/RNavigation';
24
24
  import { RPage } from '../entities/RPage';
25
25
  import { RPageTemplate } from '../entities/RPageTemplate';
26
- import { RParameter } from '../entities/RParameter';
27
26
  import { RPolicy } from '../entities/RPolicy';
28
- import { RProject } from '../entities/RProject';
29
27
  import { RQuery } from '../entities/RQuery';
30
28
  import { RSimulation } from '../entities/RSimulation';
31
29
  import { RStore } from '../entities/RStore';
32
30
  import { RStream } from '../entities/RStream';
33
31
  import { RStyle } from '../entities/RStyle';
34
- import { RTenant } from '../entities/RTenant';
35
32
  import { RType } from '../entities/RType';
36
33
  import { RUpdate } from '../entities/RUpdate';
37
34
  import { RVocabs } from '../entities/RVocabs';
38
35
  import { RWorkspace } from '../entities/RWorkspace';
39
- export type DomainCollectionKey = 'projects' | 'types' | 'queries' | 'dataViews' | 'compositions' | 'stores' | 'streams' | 'simulations' | 'updates' | 'mocks' | 'componentSFCs' | 'actions' | 'filters' | 'converters' | 'computations' | 'environments' | 'tenants' | 'styles' | 'configurations' | 'vocabs' | 'authProfiles' | 'i18nBundles' | 'navigations';
36
+ export type DomainCollectionKey = 'types' | 'queries' | 'dataViews' | 'compositions' | 'stores' | 'streams' | 'simulations' | 'updates' | 'mocks' | 'componentSFCs' | 'actions' | 'filters' | 'converters' | 'computations' | 'styles' | 'configurations' | 'vocabs' | 'authProfiles' | 'i18nBundles' | 'navigations';
40
37
  /** Точное соответствие document type конкретной Domain-модели. */
41
38
  export interface DomainDocumentModelMap {
42
39
  'primitive': RType;
@@ -55,15 +52,12 @@ export interface DomainDocumentModelMap {
55
52
  'page-template': RPageTemplate;
56
53
  'page': RPage;
57
54
  'navigation': RNavigation;
58
- 'environment': REnvironment;
59
55
  'policy': RPolicy;
60
56
  'style': RStyle;
61
57
  'configuration': RConfiguration;
62
58
  'vocabs': RVocabs;
63
59
  'i18n-bundles': RI18nBundle;
64
60
  'auth-profile': RAuthProfile;
65
- 'tenant': RTenant;
66
- 'project': RProject;
67
61
  'workspace': RWorkspace;
68
62
  [ComponentType.DSL]: RComponentDSL;
69
63
  [ComponentType.Table]: RComponentTable;
@@ -71,13 +65,13 @@ export interface DomainDocumentModelMap {
71
65
  [QueryType.Custom]: RQuery;
72
66
  [QueryType.GraphQL]: RQuery;
73
67
  [QueryType.REST]: RQuery;
74
- [ParameterType.DefaultParameter]: RParameter;
75
68
  [FilterType.DefaultFilter]: RFilter;
76
69
  }
77
70
  export interface DomainDocumentCapabilityMetadata {
78
71
  source: SourceKind | 'component-sfc' | null;
79
72
  program: ProgramEntityType | null;
80
73
  runtime: RuntimeEntityType | null;
74
+ metadata: DocumentMetadataBacking | null;
81
75
  }
82
76
  export interface DomainDocumentPersistenceDescriptor {
83
77
  collection: EndgeDomainCollection;
@@ -2,7 +2,6 @@ import { DomainDocumentType } from '../types/document/document.types';
2
2
  /** Явные Domain lookup-зависимости чистой сериализации persisted-документа. */
3
3
  export interface DocumentSerializationContext {
4
4
  resolveFolderIdentity: (value: string | number) => string | null;
5
- resolveEnvironmentIdentity: (value: string | number) => string | null;
6
5
  }
7
6
  /** Преобразует persisted-модель Core в строгий write DTO service-backend. */
8
7
  export declare function serializeServiceDocument(documentType: DomainDocumentType, source: unknown, context: DocumentSerializationContext): Record<string, unknown>;
@@ -14,5 +14,4 @@ export declare class RComponentBase extends REntity {
14
14
  inputFields: Record<string, RField>;
15
15
  /** Сохранённый legacy source настройки. Он хранится только для просмотра. */
16
16
  setupScript: string;
17
- runtimeFilters: string[];
18
17
  }
@@ -1,5 +1,5 @@
1
1
  import { DuplicateOptions, REntity } from './REntity';
2
- export declare const R_COMPOSITION_KINDS: readonly ["library", "query", "workspace", "tenant", "environment"];
2
+ export declare const R_COMPOSITION_KINDS: readonly ["library", "query", "workspace"];
3
3
  export type RCompositionKind = typeof R_COMPOSITION_KINDS[number];
4
4
  export declare function normalizeRCompositionKind(value: unknown): RCompositionKind;
5
5
  export declare function normalizeRCompositionKindIdentity(value: unknown): string | null;
@@ -17,6 +17,8 @@ export declare class REntity<TId extends string | number = number> {
17
17
  description: string | null;
18
18
  /** Id папки, в которой расположен документ (связь по id). */
19
19
  folderId?: string | number | null;
20
+ /** Id папки в свободной Workspace-проекции. */
21
+ workspaceFolderId?: string | number | null;
20
22
  /** Кто управляет жизненным циклом документа. */
21
23
  managedBy: ManagedBy;
22
24
  /** Источник effective entity; только storage-сущности сохраняются и экспортируются. */
@@ -0,0 +1,14 @@
1
+ import { EndgeDocumentServerState } from '../types/document/domain-snapshot.type';
2
+ import { REntity } from './REntity';
3
+ /** Persisted authoring definition of a dynamic configuration facet. */
4
+ export declare class RFacet extends REntity<string | number> {
5
+ /** Optimistic-lock and audit state returned only by a live persistence provider. */
6
+ serverState: EndgeDocumentServerState | null;
7
+ icon: string;
8
+ color: string;
9
+ position: number;
10
+ /** Server-computed number of active documents in this facet. */
11
+ documentCount: number;
12
+ static fromPlain(input: Record<string, unknown>): RFacet;
13
+ toPlain(): Record<string, unknown>;
14
+ }
@@ -0,0 +1,12 @@
1
+ import { EndgeConfigurationContribution } from '../../configuration/domain/types/configuration.type';
2
+ import { EndgeDocumentServerState } from '../types/document/domain-snapshot.type';
3
+ import { REntity } from './REntity';
4
+ /** Persisted contribution document whose identity is scoped by facetIdentity. */
5
+ export declare class RFacetDocument extends REntity<string | number> {
6
+ /** Optimistic-lock and audit state returned only by a live persistence provider. */
7
+ serverState: EndgeDocumentServerState | null;
8
+ facetIdentity: string;
9
+ configuration: EndgeConfigurationContribution;
10
+ static fromPlain(input: Record<string, unknown>): RFacetDocument;
11
+ toPlain(): Record<string, unknown>;
12
+ }
@@ -7,10 +7,15 @@ import { REntity } from './REntity';
7
7
  * - из plain-domain-формата (schema)
8
8
  */
9
9
  export declare class RFolder extends REntity {
10
+ /** Проекция, которой принадлежит папка. */
11
+ scope: 'collection' | 'workspace';
10
12
  /** Тип сущностей, для которых предназначена папка (canonical collection slug). */
11
13
  entityType: string | null;
12
14
  /** Id родительской папки (null если корень). */
13
15
  parent: string | number | null;
16
+ /** Опциональное пользовательское оформление Workspace-папки. */
17
+ icon: string | null;
18
+ color: string | null;
14
19
  /** Загружает папку из plain-schema (schema.toPlain()) */
15
20
  static fromPlain(json: any): RFolder;
16
21
  /** Экспорт только схемы (parent уже id в plain). */
@@ -1,10 +1,12 @@
1
1
  import { EndgeConfiguration } from '../../configuration/domain/types/configuration.type';
2
- import { EndgeDataMode, EndgeWorkspaceDefinition, WorkspaceIntegrationReference } from '../../workspace/domain/workspace.types';
2
+ import { EndgeDataMode, EndgeWorkspaceDefinition, EndgeWorkspaceDocumentStructure, WorkspaceIntegrationReference } from '../../workspace/domain/workspace.types';
3
3
  import { REntity } from './REntity';
4
4
  /** Сохранённый корень Workspace с одним полным документом конфигурации. */
5
5
  export declare class RWorkspace extends REntity implements EndgeWorkspaceDefinition {
6
6
  displayName: string;
7
7
  dataMode: EndgeDataMode;
8
+ documentStructure: EndgeWorkspaceDocumentStructure;
9
+ startupCompositionIdentity: string | null;
8
10
  configuration: EndgeConfiguration;
9
11
  installedIntegrations: WorkspaceIntegrationReference[];
10
12
  static fromPlain(input: unknown): RWorkspace;
@@ -1,18 +1,28 @@
1
- export type EndgeProjectId = string;
2
- export type EndgeEnvId = string;
3
- export type EndgeTenantId = string;
1
+ export type EndgeFacetId = string;
2
+ export type EndgeFacetDocumentId = string;
4
3
  export type EndgeFolderId = string;
5
4
  export type EndgeTypeId = string;
6
5
  export type EndgeQueryId = string;
6
+ export type EndgeDataViewId = string;
7
+ export type EndgeCompositionId = string;
8
+ export type EndgeStoreId = string;
9
+ export type EndgeStreamId = string;
10
+ export type EndgeSimulationId = string;
11
+ export type EndgeUpdateId = string;
12
+ export type EndgeMockId = string;
7
13
  export type EndgeComponentId = string;
14
+ export type EndgeComponentSFCId = string;
8
15
  export type EndgeActionId = string;
9
16
  export type EndgeConverterId = string;
17
+ export type EndgeComputationId = string;
10
18
  export type EndgeIntegrationId = string;
11
19
  export type EndgePageTemplateId = string;
12
20
  export type EndgePageId = string;
13
21
  export type EndgeNavigationId = string;
14
- export type EndgeParameterId = string;
15
22
  export type EndgeFilterId = string;
16
23
  export type EndgePolicyId = string;
17
24
  export type EndgeStyleId = string;
25
+ export type EndgeConfigurationId = string;
18
26
  export type EndgeVocabId = string;
27
+ export type EndgeAuthProfileId = string;
28
+ export type EndgeI18nBundleId = string;
@@ -0,0 +1,38 @@
1
+ import { ProgramMetadataMap } from '../../../program/domain/types/program-metadata.types';
2
+ export type DocumentMetadataBacking = 'definition-property' | 'definition-declaration' | 'entity-meta';
3
+ export interface DocumentMetadataInput {
4
+ source?: string | null;
5
+ meta?: Record<string, unknown> | null;
6
+ }
7
+ export interface DocumentMetadataDiagnostic {
8
+ severity: 'info' | 'warning' | 'error';
9
+ code: string;
10
+ message: string;
11
+ sourcePath?: string;
12
+ start?: number;
13
+ end?: number;
14
+ }
15
+ /** Единая read-модель пользовательских metadata документа независимо от backing. */
16
+ export interface DocumentMetadataProjection {
17
+ backing: DocumentMetadataBacking | null;
18
+ mode: 'missing' | 'static' | 'invalid' | 'duplicate';
19
+ editable: boolean;
20
+ metadata: ProgramMetadataMap;
21
+ json: string;
22
+ sourceRange: {
23
+ start: number;
24
+ end: number;
25
+ } | null;
26
+ diagnostics: DocumentMetadataDiagnostic[];
27
+ message?: string;
28
+ }
29
+ /** Результат узкого metadata patch с сохранением второго backing без изменений. */
30
+ export interface DocumentMetadataPatchResult {
31
+ ok: boolean;
32
+ source: string;
33
+ meta: Record<string, unknown>;
34
+ changed: boolean;
35
+ projection: DocumentMetadataProjection;
36
+ diagnostics: DocumentMetadataDiagnostic[];
37
+ message?: string;
38
+ }
@@ -6,7 +6,6 @@ import { RComputation } from '../../entities/RComputation';
6
6
  import { RConfiguration } from '../../entities/RConfiguration';
7
7
  import { RConverter } from '../../entities/RConverter';
8
8
  import { RDataView } from '../../entities/RDataView';
9
- import { REnvironment } from '../../entities/REnvironment';
10
9
  import { RFilter } from '../../entities/RFilter';
11
10
  import { RI18nBundle } from '../../entities/RI18nBundle';
12
11
  import { RIntegration } from '../../entities/RIntegration';
@@ -14,15 +13,12 @@ import { RMock } from '../../entities/RMock';
14
13
  import { RNavigation } from '../../entities/RNavigation';
15
14
  import { RPage } from '../../entities/RPage';
16
15
  import { RPageTemplate } from '../../entities/RPageTemplate';
17
- import { RParameter } from '../../entities/RParameter';
18
16
  import { RPolicy } from '../../entities/RPolicy';
19
- import { RProject } from '../../entities/RProject';
20
17
  import { RQuery } from '../../entities/RQuery';
21
18
  import { RSimulation } from '../../entities/RSimulation';
22
19
  import { RStore } from '../../entities/RStore';
23
20
  import { RStream } from '../../entities/RStream';
24
21
  import { RStyle } from '../../entities/RStyle';
25
- import { RTenant } from '../../entities/RTenant';
26
22
  import { RType } from '../../entities/RType';
27
23
  import { RUpdate } from '../../entities/RUpdate';
28
24
  import { RVocabs } from '../../entities/RVocabs';
@@ -39,10 +35,6 @@ export declare enum ComponentType {
39
35
  Table = "component-table",
40
36
  SFC = "component-sfc"
41
37
  }
42
- /** Тип документа «Параметр» (коллекция parameters). */
43
- export declare enum ParameterType {
44
- DefaultParameter = "default-parameter"
45
- }
46
38
  /** Тип документа «Фильтр» (коллекция filters). */
47
39
  export declare enum FilterType {
48
40
  DefaultFilter = "default-filter"
@@ -59,6 +51,7 @@ export declare enum QueryType {
59
51
  * Вариации секций домена.
60
52
  */
61
53
  export declare enum DomainSectionType {
54
+ Workspace = "workspace",
62
55
  Primitive = "primitive",
63
56
  Type = "type",
64
57
  Component = "component",
@@ -74,10 +67,7 @@ export declare enum DomainSectionType {
74
67
  Converter = "converter",
75
68
  Computation = "computation",
76
69
  Integration = "integration",
77
- Parameters = "parameters",
78
70
  Filters = "filters",
79
- Environment = "environment",
80
- Tenant = "tenant",
81
71
  Policy = "policy",
82
72
  Style = "style",
83
73
  Configuration = "configuration",
@@ -86,11 +76,10 @@ export declare enum DomainSectionType {
86
76
  Navigation = "navigation",
87
77
  Vocabs = "vocabs",
88
78
  I18nBundles = "i18n-bundles",
89
- AuthProfile = "auth-profile",
90
- Project = "project"
79
+ AuthProfile = "auth-profile"
91
80
  }
92
81
  /** Канонический исчерпывающий список типов документов Domain. */
93
- export declare const DOMAIN_DOCUMENT_TYPES: readonly ["primitive", "type", "action", "converter", "computation", "data-view", "composition", "store", "stream", "simulation", "update", "mock", "integration", "page-template", "page", "navigation", "environment", "policy", "style", "configuration", "vocabs", "i18n-bundles", "auth-profile", "tenant", "project", "workspace", ComponentType.DSL, ComponentType.Table, ComponentType.SFC, QueryType.Custom, QueryType.GraphQL, QueryType.REST, ParameterType, FilterType];
82
+ export declare const DOMAIN_DOCUMENT_TYPES: readonly ["primitive", "type", "action", "converter", "computation", "data-view", "composition", "store", "stream", "simulation", "update", "mock", "integration", "page-template", "page", "navigation", "policy", "style", "configuration", "vocabs", "i18n-bundles", "auth-profile", "workspace", ComponentType.DSL, ComponentType.Table, ComponentType.SFC, QueryType.Custom, QueryType.GraphQL, QueryType.REST, FilterType];
94
83
  /** Все возможные типы документов. */
95
84
  export type DomainDocumentType = (typeof DOMAIN_DOCUMENT_TYPES)[number];
96
85
  /**
@@ -104,4 +93,4 @@ export interface Document {
104
93
  /**
105
94
  * Описывает любой документ рефлекцию
106
95
  */
107
- export type RDocument = RComponent | RComponentSFC | RQuery | RDataView | RComposition | RStore | RStream | RSimulation | RUpdate | RMock | RAction | RConverter | RComputation | RIntegration | RParameter | RFilter | RPolicy | RStyle | RConfiguration | RType | RVocabs | RI18nBundle | RAuthProfile | RWorkspace | RTenant | RProject | REnvironment | RPageTemplate | RPage | RNavigation;
96
+ export type RDocument = RComponent | RComponentSFC | RQuery | RDataView | RComposition | RStore | RStream | RSimulation | RUpdate | RMock | RAction | RConverter | RComputation | RIntegration | RFilter | RPolicy | RStyle | RConfiguration | RType | RVocabs | RI18nBundle | RAuthProfile | RWorkspace | RPageTemplate | RPage | RNavigation;
@@ -3,7 +3,8 @@ import { EndgeWorkspaceDefinition } from '../../../workspace/domain/workspace.ty
3
3
  export type EndgeWorkspaceExport = EndgeWorkspaceDefinition;
4
4
  /** Persisted-срез домена, который можно восстановить через plain provider. */
5
5
  export interface EndgeDomainPlain {
6
- projects: unknown[];
6
+ facets: unknown[];
7
+ facetDocuments: unknown[];
7
8
  types: unknown[];
8
9
  queries: unknown[];
9
10
  dataViews: unknown[];
@@ -20,10 +21,7 @@ export interface EndgeDomainPlain {
20
21
  computations: unknown[];
21
22
  integrations: unknown[];
22
23
  folders: unknown[];
23
- parameters: unknown[];
24
24
  filters: unknown[];
25
- environments: unknown[];
26
- tenants: unknown[];
27
25
  policies: unknown[];
28
26
  styles: unknown[];
29
27
  configurations: unknown[];
@@ -36,9 +34,8 @@ export interface EndgeDomainPlain {
36
34
  }
37
35
  /** Коллекции документов канонического snapshot нового backend-сервиса. */
38
36
  export interface EndgePortableDocuments {
39
- 'projects': unknown[];
40
- 'tenants': unknown[];
41
- 'environments': unknown[];
37
+ 'facets': unknown[];
38
+ 'facet-documents': unknown[];
42
39
  'folders': unknown[];
43
40
  'types': unknown[];
44
41
  'queries': unknown[];