fix(plugins/pagerduty): define responses types before utilizing them
Signed-off-by: Alec Jacobs <cajacobs5401@gmail.com>
This commit is contained in:
@@ -14,7 +14,6 @@
|
||||
* limitations under the License.
|
||||
*/
|
||||
|
||||
import { Service, Incident, ChangeEvent, OnCall } from '../components/types';
|
||||
import {
|
||||
PagerDutyApi,
|
||||
TriggerAlarmRequest,
|
||||
|
||||
@@ -18,6 +18,26 @@ import { Incident, ChangeEvent, OnCall, Service } from '../components/types';
|
||||
import { DiscoveryApi, FetchApi } from '@backstage/core-plugin-api';
|
||||
import { PagerDutyEntity } from '../types';
|
||||
|
||||
export type ServicesResponse = {
|
||||
services: Service[];
|
||||
};
|
||||
|
||||
export type ServiceResponse = {
|
||||
service: Service;
|
||||
};
|
||||
|
||||
export type IncidentsResponse = {
|
||||
incidents: Incident[];
|
||||
};
|
||||
|
||||
export type ChangeEventsResponse = {
|
||||
change_events: ChangeEvent[];
|
||||
};
|
||||
|
||||
export type OnCallsResponse = {
|
||||
oncalls: OnCall[];
|
||||
};
|
||||
|
||||
export type TriggerAlarmRequest = {
|
||||
integrationKey: string;
|
||||
source: string;
|
||||
@@ -58,26 +78,6 @@ export interface PagerDutyApi {
|
||||
triggerAlarm(request: TriggerAlarmRequest): Promise<Response>;
|
||||
}
|
||||
|
||||
export type ServicesResponse = {
|
||||
services: Service[];
|
||||
};
|
||||
|
||||
export type ServiceResponse = {
|
||||
service: Service;
|
||||
};
|
||||
|
||||
export type IncidentsResponse = {
|
||||
incidents: Incident[];
|
||||
};
|
||||
|
||||
export type ChangeEventsResponse = {
|
||||
change_events: ChangeEvent[];
|
||||
};
|
||||
|
||||
export type OnCallsResponse = {
|
||||
oncalls: OnCall[];
|
||||
};
|
||||
|
||||
export type ClientApiDependencies = {
|
||||
discoveryApi: DiscoveryApi;
|
||||
fetchApi: FetchApi;
|
||||
|
||||
Reference in New Issue
Block a user