@adaas/a-utils 0.2.5 → 0.2.7

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.mts CHANGED
@@ -2463,13 +2463,13 @@ declare class A_Route<_TParams extends Record<string, any> = Record<string, any>
2463
2463
  toAFeatureExtension(extensionScope?: Array<string>): RegExp;
2464
2464
  }
2465
2465
 
2466
- type A_SignalConfig_Init = {
2466
+ type A_SignalConfig_Init<TSignals extends Array<A_Signal> = Array<A_Signal>> = {
2467
2467
  /**
2468
2468
  * An array defining the structure of the signal vector.
2469
2469
  *
2470
2470
  * Each entry corresponds to a signal component constructor.
2471
2471
  */
2472
- structure?: Array<A_TYPES__Entity_Constructor<A_Signal>>;
2472
+ structure?: A_Signal_TSignalsConstructors<TSignals>;
2473
2473
  /**
2474
2474
  * A string representation of the structure for easier DI resolution.
2475
2475
  * Each signal's constructor name is used to form this string.
@@ -2479,8 +2479,13 @@ type A_SignalConfig_Init = {
2479
2479
  stringStructure?: string;
2480
2480
  propagateSignals?: boolean;
2481
2481
  };
2482
- type A_SignalVector_Init<_TSignals extends Array<A_Signal> = Array<A_Signal>, _TVectorStructure extends Array<A_TYPES__Entity_Constructor<_TSignals[number]>> = Array<A_TYPES__Entity_Constructor<_TSignals[number]>>> = {
2483
- structure: _TVectorStructure;
2482
+ type A_Signal_TSignalsConstructors<T extends Array<A_Signal> = Array<A_Signal>> = T extends Array<infer U> ? U extends A_Signal ? A_TYPES__Entity_Constructor<U>[] : never : never;
2483
+ type A_SignalTValue<T extends A_Signal> = T extends A_Signal<infer U> ? U : never;
2484
+ type A_SignalTValueArray<T extends Array<A_Signal>> = {
2485
+ [K in keyof T]: T[K] extends A_Signal<infer U> ? U : never;
2486
+ };
2487
+ type A_SignalVector_Init<_TSignals extends Array<A_Signal> = Array<A_Signal>> = {
2488
+ structure: A_Signal_TSignalsConstructors<_TSignals>;
2484
2489
  values: _TSignals;
2485
2490
  };
2486
2491
  type A_SignalVector_Serialized = A_TYPES__Entity_Serialized & {
@@ -2488,6 +2493,12 @@ type A_SignalVector_Serialized = A_TYPES__Entity_Serialized & {
2488
2493
  values: Array<Record<string, any>>;
2489
2494
  } & A_TYPES__Entity_Serialized;
2490
2495
  type A_Signal_Init<T extends Record<string, any> = Record<string, any>> = {
2496
+ /**
2497
+ * Possible signal id
2498
+ *
2499
+ * [!] used for identification only, all properties will be participating in the hash calculation for deduplication
2500
+ */
2501
+ id?: Array<any>;
2491
2502
  /**
2492
2503
  * The signal name
2493
2504
  */
@@ -2518,7 +2529,6 @@ type A_Signal_Serialized<T extends Record<string, any> = Record<string, any>> =
2518
2529
  * such as monitoring systems, real-time dashboards, or stateful applications.
2519
2530
  */
2520
2531
  declare class A_Signal<_TSignalDataType extends Record<string, any> = Record<string, any>> extends A_Entity<A_Signal_Init<_TSignalDataType>, A_Signal_Serialized<_TSignalDataType>> {
2521
- data: _TSignalDataType;
2522
2532
  /**
2523
2533
  * Allows to define default data for the signal.
2524
2534
  *
@@ -2527,6 +2537,38 @@ declare class A_Signal<_TSignalDataType extends Record<string, any> = Record<str
2527
2537
  * @returns
2528
2538
  */
2529
2539
  static default(): Promise<A_Signal | undefined>;
2540
+ /**
2541
+ * The actual data carried by the signal.
2542
+ */
2543
+ data: _TSignalDataType;
2544
+ /**
2545
+ * Generates signal hash uses for comparison
2546
+ *
2547
+ * @param str
2548
+ */
2549
+ protected createHash(str?: string): string;
2550
+ protected createHash(str?: undefined): string;
2551
+ protected createHash(str?: Record<string, any>): string;
2552
+ protected createHash(str?: Array<any>): string;
2553
+ protected createHash(str?: number): string;
2554
+ protected createHash(str?: boolean): string;
2555
+ protected createHash(str?: null): string;
2556
+ protected createHash(map?: Map<any, any>): string;
2557
+ protected createHash(set?: Set<any>): string;
2558
+ /**
2559
+ * This method compares the current signal with another signal instance by deduplication ID
2560
+ * this id can be configured during initialization with the "id" property.
2561
+ *
2562
+ * example:
2563
+ * * const signalA = new A_Signal({ id: ['user-status', 'user123'], data: { status: 'online' } });
2564
+ * * const signalB = new A_Signal({ id: ['user-status', 'user123'], data: { status: 'offline' } });
2565
+ *
2566
+ * signalA.compare(signalB) // true because both signals have the same deduplication ID
2567
+ *
2568
+ * @param other
2569
+ * @returns
2570
+ */
2571
+ compare(other: A_Signal<_TSignalDataType>): boolean;
2530
2572
  fromJSON(serializedEntity: A_Signal_Serialized<_TSignalDataType>): void;
2531
2573
  fromNew(newEntity: A_Signal_Init<_TSignalDataType>): void;
2532
2574
  toJSON(): A_Signal_Serialized<_TSignalDataType>;
@@ -2542,7 +2584,7 @@ declare class A_Signal<_TSignalDataType extends Record<string, any> = Record<str
2542
2584
  * @template TSignalsConstructors - Array of signal constructor types (e.g., [typeof MySignal, typeof CustomSignal])
2543
2585
  * @template TSignals - Array of signal instances derived from constructors
2544
2586
  */
2545
- declare class A_SignalVector<TSignals extends Array<A_Signal> = Array<A_Signal>, TSignalsConstructors extends Array<A_TYPES__Entity_Constructor<A_Signal>> = TSignals extends Array<infer U> ? U extends A_Signal ? A_TYPES__Entity_Constructor<U>[] : never : never> extends A_Entity<A_SignalVector_Init<TSignals[number][], TSignalsConstructors>, A_SignalVector_Serialized> {
2587
+ declare class A_SignalVector<TSignals extends A_Signal[] = A_Signal[]> extends A_Entity<A_SignalVector_Init<TSignals>> {
2546
2588
  /**
2547
2589
  * The structure of the signal vector, defining the types of signals it contains.
2548
2590
  *
@@ -2551,13 +2593,17 @@ declare class A_SignalVector<TSignals extends Array<A_Signal> = Array<A_Signal>,
2551
2593
  *
2552
2594
  * [!] if not provided, it will be derived from the signals values.
2553
2595
  */
2554
- protected _structure?: TSignalsConstructors;
2596
+ protected _structure?: A_Signal_TSignalsConstructors<TSignals>;
2555
2597
  /**
2556
2598
  * It's actual vector Values of Signals like :
2557
2599
  * [UserActionSignal, UserMousePositionSignal, ExternalDependencySignal]
2558
2600
  */
2559
- protected _signals: TSignals[number][];
2560
- fromNew(newEntity: A_SignalVector_Init<TSignals[number][], TSignalsConstructors>): void;
2601
+ protected _signals: TSignals;
2602
+ constructor(values: TSignals, structure?: {
2603
+ [K in keyof TSignals]: TSignals[K] extends A_Signal ? A_TYPES__Entity_Constructor<TSignals[K]> : never;
2604
+ });
2605
+ constructor(serialized: A_SignalVector_Serialized);
2606
+ fromNew(newEntity: A_SignalVector_Init<TSignals>): void;
2561
2607
  /**
2562
2608
  * The structure of the signal vector, defining the types of signals it contains.
2563
2609
  *
@@ -2565,7 +2611,7 @@ declare class A_SignalVector<TSignals extends Array<A_Signal> = Array<A_Signal>,
2565
2611
  * [UserSignInSignal, UserStatusSignal, UserActivitySignal]
2566
2612
  *
2567
2613
  */
2568
- get structure(): TSignalsConstructors;
2614
+ get structure(): A_Signal_TSignalsConstructors<TSignals>;
2569
2615
  get length(): number;
2570
2616
  /**
2571
2617
  * Enables iteration over the signals in the vector.
@@ -2573,13 +2619,27 @@ declare class A_SignalVector<TSignals extends Array<A_Signal> = Array<A_Signal>,
2573
2619
  * @returns
2574
2620
  */
2575
2621
  [Symbol.iterator](): Iterator<TSignals[number]>;
2622
+ /**
2623
+ * Allows to match the current Signal Vector with another Signal Vector by comparing each signal in the structure.
2624
+ * This method returns true if all signals in the vector match the corresponding signals in the other vector.
2625
+ *
2626
+ * @param other
2627
+ * @returns
2628
+ */
2629
+ match(other: A_SignalVector<TSignals>): boolean;
2630
+ /**
2631
+ * This method should ensure that the current Signal Vector contains all signals from the provided Signal Vector.
2632
+ *
2633
+ * @param signal
2634
+ */
2635
+ contains(signal: A_SignalVector): boolean;
2576
2636
  /**
2577
2637
  * Checks if the vector contains a signal of the specified type.
2578
2638
  *
2579
2639
  * @param signal
2580
2640
  */
2581
2641
  has(signal: A_Signal): boolean;
2582
- has(signalConstructor: A_TYPES__Component_Constructor<A_Signal>): boolean;
2642
+ has(signalConstructor: A_TYPES__Entity_Constructor<A_Signal>): boolean;
2583
2643
  /**
2584
2644
  * Retrieves the signal of the specified type from the vector.
2585
2645
  *
@@ -2594,11 +2654,7 @@ declare class A_SignalVector<TSignals extends Array<A_Signal> = Array<A_Signal>,
2594
2654
  * @param structure - Optional structure to override the default ordering
2595
2655
  * @returns Array of signal instances in the specified order
2596
2656
  */
2597
- toVector<T extends Array<A_Signal> = TSignals>(structure?: {
2598
- [K in keyof T]: T[K] extends A_Signal ? A_TYPES__Entity_Constructor<T[K]> : never;
2599
- }): Promise<{
2600
- [K in keyof T]: T[K];
2601
- }>;
2657
+ toVector<T extends Array<A_Signal> = TSignals>(structure?: A_Signal_TSignalsConstructors<T>): Promise<T>;
2602
2658
  /**
2603
2659
  * Converts to Array of data of signals in the vector
2604
2660
  * Maintains the order specified in the structure/generic type
@@ -2606,11 +2662,7 @@ declare class A_SignalVector<TSignals extends Array<A_Signal> = Array<A_Signal>,
2606
2662
  * @param structure - Optional structure to override the default ordering
2607
2663
  * @returns Array of serialized signal data in the specified order
2608
2664
  */
2609
- toDataVector<T extends Array<A_Signal> = TSignals>(structure?: {
2610
- [K in keyof T]: T[K] extends A_Signal ? A_TYPES__Entity_Constructor<T[K]> : never;
2611
- }): Promise<{
2612
- [K in keyof T]: T[K] extends A_Signal<infer D> ? D | undefined : never;
2613
- }>;
2665
+ toDataVector<T extends A_Signal[] = TSignals>(structure?: A_Signal_TSignalsConstructors<T>): Promise<A_SignalTValueArray<T>>;
2614
2666
  /**
2615
2667
  * Converts to Object with signal constructor names as keys and their corresponding data values
2616
2668
  * Uses the structure ordering to ensure consistent key ordering
@@ -2921,4 +2973,4 @@ declare class A_StateMachineError extends A_Error {
2921
2973
  static readonly TransitionError = "A-StateMachine Transition Error";
2922
2974
  }
2923
2975
 
2924
- export { A_CONSTANTS__CONFIG_ENV_VARIABLES, A_CONSTANTS__CONFIG_ENV_VARIABLES_ARRAY, A_Channel, A_ChannelError, A_ChannelFeatures, A_ChannelRequest, A_ChannelRequestStatuses, A_Command, A_CommandError, A_CommandEvent, type A_CommandEvents, A_CommandFeatures, A_CommandTransitions, type A_Command_ExecutionContext, A_Command_Status, A_Config, A_ConfigError, A_ConfigLoader, A_Deferred, A_ExecutionContext, A_LOGGER_ANSI, A_LOGGER_COLORS, A_LOGGER_DEFAULT_LEVEL, A_LOGGER_DEFAULT_SCOPE_LENGTH, A_LOGGER_ENV_KEYS, A_LOGGER_FORMAT, A_LOGGER_SAFE_RANDOM_COLORS, A_LOGGER_TERMINAL, A_LOGGER_TIME_FORMAT, A_Logger, type A_LoggerColorName, A_LoggerEnvVariables, A_LoggerEnvVariablesArray, type A_LoggerEnvVariablesType, type A_LoggerLevel, A_Manifest, A_ManifestChecker, A_ManifestError, A_Memory, A_MemoryContext, type A_MemoryContextMeta, A_MemoryError, A_MemoryFeatures, type A_MemoryOperationContext, type A_MemoryOperationContextMeta, type A_MemoryOperations, type A_Memory_Storage, A_OperationContext, type A_Operation_Serialized, type A_Operation_Storage, A_Polyfill, A_Route, A_Schedule, A_ScheduleObject, A_Service, A_ServiceFeatures, A_Signal, A_SignalBus, A_SignalBusError, A_SignalBusFeatures, A_SignalConfig, type A_SignalConfig_Init, A_SignalState, A_SignalVector, type A_SignalVector_Init, type A_SignalVector_Serialized, type A_Signal_Init, type A_Signal_Serialized, A_StateMachine, A_StateMachineError, A_StateMachineFeatures, A_StateMachineTransition, type A_StateMachineTransitionParams, type A_StateMachineTransitionStorage, type A_TYPES__Command_Constructor, type A_TYPES__Command_Init, type A_TYPES__Command_Listener, type A_TYPES__Command_Serialized, type A_TYPES__ConfigContainerConstructor, type A_TYPES__ConfigENVVariables, A_TYPES__ConfigFeature, type A_UTILS_TYPES__ManifestQuery, type A_UTILS_TYPES__ManifestRule, type A_UTILS_TYPES__Manifest_AllowedComponents, type A_UTILS_TYPES__Manifest_ComponentLevelConfig, type A_UTILS_TYPES__Manifest_Init, type A_UTILS_TYPES__Manifest_MethodLevelConfig, type A_UTILS_TYPES__Manifest_Rules, type A_UTILS_TYPES__ScheduleObjectCallback, type A_UTILS_TYPES__ScheduleObjectConfig, ConfigReader, ENVConfigReader, FileConfigReader, type IbufferInterface, type IcryptoInterface, type Ifspolyfill, type IhttpInterface, type IhttpsInterface, type IpathInterface, type IprocessInterface, type IurlInterface };
2976
+ export { A_CONSTANTS__CONFIG_ENV_VARIABLES, A_CONSTANTS__CONFIG_ENV_VARIABLES_ARRAY, A_Channel, A_ChannelError, A_ChannelFeatures, A_ChannelRequest, A_ChannelRequestStatuses, A_Command, A_CommandError, A_CommandEvent, type A_CommandEvents, A_CommandFeatures, A_CommandTransitions, type A_Command_ExecutionContext, A_Command_Status, A_Config, A_ConfigError, A_ConfigLoader, A_Deferred, A_ExecutionContext, A_LOGGER_ANSI, A_LOGGER_COLORS, A_LOGGER_DEFAULT_LEVEL, A_LOGGER_DEFAULT_SCOPE_LENGTH, A_LOGGER_ENV_KEYS, A_LOGGER_FORMAT, A_LOGGER_SAFE_RANDOM_COLORS, A_LOGGER_TERMINAL, A_LOGGER_TIME_FORMAT, A_Logger, type A_LoggerColorName, A_LoggerEnvVariables, A_LoggerEnvVariablesArray, type A_LoggerEnvVariablesType, type A_LoggerLevel, A_Manifest, A_ManifestChecker, A_ManifestError, A_Memory, A_MemoryContext, type A_MemoryContextMeta, A_MemoryError, A_MemoryFeatures, type A_MemoryOperationContext, type A_MemoryOperationContextMeta, type A_MemoryOperations, type A_Memory_Storage, A_OperationContext, type A_Operation_Serialized, type A_Operation_Storage, A_Polyfill, A_Route, A_Schedule, A_ScheduleObject, A_Service, A_ServiceFeatures, A_Signal, A_SignalBus, A_SignalBusError, A_SignalBusFeatures, A_SignalConfig, type A_SignalConfig_Init, A_SignalState, type A_SignalTValue, type A_SignalTValueArray, A_SignalVector, type A_SignalVector_Init, type A_SignalVector_Serialized, type A_Signal_Init, type A_Signal_Serialized, type A_Signal_TSignalsConstructors, A_StateMachine, A_StateMachineError, A_StateMachineFeatures, A_StateMachineTransition, type A_StateMachineTransitionParams, type A_StateMachineTransitionStorage, type A_TYPES__Command_Constructor, type A_TYPES__Command_Init, type A_TYPES__Command_Listener, type A_TYPES__Command_Serialized, type A_TYPES__ConfigContainerConstructor, type A_TYPES__ConfigENVVariables, A_TYPES__ConfigFeature, type A_UTILS_TYPES__ManifestQuery, type A_UTILS_TYPES__ManifestRule, type A_UTILS_TYPES__Manifest_AllowedComponents, type A_UTILS_TYPES__Manifest_ComponentLevelConfig, type A_UTILS_TYPES__Manifest_Init, type A_UTILS_TYPES__Manifest_MethodLevelConfig, type A_UTILS_TYPES__Manifest_Rules, type A_UTILS_TYPES__ScheduleObjectCallback, type A_UTILS_TYPES__ScheduleObjectConfig, ConfigReader, ENVConfigReader, FileConfigReader, type IbufferInterface, type IcryptoInterface, type Ifspolyfill, type IhttpInterface, type IhttpsInterface, type IpathInterface, type IprocessInterface, type IurlInterface };
package/dist/index.d.ts CHANGED
@@ -2463,13 +2463,13 @@ declare class A_Route<_TParams extends Record<string, any> = Record<string, any>
2463
2463
  toAFeatureExtension(extensionScope?: Array<string>): RegExp;
2464
2464
  }
2465
2465
 
2466
- type A_SignalConfig_Init = {
2466
+ type A_SignalConfig_Init<TSignals extends Array<A_Signal> = Array<A_Signal>> = {
2467
2467
  /**
2468
2468
  * An array defining the structure of the signal vector.
2469
2469
  *
2470
2470
  * Each entry corresponds to a signal component constructor.
2471
2471
  */
2472
- structure?: Array<A_TYPES__Entity_Constructor<A_Signal>>;
2472
+ structure?: A_Signal_TSignalsConstructors<TSignals>;
2473
2473
  /**
2474
2474
  * A string representation of the structure for easier DI resolution.
2475
2475
  * Each signal's constructor name is used to form this string.
@@ -2479,8 +2479,13 @@ type A_SignalConfig_Init = {
2479
2479
  stringStructure?: string;
2480
2480
  propagateSignals?: boolean;
2481
2481
  };
2482
- type A_SignalVector_Init<_TSignals extends Array<A_Signal> = Array<A_Signal>, _TVectorStructure extends Array<A_TYPES__Entity_Constructor<_TSignals[number]>> = Array<A_TYPES__Entity_Constructor<_TSignals[number]>>> = {
2483
- structure: _TVectorStructure;
2482
+ type A_Signal_TSignalsConstructors<T extends Array<A_Signal> = Array<A_Signal>> = T extends Array<infer U> ? U extends A_Signal ? A_TYPES__Entity_Constructor<U>[] : never : never;
2483
+ type A_SignalTValue<T extends A_Signal> = T extends A_Signal<infer U> ? U : never;
2484
+ type A_SignalTValueArray<T extends Array<A_Signal>> = {
2485
+ [K in keyof T]: T[K] extends A_Signal<infer U> ? U : never;
2486
+ };
2487
+ type A_SignalVector_Init<_TSignals extends Array<A_Signal> = Array<A_Signal>> = {
2488
+ structure: A_Signal_TSignalsConstructors<_TSignals>;
2484
2489
  values: _TSignals;
2485
2490
  };
2486
2491
  type A_SignalVector_Serialized = A_TYPES__Entity_Serialized & {
@@ -2488,6 +2493,12 @@ type A_SignalVector_Serialized = A_TYPES__Entity_Serialized & {
2488
2493
  values: Array<Record<string, any>>;
2489
2494
  } & A_TYPES__Entity_Serialized;
2490
2495
  type A_Signal_Init<T extends Record<string, any> = Record<string, any>> = {
2496
+ /**
2497
+ * Possible signal id
2498
+ *
2499
+ * [!] used for identification only, all properties will be participating in the hash calculation for deduplication
2500
+ */
2501
+ id?: Array<any>;
2491
2502
  /**
2492
2503
  * The signal name
2493
2504
  */
@@ -2518,7 +2529,6 @@ type A_Signal_Serialized<T extends Record<string, any> = Record<string, any>> =
2518
2529
  * such as monitoring systems, real-time dashboards, or stateful applications.
2519
2530
  */
2520
2531
  declare class A_Signal<_TSignalDataType extends Record<string, any> = Record<string, any>> extends A_Entity<A_Signal_Init<_TSignalDataType>, A_Signal_Serialized<_TSignalDataType>> {
2521
- data: _TSignalDataType;
2522
2532
  /**
2523
2533
  * Allows to define default data for the signal.
2524
2534
  *
@@ -2527,6 +2537,38 @@ declare class A_Signal<_TSignalDataType extends Record<string, any> = Record<str
2527
2537
  * @returns
2528
2538
  */
2529
2539
  static default(): Promise<A_Signal | undefined>;
2540
+ /**
2541
+ * The actual data carried by the signal.
2542
+ */
2543
+ data: _TSignalDataType;
2544
+ /**
2545
+ * Generates signal hash uses for comparison
2546
+ *
2547
+ * @param str
2548
+ */
2549
+ protected createHash(str?: string): string;
2550
+ protected createHash(str?: undefined): string;
2551
+ protected createHash(str?: Record<string, any>): string;
2552
+ protected createHash(str?: Array<any>): string;
2553
+ protected createHash(str?: number): string;
2554
+ protected createHash(str?: boolean): string;
2555
+ protected createHash(str?: null): string;
2556
+ protected createHash(map?: Map<any, any>): string;
2557
+ protected createHash(set?: Set<any>): string;
2558
+ /**
2559
+ * This method compares the current signal with another signal instance by deduplication ID
2560
+ * this id can be configured during initialization with the "id" property.
2561
+ *
2562
+ * example:
2563
+ * * const signalA = new A_Signal({ id: ['user-status', 'user123'], data: { status: 'online' } });
2564
+ * * const signalB = new A_Signal({ id: ['user-status', 'user123'], data: { status: 'offline' } });
2565
+ *
2566
+ * signalA.compare(signalB) // true because both signals have the same deduplication ID
2567
+ *
2568
+ * @param other
2569
+ * @returns
2570
+ */
2571
+ compare(other: A_Signal<_TSignalDataType>): boolean;
2530
2572
  fromJSON(serializedEntity: A_Signal_Serialized<_TSignalDataType>): void;
2531
2573
  fromNew(newEntity: A_Signal_Init<_TSignalDataType>): void;
2532
2574
  toJSON(): A_Signal_Serialized<_TSignalDataType>;
@@ -2542,7 +2584,7 @@ declare class A_Signal<_TSignalDataType extends Record<string, any> = Record<str
2542
2584
  * @template TSignalsConstructors - Array of signal constructor types (e.g., [typeof MySignal, typeof CustomSignal])
2543
2585
  * @template TSignals - Array of signal instances derived from constructors
2544
2586
  */
2545
- declare class A_SignalVector<TSignals extends Array<A_Signal> = Array<A_Signal>, TSignalsConstructors extends Array<A_TYPES__Entity_Constructor<A_Signal>> = TSignals extends Array<infer U> ? U extends A_Signal ? A_TYPES__Entity_Constructor<U>[] : never : never> extends A_Entity<A_SignalVector_Init<TSignals[number][], TSignalsConstructors>, A_SignalVector_Serialized> {
2587
+ declare class A_SignalVector<TSignals extends A_Signal[] = A_Signal[]> extends A_Entity<A_SignalVector_Init<TSignals>> {
2546
2588
  /**
2547
2589
  * The structure of the signal vector, defining the types of signals it contains.
2548
2590
  *
@@ -2551,13 +2593,17 @@ declare class A_SignalVector<TSignals extends Array<A_Signal> = Array<A_Signal>,
2551
2593
  *
2552
2594
  * [!] if not provided, it will be derived from the signals values.
2553
2595
  */
2554
- protected _structure?: TSignalsConstructors;
2596
+ protected _structure?: A_Signal_TSignalsConstructors<TSignals>;
2555
2597
  /**
2556
2598
  * It's actual vector Values of Signals like :
2557
2599
  * [UserActionSignal, UserMousePositionSignal, ExternalDependencySignal]
2558
2600
  */
2559
- protected _signals: TSignals[number][];
2560
- fromNew(newEntity: A_SignalVector_Init<TSignals[number][], TSignalsConstructors>): void;
2601
+ protected _signals: TSignals;
2602
+ constructor(values: TSignals, structure?: {
2603
+ [K in keyof TSignals]: TSignals[K] extends A_Signal ? A_TYPES__Entity_Constructor<TSignals[K]> : never;
2604
+ });
2605
+ constructor(serialized: A_SignalVector_Serialized);
2606
+ fromNew(newEntity: A_SignalVector_Init<TSignals>): void;
2561
2607
  /**
2562
2608
  * The structure of the signal vector, defining the types of signals it contains.
2563
2609
  *
@@ -2565,7 +2611,7 @@ declare class A_SignalVector<TSignals extends Array<A_Signal> = Array<A_Signal>,
2565
2611
  * [UserSignInSignal, UserStatusSignal, UserActivitySignal]
2566
2612
  *
2567
2613
  */
2568
- get structure(): TSignalsConstructors;
2614
+ get structure(): A_Signal_TSignalsConstructors<TSignals>;
2569
2615
  get length(): number;
2570
2616
  /**
2571
2617
  * Enables iteration over the signals in the vector.
@@ -2573,13 +2619,27 @@ declare class A_SignalVector<TSignals extends Array<A_Signal> = Array<A_Signal>,
2573
2619
  * @returns
2574
2620
  */
2575
2621
  [Symbol.iterator](): Iterator<TSignals[number]>;
2622
+ /**
2623
+ * Allows to match the current Signal Vector with another Signal Vector by comparing each signal in the structure.
2624
+ * This method returns true if all signals in the vector match the corresponding signals in the other vector.
2625
+ *
2626
+ * @param other
2627
+ * @returns
2628
+ */
2629
+ match(other: A_SignalVector<TSignals>): boolean;
2630
+ /**
2631
+ * This method should ensure that the current Signal Vector contains all signals from the provided Signal Vector.
2632
+ *
2633
+ * @param signal
2634
+ */
2635
+ contains(signal: A_SignalVector): boolean;
2576
2636
  /**
2577
2637
  * Checks if the vector contains a signal of the specified type.
2578
2638
  *
2579
2639
  * @param signal
2580
2640
  */
2581
2641
  has(signal: A_Signal): boolean;
2582
- has(signalConstructor: A_TYPES__Component_Constructor<A_Signal>): boolean;
2642
+ has(signalConstructor: A_TYPES__Entity_Constructor<A_Signal>): boolean;
2583
2643
  /**
2584
2644
  * Retrieves the signal of the specified type from the vector.
2585
2645
  *
@@ -2594,11 +2654,7 @@ declare class A_SignalVector<TSignals extends Array<A_Signal> = Array<A_Signal>,
2594
2654
  * @param structure - Optional structure to override the default ordering
2595
2655
  * @returns Array of signal instances in the specified order
2596
2656
  */
2597
- toVector<T extends Array<A_Signal> = TSignals>(structure?: {
2598
- [K in keyof T]: T[K] extends A_Signal ? A_TYPES__Entity_Constructor<T[K]> : never;
2599
- }): Promise<{
2600
- [K in keyof T]: T[K];
2601
- }>;
2657
+ toVector<T extends Array<A_Signal> = TSignals>(structure?: A_Signal_TSignalsConstructors<T>): Promise<T>;
2602
2658
  /**
2603
2659
  * Converts to Array of data of signals in the vector
2604
2660
  * Maintains the order specified in the structure/generic type
@@ -2606,11 +2662,7 @@ declare class A_SignalVector<TSignals extends Array<A_Signal> = Array<A_Signal>,
2606
2662
  * @param structure - Optional structure to override the default ordering
2607
2663
  * @returns Array of serialized signal data in the specified order
2608
2664
  */
2609
- toDataVector<T extends Array<A_Signal> = TSignals>(structure?: {
2610
- [K in keyof T]: T[K] extends A_Signal ? A_TYPES__Entity_Constructor<T[K]> : never;
2611
- }): Promise<{
2612
- [K in keyof T]: T[K] extends A_Signal<infer D> ? D | undefined : never;
2613
- }>;
2665
+ toDataVector<T extends A_Signal[] = TSignals>(structure?: A_Signal_TSignalsConstructors<T>): Promise<A_SignalTValueArray<T>>;
2614
2666
  /**
2615
2667
  * Converts to Object with signal constructor names as keys and their corresponding data values
2616
2668
  * Uses the structure ordering to ensure consistent key ordering
@@ -2921,4 +2973,4 @@ declare class A_StateMachineError extends A_Error {
2921
2973
  static readonly TransitionError = "A-StateMachine Transition Error";
2922
2974
  }
2923
2975
 
2924
- export { A_CONSTANTS__CONFIG_ENV_VARIABLES, A_CONSTANTS__CONFIG_ENV_VARIABLES_ARRAY, A_Channel, A_ChannelError, A_ChannelFeatures, A_ChannelRequest, A_ChannelRequestStatuses, A_Command, A_CommandError, A_CommandEvent, type A_CommandEvents, A_CommandFeatures, A_CommandTransitions, type A_Command_ExecutionContext, A_Command_Status, A_Config, A_ConfigError, A_ConfigLoader, A_Deferred, A_ExecutionContext, A_LOGGER_ANSI, A_LOGGER_COLORS, A_LOGGER_DEFAULT_LEVEL, A_LOGGER_DEFAULT_SCOPE_LENGTH, A_LOGGER_ENV_KEYS, A_LOGGER_FORMAT, A_LOGGER_SAFE_RANDOM_COLORS, A_LOGGER_TERMINAL, A_LOGGER_TIME_FORMAT, A_Logger, type A_LoggerColorName, A_LoggerEnvVariables, A_LoggerEnvVariablesArray, type A_LoggerEnvVariablesType, type A_LoggerLevel, A_Manifest, A_ManifestChecker, A_ManifestError, A_Memory, A_MemoryContext, type A_MemoryContextMeta, A_MemoryError, A_MemoryFeatures, type A_MemoryOperationContext, type A_MemoryOperationContextMeta, type A_MemoryOperations, type A_Memory_Storage, A_OperationContext, type A_Operation_Serialized, type A_Operation_Storage, A_Polyfill, A_Route, A_Schedule, A_ScheduleObject, A_Service, A_ServiceFeatures, A_Signal, A_SignalBus, A_SignalBusError, A_SignalBusFeatures, A_SignalConfig, type A_SignalConfig_Init, A_SignalState, A_SignalVector, type A_SignalVector_Init, type A_SignalVector_Serialized, type A_Signal_Init, type A_Signal_Serialized, A_StateMachine, A_StateMachineError, A_StateMachineFeatures, A_StateMachineTransition, type A_StateMachineTransitionParams, type A_StateMachineTransitionStorage, type A_TYPES__Command_Constructor, type A_TYPES__Command_Init, type A_TYPES__Command_Listener, type A_TYPES__Command_Serialized, type A_TYPES__ConfigContainerConstructor, type A_TYPES__ConfigENVVariables, A_TYPES__ConfigFeature, type A_UTILS_TYPES__ManifestQuery, type A_UTILS_TYPES__ManifestRule, type A_UTILS_TYPES__Manifest_AllowedComponents, type A_UTILS_TYPES__Manifest_ComponentLevelConfig, type A_UTILS_TYPES__Manifest_Init, type A_UTILS_TYPES__Manifest_MethodLevelConfig, type A_UTILS_TYPES__Manifest_Rules, type A_UTILS_TYPES__ScheduleObjectCallback, type A_UTILS_TYPES__ScheduleObjectConfig, ConfigReader, ENVConfigReader, FileConfigReader, type IbufferInterface, type IcryptoInterface, type Ifspolyfill, type IhttpInterface, type IhttpsInterface, type IpathInterface, type IprocessInterface, type IurlInterface };
2976
+ export { A_CONSTANTS__CONFIG_ENV_VARIABLES, A_CONSTANTS__CONFIG_ENV_VARIABLES_ARRAY, A_Channel, A_ChannelError, A_ChannelFeatures, A_ChannelRequest, A_ChannelRequestStatuses, A_Command, A_CommandError, A_CommandEvent, type A_CommandEvents, A_CommandFeatures, A_CommandTransitions, type A_Command_ExecutionContext, A_Command_Status, A_Config, A_ConfigError, A_ConfigLoader, A_Deferred, A_ExecutionContext, A_LOGGER_ANSI, A_LOGGER_COLORS, A_LOGGER_DEFAULT_LEVEL, A_LOGGER_DEFAULT_SCOPE_LENGTH, A_LOGGER_ENV_KEYS, A_LOGGER_FORMAT, A_LOGGER_SAFE_RANDOM_COLORS, A_LOGGER_TERMINAL, A_LOGGER_TIME_FORMAT, A_Logger, type A_LoggerColorName, A_LoggerEnvVariables, A_LoggerEnvVariablesArray, type A_LoggerEnvVariablesType, type A_LoggerLevel, A_Manifest, A_ManifestChecker, A_ManifestError, A_Memory, A_MemoryContext, type A_MemoryContextMeta, A_MemoryError, A_MemoryFeatures, type A_MemoryOperationContext, type A_MemoryOperationContextMeta, type A_MemoryOperations, type A_Memory_Storage, A_OperationContext, type A_Operation_Serialized, type A_Operation_Storage, A_Polyfill, A_Route, A_Schedule, A_ScheduleObject, A_Service, A_ServiceFeatures, A_Signal, A_SignalBus, A_SignalBusError, A_SignalBusFeatures, A_SignalConfig, type A_SignalConfig_Init, A_SignalState, type A_SignalTValue, type A_SignalTValueArray, A_SignalVector, type A_SignalVector_Init, type A_SignalVector_Serialized, type A_Signal_Init, type A_Signal_Serialized, type A_Signal_TSignalsConstructors, A_StateMachine, A_StateMachineError, A_StateMachineFeatures, A_StateMachineTransition, type A_StateMachineTransitionParams, type A_StateMachineTransitionStorage, type A_TYPES__Command_Constructor, type A_TYPES__Command_Init, type A_TYPES__Command_Listener, type A_TYPES__Command_Serialized, type A_TYPES__ConfigContainerConstructor, type A_TYPES__ConfigENVVariables, A_TYPES__ConfigFeature, type A_UTILS_TYPES__ManifestQuery, type A_UTILS_TYPES__ManifestRule, type A_UTILS_TYPES__Manifest_AllowedComponents, type A_UTILS_TYPES__Manifest_ComponentLevelConfig, type A_UTILS_TYPES__Manifest_Init, type A_UTILS_TYPES__Manifest_MethodLevelConfig, type A_UTILS_TYPES__Manifest_Rules, type A_UTILS_TYPES__ScheduleObjectCallback, type A_UTILS_TYPES__ScheduleObjectConfig, ConfigReader, ENVConfigReader, FileConfigReader, type IbufferInterface, type IcryptoInterface, type Ifspolyfill, type IhttpInterface, type IhttpsInterface, type IpathInterface, type IprocessInterface, type IurlInterface };