Skip to content

Built for people who want to own their automations. Join the waitlist for an invite.

Package listing

@kody/datadog

src/types.ts

85 lines · 1.8 KB · TypeScript
import type { DatadogAuthOptions } from './core.ts'

export type DatadogPaginationInput = DatadogAuthOptions & {
	page?: number
	pageSize?: number
	perPage?: number
	count?: number
	start?: number
	cursor?: string
}

export type DatadogMonitorInput = DatadogPaginationInput & {
	monitorId?: number | string
	id?: number | string
	query?: string
	name?: string
	message?: string
	type?: string
	tags?: string[] | string
	monitorTags?: string[] | string
	groupStates?: string[] | string
	withDowntimes?: boolean
	options?: Record<string, unknown>
	priority?: number
	restrictedRoles?: string[]
	draftStatus?: string
	body?: Record<string, unknown>
	scope?: string
	end?: number
	override?: boolean
	allScopes?: boolean
	dryRun?: boolean
	confirm?: boolean
}

export type DatadogIncidentInput = DatadogPaginationInput & {
	incidentId?: string
	id?: string
	query?: string
	title?: string
	customerImpacted?: boolean
	fields?: Record<string, unknown>
	include?: string[] | string
	attributes?: Record<string, unknown>
	body?: Record<string, unknown>
	dryRun?: boolean
	confirm?: boolean
}

export type DatadogLogsInput = DatadogAuthOptions & {
	query?: string
	from?: string
	to?: string
	indexes?: string[] | string
	sort?: string
	limit?: number
	cursor?: string
	storageTier?: string
}

export type DatadogDashboardInput = DatadogPaginationInput & {
	dashboardId?: string
	id?: string
	title?: string
	description?: string
	layoutType?: string
	widgets?: unknown[]
	templateVariables?: unknown[]
	isReadOnly?: boolean
	notifyList?: string[]
	reflowType?: string
	tags?: string[] | string
	filterShared?: boolean
	filterDeleted?: boolean
	body?: Record<string, unknown>
	dryRun?: boolean
	confirm?: boolean
}

export type DatadogSmokeTestInput = DatadogAuthOptions & {
	includeMonitors?: boolean
	includeDashboards?: boolean
}

export type DatadogValidateInput = DatadogAuthOptions