import { BaseInheritanceModel, DefaultClient, AKResponse, QueryArguments } from "./Client"; import { TypeCreate } from "./Providers"; export class Source implements BaseInheritanceModel { pk: string; name: string; slug: string; enabled: boolean; authentication_flow: string; enrollment_flow: string; constructor() { throw Error(); } object_type: string; verbose_name: string; verbose_name_plural: string; static get(slug: string): Promise { return DefaultClient.fetch(["sources", "all", slug]); } static list(filter?: QueryArguments): Promise> { return DefaultClient.fetch>(["sources", "all"], filter); } static getTypes(): Promise { return DefaultClient.fetch(["sources", "all", "types"]); } static adminUrl(rest: string): string { return `/administration/sources/${rest}`; } }