@api-client/core 0.6.13 → 0.6.16
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/build/browser.d.ts +9 -2
- package/build/browser.js +12 -2
- package/build/browser.js.map +1 -1
- package/build/index.d.ts +9 -2
- package/build/index.js +12 -2
- package/build/index.js.map +1 -1
- package/build/src/amf/AmfMixin.d.ts +395 -0
- package/build/src/amf/AmfMixin.js +1146 -0
- package/build/src/amf/AmfMixin.js.map +1 -0
- package/build/src/amf/AmfSerializer.d.ts +136 -0
- package/build/src/amf/AmfSerializer.js +1913 -0
- package/build/src/amf/AmfSerializer.js.map +1 -0
- package/build/src/amf/AmfShapeGenerator.d.ts +85 -0
- package/build/src/amf/AmfShapeGenerator.js +385 -0
- package/build/src/amf/AmfShapeGenerator.js.map +1 -0
- package/build/src/amf/AmfTypes.d.ts +24 -0
- package/build/src/amf/AmfTypes.js +122 -0
- package/build/src/amf/AmfTypes.js.map +1 -0
- package/build/src/amf/ApiExampleGenerator.d.ts +36 -0
- package/build/src/amf/ApiExampleGenerator.js +109 -0
- package/build/src/amf/ApiExampleGenerator.js.map +1 -0
- package/build/src/amf/ApiMonacoSchemaGenerator.d.ts +67 -0
- package/build/src/amf/ApiMonacoSchemaGenerator.js +243 -0
- package/build/src/amf/ApiMonacoSchemaGenerator.js.map +1 -0
- package/build/src/amf/ApiSchemaGenerator.d.ts +55 -0
- package/build/src/amf/ApiSchemaGenerator.js +94 -0
- package/build/src/amf/ApiSchemaGenerator.js.map +1 -0
- package/build/src/amf/ApiSchemaValues.d.ts +98 -0
- package/build/src/amf/ApiSchemaValues.js +382 -0
- package/build/src/amf/ApiSchemaValues.js.map +1 -0
- package/build/src/amf/Utils.d.ts +41 -0
- package/build/src/amf/Utils.js +176 -0
- package/build/src/amf/Utils.js.map +1 -0
- package/build/src/amf/data-node/DataNodeBase.d.ts +31 -0
- package/build/src/amf/data-node/DataNodeBase.js +77 -0
- package/build/src/amf/data-node/DataNodeBase.js.map +1 -0
- package/build/src/amf/data-node/JsonDataNodeGenerator.d.ts +15 -0
- package/build/src/amf/data-node/JsonDataNodeGenerator.js +24 -0
- package/build/src/amf/data-node/JsonDataNodeGenerator.js.map +1 -0
- package/build/src/amf/data-node/UrlEncodedDataNodeGenerator.d.ts +13 -0
- package/build/src/amf/data-node/UrlEncodedDataNodeGenerator.js +42 -0
- package/build/src/amf/data-node/UrlEncodedDataNodeGenerator.js.map +1 -0
- package/build/src/amf/data-node/XmlDataNodeGenerator.d.ts +21 -0
- package/build/src/amf/data-node/XmlDataNodeGenerator.js +30 -0
- package/build/src/amf/data-node/XmlDataNodeGenerator.js.map +1 -0
- package/build/src/amf/definitions/Amf.d.ts +362 -0
- package/build/src/amf/definitions/Amf.js +2 -0
- package/build/src/amf/definitions/Amf.js.map +1 -0
- package/build/src/amf/definitions/Api.d.ts +381 -0
- package/build/src/amf/definitions/Api.js +2 -0
- package/build/src/amf/definitions/Api.js.map +1 -0
- package/build/src/amf/definitions/Base.d.ts +11 -0
- package/build/src/amf/definitions/Base.js +2 -0
- package/build/src/amf/definitions/Base.js.map +1 -0
- package/build/src/amf/definitions/Namespace.d.ts +311 -0
- package/build/src/amf/definitions/Namespace.js +330 -0
- package/build/src/amf/definitions/Namespace.js.map +1 -0
- package/build/src/amf/definitions/Shapes.d.ts +309 -0
- package/build/src/amf/definitions/Shapes.js +87 -0
- package/build/src/amf/definitions/Shapes.js.map +1 -0
- package/build/src/amf/models/AmfDataNode.d.ts +68 -0
- package/build/src/amf/models/AmfDataNode.js +188 -0
- package/build/src/amf/models/AmfDataNode.js.map +1 -0
- package/build/src/amf/shape/ShapeBase.d.ts +75 -0
- package/build/src/amf/shape/ShapeBase.js +90 -0
- package/build/src/amf/shape/ShapeBase.js.map +1 -0
- package/build/src/amf/shape/ShapeJsonSchemaGenerator.d.ts +46 -0
- package/build/src/amf/shape/ShapeJsonSchemaGenerator.js +406 -0
- package/build/src/amf/shape/ShapeJsonSchemaGenerator.js.map +1 -0
- package/build/src/amf/shape/ShapeXmlSchemaGenerator.d.ts +84 -0
- package/build/src/amf/shape/ShapeXmlSchemaGenerator.js +820 -0
- package/build/src/amf/shape/ShapeXmlSchemaGenerator.js.map +1 -0
- package/build/src/models/Thing.d.ts +17 -0
- package/build/src/models/Thing.js +19 -1
- package/build/src/models/Thing.js.map +1 -1
- package/build/src/models/data/Bindings.d.ts +161 -0
- package/build/src/models/data/Bindings.js +2 -0
- package/build/src/models/data/Bindings.js.map +1 -0
- package/build/src/models/data/DataAssociation.d.ts +135 -14
- package/build/src/models/data/DataAssociation.js +154 -21
- package/build/src/models/data/DataAssociation.js.map +1 -1
- package/build/src/models/data/DataAssociationSchema.d.ts +36 -0
- package/build/src/models/data/DataEntity.d.ts +76 -4
- package/build/src/models/data/DataEntity.js +136 -9
- package/build/src/models/data/DataEntity.js.map +1 -1
- package/build/src/models/data/DataFile.d.ts +3 -0
- package/build/src/models/data/DataFile.js +3 -0
- package/build/src/models/data/DataFile.js.map +1 -1
- package/build/src/models/data/DataModel.d.ts +1 -1
- package/build/src/models/data/DataModel.js.map +1 -1
- package/build/src/models/data/DataNamespace.d.ts +6 -0
- package/build/src/models/data/DataNamespace.js +11 -1
- package/build/src/models/data/DataNamespace.js.map +1 -1
- package/build/src/models/data/DataProperty.d.ts +131 -36
- package/build/src/models/data/DataProperty.js +200 -17
- package/build/src/models/data/DataProperty.js.map +1 -1
- package/data/apis/oas-date/oas-date.yaml +28 -0
- package/data/apis/oas-types/oas-types.yaml +159 -0
- package/data/apis/oas-unions/oas-unions.yaml +75 -0
- package/data/apis/raml-date/raml-date.raml +28 -0
- package/data/apis/recursive/recursive.raml +14 -0
- package/data/apis/schema-api/examples/person.json +14 -0
- package/data/apis/schema-api/examples/person.raml +14 -0
- package/data/apis/schema-api/examples/person.url.encoded +1 -0
- package/data/apis/schema-api/examples/person.xml +14 -0
- package/data/apis/schema-api/library/demo-types.raml +43 -0
- package/data/apis/schema-api/schema-api.raml +644 -0
- package/data/apis/schema-api/schemas/person.json +104 -0
- package/data/apis/schema-api/schemas/person.xsd +26 -0
- package/data/apis/schema-api/types/DemoPerson.raml +67 -0
- package/data/model.js +106 -0
- package/data/models/oas-date.json +637 -0
- package/data/models/oas-types.json +5352 -0
- package/data/models/oas-unions.json +1881 -0
- package/data/models/raml-date.json +1096 -0
- package/data/models/recursive.json +610 -0
- package/data/models/schema-api.json +37319 -0
- package/package.json +9 -6
- package/src/amf/AmfMixin.ts +1623 -0
- package/src/amf/AmfSerializer.ts +2028 -0
- package/src/amf/AmfShapeGenerator.ts +400 -0
- package/src/amf/AmfTypes.ts +126 -0
- package/src/amf/ApiExampleGenerator.ts +112 -0
- package/src/amf/ApiMonacoSchemaGenerator.ts +296 -0
- package/src/amf/ApiSchemaGenerator.ts +108 -0
- package/src/amf/ApiSchemaValues.ts +411 -0
- package/src/amf/Utils.ts +182 -0
- package/src/amf/data-node/DataNodeBase.ts +81 -0
- package/src/amf/data-node/JsonDataNodeGenerator.ts +26 -0
- package/src/amf/data-node/README.md +3 -0
- package/src/amf/data-node/UrlEncodedDataNodeGenerator.ts +43 -0
- package/src/amf/data-node/XmlDataNodeGenerator.ts +38 -0
- package/src/amf/definitions/Amf.ts +443 -0
- package/src/amf/definitions/Api.ts +427 -0
- package/src/amf/definitions/Base.ts +13 -0
- package/src/amf/definitions/Namespace.ts +341 -0
- package/src/amf/definitions/Shapes.ts +414 -0
- package/src/amf/models/AmfDataNode.ts +200 -0
- package/src/amf/shape/README.md +4 -0
- package/src/amf/shape/ShapeBase.ts +160 -0
- package/src/amf/shape/ShapeJsonSchemaGenerator.ts +422 -0
- package/src/amf/shape/ShapeXmlSchemaGenerator.ts +876 -0
- package/src/models/Thing.ts +25 -1
- package/src/models/data/Bindings.ts +186 -0
- package/src/models/data/DataAssociation.ts +226 -29
- package/src/models/data/DataAssociationSchema.ts +38 -0
- package/src/models/data/DataEntity.ts +170 -13
- package/src/models/data/DataFile.ts +3 -0
- package/src/models/data/DataModel.ts +1 -1
- package/src/models/data/DataNamespace.ts +16 -1
- package/src/models/data/DataProperty.ts +250 -47
- package/build/src/models/data/DataPropertySchema.d.ts +0 -125
- package/build/src/models/data/DataPropertySchema.js +0 -33
- package/build/src/models/data/DataPropertySchema.js.map +0 -1
- package/src/models/data/DataPropertySchema.ts +0 -156
|
@@ -0,0 +1,43 @@
|
|
|
1
|
+
import { DataNodeBase } from './DataNodeBase.js';
|
|
2
|
+
import { IDataNode } from '../definitions/Shapes.js';
|
|
3
|
+
import { UrlEncoder } from "../../lib/parsers/UrlEncoder.js";
|
|
4
|
+
|
|
5
|
+
/** @typedef {import('../../helpers/api').ApiDataNode} ApiDataNode */
|
|
6
|
+
|
|
7
|
+
export class UrlEncodedDataNodeGenerator extends DataNodeBase {
|
|
8
|
+
/**
|
|
9
|
+
* Generates a JSON example from the structured value.
|
|
10
|
+
* @param node The AMF's data node to transform into a schema.
|
|
11
|
+
* @param shapeName When provided it wraps the returned value with the shape name.
|
|
12
|
+
* @returns Undefined when passed non-DataNode domain element.
|
|
13
|
+
*/
|
|
14
|
+
generate(node: IDataNode, shapeName?: string): string | undefined {
|
|
15
|
+
const result = this.processNode(node);
|
|
16
|
+
const isArray = Array.isArray(result);
|
|
17
|
+
if (shapeName && (typeof result !== 'object' || isArray)) {
|
|
18
|
+
if (isArray) {
|
|
19
|
+
return result.map(v => `${shapeName}[]=${v}`).filter(v => !!v).join('&');
|
|
20
|
+
}
|
|
21
|
+
return `${shapeName}=${result}`;
|
|
22
|
+
}
|
|
23
|
+
return this.createUrlEncoded(result);
|
|
24
|
+
}
|
|
25
|
+
|
|
26
|
+
createUrlEncoded(obj: any): string {
|
|
27
|
+
if (typeof obj !== 'object') {
|
|
28
|
+
return String(obj);
|
|
29
|
+
}
|
|
30
|
+
const parts = Object.keys(obj).map((key) => {
|
|
31
|
+
let value = obj[key];
|
|
32
|
+
if (typeof value === 'object' && value !== null) {
|
|
33
|
+
value = this.createUrlEncoded(value);
|
|
34
|
+
} else if (value) {
|
|
35
|
+
value = UrlEncoder.encodeQueryString(value, true);
|
|
36
|
+
} else if (value === null) {
|
|
37
|
+
value = 'null';
|
|
38
|
+
}
|
|
39
|
+
return `${key}=${value}`;
|
|
40
|
+
});
|
|
41
|
+
return parts.join('&');
|
|
42
|
+
}
|
|
43
|
+
}
|
|
@@ -0,0 +1,38 @@
|
|
|
1
|
+
import { DataNodeBase } from './DataNodeBase.js';
|
|
2
|
+
import { toXml } from '../Utils.js';
|
|
3
|
+
import { IDataNode } from '../definitions/Shapes.js';
|
|
4
|
+
|
|
5
|
+
export interface IDataGenerateOptions {
|
|
6
|
+
/**
|
|
7
|
+
* A string to prefix the generated value with. This is added before the element.
|
|
8
|
+
*/
|
|
9
|
+
indent?: number;
|
|
10
|
+
}
|
|
11
|
+
|
|
12
|
+
/**
|
|
13
|
+
* A class that processes AMF's `structuredValue` into an XML example.
|
|
14
|
+
*/
|
|
15
|
+
export class XmlDataNodeGenerator extends DataNodeBase {
|
|
16
|
+
/**
|
|
17
|
+
* Generates a JSON example from the structured value.
|
|
18
|
+
*
|
|
19
|
+
* @param node The AMF's data node to transform into a schema.
|
|
20
|
+
* @param shapeName When provided it wraps the returned value with the shape name.
|
|
21
|
+
* @returns Undefined when passed non-DataNode domain element.
|
|
22
|
+
*/
|
|
23
|
+
generate(node: IDataNode, shapeName?: string, opts: IDataGenerateOptions = {}): string | undefined {
|
|
24
|
+
const result = this.processNode(node);
|
|
25
|
+
if (!result) {
|
|
26
|
+
return result;
|
|
27
|
+
}
|
|
28
|
+
const { indent = 0 } = opts;
|
|
29
|
+
const tabs = new Array(indent).fill(' ').join('');
|
|
30
|
+
if (shapeName) {
|
|
31
|
+
if (Array.isArray(result)) {
|
|
32
|
+
return result.map(v => `${tabs}<${shapeName}>${toXml(v)}</${shapeName}>`).filter(v => !!v).join('\n');
|
|
33
|
+
}
|
|
34
|
+
return `${tabs}<${shapeName}>${toXml(result)}</${shapeName}>`;
|
|
35
|
+
}
|
|
36
|
+
return `${toXml(result, indent)}`;
|
|
37
|
+
}
|
|
38
|
+
}
|
|
@@ -0,0 +1,443 @@
|
|
|
1
|
+
export declare interface DomainElement {
|
|
2
|
+
'@id': string;
|
|
3
|
+
'@type': string[];
|
|
4
|
+
'@context'?: Record<string, string>;
|
|
5
|
+
'http://a.ml/vocabularies/document#customDomainProperties'?: [];
|
|
6
|
+
}
|
|
7
|
+
|
|
8
|
+
export interface ExternalDomainElement extends DomainElement {
|
|
9
|
+
'http://a.ml/vocabularies/document#raw': LdValueString[];
|
|
10
|
+
'http://a.ml/vocabularies/core#mediaType': LdValueString[];
|
|
11
|
+
}
|
|
12
|
+
|
|
13
|
+
export declare interface Linkable {
|
|
14
|
+
'http://a.ml/vocabularies/document#link-target'?: LdIdValue[];
|
|
15
|
+
'http://a.ml/vocabularies/document#link-label'?: LdValueString[];
|
|
16
|
+
}
|
|
17
|
+
|
|
18
|
+
export declare interface LdValue<T> {
|
|
19
|
+
'@value': T;
|
|
20
|
+
}
|
|
21
|
+
|
|
22
|
+
export declare interface LdIdValue {
|
|
23
|
+
'@id': string;
|
|
24
|
+
}
|
|
25
|
+
|
|
26
|
+
export declare interface LdValueString extends LdValue<string> {
|
|
27
|
+
}
|
|
28
|
+
|
|
29
|
+
export declare interface LdValueBoolean extends LdValue<boolean> {
|
|
30
|
+
}
|
|
31
|
+
|
|
32
|
+
export declare interface LdValueNumber extends LdValue<number> {
|
|
33
|
+
}
|
|
34
|
+
|
|
35
|
+
export declare interface LdValueRange extends LdIdValue {
|
|
36
|
+
'@type'?: string[];
|
|
37
|
+
}
|
|
38
|
+
|
|
39
|
+
export interface AmfDocument extends DomainElement {
|
|
40
|
+
'http://a.ml/vocabularies/document#version'?: LdValueString[];
|
|
41
|
+
'http://a.ml/vocabularies/document#root'?: LdValueBoolean[];
|
|
42
|
+
'http://a.ml/vocabularies/document#encodes'?: DomainElement[];
|
|
43
|
+
'http://a.ml/vocabularies/document#references'?: DomainElement[];
|
|
44
|
+
'http://a.ml/vocabularies/document#declares'?: DomainElement[];
|
|
45
|
+
}
|
|
46
|
+
|
|
47
|
+
export interface Api extends DomainElement {
|
|
48
|
+
'http://a.ml/vocabularies/core#name'?: LdValueString[];
|
|
49
|
+
'http://a.ml/vocabularies/core#description'?: LdValueString[];
|
|
50
|
+
'http://a.ml/vocabularies/apiContract#server'?: Server[];
|
|
51
|
+
'http://a.ml/vocabularies/apiContract#accepts'?: LdValueString[];
|
|
52
|
+
'http://a.ml/vocabularies/apiContract#contentType'?: LdValueString[];
|
|
53
|
+
'http://a.ml/vocabularies/apiContract#scheme'?: LdValueString[];
|
|
54
|
+
'http://a.ml/vocabularies/core#version'?: LdValueString[];
|
|
55
|
+
'http://a.ml/vocabularies/core#documentation'?: CreativeWork[];
|
|
56
|
+
'http://a.ml/vocabularies/apiContract#endpoint'?: EndPoint[];
|
|
57
|
+
'http://a.ml/vocabularies/apiContract#tag'?: Tag[];
|
|
58
|
+
'http://a.ml/vocabularies/core#provider'?: Organization[];
|
|
59
|
+
'http://a.ml/vocabularies/core#license'?: License[];
|
|
60
|
+
}
|
|
61
|
+
|
|
62
|
+
export interface WebApi extends Api {}
|
|
63
|
+
export interface AsyncApi extends Api {}
|
|
64
|
+
|
|
65
|
+
export interface Module extends DomainElement {
|
|
66
|
+
'http://a.ml/vocabularies/document#version'?: LdValueString[];
|
|
67
|
+
'http://a.ml/vocabularies/document#root'?: LdValueBoolean[];
|
|
68
|
+
'http://a.ml/vocabularies/document#declares'?: DomainElement[];
|
|
69
|
+
'http://a.ml/vocabularies/document#usage'?: LdValueString[];
|
|
70
|
+
}
|
|
71
|
+
|
|
72
|
+
export interface DataTypeFragment extends DomainElement {
|
|
73
|
+
'http://a.ml/vocabularies/document#version'?: LdValueString[];
|
|
74
|
+
'http://a.ml/vocabularies/document#root'?: LdValueBoolean[];
|
|
75
|
+
'http://a.ml/vocabularies/document#encodes'?: Shape[];
|
|
76
|
+
'http://a.ml/vocabularies/document#references'?: DomainElement[];
|
|
77
|
+
}
|
|
78
|
+
|
|
79
|
+
export interface ExternalFragment extends DomainElement {
|
|
80
|
+
'http://a.ml/vocabularies/document#version'?: LdValueString[];
|
|
81
|
+
'http://a.ml/vocabularies/document#root'?: LdValueBoolean[];
|
|
82
|
+
'http://a.ml/vocabularies/document#encodes'?: ExternalDomainElement[];
|
|
83
|
+
}
|
|
84
|
+
|
|
85
|
+
export interface Organization extends DomainElement {
|
|
86
|
+
'http://a.ml/vocabularies/core#email'?: LdValueString[];
|
|
87
|
+
'http://a.ml/vocabularies/core#url'?: LdValueString[];
|
|
88
|
+
'http://a.ml/vocabularies/core#name'?: LdValueString[];
|
|
89
|
+
}
|
|
90
|
+
|
|
91
|
+
export interface License extends DomainElement {
|
|
92
|
+
'http://a.ml/vocabularies/core#url'?: LdValueString[];
|
|
93
|
+
'http://a.ml/vocabularies/core#name'?: LdValueString[];
|
|
94
|
+
}
|
|
95
|
+
|
|
96
|
+
export declare interface Server extends DomainElement {
|
|
97
|
+
'http://a.ml/vocabularies/core#urlTemplate'?: LdValueString[];
|
|
98
|
+
'http://a.ml/vocabularies/core#description'?: LdValueString[];
|
|
99
|
+
'http://a.ml/vocabularies/apiContract#variable'?: Parameter[];
|
|
100
|
+
}
|
|
101
|
+
|
|
102
|
+
export declare interface EndPoint extends DomainElement {
|
|
103
|
+
'http://a.ml/vocabularies/core#name'?: LdValueString[];
|
|
104
|
+
'http://a.ml/vocabularies/core#description'?: LdValueString[];
|
|
105
|
+
'http://a.ml/vocabularies/apiContract#guiSummary'?: LdValueString[];
|
|
106
|
+
'http://a.ml/vocabularies/apiContract#path'?: LdValueString[];
|
|
107
|
+
'http://a.ml/vocabularies/apiContract#supportedOperation'?: Operation[];
|
|
108
|
+
'http://a.ml/vocabularies/apiContract#parameter'?: Parameter[];
|
|
109
|
+
'http://a.ml/vocabularies/apiContract#payload'?: Payload[];
|
|
110
|
+
'http://a.ml/vocabularies/apiContract#server'?: Server[];
|
|
111
|
+
'http://a.ml/vocabularies/security#security'?: SecurityRequirement[];
|
|
112
|
+
'http://a.ml/vocabularies/document#extends'?: ParametrizedDeclaration[];
|
|
113
|
+
}
|
|
114
|
+
|
|
115
|
+
export declare interface Operation extends DomainElement {
|
|
116
|
+
'http://a.ml/vocabularies/apiContract#method': LdValueString[];
|
|
117
|
+
'http://a.ml/vocabularies/core#name'?: LdValueString[];
|
|
118
|
+
'http://a.ml/vocabularies/core#description'?: LdValueString[];
|
|
119
|
+
'http://a.ml/vocabularies/shapes#deprecated'?: LdValueBoolean[];
|
|
120
|
+
'http://a.ml/vocabularies/apiContract#guiSummary'?: LdValueString[];
|
|
121
|
+
'http://a.ml/vocabularies/core#documentation'?: CreativeWork[];
|
|
122
|
+
'http://a.ml/vocabularies/apiContract#scheme'?: LdValueString[];
|
|
123
|
+
'http://a.ml/vocabularies/apiContract#accepts'?: LdValueString[];
|
|
124
|
+
'http://a.ml/vocabularies/apiContract#contentType'?: LdValueString[];
|
|
125
|
+
'http://a.ml/vocabularies/apiContract#expects'?: Request[];
|
|
126
|
+
'http://a.ml/vocabularies/apiContract#returns'?: Response[];
|
|
127
|
+
'http://a.ml/vocabularies/security#security'?: SecurityRequirement[];
|
|
128
|
+
'http://a.ml/vocabularies/apiContract#callback'?: Callback[];
|
|
129
|
+
'http://a.ml/vocabularies/apiContract#server'?: Server[];
|
|
130
|
+
'http://a.ml/vocabularies/document#extends'?: ParametrizedTrait[];
|
|
131
|
+
}
|
|
132
|
+
|
|
133
|
+
export interface Payload extends DomainElement {
|
|
134
|
+
'http://a.ml/vocabularies/core#mediaType': LdValueString[];
|
|
135
|
+
'http://a.ml/vocabularies/shapes#schema'?: DomainElement[];
|
|
136
|
+
'http://a.ml/vocabularies/core#name'?: LdValueString[];
|
|
137
|
+
'http://a.ml/vocabularies/apiContract#examples'?: Example[];
|
|
138
|
+
// encoding: Encoding[]
|
|
139
|
+
}
|
|
140
|
+
|
|
141
|
+
export interface Request extends DomainElement {
|
|
142
|
+
'http://a.ml/vocabularies/core#description'?: LdValueString[];
|
|
143
|
+
'http://a.ml/vocabularies/apiContract#payload'?: Payload[];
|
|
144
|
+
'http://a.ml/vocabularies/apiContract#required'?: LdValueBoolean[];
|
|
145
|
+
'http://a.ml/vocabularies/apiContract#parameter'?: Parameter[];
|
|
146
|
+
'http://a.ml/vocabularies/apiContract#uriParameter'?: Parameter[];
|
|
147
|
+
'http://a.ml/vocabularies/apiContract#header'?: Parameter[];
|
|
148
|
+
'http://a.ml/vocabularies/apiContract#cookieParameter'?: Parameter[];
|
|
149
|
+
'http://a.ml/vocabularies/apiContract#queryString'?: Shape;
|
|
150
|
+
}
|
|
151
|
+
|
|
152
|
+
export interface Response extends DomainElement {
|
|
153
|
+
'http://a.ml/vocabularies/apiContract#statusCode': LdValueString[];
|
|
154
|
+
'http://a.ml/vocabularies/core#name'?: LdValueString[];
|
|
155
|
+
'http://a.ml/vocabularies/core#description'?: LdValueString[];
|
|
156
|
+
'http://a.ml/vocabularies/apiContract#payload'?: Payload[];
|
|
157
|
+
'http://a.ml/vocabularies/apiContract#header'?: Parameter[];
|
|
158
|
+
'http://a.ml/vocabularies/apiContract#examples'?: Example[];
|
|
159
|
+
'http://a.ml/vocabularies/apiContract#link'?: TemplatedLink[];
|
|
160
|
+
}
|
|
161
|
+
|
|
162
|
+
export declare interface Parameter extends DomainElement {
|
|
163
|
+
'http://a.ml/vocabularies/core#name'?: LdValueString[];
|
|
164
|
+
'http://a.ml/vocabularies/core#description'?: LdValueString[];
|
|
165
|
+
'http://a.ml/vocabularies/shapes#schema'?: DomainElement[];
|
|
166
|
+
'http://a.ml/vocabularies/shapes#deprecated'?: LdValueBoolean[];
|
|
167
|
+
'http://a.ml/vocabularies/apiContract#paramName'?: LdValueString[];
|
|
168
|
+
'http://a.ml/vocabularies/apiContract#required'?: LdValueBoolean[];
|
|
169
|
+
'http://a.ml/vocabularies/apiContract#binding'?: LdValueString[];
|
|
170
|
+
'http://a.ml/vocabularies/apiContract#allowEmptyValue'?: LdValueBoolean[];
|
|
171
|
+
'http://a.ml/vocabularies/apiContract#style'?: LdValueString[];
|
|
172
|
+
'http://a.ml/vocabularies/apiContract#explode'?: LdValueBoolean[];
|
|
173
|
+
'http://a.ml/vocabularies/apiContract#allowReserved'?: LdValueBoolean[];
|
|
174
|
+
|
|
175
|
+
// payloads: Payload[]
|
|
176
|
+
// examples: Example[]
|
|
177
|
+
}
|
|
178
|
+
|
|
179
|
+
export interface TemplatedLink extends DomainElement {
|
|
180
|
+
'http://a.ml/vocabularies/core#name'?: LdValueString[];
|
|
181
|
+
'http://a.ml/vocabularies/core#description'?: LdValueString[];
|
|
182
|
+
'http://a.ml/vocabularies/apiContract#operationId': LdValueString[];
|
|
183
|
+
'http://a.ml/vocabularies/apiContract#mapping': IriTemplateMapping[];
|
|
184
|
+
'http://a.ml/vocabularies/apiContract#server'?: Server[];
|
|
185
|
+
// not sure what this is
|
|
186
|
+
// template: StrField
|
|
187
|
+
// requestBody: StrField
|
|
188
|
+
}
|
|
189
|
+
|
|
190
|
+
export interface IriTemplateMapping extends DomainElement {
|
|
191
|
+
'http://a.ml/vocabularies/apiContract#templateVariable'?: LdValueString[];
|
|
192
|
+
'http://a.ml/vocabularies/apiContract#linkExpression'?: LdValueString[];
|
|
193
|
+
}
|
|
194
|
+
|
|
195
|
+
export declare interface Shape extends DomainElement, Linkable {
|
|
196
|
+
'http://www.w3.org/ns/shacl#name'?: LdValueString[];
|
|
197
|
+
'http://a.ml/vocabularies/core#description'?: LdValueString[];
|
|
198
|
+
'http://a.ml/vocabularies/core#displayName'?: LdValueString[];
|
|
199
|
+
'http://www.w3.org/ns/shacl#defaultValueStr'?: LdValueString[];
|
|
200
|
+
'http://www.w3.org/ns/shacl#defaultValue'?: DataNode[];
|
|
201
|
+
'http://a.ml/vocabularies/shapes#readOnly'?: LdValueBoolean[];
|
|
202
|
+
'http://a.ml/vocabularies/shapes#writeOnly'?: LdValueBoolean[];
|
|
203
|
+
'http://a.ml/vocabularies/shapes#deprecated'?: LdValueBoolean[];
|
|
204
|
+
'http://a.ml/vocabularies/document#location'?: LdValueString[];
|
|
205
|
+
'http://www.w3.org/ns/shacl#or'?: Shape[];
|
|
206
|
+
'http://www.w3.org/ns/shacl#and'?: Shape[];
|
|
207
|
+
'http://www.w3.org/ns/shacl#xone'?: Shape[];
|
|
208
|
+
'http://www.w3.org/ns/shacl#not'?: Shape[];
|
|
209
|
+
// values: DataNode[]
|
|
210
|
+
// inherits: Shape[]
|
|
211
|
+
}
|
|
212
|
+
|
|
213
|
+
export declare interface PropertyShape extends Shape {
|
|
214
|
+
'http://www.w3.org/ns/shacl#path'?: LdIdValue[];
|
|
215
|
+
'http://a.ml/vocabularies/shapes#range'?: Shape[];
|
|
216
|
+
'http://www.w3.org/ns/shacl#minCount'?: LdValueNumber[];
|
|
217
|
+
'http://www.w3.org/ns/shacl#maxCount'?: LdValueNumber[];
|
|
218
|
+
// patternName: StrField
|
|
219
|
+
}
|
|
220
|
+
|
|
221
|
+
export declare interface AnyShape extends Shape {
|
|
222
|
+
'http://a.ml/vocabularies/core#documentation'?: CreativeWork[];
|
|
223
|
+
'http://a.ml/vocabularies/shapes#xmlSerialization'?: DomainElement[];
|
|
224
|
+
'http://a.ml/vocabularies/apiContract#examples'?: DomainElement[];
|
|
225
|
+
'http://a.ml/vocabularies/core#name'?: LdValueString[];
|
|
226
|
+
}
|
|
227
|
+
|
|
228
|
+
export declare interface DataArrangeShape extends AnyShape {
|
|
229
|
+
// minItems: IntField
|
|
230
|
+
// maxItems: IntField
|
|
231
|
+
// uniqueItems: BoolField
|
|
232
|
+
}
|
|
233
|
+
|
|
234
|
+
export declare interface ArrayShape extends DataArrangeShape {
|
|
235
|
+
'http://a.ml/vocabularies/shapes#items'?: Shape[];
|
|
236
|
+
}
|
|
237
|
+
|
|
238
|
+
export declare interface UnionShape extends AnyShape {
|
|
239
|
+
'http://a.ml/vocabularies/shapes#anyOf'?: Shape[];
|
|
240
|
+
}
|
|
241
|
+
|
|
242
|
+
export declare interface TupleShape extends AnyShape {
|
|
243
|
+
'http://a.ml/vocabularies/shapes#items'?: Shape[];
|
|
244
|
+
}
|
|
245
|
+
|
|
246
|
+
export declare interface FileShape extends AnyShape {
|
|
247
|
+
'http://a.ml/vocabularies/shapes#fileType'?: LdValueString[];
|
|
248
|
+
'http://www.w3.org/ns/shacl#pattern'?: LdValueString[];
|
|
249
|
+
'http://www.w3.org/ns/shacl#minLength'?: LdValueNumber[];
|
|
250
|
+
'http://www.w3.org/ns/shacl#maxLength'?: LdValueNumber[];
|
|
251
|
+
'http://a.ml/vocabularies/shapes#minimum'?: LdValueNumber[];
|
|
252
|
+
'http://a.ml/vocabularies/shapes#maximum'?: LdValueNumber[];
|
|
253
|
+
'http://a.ml/vocabularies/shapes#exclusiveMinimum'?: LdValueBoolean[];
|
|
254
|
+
'http://a.ml/vocabularies/shapes#exclusiveMaximum'?: LdValueBoolean[];
|
|
255
|
+
'http://a.ml/vocabularies/shapes#format'?: LdValueString[];
|
|
256
|
+
'http://a.ml/vocabularies/shapes#multipleOf'?: LdValueNumber[];
|
|
257
|
+
}
|
|
258
|
+
|
|
259
|
+
export declare interface NilShape extends AnyShape {
|
|
260
|
+
}
|
|
261
|
+
|
|
262
|
+
export declare interface RecursiveShape extends Shape {
|
|
263
|
+
'http://a.ml/vocabularies/shapes#fixPoint'?: LdIdValue[];
|
|
264
|
+
'http://a.ml/vocabularies/document#recursive'?: LdValueBoolean[];
|
|
265
|
+
}
|
|
266
|
+
|
|
267
|
+
export declare interface ScalarShape extends Shape {
|
|
268
|
+
'http://www.w3.org/ns/shacl#datatype'?: LdIdValue[];
|
|
269
|
+
'http://www.w3.org/ns/shacl#pattern'?: LdValueString[];
|
|
270
|
+
'http://www.w3.org/ns/shacl#minLength'?: LdValueNumber[];
|
|
271
|
+
'http://www.w3.org/ns/shacl#maxLength'?: LdValueNumber[];
|
|
272
|
+
'http://a.ml/vocabularies/shapes#minimum': LdValueNumber[];
|
|
273
|
+
'http://a.ml/vocabularies/shapes#maximum': LdValueNumber[];
|
|
274
|
+
'http://a.ml/vocabularies/shapes#exclusiveMinimum': LdValueBoolean[];
|
|
275
|
+
'http://a.ml/vocabularies/shapes#exclusiveMaximum': LdValueBoolean[];
|
|
276
|
+
'http://a.ml/vocabularies/shapes#format'?: LdValueString[];
|
|
277
|
+
'http://a.ml/vocabularies/shapes#multipleOf'?: LdValueNumber[];
|
|
278
|
+
}
|
|
279
|
+
|
|
280
|
+
export declare interface SchemaShape extends Shape {
|
|
281
|
+
'http://a.ml/vocabularies/core#mediaType': LdValueString[];
|
|
282
|
+
'http://a.ml/vocabularies/document#raw'?: LdValueString[];
|
|
283
|
+
}
|
|
284
|
+
|
|
285
|
+
export declare interface NodeShape extends AnyShape {
|
|
286
|
+
// minProperties: IntField
|
|
287
|
+
// maxProperties: IntField
|
|
288
|
+
'http://www.w3.org/ns/shacl#closed'?: LdValueBoolean[];
|
|
289
|
+
// customShapeProperties?: PropertyShape[]
|
|
290
|
+
// customShapePropertyDefinitions?: PropertyShape[]
|
|
291
|
+
'http://a.ml/vocabularies/shapes#discriminator'?: LdValueString[];
|
|
292
|
+
'http://a.ml/vocabularies/shapes#discriminatorValue'?: LdValueString[];
|
|
293
|
+
'http://www.w3.org/ns/shacl#property'?: PropertyShape[];
|
|
294
|
+
// dependencies: PropertyDependencies[]
|
|
295
|
+
}
|
|
296
|
+
|
|
297
|
+
export declare interface DataNode extends DomainElement {
|
|
298
|
+
'http://a.ml/vocabularies/core#name'?: LdValueString[];
|
|
299
|
+
}
|
|
300
|
+
|
|
301
|
+
export declare interface ObjectNode extends DataNode {
|
|
302
|
+
// [key: string]: DataNode[];
|
|
303
|
+
}
|
|
304
|
+
|
|
305
|
+
export declare interface ArrayNode extends DataNode {
|
|
306
|
+
}
|
|
307
|
+
|
|
308
|
+
export declare interface ScalarNode extends DataNode {
|
|
309
|
+
'http://a.ml/vocabularies/data#value'?: LdValueString[];
|
|
310
|
+
'http://www.w3.org/ns/shacl#datatype'?: LdIdValue[];
|
|
311
|
+
}
|
|
312
|
+
|
|
313
|
+
export declare interface Example extends DomainElement, Linkable {
|
|
314
|
+
'http://a.ml/vocabularies/core#name'?: LdValueString[];
|
|
315
|
+
'http://a.ml/vocabularies/core#displayName'?: LdValueString[];
|
|
316
|
+
'http://a.ml/vocabularies/core#description'?: LdValueString[];
|
|
317
|
+
'http://a.ml/vocabularies/data#value'?: LdIdValue[];
|
|
318
|
+
'http://a.ml/vocabularies/document#structuredValue'?: DataNode[];
|
|
319
|
+
'http://a.ml/vocabularies/document#strict'?: LdValueBoolean[];
|
|
320
|
+
'http://a.ml/vocabularies/core#mediaType'?: LdValueString[];
|
|
321
|
+
'http://a.ml/vocabularies/document#raw'?: LdValueString[];
|
|
322
|
+
}
|
|
323
|
+
|
|
324
|
+
export interface CreativeWork extends DomainElement {
|
|
325
|
+
'http://a.ml/vocabularies/core#title'?: LdValueString[];
|
|
326
|
+
'http://a.ml/vocabularies/core#description'?: LdValueString[];
|
|
327
|
+
}
|
|
328
|
+
|
|
329
|
+
export interface SecurityRequirement extends DomainElement {
|
|
330
|
+
'http://a.ml/vocabularies/security#schemes'?: ParametrizedSecurityScheme[];
|
|
331
|
+
// not sure if this is the right key. Can't generate an example.
|
|
332
|
+
'http://a.ml/vocabularies/security#name'?: LdValueString[];
|
|
333
|
+
}
|
|
334
|
+
|
|
335
|
+
export interface ParametrizedSecurityScheme extends DomainElement {
|
|
336
|
+
'http://a.ml/vocabularies/core#name'?: LdValueString[];
|
|
337
|
+
'http://a.ml/vocabularies/security#scheme'?: SecurityScheme[];
|
|
338
|
+
'http://a.ml/vocabularies/security#settings': Settings[];
|
|
339
|
+
}
|
|
340
|
+
|
|
341
|
+
export interface SecurityScheme extends DomainElement {
|
|
342
|
+
'http://a.ml/vocabularies/core#name'?: LdValueString[];
|
|
343
|
+
'http://a.ml/vocabularies/core#description'?: LdValueString[];
|
|
344
|
+
'http://a.ml/vocabularies/security#type'?: LdValueString[];
|
|
345
|
+
'http://a.ml/vocabularies/core#displayName'?: LdValueString[];
|
|
346
|
+
'http://a.ml/vocabularies/apiContract#parameter'?: Parameter[];
|
|
347
|
+
'http://a.ml/vocabularies/apiContract#header'?: Parameter[];
|
|
348
|
+
'http://a.ml/vocabularies/security#settings'?: Settings[];
|
|
349
|
+
'http://a.ml/vocabularies/apiContract#response'?: Response[];
|
|
350
|
+
'http://a.ml/vocabularies/apiContract#queryString'?: Shape;
|
|
351
|
+
}
|
|
352
|
+
|
|
353
|
+
export interface Settings extends DomainElement {
|
|
354
|
+
// additionalProperties: DataNode;
|
|
355
|
+
}
|
|
356
|
+
|
|
357
|
+
export interface OAuth1Settings extends Settings {
|
|
358
|
+
'http://a.ml/vocabularies/security#requestTokenUri'?: LdValueString[];
|
|
359
|
+
'http://a.ml/vocabularies/security#authorizationUri'?: LdValueString[];
|
|
360
|
+
'http://a.ml/vocabularies/security#tokenCredentialsUri'?: LdValueString[];
|
|
361
|
+
'http://a.ml/vocabularies/security#signature': LdValueString[];
|
|
362
|
+
}
|
|
363
|
+
|
|
364
|
+
export interface OAuth2Settings extends Settings {
|
|
365
|
+
'http://a.ml/vocabularies/security#authorizationGrant': LdValueString[];
|
|
366
|
+
'http://a.ml/vocabularies/security#flows'?: OAuth2Flow[];
|
|
367
|
+
}
|
|
368
|
+
|
|
369
|
+
export interface OAuth2Flow extends Settings {
|
|
370
|
+
'http://a.ml/vocabularies/security#authorizationUri'?: LdValueString[];
|
|
371
|
+
'http://a.ml/vocabularies/security#accessTokenUri': LdValueString[];
|
|
372
|
+
'http://a.ml/vocabularies/security#flow'?: LdValueString[];
|
|
373
|
+
'http://a.ml/vocabularies/security#refreshUri': LdValueString[];
|
|
374
|
+
'http://a.ml/vocabularies/security#scope'?: Scope[];
|
|
375
|
+
}
|
|
376
|
+
|
|
377
|
+
export interface ApiKeySettings extends Settings {
|
|
378
|
+
'http://a.ml/vocabularies/core#name': LdValueString[];
|
|
379
|
+
'http://a.ml/vocabularies/security#in': LdValueString[];
|
|
380
|
+
}
|
|
381
|
+
|
|
382
|
+
export interface HttpSettings extends Settings {
|
|
383
|
+
'http://a.ml/vocabularies/security#scheme'?: LdValueString[];
|
|
384
|
+
'http://a.ml/vocabularies/security#bearerFormat'?: LdValueString[];
|
|
385
|
+
}
|
|
386
|
+
|
|
387
|
+
export interface OpenIdConnectSettings extends Settings {
|
|
388
|
+
'http://a.ml/vocabularies/security#openIdConnectUrl': LdValueString[];
|
|
389
|
+
}
|
|
390
|
+
|
|
391
|
+
export interface Scope extends DomainElement {
|
|
392
|
+
'http://a.ml/vocabularies/core#name': LdValueString[];
|
|
393
|
+
'http://a.ml/vocabularies/core#description': LdValueString[];
|
|
394
|
+
}
|
|
395
|
+
|
|
396
|
+
export interface Callback extends DomainElement {
|
|
397
|
+
'http://a.ml/vocabularies/core#name'?: LdValueString[];
|
|
398
|
+
'http://a.ml/vocabularies/apiContract#expression'?: LdValueString[];
|
|
399
|
+
'http://a.ml/vocabularies/apiContract#endpoint'?: EndPoint[];
|
|
400
|
+
}
|
|
401
|
+
|
|
402
|
+
export interface XMLSerializer extends DomainElement {
|
|
403
|
+
'http://a.ml/vocabularies/shapes#xmlAttribute'?: LdValueBoolean[];
|
|
404
|
+
'http://a.ml/vocabularies/shapes#xmlWrapped'?: LdValueBoolean[];
|
|
405
|
+
'http://a.ml/vocabularies/shapes#xmlName'?: LdValueBoolean[];
|
|
406
|
+
}
|
|
407
|
+
|
|
408
|
+
export interface Tag extends DomainElement {
|
|
409
|
+
'http://a.ml/vocabularies/core#name'?: LdValueString[];
|
|
410
|
+
}
|
|
411
|
+
|
|
412
|
+
export interface DocumentSourceMaps extends DomainElement {
|
|
413
|
+
'http://a.ml/vocabularies/document-source-maps#synthesized-field'?: SynthesizedField[];
|
|
414
|
+
'http://a.ml/vocabularies/document-source-maps#lexical'?: SynthesizedField[];
|
|
415
|
+
'http://a.ml/vocabularies/document-source-maps#tracked-element'?: SynthesizedField[];
|
|
416
|
+
}
|
|
417
|
+
|
|
418
|
+
export interface SynthesizedField {
|
|
419
|
+
'@id': string;
|
|
420
|
+
'http://a.ml/vocabularies/document-source-maps#element'?: LdValueString[];
|
|
421
|
+
'http://a.ml/vocabularies/document-source-maps#value'?: LdValueString[];
|
|
422
|
+
}
|
|
423
|
+
|
|
424
|
+
export interface ParametrizedDeclaration extends DomainElement {
|
|
425
|
+
'http://a.ml/vocabularies/core#name'?: LdValueString[];
|
|
426
|
+
'http://a.ml/vocabularies/document#target'?: AbstractDeclaration[];
|
|
427
|
+
'http://a.ml/vocabularies/document#variable'?: VariableValue[];
|
|
428
|
+
}
|
|
429
|
+
|
|
430
|
+
export interface VariableValue extends DomainElement {
|
|
431
|
+
'http://a.ml/vocabularies/core#name'?: LdValueString[];
|
|
432
|
+
'http://a.ml/vocabularies/document#value'?: DataNode[];
|
|
433
|
+
}
|
|
434
|
+
|
|
435
|
+
export interface AbstractDeclaration extends DomainElement {
|
|
436
|
+
'http://a.ml/vocabularies/core#name'?: LdValueString[];
|
|
437
|
+
'http://a.ml/vocabularies/core#description'?: LdValueString[];
|
|
438
|
+
'http://a.ml/vocabularies/document#dataNode'?: DataNode[];
|
|
439
|
+
'http://a.ml/vocabularies/document#variable'?: LdValueString[];
|
|
440
|
+
}
|
|
441
|
+
|
|
442
|
+
export interface ParametrizedTrait extends ParametrizedDeclaration {}
|
|
443
|
+
export interface ParametrizedResourceType extends ParametrizedDeclaration {}
|