@agentuity/server 1.0.32 → 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 +1 -227
- package/dist/api/api.d.ts.map +1 -1
- package/dist/api/api.js +1 -637
- package/dist/api/api.js.map +1 -1
- package/dist/api/index.d.ts +1 -17
- package/dist/api/index.d.ts.map +1 -1
- package/dist/api/index.js +1 -17
- package/dist/api/index.js.map +1 -1
- package/dist/api/org/env-delete.d.ts +1 -22
- package/dist/api/org/env-delete.d.ts.map +1 -1
- package/dist/api/org/env-delete.js +1 -24
- package/dist/api/org/env-delete.js.map +1 -1
- package/dist/api/org/env-get.d.ts +1 -32
- package/dist/api/org/env-get.d.ts.map +1 -1
- package/dist/api/org/env-get.js +1 -25
- package/dist/api/org/env-get.js.map +1 -1
- package/dist/api/org/env-update.d.ts +1 -23
- package/dist/api/org/env-update.d.ts.map +1 -1
- package/dist/api/org/env-update.js +1 -25
- package/dist/api/org/env-update.js.map +1 -1
- package/dist/api/project/get.d.ts +1 -42
- package/dist/api/project/get.d.ts.map +1 -1
- package/dist/api/project/get.js +1 -35
- package/dist/api/project/get.js.map +1 -1
- package/dist/api/project/list.d.ts +1 -47
- package/dist/api/project/list.d.ts.map +1 -1
- package/dist/api/project/list.js +1 -37
- package/dist/api/project/list.js.map +1 -1
- package/dist/api/project/malware.d.ts +1 -70
- package/dist/api/project/malware.d.ts.map +1 -1
- package/dist/api/project/malware.js +1 -41
- package/dist/api/project/malware.js.map +1 -1
- package/dist/api/region/create.d.ts +1 -80
- package/dist/api/region/create.d.ts.map +1 -1
- package/dist/api/region/create.js +1 -176
- package/dist/api/region/create.js.map +1 -1
- package/dist/api/sandbox/client.d.ts +1 -190
- package/dist/api/sandbox/client.d.ts.map +1 -1
- package/dist/api/sandbox/client.js +1 -260
- package/dist/api/sandbox/client.js.map +1 -1
- package/dist/api/sandbox/pause.d.ts +1 -21
- package/dist/api/sandbox/pause.d.ts.map +1 -1
- package/dist/api/sandbox/pause.js +1 -24
- package/dist/api/sandbox/pause.js.map +1 -1
- package/dist/api/sandbox/resume.d.ts +1 -21
- package/dist/api/sandbox/resume.d.ts.map +1 -1
- package/dist/api/sandbox/resume.js +1 -24
- package/dist/api/sandbox/resume.js.map +1 -1
- package/dist/api/sandbox/util.d.ts +1 -284
- package/dist/api/sandbox/util.d.ts.map +1 -1
- package/dist/api/sandbox/util.js +1 -210
- package/dist/api/sandbox/util.js.map +1 -1
- package/dist/api/user/whoami.d.ts +1 -38
- package/dist/api/user/whoami.d.ts.map +1 -1
- package/dist/api/user/whoami.js +1 -26
- package/dist/api/user/whoami.js.map +1 -1
- package/dist/index.d.ts +1 -4
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +3 -12
- package/dist/index.js.map +1 -1
- package/package.json +4 -4
- package/src/api/api.ts +1 -936
- package/src/api/index.ts +1 -17
- package/src/api/org/env-delete.ts +1 -37
- package/src/api/org/env-get.ts +1 -43
- package/src/api/org/env-update.ts +1 -38
- package/src/api/project/get.ts +1 -49
- package/src/api/project/list.ts +1 -54
- package/src/api/project/malware.ts +1 -68
- package/src/api/region/create.ts +1 -207
- package/src/api/sandbox/client.ts +1 -460
- package/src/api/sandbox/pause.ts +1 -39
- package/src/api/sandbox/resume.ts +1 -39
- package/src/api/sandbox/util.ts +1 -276
- package/src/api/user/whoami.ts +1 -32
- package/src/index.ts +3 -30
- package/dist/api/apikey/create.d.ts +0 -33
- package/dist/api/apikey/create.d.ts.map +0 -1
- package/dist/api/apikey/create.js +0 -23
- package/dist/api/apikey/create.js.map +0 -1
- package/dist/api/apikey/delete.d.ts +0 -19
- package/dist/api/apikey/delete.d.ts.map +0 -1
- package/dist/api/apikey/delete.js +0 -19
- package/dist/api/apikey/delete.js.map +0 -1
- package/dist/api/apikey/get.d.ts +0 -45
- package/dist/api/apikey/get.d.ts.map +0 -1
- package/dist/api/apikey/get.js +0 -36
- package/dist/api/apikey/get.js.map +0 -1
- package/dist/api/apikey/index.d.ts +0 -6
- package/dist/api/apikey/index.d.ts.map +0 -1
- package/dist/api/apikey/index.js +0 -6
- package/dist/api/apikey/index.js.map +0 -1
- package/dist/api/apikey/list.d.ts +0 -64
- package/dist/api/apikey/list.d.ts.map +0 -1
- package/dist/api/apikey/list.js +0 -46
- package/dist/api/apikey/list.js.map +0 -1
- package/dist/api/apikey/util.d.ts +0 -23
- package/dist/api/apikey/util.d.ts.map +0 -1
- package/dist/api/apikey/util.js +0 -3
- package/dist/api/apikey/util.js.map +0 -1
- package/dist/api/db/index.d.ts +0 -5
- package/dist/api/db/index.d.ts.map +0 -1
- package/dist/api/db/index.js +0 -5
- package/dist/api/db/index.js.map +0 -1
- package/dist/api/db/logs.d.ts +0 -70
- package/dist/api/db/logs.d.ts.map +0 -1
- package/dist/api/db/logs.js +0 -59
- package/dist/api/db/logs.js.map +0 -1
- package/dist/api/db/query.d.ts +0 -39
- package/dist/api/db/query.d.ts.map +0 -1
- package/dist/api/db/query.js +0 -49
- package/dist/api/db/query.js.map +0 -1
- package/dist/api/db/tables.d.ts +0 -49
- package/dist/api/db/tables.d.ts.map +0 -1
- package/dist/api/db/tables.js +0 -59
- package/dist/api/db/tables.js.map +0 -1
- package/dist/api/db/util.d.ts +0 -31
- package/dist/api/db/util.d.ts.map +0 -1
- package/dist/api/db/util.js +0 -4
- package/dist/api/db/util.js.map +0 -1
- package/dist/api/eval/get.d.ts +0 -36
- package/dist/api/eval/get.d.ts.map +0 -1
- package/dist/api/eval/get.js +0 -23
- package/dist/api/eval/get.js.map +0 -1
- package/dist/api/eval/index.d.ts +0 -5
- package/dist/api/eval/index.d.ts.map +0 -1
- package/dist/api/eval/index.js +0 -5
- package/dist/api/eval/index.js.map +0 -1
- package/dist/api/eval/list.d.ts +0 -50
- package/dist/api/eval/list.d.ts.map +0 -1
- package/dist/api/eval/list.js +0 -32
- package/dist/api/eval/list.js.map +0 -1
- package/dist/api/eval/run-get.d.ts +0 -48
- package/dist/api/eval/run-get.d.ts.map +0 -1
- package/dist/api/eval/run-get.js +0 -29
- package/dist/api/eval/run-get.js.map +0 -1
- package/dist/api/eval/run-list.d.ts +0 -70
- package/dist/api/eval/run-list.d.ts.map +0 -1
- package/dist/api/eval/run-list.js +0 -42
- package/dist/api/eval/run-list.js.map +0 -1
- package/dist/api/machine/index.d.ts +0 -3
- package/dist/api/machine/index.d.ts.map +0 -1
- package/dist/api/machine/index.js +0 -3
- package/dist/api/machine/index.js.map +0 -1
- package/dist/api/machine/machine.d.ts +0 -192
- package/dist/api/machine/machine.d.ts.map +0 -1
- package/dist/api/machine/machine.js +0 -109
- package/dist/api/machine/machine.js.map +0 -1
- package/dist/api/machine/util.d.ts +0 -14
- package/dist/api/machine/util.d.ts.map +0 -1
- package/dist/api/machine/util.js +0 -3
- package/dist/api/machine/util.js.map +0 -1
- package/dist/api/org/index.d.ts +0 -7
- package/dist/api/org/index.d.ts.map +0 -1
- package/dist/api/org/index.js +0 -7
- package/dist/api/org/index.js.map +0 -1
- package/dist/api/org/list.d.ts +0 -27
- package/dist/api/org/list.d.ts.map +0 -1
- package/dist/api/org/list.js +0 -22
- package/dist/api/org/list.js.map +0 -1
- package/dist/api/org/resources.d.ts +0 -141
- package/dist/api/org/resources.d.ts.map +0 -1
- package/dist/api/org/resources.js +0 -97
- package/dist/api/org/resources.js.map +0 -1
- package/dist/api/org/util.d.ts +0 -45
- package/dist/api/org/util.d.ts.map +0 -1
- package/dist/api/org/util.js +0 -4
- package/dist/api/org/util.js.map +0 -1
- package/dist/api/project/agent.d.ts +0 -89
- package/dist/api/project/agent.d.ts.map +0 -1
- package/dist/api/project/agent.js +0 -60
- package/dist/api/project/agent.js.map +0 -1
- package/dist/api/project/create.d.ts +0 -37
- package/dist/api/project/create.d.ts.map +0 -1
- package/dist/api/project/create.js +0 -31
- package/dist/api/project/create.js.map +0 -1
- package/dist/api/project/delete.d.ts +0 -15
- package/dist/api/project/delete.d.ts.map +0 -1
- package/dist/api/project/delete.js +0 -13
- package/dist/api/project/delete.js.map +0 -1
- package/dist/api/project/deploy.d.ts +0 -490
- package/dist/api/project/deploy.d.ts.map +0 -1
- package/dist/api/project/deploy.js +0 -313
- package/dist/api/project/deploy.js.map +0 -1
- package/dist/api/project/deployment.d.ts +0 -237
- package/dist/api/project/deployment.d.ts.map +0 -1
- package/dist/api/project/deployment.js +0 -127
- package/dist/api/project/deployment.js.map +0 -1
- package/dist/api/project/env-delete.d.ts +0 -22
- package/dist/api/project/env-delete.d.ts.map +0 -1
- package/dist/api/project/env-delete.js +0 -29
- package/dist/api/project/env-delete.js.map +0 -1
- package/dist/api/project/env-update.d.ts +0 -31
- package/dist/api/project/env-update.d.ts.map +0 -1
- package/dist/api/project/env-update.js +0 -36
- package/dist/api/project/env-update.js.map +0 -1
- package/dist/api/project/exists.d.ts +0 -25
- package/dist/api/project/exists.d.ts.map +0 -1
- package/dist/api/project/exists.js +0 -45
- package/dist/api/project/exists.js.map +0 -1
- package/dist/api/project/hostname.d.ts +0 -25
- package/dist/api/project/hostname.d.ts.map +0 -1
- package/dist/api/project/hostname.js +0 -37
- package/dist/api/project/hostname.js.map +0 -1
- package/dist/api/project/index.d.ts +0 -14
- package/dist/api/project/index.d.ts.map +0 -1
- package/dist/api/project/index.js +0 -14
- package/dist/api/project/index.js.map +0 -1
- package/dist/api/project/update-region.d.ts +0 -27
- package/dist/api/project/update-region.d.ts.map +0 -1
- package/dist/api/project/update-region.js +0 -25
- package/dist/api/project/update-region.js.map +0 -1
- package/dist/api/project/util.d.ts +0 -62
- package/dist/api/project/util.d.ts.map +0 -1
- package/dist/api/project/util.js +0 -6
- package/dist/api/project/util.js.map +0 -1
- package/dist/api/queue/analytics.d.ts +0 -250
- package/dist/api/queue/analytics.d.ts.map +0 -1
- package/dist/api/queue/analytics.js +0 -233
- package/dist/api/queue/analytics.js.map +0 -1
- package/dist/api/queue/destinations.d.ts +0 -202
- package/dist/api/queue/destinations.d.ts.map +0 -1
- package/dist/api/queue/destinations.js +0 -168
- package/dist/api/queue/destinations.js.map +0 -1
- package/dist/api/queue/dlq.d.ts +0 -168
- package/dist/api/queue/dlq.d.ts.map +0 -1
- package/dist/api/queue/dlq.js +0 -166
- package/dist/api/queue/dlq.js.map +0 -1
- package/dist/api/queue/index.d.ts +0 -56
- package/dist/api/queue/index.d.ts.map +0 -1
- package/dist/api/queue/index.js +0 -90
- package/dist/api/queue/index.js.map +0 -1
- package/dist/api/queue/messages.d.ts +0 -503
- package/dist/api/queue/messages.d.ts.map +0 -1
- package/dist/api/queue/messages.js +0 -549
- package/dist/api/queue/messages.js.map +0 -1
- package/dist/api/queue/queues.d.ts +0 -226
- package/dist/api/queue/queues.d.ts.map +0 -1
- package/dist/api/queue/queues.js +0 -321
- package/dist/api/queue/queues.js.map +0 -1
- package/dist/api/queue/sources.d.ts +0 -202
- package/dist/api/queue/sources.d.ts.map +0 -1
- package/dist/api/queue/sources.js +0 -202
- package/dist/api/queue/sources.js.map +0 -1
- package/dist/api/queue/types.d.ts +0 -1218
- package/dist/api/queue/types.d.ts.map +0 -1
- package/dist/api/queue/types.js +0 -1002
- package/dist/api/queue/types.js.map +0 -1
- package/dist/api/queue/util.d.ts +0 -278
- package/dist/api/queue/util.d.ts.map +0 -1
- package/dist/api/queue/util.js +0 -235
- package/dist/api/queue/util.js.map +0 -1
- package/dist/api/queue/validation.d.ts +0 -247
- package/dist/api/queue/validation.d.ts.map +0 -1
- package/dist/api/queue/validation.js +0 -513
- package/dist/api/queue/validation.js.map +0 -1
- package/dist/api/queue/websocket.d.ts +0 -168
- package/dist/api/queue/websocket.d.ts.map +0 -1
- package/dist/api/queue/websocket.js +0 -394
- package/dist/api/queue/websocket.js.map +0 -1
- package/dist/api/region/delete.d.ts +0 -62
- package/dist/api/region/delete.d.ts.map +0 -1
- package/dist/api/region/delete.js +0 -37
- package/dist/api/region/delete.js.map +0 -1
- package/dist/api/region/index.d.ts +0 -5
- package/dist/api/region/index.d.ts.map +0 -1
- package/dist/api/region/index.js +0 -5
- package/dist/api/region/index.js.map +0 -1
- package/dist/api/region/list.d.ts +0 -27
- package/dist/api/region/list.d.ts.map +0 -1
- package/dist/api/region/list.js +0 -22
- package/dist/api/region/list.js.map +0 -1
- package/dist/api/region/resources.d.ts +0 -71
- package/dist/api/region/resources.d.ts.map +0 -1
- package/dist/api/region/resources.js +0 -53
- package/dist/api/region/resources.js.map +0 -1
- package/dist/api/region/util.d.ts +0 -23
- package/dist/api/region/util.d.ts.map +0 -1
- package/dist/api/region/util.js +0 -3
- package/dist/api/region/util.js.map +0 -1
- package/dist/api/sandbox/cli-list.d.ts +0 -114
- package/dist/api/sandbox/cli-list.d.ts.map +0 -1
- package/dist/api/sandbox/cli-list.js +0 -71
- package/dist/api/sandbox/cli-list.js.map +0 -1
- package/dist/api/sandbox/create.d.ts +0 -118
- package/dist/api/sandbox/create.d.ts.map +0 -1
- package/dist/api/sandbox/create.js +0 -211
- package/dist/api/sandbox/create.js.map +0 -1
- package/dist/api/sandbox/destroy.d.ts +0 -22
- package/dist/api/sandbox/destroy.d.ts.map +0 -1
- package/dist/api/sandbox/destroy.js +0 -25
- package/dist/api/sandbox/destroy.js.map +0 -1
- package/dist/api/sandbox/disk-checkpoint.d.ts +0 -104
- package/dist/api/sandbox/disk-checkpoint.d.ts.map +0 -1
- package/dist/api/sandbox/disk-checkpoint.js +0 -104
- package/dist/api/sandbox/disk-checkpoint.js.map +0 -1
- package/dist/api/sandbox/execute.d.ts +0 -69
- package/dist/api/sandbox/execute.d.ts.map +0 -1
- package/dist/api/sandbox/execute.js +0 -103
- package/dist/api/sandbox/execute.js.map +0 -1
- package/dist/api/sandbox/execution.d.ts +0 -169
- package/dist/api/sandbox/execution.d.ts.map +0 -1
- package/dist/api/sandbox/execution.js +0 -118
- package/dist/api/sandbox/execution.js.map +0 -1
- package/dist/api/sandbox/files.d.ts +0 -261
- package/dist/api/sandbox/files.d.ts.map +0 -1
- package/dist/api/sandbox/files.js +0 -386
- package/dist/api/sandbox/files.js.map +0 -1
- package/dist/api/sandbox/get.d.ts +0 -283
- package/dist/api/sandbox/get.d.ts.map +0 -1
- package/dist/api/sandbox/get.js +0 -215
- package/dist/api/sandbox/get.js.map +0 -1
- package/dist/api/sandbox/getStatus.d.ts +0 -16
- package/dist/api/sandbox/getStatus.d.ts.map +0 -1
- package/dist/api/sandbox/getStatus.js +0 -32
- package/dist/api/sandbox/getStatus.js.map +0 -1
- package/dist/api/sandbox/index.d.ts +0 -39
- package/dist/api/sandbox/index.d.ts.map +0 -1
- package/dist/api/sandbox/index.js +0 -20
- package/dist/api/sandbox/index.js.map +0 -1
- package/dist/api/sandbox/list.d.ts +0 -293
- package/dist/api/sandbox/list.d.ts.map +0 -1
- package/dist/api/sandbox/list.js +0 -191
- package/dist/api/sandbox/list.js.map +0 -1
- package/dist/api/sandbox/resolve.d.ts +0 -82
- package/dist/api/sandbox/resolve.d.ts.map +0 -1
- package/dist/api/sandbox/resolve.js +0 -71
- package/dist/api/sandbox/resolve.js.map +0 -1
- package/dist/api/sandbox/run.d.ts +0 -28
- package/dist/api/sandbox/run.d.ts.map +0 -1
- package/dist/api/sandbox/run.js +0 -342
- package/dist/api/sandbox/run.js.map +0 -1
- package/dist/api/sandbox/runtime.d.ts +0 -83
- package/dist/api/sandbox/runtime.d.ts.map +0 -1
- package/dist/api/sandbox/runtime.js +0 -78
- package/dist/api/sandbox/runtime.js.map +0 -1
- package/dist/api/sandbox/snapshot-build.d.ts +0 -48
- package/dist/api/sandbox/snapshot-build.d.ts.map +0 -1
- package/dist/api/sandbox/snapshot-build.js +0 -74
- package/dist/api/sandbox/snapshot-build.js.map +0 -1
- package/dist/api/sandbox/snapshot.d.ts +0 -595
- package/dist/api/sandbox/snapshot.d.ts.map +0 -1
- package/dist/api/sandbox/snapshot.js +0 -598
- package/dist/api/sandbox/snapshot.js.map +0 -1
- package/dist/api/services/index.d.ts +0 -2
- package/dist/api/services/index.d.ts.map +0 -1
- package/dist/api/services/index.js +0 -2
- package/dist/api/services/index.js.map +0 -1
- package/dist/api/services/stats.d.ts +0 -263
- package/dist/api/services/stats.d.ts.map +0 -1
- package/dist/api/services/stats.js +0 -144
- package/dist/api/services/stats.js.map +0 -1
- package/dist/api/session/get.d.ts +0 -169
- package/dist/api/session/get.d.ts.map +0 -1
- package/dist/api/session/get.js +0 -56
- package/dist/api/session/get.js.map +0 -1
- package/dist/api/session/index.d.ts +0 -4
- package/dist/api/session/index.d.ts.map +0 -1
- package/dist/api/session/index.js +0 -4
- package/dist/api/session/index.js.map +0 -1
- package/dist/api/session/list.d.ts +0 -143
- package/dist/api/session/list.d.ts.map +0 -1
- package/dist/api/session/list.js +0 -91
- package/dist/api/session/list.js.map +0 -1
- package/dist/api/session/logs.d.ts +0 -40
- package/dist/api/session/logs.d.ts.map +0 -1
- package/dist/api/session/logs.js +0 -28
- package/dist/api/session/logs.js.map +0 -1
- package/dist/api/session/util.d.ts +0 -23
- package/dist/api/session/util.d.ts.map +0 -1
- package/dist/api/session/util.js +0 -3
- package/dist/api/session/util.js.map +0 -1
- package/dist/api/storage/config.d.ts +0 -99
- package/dist/api/storage/config.d.ts.map +0 -1
- package/dist/api/storage/config.js +0 -61
- package/dist/api/storage/config.js.map +0 -1
- package/dist/api/storage/index.d.ts +0 -5
- package/dist/api/storage/index.d.ts.map +0 -1
- package/dist/api/storage/index.js +0 -5
- package/dist/api/storage/index.js.map +0 -1
- package/dist/api/storage/objects.d.ts +0 -155
- package/dist/api/storage/objects.d.ts.map +0 -1
- package/dist/api/storage/objects.js +0 -148
- package/dist/api/storage/objects.js.map +0 -1
- package/dist/api/storage/types.d.ts +0 -161
- package/dist/api/storage/types.d.ts.map +0 -1
- package/dist/api/storage/types.js +0 -141
- package/dist/api/storage/types.js.map +0 -1
- package/dist/api/storage/util.d.ts +0 -48
- package/dist/api/storage/util.d.ts.map +0 -1
- package/dist/api/storage/util.js +0 -8
- package/dist/api/storage/util.js.map +0 -1
- package/dist/api/stream/get.d.ts +0 -58
- package/dist/api/stream/get.d.ts.map +0 -1
- package/dist/api/stream/get.js +0 -40
- package/dist/api/stream/get.js.map +0 -1
- package/dist/api/stream/index.d.ts +0 -4
- package/dist/api/stream/index.d.ts.map +0 -1
- package/dist/api/stream/index.js +0 -4
- package/dist/api/stream/index.js.map +0 -1
- package/dist/api/stream/list.d.ts +0 -120
- package/dist/api/stream/list.d.ts.map +0 -1
- package/dist/api/stream/list.js +0 -77
- package/dist/api/stream/list.js.map +0 -1
- package/dist/api/stream/util.d.ts +0 -23
- package/dist/api/stream/util.d.ts.map +0 -1
- package/dist/api/stream/util.js +0 -3
- package/dist/api/stream/util.js.map +0 -1
- package/dist/api/thread/delete.d.ts +0 -23
- package/dist/api/thread/delete.d.ts.map +0 -1
- package/dist/api/thread/delete.js +0 -21
- package/dist/api/thread/delete.js.map +0 -1
- package/dist/api/thread/get.d.ts +0 -36
- package/dist/api/thread/get.d.ts.map +0 -1
- package/dist/api/thread/get.js +0 -23
- package/dist/api/thread/get.js.map +0 -1
- package/dist/api/thread/index.d.ts +0 -5
- package/dist/api/thread/index.d.ts.map +0 -1
- package/dist/api/thread/index.js +0 -5
- package/dist/api/thread/index.js.map +0 -1
- package/dist/api/thread/list.d.ts +0 -69
- package/dist/api/thread/list.d.ts.map +0 -1
- package/dist/api/thread/list.js +0 -51
- package/dist/api/thread/list.js.map +0 -1
- package/dist/api/thread/util.d.ts +0 -23
- package/dist/api/thread/util.d.ts.map +0 -1
- package/dist/api/thread/util.js +0 -3
- package/dist/api/thread/util.js.map +0 -1
- package/dist/api/user/index.d.ts +0 -2
- package/dist/api/user/index.d.ts.map +0 -1
- package/dist/api/user/index.js +0 -2
- package/dist/api/user/index.js.map +0 -1
- package/dist/api/user/util.d.ts +0 -23
- package/dist/api/user/util.d.ts.map +0 -1
- package/dist/api/user/util.js +0 -3
- package/dist/api/user/util.js.map +0 -1
- package/dist/api/webhook/deliveries.d.ts +0 -94
- package/dist/api/webhook/deliveries.d.ts.map +0 -1
- package/dist/api/webhook/deliveries.js +0 -79
- package/dist/api/webhook/deliveries.js.map +0 -1
- package/dist/api/webhook/destinations.d.ts +0 -136
- package/dist/api/webhook/destinations.d.ts.map +0 -1
- package/dist/api/webhook/destinations.js +0 -137
- package/dist/api/webhook/destinations.js.map +0 -1
- package/dist/api/webhook/index.d.ts +0 -41
- package/dist/api/webhook/index.d.ts.map +0 -1
- package/dist/api/webhook/index.js +0 -59
- package/dist/api/webhook/index.js.map +0 -1
- package/dist/api/webhook/receipts.d.ts +0 -77
- package/dist/api/webhook/receipts.d.ts.map +0 -1
- package/dist/api/webhook/receipts.js +0 -78
- package/dist/api/webhook/receipts.js.map +0 -1
- package/dist/api/webhook/types.d.ts +0 -249
- package/dist/api/webhook/types.d.ts.map +0 -1
- package/dist/api/webhook/types.js +0 -221
- package/dist/api/webhook/types.js.map +0 -1
- package/dist/api/webhook/util.d.ts +0 -202
- package/dist/api/webhook/util.d.ts.map +0 -1
- package/dist/api/webhook/util.js +0 -201
- package/dist/api/webhook/util.js.map +0 -1
- package/dist/api/webhook/webhooks.d.ts +0 -146
- package/dist/api/webhook/webhooks.d.ts.map +0 -1
- package/dist/api/webhook/webhooks.js +0 -165
- package/dist/api/webhook/webhooks.js.map +0 -1
- package/src/api/api-example.md +0 -164
- package/src/api/apikey/create.ts +0 -41
- package/src/api/apikey/delete.ts +0 -30
- package/src/api/apikey/get.ts +0 -48
- package/src/api/apikey/index.ts +0 -5
- package/src/api/apikey/list.ts +0 -64
- package/src/api/apikey/util.ts +0 -3
- package/src/api/db/index.ts +0 -27
- package/src/api/db/logs.ts +0 -75
- package/src/api/db/query.ts +0 -67
- package/src/api/db/tables.ts +0 -92
- package/src/api/db/util.ts +0 -9
- package/src/api/eval/get.ts +0 -33
- package/src/api/eval/index.ts +0 -28
- package/src/api/eval/list.ts +0 -49
- package/src/api/eval/run-get.ts +0 -39
- package/src/api/eval/run-list.ts +0 -59
- package/src/api/machine/index.ts +0 -2
- package/src/api/machine/machine.ts +0 -160
- package/src/api/machine/util.ts +0 -5
- package/src/api/org/index.ts +0 -6
- package/src/api/org/list.ts +0 -28
- package/src/api/org/resources.ts +0 -140
- package/src/api/org/util.ts +0 -4
- package/src/api/project/agent.ts +0 -86
- package/src/api/project/create.ts +0 -47
- package/src/api/project/delete.ts +0 -25
- package/src/api/project/deploy.ts +0 -458
- package/src/api/project/deployment.ts +0 -195
- package/src/api/project/env-delete.ts +0 -45
- package/src/api/project/env-update.ts +0 -55
- package/src/api/project/exists.ts +0 -58
- package/src/api/project/hostname.ts +0 -73
- package/src/api/project/index.ts +0 -13
- package/src/api/project/update-region.ts +0 -44
- package/src/api/project/util.ts +0 -8
- package/src/api/queue/analytics.ts +0 -311
- package/src/api/queue/destinations.ts +0 -259
- package/src/api/queue/dlq.ts +0 -243
- package/src/api/queue/index.ts +0 -308
- package/src/api/queue/messages.ts +0 -784
- package/src/api/queue/queues.ts +0 -460
- package/src/api/queue/sources.ts +0 -294
- package/src/api/queue/types.ts +0 -1325
- package/src/api/queue/util.ts +0 -278
- package/src/api/queue/validation.ts +0 -560
- package/src/api/queue/websocket.ts +0 -514
- package/src/api/region/delete.ts +0 -57
- package/src/api/region/index.ts +0 -4
- package/src/api/region/list.ts +0 -32
- package/src/api/region/resources.ts +0 -69
- package/src/api/region/util.ts +0 -3
- package/src/api/sandbox/cli-list.ts +0 -127
- package/src/api/sandbox/create.ts +0 -256
- package/src/api/sandbox/destroy.ts +0 -41
- package/src/api/sandbox/disk-checkpoint.ts +0 -179
- package/src/api/sandbox/execute.ts +0 -132
- package/src/api/sandbox/execution.ts +0 -183
- package/src/api/sandbox/files.ts +0 -596
- package/src/api/sandbox/get.ts +0 -249
- package/src/api/sandbox/getStatus.ts +0 -54
- package/src/api/sandbox/index.ts +0 -211
- package/src/api/sandbox/list.ts +0 -224
- package/src/api/sandbox/resolve.ts +0 -98
- package/src/api/sandbox/run.ts +0 -439
- package/src/api/sandbox/runtime.ts +0 -100
- package/src/api/sandbox/snapshot-build.ts +0 -98
- package/src/api/sandbox/snapshot.ts +0 -781
- package/src/api/services/index.ts +0 -1
- package/src/api/services/stats.ts +0 -213
- package/src/api/session/get.ts +0 -106
- package/src/api/session/index.ts +0 -3
- package/src/api/session/list.ts +0 -136
- package/src/api/session/logs.ts +0 -47
- package/src/api/session/util.ts +0 -3
- package/src/api/storage/config.ts +0 -111
- package/src/api/storage/index.ts +0 -4
- package/src/api/storage/objects.ts +0 -250
- package/src/api/storage/types.ts +0 -174
- package/src/api/storage/util.ts +0 -10
- package/src/api/stream/get.ts +0 -51
- package/src/api/stream/index.ts +0 -3
- package/src/api/stream/list.ts +0 -127
- package/src/api/stream/util.ts +0 -3
- package/src/api/thread/delete.ts +0 -31
- package/src/api/thread/get.ts +0 -34
- package/src/api/thread/index.ts +0 -4
- package/src/api/thread/list.ts +0 -76
- package/src/api/thread/util.ts +0 -3
- package/src/api/user/index.ts +0 -1
- package/src/api/user/util.ts +0 -3
- package/src/api/webhook/deliveries.ts +0 -129
- package/src/api/webhook/destinations.ts +0 -224
- package/src/api/webhook/index.ts +0 -133
- package/src/api/webhook/receipts.ts +0 -124
- package/src/api/webhook/types.ts +0 -309
- package/src/api/webhook/util.ts +0 -237
- package/src/api/webhook/webhooks.ts +0 -260
|
@@ -1,458 +0,0 @@
|
|
|
1
|
-
import { z } from 'zod';
|
|
2
|
-
import { type APIClient, APIResponseSchema } from '../api.ts';
|
|
3
|
-
import { ProjectResponseError } from './util.ts';
|
|
4
|
-
|
|
5
|
-
export const Resources = z.object({
|
|
6
|
-
memory: z.string().default('500Mi').describe('The memory requirements'),
|
|
7
|
-
cpu: z.string().default('500m').describe('The CPU requirements'),
|
|
8
|
-
disk: z.string().default('500Mi').describe('The disk requirements'),
|
|
9
|
-
});
|
|
10
|
-
|
|
11
|
-
export const Mode = z.object({
|
|
12
|
-
type: z
|
|
13
|
-
.enum(['on-demand', 'provisioned'])
|
|
14
|
-
.default('on-demand')
|
|
15
|
-
.describe('on-demand or provisioned'),
|
|
16
|
-
idle: z.string().optional().describe('duration in seconds if on-demand'),
|
|
17
|
-
});
|
|
18
|
-
|
|
19
|
-
export const ProjectBuildConfig = z.object({
|
|
20
|
-
timeout: z.string().optional().describe('Build execution timeout (e.g. "30m")'),
|
|
21
|
-
resources: z
|
|
22
|
-
.object({
|
|
23
|
-
memory: z.string().optional().describe('Build sandbox memory (e.g. "4Gi")'),
|
|
24
|
-
cpu: z.string().optional().describe('Build sandbox CPU (e.g. "2")'),
|
|
25
|
-
disk: z.string().optional().describe('Build sandbox disk (e.g. "4Gi")'),
|
|
26
|
-
})
|
|
27
|
-
.optional()
|
|
28
|
-
.describe('Build sandbox resource limits'),
|
|
29
|
-
});
|
|
30
|
-
|
|
31
|
-
export const DeploymentConfig = z.object({
|
|
32
|
-
resources: Resources.optional().describe('the resource requirements for your deployed project'),
|
|
33
|
-
mode: Mode.optional().describe('the provisioning mode for the project'),
|
|
34
|
-
dependencies: z
|
|
35
|
-
.array(z.string().describe('APT dependencies to install prior to launching your project'))
|
|
36
|
-
.optional(),
|
|
37
|
-
domains: z.array(z.string().describe('the custom domain')).optional(),
|
|
38
|
-
});
|
|
39
|
-
|
|
40
|
-
const BaseFileFields = {
|
|
41
|
-
filename: z.string().describe('the relative path for the file'),
|
|
42
|
-
version: z.string().describe('the SHA256 content of the file'),
|
|
43
|
-
};
|
|
44
|
-
|
|
45
|
-
export const BuildEvalSchema = z.object({
|
|
46
|
-
...BaseFileFields,
|
|
47
|
-
id: z.string().describe('the unique calculated id for the eval'),
|
|
48
|
-
identifier: z.string().describe('the unique id for eval for the project across deployments'),
|
|
49
|
-
name: z.string().describe('the name of the eval'),
|
|
50
|
-
description: z.string().optional().describe('the eval description'),
|
|
51
|
-
agentIdentifier: z.string().describe('the identifier of the agent'),
|
|
52
|
-
projectId: z.string().describe('the project id'),
|
|
53
|
-
});
|
|
54
|
-
|
|
55
|
-
const BaseAgentFields = {
|
|
56
|
-
...BaseFileFields,
|
|
57
|
-
id: z.string().describe('the unique calculated id for the agent'),
|
|
58
|
-
agentId: z.string().describe('the unique id for agent for the project across deployments'),
|
|
59
|
-
projectId: z.string().describe('the project id'),
|
|
60
|
-
name: z.string().describe('the name of the agent'),
|
|
61
|
-
description: z.string().optional().describe('the agent description'),
|
|
62
|
-
evals: z.array(BuildEvalSchema).optional().describe('the evals for the agent'),
|
|
63
|
-
schema: z
|
|
64
|
-
.object({
|
|
65
|
-
input: z.string().optional().describe('JSON schema for input (stringified JSON)'),
|
|
66
|
-
output: z.string().optional().describe('JSON schema for output (stringified JSON)'),
|
|
67
|
-
})
|
|
68
|
-
.optional()
|
|
69
|
-
.describe('input and output JSON schemas for the agent'),
|
|
70
|
-
};
|
|
71
|
-
|
|
72
|
-
export const BuildAgentSchema = z.object({
|
|
73
|
-
...BaseAgentFields,
|
|
74
|
-
});
|
|
75
|
-
|
|
76
|
-
export const BuildMetadataSchema = z.object({
|
|
77
|
-
routes: z.array(
|
|
78
|
-
z.object({
|
|
79
|
-
id: z.string().describe('the unique calculated id for the route'),
|
|
80
|
-
filename: z.string().describe('the relative path for the file'),
|
|
81
|
-
path: z.string().describe('the route path'),
|
|
82
|
-
method: z.enum(['get', 'post', 'put', 'delete', 'patch']).describe('the HTTP method'),
|
|
83
|
-
version: z.string().describe('the SHA256 content of the file'),
|
|
84
|
-
type: z.enum(['api', 'sms', 'email', 'cron', 'websocket', 'sse', 'stream']),
|
|
85
|
-
agentIds: z
|
|
86
|
-
.array(z.string())
|
|
87
|
-
.optional()
|
|
88
|
-
.describe('the agent ids associated with this route'),
|
|
89
|
-
config: z
|
|
90
|
-
.record(z.string(), z.unknown())
|
|
91
|
-
.optional()
|
|
92
|
-
.describe('type specific configuration'),
|
|
93
|
-
schema: z
|
|
94
|
-
.object({
|
|
95
|
-
input: z.string().optional().describe('JSON schema for input (stringified JSON)'),
|
|
96
|
-
output: z.string().optional().describe('JSON schema for output (stringified JSON)'),
|
|
97
|
-
})
|
|
98
|
-
.optional()
|
|
99
|
-
.describe('input and output JSON schemas for the route'),
|
|
100
|
-
})
|
|
101
|
-
),
|
|
102
|
-
agents: z.array(BuildAgentSchema),
|
|
103
|
-
assets: z.array(
|
|
104
|
-
z.object({
|
|
105
|
-
filename: z.string().describe('the relative path for the file'),
|
|
106
|
-
kind: z.string().describe('the type of asset'),
|
|
107
|
-
contentType: z.string().describe('the content-type for the file'),
|
|
108
|
-
contentEncoding: z.string().optional().describe('the content-encoding for the file'),
|
|
109
|
-
size: z.number().describe('the size in bytes for the file'),
|
|
110
|
-
})
|
|
111
|
-
),
|
|
112
|
-
project: z.object({
|
|
113
|
-
id: z.string().describe('the project id'),
|
|
114
|
-
name: z.string().describe('the name of the project (from package.json)'),
|
|
115
|
-
version: z.string().optional().describe('the version of the project (from package.json)'),
|
|
116
|
-
description: z
|
|
117
|
-
.string()
|
|
118
|
-
.optional()
|
|
119
|
-
.describe('the description of the project (from package.json)'),
|
|
120
|
-
keywords: z.array(z.string()).optional().describe('the keywords from package.json'),
|
|
121
|
-
orgId: z.string().describe('the organization id for the project'),
|
|
122
|
-
}),
|
|
123
|
-
deployment: z.intersection(
|
|
124
|
-
DeploymentConfig,
|
|
125
|
-
z.object({
|
|
126
|
-
id: z.string().describe('the deployment id'),
|
|
127
|
-
date: z.string().describe('the date the deployment was created in UTC format'),
|
|
128
|
-
git: z
|
|
129
|
-
.object({
|
|
130
|
-
repo: z.string().optional().describe('the repository name'),
|
|
131
|
-
commit: z.string().optional().describe('the git commit sha'),
|
|
132
|
-
message: z.string().optional().describe('the git commit message'),
|
|
133
|
-
branch: z.string().optional().describe('the git branch'),
|
|
134
|
-
tags: z.array(z.string()).optional().describe('the tags for the current branch'),
|
|
135
|
-
pr: z.string().optional().describe('the pull request number'),
|
|
136
|
-
provider: z.string().optional().describe('the CI provider'),
|
|
137
|
-
trigger: z
|
|
138
|
-
.string()
|
|
139
|
-
.default('cli')
|
|
140
|
-
.optional()
|
|
141
|
-
.describe('the trigger that caused the build'),
|
|
142
|
-
url: z
|
|
143
|
-
.string()
|
|
144
|
-
.url()
|
|
145
|
-
.optional()
|
|
146
|
-
.describe('the url to the commit for the CI provider'),
|
|
147
|
-
buildUrl: z
|
|
148
|
-
.string()
|
|
149
|
-
.url()
|
|
150
|
-
.optional()
|
|
151
|
-
.describe('the url to the build for the CI provider'),
|
|
152
|
-
event: z
|
|
153
|
-
.enum(['pull_request', 'push', 'manual', 'workflow'])
|
|
154
|
-
.default('manual')
|
|
155
|
-
.optional()
|
|
156
|
-
.describe(
|
|
157
|
-
'The type of Git-related event that triggered the deployment: pull_request (A pull request or merge request was opened, updated, or merged), push (A commit was pushed directly to a branch), manual (A deployment was triggered manually via CLI or a button), workflow (A deployment was triggered by an automated workflow, such as a CI pipeline)'
|
|
158
|
-
),
|
|
159
|
-
pull_request: z
|
|
160
|
-
.object({
|
|
161
|
-
number: z.number(),
|
|
162
|
-
url: z.string().optional(),
|
|
163
|
-
})
|
|
164
|
-
.optional()
|
|
165
|
-
.describe(
|
|
166
|
-
'This is only present when the deployment was triggered via a pull request.'
|
|
167
|
-
),
|
|
168
|
-
})
|
|
169
|
-
.optional()
|
|
170
|
-
.describe('git commit information'),
|
|
171
|
-
build: z.object({
|
|
172
|
-
bun: z.string().describe('the version of bun that was used to build the deployment'),
|
|
173
|
-
agentuity: z.string().describe('the version of the agentuity runtime'),
|
|
174
|
-
arch: z.string().describe('the machine architecture'),
|
|
175
|
-
platform: z.string().describe('the machine os platform'),
|
|
176
|
-
}),
|
|
177
|
-
})
|
|
178
|
-
),
|
|
179
|
-
});
|
|
180
|
-
|
|
181
|
-
export type BuildMetadata = z.infer<typeof BuildMetadataSchema>;
|
|
182
|
-
|
|
183
|
-
export const CreateProjectDeploymentSchema = z.object({
|
|
184
|
-
id: z.string().describe('the unique id for the deployment'),
|
|
185
|
-
orgId: z.string().describe('the organization id'),
|
|
186
|
-
publicKey: z.string().describe('the public key to use for encrypting the deployment'),
|
|
187
|
-
buildLogsStreamURL: z
|
|
188
|
-
.string()
|
|
189
|
-
.optional()
|
|
190
|
-
.describe('the URL for streaming build logs (PUT to write, GET to read)'),
|
|
191
|
-
});
|
|
192
|
-
|
|
193
|
-
export const CreateProjectDeploymentResponseSchema = APIResponseSchema(
|
|
194
|
-
CreateProjectDeploymentSchema
|
|
195
|
-
);
|
|
196
|
-
|
|
197
|
-
type CreateProjectDeploymentPayload = z.infer<typeof CreateProjectDeploymentResponseSchema>;
|
|
198
|
-
|
|
199
|
-
export type Deployment = z.infer<typeof CreateProjectDeploymentSchema>;
|
|
200
|
-
|
|
201
|
-
/**
|
|
202
|
-
* Create a new project deployment
|
|
203
|
-
*
|
|
204
|
-
* @param client
|
|
205
|
-
* @param projectId
|
|
206
|
-
* @returns
|
|
207
|
-
*/
|
|
208
|
-
export async function projectDeploymentCreate(
|
|
209
|
-
client: APIClient,
|
|
210
|
-
projectId: string,
|
|
211
|
-
deploymentConfig?: z.infer<typeof DeploymentConfig>
|
|
212
|
-
): Promise<Deployment> {
|
|
213
|
-
const resp = await client.request<CreateProjectDeploymentPayload>(
|
|
214
|
-
'POST',
|
|
215
|
-
`/cli/deploy/2/start/${projectId}`,
|
|
216
|
-
CreateProjectDeploymentResponseSchema,
|
|
217
|
-
deploymentConfig ?? {}
|
|
218
|
-
);
|
|
219
|
-
if (resp.success) {
|
|
220
|
-
return resp.data;
|
|
221
|
-
}
|
|
222
|
-
throw new ProjectResponseError({ message: resp.message });
|
|
223
|
-
}
|
|
224
|
-
|
|
225
|
-
export const DeploymentInstructionsSchema = z.object({
|
|
226
|
-
deployment: z.string().describe('the url for uploading the encrypted deployment archive'),
|
|
227
|
-
assets: z
|
|
228
|
-
.record(
|
|
229
|
-
z.string().describe('the asset id'),
|
|
230
|
-
z.string().describe('the url for the asset upload')
|
|
231
|
-
)
|
|
232
|
-
.describe('the upload metadata for public assets'),
|
|
233
|
-
});
|
|
234
|
-
|
|
235
|
-
export const DeploymentInstructionsResponseSchema = APIResponseSchema(DeploymentInstructionsSchema);
|
|
236
|
-
|
|
237
|
-
type DeploymentInstructionsResponse = z.infer<typeof DeploymentInstructionsResponseSchema>;
|
|
238
|
-
export type DeploymentInstructions = z.infer<typeof DeploymentInstructionsSchema>;
|
|
239
|
-
|
|
240
|
-
/**
|
|
241
|
-
* Update the deployment with the build metadata
|
|
242
|
-
*
|
|
243
|
-
* @param client
|
|
244
|
-
* @param deploymentId
|
|
245
|
-
* @returns
|
|
246
|
-
*/
|
|
247
|
-
export async function projectDeploymentUpdate(
|
|
248
|
-
client: APIClient,
|
|
249
|
-
deploymentId: string,
|
|
250
|
-
deployment: BuildMetadata,
|
|
251
|
-
signal?: AbortSignal
|
|
252
|
-
): Promise<DeploymentInstructions> {
|
|
253
|
-
const resp = await client.request<DeploymentInstructionsResponse, BuildMetadata>(
|
|
254
|
-
'PUT',
|
|
255
|
-
`/cli/deploy/2/start/${deploymentId}`,
|
|
256
|
-
DeploymentInstructionsResponseSchema,
|
|
257
|
-
deployment,
|
|
258
|
-
BuildMetadataSchema,
|
|
259
|
-
signal
|
|
260
|
-
);
|
|
261
|
-
if (resp.success) {
|
|
262
|
-
return resp.data;
|
|
263
|
-
}
|
|
264
|
-
throw new ProjectResponseError({ message: resp.message });
|
|
265
|
-
}
|
|
266
|
-
|
|
267
|
-
export const DeploymentCompleteSchema = z.object({
|
|
268
|
-
streamId: z.string().optional().describe('the stream id for warmup logs'),
|
|
269
|
-
publicUrls: z
|
|
270
|
-
.object({
|
|
271
|
-
latest: z.string().url().describe('the public url for the latest deployment'),
|
|
272
|
-
deployment: z.string().url().describe('the public url for this deployment'),
|
|
273
|
-
custom: z.array(z.string().describe('the custom domain')),
|
|
274
|
-
vanityDeployment: z
|
|
275
|
-
.string()
|
|
276
|
-
.url()
|
|
277
|
-
.nullable()
|
|
278
|
-
.optional()
|
|
279
|
-
.describe('the vanity url for this deployment'),
|
|
280
|
-
vanityProject: z
|
|
281
|
-
.string()
|
|
282
|
-
.url()
|
|
283
|
-
.nullable()
|
|
284
|
-
.optional()
|
|
285
|
-
.describe('the vanity url for the latest deployment'),
|
|
286
|
-
})
|
|
287
|
-
.describe('the map of public urls'),
|
|
288
|
-
});
|
|
289
|
-
|
|
290
|
-
export const DeploymentCompleteResponseSchema = APIResponseSchema(DeploymentCompleteSchema);
|
|
291
|
-
|
|
292
|
-
type DeploymentCompleteResponse = z.infer<typeof DeploymentCompleteResponseSchema>;
|
|
293
|
-
export type DeploymentComplete = z.infer<typeof DeploymentCompleteSchema>;
|
|
294
|
-
|
|
295
|
-
export const DeploymentStateValue = z.enum([
|
|
296
|
-
'pending',
|
|
297
|
-
'building',
|
|
298
|
-
'deploying',
|
|
299
|
-
'failed',
|
|
300
|
-
'completed',
|
|
301
|
-
]);
|
|
302
|
-
|
|
303
|
-
export type DeploymentState = z.infer<typeof DeploymentStateValue>;
|
|
304
|
-
|
|
305
|
-
export const DeploymentStatusSchema = z.object({
|
|
306
|
-
state: DeploymentStateValue.describe('the current deployment state'),
|
|
307
|
-
});
|
|
308
|
-
|
|
309
|
-
export const DeploymentStatusResponseSchema = APIResponseSchema(DeploymentStatusSchema);
|
|
310
|
-
|
|
311
|
-
type DeploymentStatusResponse = z.infer<typeof DeploymentStatusResponseSchema>;
|
|
312
|
-
export type DeploymentStatusResult = z.infer<typeof DeploymentStatusSchema>;
|
|
313
|
-
|
|
314
|
-
/**
|
|
315
|
-
* Complete the deployment once build is uploaded
|
|
316
|
-
*
|
|
317
|
-
* @param client
|
|
318
|
-
* @param deploymentId
|
|
319
|
-
* @returns
|
|
320
|
-
*/
|
|
321
|
-
export async function projectDeploymentComplete(
|
|
322
|
-
client: APIClient,
|
|
323
|
-
deploymentId: string,
|
|
324
|
-
signal?: AbortSignal
|
|
325
|
-
): Promise<DeploymentComplete> {
|
|
326
|
-
const resp = await client.request<DeploymentCompleteResponse>(
|
|
327
|
-
'POST',
|
|
328
|
-
`/cli/deploy/2/complete/${deploymentId}`,
|
|
329
|
-
DeploymentCompleteResponseSchema,
|
|
330
|
-
undefined,
|
|
331
|
-
undefined,
|
|
332
|
-
signal
|
|
333
|
-
);
|
|
334
|
-
if (resp.success) {
|
|
335
|
-
return resp.data;
|
|
336
|
-
}
|
|
337
|
-
throw new ProjectResponseError({
|
|
338
|
-
message: resp.message || 'Deployment completion failed with unknown error',
|
|
339
|
-
});
|
|
340
|
-
}
|
|
341
|
-
|
|
342
|
-
/**
|
|
343
|
-
* Get the current provisioning status of a deployment
|
|
344
|
-
*
|
|
345
|
-
* @param client
|
|
346
|
-
* @param deploymentId
|
|
347
|
-
* @returns
|
|
348
|
-
*/
|
|
349
|
-
export async function projectDeploymentStatus(
|
|
350
|
-
client: APIClient,
|
|
351
|
-
deploymentId: string,
|
|
352
|
-
signal?: AbortSignal
|
|
353
|
-
): Promise<DeploymentStatusResult> {
|
|
354
|
-
const resp = await client.request<DeploymentStatusResponse>(
|
|
355
|
-
'GET',
|
|
356
|
-
`/cli/deploy/2/status/${deploymentId}`,
|
|
357
|
-
DeploymentStatusResponseSchema,
|
|
358
|
-
undefined,
|
|
359
|
-
undefined,
|
|
360
|
-
signal
|
|
361
|
-
);
|
|
362
|
-
if (resp.success) {
|
|
363
|
-
return resp.data;
|
|
364
|
-
}
|
|
365
|
-
throw new ProjectResponseError({ message: resp.message });
|
|
366
|
-
}
|
|
367
|
-
|
|
368
|
-
export interface ClientDiagnosticsError {
|
|
369
|
-
type: 'file' | 'general';
|
|
370
|
-
scope: 'typescript' | 'ast' | 'build' | 'bundler' | 'validation' | 'deploy';
|
|
371
|
-
path?: string;
|
|
372
|
-
line?: number;
|
|
373
|
-
column?: number;
|
|
374
|
-
message: string;
|
|
375
|
-
code?: string;
|
|
376
|
-
}
|
|
377
|
-
|
|
378
|
-
export interface ClientDiagnosticsTiming {
|
|
379
|
-
name: string;
|
|
380
|
-
startedAt: string;
|
|
381
|
-
completedAt: string;
|
|
382
|
-
durationMs: number;
|
|
383
|
-
}
|
|
384
|
-
|
|
385
|
-
export interface ClientDiagnostics {
|
|
386
|
-
success: boolean;
|
|
387
|
-
errors: ClientDiagnosticsError[];
|
|
388
|
-
warnings: ClientDiagnosticsError[];
|
|
389
|
-
diagnostics: ClientDiagnosticsTiming[];
|
|
390
|
-
error?: string;
|
|
391
|
-
}
|
|
392
|
-
|
|
393
|
-
export interface DeploymentFailPayload {
|
|
394
|
-
error?: string;
|
|
395
|
-
diagnostics?: ClientDiagnostics;
|
|
396
|
-
}
|
|
397
|
-
|
|
398
|
-
export const ClientDiagnosticsErrorSchema = z.object({
|
|
399
|
-
type: z.enum(['file', 'general']),
|
|
400
|
-
scope: z.enum(['typescript', 'ast', 'build', 'bundler', 'validation', 'deploy']),
|
|
401
|
-
path: z.string().optional(),
|
|
402
|
-
line: z.number().optional(),
|
|
403
|
-
column: z.number().optional(),
|
|
404
|
-
message: z.string(),
|
|
405
|
-
code: z.string().optional(),
|
|
406
|
-
});
|
|
407
|
-
|
|
408
|
-
export const ClientDiagnosticsTimingSchema = z.object({
|
|
409
|
-
name: z.string(),
|
|
410
|
-
startedAt: z.string(),
|
|
411
|
-
completedAt: z.string(),
|
|
412
|
-
durationMs: z.number(),
|
|
413
|
-
});
|
|
414
|
-
|
|
415
|
-
export const ClientDiagnosticsSchema = z.object({
|
|
416
|
-
success: z.boolean(),
|
|
417
|
-
errors: z.array(ClientDiagnosticsErrorSchema),
|
|
418
|
-
warnings: z.array(ClientDiagnosticsErrorSchema),
|
|
419
|
-
diagnostics: z.array(ClientDiagnosticsTimingSchema),
|
|
420
|
-
error: z.string().optional(),
|
|
421
|
-
});
|
|
422
|
-
|
|
423
|
-
export const DeploymentFailPayloadSchema = z.object({
|
|
424
|
-
error: z.string().optional(),
|
|
425
|
-
diagnostics: ClientDiagnosticsSchema.optional(),
|
|
426
|
-
});
|
|
427
|
-
|
|
428
|
-
export const DeploymentFailResponseSchema = z.object({
|
|
429
|
-
state: z.literal('failed'),
|
|
430
|
-
});
|
|
431
|
-
|
|
432
|
-
export const DeploymentFailAPIResponseSchema = APIResponseSchema(DeploymentFailResponseSchema);
|
|
433
|
-
type DeploymentFailResponse = z.infer<typeof DeploymentFailAPIResponseSchema>;
|
|
434
|
-
|
|
435
|
-
/**
|
|
436
|
-
* Report a deployment failure from the client
|
|
437
|
-
*
|
|
438
|
-
* @param client
|
|
439
|
-
* @param deploymentId
|
|
440
|
-
* @param payload - Error message and/or structured diagnostics
|
|
441
|
-
* @returns
|
|
442
|
-
*/
|
|
443
|
-
export async function projectDeploymentFail(
|
|
444
|
-
client: APIClient,
|
|
445
|
-
deploymentId: string,
|
|
446
|
-
payload: DeploymentFailPayload
|
|
447
|
-
): Promise<void> {
|
|
448
|
-
const resp = await client.request<DeploymentFailResponse, DeploymentFailPayload>(
|
|
449
|
-
'POST',
|
|
450
|
-
`/cli/deploy/2/fail/${deploymentId}`,
|
|
451
|
-
DeploymentFailAPIResponseSchema,
|
|
452
|
-
payload,
|
|
453
|
-
DeploymentFailPayloadSchema
|
|
454
|
-
);
|
|
455
|
-
if (!resp.success) {
|
|
456
|
-
throw new ProjectResponseError({ message: resp.message });
|
|
457
|
-
}
|
|
458
|
-
}
|
|
@@ -1,195 +0,0 @@
|
|
|
1
|
-
import { z } from 'zod';
|
|
2
|
-
import { type APIClient, APIResponseSchema, APIResponseSchemaOptionalData } from '../api.ts';
|
|
3
|
-
import { ProjectResponseError } from './util.ts';
|
|
4
|
-
|
|
5
|
-
// Simplified metadata schema for the client
|
|
6
|
-
export const DeploymentMetadataSchema = z.object({
|
|
7
|
-
git: z
|
|
8
|
-
.object({
|
|
9
|
-
repo: z.string().optional(),
|
|
10
|
-
commit: z.string().optional(),
|
|
11
|
-
message: z.string().optional(),
|
|
12
|
-
branch: z.string().optional(),
|
|
13
|
-
tags: z.array(z.string()).optional(),
|
|
14
|
-
pr: z.string().optional(),
|
|
15
|
-
provider: z.string().optional(),
|
|
16
|
-
trigger: z.string().optional(),
|
|
17
|
-
url: z.string().optional(),
|
|
18
|
-
buildUrl: z.string().optional(),
|
|
19
|
-
event: z.string().optional(),
|
|
20
|
-
pull_request: z
|
|
21
|
-
.object({
|
|
22
|
-
number: z.number(),
|
|
23
|
-
url: z.string().optional(),
|
|
24
|
-
})
|
|
25
|
-
.optional(),
|
|
26
|
-
})
|
|
27
|
-
.optional(),
|
|
28
|
-
build: z
|
|
29
|
-
.object({
|
|
30
|
-
bun: z.string().optional(),
|
|
31
|
-
agentuity: z.string().optional(),
|
|
32
|
-
arch: z.string().optional(),
|
|
33
|
-
platform: z.string().optional(),
|
|
34
|
-
})
|
|
35
|
-
.optional(),
|
|
36
|
-
});
|
|
37
|
-
|
|
38
|
-
export const DeploymentSchema = z.object({
|
|
39
|
-
id: z.string(),
|
|
40
|
-
state: z.string().optional(),
|
|
41
|
-
message: z.string().nullable().optional(),
|
|
42
|
-
tags: z.array(z.string()),
|
|
43
|
-
active: z.boolean(),
|
|
44
|
-
createdAt: z.string(),
|
|
45
|
-
updatedAt: z.string().nullable().optional(),
|
|
46
|
-
metadata: DeploymentMetadataSchema.optional(),
|
|
47
|
-
customDomains: z.array(z.string()).nullable().optional(),
|
|
48
|
-
cloudRegion: z.string().nullable().optional(),
|
|
49
|
-
resourceDb: z.string().nullable().optional(),
|
|
50
|
-
resourceStorage: z.string().nullable().optional(),
|
|
51
|
-
deploymentLogsURL: z.string().nullable().optional(),
|
|
52
|
-
buildLogsURL: z.string().nullable().optional(),
|
|
53
|
-
dnsRecords: z.array(z.string()).optional(),
|
|
54
|
-
});
|
|
55
|
-
|
|
56
|
-
export const DeploymentListResponseSchema = APIResponseSchema(z.array(DeploymentSchema));
|
|
57
|
-
export const DeploymentGetResponseSchema = APIResponseSchema(DeploymentSchema);
|
|
58
|
-
export const DeploymentActionResponseSchema = APIResponseSchemaOptionalData(
|
|
59
|
-
z.object({ activeDeploymentId: z.string().optional() })
|
|
60
|
-
);
|
|
61
|
-
|
|
62
|
-
export type DeploymentInfo = z.infer<typeof DeploymentSchema>;
|
|
63
|
-
|
|
64
|
-
export async function projectDeploymentList(
|
|
65
|
-
client: APIClient,
|
|
66
|
-
projectId: string,
|
|
67
|
-
limit = 10,
|
|
68
|
-
options?: { orgId?: string }
|
|
69
|
-
): Promise<DeploymentInfo[]> {
|
|
70
|
-
const params = new URLSearchParams({ limit: String(limit) });
|
|
71
|
-
if (options?.orgId) params.set('orgId', options.orgId);
|
|
72
|
-
const resp = await client.get(
|
|
73
|
-
`/cli/project/${projectId}/deployments?${params.toString()}`,
|
|
74
|
-
DeploymentListResponseSchema
|
|
75
|
-
);
|
|
76
|
-
if (resp.success) {
|
|
77
|
-
return resp.data;
|
|
78
|
-
}
|
|
79
|
-
throw new ProjectResponseError({ message: resp.message });
|
|
80
|
-
}
|
|
81
|
-
|
|
82
|
-
export async function projectDeploymentGet(
|
|
83
|
-
client: APIClient,
|
|
84
|
-
projectId: string,
|
|
85
|
-
deploymentId: string
|
|
86
|
-
): Promise<DeploymentInfo> {
|
|
87
|
-
const resp = await client.get(
|
|
88
|
-
`/cli/project/${projectId}/deployments/${deploymentId}`,
|
|
89
|
-
DeploymentGetResponseSchema
|
|
90
|
-
);
|
|
91
|
-
if (resp.success) {
|
|
92
|
-
return resp.data;
|
|
93
|
-
}
|
|
94
|
-
throw new ProjectResponseError({ message: resp.message });
|
|
95
|
-
}
|
|
96
|
-
|
|
97
|
-
export const DeploymentLookupSchema = z.object({
|
|
98
|
-
id: z.string(),
|
|
99
|
-
projectId: z.string(),
|
|
100
|
-
orgId: z.string(),
|
|
101
|
-
cloudRegion: z.string().nullable().optional(),
|
|
102
|
-
state: z.string().nullable().optional(),
|
|
103
|
-
active: z.boolean(),
|
|
104
|
-
});
|
|
105
|
-
|
|
106
|
-
export const DeploymentLookupResponseSchema = APIResponseSchema(DeploymentLookupSchema);
|
|
107
|
-
|
|
108
|
-
export type DeploymentLookup = z.infer<typeof DeploymentLookupSchema>;
|
|
109
|
-
|
|
110
|
-
/**
|
|
111
|
-
* Get deployment info by ID only (without requiring project ID).
|
|
112
|
-
* Useful for looking up region/project info for a deployment.
|
|
113
|
-
*/
|
|
114
|
-
export async function deploymentGet(
|
|
115
|
-
client: APIClient,
|
|
116
|
-
deploymentId: string
|
|
117
|
-
): Promise<DeploymentLookup> {
|
|
118
|
-
const resp = await client.get(`/cli/deployment/${deploymentId}`, DeploymentLookupResponseSchema);
|
|
119
|
-
if (resp.success) {
|
|
120
|
-
return resp.data;
|
|
121
|
-
}
|
|
122
|
-
throw new ProjectResponseError({ message: resp.message });
|
|
123
|
-
}
|
|
124
|
-
|
|
125
|
-
export async function projectDeploymentDelete(
|
|
126
|
-
client: APIClient,
|
|
127
|
-
projectId: string,
|
|
128
|
-
deploymentId: string
|
|
129
|
-
): Promise<void> {
|
|
130
|
-
const resp = await client.delete(
|
|
131
|
-
`/cli/project/${projectId}/deployments/${deploymentId}`,
|
|
132
|
-
DeploymentActionResponseSchema
|
|
133
|
-
);
|
|
134
|
-
if (!resp.success) {
|
|
135
|
-
throw new ProjectResponseError({ message: resp.message });
|
|
136
|
-
}
|
|
137
|
-
}
|
|
138
|
-
|
|
139
|
-
export async function projectDeploymentRollback(
|
|
140
|
-
client: APIClient,
|
|
141
|
-
projectId: string,
|
|
142
|
-
deploymentId: string
|
|
143
|
-
): Promise<void> {
|
|
144
|
-
const resp = await client.post(
|
|
145
|
-
`/cli/project/${projectId}/deployments/${deploymentId}/rollback`,
|
|
146
|
-
undefined,
|
|
147
|
-
DeploymentActionResponseSchema
|
|
148
|
-
);
|
|
149
|
-
if (!resp.success) {
|
|
150
|
-
throw new ProjectResponseError({ message: resp.message });
|
|
151
|
-
}
|
|
152
|
-
}
|
|
153
|
-
|
|
154
|
-
export async function projectDeploymentUndeploy(
|
|
155
|
-
client: APIClient,
|
|
156
|
-
projectId: string
|
|
157
|
-
): Promise<void> {
|
|
158
|
-
const resp = await client.post(
|
|
159
|
-
`/cli/project/${projectId}/deployments/undeploy`,
|
|
160
|
-
undefined,
|
|
161
|
-
DeploymentActionResponseSchema
|
|
162
|
-
);
|
|
163
|
-
if (!resp.success) {
|
|
164
|
-
throw new ProjectResponseError({ message: resp.message });
|
|
165
|
-
}
|
|
166
|
-
}
|
|
167
|
-
|
|
168
|
-
export const DeploymentLogSchema = z.object({
|
|
169
|
-
body: z.string(),
|
|
170
|
-
severity: z.string(),
|
|
171
|
-
timestamp: z.string(),
|
|
172
|
-
spanId: z.string(),
|
|
173
|
-
traceId: z.string(),
|
|
174
|
-
serviceName: z.string(),
|
|
175
|
-
});
|
|
176
|
-
|
|
177
|
-
export const DeploymentLogsResponseSchema = APIResponseSchema(z.array(DeploymentLogSchema));
|
|
178
|
-
|
|
179
|
-
export type DeploymentLog = z.infer<typeof DeploymentLogSchema>;
|
|
180
|
-
|
|
181
|
-
export async function projectDeploymentLogs(
|
|
182
|
-
client: APIClient,
|
|
183
|
-
projectId: string,
|
|
184
|
-
deploymentId: string,
|
|
185
|
-
limit = 100
|
|
186
|
-
): Promise<DeploymentLog[]> {
|
|
187
|
-
const resp = await client.get(
|
|
188
|
-
`/cli/project/${projectId}/deployments/${deploymentId}/logs?limit=${limit}`,
|
|
189
|
-
DeploymentLogsResponseSchema
|
|
190
|
-
);
|
|
191
|
-
if (resp.success) {
|
|
192
|
-
return resp.data;
|
|
193
|
-
}
|
|
194
|
-
throw new ProjectResponseError({ message: resp.message });
|
|
195
|
-
}
|
|
@@ -1,45 +0,0 @@
|
|
|
1
|
-
import { z } from 'zod';
|
|
2
|
-
import { type APIClient, APIResponseSchemaNoData } from '../api.ts';
|
|
3
|
-
import { ProjectResponseError } from './util.ts';
|
|
4
|
-
|
|
5
|
-
export const ProjectEnvDeleteRequestSchema = z
|
|
6
|
-
.object({
|
|
7
|
-
id: z.string().describe('the project id'),
|
|
8
|
-
env: z.array(z.string()).optional().describe('environment variable keys to delete'),
|
|
9
|
-
secrets: z.array(z.string()).optional().describe('secret keys to delete'),
|
|
10
|
-
})
|
|
11
|
-
.refine((data) => (data.env?.length ?? 0) > 0 || (data.secrets?.length ?? 0) > 0, {
|
|
12
|
-
message: 'must provide at least one of env or secrets',
|
|
13
|
-
});
|
|
14
|
-
|
|
15
|
-
export const ProjectEnvDeleteResponseSchema = APIResponseSchemaNoData();
|
|
16
|
-
|
|
17
|
-
type ProjectEnvDeleteRequest = z.infer<typeof ProjectEnvDeleteRequestSchema>;
|
|
18
|
-
type ProjectEnvDeleteResponse = z.infer<typeof ProjectEnvDeleteResponseSchema>;
|
|
19
|
-
|
|
20
|
-
/**
|
|
21
|
-
* Delete environment variables and/or secrets from a project.
|
|
22
|
-
* Provide arrays of keys to delete.
|
|
23
|
-
*/
|
|
24
|
-
export async function projectEnvDelete(
|
|
25
|
-
client: APIClient,
|
|
26
|
-
request: ProjectEnvDeleteRequest
|
|
27
|
-
): Promise<void> {
|
|
28
|
-
const { id, env, secrets } = request;
|
|
29
|
-
|
|
30
|
-
const resp = await client.request<ProjectEnvDeleteResponse, Omit<ProjectEnvDeleteRequest, 'id'>>(
|
|
31
|
-
'DELETE',
|
|
32
|
-
`/cli/project/${id}/env`,
|
|
33
|
-
ProjectEnvDeleteResponseSchema,
|
|
34
|
-
{
|
|
35
|
-
env,
|
|
36
|
-
secrets,
|
|
37
|
-
}
|
|
38
|
-
);
|
|
39
|
-
|
|
40
|
-
if (!resp.success) {
|
|
41
|
-
throw new ProjectResponseError({ message: resp.message ?? 'failed to delete project env' });
|
|
42
|
-
}
|
|
43
|
-
|
|
44
|
-
// Delete operations don't return data, success is sufficient
|
|
45
|
-
}
|