feat(chat): sync multi-role backend APIs
This commit is contained in:
@@ -1,4 +1,3 @@
|
||||
import { DEFAULT_CHARACTER_ID } from "@/data/constants/character";
|
||||
import {
|
||||
PrivateAlbumsResponse,
|
||||
PrivateAlbumsResponseSchema,
|
||||
@@ -12,19 +11,19 @@ import { httpClient } from "./http_client";
|
||||
import { type ApiEnvelope, unwrap } from "./response_helper";
|
||||
|
||||
export interface GetPrivateAlbumsInput {
|
||||
characterId?: string;
|
||||
characterId: string;
|
||||
limit?: number;
|
||||
}
|
||||
|
||||
export class PrivateRoomApi {
|
||||
async getAlbums(
|
||||
input: GetPrivateAlbumsInput = {},
|
||||
input: GetPrivateAlbumsInput,
|
||||
): Promise<PrivateAlbumsResponse> {
|
||||
const env = await httpClient<ApiEnvelope<unknown>>(
|
||||
ApiPath.privateRoomAlbums,
|
||||
{
|
||||
query: {
|
||||
characterId: input.characterId ?? DEFAULT_CHARACTER_ID,
|
||||
characterId: input.characterId,
|
||||
limit: input.limit ?? 20,
|
||||
},
|
||||
},
|
||||
|
||||
Reference in New Issue
Block a user