@twin.org/standards-gaia-x 0.0.3-next.6 → 0.0.3-next.60

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 (71) hide show
  1. package/README.md +2 -2
  2. package/dist/es/dataTypes/gaiaXDataTypes.js +39 -36
  3. package/dist/es/dataTypes/gaiaXDataTypes.js.map +1 -1
  4. package/dist/es/index.js +7 -7
  5. package/dist/es/index.js.map +1 -1
  6. package/dist/es/models/IGaiaXAddress.js +2 -0
  7. package/dist/es/models/IGaiaXAddress.js.map +1 -0
  8. package/dist/es/models/IGaiaXDataExchangeComponent.js +2 -0
  9. package/dist/es/models/IGaiaXDataExchangeComponent.js.map +1 -0
  10. package/dist/es/models/IGaiaXDataResource.js +2 -0
  11. package/dist/es/models/IGaiaXDataResource.js.map +1 -0
  12. package/dist/es/models/IGaiaXEndpoint.js +2 -0
  13. package/dist/es/models/IGaiaXEndpoint.js.map +1 -0
  14. package/dist/es/models/IGaiaXEntity.js.map +1 -1
  15. package/dist/es/models/IGaiaXLegalPerson.js +2 -0
  16. package/dist/es/models/IGaiaXLegalPerson.js.map +1 -0
  17. package/dist/es/models/IGaiaXRegistrationNumber.js +2 -0
  18. package/dist/es/models/IGaiaXRegistrationNumber.js.map +1 -0
  19. package/dist/es/models/IGaiaXServiceOffering.js +2 -0
  20. package/dist/es/models/IGaiaXServiceOffering.js.map +1 -0
  21. package/dist/es/models/gaiaXContextType.js.map +1 -1
  22. package/dist/es/models/gaiaXContexts.js +13 -3
  23. package/dist/es/models/gaiaXContexts.js.map +1 -1
  24. package/dist/es/schemas/GaiaXContextType.json +30 -0
  25. package/dist/types/index.d.ts +7 -7
  26. package/dist/types/models/{IAddress.d.ts → IGaiaXAddress.d.ts} +1 -2
  27. package/dist/types/models/{IDataExchangeComponent.d.ts → IGaiaXDataExchangeComponent.d.ts} +1 -2
  28. package/dist/types/models/{IDataResource.d.ts → IGaiaXDataResource.d.ts} +6 -6
  29. package/dist/types/models/{IEndpoint.d.ts → IGaiaXEndpoint.d.ts} +1 -1
  30. package/dist/types/models/IGaiaXEntity.d.ts +1 -2
  31. package/dist/types/models/{ILegalPerson.d.ts → IGaiaXLegalPerson.d.ts} +6 -6
  32. package/dist/types/models/{IRegistrationNumber.d.ts → IGaiaXRegistrationNumber.d.ts} +1 -2
  33. package/dist/types/models/{IServiceOffering.d.ts → IGaiaXServiceOffering.d.ts} +7 -7
  34. package/dist/types/models/gaiaXContextType.d.ts +2 -9
  35. package/dist/types/models/gaiaXContexts.d.ts +14 -4
  36. package/docs/changelog.md +781 -1
  37. package/docs/examples.md +25 -1
  38. package/docs/reference/classes/GaiaXDataTypes.md +1 -1
  39. package/docs/reference/index.md +7 -7
  40. package/docs/reference/interfaces/IGaiaXAddress.md +20 -0
  41. package/docs/reference/interfaces/IGaiaXDataExchangeComponent.md +20 -0
  42. package/docs/reference/interfaces/IGaiaXDataResource.md +106 -0
  43. package/docs/reference/interfaces/IGaiaXEndpoint.md +36 -0
  44. package/docs/reference/interfaces/{ILegalPerson.md → IGaiaXLegalPerson.md} +19 -23
  45. package/docs/reference/interfaces/IGaiaXRegistrationNumber.md +85 -0
  46. package/docs/reference/interfaces/IGaiaXServiceOffering.md +97 -0
  47. package/docs/reference/type-aliases/GaiaXContextType.md +1 -1
  48. package/docs/reference/type-aliases/GaiaXContexts.md +1 -1
  49. package/docs/reference/variables/GaiaXContexts.md +18 -4
  50. package/docs/reference/variables/GaiaXTypes.md +13 -13
  51. package/package.json +3 -3
  52. package/dist/es/models/IAddress.js +0 -2
  53. package/dist/es/models/IAddress.js.map +0 -1
  54. package/dist/es/models/IDataExchangeComponent.js +0 -2
  55. package/dist/es/models/IDataExchangeComponent.js.map +0 -1
  56. package/dist/es/models/IDataResource.js +0 -2
  57. package/dist/es/models/IDataResource.js.map +0 -1
  58. package/dist/es/models/IEndpoint.js +0 -2
  59. package/dist/es/models/IEndpoint.js.map +0 -1
  60. package/dist/es/models/ILegalPerson.js +0 -2
  61. package/dist/es/models/ILegalPerson.js.map +0 -1
  62. package/dist/es/models/IRegistrationNumber.js +0 -2
  63. package/dist/es/models/IRegistrationNumber.js.map +0 -1
  64. package/dist/es/models/IServiceOffering.js +0 -2
  65. package/dist/es/models/IServiceOffering.js.map +0 -1
  66. package/docs/reference/interfaces/IAddress.md +0 -28
  67. package/docs/reference/interfaces/IDataExchangeComponent.md +0 -32
  68. package/docs/reference/interfaces/IDataResource.md +0 -110
  69. package/docs/reference/interfaces/IEndpoint.md +0 -44
  70. package/docs/reference/interfaces/IRegistrationNumber.md +0 -93
  71. package/docs/reference/interfaces/IServiceOffering.md +0 -101
package/README.md CHANGED
@@ -1,6 +1,6 @@
1
- # TWIN Standards Gaia-x
1
+ # TWIN Standards Gaia-X
2
2
 
3
- Models which define the structure of [Gaia-x](https://docs.gaia-x.eu/ontology/development/).
3
+ This package provides data models for [Gaia-X ontology concepts](https://docs.gaia-x.eu/ontology/development/), enabling interoperable representation of federated data space concepts.
4
4
 
5
5
  ## Installation
6
6
 
@@ -1,10 +1,13 @@
1
- import { DataTypeHandlerFactory } from "@twin.org/data-core";
1
+ // Copyright 2024 IOTA Stiftung.
2
+ // SPDX-License-Identifier: Apache-2.0.
3
+ import { DataTypeHelper } from "@twin.org/data-core";
2
4
  import { GaiaXContexts } from "../models/gaiaXContexts.js";
3
5
  import { GaiaXTypes } from "../models/gaiaXTypes.js";
4
6
  import AddressSchema from "../schemas/Address.json" with { type: "json" };
5
7
  import DataExchangeComponentSchema from "../schemas/DataExchangeComponent.json" with { type: "json" };
6
8
  import DataResourceSchema from "../schemas/DataResource.json" with { type: "json" };
7
9
  import EndpointSchema from "../schemas/Endpoint.json" with { type: "json" };
10
+ import ContextTypeSchema from "../schemas/GaiaXContextType.json" with { type: "json" };
8
11
  import LegalPersonSchema from "../schemas/LegalPerson.json" with { type: "json" };
9
12
  import RegistrationNumberSchema from "../schemas/RegistrationNumber.json" with { type: "json" };
10
13
  import ServiceOfferingSchema from "../schemas/ServiceOffering.json" with { type: "json" };
@@ -16,41 +19,41 @@ export class GaiaXDataTypes {
16
19
  * Register all the data types.
17
20
  */
18
21
  static registerTypes() {
19
- DataTypeHandlerFactory.register(`${GaiaXContexts.ContextRoot}${GaiaXTypes.DataExchangeComponent}`, () => ({
20
- context: GaiaXContexts.ContextRoot,
21
- type: GaiaXTypes.DataExchangeComponent,
22
- jsonSchema: async () => DataExchangeComponentSchema
23
- }));
24
- DataTypeHandlerFactory.register(`${GaiaXContexts.ContextRoot}${GaiaXTypes.DataResource}`, () => ({
25
- context: GaiaXContexts.ContextRoot,
26
- type: GaiaXTypes.DataResource,
27
- jsonSchema: async () => DataResourceSchema
28
- }));
29
- DataTypeHandlerFactory.register(`${GaiaXContexts.ContextRoot}${GaiaXTypes.Endpoint}`, () => ({
30
- context: GaiaXContexts.ContextRoot,
31
- type: GaiaXTypes.Endpoint,
32
- jsonSchema: async () => EndpointSchema
33
- }));
34
- DataTypeHandlerFactory.register(`${GaiaXContexts.ContextRoot}${GaiaXTypes.Address}`, () => ({
35
- context: GaiaXContexts.ContextRoot,
36
- type: GaiaXTypes.Address,
37
- jsonSchema: async () => AddressSchema
38
- }));
39
- DataTypeHandlerFactory.register(`${GaiaXContexts.ContextRoot}${GaiaXTypes.ServiceOffering}`, () => ({
40
- context: GaiaXContexts.ContextRoot,
41
- type: GaiaXTypes.ServiceOffering,
42
- jsonSchema: async () => ServiceOfferingSchema
43
- }));
44
- DataTypeHandlerFactory.register(`${GaiaXContexts.ContextRoot}${GaiaXTypes.LegalPerson}`, () => ({
45
- context: GaiaXContexts.ContextRoot,
46
- type: GaiaXTypes.LegalPerson,
47
- jsonSchema: async () => LegalPersonSchema
48
- }));
49
- DataTypeHandlerFactory.register(`${GaiaXContexts.ContextRoot}${GaiaXTypes.RegistrationNumber}`, () => ({
50
- context: GaiaXContexts.ContextRoot,
51
- type: GaiaXTypes.RegistrationNumber,
52
- jsonSchema: async () => RegistrationNumberSchema
53
- }));
22
+ const types = [
23
+ {
24
+ type: GaiaXTypes.DataExchangeComponent,
25
+ schema: DataExchangeComponentSchema
26
+ },
27
+ {
28
+ type: GaiaXTypes.DataResource,
29
+ schema: DataResourceSchema
30
+ },
31
+ {
32
+ type: GaiaXTypes.Endpoint,
33
+ schema: EndpointSchema
34
+ },
35
+ {
36
+ type: GaiaXTypes.Address,
37
+ schema: AddressSchema
38
+ },
39
+ {
40
+ type: GaiaXTypes.ServiceOffering,
41
+ schema: ServiceOfferingSchema
42
+ },
43
+ {
44
+ type: GaiaXTypes.LegalPerson,
45
+ schema: LegalPersonSchema
46
+ },
47
+ {
48
+ type: GaiaXTypes.RegistrationNumber,
49
+ schema: RegistrationNumberSchema
50
+ },
51
+ {
52
+ type: "ContextType",
53
+ schema: ContextTypeSchema
54
+ }
55
+ ];
56
+ DataTypeHelper.registerTypes(GaiaXContexts.Namespace, GaiaXContexts.JsonLdContext, types);
54
57
  }
55
58
  }
56
59
  //# sourceMappingURL=gaiaXDataTypes.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"gaiaXDataTypes.js","sourceRoot":"","sources":["../../../src/dataTypes/gaiaXDataTypes.ts"],"names":[],"mappings":"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","sourcesContent":["// Copyright 2024 IOTA Stiftung.\n// SPDX-License-Identifier: Apache-2.0.\nimport type { IJsonSchema } from \"@twin.org/data-core\";\nimport { DataTypeHandlerFactory } from \"@twin.org/data-core\";\nimport { GaiaXContexts } from \"../models/gaiaXContexts.js\";\nimport { GaiaXTypes } from \"../models/gaiaXTypes.js\";\nimport AddressSchema from \"../schemas/Address.json\" with { type: \"json\" };\nimport DataExchangeComponentSchema from \"../schemas/DataExchangeComponent.json\" with { type: \"json\" };\nimport DataResourceSchema from \"../schemas/DataResource.json\" with { type: \"json\" };\nimport EndpointSchema from \"../schemas/Endpoint.json\" with { type: \"json\" };\nimport LegalPersonSchema from \"../schemas/LegalPerson.json\" with { type: \"json\" };\nimport RegistrationNumberSchema from \"../schemas/RegistrationNumber.json\" with { type: \"json\" };\nimport ServiceOfferingSchema from \"../schemas/ServiceOffering.json\" with { type: \"json\" };\n\n/**\n * Handle all the data types for Gaia-X.\n */\nexport class GaiaXDataTypes {\n\t/**\n\t * Register all the data types.\n\t */\n\tpublic static registerTypes(): void {\n\t\tDataTypeHandlerFactory.register(\n\t\t\t`${GaiaXContexts.ContextRoot}${GaiaXTypes.DataExchangeComponent}`,\n\t\t\t() => ({\n\t\t\t\tcontext: GaiaXContexts.ContextRoot,\n\t\t\t\ttype: GaiaXTypes.DataExchangeComponent,\n\t\t\t\tjsonSchema: async () => DataExchangeComponentSchema as IJsonSchema\n\t\t\t})\n\t\t);\n\n\t\tDataTypeHandlerFactory.register(\n\t\t\t`${GaiaXContexts.ContextRoot}${GaiaXTypes.DataResource}`,\n\t\t\t() => ({\n\t\t\t\tcontext: GaiaXContexts.ContextRoot,\n\t\t\t\ttype: GaiaXTypes.DataResource,\n\t\t\t\tjsonSchema: async () => DataResourceSchema as IJsonSchema\n\t\t\t})\n\t\t);\n\n\t\tDataTypeHandlerFactory.register(`${GaiaXContexts.ContextRoot}${GaiaXTypes.Endpoint}`, () => ({\n\t\t\tcontext: GaiaXContexts.ContextRoot,\n\t\t\ttype: GaiaXTypes.Endpoint,\n\t\t\tjsonSchema: async () => EndpointSchema as IJsonSchema\n\t\t}));\n\n\t\tDataTypeHandlerFactory.register(`${GaiaXContexts.ContextRoot}${GaiaXTypes.Address}`, () => ({\n\t\t\tcontext: GaiaXContexts.ContextRoot,\n\t\t\ttype: GaiaXTypes.Address,\n\t\t\tjsonSchema: async () => AddressSchema as IJsonSchema\n\t\t}));\n\n\t\tDataTypeHandlerFactory.register(\n\t\t\t`${GaiaXContexts.ContextRoot}${GaiaXTypes.ServiceOffering}`,\n\t\t\t() => ({\n\t\t\t\tcontext: GaiaXContexts.ContextRoot,\n\t\t\t\ttype: GaiaXTypes.ServiceOffering,\n\t\t\t\tjsonSchema: async () => ServiceOfferingSchema as IJsonSchema\n\t\t\t})\n\t\t);\n\n\t\tDataTypeHandlerFactory.register(\n\t\t\t`${GaiaXContexts.ContextRoot}${GaiaXTypes.LegalPerson}`,\n\t\t\t() => ({\n\t\t\t\tcontext: GaiaXContexts.ContextRoot,\n\t\t\t\ttype: GaiaXTypes.LegalPerson,\n\t\t\t\tjsonSchema: async () => LegalPersonSchema as IJsonSchema\n\t\t\t})\n\t\t);\n\n\t\tDataTypeHandlerFactory.register(\n\t\t\t`${GaiaXContexts.ContextRoot}${GaiaXTypes.RegistrationNumber}`,\n\t\t\t() => ({\n\t\t\t\tcontext: GaiaXContexts.ContextRoot,\n\t\t\t\ttype: GaiaXTypes.RegistrationNumber,\n\t\t\t\tjsonSchema: async () => RegistrationNumberSchema as IJsonSchema\n\t\t\t})\n\t\t);\n\t}\n}\n"]}
1
+ {"version":3,"file":"gaiaXDataTypes.js","sourceRoot":"","sources":["../../../src/dataTypes/gaiaXDataTypes.ts"],"names":[],"mappings":"AAAA,gCAAgC;AAChC,uCAAuC;AACvC,OAAO,EAAE,cAAc,EAAE,MAAM,qBAAqB,CAAC;AACrD,OAAO,EAAE,aAAa,EAAE,MAAM,4BAA4B,CAAC;AAC3D,OAAO,EAAE,UAAU,EAAE,MAAM,yBAAyB,CAAC;AACrD,OAAO,aAAa,MAAM,yBAAyB,CAAC,OAAO,IAAI,EAAE,MAAM,EAAE,CAAC;AAC1E,OAAO,2BAA2B,MAAM,uCAAuC,CAAC,OAAO,IAAI,EAAE,MAAM,EAAE,CAAC;AACtG,OAAO,kBAAkB,MAAM,8BAA8B,CAAC,OAAO,IAAI,EAAE,MAAM,EAAE,CAAC;AACpF,OAAO,cAAc,MAAM,0BAA0B,CAAC,OAAO,IAAI,EAAE,MAAM,EAAE,CAAC;AAC5E,OAAO,iBAAiB,MAAM,kCAAkC,CAAC,OAAO,IAAI,EAAE,MAAM,EAAE,CAAC;AACvF,OAAO,iBAAiB,MAAM,6BAA6B,CAAC,OAAO,IAAI,EAAE,MAAM,EAAE,CAAC;AAClF,OAAO,wBAAwB,MAAM,oCAAoC,CAAC,OAAO,IAAI,EAAE,MAAM,EAAE,CAAC;AAChG,OAAO,qBAAqB,MAAM,iCAAiC,CAAC,OAAO,IAAI,EAAE,MAAM,EAAE,CAAC;AAE1F;;GAEG;AACH,MAAM,OAAO,cAAc;IAC1B;;OAEG;IACI,MAAM,CAAC,aAAa;QAC1B,MAAM,KAAK,GAAG;YACb;gBACC,IAAI,EAAE,UAAU,CAAC,qBAAqB;gBACtC,MAAM,EAAE,2BAA2B;aACnC;YACD;gBACC,IAAI,EAAE,UAAU,CAAC,YAAY;gBAC7B,MAAM,EAAE,kBAAkB;aAC1B;YACD;gBACC,IAAI,EAAE,UAAU,CAAC,QAAQ;gBACzB,MAAM,EAAE,cAAc;aACtB;YACD;gBACC,IAAI,EAAE,UAAU,CAAC,OAAO;gBACxB,MAAM,EAAE,aAAa;aACrB;YACD;gBACC,IAAI,EAAE,UAAU,CAAC,eAAe;gBAChC,MAAM,EAAE,qBAAqB;aAC7B;YACD;gBACC,IAAI,EAAE,UAAU,CAAC,WAAW;gBAC5B,MAAM,EAAE,iBAAiB;aACzB;YACD;gBACC,IAAI,EAAE,UAAU,CAAC,kBAAkB;gBACnC,MAAM,EAAE,wBAAwB;aAChC;YACD;gBACC,IAAI,EAAE,aAAa;gBACnB,MAAM,EAAE,iBAAiB;aACzB;SACD,CAAC;QAEF,cAAc,CAAC,aAAa,CAAC,aAAa,CAAC,SAAS,EAAE,aAAa,CAAC,aAAa,EAAE,KAAK,CAAC,CAAC;IAC3F,CAAC;CACD","sourcesContent":["// Copyright 2024 IOTA Stiftung.\n// SPDX-License-Identifier: Apache-2.0.\nimport { DataTypeHelper } from \"@twin.org/data-core\";\nimport { GaiaXContexts } from \"../models/gaiaXContexts.js\";\nimport { GaiaXTypes } from \"../models/gaiaXTypes.js\";\nimport AddressSchema from \"../schemas/Address.json\" with { type: \"json\" };\nimport DataExchangeComponentSchema from \"../schemas/DataExchangeComponent.json\" with { type: \"json\" };\nimport DataResourceSchema from \"../schemas/DataResource.json\" with { type: \"json\" };\nimport EndpointSchema from \"../schemas/Endpoint.json\" with { type: \"json\" };\nimport ContextTypeSchema from \"../schemas/GaiaXContextType.json\" with { type: \"json\" };\nimport LegalPersonSchema from \"../schemas/LegalPerson.json\" with { type: \"json\" };\nimport RegistrationNumberSchema from \"../schemas/RegistrationNumber.json\" with { type: \"json\" };\nimport ServiceOfferingSchema from \"../schemas/ServiceOffering.json\" with { type: \"json\" };\n\n/**\n * Handle all the data types for Gaia-X.\n */\nexport class GaiaXDataTypes {\n\t/**\n\t * Register all the data types.\n\t */\n\tpublic static registerTypes(): void {\n\t\tconst types = [\n\t\t\t{\n\t\t\t\ttype: GaiaXTypes.DataExchangeComponent,\n\t\t\t\tschema: DataExchangeComponentSchema\n\t\t\t},\n\t\t\t{\n\t\t\t\ttype: GaiaXTypes.DataResource,\n\t\t\t\tschema: DataResourceSchema\n\t\t\t},\n\t\t\t{\n\t\t\t\ttype: GaiaXTypes.Endpoint,\n\t\t\t\tschema: EndpointSchema\n\t\t\t},\n\t\t\t{\n\t\t\t\ttype: GaiaXTypes.Address,\n\t\t\t\tschema: AddressSchema\n\t\t\t},\n\t\t\t{\n\t\t\t\ttype: GaiaXTypes.ServiceOffering,\n\t\t\t\tschema: ServiceOfferingSchema\n\t\t\t},\n\t\t\t{\n\t\t\t\ttype: GaiaXTypes.LegalPerson,\n\t\t\t\tschema: LegalPersonSchema\n\t\t\t},\n\t\t\t{\n\t\t\t\ttype: GaiaXTypes.RegistrationNumber,\n\t\t\t\tschema: RegistrationNumberSchema\n\t\t\t},\n\t\t\t{\n\t\t\t\ttype: \"ContextType\",\n\t\t\t\tschema: ContextTypeSchema\n\t\t\t}\n\t\t];\n\n\t\tDataTypeHelper.registerTypes(GaiaXContexts.Namespace, GaiaXContexts.JsonLdContext, types);\n\t}\n}\n"]}
package/dist/es/index.js CHANGED
@@ -4,11 +4,11 @@ export * from "./dataTypes/gaiaXDataTypes.js";
4
4
  export * from "./models/gaiaXContexts.js";
5
5
  export * from "./models/gaiaXContextType.js";
6
6
  export * from "./models/gaiaXTypes.js";
7
- export * from "./models/IAddress.js";
8
- export * from "./models/IDataExchangeComponent.js";
9
- export * from "./models/IDataResource.js";
10
- export * from "./models/IEndpoint.js";
11
- export * from "./models/ILegalPerson.js";
12
- export * from "./models/IRegistrationNumber.js";
13
- export * from "./models/IServiceOffering.js";
7
+ export * from "./models/IGaiaXAddress.js";
8
+ export * from "./models/IGaiaXDataExchangeComponent.js";
9
+ export * from "./models/IGaiaXDataResource.js";
10
+ export * from "./models/IGaiaXEndpoint.js";
11
+ export * from "./models/IGaiaXLegalPerson.js";
12
+ export * from "./models/IGaiaXRegistrationNumber.js";
13
+ export * from "./models/IGaiaXServiceOffering.js";
14
14
  //# sourceMappingURL=index.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/index.ts"],"names":[],"mappings":"AAAA,gCAAgC;AAChC,uCAAuC;AACvC,cAAc,+BAA+B,CAAC;AAC9C,cAAc,2BAA2B,CAAC;AAC1C,cAAc,8BAA8B,CAAC;AAC7C,cAAc,wBAAwB,CAAC;AACvC,cAAc,sBAAsB,CAAC;AACrC,cAAc,oCAAoC,CAAC;AACnD,cAAc,2BAA2B,CAAC;AAC1C,cAAc,uBAAuB,CAAC;AACtC,cAAc,0BAA0B,CAAC;AACzC,cAAc,iCAAiC,CAAC;AAChD,cAAc,8BAA8B,CAAC","sourcesContent":["// Copyright 2024 IOTA Stiftung.\n// SPDX-License-Identifier: Apache-2.0.\nexport * from \"./dataTypes/gaiaXDataTypes.js\";\nexport * from \"./models/gaiaXContexts.js\";\nexport * from \"./models/gaiaXContextType.js\";\nexport * from \"./models/gaiaXTypes.js\";\nexport * from \"./models/IAddress.js\";\nexport * from \"./models/IDataExchangeComponent.js\";\nexport * from \"./models/IDataResource.js\";\nexport * from \"./models/IEndpoint.js\";\nexport * from \"./models/ILegalPerson.js\";\nexport * from \"./models/IRegistrationNumber.js\";\nexport * from \"./models/IServiceOffering.js\";\n"]}
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/index.ts"],"names":[],"mappings":"AAAA,gCAAgC;AAChC,uCAAuC;AACvC,cAAc,+BAA+B,CAAC;AAC9C,cAAc,2BAA2B,CAAC;AAC1C,cAAc,8BAA8B,CAAC;AAC7C,cAAc,wBAAwB,CAAC;AACvC,cAAc,2BAA2B,CAAC;AAC1C,cAAc,yCAAyC,CAAC;AACxD,cAAc,gCAAgC,CAAC;AAC/C,cAAc,4BAA4B,CAAC;AAC3C,cAAc,+BAA+B,CAAC;AAC9C,cAAc,sCAAsC,CAAC;AACrD,cAAc,mCAAmC,CAAC","sourcesContent":["// Copyright 2024 IOTA Stiftung.\n// SPDX-License-Identifier: Apache-2.0.\nexport * from \"./dataTypes/gaiaXDataTypes.js\";\nexport * from \"./models/gaiaXContexts.js\";\nexport * from \"./models/gaiaXContextType.js\";\nexport * from \"./models/gaiaXTypes.js\";\nexport * from \"./models/IGaiaXAddress.js\";\nexport * from \"./models/IGaiaXDataExchangeComponent.js\";\nexport * from \"./models/IGaiaXDataResource.js\";\nexport * from \"./models/IGaiaXEndpoint.js\";\nexport * from \"./models/IGaiaXLegalPerson.js\";\nexport * from \"./models/IGaiaXRegistrationNumber.js\";\nexport * from \"./models/IGaiaXServiceOffering.js\";\n"]}
@@ -0,0 +1,2 @@
1
+ export {};
2
+ //# sourceMappingURL=IGaiaXAddress.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"IGaiaXAddress.js","sourceRoot":"","sources":["../../../src/models/IGaiaXAddress.ts"],"names":[],"mappings":"","sourcesContent":["// Copyright 2024 IOTA Stiftung.\n// SPDX-License-Identifier: Apache-2.0.\nimport type { GaiaXTypes } from \"./gaiaXTypes.js\";\n\n/**\n * Address as defined by Gaia-X\n * https://docs.gaia-x.eu/ontology/development/classes/Address/\n */\nexport interface IGaiaXAddress {\n\t/**\n\t * JSON-LD @ type. In this case it is allowed to be omitted as it is usually a child node.\n\t */\n\ttype: typeof GaiaXTypes.Address | undefined;\n\n\t/**\n\t * Country code in ISO 3166-1 alpha2, alpha-3 or numeric format\n\t */\n\tcountryCode: string | number;\n}\n"]}
@@ -0,0 +1,2 @@
1
+ export {};
2
+ //# sourceMappingURL=IGaiaXDataExchangeComponent.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"IGaiaXDataExchangeComponent.js","sourceRoot":"","sources":["../../../src/models/IGaiaXDataExchangeComponent.ts"],"names":[],"mappings":"","sourcesContent":["// Copyright 2024 IOTA Stiftung.\n// SPDX-License-Identifier: Apache-2.0.\nimport type { GaiaXContextType } from \"./gaiaXContextType.js\";\nimport type { GaiaXTypes } from \"./gaiaXTypes.js\";\n\n/**\n * Data Exchange component as defined by Gaia-X\n * https://docs.gaia-x.eu/ontology/development/classes/DataExchangeComponent\n */\nexport interface IGaiaXDataExchangeComponent {\n\t/**\n\t * The LD Context\n\t */\n\t\"@context\": GaiaXContextType;\n\n\t/**\n\t * The type of JSON-LD node\n\t */\n\ttype:\n\t\t| typeof GaiaXTypes.DataExchangeComponent\n\t\t| [typeof GaiaXTypes.DataExchangeComponent, ...string[]];\n}\n"]}
@@ -0,0 +1,2 @@
1
+ export {};
2
+ //# sourceMappingURL=IGaiaXDataResource.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"IGaiaXDataResource.js","sourceRoot":"","sources":["../../../src/models/IGaiaXDataResource.ts"],"names":[],"mappings":"","sourcesContent":["// Copyright 2024 IOTA Stiftung.\n// SPDX-License-Identifier: Apache-2.0.\nimport type { ObjectOrArray } from \"@twin.org/core\";\nimport type { IJsonLdNodeObject } from \"@twin.org/data-json-ld\";\nimport type { IOdrlPolicy } from \"@twin.org/standards-w3c-odrl\";\nimport type { GaiaXContextType } from \"./gaiaXContextType.js\";\nimport type { GaiaXTypes } from \"./gaiaXTypes.js\";\nimport type { IGaiaXDataExchangeComponent } from \"./IGaiaXDataExchangeComponent.js\";\nimport type { IGaiaXEntity } from \"./IGaiaXEntity.js\";\nimport type { IGaiaXLegalPerson } from \"./IGaiaXLegalPerson.js\";\n\n/**\n * A Data Resource as defined by Gaia-X.\n * See also W3C DCAT Dataset https://www.w3.org/TR/vocab-dcat-3/.\n */\nexport interface IGaiaXDataResource extends IGaiaXEntity {\n\t/**\n\t * The LD Context\n\t */\n\t\"@context\": GaiaXContextType;\n\n\t/**\n\t * Subject Id\n\t */\n\tid: string;\n\n\t/**\n\t * Subject type\n\t */\n\ttype: typeof GaiaXTypes.DataResource;\n\n\t/**\n\t * The Resource Name\n\t */\n\tname: string;\n\n\t/**\n\t * Exposed through a Data Exchange Component.\n\t * 'string' in case just an Id pointing to the Data Exchange Component is supplied\n\t * the third case covers the idiom where a JSON-LD Node is supplied with id and type.\n\t */\n\texposedThrough:\n\t\t| IGaiaXDataExchangeComponent\n\t\t| string\n\t\t| (IJsonLdNodeObject & { id: string; type: typeof GaiaXTypes.DataExchangeComponent });\n\n\t/**\n\t * Who is the data producer\n\t */\n\tproducedBy: IGaiaXLegalPerson | string;\n\n\t/**\n\t * Pointer (URL) to the license\n\t */\n\tlicense: string;\n\n\t/**\n\t * Copyright owner\n\t */\n\tcopyrightOwnedBy: IGaiaXLegalPerson | string;\n\n\t/**\n\t * ODRL Policy\n\t */\n\tresourcePolicy: ObjectOrArray<IOdrlPolicy>;\n}\n"]}
@@ -0,0 +1,2 @@
1
+ export {};
2
+ //# sourceMappingURL=IGaiaXEndpoint.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"IGaiaXEndpoint.js","sourceRoot":"","sources":["../../../src/models/IGaiaXEndpoint.ts"],"names":[],"mappings":"","sourcesContent":["// Copyright 2024 IOTA Stiftung.\n// SPDX-License-Identifier: Apache-2.0.\nimport type { IJsonLdNodeObject } from \"@twin.org/data-json-ld\";\nimport type { GaiaXTypes } from \"./gaiaXTypes.js\";\n\n/**\n * Endpoint as defined by the Gaia-X ontology.\n * https://docs.gaia-x.eu/ontology/development/classes/Endpoint\n */\nexport interface IGaiaXEndpoint {\n\t/**\n\t * The type of JSON-LD node. In this case it is allowed to be omitted as it is usually a child node.\n\t */\n\ttype: typeof GaiaXTypes.Endpoint | undefined;\n\n\t/**\n\t * The endpoint URL\n\t */\n\tendpointURL: string;\n\n\t/**\n\t * The formal description\n\t */\n\tformalDescription?: string;\n\n\t/**\n\t * Standards conformity\n\t */\n\tstandardConformity?: IJsonLdNodeObject;\n}\n"]}
@@ -1 +1 @@
1
- {"version":3,"file":"IGaiaXEntity.js","sourceRoot":"","sources":["../../../src/models/IGaiaXEntity.ts"],"names":[],"mappings":"","sourcesContent":["// Copyright 2024 IOTA Stiftung.\n// SPDX-License-Identifier: Apache-2.0.\nimport type { IJsonLdNodeObject } from \"@twin.org/data-json-ld\";\nimport type { GaiaXContextType } from \"./gaiaXContextType.js\";\n\n/**\n * GaiaX Entity.\n * @see https://docs.gaia-x.eu/ontology/development/classes/GaiaXEntity/\n */\nexport interface IGaiaXEntity extends IJsonLdNodeObject {\n\t/**\n\t * The LD context.\n\t */\n\t\"@context\": GaiaXContextType;\n\n\t/**\n\t * The Id.\n\t */\n\tid: string;\n\n\t/**\n\t * Human readable Name.\n\t */\n\tname?: string;\n\n\t/**\n\t * Description of the Gaia-X entity.\n\t */\n\tdescription?: string;\n}\n"]}
1
+ {"version":3,"file":"IGaiaXEntity.js","sourceRoot":"","sources":["../../../src/models/IGaiaXEntity.ts"],"names":[],"mappings":"","sourcesContent":["// Copyright 2024 IOTA Stiftung.\n// SPDX-License-Identifier: Apache-2.0.\nimport type { GaiaXContextType } from \"./gaiaXContextType.js\";\n\n/**\n * GaiaX Entity.\n * @see https://docs.gaia-x.eu/ontology/development/classes/GaiaXEntity/\n */\nexport interface IGaiaXEntity {\n\t/**\n\t * The LD context.\n\t */\n\t\"@context\": GaiaXContextType;\n\n\t/**\n\t * The Id.\n\t */\n\tid: string;\n\n\t/**\n\t * Human readable Name.\n\t */\n\tname?: string;\n\n\t/**\n\t * Description of the Gaia-X entity.\n\t */\n\tdescription?: string;\n}\n"]}
@@ -0,0 +1,2 @@
1
+ export {};
2
+ //# sourceMappingURL=IGaiaXLegalPerson.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"IGaiaXLegalPerson.js","sourceRoot":"","sources":["../../../src/models/IGaiaXLegalPerson.ts"],"names":[],"mappings":"","sourcesContent":["// Copyright 2024 IOTA Stiftung.\n// SPDX-License-Identifier: Apache-2.0.\nimport type { IJsonLdNodeObject } from \"@twin.org/data-json-ld\";\nimport type { GaiaXTypes } from \"./gaiaXTypes.js\";\nimport type { IGaiaXAddress } from \"./IGaiaXAddress.js\";\nimport type { IGaiaXEntity } from \"./IGaiaXEntity.js\";\nimport type { IGaiaXRegistrationNumber } from \"./IGaiaXRegistrationNumber.js\";\n\n/**\n * A Legal Person as defined by Gaia-X.\n * @see https://docs.gaia-x.eu/ontology/development/classes/LegalPerson/.\n */\nexport interface IGaiaXLegalPerson extends IGaiaXEntity {\n\t/**\n\t * JSON-LD type.\n\t */\n\ttype: typeof GaiaXTypes.LegalPerson;\n\n\t/**\n\t * The legal registration number.\n\t * @see https://docs.gaia-x.eu/ontology/development/slots/registrationNumber/\n\t */\n\tregistrationNumber: IGaiaXRegistrationNumber;\n\n\t/**\n\t * The legal name.\n\t */\n\tlegalName: string;\n\n\t/**\n\t * Legal Address\n\t * @see https://docs.gaia-x.eu/ontology/development/slots/legalAddress/\n\t */\n\tlegalAddress: IGaiaXAddress;\n\n\t/**\n\t * Headquarters address.\n\t * @see https://docs.gaia-x.eu/ontology/development/slots/headquartersAddress/\n\t */\n\theadquartersAddress?: IGaiaXAddress;\n\n\t/**\n\t * Parent organization.\n\t * @see https://docs.gaia-x.eu/ontology/development/slots/parentOrganizationOf/\n\t */\n\tparentOrganizationOf?: (IJsonLdNodeObject & {\n\t\tid: string;\n\t\ttype: typeof GaiaXTypes.LegalPerson;\n\t})[];\n\n\t/**\n\t * Sub organization of.\n\t * @see https://docs.gaia-x.eu/ontology/development/slots/parentSubOrganizationOf\n\t */\n\tsubOrganizationOf?: (IJsonLdNodeObject & {\n\t\tid: string;\n\t\ttype: typeof GaiaXTypes.LegalPerson;\n\t})[];\n}\n"]}
@@ -0,0 +1,2 @@
1
+ export {};
2
+ //# sourceMappingURL=IGaiaXRegistrationNumber.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"IGaiaXRegistrationNumber.js","sourceRoot":"","sources":["../../../src/models/IGaiaXRegistrationNumber.ts"],"names":[],"mappings":"","sourcesContent":["// Copyright 2024 IOTA Stiftung.\n// SPDX-License-Identifier: Apache-2.0.\nimport type { GaiaXTypes } from \"./gaiaXTypes.js\";\n\n/**\n * Registration Number as defined by the Gaia-X ontology.\n * https://docs.gaia-x.eu/ontology/development/classes/RegistrationNumber/\n */\nexport interface IGaiaXRegistrationNumber {\n\t/**\n\t * JSON-LD Type.\n\t */\n\ttype:\n\t\t| typeof GaiaXTypes.RegistrationNumber\n\t\t| typeof GaiaXTypes.LocalRegistrationNumber\n\t\t| typeof GaiaXTypes.EORI\n\t\t| typeof GaiaXTypes.EUID\n\t\t| typeof GaiaXTypes.LeiCode\n\t\t| typeof GaiaXTypes.TaxID\n\t\t| typeof GaiaXTypes.VatID;\n\n\t/**\n\t * Local Registration.\n\t */\n\tlocal?: string;\n\n\t/**\n\t * Country code. See https://docs.gaia-x.eu/ontology/development/enums/CountryNameAlpha2/\n\t */\n\tcountryCode?: string;\n\n\t/**\n\t * Subdivision country code.\n\t * See https://docs.gaia-x.eu/ontology/development/enums/RegionCode/\n\t */\n\tsubdivisionCountryCode?: string;\n\n\t/**\n\t * The VAT identification number.\n\t */\n\tvatID?: string;\n\n\t/**\n\t * Unique LEI number as defined by GLEIF.\n\t */\n\tleiCode?: string;\n\n\t/**\n\t * The Economic Operators Registration and Identification number (EORI).\n\t */\n\teori?: string;\n\n\t/**\n\t * The country where the EORI is registered written in plain english\n\t */\n\tcountry?: string;\n\n\t/**\n\t * The European Unique Identifier (EUID) for business located in the European Ec.\n\t */\n\teuid?: string;\n\n\t/**\n\t * The company tax ID.\n\t */\n\ttaxId?: string;\n}\n"]}
@@ -0,0 +1,2 @@
1
+ export {};
2
+ //# sourceMappingURL=IGaiaXServiceOffering.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"IGaiaXServiceOffering.js","sourceRoot":"","sources":["../../../src/models/IGaiaXServiceOffering.ts"],"names":[],"mappings":"","sourcesContent":["// Copyright 2024 IOTA Stiftung.\n// SPDX-License-Identifier: Apache-2.0.\nimport type { ObjectOrArray } from \"@twin.org/core\";\nimport type { IJsonLdNodeObject } from \"@twin.org/data-json-ld\";\nimport type { IOdrlPolicy } from \"@twin.org/standards-w3c-odrl\";\nimport type { GaiaXTypes } from \"./gaiaXTypes.js\";\nimport type { IGaiaXDataResource } from \"./IGaiaXDataResource.js\";\nimport type { IGaiaXEndpoint } from \"./IGaiaXEndpoint.js\";\nimport type { IGaiaXEntity } from \"./IGaiaXEntity.js\";\nimport type { IGaiaXLegalPerson } from \"./IGaiaXLegalPerson.js\";\n\n/**\n * A Service offering\n */\nexport interface IGaiaXServiceOffering extends IGaiaXEntity {\n\t/**\n\t * Type\n\t */\n\ttype: typeof GaiaXTypes.ServiceOffering;\n\n\t/**\n\t * Name of the Service Offering.\n\t */\n\tname: string;\n\n\t/**\n\t * Participant that provides the offering\n\t */\n\tprovidedBy:\n\t\t| string\n\t\t| IGaiaXLegalPerson\n\t\t| (IJsonLdNodeObject & { id: string; type: typeof GaiaXTypes.LegalPerson });\n\n\t/**\n\t * ODRL policy associated to the service offering\n\t */\n\tservicePolicy: ObjectOrArray<IOdrlPolicy>;\n\n\t/**\n\t * Resources aggregated\n\t * It is supported different representations, inline,\n\t * by reference both providing the URI or a partial JSON-LD Node object\n\t */\n\taggregationOfResources?:\n\t\t| string[]\n\t\t| IGaiaXDataResource[]\n\t\t| (IJsonLdNodeObject & { id: string; type: typeof GaiaXTypes.DataResource });\n\n\t/**\n\t * The endpoint\n\t */\n\tendpoint?: IGaiaXEndpoint;\n}\n"]}
@@ -1 +1 @@
1
- {"version":3,"file":"gaiaXContextType.js","sourceRoot":"","sources":["../../../src/models/gaiaXContextType.ts"],"names":[],"mappings":"","sourcesContent":["// Copyright 2024 IOTA Stiftung.\n// SPDX-License-Identifier: Apache-2.0.\nimport type { IJsonLdContextDefinitionElement } from \"@twin.org/data-json-ld\";\nimport type { GaiaXContexts } from \"./gaiaXContexts.js\";\n\n/**\n * The Gaia-X JSON-LD context type.\n */\nexport type GaiaXContextType =\n\t| typeof GaiaXContexts.ContextRoot\n\t| [\n\t\t\t...IJsonLdContextDefinitionElement[],\n\t\t\ttypeof GaiaXContexts.ContextRoot,\n\t\t\tIJsonLdContextDefinitionElement\n\t ]\n\t| [\n\t\t\tIJsonLdContextDefinitionElement,\n\t\t\ttypeof GaiaXContexts.ContextRoot,\n\t\t\t...IJsonLdContextDefinitionElement[]\n\t ];\n"]}
1
+ {"version":3,"file":"gaiaXContextType.js","sourceRoot":"","sources":["../../../src/models/gaiaXContextType.ts"],"names":[],"mappings":"","sourcesContent":["// Copyright 2024 IOTA Stiftung.\n// SPDX-License-Identifier: Apache-2.0.\nimport type { SingleOccurrenceArray } from \"@twin.org/core\";\nimport type { IJsonLdContextDefinitionElement } from \"@twin.org/data-json-ld\";\nimport type { GaiaXContexts } from \"./gaiaXContexts.js\";\n\n/**\n * The Gaia-X JSON-LD context type.\n */\nexport type GaiaXContextType =\n\t| typeof GaiaXContexts.Context\n\t| SingleOccurrenceArray<IJsonLdContextDefinitionElement, typeof GaiaXContexts.Context>;\n"]}
@@ -1,13 +1,23 @@
1
1
  // Copyright 2024 IOTA Stiftung.
2
2
  // SPDX-License-Identifier: Apache-2.0.
3
3
  /**
4
- * The LD Contexts concerning Gaia-X.
4
+ * The Contexts concerning Gaia-X.
5
5
  */
6
6
  // eslint-disable-next-line @typescript-eslint/naming-convention
7
7
  export const GaiaXContexts = {
8
8
  /**
9
- * The Gaia-X LD Context
9
+ * The canonical RDF namespace URI.
10
10
  */
11
- ContextRoot: "https://schema.twindev.org/gaia-x-loire/"
11
+ Namespace: "https://schema.twindev.org/gaia-x-loire/",
12
+ /**
13
+ * The value to use in @context.
14
+ * Note: Context matches Namespace (both include trailing slash) as per Gaia-X specification.
15
+ * The Gaia-X JSON-LD context URL format includes a trailing slash.
16
+ */
17
+ Context: "https://schema.twindev.org/gaia-x-loire/",
18
+ /**
19
+ * The JSON-LD Context URL.
20
+ */
21
+ JsonLdContext: "https://schema.twindev.org/gaia-x-loire/types.jsonld"
12
22
  };
13
23
  //# sourceMappingURL=gaiaXContexts.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"gaiaXContexts.js","sourceRoot":"","sources":["../../../src/models/gaiaXContexts.ts"],"names":[],"mappings":"AAAA,gCAAgC;AAChC,uCAAuC;AAEvC;;GAEG;AACH,gEAAgE;AAChE,MAAM,CAAC,MAAM,aAAa,GAAG;IAC5B;;OAEG;IACH,WAAW,EAAE,0CAA0C;CAC9C,CAAC","sourcesContent":["// Copyright 2024 IOTA Stiftung.\n// SPDX-License-Identifier: Apache-2.0.\n\n/**\n * The LD Contexts concerning Gaia-X.\n */\n// eslint-disable-next-line @typescript-eslint/naming-convention\nexport const GaiaXContexts = {\n\t/**\n\t * The Gaia-X LD Context\n\t */\n\tContextRoot: \"https://schema.twindev.org/gaia-x-loire/\"\n} as const;\n\n/**\n * The LD Contexts concerning Gaia-X.\n */\nexport type GaiaXContexts = (typeof GaiaXContexts)[keyof typeof GaiaXContexts];\n"]}
1
+ {"version":3,"file":"gaiaXContexts.js","sourceRoot":"","sources":["../../../src/models/gaiaXContexts.ts"],"names":[],"mappings":"AAAA,gCAAgC;AAChC,uCAAuC;AAEvC;;GAEG;AACH,gEAAgE;AAChE,MAAM,CAAC,MAAM,aAAa,GAAG;IAC5B;;OAEG;IACH,SAAS,EAAE,0CAA0C;IAErD;;;;OAIG;IACH,OAAO,EAAE,0CAA0C;IAEnD;;OAEG;IACH,aAAa,EAAE,sDAAsD;CAC5D,CAAC","sourcesContent":["// Copyright 2024 IOTA Stiftung.\n// SPDX-License-Identifier: Apache-2.0.\n\n/**\n * The Contexts concerning Gaia-X.\n */\n// eslint-disable-next-line @typescript-eslint/naming-convention\nexport const GaiaXContexts = {\n\t/**\n\t * The canonical RDF namespace URI.\n\t */\n\tNamespace: \"https://schema.twindev.org/gaia-x-loire/\",\n\n\t/**\n\t * The value to use in @context.\n\t * Note: Context matches Namespace (both include trailing slash) as per Gaia-X specification.\n\t * The Gaia-X JSON-LD context URL format includes a trailing slash.\n\t */\n\tContext: \"https://schema.twindev.org/gaia-x-loire/\",\n\n\t/**\n\t * The JSON-LD Context URL.\n\t */\n\tJsonLdContext: \"https://schema.twindev.org/gaia-x-loire/types.jsonld\"\n} as const;\n\n/**\n * The Contexts concerning Gaia-X.\n */\nexport type GaiaXContexts = (typeof GaiaXContexts)[keyof typeof GaiaXContexts];\n"]}
@@ -0,0 +1,30 @@
1
+ {
2
+ "$schema": "https://json-schema.org/draft/2020-12/schema",
3
+ "$id": "https://schema.twindev.org/gaia-x-loire/GaiaXContextType",
4
+ "title": "GaiaXContextType",
5
+ "description": "The Gaia-X JSON-LD context type.",
6
+ "anyOf": [
7
+ {
8
+ "const": "https://schema.twindev.org/gaia-x-loire/"
9
+ },
10
+ {
11
+ "type": "array",
12
+ "items": {
13
+ "anyOf": [
14
+ {
15
+ "$ref": "https://schema.twindev.org/json-ld/JsonLdContextDefinitionElement"
16
+ },
17
+ {
18
+ "const": "https://schema.twindev.org/gaia-x-loire/"
19
+ }
20
+ ]
21
+ },
22
+ "contains": {
23
+ "const": "https://schema.twindev.org/gaia-x-loire/"
24
+ },
25
+ "minContains": 1,
26
+ "maxContains": 1,
27
+ "minItems": 1
28
+ }
29
+ ]
30
+ }
@@ -2,10 +2,10 @@ export * from "./dataTypes/gaiaXDataTypes.js";
2
2
  export * from "./models/gaiaXContexts.js";
3
3
  export * from "./models/gaiaXContextType.js";
4
4
  export * from "./models/gaiaXTypes.js";
5
- export * from "./models/IAddress.js";
6
- export * from "./models/IDataExchangeComponent.js";
7
- export * from "./models/IDataResource.js";
8
- export * from "./models/IEndpoint.js";
9
- export * from "./models/ILegalPerson.js";
10
- export * from "./models/IRegistrationNumber.js";
11
- export * from "./models/IServiceOffering.js";
5
+ export * from "./models/IGaiaXAddress.js";
6
+ export * from "./models/IGaiaXDataExchangeComponent.js";
7
+ export * from "./models/IGaiaXDataResource.js";
8
+ export * from "./models/IGaiaXEndpoint.js";
9
+ export * from "./models/IGaiaXLegalPerson.js";
10
+ export * from "./models/IGaiaXRegistrationNumber.js";
11
+ export * from "./models/IGaiaXServiceOffering.js";
@@ -1,10 +1,9 @@
1
- import type { IJsonLdNodeObject } from "@twin.org/data-json-ld";
2
1
  import type { GaiaXTypes } from "./gaiaXTypes.js";
3
2
  /**
4
3
  * Address as defined by Gaia-X
5
4
  * https://docs.gaia-x.eu/ontology/development/classes/Address/
6
5
  */
7
- export interface IAddress extends IJsonLdNodeObject {
6
+ export interface IGaiaXAddress {
8
7
  /**
9
8
  * JSON-LD @ type. In this case it is allowed to be omitted as it is usually a child node.
10
9
  */
@@ -1,11 +1,10 @@
1
- import type { IJsonLdNodeObject } from "@twin.org/data-json-ld";
2
1
  import type { GaiaXContextType } from "./gaiaXContextType.js";
3
2
  import type { GaiaXTypes } from "./gaiaXTypes.js";
4
3
  /**
5
4
  * Data Exchange component as defined by Gaia-X
6
5
  * https://docs.gaia-x.eu/ontology/development/classes/DataExchangeComponent
7
6
  */
8
- export interface IDataExchangeComponent extends IJsonLdNodeObject {
7
+ export interface IGaiaXDataExchangeComponent {
9
8
  /**
10
9
  * The LD Context
11
10
  */
@@ -3,14 +3,14 @@ import type { IJsonLdNodeObject } from "@twin.org/data-json-ld";
3
3
  import type { IOdrlPolicy } from "@twin.org/standards-w3c-odrl";
4
4
  import type { GaiaXContextType } from "./gaiaXContextType.js";
5
5
  import type { GaiaXTypes } from "./gaiaXTypes.js";
6
- import type { IDataExchangeComponent } from "./IDataExchangeComponent.js";
6
+ import type { IGaiaXDataExchangeComponent } from "./IGaiaXDataExchangeComponent.js";
7
7
  import type { IGaiaXEntity } from "./IGaiaXEntity.js";
8
- import type { ILegalPerson } from "./ILegalPerson.js";
8
+ import type { IGaiaXLegalPerson } from "./IGaiaXLegalPerson.js";
9
9
  /**
10
10
  * A Data Resource as defined by Gaia-X.
11
11
  * See also W3C DCAT Dataset https://www.w3.org/TR/vocab-dcat-3/.
12
12
  */
13
- export interface IDataResource extends IGaiaXEntity {
13
+ export interface IGaiaXDataResource extends IGaiaXEntity {
14
14
  /**
15
15
  * The LD Context
16
16
  */
@@ -32,14 +32,14 @@ export interface IDataResource extends IGaiaXEntity {
32
32
  * 'string' in case just an Id pointing to the Data Exchange Component is supplied
33
33
  * the third case covers the idiom where a JSON-LD Node is supplied with id and type.
34
34
  */
35
- exposedThrough: IDataExchangeComponent | string | (IJsonLdNodeObject & {
35
+ exposedThrough: IGaiaXDataExchangeComponent | string | (IJsonLdNodeObject & {
36
36
  id: string;
37
37
  type: typeof GaiaXTypes.DataExchangeComponent;
38
38
  });
39
39
  /**
40
40
  * Who is the data producer
41
41
  */
42
- producedBy: ILegalPerson | string;
42
+ producedBy: IGaiaXLegalPerson | string;
43
43
  /**
44
44
  * Pointer (URL) to the license
45
45
  */
@@ -47,7 +47,7 @@ export interface IDataResource extends IGaiaXEntity {
47
47
  /**
48
48
  * Copyright owner
49
49
  */
50
- copyrightOwnedBy: ILegalPerson | string;
50
+ copyrightOwnedBy: IGaiaXLegalPerson | string;
51
51
  /**
52
52
  * ODRL Policy
53
53
  */
@@ -4,7 +4,7 @@ import type { GaiaXTypes } from "./gaiaXTypes.js";
4
4
  * Endpoint as defined by the Gaia-X ontology.
5
5
  * https://docs.gaia-x.eu/ontology/development/classes/Endpoint
6
6
  */
7
- export interface IEndpoint extends IJsonLdNodeObject {
7
+ export interface IGaiaXEndpoint {
8
8
  /**
9
9
  * The type of JSON-LD node. In this case it is allowed to be omitted as it is usually a child node.
10
10
  */
@@ -1,10 +1,9 @@
1
- import type { IJsonLdNodeObject } from "@twin.org/data-json-ld";
2
1
  import type { GaiaXContextType } from "./gaiaXContextType.js";
3
2
  /**
4
3
  * GaiaX Entity.
5
4
  * @see https://docs.gaia-x.eu/ontology/development/classes/GaiaXEntity/
6
5
  */
7
- export interface IGaiaXEntity extends IJsonLdNodeObject {
6
+ export interface IGaiaXEntity {
8
7
  /**
9
8
  * The LD context.
10
9
  */
@@ -1,13 +1,13 @@
1
1
  import type { IJsonLdNodeObject } from "@twin.org/data-json-ld";
2
2
  import type { GaiaXTypes } from "./gaiaXTypes.js";
3
- import type { IAddress } from "./IAddress.js";
3
+ import type { IGaiaXAddress } from "./IGaiaXAddress.js";
4
4
  import type { IGaiaXEntity } from "./IGaiaXEntity.js";
5
- import type { IRegistrationNumber } from "./IRegistrationNumber.js";
5
+ import type { IGaiaXRegistrationNumber } from "./IGaiaXRegistrationNumber.js";
6
6
  /**
7
7
  * A Legal Person as defined by Gaia-X.
8
8
  * @see https://docs.gaia-x.eu/ontology/development/classes/LegalPerson/.
9
9
  */
10
- export interface ILegalPerson extends IGaiaXEntity {
10
+ export interface IGaiaXLegalPerson extends IGaiaXEntity {
11
11
  /**
12
12
  * JSON-LD type.
13
13
  */
@@ -16,7 +16,7 @@ export interface ILegalPerson extends IGaiaXEntity {
16
16
  * The legal registration number.
17
17
  * @see https://docs.gaia-x.eu/ontology/development/slots/registrationNumber/
18
18
  */
19
- registrationNumber: IRegistrationNumber;
19
+ registrationNumber: IGaiaXRegistrationNumber;
20
20
  /**
21
21
  * The legal name.
22
22
  */
@@ -25,12 +25,12 @@ export interface ILegalPerson extends IGaiaXEntity {
25
25
  * Legal Address
26
26
  * @see https://docs.gaia-x.eu/ontology/development/slots/legalAddress/
27
27
  */
28
- legalAddress: IAddress;
28
+ legalAddress: IGaiaXAddress;
29
29
  /**
30
30
  * Headquarters address.
31
31
  * @see https://docs.gaia-x.eu/ontology/development/slots/headquartersAddress/
32
32
  */
33
- headquartersAddress?: IAddress;
33
+ headquartersAddress?: IGaiaXAddress;
34
34
  /**
35
35
  * Parent organization.
36
36
  * @see https://docs.gaia-x.eu/ontology/development/slots/parentOrganizationOf/
@@ -1,10 +1,9 @@
1
- import type { IJsonLdNodeObject } from "@twin.org/data-json-ld";
2
1
  import type { GaiaXTypes } from "./gaiaXTypes.js";
3
2
  /**
4
3
  * Registration Number as defined by the Gaia-X ontology.
5
4
  * https://docs.gaia-x.eu/ontology/development/classes/RegistrationNumber/
6
5
  */
7
- export interface IRegistrationNumber extends IJsonLdNodeObject {
6
+ export interface IGaiaXRegistrationNumber {
8
7
  /**
9
8
  * JSON-LD Type.
10
9
  */
@@ -2,14 +2,14 @@ import type { ObjectOrArray } from "@twin.org/core";
2
2
  import type { IJsonLdNodeObject } from "@twin.org/data-json-ld";
3
3
  import type { IOdrlPolicy } from "@twin.org/standards-w3c-odrl";
4
4
  import type { GaiaXTypes } from "./gaiaXTypes.js";
5
- import type { IDataResource } from "./IDataResource.js";
6
- import type { IEndpoint } from "./IEndpoint.js";
5
+ import type { IGaiaXDataResource } from "./IGaiaXDataResource.js";
6
+ import type { IGaiaXEndpoint } from "./IGaiaXEndpoint.js";
7
7
  import type { IGaiaXEntity } from "./IGaiaXEntity.js";
8
- import type { ILegalPerson } from "./ILegalPerson.js";
8
+ import type { IGaiaXLegalPerson } from "./IGaiaXLegalPerson.js";
9
9
  /**
10
10
  * A Service offering
11
11
  */
12
- export interface IServiceOffering extends IGaiaXEntity {
12
+ export interface IGaiaXServiceOffering extends IGaiaXEntity {
13
13
  /**
14
14
  * Type
15
15
  */
@@ -21,7 +21,7 @@ export interface IServiceOffering extends IGaiaXEntity {
21
21
  /**
22
22
  * Participant that provides the offering
23
23
  */
24
- providedBy: string | ILegalPerson | (IJsonLdNodeObject & {
24
+ providedBy: string | IGaiaXLegalPerson | (IJsonLdNodeObject & {
25
25
  id: string;
26
26
  type: typeof GaiaXTypes.LegalPerson;
27
27
  });
@@ -34,12 +34,12 @@ export interface IServiceOffering extends IGaiaXEntity {
34
34
  * It is supported different representations, inline,
35
35
  * by reference both providing the URI or a partial JSON-LD Node object
36
36
  */
37
- aggregationOfResources?: string[] | IDataResource[] | (IJsonLdNodeObject & {
37
+ aggregationOfResources?: string[] | IGaiaXDataResource[] | (IJsonLdNodeObject & {
38
38
  id: string;
39
39
  type: typeof GaiaXTypes.DataResource;
40
40
  });
41
41
  /**
42
42
  * The endpoint
43
43
  */
44
- endpoint?: IEndpoint;
44
+ endpoint?: IGaiaXEndpoint;
45
45
  }
@@ -1,14 +1,7 @@
1
+ import type { SingleOccurrenceArray } from "@twin.org/core";
1
2
  import type { IJsonLdContextDefinitionElement } from "@twin.org/data-json-ld";
2
3
  import type { GaiaXContexts } from "./gaiaXContexts.js";
3
4
  /**
4
5
  * The Gaia-X JSON-LD context type.
5
6
  */
6
- export type GaiaXContextType = typeof GaiaXContexts.ContextRoot | [
7
- ...IJsonLdContextDefinitionElement[],
8
- typeof GaiaXContexts.ContextRoot,
9
- IJsonLdContextDefinitionElement
10
- ] | [
11
- IJsonLdContextDefinitionElement,
12
- typeof GaiaXContexts.ContextRoot,
13
- ...IJsonLdContextDefinitionElement[]
14
- ];
7
+ export type GaiaXContextType = typeof GaiaXContexts.Context | SingleOccurrenceArray<IJsonLdContextDefinitionElement, typeof GaiaXContexts.Context>;
@@ -1,13 +1,23 @@
1
1
  /**
2
- * The LD Contexts concerning Gaia-X.
2
+ * The Contexts concerning Gaia-X.
3
3
  */
4
4
  export declare const GaiaXContexts: {
5
5
  /**
6
- * The Gaia-X LD Context
6
+ * The canonical RDF namespace URI.
7
7
  */
8
- readonly ContextRoot: "https://schema.twindev.org/gaia-x-loire/";
8
+ readonly Namespace: "https://schema.twindev.org/gaia-x-loire/";
9
+ /**
10
+ * The value to use in @context.
11
+ * Note: Context matches Namespace (both include trailing slash) as per Gaia-X specification.
12
+ * The Gaia-X JSON-LD context URL format includes a trailing slash.
13
+ */
14
+ readonly Context: "https://schema.twindev.org/gaia-x-loire/";
15
+ /**
16
+ * The JSON-LD Context URL.
17
+ */
18
+ readonly JsonLdContext: "https://schema.twindev.org/gaia-x-loire/types.jsonld";
9
19
  };
10
20
  /**
11
- * The LD Contexts concerning Gaia-X.
21
+ * The Contexts concerning Gaia-X.
12
22
  */
13
23
  export type GaiaXContexts = (typeof GaiaXContexts)[keyof typeof GaiaXContexts];