brutalism design
This commit is contained in:
@@ -30,7 +30,7 @@ export interface Attachment {
|
||||
*/
|
||||
export interface Channel {
|
||||
id: string;
|
||||
ownerId: string | null;
|
||||
ownerUsername: string | null;
|
||||
name: string;
|
||||
persistent: boolean;
|
||||
}
|
||||
@@ -42,15 +42,22 @@ export interface Channel {
|
||||
export interface ChatMessage {
|
||||
/** @format uuid */
|
||||
id: string;
|
||||
/** @format uuid */
|
||||
senderId: string;
|
||||
senderUsername: string;
|
||||
/** @minLength 1 */
|
||||
text: string;
|
||||
/** @format date-time */
|
||||
createdAt: string;
|
||||
/** @format date-time */
|
||||
updatedAt: string;
|
||||
attachments: string[];
|
||||
attachments: {
|
||||
id: string;
|
||||
name: string;
|
||||
mimetype: string;
|
||||
/** @min 0 */
|
||||
size: number;
|
||||
/** @format date-time */
|
||||
createdAt: string;
|
||||
}[];
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -118,8 +125,7 @@ export interface NewChatMessagePayload {
|
||||
export interface Reply {
|
||||
/** @format uuid */
|
||||
messageId: string;
|
||||
/** @format uuid */
|
||||
senderId: string;
|
||||
senderUsername: string;
|
||||
text: string;
|
||||
}
|
||||
|
||||
@@ -164,7 +170,6 @@ export interface UserPreferences {
|
||||
* User
|
||||
*/
|
||||
export interface User {
|
||||
id: string;
|
||||
username: string;
|
||||
displayName: string;
|
||||
/** @format date-time */
|
||||
@@ -232,7 +237,7 @@ export class HttpClient<SecurityDataType = unknown> {
|
||||
fetch(...fetchParams);
|
||||
|
||||
private baseApiParams: RequestParams = {
|
||||
credentials: "include",
|
||||
credentials: "same-origin",
|
||||
headers: {},
|
||||
redirect: "follow",
|
||||
referrerPolicy: "no-referrer",
|
||||
@@ -590,30 +595,8 @@ export class Api<
|
||||
* @summary Send message
|
||||
* @request POST:/chad/chat/send
|
||||
*/
|
||||
chatSend: (
|
||||
data: {
|
||||
/** @minLength 1 */
|
||||
text: string;
|
||||
attachments?: string[];
|
||||
},
|
||||
params: RequestParams = {},
|
||||
) =>
|
||||
this.request<
|
||||
{
|
||||
/** @format uuid */
|
||||
id: string;
|
||||
/** @format uuid */
|
||||
senderId: string;
|
||||
/** @minLength 1 */
|
||||
text: string;
|
||||
/** @format date-time */
|
||||
createdAt: string;
|
||||
/** @format date-time */
|
||||
updatedAt: string;
|
||||
attachments: string[];
|
||||
},
|
||||
ResponseError
|
||||
>({
|
||||
chatSend: (data: NewChatMessagePayload, params: RequestParams = {}) =>
|
||||
this.request<ChatMessage, ResponseError>({
|
||||
path: `/chad/chat/send`,
|
||||
method: "POST",
|
||||
body: data,
|
||||
@@ -648,19 +631,7 @@ export class Api<
|
||||
) =>
|
||||
this.request<
|
||||
{
|
||||
messages: {
|
||||
/** @format uuid */
|
||||
id: string;
|
||||
/** @format uuid */
|
||||
senderId: string;
|
||||
/** @minLength 1 */
|
||||
text: string;
|
||||
/** @format date-time */
|
||||
createdAt: string;
|
||||
/** @format date-time */
|
||||
updatedAt: string;
|
||||
attachments: string[];
|
||||
}[];
|
||||
messages: ChatMessage[];
|
||||
/**
|
||||
* Cursor to last message
|
||||
* @format uuid
|
||||
|
||||
Reference in New Issue
Block a user