@kinotic-ai/persistence 1.0.6 → 1.0.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.cjs +29 -1
- package/dist/index.d.cts +19 -1
- package/dist/index.d.ts +19 -1
- package/dist/index.js +29 -1
- package/package.json +3 -3
package/dist/index.cjs
CHANGED
|
@@ -45,12 +45,14 @@ __export(exports_src, {
|
|
|
45
45
|
Text: () => Text,
|
|
46
46
|
TenantSpecificId: () => TenantSpecificId,
|
|
47
47
|
TenantId: () => TenantId,
|
|
48
|
+
RoleDecorator: () => RoleDecorator,
|
|
48
49
|
Role: () => Role,
|
|
49
50
|
QueryOptions: () => QueryOptions,
|
|
50
51
|
Query: () => Query,
|
|
51
52
|
PrecisionType: () => PrecisionType,
|
|
52
53
|
PrecisionConfig: () => PrecisionConfig,
|
|
53
54
|
Precision: () => Precision,
|
|
55
|
+
PolicyDecorator: () => PolicyDecorator,
|
|
54
56
|
Policy: () => Policy,
|
|
55
57
|
PersistencePlugin: () => PersistencePlugin,
|
|
56
58
|
NotNull: () => NotNull,
|
|
@@ -74,7 +76,9 @@ __export(exports_src, {
|
|
|
74
76
|
Discriminator: () => Discriminator,
|
|
75
77
|
AutoGeneratedId: () => AutoGeneratedId,
|
|
76
78
|
AdminEntityService: () => AdminEntityService,
|
|
77
|
-
AdminEntitiesService: () => AdminEntitiesService
|
|
79
|
+
AdminEntitiesService: () => AdminEntitiesService,
|
|
80
|
+
$Role: () => $Role,
|
|
81
|
+
$Policy: () => $Policy
|
|
78
82
|
});
|
|
79
83
|
module.exports = __toCommonJS(exports_src);
|
|
80
84
|
|
|
@@ -232,6 +236,30 @@ class EntityServiceDecoratorsDecorator extends import_idl2.C3Decorator {
|
|
|
232
236
|
class EsIndexConfigurationData {
|
|
233
237
|
componentTemplates = [];
|
|
234
238
|
}
|
|
239
|
+
// packages/persistence/src/api/idl/PolicyDecorator.ts
|
|
240
|
+
class PolicyDecorator extends EntityServiceDecorator {
|
|
241
|
+
policies;
|
|
242
|
+
constructor(policies) {
|
|
243
|
+
super();
|
|
244
|
+
this.type = "PolicyDecorator";
|
|
245
|
+
this.policies = policies;
|
|
246
|
+
}
|
|
247
|
+
}
|
|
248
|
+
function $Policy(policies) {
|
|
249
|
+
return new PolicyDecorator(policies);
|
|
250
|
+
}
|
|
251
|
+
// packages/persistence/src/api/idl/RoleDecorator.ts
|
|
252
|
+
class RoleDecorator extends EntityServiceDecorator {
|
|
253
|
+
roles;
|
|
254
|
+
constructor(roles) {
|
|
255
|
+
super();
|
|
256
|
+
this.type = "RoleDecorator";
|
|
257
|
+
this.roles = roles;
|
|
258
|
+
}
|
|
259
|
+
}
|
|
260
|
+
function $Role(roles) {
|
|
261
|
+
return new RoleDecorator(roles);
|
|
262
|
+
}
|
|
235
263
|
// packages/persistence/src/api/IEntitiesService.ts
|
|
236
264
|
var import_core = require("@kinotic-ai/core");
|
|
237
265
|
|
package/dist/index.d.cts
CHANGED
|
@@ -511,6 +511,24 @@ declare class EntityServiceDecoratorsDecorator extends C3Decorator2 {
|
|
|
511
511
|
config: EntityServiceDecoratorsConfig;
|
|
512
512
|
constructor();
|
|
513
513
|
}
|
|
514
|
+
declare class PolicyDecorator extends EntityServiceDecorator {
|
|
515
|
+
policies: string[][];
|
|
516
|
+
constructor(policies: string[][]);
|
|
517
|
+
}
|
|
518
|
+
/**
|
|
519
|
+
* Provides a mechanism to apply the @Policy decorator to an {@link EntityService}
|
|
520
|
+
* @param policies to be supplied
|
|
521
|
+
*/
|
|
522
|
+
declare function $Policy(policies: string[][]): PolicyDecorator;
|
|
523
|
+
declare class RoleDecorator extends EntityServiceDecorator {
|
|
524
|
+
roles: string[];
|
|
525
|
+
constructor(roles: string[]);
|
|
526
|
+
}
|
|
527
|
+
/**
|
|
528
|
+
* Provides a mechanism to apply the @Role decorator to an {@link EntityService}
|
|
529
|
+
* @param roles to be supplied
|
|
530
|
+
*/
|
|
531
|
+
declare function $Role(roles: string[]): RoleDecorator;
|
|
514
532
|
import { IKinotic as IKinotic2 } from "@kinotic-ai/core";
|
|
515
533
|
import { IServiceProxy as IServiceProxy2, Page as Page2, Pageable as Pageable3, IterablePage as IterablePage3 } from "@kinotic-ai/core";
|
|
516
534
|
type TenantSelection = string[];
|
|
@@ -752,4 +770,4 @@ declare const PersistencePlugin: KinoticPlugin<IPersistenceExtension>;
|
|
|
752
770
|
declare module "@kinotic-ai/core" {
|
|
753
771
|
interface KinoticSingleton extends IPersistenceExtension {}
|
|
754
772
|
}
|
|
755
|
-
export { Version, TimeReference, Text, TenantSpecificId, TenantSelection, TenantId, Role, QueryParameter, QueryOptions, Query, PrecisionType, PrecisionConfig, Precision, Policy, PersistencePlugin, NotNull, NotIndexed, Nested, MultiTenancyType, KinoticPersistenceDecorator, Id, IPersistenceExtension, IEntityService, IEntitiesService, IAdminEntityService, IAdminEntitiesService, Flattened, EsIndexConfigurationData, EsIndexConfiguration, EntityType, EntityServiceDecoratorsDecorator, EntityServiceDecoratorsConfig, EntityServiceDecorators, EntityServiceDecorator, EntityService, EntityConfig, Entity, EntitiesService, DiscriminatorConfig, Discriminator, DecoratedFunction, AutoGeneratedId, AdminEntityService, AdminEntitiesService };
|
|
773
|
+
export { Version, TimeReference, Text, TenantSpecificId, TenantSelection, TenantId, RoleDecorator, Role, QueryParameter, QueryOptions, Query, PrecisionType, PrecisionConfig, Precision, PolicyDecorator, Policy, PersistencePlugin, NotNull, NotIndexed, Nested, MultiTenancyType, KinoticPersistenceDecorator, Id, IPersistenceExtension, IEntityService, IEntitiesService, IAdminEntityService, IAdminEntitiesService, Flattened, EsIndexConfigurationData, EsIndexConfiguration, EntityType, EntityServiceDecoratorsDecorator, EntityServiceDecoratorsConfig, EntityServiceDecorators, EntityServiceDecorator, EntityService, EntityConfig, Entity, EntitiesService, DiscriminatorConfig, Discriminator, DecoratedFunction, AutoGeneratedId, AdminEntityService, AdminEntitiesService, $Role, $Policy };
|
package/dist/index.d.ts
CHANGED
|
@@ -511,6 +511,24 @@ declare class EntityServiceDecoratorsDecorator extends C3Decorator2 {
|
|
|
511
511
|
config: EntityServiceDecoratorsConfig;
|
|
512
512
|
constructor();
|
|
513
513
|
}
|
|
514
|
+
declare class PolicyDecorator extends EntityServiceDecorator {
|
|
515
|
+
policies: string[][];
|
|
516
|
+
constructor(policies: string[][]);
|
|
517
|
+
}
|
|
518
|
+
/**
|
|
519
|
+
* Provides a mechanism to apply the @Policy decorator to an {@link EntityService}
|
|
520
|
+
* @param policies to be supplied
|
|
521
|
+
*/
|
|
522
|
+
declare function $Policy(policies: string[][]): PolicyDecorator;
|
|
523
|
+
declare class RoleDecorator extends EntityServiceDecorator {
|
|
524
|
+
roles: string[];
|
|
525
|
+
constructor(roles: string[]);
|
|
526
|
+
}
|
|
527
|
+
/**
|
|
528
|
+
* Provides a mechanism to apply the @Role decorator to an {@link EntityService}
|
|
529
|
+
* @param roles to be supplied
|
|
530
|
+
*/
|
|
531
|
+
declare function $Role(roles: string[]): RoleDecorator;
|
|
514
532
|
import { IKinotic as IKinotic2 } from "@kinotic-ai/core";
|
|
515
533
|
import { IServiceProxy as IServiceProxy2, Page as Page2, Pageable as Pageable3, IterablePage as IterablePage3 } from "@kinotic-ai/core";
|
|
516
534
|
type TenantSelection = string[];
|
|
@@ -752,4 +770,4 @@ declare const PersistencePlugin: KinoticPlugin<IPersistenceExtension>;
|
|
|
752
770
|
declare module "@kinotic-ai/core" {
|
|
753
771
|
interface KinoticSingleton extends IPersistenceExtension {}
|
|
754
772
|
}
|
|
755
|
-
export { Version, TimeReference, Text, TenantSpecificId, TenantSelection, TenantId, Role, QueryParameter, QueryOptions, Query, PrecisionType, PrecisionConfig, Precision, Policy, PersistencePlugin, NotNull, NotIndexed, Nested, MultiTenancyType, KinoticPersistenceDecorator, Id, IPersistenceExtension, IEntityService, IEntitiesService, IAdminEntityService, IAdminEntitiesService, Flattened, EsIndexConfigurationData, EsIndexConfiguration, EntityType, EntityServiceDecoratorsDecorator, EntityServiceDecoratorsConfig, EntityServiceDecorators, EntityServiceDecorator, EntityService, EntityConfig, Entity, EntitiesService, DiscriminatorConfig, Discriminator, DecoratedFunction, AutoGeneratedId, AdminEntityService, AdminEntitiesService };
|
|
773
|
+
export { Version, TimeReference, Text, TenantSpecificId, TenantSelection, TenantId, RoleDecorator, Role, QueryParameter, QueryOptions, Query, PrecisionType, PrecisionConfig, Precision, PolicyDecorator, Policy, PersistencePlugin, NotNull, NotIndexed, Nested, MultiTenancyType, KinoticPersistenceDecorator, Id, IPersistenceExtension, IEntityService, IEntitiesService, IAdminEntityService, IAdminEntitiesService, Flattened, EsIndexConfigurationData, EsIndexConfiguration, EntityType, EntityServiceDecoratorsDecorator, EntityServiceDecoratorsConfig, EntityServiceDecorators, EntityServiceDecorator, EntityService, EntityConfig, Entity, EntitiesService, DiscriminatorConfig, Discriminator, DecoratedFunction, AutoGeneratedId, AdminEntityService, AdminEntitiesService, $Role, $Policy };
|
package/dist/index.js
CHANGED
|
@@ -152,6 +152,30 @@ class EntityServiceDecoratorsDecorator extends C3Decorator2 {
|
|
|
152
152
|
class EsIndexConfigurationData {
|
|
153
153
|
componentTemplates = [];
|
|
154
154
|
}
|
|
155
|
+
// packages/persistence/src/api/idl/PolicyDecorator.ts
|
|
156
|
+
class PolicyDecorator extends EntityServiceDecorator {
|
|
157
|
+
policies;
|
|
158
|
+
constructor(policies) {
|
|
159
|
+
super();
|
|
160
|
+
this.type = "PolicyDecorator";
|
|
161
|
+
this.policies = policies;
|
|
162
|
+
}
|
|
163
|
+
}
|
|
164
|
+
function $Policy(policies) {
|
|
165
|
+
return new PolicyDecorator(policies);
|
|
166
|
+
}
|
|
167
|
+
// packages/persistence/src/api/idl/RoleDecorator.ts
|
|
168
|
+
class RoleDecorator extends EntityServiceDecorator {
|
|
169
|
+
roles;
|
|
170
|
+
constructor(roles) {
|
|
171
|
+
super();
|
|
172
|
+
this.type = "RoleDecorator";
|
|
173
|
+
this.roles = roles;
|
|
174
|
+
}
|
|
175
|
+
}
|
|
176
|
+
function $Role(roles) {
|
|
177
|
+
return new RoleDecorator(roles);
|
|
178
|
+
}
|
|
155
179
|
// packages/persistence/src/api/IEntitiesService.ts
|
|
156
180
|
import {
|
|
157
181
|
FunctionalIterablePage
|
|
@@ -401,12 +425,14 @@ export {
|
|
|
401
425
|
Text,
|
|
402
426
|
TenantSpecificId,
|
|
403
427
|
TenantId,
|
|
428
|
+
RoleDecorator,
|
|
404
429
|
Role,
|
|
405
430
|
QueryOptions,
|
|
406
431
|
Query,
|
|
407
432
|
PrecisionType,
|
|
408
433
|
PrecisionConfig,
|
|
409
434
|
Precision,
|
|
435
|
+
PolicyDecorator,
|
|
410
436
|
Policy,
|
|
411
437
|
PersistencePlugin,
|
|
412
438
|
NotNull,
|
|
@@ -430,5 +456,7 @@ export {
|
|
|
430
456
|
Discriminator,
|
|
431
457
|
AutoGeneratedId,
|
|
432
458
|
AdminEntityService,
|
|
433
|
-
AdminEntitiesService
|
|
459
|
+
AdminEntitiesService,
|
|
460
|
+
$Role,
|
|
461
|
+
$Policy
|
|
434
462
|
};
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@kinotic-ai/persistence",
|
|
3
|
-
"version": "1.0.
|
|
3
|
+
"version": "1.0.7",
|
|
4
4
|
"type": "module",
|
|
5
5
|
"files": [
|
|
6
6
|
"dist"
|
|
@@ -33,8 +33,8 @@
|
|
|
33
33
|
"ui-test": "vitest --ui --coverage.enabled=true --mode development"
|
|
34
34
|
},
|
|
35
35
|
"dependencies": {
|
|
36
|
-
"@kinotic-ai/core": "1.0.
|
|
37
|
-
"@kinotic-ai/idl": "1.0.
|
|
36
|
+
"@kinotic-ai/core": "1.0.7",
|
|
37
|
+
"@kinotic-ai/idl": "1.0.7",
|
|
38
38
|
"reflect-metadata": "^0.2.2",
|
|
39
39
|
"rxjs": "^7.8.2"
|
|
40
40
|
},
|