import { EntityManager } from "typeorm"; import { TransactionBaseService } from "../interfaces"; import { Oauth as OAuthModel } from "../models"; import { OauthRepository } from "../repositories/oauth"; import { Selector } from "../types/common"; import { MedusaContainer } from "../types/global"; import { CreateOauthInput, UpdateOauthInput } from "../types/oauth"; import EventBusService from "./event-bus"; type InjectedDependencies = MedusaContainer & { manager: EntityManager; eventBusService: EventBusService; oauthRepository: typeof OauthRepository; }; declare class Oauth extends TransactionBaseService { static Events: { TOKEN_GENERATED: string; TOKEN_REFRESHED: string; }; protected container_: InjectedDependencies; protected oauthRepository_: typeof OauthRepository; protected eventBus_: EventBusService; constructor(cradle: InjectedDependencies); retrieveByName(appName: string): Promise; retrieve(oauthId: string): Promise; list(selector: Selector): Promise; create(data: CreateOauthInput): Promise; update(id: string, update: UpdateOauthInput): Promise; registerOauthApp(appDetails: CreateOauthInput): Promise; generateToken(appName: string, code: string, state: string): Promise; refreshToken(appName: string): Promise; } export default Oauth;