@kinotic-ai/persistence 5.0.0-beta.10 → 5.0.0-beta.12
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 +13 -11
- package/dist/index.d.cts +19 -10
- package/dist/index.d.ts +19 -10
- package/dist/index.js +13 -11
- package/package.json +3 -3
package/dist/index.cjs
CHANGED
|
@@ -70,6 +70,7 @@ __export(exports_src, {
|
|
|
70
70
|
Entity: () => Entity,
|
|
71
71
|
EntitiesRepository: () => EntitiesRepository,
|
|
72
72
|
Discriminator: () => Discriminator,
|
|
73
|
+
DateTime: () => DateTime,
|
|
73
74
|
AutoGeneratedId: () => AutoGeneratedId,
|
|
74
75
|
AdminEntityRepository: () => AdminEntityRepository,
|
|
75
76
|
AdminEntitiesRepository: () => AdminEntitiesRepository,
|
|
@@ -120,6 +121,7 @@ var PrecisionType;
|
|
|
120
121
|
|
|
121
122
|
// packages/persistence/src/api/KinoticPersistenceDecorators.ts
|
|
122
123
|
function AutoGeneratedId(_value, _context) {}
|
|
124
|
+
function DateTime(_value, _context) {}
|
|
123
125
|
function Discriminator(_propertyName) {
|
|
124
126
|
return function(_value, _context) {};
|
|
125
127
|
}
|
|
@@ -296,15 +298,15 @@ class AdminEntitiesRepository {
|
|
|
296
298
|
findByIds(entityDefinitionId, ids) {
|
|
297
299
|
return this.serviceProxy.invoke("findByIds", [entityDefinitionId, ids]);
|
|
298
300
|
}
|
|
299
|
-
namedQuery(entityDefinitionId, queryName, parameters) {
|
|
300
|
-
return this.serviceProxy.invoke("namedQuery", [entityDefinitionId, queryName, parameters]);
|
|
301
|
+
namedQuery(entityDefinitionId, queryName, parameters, tenantSelection) {
|
|
302
|
+
return this.serviceProxy.invoke("namedQuery", [entityDefinitionId, queryName, parameters, tenantSelection]);
|
|
301
303
|
}
|
|
302
|
-
async namedQueryPage(entityDefinitionId, queryName, parameters, pageable) {
|
|
303
|
-
const page = await this.namedQuerySinglePage(entityDefinitionId, queryName, parameters, pageable);
|
|
304
|
-
return new import_core2.FunctionalIterablePage(pageable, page, (pageable2) => this.namedQuerySinglePage(entityDefinitionId, queryName, parameters, pageable2));
|
|
304
|
+
async namedQueryPage(entityDefinitionId, queryName, parameters, tenantSelection, pageable) {
|
|
305
|
+
const page = await this.namedQuerySinglePage(entityDefinitionId, queryName, parameters, tenantSelection, pageable);
|
|
306
|
+
return new import_core2.FunctionalIterablePage(pageable, page, (pageable2) => this.namedQuerySinglePage(entityDefinitionId, queryName, parameters, tenantSelection, pageable2));
|
|
305
307
|
}
|
|
306
|
-
namedQuerySinglePage(entityDefinitionId, queryName, parameters, pageable) {
|
|
307
|
-
return this.serviceProxy.invoke("namedQueryPage", [entityDefinitionId, queryName, parameters, pageable]);
|
|
308
|
+
namedQuerySinglePage(entityDefinitionId, queryName, parameters, tenantSelection, pageable) {
|
|
309
|
+
return this.serviceProxy.invoke("namedQueryPage", [entityDefinitionId, queryName, parameters, tenantSelection, pageable]);
|
|
308
310
|
}
|
|
309
311
|
async search(entityDefinitionId, searchText, tenantSelection, pageable) {
|
|
310
312
|
const page = await this.searchSinglePage(entityDefinitionId, searchText, tenantSelection, pageable);
|
|
@@ -421,11 +423,11 @@ class AdminEntityRepository {
|
|
|
421
423
|
findByIds(ids) {
|
|
422
424
|
return this.adminEntitiesRepository.findByIds(this.entityId, ids);
|
|
423
425
|
}
|
|
424
|
-
namedQuery(queryName, queryParameters) {
|
|
425
|
-
return this.adminEntitiesRepository.namedQuery(this.entityId, queryName, queryParameters);
|
|
426
|
+
namedQuery(queryName, queryParameters, tenantSelection) {
|
|
427
|
+
return this.adminEntitiesRepository.namedQuery(this.entityId, queryName, queryParameters, tenantSelection);
|
|
426
428
|
}
|
|
427
|
-
namedQueryPage(queryName, queryParameters, pageable) {
|
|
428
|
-
return this.adminEntitiesRepository.namedQueryPage(this.entityId, queryName, queryParameters, pageable);
|
|
429
|
+
namedQueryPage(queryName, queryParameters, tenantSelection, pageable) {
|
|
430
|
+
return this.adminEntitiesRepository.namedQueryPage(this.entityId, queryName, queryParameters, tenantSelection, pageable);
|
|
429
431
|
}
|
|
430
432
|
search(searchText, tenantSelection, pageable) {
|
|
431
433
|
return this.adminEntitiesRepository.search(this.entityId, searchText, tenantSelection, pageable);
|
package/dist/index.d.cts
CHANGED
|
@@ -443,6 +443,11 @@ type EntityServiceDecoratorsConfig = Partial<Record<DecoratedFunction, EntitySer
|
|
|
443
443
|
*/
|
|
444
444
|
declare function AutoGeneratedId(_value: undefined, _context: ClassFieldDecoratorContext): void;
|
|
445
445
|
/**
|
|
446
|
+
* Signifies that a property holds a date, which is stored and queried as a date.
|
|
447
|
+
* The property is a string, or an array of strings, holding ISO-8601 dates such as `Date.prototype.toISOString()` returns.
|
|
448
|
+
*/
|
|
449
|
+
declare function DateTime(_value: undefined, _context: ClassFieldDecoratorContext<unknown, string | readonly string[] | null | undefined>): void;
|
|
450
|
+
/**
|
|
446
451
|
* Signifies that a property is a discriminator for the entity.
|
|
447
452
|
* This is used to determine the type of the entity when deserializing from JSON.
|
|
448
453
|
* @param propertyName the name of the property to use as the discriminator
|
|
@@ -584,18 +589,20 @@ interface IAdminEntitiesRepository {
|
|
|
584
589
|
* @param entityDefinitionId the id of the structure that this named query is defined for
|
|
585
590
|
* @param queryName the name of the function that defines the query
|
|
586
591
|
* @param parameters to pass to the query
|
|
592
|
+
* @param tenantSelection the list of tenants to use when executing the query
|
|
587
593
|
* @returns Promise with the result of the query
|
|
588
594
|
*/
|
|
589
|
-
namedQuery<T>(entityDefinitionId: string, queryName: string, parameters: QueryParameter[]): Promise<T>;
|
|
595
|
+
namedQuery<T>(entityDefinitionId: string, queryName: string, parameters: QueryParameter[], tenantSelection: TenantSelection): Promise<T>;
|
|
590
596
|
/**
|
|
591
597
|
* Executes a named query and returns a Page of results.
|
|
592
598
|
* @param entityDefinitionId the id of the structure that this named query is defined for
|
|
593
599
|
* @param queryName the name of the function that defines the query
|
|
594
600
|
* @param parameters to pass to the query
|
|
601
|
+
* @param tenantSelection the list of tenants to use when executing the query
|
|
595
602
|
* @param pageable the page settings to be used
|
|
596
603
|
* @returns Promise with the result of the query
|
|
597
604
|
*/
|
|
598
|
-
namedQueryPage<T>(entityDefinitionId: string, queryName: string, parameters: QueryParameter[], pageable: Pageable3): Promise<IterablePage3<T>>;
|
|
605
|
+
namedQueryPage<T>(entityDefinitionId: string, queryName: string, parameters: QueryParameter[], tenantSelection: TenantSelection, pageable: Pageable3): Promise<IterablePage3<T>>;
|
|
599
606
|
/**
|
|
600
607
|
* Returns a {@link IterablePage} of entities matching the search text and paging restriction provided in the {@link Pageable} object.
|
|
601
608
|
*
|
|
@@ -618,9 +625,9 @@ declare class AdminEntitiesRepository implements IAdminEntitiesRepository {
|
|
|
618
625
|
findAllSinglePage<T>(entityDefinitionId: string, tenantSelection: TenantSelection, pageable: Pageable3): Promise<Page2<T>>;
|
|
619
626
|
findById<T>(entityDefinitionId: string, id: TenantSpecificId): Promise<T>;
|
|
620
627
|
findByIds<T>(entityDefinitionId: string, ids: TenantSpecificId[]): Promise<T[]>;
|
|
621
|
-
namedQuery<T>(entityDefinitionId: string, queryName: string, parameters: QueryParameter[]): Promise<T>;
|
|
622
|
-
namedQueryPage<T>(entityDefinitionId: string, queryName: string, parameters: QueryParameter[], pageable: Pageable3): Promise<IterablePage3<T>>;
|
|
623
|
-
namedQuerySinglePage<T>(entityDefinitionId: string, queryName: string, parameters: QueryParameter[], pageable: Pageable3): Promise<Page2<T>>;
|
|
628
|
+
namedQuery<T>(entityDefinitionId: string, queryName: string, parameters: QueryParameter[], tenantSelection: TenantSelection): Promise<T>;
|
|
629
|
+
namedQueryPage<T>(entityDefinitionId: string, queryName: string, parameters: QueryParameter[], tenantSelection: TenantSelection, pageable: Pageable3): Promise<IterablePage3<T>>;
|
|
630
|
+
namedQuerySinglePage<T>(entityDefinitionId: string, queryName: string, parameters: QueryParameter[], tenantSelection: TenantSelection, pageable: Pageable3): Promise<Page2<T>>;
|
|
624
631
|
search<T>(entityDefinitionId: string, searchText: string, tenantSelection: TenantSelection, pageable: Pageable3): Promise<IterablePage3<T>>;
|
|
625
632
|
searchSinglePage<T>(entityDefinitionId: string, searchText: string, tenantSelection: TenantSelection, pageable: Pageable3): Promise<Page2<T>>;
|
|
626
633
|
}
|
|
@@ -707,17 +714,19 @@ interface IAdminEntityRepository<T> {
|
|
|
707
714
|
* Executes a named query.
|
|
708
715
|
* @param queryName the name of the function that defines the query
|
|
709
716
|
* @param queryParameters to pass to the query
|
|
717
|
+
* @param tenantSelection the list of tenants to use when executing the query
|
|
710
718
|
* @returns Promise with the result of the query
|
|
711
719
|
*/
|
|
712
|
-
namedQuery<U>(queryName: string, queryParameters: QueryParameter[]): Promise<U>;
|
|
720
|
+
namedQuery<U>(queryName: string, queryParameters: QueryParameter[], tenantSelection: TenantSelection): Promise<U>;
|
|
713
721
|
/**
|
|
714
722
|
* Executes a named query and returns a Page of results.
|
|
715
723
|
* @param queryName the name of the function that defines the query
|
|
716
724
|
* @param queryParameters to pass to the query
|
|
725
|
+
* @param tenantSelection the list of tenants to use when executing the query
|
|
717
726
|
* @param pageable the page settings to be used
|
|
718
727
|
* @returns Promise with the result of the query
|
|
719
728
|
*/
|
|
720
|
-
namedQueryPage<U>(queryName: string, queryParameters: QueryParameter[], pageable: Pageable4): Promise<IterablePage4<U>>;
|
|
729
|
+
namedQueryPage<U>(queryName: string, queryParameters: QueryParameter[], tenantSelection: TenantSelection, pageable: Pageable4): Promise<IterablePage4<U>>;
|
|
721
730
|
/**
|
|
722
731
|
* Returns a {@link Page} of entities matching the search text and paging restriction provided in the {@link Pageable} object.
|
|
723
732
|
*
|
|
@@ -746,8 +755,8 @@ declare class AdminEntityRepository<T> implements IAdminEntityRepository<T> {
|
|
|
746
755
|
findAll(tenantSelection: TenantSelection, pageable: Pageable4): Promise<IterablePage4<T>>;
|
|
747
756
|
findById(id: TenantSpecificId): Promise<T | null>;
|
|
748
757
|
findByIds(ids: TenantSpecificId[]): Promise<T[]>;
|
|
749
|
-
namedQuery<U>(queryName: string, queryParameters: QueryParameter[]): Promise<U>;
|
|
750
|
-
namedQueryPage<U>(queryName: string, queryParameters: QueryParameter[], pageable: Pageable4): Promise<IterablePage4<U>>;
|
|
758
|
+
namedQuery<U>(queryName: string, queryParameters: QueryParameter[], tenantSelection: TenantSelection): Promise<U>;
|
|
759
|
+
namedQueryPage<U>(queryName: string, queryParameters: QueryParameter[], tenantSelection: TenantSelection, pageable: Pageable4): Promise<IterablePage4<U>>;
|
|
751
760
|
search(searchText: string, tenantSelection: TenantSelection, pageable: Pageable4): Promise<IterablePage4<T>>;
|
|
752
761
|
}
|
|
753
762
|
import { KinoticPlugin } from "@kinotic-ai/core";
|
|
@@ -759,4 +768,4 @@ declare const PersistencePlugin: KinoticPlugin<IPersistenceExtension>;
|
|
|
759
768
|
declare module "@kinotic-ai/core" {
|
|
760
769
|
interface KinoticSingleton extends IPersistenceExtension {}
|
|
761
770
|
}
|
|
762
|
-
export { Version, TimeReference, Text, TenantSpecificId, TenantSelection, TenantId, RoleDecorator, Role, QueryParameter, QueryOptions, Query, PrecisionType, Precision, PolicyDecorator, Policy, PersistencePlugin, NotNull, NotIndexed, Nested, MultiTenancyType, Id, IPersistenceExtension, IEntityRepository, IEntitiesRepository, IAdminEntityRepository, IAdminEntitiesRepository, Flattened, EsIndexConfigurationData, EsIndexConfiguration, EntityType, EntityServiceDecoratorsDecorator, EntityServiceDecoratorsConfig, EntityServiceDecorators, EntityServiceDecorator, EntityRepository, Entity, EntitiesRepository, Discriminator, DecoratedFunction, AutoGeneratedId, AdminEntityRepository, AdminEntitiesRepository, APP_API_ZONE, $Role, $Policy };
|
|
771
|
+
export { Version, TimeReference, Text, TenantSpecificId, TenantSelection, TenantId, RoleDecorator, Role, QueryParameter, QueryOptions, Query, PrecisionType, Precision, PolicyDecorator, Policy, PersistencePlugin, NotNull, NotIndexed, Nested, MultiTenancyType, Id, IPersistenceExtension, IEntityRepository, IEntitiesRepository, IAdminEntityRepository, IAdminEntitiesRepository, Flattened, EsIndexConfigurationData, EsIndexConfiguration, EntityType, EntityServiceDecoratorsDecorator, EntityServiceDecoratorsConfig, EntityServiceDecorators, EntityServiceDecorator, EntityRepository, Entity, EntitiesRepository, Discriminator, DecoratedFunction, DateTime, AutoGeneratedId, AdminEntityRepository, AdminEntitiesRepository, APP_API_ZONE, $Role, $Policy };
|
package/dist/index.d.ts
CHANGED
|
@@ -443,6 +443,11 @@ type EntityServiceDecoratorsConfig = Partial<Record<DecoratedFunction, EntitySer
|
|
|
443
443
|
*/
|
|
444
444
|
declare function AutoGeneratedId(_value: undefined, _context: ClassFieldDecoratorContext): void;
|
|
445
445
|
/**
|
|
446
|
+
* Signifies that a property holds a date, which is stored and queried as a date.
|
|
447
|
+
* The property is a string, or an array of strings, holding ISO-8601 dates such as `Date.prototype.toISOString()` returns.
|
|
448
|
+
*/
|
|
449
|
+
declare function DateTime(_value: undefined, _context: ClassFieldDecoratorContext<unknown, string | readonly string[] | null | undefined>): void;
|
|
450
|
+
/**
|
|
446
451
|
* Signifies that a property is a discriminator for the entity.
|
|
447
452
|
* This is used to determine the type of the entity when deserializing from JSON.
|
|
448
453
|
* @param propertyName the name of the property to use as the discriminator
|
|
@@ -584,18 +589,20 @@ interface IAdminEntitiesRepository {
|
|
|
584
589
|
* @param entityDefinitionId the id of the structure that this named query is defined for
|
|
585
590
|
* @param queryName the name of the function that defines the query
|
|
586
591
|
* @param parameters to pass to the query
|
|
592
|
+
* @param tenantSelection the list of tenants to use when executing the query
|
|
587
593
|
* @returns Promise with the result of the query
|
|
588
594
|
*/
|
|
589
|
-
namedQuery<T>(entityDefinitionId: string, queryName: string, parameters: QueryParameter[]): Promise<T>;
|
|
595
|
+
namedQuery<T>(entityDefinitionId: string, queryName: string, parameters: QueryParameter[], tenantSelection: TenantSelection): Promise<T>;
|
|
590
596
|
/**
|
|
591
597
|
* Executes a named query and returns a Page of results.
|
|
592
598
|
* @param entityDefinitionId the id of the structure that this named query is defined for
|
|
593
599
|
* @param queryName the name of the function that defines the query
|
|
594
600
|
* @param parameters to pass to the query
|
|
601
|
+
* @param tenantSelection the list of tenants to use when executing the query
|
|
595
602
|
* @param pageable the page settings to be used
|
|
596
603
|
* @returns Promise with the result of the query
|
|
597
604
|
*/
|
|
598
|
-
namedQueryPage<T>(entityDefinitionId: string, queryName: string, parameters: QueryParameter[], pageable: Pageable3): Promise<IterablePage3<T>>;
|
|
605
|
+
namedQueryPage<T>(entityDefinitionId: string, queryName: string, parameters: QueryParameter[], tenantSelection: TenantSelection, pageable: Pageable3): Promise<IterablePage3<T>>;
|
|
599
606
|
/**
|
|
600
607
|
* Returns a {@link IterablePage} of entities matching the search text and paging restriction provided in the {@link Pageable} object.
|
|
601
608
|
*
|
|
@@ -618,9 +625,9 @@ declare class AdminEntitiesRepository implements IAdminEntitiesRepository {
|
|
|
618
625
|
findAllSinglePage<T>(entityDefinitionId: string, tenantSelection: TenantSelection, pageable: Pageable3): Promise<Page2<T>>;
|
|
619
626
|
findById<T>(entityDefinitionId: string, id: TenantSpecificId): Promise<T>;
|
|
620
627
|
findByIds<T>(entityDefinitionId: string, ids: TenantSpecificId[]): Promise<T[]>;
|
|
621
|
-
namedQuery<T>(entityDefinitionId: string, queryName: string, parameters: QueryParameter[]): Promise<T>;
|
|
622
|
-
namedQueryPage<T>(entityDefinitionId: string, queryName: string, parameters: QueryParameter[], pageable: Pageable3): Promise<IterablePage3<T>>;
|
|
623
|
-
namedQuerySinglePage<T>(entityDefinitionId: string, queryName: string, parameters: QueryParameter[], pageable: Pageable3): Promise<Page2<T>>;
|
|
628
|
+
namedQuery<T>(entityDefinitionId: string, queryName: string, parameters: QueryParameter[], tenantSelection: TenantSelection): Promise<T>;
|
|
629
|
+
namedQueryPage<T>(entityDefinitionId: string, queryName: string, parameters: QueryParameter[], tenantSelection: TenantSelection, pageable: Pageable3): Promise<IterablePage3<T>>;
|
|
630
|
+
namedQuerySinglePage<T>(entityDefinitionId: string, queryName: string, parameters: QueryParameter[], tenantSelection: TenantSelection, pageable: Pageable3): Promise<Page2<T>>;
|
|
624
631
|
search<T>(entityDefinitionId: string, searchText: string, tenantSelection: TenantSelection, pageable: Pageable3): Promise<IterablePage3<T>>;
|
|
625
632
|
searchSinglePage<T>(entityDefinitionId: string, searchText: string, tenantSelection: TenantSelection, pageable: Pageable3): Promise<Page2<T>>;
|
|
626
633
|
}
|
|
@@ -707,17 +714,19 @@ interface IAdminEntityRepository<T> {
|
|
|
707
714
|
* Executes a named query.
|
|
708
715
|
* @param queryName the name of the function that defines the query
|
|
709
716
|
* @param queryParameters to pass to the query
|
|
717
|
+
* @param tenantSelection the list of tenants to use when executing the query
|
|
710
718
|
* @returns Promise with the result of the query
|
|
711
719
|
*/
|
|
712
|
-
namedQuery<U>(queryName: string, queryParameters: QueryParameter[]): Promise<U>;
|
|
720
|
+
namedQuery<U>(queryName: string, queryParameters: QueryParameter[], tenantSelection: TenantSelection): Promise<U>;
|
|
713
721
|
/**
|
|
714
722
|
* Executes a named query and returns a Page of results.
|
|
715
723
|
* @param queryName the name of the function that defines the query
|
|
716
724
|
* @param queryParameters to pass to the query
|
|
725
|
+
* @param tenantSelection the list of tenants to use when executing the query
|
|
717
726
|
* @param pageable the page settings to be used
|
|
718
727
|
* @returns Promise with the result of the query
|
|
719
728
|
*/
|
|
720
|
-
namedQueryPage<U>(queryName: string, queryParameters: QueryParameter[], pageable: Pageable4): Promise<IterablePage4<U>>;
|
|
729
|
+
namedQueryPage<U>(queryName: string, queryParameters: QueryParameter[], tenantSelection: TenantSelection, pageable: Pageable4): Promise<IterablePage4<U>>;
|
|
721
730
|
/**
|
|
722
731
|
* Returns a {@link Page} of entities matching the search text and paging restriction provided in the {@link Pageable} object.
|
|
723
732
|
*
|
|
@@ -746,8 +755,8 @@ declare class AdminEntityRepository<T> implements IAdminEntityRepository<T> {
|
|
|
746
755
|
findAll(tenantSelection: TenantSelection, pageable: Pageable4): Promise<IterablePage4<T>>;
|
|
747
756
|
findById(id: TenantSpecificId): Promise<T | null>;
|
|
748
757
|
findByIds(ids: TenantSpecificId[]): Promise<T[]>;
|
|
749
|
-
namedQuery<U>(queryName: string, queryParameters: QueryParameter[]): Promise<U>;
|
|
750
|
-
namedQueryPage<U>(queryName: string, queryParameters: QueryParameter[], pageable: Pageable4): Promise<IterablePage4<U>>;
|
|
758
|
+
namedQuery<U>(queryName: string, queryParameters: QueryParameter[], tenantSelection: TenantSelection): Promise<U>;
|
|
759
|
+
namedQueryPage<U>(queryName: string, queryParameters: QueryParameter[], tenantSelection: TenantSelection, pageable: Pageable4): Promise<IterablePage4<U>>;
|
|
751
760
|
search(searchText: string, tenantSelection: TenantSelection, pageable: Pageable4): Promise<IterablePage4<T>>;
|
|
752
761
|
}
|
|
753
762
|
import { KinoticPlugin } from "@kinotic-ai/core";
|
|
@@ -759,4 +768,4 @@ declare const PersistencePlugin: KinoticPlugin<IPersistenceExtension>;
|
|
|
759
768
|
declare module "@kinotic-ai/core" {
|
|
760
769
|
interface KinoticSingleton extends IPersistenceExtension {}
|
|
761
770
|
}
|
|
762
|
-
export { Version, TimeReference, Text, TenantSpecificId, TenantSelection, TenantId, RoleDecorator, Role, QueryParameter, QueryOptions, Query, PrecisionType, Precision, PolicyDecorator, Policy, PersistencePlugin, NotNull, NotIndexed, Nested, MultiTenancyType, Id, IPersistenceExtension, IEntityRepository, IEntitiesRepository, IAdminEntityRepository, IAdminEntitiesRepository, Flattened, EsIndexConfigurationData, EsIndexConfiguration, EntityType, EntityServiceDecoratorsDecorator, EntityServiceDecoratorsConfig, EntityServiceDecorators, EntityServiceDecorator, EntityRepository, Entity, EntitiesRepository, Discriminator, DecoratedFunction, AutoGeneratedId, AdminEntityRepository, AdminEntitiesRepository, APP_API_ZONE, $Role, $Policy };
|
|
771
|
+
export { Version, TimeReference, Text, TenantSpecificId, TenantSelection, TenantId, RoleDecorator, Role, QueryParameter, QueryOptions, Query, PrecisionType, Precision, PolicyDecorator, Policy, PersistencePlugin, NotNull, NotIndexed, Nested, MultiTenancyType, Id, IPersistenceExtension, IEntityRepository, IEntitiesRepository, IAdminEntityRepository, IAdminEntitiesRepository, Flattened, EsIndexConfigurationData, EsIndexConfiguration, EntityType, EntityServiceDecoratorsDecorator, EntityServiceDecoratorsConfig, EntityServiceDecorators, EntityServiceDecorator, EntityRepository, Entity, EntitiesRepository, Discriminator, DecoratedFunction, DateTime, AutoGeneratedId, AdminEntityRepository, AdminEntitiesRepository, APP_API_ZONE, $Role, $Policy };
|
package/dist/index.js
CHANGED
|
@@ -39,6 +39,7 @@ var PrecisionType;
|
|
|
39
39
|
|
|
40
40
|
// packages/persistence/src/api/KinoticPersistenceDecorators.ts
|
|
41
41
|
function AutoGeneratedId(_value, _context) {}
|
|
42
|
+
function DateTime(_value, _context) {}
|
|
42
43
|
function Discriminator(_propertyName) {
|
|
43
44
|
return function(_value, _context) {};
|
|
44
45
|
}
|
|
@@ -219,15 +220,15 @@ class AdminEntitiesRepository {
|
|
|
219
220
|
findByIds(entityDefinitionId, ids) {
|
|
220
221
|
return this.serviceProxy.invoke("findByIds", [entityDefinitionId, ids]);
|
|
221
222
|
}
|
|
222
|
-
namedQuery(entityDefinitionId, queryName, parameters) {
|
|
223
|
-
return this.serviceProxy.invoke("namedQuery", [entityDefinitionId, queryName, parameters]);
|
|
223
|
+
namedQuery(entityDefinitionId, queryName, parameters, tenantSelection) {
|
|
224
|
+
return this.serviceProxy.invoke("namedQuery", [entityDefinitionId, queryName, parameters, tenantSelection]);
|
|
224
225
|
}
|
|
225
|
-
async namedQueryPage(entityDefinitionId, queryName, parameters, pageable) {
|
|
226
|
-
const page = await this.namedQuerySinglePage(entityDefinitionId, queryName, parameters, pageable);
|
|
227
|
-
return new FunctionalIterablePage2(pageable, page, (pageable2) => this.namedQuerySinglePage(entityDefinitionId, queryName, parameters, pageable2));
|
|
226
|
+
async namedQueryPage(entityDefinitionId, queryName, parameters, tenantSelection, pageable) {
|
|
227
|
+
const page = await this.namedQuerySinglePage(entityDefinitionId, queryName, parameters, tenantSelection, pageable);
|
|
228
|
+
return new FunctionalIterablePage2(pageable, page, (pageable2) => this.namedQuerySinglePage(entityDefinitionId, queryName, parameters, tenantSelection, pageable2));
|
|
228
229
|
}
|
|
229
|
-
namedQuerySinglePage(entityDefinitionId, queryName, parameters, pageable) {
|
|
230
|
-
return this.serviceProxy.invoke("namedQueryPage", [entityDefinitionId, queryName, parameters, pageable]);
|
|
230
|
+
namedQuerySinglePage(entityDefinitionId, queryName, parameters, tenantSelection, pageable) {
|
|
231
|
+
return this.serviceProxy.invoke("namedQueryPage", [entityDefinitionId, queryName, parameters, tenantSelection, pageable]);
|
|
231
232
|
}
|
|
232
233
|
async search(entityDefinitionId, searchText, tenantSelection, pageable) {
|
|
233
234
|
const page = await this.searchSinglePage(entityDefinitionId, searchText, tenantSelection, pageable);
|
|
@@ -344,11 +345,11 @@ class AdminEntityRepository {
|
|
|
344
345
|
findByIds(ids) {
|
|
345
346
|
return this.adminEntitiesRepository.findByIds(this.entityId, ids);
|
|
346
347
|
}
|
|
347
|
-
namedQuery(queryName, queryParameters) {
|
|
348
|
-
return this.adminEntitiesRepository.namedQuery(this.entityId, queryName, queryParameters);
|
|
348
|
+
namedQuery(queryName, queryParameters, tenantSelection) {
|
|
349
|
+
return this.adminEntitiesRepository.namedQuery(this.entityId, queryName, queryParameters, tenantSelection);
|
|
349
350
|
}
|
|
350
|
-
namedQueryPage(queryName, queryParameters, pageable) {
|
|
351
|
-
return this.adminEntitiesRepository.namedQueryPage(this.entityId, queryName, queryParameters, pageable);
|
|
351
|
+
namedQueryPage(queryName, queryParameters, tenantSelection, pageable) {
|
|
352
|
+
return this.adminEntitiesRepository.namedQueryPage(this.entityId, queryName, queryParameters, tenantSelection, pageable);
|
|
352
353
|
}
|
|
353
354
|
search(searchText, tenantSelection, pageable) {
|
|
354
355
|
return this.adminEntitiesRepository.search(this.entityId, searchText, tenantSelection, pageable);
|
|
@@ -394,6 +395,7 @@ export {
|
|
|
394
395
|
Entity,
|
|
395
396
|
EntitiesRepository,
|
|
396
397
|
Discriminator,
|
|
398
|
+
DateTime,
|
|
397
399
|
AutoGeneratedId,
|
|
398
400
|
AdminEntityRepository,
|
|
399
401
|
AdminEntitiesRepository,
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@kinotic-ai/persistence",
|
|
3
|
-
"version": "5.0.0-beta.
|
|
3
|
+
"version": "5.0.0-beta.12",
|
|
4
4
|
"type": "module",
|
|
5
5
|
"files": [
|
|
6
6
|
"dist"
|
|
@@ -37,14 +37,14 @@
|
|
|
37
37
|
"coverage": "bun test --coverage --pass-with-no-tests"
|
|
38
38
|
},
|
|
39
39
|
"peerDependencies": {
|
|
40
|
-
"@kinotic-ai/core": "^5.0.0-beta.
|
|
40
|
+
"@kinotic-ai/core": "^5.0.0-beta.17"
|
|
41
41
|
},
|
|
42
42
|
"dependencies": {
|
|
43
43
|
"@kinotic-ai/idl": "5.0.0-beta.1",
|
|
44
44
|
"rxjs": "^7.8.2"
|
|
45
45
|
},
|
|
46
46
|
"devDependencies": {
|
|
47
|
-
"@kinotic-ai/core": "5.0.0-beta.
|
|
47
|
+
"@kinotic-ai/core": "5.0.0-beta.17",
|
|
48
48
|
"@types/node": "^25.3.2",
|
|
49
49
|
"tslib": "^2.8.1",
|
|
50
50
|
"typescript": "^5.9.3"
|