@collective-intelligence/extensions-sdk 0.1.18 → 0.1.19
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.
|
@@ -1,15 +1,19 @@
|
|
|
1
|
-
import type { KnowledgePolicyPredicate } from "../components/knowledge.js";
|
|
1
|
+
import type { KnowledgePolicyDeclaration, KnowledgePolicyPredicate } from "../components/knowledge.js";
|
|
2
2
|
import type { ReadValue } from "./readers.js";
|
|
3
3
|
export declare const policyPredicate: ReadValue<KnowledgePolicyPredicate>;
|
|
4
4
|
export declare const policyBody: ReadValue<Readonly<{
|
|
5
5
|
subjectMatch: KnowledgePolicyPredicate;
|
|
6
6
|
rule?: KnowledgePolicyPredicate;
|
|
7
|
+
writableFields?: readonly (readonly string[])[];
|
|
7
8
|
}> & import("../index.js").JsonObject>;
|
|
9
|
+
/** Only an allow filter policy on entities may hold a field write rule. */
|
|
10
|
+
export declare const fieldWriteRule: <A extends Pick<KnowledgePolicyDeclaration, "effect" | "policyBody" | "policyType" | "targetKind">>(policy: A, path: string) => A;
|
|
8
11
|
export declare const policyFields: {
|
|
9
12
|
effect: ReadValue<"allow" | "deny">;
|
|
10
13
|
policyBody: ReadValue<Readonly<{
|
|
11
14
|
subjectMatch: KnowledgePolicyPredicate;
|
|
12
15
|
rule?: KnowledgePolicyPredicate;
|
|
16
|
+
writableFields?: readonly (readonly string[])[];
|
|
13
17
|
}> & import("../index.js").JsonObject>;
|
|
14
18
|
policyType: ReadValue<"filter" | "gate">;
|
|
15
19
|
targetFqn: ReadValue<string>;
|
|
@@ -309,7 +309,7 @@ export declare const primitives: {
|
|
|
309
309
|
normalizesImportedData?: boolean;
|
|
310
310
|
}> & JsonObject>;
|
|
311
311
|
knowledgeEntitySchema: ReadValue<K.KnowledgeEntitySchemaDeclaration>;
|
|
312
|
-
knowledgePolicy:
|
|
312
|
+
knowledgePolicy: (value: unknown, path: string) => Readonly<{
|
|
313
313
|
description?: string;
|
|
314
314
|
displayName: string;
|
|
315
315
|
fqn: string;
|
|
@@ -324,7 +324,7 @@ export declare const primitives: {
|
|
|
324
324
|
policyType: "filter" | "gate";
|
|
325
325
|
priority?: number;
|
|
326
326
|
targetFqn: string;
|
|
327
|
-
}> & JsonObject
|
|
327
|
+
}> & JsonObject;
|
|
328
328
|
knowledgeRelationAdapter: ReadValue<Readonly<{
|
|
329
329
|
description?: string;
|
|
330
330
|
displayName: string;
|
package/package.json
CHANGED