import { AbortSignal as AbortSignal_2 } from '@dynatrace-sdk/http-client'; import { ApiClientError } from '@dynatrace-sdk/shared-errors'; import { ApiGatewayError } from '@dynatrace-sdk/shared-errors'; import { ClientRequestError } from '@dynatrace-sdk/shared-errors'; import { HttpClient } from '@dynatrace-sdk/http-client'; import { InvalidResponseError } from '@dynatrace-sdk/shared-errors'; import { isApiClientError } from '@dynatrace-sdk/shared-errors'; import { isApiGatewayError } from '@dynatrace-sdk/shared-errors'; import { isClientRequestError } from '@dynatrace-sdk/shared-errors'; import { isInvalidResponseError } from '@dynatrace-sdk/shared-errors'; export { ApiClientError } /** * Configuration for generated TypeScript SDK clients * @param {boolean} transformDates - Flag to control date transformations, enabled by default. */ declare interface ApiClientOptions { transformDates: boolean; } export { ApiGatewayError } export declare class BadRequest extends ErrorEnvelopeError { readonly isBadRequest = true; readonly name = "BadRequest"; } export { ClientRequestError } export declare class DefaultErrorResponse extends ErrorEnvelopeError { readonly isDefaultErrorResponse = true; readonly name = "DefaultErrorResponse"; } export declare interface EffectivePermission { /** * @exampleValue state:app-states:write */ permission: string; /** * true: The caller has the permission false: The caller does not have the permission condition: The caller conditionally has the permission or in case of scopes starting with 'environment-api:' the caller only has the permission for specific management zones. * * @exampleValue true */ granted: 'true' | 'false' | 'condition'; context?: PermissionContext[]; } /** * true: The caller has the permission false: The caller does not have the permission condition: The caller conditionally has the permission or in case of scopes starting with 'environment-api:' the caller only has the permission for specific management zones. * * @deprecated Use literal values. */ export declare enum EffectivePermissionGranted { True = "true", False = "false", Condition = "condition" } export declare interface EffectivePermissions extends Array { } export declare class EffectivePermissionsClient { private httpClient; private shouldTransformDates; /** * @param {HttpClient} httpClientImplementation - You can provide custom http client as a parameter to constructor of a EffectivePermissionsClient. Custom http client should implement {HttpClient} interface. * @param {ApiClientOptions} [options] - Optional configuration for SDK Client. * @example * const effectivePermissionsClientNodeJs = new EffectivePermissionsClient(yourCustomImplementation); */ constructor(httpClientImplementation: HttpClient, options?: ApiClientOptions); /** * Get the effective permissions of the calling user in the environment * * **One of the following scopes is required:** * + app-engine:apps:run * + app-engine:functions:run * + platform-management:effective-permissions:resolve * *

This endpoint resolves whether the caller (based on the provided OAuth token when calling this endpoint) has the requested permissions (see [IAM policy reference](https://dt-url.net/ut02qdv) for a list of permissions and their conditions). It resolves the permission via IAM and uses the optional context to evaluate conditional results. The provided context consists of key-value pairs where the `key` must correspond to the name of a supported condition of the requested permission and the `value` is the value that it this condition is evaluated against given a user's policies. * * For each requested permission the response indicates whether the user has the requested permission (`"granted": "true"`), does not have it (`"granted": "false"`) or only has it conditionally (`"granted": "condition"`), meaning that the provided values for conditions in the context are not sufficient to decide whether the caller has the permission. * * For environment API v2 scopes (i.e. scopes starting with environment-api:) roles on the environment and management zone level will also be considered. * * > ℹ️ **Settings permission** requests for scopes `settings:schemas:read`, `settings:objects:read`, and `settings:objects:write` will always result in a result with `"granted": "condition"`. You can use the dedicated [effective permissions endpoint for settings](/platform/swagger-ui/index.html?urls.primaryName=Classic+Environment+API+v2+%28for+SDK+generation%29) instead. * * > ℹ️ Apps must list all permissions they check in the list of `scopes` in their app configuration. * * You can learn more about querying user permissions on [Dynatrace Developer](https://dt-url.net/query-user-permissions). * * @returns {Promise} Success * * @example Code example * import { effectivePermissionsClient } from "@dynatrace-sdk/client-platform-management-service"; * * const data = * await effectivePermissionsClient.resolveEffectivePermissions( * { * body: { * permissions: [ * { permission: "state:app-states:write" }, * ], * }, * }, * ); * * @throws {DefaultErrorResponse} Unexpected error * @throws {InvalidResponseError} * @throws {ApiClientError} * @throws {ClientRequestError} */ resolveEffectivePermissions(config: { body: ResolutionRequest; abortSignal?: AbortSignal_2; }): Promise; } export declare const effectivePermissionsClient: EffectivePermissionsClient; export declare interface EnvironmentInfo { environmentId: string; createTime: Date; blockTime?: Date; type: 'INTERNAL' | 'CUSTOMER' | 'SELF_MONITORING'; state: 'BEING_CREATED' | 'CREATED_NOT_INITIALIZED' | 'ACTIVE' | 'DEACTIVATED' | 'BEING_DELETED' | 'BLOCKED' | 'DELETION_FAILED' | 'PRE_ALLOCATED'; } export declare class EnvironmentInformationClient { private httpClient; private shouldTransformDates; /** * @param {HttpClient} httpClientImplementation - You can provide custom http client as a parameter to constructor of a EnvironmentInformationClient. Custom http client should implement {HttpClient} interface. * @param {ApiClientOptions} [options] - Optional configuration for SDK Client. * @example * const environmentInformationClientNodeJs = new EnvironmentInformationClient(yourCustomImplementation); */ constructor(httpClientImplementation: HttpClient, options?: ApiClientOptions); /** * Get basic environment information * * **One of the following scopes is required:** * + app-engine:apps:run * + app-engine:functions:run * + platform-management:environments:read * *

Get basic information about the current environment. * * @returns {Promise} Info about the requested environment. * * @example Code example * import { environmentInformationClient } from "@dynatrace-sdk/client-platform-management-service"; * * const data = * await environmentInformationClient.getEnvironmentInformation(); * * @throws {BadRequest} Bad request * @throws {Unauthorized} Authentication failed * @throws {NotFound} Resource not found * @throws {ServiceUnavailable} There is a temporary problem in the backend. * @throws {DefaultErrorResponse} Unexpected error * @throws {InvalidResponseError} * @throws {ApiClientError} * @throws {ClientRequestError} */ getEnvironmentInformation(config?: { abortSignal?: AbortSignal_2; } | AbortSignal_2): Promise; } export declare const environmentInformationClient: EnvironmentInformationClient; /** * @deprecated Use literal values. */ export declare enum EnvironmentInfoType { Internal = "INTERNAL", Customer = "CUSTOMER", SelfMonitoring = "SELF_MONITORING" } export declare class EnvironmentSettingsClient { private httpClient; private shouldTransformDates; /** * @param {HttpClient} httpClientImplementation - You can provide custom http client as a parameter to constructor of a EnvironmentSettingsClient. Custom http client should implement {HttpClient} interface. * @param {ApiClientOptions} [options] - Optional configuration for SDK Client. * @example * const environmentSettingsClientNodeJs = new EnvironmentSettingsClient(yourCustomImplementation); */ constructor(httpClientImplementation: HttpClient, options?: ApiClientOptions); /** * Get settings for the environment * * **One of the following scopes is required:** * + app-engine:apps:run * + app-engine:functions:run * + platform-management:environments:read * *

Gets settings for environment. * * @returns {Promise} The settings for the requested environment * * @example Code example * import { environmentSettingsClient } from "@dynatrace-sdk/client-platform-management-service"; * * const data = * await environmentSettingsClient.getEnvironmentSettings(); * * @throws {BadRequest} Bad request * @throws {Unauthorized} Authentication failed * @throws {NotFound} Resource not found * @throws {ServiceUnavailable} There is a temporary problem in the backend. * @throws {DefaultErrorResponse} Unexpected error * @throws {InvalidResponseError} * @throws {ApiClientError} * @throws {ClientRequestError} */ getEnvironmentSettings(config?: { abortSignal?: AbortSignal_2; } | AbortSignal_2): Promise; } export declare const environmentSettingsClient: EnvironmentSettingsClient; /** * @deprecated Use literal values. */ export declare enum EnvironmentState { BeingCreated = "BEING_CREATED", CreatedNotInitialized = "CREATED_NOT_INITIALIZED", Active = "ACTIVE", Deactivated = "DEACTIVATED", BeingDeleted = "BEING_DELETED", Blocked = "BLOCKED", DeletionFailed = "DELETION_FAILED", PreAllocated = "PRE_ALLOCATED" } /** * Standard error response */ declare interface Error_2 { /** * @exampleValue 500 */ code: number; /** * @exampleValue Internal server error */ message: string; details?: ErrorDetails; } export { Error_2 as Error } export declare interface ErrorDetails { missingScopes?: string[]; missingPermissions?: string[]; } export declare interface ErrorEnvelope { /** * Standard error response */ error: Error_2; } /** * @deprecated Use *ClientRequestError* or more specific error class. */ export declare class ErrorEnvelopeError extends ClientRequestError { readonly isErrorEnvelopeError = true; } export { InvalidResponseError } export { isApiClientError } export { isApiGatewayError } export declare function isBadRequest(e: any): e is BadRequest; export { isClientRequestError } export declare function isDefaultErrorResponse(e: any): e is DefaultErrorResponse; /** * @deprecated Use *isClientRequestError* or more specific type guard. */ export declare function isErrorEnvelopeError(e: any): e is ErrorEnvelopeError; export { isInvalidResponseError } export declare function isNotFound(e: any): e is NotFound; export declare function isServiceUnavailable(e: any): e is ServiceUnavailable; export declare function isUnauthorized(e: any): e is Unauthorized; export declare interface License { trial: boolean; platformSubscription: boolean; } export declare class LicenseInformationClient { private httpClient; private shouldTransformDates; /** * @param {HttpClient} httpClientImplementation - You can provide custom http client as a parameter to constructor of a LicenseInformationClient. Custom http client should implement {HttpClient} interface. * @param {ApiClientOptions} [options] - Optional configuration for SDK Client. * @example * const licenseInformationClientNodeJs = new LicenseInformationClient(yourCustomImplementation); */ constructor(httpClientImplementation: HttpClient, options?: ApiClientOptions); /** * Get basic license information * * **One of the following scopes is required:** * + app-engine:apps:run * + app-engine:functions:run * + platform-management:environments:read * *

Get basic license information about the current environment. * * @returns {Promise} The license info of the requested environment. * * @example Code example * import { licenseInformationClient } from "@dynatrace-sdk/client-platform-management-service"; * * const data = await licenseInformationClient.getLicense(); * * @throws {BadRequest} Bad request * @throws {Unauthorized} Authentication failed * @throws {NotFound} Resource not found * @throws {ServiceUnavailable} There is a temporary problem in the backend. * @throws {DefaultErrorResponse} Unexpected error * @throws {InvalidResponseError} * @throws {ApiClientError} * @throws {ClientRequestError} */ getLicense(config?: { abortSignal?: AbortSignal_2; } | AbortSignal_2): Promise; /** * Get basic license settings information * * **One of the following scopes is required:** * + app-engine:apps:run * + app-engine:functions:run * + platform-management:environments:read * *

Get basic license settings information about the current environment * * @returns {Promise} The license settings info of the requested environment. * * @example Code example * import { licenseInformationClient } from "@dynatrace-sdk/client-platform-management-service"; * * const data = * await licenseInformationClient.getLicenseSettings(); * * @throws {BadRequest} Bad request * @throws {Unauthorized} Authentication failed * @throws {NotFound} Resource not found * @throws {ServiceUnavailable} There is a temporary problem in the backend. * @throws {DefaultErrorResponse} Unexpected error * @throws {InvalidResponseError} * @throws {ApiClientError} * @throws {ClientRequestError} */ getLicenseSettings(config?: { /** * optional array of key(s) for filtering * * @exampleValue [] */ keys?: string[]; abortSignal?: AbortSignal_2; }): Promise; } export declare const licenseInformationClient: LicenseInformationClient; export declare interface LicenseSetting { key: string; value: string; } export declare interface LicenseSettingsResponse { settings: LicenseSetting[]; } export declare class NotFound extends ErrorEnvelopeError { readonly isNotFound = true; readonly name = "NotFound"; } export declare interface PermissionContext { /** * @exampleValue shared:app-id */ key: string; /** * @exampleValue dynatrace.notebooks */ value: string; } export declare interface ResolutionRequest { permissions: SinglePermissionRequest[]; } export declare class ServiceUnavailable extends ErrorEnvelopeError { readonly isServiceUnavailable = true; readonly name = "ServiceUnavailable"; } export declare interface SettingsResponse { chatEnabled: boolean; /** * ISO3166-1 alpha-2 two letter country code. See: https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2 * * @exampleValue ES */ countryCode?: string; /** * Date when the trial period ends. * * @exampleValue 2025-04-25T10:08:09.193592Z */ activeTrialSubscriptionEndDate?: Date; } /** * Optional generic set of context data */ export declare interface SinglePermissionRequest { /** * @exampleValue state:app-states:write */ permission: string; context?: PermissionContext[] | null; } export declare class Unauthorized extends ErrorEnvelopeError { readonly isUnauthorized = true; readonly name = "Unauthorized"; } export { }