@kinotic-ai/persistence 1.0.5 → 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 -6
- package/dist/index.d.cts +19 -2
- package/dist/index.d.ts +19 -2
- package/dist/index.js +29 -6
- package/package.json +4 -4
package/dist/index.cjs
CHANGED
|
@@ -45,21 +45,21 @@ __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,
|
|
57
59
|
NotIndexed: () => NotIndexed,
|
|
58
60
|
Nested: () => Nested,
|
|
59
61
|
MultiTenancyType: () => MultiTenancyType,
|
|
60
|
-
KinoticSingleton: () => import_core5.KinoticSingleton,
|
|
61
62
|
KinoticPersistenceDecorator: () => KinoticPersistenceDecorator,
|
|
62
|
-
Kinotic: () => import_core5.Kinotic,
|
|
63
63
|
Id: () => Id,
|
|
64
64
|
Flattened: () => Flattened,
|
|
65
65
|
EsIndexConfigurationData: () => EsIndexConfigurationData,
|
|
@@ -76,7 +76,9 @@ __export(exports_src, {
|
|
|
76
76
|
Discriminator: () => Discriminator,
|
|
77
77
|
AutoGeneratedId: () => AutoGeneratedId,
|
|
78
78
|
AdminEntityService: () => AdminEntityService,
|
|
79
|
-
AdminEntitiesService: () => AdminEntitiesService
|
|
79
|
+
AdminEntitiesService: () => AdminEntitiesService,
|
|
80
|
+
$Role: () => $Role,
|
|
81
|
+
$Policy: () => $Policy
|
|
80
82
|
});
|
|
81
83
|
module.exports = __toCommonJS(exports_src);
|
|
82
84
|
|
|
@@ -234,6 +236,30 @@ class EntityServiceDecoratorsDecorator extends import_idl2.C3Decorator {
|
|
|
234
236
|
class EsIndexConfigurationData {
|
|
235
237
|
componentTemplates = [];
|
|
236
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
|
+
}
|
|
237
263
|
// packages/persistence/src/api/IEntitiesService.ts
|
|
238
264
|
var import_core = require("@kinotic-ai/core");
|
|
239
265
|
|
|
@@ -473,6 +499,3 @@ var PersistencePlugin = {
|
|
|
473
499
|
};
|
|
474
500
|
}
|
|
475
501
|
};
|
|
476
|
-
|
|
477
|
-
// packages/persistence/src/index.ts
|
|
478
|
-
var import_core5 = require("@kinotic-ai/core");
|
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[];
|
|
@@ -749,8 +767,7 @@ interface IPersistenceExtension {
|
|
|
749
767
|
adminEntities: IAdminEntitiesService;
|
|
750
768
|
}
|
|
751
769
|
declare const PersistencePlugin: KinoticPlugin<IPersistenceExtension>;
|
|
752
|
-
import { Kinotic, KinoticSingleton as KinoticSingleton2, IKinotic as IKinotic3, KinoticPlugin as KinoticPlugin2 } from "@kinotic-ai/core";
|
|
753
770
|
declare module "@kinotic-ai/core" {
|
|
754
771
|
interface KinoticSingleton extends IPersistenceExtension {}
|
|
755
772
|
}
|
|
756
|
-
export { Version, TimeReference, Text, TenantSpecificId, TenantSelection, TenantId, Role, QueryParameter, QueryOptions, Query, PrecisionType, PrecisionConfig, Precision, Policy, PersistencePlugin, NotNull, NotIndexed, Nested, MultiTenancyType,
|
|
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[];
|
|
@@ -749,8 +767,7 @@ interface IPersistenceExtension {
|
|
|
749
767
|
adminEntities: IAdminEntitiesService;
|
|
750
768
|
}
|
|
751
769
|
declare const PersistencePlugin: KinoticPlugin<IPersistenceExtension>;
|
|
752
|
-
import { Kinotic, KinoticSingleton as KinoticSingleton2, IKinotic as IKinotic3, KinoticPlugin as KinoticPlugin2 } from "@kinotic-ai/core";
|
|
753
770
|
declare module "@kinotic-ai/core" {
|
|
754
771
|
interface KinoticSingleton extends IPersistenceExtension {}
|
|
755
772
|
}
|
|
756
|
-
export { Version, TimeReference, Text, TenantSpecificId, TenantSelection, TenantId, Role, QueryParameter, QueryOptions, Query, PrecisionType, PrecisionConfig, Precision, Policy, PersistencePlugin, NotNull, NotIndexed, Nested, MultiTenancyType,
|
|
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
|
|
@@ -395,30 +419,27 @@ var PersistencePlugin = {
|
|
|
395
419
|
};
|
|
396
420
|
}
|
|
397
421
|
};
|
|
398
|
-
|
|
399
|
-
// packages/persistence/src/index.ts
|
|
400
|
-
import { Kinotic as Kinotic3, KinoticSingleton } from "@kinotic-ai/core";
|
|
401
422
|
export {
|
|
402
423
|
Version,
|
|
403
424
|
TimeReference,
|
|
404
425
|
Text,
|
|
405
426
|
TenantSpecificId,
|
|
406
427
|
TenantId,
|
|
428
|
+
RoleDecorator,
|
|
407
429
|
Role,
|
|
408
430
|
QueryOptions,
|
|
409
431
|
Query,
|
|
410
432
|
PrecisionType,
|
|
411
433
|
PrecisionConfig,
|
|
412
434
|
Precision,
|
|
435
|
+
PolicyDecorator,
|
|
413
436
|
Policy,
|
|
414
437
|
PersistencePlugin,
|
|
415
438
|
NotNull,
|
|
416
439
|
NotIndexed,
|
|
417
440
|
Nested,
|
|
418
441
|
MultiTenancyType,
|
|
419
|
-
KinoticSingleton,
|
|
420
442
|
KinoticPersistenceDecorator,
|
|
421
|
-
Kinotic3 as Kinotic,
|
|
422
443
|
Id,
|
|
423
444
|
Flattened,
|
|
424
445
|
EsIndexConfigurationData,
|
|
@@ -435,5 +456,7 @@ export {
|
|
|
435
456
|
Discriminator,
|
|
436
457
|
AutoGeneratedId,
|
|
437
458
|
AdminEntityService,
|
|
438
|
-
AdminEntitiesService
|
|
459
|
+
AdminEntitiesService,
|
|
460
|
+
$Role,
|
|
461
|
+
$Policy
|
|
439
462
|
};
|
package/package.json
CHANGED
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@kinotic-ai/persistence",
|
|
3
|
+
"version": "1.0.7",
|
|
3
4
|
"type": "module",
|
|
4
5
|
"files": [
|
|
5
6
|
"dist"
|
|
@@ -32,8 +33,8 @@
|
|
|
32
33
|
"ui-test": "vitest --ui --coverage.enabled=true --mode development"
|
|
33
34
|
},
|
|
34
35
|
"dependencies": {
|
|
35
|
-
"@kinotic-ai/core": "1.0.
|
|
36
|
-
"@kinotic-ai/idl": "1.0.
|
|
36
|
+
"@kinotic-ai/core": "1.0.7",
|
|
37
|
+
"@kinotic-ai/idl": "1.0.7",
|
|
37
38
|
"reflect-metadata": "^0.2.2",
|
|
38
39
|
"rxjs": "^7.8.2"
|
|
39
40
|
},
|
|
@@ -50,6 +51,5 @@
|
|
|
50
51
|
"typescript": {
|
|
51
52
|
"optional": true
|
|
52
53
|
}
|
|
53
|
-
}
|
|
54
|
-
"version": "1.0.5"
|
|
54
|
+
}
|
|
55
55
|
}
|