@dynatrace-sdk/client-app-engine-edge-connect
Advanced tools
Comparing version 1.0.1 to 1.1.1
@@ -5,2 +5,14 @@ # AppEngine - EdgeConnect | ||
## 1.1.1 | ||
### Patch Changes | ||
- Update JSDoc examples. | ||
## 1.1.0 | ||
### Minor Changes | ||
- add match functionality (getting a MatchedEdgeConnect for a provided URL) | ||
## 1.0.1 | ||
@@ -7,0 +19,0 @@ |
299
cjs/index.js
@@ -39,4 +39,6 @@ /** | ||
EdgeConnectClient: () => EdgeConnectClient, | ||
MetadataOauthClientStatus: () => MetadataOauthClientStatus, | ||
_ConstraintViolationTransformation: () => constraint_violation_transformation_exports, | ||
_EdgeConnectInstanceTransformation: () => edge_connect_instance_transformation_exports, | ||
_EdgeConnectNameTransformation: () => edge_connect_name_transformation_exports, | ||
_EdgeConnectTransformation: () => edge_connect_transformation_exports, | ||
@@ -48,2 +50,5 @@ _EdgeConnectsTransformation: () => edge_connects_transformation_exports, | ||
_HostPatternTransformation: () => host_pattern_transformation_exports, | ||
_MatchedEdgeConnectTransformation: () => matched_edge_connect_transformation_exports, | ||
_MatchedResponseTransformation: () => matched_response_transformation_exports, | ||
_MetadataOauthClientStatusTransformation: () => metadata_oauth_client_status_transformation_exports, | ||
_MetadataTransformation: () => metadata_transformation_exports, | ||
@@ -196,9 +201,9 @@ _ModificationInfoTransformation: () => modification_info_transformation_exports, | ||
__export(edge_connect_transformation_exports, { | ||
fromJson: () => fromJson5, | ||
toJson: () => toJson5 | ||
fromJson: () => fromJson7, | ||
toJson: () => toJson7 | ||
}); | ||
// packages/client/app-engine-edge-connect/src/lib/models/host-pattern.transformation.ts | ||
var host_pattern_transformation_exports = {}; | ||
__export(host_pattern_transformation_exports, { | ||
// packages/client/app-engine-edge-connect/src/lib/models/edge-connect-name.transformation.ts | ||
var edge_connect_name_transformation_exports = {}; | ||
__export(edge_connect_name_transformation_exports, { | ||
fromJson: () => fromJson, | ||
@@ -214,7 +219,20 @@ toJson: () => toJson | ||
// packages/client/app-engine-edge-connect/src/lib/models/host-pattern.transformation.ts | ||
var host_pattern_transformation_exports = {}; | ||
__export(host_pattern_transformation_exports, { | ||
fromJson: () => fromJson2, | ||
toJson: () => toJson2 | ||
}); | ||
function fromJson2($model) { | ||
return String($model); | ||
} | ||
function toJson2($model) { | ||
return String($model); | ||
} | ||
// packages/client/app-engine-edge-connect/src/lib/models/metadata.transformation.ts | ||
var metadata_transformation_exports = {}; | ||
__export(metadata_transformation_exports, { | ||
fromJson: () => fromJson3, | ||
toJson: () => toJson3 | ||
fromJson: () => fromJson5, | ||
toJson: () => toJson5 | ||
}); | ||
@@ -225,6 +243,6 @@ | ||
__export(edge_connect_instance_transformation_exports, { | ||
fromJson: () => fromJson2, | ||
toJson: () => toJson2 | ||
fromJson: () => fromJson3, | ||
toJson: () => toJson3 | ||
}); | ||
function fromJson2($model) { | ||
function fromJson3($model) { | ||
const { version, instanceId } = $model; | ||
@@ -236,3 +254,3 @@ return { | ||
} | ||
function toJson2($model) { | ||
function toJson3($model) { | ||
const { version, instanceId } = $model; | ||
@@ -245,13 +263,28 @@ return { | ||
// packages/client/app-engine-edge-connect/src/lib/models/metadata-oauth-client-status.transformation.ts | ||
var metadata_oauth_client_status_transformation_exports = {}; | ||
__export(metadata_oauth_client_status_transformation_exports, { | ||
fromJson: () => fromJson4, | ||
toJson: () => toJson4 | ||
}); | ||
function fromJson4($model) { | ||
return String($model); | ||
} | ||
function toJson4($model) { | ||
return String($model); | ||
} | ||
// packages/client/app-engine-edge-connect/src/lib/models/metadata.transformation.ts | ||
function fromJson3($model) { | ||
const { instances } = $model; | ||
function fromJson5($model) { | ||
const { instances, oauthClientStatus } = $model; | ||
return { | ||
instances: instances !== void 0 && instances !== null ? instances?.map((innerValue) => fromJson2(innerValue)) : void 0 | ||
instances: instances !== void 0 && instances !== null ? instances?.map((innerValue) => fromJson3(innerValue)) : void 0, | ||
oauthClientStatus: oauthClientStatus !== void 0 && oauthClientStatus !== null ? fromJson4(oauthClientStatus) : void 0 | ||
}; | ||
} | ||
function toJson3($model) { | ||
const { instances } = $model; | ||
function toJson5($model) { | ||
const { instances, oauthClientStatus } = $model; | ||
return { | ||
instances: instances !== void 0 && instances !== null ? instances?.map((innerValue) => toJson2(innerValue)) : void 0 | ||
instances: instances !== void 0 && instances !== null ? instances?.map((innerValue) => toJson3(innerValue)) : void 0, | ||
oauthClientStatus: oauthClientStatus !== void 0 && oauthClientStatus !== null ? toJson4(oauthClientStatus) : void 0 | ||
}; | ||
@@ -263,6 +296,6 @@ } | ||
__export(modification_info_transformation_exports, { | ||
fromJson: () => fromJson4, | ||
toJson: () => toJson4 | ||
fromJson: () => fromJson6, | ||
toJson: () => toJson6 | ||
}); | ||
function fromJson4($model) { | ||
function fromJson6($model) { | ||
const { lastModifiedBy, lastModifiedTime } = $model; | ||
@@ -274,3 +307,3 @@ return { | ||
} | ||
function toJson4($model) { | ||
function toJson6($model) { | ||
const { lastModifiedBy, lastModifiedTime } = $model; | ||
@@ -284,3 +317,3 @@ return { | ||
// packages/client/app-engine-edge-connect/src/lib/models/edge-connect.transformation.ts | ||
function fromJson5($model) { | ||
function fromJson7($model) { | ||
const { | ||
@@ -298,12 +331,12 @@ id, | ||
id, | ||
name: _name, | ||
hostPatterns: hostPatterns?.map((innerValue) => fromJson(innerValue)), | ||
name: fromJson(_name), | ||
hostPatterns: hostPatterns?.map((innerValue) => fromJson2(innerValue)), | ||
oauthClientId, | ||
oauthClientSecret, | ||
oauthClientResource, | ||
modificationInfo: modificationInfo !== void 0 && modificationInfo !== null ? fromJson4(modificationInfo) : void 0, | ||
metadata: metadata !== void 0 && metadata !== null ? fromJson3(metadata) : void 0 | ||
modificationInfo: modificationInfo !== void 0 && modificationInfo !== null ? fromJson6(modificationInfo) : void 0, | ||
metadata: metadata !== void 0 && metadata !== null ? fromJson5(metadata) : void 0 | ||
}; | ||
} | ||
function toJson5($model) { | ||
function toJson7($model) { | ||
const { | ||
@@ -321,9 +354,9 @@ id, | ||
id, | ||
name: _name, | ||
hostPatterns: hostPatterns?.map((innerValue) => toJson(innerValue)), | ||
name: toJson(_name), | ||
hostPatterns: hostPatterns?.map((innerValue) => toJson2(innerValue)), | ||
oauthClientId, | ||
oauthClientSecret, | ||
oauthClientResource, | ||
modificationInfo: modificationInfo !== void 0 && modificationInfo !== null ? toJson4(modificationInfo) : void 0, | ||
metadata: metadata !== void 0 && metadata !== null ? toJson3(metadata) : void 0 | ||
modificationInfo: modificationInfo !== void 0 && modificationInfo !== null ? toJson6(modificationInfo) : void 0, | ||
metadata: metadata !== void 0 && metadata !== null ? toJson5(metadata) : void 0 | ||
}; | ||
@@ -335,16 +368,16 @@ } | ||
__export(edge_connects_transformation_exports, { | ||
fromJson: () => fromJson6, | ||
toJson: () => toJson6 | ||
fromJson: () => fromJson8, | ||
toJson: () => toJson8 | ||
}); | ||
function fromJson6($model) { | ||
function fromJson8($model) { | ||
const { edgeConnects, totalCount } = $model; | ||
return { | ||
edgeConnects: edgeConnects !== void 0 && edgeConnects !== null ? edgeConnects?.map((innerValue) => fromJson5(innerValue)) : void 0, | ||
edgeConnects: edgeConnects !== void 0 && edgeConnects !== null ? edgeConnects?.map((innerValue) => fromJson7(innerValue)) : void 0, | ||
totalCount | ||
}; | ||
} | ||
function toJson6($model) { | ||
function toJson8($model) { | ||
const { edgeConnects, totalCount } = $model; | ||
return { | ||
edgeConnects: edgeConnects !== void 0 && edgeConnects !== null ? edgeConnects?.map((innerValue) => toJson5(innerValue)) : void 0, | ||
edgeConnects: edgeConnects !== void 0 && edgeConnects !== null ? edgeConnects?.map((innerValue) => toJson7(innerValue)) : void 0, | ||
totalCount | ||
@@ -358,5 +391,5 @@ }; | ||
fromFormData: () => fromFormData, | ||
fromJson: () => fromJson10, | ||
fromJson: () => fromJson12, | ||
toFormData: () => toFormData, | ||
toJson: () => toJson10 | ||
toJson: () => toJson12 | ||
}); | ||
@@ -367,4 +400,4 @@ | ||
__export(error_transformation_exports, { | ||
fromJson: () => fromJson9, | ||
toJson: () => toJson9 | ||
fromJson: () => fromJson11, | ||
toJson: () => toJson11 | ||
}); | ||
@@ -375,4 +408,4 @@ | ||
__export(error_details_transformation_exports, { | ||
fromJson: () => fromJson8, | ||
toJson: () => toJson8 | ||
fromJson: () => fromJson10, | ||
toJson: () => toJson10 | ||
}); | ||
@@ -383,6 +416,6 @@ | ||
__export(constraint_violation_transformation_exports, { | ||
fromJson: () => fromJson7, | ||
toJson: () => toJson7 | ||
fromJson: () => fromJson9, | ||
toJson: () => toJson9 | ||
}); | ||
function fromJson7($model) { | ||
function fromJson9($model) { | ||
const { message, path, parameterLocation } = $model; | ||
@@ -395,3 +428,3 @@ return { | ||
} | ||
function toJson7($model) { | ||
function toJson9($model) { | ||
const { message, path, parameterLocation } = $model; | ||
@@ -406,13 +439,13 @@ return { | ||
// packages/client/app-engine-edge-connect/src/lib/models/error-details.transformation.ts | ||
function fromJson8($model) { | ||
function fromJson10($model) { | ||
const { constraintViolations, missingScopes } = $model; | ||
return { | ||
constraintViolations: constraintViolations !== void 0 && constraintViolations !== null ? constraintViolations?.map((innerValue) => fromJson7(innerValue)) : void 0, | ||
constraintViolations: constraintViolations !== void 0 && constraintViolations !== null ? constraintViolations?.map((innerValue) => fromJson9(innerValue)) : void 0, | ||
missingScopes: missingScopes !== void 0 && missingScopes !== null ? missingScopes?.slice(0) : void 0 | ||
}; | ||
} | ||
function toJson8($model) { | ||
function toJson10($model) { | ||
const { constraintViolations, missingScopes } = $model; | ||
return { | ||
constraintViolations: constraintViolations !== void 0 && constraintViolations !== null ? constraintViolations?.map((innerValue) => toJson7(innerValue)) : void 0, | ||
constraintViolations: constraintViolations !== void 0 && constraintViolations !== null ? constraintViolations?.map((innerValue) => toJson9(innerValue)) : void 0, | ||
missingScopes: missingScopes !== void 0 && missingScopes !== null ? missingScopes?.slice(0) : void 0 | ||
@@ -423,3 +456,3 @@ }; | ||
// packages/client/app-engine-edge-connect/src/lib/models/error.transformation.ts | ||
function fromJson9($model) { | ||
function fromJson11($model) { | ||
const { code, message, details } = $model; | ||
@@ -429,6 +462,6 @@ return { | ||
message, | ||
details: details !== void 0 && details !== null ? fromJson8(details) : void 0 | ||
details: details !== void 0 && details !== null ? fromJson10(details) : void 0 | ||
}; | ||
} | ||
function toJson9($model) { | ||
function toJson11($model) { | ||
const { code, message, details } = $model; | ||
@@ -438,3 +471,3 @@ return { | ||
message, | ||
details: details !== void 0 && details !== null ? toJson8(details) : void 0 | ||
details: details !== void 0 && details !== null ? toJson10(details) : void 0 | ||
}; | ||
@@ -444,12 +477,12 @@ } | ||
// packages/client/app-engine-edge-connect/src/lib/models/error-response.transformation.ts | ||
function fromJson10($model) { | ||
function fromJson12($model) { | ||
const { error } = $model; | ||
return { | ||
error: fromJson9(error) | ||
error: fromJson11(error) | ||
}; | ||
} | ||
function toJson10($model) { | ||
function toJson12($model) { | ||
const { error } = $model; | ||
return { | ||
error: toJson9(error) | ||
error: toJson11(error) | ||
}; | ||
@@ -460,7 +493,7 @@ } | ||
return { | ||
error: fromJson9(JSON.parse(formDataEntries["error"])) | ||
error: fromJson11(JSON.parse(formDataEntries["error"])) | ||
}; | ||
} | ||
function toFormData($model) { | ||
const json = toJson10($model); | ||
const json = toJson12($model); | ||
const body = [{ name: "error", type: "json", value: json["error"] }]; | ||
@@ -470,9 +503,57 @@ return body; | ||
// packages/client/app-engine-edge-connect/src/lib/models/matched-response.transformation.ts | ||
var matched_response_transformation_exports = {}; | ||
__export(matched_response_transformation_exports, { | ||
fromJson: () => fromJson14, | ||
toJson: () => toJson14 | ||
}); | ||
// packages/client/app-engine-edge-connect/src/lib/models/matched-edge-connect.transformation.ts | ||
var matched_edge_connect_transformation_exports = {}; | ||
__export(matched_edge_connect_transformation_exports, { | ||
fromJson: () => fromJson13, | ||
toJson: () => toJson13 | ||
}); | ||
function fromJson13($model) { | ||
const { id, name: _name, matchedPattern, metadata } = $model; | ||
return { | ||
id, | ||
name: fromJson(_name), | ||
matchedPattern, | ||
metadata: metadata !== void 0 && metadata !== null ? fromJson5(metadata) : void 0 | ||
}; | ||
} | ||
function toJson13($model) { | ||
const { id, name: _name, matchedPattern, metadata } = $model; | ||
return { | ||
id, | ||
name: toJson(_name), | ||
matchedPattern, | ||
metadata: metadata !== void 0 && metadata !== null ? toJson5(metadata) : void 0 | ||
}; | ||
} | ||
// packages/client/app-engine-edge-connect/src/lib/models/matched-response.transformation.ts | ||
function fromJson14($model) { | ||
const { matched, secondaryMatching } = $model; | ||
return { | ||
matched: matched !== void 0 && matched !== null ? fromJson13(matched) : void 0, | ||
secondaryMatching: secondaryMatching !== void 0 && secondaryMatching !== null ? secondaryMatching?.map((innerValue) => fromJson13(innerValue)) : void 0 | ||
}; | ||
} | ||
function toJson14($model) { | ||
const { matched, secondaryMatching } = $model; | ||
return { | ||
matched: matched !== void 0 && matched !== null ? toJson13(matched) : void 0, | ||
secondaryMatching: secondaryMatching !== void 0 && secondaryMatching !== null ? secondaryMatching?.map((innerValue) => toJson13(innerValue)) : void 0 | ||
}; | ||
} | ||
// packages/client/app-engine-edge-connect/src/lib/models/o-auth-client-rotation-response.transformation.ts | ||
var o_auth_client_rotation_response_transformation_exports = {}; | ||
__export(o_auth_client_rotation_response_transformation_exports, { | ||
fromJson: () => fromJson11, | ||
toJson: () => toJson11 | ||
fromJson: () => fromJson15, | ||
toJson: () => toJson15 | ||
}); | ||
function fromJson11($model) { | ||
function fromJson15($model) { | ||
const { clientSecret, clientId } = $model; | ||
@@ -484,3 +565,3 @@ return { | ||
} | ||
function toJson11($model) { | ||
function toJson15($model) { | ||
const { clientSecret, clientId } = $model; | ||
@@ -537,3 +618,3 @@ return { | ||
try { | ||
return fromJson6(responseValue); | ||
return fromJson8(responseValue); | ||
} catch (err) { | ||
@@ -553,3 +634,3 @@ throw new InvalidResponseError( | ||
} | ||
const encodedBody = toJson5(config.body); | ||
const encodedBody = toJson7(config.body); | ||
const response = await this.httpClient.send({ | ||
@@ -576,3 +657,3 @@ url: `/platform/app-engine/edge-connect/v1/edge-connects`, | ||
try { | ||
const errorBody = fromJson10(responseValue); | ||
const errorBody = fromJson12(responseValue); | ||
throw new ErrorResponseError("400", response, errorBody, getErrorMessage(errorBody, "Bad Request")); | ||
@@ -595,3 +676,3 @@ } catch (err) { | ||
try { | ||
return fromJson5(responseValue); | ||
return fromJson7(responseValue); | ||
} catch (err) { | ||
@@ -629,3 +710,3 @@ throw new InvalidResponseError( | ||
try { | ||
return fromJson5(responseValue); | ||
return fromJson7(responseValue); | ||
} catch (err) { | ||
@@ -639,3 +720,3 @@ throw new InvalidResponseError(`EdgeConnectClient.getEdgeConnect:200`, err, responseValue, void 0, void 0); | ||
} | ||
const encodedBody = toJson5(config.body); | ||
const encodedBody = toJson7(config.body); | ||
const response = await this.httpClient.send({ | ||
@@ -661,3 +742,3 @@ url: `/platform/app-engine/edge-connect/v1/edge-connects/${config.edgeConnectId}`, | ||
try { | ||
const errorBody = fromJson10(responseValue); | ||
const errorBody = fromJson12(responseValue); | ||
throw new ErrorResponseError("400", response, errorBody, getErrorMessage(errorBody, "Bad Request")); | ||
@@ -730,3 +811,3 @@ } catch (err) { | ||
try { | ||
return fromJson11(responseValue); | ||
return fromJson15(responseValue); | ||
} catch (err) { | ||
@@ -753,3 +834,75 @@ throw new InvalidResponseError( | ||
} | ||
async getMatchedEdgeConnects(config) { | ||
if (!config) { | ||
throw new ApiClientError("API client error", "API client call is missing mandatory config parameter"); | ||
} | ||
const query = toQueryString({ url: config.url }); | ||
const response = await this.httpClient.send({ | ||
url: `/platform/app-engine/edge-connect/v1/edge-connects:match${query}`, | ||
method: "GET", | ||
headers: { | ||
Accept: "application/json" | ||
}, | ||
abortSignal: config.abortSignal, | ||
statusValidator: (status) => { | ||
if (200 <= status && status < 300) { | ||
return true; | ||
} | ||
return [400].includes(status); | ||
} | ||
}); | ||
switch (response.status) { | ||
case 400: { | ||
const responseValue = await response.body("json"); | ||
try { | ||
const errorBody = fromJson12(responseValue); | ||
throw new ErrorResponseError("400", response, errorBody, getErrorMessage(errorBody, "Bad Request")); | ||
} catch (err) { | ||
if (err instanceof ErrorResponseError) { | ||
throw err; | ||
} | ||
throw new InvalidResponseError( | ||
`EdgeConnectClient.getMatchedEdgeConnects:400`, | ||
err, | ||
responseValue, | ||
"ErrorResponse", | ||
void 0 | ||
); | ||
} | ||
} | ||
case 200: { | ||
const responseValue = await response.body("json"); | ||
try { | ||
return fromJson14(responseValue); | ||
} catch (err) { | ||
throw new InvalidResponseError( | ||
`EdgeConnectClient.getMatchedEdgeConnects:${response.status}`, | ||
err, | ||
responseValue, | ||
void 0, | ||
void 0 | ||
); | ||
} | ||
} | ||
default: { | ||
const responseValue = await response.body("text").catch(() => ""); | ||
throw new ClientRequestError( | ||
`${response.status}`, | ||
response, | ||
responseValue, | ||
getErrorMessage(responseValue, `Unexpected api response: code=${response.status} body="${responseValue}"`) | ||
); | ||
} | ||
} | ||
} | ||
}; | ||
var edgeConnectClient = /* @__PURE__ */ new EdgeConnectClient(import_http_client.httpClient); | ||
// packages/client/app-engine-edge-connect/src/lib/models/metadata-oauth-client-status.ts | ||
var MetadataOauthClientStatus = /* @__PURE__ */ ((MetadataOauthClientStatus2) => { | ||
MetadataOauthClientStatus2["Active"] = "ACTIVE"; | ||
MetadataOauthClientStatus2["Inactive"] = "INACTIVE"; | ||
MetadataOauthClientStatus2["PendingDeletion"] = "PENDING_DELETION"; | ||
MetadataOauthClientStatus2["Deleted"] = "DELETED"; | ||
return MetadataOauthClientStatus2; | ||
})(MetadataOauthClientStatus || {}); |
@@ -20,3 +20,3 @@ --- | ||
<div class="col" style={{textAlign: 'right'}}> | ||
<a href="https://www.npmjs.com/package/@dynatrace-sdk/client-app-engine-edge-connect/v/1.0.1">v1.0.1</a> | ||
<a href="https://www.npmjs.com/package/@dynatrace-sdk/client-app-engine-edge-connect/v/1.1.1">v1.1.1</a> | ||
</div> | ||
@@ -78,3 +78,2 @@ </div> | ||
body: { | ||
name: "InternalServices", | ||
hostPatterns: "*.internal.org", | ||
@@ -126,3 +125,3 @@ modificationInfo: { | ||
const data = await edgeConnectClient.deleteEdgeConnect({ | ||
edgeConnectId: 11111111, | ||
edgeConnectId: "11111111-2222-4444-3333-555555555555", | ||
}); | ||
@@ -168,3 +167,3 @@ ``` | ||
const data = await edgeConnectClient.getEdgeConnect({ | ||
edgeConnectId: 11111111, | ||
edgeConnectId: "11111111-2222-4444-3333-555555555555", | ||
}); | ||
@@ -177,2 +176,45 @@ ``` | ||
### getMatchedEdgeConnects | ||
<div class="padding-bottom--md"> | ||
<strong>edgeConnectClient.getMatchedEdgeConnects(config): Promise<<a href="#matchedresponse">MatchedResponse</a>></strong> | ||
<div class="padding-left--md"> | ||
Gets the matching EdgeConnect including alternatives for a URL. | ||
**Required scope:** app-engine:edge-connects:read | ||
Provides the EdgeConnect which matches the URL due to its configured host patterns. This EdgeConnect would receive a corresponding fetch request if done in the context of the Dynatrace runtime. In addition, this endpoint also provides other EdgeConnects which have matching host patterns that are not as specific (due to wildcard pattern usage) as the matched EdgeConnect | ||
</div> | ||
#### Parameters | ||
| Name | Type | Description | | ||
| ------------------------------- | ----------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | | ||
| config.url<sup>\*required</sup> | <a href="https://developer.mozilla.org/en-US/docs/Glossary/String">string</a> | The URL which is used to check if there are any EdgeConnects with matching host patterns configured. Must be RFC 2396 compliant and use "http" or "https" as its scheme | | ||
#### Returns | ||
The matched EdgeConnect and considered alternatives which are more general | ||
<details> | ||
<summary> | ||
Code example | ||
</summary> | ||
```ts | ||
import { edgeConnectClient } from "@dynatrace-sdk/client-app-engine-edge-connect"; | ||
const data = await edgeConnectClient.getMatchedEdgeConnects({ | ||
url: "http://my.dynatrace.com", | ||
}); | ||
``` | ||
</details> | ||
</div> | ||
### listEdgeConnects | ||
@@ -255,3 +297,3 @@ | ||
const data = await edgeConnectClient.rotateOAuthClientSecret({ | ||
edgeConnectId: 11111111, | ||
edgeConnectId: "11111111-2222-4444-3333-555555555555", | ||
}); | ||
@@ -296,5 +338,4 @@ ``` | ||
const data = await edgeConnectClient.updateEdgeConnect({ | ||
edgeConnectId: 11111111, | ||
edgeConnectId: "11111111-2222-4444-3333-555555555555", | ||
body: { | ||
name: "InternalServices", | ||
hostPatterns: "*.internal.org", | ||
@@ -373,7 +414,26 @@ modificationInfo: { | ||
### MatchedEdgeConnect | ||
Contains information about the EdgeConnect and the matched pattern | ||
| Name | Type | | ||
| ----------------------------------- | ----------------------------------------------------------------------------- | | ||
| id<sup>\*required</sup> | <a href="https://developer.mozilla.org/en-US/docs/Glossary/String">string</a> | | ||
| matchedPattern<sup>\*required</sup> | <a href="https://developer.mozilla.org/en-US/docs/Glossary/String">string</a> | | ||
| metadata | <a href="#metadata">Metadata</a> | | ||
| name<sup>\*required</sup> | <a href="https://developer.mozilla.org/en-US/docs/Glossary/String">string</a> | | ||
### MatchedResponse | ||
| Name | Type | | ||
| ----------------- | ----------------------------------------------------------------- | | ||
| matched | <a href="#matchededgeconnect">MatchedEdgeConnect</a> | | ||
| secondaryMatching | Array<<a href="#matchededgeconnect">MatchedEdgeConnect</a>> | | ||
### Metadata | ||
| Name | Type | | ||
| --------- | ------------------------------------------------------------------- | | ||
| instances | Array<<a href="#edgeconnectinstance">EdgeConnectInstance</a>> | | ||
| Name | Type | | ||
| ----------------- | ------------------------------------------------------------------- | | ||
| instances | Array<<a href="#edgeconnectinstance">EdgeConnectInstance</a>> | | ||
| oauthClientStatus | MetadataOauthClientStatus | | ||
@@ -393,1 +453,19 @@ ### ModificationInfo | ||
| clientSecret<sup>\*required</sup> | <a href="https://developer.mozilla.org/en-US/docs/Glossary/String">string</a> | | ||
## Enums | ||
### MetadataOauthClientStatus | ||
<div class="padding-left--md"> | ||
The status of the OAuth client | ||
#### Enum keys | ||
<div class="padding-left--md"> | ||
`Active` | `Deleted` | `Inactive` | `PendingDeletion` | ||
</div> | ||
</div> |
{ | ||
"dynagen": { | ||
"version": "0.12.3", | ||
"version": "0.12.5", | ||
"generatedAt": "", | ||
"template": { | ||
"name": "@dynatrace-sdk/template-typescript-client", | ||
"version": "0.17.10" | ||
"version": "0.17.13" | ||
} | ||
@@ -12,5 +12,5 @@ }, | ||
"title": "AppEngine - EdgeConnect", | ||
"version": "1.0.0", | ||
"version": "1.1.0", | ||
"baseUrl": "/platform/app-engine/edge-connect/v1" | ||
} | ||
} |
299
esm/index.js
@@ -158,9 +158,9 @@ /** | ||
__export(edge_connect_transformation_exports, { | ||
fromJson: () => fromJson5, | ||
toJson: () => toJson5 | ||
fromJson: () => fromJson7, | ||
toJson: () => toJson7 | ||
}); | ||
// packages/client/app-engine-edge-connect/src/lib/models/host-pattern.transformation.ts | ||
var host_pattern_transformation_exports = {}; | ||
__export(host_pattern_transformation_exports, { | ||
// packages/client/app-engine-edge-connect/src/lib/models/edge-connect-name.transformation.ts | ||
var edge_connect_name_transformation_exports = {}; | ||
__export(edge_connect_name_transformation_exports, { | ||
fromJson: () => fromJson, | ||
@@ -176,7 +176,20 @@ toJson: () => toJson | ||
// packages/client/app-engine-edge-connect/src/lib/models/host-pattern.transformation.ts | ||
var host_pattern_transformation_exports = {}; | ||
__export(host_pattern_transformation_exports, { | ||
fromJson: () => fromJson2, | ||
toJson: () => toJson2 | ||
}); | ||
function fromJson2($model) { | ||
return String($model); | ||
} | ||
function toJson2($model) { | ||
return String($model); | ||
} | ||
// packages/client/app-engine-edge-connect/src/lib/models/metadata.transformation.ts | ||
var metadata_transformation_exports = {}; | ||
__export(metadata_transformation_exports, { | ||
fromJson: () => fromJson3, | ||
toJson: () => toJson3 | ||
fromJson: () => fromJson5, | ||
toJson: () => toJson5 | ||
}); | ||
@@ -187,6 +200,6 @@ | ||
__export(edge_connect_instance_transformation_exports, { | ||
fromJson: () => fromJson2, | ||
toJson: () => toJson2 | ||
fromJson: () => fromJson3, | ||
toJson: () => toJson3 | ||
}); | ||
function fromJson2($model) { | ||
function fromJson3($model) { | ||
const { version, instanceId } = $model; | ||
@@ -198,3 +211,3 @@ return { | ||
} | ||
function toJson2($model) { | ||
function toJson3($model) { | ||
const { version, instanceId } = $model; | ||
@@ -207,13 +220,28 @@ return { | ||
// packages/client/app-engine-edge-connect/src/lib/models/metadata-oauth-client-status.transformation.ts | ||
var metadata_oauth_client_status_transformation_exports = {}; | ||
__export(metadata_oauth_client_status_transformation_exports, { | ||
fromJson: () => fromJson4, | ||
toJson: () => toJson4 | ||
}); | ||
function fromJson4($model) { | ||
return String($model); | ||
} | ||
function toJson4($model) { | ||
return String($model); | ||
} | ||
// packages/client/app-engine-edge-connect/src/lib/models/metadata.transformation.ts | ||
function fromJson3($model) { | ||
const { instances } = $model; | ||
function fromJson5($model) { | ||
const { instances, oauthClientStatus } = $model; | ||
return { | ||
instances: instances !== void 0 && instances !== null ? instances?.map((innerValue) => fromJson2(innerValue)) : void 0 | ||
instances: instances !== void 0 && instances !== null ? instances?.map((innerValue) => fromJson3(innerValue)) : void 0, | ||
oauthClientStatus: oauthClientStatus !== void 0 && oauthClientStatus !== null ? fromJson4(oauthClientStatus) : void 0 | ||
}; | ||
} | ||
function toJson3($model) { | ||
const { instances } = $model; | ||
function toJson5($model) { | ||
const { instances, oauthClientStatus } = $model; | ||
return { | ||
instances: instances !== void 0 && instances !== null ? instances?.map((innerValue) => toJson2(innerValue)) : void 0 | ||
instances: instances !== void 0 && instances !== null ? instances?.map((innerValue) => toJson3(innerValue)) : void 0, | ||
oauthClientStatus: oauthClientStatus !== void 0 && oauthClientStatus !== null ? toJson4(oauthClientStatus) : void 0 | ||
}; | ||
@@ -225,6 +253,6 @@ } | ||
__export(modification_info_transformation_exports, { | ||
fromJson: () => fromJson4, | ||
toJson: () => toJson4 | ||
fromJson: () => fromJson6, | ||
toJson: () => toJson6 | ||
}); | ||
function fromJson4($model) { | ||
function fromJson6($model) { | ||
const { lastModifiedBy, lastModifiedTime } = $model; | ||
@@ -236,3 +264,3 @@ return { | ||
} | ||
function toJson4($model) { | ||
function toJson6($model) { | ||
const { lastModifiedBy, lastModifiedTime } = $model; | ||
@@ -246,3 +274,3 @@ return { | ||
// packages/client/app-engine-edge-connect/src/lib/models/edge-connect.transformation.ts | ||
function fromJson5($model) { | ||
function fromJson7($model) { | ||
const { | ||
@@ -260,12 +288,12 @@ id, | ||
id, | ||
name: _name, | ||
hostPatterns: hostPatterns?.map((innerValue) => fromJson(innerValue)), | ||
name: fromJson(_name), | ||
hostPatterns: hostPatterns?.map((innerValue) => fromJson2(innerValue)), | ||
oauthClientId, | ||
oauthClientSecret, | ||
oauthClientResource, | ||
modificationInfo: modificationInfo !== void 0 && modificationInfo !== null ? fromJson4(modificationInfo) : void 0, | ||
metadata: metadata !== void 0 && metadata !== null ? fromJson3(metadata) : void 0 | ||
modificationInfo: modificationInfo !== void 0 && modificationInfo !== null ? fromJson6(modificationInfo) : void 0, | ||
metadata: metadata !== void 0 && metadata !== null ? fromJson5(metadata) : void 0 | ||
}; | ||
} | ||
function toJson5($model) { | ||
function toJson7($model) { | ||
const { | ||
@@ -283,9 +311,9 @@ id, | ||
id, | ||
name: _name, | ||
hostPatterns: hostPatterns?.map((innerValue) => toJson(innerValue)), | ||
name: toJson(_name), | ||
hostPatterns: hostPatterns?.map((innerValue) => toJson2(innerValue)), | ||
oauthClientId, | ||
oauthClientSecret, | ||
oauthClientResource, | ||
modificationInfo: modificationInfo !== void 0 && modificationInfo !== null ? toJson4(modificationInfo) : void 0, | ||
metadata: metadata !== void 0 && metadata !== null ? toJson3(metadata) : void 0 | ||
modificationInfo: modificationInfo !== void 0 && modificationInfo !== null ? toJson6(modificationInfo) : void 0, | ||
metadata: metadata !== void 0 && metadata !== null ? toJson5(metadata) : void 0 | ||
}; | ||
@@ -297,16 +325,16 @@ } | ||
__export(edge_connects_transformation_exports, { | ||
fromJson: () => fromJson6, | ||
toJson: () => toJson6 | ||
fromJson: () => fromJson8, | ||
toJson: () => toJson8 | ||
}); | ||
function fromJson6($model) { | ||
function fromJson8($model) { | ||
const { edgeConnects, totalCount } = $model; | ||
return { | ||
edgeConnects: edgeConnects !== void 0 && edgeConnects !== null ? edgeConnects?.map((innerValue) => fromJson5(innerValue)) : void 0, | ||
edgeConnects: edgeConnects !== void 0 && edgeConnects !== null ? edgeConnects?.map((innerValue) => fromJson7(innerValue)) : void 0, | ||
totalCount | ||
}; | ||
} | ||
function toJson6($model) { | ||
function toJson8($model) { | ||
const { edgeConnects, totalCount } = $model; | ||
return { | ||
edgeConnects: edgeConnects !== void 0 && edgeConnects !== null ? edgeConnects?.map((innerValue) => toJson5(innerValue)) : void 0, | ||
edgeConnects: edgeConnects !== void 0 && edgeConnects !== null ? edgeConnects?.map((innerValue) => toJson7(innerValue)) : void 0, | ||
totalCount | ||
@@ -320,5 +348,5 @@ }; | ||
fromFormData: () => fromFormData, | ||
fromJson: () => fromJson10, | ||
fromJson: () => fromJson12, | ||
toFormData: () => toFormData, | ||
toJson: () => toJson10 | ||
toJson: () => toJson12 | ||
}); | ||
@@ -329,4 +357,4 @@ | ||
__export(error_transformation_exports, { | ||
fromJson: () => fromJson9, | ||
toJson: () => toJson9 | ||
fromJson: () => fromJson11, | ||
toJson: () => toJson11 | ||
}); | ||
@@ -337,4 +365,4 @@ | ||
__export(error_details_transformation_exports, { | ||
fromJson: () => fromJson8, | ||
toJson: () => toJson8 | ||
fromJson: () => fromJson10, | ||
toJson: () => toJson10 | ||
}); | ||
@@ -345,6 +373,6 @@ | ||
__export(constraint_violation_transformation_exports, { | ||
fromJson: () => fromJson7, | ||
toJson: () => toJson7 | ||
fromJson: () => fromJson9, | ||
toJson: () => toJson9 | ||
}); | ||
function fromJson7($model) { | ||
function fromJson9($model) { | ||
const { message, path, parameterLocation } = $model; | ||
@@ -357,3 +385,3 @@ return { | ||
} | ||
function toJson7($model) { | ||
function toJson9($model) { | ||
const { message, path, parameterLocation } = $model; | ||
@@ -368,13 +396,13 @@ return { | ||
// packages/client/app-engine-edge-connect/src/lib/models/error-details.transformation.ts | ||
function fromJson8($model) { | ||
function fromJson10($model) { | ||
const { constraintViolations, missingScopes } = $model; | ||
return { | ||
constraintViolations: constraintViolations !== void 0 && constraintViolations !== null ? constraintViolations?.map((innerValue) => fromJson7(innerValue)) : void 0, | ||
constraintViolations: constraintViolations !== void 0 && constraintViolations !== null ? constraintViolations?.map((innerValue) => fromJson9(innerValue)) : void 0, | ||
missingScopes: missingScopes !== void 0 && missingScopes !== null ? missingScopes?.slice(0) : void 0 | ||
}; | ||
} | ||
function toJson8($model) { | ||
function toJson10($model) { | ||
const { constraintViolations, missingScopes } = $model; | ||
return { | ||
constraintViolations: constraintViolations !== void 0 && constraintViolations !== null ? constraintViolations?.map((innerValue) => toJson7(innerValue)) : void 0, | ||
constraintViolations: constraintViolations !== void 0 && constraintViolations !== null ? constraintViolations?.map((innerValue) => toJson9(innerValue)) : void 0, | ||
missingScopes: missingScopes !== void 0 && missingScopes !== null ? missingScopes?.slice(0) : void 0 | ||
@@ -385,3 +413,3 @@ }; | ||
// packages/client/app-engine-edge-connect/src/lib/models/error.transformation.ts | ||
function fromJson9($model) { | ||
function fromJson11($model) { | ||
const { code, message, details } = $model; | ||
@@ -391,6 +419,6 @@ return { | ||
message, | ||
details: details !== void 0 && details !== null ? fromJson8(details) : void 0 | ||
details: details !== void 0 && details !== null ? fromJson10(details) : void 0 | ||
}; | ||
} | ||
function toJson9($model) { | ||
function toJson11($model) { | ||
const { code, message, details } = $model; | ||
@@ -400,3 +428,3 @@ return { | ||
message, | ||
details: details !== void 0 && details !== null ? toJson8(details) : void 0 | ||
details: details !== void 0 && details !== null ? toJson10(details) : void 0 | ||
}; | ||
@@ -406,12 +434,12 @@ } | ||
// packages/client/app-engine-edge-connect/src/lib/models/error-response.transformation.ts | ||
function fromJson10($model) { | ||
function fromJson12($model) { | ||
const { error } = $model; | ||
return { | ||
error: fromJson9(error) | ||
error: fromJson11(error) | ||
}; | ||
} | ||
function toJson10($model) { | ||
function toJson12($model) { | ||
const { error } = $model; | ||
return { | ||
error: toJson9(error) | ||
error: toJson11(error) | ||
}; | ||
@@ -422,7 +450,7 @@ } | ||
return { | ||
error: fromJson9(JSON.parse(formDataEntries["error"])) | ||
error: fromJson11(JSON.parse(formDataEntries["error"])) | ||
}; | ||
} | ||
function toFormData($model) { | ||
const json = toJson10($model); | ||
const json = toJson12($model); | ||
const body = [{ name: "error", type: "json", value: json["error"] }]; | ||
@@ -432,9 +460,57 @@ return body; | ||
// packages/client/app-engine-edge-connect/src/lib/models/matched-response.transformation.ts | ||
var matched_response_transformation_exports = {}; | ||
__export(matched_response_transformation_exports, { | ||
fromJson: () => fromJson14, | ||
toJson: () => toJson14 | ||
}); | ||
// packages/client/app-engine-edge-connect/src/lib/models/matched-edge-connect.transformation.ts | ||
var matched_edge_connect_transformation_exports = {}; | ||
__export(matched_edge_connect_transformation_exports, { | ||
fromJson: () => fromJson13, | ||
toJson: () => toJson13 | ||
}); | ||
function fromJson13($model) { | ||
const { id, name: _name, matchedPattern, metadata } = $model; | ||
return { | ||
id, | ||
name: fromJson(_name), | ||
matchedPattern, | ||
metadata: metadata !== void 0 && metadata !== null ? fromJson5(metadata) : void 0 | ||
}; | ||
} | ||
function toJson13($model) { | ||
const { id, name: _name, matchedPattern, metadata } = $model; | ||
return { | ||
id, | ||
name: toJson(_name), | ||
matchedPattern, | ||
metadata: metadata !== void 0 && metadata !== null ? toJson5(metadata) : void 0 | ||
}; | ||
} | ||
// packages/client/app-engine-edge-connect/src/lib/models/matched-response.transformation.ts | ||
function fromJson14($model) { | ||
const { matched, secondaryMatching } = $model; | ||
return { | ||
matched: matched !== void 0 && matched !== null ? fromJson13(matched) : void 0, | ||
secondaryMatching: secondaryMatching !== void 0 && secondaryMatching !== null ? secondaryMatching?.map((innerValue) => fromJson13(innerValue)) : void 0 | ||
}; | ||
} | ||
function toJson14($model) { | ||
const { matched, secondaryMatching } = $model; | ||
return { | ||
matched: matched !== void 0 && matched !== null ? toJson13(matched) : void 0, | ||
secondaryMatching: secondaryMatching !== void 0 && secondaryMatching !== null ? secondaryMatching?.map((innerValue) => toJson13(innerValue)) : void 0 | ||
}; | ||
} | ||
// packages/client/app-engine-edge-connect/src/lib/models/o-auth-client-rotation-response.transformation.ts | ||
var o_auth_client_rotation_response_transformation_exports = {}; | ||
__export(o_auth_client_rotation_response_transformation_exports, { | ||
fromJson: () => fromJson11, | ||
toJson: () => toJson11 | ||
fromJson: () => fromJson15, | ||
toJson: () => toJson15 | ||
}); | ||
function fromJson11($model) { | ||
function fromJson15($model) { | ||
const { clientSecret, clientId } = $model; | ||
@@ -446,3 +522,3 @@ return { | ||
} | ||
function toJson11($model) { | ||
function toJson15($model) { | ||
const { clientSecret, clientId } = $model; | ||
@@ -499,3 +575,3 @@ return { | ||
try { | ||
return fromJson6(responseValue); | ||
return fromJson8(responseValue); | ||
} catch (err) { | ||
@@ -515,3 +591,3 @@ throw new InvalidResponseError( | ||
} | ||
const encodedBody = toJson5(config.body); | ||
const encodedBody = toJson7(config.body); | ||
const response = await this.httpClient.send({ | ||
@@ -538,3 +614,3 @@ url: `/platform/app-engine/edge-connect/v1/edge-connects`, | ||
try { | ||
const errorBody = fromJson10(responseValue); | ||
const errorBody = fromJson12(responseValue); | ||
throw new ErrorResponseError("400", response, errorBody, getErrorMessage(errorBody, "Bad Request")); | ||
@@ -557,3 +633,3 @@ } catch (err) { | ||
try { | ||
return fromJson5(responseValue); | ||
return fromJson7(responseValue); | ||
} catch (err) { | ||
@@ -591,3 +667,3 @@ throw new InvalidResponseError( | ||
try { | ||
return fromJson5(responseValue); | ||
return fromJson7(responseValue); | ||
} catch (err) { | ||
@@ -601,3 +677,3 @@ throw new InvalidResponseError(`EdgeConnectClient.getEdgeConnect:200`, err, responseValue, void 0, void 0); | ||
} | ||
const encodedBody = toJson5(config.body); | ||
const encodedBody = toJson7(config.body); | ||
const response = await this.httpClient.send({ | ||
@@ -623,3 +699,3 @@ url: `/platform/app-engine/edge-connect/v1/edge-connects/${config.edgeConnectId}`, | ||
try { | ||
const errorBody = fromJson10(responseValue); | ||
const errorBody = fromJson12(responseValue); | ||
throw new ErrorResponseError("400", response, errorBody, getErrorMessage(errorBody, "Bad Request")); | ||
@@ -692,3 +768,3 @@ } catch (err) { | ||
try { | ||
return fromJson11(responseValue); | ||
return fromJson15(responseValue); | ||
} catch (err) { | ||
@@ -715,8 +791,82 @@ throw new InvalidResponseError( | ||
} | ||
async getMatchedEdgeConnects(config) { | ||
if (!config) { | ||
throw new ApiClientError("API client error", "API client call is missing mandatory config parameter"); | ||
} | ||
const query = toQueryString({ url: config.url }); | ||
const response = await this.httpClient.send({ | ||
url: `/platform/app-engine/edge-connect/v1/edge-connects:match${query}`, | ||
method: "GET", | ||
headers: { | ||
Accept: "application/json" | ||
}, | ||
abortSignal: config.abortSignal, | ||
statusValidator: (status) => { | ||
if (200 <= status && status < 300) { | ||
return true; | ||
} | ||
return [400].includes(status); | ||
} | ||
}); | ||
switch (response.status) { | ||
case 400: { | ||
const responseValue = await response.body("json"); | ||
try { | ||
const errorBody = fromJson12(responseValue); | ||
throw new ErrorResponseError("400", response, errorBody, getErrorMessage(errorBody, "Bad Request")); | ||
} catch (err) { | ||
if (err instanceof ErrorResponseError) { | ||
throw err; | ||
} | ||
throw new InvalidResponseError( | ||
`EdgeConnectClient.getMatchedEdgeConnects:400`, | ||
err, | ||
responseValue, | ||
"ErrorResponse", | ||
void 0 | ||
); | ||
} | ||
} | ||
case 200: { | ||
const responseValue = await response.body("json"); | ||
try { | ||
return fromJson14(responseValue); | ||
} catch (err) { | ||
throw new InvalidResponseError( | ||
`EdgeConnectClient.getMatchedEdgeConnects:${response.status}`, | ||
err, | ||
responseValue, | ||
void 0, | ||
void 0 | ||
); | ||
} | ||
} | ||
default: { | ||
const responseValue = await response.body("text").catch(() => ""); | ||
throw new ClientRequestError( | ||
`${response.status}`, | ||
response, | ||
responseValue, | ||
getErrorMessage(responseValue, `Unexpected api response: code=${response.status} body="${responseValue}"`) | ||
); | ||
} | ||
} | ||
} | ||
}; | ||
var edgeConnectClient = /* @__PURE__ */ new EdgeConnectClient(defaultHttpClient); | ||
// packages/client/app-engine-edge-connect/src/lib/models/metadata-oauth-client-status.ts | ||
var MetadataOauthClientStatus = /* @__PURE__ */ ((MetadataOauthClientStatus2) => { | ||
MetadataOauthClientStatus2["Active"] = "ACTIVE"; | ||
MetadataOauthClientStatus2["Inactive"] = "INACTIVE"; | ||
MetadataOauthClientStatus2["PendingDeletion"] = "PENDING_DELETION"; | ||
MetadataOauthClientStatus2["Deleted"] = "DELETED"; | ||
return MetadataOauthClientStatus2; | ||
})(MetadataOauthClientStatus || {}); | ||
export { | ||
EdgeConnectClient, | ||
MetadataOauthClientStatus, | ||
constraint_violation_transformation_exports as _ConstraintViolationTransformation, | ||
edge_connect_instance_transformation_exports as _EdgeConnectInstanceTransformation, | ||
edge_connect_name_transformation_exports as _EdgeConnectNameTransformation, | ||
edge_connect_transformation_exports as _EdgeConnectTransformation, | ||
@@ -728,2 +878,5 @@ edge_connects_transformation_exports as _EdgeConnectsTransformation, | ||
host_pattern_transformation_exports as _HostPatternTransformation, | ||
matched_edge_connect_transformation_exports as _MatchedEdgeConnectTransformation, | ||
matched_response_transformation_exports as _MatchedResponseTransformation, | ||
metadata_oauth_client_status_transformation_exports as _MetadataOauthClientStatusTransformation, | ||
metadata_transformation_exports as _MetadataTransformation, | ||
@@ -730,0 +883,0 @@ modification_info_transformation_exports as _ModificationInfoTransformation, |
{ | ||
"name": "@dynatrace-sdk/client-app-engine-edge-connect", | ||
"version": "1.0.1", | ||
"version": "1.1.1", | ||
"dependencies": { | ||
@@ -5,0 +5,0 @@ "@dynatrace-sdk/http-client": "^1.0.6" |
# @dynatrace-sdk/client-app-engine-edge-connect | ||
[![npm](https://img.shields.io/badge/npm-v1.0.1-blue)](https://www.npmjs.com/package/@dynatrace-sdk/client-app-engine-edge-connect/v/1.0.1) | ||
[![npm](https://img.shields.io/badge/npm-v1.1.1-blue)](https://www.npmjs.com/package/@dynatrace-sdk/client-app-engine-edge-connect/v/1.1.1) | ||
[![License](https://img.shields.io/badge/License-Apache_2.0-blue.svg)](https://opensource.org/licenses/Apache-2.0) | ||
@@ -5,0 +5,0 @@ |
import { AbortSignal, HttpClient } from '@dynatrace-sdk/http-client'; | ||
import { EdgeConnect } from '../models/edge-connect'; | ||
import { EdgeConnects } from '../models/edge-connects'; | ||
import { MatchedResponse } from '../models/matched-response'; | ||
import { OAuthClientRotationResponse } from '../models/o-auth-client-rotation-response'; | ||
@@ -10,3 +11,3 @@ export declare class EdgeConnectClient { | ||
* @example | ||
* const queryClientNodeJs = new QueryClient(yourCustomImplementation); | ||
* const edgeConnectClientNodeJs = new EdgeConnectClient(yourCustomImplementation); | ||
*/ | ||
@@ -84,3 +85,2 @@ constructor(httpClientImplementation: HttpClient); | ||
* body: { | ||
* name: "InternalServices", | ||
* hostPatterns: "*.internal.org", | ||
@@ -109,3 +109,3 @@ * modificationInfo: { | ||
* const data = await edgeConnectClient.getEdgeConnect({ | ||
* edgeConnectId: 11111111, | ||
* edgeConnectId: "11111111-2222-4444-3333-555555555555", | ||
* }); | ||
@@ -126,5 +126,4 @@ */ | ||
* const data = await edgeConnectClient.updateEdgeConnect({ | ||
* edgeConnectId: 11111111, | ||
* edgeConnectId: "11111111-2222-4444-3333-555555555555", | ||
* body: { | ||
* name: "InternalServices", | ||
* hostPatterns: "*.internal.org", | ||
@@ -152,3 +151,3 @@ * modificationInfo: { | ||
* const data = await edgeConnectClient.deleteEdgeConnect({ | ||
* edgeConnectId: 11111111, | ||
* edgeConnectId: "11111111-2222-4444-3333-555555555555", | ||
* }); | ||
@@ -172,3 +171,3 @@ */ | ||
* await edgeConnectClient.rotateOAuthClientSecret({ | ||
* edgeConnectId: 11111111, | ||
* edgeConnectId: "11111111-2222-4444-3333-555555555555", | ||
* }); | ||
@@ -180,3 +179,21 @@ */ | ||
}): Promise<OAuthClientRotationResponse>; | ||
/** | ||
* Gets the matching EdgeConnect including alternatives for a URL. | ||
* | ||
* **Required scope:** app-engine:edge-connects:read<br/><br/>Provides the EdgeConnect which matches the URL due to its configured host patterns. This EdgeConnect would receive a corresponding fetch request if done in the context of the Dynatrace runtime. In addition, this endpoint also provides other EdgeConnects which have matching host patterns that are not as specific (due to wildcard pattern usage) as the matched EdgeConnect | ||
* | ||
* @returns The matched EdgeConnect and considered alternatives which are more general | ||
* | ||
* @example <caption>Code example</caption> | ||
* import { edgeConnectClient } from "@dynatrace-sdk/client-app-engine-edge-connect"; | ||
* | ||
* const data = await edgeConnectClient.getMatchedEdgeConnects( | ||
* { url: "http://my.dynatrace.com" }, | ||
* ); | ||
*/ | ||
getMatchedEdgeConnects(config: { | ||
/** The URL which is used to check if there are any EdgeConnects with matching host patterns configured. Must be RFC 2396 compliant and use "http" or "https" as its scheme */ url: string; | ||
abortSignal?: AbortSignal; | ||
}): Promise<MatchedResponse>; | ||
} | ||
export declare const edgeConnectClient: EdgeConnectClient; |
@@ -0,1 +1,2 @@ | ||
import { EdgeConnectName } from './edge-connect-name'; | ||
import { HostPattern } from './host-pattern'; | ||
@@ -9,3 +10,3 @@ import { Metadata } from './metadata'; | ||
id?: string; | ||
name: string; | ||
name: EdgeConnectName; | ||
hostPatterns: HostPattern[]; | ||
@@ -12,0 +13,0 @@ /** |
import { EdgeConnect } from './edge-connect'; | ||
import * as _EdgeConnectNameTransformation from './edge-connect-name.transformation'; | ||
import * as _HostPatternTransformation from './host-pattern.transformation'; | ||
@@ -7,3 +8,3 @@ import * as _MetadataTransformation from './metadata.transformation'; | ||
id?: string; | ||
name: string; | ||
name: _EdgeConnectNameTransformation.AsJson; | ||
hostPatterns: _HostPatternTransformation.AsJson[]; | ||
@@ -10,0 +11,0 @@ oauthClientId?: string; |
@@ -7,2 +7,4 @@ export * from './constraint-violation'; | ||
export * as _EdgeConnectInstanceTransformation from './edge-connect-instance.transformation'; | ||
export * from './edge-connect-name'; | ||
export * as _EdgeConnectNameTransformation from './edge-connect-name.transformation'; | ||
export * from './edge-connects'; | ||
@@ -18,4 +20,10 @@ export * as _EdgeConnectsTransformation from './edge-connects.transformation'; | ||
export * as _HostPatternTransformation from './host-pattern.transformation'; | ||
export * from './matched-edge-connect'; | ||
export * as _MatchedEdgeConnectTransformation from './matched-edge-connect.transformation'; | ||
export * from './matched-response'; | ||
export * as _MatchedResponseTransformation from './matched-response.transformation'; | ||
export * from './metadata'; | ||
export * as _MetadataTransformation from './metadata.transformation'; | ||
export * from './metadata-oauth-client-status'; | ||
export * as _MetadataOauthClientStatusTransformation from './metadata-oauth-client-status.transformation'; | ||
export * from './modification-info'; | ||
@@ -22,0 +30,0 @@ export * as _ModificationInfoTransformation from './modification-info.transformation'; |
import { EdgeConnectInstance } from './edge-connect-instance'; | ||
import { MetadataOauthClientStatus } from './metadata-oauth-client-status'; | ||
export interface Metadata { | ||
instances?: EdgeConnectInstance[]; | ||
oauthClientStatus?: MetadataOauthClientStatus; | ||
} |
import * as _EdgeConnectInstanceTransformation from './edge-connect-instance.transformation'; | ||
import { Metadata } from './metadata'; | ||
import * as _MetadataOauthClientStatusTransformation from './metadata-oauth-client-status.transformation'; | ||
export interface AsJson { | ||
instances?: _EdgeConnectInstanceTransformation.AsJson[]; | ||
oauthClientStatus?: _MetadataOauthClientStatusTransformation.AsJson; | ||
} | ||
export declare function fromJson($model: AsJson): Metadata; | ||
export declare function toJson($model: Metadata): AsJson; |
@@ -7,3 +7,6 @@ import * as types from '../types'; | ||
readonly response: HttpClientResponse; | ||
constructor(response: Response); | ||
readonly requestMethod?: string; | ||
constructor(response: Response, data?: { | ||
requestMethod?: string; | ||
}); | ||
} |
@@ -11,2 +11,4 @@ import { ErrorType } from './error-type'; | ||
errorRef?: string; | ||
cause?: any; | ||
details?: any; | ||
} |
@@ -11,4 +11,7 @@ import { ErrorType } from './error-type'; | ||
status: number; | ||
/** @deprecated */ | ||
body?: unknown; | ||
errorRef?: string; | ||
cause?: any; | ||
details?: any; | ||
} |
@@ -8,2 +8,4 @@ import { CommonSerializedError } from './common-serialized-error'; | ||
*/ | ||
export declare type SerializedError = HttpSerializedError | CommonSerializedError; | ||
export declare type SerializedError = (HttpSerializedError | CommonSerializedError) & { | ||
traceId?: string; | ||
}; |
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
150988
103
2860