Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

@dynatrace-sdk/client-app-engine-registry

Package Overview
Dependencies
Maintainers
0
Versions
21
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@dynatrace-sdk/client-app-engine-registry - npm Package Compare versions

Comparing version 1.9.0 to 1.12.0

types/packages/client/app-engine-registry/src/lib/utils/encoding.d.ts

20

CHANGELOG.md

@@ -5,2 +5,22 @@ # AppEngine - Registry

## 1.12.0
### Minor Changes
- Enums are replaced with unions of literals. APPDEV-10338
### Patch Changes
- Add return types and improve usage examples inside JSDoc. APPDEV-7536
## 1.11.0
Add 4XX and 5XX response status codes
## 1.10.0
### Features
- Export errors from the package.
## 1.9.0

@@ -7,0 +27,0 @@

4

dynatrace-metadata.json
{
"dynagen": {
"version": "0.14.0",
"version": "0.15.2",
"generatedAt": "",
"template": {
"name": "@dynatrace-sdk/template-typescript-client",
"version": "0.22.1"
"version": "0.27.0"
}

@@ -9,0 +9,0 @@ },

{
"name": "@dynatrace-sdk/client-app-engine-registry",
"version": "1.9.0",
"version": "1.12.0",
"description": "Manage Dynatrace AppEngine apps.",

@@ -9,3 +9,3 @@ "license": "Apache-2.0",

"@dynatrace-sdk/http-client": "^1.2.0",
"@dynatrace-sdk/shared-errors": "^0.0.2"
"@dynatrace-sdk/shared-errors": "^1.0.0"
},

@@ -12,0 +12,0 @@ "main": "./cjs/index.js",

# @dynatrace-sdk/client-app-engine-registry
[![npm](https://img.shields.io/badge/npm-v1.9.0-blue)](https://www.npmjs.com/package/@dynatrace-sdk/client-app-engine-registry/v/1.9.0)
[![npm](https://img.shields.io/badge/npm-v1.12.0-blue)](https://www.npmjs.com/package/@dynatrace-sdk/client-app-engine-registry/v/1.12.0)
[![License](https://img.shields.io/badge/License-Apache_2.0-blue.svg)](https://opensource.org/licenses/Apache-2.0)

@@ -82,5 +82,14 @@

OK
| Return type | Status code | Description |
|---|---|---|
|[AppInfo](#appinfo)|200|OK|
#### Throws
| Error Type | Error Message |
|---|---|
|ErrorEnvelopeError|Client side error. \| Server side error.|
<details>

@@ -137,5 +146,14 @@ <summary>

OK
| Return type | Status code | Description |
|---|---|---|
|[AppInfoList](#appinfolist)|200|OK|
#### Throws
| Error Type | Error Message |
|---|---|
|ErrorEnvelopeError|Client side error. \| Server side error.|
<details>

@@ -191,5 +209,14 @@ <summary>

Accepted; new app will be installed/updated
| Return type | Status code | Description |
|---|---|---|
|[AppStub](#appstub)|202|Accepted; new app will be installed/updated|
#### Throws
| Error Type | Error Message |
|---|---|
|ErrorEnvelopeError|Bad Request \| Client side error. \| Server side error.|
<details>

@@ -243,5 +270,14 @@ <summary>

OK
| Return type | Status code | Description |
|---|---|---|
|[SearchAppActionList](#searchappactionlist)|200|OK|
#### Throws
| Error Type | Error Message |
|---|---|
|ErrorEnvelopeError|Client side error. \| Server side error.|
<details>

@@ -292,3 +328,16 @@ <summary>

#### Returns
| Return type | Status code | Description |
|---|---|---|
|void|202|Accepted; app will be uninstalled|
#### Throws
| Error Type | Error Message |
|---|---|
|ErrorEnvelopeError|Client side error. \| Server side error.|
<details>

@@ -324,3 +373,3 @@ <summary>

<div class="padding-bottom--md">
<strong>appEngineRegistrySchemaManifestClient.getAppManifestSchema(abortSignal?): Promise&lt;Record&lt;[string](https://developer.mozilla.org/en-US/docs/Glossary/String) &#124; [any](https://www.typescriptlang.org/docs/handbook/2/everyday-types.html#any)&gt;&gt;</strong>
<strong>appEngineRegistrySchemaManifestClient.getAppManifestSchema(config): Promise&lt;Record&lt;[string](https://developer.mozilla.org/en-US/docs/Glossary/String) &#124; [any](https://www.typescriptlang.org/docs/handbook/2/everyday-types.html#any)&gt;&gt;</strong>

@@ -339,5 +388,14 @@ <div class="padding-left--md">

OK
| Return type | Status code | Description |
|---|---|---|
|void|200|OK|
#### Throws
| Error Type | Error Message |
|---|---|
|ErrorEnvelopeError|Client side error. \| Server side error.|
<details>

@@ -366,3 +424,3 @@ <summary>

<div class="padding-bottom--md">
<strong>appEngineRegistrySchemaManifestClient.getDefaultCspProperties(abortSignal?): Promise&lt;<a href="#appdefaultcsp">AppDefaultCsp</a>&gt;</strong>
<strong>appEngineRegistrySchemaManifestClient.getDefaultCspProperties(config): Promise&lt;<a href="#appdefaultcsp">AppDefaultCsp</a>&gt;</strong>

@@ -381,5 +439,14 @@ <div class="padding-left--md">

OK
| Return type | Status code | Description |
|---|---|---|
|[AppDefaultCsp](#appdefaultcsp)|200|OK|
#### Throws
| Error Type | Error Message |
|---|---|
|ErrorEnvelopeError|Client side error. \| Server side error.|
<details>

@@ -407,23 +474,16 @@ <summary>

Default Content Security Policies for apps.
| Name | Type |
| --- | --- |
|policyDirectives<sup>*required</sup>|<a href="#appdefaultcsppolicydirectives" target="_blank" rel="noopener noreferrer">AppDefaultCspPolicyDirectives</a>|
| Name | Type | Description |
| --- | --- | --- |
|policyDirectives<sup>*required</sup>|<a href="#appdefaultcsppolicydirectives" target="_blank" rel="noopener noreferrer">AppDefaultCspPolicyDirectives</a>|The policy directives |
### AppDefaultCspPolicyDirectives
**type**: Record&lt;string, string[] | undefined&gt;
The policy directives
**type**: Record&lt;string, string[] | undefined&gt;
The policy directives
### AppIcon
Representation of an app icon.

@@ -437,5 +497,2 @@

A minimal representation of an app.

@@ -445,13 +502,13 @@

| --- | --- | --- |
|appIcon|<a href="#appicon">AppIcon</a>| |
|appIcon|<a href="#appicon">AppIcon</a>|Representation of an app icon. |
|description<sup>*required</sup>|[string](https://developer.mozilla.org/en-US/docs/Glossary/String)|The description of the app |
|id<sup>*required</sup>|[string](https://developer.mozilla.org/en-US/docs/Glossary/String)|The id of the app |
|isBuiltin|[boolean](https://developer.mozilla.org/en-US/docs/Glossary/Boolean)|<p>Whether this is a built-in app or not. Built-in apps are provided by Dynatrace and installed on every environment.</p> |
|isolatedUri|<a href="#appisolateduri" target="_blank" rel="noopener noreferrer">AppIsolatedUri</a>| |
|manifest|AppInfoManifest| |
|modificationInfo<sup>*required</sup>|<a href="#modificationinfo">ModificationInfo</a>| |
|isolatedUri|<a href="#appisolateduri" target="_blank" rel="noopener noreferrer">AppIsolatedUri</a>|Representation of an app's isolated uri. |
|manifest|AppInfoManifest|The manifest of the app |
|modificationInfo<sup>*required</sup>|<a href="#modificationinfo">ModificationInfo</a>|Modification information about the app |
|name<sup>*required</sup>|[string](https://developer.mozilla.org/en-US/docs/Glossary/String)|The name of the app |
|resourceContext|<a href="#resourcecontext" target="_blank" rel="noopener noreferrer">ResourceContext</a>| |
|resourceStatus<sup>*required</sup>|<a href="#resourcestatus">ResourceStatus</a>| |
|signatureInfo<sup>*required</sup>|<a href="#appsignatureinfo" target="_blank" rel="noopener noreferrer">AppSignatureInfo</a>| |
|resourceContext|<a href="#resourcecontext" target="_blank" rel="noopener noreferrer">ResourceContext</a>|Additional resource context information |
|resourceStatus<sup>*required</sup>|<a href="#resourcestatus">ResourceStatus</a>|The status of the app plus additional details. |
|signatureInfo<sup>*required</sup>|<a href="#appsignatureinfo" target="_blank" rel="noopener noreferrer">AppSignatureInfo</a>|Representation of an app's signature verification. |
|version<sup>*required</sup>|[string](https://developer.mozilla.org/en-US/docs/Glossary/String)|The version of the app |

@@ -461,5 +518,2 @@

A list of minimal app representations.

@@ -473,5 +527,2 @@

Representation of an app&apos;s isolated uri.

@@ -487,5 +538,2 @@

Representation of an app&apos;s signature verification.

@@ -500,5 +548,2 @@

A minimal representation of an installed/updated app.

@@ -513,5 +558,2 @@

Contains information about a constraint violation caused by invalid input.

@@ -526,5 +568,2 @@

Contains information for 4xx and 5xx errors.

@@ -535,3 +574,3 @@

|code<sup>*required</sup>|[number](https://developer.mozilla.org/en-US/docs/Glossary/Number)|The HTTP status code |
|details|<a href="#errordetails">ErrorDetails</a>| |
|details|<a href="#errordetails">ErrorDetails</a>|Contains details for 4xx and 5xx errors. |
|help|[string](https://developer.mozilla.org/en-US/docs/Glossary/String)|Additional information related to the error |

@@ -543,5 +582,2 @@ |message<sup>*required</sup>|[string](https://developer.mozilla.org/en-US/docs/Glossary/String)|The error message |

Contains details for 4xx and 5xx errors.

@@ -552,4 +588,4 @@

|constraintViolations|Array&lt;<a href="#constraintviolation" target="_blank" rel="noopener noreferrer">ConstraintViolation</a>&gt;|A list of constraint violations |
|errorCode|MaxNumberOfInstalledCustomAppsExceeded| |
|errorCodeProperties|<a href="#errordetailserrorcodeproperties">ErrorDetailsErrorCodeProperties</a>| |
|errorCode|"MaxNumberOfInstalledCustomAppsExceeded"|<p>An optional error code that contains more detailed error information than the HTTP response code alone.</p> <p>Possible error codes:</p> <ul> <li><code>MaxNumberOfInstalledCustomAppsExceeded</code>: The app bundle could not be uploaded because the max number of custom apps was exceeded. Learn more: https://dt-url.net/upgrade-license</li> </ul> |
|errorCodeProperties|<a href="#errordetailserrorcodeproperties">ErrorDetailsErrorCodeProperties</a>|Additional properties related to the provided error code |
|errorRef|[string](https://developer.mozilla.org/en-US/docs/Glossary/String)|Generated unique value for 5xx errors. |

@@ -560,5 +596,2 @@ |traceId|[string](https://developer.mozilla.org/en-US/docs/Glossary/String)|OpenTelemetry trace id of the trace where error occurs. |

Additional properties related to the provided error code

@@ -572,16 +605,10 @@

Error response for all 4xx and 5xx errors.
| Name | Type |
| --- | --- |
|error<sup>*required</sup>|<a href="#error" target="_blank" rel="noopener noreferrer">Error</a>|
| Name | Type | Description |
| --- | --- | --- |
|error<sup>*required</sup>|<a href="#error" target="_blank" rel="noopener noreferrer">Error</a>|Contains information for 4xx and 5xx errors. |
### ModificationInfo
Modification information about the app

@@ -598,5 +625,2 @@

Additional resource context information

@@ -606,9 +630,6 @@

| --- | --- | --- |
|operations|Array&lt;ResourceContextOperationsItem&gt;|<p>Operations that are allowed on the app depending on the user's permissions.</p> <ul> <li> <p><code>run</code>: user is allowed to run the app.</p> </li> <li> <p><code>update</code>: user is allowed to update the app.</p> </li> <li> <p><code>uninstall</code>: user is allowed to uninstall the app.</p> </li> </ul> |
|operations|Array&lt;"run" &#124; "update" &#124; "uninstall"&gt;|<p>Operations that are allowed on the app depending on the user's permissions.</p> <ul> <li> <p><code>run</code>: user is allowed to run the app.</p> </li> <li> <p><code>update</code>: user is allowed to update the app.</p> </li> <li> <p><code>uninstall</code>: user is allowed to uninstall the app.</p> </li> </ul> |
### ResourceStatus
The status of the app plus additional details.

@@ -618,5 +639,5 @@

| --- | --- | --- |
|operationStateBeforeError|ResourceStatusOperationStateBeforeError| |
|pendingOperation|ResourceStatusPendingOperation| |
|status<sup>*required</sup>|ResourceStatusStatus| |
|operationStateBeforeError|"PENDING_INSTALL" &#124; "PENDING_UPDATE" &#124; "PENDING_DELETE" &#124; "OK"|<p>Details about the state when an error occurred. Only present if the app's <code>status</code> is <code>ERROR</code>.</p> <ul> <li> <p><code>PENDING_INSTALL</code>: The error occurred while installing the app.</p> </li> <li> <p><code>PENDING_UPDATE</code>: The error occurred while updating the app.</p> </li> <li> <p><code>PENDING_DELETE</code>: The error occurred while deleting the app.</p> </li> <li> <p><code>OK</code>: At least one sub resource failed while the app was already running.</p> </li> </ul> |
|pendingOperation|"INSTALL" &#124; "UPDATE" &#124; "DELETE"|<p>The pending operation of the app. Only present if the app's <code>status</code> is <code>PENDING</code>.</p> <ul> <li> <p><code>INSTALL</code>: The app is currently being installed.</p> </li> <li> <p><code>UPDATE</code>: The app is currently being updated.</p> </li> <li> <p><code>DELETE</code>: The app is currently being deleted.</p> </li> </ul> |
|status<sup>*required</sup>|"OK" &#124; "PENDING" &#124; "DEACTIVATED" &#124; "ERROR"|<p>The status of the app.</p> <ul> <li> <p><code>OK</code>: The app is fully installed and running.</p> </li> <li> <p><code>PENDING</code>: The app is currently being installed, updated or deleted.</p> </li> <li> <p><code>DEACTIVATED</code>: The app is deactivated and cannot be executed.</p> </li> <li> <p><code>ERROR</code>: The app failed with an error.</p> </li> </ul> |
|subResourceStatuses|Array&lt;<a href="#subresourcestatus">SubResourceStatus</a>&gt;|The statuses of the app's sub resources. |

@@ -626,5 +647,2 @@

List of apps with actions. Apps are sorted by name in ascending order.

@@ -640,7 +658,2 @@

| Name | Type | Description |

@@ -653,5 +666,2 @@ | --- | --- | --- |

Contains information about a constraint violation caused by invalid input.

@@ -666,5 +676,2 @@

Additional error information that can be present if the sub resource `status` is `FAILED`

@@ -681,18 +688,12 @@

The status of the sub resource.
| Name | Type |
| --- | --- |
|error|<a href="#subresourceerror" target="_blank" rel="noopener noreferrer">SubResourceError</a>|
|status<sup>*required</sup>|SubResourceStatusStatus|
|subResourceType<sup>*required</sup>|SubResourceStatusSubResourceType|
| Name | Type | Description |
| --- | --- | --- |
|error|<a href="#subresourceerror" target="_blank" rel="noopener noreferrer">SubResourceError</a>|Additional error information that can be present if the sub resource <code>status</code> is <code>FAILED</code> |
|status<sup>*required</sup>|"SCHEDULED" &#124; "DEPLOYING" &#124; "DEPLOYED" &#124; "FAILED" &#124; "NO_RESOURCES"|<p>The deployment status of the app's sub resource:</p> <ul> <li> <p><code>SCHEDULED</code>: Only the uploaded app bundle is persisted.</p> </li> <li> <p><code>DEPLOYING</code>: The app's sub resources are currently being deployed.</p> </li> <li> <p><code>DEPLOYED</code>: The app's sub resources were successfully deployed.</p> </li> <li> <p><code>FAILED</code>: The deployment of the app's sub resources failed.</p> </li> <li> <p><code>NO_RESOURCES</code>: The app bundle does not contain any sub resources of this type</p> </li> </ul> |
|subResourceType<sup>*required</sup>|"FUNCTIONS" &#124; "FILES" &#124; "SETTINGS_SCHEMAS" &#124; "DOCUMENTS"|<p>The sub resource type.</p> <ul> <li> <p><code>FUNCTIONS</code>: app functions.</p> </li> <li> <p><code>FILES</code>: static files of an app.</p> </li> <li> <p><code>SETTINGS_SCHEMAS</code>: settings schemas of an app.</p> </li> <li> <p><code>DOCUMENTS</code>: documents, e.g. templates, that are part of an app bundle.</p> </li> </ul> |
### Warning
A warning.

@@ -699,0 +700,0 @@

@@ -19,3 +19,3 @@ import { AbortSignal, HttpClient } from '@dynatrace-sdk/http-client';

*
* @returns OK
* @returns {Promise<AppInfoList>} OK
*

@@ -27,2 +27,3 @@ * @example <caption>Code example</caption>

*
* @throws {ErrorEnvelopeError} Client side error. | Server side error.
* @throws {InvalidResponseError}

@@ -64,3 +65,3 @@ * @throws {ApiClientError}

*
* @returns Accepted; new app will be installed/updated
* @returns {Promise<AppStub>} Accepted; new app will be installed/updated
*

@@ -74,3 +75,3 @@ * @example <caption>Code example</caption>

*
* @throws {ErrorEnvelopeError} Bad Request
* @throws {ErrorEnvelopeError} Bad Request | Client side error. | Server side error.
* @throws {InvalidResponseError}

@@ -89,3 +90,3 @@ * @throws {ApiClientError}

*
* @returns OK
* @returns {Promise<SearchAppActionList>} OK
*

@@ -98,2 +99,3 @@ * @example <caption>Code example</caption>

*
* @throws {ErrorEnvelopeError} Client side error. | Server side error.
* @throws {InvalidResponseError}

@@ -119,3 +121,3 @@ * @throws {ApiClientError}

*
* @returns OK
* @returns {Promise<AppInfo>} OK
*

@@ -129,2 +131,3 @@ * @example <caption>Code example</caption>

*
* @throws {ErrorEnvelopeError} Client side error. | Server side error.
* @throws {InvalidResponseError}

@@ -170,2 +173,3 @@ * @throws {ApiClientError}

*
* @throws {ErrorEnvelopeError} Client side error. | Server side error.
* @throws {InvalidResponseError}

@@ -172,0 +176,0 @@ * @throws {ApiClientError}

@@ -14,3 +14,3 @@ import { AbortSignal, HttpClient } from '@dynatrace-sdk/http-client';

*
* @returns OK
* @returns {Promise<Record<string, any>>} OK
*

@@ -23,2 +23,3 @@ * @example <caption>Code example</caption>

*
* @throws {ErrorEnvelopeError} Client side error. | Server side error.
* @throws {InvalidResponseError}

@@ -28,7 +29,9 @@ * @throws {ApiClientError}

*/
getAppManifestSchema(abortSignal?: AbortSignal): Promise<Record<string, any>>;
getAppManifestSchema(config?: {
abortSignal?: AbortSignal;
} | AbortSignal): Promise<Record<string, any>>;
/**
* Get default CSP rules for apps
*
* @returns OK
* @returns {Promise<AppDefaultCsp>} OK
*

@@ -41,2 +44,3 @@ * @example <caption>Code example</caption>

*
* @throws {ErrorEnvelopeError} Client side error. | Server side error.
* @throws {InvalidResponseError}

@@ -46,4 +50,6 @@ * @throws {ApiClientError}

*/
getDefaultCspProperties(abortSignal?: AbortSignal): Promise<AppDefaultCsp>;
getDefaultCspProperties(config?: {
abortSignal?: AbortSignal;
} | AbortSignal): Promise<AppDefaultCsp>;
}
export declare const appEngineRegistrySchemaManifestClient: AppEngineRegistrySchemaManifestClient;
/**
* ErrorEnvelope
*/
import { ClientRequestError } from './client-request-error';
import { ClientRequestError } from '@dynatrace-sdk/shared-errors';
import { ErrorEnvelope } from '../models';

@@ -6,0 +6,0 @@ export declare class ErrorEnvelopeError extends ClientRequestError<ErrorEnvelope> {

@@ -1,4 +0,2 @@

export { isClientRequestError } from './client-request-error';
export { isApiClientError } from './api-client-error';
export { isInvalidResponseError } from './invalid-response-error';
export { isErrorEnvelopeError } from './error-envelope-error';
export { ApiClientError, ApiGatewayError, ClientRequestError, InvalidResponseError, isApiClientError, isApiGatewayError, isClientRequestError, isInvalidResponseError, } from '@dynatrace-sdk/shared-errors';
export { ErrorEnvelopeError, isErrorEnvelopeError } from './error-envelope-error';

@@ -6,3 +6,6 @@ import { AppDefaultCspPolicyDirectives } from './app-default-csp-policy-directives';

export interface AppDefaultCsp {
/**
* The policy directives
*/
policyDirectives: AppDefaultCspPolicyDirectives;
}

@@ -28,2 +28,5 @@ import { AppIcon } from './app-icon';

description: string;
/**
* The manifest of the app
*/
manifest?: AppInfoManifest;

@@ -35,8 +38,26 @@ /**

isBuiltin?: boolean;
/**
* The status of the app plus additional details.
*/
resourceStatus: ResourceStatus;
/**
* Representation of an app icon.
*/
appIcon?: AppIcon;
/**
* Representation of an app's isolated uri.
*/
isolatedUri?: AppIsolatedUri;
/**
* Representation of an app's signature verification.
*/
signatureInfo: AppSignatureInfo;
/**
* Modification information about the app
*/
modificationInfo: ModificationInfo;
/**
* Additional resource context information
*/
resourceContext?: ResourceContext;
}

@@ -6,2 +6,4 @@ /**

* * `MaxNumberOfInstalledCustomAppsExceeded`: The app bundle could not be uploaded because the max number of custom apps was exceeded. Learn more: https://dt-url.net/upgrade-license
*
* @deprecated Use literal values.
*/

@@ -8,0 +10,0 @@ export declare enum ErrorDetailsErrorCode {

@@ -1,4 +0,3 @@

import { ErrorDetailsErrorCode } from './error-details-error-code';
export type AsJson = string;
export declare function fromJson($model: AsJson): ErrorDetailsErrorCode;
export declare function toJson($model: ErrorDetailsErrorCode): AsJson;
export declare function fromJson($model: AsJson): 'MaxNumberOfInstalledCustomAppsExceeded';
export declare function toJson($model: 'MaxNumberOfInstalledCustomAppsExceeded'): AsJson;
import { ConstraintViolation } from './constraint-violation';
import { ErrorDetailsErrorCode } from './error-details-error-code';
import { ErrorDetailsErrorCodeProperties } from './error-details-error-code-properties';

@@ -16,3 +15,12 @@ /**

traceId?: string;
errorCode?: ErrorDetailsErrorCode;
/**
* An optional error code that contains more detailed error information than the HTTP response code alone.
*
* Possible error codes:
* * `MaxNumberOfInstalledCustomAppsExceeded`: The app bundle could not be uploaded because the max number of custom apps was exceeded. Learn more: https://dt-url.net/upgrade-license
*/
errorCode?: 'MaxNumberOfInstalledCustomAppsExceeded';
/**
* Additional properties related to the provided error code
*/
errorCodeProperties?: ErrorDetailsErrorCodeProperties;

@@ -19,0 +27,0 @@ /**

@@ -6,3 +6,6 @@ import { Error } from './error';

export interface ErrorEnvelope {
/**
* Contains information for 4xx and 5xx errors.
*/
error: Error;
}

@@ -14,2 +14,5 @@ import { ErrorDetails } from './error-details';

message: string;
/**
* Contains details for 4xx and 5xx errors.
*/
details?: ErrorDetails;

@@ -16,0 +19,0 @@ /**

@@ -0,1 +1,4 @@

/**
* @deprecated Use literal values.
*/
export declare enum ResourceContextOperationsItem {

@@ -2,0 +5,0 @@ Run = "run",

@@ -1,4 +0,3 @@

import { ResourceContextOperationsItem } from './resource-context-operations-item';
export type AsJson = string;
export declare function fromJson($model: AsJson): ResourceContextOperationsItem;
export declare function toJson($model: ResourceContextOperationsItem): AsJson;
export declare function fromJson($model: AsJson): 'run' | 'update' | 'uninstall';
export declare function toJson($model: 'run' | 'update' | 'uninstall'): AsJson;

@@ -1,2 +0,1 @@

import { ResourceContextOperationsItem } from './resource-context-operations-item';
/**

@@ -12,3 +11,3 @@ * Additional resource context information

*/
operations?: ResourceContextOperationsItem[];
operations?: Array<'run' | 'update' | 'uninstall'>;
}

@@ -7,2 +7,4 @@ /**

* - `OK`: At least one sub resource failed while the app was already running.<br>
*
* @deprecated Use literal values.
*/

@@ -9,0 +11,0 @@ export declare enum ResourceStatusOperationStateBeforeError {

@@ -1,4 +0,3 @@

import { ResourceStatusOperationStateBeforeError } from './resource-status-operation-state-before-error';
export type AsJson = string;
export declare function fromJson($model: AsJson): ResourceStatusOperationStateBeforeError;
export declare function toJson($model: ResourceStatusOperationStateBeforeError): AsJson;
export declare function fromJson($model: AsJson): 'PENDING_INSTALL' | 'PENDING_UPDATE' | 'PENDING_DELETE' | 'OK';
export declare function toJson($model: 'PENDING_INSTALL' | 'PENDING_UPDATE' | 'PENDING_DELETE' | 'OK'): AsJson;

@@ -6,2 +6,4 @@ /**

* - `DELETE`: The app is currently being deleted.<br>
*
* @deprecated Use literal values.
*/

@@ -8,0 +10,0 @@ export declare enum ResourceStatusPendingOperation {

@@ -1,4 +0,3 @@

import { ResourceStatusPendingOperation } from './resource-status-pending-operation';
export type AsJson = string;
export declare function fromJson($model: AsJson): ResourceStatusPendingOperation;
export declare function toJson($model: ResourceStatusPendingOperation): AsJson;
export declare function fromJson($model: AsJson): 'INSTALL' | 'UPDATE' | 'DELETE';
export declare function toJson($model: 'INSTALL' | 'UPDATE' | 'DELETE'): AsJson;

@@ -7,2 +7,4 @@ /**

* - `ERROR`: The app failed with an error.<br>
*
* @deprecated Use literal values.
*/

@@ -9,0 +11,0 @@ export declare enum ResourceStatusStatus {

@@ -1,4 +0,3 @@

import { ResourceStatusStatus } from './resource-status-status';
export type AsJson = string;
export declare function fromJson($model: AsJson): ResourceStatusStatus;
export declare function toJson($model: ResourceStatusStatus): AsJson;
export declare function fromJson($model: AsJson): 'OK' | 'PENDING' | 'DEACTIVATED' | 'ERROR';
export declare function toJson($model: 'OK' | 'PENDING' | 'DEACTIVATED' | 'ERROR'): AsJson;

@@ -1,4 +0,1 @@

import { ResourceStatusOperationStateBeforeError } from './resource-status-operation-state-before-error';
import { ResourceStatusPendingOperation } from './resource-status-pending-operation';
import { ResourceStatusStatus } from './resource-status-status';
import { SubResourceStatus } from './sub-resource-status';

@@ -9,9 +6,29 @@ /**

export interface ResourceStatus {
status: ResourceStatusStatus;
/**
* The status of the app.<br>
* - `OK`: The app is fully installed and running.<br>
* - `PENDING`: The app is currently being installed, updated or deleted.<br>
* - `DEACTIVATED`: The app is deactivated and cannot be executed.<br>
* - `ERROR`: The app failed with an error.<br>
*/
status: 'OK' | 'PENDING' | 'DEACTIVATED' | 'ERROR';
/**
* The statuses of the app's sub resources.
*/
subResourceStatuses?: SubResourceStatus[];
pendingOperation?: ResourceStatusPendingOperation;
operationStateBeforeError?: ResourceStatusOperationStateBeforeError;
/**
* The pending operation of the app. Only present if the app's `status` is `PENDING`.<br>
* - `INSTALL`: The app is currently being installed.<br>
* - `UPDATE`: The app is currently being updated.<br>
* - `DELETE`: The app is currently being deleted.<br>
*/
pendingOperation?: 'INSTALL' | 'UPDATE' | 'DELETE';
/**
* Details about the state when an error occurred. Only present if the app's `status` is `ERROR`.<br>
* - `PENDING_INSTALL`: The error occurred while installing the app.<br>
* - `PENDING_UPDATE`: The error occurred while updating the app.<br>
* - `PENDING_DELETE`: The error occurred while deleting the app.<br>
* - `OK`: At least one sub resource failed while the app was already running.<br>
*/
operationStateBeforeError?: 'PENDING_INSTALL' | 'PENDING_UPDATE' | 'PENDING_DELETE' | 'OK';
}

@@ -8,2 +8,4 @@ /**

* - `NO_RESOURCES`: The app bundle does not contain any sub resources of this type<br>
*
* @deprecated Use literal values.
*/

@@ -10,0 +12,0 @@ export declare enum SubResourceStatusStatus {

@@ -1,4 +0,3 @@

import { SubResourceStatusStatus } from './sub-resource-status-status';
export type AsJson = string;
export declare function fromJson($model: AsJson): SubResourceStatusStatus;
export declare function toJson($model: SubResourceStatusStatus): AsJson;
export declare function fromJson($model: AsJson): 'SCHEDULED' | 'DEPLOYING' | 'DEPLOYED' | 'FAILED' | 'NO_RESOURCES';
export declare function toJson($model: 'SCHEDULED' | 'DEPLOYING' | 'DEPLOYED' | 'FAILED' | 'NO_RESOURCES'): AsJson;

@@ -7,2 +7,4 @@ /**

* - `DOCUMENTS`: documents, e.g. templates, that are part of an app bundle.<br>
*
* @deprecated Use literal values.
*/

@@ -9,0 +11,0 @@ export declare enum SubResourceStatusSubResourceType {

@@ -1,4 +0,3 @@

import { SubResourceStatusSubResourceType } from './sub-resource-status-sub-resource-type';
export type AsJson = string;
export declare function fromJson($model: AsJson): SubResourceStatusSubResourceType;
export declare function toJson($model: SubResourceStatusSubResourceType): AsJson;
export declare function fromJson($model: AsJson): 'FUNCTIONS' | 'FILES' | 'SETTINGS_SCHEMAS' | 'DOCUMENTS';
export declare function toJson($model: 'FUNCTIONS' | 'FILES' | 'SETTINGS_SCHEMAS' | 'DOCUMENTS'): AsJson;
import { SubResourceError } from './sub-resource-error';
import { SubResourceStatusStatus } from './sub-resource-status-status';
import { SubResourceStatusSubResourceType } from './sub-resource-status-sub-resource-type';
/**

@@ -8,5 +6,23 @@ * The status of the sub resource.

export interface SubResourceStatus {
subResourceType: SubResourceStatusSubResourceType;
status: SubResourceStatusStatus;
/**
* The sub resource type.<br>
* - `FUNCTIONS`: app functions.<br>
* - `FILES`: static files of an app.<br>
* - `SETTINGS_SCHEMAS`: settings schemas of an app.<br>
* - `DOCUMENTS`: documents, e.g. templates, that are part of an app bundle.<br>
*/
subResourceType: 'FUNCTIONS' | 'FILES' | 'SETTINGS_SCHEMAS' | 'DOCUMENTS';
/**
* The deployment status of the app's sub resource:<br>
* - `SCHEDULED`: Only the uploaded app bundle is persisted.<br>
* - `DEPLOYING`: The app's sub resources are currently being deployed.<br>
* - `DEPLOYED`: The app's sub resources were successfully deployed.<br>
* - `FAILED`: The deployment of the app's sub resources failed.<br>
* - `NO_RESOURCES`: The app bundle does not contain any sub resources of this type<br>
*/
status: 'SCHEDULED' | 'DEPLOYING' | 'DEPLOYED' | 'FAILED' | 'NO_RESOURCES';
/**
* Additional error information that can be present if the sub resource `status` is `FAILED`
*/
error?: SubResourceError;
}

@@ -11,6 +11,6 @@ import { DataTypes } from './data-types';

* Can be `text`, `json`, `array-buffer`, `blob`, `readable-stream`, `buffer` or `stream`.
* @throws DataTypeError when the data does not conform to the specified type.
* @throws UnsupportedOperationError when the type is not supported by the platform.
* @throws {DataTypeError} Data does not conform to the specified type.
* @throws {UnsupportedOperationError} Type is not supported by the platform.
*/
get<T extends keyof DataTypes>(type: T): DataTypes[T];
}

@@ -29,6 +29,6 @@ import { ResponseBodyTypes } from './response-body-types';

* The default response body type is `json`.
* @throws DataTypeError when the response body does not conform to the specified response body type.
* @throws UnsupportedOperationError when the response body type is not supported by the platform.
* @throws {DataTypeError} Response body does not conform to the specified response body type.
* @throws {UnsupportedOperationError} Response body type is not supported by the platform.
*/
body<T extends keyof ResponseBodyTypes = 'json'>(responseBodyType?: T): ResponseBodyTypes[T];
}
import { ErrorType } from './types';
/**
* Error base. All client errors should extend this class.
* Base error for all client SDKs. All other errors extend this class.
*/

@@ -11,2 +11,14 @@ export declare class ApiClientError extends Error {

}
/**
* ApiClientError type guard function.
* Does a structural check of the passed object.
* @example
* try {
* doSomething();
* } catch (e: unknown) {
* if(isApiClientError(e)) {
* handleTheError();
* }
* }
*/
export declare function isApiClientError(e: any): e is ApiClientError;

@@ -7,2 +7,5 @@ import { HttpClientResponse } from '@dynatrace-sdk/http-client';

}>;
/**
* Reference for *ApiGatewayError* details object. Contains information about received API Getaway error.
* */
export interface ApiGatewayErrorDetails extends CommonErrorDetails {

@@ -13,2 +16,6 @@ errorCodeProperties?: {

}
/**
* 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.
*/
export declare class ApiGatewayError extends ClientRequestError<ApiGatewayErrorResponseBody> {

@@ -20,2 +27,14 @@ readonly isApiGatewayError = true;

}
/**
* APIGatewayError type guard function.
* Does a structural check of the passed object.
* @example
* try {
* doSomething();
* } catch (e: unknown) {
* if(isApiClientError(e)) {
* handleTheError();
* }
* }
*/
export declare function isApiGatewayError(e: any): e is ApiGatewayError;
import { HttpClientResponse } from '@dynatrace-sdk/http-client';
import { ApiClientError } from './api-client-error';
import { ErrorResponseBody } from './types';
/**
* Generic error class for service errors, used to handle both expected and unexpected service-level errors.
* @example Handling unexpected error response, received by the SDK Client
* const responseValue = await response.body('json');
*
* throw new ClientRequestError(
* `${response.status}`,
* response,
* responseValue,
* getErrorMessage(
* responseValue,
* `Unexpected api response: code=${response.status} body="${responseValue}"`,
* ),
* e,
* );
*
*/
export declare class ClientRequestError<DTO = ErrorResponseBody> extends ApiClientError {

@@ -10,2 +27,14 @@ readonly isClientRequestError = true;

}
/**
* ClientRequestError type guard function.
* Does a structural check of the passed object.
* @example
* try {
* doSomething();
* } catch (e: unknown) {
* if(isClientRequestError(e)) {
* handleTheError();
* }
* }
*/
export declare function isClientRequestError(e: any): e is ClientRequestError;
export * from './api-client-error';
export * from './api-gateway-error';
export * from './client-request-error';
export * from './sdk-error';
export * from './invalid-response-error';
export * from './types';

@@ -1,6 +0,2 @@

/**
* Possible serialized error types
* `COMMON`: Common JS error
* `HTTP`: Error thrown by a http-client
*/
/** @ignore*/
export declare enum ErrorType {

@@ -10,23 +6,84 @@ COMMON = "JS Error",

}
/**
* Basic error envelope, that enforces all error to have mandatory "error" property.
* */
export interface ErrorResponseBody<T = CommonApiError> {
/**
* *error* object must have two mandatory fields (*code, message*) and may have two additional fields (*help, details*):
* refer to the *CommonApiError* for more details.
* */
error: T;
}
/**
* Common API error structure, established by Dynatrace API guidelines.
* */
export interface CommonApiError<T extends Record<string, any> = Record<string, any>> {
/** The error code should be set to the HTTP error code by default.<br>
* The error code may be set to an API-specific error code which must be properly documented.*/
code: number;
/** The error message should be short and precise, it should not contain details.*/
message: string;
/**
* An additional help field may be added which must be a URL to further information on how to deal with the error.<br>
* This may be some detailed error documentation page or a link to the Dynatrace support system, etc.
* */
help?: string;
/**
* Additional details about the error may be added in a details field.
* Refer to *CommonErrorDetails*
* */
details?: T;
}
/**
* *CommonApiError* details object reference. Contains common API error information.
* This object is used to convey additional information about the error like e.g., which query parameter exactly violated a precondition. <br>
* Details may contain any fields to further describe the error
* */
export interface CommonErrorDetails {
/**
* UUID string that represents a reference of the error into e.g., the log file of the service.
* */
errorRef?: string;
/**
* String containing a 32-character hex integer value that is used for tracing.
* */
traceId?: string;
/**
* String value representing a more detailed error information than the http response code alone.
* Must be a single word in CamelCase, and all possible values must be documented.
* */
errorCode?: string;
/**
* An array of *ConstraintViolation* object, refer to ConstraintViolation object reference for more details.
* */
constraintViolations?: ConstraintViolation[];
/**
* Must be an array of strings containing a complete list of missing IAM scopes necessary to successfully execute the request.
* Should be set if the API returns a 403 - Forbidden response in case of missing OAuth scopes.
* */
missingScopes?: string[];
/**
* Must be an array of strings containing a complete list of missing IAM permissions necessary to successfully execute the request.
* Should be set if the API returns a 403 - Forbidden response in case of missing OAuth user permissions.
* */
missingPermissions?: string[];
}
/**
* Contains information about an input parameter (path, query or request body)
* that violated some validation rule of the service API and caused the warning.<br>
* May contain additional fields further describing the warning.
* */
export interface ConstraintViolation extends Record<string, string | undefined> {
/**
* Mandatory field message describing the warning.
* */
message: string;
/**
* Describes the general location of the violating parameter (query parameter, request body, etc.)
*/
parameterLocation?: string;
/**
* Refers to the violating parameter within the parameterLocation.
*/
path?: string;
}

Sorry, the diff of this file is too big to display

Sorry, the diff of this file is too big to display

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc