@twin.org/hierarchies-models 0.9.0-next.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/LICENSE +201 -0
- package/README.md +17 -0
- package/dist/es/factories/hierarchiesConnectorFactory.js +9 -0
- package/dist/es/factories/hierarchiesConnectorFactory.js.map +1 -0
- package/dist/es/index.js +37 -0
- package/dist/es/index.js.map +1 -0
- package/dist/es/models/IAccreditation.js +2 -0
- package/dist/es/models/IAccreditation.js.map +1 -0
- package/dist/es/models/IFederation.js +2 -0
- package/dist/es/models/IFederation.js.map +1 -0
- package/dist/es/models/IGovernance.js +2 -0
- package/dist/es/models/IGovernance.js.map +1 -0
- package/dist/es/models/IHierarchiesComponent.js +2 -0
- package/dist/es/models/IHierarchiesComponent.js.map +1 -0
- package/dist/es/models/IHierarchiesConnector.js +2 -0
- package/dist/es/models/IHierarchiesConnector.js.map +1 -0
- package/dist/es/models/IProperty.js +2 -0
- package/dist/es/models/IProperty.js.map +1 -0
- package/dist/es/models/IPropertyCondition.js +2 -0
- package/dist/es/models/IPropertyCondition.js.map +1 -0
- package/dist/es/models/IPropertyValue.js +2 -0
- package/dist/es/models/IPropertyValue.js.map +1 -0
- package/dist/es/models/IRootAuthority.js +4 -0
- package/dist/es/models/IRootAuthority.js.map +1 -0
- package/dist/es/models/ITimespan.js +4 -0
- package/dist/es/models/ITimespan.js.map +1 -0
- package/dist/es/models/api/IHierarchiesAccreditationAddRequest.js +2 -0
- package/dist/es/models/api/IHierarchiesAccreditationAddRequest.js.map +1 -0
- package/dist/es/models/api/IHierarchiesAccreditationGetRequest.js +4 -0
- package/dist/es/models/api/IHierarchiesAccreditationGetRequest.js.map +1 -0
- package/dist/es/models/api/IHierarchiesAccreditationGetResponse.js +2 -0
- package/dist/es/models/api/IHierarchiesAccreditationGetResponse.js.map +1 -0
- package/dist/es/models/api/IHierarchiesAccreditationRemoveRequest.js +4 -0
- package/dist/es/models/api/IHierarchiesAccreditationRemoveRequest.js.map +1 -0
- package/dist/es/models/api/IHierarchiesAccreditationsGetRequest.js +4 -0
- package/dist/es/models/api/IHierarchiesAccreditationsGetRequest.js.map +1 -0
- package/dist/es/models/api/IHierarchiesAccreditationsGetResponse.js +2 -0
- package/dist/es/models/api/IHierarchiesAccreditationsGetResponse.js.map +1 -0
- package/dist/es/models/api/IHierarchiesAuthorityAddRequest.js +4 -0
- package/dist/es/models/api/IHierarchiesAuthorityAddRequest.js.map +1 -0
- package/dist/es/models/api/IHierarchiesAuthorityRemoveRequest.js +4 -0
- package/dist/es/models/api/IHierarchiesAuthorityRemoveRequest.js.map +1 -0
- package/dist/es/models/api/IHierarchiesFederationCreateRequest.js +4 -0
- package/dist/es/models/api/IHierarchiesFederationCreateRequest.js.map +1 -0
- package/dist/es/models/api/IHierarchiesFederationGetRequest.js +4 -0
- package/dist/es/models/api/IHierarchiesFederationGetRequest.js.map +1 -0
- package/dist/es/models/api/IHierarchiesFederationGetResponse.js +2 -0
- package/dist/es/models/api/IHierarchiesFederationGetResponse.js.map +1 -0
- package/dist/es/models/api/IHierarchiesPropertiesGetRequest.js +4 -0
- package/dist/es/models/api/IHierarchiesPropertiesGetRequest.js.map +1 -0
- package/dist/es/models/api/IHierarchiesPropertiesGetResponse.js +2 -0
- package/dist/es/models/api/IHierarchiesPropertiesGetResponse.js.map +1 -0
- package/dist/es/models/api/IHierarchiesPropertiesValidateRequest.js +2 -0
- package/dist/es/models/api/IHierarchiesPropertiesValidateRequest.js.map +1 -0
- package/dist/es/models/api/IHierarchiesPropertiesValidateResponse.js +4 -0
- package/dist/es/models/api/IHierarchiesPropertiesValidateResponse.js.map +1 -0
- package/dist/es/models/api/IHierarchiesPropertyAddRequest.js +2 -0
- package/dist/es/models/api/IHierarchiesPropertyAddRequest.js.map +1 -0
- package/dist/es/models/api/IHierarchiesPropertyGetRequest.js +4 -0
- package/dist/es/models/api/IHierarchiesPropertyGetRequest.js.map +1 -0
- package/dist/es/models/api/IHierarchiesPropertyGetResponse.js +2 -0
- package/dist/es/models/api/IHierarchiesPropertyGetResponse.js.map +1 -0
- package/dist/es/models/api/IHierarchiesPropertyRemoveRequest.js +4 -0
- package/dist/es/models/api/IHierarchiesPropertyRemoveRequest.js.map +1 -0
- package/dist/es/models/api/IHierarchiesPropertyValidateRequest.js +2 -0
- package/dist/es/models/api/IHierarchiesPropertyValidateRequest.js.map +1 -0
- package/dist/es/models/api/IHierarchiesPropertyValidateResponse.js +4 -0
- package/dist/es/models/api/IHierarchiesPropertyValidateResponse.js.map +1 -0
- package/dist/es/models/propertyConstraintType.js +29 -0
- package/dist/es/models/propertyConstraintType.js.map +1 -0
- package/dist/es/models/propertyType.js +17 -0
- package/dist/es/models/propertyType.js.map +1 -0
- package/dist/types/factories/hierarchiesConnectorFactory.d.ts +6 -0
- package/dist/types/index.d.ts +34 -0
- package/dist/types/models/IAccreditation.d.ts +18 -0
- package/dist/types/models/IFederation.d.ts +24 -0
- package/dist/types/models/IGovernance.d.ts +28 -0
- package/dist/types/models/IHierarchiesComponent.d.ts +160 -0
- package/dist/types/models/IHierarchiesConnector.d.ts +159 -0
- package/dist/types/models/IProperty.d.ts +24 -0
- package/dist/types/models/IPropertyCondition.d.ts +19 -0
- package/dist/types/models/IPropertyValue.d.ts +14 -0
- package/dist/types/models/IRootAuthority.d.ts +13 -0
- package/dist/types/models/ITimespan.d.ts +13 -0
- package/dist/types/models/api/IHierarchiesAccreditationAddRequest.d.ts +19 -0
- package/dist/types/models/api/IHierarchiesAccreditationGetRequest.d.ts +22 -0
- package/dist/types/models/api/IHierarchiesAccreditationGetResponse.d.ts +10 -0
- package/dist/types/models/api/IHierarchiesAccreditationRemoveRequest.d.ts +22 -0
- package/dist/types/models/api/IHierarchiesAccreditationsGetRequest.d.ts +18 -0
- package/dist/types/models/api/IHierarchiesAccreditationsGetResponse.d.ts +10 -0
- package/dist/types/models/api/IHierarchiesAuthorityAddRequest.d.ts +23 -0
- package/dist/types/models/api/IHierarchiesAuthorityRemoveRequest.d.ts +18 -0
- package/dist/types/models/api/IHierarchiesFederationCreateRequest.d.ts +18 -0
- package/dist/types/models/api/IHierarchiesFederationGetRequest.d.ts +23 -0
- package/dist/types/models/api/IHierarchiesFederationGetResponse.d.ts +10 -0
- package/dist/types/models/api/IHierarchiesPropertiesGetRequest.d.ts +23 -0
- package/dist/types/models/api/IHierarchiesPropertiesGetResponse.d.ts +10 -0
- package/dist/types/models/api/IHierarchiesPropertiesValidateRequest.d.ts +30 -0
- package/dist/types/models/api/IHierarchiesPropertiesValidateResponse.d.ts +14 -0
- package/dist/types/models/api/IHierarchiesPropertyAddRequest.d.ts +19 -0
- package/dist/types/models/api/IHierarchiesPropertyGetRequest.d.ts +18 -0
- package/dist/types/models/api/IHierarchiesPropertyGetResponse.d.ts +10 -0
- package/dist/types/models/api/IHierarchiesPropertyRemoveRequest.d.ts +18 -0
- package/dist/types/models/api/IHierarchiesPropertyValidateRequest.d.ts +32 -0
- package/dist/types/models/api/IHierarchiesPropertyValidateResponse.d.ts +14 -0
- package/dist/types/models/propertyConstraintType.d.ts +29 -0
- package/dist/types/models/propertyType.d.ts +17 -0
- package/docs/changelog.md +11 -0
- package/docs/examples.md +74 -0
- package/docs/reference/index.md +46 -0
- package/docs/reference/interfaces/IAccreditation.md +27 -0
- package/docs/reference/interfaces/IFederation.md +36 -0
- package/docs/reference/interfaces/IGovernance.md +44 -0
- package/docs/reference/interfaces/IHierarchiesAccreditationAddRequest.md +25 -0
- package/docs/reference/interfaces/IHierarchiesAccreditationGetRequest.md +29 -0
- package/docs/reference/interfaces/IHierarchiesAccreditationGetResponse.md +11 -0
- package/docs/reference/interfaces/IHierarchiesAccreditationRemoveRequest.md +29 -0
- package/docs/reference/interfaces/IHierarchiesAccreditationsGetRequest.md +23 -0
- package/docs/reference/interfaces/IHierarchiesAccreditationsGetResponse.md +11 -0
- package/docs/reference/interfaces/IHierarchiesAuthorityAddRequest.md +31 -0
- package/docs/reference/interfaces/IHierarchiesAuthorityRemoveRequest.md +23 -0
- package/docs/reference/interfaces/IHierarchiesComponent.md +613 -0
- package/docs/reference/interfaces/IHierarchiesConnector.md +607 -0
- package/docs/reference/interfaces/IHierarchiesFederationCreateRequest.md +23 -0
- package/docs/reference/interfaces/IHierarchiesFederationGetRequest.md +31 -0
- package/docs/reference/interfaces/IHierarchiesFederationGetResponse.md +11 -0
- package/docs/reference/interfaces/IHierarchiesPropertiesGetRequest.md +31 -0
- package/docs/reference/interfaces/IHierarchiesPropertiesGetResponse.md +11 -0
- package/docs/reference/interfaces/IHierarchiesPropertiesValidateRequest.md +41 -0
- package/docs/reference/interfaces/IHierarchiesPropertiesValidateResponse.md +17 -0
- package/docs/reference/interfaces/IHierarchiesPropertyAddRequest.md +25 -0
- package/docs/reference/interfaces/IHierarchiesPropertyGetRequest.md +23 -0
- package/docs/reference/interfaces/IHierarchiesPropertyGetResponse.md +11 -0
- package/docs/reference/interfaces/IHierarchiesPropertyRemoveRequest.md +23 -0
- package/docs/reference/interfaces/IHierarchiesPropertyValidateRequest.md +43 -0
- package/docs/reference/interfaces/IHierarchiesPropertyValidateResponse.md +17 -0
- package/docs/reference/interfaces/IProperty.md +35 -0
- package/docs/reference/interfaces/IPropertyCondition.md +27 -0
- package/docs/reference/interfaces/IPropertyValue.md +19 -0
- package/docs/reference/interfaces/IRootAuthority.md +19 -0
- package/docs/reference/interfaces/ITimespan.md +19 -0
- package/docs/reference/type-aliases/PropertyConstraintType.md +5 -0
- package/docs/reference/type-aliases/PropertyType.md +5 -0
- package/docs/reference/variables/HierarchiesConnectorFactory.md +5 -0
- package/docs/reference/variables/PropertyConstraintType.md +37 -0
- package/docs/reference/variables/PropertyType.md +19 -0
- package/locales/en.json +3 -0
- package/package.json +53 -0
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"IHierarchiesPropertyGetResponse.js","sourceRoot":"","sources":["../../../../src/models/api/IHierarchiesPropertyGetResponse.ts"],"names":[],"mappings":"","sourcesContent":["// Copyright 2026 IOTA Stiftung.\n// SPDX-License-Identifier: Apache-2.0.\nimport type { IProperty } from \"../IProperty.js\";\n\n/**\n * Response for getting a property.\n */\nexport interface IHierarchiesPropertyGetResponse {\n\t/**\n\t * The response body.\n\t */\n\tbody: IProperty;\n}\n"]}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"IHierarchiesPropertyRemoveRequest.js","sourceRoot":"","sources":["../../../../src/models/api/IHierarchiesPropertyRemoveRequest.ts"],"names":[],"mappings":"AAAA,gCAAgC;AAChC,uCAAuC","sourcesContent":["// Copyright 2026 IOTA Stiftung.\n// SPDX-License-Identifier: Apache-2.0.\n\n/**\n * Request to remove a property from a federation.\n */\nexport interface IHierarchiesPropertyRemoveRequest {\n\t/**\n\t * The request path parameters.\n\t */\n\tpathParams: {\n\t\t/**\n\t\t * The id of the federation.\n\t\t */\n\t\tfederationId: string;\n\n\t\t/**\n\t\t * The property name to remove.\n\t\t */\n\t\tpropertyName: string;\n\t};\n}\n"]}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"IHierarchiesPropertyValidateRequest.js","sourceRoot":"","sources":["../../../../src/models/api/IHierarchiesPropertyValidateRequest.ts"],"names":[],"mappings":"","sourcesContent":["// Copyright 2026 IOTA Stiftung.\n// SPDX-License-Identifier: Apache-2.0.\nimport type { IPropertyValue } from \"../IPropertyValue.js\";\n\n/**\n * Request to validate a property for a federation.\n */\nexport interface IHierarchiesPropertyValidateRequest {\n\t/**\n\t * The request path parameters.\n\t */\n\tpathParams: {\n\t\t/**\n\t\t * The id of the federation.\n\t\t */\n\t\tfederationId: string;\n\t};\n\t/**\n\t * The request data.\n\t */\n\tbody: {\n\t\t/**\n\t\t * The accredited by id.\n\t\t */\n\t\taccreditedById: string;\n\n\t\t/**\n\t\t * The property name to validate.\n\t\t */\n\t\tpropertyName: string;\n\n\t\t/**\n\t\t * The property value to validate.\n\t\t */\n\t\tpropertyValue: IPropertyValue;\n\t};\n}\n"]}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"IHierarchiesPropertyValidateResponse.js","sourceRoot":"","sources":["../../../../src/models/api/IHierarchiesPropertyValidateResponse.ts"],"names":[],"mappings":"AAAA,gCAAgC;AAChC,uCAAuC","sourcesContent":["// Copyright 2026 IOTA Stiftung.\n// SPDX-License-Identifier: Apache-2.0.\n\n/**\n * Response for property validation.\n */\nexport interface IHierarchiesPropertyValidateResponse {\n\t/**\n\t * The response body.\n\t */\n\tbody: {\n\t\t/**\n\t\t * Whether the provided property is valid.\n\t\t */\n\t\tvalid: boolean;\n\t};\n}\n"]}
|
|
@@ -0,0 +1,29 @@
|
|
|
1
|
+
// Copyright 2026 IOTA Stiftung.
|
|
2
|
+
// SPDX-License-Identifier: Apache-2.0.
|
|
3
|
+
/**
|
|
4
|
+
* Defines the types of constraints that can be applied to federation properties.
|
|
5
|
+
*/
|
|
6
|
+
// eslint-disable-next-line @typescript-eslint/naming-convention
|
|
7
|
+
export const PropertyConstraintType = {
|
|
8
|
+
/**
|
|
9
|
+
* Value must contain a specific substring.
|
|
10
|
+
*/
|
|
11
|
+
Contains: "Contains",
|
|
12
|
+
/**
|
|
13
|
+
* Value must start with a specific substring.
|
|
14
|
+
*/
|
|
15
|
+
StartsWith: "StartsWith",
|
|
16
|
+
/**
|
|
17
|
+
* Value must end with a specific substring.
|
|
18
|
+
*/
|
|
19
|
+
EndsWith: "EndsWith",
|
|
20
|
+
/**
|
|
21
|
+
* Value must be greater than a specific value.
|
|
22
|
+
*/
|
|
23
|
+
GreaterThan: "GreaterThan",
|
|
24
|
+
/**
|
|
25
|
+
* Value must be less than a specific value.
|
|
26
|
+
*/
|
|
27
|
+
LessThan: "LessThan"
|
|
28
|
+
};
|
|
29
|
+
//# sourceMappingURL=propertyConstraintType.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"propertyConstraintType.js","sourceRoot":"","sources":["../../../src/models/propertyConstraintType.ts"],"names":[],"mappings":"AAAA,gCAAgC;AAChC,uCAAuC;AAEvC;;GAEG;AACH,gEAAgE;AAChE,MAAM,CAAC,MAAM,sBAAsB,GAAG;IACrC;;OAEG;IACH,QAAQ,EAAE,UAAU;IAEpB;;OAEG;IACH,UAAU,EAAE,YAAY;IAExB;;OAEG;IACH,QAAQ,EAAE,UAAU;IAEpB;;OAEG;IACH,WAAW,EAAE,aAAa;IAE1B;;OAEG;IACH,QAAQ,EAAE,UAAU;CACX,CAAC","sourcesContent":["// Copyright 2026 IOTA Stiftung.\n// SPDX-License-Identifier: Apache-2.0.\n\n/**\n * Defines the types of constraints that can be applied to federation properties.\n */\n// eslint-disable-next-line @typescript-eslint/naming-convention\nexport const PropertyConstraintType = {\n\t/**\n\t * Value must contain a specific substring.\n\t */\n\tContains: \"Contains\",\n\n\t/**\n\t * Value must start with a specific substring.\n\t */\n\tStartsWith: \"StartsWith\",\n\n\t/**\n\t * Value must end with a specific substring.\n\t */\n\tEndsWith: \"EndsWith\",\n\n\t/**\n\t * Value must be greater than a specific value.\n\t */\n\tGreaterThan: \"GreaterThan\",\n\n\t/**\n\t * Value must be less than a specific value.\n\t */\n\tLessThan: \"LessThan\"\n} as const;\n\n/**\n * Type representing the possible condition types.\n */\nexport type PropertyConstraintType =\n\t(typeof PropertyConstraintType)[keyof typeof PropertyConstraintType];\n"]}
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
// Copyright 2026 IOTA Stiftung.
|
|
2
|
+
// SPDX-License-Identifier: Apache-2.0.
|
|
3
|
+
/**
|
|
4
|
+
* Defines the supported data types for property values.
|
|
5
|
+
*/
|
|
6
|
+
// eslint-disable-next-line @typescript-eslint/naming-convention
|
|
7
|
+
export const PropertyType = {
|
|
8
|
+
/**
|
|
9
|
+
* Value is a string.
|
|
10
|
+
*/
|
|
11
|
+
String: "String",
|
|
12
|
+
/**
|
|
13
|
+
* Value is a bigint.
|
|
14
|
+
*/
|
|
15
|
+
BigInt: "BigInt"
|
|
16
|
+
};
|
|
17
|
+
//# sourceMappingURL=propertyType.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"propertyType.js","sourceRoot":"","sources":["../../../src/models/propertyType.ts"],"names":[],"mappings":"AAAA,gCAAgC;AAChC,uCAAuC;AAEvC;;GAEG;AACH,gEAAgE;AAChE,MAAM,CAAC,MAAM,YAAY,GAAG;IAC3B;;OAEG;IACH,MAAM,EAAE,QAAQ;IAEhB;;OAEG;IACH,MAAM,EAAE,QAAQ;CACP,CAAC","sourcesContent":["// Copyright 2026 IOTA Stiftung.\n// SPDX-License-Identifier: Apache-2.0.\n\n/**\n * Defines the supported data types for property values.\n */\n// eslint-disable-next-line @typescript-eslint/naming-convention\nexport const PropertyType = {\n\t/**\n\t * Value is a string.\n\t */\n\tString: \"String\",\n\n\t/**\n\t * Value is a bigint.\n\t */\n\tBigInt: \"BigInt\"\n} as const;\n\n/**\n * Type representing the possible property types.\n */\nexport type PropertyType = (typeof PropertyType)[keyof typeof PropertyType];\n"]}
|
|
@@ -0,0 +1,34 @@
|
|
|
1
|
+
export * from "./factories/hierarchiesConnectorFactory.js";
|
|
2
|
+
export * from "./models/api/IHierarchiesAccreditationAddRequest.js";
|
|
3
|
+
export * from "./models/api/IHierarchiesAccreditationGetRequest.js";
|
|
4
|
+
export * from "./models/api/IHierarchiesAccreditationGetResponse.js";
|
|
5
|
+
export * from "./models/api/IHierarchiesAccreditationRemoveRequest.js";
|
|
6
|
+
export * from "./models/api/IHierarchiesAccreditationsGetRequest.js";
|
|
7
|
+
export * from "./models/api/IHierarchiesAccreditationsGetResponse.js";
|
|
8
|
+
export * from "./models/api/IHierarchiesAuthorityAddRequest.js";
|
|
9
|
+
export * from "./models/api/IHierarchiesAuthorityRemoveRequest.js";
|
|
10
|
+
export * from "./models/api/IHierarchiesFederationCreateRequest.js";
|
|
11
|
+
export * from "./models/api/IHierarchiesFederationGetRequest.js";
|
|
12
|
+
export * from "./models/api/IHierarchiesFederationGetResponse.js";
|
|
13
|
+
export * from "./models/api/IHierarchiesPropertiesGetRequest.js";
|
|
14
|
+
export * from "./models/api/IHierarchiesPropertiesGetResponse.js";
|
|
15
|
+
export * from "./models/api/IHierarchiesPropertiesValidateRequest.js";
|
|
16
|
+
export * from "./models/api/IHierarchiesPropertiesValidateResponse.js";
|
|
17
|
+
export * from "./models/api/IHierarchiesPropertyAddRequest.js";
|
|
18
|
+
export * from "./models/api/IHierarchiesPropertyGetRequest.js";
|
|
19
|
+
export * from "./models/api/IHierarchiesPropertyGetResponse.js";
|
|
20
|
+
export * from "./models/api/IHierarchiesPropertyRemoveRequest.js";
|
|
21
|
+
export * from "./models/api/IHierarchiesPropertyValidateRequest.js";
|
|
22
|
+
export * from "./models/api/IHierarchiesPropertyValidateResponse.js";
|
|
23
|
+
export * from "./models/IAccreditation.js";
|
|
24
|
+
export * from "./models/IFederation.js";
|
|
25
|
+
export * from "./models/IGovernance.js";
|
|
26
|
+
export * from "./models/IHierarchiesComponent.js";
|
|
27
|
+
export * from "./models/IHierarchiesConnector.js";
|
|
28
|
+
export * from "./models/IProperty.js";
|
|
29
|
+
export * from "./models/IPropertyCondition.js";
|
|
30
|
+
export * from "./models/IPropertyValue.js";
|
|
31
|
+
export * from "./models/IRootAuthority.js";
|
|
32
|
+
export * from "./models/ITimespan.js";
|
|
33
|
+
export * from "./models/propertyConstraintType.js";
|
|
34
|
+
export * from "./models/propertyType.js";
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
import type { IProperty } from "./IProperty.js";
|
|
2
|
+
/**
|
|
3
|
+
* Represents an accreditation, which is a collection of properties granted by an accreditor.
|
|
4
|
+
*/
|
|
5
|
+
export interface IAccreditation {
|
|
6
|
+
/**
|
|
7
|
+
* Unique identifier for the accreditation.
|
|
8
|
+
*/
|
|
9
|
+
permissionId: string;
|
|
10
|
+
/**
|
|
11
|
+
* The identifier of the entity that granted the accreditation.
|
|
12
|
+
*/
|
|
13
|
+
accreditedBy: string;
|
|
14
|
+
/**
|
|
15
|
+
* Properties associated with this accreditation.
|
|
16
|
+
*/
|
|
17
|
+
properties: IProperty[];
|
|
18
|
+
}
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
import type { IGovernance } from "../index.js";
|
|
2
|
+
import type { IRootAuthority } from "./IRootAuthority.js";
|
|
3
|
+
/**
|
|
4
|
+
* Represents a federation, which is a group of entities forming a trust hierarchy.
|
|
5
|
+
* Federations define the root authorities and the schema for properties they manage.
|
|
6
|
+
*/
|
|
7
|
+
export interface IFederation {
|
|
8
|
+
/**
|
|
9
|
+
* Unique identifier for the federation.
|
|
10
|
+
*/
|
|
11
|
+
id: string;
|
|
12
|
+
/**
|
|
13
|
+
* List of root authority IDs associated with this federation.
|
|
14
|
+
*/
|
|
15
|
+
rootAuthorities: IRootAuthority[];
|
|
16
|
+
/**
|
|
17
|
+
* Account IDs of root authorities that have been revoked and are no longer trusted.
|
|
18
|
+
*/
|
|
19
|
+
revokedRootAuthorities: string[];
|
|
20
|
+
/**
|
|
21
|
+
* The governance entity that manages accreditations and attestations within the federation.
|
|
22
|
+
*/
|
|
23
|
+
governance: IGovernance;
|
|
24
|
+
}
|
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
import type { IAccreditation } from "./IAccreditation.js";
|
|
2
|
+
import type { IProperty } from "./IProperty.js";
|
|
3
|
+
/**
|
|
4
|
+
* Represents a governance entity in a federation hierarchy.
|
|
5
|
+
* Governance entities are trusted entities that can accredit or revoke delegations.
|
|
6
|
+
*/
|
|
7
|
+
export interface IGovernance {
|
|
8
|
+
/**
|
|
9
|
+
* Unique identifier for the governance entity.
|
|
10
|
+
*/
|
|
11
|
+
id: string;
|
|
12
|
+
/**
|
|
13
|
+
* Map of accredited-by ID to the list of accreditations that grant the right to accredit others.
|
|
14
|
+
*/
|
|
15
|
+
accreditationsToAccredit: {
|
|
16
|
+
[id: string]: IAccreditation[];
|
|
17
|
+
};
|
|
18
|
+
/**
|
|
19
|
+
* Map of accredited-by ID to the list of accreditations that grant the right to attest properties.
|
|
20
|
+
*/
|
|
21
|
+
accreditationsToAttest: {
|
|
22
|
+
[id: string]: IAccreditation[];
|
|
23
|
+
};
|
|
24
|
+
/**
|
|
25
|
+
* The set of properties this governance entity covers.
|
|
26
|
+
*/
|
|
27
|
+
properties: IProperty[];
|
|
28
|
+
}
|
|
@@ -0,0 +1,160 @@
|
|
|
1
|
+
import type { IComponent } from "@twin.org/core";
|
|
2
|
+
import type { IAccreditation } from "./IAccreditation.js";
|
|
3
|
+
import type { IFederation } from "./IFederation.js";
|
|
4
|
+
import type { IProperty } from "./IProperty.js";
|
|
5
|
+
import type { IPropertyValue } from "./IPropertyValue.js";
|
|
6
|
+
/**
|
|
7
|
+
* Interface describing a hierarchies component.
|
|
8
|
+
*/
|
|
9
|
+
export interface IHierarchiesComponent extends IComponent {
|
|
10
|
+
/**
|
|
11
|
+
* Creates a new federation.
|
|
12
|
+
* @param rootAuthorities The root authorities to be included in the federation.
|
|
13
|
+
* @param namespace The namespace of the connector to use for the federation, defaults to component configured namespace.
|
|
14
|
+
* @param controllerIdentity The identity of the controller creating the federation.
|
|
15
|
+
* @returns The ID of the created federation.
|
|
16
|
+
*/
|
|
17
|
+
federationCreate(rootAuthorities?: string[], namespace?: string, controllerIdentity?: string): Promise<string>;
|
|
18
|
+
/**
|
|
19
|
+
* Retrieves a federation by its ID.
|
|
20
|
+
* @param federationId The ID of the federation to retrieve.
|
|
21
|
+
* @param options Options for retrieving the federation.
|
|
22
|
+
* @param options.includeRevokedProperties Whether to include revoked properties in the retrieved federation, defaults to false.
|
|
23
|
+
* @returns The federation with the specified ID.
|
|
24
|
+
*/
|
|
25
|
+
federationGet(federationId: string, options?: {
|
|
26
|
+
includeRevokedProperties?: boolean;
|
|
27
|
+
}): Promise<IFederation>;
|
|
28
|
+
/**
|
|
29
|
+
* Adds a new authority to an existing federation.
|
|
30
|
+
* @param federationId The ID of the federation to which the authority will be added.
|
|
31
|
+
* @param accountId The account ID of the authority to be added.
|
|
32
|
+
* @param controllerIdentity The identity of the controller adding the authority.
|
|
33
|
+
* @returns The id of the authority.
|
|
34
|
+
*/
|
|
35
|
+
authorityAdd(federationId: string, accountId: string, controllerIdentity?: string): Promise<string>;
|
|
36
|
+
/**
|
|
37
|
+
* Removes an authority from an existing federation.
|
|
38
|
+
* @param federationId The ID of the federation from which the authority will be removed.
|
|
39
|
+
* @param accountId The account ID of the authority to be removed.
|
|
40
|
+
* @param controllerIdentity The identity of the controller removing the authority.
|
|
41
|
+
* @returns A promise that resolves when the authority has been removed.
|
|
42
|
+
*/
|
|
43
|
+
authorityRemove(federationId: string, accountId: string, controllerIdentity?: string): Promise<void>;
|
|
44
|
+
/**
|
|
45
|
+
* Adds a new property to an existing federation.
|
|
46
|
+
* @param federationId The ID of the federation to which the property will be added.
|
|
47
|
+
* @param property The property to be added.
|
|
48
|
+
* @param controllerIdentity The identity of the controller adding the property.
|
|
49
|
+
* @returns A promise that resolves when the property has been added.
|
|
50
|
+
*/
|
|
51
|
+
propertyAdd(federationId: string, property: IProperty, controllerIdentity?: string): Promise<void>;
|
|
52
|
+
/**
|
|
53
|
+
* Removes a property from an existing federation.
|
|
54
|
+
* @param federationId The ID of the federation from which the property will be removed.
|
|
55
|
+
* @param propertyName The name of the property to be removed.
|
|
56
|
+
* @param controllerIdentity The identity of the controller removing the property.
|
|
57
|
+
* @returns A promise that resolves when the property has been removed.
|
|
58
|
+
*/
|
|
59
|
+
propertyRemove(federationId: string, propertyName: string, controllerIdentity?: string): Promise<void>;
|
|
60
|
+
/**
|
|
61
|
+
* Gets a property from an existing federation.
|
|
62
|
+
* @param federationId The ID of the federation from which the property will be retrieved.
|
|
63
|
+
* @param propertyName The name of the property to be retrieved.
|
|
64
|
+
* @returns A promise that resolves with the property.
|
|
65
|
+
*/
|
|
66
|
+
propertyGet(federationId: string, propertyName: string): Promise<IProperty>;
|
|
67
|
+
/**
|
|
68
|
+
* Gets all properties from an existing federation.
|
|
69
|
+
* @param federationId The ID of the federation from which the properties will be retrieved.
|
|
70
|
+
* @param options Options for retrieving the properties.
|
|
71
|
+
* @param options.includeRevokedProperties Whether to include revoked properties in the retrieved properties, defaults to false.
|
|
72
|
+
* @returns A promise that resolves with the properties.
|
|
73
|
+
*/
|
|
74
|
+
propertiesGet(federationId: string, options?: {
|
|
75
|
+
includeRevokedProperties?: boolean;
|
|
76
|
+
}): Promise<IProperty[]>;
|
|
77
|
+
/**
|
|
78
|
+
* Validates property for an existing federation.
|
|
79
|
+
* @param federationId The ID of the federation for which the property will be validated.
|
|
80
|
+
* @param accreditedById The ID of the entity that granted the accreditation.
|
|
81
|
+
* @param propertyName The name of the property to be validated.
|
|
82
|
+
* @param propertyValue The value of the property to be validated.
|
|
83
|
+
* @returns A promise that resolves with a boolean indicating whether the property is valid.
|
|
84
|
+
*/
|
|
85
|
+
propertyValidate(federationId: string, accreditedById: string, propertyName: string, propertyValue: IPropertyValue): Promise<boolean>;
|
|
86
|
+
/**
|
|
87
|
+
* Validates properties for an existing federation.
|
|
88
|
+
* @param federationId The ID of the federation for which the properties will be validated.
|
|
89
|
+
* @param accreditedById The ID of the entity that granted the accreditations.
|
|
90
|
+
* @param propertiesToValidate The properties to be validated.
|
|
91
|
+
* @returns A promise that resolves with a boolean indicating whether the properties are valid.
|
|
92
|
+
*/
|
|
93
|
+
propertiesValidate(federationId: string, accreditedById: string, propertiesToValidate: {
|
|
94
|
+
[propertyName: string]: IPropertyValue;
|
|
95
|
+
}): Promise<boolean>;
|
|
96
|
+
/**
|
|
97
|
+
* Adds a new accreditation to attest to an existing federation.
|
|
98
|
+
* @param federationId The ID of the federation to which the accreditation will be added.
|
|
99
|
+
* @param accreditation The accreditation to be added.
|
|
100
|
+
* @param controllerIdentity The identity of the controller adding the accreditation.
|
|
101
|
+
* @returns The ID of the added accreditation.
|
|
102
|
+
*/
|
|
103
|
+
accreditationToAttestAdd(federationId: string, accreditation: Omit<IAccreditation, "permissionId">, controllerIdentity?: string): Promise<string>;
|
|
104
|
+
/**
|
|
105
|
+
* Removes an accreditation to attest from an existing federation.
|
|
106
|
+
* @param federationId The ID of the federation from which the accreditation will be removed.
|
|
107
|
+
* @param accreditedById The ID of the entity that granted the accreditation to be removed.
|
|
108
|
+
* @param permissionId The ID of the accreditation to be removed.
|
|
109
|
+
* @param controllerIdentity The identity of the controller removing the accreditation.
|
|
110
|
+
* @returns A promise that resolves when the accreditation has been removed.
|
|
111
|
+
*/
|
|
112
|
+
accreditationToAttestRemove(federationId: string, accreditedById: string, permissionId: string, controllerIdentity?: string): Promise<void>;
|
|
113
|
+
/**
|
|
114
|
+
* Get accreditation to attest to an existing federation.
|
|
115
|
+
* @param federationId The ID of the federation for which to get the accreditation.
|
|
116
|
+
* @param accreditedById The ID of the entity that granted the accreditation.
|
|
117
|
+
* @param permissionId The ID of the accreditation to be retrieved.
|
|
118
|
+
* @returns A promise that resolves with the accreditation.
|
|
119
|
+
*/
|
|
120
|
+
accreditationToAttestGet(federationId: string, accreditedById: string, permissionId: string): Promise<IAccreditation>;
|
|
121
|
+
/**
|
|
122
|
+
* Gets accreditations to attest to an existing federation.
|
|
123
|
+
* @param federationId The ID of the federation for which to get the accreditations.
|
|
124
|
+
* @param accreditedById The ID of the entity that granted the accreditations.
|
|
125
|
+
* @returns A promise that resolves with the accreditations.
|
|
126
|
+
*/
|
|
127
|
+
accreditationsToAttestGet(federationId: string, accreditedById: string): Promise<IAccreditation[]>;
|
|
128
|
+
/**
|
|
129
|
+
* Adds a new accreditation to accredit to an existing federation.
|
|
130
|
+
* @param federationId The ID of the federation to which the accreditation will be added.
|
|
131
|
+
* @param accreditation The accreditation to be added.
|
|
132
|
+
* @param controllerIdentity The identity of the controller adding the accreditation.
|
|
133
|
+
* @returns The ID of the added accreditation.
|
|
134
|
+
*/
|
|
135
|
+
accreditationToAccreditAdd(federationId: string, accreditation: Omit<IAccreditation, "permissionId">, controllerIdentity?: string): Promise<string>;
|
|
136
|
+
/**
|
|
137
|
+
* Removes an accreditation to accredit from an existing federation.
|
|
138
|
+
* @param federationId The ID of the federation from which the accreditation will be removed.
|
|
139
|
+
* @param accreditedById The ID of the entity that granted the accreditation to be removed.
|
|
140
|
+
* @param permissionId The ID of the accreditation to be removed.
|
|
141
|
+
* @param controllerIdentity The identity of the controller removing the accreditation.
|
|
142
|
+
* @returns A promise that resolves when the accreditation has been removed.
|
|
143
|
+
*/
|
|
144
|
+
accreditationToAccreditRemove(federationId: string, accreditedById: string, permissionId: string, controllerIdentity?: string): Promise<void>;
|
|
145
|
+
/**
|
|
146
|
+
* Get accreditation to accredit to an existing federation.
|
|
147
|
+
* @param federationId The ID of the federation for which to get the accreditation.
|
|
148
|
+
* @param accreditedById The ID of the entity that granted the accreditation.
|
|
149
|
+
* @param permissionId The ID of the accreditation to be retrieved.
|
|
150
|
+
* @returns A promise that resolves with the accreditation.
|
|
151
|
+
*/
|
|
152
|
+
accreditationToAccreditGet(federationId: string, accreditedById: string, permissionId: string): Promise<IAccreditation>;
|
|
153
|
+
/**
|
|
154
|
+
* Gets accreditations to accredit to an existing federation.
|
|
155
|
+
* @param federationId The ID of the federation for which to get the accreditations.
|
|
156
|
+
* @param accreditedById The ID of the entity that granted the accreditations.
|
|
157
|
+
* @returns A promise that resolves with the accreditations.
|
|
158
|
+
*/
|
|
159
|
+
accreditationsToAccreditGet(federationId: string, accreditedById: string): Promise<IAccreditation[]>;
|
|
160
|
+
}
|
|
@@ -0,0 +1,159 @@
|
|
|
1
|
+
import type { IComponent } from "@twin.org/core";
|
|
2
|
+
import type { IAccreditation } from "./IAccreditation.js";
|
|
3
|
+
import type { IFederation } from "./IFederation.js";
|
|
4
|
+
import type { IProperty } from "./IProperty.js";
|
|
5
|
+
import type { IPropertyValue } from "./IPropertyValue.js";
|
|
6
|
+
/**
|
|
7
|
+
* Interface describing a hierarchies connector.
|
|
8
|
+
*/
|
|
9
|
+
export interface IHierarchiesConnector extends IComponent {
|
|
10
|
+
/**
|
|
11
|
+
* Creates a new federation.
|
|
12
|
+
* @param controllerIdentity The identity of the controller creating the federation.
|
|
13
|
+
* @param rootAuthorities The root authorities to be included in the federation.
|
|
14
|
+
* @returns The ID of the created federation.
|
|
15
|
+
*/
|
|
16
|
+
federationCreate(controllerIdentity: string, rootAuthorities?: string[]): Promise<string>;
|
|
17
|
+
/**
|
|
18
|
+
* Retrieves a federation by its ID.
|
|
19
|
+
* @param federationId The ID of the federation to retrieve.
|
|
20
|
+
* @param options Options for retrieving the federation.
|
|
21
|
+
* @param options.includeRevokedProperties Whether to include revoked properties in the retrieved federation, defaults to false.
|
|
22
|
+
* @returns The federation with the specified ID.
|
|
23
|
+
*/
|
|
24
|
+
federationGet(federationId: string, options?: {
|
|
25
|
+
includeRevokedProperties?: boolean;
|
|
26
|
+
}): Promise<IFederation>;
|
|
27
|
+
/**
|
|
28
|
+
* Adds a new authority to an existing federation.
|
|
29
|
+
* @param controllerIdentity The identity of the controller adding the authority.
|
|
30
|
+
* @param federationId The ID of the federation to which the authority will be added.
|
|
31
|
+
* @param accountId The account ID of the authority to be added.
|
|
32
|
+
* @returns The id of the authority.
|
|
33
|
+
*/
|
|
34
|
+
authorityAdd(controllerIdentity: string, federationId: string, accountId: string): Promise<string>;
|
|
35
|
+
/**
|
|
36
|
+
* Removes an authority from an existing federation.
|
|
37
|
+
* @param controllerIdentity The identity of the controller removing the authority.
|
|
38
|
+
* @param federationId The ID of the federation from which the authority will be removed.
|
|
39
|
+
* @param accountId The account ID of the authority to be removed.
|
|
40
|
+
* @returns A promise that resolves when the authority has been removed.
|
|
41
|
+
*/
|
|
42
|
+
authorityRemove(controllerIdentity: string, federationId: string, accountId: string): Promise<void>;
|
|
43
|
+
/**
|
|
44
|
+
* Adds a new property to an existing federation.
|
|
45
|
+
* @param controllerIdentity The identity of the controller adding the property.
|
|
46
|
+
* @param federationId The ID of the federation to which the property will be added.
|
|
47
|
+
* @param property The property to be added.
|
|
48
|
+
* @returns A promise that resolves when the property has been added.
|
|
49
|
+
*/
|
|
50
|
+
propertyAdd(controllerIdentity: string, federationId: string, property: IProperty): Promise<void>;
|
|
51
|
+
/**
|
|
52
|
+
* Removes a property from an existing federation.
|
|
53
|
+
* @param controllerIdentity The identity of the controller removing the property.
|
|
54
|
+
* @param federationId The ID of the federation from which the property will be removed.
|
|
55
|
+
* @param propertyName The name of the property to be removed.
|
|
56
|
+
* @returns A promise that resolves when the property has been removed.
|
|
57
|
+
*/
|
|
58
|
+
propertyRemove(controllerIdentity: string, federationId: string, propertyName: string): Promise<void>;
|
|
59
|
+
/**
|
|
60
|
+
* Gets a property from an existing federation.
|
|
61
|
+
* @param federationId The ID of the federation from which the property will be retrieved.
|
|
62
|
+
* @param propertyName The name of the property to be retrieved.
|
|
63
|
+
* @returns A promise that resolves with the property.
|
|
64
|
+
*/
|
|
65
|
+
propertyGet(federationId: string, propertyName: string): Promise<IProperty>;
|
|
66
|
+
/**
|
|
67
|
+
* Gets all properties from an existing federation.
|
|
68
|
+
* @param federationId The ID of the federation from which the properties will be retrieved.
|
|
69
|
+
* @param options Options for retrieving the properties.
|
|
70
|
+
* @param options.includeRevokedProperties Whether to include revoked properties in the retrieved properties, defaults to false.
|
|
71
|
+
* @returns A promise that resolves with the properties.
|
|
72
|
+
*/
|
|
73
|
+
propertiesGet(federationId: string, options?: {
|
|
74
|
+
includeRevokedProperties?: boolean;
|
|
75
|
+
}): Promise<IProperty[]>;
|
|
76
|
+
/**
|
|
77
|
+
* Validates property for an existing federation.
|
|
78
|
+
* @param federationId The ID of the federation for which the property will be validated.
|
|
79
|
+
* @param accreditedById The ID of the entity that granted the accreditation.
|
|
80
|
+
* @param propertyName The name of the property to be validated.
|
|
81
|
+
* @param propertyValue The value of the property to be validated.
|
|
82
|
+
* @returns A promise that resolves with a boolean indicating whether the property is valid.
|
|
83
|
+
*/
|
|
84
|
+
propertyValidate(federationId: string, accreditedById: string, propertyName: string, propertyValue: IPropertyValue): Promise<boolean>;
|
|
85
|
+
/**
|
|
86
|
+
* Validates properties for an existing federation.
|
|
87
|
+
* @param federationId The ID of the federation for which the properties will be validated.
|
|
88
|
+
* @param accreditedById The ID of the entity that granted the accreditations.
|
|
89
|
+
* @param propertiesToValidate The properties to be validated.
|
|
90
|
+
* @returns A promise that resolves with a boolean indicating whether the properties are valid.
|
|
91
|
+
*/
|
|
92
|
+
propertiesValidate(federationId: string, accreditedById: string, propertiesToValidate: {
|
|
93
|
+
[propertyName: string]: IPropertyValue;
|
|
94
|
+
}): Promise<boolean>;
|
|
95
|
+
/**
|
|
96
|
+
* Adds a new accreditation to attest to an existing federation.
|
|
97
|
+
* @param controllerIdentity The identity of the controller adding the accreditation.
|
|
98
|
+
* @param federationId The ID of the federation to which the accreditation will be added.
|
|
99
|
+
* @param accreditation The accreditation to be added.
|
|
100
|
+
* @returns The ID of the added accreditation.
|
|
101
|
+
*/
|
|
102
|
+
accreditationToAttestAdd(controllerIdentity: string, federationId: string, accreditation: Omit<IAccreditation, "permissionId">): Promise<string>;
|
|
103
|
+
/**
|
|
104
|
+
* Removes an accreditation to attest from an existing federation.
|
|
105
|
+
* @param controllerIdentity The identity of the controller removing the accreditation.
|
|
106
|
+
* @param federationId The ID of the federation from which the accreditation will be removed.
|
|
107
|
+
* @param accreditedById The ID of the entity that granted the accreditation to be removed.
|
|
108
|
+
* @param permissionId The ID of the accreditation to be removed.
|
|
109
|
+
* @returns A promise that resolves when the accreditation has been removed.
|
|
110
|
+
*/
|
|
111
|
+
accreditationToAttestRemove(controllerIdentity: string, federationId: string, accreditedById: string, permissionId: string): Promise<void>;
|
|
112
|
+
/**
|
|
113
|
+
* Get accreditation to attest to an existing federation.
|
|
114
|
+
* @param federationId The ID of the federation for which to get the accreditation.
|
|
115
|
+
* @param accreditedById The ID of the entity that granted the accreditation.
|
|
116
|
+
* @param permissionId The ID of the accreditation to be retrieved.
|
|
117
|
+
* @returns A promise that resolves with the accreditation.
|
|
118
|
+
*/
|
|
119
|
+
accreditationToAttestGet(federationId: string, accreditedById: string, permissionId: string): Promise<IAccreditation>;
|
|
120
|
+
/**
|
|
121
|
+
* Gets accreditations to attest to an existing federation.
|
|
122
|
+
* @param federationId The ID of the federation for which to get the accreditations.
|
|
123
|
+
* @param accreditedById The ID of the entity that granted the accreditations.
|
|
124
|
+
* @returns A promise that resolves with the accreditations.
|
|
125
|
+
*/
|
|
126
|
+
accreditationsToAttestGet(federationId: string, accreditedById: string): Promise<IAccreditation[]>;
|
|
127
|
+
/**
|
|
128
|
+
* Adds a new accreditation to accredit to an existing federation.
|
|
129
|
+
* @param controllerIdentity The identity of the controller adding the accreditation.
|
|
130
|
+
* @param federationId The ID of the federation to which the accreditation will be added.
|
|
131
|
+
* @param accreditation The accreditation to be added.
|
|
132
|
+
* @returns The ID of the added accreditation.
|
|
133
|
+
*/
|
|
134
|
+
accreditationToAccreditAdd(controllerIdentity: string, federationId: string, accreditation: Omit<IAccreditation, "permissionId">): Promise<string>;
|
|
135
|
+
/**
|
|
136
|
+
* Removes an accreditation to accredit from an existing federation.
|
|
137
|
+
* @param controllerIdentity The identity of the controller removing the accreditation.
|
|
138
|
+
* @param federationId The ID of the federation from which the accreditation will be removed.
|
|
139
|
+
* @param accreditedById The ID of the entity that granted the accreditation to be removed.
|
|
140
|
+
* @param permissionId The ID of the accreditation to be removed.
|
|
141
|
+
* @returns A promise that resolves when the accreditation has been removed.
|
|
142
|
+
*/
|
|
143
|
+
accreditationToAccreditRemove(controllerIdentity: string, federationId: string, accreditedById: string, permissionId: string): Promise<void>;
|
|
144
|
+
/**
|
|
145
|
+
* Get accreditation to accredit to an existing federation.
|
|
146
|
+
* @param federationId The ID of the federation for which to get the accreditation.
|
|
147
|
+
* @param accreditedById The ID of the entity that granted the accreditation.
|
|
148
|
+
* @param permissionId The ID of the accreditation to be retrieved.
|
|
149
|
+
* @returns A promise that resolves with the accreditation.
|
|
150
|
+
*/
|
|
151
|
+
accreditationToAccreditGet(federationId: string, accreditedById: string, permissionId: string): Promise<IAccreditation>;
|
|
152
|
+
/**
|
|
153
|
+
* Gets accreditations to accredit to an existing federation.
|
|
154
|
+
* @param federationId The ID of the federation for which to get the accreditations.
|
|
155
|
+
* @param accreditedById The ID of the entity that granted the accreditations.
|
|
156
|
+
* @returns A promise that resolves with the accreditations.
|
|
157
|
+
*/
|
|
158
|
+
accreditationsToAccreditGet(federationId: string, accreditedById: string): Promise<IAccreditation[]>;
|
|
159
|
+
}
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
import type { IPropertyValue } from "../index.js";
|
|
2
|
+
import type { IPropertyCondition } from "./IPropertyCondition.js";
|
|
3
|
+
import type { ITimespan } from "./ITimespan.js";
|
|
4
|
+
/**
|
|
5
|
+
* Represents a named property with optional allowed values, a condition, and a validity timespan.
|
|
6
|
+
*/
|
|
7
|
+
export interface IProperty {
|
|
8
|
+
/**
|
|
9
|
+
* The property name, can be dotted form.
|
|
10
|
+
*/
|
|
11
|
+
name: string;
|
|
12
|
+
/**
|
|
13
|
+
* The allowed values for this property, if empty, any value is allowed.
|
|
14
|
+
*/
|
|
15
|
+
allowedValues?: IPropertyValue[];
|
|
16
|
+
/**
|
|
17
|
+
* The condition for this property.
|
|
18
|
+
*/
|
|
19
|
+
condition?: IPropertyCondition;
|
|
20
|
+
/**
|
|
21
|
+
* The timespan for this property.
|
|
22
|
+
*/
|
|
23
|
+
timespan?: ITimespan;
|
|
24
|
+
}
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
import type { PropertyConstraintType } from "./propertyConstraintType.js";
|
|
2
|
+
import type { PropertyType } from "./propertyType.js";
|
|
3
|
+
/**
|
|
4
|
+
* Describes the condition and constraints of a property within a hierarchy.
|
|
5
|
+
*/
|
|
6
|
+
export interface IPropertyCondition {
|
|
7
|
+
/**
|
|
8
|
+
* The property type.
|
|
9
|
+
*/
|
|
10
|
+
type: PropertyType;
|
|
11
|
+
/**
|
|
12
|
+
* The property value.
|
|
13
|
+
*/
|
|
14
|
+
value: string;
|
|
15
|
+
/**
|
|
16
|
+
* The constraint for this property.
|
|
17
|
+
*/
|
|
18
|
+
constraint?: PropertyConstraintType;
|
|
19
|
+
}
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
import type { PropertyType } from "./propertyType.js";
|
|
2
|
+
/**
|
|
3
|
+
* Describes the value of a property.
|
|
4
|
+
*/
|
|
5
|
+
export interface IPropertyValue {
|
|
6
|
+
/**
|
|
7
|
+
* The property type.
|
|
8
|
+
*/
|
|
9
|
+
type: PropertyType;
|
|
10
|
+
/**
|
|
11
|
+
* The property value.
|
|
12
|
+
*/
|
|
13
|
+
value: string;
|
|
14
|
+
}
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Represents a timespan in a federation hierarchy.
|
|
3
|
+
*/
|
|
4
|
+
export interface ITimespan {
|
|
5
|
+
/**
|
|
6
|
+
* Valid from as bigint string so it can be serialized accurately.
|
|
7
|
+
*/
|
|
8
|
+
validFrom?: string;
|
|
9
|
+
/**
|
|
10
|
+
* Valid to as bigint string so it can be serialized accurately.
|
|
11
|
+
*/
|
|
12
|
+
validTo?: string;
|
|
13
|
+
}
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
import type { IAccreditation } from "../IAccreditation.js";
|
|
2
|
+
/**
|
|
3
|
+
* Request to add an accreditation to a federation.
|
|
4
|
+
*/
|
|
5
|
+
export interface IHierarchiesAccreditationAddRequest {
|
|
6
|
+
/**
|
|
7
|
+
* The request path parameters.
|
|
8
|
+
*/
|
|
9
|
+
pathParams: {
|
|
10
|
+
/**
|
|
11
|
+
* The id of the federation.
|
|
12
|
+
*/
|
|
13
|
+
federationId: string;
|
|
14
|
+
};
|
|
15
|
+
/**
|
|
16
|
+
* The request data.
|
|
17
|
+
*/
|
|
18
|
+
body: Omit<IAccreditation, "permissionId">;
|
|
19
|
+
}
|