sources/*: simplify source api

This commit is contained in:
Jens Langhammer
2021-02-08 10:15:59 +01:00
parent cd5631ec76
commit 3ced67b151
12 changed files with 85 additions and 57 deletions

View File

@ -1,12 +1,14 @@
import { DefaultClient, PBResponse, QueryArguments } from "./Client";
import { DefaultClient, BaseInheritanceModel, PBResponse, QueryArguments } from "./Client";
export class Policy {
export class Policy implements BaseInheritanceModel {
pk: string;
name: string;
constructor() {
throw Error();
}
verbose_name: string;
verbose_name_plural: string;
static get(pk: string): Promise<Policy> {
return DefaultClient.fetch<Policy>(["policies", "all", pk]);