diff --git a/plugins/ilert/api-report.md b/plugins/ilert/api-report.md index a4e6a7a76c..96576a8358 100644 --- a/plugins/ilert/api-report.md +++ b/plugins/ilert/api-report.md @@ -13,20 +13,252 @@ import { Entity } from '@backstage/catalog-model'; import { IconComponent } from '@backstage/core-plugin-api'; import { RouteRef } from '@backstage/core-plugin-api'; -// Warning: (ae-missing-release-tag) "EntityILertCard" is exported by the package, but it is missing a release tag (@alpha, @beta, @public, or @internal) -// +// @public (undocumented) +export const ACCEPTED = 'ACCEPTED'; + +// @public (undocumented) +export interface AlertSource { + // (undocumented) + active?: boolean; + // (undocumented) + autoResolutionTimeout?: string; + // (undocumented) + autotaskMetadata?: AlertSourceAutotaskMetadata; + // (undocumented) + darkIconUrl?: string; + // (undocumented) + emailFiltered?: boolean; + // (undocumented) + emailPredicates?: AlertSourceEmailPredicate[]; + // (undocumented) + emailResolveFiltered?: boolean; + // (undocumented) + emailResolvePredicates?: AlertSourceEmailPredicate[]; + // (undocumented) + escalationPolicy: EscalationPolicy; + // (undocumented) + filterOperator?: AlertSourceFilterOperator; + // (undocumented) + heartbeat?: AlertSourceHeartbeat; + // (undocumented) + iconUrl?: string; + // (undocumented) + id: number; + // (undocumented) + incidentCreation?: AlertSourceIncidentCreation; + // (undocumented) + incidentPriorityRule?: AlertSourceIncidentPriorityRule; + // (undocumented) + integrationKey?: string; + // (undocumented) + integrationType: AlertSourceIntegrationType; + // (undocumented) + lightIconUrl?: string; + // (undocumented) + name: string; + // (undocumented) + resolveFilterOperator?: AlertSourceFilterOperator; + // (undocumented) + status: AlertSourceStatus; + // (undocumented) + supportHours?: AlertSourceSupportHours; + // (undocumented) + teams: TeamShort[]; +} + +// @public (undocumented) +export interface AlertSourceAutotaskMetadata { + // (undocumented) + apiIntegrationCode: string; + // (undocumented) + secret: string; + // (undocumented) + userName: string; + // (undocumented) + webServer: string; +} + +// @public (undocumented) +export interface AlertSourceEmailPredicate { + // (undocumented) + criteria: + | 'CONTAINS_ANY_WORDS' + | 'CONTAINS_NOT_WORDS' + | 'CONTAINS_STRING' + | 'CONTAINS_NOT_STRING' + | 'IS_STRING' + | 'IS_NOT_STRING' + | 'MATCHES_REGEX' + | 'MATCHES_NOT_REGEX'; + // (undocumented) + field: 'EMAIL_FROM' | 'EMAIL_SUBJECT' | 'EMAIL_BODY'; + // (undocumented) + value: string; +} + +// @public (undocumented) +export type AlertSourceFilterOperator = 'AND' | 'OR'; + +// @public (undocumented) +export interface AlertSourceHeartbeat { + // (undocumented) + intervalSec: number; + // (undocumented) + status: 'OVERDUE' | 'ON_TIME' | 'NEVER_RECEIVED'; + // (undocumented) + summary: string; +} + +// @public (undocumented) +export type AlertSourceIncidentCreation = + | 'ONE_INCIDENT_PER_EMAIL' + | 'ONE_INCIDENT_PER_EMAIL_SUBJECT' + | 'ONE_PENDING_INCIDENT_ALLOWED' + | 'ONE_OPEN_INCIDENT_ALLOWED' + | 'OPEN_RESOLVE_ON_EXTRACTION'; + +// @public (undocumented) +export type AlertSourceIncidentPriorityRule = + | 'HIGH' + | 'LOW' + | 'HIGH_DURING_SUPPORT_HOURS' + | 'LOW_DURING_SUPPORT_HOURS'; + +// @public (undocumented) +export type AlertSourceIntegrationType = + | 'NAGIOS' + | 'ICINGA' + | 'EMAIL' + | 'SMS' + | 'API' + | 'CRN' + | 'HEARTBEAT' + | 'PRTG' + | 'PINGDOM' + | 'CLOUDWATCH' + | 'AWSPHD' + | 'STACKDRIVER' + | 'INSTANA' + | 'ZABBIX' + | 'SOLARWINDS' + | 'PROMETHEUS' + | 'NEWRELIC' + | 'GRAFANA' + | 'GITHUB' + | 'DATADOG' + | 'UPTIMEROBOT' + | 'APPDYNAMICS' + | 'DYNATRACE' + | 'TOPDESK' + | 'STATUSCAKE' + | 'MONITOR' + | 'TOOL' + | 'CHECKMK' + | 'AUTOTASK' + | 'AWSBUDGET' + | 'KENTIXAM' + | 'CONSUL' + | 'ZAMMAD' + | 'SIGNALFX' + | 'SPLUNK' + | 'KUBERNETES' + | 'SEMATEXT' + | 'SENTRY' + | 'SUMOLOGIC' + | 'RAYGUN' + | 'MXTOOLBOX' + | 'ESWATCHER' + | 'AMAZONSNS' + | 'KAPACITOR' + | 'CORTEXXSOAR' + | string; + +// @public (undocumented) +export type AlertSourceStatus = + | 'PENDING' + | 'ALL_ACCEPTED' + | 'ALL_RESOLVED' + | 'IN_MAINTENANCE' + | 'DISABLED'; + +// @public (undocumented) +export interface AlertSourceSupportDay { + // (undocumented) + end: string; + // (undocumented) + start: string; +} + +// @public (undocumented) +export interface AlertSourceSupportHours { + // (undocumented) + autoRaiseIncidents: boolean; + // (undocumented) + supportDays: { + MONDAY: AlertSourceSupportDay; + TUESDAY: AlertSourceSupportDay; + WEDNESDAY: AlertSourceSupportDay; + THURSDAY: AlertSourceSupportDay; + FRIDAY: AlertSourceSupportDay; + SATURDAY: AlertSourceSupportDay; + SUNDAY: AlertSourceSupportDay; + }; + // (undocumented) + timezone: AlertSourceTimeZone; +} + +// @public (undocumented) +export type AlertSourceTimeZone = + | 'Europe/Berlin' + | 'America/New_York' + | 'America/Los_Angeles' + | 'Asia/Istanbul'; + // @public (undocumented) export const EntityILertCard: () => JSX.Element; -// Warning: (ae-missing-release-tag) "GetIncidentsCountOpts" is exported by the package, but it is missing a release tag (@alpha, @beta, @public, or @internal) -// +// @public (undocumented) +export interface EscalationPolicy { + // (undocumented) + escalationRules: EscalationRule[]; + // (undocumented) + frequency?: number; + // (undocumented) + id: number; + // (undocumented) + name: string; + // (undocumented) + newEscalationRule: EscalationRule; + // (undocumented) + repeating?: boolean; + // (undocumented) + teams: TeamShort[]; +} + +// @public (undocumented) +export interface EscalationRule { + // (undocumented) + escalationTimeout: number; + // (undocumented) + schedule: Schedule | null; + // (undocumented) + user: User | null; +} + +// @public (undocumented) +export type EventRequest = { + integrationKey: string; + summary: string; + details: string; + userName: string; + source: string; +}; + // @public (undocumented) export type GetIncidentsCountOpts = { states?: IncidentStatus[]; }; -// Warning: (ae-missing-release-tag) "GetIncidentsOpts" is exported by the package, but it is missing a release tag (@alpha, @beta, @public, or @internal) -// // @public (undocumented) export type GetIncidentsOpts = { maxResults?: number; @@ -35,8 +267,6 @@ export type GetIncidentsOpts = { alertSources?: number[]; }; -// Warning: (ae-missing-release-tag) "ILertApi" is exported by the package, but it is missing a release tag (@alpha, @beta, @public, or @internal) -// // @public (undocumented) export interface ILertApi { // (undocumented) @@ -51,8 +281,6 @@ export interface ILertApi { incident: Incident, responder: IncidentResponder, ): Promise; - // Warning: (ae-forgotten-export) The symbol "EventRequest" needs to be exported by the entry point index.d.ts - // // (undocumented) createIncident(eventRequest: EventRequest): Promise; // (undocumented) @@ -61,48 +289,30 @@ export interface ILertApi { enableAlertSource(alertSource: AlertSource): Promise; // (undocumented) fetchAlertSource(idOrIntegrationKey: number | string): Promise; - // Warning: (ae-forgotten-export) The symbol "OnCall" needs to be exported by the entry point index.d.ts - // // (undocumented) fetchAlertSourceOnCalls(alertSource: AlertSource): Promise; - // Warning: (ae-forgotten-export) The symbol "AlertSource" needs to be exported by the entry point index.d.ts - // // (undocumented) fetchAlertSources(): Promise; // (undocumented) fetchIncident(id: number): Promise; - // Warning: (ae-forgotten-export) The symbol "IncidentAction" needs to be exported by the entry point index.d.ts - // // (undocumented) fetchIncidentActions(incident: Incident): Promise; - // Warning: (ae-forgotten-export) The symbol "IncidentResponder" needs to be exported by the entry point index.d.ts - // // (undocumented) fetchIncidentResponders(incident: Incident): Promise; - // Warning: (ae-forgotten-export) The symbol "Incident" needs to be exported by the entry point index.d.ts - // // (undocumented) fetchIncidents(opts?: GetIncidentsOpts): Promise; // (undocumented) fetchIncidentsCount(opts?: GetIncidentsCountOpts): Promise; - // Warning: (ae-forgotten-export) The symbol "Schedule" needs to be exported by the entry point index.d.ts - // // (undocumented) fetchOnCallSchedules(): Promise; // (undocumented) fetchUptimeMonitor(id: number): Promise; - // Warning: (ae-forgotten-export) The symbol "UptimeMonitor" needs to be exported by the entry point index.d.ts - // // (undocumented) fetchUptimeMonitors(): Promise; - // Warning: (ae-forgotten-export) The symbol "User" needs to be exported by the entry point index.d.ts - // // (undocumented) fetchUsers(): Promise; // (undocumented) getAlertSourceDetailsURL(alertSource: AlertSource | null): string; - // Warning: (ae-forgotten-export) The symbol "EscalationPolicy" needs to be exported by the entry point index.d.ts - // // (undocumented) getEscalationPolicyDetailsURL(escalationPolicy: EscalationPolicy): string; // (undocumented) @@ -135,22 +345,19 @@ export interface ILertApi { ): Promise; } -// Warning: (ae-missing-release-tag) "ilertApiRef" is exported by the package, but it is missing a release tag (@alpha, @beta, @public, or @internal) -// // @public (undocumented) export const ilertApiRef: ApiRef; -// Warning: (ae-missing-release-tag) "ILertCard" is exported by the package, but it is missing a release tag (@alpha, @beta, @public, or @internal) -// // @public (undocumented) export const ILertCard: () => JSX.Element; -// Warning: (ae-missing-release-tag) "ILertClient" is exported by the package, but it is missing a release tag (@alpha, @beta, @public, or @internal) -// // @public (undocumented) export class ILertClient implements ILertApi { - // Warning: (ae-forgotten-export) The symbol "Options" needs to be exported by the entry point index.d.ts - constructor(opts: Options); + constructor(opts: { + discoveryApi: DiscoveryApi; + baseUrl: string; + proxyPath: string; + }); // (undocumented) acceptIncident(incident: Incident, userName: string): Promise; // (undocumented) @@ -232,18 +439,12 @@ export class ILertClient implements ILertApi { ): Promise; } -// Warning: (ae-missing-release-tag) "ILertIcon" is exported by the package, but it is missing a release tag (@alpha, @beta, @public, or @internal) -// // @public (undocumented) export const ILertIcon: IconComponent; -// Warning: (ae-missing-release-tag) "ILertPage" is exported by the package, but it is missing a release tag (@alpha, @beta, @public, or @internal) -// // @public (undocumented) export const ILertPage: () => JSX.Element; -// Warning: (ae-missing-release-tag) "ilertPlugin" is exported by the package, but it is missing a release tag (@alpha, @beta, @public, or @internal) -// // @public (undocumented) const ilertPlugin: BackstagePlugin< { @@ -255,34 +456,319 @@ const ilertPlugin: BackstagePlugin< export { ilertPlugin }; export { ilertPlugin as plugin }; -// Warning: (ae-missing-release-tag) "iLertRouteRef" is exported by the package, but it is missing a release tag (@alpha, @beta, @public, or @internal) -// // @public (undocumented) export const iLertRouteRef: RouteRef; -// Warning: (ae-missing-release-tag) "isPluginApplicableToEntity" is exported by the package, but it is missing a release tag (@alpha, @beta, @public, or @internal) -// +// @public (undocumented) +interface Image_2 { + // (undocumented) + alt: string; + // (undocumented) + href: string; + // (undocumented) + src: string; +} +export { Image_2 as Image }; + +// @public (undocumented) +export interface Incident { + // (undocumented) + alertSource: AlertSource | null; + // (undocumented) + assignedTo: User | null; + // (undocumented) + commentPublishToSubscribers: boolean; + // (undocumented) + commentText: string; + // (undocumented) + details: string; + // (undocumented) + id: number; + // (undocumented) + images: Image_2[]; + // (undocumented) + incidentKey: string; + // (undocumented) + links: Link[]; + // (undocumented) + logEntries: LogEntry[]; + // (undocumented) + priority: IncidentPriority; + // (undocumented) + reportTime: string; + // (undocumented) + resolvedOn: string; + // (undocumented) + status: IncidentStatus; + // (undocumented) + subscribers: Subscriber[]; + // (undocumented) + summary: string; +} + +// @public (undocumented) +export interface IncidentAction { + // (undocumented) + extensionId?: string; + // (undocumented) + history?: IncidentActionHistory[]; + // (undocumented) + name: string; + // (undocumented) + type: string; + // (undocumented) + webhookId: string; +} + +// @public (undocumented) +export interface IncidentActionHistory { + // (undocumented) + actor: User; + // (undocumented) + id: string; + // (undocumented) + incidentId: number; + // (undocumented) + success: boolean; + // (undocumented) + webhookId: string; +} + +// @public (undocumented) +export type IncidentPriority = 'HIGH' | 'LOW'; + +// @public (undocumented) +export interface IncidentResponder { + // (undocumented) + disabled: boolean; + // (undocumented) + group: 'SUGGESTED' | 'USER' | 'ESCALATION_POLICY' | 'ON_CALL_SCHEDULE'; + // (undocumented) + id: number; + // (undocumented) + name: string; +} + +// @public (undocumented) +export type IncidentStatus = typeof PENDING | typeof ACCEPTED | typeof RESOLVED; + // @public (undocumented) const isPluginApplicableToEntity: (entity: Entity) => boolean; export { isPluginApplicableToEntity as isILertAvailable }; export { isPluginApplicableToEntity }; -// Warning: (ae-missing-release-tag) "ILertPage" is exported by the package, but it is missing a release tag (@alpha, @beta, @public, or @internal) -// +// @public (undocumented) +export type Language = 'de' | 'en'; + +// @public (undocumented) +export interface Link { + // (undocumented) + href: string; + // (undocumented) + text: string; +} + +// @public (undocumented) +export interface LogEntry { + // (undocumented) + filterTypes?: string[]; + // (undocumented) + iconClass?: string; + // (undocumented) + iconName?: string; + // (undocumented) + id: number; + // (undocumented) + incidentId?: number; + // (undocumented) + logEntryType: string; + // (undocumented) + text: string; + // (undocumented) + timestamp: string; +} + +// @public (undocumented) +export interface OnCall { + // (undocumented) + end: string; + // (undocumented) + escalationLevel: number; + // (undocumented) + escalationPolicy: EscalationPolicy; + // (undocumented) + schedule?: Schedule; + // (undocumented) + start: string; + // (undocumented) + user: User; +} + +// @public (undocumented) +export const PENDING = 'PENDING'; + +// @public (undocumented) +export interface Phone { + // (undocumented) + number: string; + // (undocumented) + regionCode: string; +} + +// @public (undocumented) +export const RESOLVED = 'RESOLVED'; + // @public (undocumented) export const Router: () => JSX.Element; -// Warning: (ae-missing-release-tag) "TableState" is exported by the package, but it is missing a release tag (@alpha, @beta, @public, or @internal) -// +// @public (undocumented) +export interface Schedule { + // (undocumented) + currentShift: Shift; + // (undocumented) + id: number; + // (undocumented) + name: string; + // (undocumented) + nextShift: Shift; + // (undocumented) + overrides: Shift[]; + // (undocumented) + shifts: Shift[]; + // (undocumented) + startsOn: string; + // (undocumented) + teams: TeamShort[]; + // (undocumented) + timezone: string; +} + +// @public (undocumented) +export interface Shift { + // (undocumented) + end: string; + // (undocumented) + start: string; + // (undocumented) + user: User; +} + +// @public (undocumented) +export interface Subscriber { + // (undocumented) + id: number; + // (undocumented) + name: string; + // (undocumented) + type: SubscriberType; +} + +// @public (undocumented) +export type SubscriberType = 'TEAM' | 'USER'; + // @public (undocumented) export type TableState = { page: number; pageSize: number; }; -// Warnings were encountered during analysis: -// -// src/api/types.d.ts:14:5 - (ae-forgotten-export) The symbol "IncidentStatus" needs to be exported by the entry point index.d.ts +// @public (undocumented) +export interface TeamMember { + // (undocumented) + role: 'STAKEHOLDER' | 'RESPONDER' | 'USER' | 'ADMIN'; + // (undocumented) + user: User; +} + +// @public (undocumented) +export interface TeamShort { + // (undocumented) + id: number; + // (undocumented) + name: string; +} + +// @public (undocumented) +export interface UptimeMonitor { + // (undocumented) + checkParams: UptimeMonitorCheckParams; + // (undocumented) + checkType: 'http' | 'tcp' | 'udp' | 'ping'; + // (undocumented) + createIncidentAfterFailedChecks: number; + // (undocumented) + embedUrl: string; + // (undocumented) + escalationPolicy: EscalationPolicy; + // (undocumented) + id: number; + // (undocumented) + intervalSec: number; + // (undocumented) + lastStatusChange: string; + // (undocumented) + name: string; + // (undocumented) + paused: boolean; + // (undocumented) + region: 'EU' | 'US'; + // (undocumented) + shareUrl: string; + // (undocumented) + status: string; + // (undocumented) + teams: TeamShort[]; + // (undocumented) + timeoutMs: number; +} + +// @public (undocumented) +export interface UptimeMonitorCheckParams { + // (undocumented) + host?: string; + // (undocumented) + port?: number; + // (undocumented) + url?: string; +} + +// @public (undocumented) +export interface User { + // (undocumented) + department: string; + // (undocumented) + email: string; + // (undocumented) + firstName: string; + // (undocumented) + id: number; + // (undocumented) + landline: Phone; + // (undocumented) + language?: Language; + // (undocumented) + lastName: string; + // (undocumented) + mobile: Phone; + // (undocumented) + notificationPreferences?: any[]; + // (undocumented) + position: string; + // (undocumented) + role?: UserRole; + // (undocumented) + timezone?: string; + // (undocumented) + username: string; +} + +// @public (undocumented) +export type UserRole = + | 'USER' + | 'ADMIN' + | 'STAKEHOLDER' + | 'ACCOUNT_OWNER' + | 'RESPONDER'; // (No @packageDocumentation comment for this package) ``` diff --git a/plugins/ilert/src/api/client.ts b/plugins/ilert/src/api/client.ts index 13de8c1f2c..7ab9a6d08c 100644 --- a/plugins/ilert/src/api/client.ts +++ b/plugins/ilert/src/api/client.ts @@ -29,7 +29,6 @@ import { ILertApi, GetIncidentsOpts, GetIncidentsCountOpts, - Options, EventRequest, } from './types'; import { DateTime as dt } from 'luxon'; @@ -39,6 +38,7 @@ import { DiscoveryApi, } from '@backstage/core-plugin-api'; +/** @public */ export const ilertApiRef = createApiRef({ id: 'plugin.ilert.service', }); @@ -49,6 +49,7 @@ const JSON_HEADERS = { Accept: 'application/json', }; +/** @public */ export class ILertClient implements ILertApi { private readonly discoveryApi: DiscoveryApi; private readonly proxyPath: string; @@ -66,7 +67,20 @@ export class ILertClient implements ILertApi { }); } - constructor(opts: Options) { + constructor(opts: { + discoveryApi: DiscoveryApi; + + /** + * URL used by users to access iLert web UI. + * Example: https://my-org.ilert.com/ + */ + baseUrl: string; + + /** + * Path to use for requests via the proxy, defaults to /ilert/api + */ + proxyPath: string; + }) { this.discoveryApi = opts.discoveryApi; this.baseUrl = opts.baseUrl; this.proxyPath = opts.proxyPath; diff --git a/plugins/ilert/src/api/index.ts b/plugins/ilert/src/api/index.ts index 02ee9706f7..e1163090ec 100644 --- a/plugins/ilert/src/api/index.ts +++ b/plugins/ilert/src/api/index.ts @@ -17,6 +17,7 @@ export { ILertClient, ilertApiRef } from './client'; export type { ILertApi, + EventRequest, GetIncidentsCountOpts, GetIncidentsOpts, TableState, diff --git a/plugins/ilert/src/api/types.ts b/plugins/ilert/src/api/types.ts index 3a085bdb5b..2e9ea30f2f 100644 --- a/plugins/ilert/src/api/types.ts +++ b/plugins/ilert/src/api/types.ts @@ -13,6 +13,7 @@ * See the License for the specific language governing permissions and * limitations under the License. */ + import { AlertSource, Incident, @@ -25,13 +26,14 @@ import { IncidentAction, OnCall, } from '../types'; -import { DiscoveryApi } from '@backstage/core-plugin-api'; +/** @public */ export type TableState = { page: number; pageSize: number; }; +/** @public */ export type GetIncidentsOpts = { maxResults?: number; startIndex?: number; @@ -39,10 +41,12 @@ export type GetIncidentsOpts = { alertSources?: number[]; }; +/** @public */ export type GetIncidentsCountOpts = { states?: IncidentStatus[]; }; +/** @public */ export type EventRequest = { integrationKey: string; summary: string; @@ -51,6 +55,7 @@ export type EventRequest = { source: string; }; +/** @public */ export interface ILertApi { fetchIncidents(opts?: GetIncidentsOpts): Promise; fetchIncidentsCount(opts?: GetIncidentsCountOpts): Promise; @@ -103,18 +108,3 @@ export interface ILertApi { getUserPhoneNumber(user: User | null): string; getUserInitials(user: User | null): string; } - -export type Options = { - discoveryApi: DiscoveryApi; - - /** - * URL used by users to access iLert web UI. - * Example: https://my-org.ilert.com/ - */ - baseUrl: string; - - /** - * Path to use for requests via the proxy, defaults to /ilert/api - */ - proxyPath: string; -}; diff --git a/plugins/ilert/src/components/ILertCard/ILertCard.tsx b/plugins/ilert/src/components/ILertCard/ILertCard.tsx index a014c265c2..6330189a01 100644 --- a/plugins/ilert/src/components/ILertCard/ILertCard.tsx +++ b/plugins/ilert/src/components/ILertCard/ILertCard.tsx @@ -35,6 +35,7 @@ import { ILertCardEmptyState } from './ILertCardEmptyState'; import { ILertCardOnCall } from './ILertCardOnCall'; import { ResponseErrorPanel } from '@backstage/core-components'; +/** @public */ export const isPluginApplicableToEntity = (entity: Entity) => Boolean(entity.metadata.annotations?.[ILERT_INTEGRATION_KEY_ANNOTATION]); @@ -50,6 +51,7 @@ const useStyles = makeStyles({ }, }); +/** @public */ export const ILertCard = () => { const classes = useStyles(); const { integrationKey, name } = useILertEntity(); diff --git a/plugins/ilert/src/components/ILertPage/ILertPage.tsx b/plugins/ilert/src/components/ILertPage/ILertPage.tsx index c532cd7f64..89dae215e4 100644 --- a/plugins/ilert/src/components/ILertPage/ILertPage.tsx +++ b/plugins/ilert/src/components/ILertPage/ILertPage.tsx @@ -25,6 +25,7 @@ import { Content, } from '@backstage/core-components'; +/** @public */ export const ILertPage = () => { const [selectedTab, setSelectedTab] = React.useState(0); const tabs = [ diff --git a/plugins/ilert/src/index.ts b/plugins/ilert/src/index.ts index 9a3119516f..5fcf42011b 100644 --- a/plugins/ilert/src/index.ts +++ b/plugins/ilert/src/index.ts @@ -37,4 +37,7 @@ export { } from './components'; export * from './api'; export * from './route-refs'; +export * from './types'; + +/** @public */ export const ILertIcon: IconComponent = ILertIconComponent as IconComponent; diff --git a/plugins/ilert/src/plugin.ts b/plugins/ilert/src/plugin.ts index 89df59b0b6..96e57e6f48 100644 --- a/plugins/ilert/src/plugin.ts +++ b/plugins/ilert/src/plugin.ts @@ -25,6 +25,7 @@ import { createComponentExtension, } from '@backstage/core-plugin-api'; +/** @public */ export const ilertPlugin = createPlugin({ id: 'ilert', apis: [ @@ -44,6 +45,7 @@ export const ilertPlugin = createPlugin({ }, }); +/** @public */ export const ILertPage = ilertPlugin.provide( createRoutableExtension({ name: 'ILertPage', @@ -52,6 +54,7 @@ export const ILertPage = ilertPlugin.provide( }), ); +/** @public */ export const EntityILertCard = ilertPlugin.provide( createComponentExtension({ name: 'EntityILertCard', diff --git a/plugins/ilert/src/route-refs.tsx b/plugins/ilert/src/route-refs.tsx index 8a3d53001d..fd61bd2bbd 100644 --- a/plugins/ilert/src/route-refs.tsx +++ b/plugins/ilert/src/route-refs.tsx @@ -16,6 +16,7 @@ import { createRouteRef } from '@backstage/core-plugin-api'; +/** @public */ export const iLertRouteRef = createRouteRef({ id: 'ilert', }); diff --git a/plugins/ilert/src/types.ts b/plugins/ilert/src/types.ts index c3e863c6a6..3d1531329a 100644 --- a/plugins/ilert/src/types.ts +++ b/plugins/ilert/src/types.ts @@ -14,6 +14,7 @@ * limitations under the License. */ +/** @public */ export interface Incident { id: number; summary: string; @@ -33,31 +34,43 @@ export interface Incident { commentPublishToSubscribers: boolean; } +/** @public */ export const PENDING = 'PENDING'; +/** @public */ export const ACCEPTED = 'ACCEPTED'; +/** @public */ export const RESOLVED = 'RESOLVED'; + +/** @public */ export type IncidentStatus = typeof PENDING | typeof ACCEPTED | typeof RESOLVED; + +/** @public */ export type IncidentPriority = 'HIGH' | 'LOW'; +/** @public */ export interface Link { href: string; text: string; } +/** @public */ export interface Image { src: string; href: string; alt: string; } +/** @public */ export type SubscriberType = 'TEAM' | 'USER'; +/** @public */ export interface Subscriber { id: number; name: string; type: SubscriberType; } +/** @public */ export interface LogEntry { id: number; timestamp: string; @@ -69,6 +82,7 @@ export interface LogEntry { filterTypes?: string[]; } +/** @public */ export interface User { id: number; username: string; @@ -85,18 +99,22 @@ export interface User { department: string; } +/** @public */ export type UserRole = | 'USER' | 'ADMIN' | 'STAKEHOLDER' | 'ACCOUNT_OWNER' | 'RESPONDER'; +/** @public */ export type Language = 'de' | 'en'; +/** @public */ export interface Phone { regionCode: string; number: string; } +/** @public */ export interface AlertSource { id: number; name: string; @@ -123,22 +141,26 @@ export interface AlertSource { teams: TeamShort[]; } +/** @public */ export interface TeamShort { id: number; name: string; } +/** @public */ export interface TeamMember { user: User; role: 'STAKEHOLDER' | 'RESPONDER' | 'USER' | 'ADMIN'; } +/** @public */ export type AlertSourceStatus = | 'PENDING' | 'ALL_ACCEPTED' | 'ALL_RESOLVED' | 'IN_MAINTENANCE' | 'DISABLED'; +/** @public */ export type AlertSourceIntegrationType = | 'NAGIOS' | 'ICINGA' @@ -186,18 +208,22 @@ export type AlertSourceIntegrationType = | 'KAPACITOR' | 'CORTEXXSOAR' | string; +/** @public */ export type AlertSourceIncidentCreation = | 'ONE_INCIDENT_PER_EMAIL' | 'ONE_INCIDENT_PER_EMAIL_SUBJECT' | 'ONE_PENDING_INCIDENT_ALLOWED' | 'ONE_OPEN_INCIDENT_ALLOWED' | 'OPEN_RESOLVE_ON_EXTRACTION'; +/** @public */ export type AlertSourceFilterOperator = 'AND' | 'OR'; +/** @public */ export type AlertSourceIncidentPriorityRule = | 'HIGH' | 'LOW' | 'HIGH_DURING_SUPPORT_HOURS' | 'LOW_DURING_SUPPORT_HOURS'; +/** @public */ export interface AlertSourceEmailPredicate { field: 'EMAIL_FROM' | 'EMAIL_SUBJECT' | 'EMAIL_BODY'; criteria: @@ -211,15 +237,18 @@ export interface AlertSourceEmailPredicate { | 'MATCHES_NOT_REGEX'; value: string; } +/** @public */ export type AlertSourceTimeZone = | 'Europe/Berlin' | 'America/New_York' | 'America/Los_Angeles' | 'Asia/Istanbul'; +/** @public */ export interface AlertSourceSupportDay { start: string; end: string; } +/** @public */ export interface AlertSourceSupportHours { timezone: AlertSourceTimeZone; autoRaiseIncidents: boolean; @@ -233,12 +262,14 @@ export interface AlertSourceSupportHours { SUNDAY: AlertSourceSupportDay; }; } +/** @public */ export interface AlertSourceHeartbeat { summary: string; intervalSec: number; status: 'OVERDUE' | 'ON_TIME' | 'NEVER_RECEIVED'; } +/** @public */ export interface AlertSourceAutotaskMetadata { userName: string; secret: string; @@ -246,6 +277,7 @@ export interface AlertSourceAutotaskMetadata { webServer: string; } +/** @public */ export interface EscalationPolicy { id: number; name: string; @@ -256,12 +288,14 @@ export interface EscalationPolicy { teams: TeamShort[]; } +/** @public */ export interface EscalationRule { user: User | null; schedule: Schedule | null; escalationTimeout: number; } +/** @public */ export interface Schedule { id: number; name: string; @@ -274,12 +308,14 @@ export interface Schedule { teams: TeamShort[]; } +/** @public */ export interface Shift { user: User; start: string; end: string; } +/** @public */ export interface UptimeMonitor { id: number; name: string; @@ -298,12 +334,14 @@ export interface UptimeMonitor { teams: TeamShort[]; } +/** @public */ export interface UptimeMonitorCheckParams { host?: string; port?: number; url?: string; } +/** @public */ export interface IncidentResponder { group: 'SUGGESTED' | 'USER' | 'ESCALATION_POLICY' | 'ON_CALL_SCHEDULE'; id: number; @@ -311,6 +349,7 @@ export interface IncidentResponder { disabled: boolean; } +/** @public */ export interface IncidentAction { name: string; type: string; @@ -319,6 +358,7 @@ export interface IncidentAction { history?: IncidentActionHistory[]; } +/** @public */ export interface IncidentActionHistory { id: string; webhookId: string; @@ -327,6 +367,7 @@ export interface IncidentActionHistory { success: boolean; } +/** @public */ export interface OnCall { user: User; escalationPolicy: EscalationPolicy; diff --git a/scripts/api-extractor.ts b/scripts/api-extractor.ts index 18031e5486..383a1848a5 100644 --- a/scripts/api-extractor.ts +++ b/scripts/api-extractor.ts @@ -212,7 +212,6 @@ const ALLOW_WARNINGS = [ 'plugins/github-pull-requests-board', 'plugins/gitops-profiles', 'plugins/graphql-backend', - 'plugins/ilert', 'plugins/jenkins', 'plugins/jenkins-backend', 'plugins/kubernetes',