2022-05-06 11:18:06 -08:00
|
|
|
import { ValidatorsApi } from "./public/validators";
|
2022-08-28 20:08:33 -08:00
|
|
|
import { ExploreApi } from "./public/explore";
|
|
|
|
import { SharedApi } from "./public/shared";
|
2025-06-20 00:09:12 +07:00
|
|
|
import type { ApiRequestInstance } from "~/lib/api/types/non-generated";
|
2022-05-06 11:18:06 -08:00
|
|
|
|
|
|
|
export class PublicApi {
|
|
|
|
public validators: ValidatorsApi;
|
2022-08-28 20:08:33 -08:00
|
|
|
public shared: SharedApi;
|
2022-05-06 11:18:06 -08:00
|
|
|
|
|
|
|
constructor(requests: ApiRequestInstance) {
|
|
|
|
this.validators = new ValidatorsApi(requests);
|
2022-08-28 20:08:33 -08:00
|
|
|
this.shared = new SharedApi(requests);
|
2023-09-14 09:01:24 -05:00
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
export class PublicExploreApi extends PublicApi {
|
|
|
|
public explore: ExploreApi;
|
|
|
|
|
|
|
|
constructor(requests: ApiRequestInstance, groupSlug: string) {
|
|
|
|
super(requests);
|
|
|
|
this.explore = new ExploreApi(requests, groupSlug);
|
2022-05-06 11:18:06 -08:00
|
|
|
|
|
|
|
Object.freeze(this);
|
|
|
|
}
|
|
|
|
}
|