@open-resource-discovery/specification 1.12.3-rc1 → 1.12.3-rc3

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.
@@ -0,0 +1,129 @@
1
+ /**
2
+ * The ORD configuration response will indicate that ORD is available for the given host and how to proceed with the discovery.
3
+ *
4
+ * Most notably, the ORD configuration will tell an ORD consumer which ORD documents are available and where/how they can be accessed.
5
+ *
6
+ * The configuration endpoint is a [Well-Known URI](https://tools.ietf.org/html/rfc8615#section-3) discovery mechanism.
7
+ *
8
+ * This JSON Schema describes the [ORD configuration interface](https://open-resource-discovery.github.io/specification/spec-v1/interfaces/configuration) of the [ORD specification](https://open-resource-discovery.github.io/specification/).
9
+ */
10
+ export interface OrdConfiguration {
11
+ /**
12
+ * Optional URL to the ORD Configuration schema (defined as JSON Schema).
13
+ * If given, this enables code intelligence and validation in supported editors (like VSCode) and tools.
14
+ */
15
+ $schema?: (string | "https://open-resource-discovery.github.io/specification/spec-v1/interfaces/Configuration.schema.json#") & string;
16
+ /**
17
+ * Optional [base URL](../index.md#def-base-url) that can be used to resolve the relative URLs to the ORD Documents.
18
+ *
19
+ * The `baseUrl` MUST not contain a leading slash.
20
+ *
21
+ * If you do not provide this property, the base URL is assumed to be the URL of the config endpoint without `/.well-known/open-resource-discovery` suffix.
22
+ * This implies that either a `baseUrl` or only absolute URLs MUST be provided when no standardized well-known URI is used.
23
+ * If both a `baseUrl` and a well-known URI is provided, the explicit `baseUrl` takes precedence.
24
+ */
25
+ baseUrl?: string;
26
+ openResourceDiscoveryV1: OrdV1Support;
27
+ }
28
+ /**
29
+ * The existence of this version indicates that Open Resource Discovery is supported in Version 1.x
30
+ */
31
+ export interface OrdV1Support {
32
+ /**
33
+ * List of all ORD documents that can be retrieved.
34
+ *
35
+ * While it is possible to describe everything in one big ORD document, for bigger services/use cases it might be preferable to split the information into multiple documents.
36
+ *
37
+ * For more details how to implement this correctly, please refer to the [ORD configuration endpoint](../index.md#ord-configuration-endpoint) section and the [considerations on the granularity of ORD documents](../index.md#considerations-on-the-granularity-of-ord-documents).
38
+ */
39
+ documents?: OrdV1DocumentDescription[];
40
+ capabilities?: OrdV1Capabilities;
41
+ }
42
+ /**
43
+ * Describes an [ORD Document](../index.md#ord-document) that is available for pull transport consumption.
44
+ */
45
+ export interface OrdV1DocumentDescription {
46
+ /**
47
+ * URL or relative URL to the ORD document (provided by an ORD document endpoint).
48
+ *
49
+ * It is RECOMMENDED to provide a relative URL (to `baseUrl`).
50
+ * If a `baseUrl` is given, the relative URLs will be resolved with it.
51
+ *
52
+ * If the URL is not relative to the system providing this information or no well-known URI is used,
53
+ * either the baseUrl or a full URL to the document MUST be provided.
54
+ */
55
+ url: string;
56
+ /**
57
+ * With ORD it's possible to describe a system from a static or a dynamic [perspective](../index.md#perspectives) (for more details, follow the link).
58
+ *
59
+ * It is strongly RECOMMENDED to mark all static ORD documents with perspective `system-version`.
60
+ *
61
+ * It is RECOMMENDED to describe dynamic metadata in both static system-version perspective and additionally describe the system-instance perspective where it diverges from the static metadata.
62
+ *
63
+ * If not provided, this defaults to `system-instance`, which is the most precise description but also the most costly to replicate.
64
+ *
65
+ * Please read the [article on perspectives](../concepts/perspectives) for more explanations.
66
+ */
67
+ perspective?: "system-version" | "system-instance" | "system-independent";
68
+ /**
69
+ * Whether the information in the ORD document is **system instance aware**.
70
+ *
71
+ * This is the case when the provided ORD document potentially differs between **system instances**.
72
+ * Please note that if a system does not support multi-tenancy, most likely each system instance has its own
73
+ * URL and different system instances could even be deployed in a different state (version).
74
+ * If those conditions apply, `systemInstanceAware` MUST be set to true.
75
+ *
76
+ * An ORD aggregator that represents a system instance aware perspective MUST fetch a system instance aware ORD document,
77
+ * not just once per system type but once per **system instance**.
78
+ *
79
+ * Please note that you can define system instance awareness also on the level of an ORD resource.
80
+ * It is even possible and valid to have an ORD document that is NOT system instance aware to contain resources that are.
81
+ * This can be the case because the resource is described in separate resource definition formats which would change,
82
+ * while the ORD document itself would not change (the links to the resource definition files stay the same).
83
+ *
84
+ * If some ORD information is **system instance aware** and some is not,
85
+ * we RECOMMEND to split the information into separate documents and mark their system instance awareness accordingly.
86
+ */
87
+ systemInstanceAware?: boolean;
88
+ /**
89
+ * List of supported access strategies for retrieving the metadata from the ORD provider.
90
+ *
91
+ * An ORD Consumer/ORD Aggregator MAY freely choose any of the listed strategies.
92
+ *
93
+ * @minItems 1
94
+ */
95
+ accessStrategies: [OrdV1DocumentAccessStrategy, ...OrdV1DocumentAccessStrategy[]];
96
+ }
97
+ /**
98
+ * Defines the [access strategy](../../spec-extensions/access-strategies/) for accessing the ORD documents from the ORD provider.
99
+ */
100
+ export interface OrdV1DocumentAccessStrategy {
101
+ /**
102
+ * Defines the authentication/authorization strategy through which the referenced ORD Documents can be accessed.
103
+ */
104
+ type: (string | "open" | "basic-auth" | "sap:oauth-client-credentials:v1" | "sap:cmp-mtls:v1" | "sap.businesshub:basic-auth:v1" | "custom") & string;
105
+ /**
106
+ * If the fixed `type` enum values need to be extended, an arbitrary `customType` can be provided.
107
+ *
108
+ * MUST be a valid [Specification ID](../index.md#specification-id).
109
+ *
110
+ * MUST only be provided if `type` is set to `custom`.
111
+ */
112
+ customType?: string;
113
+ /**
114
+ * Human-readable description about how the access is set up, notated in [CommonMark](https://spec.commonmark.org/) (Markdown).
115
+ *
116
+ * MUST only be provided if `type` is set to `custom`.
117
+ */
118
+ customDescription?: string;
119
+ }
120
+ /**
121
+ * List of capabilities that are supported by the ORD provider.
122
+ */
123
+ export interface OrdV1Capabilities {
124
+ /**
125
+ * Whether the ORD provider supports the optional [select parameter](../index.md#select-parameter) for retrieving the ORD config and ORD documents.
126
+ */
127
+ selector?: boolean;
128
+ [k: string]: unknown | undefined;
129
+ }
@@ -0,0 +1,3 @@
1
+ "use strict";
2
+ // AUTO-GENERATED definition files. Do not modify directly.
3
+ Object.defineProperty(exports, "__esModule", { value: true });