@elyx-code/project-logic-tree 0.0.6388 → 0.0.6390

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/index.d.ts CHANGED
@@ -14,6 +14,7 @@ import { ILiveMessageDTO } from '@elyx-code/definitions';
14
14
  import { InfrastructureResourceDetails } from '@elyx-code/definitions';
15
15
  import { InfrastructureResourceType } from '@elyx-code/definitions';
16
16
  import { IPublication } from '@elyx-code/definitions';
17
+ import { IWebsocketsClient } from '@elyx-code/common-ts-utils';
17
18
  import { JoinExpr } from 'sql-parser-cst';
18
19
  import { Keyword } from 'sql-parser-cst';
19
20
  import { LimitClause } from 'sql-parser-cst';
@@ -542,6 +543,11 @@ export declare enum BaseEntityNames {
542
543
  KEY_VALUE_PARAM = "BUILT_IN_KEY_VALUE_PARAM_ENTITY"
543
544
  }
544
545
 
546
+ export declare class BaseRegisteredExtension {
547
+ readonly registry: ExtensionsRegistry;
548
+ constructor(registry: ExtensionsRegistry);
549
+ }
550
+
545
551
  export declare abstract class BaseState extends SharedStateFunctionality implements IGenericBase {
546
552
  abstract id: EntityId;
547
553
  abstract version: EntityVersion;
@@ -1464,7 +1470,45 @@ export declare enum BuiltInFunctionIds {
1464
1470
  AbortExecution = "base-abort-execution"
1465
1471
  }
1466
1472
 
1467
- export declare type BuiltInFunctionsImplementationModule = Record<BuiltInFunctionIds, (entity: InternalCallState, inputs: IDynamicValue[]) => Promise<IExecutionResult>>;
1473
+ export declare class BuiltInFunctionImplementationAbortExecutionModule extends BaseRegisteredExtension implements IRegisteredExtension<BuiltInFunctionImplementationModule> {
1474
+ manifest: ExtensionManifest;
1475
+ module: {
1476
+ main: (entity: InternalCallState, _inputs: IDynamicValue[]) => Promise<{
1477
+ value: ExecutionTerminationType;
1478
+ entity: InternalCallState;
1479
+ error: null;
1480
+ results: never[];
1481
+ }>;
1482
+ };
1483
+ }
1484
+
1485
+ export declare class BuiltInFunctionImplementationDeletePersistedEntityModule extends BaseRegisteredExtension implements IRegisteredExtension<BuiltInFunctionImplementationModule> {
1486
+ manifest: ExtensionManifest;
1487
+ module: {
1488
+ main: (entity: InternalCallState, _inputs: IDynamicValue[]) => Promise<{
1489
+ value: ExecutionTerminationType;
1490
+ entity: InternalCallState;
1491
+ error: null;
1492
+ results: never[];
1493
+ }>;
1494
+ };
1495
+ }
1496
+
1497
+ export declare interface BuiltInFunctionImplementationModule {
1498
+ main: (entity: InternalCallState, _inputs: IDynamicValue[]) => Promise<IExecutionResult>;
1499
+ }
1500
+
1501
+ export declare class BuiltInFunctionImplementationSavePersistedEntityModule extends BaseRegisteredExtension implements IRegisteredExtension<BuiltInFunctionImplementationModule> {
1502
+ manifest: ExtensionManifest;
1503
+ module: {
1504
+ main: (entity: InternalCallState, _inputs: IDynamicValue[]) => Promise<{
1505
+ value: ExecutionTerminationType;
1506
+ entity: InternalCallState;
1507
+ error: null;
1508
+ results: never[];
1509
+ }>;
1510
+ };
1511
+ }
1468
1512
 
1469
1513
  export declare type BuiltInSystemEntityState = PrimitiveEntityState | BuiltInBaseEntityState;
1470
1514
 
@@ -2490,11 +2534,76 @@ export declare const DEFAULT_BASE_EXTENSIONS_CONTEXT: IBaseExtensionsContext;
2490
2534
 
2491
2535
  export declare const DEFAULT_EXECUTION_INSTANCE_PARENT_CONTEXT: IExecutionInstanceParentContext;
2492
2536
 
2537
+ export declare const DEFAULT_MODULE_IDS: {
2538
+ UUID: string;
2539
+ SEARCH_NODE_IMPLEMENTATION: string;
2540
+ BUILT_IN_FUNCTION_IMPLEMENTATIONS__ABORT_EXECUTION: string;
2541
+ BUILT_IN_FUNCTION_IMPLEMENTATIONS__SAVE_PERSISTED_ENTITY: string;
2542
+ BUILT_IN_FUNCTION_IMPLEMENTATIONS__DELETE_PERSISTED_ENTITY: string;
2543
+ BUILT_INT_OPERATIONS_IMPLEMENTATIONS__HTTP_REQUEST: string;
2544
+ BUILT_INT_OPERATIONS_IMPLEMENTATIONS__VALIDATE_ENTITY: string;
2545
+ BUILT_INT_OPERATIONS_IMPLEMENTATIONS__CREATE_NEW_INSTANCE: string;
2546
+ BUILT_INT_OPERATIONS_IMPLEMENTATIONS__EXECUTE_SEQUENTIAL: string;
2547
+ BUILT_INT_OPERATIONS_IMPLEMENTATIONS__EXECUTE_PARALLEL: string;
2548
+ BUILT_INT_OPERATIONS_IMPLEMENTATIONS__EXECUTE_WAIT: string;
2549
+ BUILT_INT_OPERATIONS_IMPLEMENTATIONS__LIST_JOIN: string;
2550
+ BUILT_INT_OPERATIONS_IMPLEMENTATIONS__LIST_SPLIT: string;
2551
+ BUILT_INT_OPERATIONS_IMPLEMENTATIONS__LIST_DELETE_LAST: string;
2552
+ BUILT_INT_OPERATIONS_IMPLEMENTATIONS__LIST_DELETE_FIRST: string;
2553
+ BUILT_INT_OPERATIONS_IMPLEMENTATIONS__LIST_DELETE_INDEX: string;
2554
+ BUILT_INT_OPERATIONS_IMPLEMENTATIONS__LIST_ADD_INDEX: string;
2555
+ BUILT_INT_OPERATIONS_IMPLEMENTATIONS__LIST_REPLACE_FIRST: string;
2556
+ BUILT_INT_OPERATIONS_IMPLEMENTATIONS__LIST_REPLACE_LAST: string;
2557
+ BUILT_INT_OPERATIONS_IMPLEMENTATIONS__LIST_REPLACE_INDEX: string;
2558
+ BUILT_INT_OPERATIONS_IMPLEMENTATIONS__LIST_GET_INDEX_ITEM: string;
2559
+ BUILT_INT_OPERATIONS_IMPLEMENTATIONS__LIST_GET_FIRST: string;
2560
+ BUILT_INT_OPERATIONS_IMPLEMENTATIONS__LIST_GET_LAST: string;
2561
+ BUILT_INT_OPERATIONS_IMPLEMENTATIONS__LIST_APPEND: string;
2562
+ BUILT_INT_OPERATIONS_IMPLEMENTATIONS__LIST_PREPEND: string;
2563
+ BUILT_INT_OPERATIONS_IMPLEMENTATIONS__LIST_REVERSE: string;
2564
+ BUILT_INT_OPERATIONS_IMPLEMENTATIONS__STRING_TO_LOWER_CASE: string;
2565
+ BUILT_INT_OPERATIONS_IMPLEMENTATIONS__STRING_TO_UPPER_CASE: string;
2566
+ BUILT_INT_OPERATIONS_IMPLEMENTATIONS__STRING_JOIN: string;
2567
+ BUILT_INT_OPERATIONS_IMPLEMENTATIONS__STRING_SPLIT: string;
2568
+ BUILT_INT_OPERATIONS_IMPLEMENTATIONS__STRING_DELETE_LAST: string;
2569
+ BUILT_INT_OPERATIONS_IMPLEMENTATIONS__STRING_DELETE_FIRST: string;
2570
+ BUILT_INT_OPERATIONS_IMPLEMENTATIONS__STRING_DELETE_INDEX: string;
2571
+ BUILT_INT_OPERATIONS_IMPLEMENTATIONS__STRING_ADD_INDEX: string;
2572
+ BUILT_INT_OPERATIONS_IMPLEMENTATIONS__STRING_REPLACE_FIRST: string;
2573
+ BUILT_INT_OPERATIONS_IMPLEMENTATIONS__STRING_REPLACE_LAST: string;
2574
+ BUILT_INT_OPERATIONS_IMPLEMENTATIONS__STRING_REPLACE_INDEX: string;
2575
+ BUILT_INT_OPERATIONS_IMPLEMENTATIONS__STRING_REPLACE_SINGLE_MATCH: string;
2576
+ BUILT_INT_OPERATIONS_IMPLEMENTATIONS__STRING_REPLACE_ALL_MATCHES: string;
2577
+ BUILT_INT_OPERATIONS_IMPLEMENTATIONS__STRING_GET_INDEX_ITEM: string;
2578
+ BUILT_INT_OPERATIONS_IMPLEMENTATIONS__STRING_GET_FIRST: string;
2579
+ BUILT_INT_OPERATIONS_IMPLEMENTATIONS__STRING_GET_LAST: string;
2580
+ BUILT_INT_OPERATIONS_IMPLEMENTATIONS__STRING_GET_INDEX_OF: string;
2581
+ BUILT_INT_OPERATIONS_IMPLEMENTATIONS__STRING_APPEND: string;
2582
+ BUILT_INT_OPERATIONS_IMPLEMENTATIONS__STRING_PREPEND: string;
2583
+ BUILT_INT_OPERATIONS_IMPLEMENTATIONS__STRING_REVERSE: string;
2584
+ BUILT_INT_OPERATIONS_IMPLEMENTATIONS__NUMBER_ADDITION: string;
2585
+ BUILT_INT_OPERATIONS_IMPLEMENTATIONS__NUMBER_SUBTRACTION: string;
2586
+ BUILT_INT_OPERATIONS_IMPLEMENTATIONS__NUMBER_MULTIPLICATION: string;
2587
+ BUILT_INT_OPERATIONS_IMPLEMENTATIONS__NUMBER_DIVISION: string;
2588
+ BUILT_INT_OPERATIONS_IMPLEMENTATIONS__NUMBER_REMAINDER: string;
2589
+ BUILT_INT_OPERATIONS_IMPLEMENTATIONS__NUMBER_EXPONENTIATION: string;
2590
+ BUILT_INT_OPERATIONS_IMPLEMENTATIONS__RANDOMNESS_GENERATE_RANDOM_INTEGER: string;
2591
+ BUILT_INT_OPERATIONS_IMPLEMENTATIONS__RANDOMNESS_GENERATE_RANDOM_FLOAT: string;
2592
+ BUILT_INT_OPERATIONS_IMPLEMENTATIONS__RANDOMNESS_GENERATE_RANDOM_HEXADECIMAL: string;
2593
+ BUILT_INT_OPERATIONS_IMPLEMENTATIONS__RANDOMNESS_GENERATE_RANDOM_BASE62: string;
2594
+ BUILT_INT_OPERATIONS_IMPLEMENTATIONS__RANDOMNESS_GENERATE_RANDOM_BASE64: string;
2595
+ BUILT_INT_OPERATIONS_IMPLEMENTATIONS__RANDOMNESS_GENERATE_RANDOM_ALPHANUMERIC: string;
2596
+ BUILT_INT_OPERATIONS_IMPLEMENTATIONS__RANDOMNESS_GENERATE_IDENTIFIER: string;
2597
+ BUILT_INT_OPERATIONS_IMPLEMENTATIONS__RANDOMNESS_GENERATE_RANDOM_UUIDV4: string;
2598
+ BUILT_INT_OPERATIONS_IMPLEMENTATIONS__RANDOMNESS_GENERATE_SHORT_IDENTIFIER: string;
2599
+ BUILT_INT_OPERATIONS_IMPLEMENTATIONS__RANDOMNESS_GENERATE_HEXADECIMAL_TOKEN: string;
2600
+ };
2601
+
2493
2602
  export declare const DEFAULT_PROJECT_INSTANCE_PARENT_CONTEXT: IProjectInstanceParentContext;
2494
2603
 
2495
2604
  export declare const DEFAULT_PROJECT_STATIC_PARENT_CONTEXT: IProjectStaticParentContext;
2496
2605
 
2497
- export declare const DEFAULT_UUID_MODULE: UUIDModule;
2606
+ export declare const DEFAULT_UUID_MODULE: IUUIDModule;
2498
2607
 
2499
2608
  export declare enum DefinitionEntityDependencyField {
2500
2609
  Extends = "extends",
@@ -2824,8 +2933,43 @@ export declare enum DynamicValueTypes {
2824
2933
 
2825
2934
  export declare const EDITABLE_PERSISTANCE_REPOSITORY_DEFAULTS: IEditableEntityPersistanceRepository;
2826
2935
 
2827
- export declare interface EditorContext extends ExtensionContextBase {
2828
- logic: ProjectLogicContext;
2936
+ export declare class EditorContext extends ExtensionContextBase implements Omit<IEditor, 'onLogicLoadingComplete' | 'onLogicLoadingCompleteCallback' | 'onProjectHeadLoaded' | 'onProjectHeadLoadedCallback' | 'onProjectSetupError' | 'onProjectSetupErrorCallback' | 'extensions' | 'onRenderedCallback' | 'handleIncommingWebsocketMessage' | 'handleNotificationChannelsMessage' | 'handlePersistChangeSetMessage' | 'getLogic' | 'injectLocalImplementationOfSearchExecution' | 'setup' | 'destroy' | 'requestModule' | 'socket' | 'events'> {
2937
+ private readonly _editor;
2938
+ readonly id: string;
2939
+ constructor(registry: ExtensionsRegistry, _editor: IEditor, id?: string);
2940
+ get ready(): boolean;
2941
+ get hasLoadedLogic(): boolean;
2942
+ get destroyed(): boolean;
2943
+ get logicLoadingPromise(): Promise<void> | null;
2944
+ get logic(): ProjectState | null;
2945
+ get branch(): IActiveBranchHeadResult | null;
2946
+ get projectId(): EntityId;
2947
+ get sessionId(): string | null;
2948
+ get userAuthorId(): string;
2949
+ get peerConnections(): Record<string, IChannelConnections>;
2950
+ get test(): ITest | null;
2951
+ get localTestValues(): EfimeralValueStore;
2952
+ get resolvedValues(): EfimeralValueStore;
2953
+ get persistedExecutionResults(): EfimeralValueStore;
2954
+ get publication(): PublicationRun | null;
2955
+ get execution(): Execution | null;
2956
+ get project(): ProjectState;
2957
+ get lastExecutionResults(): EfimeralValueStore;
2958
+ get undoableStackValueIndex(): number;
2959
+ set undoableStackValueIndex(value: number);
2960
+ get PROJECT_NOTIFICATIONS_CHANNEL(): string;
2961
+ getAccessToken(): Promise<string | null>;
2962
+ removeValueByOwnerId(entityId: EntityId): void;
2963
+ removeValue(dynamicValue: IDynamicValue): void;
2964
+ undo(): Promise<void>;
2965
+ redo(): Promise<void>;
2966
+ initTest(entryPoint: TestableEntityState, autoExecute: boolean): Promise<ITest>;
2967
+ removeTest(): Promise<void>;
2968
+ copyEntities(entities: CanvasEntityState[]): Promise<ChangeSet>;
2969
+ resolveInitialChildrenPositions(parent: CanvasEntityState | null, children: CanvasEntityState[], changeSet: ChangeSet | null): CanvasEntityState[];
2970
+ publish(): Promise<void>;
2971
+ loadActivePublication(publicationId: string): Promise<IPublication>;
2972
+ requestActiveDynamicValue(valueOwner: EntityWithValueState): IDynamicValue | null;
2829
2973
  }
2830
2974
 
2831
2975
  export declare class EfimeralValueStore implements IValueStoreClient {
@@ -3441,7 +3585,7 @@ export declare class ExplicitInfrastructureResource extends InfrastructureResour
3441
3585
  resolveDeterministicResourceId(): string;
3442
3586
  }
3443
3587
 
3444
- export declare type ExtensionContext = EditorContext;
3588
+ export declare type ExtensionContext = EditorContext | ProjectLogicContext;
3445
3589
 
3446
3590
  export declare class ExtensionContextBase implements IExtensionContextBase {
3447
3591
  readonly registry: ExtensionsRegistry;
@@ -3469,16 +3613,34 @@ export declare interface ExtensionManifest {
3469
3613
  dependencies?: string[];
3470
3614
  }
3471
3615
 
3472
- export declare type ExtensionModule<T extends object = {}> = T & ExtensionModuleCore;
3473
-
3474
- export declare interface ExtensionModuleCore {
3475
- /** Called once on editor startup */
3476
- init?(contexts: ExtensionContext[]): Promise<void> | void;
3477
- /** Cleanup hook */
3478
- destroy?(): Promise<void> | void;
3479
- }
3616
+ export declare type ExtensionModule<T extends object = {}> = T & IExtensionModuleCore;
3480
3617
 
3481
3618
  export declare enum ExtensionPermissions {
3619
+ All = "*",// Allow all permissions, not recommended for security reasons
3620
+ OnAll = "on:*",// Allow listening to any event
3621
+ EmitAll = "emit:*",// Allow emitting any event
3622
+ ReadAll = "read:*",// Allow reading any state
3623
+ WriteAll = "write:*",// Allow writing any state
3624
+ UpdateAll = "update:*",// Allow updating any state
3625
+ DoAll = "do:*",// Allow performing any action
3626
+ OnLogicAll = "on:logic:*",// Allow listening to any event in the logic context
3627
+ EmitLogicAll = "emit:logic:*",// Allow emitting any event in the logic context
3628
+ ReadLogicAll = "read:logic:*",// Allow reading any state in the logic context
3629
+ WriteLogicAll = "write:logic:*",// Allow writing any state in the logic context
3630
+ UpdateLogicAll = "update:logic:*",// Allow updating any state in the logic context
3631
+ DoLogicAll = "do:logic:*",// Allow performing any action in the logic context
3632
+ OnGUIAll = "on:gui:*",// Allow listening to any event in the GUI context
3633
+ EmitGUIAll = "emit:gui:*",// Allow emitting any event in the GUI context
3634
+ ReadGUIAll = "read:gui:*",// Allow reading any state in the GUI context
3635
+ WriteGUIAll = "write:gui:*",// Allow writing any state in the GUI context
3636
+ UpdateGUIAll = "update:gui:*",// Allow updating any state in the GUI context
3637
+ DoGUIAll = "do:gui:*",// Allow performing any action in the GUI context
3638
+ OnEditorAll = "on:editor:*",// Allow listening to any event in the editor context
3639
+ EmitEditorAll = "emit:editor:*",// Allow emitting any event in the editor context
3640
+ ReadEditorAll = "read:editor:*",// Allow reading any state in the editor context
3641
+ WriteEditorAll = "write:editor:*",// Allow writing any state in the editor context
3642
+ UpdateEditorAll = "update:editor:*",// Allow updating any state in the editor context
3643
+ DoEditorAll = "do:editor:*",// Allow performing any action in the editor context
3482
3644
  OnCompileBefore = "on:compile:before:DefinitionEntity",
3483
3645
  OnCompileDefault = "on:compile:default:DefinitionEntity",
3484
3646
  OnCompileAfter = "on:compile:after:DefinitionEntity",
@@ -3492,11 +3654,21 @@ export declare enum ExtensionPermissions {
3492
3654
  export declare class ExtensionsRegistry implements Omit<IEventsBus, 'destroy'> {
3493
3655
  private events;
3494
3656
  private extensions;
3657
+ onResolveEditorContextCallback: () => EditorContext | null;
3658
+ onResolveProjectLogicContextCallback: () => ProjectLogicContext | null;
3659
+ onResolveGUIContextCallback: () => null;
3660
+ onResolveCompileContextCallback: () => null;
3495
3661
  constructor(events?: Events);
3496
- get extensionInOrder(): RegisteredExtension[];
3662
+ onResolveEditorContext(callback: () => EditorContext | null): void;
3663
+ onResolveProjectLogicContext(callback: () => ProjectLogicContext | null): void;
3664
+ onResolveGUIContext(callback: () => null): void;
3665
+ onResolveCompileContext(callback: () => null): void;
3666
+ get extensionInOrder(): IRegisteredExtension[];
3667
+ setup(): Promise<void>;
3497
3668
  private requestContext;
3669
+ requestContexts(_module: IRegisteredExtension<any>, _contextTypes?: ExtensionContextType[]): ExtensionContext[];
3498
3670
  requestModule<T>(moduleId: string): T;
3499
- register(manifest: ExtensionManifest, module: ExtensionModule): void;
3671
+ register(extension: IRegisteredExtension<any>): void;
3500
3672
  initAll(): Promise<void>;
3501
3673
  destroyAll(): Promise<void>;
3502
3674
  on<Arguments extends any[]>(eventName: string, callback: EventCallback<Arguments>): void;
@@ -9336,6 +9508,7 @@ export declare interface IEditor extends IUndoableInterface, IValueResolutionCon
9336
9508
  branch: IActiveBranchHeadResult | null;
9337
9509
  projectId: EntityId;
9338
9510
  sessionId: string | null;
9511
+ userAuthorId: string;
9339
9512
  peerConnections: Record<string, IChannelConnections>;
9340
9513
  test: ITest | null;
9341
9514
  localTestValues: IValueStoreClient;
@@ -9347,7 +9520,6 @@ export declare interface IEditor extends IUndoableInterface, IValueResolutionCon
9347
9520
  extensions: ExtensionsRegistry;
9348
9521
  onProjectHeadLoadedCallback: null | ((projectState: ProjectState) => void);
9349
9522
  onLogicLoadingCompleteCallback: null | ((chunk: any) => void);
9350
- onRenderedCallback: null | (() => void);
9351
9523
  onProjectSetupErrorCallback: null | ((error: any) => void);
9352
9524
  get execution(): Execution | null;
9353
9525
  get project(): ProjectState;
@@ -9377,7 +9549,7 @@ export declare interface IEditor extends IUndoableInterface, IValueResolutionCon
9377
9549
  mockLogic?: ProjectState;
9378
9550
  }): Promise<void>;
9379
9551
  destroy(): Promise<void>;
9380
- initTest(entryPoint: DraggablePlayableEntityState, autoExecute: boolean): Promise<ITest>;
9552
+ initTest(entryPoint: TestableEntityState, autoExecute: boolean): Promise<ITest>;
9381
9553
  removeTest(): Promise<void>;
9382
9554
  copyEntities(entities: CanvasEntityState[]): Promise<ChangeSet>;
9383
9555
  resolveInitialChildrenPositions(parent: CanvasEntityState | null, children: CanvasEntityState[], changeSet: ChangeSet | null): CanvasEntityState[];
@@ -9465,6 +9637,13 @@ declare interface IExtensionContextBase extends Omit<IEventsBus, 'destroy'> {
9465
9637
  registry: ExtensionsRegistry;
9466
9638
  }
9467
9639
 
9640
+ export declare interface IExtensionModuleCore {
9641
+ /** Called once on editor startup */
9642
+ init?(contexts: ExtensionContext[]): Promise<void> | void;
9643
+ /** Cleanup hook */
9644
+ destroy?(): Promise<void> | void;
9645
+ }
9646
+
9468
9647
  export declare interface IFile extends IPrimitiveEntity {
9469
9648
  name: PrimitiveTypes.File;
9470
9649
  }
@@ -9851,11 +10030,6 @@ export declare interface ILoopTransfer extends ILoop_meta, IChildEntityTransfer,
9851
10030
  parent: EntityWithLogicScope | EntityWithLogicScopeReference | IProject | IProjectReference;
9852
10031
  }
9853
10032
 
9854
- export declare interface IModuleInjection {
9855
- id: string;
9856
- init(project: ProjectState): Promise<void> | void;
9857
- }
9858
-
9859
10033
  export declare function implement(self: DefinitionEntityState | BuiltInBaseEntityState, newEntityName: string, changeSet: ChangeSet | null, newId?: string): DefinitionEntityState;
9860
10034
 
9861
10035
  export declare class ImplicitGlobalInfrastructureResource extends InfrastructureResource {
@@ -10379,12 +10553,6 @@ export declare interface IOperationTransfer extends IBaseActionCallTransfer, IOp
10379
10553
  parent: EntityWithLogicScope | EntityWithLogicScopeReference | IProject | IProjectReference;
10380
10554
  }
10381
10555
 
10382
- export declare interface IOutgoingWSMessage<Type extends string = string, Payload = any> {
10383
- payload: Payload;
10384
- type: Type;
10385
- to?: string;
10386
- }
10387
-
10388
10556
  export declare interface IOutputMap extends IOutputMap_meta, IChildEntity, IValueWritingEntity {
10389
10557
  defaultValue: ILiteralValue | null;
10390
10558
  declaration: IReturnDeclaration | IValueDescriptor | IProperty;
@@ -10728,6 +10896,12 @@ export declare interface IRecordChangeSet<TSelf extends {
10728
10896
  seenEntities: EntityId[];
10729
10897
  }
10730
10898
 
10899
+ export declare interface IRegisteredExtension<T extends object = {}> {
10900
+ registry: ExtensionsRegistry;
10901
+ manifest: ExtensionManifest;
10902
+ module: ExtensionModule<T>;
10903
+ }
10904
+
10731
10905
  export declare interface IReturnDeclaration extends IReturnDeclaration_meta, IBaseVariable, IChildEntity, IValueReadingEntity {
10732
10906
  type: EntityType.ReturnDeclaration;
10733
10907
  constant: true;
@@ -10840,6 +11014,17 @@ declare interface ISearchNode {
10840
11014
  type: SearchStatementNodeType;
10841
11015
  }
10842
11016
 
11017
+ export declare interface ISearchNodeImplementationModule {
11018
+ main(_entity: SearchState, _inputs: IDynamicValue[]): Promise<{
11019
+ data: {
11020
+ [columnName: string]: any;
11021
+ } | null | {
11022
+ [columnName: string]: any;
11023
+ }[];
11024
+ error: string | null;
11025
+ }>;
11026
+ }
11027
+
10843
11028
  export declare interface ISearchReference extends IGenericReference {
10844
11029
  entityType: EntityType.Search;
10845
11030
  }
@@ -11134,6 +11319,12 @@ export declare interface IUUID extends IPrimitiveEntity {
11134
11319
  name: PrimitiveTypes.UUID;
11135
11320
  }
11136
11321
 
11322
+ export declare interface IUUIDModule {
11323
+ isBackup?: boolean;
11324
+ uuid: () => string;
11325
+ fromUUID: (uuid: string) => string;
11326
+ }
11327
+
11137
11328
  export declare interface IValueAutogeneration {
11138
11329
  type: ValueAutogenerationType;
11139
11330
  rangeStart: null | string | number | boolean | Date;
@@ -11421,47 +11612,6 @@ export declare interface IVersionMetadata {
11421
11612
  deleted: boolean;
11422
11613
  }
11423
11614
 
11424
- /**
11425
- * The minimal subset of the Node‑ws and the browser WebSocket API
11426
- * that you actually use in your editor.
11427
- */
11428
- export declare interface IWebSocketCommon {
11429
- /** readyState codes (both ws and browser expose these as static *and* instance props) */
11430
- readonly CONNECTING: number;
11431
- readonly OPEN: number;
11432
- readonly CLOSING: number;
11433
- readonly CLOSED: number;
11434
- /** The current state of the connection */
11435
- readonly readyState: number;
11436
- /** The URL used to establish the connection */
11437
- readonly url: string;
11438
- /** Subprotocol negotiated with the server, if any */
11439
- readonly protocol: string;
11440
- /** Bytes queued but not yet sent */
11441
- readonly bufferedAmount: number;
11442
- /** Send a message (string, binary, etc.) */
11443
- send(data: any): void;
11444
- /** Close the connection (code + reason both optional in both APIs) */
11445
- close(code?: number, reason?: string): void;
11446
- /**
11447
- * We only tap the four basic events in both environments.
11448
- * Node‑ws also implements addEventListener/removeEventListener,
11449
- * and the browser socket does too, so this matches both.
11450
- */
11451
- addEventListener(event: 'open' | 'message' | 'error' | 'close', listener: (ev: any) => void): void;
11452
- removeEventListener(event: 'open' | 'message' | 'error' | 'close', listener: (ev: any) => void): void;
11453
- /** Optional onX handlers on the instance */
11454
- onopen?: (ev: any) => void;
11455
- onmessage?: (ev: any) => void;
11456
- onerror?: (ev: any) => void;
11457
- onclose?: (ev: any) => void;
11458
- }
11459
-
11460
- export declare interface IWebsocketsClient extends Events {
11461
- connection: IWebSocketCommon;
11462
- send(message: any): void;
11463
- }
11464
-
11465
11615
  export declare const joinListOperation: IActionDescriptorTransfer;
11466
11616
 
11467
11617
  export declare const joinListOperationError: IValueDescriptorTransfer;
@@ -11570,13 +11720,12 @@ export declare enum ListOperations {
11570
11720
  ReplaceFirst = "list-replace-first",
11571
11721
  ReplaceLast = "list-replace-last",
11572
11722
  ReplaceIndex = "list-replace-index",
11573
- ReplaceSingleMatch = "list-replace-single-match",
11574
- ReplaceAllMatches = "list-replace-all-matches",
11575
- GetIndex = "list-get-index",
11723
+ GetIndexItem = "list-get-index-item",
11576
11724
  GetFirst = "list-get-first",
11577
11725
  GetLast = "list-get-last",
11578
11726
  Append = "list-append",
11579
- Prepend = "list-prepend"
11727
+ Prepend = "list-prepend",
11728
+ Reverse = "list-reverse"
11580
11729
  }
11581
11730
 
11582
11731
  export declare type LiteralValueAsType = IDefinitionEntity | IFunctionDeclaration | IOperation | IFunctionCall | IActionDescriptor | IBuiltInBaseEntity;
@@ -12915,7 +13064,7 @@ export declare class ProjectState extends VersionedState implements IProject, Us
12915
13064
  onDiscardChangeSetCallback: ((changeSet: ChangeSet) => void) | null;
12916
13065
  constructor(initialData: IProject | IProjectTransfer, parentContext?: IProjectInstanceParentContext);
12917
13066
  static parentContext: IProjectStaticParentContext;
12918
- static get UUID(): UUIDModule;
13067
+ static get UUID(): IUUIDModule;
12919
13068
  static sessionAuthor: string;
12920
13069
  static repository: IEditableEntityPersistanceRepository;
12921
13070
  static type: EntityType.Project;
@@ -12953,7 +13102,6 @@ export declare class ProjectState extends VersionedState implements IProject, Us
12953
13102
  self: UserManagedEntityState | null, autoclose?: boolean, autoCloseActionName?: string): ChangeSet;
12954
13103
  addChangeSet(changeSet: ChangeSet): ChangeSet;
12955
13104
  discardChangeSet(changeSet: ChangeSet | null): ProjectState;
12956
- inject(...injectedModules: IModuleInjection[]): Promise<ProjectState>;
12957
13105
  validateGeneratedUpdate(data: Partial<IProjectGenerationTarget>): {
12958
13106
  errors: EntityGenerationError[];
12959
13107
  modifiedData: Partial<IProjectGenerationTarget>;
@@ -13502,11 +13650,6 @@ export declare function rebaseStack<T = any>(undoableStackValueIndex: number, hi
13502
13650
 
13503
13651
  export declare type Reference = IGenericReference | IFunctionDeclarationReference | IInstalledProjectReference | IDataTypeReference | IVariableDeclarationReference | IVariableInstanceReference | IOperationReference | IDefinitionEntityReference | IPrimitiveEntityReference | IProjectReference | IGlobalEventReference | IFunctionDeclarationReference | IFunctionDeclarationReference | IPropertyReference | IFunctionCallReference | IArgumentDeclarationReference | IInputMapReference | IOutputMapReference | IReturnDeclarationReference | IConditionReference | IReturnStatementReference | IBreakStatementReference | IContinueStatementReference | ILoopReference | IActionDescriptorReference | ISearchReference | ILiteralValueReference | IBuiltInBaseEntityReference | IValueDescriptorReference | IInternalCallReference;
13504
13652
 
13505
- export declare interface RegisteredExtension<T extends object = {}> {
13506
- manifest: ExtensionManifest;
13507
- module: ExtensionModule<T>;
13508
- }
13509
-
13510
13653
  export declare const relationalDatabaseBuiltInBaseEntity: IBuiltInBaseEntityTransfer;
13511
13654
 
13512
13655
  export declare const relationalDatabaseBuiltInBaseEntityAutoscalingProperty: IPropertyTransfer;
@@ -13975,17 +14118,6 @@ export declare enum SearchDependencyField {
13975
14118
  Parent = "parent"
13976
14119
  }
13977
14120
 
13978
- export declare type SearchImplementationModule = {
13979
- searchImplementation: (entity: SearchState, inputs: IDynamicValue[]) => Promise<{
13980
- data: {
13981
- [columnName: string]: any;
13982
- } | null | {
13983
- [columnName: string]: any;
13984
- }[];
13985
- error: string | null;
13986
- }>;
13987
- };
13988
-
13989
14121
  declare enum SearchLiteralValueType {
13990
14122
  String = "string",
13991
14123
  Number = "number",
@@ -13994,6 +14126,20 @@ declare enum SearchLiteralValueType {
13994
14126
  Date = "date"
13995
14127
  }
13996
14128
 
14129
+ export declare class SearchNodeImplementationModule extends BaseRegisteredExtension implements IRegisteredExtension<ISearchNodeImplementationModule> {
14130
+ manifest: ExtensionManifest;
14131
+ module: {
14132
+ main: (_entity: SearchState, _inputs: IDynamicValue[]) => Promise<{
14133
+ data: {
14134
+ [columnName: string]: any;
14135
+ } | null | {
14136
+ [columnName: string]: any;
14137
+ }[];
14138
+ error: string | null;
14139
+ }>;
14140
+ };
14141
+ }
14142
+
13997
14143
  export declare type SearchPayloadUnion = SearchState | SearchTypesUnion;
13998
14144
 
13999
14145
  export declare class SearchState extends VersionedState implements ISearch, BaseState, UserManagedEntityStateTemplate, BaseCanvasDraggableState, CallableEntityClass, ChildEntityBaseClass, PassThroughCallableEntityClass {
@@ -14552,11 +14698,15 @@ export declare enum StringOperations {
14552
14698
  ReplaceIndex = "string-replace-index",
14553
14699
  ReplaceSingleMatch = "string-replace-single-match",
14554
14700
  ReplaceAllMatches = "string-replace-all-matches",
14555
- GetIndex = "string-get-index",
14701
+ GetIndexItem = "string-get-index-item",
14556
14702
  GetFirst = "string-get-first",
14557
14703
  GetLast = "string-get-last",
14704
+ GetIndexOf = "string-get-index-of",
14558
14705
  Append = "string-append",
14559
- Prepend = "string-prepend"
14706
+ Prepend = "string-prepend",
14707
+ Reverse = "string-reverse",
14708
+ ToLowerCase = "string-to-lower-case",
14709
+ ToUpperCase = "string-to-upper-case"
14560
14710
  }
14561
14711
 
14562
14712
  export declare const stringPrototype: IPrimitiveEntity;
@@ -14632,6 +14782,8 @@ export declare type TestableEntityState = ExecutableEntityState;
14632
14782
 
14633
14783
  export declare function toCamelCase(str: string): string;
14634
14784
 
14785
+ export declare function toEditorContext(registry: ExtensionsRegistry, editor: IEditor): EditorContext;
14786
+
14635
14787
  export declare function toEntityState(entity: string | EntityState | IGenericReference | Element_2 | ElementTransfer | ElementShallowTransfer | ElementGenerationTarget, project: ProjectState): EntityState | null;
14636
14788
 
14637
14789
  export declare function toKebabCase(str: string): string;
@@ -14640,6 +14792,8 @@ export declare function toLowerCaseKebabCase(str: string): string;
14640
14792
 
14641
14793
  export declare function toPascalCase(str: string): string;
14642
14794
 
14795
+ export declare function toProjectLogicContext(registry: ExtensionsRegistry, project: ProjectState): ProjectLogicContext;
14796
+
14643
14797
  export declare function transitionProjectVersion(from: ChangeSet | 'initial', to: ChangeSet | 'initial', project: ProjectState): IProjectVersionTransitionConfig;
14644
14798
 
14645
14799
  export declare function translateLogicErrorCode(error: EntityError): string;
@@ -14766,10 +14920,9 @@ export declare abstract class UserManagedEntityStateTemplate {
14766
14920
 
14767
14921
  export declare type UUIDAutogenerationOptions = IAutogenerationUniqueUUID;
14768
14922
 
14769
- export declare interface UUIDModule {
14770
- isBackup?: boolean;
14771
- uuid: () => string;
14772
- fromUUID: (uuid: string) => string;
14923
+ export declare class UUIDModule extends BaseRegisteredExtension implements IRegisteredExtension<IUUIDModule> {
14924
+ manifest: ExtensionManifest;
14925
+ module: IUUIDModule;
14773
14926
  }
14774
14927
 
14775
14928
  export declare const uuidPrototype: IPrimitiveEntity;