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 { ClientRequestError } export declare interface DavisEventConfig { entityTagsMatch?: 'all' | 'any' | null; entityTags?: EntityTags | null; /** * Trigger on Davis event open only or also on close. Deprecated — use triggerOn instead. * * @deprecated */ onProblemClose?: boolean; /** * Event state to trigger on. "open" (active only), "open-and-close" (both phases), or "close" (closure only). When unset, falls back to onProblemClose for backward compatibility. */ triggerOn?: 'open' | 'open-and-close' | 'close' | null; names?: DavisEventName[] | null; /** * @deprecated */ types?: string[] | null; /** * Additional DQL matcher expression to further filter events to match. */ customFilter?: string | null; maintenanceWindowTriggerBehavior?: 'always' | 'inside' | 'outside'; } export declare interface DavisEventName { /** * Davis event name must equal or contain the string provided. */ match: 'equals' | 'contains'; name: string; } /** * Davis event name must equal or contain the string provided. * * @deprecated Use literal values. */ export declare enum DavisEventNameMatch { Equals = "equals", Contains = "contains" } export declare interface DavisEventTriggerConfig { type: 'davis-event'; value: DavisEventConfig; } /** * @deprecated Use literal values. */ export declare enum DavisEventTriggerConfigType { DavisEvent = "davis-event" } export declare interface DavisProblemCategories { monitoringUnavailable?: boolean; availability?: boolean; error?: boolean; slowdown?: boolean; resource?: boolean; custom?: boolean; info?: boolean; } export declare interface DavisProblemConfig { entityTagsMatch?: 'all' | 'any' | null; entityTags?: EntityTags | null; /** * Trigger on Davis problem open only or also on close. Deprecated — use triggerOn instead. * * @deprecated */ onProblemClose?: boolean; /** * Problem state to trigger on. "open" (active only), "open-and-close" (both phases), or "close" (closure only). When unset, falls back to onProblemClose for backward compatibility. */ triggerOn?: 'open' | 'open-and-close' | 'close' | null; categories: DavisProblemCategories; /** * Additional DQL matcher expression to further filter events to match. */ customFilter?: string | null; /** * Run only after first root cause analysis run completed. */ analysisReady?: boolean; /** * Triggers only for problems whose severity is this value or more severe. Lower numbers are more severe (1 = critical, 5 = informational), so 3 matches severities 1, 2, and 3. */ severityThreshold?: number | null; /** * Problem event fields tracked for value changes. Changes to any selected field cause re-triggering. */ triggerOnUpdateFields?: Array<'dt.davis.affected_users_count' | 'dt.davis.impact_level' | 'event.category' | 'event.severity' | 'root_cause_entity_id' | 'smartscape.affected_entities'>; /** * Minimum problem duration in minutes before the trigger fires. */ problemOpenDuration?: 5 | 10 | 15 | 30 | 60 | 120 | 240 | 1440 | 10080 | null; } /** * Minimum problem duration in minutes before the trigger fires. * * @deprecated Use literal values. */ export declare enum DavisProblemConfigProblemOpenDuration { DavisProblemConfigProblemOpenDuration_5 = 5, DavisProblemConfigProblemOpenDuration_10 = 10, DavisProblemConfigProblemOpenDuration_15 = 15, DavisProblemConfigProblemOpenDuration_30 = 30, DavisProblemConfigProblemOpenDuration_60 = 60, DavisProblemConfigProblemOpenDuration_120 = 120, DavisProblemConfigProblemOpenDuration_240 = 240, DavisProblemConfigProblemOpenDuration_1440 = 1440, DavisProblemConfigProblemOpenDuration_10080 = 10080 } export declare interface DavisProblemTriggerConfig { type: 'davis-problem'; value: DavisProblemConfig; } /** * @deprecated Use literal values. */ export declare enum DavisProblemTriggerConfigType { DavisProblem = "davis-problem" } /** * Entity tags to match by key and (optional) values. For example {"foo": [], "bar": ["a", "b", "c"]} */ export declare interface EntityTags { [propName: string]: string | string[] | undefined; } /** * Event must match all or any of the entity tags. * * @deprecated Use literal values. */ export declare enum EntityTagsMatch { All = "all", Any = "any" } declare interface Error_2 { message: string; code: number; details?: ErrorDetails; } export { Error_2 as Error } export declare interface ErrorDetails { errorCode?: string; errorRef?: string; [propName: string]: any; } export declare interface ErrorEnvelope { error: Error_2; } export declare class ErrorEnvelopeError extends ClientRequestError { readonly isErrorEnvelopeError = true; } export declare interface EventNotification { id: string; title?: string; /** * Unique identifier of resource to notify on. Used to determine if there is a notification registered for a resource in context of the app and notification type for a user. */ resourceId: string; /** * String that defines the type of a notification in context of an app. Allows to differentiate between multiple types of notifications in context of one app. */ notificationType: string; triggerConfiguration: EventTriggerConfig; modificationInfo: ModificationInfo; /** * Input object consisting of subject and content. Supports automation expressions https://dt-url.net/workflows-expression-reference and markdown syntax. A template provided with an app ({notification_type}.notification-template.json) will take precedence over the input provided here. */ input?: EventNotificationInput; /** * App id for registered notification. Optional, by default automatically inferred from the request. Only relevant for manual testing purposes via swagger. */ appId?: string; owner: string; } export declare interface EventNotificationInput { subject?: string | null; content?: string | null; } export declare interface EventNotificationRequest { id?: string; title?: string; /** * Unique identifier of resource to notify on. Used to determine if there is a notification registered for a resource in context of the app and notification type for a user. */ resourceId: string; /** * String that defines the type of a notification in context of an app. Allows to differentiate between multiple types of notifications in context of one app. */ notificationType: string; triggerConfiguration: EventTriggerConfig; /** * Input object consisting of subject and content. Supports automation expressions https://dt-url.net/workflows-expression-reference and markdown syntax. A template provided with an app ({notification_type}.notification-template.json) will take precedence over the input provided here. */ input?: EventNotificationInput; /** * App id for registered notification. Optional, by default automatically inferred from the request. Only relevant for manual testing purposes via swagger. */ appId?: string; } export declare class EventNotificationsClient { private httpClient; private shouldTransformDates; /** * @param {HttpClient} httpClientImplementation - You can provide custom http client as a parameter to constructor of a EventNotificationsClient. Custom http client should implement {HttpClient} interface. * @param {ApiClientOptions} [options] - Optional configuration for SDK Client. * @example * const eventNotificationsClientNodeJs = new EventNotificationsClient(yourCustomImplementation); */ constructor(httpClientImplementation: HttpClient, options?: ApiClientOptions); /** * **Required scope:** notification:notifications:read * * @returns {Promise} * * @example Code example * import { eventNotificationsClient } from "@dynatrace-sdk/client-notification-v2"; * * const data = * await eventNotificationsClient.getEventNotifications(); * * @throws {ErrorEnvelopeError} * @throws {InvalidResponseError} * @throws {ApiClientError} * @throws {ClientRequestError} */ getEventNotifications(config?: { /** Application id associated with the notification. Optional, by default automatically inferred from the request header. Only relevant for manual testing purposes via swagger. */ appId?: string; /** Number of results to return per page. */ limit?: number; /** String that defines the type of a notification in context of an app. Allows to differentiate between multiple types of notifications in context of one app. */ notificationType?: string; /** The initial index from which to return the results. */ offset?: number; /** Which field to use when ordering the results. */ ordering?: string; owner?: string; /** Unique identifier of resource to notify on. Used to determine if there is a notification registered for a resource in context of the app and notification type for a user. */ resourceId?: string; /** A search term. */ search?: string; abortSignal?: AbortSignal_2; }): Promise; /** * **Required scope:** notification:notifications:write * * @returns {Promise} * * @example Code example * import { eventNotificationsClient } from "@dynatrace-sdk/client-notification-v2"; * * const data = * await eventNotificationsClient.createEventNotification({ * body: { * resourceId: "...", * notificationType: "...", * triggerConfiguration: { * type: "event", * value: { query: "..." }, * }, * }, * }); * * @throws {ErrorEnvelopeError} * @throws {InvalidResponseError} * @throws {ApiClientError} * @throws {ClientRequestError} */ createEventNotification(config: { body: EventNotificationRequest; abortSignal?: AbortSignal_2; }): Promise; /** * **Required scope:** notification:notifications:read * * @returns {Promise} * * @example Code example * import { eventNotificationsClient } from "@dynatrace-sdk/client-notification-v2"; * * const data = * await eventNotificationsClient.getEventNotification({ * id: "...", * }); * * @throws {ErrorEnvelopeError} * @throws {InvalidResponseError} * @throws {ApiClientError} * @throws {ClientRequestError} */ getEventNotification(config: { /** A UUID string identifying this self notification. */ id: string; abortSignal?: AbortSignal_2; }): Promise; /** * **Required scope:** notification:notifications:write * * @returns {Promise} * * @example Code example * import { eventNotificationsClient } from "@dynatrace-sdk/client-notification-v2"; * * const data = * await eventNotificationsClient.updateEventNotification({ * id: "...", * body: { * triggerConfiguration: { * type: "event", * value: { query: "..." }, * }, * }, * }); * * @throws {ErrorEnvelopeError} * @throws {InvalidResponseError} * @throws {ApiClientError} * @throws {ClientRequestError} */ updateEventNotification(config: { body: EventNotificationUpdate; /** A UUID string identifying this self notification. */ id: string; abortSignal?: AbortSignal_2; }): Promise; /** * **Required scope:** notification:notifications:write * * @example Code example * import { eventNotificationsClient } from "@dynatrace-sdk/client-notification-v2"; * * const data = * await eventNotificationsClient.deleteEventNotification({ * id: "...", * }); * * @throws {ErrorEnvelopeError} * @throws {InvalidResponseError} * @throws {ApiClientError} * @throws {ClientRequestError} */ deleteEventNotification(config: { /** A UUID string identifying this self notification. */ id: string; abortSignal?: AbortSignal_2; }): Promise; /** * **Required scope:** notification:notifications:write * * @returns {Promise} * * @example Code example * import { eventNotificationsClient } from "@dynatrace-sdk/client-notification-v2"; * * const data = * await eventNotificationsClient.patchEventNotification({ * id: "...", * body: { * triggerConfiguration: { * type: "event", * value: { query: "..." }, * }, * }, * }); * * @throws {ErrorEnvelopeError} * @throws {InvalidResponseError} * @throws {ApiClientError} * @throws {ClientRequestError} */ patchEventNotification(config: { body: EventNotificationUpdate; /** A UUID string identifying this self notification. */ id: string; abortSignal?: AbortSignal_2; }): Promise; } export declare const eventNotificationsClient: EventNotificationsClient; export declare interface EventNotificationUpdate { title?: string; /** * Unique identifier of resource to notify on. Used to determine if there is a notification registered for a resource in context of the app and notification type for a user. */ resourceId?: string; /** * String that defines the type of a notification in context of an app. Allows to differentiate between multiple types of notifications in context of one app. */ notificationType?: string; triggerConfiguration?: EventTriggerConfig; /** * Input object consisting of subject and content. Supports automation expressions https://dt-url.net/workflows-expression-reference and markdown syntax. A template provided with an app ({notification_type}.notification-template.json) will take precedence over the input provided here. */ input?: EventNotificationInput; /** * App id for registered notification. Optional, by default automatically inferred from the request. Only relevant for manual testing purposes via swagger. */ appId?: string; } export declare interface EventQuery { /** * DQL matcher expression defining which events to match. */ query: string; /** * Grail event type. */ eventType?: 'events' | 'bizevents' | 'dt.system.events' | 'security.events'; } export declare interface EventQueryTriggerConfig { type: 'event'; value: EventQuery; } /** * @deprecated Use literal values. */ export declare enum EventQueryTriggerConfigType { Event = "event" } /** * * @typedef {EventQueryTriggerConfig | DavisProblemTriggerConfig | DavisEventTriggerConfig} EventTriggerConfig */ export declare type EventTriggerConfig = EventQueryTriggerConfig | DavisProblemTriggerConfig | DavisEventTriggerConfig; /** * Grail event type. * * @deprecated Use literal values. */ export declare enum EventType { Events = "events", Bizevents = "bizevents", DtSystemEvents = "dt.system.events", SecurityEvents = "security.events" } export { InvalidResponseError } export { isApiClientError } export { isApiGatewayError } export { isClientRequestError } export declare function isErrorEnvelopeError(e: any): e is ErrorEnvelopeError; export { isInvalidResponseError } /** * Specifies when to trigger based on maintenance window status. * * @deprecated Use literal values. */ export declare enum MaintenanceWindowTriggerBehaviorType { Always = "always", Inside = "inside", Outside = "outside" } export declare interface ModificationInfo { createdBy: string | null; createdTime: Date; lastModifiedBy: string | null; lastModifiedTime: Date; } export declare interface PaginatedEventNotificationList { count: number; results: EventNotification[]; } export declare interface PaginatedResourceNotificationList { count: number; results: ResourceNotification[]; } export declare interface ResourceNotification { id: string; /** * App id for registered notification. Optional, by default automatically inferred from the request. Only relevant for manual testing purposes via swagger. */ appId?: string | null; /** * String that defines the type of a notification in context of an app. Allows to differentiate between multiple types of notifications in context of one app. */ notificationType: string; /** * Unique identifier of resource to notify on. Used to determine if there is a notification registered for a resource in context of the app and notification type for a user. */ resourceId: string; owningUser: string; modificationInfo: ModificationInfo; } export declare interface ResourceNotificationRequest { /** * App id for registered notification. Optional, by default automatically inferred from the request. Only relevant for manual testing purposes via swagger. */ appId?: string | null; /** * String that defines the type of a notification in context of an app. Allows to differentiate between multiple types of notifications in context of one app. */ notificationType: string; /** * Unique identifier of resource to notify on. Used to determine if there is a notification registered for a resource in context of the app and notification type for a user. */ resourceId: string; } export declare class ResourceNotificationsClient { private httpClient; private shouldTransformDates; /** * @param {HttpClient} httpClientImplementation - You can provide custom http client as a parameter to constructor of a ResourceNotificationsClient. Custom http client should implement {HttpClient} interface. * @param {ApiClientOptions} [options] - Optional configuration for SDK Client. * @example * const resourceNotificationsClientNodeJs = new ResourceNotificationsClient(yourCustomImplementation); */ constructor(httpClientImplementation: HttpClient, options?: ApiClientOptions); /** * **Required scope:** notification:notifications:read * * @returns {Promise} * * @example Code example * import { resourceNotificationsClient } from "@dynatrace-sdk/client-notification-v2"; * * const data = * await resourceNotificationsClient.getResourceNotifications(); * * @throws {ErrorEnvelopeError} * @throws {InvalidResponseError} * @throws {ApiClientError} * @throws {ClientRequestError} */ getResourceNotifications(config?: { /** Application id associated with the notification. Optional, by default automatically inferred from the request header. Only relevant for manual testing purposes via swagger. */ appId?: string; /** Number of results to return per page. */ limit?: number; /** String that defines the type of a notification in context of an app. Allows to differentiate between multiple types of notifications in context of one app. */ notificationType?: string; /** The initial index from which to return the results. */ offset?: number; /** Which field to use when ordering the results. */ ordering?: string; /** Unique identifier of resource to notify on. Used to determine if there is a notification registered for a resource in context of the app and notification type for a user. */ resourceId?: string; /** A search term. */ search?: string; abortSignal?: AbortSignal_2; }): Promise; /** * **Required scope:** notification:notifications:write * * @returns {Promise} * * @example Code example * import { resourceNotificationsClient } from "@dynatrace-sdk/client-notification-v2"; * * const data = * await resourceNotificationsClient.createResourceNotification( * { * body: { notificationType: "...", resourceId: "..." }, * }, * ); * * @throws {ErrorEnvelopeError} * @throws {InvalidResponseError} * @throws {ApiClientError} * @throws {ClientRequestError} */ createResourceNotification(config: { body: ResourceNotificationRequest; abortSignal?: AbortSignal_2; }): Promise; /** * **Required scope:** notification:notifications:write * * @example Code example * import { resourceNotificationsClient } from "@dynatrace-sdk/client-notification-v2"; * * const data = * await resourceNotificationsClient.deleteResourceNotificationByTypeAndResource( * { notificationType: "...", resourceId: "..." }, * ); * * @throws {ErrorEnvelopeError} * @throws {InvalidResponseError} * @throws {ApiClientError} * @throws {ClientRequestError} */ deleteResourceNotificationByTypeAndResource(config: { /** String that defines the type of a notification in context of an app. Allows to differentiate between multiple types of notifications in context of one app. */ notificationType: string; /** Unique identifier of resource to notify on. Used to determine if there is a notification registered for a resource in context of the app and notification type for a user. */ resourceId: string; /** Application id associated with the notification. Optional, by default automatically inferred from the request header. Only relevant for manual testing purposes via swagger. */ appId?: string; abortSignal?: AbortSignal_2; }): Promise; /** * **Required scope:** notification:notifications:read * * @returns {Promise} * * @example Code example * import { resourceNotificationsClient } from "@dynatrace-sdk/client-notification-v2"; * * const data = * await resourceNotificationsClient.getResourceNotification( * { id: "..." }, * ); * * @throws {ErrorEnvelopeError} * @throws {InvalidResponseError} * @throws {ApiClientError} * @throws {ClientRequestError} */ getResourceNotification(config: { /** A UUID string identifying this resource notification. */ id: string; /** Application id associated with the notification. Optional, by default automatically inferred from the request header. Only relevant for manual testing purposes via swagger. */ appId?: string; abortSignal?: AbortSignal_2; }): Promise; /** * **Required scope:** notification:notifications:write * * @example Code example * import { resourceNotificationsClient } from "@dynatrace-sdk/client-notification-v2"; * * const data = * await resourceNotificationsClient.deleteResourceNotification( * { id: "..." }, * ); * * @throws {ErrorEnvelopeError} * @throws {InvalidResponseError} * @throws {ApiClientError} * @throws {ClientRequestError} */ deleteResourceNotification(config: { /** A UUID string identifying this resource notification. */ id: string; /** Application id associated with the notification. Optional, by default automatically inferred from the request header. Only relevant for manual testing purposes via swagger. */ appId?: string; abortSignal?: AbortSignal_2; }): Promise; } export declare const resourceNotificationsClient: ResourceNotificationsClient; /** * @deprecated Use literal values. */ export declare enum TriggerOn { Open = "open", OpenAndClose = "open-and-close", Close = "close" } /** * @deprecated Use literal values. */ export declare enum TriggerOnUpdateFields { DtDavisAffectedUsersCount = "dt.davis.affected_users_count", DtDavisImpactLevel = "dt.davis.impact_level", EventCategory = "event.category", EventSeverity = "event.severity", RootCauseEntityId = "root_cause_entity_id", SmartscapeAffectedEntities = "smartscape.affected_entities" } export { }