fix(plugins/pagerduty): define responses types before utilizing them

Signed-off-by: Alec Jacobs <cajacobs5401@gmail.com>
This commit is contained in:
Alec Jacobs
2022-06-03 17:07:32 -07:00
parent 48a7d96e72
commit 0be087f637
2 changed files with 20 additions and 21 deletions
-1
View File
@@ -14,7 +14,6 @@
* limitations under the License.
*/
import { Service, Incident, ChangeEvent, OnCall } from '../components/types';
import {
PagerDutyApi,
TriggerAlarmRequest,
+20 -20
View File
@@ -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;