@dynatrace-sdk/client-app-engine-edge-connect
Advanced tools
Comparing version 1.5.0 to 1.6.0
@@ -5,2 +5,13 @@ # AppEngine - EdgeConnect | ||
## 1.6.0 | ||
### Minor Changes | ||
- Enums are replaced with unions of literals. APPDEV-10338 | ||
- Inline enums as union of literals. APPDEV-9924 | ||
### Patch Changes | ||
- Add return types and improve usage examples inside JSDoc. APPDEV-7536 | ||
## 1.5.0 | ||
@@ -7,0 +18,0 @@ |
@@ -545,2 +545,24 @@ /** | ||
// packages/client/app-engine-edge-connect/src/lib/utils/encoding.ts | ||
function mimeTypeToEncoding(mimeType, defaultEncoding) { | ||
const shortMimeType = mimeType.split(";")[0]; | ||
switch (shortMimeType) { | ||
case "application/json": | ||
case "application/cloudevent+json": | ||
case "application/cloudevent-batch+json": | ||
return "json" /* Json */; | ||
case "text/plain": | ||
return "text" /* Text */; | ||
case "application/octet-stream": | ||
return "binary" /* Binary */; | ||
case "multipart/form-data": | ||
return "form-data" /* FormData */; | ||
default: | ||
if (defaultEncoding) | ||
return defaultEncoding; | ||
else | ||
throw new Error(`${shortMimeType} mime type is not yet supported`); | ||
} | ||
} | ||
// packages/client/app-engine-edge-connect/src/lib/utils/url-helpers.ts | ||
@@ -590,3 +612,3 @@ var encodeQueryParam = (key, value) => { | ||
* | ||
* @returns A list of all EdgeConnects | ||
* @returns {Promise<EdgeConnects>} A list of all EdgeConnects | ||
* | ||
@@ -683,3 +705,3 @@ * @example <caption>Code example</caption> | ||
* | ||
* @returns The EdgeConnect has been created successfully | ||
* @returns {Promise<EdgeConnect>} The EdgeConnect has been created successfully | ||
* | ||
@@ -691,2 +713,3 @@ * @example <caption>Code example</caption> | ||
* body: { | ||
* name: {}, | ||
* hostPatterns: ["*.internal.org"], | ||
@@ -803,3 +826,3 @@ * modificationInfo: { | ||
* | ||
* @returns The EdgeConnect configuration | ||
* @returns {Promise<EdgeConnect>} The EdgeConnect configuration | ||
* | ||
@@ -888,2 +911,3 @@ * @example <caption>Code example</caption> | ||
* body: { | ||
* name: {}, | ||
* hostPatterns: ["*.internal.org"], | ||
@@ -1048,3 +1072,3 @@ * modificationInfo: { | ||
* | ||
* @returns The OAuth client secret was rotated successfully | ||
* @returns {Promise<OAuthClientRotationResponse>} The OAuth client secret was rotated successfully | ||
* | ||
@@ -1100,6 +1124,5 @@ * @example <caption>Code example</caption> | ||
case 400: { | ||
const responseValue = await response.body( | ||
"text" | ||
/* type from spec unsupported */ | ||
); | ||
const contentType = response.headers["content-type"]; | ||
const encoding = mimeTypeToEncoding(contentType, "text" /* Text */); | ||
const responseValue = await response.body(encoding); | ||
throw new import_shared_errors4.ClientRequestError( | ||
@@ -1151,3 +1174,3 @@ `400`, | ||
* | ||
* @returns The matched EdgeConnect and considered alternatives which are more general | ||
* @returns {Promise<MatchedResponse>} The matched EdgeConnect and considered alternatives which are more general | ||
* | ||
@@ -1154,0 +1177,0 @@ * @example <caption>Code example</caption> |
@@ -7,3 +7,3 @@ { | ||
"name": "@dynatrace-sdk/template-typescript-client", | ||
"version": "0.25.1" | ||
"version": "0.27.0" | ||
} | ||
@@ -10,0 +10,0 @@ }, |
@@ -510,2 +510,24 @@ /** | ||
// packages/client/app-engine-edge-connect/src/lib/utils/encoding.ts | ||
function mimeTypeToEncoding(mimeType, defaultEncoding) { | ||
const shortMimeType = mimeType.split(";")[0]; | ||
switch (shortMimeType) { | ||
case "application/json": | ||
case "application/cloudevent+json": | ||
case "application/cloudevent-batch+json": | ||
return "json" /* Json */; | ||
case "text/plain": | ||
return "text" /* Text */; | ||
case "application/octet-stream": | ||
return "binary" /* Binary */; | ||
case "multipart/form-data": | ||
return "form-data" /* FormData */; | ||
default: | ||
if (defaultEncoding) | ||
return defaultEncoding; | ||
else | ||
throw new Error(`${shortMimeType} mime type is not yet supported`); | ||
} | ||
} | ||
// packages/client/app-engine-edge-connect/src/lib/utils/url-helpers.ts | ||
@@ -555,3 +577,3 @@ var encodeQueryParam = (key, value) => { | ||
* | ||
* @returns A list of all EdgeConnects | ||
* @returns {Promise<EdgeConnects>} A list of all EdgeConnects | ||
* | ||
@@ -648,3 +670,3 @@ * @example <caption>Code example</caption> | ||
* | ||
* @returns The EdgeConnect has been created successfully | ||
* @returns {Promise<EdgeConnect>} The EdgeConnect has been created successfully | ||
* | ||
@@ -656,2 +678,3 @@ * @example <caption>Code example</caption> | ||
* body: { | ||
* name: {}, | ||
* hostPatterns: ["*.internal.org"], | ||
@@ -768,3 +791,3 @@ * modificationInfo: { | ||
* | ||
* @returns The EdgeConnect configuration | ||
* @returns {Promise<EdgeConnect>} The EdgeConnect configuration | ||
* | ||
@@ -853,2 +876,3 @@ * @example <caption>Code example</caption> | ||
* body: { | ||
* name: {}, | ||
* hostPatterns: ["*.internal.org"], | ||
@@ -1013,3 +1037,3 @@ * modificationInfo: { | ||
* | ||
* @returns The OAuth client secret was rotated successfully | ||
* @returns {Promise<OAuthClientRotationResponse>} The OAuth client secret was rotated successfully | ||
* | ||
@@ -1065,6 +1089,5 @@ * @example <caption>Code example</caption> | ||
case 400: { | ||
const responseValue = await response.body( | ||
"text" | ||
/* type from spec unsupported */ | ||
); | ||
const contentType = response.headers["content-type"]; | ||
const encoding = mimeTypeToEncoding(contentType, "text" /* Text */); | ||
const responseValue = await response.body(encoding); | ||
throw new ClientRequestError2( | ||
@@ -1116,3 +1139,3 @@ `400`, | ||
* | ||
* @returns The matched EdgeConnect and considered alternatives which are more general | ||
* @returns {Promise<MatchedResponse>} The matched EdgeConnect and considered alternatives which are more general | ||
* | ||
@@ -1119,0 +1142,0 @@ * @example <caption>Code example</caption> |
{ | ||
"name": "@dynatrace-sdk/client-app-engine-edge-connect", | ||
"version": "1.5.0", | ||
"version": "1.6.0", | ||
"dependencies": { | ||
@@ -5,0 +5,0 @@ "@dynatrace-sdk/error-handlers": "^1.2.0", |
243
README.md
# @dynatrace-sdk/client-app-engine-edge-connect | ||
[![npm](https://img.shields.io/badge/npm-v1.5.0-blue)](https://www.npmjs.com/package/@dynatrace-sdk/client-app-engine-edge-connect/v/1.5.0) | ||
[![npm](https://img.shields.io/badge/npm-v1.6.0-blue)](https://www.npmjs.com/package/@dynatrace-sdk/client-app-engine-edge-connect/v/1.6.0) | ||
[![License](https://img.shields.io/badge/License-Apache_2.0-blue.svg)](https://opensource.org/licenses/Apache-2.0) | ||
@@ -75,3 +75,5 @@ | ||
The EdgeConnect has been created successfully | ||
| Return type | Status code | Description | | ||
|---|---|---| | ||
|[EdgeConnect](#edgeconnect)|201|The EdgeConnect has been created successfully| | ||
@@ -96,2 +98,3 @@ | ||
body: { | ||
name: {}, | ||
hostPatterns: ["*.internal.org"], | ||
@@ -141,4 +144,10 @@ modificationInfo: { | ||
#### Returns | ||
| Return type | Status code | Description | | ||
|---|---|---| | ||
|void|204|The EdgeConnect configuration was deleted successfully| | ||
<details> | ||
@@ -192,3 +201,5 @@ <summary> | ||
The EdgeConnect configuration | ||
| Return type | Status code | Description | | ||
|---|---|---| | ||
|[EdgeConnect](#edgeconnect)|200|The EdgeConnect configuration| | ||
@@ -247,3 +258,5 @@ | ||
The matched EdgeConnect and considered alternatives which are more general | ||
| Return type | Status code | Description | | ||
|---|---|---| | ||
|[MatchedResponse](#matchedresponse)|200|The matched EdgeConnect and considered alternatives which are more general| | ||
@@ -309,3 +322,5 @@ | ||
A list of all EdgeConnects | ||
| Return type | Status code | Description | | ||
|---|---|---| | ||
|[EdgeConnects](#edgeconnects)|200|A list of all EdgeConnects| | ||
@@ -362,3 +377,5 @@ | ||
The OAuth client secret was rotated successfully | ||
| Return type | Status code | Description | | ||
|---|---|---| | ||
|[OAuthClientRotationResponse](#oauthclientrotationresponse)|200|The OAuth client secret was rotated successfully| | ||
@@ -415,3 +432,9 @@ | ||
#### Returns | ||
| Return type | Status code | Description | | ||
|---|---|---| | ||
|void|200|The EdgeConnect has been update successfully| | ||
#### Throws | ||
@@ -435,2 +458,3 @@ | ||
body: { | ||
name: {}, | ||
hostPatterns: ["*.internal.org"], | ||
@@ -453,131 +477,4 @@ modificationInfo: { | ||
### ApiClientError | ||
Base error for all client SDKs. All other errors extend this class. | ||
| Name | Type | Description | | ||
| --- | --- | --- | | ||
|cause|[any](https://www.typescriptlang.org/docs/handbook/2/everyday-types.html#any)| | | ||
|errorType<sup>*required</sup>|ErrorType| | | ||
|isApiClientError<sup>*required</sup>|true| | | ||
|message<sup>*required</sup>|[string](https://developer.mozilla.org/en-US/docs/Glossary/String)| | | ||
|name<sup>*required</sup>|[string](https://developer.mozilla.org/en-US/docs/Glossary/String)| | | ||
|stack|[string](https://developer.mozilla.org/en-US/docs/Glossary/String)| | | ||
|prepareStackTrace|Object|Optional override for formatting stack traces | | ||
|stackTraceLimit<sup>*required</sup>|[number](https://developer.mozilla.org/en-US/docs/Glossary/Number)| | | ||
### ApiGatewayError | ||
Dedicated error response class for errors thrown by API Gateway. | ||
Autogenerated SDK Clients have built-in handler for API Gateway errors that throws this error. | ||
| Name | Type | Description | | ||
| --- | --- | --- | | ||
|body<sup>*required</sup>|ApiGatewayErrorResponseBody| | | ||
|cause|[any](https://www.typescriptlang.org/docs/handbook/2/everyday-types.html#any)| | | ||
|code<sup>*required</sup>|[number](https://developer.mozilla.org/en-US/docs/Glossary/Number)| | | ||
|errorType<sup>*required</sup>|ErrorType| | | ||
|isApiClientError<sup>*required</sup>|true| | | ||
|isApiGatewayError<sup>*required</sup>|true| | | ||
|isClientRequestError<sup>*required</sup>|true| | | ||
|message<sup>*required</sup>|[string](https://developer.mozilla.org/en-US/docs/Glossary/String)| | | ||
|name<sup>*required</sup>|[string](https://developer.mozilla.org/en-US/docs/Glossary/String)| | | ||
|response<sup>*required</sup>|HttpClientResponse| | | ||
|retryAfterSeconds<sup>*required</sup>|undefined | [number](https://developer.mozilla.org/en-US/docs/Glossary/Number)| | | ||
|stack|[string](https://developer.mozilla.org/en-US/docs/Glossary/String)| | | ||
|prepareStackTrace|Object|Optional override for formatting stack traces | | ||
|stackTraceLimit<sup>*required</sup>|[number](https://developer.mozilla.org/en-US/docs/Glossary/Number)| | | ||
### ClientRequestError | ||
Generic error class for service errors, used to handle both expected and unexpected service-level errors. | ||
| Name | Type | Description | | ||
| --- | --- | --- | | ||
|body<sup>*required</sup>|DTO| | | ||
|cause|[any](https://www.typescriptlang.org/docs/handbook/2/everyday-types.html#any)| | | ||
|errorType<sup>*required</sup>|ErrorType| | | ||
|isApiClientError<sup>*required</sup>|true| | | ||
|isClientRequestError<sup>*required</sup>|true| | | ||
|message<sup>*required</sup>|[string](https://developer.mozilla.org/en-US/docs/Glossary/String)| | | ||
|name<sup>*required</sup>|[string](https://developer.mozilla.org/en-US/docs/Glossary/String)| | | ||
|response<sup>*required</sup>|HttpClientResponse| | | ||
|stack|[string](https://developer.mozilla.org/en-US/docs/Glossary/String)| | | ||
|prepareStackTrace|Object|Optional override for formatting stack traces | | ||
|stackTraceLimit<sup>*required</sup>|[number](https://developer.mozilla.org/en-US/docs/Glossary/Number)| | | ||
### ErrorResponseError | ||
Generic error class for service errors, used to handle both expected and unexpected service-level errors. | ||
| Name | Type | Description | | ||
| --- | --- | --- | | ||
|body<sup>*required</sup>|<a href="#errorresponse" target="_blank" rel="noopener noreferrer">ErrorResponse</a>| | | ||
|cause|[any](https://www.typescriptlang.org/docs/handbook/2/everyday-types.html#any)| | | ||
|errorType<sup>*required</sup>|ErrorType| | | ||
|isApiClientError<sup>*required</sup>|true| | | ||
|isClientRequestError<sup>*required</sup>|true| | | ||
|isErrorResponseError<sup>*required</sup>|true| | | ||
|message<sup>*required</sup>|[string](https://developer.mozilla.org/en-US/docs/Glossary/String)| | | ||
|name<sup>*required</sup>|[string](https://developer.mozilla.org/en-US/docs/Glossary/String)| | | ||
|response<sup>*required</sup>|HttpClientResponse| | | ||
|stack|[string](https://developer.mozilla.org/en-US/docs/Glossary/String)| | | ||
|prepareStackTrace|Object|Optional override for formatting stack traces | | ||
|stackTraceLimit<sup>*required</sup>|[number](https://developer.mozilla.org/en-US/docs/Glossary/Number)| | | ||
### InvalidResponseError | ||
Dedicated error class for errors related to response serialization. | ||
Thrown when received service response can't be deserialized. | ||
| Name | Type | Description | | ||
| --- | --- | --- | | ||
|cause|[any](https://www.typescriptlang.org/docs/handbook/2/everyday-types.html#any)| | | ||
|errorType<sup>*required</sup>|ErrorType| | | ||
|expectedType|[string](https://developer.mozilla.org/en-US/docs/Glossary/String)| | | ||
|isApiClientError<sup>*required</sup>|true| | | ||
|isInvalidResponseError<sup>*required</sup>|true| | | ||
|message<sup>*required</sup>|[string](https://developer.mozilla.org/en-US/docs/Glossary/String)| | | ||
|name<sup>*required</sup>|[string](https://developer.mozilla.org/en-US/docs/Glossary/String)| | | ||
|nestedError|<a href="#error">Error</a>| | | ||
|response<sup>*required</sup>|[any](https://www.typescriptlang.org/docs/handbook/2/everyday-types.html#any)| | | ||
|responseBody<sup>*required</sup>|[any](https://www.typescriptlang.org/docs/handbook/2/everyday-types.html#any)| | | ||
|stack|[string](https://developer.mozilla.org/en-US/docs/Glossary/String)| | | ||
|prepareStackTrace|Object|Optional override for formatting stack traces | | ||
|stackTraceLimit<sup>*required</sup>|[number](https://developer.mozilla.org/en-US/docs/Glossary/Number)| | | ||
### ConstraintViolation | ||
| Name | Type | | ||
@@ -591,7 +488,2 @@ | --- | --- | | ||
Maps the specified host patterns to this EdgeConnect | ||
@@ -614,9 +506,2 @@ | ||
| Name | Type | | ||
@@ -629,9 +514,2 @@ | --- | --- | | ||
| Name | Type | Description | | ||
@@ -644,9 +522,2 @@ | --- | --- | --- | | ||
| Name | Type | | ||
@@ -660,9 +531,2 @@ | --- | --- | | ||
| Name | Type | | ||
@@ -675,9 +539,2 @@ | --- | --- | | ||
| Name | Type | | ||
@@ -689,7 +546,2 @@ | --- | --- | | ||
Todo | ||
@@ -704,7 +556,2 @@ | ||
Contains information about the EdgeConnect and the matched pattern | ||
@@ -721,9 +568,2 @@ | ||
| Name | Type | Description | | ||
@@ -736,23 +576,9 @@ | --- | --- | --- | | ||
| Name | Type | Description | | ||
| --- | --- | --- | | ||
|instances|Array<<a href="#edgeconnectinstance" target="_blank" rel="noopener noreferrer">EdgeConnectInstance</a>>| | | ||
|oauthClientStatus|MetadataOauthClientStatus|The status of the OAuth client | | ||
|oauthClientStatus|"ACTIVE" | "INACTIVE" | "PENDING_DELETION" | "DELETED"|The status of the OAuth client | | ||
### ModificationInfo | ||
| Name | Type | | ||
@@ -765,9 +591,2 @@ | --- | --- | | ||
| Name | Type | | ||
@@ -774,0 +593,0 @@ | --- | --- | |
@@ -19,3 +19,3 @@ import { AbortSignal, HttpClient } from '@dynatrace-sdk/http-client'; | ||
* | ||
* @returns A list of all EdgeConnects | ||
* @returns {Promise<EdgeConnects>} A list of all EdgeConnects | ||
* | ||
@@ -82,3 +82,3 @@ * @example <caption>Code example</caption> | ||
* | ||
* @returns The EdgeConnect has been created successfully | ||
* @returns {Promise<EdgeConnect>} The EdgeConnect has been created successfully | ||
* | ||
@@ -90,2 +90,3 @@ * @example <caption>Code example</caption> | ||
* body: { | ||
* name: {}, | ||
* hostPatterns: ["*.internal.org"], | ||
@@ -113,3 +114,3 @@ * modificationInfo: { | ||
* | ||
* @returns The EdgeConnect configuration | ||
* @returns {Promise<EdgeConnect>} The EdgeConnect configuration | ||
* | ||
@@ -142,2 +143,3 @@ * @example <caption>Code example</caption> | ||
* body: { | ||
* name: {}, | ||
* hostPatterns: ["*.internal.org"], | ||
@@ -186,3 +188,3 @@ * modificationInfo: { | ||
* | ||
* @returns The OAuth client secret was rotated successfully | ||
* @returns {Promise<OAuthClientRotationResponse>} The OAuth client secret was rotated successfully | ||
* | ||
@@ -210,3 +212,3 @@ * @example <caption>Code example</caption> | ||
* | ||
* @returns The matched EdgeConnect and considered alternatives which are more general | ||
* @returns {Promise<MatchedResponse>} The matched EdgeConnect and considered alternatives which are more general | ||
* | ||
@@ -213,0 +215,0 @@ * @example <caption>Code example</caption> |
/** | ||
* The status of the OAuth client | ||
* | ||
* @deprecated Use literal values. | ||
*/ | ||
@@ -4,0 +6,0 @@ export declare enum MetadataOauthClientStatus { |
@@ -1,4 +0,3 @@ | ||
import { MetadataOauthClientStatus } from './metadata-oauth-client-status'; | ||
export type AsJson = string; | ||
export declare function fromJson($model: AsJson): MetadataOauthClientStatus; | ||
export declare function toJson($model: MetadataOauthClientStatus): AsJson; | ||
export declare function fromJson($model: AsJson): 'ACTIVE' | 'INACTIVE' | 'PENDING_DELETION' | 'DELETED'; | ||
export declare function toJson($model: 'ACTIVE' | 'INACTIVE' | 'PENDING_DELETION' | 'DELETED'): AsJson; |
import { EdgeConnectInstance } from './edge-connect-instance'; | ||
import { MetadataOauthClientStatus } from './metadata-oauth-client-status'; | ||
export interface Metadata { | ||
@@ -8,3 +7,3 @@ instances?: EdgeConnectInstance[]; | ||
*/ | ||
oauthClientStatus?: MetadataOauthClientStatus; | ||
oauthClientStatus?: 'ACTIVE' | 'INACTIVE' | 'PENDING_DELETION' | 'DELETED'; | ||
} |
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
111
4100
182432
595