@kinotic-ai/core 1.1.0 → 1.1.1
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.cjs +1 -1
- package/dist/index.d.cts +31 -5
- package/dist/index.d.ts +31 -5
- package/dist/index.js +1 -1
- package/package.json +1 -1
package/dist/index.cjs
CHANGED
package/dist/index.d.cts
CHANGED
|
@@ -641,6 +641,27 @@ declare function Version(version: string): (target: Function) => void;
|
|
|
641
641
|
declare function Context(): (target: any, propertyKey: string, parameterIndex: number) => void;
|
|
642
642
|
declare function Publish(namespace: string, name?: string): (target: Function) => any;
|
|
643
643
|
/**
|
|
644
|
+
* Configuration for a single entities path and its corresponding repository output.
|
|
645
|
+
*/
|
|
646
|
+
type EntitiesPathConfig = {
|
|
647
|
+
/**
|
|
648
|
+
* The path to search for classes decorated with @Entity.
|
|
649
|
+
*/
|
|
650
|
+
path: string;
|
|
651
|
+
/**
|
|
652
|
+
* The path where generated Repository classes will be placed.
|
|
653
|
+
*/
|
|
654
|
+
repositoryPath: string;
|
|
655
|
+
/**
|
|
656
|
+
* If true, the subfolder structure under the entities path will be mirrored under the repository path.
|
|
657
|
+
* For example, if entitiesPath is "src/model" and contains "payments/Payment.ts",
|
|
658
|
+
* the generated repository will be placed in "repositoryPath/payments/".
|
|
659
|
+
* If false, all generated repositories are placed directly in the repositoryPath.
|
|
660
|
+
* Defaults to true.
|
|
661
|
+
*/
|
|
662
|
+
mirrorFolderStructure?: boolean;
|
|
663
|
+
};
|
|
664
|
+
/**
|
|
644
665
|
* The project configuration for a Kinotic project.
|
|
645
666
|
*/
|
|
646
667
|
declare class KinoticProjectConfig {
|
|
@@ -659,18 +680,23 @@ declare class KinoticProjectConfig {
|
|
|
659
680
|
application: string;
|
|
660
681
|
/**
|
|
661
682
|
* The paths to search for classes decorated with @Entity that Kinotic will be created for.
|
|
683
|
+
* Each entry can be a string (simple path) or an {@link EntitiesPathConfig} object for full control
|
|
684
|
+
* over where repository classes are generated.
|
|
685
|
+
*
|
|
686
|
+
* When a plain string is provided, the {@link generatedPath} will be used as the repository output path.
|
|
662
687
|
*/
|
|
663
|
-
entitiesPaths: string[];
|
|
688
|
+
entitiesPaths: (string | EntitiesPathConfig)[];
|
|
664
689
|
/**
|
|
665
|
-
* The path to where generated files will be placed.
|
|
690
|
+
* The default path to where generated files will be placed when entitiesPaths contains plain strings.
|
|
691
|
+
* Ignored for entitiesPaths entries that use {@link EntitiesPathConfig}.
|
|
666
692
|
*/
|
|
667
|
-
generatedPath
|
|
693
|
+
generatedPath?: string;
|
|
668
694
|
/**
|
|
669
695
|
* The file extension to use for imports in generated files.
|
|
670
696
|
*/
|
|
671
697
|
fileExtensionForImports: string;
|
|
672
698
|
/**
|
|
673
|
-
* If true the generated
|
|
699
|
+
* If true the generated Repository classes will validate all data before sending to the server.
|
|
674
700
|
*/
|
|
675
701
|
validate?: boolean;
|
|
676
702
|
}
|
|
@@ -1116,4 +1142,4 @@ declare class ParticipantConstants {
|
|
|
1116
1142
|
static readonly PARTICIPANT_TYPE_NODE: string;
|
|
1117
1143
|
static readonly CLI_PARTICIPANT_ID: string;
|
|
1118
1144
|
}
|
|
1119
|
-
export { createCRI, Version, TextEventFactory, Sort, ServiceRegistry, ServiceContext, ServerInfo, Scope, Publish, ParticipantConstants, Participant, Pageable, Page, Order, OffsetPageable, NullHandling, KinoticSingleton, KinoticProjectConfig, KinoticPlugin, KinoticError, Kinotic, JsonEventFactory, IterablePage, Identifiable, IServiceRegistry, IServiceProxy, IParticipant, IKinotic, IEventFactory, IEventBus, IEvent, IEditableDataSource, IDataSource, ICrudServiceProxyFactory, ICrudServiceProxy, FunctionalIterablePage, EventConstants, EventBus, Event, Direction, DefaultCRI, DataSourceUtils, CursorPageable, CrudServiceProxyFactory, CrudServiceProxy, ContextInterceptor, Context, ConnectionInfo, ConnectedInfo, ConnectHeaders, CRI, CONTEXT_METADATA_KEY, AuthorizationError, AuthenticationError, AbstractIterablePage };
|
|
1145
|
+
export { createCRI, Version, TextEventFactory, Sort, ServiceRegistry, ServiceContext, ServerInfo, Scope, Publish, ParticipantConstants, Participant, Pageable, Page, Order, OffsetPageable, NullHandling, KinoticSingleton, KinoticProjectConfig, KinoticPlugin, KinoticError, Kinotic, JsonEventFactory, IterablePage, Identifiable, IServiceRegistry, IServiceProxy, IParticipant, IKinotic, IEventFactory, IEventBus, IEvent, IEditableDataSource, IDataSource, ICrudServiceProxyFactory, ICrudServiceProxy, FunctionalIterablePage, EventConstants, EventBus, Event, EntitiesPathConfig, Direction, DefaultCRI, DataSourceUtils, CursorPageable, CrudServiceProxyFactory, CrudServiceProxy, ContextInterceptor, Context, ConnectionInfo, ConnectedInfo, ConnectHeaders, CRI, CONTEXT_METADATA_KEY, AuthorizationError, AuthenticationError, AbstractIterablePage };
|
package/dist/index.d.ts
CHANGED
|
@@ -641,6 +641,27 @@ declare function Version(version: string): (target: Function) => void;
|
|
|
641
641
|
declare function Context(): (target: any, propertyKey: string, parameterIndex: number) => void;
|
|
642
642
|
declare function Publish(namespace: string, name?: string): (target: Function) => any;
|
|
643
643
|
/**
|
|
644
|
+
* Configuration for a single entities path and its corresponding repository output.
|
|
645
|
+
*/
|
|
646
|
+
type EntitiesPathConfig = {
|
|
647
|
+
/**
|
|
648
|
+
* The path to search for classes decorated with @Entity.
|
|
649
|
+
*/
|
|
650
|
+
path: string;
|
|
651
|
+
/**
|
|
652
|
+
* The path where generated Repository classes will be placed.
|
|
653
|
+
*/
|
|
654
|
+
repositoryPath: string;
|
|
655
|
+
/**
|
|
656
|
+
* If true, the subfolder structure under the entities path will be mirrored under the repository path.
|
|
657
|
+
* For example, if entitiesPath is "src/model" and contains "payments/Payment.ts",
|
|
658
|
+
* the generated repository will be placed in "repositoryPath/payments/".
|
|
659
|
+
* If false, all generated repositories are placed directly in the repositoryPath.
|
|
660
|
+
* Defaults to true.
|
|
661
|
+
*/
|
|
662
|
+
mirrorFolderStructure?: boolean;
|
|
663
|
+
};
|
|
664
|
+
/**
|
|
644
665
|
* The project configuration for a Kinotic project.
|
|
645
666
|
*/
|
|
646
667
|
declare class KinoticProjectConfig {
|
|
@@ -659,18 +680,23 @@ declare class KinoticProjectConfig {
|
|
|
659
680
|
application: string;
|
|
660
681
|
/**
|
|
661
682
|
* The paths to search for classes decorated with @Entity that Kinotic will be created for.
|
|
683
|
+
* Each entry can be a string (simple path) or an {@link EntitiesPathConfig} object for full control
|
|
684
|
+
* over where repository classes are generated.
|
|
685
|
+
*
|
|
686
|
+
* When a plain string is provided, the {@link generatedPath} will be used as the repository output path.
|
|
662
687
|
*/
|
|
663
|
-
entitiesPaths: string[];
|
|
688
|
+
entitiesPaths: (string | EntitiesPathConfig)[];
|
|
664
689
|
/**
|
|
665
|
-
* The path to where generated files will be placed.
|
|
690
|
+
* The default path to where generated files will be placed when entitiesPaths contains plain strings.
|
|
691
|
+
* Ignored for entitiesPaths entries that use {@link EntitiesPathConfig}.
|
|
666
692
|
*/
|
|
667
|
-
generatedPath
|
|
693
|
+
generatedPath?: string;
|
|
668
694
|
/**
|
|
669
695
|
* The file extension to use for imports in generated files.
|
|
670
696
|
*/
|
|
671
697
|
fileExtensionForImports: string;
|
|
672
698
|
/**
|
|
673
|
-
* If true the generated
|
|
699
|
+
* If true the generated Repository classes will validate all data before sending to the server.
|
|
674
700
|
*/
|
|
675
701
|
validate?: boolean;
|
|
676
702
|
}
|
|
@@ -1116,4 +1142,4 @@ declare class ParticipantConstants {
|
|
|
1116
1142
|
static readonly PARTICIPANT_TYPE_NODE: string;
|
|
1117
1143
|
static readonly CLI_PARTICIPANT_ID: string;
|
|
1118
1144
|
}
|
|
1119
|
-
export { createCRI, Version, TextEventFactory, Sort, ServiceRegistry, ServiceContext, ServerInfo, Scope, Publish, ParticipantConstants, Participant, Pageable, Page, Order, OffsetPageable, NullHandling, KinoticSingleton, KinoticProjectConfig, KinoticPlugin, KinoticError, Kinotic, JsonEventFactory, IterablePage, Identifiable, IServiceRegistry, IServiceProxy, IParticipant, IKinotic, IEventFactory, IEventBus, IEvent, IEditableDataSource, IDataSource, ICrudServiceProxyFactory, ICrudServiceProxy, FunctionalIterablePage, EventConstants, EventBus, Event, Direction, DefaultCRI, DataSourceUtils, CursorPageable, CrudServiceProxyFactory, CrudServiceProxy, ContextInterceptor, Context, ConnectionInfo, ConnectedInfo, ConnectHeaders, CRI, CONTEXT_METADATA_KEY, AuthorizationError, AuthenticationError, AbstractIterablePage };
|
|
1145
|
+
export { createCRI, Version, TextEventFactory, Sort, ServiceRegistry, ServiceContext, ServerInfo, Scope, Publish, ParticipantConstants, Participant, Pageable, Page, Order, OffsetPageable, NullHandling, KinoticSingleton, KinoticProjectConfig, KinoticPlugin, KinoticError, Kinotic, JsonEventFactory, IterablePage, Identifiable, IServiceRegistry, IServiceProxy, IParticipant, IKinotic, IEventFactory, IEventBus, IEvent, IEditableDataSource, IDataSource, ICrudServiceProxyFactory, ICrudServiceProxy, FunctionalIterablePage, EventConstants, EventBus, Event, EntitiesPathConfig, Direction, DefaultCRI, DataSourceUtils, CursorPageable, CrudServiceProxyFactory, CrudServiceProxy, ContextInterceptor, Context, ConnectionInfo, ConnectedInfo, ConnectHeaders, CRI, CONTEXT_METADATA_KEY, AuthorizationError, AuthenticationError, AbstractIterablePage };
|
package/dist/index.js
CHANGED