mirror of
https://github.com/danny-avila/LibreChat.git
synced 2025-12-18 01:10:14 +01:00
Move data provider to shared package (#582)
* create data-provider package and move code from data-provider folder to be shared between apps * fix type issues * add packages to ignore * add new data-provider package to apps * refactor: change client imports to use @librechat/data-provider package * include data-provider build script in frontend build * fix type issue after rebasing * delete admin/package.json from this branch * update test ci script to include building of data-provider package * Try using regular build for test action * Switch frontend-review back to build:ci * Remove loginRedirect from Login.tsx * Add ChatGPT back to EModelEndpoint
This commit is contained in:
parent
d0078d478d
commit
04e4259005
48 changed files with 1472 additions and 141 deletions
95
packages/data-provider/src/api-endpoints.ts
Normal file
95
packages/data-provider/src/api-endpoints.ts
Normal file
|
|
@ -0,0 +1,95 @@
|
|||
export const user = () => {
|
||||
return `/api/user`;
|
||||
};
|
||||
|
||||
export const userPlugins = () => {
|
||||
return `/api/user/plugins`;
|
||||
};
|
||||
|
||||
export const messages = (id: string) => {
|
||||
return `/api/messages/${id}`;
|
||||
};
|
||||
|
||||
export const abortRequest = (endpoint: string) => {
|
||||
return `/api/ask/${endpoint}/abort`;
|
||||
};
|
||||
|
||||
export const conversations = (pageNumber: string) => {
|
||||
return `/api/convos?pageNumber=${pageNumber}`;
|
||||
};
|
||||
|
||||
export const conversationById = (id: string) => {
|
||||
return `/api/convos/${id}`;
|
||||
};
|
||||
|
||||
export const updateConversation = () => {
|
||||
return `/api/convos/update`;
|
||||
};
|
||||
|
||||
export const deleteConversation = () => {
|
||||
return `/api/convos/clear`;
|
||||
};
|
||||
|
||||
export const search = (q: string, pageNumber: string) => {
|
||||
return `/api/search?q=${q}&pageNumber=${pageNumber}`;
|
||||
};
|
||||
|
||||
export const searchEnabled = () => {
|
||||
return `/api/search/enable`;
|
||||
};
|
||||
|
||||
export const presets = () => {
|
||||
return `/api/presets`;
|
||||
};
|
||||
|
||||
export const deletePreset = () => {
|
||||
return `/api/presets/delete`;
|
||||
};
|
||||
|
||||
export const aiEndpoints = () => {
|
||||
return `/api/endpoints`;
|
||||
};
|
||||
|
||||
export const tokenizer = () => {
|
||||
return `/api/tokenizer`;
|
||||
};
|
||||
|
||||
export const login = () => {
|
||||
return '/api/auth/login';
|
||||
};
|
||||
|
||||
export const logout = () => {
|
||||
return '/api/auth/logout';
|
||||
};
|
||||
|
||||
export const register = () => {
|
||||
return '/api/auth/register';
|
||||
};
|
||||
|
||||
export const loginFacebook = () => {
|
||||
return '/api/auth/facebook';
|
||||
};
|
||||
|
||||
export const loginGoogle = () => {
|
||||
return '/api/auth/google';
|
||||
};
|
||||
|
||||
export const refreshToken = () => {
|
||||
return '/api/auth/refresh';
|
||||
};
|
||||
|
||||
export const requestPasswordReset = () => {
|
||||
return '/api/auth/requestPasswordReset';
|
||||
};
|
||||
|
||||
export const resetPassword = () => {
|
||||
return '/api/auth/resetPassword';
|
||||
};
|
||||
|
||||
export const plugins = () => {
|
||||
return '/api/plugins';
|
||||
};
|
||||
|
||||
export const config = () => {
|
||||
return '/api/config';
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue