@cratis/chronicle 6.2.0 → 6.3.1
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/confidentiality/EncryptedNotSupportedOnEventSourceId.ts +21 -0
- package/confidentiality/EncryptionScope.ts +34 -0
- package/confidentiality/PIIAndEncryptedCombinedNotSupported.ts +29 -0
- package/confidentiality/SecurityMetadata.ts +22 -0
- package/confidentiality/SecurityMetadataResolver.ts +54 -0
- package/confidentiality/SecurityMetadataType.ts +56 -0
- package/confidentiality/encrypted.spec.ts +105 -0
- package/confidentiality/encrypted.ts +143 -0
- package/confidentiality/index.ts +10 -0
- package/dist/confidentiality/EncryptedNotSupportedOnEventSourceId.d.ts +11 -0
- package/dist/confidentiality/EncryptedNotSupportedOnEventSourceId.d.ts.map +1 -0
- package/dist/confidentiality/EncryptedNotSupportedOnEventSourceId.js +19 -0
- package/dist/confidentiality/EncryptedNotSupportedOnEventSourceId.js.map +1 -0
- package/dist/confidentiality/EncryptionScope.d.ts +30 -0
- package/dist/confidentiality/EncryptionScope.d.ts.map +1 -0
- package/dist/confidentiality/EncryptionScope.js +33 -0
- package/dist/confidentiality/EncryptionScope.js.map +1 -0
- package/dist/confidentiality/PIIAndEncryptedCombinedNotSupported.d.ts +19 -0
- package/dist/confidentiality/PIIAndEncryptedCombinedNotSupported.d.ts.map +1 -0
- package/dist/confidentiality/PIIAndEncryptedCombinedNotSupported.js +27 -0
- package/dist/confidentiality/PIIAndEncryptedCombinedNotSupported.js.map +1 -0
- package/dist/confidentiality/SecurityMetadata.d.ts +18 -0
- package/dist/confidentiality/SecurityMetadata.d.ts.map +1 -0
- package/dist/confidentiality/SecurityMetadata.js +4 -0
- package/dist/confidentiality/SecurityMetadata.js.map +1 -0
- package/dist/confidentiality/SecurityMetadataResolver.d.ts +30 -0
- package/dist/confidentiality/SecurityMetadataResolver.d.ts.map +1 -0
- package/dist/confidentiality/SecurityMetadataResolver.js +48 -0
- package/dist/confidentiality/SecurityMetadataResolver.js.map +1 -0
- package/dist/confidentiality/SecurityMetadataType.d.ts +42 -0
- package/dist/confidentiality/SecurityMetadataType.d.ts.map +1 -0
- package/dist/confidentiality/SecurityMetadataType.js +50 -0
- package/dist/confidentiality/SecurityMetadataType.js.map +1 -0
- package/dist/confidentiality/encrypted.d.ts +72 -0
- package/dist/confidentiality/encrypted.d.ts.map +1 -0
- package/dist/confidentiality/encrypted.js +130 -0
- package/dist/confidentiality/encrypted.js.map +1 -0
- package/dist/confidentiality/index.d.ts +8 -0
- package/dist/confidentiality/index.d.ts.map +1 -0
- package/dist/confidentiality/index.js +9 -0
- package/dist/confidentiality/index.js.map +1 -0
- package/dist/events/constraints/Constraints.d.ts.map +1 -1
- package/dist/events/constraints/Constraints.js +6 -1
- package/dist/events/constraints/Constraints.js.map +1 -1
- package/dist/events/constraints/IUniqueConstraintBuilder.d.ts +2 -1
- package/dist/events/constraints/IUniqueConstraintBuilder.d.ts.map +1 -1
- package/dist/events/constraints/UniqueConstraintBuilder.d.ts +3 -0
- package/dist/events/constraints/UniqueConstraintBuilder.d.ts.map +1 -1
- package/dist/events/constraints/UniqueConstraintBuilder.js +7 -2
- package/dist/events/constraints/UniqueConstraintBuilder.js.map +1 -1
- package/dist/index.d.ts +3 -1
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +3 -1
- package/dist/index.js.map +1 -1
- package/dist/schemas/JsonSchema.d.ts +18 -0
- package/dist/schemas/JsonSchema.d.ts.map +1 -1
- package/dist/schemas/JsonSchemaGenerator.d.ts +41 -0
- package/dist/schemas/JsonSchemaGenerator.d.ts.map +1 -1
- package/dist/schemas/JsonSchemaGenerator.js +102 -9
- package/dist/schemas/JsonSchemaGenerator.js.map +1 -1
- package/dist/tsconfig.tsbuildinfo +1 -1
- package/events/constraints/Constraints.ts +6 -1
- package/events/constraints/IUniqueConstraintBuilder.ts +2 -1
- package/events/constraints/UniqueConstraintBuilder.ts +10 -2
- package/events/constraints/for_Constraints/when_registering_unique_property_constraints.spec.ts +137 -0
- package/index.ts +3 -0
- package/package.json +7 -2
- package/schemas/JsonSchema.ts +20 -0
- package/schemas/JsonSchemaGenerator.confidentiality.spec.ts +194 -0
- package/schemas/JsonSchemaGenerator.ts +115 -10
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
import type { SecurityMetadataType } from './SecurityMetadataType';
|
|
2
|
+
/**
|
|
3
|
+
* Represents metadata related to security.
|
|
4
|
+
*
|
|
5
|
+
* This is the security counterpart to {@link ComplianceMetadata} - a deliberately separate type
|
|
6
|
+
* rather than a shared one. See {@link SecurityMetadataType} for why.
|
|
7
|
+
*/
|
|
8
|
+
export interface SecurityMetadata {
|
|
9
|
+
/**
|
|
10
|
+
* The type of security metadata.
|
|
11
|
+
*/
|
|
12
|
+
readonly metadataType: SecurityMetadataType;
|
|
13
|
+
/**
|
|
14
|
+
* Any additional details - can be empty.
|
|
15
|
+
*/
|
|
16
|
+
readonly details: string;
|
|
17
|
+
}
|
|
18
|
+
//# sourceMappingURL=SecurityMetadata.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"SecurityMetadata.d.ts","sourceRoot":"","sources":["../../confidentiality/SecurityMetadata.ts"],"names":[],"mappings":"AAGA,OAAO,KAAK,EAAE,oBAAoB,EAAE,MAAM,wBAAwB,CAAC;AAEnE;;;;;GAKG;AACH,MAAM,WAAW,gBAAgB;IAC7B;;OAEG;IACH,QAAQ,CAAC,YAAY,EAAE,oBAAoB,CAAC;IAE5C;;OAEG;IACH,QAAQ,CAAC,OAAO,EAAE,MAAM,CAAC;CAC5B"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"SecurityMetadata.js","sourceRoot":"","sources":["../../confidentiality/SecurityMetadata.ts"],"names":[],"mappings":"AAAA,6CAA6C;AAC7C,qGAAqG"}
|
|
@@ -0,0 +1,30 @@
|
|
|
1
|
+
import type { SecurityMetadata } from './SecurityMetadata';
|
|
2
|
+
/**
|
|
3
|
+
* Resolves security metadata for properties and types.
|
|
4
|
+
*
|
|
5
|
+
* This is the security counterpart to {@link ComplianceMetadataResolver} - a deliberately separate
|
|
6
|
+
* type rather than a shared one. See {@link SecurityMetadataType} for why.
|
|
7
|
+
*/
|
|
8
|
+
export declare class SecurityMetadataResolver {
|
|
9
|
+
/**
|
|
10
|
+
* Checks if a property has security metadata.
|
|
11
|
+
* @param target - The class prototype.
|
|
12
|
+
* @param propertyKey - The property name.
|
|
13
|
+
* @returns True if the property has security metadata; false otherwise.
|
|
14
|
+
*/
|
|
15
|
+
static hasMetadataFor(target: object, propertyKey: string): boolean;
|
|
16
|
+
/**
|
|
17
|
+
* Gets all security metadata for a property.
|
|
18
|
+
* @param target - The class prototype.
|
|
19
|
+
* @param propertyKey - The property name.
|
|
20
|
+
* @returns Array of security metadata.
|
|
21
|
+
*/
|
|
22
|
+
static getMetadataFor(target: object, propertyKey: string): SecurityMetadata[];
|
|
23
|
+
/**
|
|
24
|
+
* Gets security metadata for a type (e.g., ConceptAs types).
|
|
25
|
+
* @param type - The type constructor.
|
|
26
|
+
* @returns Array of security metadata.
|
|
27
|
+
*/
|
|
28
|
+
static getMetadataForType(type: Function): SecurityMetadata[];
|
|
29
|
+
}
|
|
30
|
+
//# sourceMappingURL=SecurityMetadataResolver.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"SecurityMetadataResolver.d.ts","sourceRoot":"","sources":["../../confidentiality/SecurityMetadataResolver.ts"],"names":[],"mappings":"AAGA,OAAO,KAAK,EAAE,gBAAgB,EAAE,MAAM,oBAAoB,CAAC;AAG3D;;;;;GAKG;AACH,qBAAa,wBAAwB;IACjC;;;;;OAKG;IACH,MAAM,CAAC,cAAc,CAAC,MAAM,EAAE,MAAM,EAAE,WAAW,EAAE,MAAM,GAAG,OAAO;IAInE;;;;;OAKG;IACH,MAAM,CAAC,cAAc,CAAC,MAAM,EAAE,MAAM,EAAE,WAAW,EAAE,MAAM,GAAG,gBAAgB,EAAE;IAW9E;;;;OAIG;IACH,MAAM,CAAC,kBAAkB,CAAC,IAAI,EAAE,QAAQ,GAAG,gBAAgB,EAAE;CAQhE"}
|
|
@@ -0,0 +1,48 @@
|
|
|
1
|
+
// Copyright (c) Cratis. All rights reserved.
|
|
2
|
+
// Licensed under the MIT license. See LICENSE file in the project root for full license information.
|
|
3
|
+
import { getEncryptedMetadata, getTypeEncryptedMetadata } from './encrypted';
|
|
4
|
+
/**
|
|
5
|
+
* Resolves security metadata for properties and types.
|
|
6
|
+
*
|
|
7
|
+
* This is the security counterpart to {@link ComplianceMetadataResolver} - a deliberately separate
|
|
8
|
+
* type rather than a shared one. See {@link SecurityMetadataType} for why.
|
|
9
|
+
*/
|
|
10
|
+
export class SecurityMetadataResolver {
|
|
11
|
+
/**
|
|
12
|
+
* Checks if a property has security metadata.
|
|
13
|
+
* @param target - The class prototype.
|
|
14
|
+
* @param propertyKey - The property name.
|
|
15
|
+
* @returns True if the property has security metadata; false otherwise.
|
|
16
|
+
*/
|
|
17
|
+
static hasMetadataFor(target, propertyKey) {
|
|
18
|
+
return getEncryptedMetadata(target, propertyKey) !== undefined;
|
|
19
|
+
}
|
|
20
|
+
/**
|
|
21
|
+
* Gets all security metadata for a property.
|
|
22
|
+
* @param target - The class prototype.
|
|
23
|
+
* @param propertyKey - The property name.
|
|
24
|
+
* @returns Array of security metadata.
|
|
25
|
+
*/
|
|
26
|
+
static getMetadataFor(target, propertyKey) {
|
|
27
|
+
const metadata = [];
|
|
28
|
+
const encryptedMetadata = getEncryptedMetadata(target, propertyKey);
|
|
29
|
+
if (encryptedMetadata) {
|
|
30
|
+
metadata.push(encryptedMetadata);
|
|
31
|
+
}
|
|
32
|
+
return metadata;
|
|
33
|
+
}
|
|
34
|
+
/**
|
|
35
|
+
* Gets security metadata for a type (e.g., ConceptAs types).
|
|
36
|
+
* @param type - The type constructor.
|
|
37
|
+
* @returns Array of security metadata.
|
|
38
|
+
*/
|
|
39
|
+
static getMetadataForType(type) {
|
|
40
|
+
const metadata = [];
|
|
41
|
+
const encryptedMetadata = getTypeEncryptedMetadata(type);
|
|
42
|
+
if (encryptedMetadata) {
|
|
43
|
+
metadata.push(encryptedMetadata);
|
|
44
|
+
}
|
|
45
|
+
return metadata;
|
|
46
|
+
}
|
|
47
|
+
}
|
|
48
|
+
//# sourceMappingURL=SecurityMetadataResolver.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"SecurityMetadataResolver.js","sourceRoot":"","sources":["../../confidentiality/SecurityMetadataResolver.ts"],"names":[],"mappings":"AAAA,6CAA6C;AAC7C,qGAAqG;AAGrG,OAAO,EAAE,oBAAoB,EAAE,wBAAwB,EAAE,MAAM,aAAa,CAAC;AAE7E;;;;;GAKG;AACH,MAAM,OAAO,wBAAwB;IACjC;;;;;OAKG;IACH,MAAM,CAAC,cAAc,CAAC,MAAc,EAAE,WAAmB;QACrD,OAAO,oBAAoB,CAAC,MAAM,EAAE,WAAW,CAAC,KAAK,SAAS,CAAC;IACnE,CAAC;IAED;;;;;OAKG;IACH,MAAM,CAAC,cAAc,CAAC,MAAc,EAAE,WAAmB;QACrD,MAAM,QAAQ,GAAuB,EAAE,CAAC;QAExC,MAAM,iBAAiB,GAAG,oBAAoB,CAAC,MAAM,EAAE,WAAW,CAAC,CAAC;QACpE,IAAI,iBAAiB,EAAE,CAAC;YACpB,QAAQ,CAAC,IAAI,CAAC,iBAAiB,CAAC,CAAC;QACrC,CAAC;QAED,OAAO,QAAQ,CAAC;IACpB,CAAC;IAED;;;;OAIG;IACH,MAAM,CAAC,kBAAkB,CAAC,IAAc;QACpC,MAAM,QAAQ,GAAuB,EAAE,CAAC;QACxC,MAAM,iBAAiB,GAAG,wBAAwB,CAAC,IAAI,CAAC,CAAC;QACzD,IAAI,iBAAiB,EAAE,CAAC;YACpB,QAAQ,CAAC,IAAI,CAAC,iBAAiB,CAAC,CAAC;QACrC,CAAC;QACD,OAAO,QAAQ,CAAC;IACpB,CAAC;CACJ"}
|
|
@@ -0,0 +1,42 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Represents a type of security metadata.
|
|
3
|
+
*
|
|
4
|
+
* This is the security counterpart to {@link ComplianceMetadataType} - a deliberately separate type
|
|
5
|
+
* rather than a shared one. A `@pii()` value and an `@encrypted()` value are never the same kind of
|
|
6
|
+
* thing: one is personal data with a GDPR erasure obligation, the other is an operational secret
|
|
7
|
+
* with none. Keeping the two vocabularies apart keeps that distinction visible at every call site
|
|
8
|
+
* that reads a schema's metadata.
|
|
9
|
+
*/
|
|
10
|
+
export declare class SecurityMetadataType {
|
|
11
|
+
/**
|
|
12
|
+
* The key is provisioned per compliance identity - the same identity, resolved the same way, a
|
|
13
|
+
* `@pii()` value on the same document would use. This is what `@encrypted()` (with no explicit
|
|
14
|
+
* scope, or `EncryptionScope.Subject`) resolves to.
|
|
15
|
+
*/
|
|
16
|
+
static readonly EncryptedSubject: SecurityMetadataType;
|
|
17
|
+
/**
|
|
18
|
+
* The key is provisioned once per event store namespace. This is what
|
|
19
|
+
* `@encrypted(EncryptionScope.Namespace)` resolves to.
|
|
20
|
+
*/
|
|
21
|
+
static readonly EncryptedNamespace: SecurityMetadataType;
|
|
22
|
+
/**
|
|
23
|
+
* The key is provisioned once for the whole Chronicle installation. This is what
|
|
24
|
+
* `@encrypted(EncryptionScope.Global)` resolves to.
|
|
25
|
+
*/
|
|
26
|
+
static readonly EncryptedGlobal: SecurityMetadataType;
|
|
27
|
+
private readonly _value;
|
|
28
|
+
/**
|
|
29
|
+
* Initializes a new instance of SecurityMetadataType.
|
|
30
|
+
* @param value - The string value of the security metadata type.
|
|
31
|
+
*/
|
|
32
|
+
constructor(value: string);
|
|
33
|
+
/**
|
|
34
|
+
* Gets the underlying string value.
|
|
35
|
+
*/
|
|
36
|
+
get value(): string;
|
|
37
|
+
/**
|
|
38
|
+
* Returns the string representation of the security metadata type.
|
|
39
|
+
*/
|
|
40
|
+
toString(): string;
|
|
41
|
+
}
|
|
42
|
+
//# sourceMappingURL=SecurityMetadataType.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"SecurityMetadataType.d.ts","sourceRoot":"","sources":["../../confidentiality/SecurityMetadataType.ts"],"names":[],"mappings":"AAGA;;;;;;;;GAQG;AACH,qBAAa,oBAAoB;IAC7B;;;;OAIG;IACH,MAAM,CAAC,QAAQ,CAAC,gBAAgB,uBAAgD;IAEhF;;;OAGG;IACH,MAAM,CAAC,QAAQ,CAAC,kBAAkB,uBAAkD;IAEpF;;;OAGG;IACH,MAAM,CAAC,QAAQ,CAAC,eAAe,uBAA+C;IAE9E,OAAO,CAAC,QAAQ,CAAC,MAAM,CAAS;IAEhC;;;OAGG;gBACS,KAAK,EAAE,MAAM;IAIzB;;OAEG;IACH,IAAI,KAAK,IAAI,MAAM,CAElB;IAED;;OAEG;IACH,QAAQ,IAAI,MAAM;CAGrB"}
|
|
@@ -0,0 +1,50 @@
|
|
|
1
|
+
// Copyright (c) Cratis. All rights reserved.
|
|
2
|
+
// Licensed under the MIT license. See LICENSE file in the project root for full license information.
|
|
3
|
+
/**
|
|
4
|
+
* Represents a type of security metadata.
|
|
5
|
+
*
|
|
6
|
+
* This is the security counterpart to {@link ComplianceMetadataType} - a deliberately separate type
|
|
7
|
+
* rather than a shared one. A `@pii()` value and an `@encrypted()` value are never the same kind of
|
|
8
|
+
* thing: one is personal data with a GDPR erasure obligation, the other is an operational secret
|
|
9
|
+
* with none. Keeping the two vocabularies apart keeps that distinction visible at every call site
|
|
10
|
+
* that reads a schema's metadata.
|
|
11
|
+
*/
|
|
12
|
+
export class SecurityMetadataType {
|
|
13
|
+
/**
|
|
14
|
+
* The key is provisioned per compliance identity - the same identity, resolved the same way, a
|
|
15
|
+
* `@pii()` value on the same document would use. This is what `@encrypted()` (with no explicit
|
|
16
|
+
* scope, or `EncryptionScope.Subject`) resolves to.
|
|
17
|
+
*/
|
|
18
|
+
static EncryptedSubject = new SecurityMetadataType('EncryptedSubject');
|
|
19
|
+
/**
|
|
20
|
+
* The key is provisioned once per event store namespace. This is what
|
|
21
|
+
* `@encrypted(EncryptionScope.Namespace)` resolves to.
|
|
22
|
+
*/
|
|
23
|
+
static EncryptedNamespace = new SecurityMetadataType('EncryptedNamespace');
|
|
24
|
+
/**
|
|
25
|
+
* The key is provisioned once for the whole Chronicle installation. This is what
|
|
26
|
+
* `@encrypted(EncryptionScope.Global)` resolves to.
|
|
27
|
+
*/
|
|
28
|
+
static EncryptedGlobal = new SecurityMetadataType('EncryptedGlobal');
|
|
29
|
+
_value;
|
|
30
|
+
/**
|
|
31
|
+
* Initializes a new instance of SecurityMetadataType.
|
|
32
|
+
* @param value - The string value of the security metadata type.
|
|
33
|
+
*/
|
|
34
|
+
constructor(value) {
|
|
35
|
+
this._value = value;
|
|
36
|
+
}
|
|
37
|
+
/**
|
|
38
|
+
* Gets the underlying string value.
|
|
39
|
+
*/
|
|
40
|
+
get value() {
|
|
41
|
+
return this._value;
|
|
42
|
+
}
|
|
43
|
+
/**
|
|
44
|
+
* Returns the string representation of the security metadata type.
|
|
45
|
+
*/
|
|
46
|
+
toString() {
|
|
47
|
+
return this._value;
|
|
48
|
+
}
|
|
49
|
+
}
|
|
50
|
+
//# sourceMappingURL=SecurityMetadataType.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"SecurityMetadataType.js","sourceRoot":"","sources":["../../confidentiality/SecurityMetadataType.ts"],"names":[],"mappings":"AAAA,6CAA6C;AAC7C,qGAAqG;AAErG;;;;;;;;GAQG;AACH,MAAM,OAAO,oBAAoB;IAC7B;;;;OAIG;IACH,MAAM,CAAU,gBAAgB,GAAG,IAAI,oBAAoB,CAAC,kBAAkB,CAAC,CAAC;IAEhF;;;OAGG;IACH,MAAM,CAAU,kBAAkB,GAAG,IAAI,oBAAoB,CAAC,oBAAoB,CAAC,CAAC;IAEpF;;;OAGG;IACH,MAAM,CAAU,eAAe,GAAG,IAAI,oBAAoB,CAAC,iBAAiB,CAAC,CAAC;IAE7D,MAAM,CAAS;IAEhC;;;OAGG;IACH,YAAY,KAAa;QACrB,IAAI,CAAC,MAAM,GAAG,KAAK,CAAC;IACxB,CAAC;IAED;;OAEG;IACH,IAAI,KAAK;QACL,OAAO,IAAI,CAAC,MAAM,CAAC;IACvB,CAAC;IAED;;OAEG;IACH,QAAQ;QACJ,OAAO,IAAI,CAAC,MAAM,CAAC;IACvB,CAAC"}
|
|
@@ -0,0 +1,72 @@
|
|
|
1
|
+
import 'reflect-metadata';
|
|
2
|
+
import type { SecurityMetadata } from './SecurityMetadata';
|
|
3
|
+
import { EncryptionScope } from './EncryptionScope';
|
|
4
|
+
/**
|
|
5
|
+
* Decorator that marks a property or type as needing plain-confidentiality encryption at rest - a
|
|
6
|
+
* security measure, not a compliance one.
|
|
7
|
+
*
|
|
8
|
+
* Use `@encrypted()` for an operational secret that has no data subject and no lawful basis for
|
|
9
|
+
* erasure - an API key, a webhook signing secret, a partner credential. Use `@pii()` instead when
|
|
10
|
+
* the value is personal data about a natural person: only `@pii()` encrypts a value *and* enrolls it
|
|
11
|
+
* in GDPR right-to-erasure. Marking a secret `@pii()` would make it erasable on a request that was
|
|
12
|
+
* never about it; marking personal data `@encrypted()` would encrypt it but never erase it. The two
|
|
13
|
+
* are not interchangeable, and this decorator's key is never provisioned under the same identity a
|
|
14
|
+
* `@pii()` value for the same subject uses.
|
|
15
|
+
*
|
|
16
|
+
* All three {@link EncryptionScope} members are honored by the kernel: `EncryptionScope.Subject`
|
|
17
|
+
* (the default) provisions a key per compliance identity, exactly matching how a `@pii()` value on
|
|
18
|
+
* the same document is resolved; `EncryptionScope.Namespace` provisions one key shared by every
|
|
19
|
+
* value marked with it in a given event store namespace; `EncryptionScope.Global` provisions one key
|
|
20
|
+
* shared across the whole installation. Choosing a wider scope is safe for `@encrypted()` in a way
|
|
21
|
+
* it is not for `@pii()`, precisely because an operational secret has no data subject whose erasure
|
|
22
|
+
* request the wider key could ever need to honor separately from another subject's.
|
|
23
|
+
*
|
|
24
|
+
* This decorator can be used in two ways:
|
|
25
|
+
* - As a property decorator: `@encrypted() propertyName: type`
|
|
26
|
+
* - As a class decorator: `@encrypted() class TypeName { }`
|
|
27
|
+
*
|
|
28
|
+
* @param scope - The {@link EncryptionScope} the key is provisioned under - defaults to `EncryptionScope.Subject`.
|
|
29
|
+
* @param details - Optional details explaining why or to what purpose/extent the property/type needs encryption.
|
|
30
|
+
* @returns A decorator function that can be applied to either properties or classes (but not both on the same target).
|
|
31
|
+
*
|
|
32
|
+
* @example
|
|
33
|
+
* Property usage:
|
|
34
|
+
* ```typescript
|
|
35
|
+
* @readModel()
|
|
36
|
+
* class PartnerIntegration {
|
|
37
|
+
* @encrypted()
|
|
38
|
+
* apiKey: string = '';
|
|
39
|
+
*
|
|
40
|
+
* @encrypted(EncryptionScope.Namespace)
|
|
41
|
+
* webhookSigningSecret: string = '';
|
|
42
|
+
* }
|
|
43
|
+
* ```
|
|
44
|
+
*/
|
|
45
|
+
export declare function encrypted(scope?: EncryptionScope, details?: string): PropertyDecorator & ClassDecorator;
|
|
46
|
+
/**
|
|
47
|
+
* Gets the encrypted security metadata for a property.
|
|
48
|
+
* @param target - The class prototype.
|
|
49
|
+
* @param propertyKey - The property name.
|
|
50
|
+
* @returns The security metadata, or undefined if not decorated with @encrypted.
|
|
51
|
+
*/
|
|
52
|
+
export declare function getEncryptedMetadata(target: object, propertyKey: string): SecurityMetadata | undefined;
|
|
53
|
+
/**
|
|
54
|
+
* Checks whether a property has been decorated with @encrypted.
|
|
55
|
+
* @param target - The class prototype.
|
|
56
|
+
* @param propertyKey - The property name.
|
|
57
|
+
* @returns True if the property has @encrypted decorator; false otherwise.
|
|
58
|
+
*/
|
|
59
|
+
export declare function hasEncryptedMetadata(target: object, propertyKey: string): boolean;
|
|
60
|
+
/**
|
|
61
|
+
* Gets the encrypted security metadata for a type.
|
|
62
|
+
* @param type - The type constructor.
|
|
63
|
+
* @returns The security metadata, or undefined if not decorated with @encrypted.
|
|
64
|
+
*/
|
|
65
|
+
export declare function getTypeEncryptedMetadata(type: Function): SecurityMetadata | undefined;
|
|
66
|
+
/**
|
|
67
|
+
* Checks whether a type has been decorated with @encrypted.
|
|
68
|
+
* @param type - The type constructor.
|
|
69
|
+
* @returns True if the type has @encrypted decorator; false otherwise.
|
|
70
|
+
*/
|
|
71
|
+
export declare function isEncrypted(type: Function): boolean;
|
|
72
|
+
//# sourceMappingURL=encrypted.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"encrypted.d.ts","sourceRoot":"","sources":["../../confidentiality/encrypted.ts"],"names":[],"mappings":"AAGA,OAAO,kBAAkB,CAAC;AAC1B,OAAO,KAAK,EAAE,gBAAgB,EAAE,MAAM,oBAAoB,CAAC;AAE3D,OAAO,EAAE,eAAe,EAAE,MAAM,mBAAmB,CAAC;AAwBpD;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAwCG;AACH,wBAAgB,SAAS,CAAC,KAAK,GAAE,eAAyC,EAAE,OAAO,CAAC,EAAE,MAAM,GAAG,iBAAiB,GAAG,cAAc,CAiChI;AAED;;;;;GAKG;AACH,wBAAgB,oBAAoB,CAAC,MAAM,EAAE,MAAM,EAAE,WAAW,EAAE,MAAM,GAAG,gBAAgB,GAAG,SAAS,CAEtG;AAED;;;;;GAKG;AACH,wBAAgB,oBAAoB,CAAC,MAAM,EAAE,MAAM,EAAE,WAAW,EAAE,MAAM,GAAG,OAAO,CAEjF;AAED;;;;GAIG;AACH,wBAAgB,wBAAwB,CAAC,IAAI,EAAE,QAAQ,GAAG,gBAAgB,GAAG,SAAS,CAErF;AAED;;;;GAIG;AACH,wBAAgB,WAAW,CAAC,IAAI,EAAE,QAAQ,GAAG,OAAO,CAEnD"}
|
|
@@ -0,0 +1,130 @@
|
|
|
1
|
+
// Copyright (c) Cratis. All rights reserved.
|
|
2
|
+
// Licensed under the MIT license. See LICENSE file in the project root for full license information.
|
|
3
|
+
import 'reflect-metadata';
|
|
4
|
+
import { SecurityMetadataType } from './SecurityMetadataType';
|
|
5
|
+
import { EncryptionScope } from './EncryptionScope';
|
|
6
|
+
import { EncryptedNotSupportedOnEventSourceId } from './EncryptedNotSupportedOnEventSourceId';
|
|
7
|
+
import { TypeIntrospector } from '../types';
|
|
8
|
+
/** The property name this client uses everywhere for the event source identifier. */
|
|
9
|
+
const EVENT_SOURCE_ID_PROPERTY = 'eventSourceId';
|
|
10
|
+
/** Metadata key for the encrypted decorator on properties. */
|
|
11
|
+
const ENCRYPTED_PROPERTY_METADATA_KEY = 'chronicle:security:encrypted:property';
|
|
12
|
+
/** Metadata key for the encrypted decorator on types. */
|
|
13
|
+
const ENCRYPTED_TYPE_METADATA_KEY = 'chronicle:security:encrypted:type';
|
|
14
|
+
function metadataTypeFor(scope) {
|
|
15
|
+
switch (scope) {
|
|
16
|
+
case EncryptionScope.Subject:
|
|
17
|
+
return SecurityMetadataType.EncryptedSubject;
|
|
18
|
+
case EncryptionScope.Namespace:
|
|
19
|
+
return SecurityMetadataType.EncryptedNamespace;
|
|
20
|
+
case EncryptionScope.Global:
|
|
21
|
+
return SecurityMetadataType.EncryptedGlobal;
|
|
22
|
+
}
|
|
23
|
+
}
|
|
24
|
+
/**
|
|
25
|
+
* Decorator that marks a property or type as needing plain-confidentiality encryption at rest - a
|
|
26
|
+
* security measure, not a compliance one.
|
|
27
|
+
*
|
|
28
|
+
* Use `@encrypted()` for an operational secret that has no data subject and no lawful basis for
|
|
29
|
+
* erasure - an API key, a webhook signing secret, a partner credential. Use `@pii()` instead when
|
|
30
|
+
* the value is personal data about a natural person: only `@pii()` encrypts a value *and* enrolls it
|
|
31
|
+
* in GDPR right-to-erasure. Marking a secret `@pii()` would make it erasable on a request that was
|
|
32
|
+
* never about it; marking personal data `@encrypted()` would encrypt it but never erase it. The two
|
|
33
|
+
* are not interchangeable, and this decorator's key is never provisioned under the same identity a
|
|
34
|
+
* `@pii()` value for the same subject uses.
|
|
35
|
+
*
|
|
36
|
+
* All three {@link EncryptionScope} members are honored by the kernel: `EncryptionScope.Subject`
|
|
37
|
+
* (the default) provisions a key per compliance identity, exactly matching how a `@pii()` value on
|
|
38
|
+
* the same document is resolved; `EncryptionScope.Namespace` provisions one key shared by every
|
|
39
|
+
* value marked with it in a given event store namespace; `EncryptionScope.Global` provisions one key
|
|
40
|
+
* shared across the whole installation. Choosing a wider scope is safe for `@encrypted()` in a way
|
|
41
|
+
* it is not for `@pii()`, precisely because an operational secret has no data subject whose erasure
|
|
42
|
+
* request the wider key could ever need to honor separately from another subject's.
|
|
43
|
+
*
|
|
44
|
+
* This decorator can be used in two ways:
|
|
45
|
+
* - As a property decorator: `@encrypted() propertyName: type`
|
|
46
|
+
* - As a class decorator: `@encrypted() class TypeName { }`
|
|
47
|
+
*
|
|
48
|
+
* @param scope - The {@link EncryptionScope} the key is provisioned under - defaults to `EncryptionScope.Subject`.
|
|
49
|
+
* @param details - Optional details explaining why or to what purpose/extent the property/type needs encryption.
|
|
50
|
+
* @returns A decorator function that can be applied to either properties or classes (but not both on the same target).
|
|
51
|
+
*
|
|
52
|
+
* @example
|
|
53
|
+
* Property usage:
|
|
54
|
+
* ```typescript
|
|
55
|
+
* @readModel()
|
|
56
|
+
* class PartnerIntegration {
|
|
57
|
+
* @encrypted()
|
|
58
|
+
* apiKey: string = '';
|
|
59
|
+
*
|
|
60
|
+
* @encrypted(EncryptionScope.Namespace)
|
|
61
|
+
* webhookSigningSecret: string = '';
|
|
62
|
+
* }
|
|
63
|
+
* ```
|
|
64
|
+
*/
|
|
65
|
+
export function encrypted(scope = EncryptionScope.Subject, details) {
|
|
66
|
+
return (target, propertyKey) => {
|
|
67
|
+
// Class decorator usage (for types like ConceptAs)
|
|
68
|
+
if (typeof target === 'function' && propertyKey === undefined) {
|
|
69
|
+
const metadata = {
|
|
70
|
+
metadataType: metadataTypeFor(scope),
|
|
71
|
+
details: details ?? ''
|
|
72
|
+
};
|
|
73
|
+
Reflect.defineMetadata(ENCRYPTED_TYPE_METADATA_KEY, metadata, target);
|
|
74
|
+
return;
|
|
75
|
+
}
|
|
76
|
+
// Property decorator usage
|
|
77
|
+
if (propertyKey !== undefined) {
|
|
78
|
+
const key = propertyKey.toString();
|
|
79
|
+
const declaringType = target.constructor;
|
|
80
|
+
// Encrypting the event source identifier would make its own decryption key
|
|
81
|
+
// unfindable - the identifier is required, in the clear, to correlate events and
|
|
82
|
+
// look up the key that protects everything else. Mirrors @pii()'s
|
|
83
|
+
// PIINotSupportedOnEventSourceId guard, for the same reason.
|
|
84
|
+
if (key === EVENT_SOURCE_ID_PROPERTY) {
|
|
85
|
+
throw new EncryptedNotSupportedOnEventSourceId(declaringType.name);
|
|
86
|
+
}
|
|
87
|
+
TypeIntrospector.trackProperty(declaringType, key);
|
|
88
|
+
const metadata = {
|
|
89
|
+
metadataType: metadataTypeFor(scope),
|
|
90
|
+
details: details ?? ''
|
|
91
|
+
};
|
|
92
|
+
Reflect.defineMetadata(ENCRYPTED_PROPERTY_METADATA_KEY, metadata, target, key);
|
|
93
|
+
}
|
|
94
|
+
};
|
|
95
|
+
}
|
|
96
|
+
/**
|
|
97
|
+
* Gets the encrypted security metadata for a property.
|
|
98
|
+
* @param target - The class prototype.
|
|
99
|
+
* @param propertyKey - The property name.
|
|
100
|
+
* @returns The security metadata, or undefined if not decorated with @encrypted.
|
|
101
|
+
*/
|
|
102
|
+
export function getEncryptedMetadata(target, propertyKey) {
|
|
103
|
+
return Reflect.getMetadata(ENCRYPTED_PROPERTY_METADATA_KEY, target, propertyKey);
|
|
104
|
+
}
|
|
105
|
+
/**
|
|
106
|
+
* Checks whether a property has been decorated with @encrypted.
|
|
107
|
+
* @param target - The class prototype.
|
|
108
|
+
* @param propertyKey - The property name.
|
|
109
|
+
* @returns True if the property has @encrypted decorator; false otherwise.
|
|
110
|
+
*/
|
|
111
|
+
export function hasEncryptedMetadata(target, propertyKey) {
|
|
112
|
+
return Reflect.hasMetadata(ENCRYPTED_PROPERTY_METADATA_KEY, target, propertyKey);
|
|
113
|
+
}
|
|
114
|
+
/**
|
|
115
|
+
* Gets the encrypted security metadata for a type.
|
|
116
|
+
* @param type - The type constructor.
|
|
117
|
+
* @returns The security metadata, or undefined if not decorated with @encrypted.
|
|
118
|
+
*/
|
|
119
|
+
export function getTypeEncryptedMetadata(type) {
|
|
120
|
+
return Reflect.getMetadata(ENCRYPTED_TYPE_METADATA_KEY, type);
|
|
121
|
+
}
|
|
122
|
+
/**
|
|
123
|
+
* Checks whether a type has been decorated with @encrypted.
|
|
124
|
+
* @param type - The type constructor.
|
|
125
|
+
* @returns True if the type has @encrypted decorator; false otherwise.
|
|
126
|
+
*/
|
|
127
|
+
export function isEncrypted(type) {
|
|
128
|
+
return Reflect.hasMetadata(ENCRYPTED_TYPE_METADATA_KEY, type);
|
|
129
|
+
}
|
|
130
|
+
//# sourceMappingURL=encrypted.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"encrypted.js","sourceRoot":"","sources":["../../confidentiality/encrypted.ts"],"names":[],"mappings":"AAAA,6CAA6C;AAC7C,qGAAqG;AAErG,OAAO,kBAAkB,CAAC;AAE1B,OAAO,EAAE,oBAAoB,EAAE,MAAM,wBAAwB,CAAC;AAC9D,OAAO,EAAE,eAAe,EAAE,MAAM,mBAAmB,CAAC;AACpD,OAAO,EAAE,oCAAoC,EAAE,MAAM,wCAAwC,CAAC;AAC9F,OAAO,EAAE,gBAAgB,EAAE,MAAM,UAAU,CAAC;AAE5C,qFAAqF;AACrF,MAAM,wBAAwB,GAAG,eAAe,CAAC;AAEjD,8DAA8D;AAC9D,MAAM,+BAA+B,GAAG,uCAAuC,CAAC;AAEhF,yDAAyD;AACzD,MAAM,2BAA2B,GAAG,mCAAmC,CAAC;AAExE,SAAS,eAAe,CAAC,KAAsB;IAC3C,QAAQ,KAAK,EAAE,CAAC;QACZ,KAAK,eAAe,CAAC,OAAO;YACxB,OAAO,oBAAoB,CAAC,gBAAgB,CAAC;QACjD,KAA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AG,CAAC,CAAC;QACnF,CAAC;IACL,CAAC,CAAC;AACN,CAAC;AAED;;;;;GAKG;AACH,MAAM,UAAU,oBAAoB,CAAC,MAAc,EAAE,WAAmB;IACpE,OAAO,OAAO,CAAC,WAAW,CAAC,+BAA+B,EAAE,MAAM,EAAE,WAAW,CAAC,CAAC;AACrF,CAAC;AAED;;;;;GAKG;AACH,MAAM,UAAU,oBAAoB,CAAC,MAAc,EAAE,WAAmB;IACpE,OAAO,OAAO,CAAC,WAAW,CAAC,+BAA+B,EAAE,MAAM,EAAE,WAAW,CAAC,CAAC;AACrF,CAAC;AAED;;;;GAIG;AACH,MAAM,UAAU,wBAAwB,CAAC,IAAc;IACnD,OAAO,OAAO,CAAC,WAAW,CAAC,2BAA2B,EAAE,IAAI,CAAC,CAAC;AAClE,CAAC;AAED;;;;GAIG;AACH,MAAM,UAAU,WAAW,CAAC,IAAc;IACtC,OAAO,OAAO,CAAC,WAAW,CAAC,2BAA2B,EAAE,IAAI,CAAC,CAAC;AAClE,CAAC"}
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
export { SecurityMetadataType } from './SecurityMetadataType';
|
|
2
|
+
export type { SecurityMetadata } from './SecurityMetadata';
|
|
3
|
+
export { EncryptionScope } from './EncryptionScope';
|
|
4
|
+
export { encrypted, getEncryptedMetadata, hasEncryptedMetadata, getTypeEncryptedMetadata, isEncrypted } from './encrypted';
|
|
5
|
+
export { EncryptedNotSupportedOnEventSourceId } from './EncryptedNotSupportedOnEventSourceId';
|
|
6
|
+
export { PIIAndEncryptedCombinedNotSupported } from './PIIAndEncryptedCombinedNotSupported';
|
|
7
|
+
export { SecurityMetadataResolver } from './SecurityMetadataResolver';
|
|
8
|
+
//# sourceMappingURL=index.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../confidentiality/index.ts"],"names":[],"mappings":"AAGA,OAAO,EAAE,oBAAoB,EAAE,MAAM,wBAAwB,CAAC;AAC9D,YAAY,EAAE,gBAAgB,EAAE,MAAM,oBAAoB,CAAC;AAC3D,OAAO,EAAE,eAAe,EAAE,MAAM,mBAAmB,CAAC;AACpD,OAAO,EAAE,SAAS,EAAE,oBAAoB,EAAE,oBAAoB,EAAE,wBAAwB,EAAE,WAAW,EAAE,MAAM,aAAa,CAAC;AAC3H,OAAO,EAAE,oCAAoC,EAAE,MAAM,wCAAwC,CAAC;AAC9F,OAAO,EAAE,mCAAmC,EAAE,MAAM,uCAAuC,CAAC;AAC5F,OAAO,EAAE,wBAAwB,EAAE,MAAM,4BAA4B,CAAC"}
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
// Copyright (c) Cratis. All rights reserved.
|
|
2
|
+
// Licensed under the MIT license. See LICENSE file in the project root for full license information.
|
|
3
|
+
export { SecurityMetadataType } from './SecurityMetadataType';
|
|
4
|
+
export { EncryptionScope } from './EncryptionScope';
|
|
5
|
+
export { encrypted, getEncryptedMetadata, hasEncryptedMetadata, getTypeEncryptedMetadata, isEncrypted } from './encrypted';
|
|
6
|
+
export { EncryptedNotSupportedOnEventSourceId } from './EncryptedNotSupportedOnEventSourceId';
|
|
7
|
+
export { PIIAndEncryptedCombinedNotSupported } from './PIIAndEncryptedCombinedNotSupported';
|
|
8
|
+
export { SecurityMetadataResolver } from './SecurityMetadataResolver';
|
|
9
|
+
//# sourceMappingURL=index.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../confidentiality/index.ts"],"names":[],"mappings":"AAAA,6CAA6C;AAC7C,qGAAqG;AAErG,OAAO,EAAE,oBAAoB,EAAE,MAAM,wBAAwB,CAAC;AAE9D,OAAO,EAAE,eAAe,EAAE,MAAM,mBAAmB,CAAC;AACpD,OAAO,EAAE,SAAS,EAAE,oBAAoB,EAAE,oBAAoB,EAAE,wBAAwB,EAAE,WAAW,EAAE,MAAM,aAAa,CAAC;AAC3H,OAAO,EAAE,oCAAoC,EAAE,MAAM,wCAAwC,CAAC;AAC9F,OAAO,EAAE,mCAAmC,EAAE,MAAM,uCAAuC,CAAC;AAC5F,OAAO,EAAE,wBAAwB,EAAE,MAAM,4BAA4B,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Constraints.d.ts","sourceRoot":"","sources":["../../../events/constraints/Constraints.ts"],"names":[],"mappings":"AAIA,OAAO,EAAE,wBAAwB,EAAE,MAAM,iBAAiB,CAAC;AAC3D,OAAO,EAAE,mBAAmB,EAAE,MAAM,kBAAkB,CAAC;AACvD,OAAO,EAAE,YAAY,EAAE,MAAM,gBAAgB,CAAC;AAE9C,OAAO,EAAE,YAAY,EAAE,MAAM,gBAAgB,CAAC;AAI9C;;GAEG;AACH,qBAAa,WAAY,YAAW,YAAY;IAUxC,OAAO,CAAC,QAAQ,CAAC,WAAW;IAC5B,OAAO,CAAC,QAAQ,CAAC,WAAW;IAC5B,OAAO,CAAC,QAAQ,CAAC,gBAAgB;IAXrC,OAAO,CAAC,QAAQ,CAAC,SAAS,CAAwC;IAElE;;;;;OAKG;gBAEkB,WAAW,EAAE,MAAM,EACnB,WAAW,EAAE,mBAAmB,EAChC,gBAAgB,EAAE,wBAAwB;IAG/D,kBAAkB;IACZ,QAAQ,IAAI,OAAO,CAAC,IAAI,CAAC;IAa/B,kBAAkB;IACZ,QAAQ,IAAI,OAAO,CAAC,IAAI,CAAC;
|
|
1
|
+
{"version":3,"file":"Constraints.d.ts","sourceRoot":"","sources":["../../../events/constraints/Constraints.ts"],"names":[],"mappings":"AAIA,OAAO,EAAE,wBAAwB,EAAE,MAAM,iBAAiB,CAAC;AAC3D,OAAO,EAAE,mBAAmB,EAAE,MAAM,kBAAkB,CAAC;AACvD,OAAO,EAAE,YAAY,EAAE,MAAM,gBAAgB,CAAC;AAE9C,OAAO,EAAE,YAAY,EAAE,MAAM,gBAAgB,CAAC;AAI9C;;GAEG;AACH,qBAAa,WAAY,YAAW,YAAY;IAUxC,OAAO,CAAC,QAAQ,CAAC,WAAW;IAC5B,OAAO,CAAC,QAAQ,CAAC,WAAW;IAC5B,OAAO,CAAC,QAAQ,CAAC,gBAAgB;IAXrC,OAAO,CAAC,QAAQ,CAAC,SAAS,CAAwC;IAElE;;;;;OAKG;gBAEkB,WAAW,EAAE,MAAM,EACnB,WAAW,EAAE,mBAAmB,EAChC,gBAAgB,EAAE,wBAAwB;IAG/D,kBAAkB;IACZ,QAAQ,IAAI,OAAO,CAAC,IAAI,CAAC;IAa/B,kBAAkB;IACZ,QAAQ,IAAI,OAAO,CAAC,IAAI,CAAC;IAwE/B,kBAAkB;IAClB,MAAM,CAAC,EAAE,EAAE,YAAY,GAAG,OAAO;CAGpC"}
|
|
@@ -48,10 +48,15 @@ export class Constraints {
|
|
|
48
48
|
};
|
|
49
49
|
if (capture.uniqueConstraint) {
|
|
50
50
|
const uc = capture.uniqueConstraint;
|
|
51
|
+
const removalEventTypeIds = uc.removedWithEventTypeIds ?? [];
|
|
52
|
+
const legacyEventTypeId = uc.removedWithEventTypeId;
|
|
51
53
|
return {
|
|
52
54
|
Name: capture.name,
|
|
53
55
|
Type: ConstraintType.Unique,
|
|
54
|
-
RemovedWith:
|
|
56
|
+
RemovedWith: [...new Set([
|
|
57
|
+
...(legacyEventTypeId && !removalEventTypeIds.includes(legacyEventTypeId) ? [legacyEventTypeId] : []),
|
|
58
|
+
...removalEventTypeIds
|
|
59
|
+
])],
|
|
55
60
|
Definition: {
|
|
56
61
|
Value0: {
|
|
57
62
|
EventDefinitions: uc.eventDefinitions.map(ed => ({
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Constraints.js","sourceRoot":"","sources":["../../../events/constraints/Constraints.ts"],"names":[],"mappings":"AAAA,6CAA6C;AAC7C,qGAAqG;AAErG,OAAO,EAAE,cAAc,EAAE,MAAM,6BAA6B,CAAC;AAM7D,OAAO,EAAE,iBAAiB,EAAqB,MAAM,qBAAqB,CAAC;AAC3E,OAAO,EAAE,qBAA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AC;QAEH,IAAI,WAAW,CAAC,MAAM,KAAK,CAAC,EAAE,CAAC;YAC3B,OAAO;QACX,CAAC;QAED,MAAM,IAAI,CAAC,WAAW,CAAC,WAAW,CAAC,QAAQ,CAAC;YACxC,UAAU,EAAE,IAAI,CAAC,WAAW;YAC5B,WAAW,EAAE,WAAW;SAC3B,CAAC,CAAC;IACP,CAAC;IAED,kBAAkB;IAClB,MAAM,CAAC,EAAgB;QACnB,OAAO,IAAI,CAAC,SAAS,CAAC,GAAG,CAAC,EAAE,CAAC,KAAK,CAAC,CAAC;IACxC,CAAC;CACJ"}
|
|
@@ -24,7 +24,8 @@ export interface IUniqueConstraintBuilder {
|
|
|
24
24
|
*/
|
|
25
25
|
ignoreCasing(): IUniqueConstraintBuilder;
|
|
26
26
|
/**
|
|
27
|
-
*
|
|
27
|
+
* Adds an event type that removes this unique property constraint (e.g. a deletion event).
|
|
28
|
+
* Repeated calls retain distinct event types in registration order.
|
|
28
29
|
* @param eventType - The event constructor that removes the constraint.
|
|
29
30
|
* @returns This builder for fluent chaining.
|
|
30
31
|
*/
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"IUniqueConstraintBuilder.d.ts","sourceRoot":"","sources":["../../../events/constraints/IUniqueConstraintBuilder.ts"],"names":[],"mappings":"AAGA,OAAO,EAAE,WAAW,EAAE,gBAAgB,EAAE,MAAM,sBAAsB,CAAC;AAErE;;;GAGG;AACH,MAAM,WAAW,wBAAwB;IACrC;;;;;OAKG;IACH,QAAQ,CAAC,IAAI,EAAE,MAAM,GAAG,wBAAwB,CAAC;IAEjD;;;;;OAKG;IACH,EAAE,CAAC,MAAM,EAAE,SAAS,EAAE,WAAW,CAAC,MAAM,CAAC,EAAE,GAAG,UAAU,EAAE,gBAAgB,CAAC,MAAM,CAAC,EAAE,GAAG,wBAAwB,CAAC;IAEhH;;;OAGG;IACH,YAAY,IAAI,wBAAwB,CAAC;IAEzC
|
|
1
|
+
{"version":3,"file":"IUniqueConstraintBuilder.d.ts","sourceRoot":"","sources":["../../../events/constraints/IUniqueConstraintBuilder.ts"],"names":[],"mappings":"AAGA,OAAO,EAAE,WAAW,EAAE,gBAAgB,EAAE,MAAM,sBAAsB,CAAC;AAErE;;;GAGG;AACH,MAAM,WAAW,wBAAwB;IACrC;;;;;OAKG;IACH,QAAQ,CAAC,IAAI,EAAE,MAAM,GAAG,wBAAwB,CAAC;IAEjD;;;;;OAKG;IACH,EAAE,CAAC,MAAM,EAAE,SAAS,EAAE,WAAW,CAAC,MAAM,CAAC,EAAE,GAAG,UAAU,EAAE,gBAAgB,CAAC,MAAM,CAAC,EAAE,GAAG,wBAAwB,CAAC;IAEhH;;;OAGG;IACH,YAAY,IAAI,wBAAwB,CAAC;IAEzC;;;;;OAKG;IACH,WAAW,CAAC,SAAS,EAAE,QAAQ,GAAG,wBAAwB,CAAC;IAE3D;;;;OAIG;IACH,WAAW,CAAC,OAAO,EAAE,MAAM,GAAG,wBAAwB,CAAC;IAEvD;;;;OAIG;IACH,eAAe,CAAC,eAAe,EAAE,MAAM,MAAM,GAAG,wBAAwB,CAAC;CAC5E"}
|
|
@@ -10,7 +10,10 @@ export interface UniqueConstraintCapture {
|
|
|
10
10
|
name?: string;
|
|
11
11
|
eventDefinitions: UniqueConstraintEventEntry[];
|
|
12
12
|
ignoreCasing: boolean;
|
|
13
|
+
/** The most recently specified removal event type (retained for legacy capture consumers). */
|
|
13
14
|
removedWithEventTypeId?: string;
|
|
15
|
+
/** Distinct removal event types in registration order. */
|
|
16
|
+
removedWithEventTypeIds?: string[];
|
|
14
17
|
message?: string;
|
|
15
18
|
}
|
|
16
19
|
/**
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"UniqueConstraintBuilder.d.ts","sourceRoot":"","sources":["../../../events/constraints/UniqueConstraintBuilder.ts"],"names":[],"mappings":"AAGA,OAAO,EAAE,WAAW,EAAE,gBAAgB,EAAoC,MAAM,sBAAsB,CAAC;AAEvG,OAAO,EAAE,wBAAw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AAM,CAAC;IACd,gBAAgB,EAAE,0BAA0B,EAAE,CAAC;IAC/C,YAAY,EAAE,OAAO,CAAC;IACtB,8FAA8F;IAC9F,sBAAsB,CAAC,EAAE,MAAM,CAAC;IAChC,0DAA0D;IAC1D,uBAAuB,CAAC,EAAE,MAAM,EAAE,CAAC;IACnC,OAAO,CAAC,EAAE,MAAM,CAAC;CACpB;AAED;;;GAGG;AACH,qBAAa,uBAAwB,YAAW,wBAAwB;IACpE,OAAO,CAAC,QAAQ,CAAC,QAAQ,CAA0B;gBAEvC,OAAO,EAAE,uBAAuB;IAI5C,kBAAkB;IAClB,QAAQ,CAAC,IAAI,EAAE,MAAM,GAAG,wBAAwB;IAKhD,kBAAkB;IAClB,EAAE,CAAC,MAAM,EAAE,SAAS,EAAE,WAAW,CAAC,MAAM,CAAC,EAAE,GAAG,UAAU,EAAE,gBAAgB,CAAC,MAAM,CAAC,EAAE,GAAG,wBAAwB;IAY/G,kBAAkB;IAClB,YAAY,IAAI,wBAAwB;IAKxC,kBAAkB;IAClB,WAAW,CAAC,SAAS,EAAE,QAAQ,GAAG,wBAAwB;IAW1D,kBAAkB;IAClB,WAAW,CAAC,OAAO,EAAE,MAAM,GAAG,wBAAwB;IAKtD,kBAAkB;IAClB,eAAe,CAAC,eAAe,EAAE,MAAM,MAAM,GAAG,wBAAwB;CAI3E"}
|
|
@@ -43,8 +43,13 @@ export class UniqueConstraintBuilder {
|
|
|
43
43
|
}
|
|
44
44
|
/** @inheritdoc */
|
|
45
45
|
removedWith(eventType) {
|
|
46
|
-
const
|
|
47
|
-
this._capture.
|
|
46
|
+
const eventTypeId = getEventTypeFor(eventType).id.value;
|
|
47
|
+
const removalEventTypeIds = this._capture.removedWithEventTypeIds ??=
|
|
48
|
+
this._capture.removedWithEventTypeId ? [this._capture.removedWithEventTypeId] : [];
|
|
49
|
+
if (!removalEventTypeIds.includes(eventTypeId)) {
|
|
50
|
+
removalEventTypeIds.push(eventTypeId);
|
|
51
|
+
}
|
|
52
|
+
this._capture.removedWithEventTypeId = eventTypeId;
|
|
48
53
|
return this;
|
|
49
54
|
}
|
|
50
55
|
/** @inheritdoc */
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"UniqueConstraintBuilder.js","sourceRoot":"","sources":["../../../events/constraints/UniqueConstraintBuilder.ts"],"names":[],"mappings":"AAAA,6CAA6C;AAC7C,qGAAqG;AAErG,OAAO,EAAiC,gCAAgC,EAAE,MAAM,sBAAsB,CAAC;AACvG,OAAO,EAAE,eAAe,EAAE,MAAM,uBAAuB,CAAC;AAGxD,uEAAuE;AACvE,SAAS,mBAAmB,CAAI,QAA6B;IACzD,MAAM,OAAO,GAAG,IAAI,gCAAgC,EAAE,CAAC;IACvD,MAAM,KAAK,GAAG,IAAI,KAAK,CAAC,EAAE,EAAE,OAAO,CAAC,CAAC;IACrC,QAAQ,CAAC,KAAU,CAAC,CAAC;IACrB,OAAO,OAAO,CAAC,IAAI,CAAC;AACxB,CAAC;
|
|
1
|
+
{"version":3,"file":"UniqueConstraintBuilder.js","sourceRoot":"","sources":["../../../events/constraints/UniqueConstraintBuilder.ts"],"names":[],"mappings":"AAAA,6CAA6C;AAC7C,qGAAqG;AAErG,OAAO,EAAiC,gCAAgC,EAAE,MAAM,sBAAsB,CAAC;AACvG,OAAO,EAAE,eAAe,EAAE,MAAM,uBAAuB,CAAC;AAGxD,uEAAuE;AACvE,SAAS,mBAAmB,CAAI,QAA6B;IACzD,MAAM,OAAO,GAAG,IAAI,gCAAgC,EAAE,CAAC;IACvD,MAAM,KAAK,GAAG,IAAI,KAAK,CAAC,EAAE,EAAE,OAAO,CAAC,CAAC;IACrC,QAAQ,CAAC,KAAU,CAAC,CAAC;IACrB,OAAO,OAAO,CAAC,IAAI,CAAC;AACxB,CAAC;AAoBD;;;GAGG;AACH,MAAM,OAAO,uBAAuB;IACf,QAAQ,CAA0B;IAEnD,YAAY,OAAgC;QACxC,IAAI,CAAC,QAAQ,GAAG,OAAO,CAAC;IAC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AE,CAAC;QACvF,IAAI,CAAC,mBAAmB,CAAC,QAAQ,CAAC,WAAW,CAAC,EAAE,CAAC;YAC7C,mBAAmB,CAAC,IAAI,CAAC,WAAW,CAAC,CAAC;QAC1C,CAAC;QACD,IAAI,CAAC,QAAQ,CAAC,sBAAsB,GAAG,WAAW,CAAC;QACnD,OAAO,IAAI,CAAC;IAChB,CAAC;IAED,kBAAkB;IAClB,WAAW,CAAC,OAAe;QACvB,IAAI,CAAC,QAAQ,CAAC,OAAO,GAAG,OAAO,CAAC;QAChC,OAAO,IAAI,CAAC;IAChB,CAAC;IAED,kBAAkB;IAClB,eAAe,CAAC,eAA6B;QACzC,IAAI,CAAC,QAAQ,CAAC,OAAO,GAAG,eAAe,EAAE,CAAC;QAC1C,OAAO,IAAI,CAAC;IAChB,CAAC;CACJ"}
|
package/dist/index.d.ts
CHANGED
|
@@ -20,6 +20,7 @@ import * as correlation from './correlation';
|
|
|
20
20
|
import * as transactions from './transactions';
|
|
21
21
|
import * as eventStoreSubscriptions from './eventStoreSubscriptions';
|
|
22
22
|
import * as compliance from './compliance';
|
|
23
|
+
import * as confidentiality from './confidentiality';
|
|
23
24
|
export { ChronicleClient } from './ChronicleClient';
|
|
24
25
|
export { IncompatibleChronicleServer } from './connection/IncompatibleChronicleServer';
|
|
25
26
|
export type { IChronicleClient } from './IChronicleClient';
|
|
@@ -53,5 +54,6 @@ export * from './correlation';
|
|
|
53
54
|
export * from './transactions';
|
|
54
55
|
export * from './eventStoreSubscriptions';
|
|
55
56
|
export * from './compliance';
|
|
56
|
-
export
|
|
57
|
+
export * from './confidentiality';
|
|
58
|
+
export { events, eventSequences, reactors, reducers, seeding, readModels, projections, jobs, webhooks, externalServices, identities, observation, sinks, schemas, types, artifacts, identity, auditing, correlation, transactions, eventStoreSubscriptions, compliance, confidentiality, };
|
|
57
59
|
//# sourceMappingURL=index.d.ts.map
|
package/dist/index.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"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EAAE,MAAM,2BAA2B,CAAC;AACpE,OAAO,EAAE,IAAI,EAAE,MAAM,sBAAsB,CAAC;AAC5C,OAAO,EAAE,4BAA4B,EAAE,eAAe,EAAE,MAAM,WAAW,CAAC;AAC1E,OAAO,EAAE,cAAc,EAAE,kBAAkB,EAAE,gBAAgB,EAAE,MAAM,WAAW,CAAC;AAEjF,cAAc,UAAU,CAAC;AACzB,cAAc,kBAAkB,CAAC;AACjC,cAAc,YAAY,CAAC;AAC3B,cAAc,YAAY,CAAC;AAC3B,cAAc,WAAW,CAAC;AAC1B,cAAc,cAAc,CAAC;AAC7B,cAAc,eAAe,CAAC;AAC9B,cAAc,QAAQ,CAAC;AACvB,cAAc,YAAY,CAAC;AAC3B,cAAc,oBAAoB,CAAC;AACnC,cAAc,cAAc,CAAC;AAC7B,cAAc,eAAe,CAAC;AAC9B,cAAc,SAAS,CAAC;AACxB,cAAc,WAAW,CAAC;AAC1B,cAAc,SAAS,CAAC;AACxB,cAAc,aAAa,CAAC;AAC5B,cAAc,YAAY,CAAC;AAC3B,cAAc,YAAY,CAAC;AAC3B,cAAc,eAAe,CAAC;AAC9B,cAAc,gBAAgB,CAAC;AAC/B,cAAc,2BAA2B,CAAC;AAC1C,cAAc,cAAc,CAAC;AAC7B,cAAc,mBAAmB,CAAC;AAElC,OAAO,EACH,MAAM,EACN,cAAc,EACd,QAAQ,EACR,QAAQ,EACR,OAAO,EACP,UAAU,EACV,WAAW,EACX,IAAI,EACJ,QAAQ,EACR,gBAAgB,EAChB,UAAU,EACV,WAAW,EACX,KAAK,EACL,OAAO,EACP,KAAK,EACL,SAAS,EACT,QAAQ,EACR,QAAQ,EACR,WAAW,EACX,YAAY,EACZ,uBAAuB,EACvB,UAAU,EACV,eAAe,GAClB,CAAC"}
|
package/dist/index.js
CHANGED
|
@@ -22,6 +22,7 @@ import * as correlation from './correlation';
|
|
|
22
22
|
import * as transactions from './transactions';
|
|
23
23
|
import * as eventStoreSubscriptions from './eventStoreSubscriptions';
|
|
24
24
|
import * as compliance from './compliance';
|
|
25
|
+
import * as confidentiality from './confidentiality';
|
|
25
26
|
export { ChronicleClient } from './ChronicleClient';
|
|
26
27
|
export { IncompatibleChronicleServer } from './connection/IncompatibleChronicleServer';
|
|
27
28
|
export { ChronicleOptions } from './ChronicleOptions';
|
|
@@ -53,5 +54,6 @@ export * from './correlation';
|
|
|
53
54
|
export * from './transactions';
|
|
54
55
|
export * from './eventStoreSubscriptions';
|
|
55
56
|
export * from './compliance';
|
|
56
|
-
export
|
|
57
|
+
export * from './confidentiality';
|
|
58
|
+
export { events, eventSequences, reactors, reducers, seeding, readModels, projections, jobs, webhooks, externalServices, identities, observation, sinks, schemas, types, artifacts, identity, auditing, correlation, transactions, eventStoreSubscriptions, compliance, confidentiality, };
|
|
57
59
|
//# sourceMappingURL=index.js.map
|