@twin.org/federated-catalogue-models 0.0.1-next.10
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 +21 -0
- package/dist/cjs/index.cjs +1212 -0
- package/dist/esm/index.mjs +1206 -0
- package/dist/types/dataTypes/federatedCatalogueDataTypes.d.ts +9 -0
- package/dist/types/index.d.ts +42 -0
- package/dist/types/models/ICatalogueBase.d.ts +25 -0
- package/dist/types/models/ICatalogueEntry.d.ts +8 -0
- package/dist/types/models/IComplianceCredential.d.ts +37 -0
- package/dist/types/models/IComplianceEvidence.d.ts +26 -0
- package/dist/types/models/IComplianceVerificationResult.d.ts +19 -0
- package/dist/types/models/ICredential.d.ts +21 -0
- package/dist/types/models/IFederatedCatalogueComponent.d.ts +89 -0
- package/dist/types/models/IVerificationResult.d.ts +13 -0
- package/dist/types/models/api/ICatalogueEntryGetRequest.d.ts +15 -0
- package/dist/types/models/api/ICompliancePresentationRequest.d.ts +9 -0
- package/dist/types/models/api/IDataResourceGetResponse.d.ts +10 -0
- package/dist/types/models/api/IDataResourceListRequest.d.ts +27 -0
- package/dist/types/models/api/IDataResourceListResponse.d.ts +10 -0
- package/dist/types/models/api/IDataSpaceConnectorGetResponse.d.ts +10 -0
- package/dist/types/models/api/IDataSpaceConnectorListRequest.d.ts +27 -0
- package/dist/types/models/api/IDataSpaceConnectorListResponse.d.ts +10 -0
- package/dist/types/models/api/IFederatedCatalogueGetRequest.d.ts +12 -0
- package/dist/types/models/api/IParticipantGetResponse.d.ts +10 -0
- package/dist/types/models/api/IParticipantListRequest.d.ts +31 -0
- package/dist/types/models/api/IParticipantListResponse.d.ts +10 -0
- package/dist/types/models/api/IServiceOfferingGetResponse.d.ts +10 -0
- package/dist/types/models/api/IServiceOfferingListRequest.d.ts +27 -0
- package/dist/types/models/api/IServiceOfferingListResponse.d.ts +10 -0
- package/dist/types/models/data-resource/IDataResourceCredential.d.ts +11 -0
- package/dist/types/models/data-resource/IDataResourceEntry.d.ts +29 -0
- package/dist/types/models/data-resource/IDataResourceList.d.ts +25 -0
- package/dist/types/models/data-space-connector/IDataSpaceConnector.d.ts +77 -0
- package/dist/types/models/data-space-connector/IDataSpaceConnectorCredential.d.ts +11 -0
- package/dist/types/models/data-space-connector/IDataSpaceConnectorEntry.d.ts +18 -0
- package/dist/types/models/data-space-connector/IDataSpaceConnectorList.d.ts +25 -0
- package/dist/types/models/federatedCatalogueContextInstances.d.ts +14 -0
- package/dist/types/models/federatedCatalogueContextType.d.ts +11 -0
- package/dist/types/models/federatedCatalogueContexts.d.ts +13 -0
- package/dist/types/models/federatedCatalogueEntryType.d.ts +7 -0
- package/dist/types/models/federatedCatalogueTypes.d.ts +53 -0
- package/dist/types/models/participant/IParticipantCredential.d.ts +11 -0
- package/dist/types/models/participant/IParticipantEntry.d.ts +12 -0
- package/dist/types/models/participant/IParticipantList.d.ts +25 -0
- package/dist/types/models/service-offering/IServiceOfferingCredential.d.ts +11 -0
- package/dist/types/models/service-offering/IServiceOfferingEntry.d.ts +25 -0
- package/dist/types/models/service-offering/IServiceOfferingList.d.ts +25 -0
- package/dist/types/models/verificationFailureReasons.d.ts +53 -0
- package/docs/changelog.md +73 -0
- package/docs/examples.md +1 -0
- package/docs/reference/classes/FederatedCatalogueContextInstances.md +29 -0
- package/docs/reference/classes/FederatedCatalogueDataTypes.md +25 -0
- package/docs/reference/index.md +58 -0
- package/docs/reference/interfaces/ICatalogueEntryGetRequest.md +37 -0
- package/docs/reference/interfaces/IComplianceCredential.md +103 -0
- package/docs/reference/interfaces/IComplianceEvidence.md +45 -0
- package/docs/reference/interfaces/ICompliancePresentationRequest.md +11 -0
- package/docs/reference/interfaces/IComplianceVerificationResult.md +55 -0
- package/docs/reference/interfaces/ICredential.md +51 -0
- package/docs/reference/interfaces/IDataResourceCredential.md +43 -0
- package/docs/reference/interfaces/IDataResourceEntry.md +131 -0
- package/docs/reference/interfaces/IDataResourceGetResponse.md +11 -0
- package/docs/reference/interfaces/IDataResourceList.md +35 -0
- package/docs/reference/interfaces/IDataResourceListRequest.md +55 -0
- package/docs/reference/interfaces/IDataResourceListResponse.md +11 -0
- package/docs/reference/interfaces/IDataSpaceConnector.md +130 -0
- package/docs/reference/interfaces/IDataSpaceConnectorCredential.md +43 -0
- package/docs/reference/interfaces/IDataSpaceConnectorEntry.md +224 -0
- package/docs/reference/interfaces/IDataSpaceConnectorGetResponse.md +11 -0
- package/docs/reference/interfaces/IDataSpaceConnectorList.md +35 -0
- package/docs/reference/interfaces/IDataSpaceConnectorListRequest.md +55 -0
- package/docs/reference/interfaces/IDataSpaceConnectorListResponse.md +11 -0
- package/docs/reference/interfaces/IFederatedCatalogueComponent.md +313 -0
- package/docs/reference/interfaces/IFederatedCatalogueGetRequest.md +23 -0
- package/docs/reference/interfaces/IParticipantCredential.md +43 -0
- package/docs/reference/interfaces/IParticipantEntry.md +83 -0
- package/docs/reference/interfaces/IParticipantGetResponse.md +11 -0
- package/docs/reference/interfaces/IParticipantList.md +35 -0
- package/docs/reference/interfaces/IParticipantListRequest.md +61 -0
- package/docs/reference/interfaces/IParticipantListResponse.md +11 -0
- package/docs/reference/interfaces/IServiceOfferingCredential.md +43 -0
- package/docs/reference/interfaces/IServiceOfferingEntry.md +119 -0
- package/docs/reference/interfaces/IServiceOfferingGetResponse.md +11 -0
- package/docs/reference/interfaces/IServiceOfferingList.md +35 -0
- package/docs/reference/interfaces/IServiceOfferingListRequest.md +55 -0
- package/docs/reference/interfaces/IServiceOfferingListResponse.md +11 -0
- package/docs/reference/interfaces/IVerificationResult.md +23 -0
- package/docs/reference/type-aliases/FederatedCatalogueContextType.md +5 -0
- package/docs/reference/type-aliases/FederatedCatalogueContexts.md +5 -0
- package/docs/reference/type-aliases/FederatedCatalogueEntryType.md +5 -0
- package/docs/reference/type-aliases/FederatedCatalogueTypes.md +5 -0
- package/docs/reference/type-aliases/ICatalogueEntry.md +5 -0
- package/docs/reference/type-aliases/VerificationFailureReasons.md +5 -0
- package/docs/reference/variables/FederatedCatalogueContexts.md +13 -0
- package/docs/reference/variables/FederatedCatalogueTypes.md +73 -0
- package/docs/reference/variables/VerificationFailureReasons.md +73 -0
- package/package.json +45 -0
|
@@ -0,0 +1,42 @@
|
|
|
1
|
+
export * from "./models/api/IFederatedCatalogueGetRequest";
|
|
2
|
+
export * from "./models/api/ICompliancePresentationRequest";
|
|
3
|
+
export * from "./models/api/IParticipantListRequest";
|
|
4
|
+
export * from "./models/api/IServiceOfferingListRequest";
|
|
5
|
+
export * from "./models/api/IDataResourceListRequest";
|
|
6
|
+
export * from "./models/api/IParticipantListResponse";
|
|
7
|
+
export * from "./models/api/IServiceOfferingListResponse";
|
|
8
|
+
export * from "./models/api/IDataResourceListResponse";
|
|
9
|
+
export * from "./models/api/ICatalogueEntryGetRequest";
|
|
10
|
+
export * from "./models/api/IParticipantGetResponse";
|
|
11
|
+
export * from "./models/api/IServiceOfferingGetResponse";
|
|
12
|
+
export * from "./models/api/IDataResourceGetResponse";
|
|
13
|
+
export * from "./models/api/IDataSpaceConnectorGetResponse";
|
|
14
|
+
export * from "./models/api/IDataSpaceConnectorListRequest";
|
|
15
|
+
export * from "./models/api/IDataSpaceConnectorListResponse";
|
|
16
|
+
export * from "./models/participant/IParticipantEntry";
|
|
17
|
+
export * from "./models/participant/IParticipantList";
|
|
18
|
+
export * from "./models/participant/IParticipantCredential";
|
|
19
|
+
export * from "./models/data-resource/IDataResourceEntry";
|
|
20
|
+
export * from "./models/data-resource/IDataResourceList";
|
|
21
|
+
export * from "./models/data-resource/IDataResourceCredential";
|
|
22
|
+
export * from "./models/service-offering/IServiceOfferingEntry";
|
|
23
|
+
export * from "./models/service-offering/IServiceOfferingList";
|
|
24
|
+
export * from "./models/service-offering/IServiceOfferingCredential";
|
|
25
|
+
export * from "./models/data-space-connector/IDataSpaceConnector";
|
|
26
|
+
export * from "./models/data-space-connector/IDataSpaceConnectorEntry";
|
|
27
|
+
export * from "./models/data-space-connector/IDataSpaceConnectorList";
|
|
28
|
+
export * from "./models/data-space-connector/IDataSpaceConnectorCredential";
|
|
29
|
+
export * from "./models/IFederatedCatalogueComponent";
|
|
30
|
+
export * from "./models/IComplianceCredential";
|
|
31
|
+
export * from "./models/IComplianceEvidence";
|
|
32
|
+
export * from "./models/IVerificationResult";
|
|
33
|
+
export * from "./models/IComplianceVerificationResult";
|
|
34
|
+
export * from "./models/federatedCatalogueTypes";
|
|
35
|
+
export * from "./models/federatedCatalogueContexts";
|
|
36
|
+
export * from "./models/federatedCatalogueContextInstances";
|
|
37
|
+
export * from "./models/ICredential";
|
|
38
|
+
export * from "./models/verificationFailureReasons";
|
|
39
|
+
export * from "./models/federatedCatalogueContextType";
|
|
40
|
+
export * from "./models/federatedCatalogueEntryType";
|
|
41
|
+
export * from "./dataTypes/federatedCatalogueDataTypes";
|
|
42
|
+
export * from "./models/ICatalogueEntry";
|
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Catalogue entry base fields.
|
|
3
|
+
*/
|
|
4
|
+
export interface ICatalogueBase {
|
|
5
|
+
/**
|
|
6
|
+
* The trusted issuer of the compliance credential
|
|
7
|
+
*/
|
|
8
|
+
issuer: string;
|
|
9
|
+
/**
|
|
10
|
+
* Valid from (as per W3C VC Data Model v2)
|
|
11
|
+
*/
|
|
12
|
+
validFrom: string;
|
|
13
|
+
/**
|
|
14
|
+
* Valid until (as per W3C VC Data Model v2)
|
|
15
|
+
*/
|
|
16
|
+
validUntil: string;
|
|
17
|
+
/**
|
|
18
|
+
* The creation date.
|
|
19
|
+
*/
|
|
20
|
+
dateCreated: string;
|
|
21
|
+
/**
|
|
22
|
+
* The evidences concerning the data resource.
|
|
23
|
+
*/
|
|
24
|
+
evidence: string[];
|
|
25
|
+
}
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
import type { IDataResourceEntry } from "./data-resource/IDataResourceEntry";
|
|
2
|
+
import type { IDataSpaceConnectorEntry } from "./data-space-connector/IDataSpaceConnectorEntry";
|
|
3
|
+
import type { IParticipantEntry } from "./participant/IParticipantEntry";
|
|
4
|
+
import type { IServiceOfferingEntry } from "./service-offering/IServiceOfferingEntry";
|
|
5
|
+
/**
|
|
6
|
+
* Catalogue entry base fields.
|
|
7
|
+
*/
|
|
8
|
+
export type ICatalogueEntry = IParticipantEntry | IDataSpaceConnectorEntry | IServiceOfferingEntry | IDataResourceEntry;
|
|
@@ -0,0 +1,37 @@
|
|
|
1
|
+
import type { IJsonLdContextDefinitionElement } from "@twin.org/data-json-ld";
|
|
2
|
+
import type { GaiaXContexts } from "@twin.org/standards-gaia-x";
|
|
3
|
+
import type { DidContexts, DidTypes } from "@twin.org/standards-w3c-did";
|
|
4
|
+
import type { FederatedCatalogueTypes } from "./federatedCatalogueTypes";
|
|
5
|
+
import type { IComplianceEvidence } from "./IComplianceEvidence";
|
|
6
|
+
import type { ICredential } from "./ICredential";
|
|
7
|
+
/**
|
|
8
|
+
* A Compliance credential.
|
|
9
|
+
*/
|
|
10
|
+
export interface IComplianceCredential extends ICredential {
|
|
11
|
+
/**
|
|
12
|
+
* The LD Context.
|
|
13
|
+
*/
|
|
14
|
+
"@context": [
|
|
15
|
+
typeof DidContexts.ContextVCv2,
|
|
16
|
+
typeof GaiaXContexts.ContextRoot,
|
|
17
|
+
typeof DidContexts.ContextSecurityJws2020,
|
|
18
|
+
...IJsonLdContextDefinitionElement[]
|
|
19
|
+
];
|
|
20
|
+
/**
|
|
21
|
+
* Type of Credential.
|
|
22
|
+
*/
|
|
23
|
+
type: [typeof DidTypes.VerifiableCredential, typeof FederatedCatalogueTypes.ComplianceCredential];
|
|
24
|
+
/**
|
|
25
|
+
* A compliance credential requires a validity period
|
|
26
|
+
*/
|
|
27
|
+
validFrom: string;
|
|
28
|
+
/**
|
|
29
|
+
* A compliance credential requires a validity period
|
|
30
|
+
*/
|
|
31
|
+
validUntil: string;
|
|
32
|
+
/**
|
|
33
|
+
* Compliance evidence. It is mandatory.
|
|
34
|
+
*
|
|
35
|
+
*/
|
|
36
|
+
evidence: IComplianceEvidence[];
|
|
37
|
+
}
|
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
import type { IJsonLdNodeObject } from "@twin.org/data-json-ld";
|
|
2
|
+
import type { FederatedCatalogueTypes } from "./federatedCatalogueTypes";
|
|
3
|
+
/**
|
|
4
|
+
* Compliance Evidence.
|
|
5
|
+
*/
|
|
6
|
+
export interface IComplianceEvidence extends IJsonLdNodeObject {
|
|
7
|
+
/**
|
|
8
|
+
* Resolvable Id that allows to get access to the credential that serves as evidence.
|
|
9
|
+
*/
|
|
10
|
+
id: string;
|
|
11
|
+
/**
|
|
12
|
+
* Type of evidence.
|
|
13
|
+
*/
|
|
14
|
+
type: typeof FederatedCatalogueTypes.CompliantCredential;
|
|
15
|
+
/**
|
|
16
|
+
* One or more cryptographic digests, as defined by the hash-expression
|
|
17
|
+
* ABNF grammar defined in the Sub-resource Integrity specification,
|
|
18
|
+
* Section 3.5: The integrity attribute.
|
|
19
|
+
*/
|
|
20
|
+
digestSRI: string;
|
|
21
|
+
/**
|
|
22
|
+
* Original type
|
|
23
|
+
*
|
|
24
|
+
*/
|
|
25
|
+
credentialType: string | string[];
|
|
26
|
+
}
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
import type { ICredential } from "./ICredential";
|
|
2
|
+
import type { IVerificationResult } from "./IVerificationResult";
|
|
3
|
+
/**
|
|
4
|
+
* Compliance verification result
|
|
5
|
+
*/
|
|
6
|
+
export interface IComplianceVerificationResult extends IVerificationResult {
|
|
7
|
+
/**
|
|
8
|
+
* The credentials involved
|
|
9
|
+
*/
|
|
10
|
+
credentials: ICredential[];
|
|
11
|
+
/**
|
|
12
|
+
* Filled in case an evidence cannot be verified to provide the reason
|
|
13
|
+
*/
|
|
14
|
+
evidenceVerificationResult?: IVerificationResult;
|
|
15
|
+
/**
|
|
16
|
+
* The evidences that failed to be verified.
|
|
17
|
+
*/
|
|
18
|
+
evidenceFailedToVerify?: string[];
|
|
19
|
+
}
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
import type { IDidVerifiableCredential } from "@twin.org/standards-w3c-did";
|
|
2
|
+
/**
|
|
3
|
+
* A credential with subject.
|
|
4
|
+
*/
|
|
5
|
+
export interface ICredential extends IDidVerifiableCredential {
|
|
6
|
+
/**
|
|
7
|
+
* The Id of the credential, it is mandatory.
|
|
8
|
+
*/
|
|
9
|
+
id: string;
|
|
10
|
+
/**
|
|
11
|
+
* The issuer of the credential, it is mandatory.
|
|
12
|
+
*/
|
|
13
|
+
issuer: string;
|
|
14
|
+
/**
|
|
15
|
+
* Credential subject must always include id and type
|
|
16
|
+
*/
|
|
17
|
+
credentialSubject: IDidVerifiableCredential["credentialSubject"] & {
|
|
18
|
+
id: string;
|
|
19
|
+
type: string | string[];
|
|
20
|
+
};
|
|
21
|
+
}
|
|
@@ -0,0 +1,89 @@
|
|
|
1
|
+
import type { IComponent } from "@twin.org/core";
|
|
2
|
+
import type { IDataResourceList } from "./data-resource/IDataResourceList";
|
|
3
|
+
import type { IDataSpaceConnectorList } from "./data-space-connector/IDataSpaceConnectorList";
|
|
4
|
+
import type { FederatedCatalogueEntryType } from "./federatedCatalogueEntryType";
|
|
5
|
+
import type { ICatalogueEntry } from "./ICatalogueEntry";
|
|
6
|
+
import type { IParticipantList } from "./participant/IParticipantList";
|
|
7
|
+
import type { IServiceOfferingList } from "./service-offering/IServiceOfferingList";
|
|
8
|
+
/**
|
|
9
|
+
* Interface describing a Federated Catalogue Contract.
|
|
10
|
+
*/
|
|
11
|
+
export interface IFederatedCatalogueComponent extends IComponent {
|
|
12
|
+
/**
|
|
13
|
+
* Registers a Participant's compliance Credential to the service.
|
|
14
|
+
* @param credential The credential as JWT.
|
|
15
|
+
* @returns The participant Id (usually a DID).
|
|
16
|
+
*/
|
|
17
|
+
registerComplianceCredential(credential: string): Promise<string>;
|
|
18
|
+
/**
|
|
19
|
+
* Query the federated catalogue.
|
|
20
|
+
* @param participant The identity of the participant.
|
|
21
|
+
* @param legalRegistrationNumber The legal registration number.
|
|
22
|
+
* @param lrnType The legal registration number type (EORI, VATID, GLEIF, Kenya's PIN, etc.)
|
|
23
|
+
* @param cursor The cursor to request the next page of entities.
|
|
24
|
+
* @param pageSize The maximum number of entities in a page.
|
|
25
|
+
* @returns All the entities for the storage matching the conditions,
|
|
26
|
+
* and a cursor which can be used to request more entities.
|
|
27
|
+
* @throws NotImplementedError if the implementation does not support retrieval.
|
|
28
|
+
*/
|
|
29
|
+
queryParticipants(participant?: string, legalRegistrationNumber?: string, lrnType?: string, cursor?: string, pageSize?: number): Promise<IParticipantList>;
|
|
30
|
+
/**
|
|
31
|
+
* Registers a Data Space Connector to the service.
|
|
32
|
+
* @param credential The credential as JWT.
|
|
33
|
+
* @returns The Data Space Connector Id registered.
|
|
34
|
+
*/
|
|
35
|
+
registerDataSpaceConnectorCredential(credential: string): Promise<string>;
|
|
36
|
+
/**
|
|
37
|
+
* Query the federated catalogue.
|
|
38
|
+
* @param id Data Space Connector Id.
|
|
39
|
+
* @param maintainer The identity of the participant maintaining the Data Space Connector.
|
|
40
|
+
* @param cursor The cursor to request the next page of entities.
|
|
41
|
+
* @param pageSize The maximum number of entities in a page.
|
|
42
|
+
* @returns All the entities for the storage matching the conditions,
|
|
43
|
+
* and a cursor which can be used to request more entities.
|
|
44
|
+
* @throws NotImplementedError if the implementation does not support retrieval.
|
|
45
|
+
*/
|
|
46
|
+
queryDataSpaceConnectors(id?: string, maintainer?: string, cursor?: string, pageSize?: number): Promise<IDataSpaceConnectorList>;
|
|
47
|
+
/**
|
|
48
|
+
* Registers a service offering Credential to the service.
|
|
49
|
+
* @param credential The credential as JWT.
|
|
50
|
+
* @returns The Id of the Service Offerings registered.
|
|
51
|
+
*/
|
|
52
|
+
registerServiceOfferingCredential(credential: string): Promise<string[]>;
|
|
53
|
+
/**
|
|
54
|
+
* Registers a data resource Credential to the service.
|
|
55
|
+
* @param credential The credential as JWT.
|
|
56
|
+
* @returns The Id of the Data Resources registered.
|
|
57
|
+
*/
|
|
58
|
+
registerDataResourceCredential(credential: string): Promise<string[]>;
|
|
59
|
+
/**
|
|
60
|
+
* Query the federated catalogue.
|
|
61
|
+
* @param id Service Offering id.
|
|
62
|
+
* @param providedBy The identity of the participant providing the Offering.
|
|
63
|
+
* @param cursor The cursor to request the next page of entities.
|
|
64
|
+
* @param pageSize The maximum number of entities in a page.
|
|
65
|
+
* @returns All the entities for the storage matching the conditions,
|
|
66
|
+
* and a cursor which can be used to request more entities.
|
|
67
|
+
* @throws NotImplementedError if the implementation does not support retrieval.
|
|
68
|
+
*/
|
|
69
|
+
queryServiceOfferings(id?: string, providedBy?: string, cursor?: string, pageSize?: number): Promise<IServiceOfferingList>;
|
|
70
|
+
/**
|
|
71
|
+
* Query the federated catalogue.
|
|
72
|
+
* @param id The id of the Data Resource.
|
|
73
|
+
* @param producedBy The identity of the participant producing the data behind the data resource.
|
|
74
|
+
* @param cursor The cursor to request the next page of entities.
|
|
75
|
+
* @param pageSize The maximum number of entities in a page.
|
|
76
|
+
* @returns All the entities for the storage matching the conditions,
|
|
77
|
+
* and a cursor which can be used to request more entities.
|
|
78
|
+
* @throws NotImplementedError if the implementation does not support retrieval.
|
|
79
|
+
*/
|
|
80
|
+
queryDataResources(id?: string, producedBy?: string, cursor?: string, pageSize?: number): Promise<IDataResourceList>;
|
|
81
|
+
/**
|
|
82
|
+
* Returns a Federated Catalogue entry.
|
|
83
|
+
* @param entryType The type of entry.
|
|
84
|
+
* @param entryId The entry's id.
|
|
85
|
+
* @returns Catalogue Entry
|
|
86
|
+
* @throws NotFoundError if not found.
|
|
87
|
+
*/
|
|
88
|
+
getEntry(entryType: FederatedCatalogueEntryType, entryId: string): Promise<ICatalogueEntry>;
|
|
89
|
+
}
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
import type { IFederatedCatalogueGetRequest } from "./IFederatedCatalogueGetRequest";
|
|
2
|
+
/**
|
|
3
|
+
* Get a Catalogue Entry.
|
|
4
|
+
*/
|
|
5
|
+
export interface ICatalogueEntryGetRequest extends IFederatedCatalogueGetRequest {
|
|
6
|
+
/**
|
|
7
|
+
* The parameters from the path.
|
|
8
|
+
*/
|
|
9
|
+
pathParams: {
|
|
10
|
+
/**
|
|
11
|
+
* The ID of the entry (Participant, Service, etc.) to get.
|
|
12
|
+
*/
|
|
13
|
+
id: string;
|
|
14
|
+
};
|
|
15
|
+
}
|
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
import type { IFederatedCatalogueGetRequest } from "./IFederatedCatalogueGetRequest";
|
|
2
|
+
/**
|
|
3
|
+
* Get the a list of the data resource entries.
|
|
4
|
+
*/
|
|
5
|
+
export interface IDataResourceListRequest extends IFederatedCatalogueGetRequest {
|
|
6
|
+
/**
|
|
7
|
+
* The query parameters.
|
|
8
|
+
*/
|
|
9
|
+
query: {
|
|
10
|
+
/**
|
|
11
|
+
* The Id of the Data Resource.
|
|
12
|
+
*/
|
|
13
|
+
id?: string;
|
|
14
|
+
/**
|
|
15
|
+
* The service provider.
|
|
16
|
+
*/
|
|
17
|
+
producedBy?: string;
|
|
18
|
+
/**
|
|
19
|
+
* The optional cursor to get next chunk.
|
|
20
|
+
*/
|
|
21
|
+
cursor?: string;
|
|
22
|
+
/**
|
|
23
|
+
* The maximum number of entities in a page.
|
|
24
|
+
*/
|
|
25
|
+
pageSize?: number;
|
|
26
|
+
};
|
|
27
|
+
}
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import type { IDataSpaceConnectorEntry } from "../data-space-connector/IDataSpaceConnectorEntry";
|
|
2
|
+
/**
|
|
3
|
+
* Service Offering response
|
|
4
|
+
*/
|
|
5
|
+
export interface IDataSpaceConnectorGetResponse {
|
|
6
|
+
/**
|
|
7
|
+
* The response payload.
|
|
8
|
+
*/
|
|
9
|
+
body: IDataSpaceConnectorEntry;
|
|
10
|
+
}
|
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
import type { IFederatedCatalogueGetRequest } from "./IFederatedCatalogueGetRequest";
|
|
2
|
+
/**
|
|
3
|
+
* Get the a list of the data space connector entries.
|
|
4
|
+
*/
|
|
5
|
+
export interface IDataSpaceConnectorListRequest extends IFederatedCatalogueGetRequest {
|
|
6
|
+
/**
|
|
7
|
+
* The query parameters.
|
|
8
|
+
*/
|
|
9
|
+
query: {
|
|
10
|
+
/**
|
|
11
|
+
* The id of the Data Space Connector.
|
|
12
|
+
*/
|
|
13
|
+
id?: string;
|
|
14
|
+
/**
|
|
15
|
+
* The maintainer
|
|
16
|
+
*/
|
|
17
|
+
maintainedBy?: string;
|
|
18
|
+
/**
|
|
19
|
+
* The optional cursor to get next chunk.
|
|
20
|
+
*/
|
|
21
|
+
cursor?: string;
|
|
22
|
+
/**
|
|
23
|
+
* The maximum number of entities in a page.
|
|
24
|
+
*/
|
|
25
|
+
pageSize?: number;
|
|
26
|
+
};
|
|
27
|
+
}
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import type { IDataSpaceConnectorList } from "../data-space-connector/IDataSpaceConnectorList";
|
|
2
|
+
/**
|
|
3
|
+
* Response for Data Space Connector list
|
|
4
|
+
*/
|
|
5
|
+
export interface IDataSpaceConnectorListResponse {
|
|
6
|
+
/**
|
|
7
|
+
* The response payload.
|
|
8
|
+
*/
|
|
9
|
+
body: IDataSpaceConnectorList;
|
|
10
|
+
}
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
import type { HeaderTypes, MimeTypes } from "@twin.org/web";
|
|
2
|
+
/**
|
|
3
|
+
* Base interface for Federated Catalogue Get Requests
|
|
4
|
+
*/
|
|
5
|
+
export interface IFederatedCatalogueGetRequest {
|
|
6
|
+
/**
|
|
7
|
+
* The headers which can be used to determine the response data type.
|
|
8
|
+
*/
|
|
9
|
+
headers?: {
|
|
10
|
+
[HeaderTypes.Accept]: typeof MimeTypes.Json | typeof MimeTypes.JsonLd;
|
|
11
|
+
};
|
|
12
|
+
}
|
|
@@ -0,0 +1,31 @@
|
|
|
1
|
+
import type { IFederatedCatalogueGetRequest } from "./IFederatedCatalogueGetRequest";
|
|
2
|
+
/**
|
|
3
|
+
* Get the a list of the participant entries.
|
|
4
|
+
*/
|
|
5
|
+
export interface IParticipantListRequest extends IFederatedCatalogueGetRequest {
|
|
6
|
+
/**
|
|
7
|
+
* The query parameters.
|
|
8
|
+
*/
|
|
9
|
+
query: {
|
|
10
|
+
/**
|
|
11
|
+
* The participant Id.
|
|
12
|
+
*/
|
|
13
|
+
id?: string;
|
|
14
|
+
/**
|
|
15
|
+
* The legal registration number.
|
|
16
|
+
*/
|
|
17
|
+
registrationNumber?: string;
|
|
18
|
+
/**
|
|
19
|
+
* The legal registration number type.
|
|
20
|
+
*/
|
|
21
|
+
lrnType?: string;
|
|
22
|
+
/**
|
|
23
|
+
* The optional cursor to get next chunk.
|
|
24
|
+
*/
|
|
25
|
+
cursor?: string;
|
|
26
|
+
/**
|
|
27
|
+
* The maximum number of entities in a page.
|
|
28
|
+
*/
|
|
29
|
+
pageSize?: number;
|
|
30
|
+
};
|
|
31
|
+
}
|
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
import type { IFederatedCatalogueGetRequest } from "./IFederatedCatalogueGetRequest";
|
|
2
|
+
/**
|
|
3
|
+
* Get the a list of the service offering entries.
|
|
4
|
+
*/
|
|
5
|
+
export interface IServiceOfferingListRequest extends IFederatedCatalogueGetRequest {
|
|
6
|
+
/**
|
|
7
|
+
* The query parameters.
|
|
8
|
+
*/
|
|
9
|
+
query: {
|
|
10
|
+
/**
|
|
11
|
+
* The Service Offering Id.
|
|
12
|
+
*/
|
|
13
|
+
id?: string;
|
|
14
|
+
/**
|
|
15
|
+
* The service provider.
|
|
16
|
+
*/
|
|
17
|
+
providedBy?: string;
|
|
18
|
+
/**
|
|
19
|
+
* The optional cursor to get next chunk.
|
|
20
|
+
*/
|
|
21
|
+
cursor?: string;
|
|
22
|
+
/**
|
|
23
|
+
* The maximum number of entities in a page.
|
|
24
|
+
*/
|
|
25
|
+
pageSize?: number;
|
|
26
|
+
};
|
|
27
|
+
}
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import type { IDataResource } from "@twin.org/standards-gaia-x";
|
|
2
|
+
import type { ICredential } from "../ICredential";
|
|
3
|
+
/**
|
|
4
|
+
* Data Resource Credential
|
|
5
|
+
*/
|
|
6
|
+
export interface IDataResourceCredential extends ICredential {
|
|
7
|
+
/**
|
|
8
|
+
* The subject of the Credential
|
|
9
|
+
*/
|
|
10
|
+
credentialSubject: IDataResource;
|
|
11
|
+
}
|
|
@@ -0,0 +1,29 @@
|
|
|
1
|
+
import type { IDataResource } from "@twin.org/standards-gaia-x";
|
|
2
|
+
import type { IOdrlPolicy } from "@twin.org/standards-w3c-odrl";
|
|
3
|
+
import type { FederatedCatalogueContextType } from "../federatedCatalogueContextType";
|
|
4
|
+
import type { ICatalogueBase } from "../ICatalogueBase";
|
|
5
|
+
/**
|
|
6
|
+
* Interface describing a Data Resource entry.
|
|
7
|
+
*/
|
|
8
|
+
export interface IDataResourceEntry extends ICatalogueBase, IDataResource {
|
|
9
|
+
/**
|
|
10
|
+
* The LD Context
|
|
11
|
+
*/
|
|
12
|
+
"@context": FederatedCatalogueContextType;
|
|
13
|
+
/**
|
|
14
|
+
* Overwriting producedBy as we only store the identifier
|
|
15
|
+
*/
|
|
16
|
+
producedBy: string;
|
|
17
|
+
/**
|
|
18
|
+
* Overwriting copyrightOwnedBy as we only store the identifier
|
|
19
|
+
*/
|
|
20
|
+
copyrightOwnedBy: string;
|
|
21
|
+
/**
|
|
22
|
+
* Overwriting exposedThrough as we only store the id of the Data Exchange Component
|
|
23
|
+
*/
|
|
24
|
+
exposedThrough: string;
|
|
25
|
+
/**
|
|
26
|
+
* Overwriting to ensure always an array is stored
|
|
27
|
+
*/
|
|
28
|
+
resourcePolicy: IOdrlPolicy[];
|
|
29
|
+
}
|
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
import type { SchemaOrgTypes } from "@twin.org/standards-schema-org";
|
|
2
|
+
import type { IDataResourceEntry } from "./IDataResourceEntry";
|
|
3
|
+
import type { FederatedCatalogueContextType } from "../federatedCatalogueContextType";
|
|
4
|
+
/**
|
|
5
|
+
* Interface describing a list of Data Resource entries.
|
|
6
|
+
*/
|
|
7
|
+
export interface IDataResourceList {
|
|
8
|
+
/**
|
|
9
|
+
* The LD Context.
|
|
10
|
+
*/
|
|
11
|
+
"@context": FederatedCatalogueContextType;
|
|
12
|
+
/**
|
|
13
|
+
* The type
|
|
14
|
+
*/
|
|
15
|
+
type: typeof SchemaOrgTypes.ItemList;
|
|
16
|
+
/**
|
|
17
|
+
* The components of the Collection
|
|
18
|
+
*
|
|
19
|
+
*/
|
|
20
|
+
[SchemaOrgTypes.ItemListElement]: Omit<IDataResourceEntry, "@context">[];
|
|
21
|
+
/**
|
|
22
|
+
* Next item cursor.
|
|
23
|
+
*/
|
|
24
|
+
[SchemaOrgTypes.NextItem]?: string;
|
|
25
|
+
}
|