homebox/frontend/lib/api/user.ts

43 lines
1.4 KiB
TypeScript
Raw Normal View History

import { BaseAPI } from "./base";
import { ItemsApi } from "./classes/items";
import { LabelsApi } from "./classes/labels";
import { LocationsApi } from "./classes/locations";
import { GroupApi } from "./classes/group";
import { UserApi } from "./classes/users";
import { ActionsAPI } from "./classes/actions";
import { StatsAPI } from "./classes/stats";
import { AssetsApi } from "./classes/assets";
import { ReportsAPI } from "./classes/reports";
import { NotifiersAPI } from "./classes/notifiers";
import { Requests } from "~~/lib/requests";
2022-08-31 00:06:57 +00:00
export class UserClient extends BaseAPI {
2022-08-31 05:22:10 +00:00
locations: LocationsApi;
2022-09-02 01:52:40 +00:00
labels: LabelsApi;
2022-09-03 09:17:57 +00:00
items: ItemsApi;
group: GroupApi;
user: UserApi;
actions: ActionsAPI;
stats: StatsAPI;
assets: AssetsApi;
reports: ReportsAPI;
notifiers: NotifiersAPI;
constructor(requests: Requests, attachmentToken: string) {
super(requests, attachmentToken);
2022-08-31 05:22:10 +00:00
this.locations = new LocationsApi(requests);
2022-09-02 01:52:40 +00:00
this.labels = new LabelsApi(requests);
this.items = new ItemsApi(requests, attachmentToken);
this.group = new GroupApi(requests);
this.user = new UserApi(requests);
this.actions = new ActionsAPI(requests);
this.stats = new StatsAPI(requests);
this.assets = new AssetsApi(requests);
this.reports = new ReportsAPI(requests);
this.notifiers = new NotifiersAPI(requests);
2022-08-31 05:22:10 +00:00
Object.freeze(this);
}
2022-08-31 00:06:57 +00:00
}