@kinotic-ai/persistence 2.0.0 → 3.0.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/index.cjs +4 -2
- package/dist/index.d.cts +10 -5
- package/dist/index.d.ts +10 -5
- package/dist/index.js +4 -2
- package/package.json +3 -3
package/dist/index.cjs
CHANGED
|
@@ -73,6 +73,7 @@ __export(exports_src, {
|
|
|
73
73
|
AutoGeneratedId: () => AutoGeneratedId,
|
|
74
74
|
AdminEntityRepository: () => AdminEntityRepository,
|
|
75
75
|
AdminEntitiesRepository: () => AdminEntitiesRepository,
|
|
76
|
+
APP_API_ZONE: () => APP_API_ZONE,
|
|
76
77
|
$Role: () => $Role,
|
|
77
78
|
$Policy: () => $Policy
|
|
78
79
|
});
|
|
@@ -197,11 +198,12 @@ function $Role(roles) {
|
|
|
197
198
|
}
|
|
198
199
|
// packages/persistence/src/api/IEntitiesRepository.ts
|
|
199
200
|
var import_core = require("@kinotic-ai/core");
|
|
201
|
+
var APP_API_ZONE = "app_api";
|
|
200
202
|
|
|
201
203
|
class EntitiesRepository {
|
|
202
204
|
serviceProxy;
|
|
203
205
|
constructor(kinotic) {
|
|
204
|
-
this.serviceProxy = kinotic.serviceProxy(
|
|
206
|
+
this.serviceProxy = kinotic.serviceProxy(`${APP_API_ZONE}.org.kinotic.persistence.api.services.JsonEntitiesRepository`);
|
|
205
207
|
}
|
|
206
208
|
bulkSave(entityDefinitionId, entities) {
|
|
207
209
|
return this.serviceProxy.invoke("bulkSave", [entityDefinitionId, entities]);
|
|
@@ -267,7 +269,7 @@ var import_core2 = require("@kinotic-ai/core");
|
|
|
267
269
|
class AdminEntitiesRepository {
|
|
268
270
|
serviceProxy;
|
|
269
271
|
constructor(kinotic) {
|
|
270
|
-
this.serviceProxy = kinotic.serviceProxy(
|
|
272
|
+
this.serviceProxy = kinotic.serviceProxy(`${APP_API_ZONE}.org.kinotic.persistence.api.services.AdminJsonEntitiesRepository`);
|
|
271
273
|
}
|
|
272
274
|
count(entityDefinitionId, tenantSelection) {
|
|
273
275
|
return this.serviceProxy.invoke("count", [entityDefinitionId, tenantSelection]);
|
package/dist/index.d.cts
CHANGED
|
@@ -14,7 +14,7 @@ declare class QueryOptions {
|
|
|
14
14
|
pageTimeout: string;
|
|
15
15
|
}
|
|
16
16
|
/**
|
|
17
|
-
* An identifier that can be used to find
|
|
17
|
+
* An identifier that can be used to find an Entity for a specific id and tenant
|
|
18
18
|
*/
|
|
19
19
|
declare class TenantSpecificId {
|
|
20
20
|
/**
|
|
@@ -115,8 +115,8 @@ declare function AutoGeneratedId(_value: undefined, _context: ClassFieldDecorato
|
|
|
115
115
|
*/
|
|
116
116
|
declare function Discriminator(_propertyName: string): (_value: undefined, _context: ClassFieldDecoratorContext) => void;
|
|
117
117
|
/**
|
|
118
|
-
* Signifies that a class is a
|
|
119
|
-
* This is required to define the class as an entity in the
|
|
118
|
+
* Signifies that a class is a Entity.
|
|
119
|
+
* This is required to define the class as an entity in the Kinotic framework.
|
|
120
120
|
* @param multiTenancyType the type of multi-tenancy to use for this entity
|
|
121
121
|
* @param entityType the type of entity to use for this entity
|
|
122
122
|
*/
|
|
@@ -128,7 +128,7 @@ declare function Entity(_multiTenancyType?: MultiTenancyType, _entityType?: Enti
|
|
|
128
128
|
declare function EntityServiceDecorators(_config: EntityServiceDecoratorsConfig): (_value: Function, _context: ClassDecoratorContext<any>) => void;
|
|
129
129
|
/**
|
|
130
130
|
* Provides configuration for the Elasticsearch index.
|
|
131
|
-
* This can be used to override the default index settings and mappings used by
|
|
131
|
+
* This can be used to override the default index settings and mappings used by Kinotic.
|
|
132
132
|
*/
|
|
133
133
|
declare function EsIndexConfiguration(_value: EsIndexConfigurationData): (_target: Function, _context: ClassDecoratorContext<any>) => void;
|
|
134
134
|
declare function Flattened(_value: undefined, _context: ClassFieldDecoratorContext): void;
|
|
@@ -181,6 +181,11 @@ declare class RoleDecorator extends EntityServiceDecorator {
|
|
|
181
181
|
declare function $Role(roles: string[]): RoleDecorator;
|
|
182
182
|
import { IKinotic } from "@kinotic-ai/core";
|
|
183
183
|
import { IServiceProxy, Page, Pageable, IterablePage } from "@kinotic-ai/core";
|
|
184
|
+
/**
|
|
185
|
+
* The zone for the platform's application facing data services, such as entity persistence
|
|
186
|
+
* and named query execution — where the services backing these repositories are hosted.
|
|
187
|
+
*/
|
|
188
|
+
declare const APP_API_ZONE = "app_api";
|
|
184
189
|
interface IEntitiesRepository {
|
|
185
190
|
/**
|
|
186
191
|
* Saves all given entities.
|
|
@@ -755,4 +760,4 @@ declare const PersistencePlugin: KinoticPlugin<IPersistenceExtension>;
|
|
|
755
760
|
declare module "@kinotic-ai/core" {
|
|
756
761
|
interface KinoticSingleton extends IPersistenceExtension {}
|
|
757
762
|
}
|
|
758
|
-
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, $Role, $Policy };
|
|
763
|
+
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 };
|
package/dist/index.d.ts
CHANGED
|
@@ -14,7 +14,7 @@ declare class QueryOptions {
|
|
|
14
14
|
pageTimeout: string;
|
|
15
15
|
}
|
|
16
16
|
/**
|
|
17
|
-
* An identifier that can be used to find
|
|
17
|
+
* An identifier that can be used to find an Entity for a specific id and tenant
|
|
18
18
|
*/
|
|
19
19
|
declare class TenantSpecificId {
|
|
20
20
|
/**
|
|
@@ -115,8 +115,8 @@ declare function AutoGeneratedId(_value: undefined, _context: ClassFieldDecorato
|
|
|
115
115
|
*/
|
|
116
116
|
declare function Discriminator(_propertyName: string): (_value: undefined, _context: ClassFieldDecoratorContext) => void;
|
|
117
117
|
/**
|
|
118
|
-
* Signifies that a class is a
|
|
119
|
-
* This is required to define the class as an entity in the
|
|
118
|
+
* Signifies that a class is a Entity.
|
|
119
|
+
* This is required to define the class as an entity in the Kinotic framework.
|
|
120
120
|
* @param multiTenancyType the type of multi-tenancy to use for this entity
|
|
121
121
|
* @param entityType the type of entity to use for this entity
|
|
122
122
|
*/
|
|
@@ -128,7 +128,7 @@ declare function Entity(_multiTenancyType?: MultiTenancyType, _entityType?: Enti
|
|
|
128
128
|
declare function EntityServiceDecorators(_config: EntityServiceDecoratorsConfig): (_value: Function, _context: ClassDecoratorContext<any>) => void;
|
|
129
129
|
/**
|
|
130
130
|
* Provides configuration for the Elasticsearch index.
|
|
131
|
-
* This can be used to override the default index settings and mappings used by
|
|
131
|
+
* This can be used to override the default index settings and mappings used by Kinotic.
|
|
132
132
|
*/
|
|
133
133
|
declare function EsIndexConfiguration(_value: EsIndexConfigurationData): (_target: Function, _context: ClassDecoratorContext<any>) => void;
|
|
134
134
|
declare function Flattened(_value: undefined, _context: ClassFieldDecoratorContext): void;
|
|
@@ -181,6 +181,11 @@ declare class RoleDecorator extends EntityServiceDecorator {
|
|
|
181
181
|
declare function $Role(roles: string[]): RoleDecorator;
|
|
182
182
|
import { IKinotic } from "@kinotic-ai/core";
|
|
183
183
|
import { IServiceProxy, Page, Pageable, IterablePage } from "@kinotic-ai/core";
|
|
184
|
+
/**
|
|
185
|
+
* The zone for the platform's application facing data services, such as entity persistence
|
|
186
|
+
* and named query execution — where the services backing these repositories are hosted.
|
|
187
|
+
*/
|
|
188
|
+
declare const APP_API_ZONE = "app_api";
|
|
184
189
|
interface IEntitiesRepository {
|
|
185
190
|
/**
|
|
186
191
|
* Saves all given entities.
|
|
@@ -755,4 +760,4 @@ declare const PersistencePlugin: KinoticPlugin<IPersistenceExtension>;
|
|
|
755
760
|
declare module "@kinotic-ai/core" {
|
|
756
761
|
interface KinoticSingleton extends IPersistenceExtension {}
|
|
757
762
|
}
|
|
758
|
-
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, $Role, $Policy };
|
|
763
|
+
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 };
|
package/dist/index.js
CHANGED
|
@@ -119,11 +119,12 @@ function $Role(roles) {
|
|
|
119
119
|
import {
|
|
120
120
|
FunctionalIterablePage
|
|
121
121
|
} from "@kinotic-ai/core";
|
|
122
|
+
var APP_API_ZONE = "app_api";
|
|
122
123
|
|
|
123
124
|
class EntitiesRepository {
|
|
124
125
|
serviceProxy;
|
|
125
126
|
constructor(kinotic) {
|
|
126
|
-
this.serviceProxy = kinotic.serviceProxy(
|
|
127
|
+
this.serviceProxy = kinotic.serviceProxy(`${APP_API_ZONE}.org.kinotic.persistence.api.services.JsonEntitiesRepository`);
|
|
127
128
|
}
|
|
128
129
|
bulkSave(entityDefinitionId, entities) {
|
|
129
130
|
return this.serviceProxy.invoke("bulkSave", [entityDefinitionId, entities]);
|
|
@@ -191,7 +192,7 @@ import {
|
|
|
191
192
|
class AdminEntitiesRepository {
|
|
192
193
|
serviceProxy;
|
|
193
194
|
constructor(kinotic) {
|
|
194
|
-
this.serviceProxy = kinotic.serviceProxy(
|
|
195
|
+
this.serviceProxy = kinotic.serviceProxy(`${APP_API_ZONE}.org.kinotic.persistence.api.services.AdminJsonEntitiesRepository`);
|
|
195
196
|
}
|
|
196
197
|
count(entityDefinitionId, tenantSelection) {
|
|
197
198
|
return this.serviceProxy.invoke("count", [entityDefinitionId, tenantSelection]);
|
|
@@ -396,6 +397,7 @@ export {
|
|
|
396
397
|
AutoGeneratedId,
|
|
397
398
|
AdminEntityRepository,
|
|
398
399
|
AdminEntitiesRepository,
|
|
400
|
+
APP_API_ZONE,
|
|
399
401
|
$Role,
|
|
400
402
|
$Policy
|
|
401
403
|
};
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@kinotic-ai/persistence",
|
|
3
|
-
"version": "
|
|
3
|
+
"version": "3.0.0",
|
|
4
4
|
"type": "module",
|
|
5
5
|
"files": [
|
|
6
6
|
"dist"
|
|
@@ -32,14 +32,14 @@
|
|
|
32
32
|
"coverage": "bun test --coverage --pass-with-no-tests"
|
|
33
33
|
},
|
|
34
34
|
"peerDependencies": {
|
|
35
|
-
"@kinotic-ai/core": ">=
|
|
35
|
+
"@kinotic-ai/core": ">=3.0.0"
|
|
36
36
|
},
|
|
37
37
|
"dependencies": {
|
|
38
38
|
"@kinotic-ai/idl": "1.0.10",
|
|
39
39
|
"rxjs": "^7.8.2"
|
|
40
40
|
},
|
|
41
41
|
"devDependencies": {
|
|
42
|
-
"@kinotic-ai/core": "
|
|
42
|
+
"@kinotic-ai/core": "3.0.0",
|
|
43
43
|
"@types/node": "^25.3.2",
|
|
44
44
|
"tslib": "^2.8.1",
|
|
45
45
|
"typescript": "^5.9.3"
|