import { BaseInheritanceModel, DefaultClient, AKResponse, QueryArguments } from "./Client"; export interface TypeCreate { name: string; description: string; link: string; } export class Provider implements BaseInheritanceModel { pk: number; name: string; authorization_flow: string; object_type: string; assigned_application_slug?: string; assigned_application_name?: string; verbose_name: string; verbose_name_plural: string; constructor() { throw Error(); } static get(id: number): Promise { return DefaultClient.fetch(["providers", "all", id.toString()]); } static list(filter?: QueryArguments): Promise> { return DefaultClient.fetch>(["providers", "all"], filter); } static getTypes(): Promise { return DefaultClient.fetch(["providers", "all", "types"]); } static adminUrl(rest: string): string { return `/administration/providers/${rest}`; } }