@twin.org/federated-catalogue-models 0.0.1-next.2

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.
Files changed (96) hide show
  1. package/LICENSE +201 -0
  2. package/README.md +21 -0
  3. package/dist/cjs/index.cjs +121 -0
  4. package/dist/esm/index.mjs +116 -0
  5. package/dist/types/index.d.ts +41 -0
  6. package/dist/types/models/ICatalogueBase.d.ts +25 -0
  7. package/dist/types/models/ICatalogueEntry.d.ts +8 -0
  8. package/dist/types/models/IComplianceCredential.d.ts +37 -0
  9. package/dist/types/models/IComplianceEvidence.d.ts +26 -0
  10. package/dist/types/models/IComplianceVerificationResult.d.ts +19 -0
  11. package/dist/types/models/ICredential.d.ts +21 -0
  12. package/dist/types/models/IFederatedCatalogue.d.ts +89 -0
  13. package/dist/types/models/IVerificationResult.d.ts +13 -0
  14. package/dist/types/models/api/ICatalogueEntryGetRequest.d.ts +15 -0
  15. package/dist/types/models/api/ICompliancePresentationRequest.d.ts +9 -0
  16. package/dist/types/models/api/IDataResourceGetResponse.d.ts +10 -0
  17. package/dist/types/models/api/IDataResourceListRequest.d.ts +27 -0
  18. package/dist/types/models/api/IDataResourceListResponse.d.ts +10 -0
  19. package/dist/types/models/api/IDataSpaceConnectorGetResponse.d.ts +10 -0
  20. package/dist/types/models/api/IDataSpaceConnectorListRequest.d.ts +27 -0
  21. package/dist/types/models/api/IDataSpaceConnectorListResponse.d.ts +10 -0
  22. package/dist/types/models/api/IFederatedCatalogueGetRequest.d.ts +12 -0
  23. package/dist/types/models/api/IParticipantGetResponse.d.ts +10 -0
  24. package/dist/types/models/api/IParticipantListRequest.d.ts +31 -0
  25. package/dist/types/models/api/IParticipantListResponse.d.ts +10 -0
  26. package/dist/types/models/api/IServiceOfferingGetResponse.d.ts +10 -0
  27. package/dist/types/models/api/IServiceOfferingListRequest.d.ts +27 -0
  28. package/dist/types/models/api/IServiceOfferingListResponse.d.ts +10 -0
  29. package/dist/types/models/data-resource/IDataResourceCredential.d.ts +11 -0
  30. package/dist/types/models/data-resource/IDataResourceEntry.d.ts +29 -0
  31. package/dist/types/models/data-resource/IDataResourceList.d.ts +25 -0
  32. package/dist/types/models/data-space-connector/IDataSpaceConnector.d.ts +77 -0
  33. package/dist/types/models/data-space-connector/IDataSpaceConnectorCredential.d.ts +11 -0
  34. package/dist/types/models/data-space-connector/IDataSpaceConnectorEntry.d.ts +18 -0
  35. package/dist/types/models/data-space-connector/IDataSpaceConnectorList.d.ts +25 -0
  36. package/dist/types/models/federatedCatalogueContextInstances.d.ts +14 -0
  37. package/dist/types/models/federatedCatalogueContextType.d.ts +11 -0
  38. package/dist/types/models/federatedCatalogueContexts.d.ts +13 -0
  39. package/dist/types/models/federatedCatalogueEntryType.d.ts +7 -0
  40. package/dist/types/models/federatedCatalogueTypes.d.ts +25 -0
  41. package/dist/types/models/participant/IParticipantCredential.d.ts +11 -0
  42. package/dist/types/models/participant/IParticipantEntry.d.ts +12 -0
  43. package/dist/types/models/participant/IParticipantList.d.ts +25 -0
  44. package/dist/types/models/service-offering/IServiceOfferingCredential.d.ts +11 -0
  45. package/dist/types/models/service-offering/IServiceOfferingEntry.d.ts +25 -0
  46. package/dist/types/models/service-offering/IServiceOfferingList.d.ts +25 -0
  47. package/dist/types/models/verificationFailureReasons.d.ts +53 -0
  48. package/docs/changelog.md +12 -0
  49. package/docs/examples.md +1 -0
  50. package/docs/overview.md +21 -0
  51. package/docs/reference/classes/FederatedCatalogueContextInstances.md +29 -0
  52. package/docs/reference/index.md +57 -0
  53. package/docs/reference/interfaces/ICatalogueEntryGetRequest.md +37 -0
  54. package/docs/reference/interfaces/IComplianceCredential.md +103 -0
  55. package/docs/reference/interfaces/IComplianceEvidence.md +45 -0
  56. package/docs/reference/interfaces/ICompliancePresentationRequest.md +11 -0
  57. package/docs/reference/interfaces/IComplianceVerificationResult.md +55 -0
  58. package/docs/reference/interfaces/ICredential.md +51 -0
  59. package/docs/reference/interfaces/IDataResourceCredential.md +43 -0
  60. package/docs/reference/interfaces/IDataResourceEntry.md +131 -0
  61. package/docs/reference/interfaces/IDataResourceGetResponse.md +11 -0
  62. package/docs/reference/interfaces/IDataResourceList.md +35 -0
  63. package/docs/reference/interfaces/IDataResourceListRequest.md +55 -0
  64. package/docs/reference/interfaces/IDataResourceListResponse.md +11 -0
  65. package/docs/reference/interfaces/IDataSpaceConnector.md +130 -0
  66. package/docs/reference/interfaces/IDataSpaceConnectorCredential.md +43 -0
  67. package/docs/reference/interfaces/IDataSpaceConnectorEntry.md +224 -0
  68. package/docs/reference/interfaces/IDataSpaceConnectorGetResponse.md +11 -0
  69. package/docs/reference/interfaces/IDataSpaceConnectorList.md +35 -0
  70. package/docs/reference/interfaces/IDataSpaceConnectorListRequest.md +55 -0
  71. package/docs/reference/interfaces/IDataSpaceConnectorListResponse.md +11 -0
  72. package/docs/reference/interfaces/IFederatedCatalogue.md +313 -0
  73. package/docs/reference/interfaces/IFederatedCatalogueGetRequest.md +23 -0
  74. package/docs/reference/interfaces/IParticipantCredential.md +43 -0
  75. package/docs/reference/interfaces/IParticipantEntry.md +83 -0
  76. package/docs/reference/interfaces/IParticipantGetResponse.md +11 -0
  77. package/docs/reference/interfaces/IParticipantList.md +35 -0
  78. package/docs/reference/interfaces/IParticipantListRequest.md +61 -0
  79. package/docs/reference/interfaces/IParticipantListResponse.md +11 -0
  80. package/docs/reference/interfaces/IServiceOfferingCredential.md +43 -0
  81. package/docs/reference/interfaces/IServiceOfferingEntry.md +119 -0
  82. package/docs/reference/interfaces/IServiceOfferingGetResponse.md +11 -0
  83. package/docs/reference/interfaces/IServiceOfferingList.md +35 -0
  84. package/docs/reference/interfaces/IServiceOfferingListRequest.md +55 -0
  85. package/docs/reference/interfaces/IServiceOfferingListResponse.md +11 -0
  86. package/docs/reference/interfaces/IVerificationResult.md +23 -0
  87. package/docs/reference/type-aliases/FederatedCatalogueContextType.md +5 -0
  88. package/docs/reference/type-aliases/FederatedCatalogueContexts.md +5 -0
  89. package/docs/reference/type-aliases/FederatedCatalogueEntryType.md +5 -0
  90. package/docs/reference/type-aliases/FederatedCatalogueTypes.md +5 -0
  91. package/docs/reference/type-aliases/ICatalogueEntry.md +5 -0
  92. package/docs/reference/type-aliases/VerificationFailureReasons.md +5 -0
  93. package/docs/reference/variables/FederatedCatalogueContexts.md +13 -0
  94. package/docs/reference/variables/FederatedCatalogueTypes.md +31 -0
  95. package/docs/reference/variables/VerificationFailureReasons.md +73 -0
  96. package/package.json +44 -0
@@ -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 IFederatedCatalogue 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,13 @@
1
+ /**
2
+ * Verification Result
3
+ */
4
+ export interface IVerificationResult {
5
+ /**
6
+ * True if verified. False the opposite.
7
+ */
8
+ verified: boolean;
9
+ /**
10
+ * Verification failure reason.
11
+ */
12
+ verificationFailureReason?: string;
13
+ }
@@ -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,9 @@
1
+ /**
2
+ * Register a new Compliance Credential.
3
+ */
4
+ export interface ICompliancePresentationRequest {
5
+ /**
6
+ * The data to be used in the create.
7
+ */
8
+ body: string;
9
+ }
@@ -0,0 +1,10 @@
1
+ import type { IDataResourceEntry } from "../data-resource/IDataResourceEntry";
2
+ /**
3
+ * Service Offering response
4
+ */
5
+ export interface IDataResourceGetResponse {
6
+ /**
7
+ * The response payload.
8
+ */
9
+ body: IDataResourceEntry;
10
+ }
@@ -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 { IDataResourceList } from "../data-resource/IDataResourceList";
2
+ /**
3
+ * Response fo data resource list.
4
+ */
5
+ export interface IDataResourceListResponse {
6
+ /**
7
+ * The response payload.
8
+ */
9
+ body: IDataResourceList;
10
+ }
@@ -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,10 @@
1
+ import type { IParticipantEntry } from "../participant/IParticipantEntry";
2
+ /**
3
+ * Response for a Participant Entry.
4
+ */
5
+ export interface IParticipantGetResponse {
6
+ /**
7
+ * The response payload.
8
+ */
9
+ body: IParticipantEntry;
10
+ }
@@ -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,10 @@
1
+ import type { IParticipantList } from "../participant/IParticipantList";
2
+ /**
3
+ * Response for participant list query
4
+ */
5
+ export interface IParticipantListResponse {
6
+ /**
7
+ * The response payload.
8
+ */
9
+ body: IParticipantList;
10
+ }
@@ -0,0 +1,10 @@
1
+ import type { IServiceOfferingEntry } from "../service-offering/IServiceOfferingEntry";
2
+ /**
3
+ * Service Offering response
4
+ */
5
+ export interface IServiceOfferingGetResponse {
6
+ /**
7
+ * The response payload.
8
+ */
9
+ body: IServiceOfferingEntry;
10
+ }
@@ -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,10 @@
1
+ import type { IServiceOfferingList } from "../service-offering/IServiceOfferingList";
2
+ /**
3
+ * Response for Service Offering list
4
+ */
5
+ export interface IServiceOfferingListResponse {
6
+ /**
7
+ * The response payload.
8
+ */
9
+ body: IServiceOfferingList;
10
+ }
@@ -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
+ }
@@ -0,0 +1,77 @@
1
+ import type { IJsonLdKeyword, IJsonLdNodeObject } from "@twin.org/data-json-ld";
2
+ import type { GaiaXContextType, GaiaXTypes, IDataExchangeComponent, IDataResource, IEndpoint } from "@twin.org/standards-gaia-x";
3
+ import type { FederatedCatalogueTypes } from "../federatedCatalogueTypes";
4
+ /**
5
+ * TWIN Data Space Connector.
6
+ */
7
+ export interface IDataSpaceConnector extends IDataExchangeComponent {
8
+ /**
9
+ * The LD Context.
10
+ */
11
+ "@context": GaiaXContextType;
12
+ /**
13
+ * A unique identifier given to this Data Space Connector.
14
+ */
15
+ id: string;
16
+ /**
17
+ * A Connector is a Data Exchange Component
18
+ */
19
+ type: [
20
+ typeof GaiaXTypes.DataExchangeComponent,
21
+ typeof FederatedCatalogueTypes.DataSpaceConnector,
22
+ ...IJsonLdKeyword["@type"][]
23
+ ];
24
+ /**
25
+ * Connector's Identity that allows to know public key of this Connector.
26
+ */
27
+ identity: string;
28
+ /**
29
+ * Who maintains this Data Space Connector.
30
+ */
31
+ maintainer: string;
32
+ /**
33
+ * The name of this Data Space Connector
34
+ */
35
+ name?: string;
36
+ /**
37
+ * A description of this Data Space Connector
38
+ */
39
+ description?: string;
40
+ /**
41
+ * The default endpoint of the Connector.
42
+ * This endpoint can be used as a base to guess other endpoints in case they are not explicitly declared.
43
+ */
44
+ defaultEndpoint: IEndpoint;
45
+ /**
46
+ * The endpoint used for data subscription by Consumers.
47
+ * If the endpoint URL is a relative reference to a URL then it should be resolved using the
48
+ * default endpoint URL as a base URL.
49
+ */
50
+ subscriptionActivityEndpoint?: IEndpoint;
51
+ /**
52
+ * The endpoint used by Providers to push data.
53
+ * If the endpoint URL is a relative reference to a URL then it should be resolved using the
54
+ * default endpoint URL as a base URL.
55
+ */
56
+ pushActivityEndpoint: IEndpoint;
57
+ /**
58
+ * The endpoint used by Consumers to pull data from.
59
+ * If the endpoint URL is a relative reference to a URL then it should be resolved using the
60
+ * default endpoint URL as a base URL.
61
+ */
62
+ pullDataEndpoint: IEndpoint;
63
+ /**
64
+ * The resources offered by this Connector.
65
+ * A resource index is usually a relative reference to the default endpoint base URL.
66
+ * Nonetheless if the resource already declares an endpoint URL that one should be taken.
67
+ * It is captured the case where the Data Resource is supplied
68
+ * via a list of identifiers or through a map indexed by Id
69
+ *
70
+ */
71
+ offeredResource: string[] | {
72
+ [resourceId: string]: IDataResource | (IJsonLdNodeObject & {
73
+ id: string;
74
+ type: typeof GaiaXTypes.DataResource;
75
+ });
76
+ };
77
+ }
@@ -0,0 +1,11 @@
1
+ import type { IDataSpaceConnector } from "./IDataSpaceConnector";
2
+ import type { ICredential } from "../ICredential";
3
+ /**
4
+ * Participant Credential.
5
+ */
6
+ export interface IDataSpaceConnectorCredential extends ICredential {
7
+ /**
8
+ * The Credential Subject
9
+ */
10
+ credentialSubject: IDataSpaceConnector;
11
+ }
@@ -0,0 +1,18 @@
1
+ import type { ICatalogueBase } from "../ICatalogueBase";
2
+ import type { IDataSpaceConnector } from "./IDataSpaceConnector";
3
+ import type { FederatedCatalogueContextType } from "../federatedCatalogueContextType";
4
+ /**
5
+ * Interface describing a participant.
6
+ */
7
+ export interface IDataSpaceConnectorEntry extends IDataSpaceConnector, ICatalogueBase {
8
+ /**
9
+ * The LD Context
10
+ */
11
+ "@context": FederatedCatalogueContextType;
12
+ /**
13
+ * Offered resources. Probably in the future this wll be separated in a different entry so
14
+ * that a Data Space Connector entry does not need to be modified when a new Data Resource
15
+ * is offered.
16
+ */
17
+ offeredResource: string[];
18
+ }
@@ -0,0 +1,25 @@
1
+ import type { SchemaOrgTypes } from "@twin.org/standards-schema-org";
2
+ import type { IDataSpaceConnectorEntry } from "./IDataSpaceConnectorEntry";
3
+ import type { FederatedCatalogueContextType } from "../federatedCatalogueContextType";
4
+ /**
5
+ * Interface describing a list of Data Space Connectors.
6
+ */
7
+ export interface IDataSpaceConnectorList {
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<IDataSpaceConnectorEntry, "@context">[];
21
+ /**
22
+ * Next item cursor.
23
+ */
24
+ [SchemaOrgTypes.NextItem]?: string;
25
+ }
@@ -0,0 +1,14 @@
1
+ import type { FederatedCatalogueContextType } from "./federatedCatalogueContextType";
2
+ /**
3
+ * The LD context instances concerning the Federated Catalogue.
4
+ */
5
+ export declare abstract class FederatedCatalogueContextInstances {
6
+ /**
7
+ * The LD Context of a list of Catalogue entries.
8
+ */
9
+ static DEFAULT_LD_CONTEXT_ENTRY_LIST: FederatedCatalogueContextType;
10
+ /**
11
+ * The LD Context of a Catalogue entry.
12
+ */
13
+ static DEFAULT_LD_CONTEXT_ENTRY: FederatedCatalogueContextType;
14
+ }
@@ -0,0 +1,11 @@
1
+ import type { GaiaXContexts } from "@twin.org/standards-gaia-x";
2
+ import type { SchemaOrgContexts } from "@twin.org/standards-schema-org";
3
+ import type { FederatedCatalogueContexts } from "./federatedCatalogueContexts";
4
+ /**
5
+ * Type that defines the LD Context for the Federated Catalogue entities and entries.
6
+ */
7
+ export type FederatedCatalogueContextType = [
8
+ typeof SchemaOrgContexts.ContextRoot,
9
+ typeof GaiaXContexts.GaiaXLdContext,
10
+ typeof FederatedCatalogueContexts.ContextRoot
11
+ ];
@@ -0,0 +1,13 @@
1
+ /**
2
+ * The LD context concerning the Federated Catalogue.
3
+ */
4
+ export declare const FederatedCatalogueContexts: {
5
+ /**
6
+ * A Credential that is compliant.
7
+ */
8
+ readonly ContextRoot: "https://schema.twindev.org/federated-catalogue/types.jsonld";
9
+ };
10
+ /**
11
+ * The Exported types
12
+ */
13
+ export type FederatedCatalogueContexts = (typeof FederatedCatalogueContexts)[keyof typeof FederatedCatalogueContexts];
@@ -0,0 +1,7 @@
1
+ import type { GaiaXTypes } from "@twin.org/standards-gaia-x";
2
+ import type { FederatedCatalogueTypes } from "./federatedCatalogueTypes";
3
+ /**
4
+ * Types of entries in the Federated Catalogue
5
+ *
6
+ */
7
+ export type FederatedCatalogueEntryType = typeof GaiaXTypes.Participant | typeof GaiaXTypes.DataExchangeComponent | typeof GaiaXTypes.DataResource | typeof GaiaXTypes.ServiceOffering | typeof FederatedCatalogueTypes.DataSpaceConnector;
@@ -0,0 +1,25 @@
1
+ /**
2
+ * The types concerning the Federated Catalogue.
3
+ */
4
+ export declare const FederatedCatalogueTypes: {
5
+ /**
6
+ * A Credential that is compliant.
7
+ */
8
+ readonly CompliantCredential: "CompliantCredential";
9
+ /**
10
+ * A Compliance Credential.
11
+ */
12
+ readonly ComplianceCredential: "ComplianceCredential";
13
+ /**
14
+ * A Data Space Connector.
15
+ */
16
+ readonly DataSpaceConnector: "DataSpaceConnector";
17
+ /**
18
+ * Id property.
19
+ */
20
+ readonly Id: "id";
21
+ };
22
+ /**
23
+ * The Exported types
24
+ */
25
+ export type FederatedCatalogueTypes = (typeof FederatedCatalogueTypes)[keyof typeof FederatedCatalogueTypes];
@@ -0,0 +1,11 @@
1
+ import type { IParticipant } from "@twin.org/standards-gaia-x";
2
+ import type { ICredential } from "../ICredential";
3
+ /**
4
+ * Participant Credential.
5
+ */
6
+ export interface IParticipantCredential extends ICredential {
7
+ /**
8
+ * The Credential Subject
9
+ */
10
+ credentialSubject: IParticipant;
11
+ }
@@ -0,0 +1,12 @@
1
+ import type { IParticipant } from "@twin.org/standards-gaia-x";
2
+ import type { FederatedCatalogueContextType } from "../federatedCatalogueContextType";
3
+ import type { ICatalogueBase } from "../ICatalogueBase";
4
+ /**
5
+ * Interface describing a participant.
6
+ */
7
+ export interface IParticipantEntry extends IParticipant, ICatalogueBase {
8
+ /**
9
+ * The LD Context
10
+ */
11
+ "@context": FederatedCatalogueContextType;
12
+ }