@cadenya/cadenya 0.134.0 → 1.0.0
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/README.md +86 -358
- package/api.md +781 -0
- package/dist/client.d.ts +69 -0
- package/dist/client.d.ts.map +1 -0
- package/dist/client.js +97 -0
- package/dist/client.js.map +1 -0
- package/dist/core/error.d.ts +39 -0
- package/dist/core/error.d.ts.map +1 -0
- package/dist/core/error.js +56 -0
- package/dist/core/error.js.map +1 -0
- package/dist/core/http.d.ts +140 -0
- package/dist/core/http.d.ts.map +1 -0
- package/dist/core/http.js +525 -0
- package/dist/core/http.js.map +1 -0
- package/dist/core/pagination.d.ts +12 -0
- package/dist/core/pagination.d.ts.map +1 -0
- package/dist/core/pagination.js +29 -0
- package/dist/core/pagination.js.map +1 -0
- package/dist/core/sse.d.ts +44 -0
- package/dist/core/sse.d.ts.map +1 -0
- package/dist/core/sse.js +350 -0
- package/dist/core/sse.js.map +1 -0
- package/dist/core/webhooks.d.ts +25 -0
- package/dist/core/webhooks.d.ts.map +1 -0
- package/dist/core/webhooks.js +124 -0
- package/dist/core/webhooks.js.map +1 -0
- package/dist/index.d.ts +35 -0
- package/dist/index.d.ts.map +1 -0
- package/dist/index.js +32 -0
- package/dist/index.js.map +1 -0
- package/dist/resources/accounts.d.ts +34 -0
- package/dist/resources/accounts.d.ts.map +1 -0
- package/dist/resources/accounts.js +47 -0
- package/dist/resources/accounts.js.map +1 -0
- package/dist/resources/agent-schedules.d.ts +186 -0
- package/dist/resources/agent-schedules.d.ts.map +1 -0
- package/dist/resources/agent-schedules.js +141 -0
- package/dist/resources/agent-schedules.js.map +1 -0
- package/dist/resources/agent-variations.d.ts +230 -0
- package/dist/resources/agent-variations.d.ts.map +1 -0
- package/dist/resources/agent-variations.js +174 -0
- package/dist/resources/agent-variations.js.map +1 -0
- package/dist/resources/agents.d.ts +318 -0
- package/dist/resources/agents.d.ts.map +1 -0
- package/dist/resources/agents.js +202 -0
- package/dist/resources/agents.js.map +1 -0
- package/dist/resources/ai-provider-keys.d.ts +141 -0
- package/dist/resources/ai-provider-keys.d.ts.map +1 -0
- package/dist/resources/ai-provider-keys.js +93 -0
- package/dist/resources/ai-provider-keys.js.map +1 -0
- package/dist/resources/api-keys.d.ts +222 -0
- package/dist/resources/api-keys.d.ts.map +1 -0
- package/dist/resources/api-keys.js +194 -0
- package/dist/resources/api-keys.js.map +1 -0
- package/dist/resources/memory-entries.d.ts +122 -0
- package/dist/resources/memory-entries.d.ts.map +1 -0
- package/dist/resources/memory-entries.js +93 -0
- package/dist/resources/memory-entries.js.map +1 -0
- package/dist/resources/memory-layers.d.ts +137 -0
- package/dist/resources/memory-layers.d.ts.map +1 -0
- package/dist/resources/memory-layers.js +97 -0
- package/dist/resources/memory-layers.js.map +1 -0
- package/dist/resources/models.d.ts +148 -0
- package/dist/resources/models.d.ts.map +1 -0
- package/dist/resources/models.js +93 -0
- package/dist/resources/models.js.map +1 -0
- package/dist/resources/objectives.d.ts +602 -0
- package/dist/resources/objectives.d.ts.map +1 -0
- package/dist/resources/objectives.js +356 -0
- package/dist/resources/objectives.js.map +1 -0
- package/dist/resources/profiles.d.ts +16 -0
- package/dist/resources/profiles.d.ts.map +1 -0
- package/dist/resources/profiles.js +21 -0
- package/dist/resources/profiles.js.map +1 -0
- package/dist/resources/tenants.d.ts +135 -0
- package/dist/resources/tenants.d.ts.map +1 -0
- package/dist/resources/tenants.js +80 -0
- package/dist/resources/tenants.js.map +1 -0
- package/dist/resources/tool-search.d.ts +27 -0
- package/dist/resources/tool-search.d.ts.map +1 -0
- package/dist/resources/tool-search.js +25 -0
- package/dist/resources/tool-search.js.map +1 -0
- package/dist/resources/tool-set-secrets.d.ts +128 -0
- package/dist/resources/tool-set-secrets.d.ts.map +1 -0
- package/dist/resources/tool-set-secrets.js +93 -0
- package/dist/resources/tool-set-secrets.js.map +1 -0
- package/dist/resources/tool-sets.d.ts +271 -0
- package/dist/resources/tool-sets.d.ts.map +1 -0
- package/dist/resources/tool-sets.js +185 -0
- package/dist/resources/tool-sets.js.map +1 -0
- package/dist/resources/tools.d.ts +178 -0
- package/dist/resources/tools.d.ts.map +1 -0
- package/dist/resources/tools.js +125 -0
- package/dist/resources/tools.js.map +1 -0
- package/dist/resources/uploads.d.ts +43 -0
- package/dist/resources/uploads.d.ts.map +1 -0
- package/dist/resources/uploads.js +41 -0
- package/dist/resources/uploads.js.map +1 -0
- package/dist/resources/widget-sessions.d.ts +168 -0
- package/dist/resources/widget-sessions.d.ts.map +1 -0
- package/dist/resources/widget-sessions.js +110 -0
- package/dist/resources/widget-sessions.js.map +1 -0
- package/dist/resources/widgets.d.ts +166 -0
- package/dist/resources/widgets.d.ts.map +1 -0
- package/dist/resources/widgets.js +125 -0
- package/dist/resources/widgets.js.map +1 -0
- package/dist/resources/workspace-admin.d.ts +214 -0
- package/dist/resources/workspace-admin.d.ts.map +1 -0
- package/dist/resources/workspace-admin.js +154 -0
- package/dist/resources/workspace-admin.js.map +1 -0
- package/dist/resources/workspace-secrets.d.ts +134 -0
- package/dist/resources/workspace-secrets.d.ts.map +1 -0
- package/dist/resources/workspace-secrets.js +93 -0
- package/dist/resources/workspace-secrets.js.map +1 -0
- package/dist/resources/workspaces.d.ts +44 -0
- package/dist/resources/workspaces.d.ts.map +1 -0
- package/dist/resources/workspaces.js +26 -0
- package/dist/resources/workspaces.js.map +1 -0
- package/dist/types.d.ts +4634 -0
- package/dist/types.d.ts.map +1 -0
- package/dist/types.js +103 -0
- package/dist/types.js.map +1 -0
- package/dist/webhooks.d.ts +93 -0
- package/dist/webhooks.d.ts.map +1 -0
- package/dist/webhooks.js +21 -0
- package/dist/webhooks.js.map +1 -0
- package/package.json +24 -165
- package/src/client.ts +124 -1504
- package/src/core/error.ts +50 -111
- package/src/core/http.ts +639 -0
- package/src/core/pagination.ts +16 -152
- package/src/core/sse.ts +338 -0
- package/src/core/webhooks.ts +141 -0
- package/src/index.ts +35 -22
- package/src/resources/accounts.ts +50 -0
- package/src/resources/agent-schedules.ts +251 -0
- package/src/resources/agent-variations.ts +312 -0
- package/src/resources/agents.ts +410 -2
- package/src/resources/ai-provider-keys.ts +119 -311
- package/src/resources/api-keys.ts +218 -277
- package/src/resources/memory-entries.ts +163 -0
- package/src/resources/memory-layers.ts +180 -2
- package/src/resources/models.ts +130 -229
- package/src/resources/objectives.ts +763 -2
- package/src/resources/profiles.ts +16 -14
- package/src/resources/tenants.ts +167 -2
- package/src/resources/tool-search.ts +36 -0
- package/src/resources/tool-set-secrets.ts +169 -0
- package/src/resources/tool-sets.ts +354 -2
- package/src/resources/tools.ts +235 -0
- package/src/resources/uploads.ts +42 -129
- package/src/resources/widget-sessions.ts +148 -439
- package/src/resources/widgets.ts +154 -248
- package/src/resources/workspace-admin.ts +280 -2
- package/src/resources/workspace-secrets.ts +120 -160
- package/src/resources/workspaces.ts +32 -77
- package/src/types.ts +5188 -0
- package/src/webhooks.ts +107 -0
- package/CHANGELOG.md +0 -1532
- package/api-promise.d.mts +0 -3
- package/api-promise.d.mts.map +0 -1
- package/api-promise.d.ts +0 -3
- package/api-promise.d.ts.map +0 -1
- package/api-promise.js +0 -6
- package/api-promise.js.map +0 -1
- package/api-promise.mjs +0 -3
- package/api-promise.mjs.map +0 -1
- package/client.d.mts +0 -335
- package/client.d.mts.map +0 -1
- package/client.d.ts +0 -335
- package/client.d.ts.map +0 -1
- package/client.js +0 -631
- package/client.js.map +0 -1
- package/client.mjs +0 -627
- package/client.mjs.map +0 -1
- package/core/api-promise.d.mts +0 -46
- package/core/api-promise.d.mts.map +0 -1
- package/core/api-promise.d.ts +0 -46
- package/core/api-promise.d.ts.map +0 -1
- package/core/api-promise.js +0 -74
- package/core/api-promise.js.map +0 -1
- package/core/api-promise.mjs +0 -70
- package/core/api-promise.mjs.map +0 -1
- package/core/error.d.mts +0 -46
- package/core/error.d.mts.map +0 -1
- package/core/error.d.ts +0 -46
- package/core/error.d.ts.map +0 -1
- package/core/error.js +0 -113
- package/core/error.js.map +0 -1
- package/core/error.mjs +0 -97
- package/core/error.mjs.map +0 -1
- package/core/pagination.d.mts +0 -59
- package/core/pagination.d.mts.map +0 -1
- package/core/pagination.d.ts +0 -59
- package/core/pagination.d.ts.map +0 -1
- package/core/pagination.js +0 -101
- package/core/pagination.js.map +0 -1
- package/core/pagination.mjs +0 -95
- package/core/pagination.mjs.map +0 -1
- package/core/resource.d.mts +0 -6
- package/core/resource.d.mts.map +0 -1
- package/core/resource.d.ts +0 -6
- package/core/resource.d.ts.map +0 -1
- package/core/resource.js +0 -11
- package/core/resource.js.map +0 -1
- package/core/resource.mjs +0 -7
- package/core/resource.mjs.map +0 -1
- package/core/streaming.d.mts +0 -33
- package/core/streaming.d.mts.map +0 -1
- package/core/streaming.d.ts +0 -33
- package/core/streaming.d.ts.map +0 -1
- package/core/streaming.js +0 -268
- package/core/streaming.js.map +0 -1
- package/core/streaming.mjs +0 -263
- package/core/streaming.mjs.map +0 -1
- package/core/uploads.d.mts +0 -3
- package/core/uploads.d.mts.map +0 -1
- package/core/uploads.d.ts +0 -3
- package/core/uploads.d.ts.map +0 -1
- package/core/uploads.js +0 -6
- package/core/uploads.js.map +0 -1
- package/core/uploads.mjs +0 -2
- package/core/uploads.mjs.map +0 -1
- package/error.d.mts +0 -3
- package/error.d.mts.map +0 -1
- package/error.d.ts +0 -3
- package/error.d.ts.map +0 -1
- package/error.js +0 -6
- package/error.js.map +0 -1
- package/error.mjs +0 -3
- package/error.mjs.map +0 -1
- package/index.d.mts +0 -7
- package/index.d.mts.map +0 -1
- package/index.d.ts +0 -7
- package/index.d.ts.map +0 -1
- package/index.js +0 -32
- package/index.js.map +0 -1
- package/index.mjs +0 -8
- package/index.mjs.map +0 -1
- package/internal/builtin-types.d.mts +0 -73
- package/internal/builtin-types.d.mts.map +0 -1
- package/internal/builtin-types.d.ts +0 -73
- package/internal/builtin-types.d.ts.map +0 -1
- package/internal/builtin-types.js +0 -4
- package/internal/builtin-types.js.map +0 -1
- package/internal/builtin-types.mjs +0 -3
- package/internal/builtin-types.mjs.map +0 -1
- package/internal/decoders/line.d.mts +0 -17
- package/internal/decoders/line.d.mts.map +0 -1
- package/internal/decoders/line.d.ts +0 -17
- package/internal/decoders/line.d.ts.map +0 -1
- package/internal/decoders/line.js +0 -113
- package/internal/decoders/line.js.map +0 -1
- package/internal/decoders/line.mjs +0 -108
- package/internal/decoders/line.mjs.map +0 -1
- package/internal/detect-platform.d.mts +0 -15
- package/internal/detect-platform.d.mts.map +0 -1
- package/internal/detect-platform.d.ts +0 -15
- package/internal/detect-platform.d.ts.map +0 -1
- package/internal/detect-platform.js +0 -162
- package/internal/detect-platform.js.map +0 -1
- package/internal/detect-platform.mjs +0 -157
- package/internal/detect-platform.mjs.map +0 -1
- package/internal/errors.d.mts +0 -3
- package/internal/errors.d.mts.map +0 -1
- package/internal/errors.d.ts +0 -3
- package/internal/errors.d.ts.map +0 -1
- package/internal/errors.js +0 -41
- package/internal/errors.js.map +0 -1
- package/internal/errors.mjs +0 -36
- package/internal/errors.mjs.map +0 -1
- package/internal/headers.d.mts +0 -20
- package/internal/headers.d.mts.map +0 -1
- package/internal/headers.d.ts +0 -20
- package/internal/headers.d.ts.map +0 -1
- package/internal/headers.js +0 -79
- package/internal/headers.js.map +0 -1
- package/internal/headers.mjs +0 -74
- package/internal/headers.mjs.map +0 -1
- package/internal/parse.d.mts +0 -12
- package/internal/parse.d.mts.map +0 -1
- package/internal/parse.d.ts +0 -12
- package/internal/parse.d.ts.map +0 -1
- package/internal/parse.js +0 -50
- package/internal/parse.js.map +0 -1
- package/internal/parse.mjs +0 -47
- package/internal/parse.mjs.map +0 -1
- package/internal/qs/formats.d.mts +0 -7
- package/internal/qs/formats.d.mts.map +0 -1
- package/internal/qs/formats.d.ts +0 -7
- package/internal/qs/formats.d.ts.map +0 -1
- package/internal/qs/formats.js +0 -13
- package/internal/qs/formats.js.map +0 -1
- package/internal/qs/formats.mjs +0 -9
- package/internal/qs/formats.mjs.map +0 -1
- package/internal/qs/index.d.mts +0 -10
- package/internal/qs/index.d.mts.map +0 -1
- package/internal/qs/index.d.ts +0 -10
- package/internal/qs/index.d.ts.map +0 -1
- package/internal/qs/index.js +0 -14
- package/internal/qs/index.js.map +0 -1
- package/internal/qs/index.mjs +0 -10
- package/internal/qs/index.mjs.map +0 -1
- package/internal/qs/stringify.d.mts +0 -3
- package/internal/qs/stringify.d.mts.map +0 -1
- package/internal/qs/stringify.d.ts +0 -3
- package/internal/qs/stringify.d.ts.map +0 -1
- package/internal/qs/stringify.js +0 -277
- package/internal/qs/stringify.js.map +0 -1
- package/internal/qs/stringify.mjs +0 -274
- package/internal/qs/stringify.mjs.map +0 -1
- package/internal/qs/types.d.mts +0 -57
- package/internal/qs/types.d.mts.map +0 -1
- package/internal/qs/types.d.ts +0 -57
- package/internal/qs/types.d.ts.map +0 -1
- package/internal/qs/types.js +0 -3
- package/internal/qs/types.js.map +0 -1
- package/internal/qs/types.mjs +0 -2
- package/internal/qs/types.mjs.map +0 -1
- package/internal/qs/utils.d.mts +0 -15
- package/internal/qs/utils.d.mts.map +0 -1
- package/internal/qs/utils.d.ts +0 -15
- package/internal/qs/utils.d.ts.map +0 -1
- package/internal/qs/utils.js +0 -230
- package/internal/qs/utils.js.map +0 -1
- package/internal/qs/utils.mjs +0 -217
- package/internal/qs/utils.mjs.map +0 -1
- package/internal/request-options.d.mts +0 -77
- package/internal/request-options.d.mts.map +0 -1
- package/internal/request-options.d.ts +0 -77
- package/internal/request-options.d.ts.map +0 -1
- package/internal/request-options.js +0 -14
- package/internal/request-options.js.map +0 -1
- package/internal/request-options.mjs +0 -10
- package/internal/request-options.mjs.map +0 -1
- package/internal/shim-types.d.mts +0 -17
- package/internal/shim-types.d.mts.map +0 -1
- package/internal/shim-types.d.ts +0 -17
- package/internal/shim-types.d.ts.map +0 -1
- package/internal/shim-types.js +0 -4
- package/internal/shim-types.js.map +0 -1
- package/internal/shim-types.mjs +0 -3
- package/internal/shim-types.mjs.map +0 -1
- package/internal/shims.d.mts +0 -26
- package/internal/shims.d.mts.map +0 -1
- package/internal/shims.d.ts +0 -26
- package/internal/shims.d.ts.map +0 -1
- package/internal/shims.js +0 -92
- package/internal/shims.js.map +0 -1
- package/internal/shims.mjs +0 -85
- package/internal/shims.mjs.map +0 -1
- package/internal/to-file.d.mts +0 -45
- package/internal/to-file.d.mts.map +0 -1
- package/internal/to-file.d.ts +0 -45
- package/internal/to-file.d.ts.map +0 -1
- package/internal/to-file.js +0 -91
- package/internal/to-file.js.map +0 -1
- package/internal/to-file.mjs +0 -88
- package/internal/to-file.mjs.map +0 -1
- package/internal/tslib.js +0 -81
- package/internal/tslib.mjs +0 -17
- package/internal/types.d.mts +0 -69
- package/internal/types.d.mts.map +0 -1
- package/internal/types.d.ts +0 -69
- package/internal/types.d.ts.map +0 -1
- package/internal/types.js +0 -4
- package/internal/types.js.map +0 -1
- package/internal/types.mjs +0 -3
- package/internal/types.mjs.map +0 -1
- package/internal/uploads.d.mts +0 -42
- package/internal/uploads.d.mts.map +0 -1
- package/internal/uploads.d.ts +0 -42
- package/internal/uploads.d.ts.map +0 -1
- package/internal/uploads.js +0 -141
- package/internal/uploads.js.map +0 -1
- package/internal/uploads.mjs +0 -131
- package/internal/uploads.mjs.map +0 -1
- package/internal/utils/base64.d.mts +0 -3
- package/internal/utils/base64.d.mts.map +0 -1
- package/internal/utils/base64.d.ts +0 -3
- package/internal/utils/base64.d.ts.map +0 -1
- package/internal/utils/base64.js +0 -38
- package/internal/utils/base64.js.map +0 -1
- package/internal/utils/base64.mjs +0 -33
- package/internal/utils/base64.mjs.map +0 -1
- package/internal/utils/bytes.d.mts +0 -4
- package/internal/utils/bytes.d.mts.map +0 -1
- package/internal/utils/bytes.d.ts +0 -4
- package/internal/utils/bytes.d.ts.map +0 -1
- package/internal/utils/bytes.js +0 -31
- package/internal/utils/bytes.js.map +0 -1
- package/internal/utils/bytes.mjs +0 -26
- package/internal/utils/bytes.mjs.map +0 -1
- package/internal/utils/env.d.mts +0 -9
- package/internal/utils/env.d.mts.map +0 -1
- package/internal/utils/env.d.ts +0 -9
- package/internal/utils/env.d.ts.map +0 -1
- package/internal/utils/env.js +0 -22
- package/internal/utils/env.js.map +0 -1
- package/internal/utils/env.mjs +0 -18
- package/internal/utils/env.mjs.map +0 -1
- package/internal/utils/log.d.mts +0 -37
- package/internal/utils/log.d.mts.map +0 -1
- package/internal/utils/log.d.ts +0 -37
- package/internal/utils/log.d.ts.map +0 -1
- package/internal/utils/log.js +0 -87
- package/internal/utils/log.js.map +0 -1
- package/internal/utils/log.mjs +0 -81
- package/internal/utils/log.mjs.map +0 -1
- package/internal/utils/path.d.mts +0 -15
- package/internal/utils/path.d.mts.map +0 -1
- package/internal/utils/path.d.ts +0 -15
- package/internal/utils/path.d.ts.map +0 -1
- package/internal/utils/path.js +0 -79
- package/internal/utils/path.js.map +0 -1
- package/internal/utils/path.mjs +0 -74
- package/internal/utils/path.mjs.map +0 -1
- package/internal/utils/query.d.mts +0 -2
- package/internal/utils/query.d.mts.map +0 -1
- package/internal/utils/query.d.ts +0 -2
- package/internal/utils/query.d.ts.map +0 -1
- package/internal/utils/query.js +0 -10
- package/internal/utils/query.js.map +0 -1
- package/internal/utils/query.mjs +0 -6
- package/internal/utils/query.mjs.map +0 -1
- package/internal/utils/sleep.d.mts +0 -2
- package/internal/utils/sleep.d.mts.map +0 -1
- package/internal/utils/sleep.d.ts +0 -2
- package/internal/utils/sleep.d.ts.map +0 -1
- package/internal/utils/sleep.js +0 -7
- package/internal/utils/sleep.js.map +0 -1
- package/internal/utils/sleep.mjs +0 -3
- package/internal/utils/sleep.mjs.map +0 -1
- package/internal/utils/uuid.d.mts +0 -5
- package/internal/utils/uuid.d.mts.map +0 -1
- package/internal/utils/uuid.d.ts +0 -5
- package/internal/utils/uuid.d.ts.map +0 -1
- package/internal/utils/uuid.js +0 -19
- package/internal/utils/uuid.js.map +0 -1
- package/internal/utils/uuid.mjs +0 -15
- package/internal/utils/uuid.mjs.map +0 -1
- package/internal/utils/values.d.mts +0 -18
- package/internal/utils/values.d.mts.map +0 -1
- package/internal/utils/values.d.ts +0 -18
- package/internal/utils/values.d.ts.map +0 -1
- package/internal/utils/values.js +0 -112
- package/internal/utils/values.js.map +0 -1
- package/internal/utils/values.mjs +0 -94
- package/internal/utils/values.mjs.map +0 -1
- package/internal/utils.d.mts +0 -8
- package/internal/utils.d.mts.map +0 -1
- package/internal/utils.d.ts +0 -8
- package/internal/utils.d.ts.map +0 -1
- package/internal/utils.js +0 -12
- package/internal/utils.js.map +0 -1
- package/internal/utils.mjs +0 -9
- package/internal/utils.mjs.map +0 -1
- package/pagination.d.mts +0 -3
- package/pagination.d.mts.map +0 -1
- package/pagination.d.ts +0 -3
- package/pagination.d.ts.map +0 -1
- package/pagination.js +0 -6
- package/pagination.js.map +0 -1
- package/pagination.mjs +0 -3
- package/pagination.mjs.map +0 -1
- package/resource.d.mts +0 -3
- package/resource.d.mts.map +0 -1
- package/resource.d.ts +0 -3
- package/resource.d.ts.map +0 -1
- package/resource.js +0 -6
- package/resource.js.map +0 -1
- package/resource.mjs +0 -3
- package/resource.mjs.map +0 -1
- package/resources/account.d.mts +0 -124
- package/resources/account.d.mts.map +0 -1
- package/resources/account.d.ts +0 -124
- package/resources/account.d.ts.map +0 -1
- package/resources/account.js +0 -33
- package/resources/account.js.map +0 -1
- package/resources/account.mjs +0 -29
- package/resources/account.mjs.map +0 -1
- package/resources/agents/agents.d.mts +0 -379
- package/resources/agents/agents.d.mts.map +0 -1
- package/resources/agents/agents.d.ts +0 -379
- package/resources/agents/agents.d.ts.map +0 -1
- package/resources/agents/agents.js +0 -192
- package/resources/agents/agents.js.map +0 -1
- package/resources/agents/agents.mjs +0 -187
- package/resources/agents/agents.mjs.map +0 -1
- package/resources/agents/feedback.d.mts +0 -71
- package/resources/agents/feedback.d.mts.map +0 -1
- package/resources/agents/feedback.d.ts +0 -71
- package/resources/agents/feedback.d.ts.map +0 -1
- package/resources/agents/feedback.js +0 -34
- package/resources/agents/feedback.js.map +0 -1
- package/resources/agents/feedback.mjs +0 -30
- package/resources/agents/feedback.mjs.map +0 -1
- package/resources/agents/index.d.mts +0 -6
- package/resources/agents/index.d.mts.map +0 -1
- package/resources/agents/index.d.ts +0 -6
- package/resources/agents/index.d.ts.map +0 -1
- package/resources/agents/index.js +0 -15
- package/resources/agents/index.js.map +0 -1
- package/resources/agents/index.mjs +0 -7
- package/resources/agents/index.mjs.map +0 -1
- package/resources/agents/schedules.d.mts +0 -383
- package/resources/agents/schedules.d.mts.map +0 -1
- package/resources/agents/schedules.d.ts +0 -383
- package/resources/agents/schedules.d.ts.map +0 -1
- package/resources/agents/schedules.js +0 -172
- package/resources/agents/schedules.js.map +0 -1
- package/resources/agents/schedules.mjs +0 -168
- package/resources/agents/schedules.mjs.map +0 -1
- package/resources/agents/variations.d.mts +0 -682
- package/resources/agents/variations.d.mts.map +0 -1
- package/resources/agents/variations.d.ts +0 -682
- package/resources/agents/variations.d.ts.map +0 -1
- package/resources/agents/variations.js +0 -209
- package/resources/agents/variations.js.map +0 -1
- package/resources/agents/variations.mjs +0 -205
- package/resources/agents/variations.mjs.map +0 -1
- package/resources/agents/webhook-deliveries.d.mts +0 -96
- package/resources/agents/webhook-deliveries.d.mts.map +0 -1
- package/resources/agents/webhook-deliveries.d.ts +0 -96
- package/resources/agents/webhook-deliveries.d.ts.map +0 -1
- package/resources/agents/webhook-deliveries.js +0 -32
- package/resources/agents/webhook-deliveries.js.map +0 -1
- package/resources/agents/webhook-deliveries.mjs +0 -28
- package/resources/agents/webhook-deliveries.mjs.map +0 -1
- package/resources/agents.d.mts +0 -2
- package/resources/agents.d.mts.map +0 -1
- package/resources/agents.d.ts +0 -2
- package/resources/agents.d.ts.map +0 -1
- package/resources/agents.js +0 -6
- package/resources/agents.js.map +0 -1
- package/resources/agents.mjs +0 -3
- package/resources/agents.mjs.map +0 -1
- package/resources/ai-provider-keys.d.mts +0 -269
- package/resources/ai-provider-keys.d.mts.map +0 -1
- package/resources/ai-provider-keys.d.ts +0 -269
- package/resources/ai-provider-keys.d.ts.map +0 -1
- package/resources/ai-provider-keys.js +0 -53
- package/resources/ai-provider-keys.js.map +0 -1
- package/resources/ai-provider-keys.mjs +0 -49
- package/resources/ai-provider-keys.mjs.map +0 -1
- package/resources/api-keys.d.mts +0 -268
- package/resources/api-keys.d.mts.map +0 -1
- package/resources/api-keys.d.ts +0 -268
- package/resources/api-keys.d.ts.map +0 -1
- package/resources/api-keys.js +0 -84
- package/resources/api-keys.js.map +0 -1
- package/resources/api-keys.mjs +0 -80
- package/resources/api-keys.mjs.map +0 -1
- package/resources/global-api-key.d.mts +0 -33
- package/resources/global-api-key.d.mts.map +0 -1
- package/resources/global-api-key.d.ts +0 -33
- package/resources/global-api-key.d.ts.map +0 -1
- package/resources/global-api-key.js +0 -43
- package/resources/global-api-key.js.map +0 -1
- package/resources/global-api-key.mjs +0 -39
- package/resources/global-api-key.mjs.map +0 -1
- package/resources/index.d.mts +0 -21
- package/resources/index.d.mts.map +0 -1
- package/resources/index.d.ts +0 -21
- package/resources/index.d.ts.map +0 -1
- package/resources/index.js +0 -45
- package/resources/index.js.map +0 -1
- package/resources/index.mjs +0 -22
- package/resources/index.mjs.map +0 -1
- package/resources/memory-layers/entries.d.mts +0 -257
- package/resources/memory-layers/entries.d.mts.map +0 -1
- package/resources/memory-layers/entries.d.ts +0 -257
- package/resources/memory-layers/entries.d.ts.map +0 -1
- package/resources/memory-layers/entries.js +0 -59
- package/resources/memory-layers/entries.js.map +0 -1
- package/resources/memory-layers/entries.mjs +0 -55
- package/resources/memory-layers/entries.mjs.map +0 -1
- package/resources/memory-layers/index.d.mts +0 -3
- package/resources/memory-layers/index.d.mts.map +0 -1
- package/resources/memory-layers/index.d.ts +0 -3
- package/resources/memory-layers/index.d.ts.map +0 -1
- package/resources/memory-layers/index.js +0 -9
- package/resources/memory-layers/index.js.map +0 -1
- package/resources/memory-layers/index.mjs +0 -4
- package/resources/memory-layers/index.mjs.map +0 -1
- package/resources/memory-layers/memory-layers.d.mts +0 -196
- package/resources/memory-layers/memory-layers.d.mts.map +0 -1
- package/resources/memory-layers/memory-layers.d.ts +0 -196
- package/resources/memory-layers/memory-layers.d.ts.map +0 -1
- package/resources/memory-layers/memory-layers.js +0 -64
- package/resources/memory-layers/memory-layers.js.map +0 -1
- package/resources/memory-layers/memory-layers.mjs +0 -59
- package/resources/memory-layers/memory-layers.mjs.map +0 -1
- package/resources/memory-layers.d.mts +0 -2
- package/resources/memory-layers.d.mts.map +0 -1
- package/resources/memory-layers.d.ts +0 -2
- package/resources/memory-layers.d.ts.map +0 -1
- package/resources/memory-layers.js +0 -6
- package/resources/memory-layers.js.map +0 -1
- package/resources/memory-layers.mjs +0 -3
- package/resources/memory-layers.mjs.map +0 -1
- package/resources/models.d.mts +0 -209
- package/resources/models.d.mts.map +0 -1
- package/resources/models.d.ts +0 -209
- package/resources/models.d.ts.map +0 -1
- package/resources/models.js +0 -60
- package/resources/models.js.map +0 -1
- package/resources/models.mjs +0 -56
- package/resources/models.mjs.map +0 -1
- package/resources/objectives/feedback.d.mts +0 -126
- package/resources/objectives/feedback.d.mts.map +0 -1
- package/resources/objectives/feedback.d.ts +0 -126
- package/resources/objectives/feedback.d.ts.map +0 -1
- package/resources/objectives/feedback.js +0 -53
- package/resources/objectives/feedback.js.map +0 -1
- package/resources/objectives/feedback.mjs +0 -49
- package/resources/objectives/feedback.mjs.map +0 -1
- package/resources/objectives/index.d.mts +0 -6
- package/resources/objectives/index.d.mts.map +0 -1
- package/resources/objectives/index.d.ts +0 -6
- package/resources/objectives/index.d.ts.map +0 -1
- package/resources/objectives/index.js +0 -15
- package/resources/objectives/index.js.map +0 -1
- package/resources/objectives/index.mjs +0 -7
- package/resources/objectives/index.mjs.map +0 -1
- package/resources/objectives/objectives.d.mts +0 -1280
- package/resources/objectives/objectives.d.mts.map +0 -1
- package/resources/objectives/objectives.d.ts +0 -1280
- package/resources/objectives/objectives.d.ts.map +0 -1
- package/resources/objectives/objectives.js +0 -214
- package/resources/objectives/objectives.js.map +0 -1
- package/resources/objectives/objectives.mjs +0 -209
- package/resources/objectives/objectives.mjs.map +0 -1
- package/resources/objectives/tasks.d.mts +0 -88
- package/resources/objectives/tasks.d.mts.map +0 -1
- package/resources/objectives/tasks.d.ts +0 -88
- package/resources/objectives/tasks.d.ts.map +0 -1
- package/resources/objectives/tasks.js +0 -46
- package/resources/objectives/tasks.js.map +0 -1
- package/resources/objectives/tasks.mjs +0 -42
- package/resources/objectives/tasks.mjs.map +0 -1
- package/resources/objectives/tool-calls.d.mts +0 -379
- package/resources/objectives/tool-calls.d.mts.map +0 -1
- package/resources/objectives/tool-calls.d.ts +0 -379
- package/resources/objectives/tool-calls.d.ts.map +0 -1
- package/resources/objectives/tool-calls.js +0 -111
- package/resources/objectives/tool-calls.js.map +0 -1
- package/resources/objectives/tool-calls.mjs +0 -107
- package/resources/objectives/tool-calls.mjs.map +0 -1
- package/resources/objectives/tools.d.mts +0 -53
- package/resources/objectives/tools.d.mts.map +0 -1
- package/resources/objectives/tools.d.ts +0 -53
- package/resources/objectives/tools.d.ts.map +0 -1
- package/resources/objectives/tools.js +0 -29
- package/resources/objectives/tools.js.map +0 -1
- package/resources/objectives/tools.mjs +0 -25
- package/resources/objectives/tools.mjs.map +0 -1
- package/resources/objectives.d.mts +0 -2
- package/resources/objectives.d.mts.map +0 -1
- package/resources/objectives.d.ts +0 -2
- package/resources/objectives.d.ts.map +0 -1
- package/resources/objectives.js +0 -6
- package/resources/objectives.js.map +0 -1
- package/resources/objectives.mjs +0 -3
- package/resources/objectives.mjs.map +0 -1
- package/resources/profiles.d.mts +0 -16
- package/resources/profiles.d.mts.map +0 -1
- package/resources/profiles.d.ts +0 -16
- package/resources/profiles.d.ts.map +0 -1
- package/resources/profiles.js +0 -20
- package/resources/profiles.js.map +0 -1
- package/resources/profiles.mjs +0 -16
- package/resources/profiles.mjs.map +0 -1
- package/resources/search.d.mts +0 -33
- package/resources/search.d.mts.map +0 -1
- package/resources/search.d.ts +0 -33
- package/resources/search.d.ts.map +0 -1
- package/resources/search.js +0 -20
- package/resources/search.js.map +0 -1
- package/resources/search.mjs +0 -16
- package/resources/search.mjs.map +0 -1
- package/resources/shared.d.mts +0 -215
- package/resources/shared.d.mts.map +0 -1
- package/resources/shared.d.ts +0 -215
- package/resources/shared.d.ts.map +0 -1
- package/resources/shared.js +0 -4
- package/resources/shared.js.map +0 -1
- package/resources/shared.mjs +0 -3
- package/resources/shared.mjs.map +0 -1
- package/resources/tenants/index.d.mts +0 -3
- package/resources/tenants/index.d.mts.map +0 -1
- package/resources/tenants/index.d.ts +0 -3
- package/resources/tenants/index.d.ts.map +0 -1
- package/resources/tenants/index.js +0 -9
- package/resources/tenants/index.js.map +0 -1
- package/resources/tenants/index.mjs +0 -4
- package/resources/tenants/index.mjs.map +0 -1
- package/resources/tenants/subjects.d.mts +0 -43
- package/resources/tenants/subjects.d.mts.map +0 -1
- package/resources/tenants/subjects.d.ts +0 -43
- package/resources/tenants/subjects.d.ts.map +0 -1
- package/resources/tenants/subjects.js +0 -27
- package/resources/tenants/subjects.js.map +0 -1
- package/resources/tenants/subjects.mjs +0 -23
- package/resources/tenants/subjects.mjs.map +0 -1
- package/resources/tenants/tenants.d.mts +0 -158
- package/resources/tenants/tenants.d.mts.map +0 -1
- package/resources/tenants/tenants.d.ts +0 -158
- package/resources/tenants/tenants.d.ts.map +0 -1
- package/resources/tenants/tenants.js +0 -58
- package/resources/tenants/tenants.js.map +0 -1
- package/resources/tenants/tenants.mjs +0 -53
- package/resources/tenants/tenants.mjs.map +0 -1
- package/resources/tenants.d.mts +0 -2
- package/resources/tenants.d.mts.map +0 -1
- package/resources/tenants.d.ts +0 -2
- package/resources/tenants.d.ts.map +0 -1
- package/resources/tenants.js +0 -6
- package/resources/tenants.js.map +0 -1
- package/resources/tenants.mjs +0 -3
- package/resources/tenants.mjs.map +0 -1
- package/resources/tool-sets/index.d.mts +0 -4
- package/resources/tool-sets/index.d.mts.map +0 -1
- package/resources/tool-sets/index.d.ts +0 -4
- package/resources/tool-sets/index.d.ts.map +0 -1
- package/resources/tool-sets/index.js +0 -11
- package/resources/tool-sets/index.js.map +0 -1
- package/resources/tool-sets/index.mjs +0 -5
- package/resources/tool-sets/index.mjs.map +0 -1
- package/resources/tool-sets/secrets.d.mts +0 -135
- package/resources/tool-sets/secrets.d.mts.map +0 -1
- package/resources/tool-sets/secrets.d.ts +0 -135
- package/resources/tool-sets/secrets.d.ts.map +0 -1
- package/resources/tool-sets/secrets.js +0 -63
- package/resources/tool-sets/secrets.js.map +0 -1
- package/resources/tool-sets/secrets.mjs +0 -59
- package/resources/tool-sets/secrets.mjs.map +0 -1
- package/resources/tool-sets/tool-sets.d.mts +0 -595
- package/resources/tool-sets/tool-sets.d.mts.map +0 -1
- package/resources/tool-sets/tool-sets.d.ts +0 -595
- package/resources/tool-sets/tool-sets.d.ts.map +0 -1
- package/resources/tool-sets/tool-sets.js +0 -123
- package/resources/tool-sets/tool-sets.js.map +0 -1
- package/resources/tool-sets/tool-sets.mjs +0 -118
- package/resources/tool-sets/tool-sets.mjs.map +0 -1
- package/resources/tool-sets/tools.d.mts +0 -305
- package/resources/tool-sets/tools.d.mts.map +0 -1
- package/resources/tool-sets/tools.d.ts +0 -305
- package/resources/tool-sets/tools.d.ts.map +0 -1
- package/resources/tool-sets/tools.js +0 -85
- package/resources/tool-sets/tools.js.map +0 -1
- package/resources/tool-sets/tools.mjs +0 -81
- package/resources/tool-sets/tools.mjs.map +0 -1
- package/resources/tool-sets.d.mts +0 -2
- package/resources/tool-sets.d.mts.map +0 -1
- package/resources/tool-sets.d.ts +0 -2
- package/resources/tool-sets.d.ts.map +0 -1
- package/resources/tool-sets.js +0 -6
- package/resources/tool-sets.js.map +0 -1
- package/resources/tool-sets.mjs +0 -3
- package/resources/tool-sets.mjs.map +0 -1
- package/resources/uploads.d.mts +0 -107
- package/resources/uploads.d.mts.map +0 -1
- package/resources/uploads.d.ts +0 -107
- package/resources/uploads.d.ts.map +0 -1
- package/resources/uploads.js +0 -31
- package/resources/uploads.js.map +0 -1
- package/resources/uploads.mjs +0 -27
- package/resources/uploads.mjs.map +0 -1
- package/resources/webhooks.d.mts +0 -92
- package/resources/webhooks.d.mts.map +0 -1
- package/resources/webhooks.d.ts +0 -92
- package/resources/webhooks.d.ts.map +0 -1
- package/resources/webhooks.js +0 -23
- package/resources/webhooks.js.map +0 -1
- package/resources/webhooks.mjs +0 -19
- package/resources/webhooks.mjs.map +0 -1
- package/resources/widget-sessions.d.mts +0 -388
- package/resources/widget-sessions.d.mts.map +0 -1
- package/resources/widget-sessions.d.ts +0 -388
- package/resources/widget-sessions.d.ts.map +0 -1
- package/resources/widget-sessions.js +0 -79
- package/resources/widget-sessions.js.map +0 -1
- package/resources/widget-sessions.mjs +0 -75
- package/resources/widget-sessions.mjs.map +0 -1
- package/resources/widgets.d.mts +0 -225
- package/resources/widgets.d.mts.map +0 -1
- package/resources/widgets.d.ts +0 -225
- package/resources/widgets.d.ts.map +0 -1
- package/resources/widgets.js +0 -83
- package/resources/widgets.js.map +0 -1
- package/resources/widgets.mjs +0 -79
- package/resources/widgets.mjs.map +0 -1
- package/resources/workspace-admin/index.d.mts +0 -4
- package/resources/workspace-admin/index.d.mts.map +0 -1
- package/resources/workspace-admin/index.d.ts +0 -4
- package/resources/workspace-admin/index.d.ts.map +0 -1
- package/resources/workspace-admin/index.js +0 -11
- package/resources/workspace-admin/index.js.map +0 -1
- package/resources/workspace-admin/index.mjs +0 -5
- package/resources/workspace-admin/index.mjs.map +0 -1
- package/resources/workspace-admin/members.d.mts +0 -90
- package/resources/workspace-admin/members.d.mts.map +0 -1
- package/resources/workspace-admin/members.d.ts +0 -90
- package/resources/workspace-admin/members.d.ts.map +0 -1
- package/resources/workspace-admin/members.js +0 -74
- package/resources/workspace-admin/members.js.map +0 -1
- package/resources/workspace-admin/members.mjs +0 -70
- package/resources/workspace-admin/members.mjs.map +0 -1
- package/resources/workspace-admin/profiles.d.mts +0 -46
- package/resources/workspace-admin/profiles.d.mts.map +0 -1
- package/resources/workspace-admin/profiles.d.ts +0 -46
- package/resources/workspace-admin/profiles.d.ts.map +0 -1
- package/resources/workspace-admin/profiles.js +0 -36
- package/resources/workspace-admin/profiles.js.map +0 -1
- package/resources/workspace-admin/profiles.mjs +0 -32
- package/resources/workspace-admin/profiles.mjs.map +0 -1
- package/resources/workspace-admin/workspace-admin.d.mts +0 -227
- package/resources/workspace-admin/workspace-admin.d.mts.map +0 -1
- package/resources/workspace-admin/workspace-admin.d.ts +0 -227
- package/resources/workspace-admin/workspace-admin.d.ts.map +0 -1
- package/resources/workspace-admin/workspace-admin.js +0 -112
- package/resources/workspace-admin/workspace-admin.js.map +0 -1
- package/resources/workspace-admin/workspace-admin.mjs +0 -107
- package/resources/workspace-admin/workspace-admin.mjs.map +0 -1
- package/resources/workspace-admin.d.mts +0 -2
- package/resources/workspace-admin.d.mts.map +0 -1
- package/resources/workspace-admin.d.ts +0 -2
- package/resources/workspace-admin.d.ts.map +0 -1
- package/resources/workspace-admin.js +0 -6
- package/resources/workspace-admin.js.map +0 -1
- package/resources/workspace-admin.mjs +0 -3
- package/resources/workspace-admin.mjs.map +0 -1
- package/resources/workspace-secrets.d.mts +0 -134
- package/resources/workspace-secrets.d.mts.map +0 -1
- package/resources/workspace-secrets.d.ts +0 -134
- package/resources/workspace-secrets.d.ts.map +0 -1
- package/resources/workspace-secrets.js +0 -53
- package/resources/workspace-secrets.js.map +0 -1
- package/resources/workspace-secrets.mjs +0 -49
- package/resources/workspace-secrets.mjs.map +0 -1
- package/resources/workspaces.d.mts +0 -70
- package/resources/workspaces.d.mts.map +0 -1
- package/resources/workspaces.d.ts +0 -70
- package/resources/workspaces.d.ts.map +0 -1
- package/resources/workspaces.js +0 -24
- package/resources/workspaces.js.map +0 -1
- package/resources/workspaces.mjs +0 -20
- package/resources/workspaces.mjs.map +0 -1
- package/resources.d.mts +0 -2
- package/resources.d.mts.map +0 -1
- package/resources.d.ts +0 -2
- package/resources.d.ts.map +0 -1
- package/resources.js +0 -5
- package/resources.js.map +0 -1
- package/resources.mjs +0 -2
- package/resources.mjs.map +0 -1
- package/src/api-promise.ts +0 -2
- package/src/core/README.md +0 -3
- package/src/core/api-promise.ts +0 -92
- package/src/core/resource.ts +0 -11
- package/src/core/streaming.ts +0 -319
- package/src/core/uploads.ts +0 -2
- package/src/error.ts +0 -2
- package/src/internal/README.md +0 -3
- package/src/internal/builtin-types.ts +0 -93
- package/src/internal/decoders/line.ts +0 -135
- package/src/internal/detect-platform.ts +0 -196
- package/src/internal/errors.ts +0 -33
- package/src/internal/headers.ts +0 -97
- package/src/internal/parse.ts +0 -70
- package/src/internal/qs/LICENSE.md +0 -13
- package/src/internal/qs/README.md +0 -3
- package/src/internal/qs/formats.ts +0 -10
- package/src/internal/qs/index.ts +0 -13
- package/src/internal/qs/stringify.ts +0 -385
- package/src/internal/qs/types.ts +0 -71
- package/src/internal/qs/utils.ts +0 -265
- package/src/internal/request-options.ts +0 -93
- package/src/internal/shim-types.ts +0 -26
- package/src/internal/shims.ts +0 -107
- package/src/internal/to-file.ts +0 -154
- package/src/internal/types.ts +0 -93
- package/src/internal/uploads.ts +0 -187
- package/src/internal/utils/base64.ts +0 -40
- package/src/internal/utils/bytes.ts +0 -32
- package/src/internal/utils/env.ts +0 -18
- package/src/internal/utils/log.ts +0 -128
- package/src/internal/utils/path.ts +0 -88
- package/src/internal/utils/query.ts +0 -7
- package/src/internal/utils/sleep.ts +0 -3
- package/src/internal/utils/uuid.ts +0 -17
- package/src/internal/utils/values.ts +0 -105
- package/src/internal/utils.ts +0 -9
- package/src/lib/.keep +0 -4
- package/src/pagination.ts +0 -2
- package/src/resource.ts +0 -2
- package/src/resources/account.ts +0 -160
- package/src/resources/agents/agents.ts +0 -618
- package/src/resources/agents/feedback.ts +0 -98
- package/src/resources/agents/index.ts +0 -77
- package/src/resources/agents/schedules.ts +0 -543
- package/src/resources/agents/variations.ts +0 -931
- package/src/resources/agents/webhook-deliveries.ts +0 -178
- package/src/resources/global-api-key.ts +0 -46
- package/src/resources/index.ts +0 -294
- package/src/resources/memory-layers/entries.ts +0 -375
- package/src/resources/memory-layers/index.ts +0 -31
- package/src/resources/memory-layers/memory-layers.ts +0 -316
- package/src/resources/objectives/feedback.ts +0 -173
- package/src/resources/objectives/index.ts +0 -117
- package/src/resources/objectives/objectives.ts +0 -1789
- package/src/resources/objectives/tasks.ts +0 -131
- package/src/resources/objectives/tool-calls.ts +0 -574
- package/src/resources/objectives/tools.ts +0 -76
- package/src/resources/search.ts +0 -54
- package/src/resources/shared.ts +0 -236
- package/src/resources/tenants/index.ts +0 -15
- package/src/resources/tenants/subjects.ts +0 -63
- package/src/resources/tenants/tenants.ts +0 -220
- package/src/resources/tool-sets/index.ts +0 -89
- package/src/resources/tool-sets/secrets.ts +0 -225
- package/src/resources/tool-sets/tool-sets.ts +0 -936
- package/src/resources/tool-sets/tools.ts +0 -458
- package/src/resources/webhooks.ts +0 -124
- package/src/resources/workspace-admin/index.ts +0 -14
- package/src/resources/workspace-admin/members.ts +0 -133
- package/src/resources/workspace-admin/profiles.ts +0 -60
- package/src/resources/workspace-admin/workspace-admin.ts +0 -304
- package/src/resources.ts +0 -1
- package/src/streaming.ts +0 -2
- package/src/tsconfig.json +0 -11
- package/src/uploads.ts +0 -2
- package/src/version.ts +0 -1
- package/streaming.d.mts +0 -3
- package/streaming.d.mts.map +0 -1
- package/streaming.d.ts +0 -3
- package/streaming.d.ts.map +0 -1
- package/streaming.js +0 -6
- package/streaming.js.map +0 -1
- package/streaming.mjs +0 -3
- package/streaming.mjs.map +0 -1
- package/uploads.d.mts +0 -3
- package/uploads.d.mts.map +0 -1
- package/uploads.d.ts +0 -3
- package/uploads.d.ts.map +0 -1
- package/uploads.js +0 -6
- package/uploads.js.map +0 -1
- package/uploads.mjs +0 -3
- package/uploads.mjs.map +0 -1
- package/version.d.mts +0 -2
- package/version.d.mts.map +0 -1
- package/version.d.ts +0 -2
- package/version.d.ts.map +0 -1
- package/version.js +0 -5
- package/version.js.map +0 -1
- package/version.mjs +0 -2
- package/version.mjs.map +0 -1
|
@@ -0,0 +1,271 @@
|
|
|
1
|
+
import { HttpClient, RequestOptions, APIPromise } from '../core/http.js';
|
|
2
|
+
import { Page } from '../core/pagination.js';
|
|
3
|
+
import { ToolSetSecrets } from './tool-set-secrets.js';
|
|
4
|
+
import { Tools } from './tools.js';
|
|
5
|
+
import type { CreateResourceMetadata, GetToolSetOpenAPISpecResponse, ToolServiceListToolSetsState, ToolSet, ToolSetEvent, ToolSetSpec, ToolSetUsage, UpdateResourceMetadata } from '../types.js';
|
|
6
|
+
export interface ToolSetListParams {
|
|
7
|
+
/**
|
|
8
|
+
* Workspace ID.
|
|
9
|
+
*
|
|
10
|
+
* Defaults to the client-level `workspaceId` option or the CADENYA_WORKSPACE_ID environment variable.
|
|
11
|
+
*/
|
|
12
|
+
workspaceId?: string;
|
|
13
|
+
/**
|
|
14
|
+
* Maximum number of results to return
|
|
15
|
+
*/
|
|
16
|
+
limit?: number;
|
|
17
|
+
/**
|
|
18
|
+
* Pagination cursor from previous response
|
|
19
|
+
*/
|
|
20
|
+
cursor?: string;
|
|
21
|
+
/**
|
|
22
|
+
* Filter expression (query param: prefix)
|
|
23
|
+
*/
|
|
24
|
+
prefix?: string;
|
|
25
|
+
/**
|
|
26
|
+
* Free-form search query
|
|
27
|
+
*/
|
|
28
|
+
query?: string;
|
|
29
|
+
/**
|
|
30
|
+
* Filter by tool set lifecycle state. Defaults to STATE_ACTIVE when
|
|
31
|
+
* unspecified; pass STATE_ARCHIVED to list archived tool sets.
|
|
32
|
+
*/
|
|
33
|
+
state?: ToolServiceListToolSetsState;
|
|
34
|
+
/**
|
|
35
|
+
* Filters by metadata labels. Comma-separated key=value pairs,
|
|
36
|
+
* e.g. "env=prod,team=ai". A resource matches only if every pair
|
|
37
|
+
* matches exactly (AND semantics).
|
|
38
|
+
*/
|
|
39
|
+
labels?: string;
|
|
40
|
+
/**
|
|
41
|
+
* Sort order for results (asc or desc by creation time)
|
|
42
|
+
*/
|
|
43
|
+
sortOrder?: string;
|
|
44
|
+
/**
|
|
45
|
+
* When set to true you may use more of your alloted API rate-limit
|
|
46
|
+
*/
|
|
47
|
+
includeInfo?: boolean;
|
|
48
|
+
}
|
|
49
|
+
export interface ToolSetCreateParams {
|
|
50
|
+
metadata: CreateResourceMetadata;
|
|
51
|
+
spec: ToolSetSpec;
|
|
52
|
+
/**
|
|
53
|
+
* Workspace ID.
|
|
54
|
+
*
|
|
55
|
+
* Defaults to the client-level `workspaceId` option or the CADENYA_WORKSPACE_ID environment variable.
|
|
56
|
+
*/
|
|
57
|
+
workspaceId?: string;
|
|
58
|
+
}
|
|
59
|
+
export interface ToolSetRetrieveParams {
|
|
60
|
+
/**
|
|
61
|
+
* Workspace ID.
|
|
62
|
+
*
|
|
63
|
+
* Defaults to the client-level `workspaceId` option or the CADENYA_WORKSPACE_ID environment variable.
|
|
64
|
+
*/
|
|
65
|
+
workspaceId?: string;
|
|
66
|
+
}
|
|
67
|
+
export interface ToolSetDeleteParams {
|
|
68
|
+
/**
|
|
69
|
+
* Workspace ID.
|
|
70
|
+
*
|
|
71
|
+
* Defaults to the client-level `workspaceId` option or the CADENYA_WORKSPACE_ID environment variable.
|
|
72
|
+
*/
|
|
73
|
+
workspaceId?: string;
|
|
74
|
+
}
|
|
75
|
+
export interface ToolSetUpdateParams {
|
|
76
|
+
/**
|
|
77
|
+
* Workspace ID.
|
|
78
|
+
*
|
|
79
|
+
* Defaults to the client-level `workspaceId` option or the CADENYA_WORKSPACE_ID environment variable.
|
|
80
|
+
*/
|
|
81
|
+
workspaceId?: string;
|
|
82
|
+
metadata?: UpdateResourceMetadata;
|
|
83
|
+
spec?: ToolSetSpec;
|
|
84
|
+
updateMask?: string;
|
|
85
|
+
}
|
|
86
|
+
export interface ToolSetArchiveParams {
|
|
87
|
+
/**
|
|
88
|
+
* Workspace ID.
|
|
89
|
+
*
|
|
90
|
+
* Defaults to the client-level `workspaceId` option or the CADENYA_WORKSPACE_ID environment variable.
|
|
91
|
+
*/
|
|
92
|
+
workspaceId?: string;
|
|
93
|
+
}
|
|
94
|
+
export interface ToolSetUnarchiveParams {
|
|
95
|
+
/**
|
|
96
|
+
* Workspace ID.
|
|
97
|
+
*
|
|
98
|
+
* Defaults to the client-level `workspaceId` option or the CADENYA_WORKSPACE_ID environment variable.
|
|
99
|
+
*/
|
|
100
|
+
workspaceId?: string;
|
|
101
|
+
}
|
|
102
|
+
export interface ToolSetListEventsParams {
|
|
103
|
+
/**
|
|
104
|
+
* Workspace ID.
|
|
105
|
+
*
|
|
106
|
+
* Defaults to the client-level `workspaceId` option or the CADENYA_WORKSPACE_ID environment variable.
|
|
107
|
+
*/
|
|
108
|
+
workspaceId?: string;
|
|
109
|
+
/**
|
|
110
|
+
* Maximum number of results to return
|
|
111
|
+
*/
|
|
112
|
+
limit?: number;
|
|
113
|
+
/**
|
|
114
|
+
* Pagination cursor from previous response
|
|
115
|
+
*/
|
|
116
|
+
cursor?: string;
|
|
117
|
+
/**
|
|
118
|
+
* Sort order for results (asc or desc by creation time)
|
|
119
|
+
*/
|
|
120
|
+
sortOrder?: string;
|
|
121
|
+
/**
|
|
122
|
+
* When set to true you may use more of your alloted API rate-limit
|
|
123
|
+
*/
|
|
124
|
+
includeInfo?: boolean;
|
|
125
|
+
/**
|
|
126
|
+
* Filters by metadata labels. Comma-separated key=value pairs,
|
|
127
|
+
* e.g. "env=prod,team=ai". A resource matches only if every pair
|
|
128
|
+
* matches exactly (AND semantics).
|
|
129
|
+
*/
|
|
130
|
+
labels?: string;
|
|
131
|
+
}
|
|
132
|
+
export interface ToolSetRetrieveOpenApiSpecParams {
|
|
133
|
+
/**
|
|
134
|
+
* Workspace ID.
|
|
135
|
+
*
|
|
136
|
+
* Defaults to the client-level `workspaceId` option or the CADENYA_WORKSPACE_ID environment variable.
|
|
137
|
+
*/
|
|
138
|
+
workspaceId?: string;
|
|
139
|
+
}
|
|
140
|
+
export interface ToolSetListUsageParams {
|
|
141
|
+
/**
|
|
142
|
+
* Workspace ID.
|
|
143
|
+
*
|
|
144
|
+
* Defaults to the client-level `workspaceId` option or the CADENYA_WORKSPACE_ID environment variable.
|
|
145
|
+
*/
|
|
146
|
+
workspaceId?: string;
|
|
147
|
+
/**
|
|
148
|
+
* When set, lists only variations with a direct assignment of this
|
|
149
|
+
* individual tool. When unset, lists variations assigned the whole tool
|
|
150
|
+
* set. The tool must belong to the tool set.
|
|
151
|
+
*/
|
|
152
|
+
toolId?: string;
|
|
153
|
+
/**
|
|
154
|
+
* Maximum number of results to return
|
|
155
|
+
*/
|
|
156
|
+
limit?: number;
|
|
157
|
+
/**
|
|
158
|
+
* Pagination cursor from previous response
|
|
159
|
+
*/
|
|
160
|
+
cursor?: string;
|
|
161
|
+
/**
|
|
162
|
+
* Sort order for results (asc or desc by assignment creation time)
|
|
163
|
+
*/
|
|
164
|
+
sortOrder?: string;
|
|
165
|
+
}
|
|
166
|
+
export declare class ToolSets {
|
|
167
|
+
private readonly _client;
|
|
168
|
+
readonly secrets: ToolSetSecrets;
|
|
169
|
+
readonly tools: Tools;
|
|
170
|
+
constructor(_client: HttpClient);
|
|
171
|
+
/**
|
|
172
|
+
* List tool sets
|
|
173
|
+
*
|
|
174
|
+
* @example
|
|
175
|
+
* ```ts
|
|
176
|
+
* const page = await client.toolSets.list();
|
|
177
|
+
* for await (const item of page) {
|
|
178
|
+
* // auto-fetches every page
|
|
179
|
+
* }
|
|
180
|
+
* ```
|
|
181
|
+
*/
|
|
182
|
+
list(params?: ToolSetListParams, options?: RequestOptions): Promise<Page<ToolSet>>;
|
|
183
|
+
/**
|
|
184
|
+
* Create a new tool set
|
|
185
|
+
*
|
|
186
|
+
* @example
|
|
187
|
+
* ```ts
|
|
188
|
+
* const toolSet = await client.toolSets.create({ metadata: { name: 'sample' }, spec: { adapter: { mcp: { }, type: 'mcp' } } });
|
|
189
|
+
* ```
|
|
190
|
+
*/
|
|
191
|
+
create(params: ToolSetCreateParams, options?: RequestOptions): APIPromise<ToolSet>;
|
|
192
|
+
/**
|
|
193
|
+
* Get a tool set by ID
|
|
194
|
+
*
|
|
195
|
+
* @example
|
|
196
|
+
* ```ts
|
|
197
|
+
* const toolSet = await client.toolSets.retrieve('_123');
|
|
198
|
+
* ```
|
|
199
|
+
*/
|
|
200
|
+
retrieve(id: string, params?: ToolSetRetrieveParams, options?: RequestOptions): APIPromise<ToolSet>;
|
|
201
|
+
/**
|
|
202
|
+
* Delete a tool set
|
|
203
|
+
*
|
|
204
|
+
* @example
|
|
205
|
+
* ```ts
|
|
206
|
+
* await client.toolSets.delete('_123');
|
|
207
|
+
* ```
|
|
208
|
+
*/
|
|
209
|
+
delete(id: string, params?: ToolSetDeleteParams, options?: RequestOptions): APIPromise<void>;
|
|
210
|
+
/**
|
|
211
|
+
* Update a tool set
|
|
212
|
+
*
|
|
213
|
+
* @example
|
|
214
|
+
* ```ts
|
|
215
|
+
* const toolSet = await client.toolSets.update('_123');
|
|
216
|
+
* ```
|
|
217
|
+
*/
|
|
218
|
+
update(id: string, params?: ToolSetUpdateParams, options?: RequestOptions): APIPromise<ToolSet>;
|
|
219
|
+
/**
|
|
220
|
+
* Archive a tool set
|
|
221
|
+
*
|
|
222
|
+
* @example
|
|
223
|
+
* ```ts
|
|
224
|
+
* const toolSet = await client.toolSets.archive('_123');
|
|
225
|
+
* ```
|
|
226
|
+
*/
|
|
227
|
+
archive(id: string, params?: ToolSetArchiveParams, options?: RequestOptions): APIPromise<ToolSet>;
|
|
228
|
+
/**
|
|
229
|
+
* Unarchive a tool set
|
|
230
|
+
*
|
|
231
|
+
* @example
|
|
232
|
+
* ```ts
|
|
233
|
+
* const toolSet = await client.toolSets.unarchive('_123');
|
|
234
|
+
* ```
|
|
235
|
+
*/
|
|
236
|
+
unarchive(id: string, params?: ToolSetUnarchiveParams, options?: RequestOptions): APIPromise<ToolSet>;
|
|
237
|
+
/**
|
|
238
|
+
* List tool set events
|
|
239
|
+
*
|
|
240
|
+
* @example
|
|
241
|
+
* ```ts
|
|
242
|
+
* const page = await client.toolSets.listEvents('tool_set_123');
|
|
243
|
+
* for await (const item of page) {
|
|
244
|
+
* // auto-fetches every page
|
|
245
|
+
* }
|
|
246
|
+
* ```
|
|
247
|
+
*/
|
|
248
|
+
listEvents(toolSetId: string, params?: ToolSetListEventsParams, options?: RequestOptions): Promise<Page<ToolSetEvent>>;
|
|
249
|
+
/**
|
|
250
|
+
* Get consumed OpenAPI spec
|
|
251
|
+
*
|
|
252
|
+
* @example
|
|
253
|
+
* ```ts
|
|
254
|
+
* const getToolSetOpenApiSpecResponse = await client.toolSets.retrieveOpenApiSpec('tool_set_123');
|
|
255
|
+
* ```
|
|
256
|
+
*/
|
|
257
|
+
retrieveOpenApiSpec(toolSetId: string, params?: ToolSetRetrieveOpenApiSpecParams, options?: RequestOptions): APIPromise<GetToolSetOpenAPISpecResponse>;
|
|
258
|
+
/**
|
|
259
|
+
* List tool set usage
|
|
260
|
+
*
|
|
261
|
+
* @example
|
|
262
|
+
* ```ts
|
|
263
|
+
* const page = await client.toolSets.listUsage('tool_set_123');
|
|
264
|
+
* for await (const item of page) {
|
|
265
|
+
* // auto-fetches every page
|
|
266
|
+
* }
|
|
267
|
+
* ```
|
|
268
|
+
*/
|
|
269
|
+
listUsage(toolSetId: string, params?: ToolSetListUsageParams, options?: RequestOptions): Promise<Page<ToolSetUsage>>;
|
|
270
|
+
}
|
|
271
|
+
//# sourceMappingURL=tool-sets.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"tool-sets.d.ts","sourceRoot":"","sources":["../../src/resources/tool-sets.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,UAAU,EAAE,cAAc,EAAE,UAAU,EAA+B,MAAM,iBAAiB,CAAC;AACtG,OAAO,EAAE,IAAI,EAAE,MAAM,uBAAuB,CAAC;AAC7C,OAAO,EAAE,cAAc,EAAE,MAAM,uBAAuB,CAAC;AACvD,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|
@@ -0,0 +1,185 @@
|
|
|
1
|
+
// Generated by redwood. Do not edit by hand.
|
|
2
|
+
import { pathSegment, snapshotParams } from '../core/http.js';
|
|
3
|
+
import { Page } from '../core/pagination.js';
|
|
4
|
+
import { ToolSetSecrets } from './tool-set-secrets.js';
|
|
5
|
+
import { Tools } from './tools.js';
|
|
6
|
+
export class ToolSets {
|
|
7
|
+
_client;
|
|
8
|
+
secrets;
|
|
9
|
+
tools;
|
|
10
|
+
constructor(_client) {
|
|
11
|
+
this._client = _client;
|
|
12
|
+
this.secrets = new ToolSetSecrets(_client);
|
|
13
|
+
this.tools = new Tools(_client);
|
|
14
|
+
}
|
|
15
|
+
/**
|
|
16
|
+
* List tool sets
|
|
17
|
+
*
|
|
18
|
+
* @example
|
|
19
|
+
* ```ts
|
|
20
|
+
* const page = await client.toolSets.list();
|
|
21
|
+
* for await (const item of page) {
|
|
22
|
+
* // auto-fetches every page
|
|
23
|
+
* }
|
|
24
|
+
* ```
|
|
25
|
+
*/
|
|
26
|
+
async list(params, options) {
|
|
27
|
+
const workspaceId = String(params?.workspaceId ?? this._client.defaults['workspaceId'] ?? '').trim() || undefined;
|
|
28
|
+
if (workspaceId === undefined)
|
|
29
|
+
throw new Error("Missing 'workspaceId': pass it in params, set it on the client, or set the CADENYA_WORKSPACE_ID environment variable.");
|
|
30
|
+
const _base = snapshotParams(params);
|
|
31
|
+
const response = await this._client.request({ method: 'GET', path: `/v1/workspaces/${pathSegment('workspaceId', workspaceId)}/tool_sets`, query: { limit: params?.limit, cursor: params?.cursor, prefix: params?.prefix, query: params?.query, state: params?.state, labels: params?.labels, sortOrder: params?.sortOrder, includeInfo: params?.includeInfo } }, options);
|
|
32
|
+
return new Page(response.items ?? [], response.pagination?.nextCursor, (cursor) => this.list({ ..._base, cursor: cursor }, options));
|
|
33
|
+
}
|
|
34
|
+
/**
|
|
35
|
+
* Create a new tool set
|
|
36
|
+
*
|
|
37
|
+
* @example
|
|
38
|
+
* ```ts
|
|
39
|
+
* const toolSet = await client.toolSets.create({ metadata: { name: 'sample' }, spec: { adapter: { mcp: { }, type: 'mcp' } } });
|
|
40
|
+
* ```
|
|
41
|
+
*/
|
|
42
|
+
create(params, options) {
|
|
43
|
+
return this._client.requestAPI(() => {
|
|
44
|
+
const workspaceId = String(params.workspaceId ?? this._client.defaults['workspaceId'] ?? '').trim() || undefined;
|
|
45
|
+
if (workspaceId === undefined)
|
|
46
|
+
throw new Error("Missing 'workspaceId': pass it in params, set it on the client, or set the CADENYA_WORKSPACE_ID environment variable.");
|
|
47
|
+
return { method: 'POST', path: `/v1/workspaces/${pathSegment('workspaceId', workspaceId)}/tool_sets`, body: { metadata: params.metadata, spec: params.spec } };
|
|
48
|
+
}, options);
|
|
49
|
+
}
|
|
50
|
+
/**
|
|
51
|
+
* Get a tool set by ID
|
|
52
|
+
*
|
|
53
|
+
* @example
|
|
54
|
+
* ```ts
|
|
55
|
+
* const toolSet = await client.toolSets.retrieve('_123');
|
|
56
|
+
* ```
|
|
57
|
+
*/
|
|
58
|
+
retrieve(id, params, options) {
|
|
59
|
+
return this._client.requestAPI(() => {
|
|
60
|
+
const workspaceId = String(params?.workspaceId ?? this._client.defaults['workspaceId'] ?? '').trim() || undefined;
|
|
61
|
+
if (workspaceId === undefined)
|
|
62
|
+
throw new Error("Missing 'workspaceId': pass it in params, set it on the client, or set the CADENYA_WORKSPACE_ID environment variable.");
|
|
63
|
+
return { method: 'GET', path: `/v1/workspaces/${pathSegment('workspaceId', workspaceId)}/tool_sets/${pathSegment('id', id)}` };
|
|
64
|
+
}, options);
|
|
65
|
+
}
|
|
66
|
+
/**
|
|
67
|
+
* Delete a tool set
|
|
68
|
+
*
|
|
69
|
+
* @example
|
|
70
|
+
* ```ts
|
|
71
|
+
* await client.toolSets.delete('_123');
|
|
72
|
+
* ```
|
|
73
|
+
*/
|
|
74
|
+
delete(id, params, options) {
|
|
75
|
+
return this._client.requestAPI(() => {
|
|
76
|
+
const workspaceId = String(params?.workspaceId ?? this._client.defaults['workspaceId'] ?? '').trim() || undefined;
|
|
77
|
+
if (workspaceId === undefined)
|
|
78
|
+
throw new Error("Missing 'workspaceId': pass it in params, set it on the client, or set the CADENYA_WORKSPACE_ID environment variable.");
|
|
79
|
+
return { method: 'DELETE', path: `/v1/workspaces/${pathSegment('workspaceId', workspaceId)}/tool_sets/${pathSegment('id', id)}`, void: true };
|
|
80
|
+
}, options);
|
|
81
|
+
}
|
|
82
|
+
/**
|
|
83
|
+
* Update a tool set
|
|
84
|
+
*
|
|
85
|
+
* @example
|
|
86
|
+
* ```ts
|
|
87
|
+
* const toolSet = await client.toolSets.update('_123');
|
|
88
|
+
* ```
|
|
89
|
+
*/
|
|
90
|
+
update(id, params, options) {
|
|
91
|
+
return this._client.requestAPI(() => {
|
|
92
|
+
const workspaceId = String(params?.workspaceId ?? this._client.defaults['workspaceId'] ?? '').trim() || undefined;
|
|
93
|
+
if (workspaceId === undefined)
|
|
94
|
+
throw new Error("Missing 'workspaceId': pass it in params, set it on the client, or set the CADENYA_WORKSPACE_ID environment variable.");
|
|
95
|
+
return { method: 'PATCH', path: `/v1/workspaces/${pathSegment('workspaceId', workspaceId)}/tool_sets/${pathSegment('id', id)}`, body: { metadata: params?.metadata, spec: params?.spec, updateMask: params?.updateMask } };
|
|
96
|
+
}, options);
|
|
97
|
+
}
|
|
98
|
+
/**
|
|
99
|
+
* Archive a tool set
|
|
100
|
+
*
|
|
101
|
+
* @example
|
|
102
|
+
* ```ts
|
|
103
|
+
* const toolSet = await client.toolSets.archive('_123');
|
|
104
|
+
* ```
|
|
105
|
+
*/
|
|
106
|
+
archive(id, params, options) {
|
|
107
|
+
return this._client.requestAPI(() => {
|
|
108
|
+
const workspaceId = String(params?.workspaceId ?? this._client.defaults['workspaceId'] ?? '').trim() || undefined;
|
|
109
|
+
if (workspaceId === undefined)
|
|
110
|
+
throw new Error("Missing 'workspaceId': pass it in params, set it on the client, or set the CADENYA_WORKSPACE_ID environment variable.");
|
|
111
|
+
return { method: 'POST', path: `/v1/workspaces/${pathSegment('workspaceId', workspaceId)}/tool_sets/${pathSegment('id', id)}:archive` };
|
|
112
|
+
}, options);
|
|
113
|
+
}
|
|
114
|
+
/**
|
|
115
|
+
* Unarchive a tool set
|
|
116
|
+
*
|
|
117
|
+
* @example
|
|
118
|
+
* ```ts
|
|
119
|
+
* const toolSet = await client.toolSets.unarchive('_123');
|
|
120
|
+
* ```
|
|
121
|
+
*/
|
|
122
|
+
unarchive(id, params, options) {
|
|
123
|
+
return this._client.requestAPI(() => {
|
|
124
|
+
const workspaceId = String(params?.workspaceId ?? this._client.defaults['workspaceId'] ?? '').trim() || undefined;
|
|
125
|
+
if (workspaceId === undefined)
|
|
126
|
+
throw new Error("Missing 'workspaceId': pass it in params, set it on the client, or set the CADENYA_WORKSPACE_ID environment variable.");
|
|
127
|
+
return { method: 'POST', path: `/v1/workspaces/${pathSegment('workspaceId', workspaceId)}/tool_sets/${pathSegment('id', id)}:unarchive` };
|
|
128
|
+
}, options);
|
|
129
|
+
}
|
|
130
|
+
/**
|
|
131
|
+
* List tool set events
|
|
132
|
+
*
|
|
133
|
+
* @example
|
|
134
|
+
* ```ts
|
|
135
|
+
* const page = await client.toolSets.listEvents('tool_set_123');
|
|
136
|
+
* for await (const item of page) {
|
|
137
|
+
* // auto-fetches every page
|
|
138
|
+
* }
|
|
139
|
+
* ```
|
|
140
|
+
*/
|
|
141
|
+
async listEvents(toolSetId, params, options) {
|
|
142
|
+
const workspaceId = String(params?.workspaceId ?? this._client.defaults['workspaceId'] ?? '').trim() || undefined;
|
|
143
|
+
if (workspaceId === undefined)
|
|
144
|
+
throw new Error("Missing 'workspaceId': pass it in params, set it on the client, or set the CADENYA_WORKSPACE_ID environment variable.");
|
|
145
|
+
const _base = snapshotParams(params);
|
|
146
|
+
const response = await this._client.request({ method: 'GET', path: `/v1/workspaces/${pathSegment('workspaceId', workspaceId)}/tool_sets/${pathSegment('toolSetId', toolSetId)}/events`, query: { limit: params?.limit, cursor: params?.cursor, sortOrder: params?.sortOrder, includeInfo: params?.includeInfo, labels: params?.labels } }, options);
|
|
147
|
+
return new Page(response.items ?? [], response.pagination?.nextCursor, (cursor) => this.listEvents(toolSetId, { ..._base, cursor: cursor }, options));
|
|
148
|
+
}
|
|
149
|
+
/**
|
|
150
|
+
* Get consumed OpenAPI spec
|
|
151
|
+
*
|
|
152
|
+
* @example
|
|
153
|
+
* ```ts
|
|
154
|
+
* const getToolSetOpenApiSpecResponse = await client.toolSets.retrieveOpenApiSpec('tool_set_123');
|
|
155
|
+
* ```
|
|
156
|
+
*/
|
|
157
|
+
retrieveOpenApiSpec(toolSetId, params, options) {
|
|
158
|
+
return this._client.requestAPI(() => {
|
|
159
|
+
const workspaceId = String(params?.workspaceId ?? this._client.defaults['workspaceId'] ?? '').trim() || undefined;
|
|
160
|
+
if (workspaceId === undefined)
|
|
161
|
+
throw new Error("Missing 'workspaceId': pass it in params, set it on the client, or set the CADENYA_WORKSPACE_ID environment variable.");
|
|
162
|
+
return { method: 'GET', path: `/v1/workspaces/${pathSegment('workspaceId', workspaceId)}/tool_sets/${pathSegment('toolSetId', toolSetId)}/openapi_spec` };
|
|
163
|
+
}, options);
|
|
164
|
+
}
|
|
165
|
+
/**
|
|
166
|
+
* List tool set usage
|
|
167
|
+
*
|
|
168
|
+
* @example
|
|
169
|
+
* ```ts
|
|
170
|
+
* const page = await client.toolSets.listUsage('tool_set_123');
|
|
171
|
+
* for await (const item of page) {
|
|
172
|
+
* // auto-fetches every page
|
|
173
|
+
* }
|
|
174
|
+
* ```
|
|
175
|
+
*/
|
|
176
|
+
async listUsage(toolSetId, params, options) {
|
|
177
|
+
const workspaceId = String(params?.workspaceId ?? this._client.defaults['workspaceId'] ?? '').trim() || undefined;
|
|
178
|
+
if (workspaceId === undefined)
|
|
179
|
+
throw new Error("Missing 'workspaceId': pass it in params, set it on the client, or set the CADENYA_WORKSPACE_ID environment variable.");
|
|
180
|
+
const _base = snapshotParams(params);
|
|
181
|
+
const response = await this._client.request({ method: 'GET', path: `/v1/workspaces/${pathSegment('workspaceId', workspaceId)}/tool_sets/${pathSegment('toolSetId', toolSetId)}/usage`, query: { toolId: params?.toolId, limit: params?.limit, cursor: params?.cursor, sortOrder: params?.sortOrder } }, options);
|
|
182
|
+
return new Page(response.items ?? [], response.pagination?.nextCursor, (cursor) => this.listUsage(toolSetId, { ..._base, cursor: cursor }, options));
|
|
183
|
+
}
|
|
184
|
+
}
|
|
185
|
+
//# sourceMappingURL=tool-sets.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"tool-sets.js","sourceRoot":"","sources":["../../src/resources/tool-sets.ts"],"names":[],"mappings":"AAAA,6CAA6C;AAE7C,OAAO,EAA0C,WAAW,EAAE,cAAc,EAAE,MAAM,iBAAiB,CAAC;AACtG,OAAO,EAAE,IAAI,EAAE,MAAM,uBAAuB,CAAC;AAC7C,OAAO,EAAE,cAAc,EAAE,MAAM,uBAAuB,CAAC;AACvD,OAAO,EAAE,KAAK,EAAE,MAAM,YAAY,CAAC;AA6KnC,MAAM,OAAO,QAAQ;IAGU;IAFpB,OAAO,CAAiB;IACxB,KAAK,CAAQ;IACtB,YAA6B,OAAmB;QAAnB,YAAO,GAAP,OAAO,CAAY;QAC9C,IAAI,CAAC,OAAO,GAAG,IAAI,cAAc,CAAC,OAAO,CAAC,CAAC;QAC3C,IAAI,CAAC,KAAK,GAAG,IAAI,KAAK,CAAC,OAAO,CAAC,CAAC;IAClC,CAAC;IAED;;;;;;;;;;OAUG;IACH,KAAK,CAAC,IAAI,CAAC,MAA0B,EAAE,OAAwB;QAC7D,MAAM,WAAW,GAAG,MAAM,CAAC,MAAM,EAAE,WAAW,IAAI,IAAI,CAAC,OAAO,CAAC,QAAQ,CAAC,aAAa,CAAC,IAAI,EAAE,CAAC,CAAC,IAAI,EAAE,IAAI,SAAS,CAAC;QAClH,IAAI,WAAW,KAAK,SAAS;YAAE,MAAM,IAAI,KAAK,CAAC,uHAAuH,CAAC,CA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C;IACd,CAAC;IAED;;;;;;;;;;OAUG;IACH,KAAK,CAAC,SAAS,CAAC,SAAiB,EAAE,MAA+B,EAAE,OAAwB;QAC1F,MAAM,WAAW,GAAG,MAAM,CAAC,MAAM,EAAE,WAAW,IAAI,IAAI,CAAC,OAAO,CAAC,QAAQ,CAAC,aAAa,CAAC,IAAI,EAAE,CAAC,CAAC,IAAI,EAAE,IAAI,SAAS,CAAC;QAClH,IAAI,WAAW,KAAK,SAAS;YAAE,MAAM,IAAI,KAAK,CAAC,uHAAuH,CAAC,CAAC;QACxK,MAAM,KAAK,GAAG,cAAc,CAAC,MAAM,CAAC,CAAC;QACrC,MAAM,QAAQ,GAAG,MAAM,IAAI,CAAC,OAAO,CAAC,OAAO,CAA2B,EAAE,MAAM,EAAE,KAAK,EAAE,IAAI,EAAE,kBAAkB,WAAW,CAAC,aAAa,EAAE,WAAW,CAAC,cAAc,WAAW,CAAC,WAAW,EAAE,SAAS,CAAC,QAAQ,EAAE,KAAK,EAAE,EAAE,MAAM,EAAE,MAAM,EAAE,MAAM,EAAE,KAAK,EAAE,MAAM,EAAE,KAAK,EAAE,MAAM,EAAE,MAAM,EAAE,MAAM,EAAE,SAAS,EAAE,MAAM,EAAE,SAAS,EAAE,EAAE,EAAE,OAAO,CAAC,CAAC;QAC3U,OAAO,IAAI,IAAI,CAAC,QAAQ,CAAC,KAAK,IAAI,EAAE,EAAE,QAAQ,CAAC,UAAU,EAAE,UAAU,EAAE,CAAC,MAAM,EAAE,EAAE,CAAC,IAAI,CAAC,SAAS,CAAC,SAAS,EAAE,EAAE,GAAG,KAAK,EAAE,MAAM,EAAE,MAAM,EAAE,EAAE,OAAO,CAAC,CAAC,CAAC;IACvJ,CAAC;CACF","sourcesContent":["// Generated by redwood. Do not edit by hand.\n\nimport { HttpClient, RequestOptions, APIPromise, pathSegment, snapshotParams } from '../core/http.js';\nimport { Page } from '../core/pagination.js';\nimport { ToolSetSecrets } from './tool-set-secrets.js';\nimport { Tools } from './tools.js';\nimport type { CreateResourceMetadata, GetToolSetOpenAPISpecResponse, ListToolSetEventsResponse, ListToolSetUsageResponse, ListToolSetsResponse, ToolServiceListToolSetsState, ToolSet, ToolSetEvent, ToolSetSpec, ToolSetUsage, UpdateResourceMetadata } from '../types.js';\n\nexport interface ToolSetListParams {\n /**\n * Workspace ID.\n * \n * Defaults to the client-level `workspaceId` option or the CADENYA_WORKSPACE_ID environment variable.\n */\n workspaceId?: string;\n /**\n * Maximum number of results to return\n */\n limit?: number;\n /**\n * Pagination cursor from previous response\n */\n cursor?: string;\n /**\n * Filter expression (query param: prefix)\n */\n prefix?: string;\n /**\n * Free-form search query\n */\n query?: string;\n /**\n * Filter by tool set lifecycle state. Defaults to STATE_ACTIVE when\n * unspecified; pass STATE_ARCHIVED to list archived tool sets.\n */\n state?: ToolServiceListToolSetsState;\n /**\n * Filters by metadata labels. Comma-separated key=value pairs,\n * e.g. \"env=prod,team=ai\". A resource matches only if every pair\n * matches exactly (AND semantics).\n */\n labels?: string;\n /**\n * Sort order for results (asc or desc by creation time)\n */\n sortOrder?: string;\n /**\n * When set to true you may use more of your alloted API rate-limit\n */\n includeInfo?: boolean;\n}\n\nexport interface ToolSetCreateParams {\n metadata: CreateResourceMetadata;\n spec: ToolSetSpec;\n /**\n * Workspace ID.\n * \n * Defaults to the client-level `workspaceId` option or the CADENYA_WORKSPACE_ID environment variable.\n */\n workspaceId?: string;\n}\n\nexport interface ToolSetRetrieveParams {\n /**\n * Workspace ID.\n * \n * Defaults to the client-level `workspaceId` option or the CADENYA_WORKSPACE_ID environment variable.\n */\n workspaceId?: string;\n}\n\nexport interface ToolSetDeleteParams {\n /**\n * Workspace ID.\n * \n * Defaults to the client-level `workspaceId` option or the CADENYA_WORKSPACE_ID environment variable.\n */\n workspaceId?: string;\n}\n\nexport interface ToolSetUpdateParams {\n /**\n * Workspace ID.\n * \n * Defaults to the client-level `workspaceId` option or the CADENYA_WORKSPACE_ID environment variable.\n */\n workspaceId?: string;\n metadata?: UpdateResourceMetadata;\n spec?: ToolSetSpec;\n updateMask?: string;\n}\n\nexport interface ToolSetArchiveParams {\n /**\n * Workspace ID.\n * \n * Defaults to the client-level `workspaceId` option or the CADENYA_WORKSPACE_ID environment variable.\n */\n workspaceId?: string;\n}\n\nexport interface ToolSetUnarchiveParams {\n /**\n * Workspace ID.\n * \n * Defaults to the client-level `workspaceId` option or the CADENYA_WORKSPACE_ID environment variable.\n */\n workspaceId?: string;\n}\n\nexport interface ToolSetListEventsParams {\n /**\n * Workspace ID.\n * \n * Defaults to the client-level `workspaceId` option or the CADENYA_WORKSPACE_ID environment variable.\n */\n workspaceId?: string;\n /**\n * Maximum number of results to return\n */\n limit?: number;\n /**\n * Pagination cursor from previous response\n */\n cursor?: string;\n /**\n * Sort order for results (asc or desc by creation time)\n */\n sortOrder?: string;\n /**\n * When set to true you may use more of your alloted API rate-limit\n */\n includeInfo?: boolean;\n /**\n * Filters by metadata labels. Comma-separated key=value pairs,\n * e.g. \"env=prod,team=ai\". A resource matches only if every pair\n * matches exactly (AND semantics).\n */\n labels?: string;\n}\n\nexport interface ToolSetRetrieveOpenApiSpecParams {\n /**\n * Workspace ID.\n * \n * Defaults to the client-level `workspaceId` option or the CADENYA_WORKSPACE_ID environment variable.\n */\n workspaceId?: string;\n}\n\nexport interface ToolSetListUsageParams {\n /**\n * Workspace ID.\n * \n * Defaults to the client-level `workspaceId` option or the CADENYA_WORKSPACE_ID environment variable.\n */\n workspaceId?: string;\n /**\n * When set, lists only variations with a direct assignment of this\n * individual tool. When unset, lists variations assigned the whole tool\n * set. The tool must belong to the tool set.\n */\n toolId?: string;\n /**\n * Maximum number of results to return\n */\n limit?: number;\n /**\n * Pagination cursor from previous response\n */\n cursor?: string;\n /**\n * Sort order for results (asc or desc by assignment creation time)\n */\n sortOrder?: string;\n}\n\nexport class ToolSets {\n readonly secrets: ToolSetSecrets;\n readonly tools: Tools;\n constructor(private readonly _client: HttpClient) {\n this.secrets = new ToolSetSecrets(_client);\n this.tools = new Tools(_client);\n }\n\n /**\n * List tool sets\n * \n * @example\n * ```ts\n * const page = await client.toolSets.list();\n * for await (const item of page) {\n * // auto-fetches every page\n * }\n * ```\n */\n async list(params?: ToolSetListParams, options?: RequestOptions): Promise<Page<ToolSet>> {\n const workspaceId = String(params?.workspaceId ?? this._client.defaults['workspaceId'] ?? '').trim() || undefined;\n if (workspaceId === undefined) throw new Error(\"Missing 'workspaceId': pass it in params, set it on the client, or set the CADENYA_WORKSPACE_ID environment variable.\");\n const _base = snapshotParams(params);\n const response = await this._client.request<ListToolSetsResponse>({ method: 'GET', path: `/v1/workspaces/${pathSegment('workspaceId', workspaceId)}/tool_sets`, query: { limit: params?.limit, cursor: params?.cursor, prefix: params?.prefix, query: params?.query, state: params?.state, labels: params?.labels, sortOrder: params?.sortOrder, includeInfo: params?.includeInfo } }, options);\n return new Page(response.items ?? [], response.pagination?.nextCursor, (cursor) => this.list({ ..._base, cursor: cursor }, options));\n }\n\n /**\n * Create a new tool set\n * \n * @example\n * ```ts\n * const toolSet = await client.toolSets.create({ metadata: { name: 'sample' }, spec: { adapter: { mcp: { }, type: 'mcp' } } });\n * ```\n */\n create(params: ToolSetCreateParams, options?: RequestOptions): APIPromise<ToolSet> {\n return this._client.requestAPI<ToolSet>(() => {\n const workspaceId = String(params.workspaceId ?? this._client.defaults['workspaceId'] ?? '').trim() || undefined;\n if (workspaceId === undefined) throw new Error(\"Missing 'workspaceId': pass it in params, set it on the client, or set the CADENYA_WORKSPACE_ID environment variable.\");\n return { method: 'POST', path: `/v1/workspaces/${pathSegment('workspaceId', workspaceId)}/tool_sets`, body: { metadata: params.metadata, spec: params.spec } };\n }, options);\n }\n\n /**\n * Get a tool set by ID\n * \n * @example\n * ```ts\n * const toolSet = await client.toolSets.retrieve('_123');\n * ```\n */\n retrieve(id: string, params?: ToolSetRetrieveParams, options?: RequestOptions): APIPromise<ToolSet> {\n return this._client.requestAPI<ToolSet>(() => {\n const workspaceId = String(params?.workspaceId ?? this._client.defaults['workspaceId'] ?? '').trim() || undefined;\n if (workspaceId === undefined) throw new Error(\"Missing 'workspaceId': pass it in params, set it on the client, or set the CADENYA_WORKSPACE_ID environment variable.\");\n return { method: 'GET', path: `/v1/workspaces/${pathSegment('workspaceId', workspaceId)}/tool_sets/${pathSegment('id', id)}` };\n }, options);\n }\n\n /**\n * Delete a tool set\n * \n * @example\n * ```ts\n * await client.toolSets.delete('_123');\n * ```\n */\n delete(id: string, params?: ToolSetDeleteParams, options?: RequestOptions): APIPromise<void> {\n return this._client.requestAPI<void>(() => {\n const workspaceId = String(params?.workspaceId ?? this._client.defaults['workspaceId'] ?? '').trim() || undefined;\n if (workspaceId === undefined) throw new Error(\"Missing 'workspaceId': pass it in params, set it on the client, or set the CADENYA_WORKSPACE_ID environment variable.\");\n return { method: 'DELETE', path: `/v1/workspaces/${pathSegment('workspaceId', workspaceId)}/tool_sets/${pathSegment('id', id)}`, void: true };\n }, options);\n }\n\n /**\n * Update a tool set\n * \n * @example\n * ```ts\n * const toolSet = await client.toolSets.update('_123');\n * ```\n */\n update(id: string, params?: ToolSetUpdateParams, options?: RequestOptions): APIPromise<ToolSet> {\n return this._client.requestAPI<ToolSet>(() => {\n const workspaceId = String(params?.workspaceId ?? this._client.defaults['workspaceId'] ?? '').trim() || undefined;\n if (workspaceId === undefined) throw new Error(\"Missing 'workspaceId': pass it in params, set it on the client, or set the CADENYA_WORKSPACE_ID environment variable.\");\n return { method: 'PATCH', path: `/v1/workspaces/${pathSegment('workspaceId', workspaceId)}/tool_sets/${pathSegment('id', id)}`, body: { metadata: params?.metadata, spec: params?.spec, updateMask: params?.updateMask } };\n }, options);\n }\n\n /**\n * Archive a tool set\n * \n * @example\n * ```ts\n * const toolSet = await client.toolSets.archive('_123');\n * ```\n */\n archive(id: string, params?: ToolSetArchiveParams, options?: RequestOptions): APIPromise<ToolSet> {\n return this._client.requestAPI<ToolSet>(() => {\n const workspaceId = String(params?.workspaceId ?? this._client.defaults['workspaceId'] ?? '').trim() || undefined;\n if (workspaceId === undefined) throw new Error(\"Missing 'workspaceId': pass it in params, set it on the client, or set the CADENYA_WORKSPACE_ID environment variable.\");\n return { method: 'POST', path: `/v1/workspaces/${pathSegment('workspaceId', workspaceId)}/tool_sets/${pathSegment('id', id)}:archive` };\n }, options);\n }\n\n /**\n * Unarchive a tool set\n * \n * @example\n * ```ts\n * const toolSet = await client.toolSets.unarchive('_123');\n * ```\n */\n unarchive(id: string, params?: ToolSetUnarchiveParams, options?: RequestOptions): APIPromise<ToolSet> {\n return this._client.requestAPI<ToolSet>(() => {\n const workspaceId = String(params?.workspaceId ?? this._client.defaults['workspaceId'] ?? '').trim() || undefined;\n if (workspaceId === undefined) throw new Error(\"Missing 'workspaceId': pass it in params, set it on the client, or set the CADENYA_WORKSPACE_ID environment variable.\");\n return { method: 'POST', path: `/v1/workspaces/${pathSegment('workspaceId', workspaceId)}/tool_sets/${pathSegment('id', id)}:unarchive` };\n }, options);\n }\n\n /**\n * List tool set events\n * \n * @example\n * ```ts\n * const page = await client.toolSets.listEvents('tool_set_123');\n * for await (const item of page) {\n * // auto-fetches every page\n * }\n * ```\n */\n async listEvents(toolSetId: string, params?: ToolSetListEventsParams, options?: RequestOptions): Promise<Page<ToolSetEvent>> {\n const workspaceId = String(params?.workspaceId ?? this._client.defaults['workspaceId'] ?? '').trim() || undefined;\n if (workspaceId === undefined) throw new Error(\"Missing 'workspaceId': pass it in params, set it on the client, or set the CADENYA_WORKSPACE_ID environment variable.\");\n const _base = snapshotParams(params);\n const response = await this._client.request<ListToolSetEventsResponse>({ method: 'GET', path: `/v1/workspaces/${pathSegment('workspaceId', workspaceId)}/tool_sets/${pathSegment('toolSetId', toolSetId)}/events`, query: { limit: params?.limit, cursor: params?.cursor, sortOrder: params?.sortOrder, includeInfo: params?.includeInfo, labels: params?.labels } }, options);\n return new Page(response.items ?? [], response.pagination?.nextCursor, (cursor) => this.listEvents(toolSetId, { ..._base, cursor: cursor }, options));\n }\n\n /**\n * Get consumed OpenAPI spec\n * \n * @example\n * ```ts\n * const getToolSetOpenApiSpecResponse = await client.toolSets.retrieveOpenApiSpec('tool_set_123');\n * ```\n */\n retrieveOpenApiSpec(toolSetId: string, params?: ToolSetRetrieveOpenApiSpecParams, options?: RequestOptions): APIPromise<GetToolSetOpenAPISpecResponse> {\n return this._client.requestAPI<GetToolSetOpenAPISpecResponse>(() => {\n const workspaceId = String(params?.workspaceId ?? this._client.defaults['workspaceId'] ?? '').trim() || undefined;\n if (workspaceId === undefined) throw new Error(\"Missing 'workspaceId': pass it in params, set it on the client, or set the CADENYA_WORKSPACE_ID environment variable.\");\n return { method: 'GET', path: `/v1/workspaces/${pathSegment('workspaceId', workspaceId)}/tool_sets/${pathSegment('toolSetId', toolSetId)}/openapi_spec` };\n }, options);\n }\n\n /**\n * List tool set usage\n * \n * @example\n * ```ts\n * const page = await client.toolSets.listUsage('tool_set_123');\n * for await (const item of page) {\n * // auto-fetches every page\n * }\n * ```\n */\n async listUsage(toolSetId: string, params?: ToolSetListUsageParams, options?: RequestOptions): Promise<Page<ToolSetUsage>> {\n const workspaceId = String(params?.workspaceId ?? this._client.defaults['workspaceId'] ?? '').trim() || undefined;\n if (workspaceId === undefined) throw new Error(\"Missing 'workspaceId': pass it in params, set it on the client, or set the CADENYA_WORKSPACE_ID environment variable.\");\n const _base = snapshotParams(params);\n const response = await this._client.request<ListToolSetUsageResponse>({ method: 'GET', path: `/v1/workspaces/${pathSegment('workspaceId', workspaceId)}/tool_sets/${pathSegment('toolSetId', toolSetId)}/usage`, query: { toolId: params?.toolId, limit: params?.limit, cursor: params?.cursor, sortOrder: params?.sortOrder } }, options);\n return new Page(response.items ?? [], response.pagination?.nextCursor, (cursor) => this.listUsage(toolSetId, { ..._base, cursor: cursor }, options));\n }\n}\n"]}
|