@agentuity/core 1.0.31 → 1.0.33
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/api/api.d.ts +226 -0
- package/dist/api/api.d.ts.map +1 -0
- package/dist/api/api.js +635 -0
- package/dist/api/api.js.map +1 -0
- package/dist/api/apikey/create.d.ts +33 -0
- package/dist/api/apikey/create.d.ts.map +1 -0
- package/dist/api/apikey/create.js +23 -0
- package/dist/api/apikey/create.js.map +1 -0
- package/dist/api/apikey/delete.d.ts +19 -0
- package/dist/api/apikey/delete.d.ts.map +1 -0
- package/dist/api/apikey/delete.js +19 -0
- package/dist/api/apikey/delete.js.map +1 -0
- package/dist/api/apikey/get.d.ts +45 -0
- package/dist/api/apikey/get.d.ts.map +1 -0
- package/dist/api/apikey/get.js +36 -0
- package/dist/api/apikey/get.js.map +1 -0
- package/dist/api/apikey/index.d.ts +6 -0
- package/dist/api/apikey/index.d.ts.map +1 -0
- package/dist/api/apikey/index.js +6 -0
- package/dist/api/apikey/index.js.map +1 -0
- package/dist/api/apikey/list.d.ts +64 -0
- package/dist/api/apikey/list.d.ts.map +1 -0
- package/dist/api/apikey/list.js +46 -0
- package/dist/api/apikey/list.js.map +1 -0
- package/dist/api/apikey/util.d.ts +23 -0
- package/dist/api/apikey/util.d.ts.map +1 -0
- package/dist/api/apikey/util.js +3 -0
- package/dist/api/apikey/util.js.map +1 -0
- package/dist/api/config.d.ts +20 -0
- package/dist/api/config.d.ts.map +1 -0
- package/dist/api/config.js +43 -0
- package/dist/api/config.js.map +1 -0
- package/dist/api/db/index.d.ts +5 -0
- package/dist/api/db/index.d.ts.map +1 -0
- package/dist/api/db/index.js +5 -0
- package/dist/api/db/index.js.map +1 -0
- package/dist/api/db/logs.d.ts +70 -0
- package/dist/api/db/logs.d.ts.map +1 -0
- package/dist/api/db/logs.js +59 -0
- package/dist/api/db/logs.js.map +1 -0
- package/dist/api/db/query.d.ts +39 -0
- package/dist/api/db/query.d.ts.map +1 -0
- package/dist/api/db/query.js +49 -0
- package/dist/api/db/query.js.map +1 -0
- package/dist/api/db/tables.d.ts +49 -0
- package/dist/api/db/tables.d.ts.map +1 -0
- package/dist/api/db/tables.js +59 -0
- package/dist/api/db/tables.js.map +1 -0
- package/dist/api/db/util.d.ts +31 -0
- package/dist/api/db/util.d.ts.map +1 -0
- package/dist/api/db/util.js +4 -0
- package/dist/api/db/util.js.map +1 -0
- package/dist/api/env.d.ts +5 -0
- package/dist/api/env.d.ts.map +1 -0
- package/dist/api/env.js +10 -0
- package/dist/api/env.js.map +1 -0
- package/dist/api/eval/get.d.ts +36 -0
- package/dist/api/eval/get.d.ts.map +1 -0
- package/dist/api/eval/get.js +23 -0
- package/dist/api/eval/get.js.map +1 -0
- package/dist/api/eval/index.d.ts +5 -0
- package/dist/api/eval/index.d.ts.map +1 -0
- package/dist/api/eval/index.js +5 -0
- package/dist/api/eval/index.js.map +1 -0
- package/dist/api/eval/list.d.ts +50 -0
- package/dist/api/eval/list.d.ts.map +1 -0
- package/dist/api/eval/list.js +32 -0
- package/dist/api/eval/list.js.map +1 -0
- package/dist/api/eval/run-get.d.ts +48 -0
- package/dist/api/eval/run-get.d.ts.map +1 -0
- package/dist/api/eval/run-get.js +29 -0
- package/dist/api/eval/run-get.js.map +1 -0
- package/dist/api/eval/run-list.d.ts +70 -0
- package/dist/api/eval/run-list.d.ts.map +1 -0
- package/dist/api/eval/run-list.js +42 -0
- package/dist/api/eval/run-list.js.map +1 -0
- package/dist/api/index.d.ts +21 -0
- package/dist/api/index.d.ts.map +1 -0
- package/dist/api/index.js +21 -0
- package/dist/api/index.js.map +1 -0
- package/dist/api/logger.d.ts +7 -0
- package/dist/api/logger.d.ts.map +1 -0
- package/dist/api/logger.js +23 -0
- package/dist/api/logger.js.map +1 -0
- package/dist/api/machine/index.d.ts +3 -0
- package/dist/api/machine/index.d.ts.map +1 -0
- package/dist/api/machine/index.js +3 -0
- package/dist/api/machine/index.js.map +1 -0
- package/dist/api/machine/machine.d.ts +192 -0
- package/dist/api/machine/machine.d.ts.map +1 -0
- package/dist/api/machine/machine.js +109 -0
- package/dist/api/machine/machine.js.map +1 -0
- package/dist/api/machine/util.d.ts +14 -0
- package/dist/api/machine/util.d.ts.map +1 -0
- package/dist/api/machine/util.js +3 -0
- package/dist/api/machine/util.js.map +1 -0
- package/dist/api/org/env-delete.d.ts +23 -0
- package/dist/api/org/env-delete.d.ts.map +1 -0
- package/dist/api/org/env-delete.js +25 -0
- package/dist/api/org/env-delete.js.map +1 -0
- package/dist/api/org/env-get.d.ts +33 -0
- package/dist/api/org/env-get.d.ts.map +1 -0
- package/dist/api/org/env-get.js +26 -0
- package/dist/api/org/env-get.js.map +1 -0
- package/dist/api/org/env-update.d.ts +24 -0
- package/dist/api/org/env-update.d.ts.map +1 -0
- package/dist/api/org/env-update.js +26 -0
- package/dist/api/org/env-update.js.map +1 -0
- package/dist/api/org/index.d.ts +7 -0
- package/dist/api/org/index.d.ts.map +1 -0
- package/dist/api/org/index.js +7 -0
- package/dist/api/org/index.js.map +1 -0
- package/dist/api/org/list.d.ts +27 -0
- package/dist/api/org/list.d.ts.map +1 -0
- package/dist/api/org/list.js +22 -0
- package/dist/api/org/list.js.map +1 -0
- package/dist/api/org/resources.d.ts +141 -0
- package/dist/api/org/resources.d.ts.map +1 -0
- package/dist/api/org/resources.js +97 -0
- package/dist/api/org/resources.js.map +1 -0
- package/dist/api/org/util.d.ts +45 -0
- package/dist/api/org/util.d.ts.map +1 -0
- package/dist/api/org/util.js +4 -0
- package/dist/api/org/util.js.map +1 -0
- package/dist/api/project/agent.d.ts +89 -0
- package/dist/api/project/agent.d.ts.map +1 -0
- package/dist/api/project/agent.js +60 -0
- package/dist/api/project/agent.js.map +1 -0
- package/dist/api/project/create.d.ts +37 -0
- package/dist/api/project/create.d.ts.map +1 -0
- package/dist/api/project/create.js +31 -0
- package/dist/api/project/create.js.map +1 -0
- package/dist/api/project/delete.d.ts +15 -0
- package/dist/api/project/delete.d.ts.map +1 -0
- package/dist/api/project/delete.js +13 -0
- package/dist/api/project/delete.js.map +1 -0
- package/dist/api/project/deploy.d.ts +490 -0
- package/dist/api/project/deploy.d.ts.map +1 -0
- package/dist/api/project/deploy.js +313 -0
- package/dist/api/project/deploy.js.map +1 -0
- package/dist/api/project/deployment.d.ts +237 -0
- package/dist/api/project/deployment.d.ts.map +1 -0
- package/dist/api/project/deployment.js +127 -0
- package/dist/api/project/deployment.js.map +1 -0
- package/dist/api/project/env-delete.d.ts +22 -0
- package/dist/api/project/env-delete.d.ts.map +1 -0
- package/dist/api/project/env-delete.js +29 -0
- package/dist/api/project/env-delete.js.map +1 -0
- package/dist/api/project/env-update.d.ts +31 -0
- package/dist/api/project/env-update.d.ts.map +1 -0
- package/dist/api/project/env-update.js +36 -0
- package/dist/api/project/env-update.js.map +1 -0
- package/dist/api/project/exists.d.ts +25 -0
- package/dist/api/project/exists.d.ts.map +1 -0
- package/dist/api/project/exists.js +45 -0
- package/dist/api/project/exists.js.map +1 -0
- package/dist/api/project/get.d.ts +43 -0
- package/dist/api/project/get.d.ts.map +1 -0
- package/dist/api/project/get.js +36 -0
- package/dist/api/project/get.js.map +1 -0
- package/dist/api/project/hostname.d.ts +25 -0
- package/dist/api/project/hostname.d.ts.map +1 -0
- package/dist/api/project/hostname.js +37 -0
- package/dist/api/project/hostname.js.map +1 -0
- package/dist/api/project/index.d.ts +14 -0
- package/dist/api/project/index.d.ts.map +1 -0
- package/dist/api/project/index.js +14 -0
- package/dist/api/project/index.js.map +1 -0
- package/dist/api/project/list.d.ts +48 -0
- package/dist/api/project/list.d.ts.map +1 -0
- package/dist/api/project/list.js +38 -0
- package/dist/api/project/list.js.map +1 -0
- package/dist/api/project/malware.d.ts +71 -0
- package/dist/api/project/malware.d.ts.map +1 -0
- package/dist/api/project/malware.js +42 -0
- package/dist/api/project/malware.js.map +1 -0
- package/dist/api/project/update-region.d.ts +27 -0
- package/dist/api/project/update-region.d.ts.map +1 -0
- package/dist/api/project/update-region.js +25 -0
- package/dist/api/project/update-region.js.map +1 -0
- package/dist/api/project/util.d.ts +62 -0
- package/dist/api/project/util.d.ts.map +1 -0
- package/dist/api/project/util.js +6 -0
- package/dist/api/project/util.js.map +1 -0
- package/dist/api/queue/analytics.d.ts +250 -0
- package/dist/api/queue/analytics.d.ts.map +1 -0
- package/dist/api/queue/analytics.js +233 -0
- package/dist/api/queue/analytics.js.map +1 -0
- package/dist/api/queue/destinations.d.ts +202 -0
- package/dist/api/queue/destinations.d.ts.map +1 -0
- package/dist/api/queue/destinations.js +168 -0
- package/dist/api/queue/destinations.js.map +1 -0
- package/dist/api/queue/dlq.d.ts +168 -0
- package/dist/api/queue/dlq.d.ts.map +1 -0
- package/dist/api/queue/dlq.js +166 -0
- package/dist/api/queue/dlq.js.map +1 -0
- package/dist/api/queue/index.d.ts +56 -0
- package/dist/api/queue/index.d.ts.map +1 -0
- package/dist/api/queue/index.js +90 -0
- package/dist/api/queue/index.js.map +1 -0
- package/dist/api/queue/messages.d.ts +503 -0
- package/dist/api/queue/messages.d.ts.map +1 -0
- package/dist/api/queue/messages.js +549 -0
- package/dist/api/queue/messages.js.map +1 -0
- package/dist/api/queue/queues.d.ts +226 -0
- package/dist/api/queue/queues.d.ts.map +1 -0
- package/dist/api/queue/queues.js +321 -0
- package/dist/api/queue/queues.js.map +1 -0
- package/dist/api/queue/sources.d.ts +202 -0
- package/dist/api/queue/sources.d.ts.map +1 -0
- package/dist/api/queue/sources.js +202 -0
- package/dist/api/queue/sources.js.map +1 -0
- package/dist/api/queue/types.d.ts +1218 -0
- package/dist/api/queue/types.d.ts.map +1 -0
- package/dist/api/queue/types.js +1002 -0
- package/dist/api/queue/types.js.map +1 -0
- package/dist/api/queue/util.d.ts +278 -0
- package/dist/api/queue/util.d.ts.map +1 -0
- package/dist/api/queue/util.js +233 -0
- package/dist/api/queue/util.js.map +1 -0
- package/dist/api/queue/validation.d.ts +247 -0
- package/dist/api/queue/validation.d.ts.map +1 -0
- package/dist/api/queue/validation.js +513 -0
- package/dist/api/queue/validation.js.map +1 -0
- package/dist/api/queue/websocket.d.ts +172 -0
- package/dist/api/queue/websocket.d.ts.map +1 -0
- package/dist/api/queue/websocket.js +396 -0
- package/dist/api/queue/websocket.js.map +1 -0
- package/dist/api/region/create.d.ts +81 -0
- package/dist/api/region/create.d.ts.map +1 -0
- package/dist/api/region/create.js +177 -0
- package/dist/api/region/create.js.map +1 -0
- package/dist/api/region/delete.d.ts +62 -0
- package/dist/api/region/delete.d.ts.map +1 -0
- package/dist/api/region/delete.js +37 -0
- package/dist/api/region/delete.js.map +1 -0
- package/dist/api/region/index.d.ts +5 -0
- package/dist/api/region/index.d.ts.map +1 -0
- package/dist/api/region/index.js +5 -0
- package/dist/api/region/index.js.map +1 -0
- package/dist/api/region/list.d.ts +27 -0
- package/dist/api/region/list.d.ts.map +1 -0
- package/dist/api/region/list.js +22 -0
- package/dist/api/region/list.js.map +1 -0
- package/dist/api/region/resources.d.ts +71 -0
- package/dist/api/region/resources.d.ts.map +1 -0
- package/dist/api/region/resources.js +53 -0
- package/dist/api/region/resources.js.map +1 -0
- package/dist/api/region/util.d.ts +23 -0
- package/dist/api/region/util.d.ts.map +1 -0
- package/dist/api/region/util.js +3 -0
- package/dist/api/region/util.js.map +1 -0
- package/dist/api/sandbox/cli-list.d.ts +114 -0
- package/dist/api/sandbox/cli-list.d.ts.map +1 -0
- package/dist/api/sandbox/cli-list.js +71 -0
- package/dist/api/sandbox/cli-list.js.map +1 -0
- package/dist/api/sandbox/client.d.ts +192 -0
- package/dist/api/sandbox/client.d.ts.map +1 -0
- package/dist/api/sandbox/client.js +262 -0
- package/dist/api/sandbox/client.js.map +1 -0
- package/dist/api/sandbox/create.d.ts +118 -0
- package/dist/api/sandbox/create.d.ts.map +1 -0
- package/dist/api/sandbox/create.js +211 -0
- package/dist/api/sandbox/create.js.map +1 -0
- package/dist/api/sandbox/destroy.d.ts +22 -0
- package/dist/api/sandbox/destroy.d.ts.map +1 -0
- package/dist/api/sandbox/destroy.js +25 -0
- package/dist/api/sandbox/destroy.js.map +1 -0
- package/dist/api/sandbox/disk-checkpoint.d.ts +104 -0
- package/dist/api/sandbox/disk-checkpoint.d.ts.map +1 -0
- package/dist/api/sandbox/disk-checkpoint.js +104 -0
- package/dist/api/sandbox/disk-checkpoint.js.map +1 -0
- package/dist/api/sandbox/execute.d.ts +69 -0
- package/dist/api/sandbox/execute.d.ts.map +1 -0
- package/dist/api/sandbox/execute.js +103 -0
- package/dist/api/sandbox/execute.js.map +1 -0
- package/dist/api/sandbox/execution.d.ts +169 -0
- package/dist/api/sandbox/execution.d.ts.map +1 -0
- package/dist/api/sandbox/execution.js +118 -0
- package/dist/api/sandbox/execution.js.map +1 -0
- package/dist/api/sandbox/files.d.ts +261 -0
- package/dist/api/sandbox/files.d.ts.map +1 -0
- package/dist/api/sandbox/files.js +386 -0
- package/dist/api/sandbox/files.js.map +1 -0
- package/dist/api/sandbox/get.d.ts +283 -0
- package/dist/api/sandbox/get.d.ts.map +1 -0
- package/dist/api/sandbox/get.js +215 -0
- package/dist/api/sandbox/get.js.map +1 -0
- package/dist/api/sandbox/getStatus.d.ts +16 -0
- package/dist/api/sandbox/getStatus.d.ts.map +1 -0
- package/dist/api/sandbox/getStatus.js +32 -0
- package/dist/api/sandbox/getStatus.js.map +1 -0
- package/dist/api/sandbox/index.d.ts +39 -0
- package/dist/api/sandbox/index.d.ts.map +1 -0
- package/dist/api/sandbox/index.js +20 -0
- package/dist/api/sandbox/index.js.map +1 -0
- package/dist/api/sandbox/list.d.ts +293 -0
- package/dist/api/sandbox/list.d.ts.map +1 -0
- package/dist/api/sandbox/list.js +191 -0
- package/dist/api/sandbox/list.js.map +1 -0
- package/dist/api/sandbox/pause.d.ts +22 -0
- package/dist/api/sandbox/pause.d.ts.map +1 -0
- package/dist/api/sandbox/pause.js +25 -0
- package/dist/api/sandbox/pause.js.map +1 -0
- package/dist/api/sandbox/resolve.d.ts +82 -0
- package/dist/api/sandbox/resolve.d.ts.map +1 -0
- package/dist/api/sandbox/resolve.js +71 -0
- package/dist/api/sandbox/resolve.js.map +1 -0
- package/dist/api/sandbox/resume.d.ts +22 -0
- package/dist/api/sandbox/resume.d.ts.map +1 -0
- package/dist/api/sandbox/resume.js +25 -0
- package/dist/api/sandbox/resume.js.map +1 -0
- package/dist/api/sandbox/run.d.ts +28 -0
- package/dist/api/sandbox/run.d.ts.map +1 -0
- package/dist/api/sandbox/run.js +342 -0
- package/dist/api/sandbox/run.js.map +1 -0
- package/dist/api/sandbox/runtime.d.ts +83 -0
- package/dist/api/sandbox/runtime.d.ts.map +1 -0
- package/dist/api/sandbox/runtime.js +78 -0
- package/dist/api/sandbox/runtime.js.map +1 -0
- package/dist/api/sandbox/snapshot-build.d.ts +48 -0
- package/dist/api/sandbox/snapshot-build.d.ts.map +1 -0
- package/dist/api/sandbox/snapshot-build.js +72 -0
- package/dist/api/sandbox/snapshot-build.js.map +1 -0
- package/dist/api/sandbox/snapshot.d.ts +595 -0
- package/dist/api/sandbox/snapshot.d.ts.map +1 -0
- package/dist/api/sandbox/snapshot.js +598 -0
- package/dist/api/sandbox/snapshot.js.map +1 -0
- package/dist/api/sandbox/util.d.ts +284 -0
- package/dist/api/sandbox/util.d.ts.map +1 -0
- package/dist/api/sandbox/util.js +210 -0
- package/dist/api/sandbox/util.js.map +1 -0
- package/dist/api/services/index.d.ts +2 -0
- package/dist/api/services/index.d.ts.map +1 -0
- package/dist/api/services/index.js +2 -0
- package/dist/api/services/index.js.map +1 -0
- package/dist/api/services/stats.d.ts +263 -0
- package/dist/api/services/stats.d.ts.map +1 -0
- package/dist/api/services/stats.js +144 -0
- package/dist/api/services/stats.js.map +1 -0
- package/dist/api/session/get.d.ts +169 -0
- package/dist/api/session/get.d.ts.map +1 -0
- package/dist/api/session/get.js +56 -0
- package/dist/api/session/get.js.map +1 -0
- package/dist/api/session/index.d.ts +4 -0
- package/dist/api/session/index.d.ts.map +1 -0
- package/dist/api/session/index.js +4 -0
- package/dist/api/session/index.js.map +1 -0
- package/dist/api/session/list.d.ts +143 -0
- package/dist/api/session/list.d.ts.map +1 -0
- package/dist/api/session/list.js +91 -0
- package/dist/api/session/list.js.map +1 -0
- package/dist/api/session/logs.d.ts +40 -0
- package/dist/api/session/logs.d.ts.map +1 -0
- package/dist/api/session/logs.js +28 -0
- package/dist/api/session/logs.js.map +1 -0
- package/dist/api/session/util.d.ts +23 -0
- package/dist/api/session/util.d.ts.map +1 -0
- package/dist/api/session/util.js +3 -0
- package/dist/api/session/util.js.map +1 -0
- package/dist/api/storage/config.d.ts +99 -0
- package/dist/api/storage/config.d.ts.map +1 -0
- package/dist/api/storage/config.js +61 -0
- package/dist/api/storage/config.js.map +1 -0
- package/dist/api/storage/index.d.ts +5 -0
- package/dist/api/storage/index.d.ts.map +1 -0
- package/dist/api/storage/index.js +5 -0
- package/dist/api/storage/index.js.map +1 -0
- package/dist/api/storage/objects.d.ts +155 -0
- package/dist/api/storage/objects.d.ts.map +1 -0
- package/dist/api/storage/objects.js +148 -0
- package/dist/api/storage/objects.js.map +1 -0
- package/dist/api/storage/types.d.ts +161 -0
- package/dist/api/storage/types.d.ts.map +1 -0
- package/dist/api/storage/types.js +141 -0
- package/dist/api/storage/types.js.map +1 -0
- package/dist/api/storage/util.d.ts +45 -0
- package/dist/api/storage/util.d.ts.map +1 -0
- package/dist/api/storage/util.js +4 -0
- package/dist/api/storage/util.js.map +1 -0
- package/dist/api/stream/get.d.ts +58 -0
- package/dist/api/stream/get.d.ts.map +1 -0
- package/dist/api/stream/get.js +40 -0
- package/dist/api/stream/get.js.map +1 -0
- package/dist/api/stream/index.d.ts +4 -0
- package/dist/api/stream/index.d.ts.map +1 -0
- package/dist/api/stream/index.js +4 -0
- package/dist/api/stream/index.js.map +1 -0
- package/dist/api/stream/list.d.ts +120 -0
- package/dist/api/stream/list.d.ts.map +1 -0
- package/dist/api/stream/list.js +77 -0
- package/dist/api/stream/list.js.map +1 -0
- package/dist/api/stream/util.d.ts +23 -0
- package/dist/api/stream/util.d.ts.map +1 -0
- package/dist/api/stream/util.js +3 -0
- package/dist/api/stream/util.js.map +1 -0
- package/dist/api/thread/delete.d.ts +23 -0
- package/dist/api/thread/delete.d.ts.map +1 -0
- package/dist/api/thread/delete.js +21 -0
- package/dist/api/thread/delete.js.map +1 -0
- package/dist/api/thread/get.d.ts +36 -0
- package/dist/api/thread/get.d.ts.map +1 -0
- package/dist/api/thread/get.js +23 -0
- package/dist/api/thread/get.js.map +1 -0
- package/dist/api/thread/index.d.ts +5 -0
- package/dist/api/thread/index.d.ts.map +1 -0
- package/dist/api/thread/index.js +5 -0
- package/dist/api/thread/index.js.map +1 -0
- package/dist/api/thread/list.d.ts +69 -0
- package/dist/api/thread/list.d.ts.map +1 -0
- package/dist/api/thread/list.js +51 -0
- package/dist/api/thread/list.js.map +1 -0
- package/dist/api/thread/util.d.ts +23 -0
- package/dist/api/thread/util.d.ts.map +1 -0
- package/dist/api/thread/util.js +3 -0
- package/dist/api/thread/util.js.map +1 -0
- package/dist/api/user/index.d.ts +2 -0
- package/dist/api/user/index.d.ts.map +1 -0
- package/dist/api/user/index.js +2 -0
- package/dist/api/user/index.js.map +1 -0
- package/dist/api/user/util.d.ts +23 -0
- package/dist/api/user/util.d.ts.map +1 -0
- package/dist/api/user/util.js +3 -0
- package/dist/api/user/util.js.map +1 -0
- package/dist/api/user/whoami.d.ts +39 -0
- package/dist/api/user/whoami.d.ts.map +1 -0
- package/dist/api/user/whoami.js +27 -0
- package/dist/api/user/whoami.js.map +1 -0
- package/dist/api/webhook/deliveries.d.ts +94 -0
- package/dist/api/webhook/deliveries.d.ts.map +1 -0
- package/dist/api/webhook/deliveries.js +79 -0
- package/dist/api/webhook/deliveries.js.map +1 -0
- package/dist/api/webhook/destinations.d.ts +136 -0
- package/dist/api/webhook/destinations.d.ts.map +1 -0
- package/dist/api/webhook/destinations.js +137 -0
- package/dist/api/webhook/destinations.js.map +1 -0
- package/dist/api/webhook/index.d.ts +41 -0
- package/dist/api/webhook/index.d.ts.map +1 -0
- package/dist/api/webhook/index.js +59 -0
- package/dist/api/webhook/index.js.map +1 -0
- package/dist/api/webhook/receipts.d.ts +77 -0
- package/dist/api/webhook/receipts.d.ts.map +1 -0
- package/dist/api/webhook/receipts.js +78 -0
- package/dist/api/webhook/receipts.js.map +1 -0
- package/dist/api/webhook/types.d.ts +249 -0
- package/dist/api/webhook/types.d.ts.map +1 -0
- package/dist/api/webhook/types.js +221 -0
- package/dist/api/webhook/types.js.map +1 -0
- package/dist/api/webhook/util.d.ts +202 -0
- package/dist/api/webhook/util.d.ts.map +1 -0
- package/dist/api/webhook/util.js +199 -0
- package/dist/api/webhook/util.js.map +1 -0
- package/dist/api/webhook/webhooks.d.ts +146 -0
- package/dist/api/webhook/webhooks.d.ts.map +1 -0
- package/dist/api/webhook/webhooks.js +165 -0
- package/dist/api/webhook/webhooks.js.map +1 -0
- package/dist/env-example.d.ts +11 -0
- package/dist/env-example.d.ts.map +1 -0
- package/dist/env-example.js +70 -0
- package/dist/env-example.js.map +1 -0
- package/dist/error.d.ts.map +1 -1
- package/dist/error.js +16 -9
- package/dist/error.js.map +1 -1
- package/dist/index.d.ts +20 -17
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +15 -12
- package/dist/index.js.map +1 -1
- package/dist/services/email.d.ts.map +1 -1
- package/dist/services/email.js +15 -15
- package/dist/services/email.js.map +1 -1
- package/dist/services/keyvalue.d.ts.map +1 -1
- package/dist/services/keyvalue.js +10 -10
- package/dist/services/keyvalue.js.map +1 -1
- package/dist/services/queue.d.ts.map +1 -1
- package/dist/services/queue.js +3 -3
- package/dist/services/queue.js.map +1 -1
- package/dist/services/schedule.d.ts.map +1 -1
- package/dist/services/schedule.js +8 -10
- package/dist/services/schedule.js.map +1 -1
- package/dist/services/stream.d.ts +3 -3
- package/dist/services/stream.d.ts.map +1 -1
- package/dist/services/stream.js +8 -13
- package/dist/services/stream.js.map +1 -1
- package/dist/services/vector.d.ts.map +1 -1
- package/dist/services/vector.js +9 -9
- package/dist/services/vector.js.map +1 -1
- package/dist/services/webhook.d.ts +2 -1
- package/dist/services/webhook.d.ts.map +1 -1
- package/dist/services/webhook.js +12 -14
- package/dist/services/webhook.js.map +1 -1
- package/package.json +2 -2
- package/src/api/api-example.md +164 -0
- package/src/api/api.ts +931 -0
- package/src/api/apikey/create.ts +41 -0
- package/src/api/apikey/delete.ts +30 -0
- package/src/api/apikey/get.ts +48 -0
- package/src/api/apikey/index.ts +5 -0
- package/src/api/apikey/list.ts +64 -0
- package/src/api/apikey/util.ts +3 -0
- package/src/api/config.ts +60 -0
- package/src/api/db/index.ts +27 -0
- package/src/api/db/logs.ts +75 -0
- package/src/api/db/query.ts +67 -0
- package/src/api/db/tables.ts +92 -0
- package/src/api/db/util.ts +9 -0
- package/src/api/env.ts +9 -0
- package/src/api/eval/get.ts +33 -0
- package/src/api/eval/index.ts +28 -0
- package/src/api/eval/list.ts +49 -0
- package/src/api/eval/run-get.ts +39 -0
- package/src/api/eval/run-list.ts +59 -0
- package/src/api/index.ts +20 -0
- package/src/api/logger.ts +24 -0
- package/src/api/machine/index.ts +2 -0
- package/src/api/machine/machine.ts +160 -0
- package/src/api/machine/util.ts +5 -0
- package/src/api/org/env-delete.ts +37 -0
- package/src/api/org/env-get.ts +43 -0
- package/src/api/org/env-update.ts +38 -0
- package/src/api/org/index.ts +6 -0
- package/src/api/org/list.ts +28 -0
- package/src/api/org/resources.ts +140 -0
- package/src/api/org/util.ts +4 -0
- package/src/api/project/agent.ts +86 -0
- package/src/api/project/create.ts +47 -0
- package/src/api/project/delete.ts +25 -0
- package/src/api/project/deploy.ts +458 -0
- package/src/api/project/deployment.ts +195 -0
- package/src/api/project/env-delete.ts +45 -0
- package/src/api/project/env-update.ts +55 -0
- package/src/api/project/exists.ts +58 -0
- package/src/api/project/get.ts +49 -0
- package/src/api/project/hostname.ts +73 -0
- package/src/api/project/index.ts +13 -0
- package/src/api/project/list.ts +54 -0
- package/src/api/project/malware.ts +68 -0
- package/src/api/project/update-region.ts +44 -0
- package/src/api/project/util.ts +8 -0
- package/src/api/queue/analytics.ts +311 -0
- package/src/api/queue/destinations.ts +259 -0
- package/src/api/queue/dlq.ts +243 -0
- package/src/api/queue/index.ts +308 -0
- package/src/api/queue/messages.ts +784 -0
- package/src/api/queue/queues.ts +460 -0
- package/src/api/queue/sources.ts +294 -0
- package/src/api/queue/types.ts +1325 -0
- package/src/api/queue/util.ts +275 -0
- package/src/api/queue/validation.ts +560 -0
- package/src/api/queue/websocket.ts +521 -0
- package/src/api/region/create.ts +207 -0
- package/src/api/region/delete.ts +57 -0
- package/src/api/region/index.ts +4 -0
- package/src/api/region/list.ts +32 -0
- package/src/api/region/resources.ts +69 -0
- package/src/api/region/util.ts +3 -0
- package/src/api/sandbox/cli-list.ts +127 -0
- package/src/api/sandbox/client.ts +460 -0
- package/src/api/sandbox/create.ts +256 -0
- package/src/api/sandbox/destroy.ts +41 -0
- package/src/api/sandbox/disk-checkpoint.ts +179 -0
- package/src/api/sandbox/execute.ts +132 -0
- package/src/api/sandbox/execution.ts +183 -0
- package/src/api/sandbox/files.ts +596 -0
- package/src/api/sandbox/get.ts +249 -0
- package/src/api/sandbox/getStatus.ts +54 -0
- package/src/api/sandbox/index.ts +211 -0
- package/src/api/sandbox/list.ts +224 -0
- package/src/api/sandbox/pause.ts +39 -0
- package/src/api/sandbox/resolve.ts +98 -0
- package/src/api/sandbox/resume.ts +39 -0
- package/src/api/sandbox/run.ts +439 -0
- package/src/api/sandbox/runtime.ts +104 -0
- package/src/api/sandbox/snapshot-build.ts +94 -0
- package/src/api/sandbox/snapshot.ts +781 -0
- package/src/api/sandbox/util.ts +275 -0
- package/src/api/services/index.ts +1 -0
- package/src/api/services/stats.ts +213 -0
- package/src/api/session/get.ts +106 -0
- package/src/api/session/index.ts +3 -0
- package/src/api/session/list.ts +136 -0
- package/src/api/session/logs.ts +47 -0
- package/src/api/session/util.ts +3 -0
- package/src/api/storage/config.ts +111 -0
- package/src/api/storage/index.ts +4 -0
- package/src/api/storage/objects.ts +250 -0
- package/src/api/storage/types.ts +174 -0
- package/src/api/storage/util.ts +4 -0
- package/src/api/stream/get.ts +51 -0
- package/src/api/stream/index.ts +3 -0
- package/src/api/stream/list.ts +127 -0
- package/src/api/stream/util.ts +3 -0
- package/src/api/thread/delete.ts +31 -0
- package/src/api/thread/get.ts +34 -0
- package/src/api/thread/index.ts +4 -0
- package/src/api/thread/list.ts +76 -0
- package/src/api/thread/util.ts +3 -0
- package/src/api/user/index.ts +1 -0
- package/src/api/user/util.ts +3 -0
- package/src/api/user/whoami.ts +32 -0
- package/src/api/webhook/deliveries.ts +129 -0
- package/src/api/webhook/destinations.ts +224 -0
- package/src/api/webhook/index.ts +133 -0
- package/src/api/webhook/receipts.ts +124 -0
- package/src/api/webhook/types.ts +309 -0
- package/src/api/webhook/util.ts +234 -0
- package/src/api/webhook/webhooks.ts +260 -0
- package/src/env-example.ts +90 -0
- package/src/error.ts +16 -9
- package/src/index.ts +209 -206
- package/src/services/email.ts +15 -24
- package/src/services/keyvalue.ts +10 -13
- package/src/services/queue.ts +3 -6
- package/src/services/schedule.ts +8 -19
- package/src/services/stream.ts +11 -17
- package/src/services/vector.ts +9 -12
- package/src/services/webhook.ts +14 -24
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/api/session/index.ts"],"names":[],"mappings":"AAAA,cAAc,UAAU,CAAC;AACzB,cAAc,WAAW,CAAC;AAC1B,cAAc,WAAW,CAAC"}
|
|
@@ -0,0 +1,143 @@
|
|
|
1
|
+
import type { SortDirection } from '../../services/pagination.ts';
|
|
2
|
+
import { z } from 'zod';
|
|
3
|
+
import { APIClient } from '../api.ts';
|
|
4
|
+
declare const SessionSchema: z.ZodObject<{
|
|
5
|
+
id: z.ZodString;
|
|
6
|
+
created_at: z.ZodString;
|
|
7
|
+
updated_at: z.ZodString;
|
|
8
|
+
deleted: z.ZodBoolean;
|
|
9
|
+
deleted_at: z.ZodNullable<z.ZodString>;
|
|
10
|
+
deleted_by: z.ZodNullable<z.ZodString>;
|
|
11
|
+
start_time: z.ZodString;
|
|
12
|
+
end_time: z.ZodNullable<z.ZodString>;
|
|
13
|
+
duration: z.ZodNullable<z.ZodNumber>;
|
|
14
|
+
org_id: z.ZodString;
|
|
15
|
+
project_id: z.ZodString;
|
|
16
|
+
deployment_id: z.ZodString;
|
|
17
|
+
agent_ids: z.ZodArray<z.ZodString>;
|
|
18
|
+
trigger: z.ZodString;
|
|
19
|
+
env: z.ZodString;
|
|
20
|
+
devmode: z.ZodBoolean;
|
|
21
|
+
pending: z.ZodBoolean;
|
|
22
|
+
success: z.ZodBoolean;
|
|
23
|
+
error: z.ZodNullable<z.ZodString>;
|
|
24
|
+
metadata: z.ZodOptional<z.ZodNullable<z.ZodRecord<z.ZodString, z.ZodUnknown>>>;
|
|
25
|
+
cpu_time: z.ZodNullable<z.ZodNumber>;
|
|
26
|
+
llm_cost: z.ZodNullable<z.ZodNumber>;
|
|
27
|
+
llm_prompt_token_count: z.ZodNullable<z.ZodNumber>;
|
|
28
|
+
llm_completion_token_count: z.ZodNullable<z.ZodNumber>;
|
|
29
|
+
total_cost: z.ZodNullable<z.ZodNumber>;
|
|
30
|
+
method: z.ZodNullable<z.ZodString>;
|
|
31
|
+
url: z.ZodNullable<z.ZodString>;
|
|
32
|
+
route_id: z.ZodNullable<z.ZodString>;
|
|
33
|
+
thread_id: z.ZodNullable<z.ZodString>;
|
|
34
|
+
timeline: z.ZodOptional<z.ZodNullable<z.ZodUnknown>>;
|
|
35
|
+
user_data: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
36
|
+
}, z.core.$strip>;
|
|
37
|
+
export { SessionSchema };
|
|
38
|
+
export declare const SessionListResponse: z.ZodArray<z.ZodObject<{
|
|
39
|
+
id: z.ZodString;
|
|
40
|
+
created_at: z.ZodString;
|
|
41
|
+
updated_at: z.ZodString;
|
|
42
|
+
deleted: z.ZodBoolean;
|
|
43
|
+
deleted_at: z.ZodNullable<z.ZodString>;
|
|
44
|
+
deleted_by: z.ZodNullable<z.ZodString>;
|
|
45
|
+
start_time: z.ZodString;
|
|
46
|
+
end_time: z.ZodNullable<z.ZodString>;
|
|
47
|
+
duration: z.ZodNullable<z.ZodNumber>;
|
|
48
|
+
org_id: z.ZodString;
|
|
49
|
+
project_id: z.ZodString;
|
|
50
|
+
deployment_id: z.ZodString;
|
|
51
|
+
agent_ids: z.ZodArray<z.ZodString>;
|
|
52
|
+
trigger: z.ZodString;
|
|
53
|
+
env: z.ZodString;
|
|
54
|
+
devmode: z.ZodBoolean;
|
|
55
|
+
pending: z.ZodBoolean;
|
|
56
|
+
success: z.ZodBoolean;
|
|
57
|
+
error: z.ZodNullable<z.ZodString>;
|
|
58
|
+
metadata: z.ZodOptional<z.ZodNullable<z.ZodRecord<z.ZodString, z.ZodUnknown>>>;
|
|
59
|
+
cpu_time: z.ZodNullable<z.ZodNumber>;
|
|
60
|
+
llm_cost: z.ZodNullable<z.ZodNumber>;
|
|
61
|
+
llm_prompt_token_count: z.ZodNullable<z.ZodNumber>;
|
|
62
|
+
llm_completion_token_count: z.ZodNullable<z.ZodNumber>;
|
|
63
|
+
total_cost: z.ZodNullable<z.ZodNumber>;
|
|
64
|
+
method: z.ZodNullable<z.ZodString>;
|
|
65
|
+
url: z.ZodNullable<z.ZodString>;
|
|
66
|
+
route_id: z.ZodNullable<z.ZodString>;
|
|
67
|
+
thread_id: z.ZodNullable<z.ZodString>;
|
|
68
|
+
timeline: z.ZodOptional<z.ZodNullable<z.ZodUnknown>>;
|
|
69
|
+
user_data: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
70
|
+
}, z.core.$strip>>;
|
|
71
|
+
export declare const SessionListResponseSchema: z.ZodDiscriminatedUnion<[z.ZodObject<{
|
|
72
|
+
success: z.ZodLiteral<false>;
|
|
73
|
+
message: z.ZodString;
|
|
74
|
+
code: z.ZodOptional<z.ZodString>;
|
|
75
|
+
}, z.core.$strip>, z.ZodObject<{
|
|
76
|
+
success: z.ZodLiteral<true>;
|
|
77
|
+
data: z.ZodArray<z.ZodObject<{
|
|
78
|
+
id: z.ZodString;
|
|
79
|
+
created_at: z.ZodString;
|
|
80
|
+
updated_at: z.ZodString;
|
|
81
|
+
deleted: z.ZodBoolean;
|
|
82
|
+
deleted_at: z.ZodNullable<z.ZodString>;
|
|
83
|
+
deleted_by: z.ZodNullable<z.ZodString>;
|
|
84
|
+
start_time: z.ZodString;
|
|
85
|
+
end_time: z.ZodNullable<z.ZodString>;
|
|
86
|
+
duration: z.ZodNullable<z.ZodNumber>;
|
|
87
|
+
org_id: z.ZodString;
|
|
88
|
+
project_id: z.ZodString;
|
|
89
|
+
deployment_id: z.ZodString;
|
|
90
|
+
agent_ids: z.ZodArray<z.ZodString>;
|
|
91
|
+
trigger: z.ZodString;
|
|
92
|
+
env: z.ZodString;
|
|
93
|
+
devmode: z.ZodBoolean;
|
|
94
|
+
pending: z.ZodBoolean;
|
|
95
|
+
success: z.ZodBoolean;
|
|
96
|
+
error: z.ZodNullable<z.ZodString>;
|
|
97
|
+
metadata: z.ZodOptional<z.ZodNullable<z.ZodRecord<z.ZodString, z.ZodUnknown>>>;
|
|
98
|
+
cpu_time: z.ZodNullable<z.ZodNumber>;
|
|
99
|
+
llm_cost: z.ZodNullable<z.ZodNumber>;
|
|
100
|
+
llm_prompt_token_count: z.ZodNullable<z.ZodNumber>;
|
|
101
|
+
llm_completion_token_count: z.ZodNullable<z.ZodNumber>;
|
|
102
|
+
total_cost: z.ZodNullable<z.ZodNumber>;
|
|
103
|
+
method: z.ZodNullable<z.ZodString>;
|
|
104
|
+
url: z.ZodNullable<z.ZodString>;
|
|
105
|
+
route_id: z.ZodNullable<z.ZodString>;
|
|
106
|
+
thread_id: z.ZodNullable<z.ZodString>;
|
|
107
|
+
timeline: z.ZodOptional<z.ZodNullable<z.ZodUnknown>>;
|
|
108
|
+
user_data: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
109
|
+
}, z.core.$strip>>;
|
|
110
|
+
}, z.core.$strip>], "success">;
|
|
111
|
+
export type SessionListResponse = z.infer<typeof SessionListResponseSchema>;
|
|
112
|
+
export type SessionList = z.infer<typeof SessionListResponse>;
|
|
113
|
+
export type Session = z.infer<typeof SessionSchema>;
|
|
114
|
+
export type SessionSortField = 'created' | 'updated' | 'duration' | 'startTime';
|
|
115
|
+
export interface SessionListOptions {
|
|
116
|
+
/** @deprecated Use `limit` instead. Will be removed in a future version. */
|
|
117
|
+
count?: number;
|
|
118
|
+
limit?: number;
|
|
119
|
+
offset?: number;
|
|
120
|
+
sort?: SessionSortField;
|
|
121
|
+
direction?: SortDirection;
|
|
122
|
+
orgId?: string;
|
|
123
|
+
projectId?: string;
|
|
124
|
+
deploymentId?: string;
|
|
125
|
+
trigger?: string;
|
|
126
|
+
env?: string;
|
|
127
|
+
devmode?: boolean;
|
|
128
|
+
success?: boolean;
|
|
129
|
+
threadId?: string;
|
|
130
|
+
agentIdentifier?: string;
|
|
131
|
+
startAfter?: string;
|
|
132
|
+
startBefore?: string;
|
|
133
|
+
metadata?: Record<string, unknown>;
|
|
134
|
+
}
|
|
135
|
+
/**
|
|
136
|
+
* List sessions
|
|
137
|
+
*
|
|
138
|
+
* @param client
|
|
139
|
+
* @param options filtering and pagination options
|
|
140
|
+
* @returns
|
|
141
|
+
*/
|
|
142
|
+
export declare function sessionList(client: APIClient, options?: SessionListOptions): Promise<SessionList>;
|
|
143
|
+
//# sourceMappingURL=list.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"list.d.ts","sourceRoot":"","sources":["../../../src/api/session/list.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,8BAA8B,CAAC;AAClE,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AACxB,OAAO,EAAE,SAAS,EAAqB,MAAM,WAAW,CAAC;AAGzD,QAAA,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AC,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,CAAC;CACnC;AAED;;;;;;GAMG;AACH,wBAAsB,WAAW,CAChC,MAAM,EAAE,SAAS,EACjB,OAAO,GAAE,kBAAuB,GAC9B,OAAO,CAAC,WAAW,CAAC,CAiDtB"}
|
|
@@ -0,0 +1,91 @@
|
|
|
1
|
+
import { z } from 'zod';
|
|
2
|
+
import { APIResponseSchema } from "../api.js";
|
|
3
|
+
import { SessionResponseError } from "./util.js";
|
|
4
|
+
const SessionSchema = z.object({
|
|
5
|
+
id: z.string().describe('the session id'),
|
|
6
|
+
created_at: z.string().describe('the creation timestamp'),
|
|
7
|
+
updated_at: z.string().describe('the last update timestamp'),
|
|
8
|
+
deleted: z.boolean().describe('whether the session is deleted'),
|
|
9
|
+
deleted_at: z.string().nullable().describe('the deletion timestamp'),
|
|
10
|
+
deleted_by: z.string().nullable().describe('who deleted the session'),
|
|
11
|
+
start_time: z.string().describe('the session start time'),
|
|
12
|
+
end_time: z.string().nullable().describe('the session end time'),
|
|
13
|
+
duration: z.number().nullable().describe('the session duration in nanoseconds'),
|
|
14
|
+
org_id: z.string().describe('the organization id'),
|
|
15
|
+
project_id: z.string().describe('the project id'),
|
|
16
|
+
deployment_id: z.string().describe('the deployment id'),
|
|
17
|
+
agent_ids: z.array(z.string()).describe('the agent ids involved'),
|
|
18
|
+
trigger: z.string().describe('how the session was triggered'),
|
|
19
|
+
env: z.string().describe('the environment'),
|
|
20
|
+
devmode: z.boolean().describe('whether dev mode was enabled'),
|
|
21
|
+
pending: z.boolean().describe('whether the session is pending'),
|
|
22
|
+
success: z.boolean().describe('whether the session succeeded'),
|
|
23
|
+
error: z.string().nullable().describe('the error message if failed'),
|
|
24
|
+
metadata: z
|
|
25
|
+
.record(z.string(), z.unknown())
|
|
26
|
+
.nullable()
|
|
27
|
+
.optional()
|
|
28
|
+
.describe('unencrypted key-value metadata'),
|
|
29
|
+
cpu_time: z.number().nullable().describe('the CPU time in nanoseconds'),
|
|
30
|
+
llm_cost: z.number().nullable().describe('the LLM cost'),
|
|
31
|
+
llm_prompt_token_count: z.number().nullable().describe('the LLM prompt token count'),
|
|
32
|
+
llm_completion_token_count: z.number().nullable().describe('the LLM completion token count'),
|
|
33
|
+
total_cost: z.number().nullable().describe('the total cost'),
|
|
34
|
+
method: z.string().nullable().describe('the HTTP method'),
|
|
35
|
+
url: z.string().nullable().describe('the request URL'),
|
|
36
|
+
route_id: z.string().nullable().describe('the route id'),
|
|
37
|
+
thread_id: z.string().nullable().describe('the thread id'),
|
|
38
|
+
timeline: z.unknown().nullable().optional().describe('the session timeline tree'),
|
|
39
|
+
user_data: z.string().nullable().optional().describe('the user data as JSON'),
|
|
40
|
+
});
|
|
41
|
+
export { SessionSchema };
|
|
42
|
+
export const SessionListResponse = z.array(SessionSchema);
|
|
43
|
+
export const SessionListResponseSchema = APIResponseSchema(SessionListResponse);
|
|
44
|
+
/**
|
|
45
|
+
* List sessions
|
|
46
|
+
*
|
|
47
|
+
* @param client
|
|
48
|
+
* @param options filtering and pagination options
|
|
49
|
+
* @returns
|
|
50
|
+
*/
|
|
51
|
+
export async function sessionList(client, options = {}) {
|
|
52
|
+
const { count, limit, offset, sort, direction, orgId, projectId, deploymentId, trigger, env, devmode, success, threadId, agentIdentifier, startAfter, startBefore, metadata, } = options;
|
|
53
|
+
const resolvedLimit = limit ?? count ?? 10;
|
|
54
|
+
const params = new URLSearchParams({ limit: resolvedLimit.toString() });
|
|
55
|
+
if (orgId)
|
|
56
|
+
params.set('orgId', orgId);
|
|
57
|
+
if (projectId)
|
|
58
|
+
params.set('projectId', projectId);
|
|
59
|
+
if (deploymentId)
|
|
60
|
+
params.set('deploymentId', deploymentId);
|
|
61
|
+
if (trigger)
|
|
62
|
+
params.set('trigger', trigger);
|
|
63
|
+
if (env)
|
|
64
|
+
params.set('env', env);
|
|
65
|
+
if (offset !== undefined)
|
|
66
|
+
params.set('offset', offset.toString());
|
|
67
|
+
if (sort)
|
|
68
|
+
params.set('sort', sort);
|
|
69
|
+
if (direction)
|
|
70
|
+
params.set('direction', direction);
|
|
71
|
+
if (devmode !== undefined)
|
|
72
|
+
params.set('devmode', devmode.toString());
|
|
73
|
+
if (success !== undefined)
|
|
74
|
+
params.set('success', success.toString());
|
|
75
|
+
if (threadId)
|
|
76
|
+
params.set('threadId', threadId);
|
|
77
|
+
if (agentIdentifier)
|
|
78
|
+
params.set('agentIdentifier', agentIdentifier);
|
|
79
|
+
if (startAfter)
|
|
80
|
+
params.set('startAfter', startAfter);
|
|
81
|
+
if (startBefore)
|
|
82
|
+
params.set('startBefore', startBefore);
|
|
83
|
+
if (metadata)
|
|
84
|
+
params.set('metadata', JSON.stringify(metadata));
|
|
85
|
+
const resp = await client.request('GET', `/session?${params.toString()}`, SessionListResponseSchema);
|
|
86
|
+
if (resp.success) {
|
|
87
|
+
return resp.data;
|
|
88
|
+
}
|
|
89
|
+
throw new SessionResponseError({ message: resp.message });
|
|
90
|
+
}
|
|
91
|
+
//# sourceMappingURL=list.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"list.js","sourceRoot":"","sources":["../../../src/api/session/list.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AACxB,OAAO,EAAa,iBAAiB,EAAE,MAAM,WAAW,CAAC;AACzD,OAAO,EAAE,oBAAoB,EAAE,MAAM,WAAW,CAAC;AAEjD,MAAM,aAAa,GAAG,CAAC,CAAC,MAAM,CAAC;IAC9B,EAAE,EAAE,CAAC,CAAC,MAAM,EAAE,CAAC,QAAQ,CAAC,gBAAgB,CAAC;IACzC,UAAU,EAAE,CAAC,CAAC,MAAM,EAAE,CAAC,QAAQ,CAAC,wBAAwB,CAAC;IACzD,UAAU,EAAE,CAAC,CAAC,MAAM,EAAE,CAAC,QAAQ,CAAC,2BAA2B,CAAC;IAC5D,OAAO,EAAE,CAAC,CAAC,OAAO,EAAE,CAAC,QAAQ,CAAC,gCAAgC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+
import { APIClient } from '../api.ts';
|
|
3
|
+
export declare const _SessionLogsRequestSchema: z.ZodObject<{
|
|
4
|
+
id: z.ZodString;
|
|
5
|
+
}, z.core.$strip>;
|
|
6
|
+
export declare const LogSchema: z.ZodObject<{
|
|
7
|
+
body: z.ZodString;
|
|
8
|
+
severity: z.ZodString;
|
|
9
|
+
timestamp: z.ZodString;
|
|
10
|
+
}, z.core.$strip>;
|
|
11
|
+
export declare const SessionLogsResponse: z.ZodArray<z.ZodObject<{
|
|
12
|
+
body: z.ZodString;
|
|
13
|
+
severity: z.ZodString;
|
|
14
|
+
timestamp: z.ZodString;
|
|
15
|
+
}, z.core.$strip>>;
|
|
16
|
+
export declare const SessionLogsResponseSchema: z.ZodDiscriminatedUnion<[z.ZodObject<{
|
|
17
|
+
success: z.ZodLiteral<false>;
|
|
18
|
+
message: z.ZodString;
|
|
19
|
+
code: z.ZodOptional<z.ZodString>;
|
|
20
|
+
}, z.core.$strip>, z.ZodObject<{
|
|
21
|
+
success: z.ZodLiteral<true>;
|
|
22
|
+
data: z.ZodArray<z.ZodObject<{
|
|
23
|
+
body: z.ZodString;
|
|
24
|
+
severity: z.ZodString;
|
|
25
|
+
timestamp: z.ZodString;
|
|
26
|
+
}, z.core.$strip>>;
|
|
27
|
+
}, z.core.$strip>], "success">;
|
|
28
|
+
type SessionLogsRequest = z.infer<typeof _SessionLogsRequestSchema>;
|
|
29
|
+
export type SessionLog = z.infer<typeof LogSchema>;
|
|
30
|
+
export type SessionLogs = SessionLog[];
|
|
31
|
+
/**
|
|
32
|
+
* Get logs for a session from the App API
|
|
33
|
+
*
|
|
34
|
+
* @param client APIClient configured for the App API base URL
|
|
35
|
+
* @param request
|
|
36
|
+
* @returns
|
|
37
|
+
*/
|
|
38
|
+
export declare function sessionLogs(client: APIClient, request: SessionLogsRequest): Promise<SessionLogs>;
|
|
39
|
+
export {};
|
|
40
|
+
//# sourceMappingURL=logs.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"logs.d.ts","sourceRoot":"","sources":["../../../src/api/session/logs.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AACxB,OAAO,EAAE,SAAS,EAAqB,MAAM,WAAW,CAAC;AAGzD,eAAO,MAAM,yBAAyB;;iBAEpC,CAAC;AAEH,eAAO,MAAM,SAAS;;;;iBAIpB,CAAC;AAEH,eAAO,MAAM,mBAAmB;;;;kBAAqB,CAAC;AAEtD,eAAO,MAAM,yBAAyB;;;;;;;;;;;8BAAyC,CAAC;AAEhF,KAAK,kBAAkB,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,yBAAyB,CAAC,CAAC;AAGpE,MAAM,MAAM,UAAU,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,SAAS,CAAC,CAAC;AACnD,MAAM,MAAM,WAAW,GAAG,UAAU,EAAE,CAAC;AAEvC;;;;;;GAMG;AACH,wBAAsB,WAAW,CAChC,MAAM,EAAE,SAAS,EACjB,OAAO,EAAE,kBAAkB,GACzB,OAAO,CAAC,WAAW,CAAC,CAYtB"}
|
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
import { z } from 'zod';
|
|
2
|
+
import { APIResponseSchema } from "../api.js";
|
|
3
|
+
import { SessionResponseError } from "./util.js";
|
|
4
|
+
export const _SessionLogsRequestSchema = z.object({
|
|
5
|
+
id: z.string().describe('the session id'),
|
|
6
|
+
});
|
|
7
|
+
export const LogSchema = z.object({
|
|
8
|
+
body: z.string().describe('the log body'),
|
|
9
|
+
severity: z.string().describe('the log severity'),
|
|
10
|
+
timestamp: z.string().describe('the log timestamp'),
|
|
11
|
+
});
|
|
12
|
+
export const SessionLogsResponse = z.array(LogSchema);
|
|
13
|
+
export const SessionLogsResponseSchema = APIResponseSchema(SessionLogsResponse);
|
|
14
|
+
/**
|
|
15
|
+
* Get logs for a session from the App API
|
|
16
|
+
*
|
|
17
|
+
* @param client APIClient configured for the App API base URL
|
|
18
|
+
* @param request
|
|
19
|
+
* @returns
|
|
20
|
+
*/
|
|
21
|
+
export async function sessionLogs(client, request) {
|
|
22
|
+
const resp = await client.request('GET', `/cli/session/${request.id}/logs`, SessionLogsResponseSchema);
|
|
23
|
+
if (resp.success) {
|
|
24
|
+
return resp.data;
|
|
25
|
+
}
|
|
26
|
+
throw new SessionResponseError({ message: resp.message });
|
|
27
|
+
}
|
|
28
|
+
//# sourceMappingURL=logs.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"logs.js","sourceRoot":"","sources":["../../../src/api/session/logs.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AACxB,OAAO,EAAa,iBAAiB,EAAE,MAAM,WAAW,CAAC;AACzD,OAAO,EAAE,oBAAoB,EAAE,MAAM,WAAW,CAAC;AAEjD,MAAM,CAAC,MAAM,yBAAyB,GAAG,CAAC,CAAC,MAAM,CAAC;IACjD,EAAE,EAAE,CAAC,CAAC,MAAM,EAAE,CAAC,QAAQ,CAAC,gBAAgB,CAAC;CACzC,CAAC,CAAC;AAEH,MAAM,CAAC,MAAM,SAAS,GAAG,CAAC,CAAC,MAAM,CAAC;IACjC,IAAI,EAAE,CAAC,CAAC,MAAM,EAAE,CAAC,QAAQ,CAAC,cAAc,CAAC;IACzC,QAAQ,EAAE,CAAC,CAAC,MAAM,EAAE,CAAC,QAAQ,CAAC,kBAAkB,CAAC;IACjD,SAAS,EAAE,CAAC,CAAC,MAAM,EAAE,CAAC,QAAQ,CAAC,mBAAmB,CAAC;CACnD,CAAC,CAAC;AAEH,MAAM,CAAC,MAAM,mBAAmB,GAAG,CAAC,CAAC,KAAK,CAAC,SAAS,CAAC,CAAC;AAEtD,MAAM,CAAC,MAAM,yBAAyB,GAAG,iBAAiB,CAAC,mBAAmB,CAAC,CAAC;AAQhF;;;;;;GAMG;AACH,MAAM,CAAC,KAAK,UAAU,WAAW,CAChC,MAAiB,EACjB,OAA2B;IAE3B,MAAM,IAAI,GAAG,MAAM,MAAM,CAAC,OAAO,CAChC,KAAK,EACL,gBAAgB,OAAO,CAAC,EAAE,OAAO,EACjC,yBAAyB,CACzB,CAAC;IAEF,IAAI,IAAI,CAAC,OAAO,EAAE,CAAC;QAClB,OAAO,IAAI,CAAC,IAAI,CAAC;IAClB,CAAC;IAED,MAAM,IAAI,oBAAoB,CAAC,EAAE,OAAO,EAAE,IAAI,CAAC,OAAO,EAAE,CAAC,CAAC;AAC3D,CAAC"}
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
export declare const SessionResponseError: {
|
|
2
|
+
new (args?: {
|
|
3
|
+
message?: string;
|
|
4
|
+
cause?: unknown;
|
|
5
|
+
} | undefined): import("../../error.ts").RichError & {
|
|
6
|
+
readonly _tag: "SessionResponseError";
|
|
7
|
+
} & Readonly<Record<string, never>>;
|
|
8
|
+
readonly defaultMessage?: string;
|
|
9
|
+
} & (<Shape extends {
|
|
10
|
+
[x: string]: any;
|
|
11
|
+
} = Record<string, never>>() => {
|
|
12
|
+
new (args?: (Shape extends Record<string, never> ? {
|
|
13
|
+
message?: string;
|
|
14
|
+
cause?: unknown;
|
|
15
|
+
} : Shape & {
|
|
16
|
+
message?: string;
|
|
17
|
+
cause?: unknown;
|
|
18
|
+
}) | undefined): import("../../error.ts").RichError & {
|
|
19
|
+
readonly _tag: "SessionResponseError";
|
|
20
|
+
} & Readonly<Shape>;
|
|
21
|
+
readonly defaultMessage?: string;
|
|
22
|
+
});
|
|
23
|
+
//# sourceMappingURL=util.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"util.d.ts","sourceRoot":"","sources":["../../../src/api/session/util.ts"],"names":[],"mappings":"AAEA,eAAO,MAAM,oBAAoB;;;;;;;;;;;;;;;;;;;;;EAA0C,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"util.js","sourceRoot":"","sources":["../../../src/api/session/util.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,eAAe,EAAE,MAAM,gBAAgB,CAAC;AAEjD,MAAM,CAAC,MAAM,oBAAoB,GAAG,eAAe,CAAC,sBAAsB,CAAC,CAAC"}
|
|
@@ -0,0 +1,99 @@
|
|
|
1
|
+
import { z } from 'zod';
|
|
2
|
+
import { type APIClient } from '../api.ts';
|
|
3
|
+
import { type BucketConfig, type BucketConfigUpdate } from './types.ts';
|
|
4
|
+
export declare const BucketConfigGetResponseSchema: z.ZodDiscriminatedUnion<[z.ZodObject<{
|
|
5
|
+
success: z.ZodLiteral<false>;
|
|
6
|
+
message: z.ZodString;
|
|
7
|
+
code: z.ZodOptional<z.ZodString>;
|
|
8
|
+
}, z.core.$strip>, z.ZodObject<{
|
|
9
|
+
success: z.ZodLiteral<true>;
|
|
10
|
+
data: z.ZodObject<{
|
|
11
|
+
bucket_name: z.ZodString;
|
|
12
|
+
storage_tier: z.ZodOptional<z.ZodNullable<z.ZodEnum<{
|
|
13
|
+
STANDARD: "STANDARD";
|
|
14
|
+
INFREQUENT_ACCESS: "INFREQUENT_ACCESS";
|
|
15
|
+
ARCHIVE: "ARCHIVE";
|
|
16
|
+
}>>>;
|
|
17
|
+
ttl: z.ZodOptional<z.ZodNullable<z.ZodNumber>>;
|
|
18
|
+
public: z.ZodOptional<z.ZodNullable<z.ZodBoolean>>;
|
|
19
|
+
cache_control: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
20
|
+
cors: z.ZodOptional<z.ZodNullable<z.ZodObject<{
|
|
21
|
+
allowed_origins: z.ZodOptional<z.ZodArray<z.ZodString>>;
|
|
22
|
+
allowed_methods: z.ZodOptional<z.ZodArray<z.ZodString>>;
|
|
23
|
+
allowed_headers: z.ZodOptional<z.ZodArray<z.ZodString>>;
|
|
24
|
+
expose_headers: z.ZodOptional<z.ZodArray<z.ZodString>>;
|
|
25
|
+
max_age_seconds: z.ZodOptional<z.ZodNullable<z.ZodNumber>>;
|
|
26
|
+
}, z.core.$strip>>>;
|
|
27
|
+
additional_headers: z.ZodOptional<z.ZodNullable<z.ZodRecord<z.ZodString, z.ZodString>>>;
|
|
28
|
+
bucket_location: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
29
|
+
}, z.core.$strip>;
|
|
30
|
+
}, z.core.$strip>], "success">;
|
|
31
|
+
export declare const BucketConfigUpdateResponseSchema: z.ZodDiscriminatedUnion<[z.ZodObject<{
|
|
32
|
+
success: z.ZodLiteral<false>;
|
|
33
|
+
message: z.ZodString;
|
|
34
|
+
code: z.ZodOptional<z.ZodString>;
|
|
35
|
+
}, z.core.$strip>, z.ZodObject<{
|
|
36
|
+
success: z.ZodLiteral<true>;
|
|
37
|
+
data: z.ZodObject<{
|
|
38
|
+
bucket_name: z.ZodString;
|
|
39
|
+
storage_tier: z.ZodOptional<z.ZodNullable<z.ZodEnum<{
|
|
40
|
+
STANDARD: "STANDARD";
|
|
41
|
+
INFREQUENT_ACCESS: "INFREQUENT_ACCESS";
|
|
42
|
+
ARCHIVE: "ARCHIVE";
|
|
43
|
+
}>>>;
|
|
44
|
+
ttl: z.ZodOptional<z.ZodNullable<z.ZodNumber>>;
|
|
45
|
+
public: z.ZodOptional<z.ZodNullable<z.ZodBoolean>>;
|
|
46
|
+
cache_control: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
47
|
+
cors: z.ZodOptional<z.ZodNullable<z.ZodObject<{
|
|
48
|
+
allowed_origins: z.ZodOptional<z.ZodArray<z.ZodString>>;
|
|
49
|
+
allowed_methods: z.ZodOptional<z.ZodArray<z.ZodString>>;
|
|
50
|
+
allowed_headers: z.ZodOptional<z.ZodArray<z.ZodString>>;
|
|
51
|
+
expose_headers: z.ZodOptional<z.ZodArray<z.ZodString>>;
|
|
52
|
+
max_age_seconds: z.ZodOptional<z.ZodNullable<z.ZodNumber>>;
|
|
53
|
+
}, z.core.$strip>>>;
|
|
54
|
+
additional_headers: z.ZodOptional<z.ZodNullable<z.ZodRecord<z.ZodString, z.ZodString>>>;
|
|
55
|
+
bucket_location: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
56
|
+
}, z.core.$strip>;
|
|
57
|
+
}, z.core.$strip>], "success">;
|
|
58
|
+
export declare const BucketConfigDeleteResponseSchema: z.ZodDiscriminatedUnion<[z.ZodObject<{
|
|
59
|
+
success: z.ZodLiteral<false>;
|
|
60
|
+
message: z.ZodString;
|
|
61
|
+
code: z.ZodOptional<z.ZodString>;
|
|
62
|
+
}, z.core.$strip>, z.ZodObject<{
|
|
63
|
+
success: z.ZodLiteral<true>;
|
|
64
|
+
}, z.core.$strip>], "success">;
|
|
65
|
+
/**
|
|
66
|
+
* Get the configuration for a bucket.
|
|
67
|
+
* Returns the current config with null for any fields using system defaults.
|
|
68
|
+
*
|
|
69
|
+
* @param client - The API client to use for the request
|
|
70
|
+
* @param bucketName - Name of the bucket to get config for
|
|
71
|
+
* @param extraHeaders - Optional extra headers (e.g. x-agentuity-orgid for CLI auth)
|
|
72
|
+
* @returns The bucket configuration
|
|
73
|
+
* @throws {BucketConfigResponseError} If the request fails
|
|
74
|
+
*/
|
|
75
|
+
export declare function getBucketConfig(client: APIClient, bucketName: string, extraHeaders?: Record<string, string>): Promise<BucketConfig>;
|
|
76
|
+
/**
|
|
77
|
+
* Update (upsert) bucket configuration.
|
|
78
|
+
* Partial update: only fields present in the request are changed.
|
|
79
|
+
* Send null for a field to reset it to system default.
|
|
80
|
+
* Omit a field to leave it unchanged.
|
|
81
|
+
*
|
|
82
|
+
* @param client - The API client to use for the request
|
|
83
|
+
* @param bucketName - Name of the bucket to update config for
|
|
84
|
+
* @param config - Partial config update (fields to set, null to unset, omit to leave)
|
|
85
|
+
* @param extraHeaders - Optional extra headers (e.g. x-agentuity-orgid for CLI auth)
|
|
86
|
+
* @returns The updated bucket configuration
|
|
87
|
+
* @throws {BucketConfigResponseError} If the request fails
|
|
88
|
+
*/
|
|
89
|
+
export declare function updateBucketConfig(client: APIClient, bucketName: string, config: BucketConfigUpdate, extraHeaders?: Record<string, string>): Promise<BucketConfig>;
|
|
90
|
+
/**
|
|
91
|
+
* Delete all custom configuration for a bucket (reset to system defaults).
|
|
92
|
+
*
|
|
93
|
+
* @param client - The API client to use for the request
|
|
94
|
+
* @param bucketName - Name of the bucket to reset config for
|
|
95
|
+
* @param extraHeaders - Optional extra headers (e.g. x-agentuity-orgid for CLI auth)
|
|
96
|
+
* @throws {BucketConfigResponseError} If the request fails
|
|
97
|
+
*/
|
|
98
|
+
export declare function deleteBucketConfig(client: APIClient, bucketName: string, extraHeaders?: Record<string, string>): Promise<void>;
|
|
99
|
+
//# sourceMappingURL=config.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"config.d.ts","sourceRoot":"","sources":["../../../src/api/storage/config.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AACxB,OAAO,EAAE,KAAK,SAAS,EAA8C,MAAM,WAAW,CAAC;AACvF,OAAO,EAGN,KAAK,YAAY,EACjB,KAAK,kBAAkB,EACvB,MAAM,YAAY,CAAC;AAGpB,eAAO,MAAM,6BAA6B;;;;;;;;;;;;;;;;;;;;;;;;;;8BAAwC,CAAC;AACnF,eAAO,MAAM,gCAAgC;;;;;;;;;;;;;;;;;;;;;;;;;;8BAAwC,CAAC;AACtF,eAAO,MAAM,gCAAgC;;;;;;8BAA4B,CAAC;AAE1E;;;;;;;;;GASG;AACH,wBAAsB,eAAe,CACpC,MAAM,EAAE,SAAS,EACjB,UAAU,EAAE,MAAM,EAClB,YAAY,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,GACnC,OAAO,CAAC,YAAY,CAAC,CAevB;AAED;;;;;;;;;;;;GAYG;AACH,wBAAsB,kBAAkB,CACvC,MAAM,EAAE,SAAS,EACjB,UAAU,EAAE,MAAM,EAClB,MAAM,EAAE,kBAAkB,EAC1B,YAAY,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,GACnC,OAAO,CAAC,YAAY,CAAC,CAoBvB;AAED;;;;;;;GAOG;AACH,wBAAsB,kBAAkB,CACvC,MAAM,EAAE,SAAS,EACjB,UAAU,EAAE,MAAM,EAClB,YAAY,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,GACnC,OAAO,CAAC,IAAI,CAAC,CAaf"}
|
|
@@ -0,0 +1,61 @@
|
|
|
1
|
+
import { APIResponseSchema, APIResponseSchemaNoData } from "../api.js";
|
|
2
|
+
import { BucketConfigSchema, BucketConfigUpdateSchema, } from "./types.js";
|
|
3
|
+
import { BucketConfigResponseError } from "./util.js";
|
|
4
|
+
export const BucketConfigGetResponseSchema = APIResponseSchema(BucketConfigSchema);
|
|
5
|
+
export const BucketConfigUpdateResponseSchema = APIResponseSchema(BucketConfigSchema);
|
|
6
|
+
export const BucketConfigDeleteResponseSchema = APIResponseSchemaNoData();
|
|
7
|
+
/**
|
|
8
|
+
* Get the configuration for a bucket.
|
|
9
|
+
* Returns the current config with null for any fields using system defaults.
|
|
10
|
+
*
|
|
11
|
+
* @param client - The API client to use for the request
|
|
12
|
+
* @param bucketName - Name of the bucket to get config for
|
|
13
|
+
* @param extraHeaders - Optional extra headers (e.g. x-agentuity-orgid for CLI auth)
|
|
14
|
+
* @returns The bucket configuration
|
|
15
|
+
* @throws {BucketConfigResponseError} If the request fails
|
|
16
|
+
*/
|
|
17
|
+
export async function getBucketConfig(client, bucketName, extraHeaders) {
|
|
18
|
+
const url = `/bucket/config/${encodeURIComponent(bucketName)}`;
|
|
19
|
+
const resp = await client.get(url, BucketConfigGetResponseSchema, undefined, extraHeaders);
|
|
20
|
+
if (resp.success) {
|
|
21
|
+
return resp.data;
|
|
22
|
+
}
|
|
23
|
+
throw new BucketConfigResponseError({ message: resp.message });
|
|
24
|
+
}
|
|
25
|
+
/**
|
|
26
|
+
* Update (upsert) bucket configuration.
|
|
27
|
+
* Partial update: only fields present in the request are changed.
|
|
28
|
+
* Send null for a field to reset it to system default.
|
|
29
|
+
* Omit a field to leave it unchanged.
|
|
30
|
+
*
|
|
31
|
+
* @param client - The API client to use for the request
|
|
32
|
+
* @param bucketName - Name of the bucket to update config for
|
|
33
|
+
* @param config - Partial config update (fields to set, null to unset, omit to leave)
|
|
34
|
+
* @param extraHeaders - Optional extra headers (e.g. x-agentuity-orgid for CLI auth)
|
|
35
|
+
* @returns The updated bucket configuration
|
|
36
|
+
* @throws {BucketConfigResponseError} If the request fails
|
|
37
|
+
*/
|
|
38
|
+
export async function updateBucketConfig(client, bucketName, config, extraHeaders) {
|
|
39
|
+
const url = `/bucket/config/${encodeURIComponent(bucketName)}`;
|
|
40
|
+
const resp = await client.put(url, config, BucketConfigUpdateResponseSchema, BucketConfigUpdateSchema, undefined, extraHeaders);
|
|
41
|
+
if (resp.success) {
|
|
42
|
+
return resp.data;
|
|
43
|
+
}
|
|
44
|
+
throw new BucketConfigResponseError({ message: resp.message });
|
|
45
|
+
}
|
|
46
|
+
/**
|
|
47
|
+
* Delete all custom configuration for a bucket (reset to system defaults).
|
|
48
|
+
*
|
|
49
|
+
* @param client - The API client to use for the request
|
|
50
|
+
* @param bucketName - Name of the bucket to reset config for
|
|
51
|
+
* @param extraHeaders - Optional extra headers (e.g. x-agentuity-orgid for CLI auth)
|
|
52
|
+
* @throws {BucketConfigResponseError} If the request fails
|
|
53
|
+
*/
|
|
54
|
+
export async function deleteBucketConfig(client, bucketName, extraHeaders) {
|
|
55
|
+
const url = `/bucket/config/${encodeURIComponent(bucketName)}`;
|
|
56
|
+
const resp = await client.delete(url, BucketConfigDeleteResponseSchema, undefined, extraHeaders);
|
|
57
|
+
if (!resp.success) {
|
|
58
|
+
throw new BucketConfigResponseError({ message: resp.message });
|
|
59
|
+
}
|
|
60
|
+
}
|
|
61
|
+
//# sourceMappingURL=config.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"config.js","sourceRoot":"","sources":["../../../src/api/storage/config.ts"],"names":[],"mappings":"AACA,OAAO,EAAkB,iBAA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IAClB,CAAC;IAED,MAAM,IAAI,yBAAyB,CAAC,EAAE,OAAO,EAAE,IAAI,CAAC,OAAO,EAAE,CAAC,CAAC;AAChE,CAAC;AAED;;;;;;;GAOG;AACH,MAAM,CAAC,KAAK,UAAU,kBAAkB,CACvC,MAAiB,EACjB,UAAkB,EAClB,YAAqC;IAErC,MAAM,GAAG,GAAG,kBAAkB,kBAAkB,CAAC,UAAU,CAAC,EAAE,CAAC;IAE/D,MAAM,IAAI,GAAG,MAAM,MAAM,CAAC,MAAM,CAC/B,GAAG,EACH,gCAAgC,EAChC,SAAS,EACT,YAAY,CACZ,CAAC;IAEF,IAAI,CAAC,IAAI,CAAC,OAAO,EAAE,CAAC;QACnB,MAAM,IAAI,yBAAyB,CAAC,EAAE,OAAO,EAAE,IAAI,CAAC,OAAO,EAAE,CAAC,CAAC;IAChE,CAAC;AACF,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/api/storage/index.ts"],"names":[],"mappings":"AAAA,cAAc,aAAa,CAAC;AAC5B,cAAc,cAAc,CAAC;AAC7B,cAAc,YAAY,CAAC;AAC3B,OAAO,EAAE,yBAAyB,EAAE,2BAA2B,EAAE,MAAM,WAAW,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/api/storage/index.ts"],"names":[],"mappings":"AAAA,cAAc,aAAa,CAAC;AAC5B,cAAc,cAAc,CAAC;AAC7B,cAAc,YAAY,CAAC;AAC3B,OAAO,EAAE,yBAAyB,EAAE,2BAA2B,EAAE,MAAM,WAAW,CAAC"}
|