feat: added shared chats

This commit is contained in:
DESKTOP-RTLN3BA\$punk 2026-01-13 00:17:12 -08:00
parent 764dd05582
commit f22d649239
22 changed files with 1881 additions and 506 deletions

View file

@ -11,7 +11,7 @@ enum ResponseType {
}
export type RequestOptions = {
method: "GET" | "POST" | "PUT" | "DELETE";
method: "GET" | "POST" | "PUT" | "PATCH" | "DELETE";
headers?: Record<string, string>;
contentType?: "application/json" | "application/x-www-form-urlencoded";
signal?: AbortSignal;
@ -273,6 +273,21 @@ class BaseApiService {
});
}
async patch<T>(
url: string,
responseSchema?: ZodType<T>,
options?: Omit<RequestOptions, "method" | "responseType">
) {
return this.request(url, responseSchema, {
method: "PATCH",
headers: {
"Content-Type": "application/json",
},
...options,
responseType: ResponseType.JSON,
});
}
async getBlob(url: string, options?: Omit<RequestOptions, "method" | "responseType">) {
return this.request(url, undefined, {
...options,