@twin.org/standards-gaia-x 0.0.1-next.48 → 0.0.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -1,5 +1,7 @@
1
1
  'use strict';
2
2
 
3
+ var dataCore = require('@twin.org/data-core');
4
+
3
5
  // Copyright 2024 IOTA Stiftung.
4
6
  // SPDX-License-Identifier: Apache-2.0.
5
7
  /**
@@ -10,7 +12,7 @@ const GaiaXContexts = {
10
12
  /**
11
13
  * The Gaia-X LD Context
12
14
  */
13
- GaiaXLdContext: "https://w3id.org/gaia-x/development"
15
+ ContextRoot: "https://w3id.org/gaia-x/development"
14
16
  };
15
17
 
16
18
  // Copyright 2024 IOTA Stiftung.
@@ -74,5 +76,1537 @@ const GaiaXTypes = {
74
76
  TaxID: "TaxID"
75
77
  };
76
78
 
79
+ var $schema$6 = "https://json-schema.org/draft/2020-12/schema";
80
+ var $id$6 = "https://schema.twindev.org/gaia-x/Address";
81
+ var description$6 = "Address as defined by Gaia-X https://docs.gaia-x.eu/ontology/development/classes/Address/";
82
+ var type$6 = "object";
83
+ var properties$6 = {
84
+ "@context": {
85
+ $ref: "https://schema.twindev.org/json-ld/JsonLdContextDefinitionRoot"
86
+ },
87
+ "@id": {
88
+ anyOf: [
89
+ {
90
+ type: "string"
91
+ },
92
+ {
93
+ type: "array",
94
+ items: false,
95
+ prefixItems: [
96
+ {
97
+ type: "string"
98
+ }
99
+ ]
100
+ }
101
+ ]
102
+ },
103
+ "@included": {
104
+ $ref: "https://schema.twindev.org/json-ld/JsonLdIncludedBlock"
105
+ },
106
+ "@graph": {
107
+ anyOf: [
108
+ {
109
+ $ref: "https://schema.twindev.org/json-ld/JsonLdNodeObject"
110
+ },
111
+ {
112
+ type: "array",
113
+ items: false,
114
+ prefixItems: [
115
+ {
116
+ $ref: "https://schema.twindev.org/json-ld/JsonLdNodeObject"
117
+ }
118
+ ]
119
+ }
120
+ ]
121
+ },
122
+ "@nest": {
123
+ anyOf: [
124
+ {
125
+ $ref: "https://schema.twindev.org/json-ld/JsonLdJsonObject"
126
+ },
127
+ {
128
+ type: "array",
129
+ items: false,
130
+ prefixItems: [
131
+ {
132
+ $ref: "https://schema.twindev.org/json-ld/JsonLdJsonObject"
133
+ }
134
+ ]
135
+ }
136
+ ]
137
+ },
138
+ "@type": {
139
+ anyOf: [
140
+ {
141
+ type: "string"
142
+ },
143
+ {
144
+ type: "array",
145
+ items: false,
146
+ prefixItems: [
147
+ {
148
+ type: "string"
149
+ }
150
+ ]
151
+ }
152
+ ]
153
+ },
154
+ "@reverse": {
155
+ type: "object",
156
+ additionalProperties: {
157
+ type: "string"
158
+ }
159
+ },
160
+ "@index": {
161
+ type: "string"
162
+ },
163
+ type: {
164
+ type: "string",
165
+ "const": "Address",
166
+ description: "JSON-LD @ type. In this case it is allowed to be omitted as it is usually a child node."
167
+ },
168
+ countryCode: {
169
+ type: [
170
+ "string",
171
+ "number"
172
+ ],
173
+ description: "Country code in ISO 3166-1 alpha2, alpha-3 or numeric format"
174
+ }
175
+ };
176
+ var required$6 = [
177
+ "countryCode"
178
+ ];
179
+ var additionalProperties$6 = {
180
+ anyOf: [
181
+ {
182
+ $ref: "https://schema.twindev.org/json-ld/JsonLdNodePrimitive"
183
+ },
184
+ {
185
+ $ref: "https://schema.twindev.org/json-ld/JsonLdLanguageMap"
186
+ },
187
+ {
188
+ $ref: "https://schema.twindev.org/json-ld/JsonLdIndexMap"
189
+ },
190
+ {
191
+ $ref: "https://schema.twindev.org/json-ld/JsonLdIncludedBlock"
192
+ },
193
+ {
194
+ $ref: "https://schema.twindev.org/json-ld/JsonLdIdMap"
195
+ },
196
+ {
197
+ $ref: "https://schema.twindev.org/json-ld/JsonLdTypeMap"
198
+ },
199
+ {
200
+ type: "array"
201
+ }
202
+ ]
203
+ };
204
+ var AddressSchema = {
205
+ $schema: $schema$6,
206
+ $id: $id$6,
207
+ description: description$6,
208
+ type: type$6,
209
+ properties: properties$6,
210
+ required: required$6,
211
+ additionalProperties: additionalProperties$6
212
+ };
213
+
214
+ var $schema$5 = "https://json-schema.org/draft/2020-12/schema";
215
+ var $id$5 = "https://schema.twindev.org/gaia-x/DataExchangeComponent";
216
+ var description$5 = "Data Exchange component as defined by Gaia-X https://docs.gaia-x.eu/ontology/development/classes/DataExchangeComponent";
217
+ var type$5 = "object";
218
+ var properties$5 = {
219
+ "@context": {
220
+ $ref: "https://schema.twindev.org/gaia-x/GaiaXContextType",
221
+ description: "The LD Context"
222
+ },
223
+ "@id": {
224
+ anyOf: [
225
+ {
226
+ type: "string"
227
+ },
228
+ {
229
+ type: "array",
230
+ items: false,
231
+ prefixItems: [
232
+ {
233
+ type: "string"
234
+ }
235
+ ]
236
+ }
237
+ ]
238
+ },
239
+ "@included": {
240
+ $ref: "https://schema.twindev.org/json-ld/JsonLdIncludedBlock"
241
+ },
242
+ "@graph": {
243
+ anyOf: [
244
+ {
245
+ $ref: "https://schema.twindev.org/json-ld/JsonLdNodeObject"
246
+ },
247
+ {
248
+ type: "array",
249
+ items: false,
250
+ prefixItems: [
251
+ {
252
+ $ref: "https://schema.twindev.org/json-ld/JsonLdNodeObject"
253
+ }
254
+ ]
255
+ }
256
+ ]
257
+ },
258
+ "@nest": {
259
+ anyOf: [
260
+ {
261
+ $ref: "https://schema.twindev.org/json-ld/JsonLdJsonObject"
262
+ },
263
+ {
264
+ type: "array",
265
+ items: false,
266
+ prefixItems: [
267
+ {
268
+ $ref: "https://schema.twindev.org/json-ld/JsonLdJsonObject"
269
+ }
270
+ ]
271
+ }
272
+ ]
273
+ },
274
+ "@type": {
275
+ anyOf: [
276
+ {
277
+ type: "string"
278
+ },
279
+ {
280
+ type: "array",
281
+ items: false,
282
+ prefixItems: [
283
+ {
284
+ type: "string"
285
+ }
286
+ ]
287
+ }
288
+ ]
289
+ },
290
+ "@reverse": {
291
+ type: "object",
292
+ additionalProperties: {
293
+ type: "string"
294
+ }
295
+ },
296
+ "@index": {
297
+ type: "string"
298
+ },
299
+ type: {
300
+ anyOf: [
301
+ {
302
+ type: "string",
303
+ "const": "DataExchangeComponent"
304
+ },
305
+ {
306
+ type: "array",
307
+ minItems: 1,
308
+ items: {
309
+ type: "string"
310
+ },
311
+ prefixItems: [
312
+ {
313
+ type: "string",
314
+ "const": "DataExchangeComponent"
315
+ }
316
+ ]
317
+ }
318
+ ],
319
+ description: "The type of JSON-LD node"
320
+ }
321
+ };
322
+ var required$5 = [
323
+ "@context",
324
+ "type"
325
+ ];
326
+ var additionalProperties$5 = {
327
+ anyOf: [
328
+ {
329
+ $ref: "https://schema.twindev.org/json-ld/JsonLdNodePrimitive"
330
+ },
331
+ {
332
+ $ref: "https://schema.twindev.org/json-ld/JsonLdLanguageMap"
333
+ },
334
+ {
335
+ $ref: "https://schema.twindev.org/json-ld/JsonLdIndexMap"
336
+ },
337
+ {
338
+ $ref: "https://schema.twindev.org/json-ld/JsonLdIncludedBlock"
339
+ },
340
+ {
341
+ $ref: "https://schema.twindev.org/json-ld/JsonLdIdMap"
342
+ },
343
+ {
344
+ $ref: "https://schema.twindev.org/json-ld/JsonLdTypeMap"
345
+ },
346
+ {
347
+ type: "array"
348
+ }
349
+ ]
350
+ };
351
+ var DataExchangeComponentSchema = {
352
+ $schema: $schema$5,
353
+ $id: $id$5,
354
+ description: description$5,
355
+ type: type$5,
356
+ properties: properties$5,
357
+ required: required$5,
358
+ additionalProperties: additionalProperties$5
359
+ };
360
+
361
+ var $schema$4 = "https://json-schema.org/draft/2020-12/schema";
362
+ var $id$4 = "https://schema.twindev.org/gaia-x/DataResource";
363
+ var description$4 = "A Data Resource as defined by Gaia-X. See also W3C DCAT Dataset https://www.w3.org/TR/vocab-dcat-3/.";
364
+ var type$4 = "object";
365
+ var properties$4 = {
366
+ "@context": {
367
+ $ref: "https://schema.twindev.org/gaia-x/GaiaXContextType",
368
+ description: "The LD Context"
369
+ },
370
+ "@id": {
371
+ anyOf: [
372
+ {
373
+ type: "string"
374
+ },
375
+ {
376
+ type: "array",
377
+ items: false,
378
+ prefixItems: [
379
+ {
380
+ type: "string"
381
+ }
382
+ ]
383
+ }
384
+ ]
385
+ },
386
+ "@included": {
387
+ $ref: "https://schema.twindev.org/json-ld/JsonLdIncludedBlock"
388
+ },
389
+ "@graph": {
390
+ anyOf: [
391
+ {
392
+ $ref: "https://schema.twindev.org/json-ld/JsonLdNodeObject"
393
+ },
394
+ {
395
+ type: "array",
396
+ items: false,
397
+ prefixItems: [
398
+ {
399
+ $ref: "https://schema.twindev.org/json-ld/JsonLdNodeObject"
400
+ }
401
+ ]
402
+ }
403
+ ]
404
+ },
405
+ "@nest": {
406
+ anyOf: [
407
+ {
408
+ $ref: "https://schema.twindev.org/json-ld/JsonLdJsonObject"
409
+ },
410
+ {
411
+ type: "array",
412
+ items: false,
413
+ prefixItems: [
414
+ {
415
+ $ref: "https://schema.twindev.org/json-ld/JsonLdJsonObject"
416
+ }
417
+ ]
418
+ }
419
+ ]
420
+ },
421
+ "@type": {
422
+ anyOf: [
423
+ {
424
+ type: "string"
425
+ },
426
+ {
427
+ type: "array",
428
+ items: false,
429
+ prefixItems: [
430
+ {
431
+ type: "string"
432
+ }
433
+ ]
434
+ }
435
+ ]
436
+ },
437
+ "@reverse": {
438
+ type: "object",
439
+ additionalProperties: {
440
+ type: "string"
441
+ }
442
+ },
443
+ "@index": {
444
+ type: "string"
445
+ },
446
+ id: {
447
+ type: "string",
448
+ description: "Subject Id"
449
+ },
450
+ type: {
451
+ type: "string",
452
+ "const": "DataResource",
453
+ description: "Subject type"
454
+ },
455
+ description: {
456
+ type: "string",
457
+ description: "Description"
458
+ },
459
+ name: {
460
+ type: "string",
461
+ description: "The Resource Name"
462
+ },
463
+ exposedThrough: {
464
+ anyOf: [
465
+ {
466
+ $ref: "https://schema.twindev.org/gaia-x/DataExchangeComponent"
467
+ },
468
+ {
469
+ type: "string"
470
+ },
471
+ {
472
+ type: "object",
473
+ additionalProperties: {
474
+ anyOf: [
475
+ {
476
+ $ref: "https://schema.twindev.org/json-ld/JsonLdNodePrimitive"
477
+ },
478
+ {
479
+ $ref: "https://schema.twindev.org/json-ld/JsonLdLanguageMap"
480
+ },
481
+ {
482
+ $ref: "https://schema.twindev.org/json-ld/JsonLdIndexMap"
483
+ },
484
+ {
485
+ $ref: "https://schema.twindev.org/json-ld/JsonLdIncludedBlock"
486
+ },
487
+ {
488
+ $ref: "https://schema.twindev.org/json-ld/JsonLdIdMap"
489
+ },
490
+ {
491
+ $ref: "https://schema.twindev.org/json-ld/JsonLdTypeMap"
492
+ },
493
+ {
494
+ type: "array"
495
+ }
496
+ ]
497
+ },
498
+ properties: {
499
+ id: {
500
+ type: "string"
501
+ },
502
+ type: {
503
+ type: "string",
504
+ "const": "DataExchangeComponent"
505
+ },
506
+ "@context": {
507
+ $ref: "https://schema.twindev.org/json-ld/JsonLdContextDefinitionRoot"
508
+ },
509
+ "@id": {
510
+ anyOf: [
511
+ {
512
+ type: "string"
513
+ },
514
+ {
515
+ type: "array",
516
+ items: false,
517
+ prefixItems: [
518
+ {
519
+ type: "string"
520
+ }
521
+ ]
522
+ }
523
+ ]
524
+ },
525
+ "@included": {
526
+ $ref: "https://schema.twindev.org/json-ld/JsonLdIncludedBlock"
527
+ },
528
+ "@graph": {
529
+ anyOf: [
530
+ {
531
+ $ref: "https://schema.twindev.org/json-ld/JsonLdNodeObject"
532
+ },
533
+ {
534
+ type: "array",
535
+ items: false,
536
+ prefixItems: [
537
+ {
538
+ $ref: "https://schema.twindev.org/json-ld/JsonLdNodeObject"
539
+ }
540
+ ]
541
+ }
542
+ ]
543
+ },
544
+ "@nest": {
545
+ anyOf: [
546
+ {
547
+ $ref: "https://schema.twindev.org/json-ld/JsonLdJsonObject"
548
+ },
549
+ {
550
+ type: "array",
551
+ items: false,
552
+ prefixItems: [
553
+ {
554
+ $ref: "https://schema.twindev.org/json-ld/JsonLdJsonObject"
555
+ }
556
+ ]
557
+ }
558
+ ]
559
+ },
560
+ "@type": {
561
+ anyOf: [
562
+ {
563
+ type: "string"
564
+ },
565
+ {
566
+ type: "array",
567
+ items: false,
568
+ prefixItems: [
569
+ {
570
+ type: "string"
571
+ }
572
+ ]
573
+ }
574
+ ]
575
+ },
576
+ "@reverse": {
577
+ type: "object",
578
+ additionalProperties: {
579
+ type: "string"
580
+ }
581
+ },
582
+ "@index": {
583
+ type: "string"
584
+ }
585
+ },
586
+ required: [
587
+ "id",
588
+ "type"
589
+ ]
590
+ }
591
+ ],
592
+ description: "Exposed through a Data Exchange Component. 'string' in case just an Id pointing to the Data Exchange Component is supplied the third case covers the idiom where a JSON-LD Node is supplied with id and type."
593
+ },
594
+ producedBy: {
595
+ anyOf: [
596
+ {
597
+ $ref: "https://schema.twindev.org/gaia-x/Participant"
598
+ },
599
+ {
600
+ type: "string"
601
+ }
602
+ ],
603
+ description: "Who is the data producer"
604
+ },
605
+ license: {
606
+ type: "string",
607
+ description: "Pointer (URL) to the license"
608
+ },
609
+ copyrightOwnedBy: {
610
+ anyOf: [
611
+ {
612
+ $ref: "https://schema.twindev.org/gaia-x/Participant"
613
+ },
614
+ {
615
+ type: "string"
616
+ }
617
+ ],
618
+ description: "Copyright owner"
619
+ },
620
+ resourcePolicy: {
621
+ $ref: "https://schema.twindev.org/gaia-x/ObjectOrArray%3CIJsonLdNodeObject%3E",
622
+ description: "ODRL Policy"
623
+ }
624
+ };
625
+ var required$4 = [
626
+ "@context",
627
+ "id",
628
+ "type",
629
+ "name",
630
+ "exposedThrough",
631
+ "producedBy",
632
+ "license",
633
+ "copyrightOwnedBy",
634
+ "resourcePolicy"
635
+ ];
636
+ var additionalProperties$4 = {
637
+ anyOf: [
638
+ {
639
+ $ref: "https://schema.twindev.org/json-ld/JsonLdNodePrimitive"
640
+ },
641
+ {
642
+ $ref: "https://schema.twindev.org/json-ld/JsonLdLanguageMap"
643
+ },
644
+ {
645
+ $ref: "https://schema.twindev.org/json-ld/JsonLdIndexMap"
646
+ },
647
+ {
648
+ $ref: "https://schema.twindev.org/json-ld/JsonLdIncludedBlock"
649
+ },
650
+ {
651
+ $ref: "https://schema.twindev.org/json-ld/JsonLdIdMap"
652
+ },
653
+ {
654
+ $ref: "https://schema.twindev.org/json-ld/JsonLdTypeMap"
655
+ },
656
+ {
657
+ type: "array"
658
+ }
659
+ ]
660
+ };
661
+ var DataResourceSchema = {
662
+ $schema: $schema$4,
663
+ $id: $id$4,
664
+ description: description$4,
665
+ type: type$4,
666
+ properties: properties$4,
667
+ required: required$4,
668
+ additionalProperties: additionalProperties$4
669
+ };
670
+
671
+ var $schema$3 = "https://json-schema.org/draft/2020-12/schema";
672
+ var $id$3 = "https://schema.twindev.org/gaia-x/Endpoint";
673
+ var description$3 = "Endpoint as defined by the Gaia-X ontology. https://docs.gaia-x.eu/ontology/development/classes/Endpoint";
674
+ var type$3 = "object";
675
+ var properties$3 = {
676
+ "@context": {
677
+ $ref: "https://schema.twindev.org/json-ld/JsonLdContextDefinitionRoot"
678
+ },
679
+ "@id": {
680
+ anyOf: [
681
+ {
682
+ type: "string"
683
+ },
684
+ {
685
+ type: "array",
686
+ items: false,
687
+ prefixItems: [
688
+ {
689
+ type: "string"
690
+ }
691
+ ]
692
+ }
693
+ ]
694
+ },
695
+ "@included": {
696
+ $ref: "https://schema.twindev.org/json-ld/JsonLdIncludedBlock"
697
+ },
698
+ "@graph": {
699
+ anyOf: [
700
+ {
701
+ $ref: "https://schema.twindev.org/json-ld/JsonLdNodeObject"
702
+ },
703
+ {
704
+ type: "array",
705
+ items: false,
706
+ prefixItems: [
707
+ {
708
+ $ref: "https://schema.twindev.org/json-ld/JsonLdNodeObject"
709
+ }
710
+ ]
711
+ }
712
+ ]
713
+ },
714
+ "@nest": {
715
+ anyOf: [
716
+ {
717
+ $ref: "https://schema.twindev.org/json-ld/JsonLdJsonObject"
718
+ },
719
+ {
720
+ type: "array",
721
+ items: false,
722
+ prefixItems: [
723
+ {
724
+ $ref: "https://schema.twindev.org/json-ld/JsonLdJsonObject"
725
+ }
726
+ ]
727
+ }
728
+ ]
729
+ },
730
+ "@type": {
731
+ anyOf: [
732
+ {
733
+ type: "string"
734
+ },
735
+ {
736
+ type: "array",
737
+ items: false,
738
+ prefixItems: [
739
+ {
740
+ type: "string"
741
+ }
742
+ ]
743
+ }
744
+ ]
745
+ },
746
+ "@reverse": {
747
+ type: "object",
748
+ additionalProperties: {
749
+ type: "string"
750
+ }
751
+ },
752
+ "@index": {
753
+ type: "string"
754
+ },
755
+ type: {
756
+ type: "string",
757
+ "const": "Endpoint",
758
+ description: "The type of JSON-LD node. In this case it is allowed to be omitted as it is usually a child node."
759
+ },
760
+ endpointURL: {
761
+ type: "string",
762
+ description: "The endpoint URL"
763
+ },
764
+ formalDescription: {
765
+ type: "string",
766
+ description: "The formal description"
767
+ },
768
+ standardConformity: {
769
+ $ref: "https://schema.twindev.org/json-ld/JsonLdNodeObject",
770
+ description: "Standards conformity"
771
+ }
772
+ };
773
+ var required$3 = [
774
+ "endpointURL"
775
+ ];
776
+ var additionalProperties$3 = {
777
+ anyOf: [
778
+ {
779
+ $ref: "https://schema.twindev.org/json-ld/JsonLdNodePrimitive"
780
+ },
781
+ {
782
+ $ref: "https://schema.twindev.org/json-ld/JsonLdLanguageMap"
783
+ },
784
+ {
785
+ $ref: "https://schema.twindev.org/json-ld/JsonLdIndexMap"
786
+ },
787
+ {
788
+ $ref: "https://schema.twindev.org/json-ld/JsonLdIncludedBlock"
789
+ },
790
+ {
791
+ $ref: "https://schema.twindev.org/json-ld/JsonLdIdMap"
792
+ },
793
+ {
794
+ $ref: "https://schema.twindev.org/json-ld/JsonLdTypeMap"
795
+ },
796
+ {
797
+ type: "array"
798
+ }
799
+ ]
800
+ };
801
+ var EndpointSchema = {
802
+ $schema: $schema$3,
803
+ $id: $id$3,
804
+ description: description$3,
805
+ type: type$3,
806
+ properties: properties$3,
807
+ required: required$3,
808
+ additionalProperties: additionalProperties$3
809
+ };
810
+
811
+ var $schema$2 = "https://json-schema.org/draft/2020-12/schema";
812
+ var $id$2 = "https://schema.twindev.org/gaia-x/Participant";
813
+ var description$2 = "A Legal Person participating in the ecosystem";
814
+ var type$2 = "object";
815
+ var properties$2 = {
816
+ "@context": {
817
+ $ref: "https://schema.twindev.org/gaia-x/GaiaXContextType",
818
+ description: "The LD context"
819
+ },
820
+ "@id": {
821
+ anyOf: [
822
+ {
823
+ type: "string"
824
+ },
825
+ {
826
+ type: "array",
827
+ items: false,
828
+ prefixItems: [
829
+ {
830
+ type: "string"
831
+ }
832
+ ]
833
+ }
834
+ ]
835
+ },
836
+ "@included": {
837
+ $ref: "https://schema.twindev.org/json-ld/JsonLdIncludedBlock"
838
+ },
839
+ "@graph": {
840
+ anyOf: [
841
+ {
842
+ $ref: "https://schema.twindev.org/json-ld/JsonLdNodeObject"
843
+ },
844
+ {
845
+ type: "array",
846
+ items: false,
847
+ prefixItems: [
848
+ {
849
+ $ref: "https://schema.twindev.org/json-ld/JsonLdNodeObject"
850
+ }
851
+ ]
852
+ }
853
+ ]
854
+ },
855
+ "@nest": {
856
+ anyOf: [
857
+ {
858
+ $ref: "https://schema.twindev.org/json-ld/JsonLdJsonObject"
859
+ },
860
+ {
861
+ type: "array",
862
+ items: false,
863
+ prefixItems: [
864
+ {
865
+ $ref: "https://schema.twindev.org/json-ld/JsonLdJsonObject"
866
+ }
867
+ ]
868
+ }
869
+ ]
870
+ },
871
+ "@type": {
872
+ anyOf: [
873
+ {
874
+ type: "string"
875
+ },
876
+ {
877
+ type: "array",
878
+ items: false,
879
+ prefixItems: [
880
+ {
881
+ type: "string"
882
+ }
883
+ ]
884
+ }
885
+ ]
886
+ },
887
+ "@reverse": {
888
+ type: "object",
889
+ additionalProperties: {
890
+ type: "string"
891
+ }
892
+ },
893
+ "@index": {
894
+ type: "string"
895
+ },
896
+ id: {
897
+ type: "string",
898
+ description: "The participant Id."
899
+ },
900
+ type: {
901
+ type: "string",
902
+ "const": "LegalPerson",
903
+ description: "JSON-LD type."
904
+ },
905
+ registrationNumber: {
906
+ $ref: "https://schema.twindev.org/gaia-x/RegistrationNumber",
907
+ description: "The legal registration number."
908
+ },
909
+ legalName: {
910
+ type: "string",
911
+ description: "The legal name."
912
+ },
913
+ legalAddress: {
914
+ $ref: "https://schema.twindev.org/gaia-x/Address",
915
+ description: "Legal Address"
916
+ }
917
+ };
918
+ var required$2 = [
919
+ "@context",
920
+ "id",
921
+ "type",
922
+ "registrationNumber",
923
+ "legalName",
924
+ "legalAddress"
925
+ ];
926
+ var additionalProperties$2 = {
927
+ anyOf: [
928
+ {
929
+ $ref: "https://schema.twindev.org/json-ld/JsonLdNodePrimitive"
930
+ },
931
+ {
932
+ $ref: "https://schema.twindev.org/json-ld/JsonLdLanguageMap"
933
+ },
934
+ {
935
+ $ref: "https://schema.twindev.org/json-ld/JsonLdIndexMap"
936
+ },
937
+ {
938
+ $ref: "https://schema.twindev.org/json-ld/JsonLdIncludedBlock"
939
+ },
940
+ {
941
+ $ref: "https://schema.twindev.org/json-ld/JsonLdIdMap"
942
+ },
943
+ {
944
+ $ref: "https://schema.twindev.org/json-ld/JsonLdTypeMap"
945
+ },
946
+ {
947
+ type: "array"
948
+ }
949
+ ]
950
+ };
951
+ var ParticipantSchema = {
952
+ $schema: $schema$2,
953
+ $id: $id$2,
954
+ description: description$2,
955
+ type: type$2,
956
+ properties: properties$2,
957
+ required: required$2,
958
+ additionalProperties: additionalProperties$2
959
+ };
960
+
961
+ var $schema$1 = "https://json-schema.org/draft/2020-12/schema";
962
+ var $id$1 = "https://schema.twindev.org/gaia-x/RegistrationNumber";
963
+ var description$1 = "Registration Number as defined by the Gaia-X ontology. https://docs.gaia-x.eu/ontology/development/classes/RegistrationNumber/";
964
+ var type$1 = "object";
965
+ var properties$1 = {
966
+ "@context": {
967
+ $ref: "https://schema.twindev.org/json-ld/JsonLdContextDefinitionRoot"
968
+ },
969
+ "@id": {
970
+ anyOf: [
971
+ {
972
+ type: "string"
973
+ },
974
+ {
975
+ type: "array",
976
+ items: false,
977
+ prefixItems: [
978
+ {
979
+ type: "string"
980
+ }
981
+ ]
982
+ }
983
+ ]
984
+ },
985
+ "@included": {
986
+ $ref: "https://schema.twindev.org/json-ld/JsonLdIncludedBlock"
987
+ },
988
+ "@graph": {
989
+ anyOf: [
990
+ {
991
+ $ref: "https://schema.twindev.org/json-ld/JsonLdNodeObject"
992
+ },
993
+ {
994
+ type: "array",
995
+ items: false,
996
+ prefixItems: [
997
+ {
998
+ $ref: "https://schema.twindev.org/json-ld/JsonLdNodeObject"
999
+ }
1000
+ ]
1001
+ }
1002
+ ]
1003
+ },
1004
+ "@nest": {
1005
+ anyOf: [
1006
+ {
1007
+ $ref: "https://schema.twindev.org/json-ld/JsonLdJsonObject"
1008
+ },
1009
+ {
1010
+ type: "array",
1011
+ items: false,
1012
+ prefixItems: [
1013
+ {
1014
+ $ref: "https://schema.twindev.org/json-ld/JsonLdJsonObject"
1015
+ }
1016
+ ]
1017
+ }
1018
+ ]
1019
+ },
1020
+ "@type": {
1021
+ anyOf: [
1022
+ {
1023
+ type: "string"
1024
+ },
1025
+ {
1026
+ type: "array",
1027
+ items: false,
1028
+ prefixItems: [
1029
+ {
1030
+ type: "string"
1031
+ }
1032
+ ]
1033
+ }
1034
+ ]
1035
+ },
1036
+ "@reverse": {
1037
+ type: "object",
1038
+ additionalProperties: {
1039
+ type: "string"
1040
+ }
1041
+ },
1042
+ "@index": {
1043
+ type: "string"
1044
+ },
1045
+ type: {
1046
+ type: "string",
1047
+ "enum": [
1048
+ "RegistrationNumber",
1049
+ "LocalRegistrationNumber",
1050
+ "EORI",
1051
+ "EUID",
1052
+ "LeiCode",
1053
+ "TaxID",
1054
+ "VatID"
1055
+ ],
1056
+ description: "JSON-LD Type."
1057
+ },
1058
+ local: {
1059
+ type: "string",
1060
+ description: "Local Registration."
1061
+ },
1062
+ countryCode: {
1063
+ type: "string",
1064
+ description: "Country code. See https://docs.gaia-x.eu/ontology/development/enums/CountryNameAlpha2/"
1065
+ },
1066
+ subdivisionCountryCode: {
1067
+ type: "string",
1068
+ description: "Subdivision country code. See https://docs.gaia-x.eu/ontology/development/enums/RegionCode/"
1069
+ },
1070
+ vatID: {
1071
+ type: "string",
1072
+ description: "The VAT identification number."
1073
+ },
1074
+ leiCode: {
1075
+ type: "string",
1076
+ description: "Unique LEI number as defined by GLEIF."
1077
+ },
1078
+ eori: {
1079
+ type: "string",
1080
+ description: "The Economic Operators Registration and Identification number (EORI)."
1081
+ },
1082
+ country: {
1083
+ type: "string",
1084
+ description: "The country where the EORI is registered written in plain english"
1085
+ },
1086
+ euid: {
1087
+ type: "string",
1088
+ description: "The European Unique Identifier (EUID) for business located in the European Ec."
1089
+ },
1090
+ taxId: {
1091
+ type: "string",
1092
+ description: "The company tax ID."
1093
+ }
1094
+ };
1095
+ var required$1 = [
1096
+ "type"
1097
+ ];
1098
+ var additionalProperties$1 = {
1099
+ anyOf: [
1100
+ {
1101
+ $ref: "https://schema.twindev.org/json-ld/JsonLdNodePrimitive"
1102
+ },
1103
+ {
1104
+ $ref: "https://schema.twindev.org/json-ld/JsonLdLanguageMap"
1105
+ },
1106
+ {
1107
+ $ref: "https://schema.twindev.org/json-ld/JsonLdIndexMap"
1108
+ },
1109
+ {
1110
+ $ref: "https://schema.twindev.org/json-ld/JsonLdIncludedBlock"
1111
+ },
1112
+ {
1113
+ $ref: "https://schema.twindev.org/json-ld/JsonLdIdMap"
1114
+ },
1115
+ {
1116
+ $ref: "https://schema.twindev.org/json-ld/JsonLdTypeMap"
1117
+ },
1118
+ {
1119
+ type: "array"
1120
+ }
1121
+ ]
1122
+ };
1123
+ var RegistrationNumberSchema = {
1124
+ $schema: $schema$1,
1125
+ $id: $id$1,
1126
+ description: description$1,
1127
+ type: type$1,
1128
+ properties: properties$1,
1129
+ required: required$1,
1130
+ additionalProperties: additionalProperties$1
1131
+ };
1132
+
1133
+ var $schema = "https://json-schema.org/draft/2020-12/schema";
1134
+ var $id = "https://schema.twindev.org/gaia-x/ServiceOffering";
1135
+ var description = "A Service offering";
1136
+ var type = "object";
1137
+ var properties = {
1138
+ "@context": {
1139
+ $ref: "https://schema.twindev.org/gaia-x/GaiaXContextType",
1140
+ description: "The LD context"
1141
+ },
1142
+ "@id": {
1143
+ anyOf: [
1144
+ {
1145
+ type: "string"
1146
+ },
1147
+ {
1148
+ type: "array",
1149
+ items: false,
1150
+ prefixItems: [
1151
+ {
1152
+ type: "string"
1153
+ }
1154
+ ]
1155
+ }
1156
+ ]
1157
+ },
1158
+ "@included": {
1159
+ $ref: "https://schema.twindev.org/json-ld/JsonLdIncludedBlock"
1160
+ },
1161
+ "@graph": {
1162
+ anyOf: [
1163
+ {
1164
+ $ref: "https://schema.twindev.org/json-ld/JsonLdNodeObject"
1165
+ },
1166
+ {
1167
+ type: "array",
1168
+ items: false,
1169
+ prefixItems: [
1170
+ {
1171
+ $ref: "https://schema.twindev.org/json-ld/JsonLdNodeObject"
1172
+ }
1173
+ ]
1174
+ }
1175
+ ]
1176
+ },
1177
+ "@nest": {
1178
+ anyOf: [
1179
+ {
1180
+ $ref: "https://schema.twindev.org/json-ld/JsonLdJsonObject"
1181
+ },
1182
+ {
1183
+ type: "array",
1184
+ items: false,
1185
+ prefixItems: [
1186
+ {
1187
+ $ref: "https://schema.twindev.org/json-ld/JsonLdJsonObject"
1188
+ }
1189
+ ]
1190
+ }
1191
+ ]
1192
+ },
1193
+ "@type": {
1194
+ anyOf: [
1195
+ {
1196
+ type: "string"
1197
+ },
1198
+ {
1199
+ type: "array",
1200
+ items: false,
1201
+ prefixItems: [
1202
+ {
1203
+ type: "string"
1204
+ }
1205
+ ]
1206
+ }
1207
+ ]
1208
+ },
1209
+ "@reverse": {
1210
+ type: "object",
1211
+ additionalProperties: {
1212
+ type: "string"
1213
+ }
1214
+ },
1215
+ "@index": {
1216
+ type: "string"
1217
+ },
1218
+ id: {
1219
+ type: "string",
1220
+ description: "Id"
1221
+ },
1222
+ type: {
1223
+ type: "string",
1224
+ "const": "ServiceOffering",
1225
+ description: "Type"
1226
+ },
1227
+ description: {
1228
+ type: "string",
1229
+ description: "Description"
1230
+ },
1231
+ name: {
1232
+ type: "string",
1233
+ description: "Name"
1234
+ },
1235
+ providedBy: {
1236
+ anyOf: [
1237
+ {
1238
+ type: "string"
1239
+ },
1240
+ {
1241
+ $ref: "https://schema.twindev.org/gaia-x/Participant"
1242
+ },
1243
+ {
1244
+ type: "object",
1245
+ additionalProperties: {
1246
+ anyOf: [
1247
+ {
1248
+ $ref: "https://schema.twindev.org/json-ld/JsonLdNodePrimitive"
1249
+ },
1250
+ {
1251
+ $ref: "https://schema.twindev.org/json-ld/JsonLdLanguageMap"
1252
+ },
1253
+ {
1254
+ $ref: "https://schema.twindev.org/json-ld/JsonLdIndexMap"
1255
+ },
1256
+ {
1257
+ $ref: "https://schema.twindev.org/json-ld/JsonLdIncludedBlock"
1258
+ },
1259
+ {
1260
+ $ref: "https://schema.twindev.org/json-ld/JsonLdIdMap"
1261
+ },
1262
+ {
1263
+ $ref: "https://schema.twindev.org/json-ld/JsonLdTypeMap"
1264
+ },
1265
+ {
1266
+ type: "array"
1267
+ }
1268
+ ]
1269
+ },
1270
+ properties: {
1271
+ id: {
1272
+ type: "string"
1273
+ },
1274
+ type: {
1275
+ type: "string",
1276
+ "const": "LegalPerson"
1277
+ },
1278
+ "@context": {
1279
+ $ref: "https://schema.twindev.org/json-ld/JsonLdContextDefinitionRoot"
1280
+ },
1281
+ "@id": {
1282
+ anyOf: [
1283
+ {
1284
+ type: "string"
1285
+ },
1286
+ {
1287
+ type: "array",
1288
+ items: false,
1289
+ prefixItems: [
1290
+ {
1291
+ type: "string"
1292
+ }
1293
+ ]
1294
+ }
1295
+ ]
1296
+ },
1297
+ "@included": {
1298
+ $ref: "https://schema.twindev.org/json-ld/JsonLdIncludedBlock"
1299
+ },
1300
+ "@graph": {
1301
+ anyOf: [
1302
+ {
1303
+ $ref: "https://schema.twindev.org/json-ld/JsonLdNodeObject"
1304
+ },
1305
+ {
1306
+ type: "array",
1307
+ items: false,
1308
+ prefixItems: [
1309
+ {
1310
+ $ref: "https://schema.twindev.org/json-ld/JsonLdNodeObject"
1311
+ }
1312
+ ]
1313
+ }
1314
+ ]
1315
+ },
1316
+ "@nest": {
1317
+ anyOf: [
1318
+ {
1319
+ $ref: "https://schema.twindev.org/json-ld/JsonLdJsonObject"
1320
+ },
1321
+ {
1322
+ type: "array",
1323
+ items: false,
1324
+ prefixItems: [
1325
+ {
1326
+ $ref: "https://schema.twindev.org/json-ld/JsonLdJsonObject"
1327
+ }
1328
+ ]
1329
+ }
1330
+ ]
1331
+ },
1332
+ "@type": {
1333
+ anyOf: [
1334
+ {
1335
+ type: "string"
1336
+ },
1337
+ {
1338
+ type: "array",
1339
+ items: false,
1340
+ prefixItems: [
1341
+ {
1342
+ type: "string"
1343
+ }
1344
+ ]
1345
+ }
1346
+ ]
1347
+ },
1348
+ "@reverse": {
1349
+ type: "object",
1350
+ additionalProperties: {
1351
+ type: "string"
1352
+ }
1353
+ },
1354
+ "@index": {
1355
+ type: "string"
1356
+ }
1357
+ },
1358
+ required: [
1359
+ "id",
1360
+ "type"
1361
+ ]
1362
+ }
1363
+ ],
1364
+ description: "Participant that provides the offering"
1365
+ },
1366
+ servicePolicy: {
1367
+ $ref: "https://schema.twindev.org/gaia-x/ObjectOrArray%3CIJsonLdNodeObject%3E",
1368
+ description: "ODRL policy associated to the service offering"
1369
+ },
1370
+ aggregationOfResources: {
1371
+ anyOf: [
1372
+ {
1373
+ type: "array",
1374
+ items: false,
1375
+ prefixItems: [
1376
+ {
1377
+ type: "string"
1378
+ }
1379
+ ]
1380
+ },
1381
+ {
1382
+ type: "array",
1383
+ items: false,
1384
+ prefixItems: [
1385
+ {
1386
+ $ref: "https://schema.twindev.org/gaia-x/DataResource"
1387
+ }
1388
+ ]
1389
+ },
1390
+ {
1391
+ type: "object",
1392
+ additionalProperties: {
1393
+ anyOf: [
1394
+ {
1395
+ $ref: "https://schema.twindev.org/json-ld/JsonLdNodePrimitive"
1396
+ },
1397
+ {
1398
+ $ref: "https://schema.twindev.org/json-ld/JsonLdLanguageMap"
1399
+ },
1400
+ {
1401
+ $ref: "https://schema.twindev.org/json-ld/JsonLdIndexMap"
1402
+ },
1403
+ {
1404
+ $ref: "https://schema.twindev.org/json-ld/JsonLdIncludedBlock"
1405
+ },
1406
+ {
1407
+ $ref: "https://schema.twindev.org/json-ld/JsonLdIdMap"
1408
+ },
1409
+ {
1410
+ $ref: "https://schema.twindev.org/json-ld/JsonLdTypeMap"
1411
+ },
1412
+ {
1413
+ type: "array"
1414
+ }
1415
+ ]
1416
+ },
1417
+ properties: {
1418
+ id: {
1419
+ type: "string"
1420
+ },
1421
+ type: {
1422
+ type: "string",
1423
+ "const": "DataResource"
1424
+ },
1425
+ "@context": {
1426
+ $ref: "https://schema.twindev.org/json-ld/JsonLdContextDefinitionRoot"
1427
+ },
1428
+ "@id": {
1429
+ anyOf: [
1430
+ {
1431
+ type: "string"
1432
+ },
1433
+ {
1434
+ type: "array",
1435
+ items: false,
1436
+ prefixItems: [
1437
+ {
1438
+ type: "string"
1439
+ }
1440
+ ]
1441
+ }
1442
+ ]
1443
+ },
1444
+ "@included": {
1445
+ $ref: "https://schema.twindev.org/json-ld/JsonLdIncludedBlock"
1446
+ },
1447
+ "@graph": {
1448
+ anyOf: [
1449
+ {
1450
+ $ref: "https://schema.twindev.org/json-ld/JsonLdNodeObject"
1451
+ },
1452
+ {
1453
+ type: "array",
1454
+ items: false,
1455
+ prefixItems: [
1456
+ {
1457
+ $ref: "https://schema.twindev.org/json-ld/JsonLdNodeObject"
1458
+ }
1459
+ ]
1460
+ }
1461
+ ]
1462
+ },
1463
+ "@nest": {
1464
+ anyOf: [
1465
+ {
1466
+ $ref: "https://schema.twindev.org/json-ld/JsonLdJsonObject"
1467
+ },
1468
+ {
1469
+ type: "array",
1470
+ items: false,
1471
+ prefixItems: [
1472
+ {
1473
+ $ref: "https://schema.twindev.org/json-ld/JsonLdJsonObject"
1474
+ }
1475
+ ]
1476
+ }
1477
+ ]
1478
+ },
1479
+ "@type": {
1480
+ anyOf: [
1481
+ {
1482
+ type: "string"
1483
+ },
1484
+ {
1485
+ type: "array",
1486
+ items: false,
1487
+ prefixItems: [
1488
+ {
1489
+ type: "string"
1490
+ }
1491
+ ]
1492
+ }
1493
+ ]
1494
+ },
1495
+ "@reverse": {
1496
+ type: "object",
1497
+ additionalProperties: {
1498
+ type: "string"
1499
+ }
1500
+ },
1501
+ "@index": {
1502
+ type: "string"
1503
+ }
1504
+ },
1505
+ required: [
1506
+ "id",
1507
+ "type"
1508
+ ]
1509
+ }
1510
+ ],
1511
+ description: "Resources aggregated It is supported different representations, inline, by reference both providing the URI or a partial JSON-LD Node object"
1512
+ },
1513
+ endpoint: {
1514
+ $ref: "https://schema.twindev.org/gaia-x/Endpoint",
1515
+ description: "The endpoint"
1516
+ }
1517
+ };
1518
+ var required = [
1519
+ "@context",
1520
+ "id",
1521
+ "type",
1522
+ "name",
1523
+ "providedBy",
1524
+ "servicePolicy",
1525
+ "endpoint"
1526
+ ];
1527
+ var additionalProperties = {
1528
+ anyOf: [
1529
+ {
1530
+ $ref: "https://schema.twindev.org/json-ld/JsonLdNodePrimitive"
1531
+ },
1532
+ {
1533
+ $ref: "https://schema.twindev.org/json-ld/JsonLdLanguageMap"
1534
+ },
1535
+ {
1536
+ $ref: "https://schema.twindev.org/json-ld/JsonLdIndexMap"
1537
+ },
1538
+ {
1539
+ $ref: "https://schema.twindev.org/json-ld/JsonLdIncludedBlock"
1540
+ },
1541
+ {
1542
+ $ref: "https://schema.twindev.org/json-ld/JsonLdIdMap"
1543
+ },
1544
+ {
1545
+ $ref: "https://schema.twindev.org/json-ld/JsonLdTypeMap"
1546
+ },
1547
+ {
1548
+ type: "array"
1549
+ }
1550
+ ]
1551
+ };
1552
+ var ServiceOfferingSchema = {
1553
+ $schema: $schema,
1554
+ $id: $id,
1555
+ description: description,
1556
+ type: type,
1557
+ properties: properties,
1558
+ required: required,
1559
+ additionalProperties: additionalProperties
1560
+ };
1561
+
1562
+ // Copyright 2024 IOTA Stiftung.
1563
+ // SPDX-License-Identifier: Apache-2.0.
1564
+ /**
1565
+ * Handle all the data types for Gaia-X.
1566
+ */
1567
+ class GaiaXDataTypes {
1568
+ /**
1569
+ * Register all the data types.
1570
+ */
1571
+ static registerTypes() {
1572
+ dataCore.DataTypeHandlerFactory.register(`${GaiaXContexts.ContextRoot}${GaiaXTypes.DataExchangeComponent}`, () => ({
1573
+ context: GaiaXContexts.ContextRoot,
1574
+ type: GaiaXTypes.DataExchangeComponent,
1575
+ jsonSchema: async () => DataExchangeComponentSchema
1576
+ }));
1577
+ dataCore.DataTypeHandlerFactory.register(`${GaiaXContexts.ContextRoot}${GaiaXTypes.DataResource}`, () => ({
1578
+ context: GaiaXContexts.ContextRoot,
1579
+ type: GaiaXTypes.DataResource,
1580
+ jsonSchema: async () => DataResourceSchema
1581
+ }));
1582
+ dataCore.DataTypeHandlerFactory.register(`${GaiaXContexts.ContextRoot}${GaiaXTypes.Endpoint}`, () => ({
1583
+ context: GaiaXContexts.ContextRoot,
1584
+ type: GaiaXTypes.Endpoint,
1585
+ jsonSchema: async () => EndpointSchema
1586
+ }));
1587
+ dataCore.DataTypeHandlerFactory.register(`${GaiaXContexts.ContextRoot}${GaiaXTypes.Address}`, () => ({
1588
+ context: GaiaXContexts.ContextRoot,
1589
+ type: GaiaXTypes.Address,
1590
+ jsonSchema: async () => AddressSchema
1591
+ }));
1592
+ dataCore.DataTypeHandlerFactory.register(`${GaiaXContexts.ContextRoot}${GaiaXTypes.ServiceOffering}`, () => ({
1593
+ context: GaiaXContexts.ContextRoot,
1594
+ type: GaiaXTypes.ServiceOffering,
1595
+ jsonSchema: async () => ServiceOfferingSchema
1596
+ }));
1597
+ dataCore.DataTypeHandlerFactory.register(`${GaiaXContexts.ContextRoot}${GaiaXTypes.Participant}`, () => ({
1598
+ context: GaiaXContexts.ContextRoot,
1599
+ type: GaiaXTypes.Participant,
1600
+ jsonSchema: async () => ParticipantSchema
1601
+ }));
1602
+ dataCore.DataTypeHandlerFactory.register(`${GaiaXContexts.ContextRoot}${GaiaXTypes.RegistrationNumber}`, () => ({
1603
+ context: GaiaXContexts.ContextRoot,
1604
+ type: GaiaXTypes.RegistrationNumber,
1605
+ jsonSchema: async () => RegistrationNumberSchema
1606
+ }));
1607
+ }
1608
+ }
1609
+
77
1610
  exports.GaiaXContexts = GaiaXContexts;
1611
+ exports.GaiaXDataTypes = GaiaXDataTypes;
78
1612
  exports.GaiaXTypes = GaiaXTypes;