Skip to content

Commit e943f1d

Browse files
authored
Fix JS typedoc links (#2067)
1 parent 2b85f4f commit e943f1d

File tree

474 files changed

+45
-15527
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

474 files changed

+45
-15527
lines changed

docs-js/features/connectivity/destination-cache-isolation.mdx

Lines changed: 10 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -22,20 +22,20 @@ To reduce the number of calls to fetch destinations, the SAP Cloud SDK provides
2222
This guide explains how destinations are cached and shows options for destination cache configuration.
2323
The general destination lookup is described in [this guide](./destination.mdx).
2424

25-
All options discussed in the following are part of the [`DestinationFetchOptions`](pathname:///api/v4/interfaces/sap_cloud_sdk_connectivity.DestinationFetchOptions.html).
25+
All options discussed in the following are part of the [`DestinationFetchOptions`](pathname:///api/v4/interfaces/sap-cloud-sdk_connectivity.DestinationFetchOptions.html).
2626
You use those options when:
2727

2828
- executing requests through a generated client using `execute()`
29-
- executing generic HTTP requests using [`executeHttpRequest()`](pathname:///api/v4/functions/sap_cloud_sdk_http_client.executeHttpRequest.html)
30-
- retrieving destinations using [`getDestination()`](pathname:///api/v4/functions/sap_cloud_sdk_connectivity.getDestination.html)
31-
- retrieving all destinations using[`getAllDestinationsFromDestinationService()`](pathname:///api/v4/functions/sap_cloud_sdk_connectivity.getAllDestinationsFromDestinationService.html)
29+
- executing generic HTTP requests using [`executeHttpRequest()`](pathname:///api/v4/functions/sap-cloud-sdk_http_client.executeHttpRequest.html)
30+
- retrieving destinations using [`getDestination()`](pathname:///api/v4/functions/sap-cloud-sdk_connectivity.getDestination.html)
31+
- retrieving all destinations using[`getAllDestinationsFromDestinationService()`](pathname:///api/v4/functions/sap-cloud-sdk_connectivity.getAllDestinationsFromDestinationService.html)
3232

3333
The following examples will use `execute()` for brevity, but could be replaced by all of the above.
3434

3535
## Destination Cache
3636

3737
By default, destination caching is enabled.
38-
You can disable it by setting the [`useCache`](pathname:///api/v4/interfaces/sap_cloud_sdk_connectivity.DestinationFetchOptions.html#useCache) option to `false`:
38+
You can disable it by setting the [`useCache`](pathname:///api/v4/interfaces/sap-cloud-sdk_connectivity.DestinationFetchOptions.html#useCache) option to `false`:
3939

4040
```ts
4141
.execute({ destinationName: 'DESTINATION', jwt: 'JWT', useCache: false })
@@ -87,7 +87,7 @@ Assume you have a multi-tenant scenario, where you pass a JWT to obtain the dest
8787
The JWT contains a `user_id` but the authentication type of the destination is user-independent.
8888
The default isolation strategy for this case is `tenant-user`, although `tenant` would suffice.
8989

90-
For such cases, you can manually enforce weaker isolation by passing the [`isolationStrategy`](pathname:///api/v4/interfaces/sap_cloud_sdk_connectivity.DestinationFetchOptions.html#isolationStrategy) option:
90+
For such cases, you can manually enforce weaker isolation by passing the [`isolationStrategy`](pathname:///api/v4/interfaces/sap-cloud-sdk_connectivity.DestinationFetchOptions.html#isolationStrategy) option:
9191

9292
```ts
9393
.execute({
@@ -107,7 +107,7 @@ An erroneous configuration can have severe consequences like privilege escalatio
107107

108108
By default, destinations are cached in-memory.
109109
If you need more control over the destination cache, e.g. to use a persistent or distributed cache, you can create a custom destination cache.
110-
For this, implement the [`DestinationCacheInterface`](pathname:///api/v4/interfaces/sap_cloud_sdk_connectivity.DestinationCacheInterface.html):
110+
For this, implement the [`DestinationCacheInterface`](pathname:///api/v4/interfaces/sap-cloud-sdk_connectivity.DestinationCacheInterface.html):
111111

112112
```ts
113113
export interface DestinationCacheInterface {
@@ -134,7 +134,7 @@ export interface DestinationCacheInterface {
134134
}
135135
```
136136

137-
Note that each item in the cache is represented using the [`CacheEntry<T>`](pathname:///api/v4/interfaces/sap_cloud_sdk_connectivity.CacheEntry.html) type, which defines two properties:
137+
Note that each item in the cache is represented using the [`CacheEntry<T>`](pathname:///api/v4/interfaces/sap-cloud-sdk_connectivity.CacheEntry.html) type, which defines two properties:
138138

139139
- `entry` - The item, i.e. destination, you want to cache.
140140
- `expires` - The expiration time of the entry in milliseconds.
@@ -167,7 +167,7 @@ const customCache = {
167167
};
168168
```
169169

170-
To use your custom cache, pass your implementation to the global [`setDestinationCache()`](pathname:///api/v4/functions/sap_cloud_sdk_connectivity.setDestinationCache.html) function before fetching destinations for the first time.
170+
To use your custom cache, pass your implementation to the global [`setDestinationCache()`](pathname:///api/v4/functions/sap-cloud-sdk_connectivity.setDestinationCache.html) function before fetching destinations for the first time.
171171
All subsequent calls to fetch destinations will use the custom cache.
172172

173173
```ts
@@ -180,7 +180,7 @@ setDestinationCache(customCache);
180180

181181
## Registered Destination Cache
182182

183-
When [registering destinations](./destination.mdx#register-destination) using the [`registerDestination()`](pathname:///api/v4/functions/sap_cloud_sdk_connectivity.registerDestination.html) function, destinations are stored in a separate cache.
183+
When [registering destinations](./destination.mdx#register-destination) using the [`registerDestination()`](pathname:///api/v4/functions/sap-cloud-sdk_connectivity.registerDestination.html) function, destinations are stored in a separate cache.
184184
This cache is always enabled and behaves similarly to the destination cache discussed above.
185185
It uses the same JWT-dependent defaults for the [isolation strategy](#isolation-strategy) as the destination cache.
186186
To change the isolation strategy pass the `isolationStrategy` option to the function.

docs-js/features/connectivity/destination.mdx

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -33,7 +33,7 @@ Some reasons to separate destinations and the application are:
3333
- Different customers may want to configure different systems.
3434
- Multiple applications might want to access the same systems.
3535

36-
Use [destinations](pathname:///api/v3/interfaces/sap_cloud_sdk_connectivity.Destination.html) to execute [arbitrary requests](./generic-http-client.mdx), [OData requests](../odata/overview.mdx), and [OpenAPI requests](../openapi/overview.mdx).
36+
Use [destinations](pathname:///api/v4/interfaces/sap-cloud-sdk_connectivity.Destination.html) to execute [arbitrary requests](./generic-http-client.mdx), [OData requests](../odata/overview.mdx), and [OpenAPI requests](../openapi/overview.mdx).
3737
The following examples use `req.execute()`, assuming req is an OData or OpenAPI request, to demonstrate options for the destination lookup.
3838
The same options apply to `executeHttpRequest()`.
3939

@@ -64,7 +64,7 @@ If you want to cache destinations in production, use [`registerDestination()`](#
6464
:::
6565

6666
You can provide destinations in the `destinations` environment variable.
67-
The value of the environment variable is expected to be a stringified JSON array, where the items adhere to the [Destination interface](pathname:///api/v3/interfaces/sap_cloud_sdk_connectivity.Destination.html).
67+
The value of the environment variable is expected to be a stringified JSON array, where the items adhere to the [Destination interface](pathname:///api/v4/interfaces/sap-cloud-sdk_connectivity.Destination.html).
6868

6969
Example:
7070

@@ -84,7 +84,7 @@ Note that this approach is **not suitable for multi-tenant scenarios**.
8484
#### Testing with Local Environment Variables
8585

8686
The SAP Cloud SDK provides a `setTestDestination()` function to add a destination to the environment variable for the current process programmatically.
87-
It takes a [destination object](pathname:///api/v3/interfaces/sap_cloud_sdk_connectivity.Destination.html), transforms it to a JSON object, and adds it to `process.env.destinations`.
87+
It takes a [destination object](pathname:///api/v4/interfaces/sap-cloud-sdk_connectivity.Destination.html), transforms it to a JSON object, and adds it to `process.env.destinations`.
8888

8989
```ts
9090
import { setTestDestination } from '@sap-cloud-sdk/test-util';
@@ -280,7 +280,7 @@ Note, that if your `serviceBindingTransformFn()` function does not provide a nam
280280

281281
More advanced examples with service token fetching can be found in [service-binding-to-destination.ts](https://github.com/SAP/cloud-sdk-js/blob/main/packages/connectivity/src/scp-cf/destination/service-binding-to-destination.ts).
282282

283-
If you want to skip the destination lookup and consider only the service bindings, call the [getDestinationFromServiceBinding()](pathname:///api/v3/functions/sap_cloud_sdk_connectivity.getDestinationFromServiceBinding.html) function with the service name and options.
283+
If you want to skip the destination lookup and consider only the service bindings, call the [getDestinationFromServiceBinding()](pathname:///api/v4/functions/sap-cloud-sdk_connectivity.getDestinationFromServiceBinding.html) function with the service name and options.
284284

285285
```ts
286286
const destination = getDestinationFromServiceBinding({

docs-js/features/connectivity/generic-http-client.mdx

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -53,7 +53,7 @@ The generic HTTP client is based on the open source [axios HTTP client](https://
5353

5454
## `executeHttpRequest`
5555

56-
The most basic way to use the SAP Cloud SDK HTTP client is the function [executeHttpRequest](pathname:///api/v3/functions/sap_cloud_sdk_http_client.executeHttpRequest.html).
56+
The most basic way to use the SAP Cloud SDK HTTP client is the function [executeHttpRequest](pathname:///api/v4/functions/sap-cloud-sdk_http_client.executeHttpRequest.html).
5757

5858
```ts
5959
executeHttpRequest(destination, requestConfig, httpRequestOptions): Promise<HttpResponse>;
@@ -62,8 +62,8 @@ executeHttpRequest(destination, requestConfig, httpRequestOptions): Promise<Http
6262
It takes the following parameters:
6363

6464
- The `destination` argument is of type `DestinationOrFetchOptions`
65-
- This can either be a [destination object](pathname:///api/v3/interfaces/sap_cloud_sdk_connectivity.Destination.html) which was already fetched or an [object containing a destination name and an optional JWT](pathname:///api/v3/interfaces/sap_cloud_sdk_connectivity.DestinationFetchOptions.html)
66-
- The `requestConfig` argument is of type [HttpRequestConfig](pathname:///api/v3/types/sap_cloud_sdk_http_client.HttpRequestConfig.html).
65+
- This can either be a [destination object](pathname:///api/v4/interfaces/sap-cloud-sdk_connectivity.Destination.html) which was already fetched or an [object containing a destination name and an optional JWT](pathname:///api/v4/interfaces/sap-cloud-sdk_connectivity.DestinationFetchOptions.html)
66+
- The `requestConfig` argument is of type [HttpRequestConfig](pathname:///api/v4/types/sap-cloud-sdk_http_client.HttpRequestConfig.html).
6767
- This parameter is optional
6868
- The default value is a `GET` request
6969
- The `httpRequestOptions` argument is of type `HttpRequestOptions`
@@ -98,7 +98,7 @@ For keys that exist for both objects, the `requestConfig` takes precedence.
9898

9999
:::
100100

101-
The `executeHttpRequest()` function returns a promise of type [HttpResponse](pathname:///api/v3/interfaces/sap_cloud_sdk_http_client.HttpResponse.html).
101+
The `executeHttpRequest()` function returns a promise of type [HttpResponse](pathname:///api/v4/interfaces/sap-cloud-sdk_http_client.HttpResponse.html).
102102

103103
### Parameter Encoding
104104

@@ -177,7 +177,7 @@ It is not available for `GET` requests.
177177
:::
178178
179179
Fetching the CSRF token can be enabled or disabled via the `httpRequestOptions.fetchCsrfToken` parameter of `executeHttpRequest()` function.
180-
See its [API documentation](pathname:///api/v3/interfaces/sap_cloud_sdk_http_client.HttpRequestOptions.html) for details.
180+
See its [API documentation](pathname:///api/v4/interfaces/sap-cloud-sdk_http_client.HttpRequestOptions.html) for details.
181181
182182
For example, to avoid CSRF token fetching when doing a `PUT`, `POST`, `DELETE`, or `PATCH` request, disable it like in this example:
183183

docs-js/features/odata/execute-odata-request.mdx

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -167,10 +167,10 @@ The following table describes how types are mapped by default:
167167
| `Edm.DateTimeOffset` | `moment.Moment` | |
168168
| `Edm.Binary` | `string` | |
169169
| `Edm.DateTime` | `moment.Moment` | OData v2 only, precision limited to milliseconds |
170-
| `Edm.Time` | [`Time`](pathname:///api/v3/interfaces/sap_cloud_sdk_odata_common.Time.html) | OData v2 only, does not consider time zones |
170+
| `Edm.Time` | [`Time`](pathname:///api/v4/interfaces/sap-cloud-sdk_odata_common.Time.html) | OData v2 only, does not consider time zones |
171171
| `Edm.Date` | `moment.Moment` | OData v4 only |
172172
| `Edm.Duration` | `moment.Duration` | OData v4 only |
173-
| `Edm.TimeOfDay` | [`Time`](pathname:///api/v3/interfaces/sap_cloud_sdk_odata_common.Time.html) | OData v4 only, does not consider time-zones |
173+
| `Edm.TimeOfDay` | [`Time`](pathname:///api/v4/interfaces/sap-cloud-sdk_odata_common.Time.html) | OData v4 only, does not consider time-zones |
174174
| Any other type | `any` | |
175175

176176
If you require the raw OData response, you can look into [getting the raw response and the original request](#getting-the-raw-response-and-the-original-request).

docs-js/tutorials/multi-tenant-application.mdx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -537,7 +537,7 @@ You are on tenant: a89ea924-d9c2-4gaf-84fb-3ffcff7891011. The destination descri
537537
```
538538
539539
The destination of the subscriber account is used at runtime, because the call in the `service-endpoint.ts` uses the selection strategy `subscriberFirst`.
540-
You can change this by using [different selection strategies](pathname:///api/v3/variables/sap_cloud_sdk_connectivity.DestinationSelectionStrategies).
540+
You can change this by using [different selection strategies](pathname:///api/v4/variables/sap-cloud-sdk_connectivity.DestinationSelectionStrategies).
541541
This enables consumers to maintain their custom destination used within a multi-tenant application.
542542
The destination from the provider account could be seen as a fallback.
543543

docs-js_versioned_docs/version-v3/features/connectivity/destination-cache-isolation.mdx

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -22,19 +22,19 @@ To reduce the number of calls to fetch destinations, the SAP Cloud SDK provides
2222
This guide explains how destinations are cached and shows options for destination cache configuration.
2323
The general destination lookup is described in [this guide](./destination.mdx).
2424

25-
All options discussed in the following are part of the [`DestinationFetchOptions`](pathname:///api/v3/interfaces/sap_cloud_sdk_connectivity.DestinationFetchOptions.html).
25+
All options discussed in the following are part of the [`DestinationFetchOptions`](pathname:///api/v3/interfaces/sap-cloud-sdk_connectivity.DestinationFetchOptions.html).
2626
You use those options when:
2727

2828
- executing requests through a generated client using `execute()`
29-
- executing generic HTTP requests using [`executeHttpRequest()`](pathname:///api/v3/functions/sap_cloud_sdk_http_client.executeHttpRequest.html)
30-
- retrieving destinations using [`getDestination()`](pathname:///api/v3/functions/sap_cloud_sdk_connectivity.getDestination.html)
29+
- executing generic HTTP requests using [`executeHttpRequest()`](pathname:///api/v3/functions/sap-cloud-sdk_http_client.executeHttpRequest.html)
30+
- retrieving destinations using [`getDestination()`](pathname:///api/v3/functions/sap-cloud-sdk_connectivity.getDestination.html)
3131

3232
The following examples will use `execute()` for brevity, but could be replaced by all of the above.
3333

3434
## Destination Cache
3535

3636
By default, destination caching is disabled.
37-
Enable it by setting the [`useCache`](pathname:///api/v3/interfaces/sap_cloud_sdk_connectivity.DestinationFetchOptions.html#useCache) option to `true`:
37+
Enable it by setting the [`useCache`](pathname:///api/v3/interfaces/sap-cloud-sdk_connectivity.DestinationFetchOptions.html#useCache) option to `true`:
3838

3939
```ts
4040
.execute({ destinationName: 'DESTINATION', jwt: 'JWT', useCache: true })
@@ -86,7 +86,7 @@ Assume you have a multi-tenant scenario, where you pass a JWT to obtain the dest
8686
The JWT contains a `user_id` but the authentication type of the destination is user-independent.
8787
The default isolation strategy for this case is `tenant-user`, although `tenant` would suffice.
8888

89-
For such cases, you can manually enforce weaker isolation by passing the [`isolationStrategy`](pathname:///api/v3/interfaces/sap_cloud_sdk_connectivity.DestinationFetchOptions.html#isolationStrategy) option:
89+
For such cases, you can manually enforce weaker isolation by passing the [`isolationStrategy`](pathname:///api/v3/interfaces/sap-cloud-sdk_connectivity.DestinationFetchOptions.html#isolationStrategy) option:
9090

9191
```ts
9292
.execute({
@@ -106,7 +106,7 @@ An erroneous configuration can have severe consequences like privilege escalatio
106106

107107
When caching is enabled, destinations are cached in-memory.
108108
If you need more control over the destination cache, e.g. to use a persistent or distributed cache, you can create a custom destination cache.
109-
For this, implement the [`DestinationCacheInterface`](pathname:///api/v3/interfaces/sap_cloud_sdk_connectivity.DestinationCacheInterface.html):
109+
For this, implement the [`DestinationCacheInterface`](pathname:///api/v3/interfaces/sap-cloud-sdk_connectivity.DestinationCacheInterface.html):
110110

111111
```ts
112112
export interface DestinationCacheInterface {
@@ -133,7 +133,7 @@ export interface DestinationCacheInterface {
133133
}
134134
```
135135

136-
Note that each item in the cache is represented using the [`CacheEntry<T>`](pathname:///api/v3/interfaces/sap_cloud_sdk_connectivity.CacheEntry.html) type, which defines two properties:
136+
Note that each item in the cache is represented using the [`CacheEntry<T>`](pathname:///api/v3/interfaces/sap-cloud-sdk_connectivity.CacheEntry.html) type, which defines two properties:
137137

138138
- `entry` - The item, i.e. destination, you want to cache.
139139
- `expires` - The expiration time of the entry in milliseconds.
@@ -166,7 +166,7 @@ const customCache = {
166166
};
167167
```
168168

169-
To use your custom cache, pass your implementation to the global [`setDestinationCache()`](pathname:///api/v3/functions/sap_cloud_sdk_connectivity.setDestinationCache.html) function before fetching destinations for the first time.
169+
To use your custom cache, pass your implementation to the global [`setDestinationCache()`](pathname:///api/v3/functions/sap-cloud-sdk_connectivity.setDestinationCache.html) function before fetching destinations for the first time.
170170
All subsequent calls to fetch destinations will use the custom cache.
171171

172172
```ts
@@ -179,7 +179,7 @@ setDestinationCache(customCache);
179179

180180
## Registered Destination Cache
181181

182-
When [registering destinations](./destination.mdx#register-destination) using the [`registerDestination()`](pathname:///api/v3/functions/sap_cloud_sdk_connectivity.registerDestination.html) function, destinations are stored in a separate cache.
182+
When [registering destinations](./destination.mdx#register-destination) using the [`registerDestination()`](pathname:///api/v3/functions/sap-cloud-sdk_connectivity.registerDestination.html) function, destinations are stored in a separate cache.
183183
This cache is always enabled and behaves similarly to the destination cache discussed above.
184184
It uses the same JWT-dependent defaults for the [isolation strategy](#isolation-strategy) as the destination cache.
185185
To change the isolation strategy pass the `isolationStrategy` option to the function.

0 commit comments

Comments
 (0)