softchatjs-core
Version:
Javascript client for JS based frameworks
28 lines (25 loc) • 1.65 kB
text/typescript
import { Prettify, UploadContent } from './types.mjs';
type APIResponse<R> = {
success: boolean;
data: R;
message: string;
};
declare function CREATE_SESSION<Response>({ userId, subId, projectId, }: {
userId: string;
subId: string;
projectId: string;
}): Promise<APIResponse<Response>>;
declare function GET_CONVERSATIONS<Response>(token: string | undefined): Promise<APIResponse<Response>>;
declare function GET_CONVERSATION<Response>(token: string | undefined, conversationId: string): Promise<APIResponse<Response>>;
declare function GET_BROADCASTLISTS<Response>(token: string | undefined): Promise<APIResponse<Response>>;
declare function GET_MESSAGES<Response>(token: string | undefined, conversationId: string, page?: number): Promise<APIResponse<Response>>;
declare function GET_BROADCAST_LIST_MESSAGES<Response>(token: string | undefined, broadcastListId: string, page?: number): Promise<APIResponse<Response>>;
declare function GET_EMOJIS<Response>(token: string | undefined): Promise<APIResponse<Response>>;
declare function UPLOAD_MEDIA<Response>(token: string, data: Prettify<UploadContent>): Promise<APIResponse<Response>>;
declare function GET_PRESIGNED_URL<Response>(token: string, data: Prettify<UploadContent & {
mediaType: string;
uid: string;
ext: string;
}>): Promise<APIResponse<Response>>;
declare function UPLOAD_ATTACHMENT<Response>(token: string, data: any): Promise<APIResponse<Response>>;
export { CREATE_SESSION, GET_BROADCASTLISTS, GET_BROADCAST_LIST_MESSAGES, GET_CONVERSATION, GET_CONVERSATIONS, GET_EMOJIS, GET_MESSAGES, GET_PRESIGNED_URL, UPLOAD_ATTACHMENT, UPLOAD_MEDIA };