This repository has been archived on 2024-05-31. You can view files and clone it, but cannot push or open issues or pull requests.
authentik/web/src/api/PolicyBindings.ts
2021-02-09 17:04:55 +01:00

29 lines
766 B
TypeScript

import { DefaultClient, AKResponse, QueryArguments } from "./Client";
import { Policy } from "./Policies";
export class PolicyBinding {
pk: string;
policy: string;
policy_obj: Policy;
target: string;
enabled: boolean;
order: number;
timeout: number;
constructor() {
throw Error();
}
static get(pk: string): Promise<PolicyBinding> {
return DefaultClient.fetch<PolicyBinding>(["policies", "bindings", pk]);
}
static list(filter?: QueryArguments): Promise<AKResponse<PolicyBinding>> {
return DefaultClient.fetch<AKResponse<PolicyBinding>>(["policies", "bindings"], filter);
}
static adminUrl(rest: string): string {
return `/administration/policies/bindings/${rest}`;
}
}