Skip to content

Commit 8ab4f07

Browse files
feat(api): add v2 resource management endpoints
1 parent 43850e3 commit 8ab4f07

43 files changed

Lines changed: 7915 additions & 1483 deletions

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

apps/docs/content/docs/en/cli/knowledge.mdx

Lines changed: 217 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -213,6 +213,195 @@ sim knowledge create [options]
213213

214214
</CommandTable>
215215

216+
## Create knowledge connector
217+
218+
```bash
219+
sim knowledge connectors create <id> [options]
220+
```
221+
222+
**Arguments**
223+
224+
<CommandTable>
225+
226+
| Argument | Required | Description |
227+
| --- | --- | --- |
228+
| `id` | Yes | Unique knowledge base identifier. |
229+
230+
</CommandTable>
231+
232+
**Options**
233+
234+
<CommandTable>
235+
236+
| Option | Required | Description |
237+
| --- | --- | --- |
238+
| `--connector-type <value>` | Yes | Registered connector type. |
239+
| `--credential-id <value>` | No | OAuth credential identifier for connectors that require OAuth. |
240+
| `--api-key <value>` | No | Write-only API key for connectors that use API-key authentication. |
241+
| `--source-config <json\|@file>` | Yes | Connector-specific source selection and filtering configuration. (JSON, or @path / @- to read a file or stdin). |
242+
| `--sync-interval-minutes <value>` | No | Scheduled synchronization interval in minutes; zero disables scheduling. |
243+
244+
</CommandTable>
245+
246+
## Delete knowledge connector
247+
248+
```bash
249+
sim knowledge connectors delete <id> <connectorId> [options]
250+
```
251+
252+
**Arguments**
253+
254+
<CommandTable>
255+
256+
| Argument | Required | Description |
257+
| --- | --- | --- |
258+
| `id` | Yes | Knowledge base that owns the connector. |
259+
| `connectorId` | Yes | Connector selected for the operation. |
260+
261+
</CommandTable>
262+
263+
**Options**
264+
265+
<CommandTable>
266+
267+
| Option | Required | Description |
268+
| --- | --- | --- |
269+
| `--delete-documents` | No | Also permanently delete documents produced by this connector. |
270+
| `--no-delete-documents` | No | Send --delete-documents as false. |
271+
272+
</CommandTable>
273+
274+
## Get knowledge connector
275+
276+
```bash
277+
sim knowledge connectors get <id> <connectorId>
278+
```
279+
280+
**Arguments**
281+
282+
<CommandTable>
283+
284+
| Argument | Required | Description |
285+
| --- | --- | --- |
286+
| `id` | Yes | Knowledge base that owns the connector. |
287+
| `connectorId` | Yes | Connector selected for the operation. |
288+
289+
</CommandTable>
290+
291+
## List knowledge connector documents
292+
293+
```bash
294+
sim knowledge connectors documents list <id> <connectorId> [options]
295+
```
296+
297+
**Arguments**
298+
299+
<CommandTable>
300+
301+
| Argument | Required | Description |
302+
| --- | --- | --- |
303+
| `id` | Yes | Knowledge base that owns the connector. |
304+
| `connectorId` | Yes | Connector selected for the operation. |
305+
306+
</CommandTable>
307+
308+
**Options**
309+
310+
<CommandTable>
311+
312+
| Option | Required | Description |
313+
| --- | --- | --- |
314+
| `--include-excluded` | No | Include documents explicitly excluded by a user. |
315+
| `--no-include-excluded` | No | Send --include-excluded as false. |
316+
| `--limit <n>` | No | Maximum items to return (0 for everything). Defaults to `100`. |
317+
318+
</CommandTable>
319+
320+
## List knowledge connectors
321+
322+
```bash
323+
sim knowledge connectors list <id> [options]
324+
```
325+
326+
**Arguments**
327+
328+
<CommandTable>
329+
330+
| Argument | Required | Description |
331+
| --- | --- | --- |
332+
| `id` | Yes | Unique knowledge base identifier. |
333+
334+
</CommandTable>
335+
336+
**Options**
337+
338+
<CommandTable>
339+
340+
| Option | Required | Description |
341+
| --- | --- | --- |
342+
| `--sort-by <value>` | No | Field used to sort the result. Accepted values: `connectorType`, `createdAt`, `updatedAt`. |
343+
| `--sort-order <value>` | No | Sort direction. Accepted values: `asc`, `desc`. |
344+
| `--limit <n>` | No | Maximum items to return (0 for everything). Defaults to `100`. |
345+
346+
</CommandTable>
347+
348+
## Update knowledge connector
349+
350+
```bash
351+
sim knowledge connectors update <id> <connectorId> [options]
352+
```
353+
354+
**Arguments**
355+
356+
<CommandTable>
357+
358+
| Argument | Required | Description |
359+
| --- | --- | --- |
360+
| `id` | Yes | Knowledge base that owns the connector. |
361+
| `connectorId` | Yes | Connector selected for the operation. |
362+
363+
</CommandTable>
364+
365+
**Options**
366+
367+
<CommandTable>
368+
369+
| Option | Required | Description |
370+
| --- | --- | --- |
371+
| `--source-config <json\|@file>` | No | Replacement source selection and filtering configuration. (JSON, or @path / @- to read a file or stdin). |
372+
| `--sync-interval-minutes <value>` | No | New scheduled synchronization interval in minutes. |
373+
| `--status <value>` | No | New connector state. Accepted values: `active`, `paused`. |
374+
375+
</CommandTable>
376+
377+
## Update knowledge connector documents
378+
379+
```bash
380+
sim knowledge connectors documents update <id> <connectorId> [options]
381+
```
382+
383+
**Arguments**
384+
385+
<CommandTable>
386+
387+
| Argument | Required | Description |
388+
| --- | --- | --- |
389+
| `id` | Yes | Knowledge base that owns the connector. |
390+
| `connectorId` | Yes | Connector selected for the operation. |
391+
392+
</CommandTable>
393+
394+
**Options**
395+
396+
<CommandTable>
397+
398+
| Option | Required | Description |
399+
| --- | --- | --- |
400+
| `--operation <value>` | Yes | Whether to restore or exclude the selected documents. Accepted values: `restore`, `exclude`. |
401+
| `--document <value...>` | Yes | Connector document identifiers to update. (space-separated, or @path / @- with one value per line). |
402+
403+
</CommandTable>
404+
216405
## Create a knowledge folder at a path
217406

218407
```bash
@@ -398,6 +587,34 @@ sim knowledge search [options]
398587

399588
</CommandTable>
400589

590+
## Sync knowledge connector
591+
592+
```bash
593+
sim knowledge sync create <id> <connectorId> [options]
594+
```
595+
596+
**Arguments**
597+
598+
<CommandTable>
599+
600+
| Argument | Required | Description |
601+
| --- | --- | --- |
602+
| `id` | Yes | Knowledge base that owns the connector. |
603+
| `connectorId` | Yes | Connector selected for the operation. |
604+
605+
</CommandTable>
606+
607+
**Options**
608+
609+
<CommandTable>
610+
611+
| Option | Required | Description |
612+
| --- | --- | --- |
613+
| `--rehydrate` | No | Re-fetch and re-index every existing connector document. |
614+
| `--no-rehydrate` | No | Send --rehydrate as false. |
615+
616+
</CommandTable>
617+
401618
## Update knowledge base
402619

403620
```bash

0 commit comments

Comments
 (0)