@fabricorg/platform 0.1.2 → 0.2.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/actions/index.cjs +48 -0
- package/dist/actions/index.cjs.map +1 -0
- package/dist/actions/index.d.cts +116 -0
- package/dist/adapters/index.cjs +28 -0
- package/dist/adapters/index.cjs.map +1 -0
- package/dist/adapters/index.d.cts +83 -0
- package/dist/chunk-7KJHGAZY.cjs +99 -0
- package/dist/chunk-7KJHGAZY.cjs.map +1 -0
- package/dist/chunk-GB2PSZ33.cjs +74 -0
- package/dist/chunk-GB2PSZ33.cjs.map +1 -0
- package/dist/chunk-JAXDEK5Z.cjs +63 -0
- package/dist/chunk-JAXDEK5Z.cjs.map +1 -0
- package/dist/chunk-KQEBNUZI.cjs +70 -0
- package/dist/chunk-KQEBNUZI.cjs.map +1 -0
- package/dist/chunk-LHCSVEFT.cjs +8 -0
- package/dist/chunk-LHCSVEFT.cjs.map +1 -0
- package/dist/chunk-LYX73U3P.cjs +195 -0
- package/dist/chunk-LYX73U3P.cjs.map +1 -0
- package/dist/chunk-LZSE6QGQ.cjs +60 -0
- package/dist/chunk-LZSE6QGQ.cjs.map +1 -0
- package/dist/chunk-NPVIFZQV.cjs +107 -0
- package/dist/chunk-NPVIFZQV.cjs.map +1 -0
- package/dist/chunk-PG5LYTUX.cjs +4 -0
- package/dist/chunk-PG5LYTUX.cjs.map +1 -0
- package/dist/chunk-Q3WYIWCN.cjs +183 -0
- package/dist/chunk-Q3WYIWCN.cjs.map +1 -0
- package/dist/chunk-QETQGAXJ.cjs +35 -0
- package/dist/chunk-QETQGAXJ.cjs.map +1 -0
- package/dist/chunk-SDXDHVTV.cjs +555 -0
- package/dist/chunk-SDXDHVTV.cjs.map +1 -0
- package/dist/chunk-YZKUEC2J.cjs +31 -0
- package/dist/chunk-YZKUEC2J.cjs.map +1 -0
- package/dist/displays/index.cjs +24 -0
- package/dist/displays/index.cjs.map +1 -0
- package/dist/displays/index.d.cts +34 -0
- package/dist/events/index.cjs +36 -0
- package/dist/events/index.cjs.map +1 -0
- package/dist/events/index.d.cts +35 -0
- package/dist/evidence/index.cjs +6 -0
- package/dist/evidence/index.cjs.map +1 -0
- package/dist/evidence/index.d.cts +43 -0
- package/dist/ids/index.cjs +24 -0
- package/dist/ids/index.cjs.map +1 -0
- package/dist/ids/index.d.cts +19 -0
- package/dist/index.cjs +268 -0
- package/dist/index.cjs.map +1 -0
- package/dist/index.d.cts +13 -0
- package/dist/modules/index.cjs +42 -0
- package/dist/modules/index.cjs.map +1 -0
- package/dist/modules/index.d.cts +73 -0
- package/dist/objects/index.cjs +24 -0
- package/dist/objects/index.cjs.map +1 -0
- package/dist/objects/index.d.cts +7 -0
- package/dist/policies/index.cjs +48 -0
- package/dist/policies/index.cjs.map +1 -0
- package/dist/policies/index.d.cts +143 -0
- package/dist/privacy/index.cjs +12 -0
- package/dist/privacy/index.cjs.map +1 -0
- package/dist/privacy/index.d.cts +77 -0
- package/dist/projections/index.cjs +12 -0
- package/dist/projections/index.cjs.map +1 -0
- package/dist/projections/index.d.cts +52 -0
- package/dist/state-machines/index.cjs +32 -0
- package/dist/state-machines/index.cjs.map +1 -0
- package/dist/state-machines/index.d.cts +60 -0
- package/dist/testing/index.cjs +21 -0
- package/dist/testing/index.cjs.map +1 -0
- package/dist/testing/index.d.cts +19 -0
- package/package.json +196 -111
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":[],"names":[],"mappings":"","file":"index.cjs"}
|
package/dist/index.d.cts
ADDED
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
export { ACTOR_TYPES, ActionContext, ActionDefinition, ActionHandler, ActionId, ActionResult, ActionStateMachineBinding, ActionStatus, ActorType, AdapterStep, AdapterStepRetryPolicy, FabricRuntimeServices, SagaChildActionInput, SagaCompletion, SagaCompletionEvent, SagaContext, SagaImplementation, SagaRunChild, SchemaParseIssue, SchemaParseResult, SchemaValidator, assertActionId, assertActorType, getRegisteredActionIds, isActorType, isRegisteredActionId, registerAction, registerActionIfMissing, resolveAction, resolveRegisteredAction } from './actions/index.cjs';
|
|
2
|
+
export { AdapterAttempt, AdapterCircuitBreakerConfig, AdapterExecutionContext, AdapterExecutionResult, AdapterExecutor, AdapterImplementation, AdapterRegistry, AdapterRetryPolicy, ExecuteWithRetryOptions, MissingAdapterRegistrationError, ResolvedAdapterRetryPolicy, executeWithAdapterRetry, getRetryDelayMs, resolveAdapterRetryPolicy } from './adapters/index.cjs';
|
|
3
|
+
export { AssetEventActorType, AssetEventEnvelope, AssetEventSubjectType, AssetEventType, EventTypeRegistry, createEventTypeRegistry, getRegisteredEventTypes, getRegisteredSubjectTypes, isValidEventType, isValidSubjectType, registerEventType, registerSubjectType } from './events/index.cjs';
|
|
4
|
+
export { FABRIC_ID_PREFIXES, FabricIdPrefix, createFabricId, isFabricId, parseFabricId } from './ids/index.cjs';
|
|
5
|
+
export { EventTypeRegistration, EventTypeRegistrationInput, FabricModule, IdPrefixRegistration, ModuleDependency, ModuleDependencyInput, ModuleDisplayRendererRegistration, ModuleRegistry, ObjectTypeRegistration, ObjectTypeRegistrationInput, PolicyRegistration, StateMachineRegistration, createModuleRegistry, getEventTypeName, getModuleDependencyNamespace, getObjectTypeName, registerFabricModule, registerFabricModules, validateModuleNamespace } from './modules/index.cjs';
|
|
6
|
+
export { FabricObjectType, assertObjectType, getRegisteredObjectTypes, isValidObjectType, registerObjectType } from './objects/index.cjs';
|
|
7
|
+
export { DataPolicyComparisonOperator, DataPolicyCondition, DataPolicyConditionResult, DataPolicyDefinition, DataPolicyLiteral, DataPolicySource, DataPolicySourceReference, DataPolicyValidationResult, PolicyContext, PolicyDispatchEvidence, PolicyEvaluationMode, PolicyEvaluationResult, PolicyEvaluator, PolicyFallbackDefinition, PolicyFallbackTrigger, PolicyId, PolicyKind, PolicyOutcome, RuntimePolicyDefinition, aggregatePolicyOutcomes, assertPolicyId, evaluatePolicyDefinition, evaluatePolicyDefinitions, evaluateRegisteredPolicies, getRegisteredPolicyIds, registerPolicy, registerPolicyIfMissing, resolvePolicy, validateDataPolicyDefinition } from './policies/index.cjs';
|
|
8
|
+
export { StateClass, StateDefinition, StateMachineDatabaseClient, StateMachineDefinition, TransitionContext, getAllowedTransitions, getEntityStateClass, registerStateMachine, registerStateMachineIfMissing, resolveStateMachine, validateTransition } from './state-machines/index.cjs';
|
|
9
|
+
export { ReplayEventsOptions, ReplayEventsResult, ReplayScope, ReplaySnapshot, ReplayWarning, ReplayWarningCode, ReplayableAssetEvent, replayEvents } from './projections/index.cjs';
|
|
10
|
+
export { CachedDisplayDescriptor, DisplayContext, DisplayDatabaseClient, DisplayDescriptor, DisplayRenderer, DisplayRendererRegistration, denormalizeDisplaySnapshot, registerDisplayRenderer, renderEventDisplay, resolveDisplayRenderer } from './displays/index.cjs';
|
|
11
|
+
export { AnalyticsDataContract, AnalyticsDataContractSource, AnalyticsEligibilityDecision, AnonymizationContext, AnonymizationFieldMetadata, AnonymizationMetadata, AnonymizationResult, DataClassificationRule, PLATFORM_PRIVACY_POLICY_VERSION, PlatformDataClass, RedactionMethod, RedactionRule, RetentionRule } from './privacy/index.cjs';
|
|
12
|
+
export { EvidenceGenerationContext, EvidencePacketEnvelope, EvidencePacketReference, EvidencePacketStatus, EvidencePacketSubject, EvidenceRenderer } from './evidence/index.cjs';
|
|
13
|
+
export { FakeActionContextOptions, createDeterministicIdFactory, createFakeActionContext, createInMemoryAdapterRegistry } from './testing/index.cjs';
|
|
@@ -0,0 +1,42 @@
|
|
|
1
|
+
'use strict';
|
|
2
|
+
|
|
3
|
+
var chunkLYX73U3P_cjs = require('../chunk-LYX73U3P.cjs');
|
|
4
|
+
require('../chunk-QETQGAXJ.cjs');
|
|
5
|
+
require('../chunk-SDXDHVTV.cjs');
|
|
6
|
+
require('../chunk-GB2PSZ33.cjs');
|
|
7
|
+
require('../chunk-KQEBNUZI.cjs');
|
|
8
|
+
require('../chunk-7KJHGAZY.cjs');
|
|
9
|
+
require('../chunk-JAXDEK5Z.cjs');
|
|
10
|
+
|
|
11
|
+
|
|
12
|
+
|
|
13
|
+
Object.defineProperty(exports, "createModuleRegistry", {
|
|
14
|
+
enumerable: true,
|
|
15
|
+
get: function () { return chunkLYX73U3P_cjs.createModuleRegistry; }
|
|
16
|
+
});
|
|
17
|
+
Object.defineProperty(exports, "getEventTypeName", {
|
|
18
|
+
enumerable: true,
|
|
19
|
+
get: function () { return chunkLYX73U3P_cjs.getEventTypeName; }
|
|
20
|
+
});
|
|
21
|
+
Object.defineProperty(exports, "getModuleDependencyNamespace", {
|
|
22
|
+
enumerable: true,
|
|
23
|
+
get: function () { return chunkLYX73U3P_cjs.getModuleDependencyNamespace; }
|
|
24
|
+
});
|
|
25
|
+
Object.defineProperty(exports, "getObjectTypeName", {
|
|
26
|
+
enumerable: true,
|
|
27
|
+
get: function () { return chunkLYX73U3P_cjs.getObjectTypeName; }
|
|
28
|
+
});
|
|
29
|
+
Object.defineProperty(exports, "registerFabricModule", {
|
|
30
|
+
enumerable: true,
|
|
31
|
+
get: function () { return chunkLYX73U3P_cjs.registerFabricModule; }
|
|
32
|
+
});
|
|
33
|
+
Object.defineProperty(exports, "registerFabricModules", {
|
|
34
|
+
enumerable: true,
|
|
35
|
+
get: function () { return chunkLYX73U3P_cjs.registerFabricModules; }
|
|
36
|
+
});
|
|
37
|
+
Object.defineProperty(exports, "validateModuleNamespace", {
|
|
38
|
+
enumerable: true,
|
|
39
|
+
get: function () { return chunkLYX73U3P_cjs.validateModuleNamespace; }
|
|
40
|
+
});
|
|
41
|
+
//# sourceMappingURL=index.cjs.map
|
|
42
|
+
//# sourceMappingURL=index.cjs.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":[],"names":[],"mappings":"","file":"index.cjs"}
|
|
@@ -0,0 +1,73 @@
|
|
|
1
|
+
import { ActionDefinition } from '../actions/index.cjs';
|
|
2
|
+
|
|
3
|
+
interface ModuleDependency {
|
|
4
|
+
namespace: string;
|
|
5
|
+
version?: string;
|
|
6
|
+
optional?: boolean;
|
|
7
|
+
}
|
|
8
|
+
type ModuleDependencyInput = string | ModuleDependency;
|
|
9
|
+
interface IdPrefixRegistration {
|
|
10
|
+
prefix: string;
|
|
11
|
+
name: string;
|
|
12
|
+
module: string;
|
|
13
|
+
}
|
|
14
|
+
interface EventTypeRegistration {
|
|
15
|
+
eventType: string;
|
|
16
|
+
schemaVersion: number;
|
|
17
|
+
description?: string;
|
|
18
|
+
}
|
|
19
|
+
type EventTypeRegistrationInput = string | EventTypeRegistration;
|
|
20
|
+
interface ObjectTypeRegistration {
|
|
21
|
+
type: string;
|
|
22
|
+
displayName?: string;
|
|
23
|
+
idPrefix?: string;
|
|
24
|
+
isCoreModuleType?: boolean;
|
|
25
|
+
}
|
|
26
|
+
type ObjectTypeRegistrationInput = string | ObjectTypeRegistration;
|
|
27
|
+
interface ModuleDisplayRendererRegistration {
|
|
28
|
+
eventType: string;
|
|
29
|
+
renderer: (payload: unknown, ctx?: any) => unknown;
|
|
30
|
+
}
|
|
31
|
+
interface PolicyRegistration {
|
|
32
|
+
id: string;
|
|
33
|
+
version?: string;
|
|
34
|
+
description?: string;
|
|
35
|
+
}
|
|
36
|
+
interface StateMachineRegistration {
|
|
37
|
+
entityType: string;
|
|
38
|
+
states: string[];
|
|
39
|
+
}
|
|
40
|
+
interface FabricModule<TDb = unknown> {
|
|
41
|
+
namespace: string;
|
|
42
|
+
version?: string;
|
|
43
|
+
displayName?: string;
|
|
44
|
+
description?: string;
|
|
45
|
+
dependencies?: ModuleDependencyInput[];
|
|
46
|
+
objectTypes?: ObjectTypeRegistrationInput[];
|
|
47
|
+
subjectTypes?: string[];
|
|
48
|
+
idPrefixes?: IdPrefixRegistration[];
|
|
49
|
+
eventTypes?: EventTypeRegistrationInput[];
|
|
50
|
+
actions?: ActionDefinition<TDb>[];
|
|
51
|
+
policies?: unknown[];
|
|
52
|
+
stateMachines?: unknown[];
|
|
53
|
+
displayRenderers?: ModuleDisplayRendererRegistration[];
|
|
54
|
+
adapterDefinitions?: unknown[];
|
|
55
|
+
permissions?: unknown[];
|
|
56
|
+
roles?: unknown[];
|
|
57
|
+
redactionRules?: unknown[];
|
|
58
|
+
dataClassifications?: unknown[];
|
|
59
|
+
retentionRules?: unknown[];
|
|
60
|
+
evidenceRenderers?: unknown[];
|
|
61
|
+
}
|
|
62
|
+
interface ModuleRegistry<TDb = unknown> {
|
|
63
|
+
modules: ReadonlyMap<string, FabricModule<TDb>>;
|
|
64
|
+
}
|
|
65
|
+
declare function getModuleDependencyNamespace(dependency: ModuleDependencyInput): string;
|
|
66
|
+
declare function getObjectTypeName(objectType: ObjectTypeRegistrationInput): string;
|
|
67
|
+
declare function getEventTypeName(eventType: EventTypeRegistrationInput): string;
|
|
68
|
+
declare function validateModuleNamespace(namespace: string): void;
|
|
69
|
+
declare function createModuleRegistry<TDb = unknown>(modules?: FabricModule<TDb>[]): ModuleRegistry<TDb>;
|
|
70
|
+
declare function registerFabricModule(module: FabricModule<any>): void;
|
|
71
|
+
declare function registerFabricModules(modules: FabricModule<any>[]): FabricModule<any>[];
|
|
72
|
+
|
|
73
|
+
export { type EventTypeRegistration, type EventTypeRegistrationInput, type FabricModule, type IdPrefixRegistration, type ModuleDependency, type ModuleDependencyInput, type ModuleDisplayRendererRegistration, type ModuleRegistry, type ObjectTypeRegistration, type ObjectTypeRegistrationInput, type PolicyRegistration, type StateMachineRegistration, createModuleRegistry, getEventTypeName, getModuleDependencyNamespace, getObjectTypeName, registerFabricModule, registerFabricModules, validateModuleNamespace };
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
'use strict';
|
|
2
|
+
|
|
3
|
+
var chunkQETQGAXJ_cjs = require('../chunk-QETQGAXJ.cjs');
|
|
4
|
+
|
|
5
|
+
|
|
6
|
+
|
|
7
|
+
Object.defineProperty(exports, "assertObjectType", {
|
|
8
|
+
enumerable: true,
|
|
9
|
+
get: function () { return chunkQETQGAXJ_cjs.assertObjectType; }
|
|
10
|
+
});
|
|
11
|
+
Object.defineProperty(exports, "getRegisteredObjectTypes", {
|
|
12
|
+
enumerable: true,
|
|
13
|
+
get: function () { return chunkQETQGAXJ_cjs.getRegisteredObjectTypes; }
|
|
14
|
+
});
|
|
15
|
+
Object.defineProperty(exports, "isValidObjectType", {
|
|
16
|
+
enumerable: true,
|
|
17
|
+
get: function () { return chunkQETQGAXJ_cjs.isValidObjectType; }
|
|
18
|
+
});
|
|
19
|
+
Object.defineProperty(exports, "registerObjectType", {
|
|
20
|
+
enumerable: true,
|
|
21
|
+
get: function () { return chunkQETQGAXJ_cjs.registerObjectType; }
|
|
22
|
+
});
|
|
23
|
+
//# sourceMappingURL=index.cjs.map
|
|
24
|
+
//# sourceMappingURL=index.cjs.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":[],"names":[],"mappings":"","file":"index.cjs"}
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
type FabricObjectType = string;
|
|
2
|
+
declare function assertObjectType(type: string): asserts type is FabricObjectType;
|
|
3
|
+
declare function registerObjectType(type: string): void;
|
|
4
|
+
declare function isValidObjectType(type: string): boolean;
|
|
5
|
+
declare function getRegisteredObjectTypes(): string[];
|
|
6
|
+
|
|
7
|
+
export { type FabricObjectType, assertObjectType, getRegisteredObjectTypes, isValidObjectType, registerObjectType };
|
|
@@ -0,0 +1,48 @@
|
|
|
1
|
+
'use strict';
|
|
2
|
+
|
|
3
|
+
var chunkSDXDHVTV_cjs = require('../chunk-SDXDHVTV.cjs');
|
|
4
|
+
|
|
5
|
+
|
|
6
|
+
|
|
7
|
+
Object.defineProperty(exports, "aggregatePolicyOutcomes", {
|
|
8
|
+
enumerable: true,
|
|
9
|
+
get: function () { return chunkSDXDHVTV_cjs.aggregatePolicyOutcomes; }
|
|
10
|
+
});
|
|
11
|
+
Object.defineProperty(exports, "assertPolicyId", {
|
|
12
|
+
enumerable: true,
|
|
13
|
+
get: function () { return chunkSDXDHVTV_cjs.assertPolicyId; }
|
|
14
|
+
});
|
|
15
|
+
Object.defineProperty(exports, "evaluatePolicyDefinition", {
|
|
16
|
+
enumerable: true,
|
|
17
|
+
get: function () { return chunkSDXDHVTV_cjs.evaluatePolicyDefinition; }
|
|
18
|
+
});
|
|
19
|
+
Object.defineProperty(exports, "evaluatePolicyDefinitions", {
|
|
20
|
+
enumerable: true,
|
|
21
|
+
get: function () { return chunkSDXDHVTV_cjs.evaluatePolicyDefinitions; }
|
|
22
|
+
});
|
|
23
|
+
Object.defineProperty(exports, "evaluateRegisteredPolicies", {
|
|
24
|
+
enumerable: true,
|
|
25
|
+
get: function () { return chunkSDXDHVTV_cjs.evaluateRegisteredPolicies; }
|
|
26
|
+
});
|
|
27
|
+
Object.defineProperty(exports, "getRegisteredPolicyIds", {
|
|
28
|
+
enumerable: true,
|
|
29
|
+
get: function () { return chunkSDXDHVTV_cjs.getRegisteredPolicyIds; }
|
|
30
|
+
});
|
|
31
|
+
Object.defineProperty(exports, "registerPolicy", {
|
|
32
|
+
enumerable: true,
|
|
33
|
+
get: function () { return chunkSDXDHVTV_cjs.registerPolicy; }
|
|
34
|
+
});
|
|
35
|
+
Object.defineProperty(exports, "registerPolicyIfMissing", {
|
|
36
|
+
enumerable: true,
|
|
37
|
+
get: function () { return chunkSDXDHVTV_cjs.registerPolicyIfMissing; }
|
|
38
|
+
});
|
|
39
|
+
Object.defineProperty(exports, "resolvePolicy", {
|
|
40
|
+
enumerable: true,
|
|
41
|
+
get: function () { return chunkSDXDHVTV_cjs.resolvePolicy; }
|
|
42
|
+
});
|
|
43
|
+
Object.defineProperty(exports, "validateDataPolicyDefinition", {
|
|
44
|
+
enumerable: true,
|
|
45
|
+
get: function () { return chunkSDXDHVTV_cjs.validateDataPolicyDefinition; }
|
|
46
|
+
});
|
|
47
|
+
//# sourceMappingURL=index.cjs.map
|
|
48
|
+
//# sourceMappingURL=index.cjs.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":[],"names":[],"mappings":"","file":"index.cjs"}
|
|
@@ -0,0 +1,143 @@
|
|
|
1
|
+
type PolicyEvaluationResult = "pass" | "warn" | "block";
|
|
2
|
+
type PolicyKind = "code" | "data" | "hybrid";
|
|
3
|
+
type PolicyId = `${string}.v${number}`;
|
|
4
|
+
type PolicyEvaluationMode = "preview" | "execute";
|
|
5
|
+
declare function assertPolicyId(policyId: string): asserts policyId is PolicyId;
|
|
6
|
+
interface PolicyContext<TDb = unknown> {
|
|
7
|
+
tenantId: string;
|
|
8
|
+
spaceId: string;
|
|
9
|
+
actionInvocationId: string;
|
|
10
|
+
actionId: string;
|
|
11
|
+
parameters: unknown;
|
|
12
|
+
db: TDb;
|
|
13
|
+
now?: Date;
|
|
14
|
+
mode?: PolicyEvaluationMode;
|
|
15
|
+
}
|
|
16
|
+
interface PolicyOutcome {
|
|
17
|
+
policyId: PolicyId;
|
|
18
|
+
policyVersion: number;
|
|
19
|
+
policyKind?: PolicyKind;
|
|
20
|
+
result: PolicyEvaluationResult;
|
|
21
|
+
reason?: string;
|
|
22
|
+
metadata?: Record<string, unknown>;
|
|
23
|
+
dispatchEvidence?: PolicyDispatchEvidence;
|
|
24
|
+
}
|
|
25
|
+
interface PolicyEvaluator<TDb = unknown> {
|
|
26
|
+
policyId: PolicyId;
|
|
27
|
+
version: number;
|
|
28
|
+
kind?: Extract<PolicyKind, "code">;
|
|
29
|
+
previewSafe?: boolean;
|
|
30
|
+
evaluate: (ctx: PolicyContext<TDb>) => Promise<PolicyOutcome>;
|
|
31
|
+
}
|
|
32
|
+
type DataPolicySource = "parameters" | "context";
|
|
33
|
+
type DataPolicyLiteral = string | number | boolean | null;
|
|
34
|
+
type DataPolicyComparisonOperator = "exists" | "equals" | "notEquals" | "gt" | "gte" | "lt" | "lte";
|
|
35
|
+
interface DataPolicySourceReference {
|
|
36
|
+
source: DataPolicySource;
|
|
37
|
+
path: string;
|
|
38
|
+
}
|
|
39
|
+
type DataPolicyCondition = {
|
|
40
|
+
conditionId: string;
|
|
41
|
+
type: "always";
|
|
42
|
+
result: PolicyEvaluationResult;
|
|
43
|
+
reason?: string;
|
|
44
|
+
} | {
|
|
45
|
+
conditionId: string;
|
|
46
|
+
type: "parameter";
|
|
47
|
+
path: string;
|
|
48
|
+
operator: DataPolicyComparisonOperator;
|
|
49
|
+
value?: DataPolicyLiteral;
|
|
50
|
+
onPass?: PolicyEvaluationResult;
|
|
51
|
+
onFail?: PolicyEvaluationResult;
|
|
52
|
+
reason?: string;
|
|
53
|
+
} | {
|
|
54
|
+
conditionId: string;
|
|
55
|
+
type: "comparison";
|
|
56
|
+
left: DataPolicySourceReference;
|
|
57
|
+
operator: DataPolicyComparisonOperator;
|
|
58
|
+
value?: DataPolicyLiteral;
|
|
59
|
+
onPass?: PolicyEvaluationResult;
|
|
60
|
+
onFail?: PolicyEvaluationResult;
|
|
61
|
+
reason?: string;
|
|
62
|
+
} | {
|
|
63
|
+
conditionId: string;
|
|
64
|
+
type: "all" | "any";
|
|
65
|
+
conditions: DataPolicyCondition[];
|
|
66
|
+
onPass?: PolicyEvaluationResult;
|
|
67
|
+
onFail?: PolicyEvaluationResult;
|
|
68
|
+
reason?: string;
|
|
69
|
+
} | {
|
|
70
|
+
conditionId: string;
|
|
71
|
+
type: "not";
|
|
72
|
+
condition: DataPolicyCondition;
|
|
73
|
+
onPass?: PolicyEvaluationResult;
|
|
74
|
+
onFail?: PolicyEvaluationResult;
|
|
75
|
+
reason?: string;
|
|
76
|
+
};
|
|
77
|
+
interface DataPolicyDefinition {
|
|
78
|
+
conditions: DataPolicyCondition[];
|
|
79
|
+
defaultResult?: PolicyEvaluationResult;
|
|
80
|
+
reason?: string;
|
|
81
|
+
}
|
|
82
|
+
interface DataPolicyValidationResult {
|
|
83
|
+
valid: boolean;
|
|
84
|
+
errors: string[];
|
|
85
|
+
}
|
|
86
|
+
interface PolicyFallbackDefinition {
|
|
87
|
+
codeEvaluatorPolicyId: PolicyId;
|
|
88
|
+
onResults?: PolicyEvaluationResult[];
|
|
89
|
+
triggers?: PolicyFallbackTrigger[];
|
|
90
|
+
reason?: string;
|
|
91
|
+
}
|
|
92
|
+
type PolicyFallbackTrigger = "data_result" | "missing_data_definition" | "invalid_data_definition";
|
|
93
|
+
interface DataPolicyConditionResult {
|
|
94
|
+
conditionId: string;
|
|
95
|
+
passed: boolean;
|
|
96
|
+
result: PolicyEvaluationResult;
|
|
97
|
+
reason?: string;
|
|
98
|
+
}
|
|
99
|
+
interface RuntimePolicyDefinition {
|
|
100
|
+
policyId: PolicyId;
|
|
101
|
+
policyVersion: number;
|
|
102
|
+
kind: PolicyKind;
|
|
103
|
+
dataDefinition?: DataPolicyDefinition;
|
|
104
|
+
codeEvaluatorPolicyId?: PolicyId;
|
|
105
|
+
fallback?: PolicyFallbackDefinition;
|
|
106
|
+
}
|
|
107
|
+
interface PolicyDispatchEvidence {
|
|
108
|
+
policyKind: PolicyKind;
|
|
109
|
+
policyId?: PolicyId;
|
|
110
|
+
policyVersion?: number;
|
|
111
|
+
dispatchPath: Array<"data" | "code" | "fallback">;
|
|
112
|
+
data?: {
|
|
113
|
+
definitionVersion: number;
|
|
114
|
+
definitionStatus: "evaluated" | "missing" | "invalid";
|
|
115
|
+
conditionResults: DataPolicyConditionResult[];
|
|
116
|
+
validationErrors?: string[];
|
|
117
|
+
};
|
|
118
|
+
code?: {
|
|
119
|
+
requestedPolicyId?: PolicyId;
|
|
120
|
+
policyId: PolicyId;
|
|
121
|
+
version?: number;
|
|
122
|
+
registered: boolean;
|
|
123
|
+
};
|
|
124
|
+
fallback?: {
|
|
125
|
+
used: boolean;
|
|
126
|
+
trigger: PolicyFallbackTrigger | "not_triggered";
|
|
127
|
+
reason: string;
|
|
128
|
+
fromResult?: PolicyEvaluationResult;
|
|
129
|
+
definitionVersion: number;
|
|
130
|
+
codeEvaluatorPolicyId: PolicyId;
|
|
131
|
+
};
|
|
132
|
+
}
|
|
133
|
+
declare function registerPolicy(evaluator: PolicyEvaluator): void;
|
|
134
|
+
declare function registerPolicyIfMissing(evaluator: PolicyEvaluator): void;
|
|
135
|
+
declare function resolvePolicy(policyId: PolicyId): PolicyEvaluator | undefined;
|
|
136
|
+
declare function getRegisteredPolicyIds(): PolicyId[];
|
|
137
|
+
declare function evaluateRegisteredPolicies(policyIds: PolicyId[], ctx: PolicyContext): Promise<PolicyOutcome[]>;
|
|
138
|
+
declare function evaluatePolicyDefinitions(policies: RuntimePolicyDefinition[], ctx: PolicyContext): Promise<PolicyOutcome[]>;
|
|
139
|
+
declare function evaluatePolicyDefinition(policy: RuntimePolicyDefinition, ctx: PolicyContext): Promise<PolicyOutcome>;
|
|
140
|
+
declare function validateDataPolicyDefinition(definition: DataPolicyDefinition): DataPolicyValidationResult;
|
|
141
|
+
declare function aggregatePolicyOutcomes(outcomes: PolicyOutcome[]): PolicyOutcome | undefined;
|
|
142
|
+
|
|
143
|
+
export { type DataPolicyComparisonOperator, type DataPolicyCondition, type DataPolicyConditionResult, type DataPolicyDefinition, type DataPolicyLiteral, type DataPolicySource, type DataPolicySourceReference, type DataPolicyValidationResult, type PolicyContext, type PolicyDispatchEvidence, type PolicyEvaluationMode, type PolicyEvaluationResult, type PolicyEvaluator, type PolicyFallbackDefinition, type PolicyFallbackTrigger, type PolicyId, type PolicyKind, type PolicyOutcome, type RuntimePolicyDefinition, aggregatePolicyOutcomes, assertPolicyId, evaluatePolicyDefinition, evaluatePolicyDefinitions, evaluateRegisteredPolicies, getRegisteredPolicyIds, registerPolicy, registerPolicyIfMissing, resolvePolicy, validateDataPolicyDefinition };
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
'use strict';
|
|
2
|
+
|
|
3
|
+
var chunkLHCSVEFT_cjs = require('../chunk-LHCSVEFT.cjs');
|
|
4
|
+
|
|
5
|
+
|
|
6
|
+
|
|
7
|
+
Object.defineProperty(exports, "PLATFORM_PRIVACY_POLICY_VERSION", {
|
|
8
|
+
enumerable: true,
|
|
9
|
+
get: function () { return chunkLHCSVEFT_cjs.PLATFORM_PRIVACY_POLICY_VERSION; }
|
|
10
|
+
});
|
|
11
|
+
//# sourceMappingURL=index.cjs.map
|
|
12
|
+
//# sourceMappingURL=index.cjs.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":[],"names":[],"mappings":"","file":"index.cjs"}
|
|
@@ -0,0 +1,77 @@
|
|
|
1
|
+
declare const PLATFORM_PRIVACY_POLICY_VERSION = "fabric-platform-privacy-v1";
|
|
2
|
+
type RedactionMethod = "nullify" | "mask" | "hash" | "tokenize" | "generalize" | "drop";
|
|
3
|
+
type PlatformDataClass = "asset_event" | "read_model" | "raw_payload" | "evidence_packet" | "action_evidence" | "access_event";
|
|
4
|
+
interface RedactionRule {
|
|
5
|
+
fieldPath: string;
|
|
6
|
+
method: RedactionMethod;
|
|
7
|
+
reason: string;
|
|
8
|
+
dataClass?: PlatformDataClass;
|
|
9
|
+
}
|
|
10
|
+
interface DataClassificationRule {
|
|
11
|
+
fieldPath: string;
|
|
12
|
+
classification: string;
|
|
13
|
+
containsDirectIdentifier?: boolean;
|
|
14
|
+
containsSensitiveData?: boolean;
|
|
15
|
+
}
|
|
16
|
+
interface AnonymizationContext {
|
|
17
|
+
tenantId: string;
|
|
18
|
+
spaceId?: string | null;
|
|
19
|
+
jobId: string;
|
|
20
|
+
reason: string;
|
|
21
|
+
redactedAt?: Date;
|
|
22
|
+
policyVersion?: string;
|
|
23
|
+
}
|
|
24
|
+
interface AnonymizationFieldMetadata {
|
|
25
|
+
fieldPath: string;
|
|
26
|
+
method: RedactionMethod;
|
|
27
|
+
policyVersion: string;
|
|
28
|
+
jobId: string;
|
|
29
|
+
redactedAt: string;
|
|
30
|
+
reason: string;
|
|
31
|
+
dataClass: PlatformDataClass;
|
|
32
|
+
beforeChecksum: string;
|
|
33
|
+
}
|
|
34
|
+
interface AnonymizationMetadata {
|
|
35
|
+
redactionState: "anonymized";
|
|
36
|
+
policyVersion: string;
|
|
37
|
+
jobId: string;
|
|
38
|
+
redactedAt: string;
|
|
39
|
+
reason: string;
|
|
40
|
+
dataClass: PlatformDataClass;
|
|
41
|
+
redactedFields: AnonymizationFieldMetadata[];
|
|
42
|
+
preservedSemantics: string[];
|
|
43
|
+
}
|
|
44
|
+
interface AnonymizationResult<TValue> {
|
|
45
|
+
value: TValue;
|
|
46
|
+
metadata: AnonymizationMetadata;
|
|
47
|
+
}
|
|
48
|
+
interface AnalyticsDataContractSource {
|
|
49
|
+
name: string;
|
|
50
|
+
privacyClass: "raw" | "operational_pii" | "tenant_scoped_tokenized" | "anonymized" | "aggregated" | "differentially_minimized";
|
|
51
|
+
containsDirectIdentifiers?: boolean;
|
|
52
|
+
containsGloballyStablePersonTokens?: boolean;
|
|
53
|
+
anonymizationPolicyVersion?: string;
|
|
54
|
+
minimumGroupSize?: number;
|
|
55
|
+
}
|
|
56
|
+
interface AnalyticsDataContract {
|
|
57
|
+
contractId: string;
|
|
58
|
+
status: "draft" | "accepted" | "deprecated";
|
|
59
|
+
crossTenant: boolean;
|
|
60
|
+
acceptedBy?: string;
|
|
61
|
+
acceptedAt?: string;
|
|
62
|
+
adrReference?: string;
|
|
63
|
+
sources: AnalyticsDataContractSource[];
|
|
64
|
+
}
|
|
65
|
+
interface AnalyticsEligibilityDecision {
|
|
66
|
+
eligible: boolean;
|
|
67
|
+
policyVersion: string;
|
|
68
|
+
reasons: string[];
|
|
69
|
+
}
|
|
70
|
+
interface RetentionRule {
|
|
71
|
+
dataClass: PlatformDataClass;
|
|
72
|
+
retainForDays: number;
|
|
73
|
+
afterRetention: "delete" | "anonymize" | "archive";
|
|
74
|
+
legalHoldExempt?: boolean;
|
|
75
|
+
}
|
|
76
|
+
|
|
77
|
+
export { type AnalyticsDataContract, type AnalyticsDataContractSource, type AnalyticsEligibilityDecision, type AnonymizationContext, type AnonymizationFieldMetadata, type AnonymizationMetadata, type AnonymizationResult, type DataClassificationRule, PLATFORM_PRIVACY_POLICY_VERSION, type PlatformDataClass, type RedactionMethod, type RedactionRule, type RetentionRule };
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
'use strict';
|
|
2
|
+
|
|
3
|
+
var chunkQ3WYIWCN_cjs = require('../chunk-Q3WYIWCN.cjs');
|
|
4
|
+
|
|
5
|
+
|
|
6
|
+
|
|
7
|
+
Object.defineProperty(exports, "replayEvents", {
|
|
8
|
+
enumerable: true,
|
|
9
|
+
get: function () { return chunkQ3WYIWCN_cjs.replayEvents; }
|
|
10
|
+
});
|
|
11
|
+
//# sourceMappingURL=index.cjs.map
|
|
12
|
+
//# sourceMappingURL=index.cjs.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":[],"names":[],"mappings":"","file":"index.cjs"}
|
|
@@ -0,0 +1,52 @@
|
|
|
1
|
+
interface ReplayableAssetEvent<Payload = unknown> {
|
|
2
|
+
id: string;
|
|
3
|
+
tenantId: string;
|
|
4
|
+
spaceId: string;
|
|
5
|
+
eventType: string;
|
|
6
|
+
subjectType: string;
|
|
7
|
+
subjectId: string;
|
|
8
|
+
payload: Payload;
|
|
9
|
+
sequence: number;
|
|
10
|
+
occurredAt: Date | string;
|
|
11
|
+
recordedAt: Date | string;
|
|
12
|
+
actionInvocationId: string;
|
|
13
|
+
correlationId: string;
|
|
14
|
+
}
|
|
15
|
+
interface ReplayScope {
|
|
16
|
+
tenantId: string;
|
|
17
|
+
spaceId: string;
|
|
18
|
+
subjectType?: string;
|
|
19
|
+
subjectId?: string;
|
|
20
|
+
}
|
|
21
|
+
interface ReplaySnapshot<State = unknown> {
|
|
22
|
+
snapshotData: State;
|
|
23
|
+
eventCursor?: string | null;
|
|
24
|
+
eventSequence?: number | null;
|
|
25
|
+
}
|
|
26
|
+
type ReplayWarningCode = "cursor_not_found" | "duplicate_event" | "missing_sequence" | "subject_scope_incomplete";
|
|
27
|
+
interface ReplayWarning {
|
|
28
|
+
code: ReplayWarningCode;
|
|
29
|
+
message: string;
|
|
30
|
+
eventId?: string;
|
|
31
|
+
subjectType?: string;
|
|
32
|
+
subjectId?: string;
|
|
33
|
+
expectedSequence?: number;
|
|
34
|
+
actualSequence?: number;
|
|
35
|
+
}
|
|
36
|
+
interface ReplayEventsOptions<State, Event extends ReplayableAssetEvent = ReplayableAssetEvent> {
|
|
37
|
+
events: Iterable<Event> | AsyncIterable<Event>;
|
|
38
|
+
scope: ReplayScope;
|
|
39
|
+
initialState: State;
|
|
40
|
+
snapshot?: ReplaySnapshot<State> | null;
|
|
41
|
+
applyEvent: (state: State, event: Event) => State | Promise<State>;
|
|
42
|
+
}
|
|
43
|
+
interface ReplayEventsResult<State, Event extends ReplayableAssetEvent = ReplayableAssetEvent> {
|
|
44
|
+
state: State;
|
|
45
|
+
appliedEvents: Event[];
|
|
46
|
+
warnings: ReplayWarning[];
|
|
47
|
+
eventCursor: string | null;
|
|
48
|
+
eventSequence: number;
|
|
49
|
+
}
|
|
50
|
+
declare function replayEvents<State, Event extends ReplayableAssetEvent = ReplayableAssetEvent>({ events, scope, initialState, snapshot, applyEvent, }: ReplayEventsOptions<State, Event>): Promise<ReplayEventsResult<State, Event>>;
|
|
51
|
+
|
|
52
|
+
export { type ReplayEventsOptions, type ReplayEventsResult, type ReplayScope, type ReplaySnapshot, type ReplayWarning, type ReplayWarningCode, type ReplayableAssetEvent, replayEvents };
|
|
@@ -0,0 +1,32 @@
|
|
|
1
|
+
'use strict';
|
|
2
|
+
|
|
3
|
+
var chunkGB2PSZ33_cjs = require('../chunk-GB2PSZ33.cjs');
|
|
4
|
+
|
|
5
|
+
|
|
6
|
+
|
|
7
|
+
Object.defineProperty(exports, "getAllowedTransitions", {
|
|
8
|
+
enumerable: true,
|
|
9
|
+
get: function () { return chunkGB2PSZ33_cjs.getAllowedTransitions; }
|
|
10
|
+
});
|
|
11
|
+
Object.defineProperty(exports, "getEntityStateClass", {
|
|
12
|
+
enumerable: true,
|
|
13
|
+
get: function () { return chunkGB2PSZ33_cjs.getEntityStateClass; }
|
|
14
|
+
});
|
|
15
|
+
Object.defineProperty(exports, "registerStateMachine", {
|
|
16
|
+
enumerable: true,
|
|
17
|
+
get: function () { return chunkGB2PSZ33_cjs.registerStateMachine; }
|
|
18
|
+
});
|
|
19
|
+
Object.defineProperty(exports, "registerStateMachineIfMissing", {
|
|
20
|
+
enumerable: true,
|
|
21
|
+
get: function () { return chunkGB2PSZ33_cjs.registerStateMachineIfMissing; }
|
|
22
|
+
});
|
|
23
|
+
Object.defineProperty(exports, "resolveStateMachine", {
|
|
24
|
+
enumerable: true,
|
|
25
|
+
get: function () { return chunkGB2PSZ33_cjs.resolveStateMachine; }
|
|
26
|
+
});
|
|
27
|
+
Object.defineProperty(exports, "validateTransition", {
|
|
28
|
+
enumerable: true,
|
|
29
|
+
get: function () { return chunkGB2PSZ33_cjs.validateTransition; }
|
|
30
|
+
});
|
|
31
|
+
//# sourceMappingURL=index.cjs.map
|
|
32
|
+
//# sourceMappingURL=index.cjs.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":[],"names":[],"mappings":"","file":"index.cjs"}
|
|
@@ -0,0 +1,60 @@
|
|
|
1
|
+
interface StateMachineDefinition {
|
|
2
|
+
entityType: string;
|
|
3
|
+
states: Record<string, StateDefinition>;
|
|
4
|
+
transitions: Array<{
|
|
5
|
+
from: string;
|
|
6
|
+
to: string;
|
|
7
|
+
causedByAction: string;
|
|
8
|
+
guard?: (ctx: TransitionContext) => boolean | Promise<boolean>;
|
|
9
|
+
}>;
|
|
10
|
+
}
|
|
11
|
+
type StateMachineDatabaseClient = any;
|
|
12
|
+
interface TransitionContext<TDb = StateMachineDatabaseClient> {
|
|
13
|
+
entity: Record<string, unknown>;
|
|
14
|
+
actionInvocationId: string;
|
|
15
|
+
actorId: string;
|
|
16
|
+
parameters: unknown;
|
|
17
|
+
db: TDb;
|
|
18
|
+
}
|
|
19
|
+
/**
|
|
20
|
+
* Register a state-machine definition for an entity type.
|
|
21
|
+
* Throws if a definition for this entity type is already registered.
|
|
22
|
+
*/
|
|
23
|
+
declare function registerStateMachine(def: StateMachineDefinition): void;
|
|
24
|
+
/**
|
|
25
|
+
* Register a state-machine definition only if one for this entity type
|
|
26
|
+
* is not already registered. Idempotent — safe to call multiple times.
|
|
27
|
+
*/
|
|
28
|
+
declare function registerStateMachineIfMissing(def: StateMachineDefinition): void;
|
|
29
|
+
/**
|
|
30
|
+
* Resolve a previously registered state-machine definition by entity type.
|
|
31
|
+
*/
|
|
32
|
+
declare function resolveStateMachine(entityType: string): StateMachineDefinition | undefined;
|
|
33
|
+
/**
|
|
34
|
+
* Validate whether a transition is allowed for the given entity type,
|
|
35
|
+
* from state, to state, and action ID.
|
|
36
|
+
*/
|
|
37
|
+
declare function validateTransition(entityType: string, from: string, to: string, actionId: string): {
|
|
38
|
+
valid: boolean;
|
|
39
|
+
error?: string;
|
|
40
|
+
};
|
|
41
|
+
/**
|
|
42
|
+
* Get all allowed transitions from a given state for an entity type.
|
|
43
|
+
*/
|
|
44
|
+
declare function getAllowedTransitions(entityType: string, from: string): Array<{
|
|
45
|
+
to: string;
|
|
46
|
+
causedByAction: string;
|
|
47
|
+
}>;
|
|
48
|
+
/**
|
|
49
|
+
* Get the StateClass of a given state for an entity type.
|
|
50
|
+
*/
|
|
51
|
+
declare function getEntityStateClass(entityType: string, state: string): StateClass | undefined;
|
|
52
|
+
|
|
53
|
+
type StateClass = "initial" | "active" | "action_required" | "waiting" | "terminal" | "exception";
|
|
54
|
+
interface StateDefinition {
|
|
55
|
+
id: string;
|
|
56
|
+
label: string;
|
|
57
|
+
stateClass: StateClass;
|
|
58
|
+
}
|
|
59
|
+
|
|
60
|
+
export { type StateClass, type StateDefinition, type StateMachineDatabaseClient, type StateMachineDefinition, type TransitionContext, getAllowedTransitions, getEntityStateClass, registerStateMachine, registerStateMachineIfMissing, resolveStateMachine, validateTransition };
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
'use strict';
|
|
2
|
+
|
|
3
|
+
var chunkYZKUEC2J_cjs = require('../chunk-YZKUEC2J.cjs');
|
|
4
|
+
require('../chunk-NPVIFZQV.cjs');
|
|
5
|
+
|
|
6
|
+
|
|
7
|
+
|
|
8
|
+
Object.defineProperty(exports, "createDeterministicIdFactory", {
|
|
9
|
+
enumerable: true,
|
|
10
|
+
get: function () { return chunkYZKUEC2J_cjs.createDeterministicIdFactory; }
|
|
11
|
+
});
|
|
12
|
+
Object.defineProperty(exports, "createFakeActionContext", {
|
|
13
|
+
enumerable: true,
|
|
14
|
+
get: function () { return chunkYZKUEC2J_cjs.createFakeActionContext; }
|
|
15
|
+
});
|
|
16
|
+
Object.defineProperty(exports, "createInMemoryAdapterRegistry", {
|
|
17
|
+
enumerable: true,
|
|
18
|
+
get: function () { return chunkYZKUEC2J_cjs.createInMemoryAdapterRegistry; }
|
|
19
|
+
});
|
|
20
|
+
//# sourceMappingURL=index.cjs.map
|
|
21
|
+
//# sourceMappingURL=index.cjs.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":[],"names":[],"mappings":"","file":"index.cjs"}
|