@@ -5,38 +5,27 @@ export interface IriTemplateMapping {
55 required : boolean ;
66}
77
8+ /** Any absolute IRI */
9+ type Iri = string ;
10+
11+ /** A primitive value wrapped in @value */
12+ interface JsonLdValue < T = string | number | boolean | null > {
13+ "@value" : T ;
14+ }
15+
16+ /** A node identifier */
17+ interface JsonLdId {
18+ "@id" : Iri ;
19+ }
20+
821export interface ExpandedOperation {
922 "@type" : [ "http://www.w3.org/ns/hydra/core#Operation" ] ;
10- "http://www.w3.org/2000/01/rdf-schema#label" : [
11- {
12- "@value" : string ;
13- } ,
14- ] ;
15- "http://www.w3.org/ns/hydra/core#title" : [
16- {
17- "@value" : string ;
18- } ,
19- ] ;
20- "http://www.w3.org/ns/hydra/core#expects" ?: [
21- {
22- "@id" : string ;
23- } ,
24- ] ;
25- "http://www.w3.org/ns/hydra/core#method" : [
26- {
27- "@value" : string ;
28- } ,
29- ] ;
30- "http://www.w3.org/ns/hydra/core#returns" ?: [
31- {
32- "@id" : string ;
33- } ,
34- ] ;
35- "http://www.w3.org/2002/07/owl#deprecated" ?: [
36- {
37- "@value" : boolean ;
38- } ,
39- ] ;
23+ "http://www.w3.org/2000/01/rdf-schema#label" : [ JsonLdValue < string > ] ;
24+ "http://www.w3.org/ns/hydra/core#title" : [ JsonLdValue < string > ] ;
25+ "http://www.w3.org/ns/hydra/core#expects" ?: [ JsonLdId ] ;
26+ "http://www.w3.org/ns/hydra/core#method" : [ JsonLdValue < string > ] ;
27+ "http://www.w3.org/ns/hydra/core#returns" ?: [ JsonLdId ] ;
28+ "http://www.w3.org/2002/07/owl#deprecated" ?: [ JsonLdValue < boolean > ] ;
4029}
4130
4231export interface ExpandedRdfProperty {
@@ -45,156 +34,63 @@ export interface ExpandedRdfProperty {
4534 | "http://www.w3.org/1999/02/22-rdf-syntax-ns#Property"
4635 | "http://www.w3.org/ns/hydra/core#Link" ,
4736 ] ;
48- "http://www.w3.org/2000/01/rdf-schema#label" : [
49- {
50- "@value" : string ;
51- } ,
52- ] ;
53- "http://www.w3.org/2000/01/rdf-schema#domain" : [
54- {
55- "@id" : string ;
56- } ,
57- ] ;
37+ "http://www.w3.org/2000/01/rdf-schema#label" : [ JsonLdValue < string > ] ;
38+ "http://www.w3.org/2000/01/rdf-schema#domain" : [ JsonLdId ] ;
5839 "http://www.w3.org/2000/01/rdf-schema#range" :
40+ | [ JsonLdId ]
5941 | [
60- {
61- "@id" : string ;
62- } ,
63- ]
64- | [
65- {
66- "@id" : string ;
67- } ,
42+ JsonLdId ,
6843 {
6944 "http://www.w3.org/2002/07/owl#equivalentClass" : [
7045 {
71- "http://www.w3.org/2002/07/owl#allValuesFrom" : [
72- {
73- "@id" : string ;
74- } ,
75- ] ;
76- "http://www.w3.org/2002/07/owl#onProperty" : [
77- {
78- "@id" : string ;
79- } ,
80- ] ;
46+ "http://www.w3.org/2002/07/owl#allValuesFrom" : [ JsonLdId ] ;
47+ "http://www.w3.org/2002/07/owl#onProperty" : [ JsonLdId ] ;
8148 } ,
8249 ] ;
8350 } ,
8451 ] ;
8552 "http://www.w3.org/ns/hydra/core#supportedOperation" ?: ExpandedOperation [ ] ;
86- "http://www.w3.org/2002/07/owl#maxCardinality" : [
87- {
88- "@value" : number ;
89- } ,
90- ] ;
53+ "http://www.w3.org/2002/07/owl#maxCardinality" : [ JsonLdValue < number > ] ;
9154}
9255
9356interface ExpandedSupportedProperty {
9457 "@type" : [ "http://www.w3.org/ns/hydra/core#SupportedProperty" ] ;
95- "http://www.w3.org/ns/hydra/core#title" : [
96- {
97- "@value" : string ;
98- } ,
99- ] ;
100- "http://www.w3.org/ns/hydra/core#description" : [
101- {
102- "@value" : string ;
103- } ,
104- ] ;
105- "http://www.w3.org/ns/hydra/core#required" ?: [
106- {
107- "@value" : boolean ;
108- } ,
109- ] ;
110- "http://www.w3.org/ns/hydra/core#readable" : [
111- {
112- "@value" : boolean ;
113- } ,
114- ] ;
58+ "http://www.w3.org/ns/hydra/core#title" : [ JsonLdValue < string > ] ;
59+ "http://www.w3.org/ns/hydra/core#description" : [ JsonLdValue < string > ] ;
60+ "http://www.w3.org/ns/hydra/core#required" ?: [ JsonLdValue < boolean > ] ;
61+ "http://www.w3.org/ns/hydra/core#readable" : [ JsonLdValue < boolean > ] ;
11562 /**
11663 * @deprecated
11764 */
118- "http://www.w3.org/ns/hydra/core#writeable" : [
119- {
120- "@value" : boolean ;
121- } ,
122- ] ;
123- "http://www.w3.org/ns/hydra/core#writable" : [
124- {
125- "@value" : boolean ;
126- } ,
127- ] ;
65+ "http://www.w3.org/ns/hydra/core#writeable" : [ JsonLdValue < boolean > ] ;
66+ "http://www.w3.org/ns/hydra/core#writable" : [ JsonLdValue < boolean > ] ;
12867 "http://www.w3.org/ns/hydra/core#property" : [ ExpandedRdfProperty ] ;
129- "http://www.w3.org/2002/07/owl#deprecated" ?: [
130- {
131- "@value" : boolean ;
132- } ,
133- ] ;
68+ "http://www.w3.org/2002/07/owl#deprecated" ?: [ JsonLdValue < boolean > ] ;
13469}
13570
13671export interface ExpandedClass {
13772 "@id" : string ;
13873 "@type" : [ "http://www.w3.org/ns/hydra/core#Class" ] ;
139- "http://www.w3.org/2000/01/rdf-schema#label" ?: [
140- {
141- "@value" : string ;
142- } ,
143- ] ;
144- "http://www.w3.org/2000/01/rdf-schema#subClassOf" ?: [
145- {
146- "@id" : string ;
147- } ,
148- ] ;
149- "http://www.w3.org/ns/hydra/core#title" : [
150- {
151- "@value" : string ;
152- } ,
153- ] ;
154- "http://www.w3.org/ns/hydra/core#description" ?: [
155- {
156- "@value" : string ;
157- } ,
158- ] ;
74+ "http://www.w3.org/2000/01/rdf-schema#label" ?: [ JsonLdValue < string > ] ;
75+ "http://www.w3.org/2000/01/rdf-schema#subClassOf" ?: [ JsonLdId ] ;
76+ "http://www.w3.org/ns/hydra/core#title" : [ JsonLdValue < string > ] ;
77+ "http://www.w3.org/ns/hydra/core#description" ?: [ JsonLdValue < string > ] ;
15978 "http://www.w3.org/ns/hydra/core#supportedProperty" : ExpandedSupportedProperty [ ] ;
16079 "http://www.w3.org/ns/hydra/core#supportedOperation" ?: ExpandedOperation [ ] ;
161- "http://www.w3.org/2002/07/owl#deprecated" ?: [
162- {
163- "@value" : boolean ;
164- } ,
165- ] ;
80+ "http://www.w3.org/2002/07/owl#deprecated" ?: [ JsonLdValue < boolean > ] ;
16681}
16782
16883export interface ExpandedDoc {
16984 "@id" : string ;
17085 "@type" : [ "http://www.w3.org/ns/hydra/core#ApiDocumentation" ] ;
171- "http://www.w3.org/ns/hydra/core#title" : [
172- {
173- "@value" : string ;
174- } ,
175- ] ;
176- "http://www.w3.org/ns/hydra/core#description" : [
177- {
178- "@value" : string ;
179- } ,
180- ] ;
181- "http://www.w3.org/ns/hydra/core#entrypoint" : [
182- {
183- "@value" : string ;
184- } ,
185- ] ;
86+ "http://www.w3.org/ns/hydra/core#title" : [ JsonLdValue < string > ] ;
87+ "http://www.w3.org/ns/hydra/core#description" : [ JsonLdValue < string > ] ;
88+ "http://www.w3.org/ns/hydra/core#entrypoint" : [ JsonLdValue < string > ] ;
18689 "http://www.w3.org/ns/hydra/core#supportedClass" : ExpandedClass [ ] ;
18790}
18891
18992export interface Entrypoint {
19093 "@id" : string ;
19194 "@type" : [ string ] ;
192- [ key : string ] :
193- | [
194- {
195- "@id" : string ;
196- } ,
197- ]
198- | string
199- | [ string ] ;
95+ [ key : string ] : [ JsonLdId ] | string | [ string ] ;
20096}
0 commit comments