The communications platform that puts data protection first.
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
Rocket.Chat/app/utils/client/lib/RestApiClient.d.ts

37 lines
1.5 KiB

import { Serialized } from '../../../../definition/Serialized';
export declare const APIClient: {
delete<P, R = any>(endpoint: string, params?: Serialized<P>): Promise<Serialized<R>>;
get<P, R = any>(endpoint: string, params?: void extends P ? void : Serialized<P>): Promise<Serialized<R>>;
post<P, B, R = any>(endpoint: string, params?: Serialized<P>, body?: B): Promise<Serialized<R>>;
upload<P, B, R = any>(
endpoint: string,
params?: Serialized<P>,
formData?: B,
xhrOptions?: {
progress: (amount: number) => void;
error: (ev: ProgressEvent<XMLHttpRequestEventTarget>) => void;
},
): { promise: Promise<Serialized<R>> };
getCredentials(): {
'X-User-Id': string;
'X-Auth-Token': string;
};
_jqueryCall(method?: string, endpoint?: string, params?: any, body?: any, headers?: Record<string, string>, dataType?: string): any;
v1: {
delete<P, R = any>(endpoint: string, params?: Serialized<P>): Promise<Serialized<R>>;
get<P, R = any>(endpoint: string, params?: Serialized<P>): Promise<Serialized<R>>;
post<P, B, R = any>(endpoint: string, params?: Serialized<P>, body?: B): Promise<Serialized<R>>;
[NEW] Audio and Video calling in Livechat using Jitsi and WebRTC (#23004) * [NEW] Livechat WebRTC call settings (#22559) * [NEW] Livechat WebRTC call settings * [FIX] Omnichannel Call Settings - Change Livechat call to Video and Audio Call as it will apply to other omnichannels in future - Change Audio and Video Setting alert to description to be conformant with the other settings - Remove unrelated changes(base.css) that got induced unknowingly - Refactor to remove translation for "Jitsi" and "WebRTC" and remove unnecessary dependency on t - Refactor to add return type of handleClick - Add/remove related i18n labels * [FIX] Livechat videoCall api and method * [FIX] Add migrations for webRTC enabled settings and omnichannel call provider * [FIX] 'Jitsi' typo * [NEW] Join call action button (#22689) * [NEW] WebRTC Call Session * [IMPROVEMENT] Use API endpoint instead of method, fix handleClick dependency warning * [FIX] Return updated callStatus, use translation for join call message, remove system logger, make callStatus optional in room interface * [NEW] Join and End Call Action Message Button for Agent * [FIX] Use translation for Call ALready Ended toastr, convert actionLink to tsx * [IMPROVE] Remove redundant callStatus from message collection, Display Call Ended message with call duration * [REF] Use translation for call ended message, Store danger field in db with other action fields, store actionAlignment field in db * [NEW] update call status (#22854) * add code for update call status * remove fourth param Co-authored-by: Murtaza Patrawala <34130764+murtaza98@users.noreply.github.com> Co-authored-by: Murtaza Patrawala <34130764+murtaza98@users.noreply.github.com> * [NEW] P2P WebRTC Connection Establishment (#22847) * [NEW] WebRTC P2P Connection with Basic Call UI * [FIX] Set Stream on a stable connection * [FIX] userId typecheck error * [REFACTOR] - Restore type of userId to string by removing `| undefined` - Add translation for visitor does not exist toastr - Set visitorId from room object fetched instead of fetching from livechat widget as query param - Type Checking * [FIX] Running startCall 2 times for agent * [FIX] Call declined Page * [NEW] Control Buttons - mic, cam, expand and end call (#22928) * [NEW] Control Buttons - mic, cam, expand and end call * [REFACTOR] Add an empty file on EOF en18.i18n that was mistakenly removed * [FIX] UI responsiveness (#22934) * [NEW] Control Buttons - mic, cam, expand and end call * [REFACTOR] Add an empty file on EOF en18.i18n that was mistakenly removed * [FIX] UI Responsiveness * [REF] Use const and ternary op * [FIX] Handle decline message action link (#22936) * [NEW] Control Buttons - mic, cam, expand and end call * [REFACTOR] Add an empty file on EOF en18.i18n that was mistakenly removed * [FIX] UI Responsiveness * [REF] Use const and ternary op * [FIX] Action Link not updating when call declined * [FIX] WebRTC_call_declined_message Co-authored-by: Murtaza Patrawala <34130764+murtaza98@users.noreply.github.com> * [REF] Use a single IF statement to handle status Co-authored-by: Murtaza Patrawala <34130764+murtaza98@users.noreply.github.com> * [FIX] Call button visible even when chat is queued (#22943) * [FIX] add callstatus attribute in room object (#22959) * [IMPROVE] Attach jitsi link to message object for Livechat (#22690) * [Improve] Attach jitsi link to message object for Livechat (cherry picked from commit c888961da3313de06eaeb0700b7ce0b6371ef469) * Update WebRTCClass.js * [NEW] Webrtc meet page layout (#22932) * [NEW] Control Buttons - mic, cam, expand and end call * webrtc meet page desgin * [REFACTOR] Add an empty file on EOF en18.i18n that was mistakenly removed * [FIX] UI Responsiveness * [FIX] Action Link not updating when call declined * webrtc meet page desgin * [FIX] Remote user avatar screen and video switching * fix-alert * fix 2 aletrs * improve codebase * make ui responsive * fix issue * Add call timer component + minor refactoring * some css changes Co-authored-by: Dhruv Jain <dhruv.jain93@gmail.com> Co-authored-by: murtaza98 <murtaza.patrawala@rocket.chat> Co-authored-by: Murtaza Patrawala <34130764+murtaza98@users.noreply.github.com> * Add migration * Changing files to tsx * Update default value for setting -Jitsi_Open_New_Window * Update invalid-livechat-config issue * Fix typescript errors * Fix build errors caused by new room prop - webRtcCallStartTime * Simplify call duration calculation logic * Add definition PUT method for REST on client Co-authored-by: Dhruv Jain <51796498+djcruz93@users.noreply.github.com> Co-authored-by: Deepak Agarwal <deepak710agarwal@gmail.com> Co-authored-by: Dhruv Jain <dhruv.jain93@gmail.com>
4 years ago
put<P, B, R = any>(endpoint: string, params?: Serialized<P>, body?: B): Promise<Serialized<R>>;
upload<P, B, R = any>(
endpoint: string,
params?: Serialized<P>,
formData?: B,
xhrOptions?: {
progress: (amount: number) => void;
error: (ev: ProgressEvent<XMLHttpRequestEventTarget>) => void;
},
): { promise: Promise<Serialized<R>> };
};
};