Changeset 0.37.18 (#230)
Co-authored-by: gobha <jasafpro@gmail.com> Co-committed-by: gobha <jasafpro@gmail.com>
This commit is contained in:
@@ -94,7 +94,7 @@ export function createDomains(restClient) {
|
||||
kbs: (id) => rc.get(`/api/v1/channels/${id}/knowledge-bases`),
|
||||
setKbs: (id, kbIds) => rc.put(`/api/v1/channels/${id}/knowledge-bases`, { kb_ids: kbIds }),
|
||||
// Files
|
||||
files: (id) => rc.get(`/api/v1/channels/${id}/files`),
|
||||
files: (id, opts) => rc.get(`/api/v1/channels/${id}/files` + _qs(opts)),
|
||||
uploadFile: (id, file) => rc.upload(`/api/v1/channels/${id}/files`, file),
|
||||
},
|
||||
|
||||
@@ -150,7 +150,8 @@ export function createDomains(restClient) {
|
||||
// ── 7. Workspaces ──────────────────────
|
||||
workspaces: {
|
||||
...crud(rc, '/api/v1/workspaces'),
|
||||
update: (id, data) => rc.patch(`/api/v1/workspaces/${id}`, data),
|
||||
update: (id, data) => rc.patch(`/api/v1/workspaces/${id}`, data),
|
||||
getDefault: () => rc.get('/api/v1/workspaces/default'),
|
||||
files: (id, opts) => rc.get(`/api/v1/workspaces/${id}/files` + _qs(opts)),
|
||||
readFile: (id, path) => rc.get(`/api/v1/workspaces/${id}/files/read` + _qs({ path })),
|
||||
writeFile: (id, path, content) => rc.put(`/api/v1/workspaces/${id}/files/write` + _qs({ path }), content),
|
||||
|
||||
Reference in New Issue
Block a user