import { createApiRef } from '@backstage/core-plugin-api' ; import { BugsnagError , Organisation , Project } from './types' ; export const bugsnagApiRef = createApiRef < BugsnagApi > ( { id : 'plugin.bugsnag.service' , } ) ; export interface BugsnagApi { fetchErrors ( projectId ) : Promise < BugsnagError [ ] > ; fetchOrganisations ( ) : Promise < Organisation [ ] > ; fetchProjects ( organisationId ) : Promise < Project [ ] > ; }