@cadenya/cadenya 0.135.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 -1532
- package/src/core/error.ts +50 -109
- package/src/core/http.ts +639 -0
- package/src/core/pagination.ts +16 -150
- package/src/core/sse.ts +338 -0
- package/src/core/webhooks.ts +141 -0
- package/src/index.ts +35 -20
- 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 +411 -1
- package/src/resources/ai-provider-keys.ts +119 -309
- package/src/resources/api-keys.ts +219 -276
- package/src/resources/memory-entries.ts +163 -0
- package/src/resources/memory-layers.ts +181 -1
- package/src/resources/models.ts +125 -372
- package/src/resources/objectives.ts +764 -1
- package/src/resources/profiles.ts +17 -13
- package/src/resources/tenants.ts +168 -1
- package/src/resources/tool-search.ts +36 -0
- package/src/resources/tool-set-secrets.ts +169 -0
- package/src/resources/tool-sets.ts +355 -1
- package/src/resources/tools.ts +235 -0
- package/src/resources/uploads.ts +42 -127
- package/src/resources/widget-sessions.ts +148 -437
- package/src/resources/widgets.ts +155 -247
- package/src/resources/workspace-admin.ts +281 -1
- package/src/resources/workspace-secrets.ts +121 -159
- package/src/resources/workspaces.ts +32 -75
- package/src/types.ts +5188 -0
- package/src/webhooks.ts +107 -0
- package/CHANGELOG.md +0 -1542
- 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 -630
- package/client.js.map +0 -1
- package/client.mjs +0 -626
- 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 -73
- package/core/api-promise.js.map +0 -1
- package/core/api-promise.mjs +0 -69
- 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 -112
- package/core/error.js.map +0 -1
- package/core/error.mjs +0 -96
- 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 -100
- package/core/pagination.js.map +0 -1
- package/core/pagination.mjs +0 -94
- 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 -10
- package/core/resource.js.map +0 -1
- package/core/resource.mjs +0 -6
- 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 -31
- package/index.js.map +0 -1
- package/index.mjs +0 -7
- 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 -3
- package/internal/builtin-types.js.map +0 -1
- package/internal/builtin-types.mjs +0 -2
- 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 -161
- package/internal/detect-platform.js.map +0 -1
- package/internal/detect-platform.mjs +0 -156
- 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 -40
- package/internal/errors.js.map +0 -1
- package/internal/errors.mjs +0 -35
- 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 -78
- package/internal/headers.js.map +0 -1
- package/internal/headers.mjs +0 -73
- 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 -49
- package/internal/parse.js.map +0 -1
- package/internal/parse.mjs +0 -46
- 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 -13
- package/internal/request-options.js.map +0 -1
- package/internal/request-options.mjs +0 -9
- 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 -9
- package/internal/shim-types.js.map +0 -1
- package/internal/shim-types.mjs +0 -8
- 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 -97
- package/internal/shims.js.map +0 -1
- package/internal/shims.mjs +0 -90
- 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 -3
- package/internal/types.js.map +0 -1
- package/internal/types.mjs +0 -2
- 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 -37
- package/internal/utils/base64.js.map +0 -1
- package/internal/utils/base64.mjs +0 -32
- 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 -21
- package/internal/utils/env.js.map +0 -1
- package/internal/utils/env.mjs +0 -17
- 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 -86
- package/internal/utils/log.js.map +0 -1
- package/internal/utils/log.mjs +0 -80
- 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 -9
- package/internal/utils/query.js.map +0 -1
- package/internal/utils/query.mjs +0 -5
- 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 -6
- package/internal/utils/sleep.js.map +0 -1
- package/internal/utils/sleep.mjs +0 -2
- 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 -18
- package/internal/utils/uuid.js.map +0 -1
- package/internal/utils/uuid.mjs +0 -14
- 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 -111
- package/internal/utils/values.js.map +0 -1
- package/internal/utils/values.mjs +0 -93
- 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 -11
- package/internal/utils.js.map +0 -1
- package/internal/utils.mjs +0 -8
- 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 -32
- package/resources/account.js.map +0 -1
- package/resources/account.mjs +0 -28
- 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 -191
- package/resources/agents/agents.js.map +0 -1
- package/resources/agents/agents.mjs +0 -186
- 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 -33
- package/resources/agents/feedback.js.map +0 -1
- package/resources/agents/feedback.mjs +0 -29
- 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 -14
- package/resources/agents/index.js.map +0 -1
- package/resources/agents/index.mjs +0 -6
- 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 -171
- package/resources/agents/schedules.js.map +0 -1
- package/resources/agents/schedules.mjs +0 -167
- package/resources/agents/schedules.mjs.map +0 -1
- package/resources/agents/variations.d.mts +0 -723
- package/resources/agents/variations.d.mts.map +0 -1
- package/resources/agents/variations.d.ts +0 -723
- package/resources/agents/variations.d.ts.map +0 -1
- package/resources/agents/variations.js +0 -208
- package/resources/agents/variations.js.map +0 -1
- package/resources/agents/variations.mjs +0 -204
- 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 -31
- package/resources/agents/webhook-deliveries.js.map +0 -1
- package/resources/agents/webhook-deliveries.mjs +0 -27
- 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 -5
- package/resources/agents.js.map +0 -1
- package/resources/agents.mjs +0 -2
- 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 -52
- package/resources/ai-provider-keys.js.map +0 -1
- package/resources/ai-provider-keys.mjs +0 -48
- 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 -83
- package/resources/api-keys.js.map +0 -1
- package/resources/api-keys.mjs +0 -79
- 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 -42
- package/resources/global-api-key.js.map +0 -1
- package/resources/global-api-key.mjs +0 -38
- 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 -44
- package/resources/index.js.map +0 -1
- package/resources/index.mjs +0 -21
- 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 -58
- package/resources/memory-layers/entries.js.map +0 -1
- package/resources/memory-layers/entries.mjs +0 -54
- 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 -8
- package/resources/memory-layers/index.js.map +0 -1
- package/resources/memory-layers/index.mjs +0 -3
- 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 -63
- package/resources/memory-layers/memory-layers.js.map +0 -1
- package/resources/memory-layers/memory-layers.mjs +0 -58
- 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 -5
- package/resources/memory-layers.js.map +0 -1
- package/resources/memory-layers.mjs +0 -2
- package/resources/memory-layers.mjs.map +0 -1
- package/resources/models.d.mts +0 -315
- package/resources/models.d.mts.map +0 -1
- package/resources/models.d.ts +0 -315
- package/resources/models.d.ts.map +0 -1
- package/resources/models.js +0 -59
- package/resources/models.js.map +0 -1
- package/resources/models.mjs +0 -55
- 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 -52
- package/resources/objectives/feedback.js.map +0 -1
- package/resources/objectives/feedback.mjs +0 -48
- 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 -14
- package/resources/objectives/index.js.map +0 -1
- package/resources/objectives/index.mjs +0 -6
- 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 -213
- package/resources/objectives/objectives.js.map +0 -1
- package/resources/objectives/objectives.mjs +0 -208
- 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 -45
- package/resources/objectives/tasks.js.map +0 -1
- package/resources/objectives/tasks.mjs +0 -41
- 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 -110
- package/resources/objectives/tool-calls.js.map +0 -1
- package/resources/objectives/tool-calls.mjs +0 -106
- 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 -28
- package/resources/objectives/tools.js.map +0 -1
- package/resources/objectives/tools.mjs +0 -24
- 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 -5
- package/resources/objectives.js.map +0 -1
- package/resources/objectives.mjs +0 -2
- 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 -19
- package/resources/profiles.js.map +0 -1
- package/resources/profiles.mjs +0 -15
- 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 -19
- package/resources/search.js.map +0 -1
- package/resources/search.mjs +0 -15
- 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 -3
- package/resources/shared.js.map +0 -1
- package/resources/shared.mjs +0 -2
- 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 -8
- package/resources/tenants/index.js.map +0 -1
- package/resources/tenants/index.mjs +0 -3
- 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 -26
- package/resources/tenants/subjects.js.map +0 -1
- package/resources/tenants/subjects.mjs +0 -22
- 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 -57
- package/resources/tenants/tenants.js.map +0 -1
- package/resources/tenants/tenants.mjs +0 -52
- 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 -5
- package/resources/tenants.js.map +0 -1
- package/resources/tenants.mjs +0 -2
- 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 -10
- package/resources/tool-sets/index.js.map +0 -1
- package/resources/tool-sets/index.mjs +0 -4
- 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 -62
- package/resources/tool-sets/secrets.js.map +0 -1
- package/resources/tool-sets/secrets.mjs +0 -58
- 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 -122
- package/resources/tool-sets/tool-sets.js.map +0 -1
- package/resources/tool-sets/tool-sets.mjs +0 -117
- 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 -84
- package/resources/tool-sets/tools.js.map +0 -1
- package/resources/tool-sets/tools.mjs +0 -80
- 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 -5
- package/resources/tool-sets.js.map +0 -1
- package/resources/tool-sets.mjs +0 -2
- 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 -30
- package/resources/uploads.js.map +0 -1
- package/resources/uploads.mjs +0 -26
- 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 -22
- package/resources/webhooks.js.map +0 -1
- package/resources/webhooks.mjs +0 -18
- 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 -78
- package/resources/widget-sessions.js.map +0 -1
- package/resources/widget-sessions.mjs +0 -74
- 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 -82
- package/resources/widgets.js.map +0 -1
- package/resources/widgets.mjs +0 -78
- 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 -10
- package/resources/workspace-admin/index.js.map +0 -1
- package/resources/workspace-admin/index.mjs +0 -4
- 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 -73
- package/resources/workspace-admin/members.js.map +0 -1
- package/resources/workspace-admin/members.mjs +0 -69
- 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 -35
- package/resources/workspace-admin/profiles.js.map +0 -1
- package/resources/workspace-admin/profiles.mjs +0 -31
- 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 -111
- package/resources/workspace-admin/workspace-admin.js.map +0 -1
- package/resources/workspace-admin/workspace-admin.mjs +0 -106
- 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 -5
- package/resources/workspace-admin.js.map +0 -1
- package/resources/workspace-admin.mjs +0 -2
- 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 -52
- package/resources/workspace-secrets.js.map +0 -1
- package/resources/workspace-secrets.mjs +0 -48
- 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 -23
- package/resources/workspaces.js.map +0 -1
- package/resources/workspaces.mjs +0 -19
- 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 -90
- package/src/core/resource.ts +0 -9
- 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 -91
- package/src/internal/decoders/line.ts +0 -135
- package/src/internal/detect-platform.ts +0 -194
- package/src/internal/errors.ts +0 -31
- package/src/internal/headers.ts +0 -95
- package/src/internal/parse.ts +0 -68
- 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 -91
- package/src/internal/shim-types.ts +0 -24
- package/src/internal/shims.ts +0 -105
- package/src/internal/to-file.ts +0 -154
- package/src/internal/types.ts +0 -91
- package/src/internal/uploads.ts +0 -187
- package/src/internal/utils/base64.ts +0 -38
- package/src/internal/utils/bytes.ts +0 -32
- package/src/internal/utils/env.ts +0 -16
- package/src/internal/utils/log.ts +0 -126
- package/src/internal/utils/path.ts +0 -88
- package/src/internal/utils/query.ts +0 -5
- package/src/internal/utils/sleep.ts +0 -1
- package/src/internal/utils/uuid.ts +0 -15
- package/src/internal/utils/values.ts +0 -103
- package/src/internal/utils.ts +0 -7
- package/src/lib/.keep +0 -3
- package/src/pagination.ts +0 -2
- package/src/resource.ts +0 -2
- package/src/resources/account.ts +0 -158
- package/src/resources/agents/agents.ts +0 -616
- package/src/resources/agents/feedback.ts +0 -96
- package/src/resources/agents/index.ts +0 -75
- package/src/resources/agents/schedules.ts +0 -541
- package/src/resources/agents/variations.ts +0 -981
- package/src/resources/agents/webhook-deliveries.ts +0 -176
- package/src/resources/global-api-key.ts +0 -44
- package/src/resources/index.ts +0 -307
- package/src/resources/memory-layers/entries.ts +0 -373
- package/src/resources/memory-layers/index.ts +0 -29
- package/src/resources/memory-layers/memory-layers.ts +0 -314
- package/src/resources/objectives/feedback.ts +0 -171
- package/src/resources/objectives/index.ts +0 -115
- package/src/resources/objectives/objectives.ts +0 -1787
- package/src/resources/objectives/tasks.ts +0 -129
- package/src/resources/objectives/tool-calls.ts +0 -572
- package/src/resources/objectives/tools.ts +0 -74
- package/src/resources/search.ts +0 -52
- package/src/resources/shared.ts +0 -234
- package/src/resources/tenants/index.ts +0 -13
- package/src/resources/tenants/subjects.ts +0 -61
- package/src/resources/tenants/tenants.ts +0 -218
- package/src/resources/tool-sets/index.ts +0 -87
- package/src/resources/tool-sets/secrets.ts +0 -223
- package/src/resources/tool-sets/tool-sets.ts +0 -934
- package/src/resources/tool-sets/tools.ts +0 -456
- package/src/resources/webhooks.ts +0 -122
- package/src/resources/workspace-admin/index.ts +0 -12
- package/src/resources/workspace-admin/members.ts +0 -131
- package/src/resources/workspace-admin/profiles.ts +0 -58
- package/src/resources/workspace-admin/workspace-admin.ts +0 -302
- 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
package/src/client.ts
CHANGED
|
@@ -1,1547 +1,139 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
import {
|
|
4
|
-
import {
|
|
5
|
-
import {
|
|
6
|
-
|
|
7
|
-
import {
|
|
8
|
-
import
|
|
9
|
-
import {
|
|
10
|
-
import
|
|
11
|
-
import
|
|
12
|
-
import {
|
|
13
|
-
import {
|
|
14
|
-
import
|
|
15
|
-
import
|
|
16
|
-
import {
|
|
17
|
-
import
|
|
18
|
-
import
|
|
19
|
-
import {
|
|
20
|
-
import {
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
AccountResource,
|
|
24
|
-
AccountSpec,
|
|
25
|
-
Profile,
|
|
26
|
-
ProfileSpec,
|
|
27
|
-
RotateChallengeTokenResponse,
|
|
28
|
-
RotateWebhookSigningKeyResponse,
|
|
29
|
-
} from './resources/account';
|
|
30
|
-
import {
|
|
31
|
-
AIProviderConfigOpenAI,
|
|
32
|
-
AIProviderConfigOpenAICompatible,
|
|
33
|
-
AIProviderConfigOpenrouter,
|
|
34
|
-
AIProviderCredentialAPIKey,
|
|
35
|
-
AIProviderCredentialHeaders,
|
|
36
|
-
AIProviderKey,
|
|
37
|
-
AIProviderKeyCreateParams,
|
|
38
|
-
AIProviderKeyDeleteParams,
|
|
39
|
-
AIProviderKeyListParams,
|
|
40
|
-
AIProviderKeyRetrieveParams,
|
|
41
|
-
AIProviderKeySpec,
|
|
42
|
-
AIProviderKeyUpdateParams,
|
|
43
|
-
AIProviderKeys,
|
|
44
|
-
AIProviderKeysCursorPagination,
|
|
45
|
-
} from './resources/ai-provider-keys';
|
|
46
|
-
import {
|
|
47
|
-
APIKey,
|
|
48
|
-
APIKeyCreateParams,
|
|
49
|
-
APIKeyDeleteParams,
|
|
50
|
-
APIKeyDisableParams,
|
|
51
|
-
APIKeyEnableParams,
|
|
52
|
-
APIKeyInfo,
|
|
53
|
-
APIKeyListParams,
|
|
54
|
-
APIKeyRetrieveParams,
|
|
55
|
-
APIKeyRotateParams,
|
|
56
|
-
APIKeySpec,
|
|
57
|
-
APIKeyUpdateParams,
|
|
58
|
-
APIKeys,
|
|
59
|
-
APIKeysCursorPagination,
|
|
60
|
-
} from './resources/api-keys';
|
|
61
|
-
import { GlobalAPIKey } from './resources/global-api-key';
|
|
62
|
-
import {
|
|
63
|
-
CapabilityCaching,
|
|
64
|
-
CapabilityMaxOutputTokens,
|
|
65
|
-
CapabilityReasoning,
|
|
66
|
-
CapabilityStopSequences,
|
|
67
|
-
CapabilityTemperature,
|
|
68
|
-
CapabilityTopK,
|
|
69
|
-
CapabilityTopP,
|
|
70
|
-
Model,
|
|
71
|
-
ModelDisableParams,
|
|
72
|
-
ModelEnableParams,
|
|
73
|
-
ModelListParams,
|
|
74
|
-
ModelRetrieveParams,
|
|
75
|
-
ModelSpec,
|
|
76
|
-
ModelSpecCapability,
|
|
77
|
-
ModelSpecCapabilityCaching,
|
|
78
|
-
ModelSpecCapabilityMaxOutputTokens,
|
|
79
|
-
ModelSpecCapabilityReasoning,
|
|
80
|
-
ModelSpecCapabilityStopSequences,
|
|
81
|
-
ModelSpecCapabilityTemperature,
|
|
82
|
-
ModelSpecCapabilityTopK,
|
|
83
|
-
ModelSpecCapabilityTopP,
|
|
84
|
-
ModelSwapParams,
|
|
85
|
-
ModelSwapResponse,
|
|
86
|
-
Models,
|
|
87
|
-
ModelsCursorPagination,
|
|
88
|
-
} from './resources/models';
|
|
89
|
-
import { Profiles } from './resources/profiles';
|
|
90
|
-
import {
|
|
91
|
-
Search,
|
|
92
|
-
SearchSearchToolsOrToolSetsParams,
|
|
93
|
-
SearchSearchToolsOrToolSetsResponse,
|
|
94
|
-
} from './resources/search';
|
|
95
|
-
import {
|
|
96
|
-
Upload,
|
|
97
|
-
UploadCreateParams,
|
|
98
|
-
UploadInfo,
|
|
99
|
-
UploadRetrieveParams,
|
|
100
|
-
UploadSpec,
|
|
101
|
-
Uploads as UploadsAPIUploads,
|
|
102
|
-
} from './resources/uploads';
|
|
103
|
-
import { UnsafeUnwrapWebhookEvent, UnwrapWebhookEvent, Webhooks } from './resources/webhooks';
|
|
104
|
-
import {
|
|
105
|
-
SubjectAssertion,
|
|
106
|
-
SubjectReference,
|
|
107
|
-
TenantAssertion,
|
|
108
|
-
TenantReference,
|
|
109
|
-
WidgetSession,
|
|
110
|
-
WidgetSessionCreateParams,
|
|
111
|
-
WidgetSessionDeleteParams,
|
|
112
|
-
WidgetSessionDeleteTenantParams,
|
|
113
|
-
WidgetSessionDeleteTenantResponse,
|
|
114
|
-
WidgetSessionInfo,
|
|
115
|
-
WidgetSessionListParams,
|
|
116
|
-
WidgetSessionRetrieveParams,
|
|
117
|
-
WidgetSessionRevokeParams,
|
|
118
|
-
WidgetSessionSpec,
|
|
119
|
-
WidgetSessions,
|
|
120
|
-
WidgetSessionsCursorPagination,
|
|
121
|
-
} from './resources/widget-sessions';
|
|
122
|
-
import {
|
|
123
|
-
Widget,
|
|
124
|
-
WidgetArchiveParams,
|
|
125
|
-
WidgetCreateParams,
|
|
126
|
-
WidgetDeleteParams,
|
|
127
|
-
WidgetInfo,
|
|
128
|
-
WidgetListParams,
|
|
129
|
-
WidgetRetrieveParams,
|
|
130
|
-
WidgetSpec,
|
|
131
|
-
WidgetUnarchiveParams,
|
|
132
|
-
WidgetUpdateParams,
|
|
133
|
-
Widgets,
|
|
134
|
-
WidgetsCursorPagination,
|
|
135
|
-
} from './resources/widgets';
|
|
136
|
-
import {
|
|
137
|
-
WorkspaceSecret,
|
|
138
|
-
WorkspaceSecretCreateParams,
|
|
139
|
-
WorkspaceSecretDeleteParams,
|
|
140
|
-
WorkspaceSecretInfo,
|
|
141
|
-
WorkspaceSecretListParams,
|
|
142
|
-
WorkspaceSecretRetrieveParams,
|
|
143
|
-
WorkspaceSecretSpec,
|
|
144
|
-
WorkspaceSecretUpdateParams,
|
|
145
|
-
WorkspaceSecrets,
|
|
146
|
-
WorkspaceSecretsCursorPagination,
|
|
147
|
-
} from './resources/workspace-secrets';
|
|
148
|
-
import {
|
|
149
|
-
Workspace,
|
|
150
|
-
WorkspaceListParams,
|
|
151
|
-
WorkspaceSpec,
|
|
152
|
-
Workspaces,
|
|
153
|
-
WorkspacesCursorPagination,
|
|
154
|
-
} from './resources/workspaces';
|
|
155
|
-
import {
|
|
156
|
-
Agent,
|
|
157
|
-
AgentArchiveParams,
|
|
158
|
-
AgentCreateParams,
|
|
159
|
-
AgentDeleteParams,
|
|
160
|
-
AgentInfo,
|
|
161
|
-
AgentListParams,
|
|
162
|
-
AgentPublishParams,
|
|
163
|
-
AgentRetrieveParams,
|
|
164
|
-
AgentSpec,
|
|
165
|
-
AgentUnarchiveParams,
|
|
166
|
-
AgentUnpublishParams,
|
|
167
|
-
AgentUpdateParams,
|
|
168
|
-
Agents,
|
|
169
|
-
AgentsCursorPagination,
|
|
170
|
-
Page,
|
|
171
|
-
} from './resources/agents/agents';
|
|
172
|
-
import {
|
|
173
|
-
MemoryLayer,
|
|
174
|
-
MemoryLayerCreateParams,
|
|
175
|
-
MemoryLayerDeleteParams,
|
|
176
|
-
MemoryLayerInfo,
|
|
177
|
-
MemoryLayerListParams,
|
|
178
|
-
MemoryLayerRetrieveParams,
|
|
179
|
-
MemoryLayerSpec,
|
|
180
|
-
MemoryLayerUpdateParams,
|
|
181
|
-
MemoryLayers,
|
|
182
|
-
MemoryLayersCursorPagination,
|
|
183
|
-
} from './resources/memory-layers/memory-layers';
|
|
184
|
-
import {
|
|
185
|
-
AssistantMessage,
|
|
186
|
-
AssistantToolCall,
|
|
187
|
-
CallableTool,
|
|
188
|
-
CallableToolAgent,
|
|
189
|
-
CallableToolCadenyaProvidedTool,
|
|
190
|
-
CallableToolTool,
|
|
191
|
-
ContextLengths,
|
|
192
|
-
ContextWindowCompacted,
|
|
193
|
-
MemoryRead,
|
|
194
|
-
MemoryReference,
|
|
195
|
-
Objective,
|
|
196
|
-
ObjectiveCancelParams,
|
|
197
|
-
ObjectiveCompactParams,
|
|
198
|
-
ObjectiveCompactResponse,
|
|
199
|
-
ObjectiveConfigSnapshot,
|
|
200
|
-
ObjectiveContextWindow,
|
|
201
|
-
ObjectiveContextWindowData,
|
|
202
|
-
ObjectiveContextWindowsCursorPagination,
|
|
203
|
-
ObjectiveContinueParams,
|
|
204
|
-
ObjectiveCreateParams,
|
|
205
|
-
ObjectiveDiagnostics,
|
|
206
|
-
ObjectiveError,
|
|
207
|
-
ObjectiveEvent,
|
|
208
|
-
ObjectiveEventData,
|
|
209
|
-
ObjectiveEventDataAssistantMessage,
|
|
210
|
-
ObjectiveEventDataCancelled,
|
|
211
|
-
ObjectiveEventDataContextWindowCompacted,
|
|
212
|
-
ObjectiveEventDataError,
|
|
213
|
-
ObjectiveEventDataFinalized,
|
|
214
|
-
ObjectiveEventDataMemoryRead,
|
|
215
|
-
ObjectiveEventDataNotice,
|
|
216
|
-
ObjectiveEventDataReasoning,
|
|
217
|
-
ObjectiveEventDataSubAgentSpawned,
|
|
218
|
-
ObjectiveEventDataSubAgentUpdated,
|
|
219
|
-
ObjectiveEventDataTimedOut,
|
|
220
|
-
ObjectiveEventDataToolApprovalRequested,
|
|
221
|
-
ObjectiveEventDataToolApproved,
|
|
222
|
-
ObjectiveEventDataToolCalled,
|
|
223
|
-
ObjectiveEventDataToolDenied,
|
|
224
|
-
ObjectiveEventDataToolError,
|
|
225
|
-
ObjectiveEventDataToolResult,
|
|
226
|
-
ObjectiveEventDataUserMessage,
|
|
227
|
-
ObjectiveEventInfo,
|
|
228
|
-
ObjectiveEventWebhookData,
|
|
229
|
-
ObjectiveEventsCursorPagination,
|
|
230
|
-
ObjectiveInfo,
|
|
231
|
-
ObjectiveListContextWindowsParams,
|
|
232
|
-
ObjectiveListEventsParams,
|
|
233
|
-
ObjectiveListParams,
|
|
234
|
-
ObjectiveRetrieveDiagnosticsParams,
|
|
235
|
-
ObjectiveRetrieveDiagnosticsResponse,
|
|
236
|
-
ObjectiveRetrieveParams,
|
|
237
|
-
ObjectiveSecret,
|
|
238
|
-
ObjectiveStreamEventsParams,
|
|
239
|
-
Objectives,
|
|
240
|
-
ObjectivesCursorPagination,
|
|
241
|
-
Reasoning,
|
|
242
|
-
SubAgentSpawned,
|
|
243
|
-
SubAgentUpdated,
|
|
244
|
-
ToolApprovalRequested,
|
|
245
|
-
ToolApproved,
|
|
246
|
-
ToolCalled,
|
|
247
|
-
ToolDenied,
|
|
248
|
-
ToolError,
|
|
249
|
-
ToolResult,
|
|
250
|
-
UserMessage,
|
|
251
|
-
} from './resources/objectives/objectives';
|
|
252
|
-
import {
|
|
253
|
-
Subject,
|
|
254
|
-
SubjectInfo,
|
|
255
|
-
Tenant,
|
|
256
|
-
TenantDeleteParams,
|
|
257
|
-
TenantInfo,
|
|
258
|
-
TenantListParams,
|
|
259
|
-
TenantRetrieveParams,
|
|
260
|
-
Tenants,
|
|
261
|
-
TenantsCursorPagination,
|
|
262
|
-
} from './resources/tenants/tenants';
|
|
263
|
-
import {
|
|
264
|
-
ApprovalRequirementFilter,
|
|
265
|
-
ApprovalRequirementFilterAlways,
|
|
266
|
-
ApprovalRequirementFilterOnly,
|
|
267
|
-
AttributeFilter,
|
|
268
|
-
StringMatcher,
|
|
269
|
-
StringMatcherContains,
|
|
270
|
-
StringMatcherEndsWith,
|
|
271
|
-
StringMatcherExact,
|
|
272
|
-
StringMatcherRegex,
|
|
273
|
-
StringMatcherStartsWith,
|
|
274
|
-
SyncCompleted,
|
|
275
|
-
SyncFailed,
|
|
276
|
-
SyncStarted,
|
|
277
|
-
ToolFilter,
|
|
278
|
-
ToolSet,
|
|
279
|
-
ToolSetAdapter,
|
|
280
|
-
ToolSetAdapterBare,
|
|
281
|
-
ToolSetAdapterBareVariant,
|
|
282
|
-
ToolSetAdapterHTTP,
|
|
283
|
-
ToolSetAdapterHTTPVariant,
|
|
284
|
-
ToolSetAdapterMCP,
|
|
285
|
-
ToolSetAdapterMCPVariant,
|
|
286
|
-
ToolSetAdapterOpenAPI,
|
|
287
|
-
ToolSetAdapterOpenAPIURL,
|
|
288
|
-
ToolSetAdapterOpenAPIUploadID,
|
|
289
|
-
ToolSetAdapterOpenAPIVariant,
|
|
290
|
-
ToolSetArchiveParams,
|
|
291
|
-
ToolSetCreateParams,
|
|
292
|
-
ToolSetDeleteParams,
|
|
293
|
-
ToolSetEvent,
|
|
294
|
-
ToolSetEventData,
|
|
295
|
-
ToolSetEventDataSyncCompleted,
|
|
296
|
-
ToolSetEventDataSyncFailed,
|
|
297
|
-
ToolSetEventDataSyncStarted,
|
|
298
|
-
ToolSetEventsCursorPagination,
|
|
299
|
-
ToolSetGetOpenAPISpecParams,
|
|
300
|
-
ToolSetGetOpenAPISpecResponse,
|
|
301
|
-
ToolSetInfo,
|
|
302
|
-
ToolSetListEventsParams,
|
|
303
|
-
ToolSetListParams,
|
|
304
|
-
ToolSetListUsageParams,
|
|
305
|
-
ToolSetRetrieveParams,
|
|
306
|
-
ToolSetSpec,
|
|
307
|
-
ToolSetUnarchiveParams,
|
|
308
|
-
ToolSetUpdateParams,
|
|
309
|
-
ToolSetUsage,
|
|
310
|
-
ToolSetUsagesCursorPagination,
|
|
311
|
-
ToolSets,
|
|
312
|
-
ToolSetsCursorPagination,
|
|
313
|
-
} from './resources/tool-sets/tool-sets';
|
|
314
|
-
import {
|
|
315
|
-
WorkspaceAdmin,
|
|
316
|
-
WorkspaceAdminArchiveParams,
|
|
317
|
-
WorkspaceAdminCreateParams,
|
|
318
|
-
WorkspaceAdminListParams,
|
|
319
|
-
WorkspaceAdminRetrieveParams,
|
|
320
|
-
WorkspaceAdminUpdateParams,
|
|
321
|
-
WorkspaceMember,
|
|
322
|
-
} from './resources/workspace-admin/workspace-admin';
|
|
323
|
-
import { type Fetch } from './internal/builtin-types';
|
|
324
|
-
import { HeadersLike, NullableHeaders, buildHeaders } from './internal/headers';
|
|
325
|
-
import { FinalRequestOptions, RequestOptions } from './internal/request-options';
|
|
326
|
-
import { readEnv } from './internal/utils/env';
|
|
327
|
-
import {
|
|
328
|
-
type LogLevel,
|
|
329
|
-
type Logger,
|
|
330
|
-
formatRequestDetails,
|
|
331
|
-
loggerFor,
|
|
332
|
-
parseLogLevel,
|
|
333
|
-
} from './internal/utils/log';
|
|
334
|
-
import { isEmptyObj } from './internal/utils/values';
|
|
1
|
+
// Generated by redwood. Do not edit by hand.
|
|
2
|
+
|
|
3
|
+
import { HttpClient } from './core/http.js';
|
|
4
|
+
import type { Logger, LogLevel } from './core/http.js';
|
|
5
|
+
import { Webhooks } from './webhooks.js';
|
|
6
|
+
import { Accounts } from './resources/accounts.js';
|
|
7
|
+
import { ApiKeys } from './resources/api-keys.js';
|
|
8
|
+
import { WorkspaceAdmin } from './resources/workspace-admin.js';
|
|
9
|
+
import { Profiles } from './resources/profiles.js';
|
|
10
|
+
import { Workspaces } from './resources/workspaces.js';
|
|
11
|
+
import { Agents } from './resources/agents.js';
|
|
12
|
+
import { AiProviderKeys } from './resources/ai-provider-keys.js';
|
|
13
|
+
import { MemoryLayers } from './resources/memory-layers.js';
|
|
14
|
+
import { Models } from './resources/models.js';
|
|
15
|
+
import { Objectives } from './resources/objectives.js';
|
|
16
|
+
import { ToolSearch } from './resources/tool-search.js';
|
|
17
|
+
import { Tenants } from './resources/tenants.js';
|
|
18
|
+
import { ToolSets } from './resources/tool-sets.js';
|
|
19
|
+
import { Uploads } from './resources/uploads.js';
|
|
20
|
+
import { WidgetSessions } from './resources/widget-sessions.js';
|
|
21
|
+
import { Widgets } from './resources/widgets.js';
|
|
22
|
+
import { WorkspaceSecrets } from './resources/workspace-secrets.js';
|
|
335
23
|
|
|
336
24
|
export interface ClientOptions {
|
|
337
|
-
/**
|
|
338
|
-
|
|
339
|
-
|
|
340
|
-
|
|
341
|
-
|
|
342
|
-
|
|
343
|
-
|
|
344
|
-
|
|
345
|
-
|
|
346
|
-
|
|
347
|
-
|
|
348
|
-
|
|
349
|
-
|
|
350
|
-
|
|
351
|
-
|
|
352
|
-
/**
|
|
353
|
-
|
|
354
|
-
|
|
355
|
-
|
|
356
|
-
|
|
357
|
-
|
|
358
|
-
|
|
359
|
-
|
|
360
|
-
|
|
361
|
-
|
|
362
|
-
*
|
|
363
|
-
* Note that request timeouts are retried by default, so in a worst-case scenario you may wait
|
|
364
|
-
* much longer than this timeout before the promise succeeds or fails.
|
|
365
|
-
*
|
|
366
|
-
* @unit milliseconds
|
|
367
|
-
*/
|
|
368
|
-
timeout?: number | undefined;
|
|
369
|
-
/**
|
|
370
|
-
* Additional `RequestInit` options to be passed to `fetch` calls.
|
|
371
|
-
* Properties will be overridden by per-request `fetchOptions`.
|
|
372
|
-
*/
|
|
373
|
-
fetchOptions?: MergedRequestInit | undefined;
|
|
374
|
-
|
|
375
|
-
/**
|
|
376
|
-
* Specify a custom `fetch` function implementation.
|
|
377
|
-
*
|
|
378
|
-
* If not provided, we expect that `fetch` is defined globally.
|
|
379
|
-
*/
|
|
380
|
-
fetch?: Fetch | undefined;
|
|
381
|
-
|
|
382
|
-
/**
|
|
383
|
-
* The maximum number of times that the client will retry a request in case of a
|
|
384
|
-
* temporary failure, like a network error or a 5XX error from the server.
|
|
385
|
-
*
|
|
386
|
-
* @default 0
|
|
387
|
-
*/
|
|
388
|
-
maxRetries?: number | undefined;
|
|
389
|
-
|
|
390
|
-
/**
|
|
391
|
-
* Default headers to include with every request to the API.
|
|
392
|
-
*
|
|
393
|
-
* These can be removed in individual requests by explicitly setting the
|
|
394
|
-
* header to `null` in request options.
|
|
395
|
-
*/
|
|
396
|
-
defaultHeaders?: HeadersLike | undefined;
|
|
397
|
-
|
|
398
|
-
/**
|
|
399
|
-
* Default query parameters to include with every request to the API.
|
|
400
|
-
*
|
|
401
|
-
* These can be removed in individual requests by explicitly setting the
|
|
402
|
-
* param to `undefined` in request options.
|
|
403
|
-
*/
|
|
404
|
-
defaultQuery?: Record<string, string | undefined> | undefined;
|
|
405
|
-
|
|
406
|
-
/**
|
|
407
|
-
* Set the log level.
|
|
408
|
-
*
|
|
409
|
-
* Defaults to process.env['CADENYA_LOG'] or 'warn' if it isn't set.
|
|
410
|
-
*/
|
|
411
|
-
logLevel?: LogLevel | undefined;
|
|
412
|
-
|
|
413
|
-
/**
|
|
414
|
-
* Set the logger.
|
|
415
|
-
*
|
|
416
|
-
* Defaults to globalThis.console.
|
|
417
|
-
*/
|
|
418
|
-
logger?: Logger | undefined;
|
|
25
|
+
/** API key. Defaults to the CADENYA_API_KEY environment variable. */
|
|
26
|
+
apiKey?: string;
|
|
27
|
+
/** Override the API base URL. Defaults to https://api.cadenya.com. */
|
|
28
|
+
baseURL?: string;
|
|
29
|
+
/** Max automatic retries for retryable failures. Defaults to 0. */
|
|
30
|
+
maxRetries?: number;
|
|
31
|
+
/**
|
|
32
|
+
* Deadline for ordinary (non-streaming) requests in milliseconds; override
|
|
33
|
+
* per request with `options.timeout`. Streams bound only response-header
|
|
34
|
+
* acquisition — body lifetime stays under the caller's AbortSignal.
|
|
35
|
+
* Defaults to 60000; a non-finite or <= 0 value disables the deadline.
|
|
36
|
+
*/
|
|
37
|
+
timeout?: number;
|
|
38
|
+
/** Headers sent with every request. */
|
|
39
|
+
defaultHeaders?: Record<string, string>;
|
|
40
|
+
/** Custom fetch implementation. */
|
|
41
|
+
fetch?: typeof fetch;
|
|
42
|
+
/** Destination for SDK logs. Defaults to `console`. */
|
|
43
|
+
logger?: Logger;
|
|
44
|
+
/** 'debug' | 'warn' (default) | 'off'. Never logs headers or bodies. */
|
|
45
|
+
logLevel?: LogLevel;
|
|
46
|
+
/** Default `workspaceId` for every call that takes one. Defaults to the CADENYA_WORKSPACE_ID environment variable. */
|
|
47
|
+
workspaceId?: string;
|
|
48
|
+
/** Secret for webhook signature verification. Defaults to the CADENYA_WEBHOOK_SECRET environment variable. */
|
|
49
|
+
webhookSecret?: string;
|
|
419
50
|
}
|
|
420
51
|
|
|
421
|
-
/**
|
|
422
|
-
* API Client for interfacing with the Cadenya API.
|
|
423
|
-
*/
|
|
424
52
|
export class Cadenya {
|
|
425
|
-
|
|
426
|
-
|
|
427
|
-
|
|
428
|
-
|
|
429
|
-
|
|
430
|
-
|
|
431
|
-
|
|
432
|
-
|
|
433
|
-
|
|
434
|
-
|
|
435
|
-
|
|
436
|
-
|
|
437
|
-
|
|
438
|
-
|
|
439
|
-
|
|
440
|
-
|
|
441
|
-
|
|
442
|
-
|
|
443
|
-
|
|
444
|
-
|
|
445
|
-
|
|
446
|
-
|
|
447
|
-
|
|
448
|
-
|
|
449
|
-
|
|
450
|
-
|
|
451
|
-
|
|
452
|
-
|
|
453
|
-
* @param {Record<string, string | undefined>} opts.defaultQuery - Default query parameters to include with every request to the API.
|
|
454
|
-
*/
|
|
455
|
-
constructor({
|
|
456
|
-
baseURL = readEnv('CADENYA_BASE_URL'),
|
|
457
|
-
apiKey = readEnv('CADENYA_API_KEY'),
|
|
458
|
-
webhookKey = readEnv('CADENYA_WEBHOOK_KEY') ?? null,
|
|
459
|
-
workspaceID = readEnv('CADENYA_WORKSPACE_ID') ?? null,
|
|
460
|
-
...opts
|
|
461
|
-
}: ClientOptions = {}) {
|
|
462
|
-
if (apiKey === undefined) {
|
|
463
|
-
throw new Errors.CadenyaError(
|
|
464
|
-
"The CADENYA_API_KEY environment variable is missing or empty; either provide it, or instantiate the Cadenya client with an apiKey option, like new Cadenya({ apiKey: 'My API Key' }).",
|
|
53
|
+
readonly accounts: Accounts;
|
|
54
|
+
readonly apiKeys: ApiKeys;
|
|
55
|
+
readonly workspaceAdmin: WorkspaceAdmin;
|
|
56
|
+
readonly profiles: Profiles;
|
|
57
|
+
readonly workspaces: Workspaces;
|
|
58
|
+
readonly agents: Agents;
|
|
59
|
+
readonly aiProviderKeys: AiProviderKeys;
|
|
60
|
+
readonly memoryLayers: MemoryLayers;
|
|
61
|
+
readonly models: Models;
|
|
62
|
+
readonly objectives: Objectives;
|
|
63
|
+
readonly toolSearch: ToolSearch;
|
|
64
|
+
readonly tenants: Tenants;
|
|
65
|
+
readonly toolSets: ToolSets;
|
|
66
|
+
readonly uploads: Uploads;
|
|
67
|
+
readonly widgetSessions: WidgetSessions;
|
|
68
|
+
readonly widgets: Widgets;
|
|
69
|
+
readonly workspaceSecrets: WorkspaceSecrets;
|
|
70
|
+
readonly webhooks: Webhooks;
|
|
71
|
+
|
|
72
|
+
private readonly _client: HttpClient;
|
|
73
|
+
|
|
74
|
+
constructor(options: ClientOptions = {}) {
|
|
75
|
+
// Presence is not validity: empty strings from options or environment
|
|
76
|
+
// are configuration mistakes, not credentials.
|
|
77
|
+
const apiKey = resolveOption('apiKey', options.apiKey, readEnv('CADENYA_API_KEY'));
|
|
78
|
+
if (!apiKey) {
|
|
79
|
+
throw new Error(
|
|
80
|
+
"Missing API key. Pass it with `new Cadenya({ apiKey })` or set the CADENYA_API_KEY environment variable.",
|
|
465
81
|
);
|
|
466
82
|
}
|
|
467
|
-
|
|
468
|
-
|
|
469
|
-
apiKey,
|
|
470
|
-
|
|
471
|
-
|
|
472
|
-
...
|
|
473
|
-
|
|
474
|
-
|
|
475
|
-
|
|
476
|
-
|
|
477
|
-
this.timeout = options.timeout ?? Cadenya.DEFAULT_TIMEOUT /* 1 minute */;
|
|
478
|
-
this.logger = options.logger ?? console;
|
|
479
|
-
const defaultLogLevel = 'warn';
|
|
480
|
-
// Set default logLevel early so that we can log a warning in parseLogLevel.
|
|
481
|
-
this.logLevel = defaultLogLevel;
|
|
482
|
-
this.logLevel =
|
|
483
|
-
parseLogLevel(options.logLevel, 'ClientOptions.logLevel', this) ??
|
|
484
|
-
parseLogLevel(readEnv('CADENYA_LOG'), "process.env['CADENYA_LOG']", this) ??
|
|
485
|
-
defaultLogLevel;
|
|
486
|
-
this.fetchOptions = options.fetchOptions;
|
|
487
|
-
this.maxRetries = options.maxRetries ?? 0;
|
|
488
|
-
this.fetch = options.fetch ?? Shims.getDefaultFetch();
|
|
489
|
-
this.#encoder = Opts.FallbackEncoder;
|
|
490
|
-
|
|
491
|
-
const customHeadersEnv = readEnv('CADENYA_CUSTOM_HEADERS');
|
|
492
|
-
if (customHeadersEnv) {
|
|
493
|
-
const parsed: Record<string, string> = {};
|
|
494
|
-
for (const line of customHeadersEnv.split('\n')) {
|
|
495
|
-
const colon = line.indexOf(':');
|
|
496
|
-
if (colon >= 0) {
|
|
497
|
-
parsed[line.substring(0, colon).trim()] = line.substring(colon + 1).trim();
|
|
498
|
-
}
|
|
499
|
-
}
|
|
500
|
-
options.defaultHeaders = { ...parsed, ...options.defaultHeaders };
|
|
501
|
-
}
|
|
502
|
-
|
|
503
|
-
this._options = options;
|
|
504
|
-
|
|
505
|
-
this.apiKey = apiKey;
|
|
506
|
-
this.webhookKey = webhookKey;
|
|
507
|
-
this.workspaceID = workspaceID;
|
|
508
|
-
}
|
|
509
|
-
|
|
510
|
-
/**
|
|
511
|
-
* Create a new client instance re-using the same options given to the current client with optional overriding.
|
|
512
|
-
*/
|
|
513
|
-
withOptions(options: Partial<ClientOptions>): this {
|
|
514
|
-
const client = new (this.constructor as any as new (props: ClientOptions) => typeof this)({
|
|
515
|
-
...this._options,
|
|
516
|
-
baseURL: this.baseURL,
|
|
517
|
-
maxRetries: this.maxRetries,
|
|
518
|
-
timeout: this.timeout,
|
|
519
|
-
logger: this.logger,
|
|
520
|
-
logLevel: this.logLevel,
|
|
521
|
-
fetch: this.fetch,
|
|
522
|
-
fetchOptions: this.fetchOptions,
|
|
523
|
-
apiKey: this.apiKey,
|
|
524
|
-
webhookKey: this.webhookKey,
|
|
525
|
-
workspaceID: this.workspaceID,
|
|
526
|
-
...options,
|
|
83
|
+
this._client = new HttpClient({
|
|
84
|
+
baseURL: resolveOption('baseURL', options.baseURL, readEnv('CADENYA_BASE_URL')) ?? 'https://api.cadenya.com',
|
|
85
|
+
authHeader: () => ({ Authorization: `Bearer ${apiKey}` }),
|
|
86
|
+
maxRetries: options.maxRetries ?? 0,
|
|
87
|
+
timeout: options.timeout,
|
|
88
|
+
defaultHeaders: { 'User-Agent': 'cadenya-typescript/1.0.0 (api 1.0)', ...options.defaultHeaders },
|
|
89
|
+
fetch: options.fetch,
|
|
90
|
+
logger: options.logger,
|
|
91
|
+
logLevel: options.logLevel,
|
|
92
|
+
defaults: { workspaceId: resolveOption('workspaceId', options.workspaceId, readEnv('CADENYA_WORKSPACE_ID')) },
|
|
527
93
|
});
|
|
528
|
-
|
|
529
|
-
|
|
530
|
-
|
|
531
|
-
|
|
532
|
-
|
|
533
|
-
|
|
534
|
-
|
|
535
|
-
|
|
536
|
-
|
|
537
|
-
|
|
538
|
-
|
|
539
|
-
|
|
540
|
-
|
|
541
|
-
|
|
542
|
-
|
|
543
|
-
|
|
94
|
+
this.webhooks = new Webhooks(resolveOption('webhookSecret', options.webhookSecret, readEnv('CADENYA_WEBHOOK_SECRET')));
|
|
95
|
+
this.accounts = new Accounts(this._client);
|
|
96
|
+
this.apiKeys = new ApiKeys(this._client);
|
|
97
|
+
this.workspaceAdmin = new WorkspaceAdmin(this._client);
|
|
98
|
+
this.profiles = new Profiles(this._client);
|
|
99
|
+
this.workspaces = new Workspaces(this._client);
|
|
100
|
+
this.agents = new Agents(this._client);
|
|
101
|
+
this.aiProviderKeys = new AiProviderKeys(this._client);
|
|
102
|
+
this.memoryLayers = new MemoryLayers(this._client);
|
|
103
|
+
this.models = new Models(this._client);
|
|
104
|
+
this.objectives = new Objectives(this._client);
|
|
105
|
+
this.toolSearch = new ToolSearch(this._client);
|
|
106
|
+
this.tenants = new Tenants(this._client);
|
|
107
|
+
this.toolSets = new ToolSets(this._client);
|
|
108
|
+
this.uploads = new Uploads(this._client);
|
|
109
|
+
this.widgetSessions = new WidgetSessions(this._client);
|
|
110
|
+
this.widgets = new Widgets(this._client);
|
|
111
|
+
this.workspaceSecrets = new WorkspaceSecrets(this._client);
|
|
544
112
|
}
|
|
113
|
+
}
|
|
545
114
|
|
|
546
|
-
|
|
547
|
-
|
|
548
|
-
|
|
549
|
-
|
|
550
|
-
|
|
551
|
-
return stringifyQuery(query);
|
|
552
|
-
}
|
|
553
|
-
|
|
554
|
-
private getUserAgent(): string {
|
|
555
|
-
return `${this.constructor.name}/JS ${VERSION}`;
|
|
556
|
-
}
|
|
557
|
-
|
|
558
|
-
protected defaultIdempotencyKey(): string {
|
|
559
|
-
return `cadenya-node-retry-${uuid4()}`;
|
|
560
|
-
}
|
|
561
|
-
|
|
562
|
-
protected makeStatusError(
|
|
563
|
-
status: number,
|
|
564
|
-
error: Object,
|
|
565
|
-
message: string | undefined,
|
|
566
|
-
headers: Headers,
|
|
567
|
-
): Errors.APIError {
|
|
568
|
-
return Errors.APIError.generate(status, error, message, headers);
|
|
569
|
-
}
|
|
570
|
-
|
|
571
|
-
buildURL(
|
|
572
|
-
path: string,
|
|
573
|
-
query: Record<string, unknown> | null | undefined,
|
|
574
|
-
defaultBaseURL?: string | undefined,
|
|
575
|
-
): string {
|
|
576
|
-
const baseURL = (!this.#baseURLOverridden() && defaultBaseURL) || this.baseURL;
|
|
577
|
-
const url =
|
|
578
|
-
isAbsoluteURL(path) ?
|
|
579
|
-
new URL(path)
|
|
580
|
-
: new URL(baseURL + (baseURL.endsWith('/') && path.startsWith('/') ? path.slice(1) : path));
|
|
581
|
-
|
|
582
|
-
const defaultQuery = this.defaultQuery();
|
|
583
|
-
const pathQuery = Object.fromEntries(url.searchParams);
|
|
584
|
-
if (!isEmptyObj(defaultQuery) || !isEmptyObj(pathQuery)) {
|
|
585
|
-
query = { ...pathQuery, ...defaultQuery, ...query };
|
|
586
|
-
}
|
|
587
|
-
|
|
588
|
-
if (typeof query === 'object' && query && !Array.isArray(query)) {
|
|
589
|
-
url.search = this.stringifyQuery(query);
|
|
590
|
-
}
|
|
591
|
-
|
|
592
|
-
return url.toString();
|
|
593
|
-
}
|
|
594
|
-
|
|
595
|
-
/**
|
|
596
|
-
* Used as a callback for mutating the given `FinalRequestOptions` object.
|
|
597
|
-
*/
|
|
598
|
-
protected async prepareOptions(options: FinalRequestOptions): Promise<void> {}
|
|
599
|
-
|
|
600
|
-
/**
|
|
601
|
-
* Used as a callback for mutating the given `RequestInit` object.
|
|
602
|
-
*
|
|
603
|
-
* This is useful for cases where you want to add certain headers based off of
|
|
604
|
-
* the request properties, e.g. `method` or `url`.
|
|
605
|
-
*/
|
|
606
|
-
protected async prepareRequest(
|
|
607
|
-
request: RequestInit,
|
|
608
|
-
{ url, options }: { url: string; options: FinalRequestOptions },
|
|
609
|
-
): Promise<void> {}
|
|
610
|
-
|
|
611
|
-
get<Rsp>(path: string, opts?: PromiseOrValue<RequestOptions>): APIPromise<Rsp> {
|
|
612
|
-
return this.methodRequest('get', path, opts);
|
|
613
|
-
}
|
|
614
|
-
|
|
615
|
-
post<Rsp>(path: string, opts?: PromiseOrValue<RequestOptions>): APIPromise<Rsp> {
|
|
616
|
-
return this.methodRequest('post', path, opts);
|
|
617
|
-
}
|
|
618
|
-
|
|
619
|
-
patch<Rsp>(path: string, opts?: PromiseOrValue<RequestOptions>): APIPromise<Rsp> {
|
|
620
|
-
return this.methodRequest('patch', path, opts);
|
|
621
|
-
}
|
|
622
|
-
|
|
623
|
-
put<Rsp>(path: string, opts?: PromiseOrValue<RequestOptions>): APIPromise<Rsp> {
|
|
624
|
-
return this.methodRequest('put', path, opts);
|
|
625
|
-
}
|
|
626
|
-
|
|
627
|
-
delete<Rsp>(path: string, opts?: PromiseOrValue<RequestOptions>): APIPromise<Rsp> {
|
|
628
|
-
return this.methodRequest('delete', path, opts);
|
|
629
|
-
}
|
|
630
|
-
|
|
631
|
-
private methodRequest<Rsp>(
|
|
632
|
-
method: HTTPMethod,
|
|
633
|
-
path: string,
|
|
634
|
-
opts?: PromiseOrValue<RequestOptions>,
|
|
635
|
-
): APIPromise<Rsp> {
|
|
636
|
-
return this.request(
|
|
637
|
-
Promise.resolve(opts).then((opts) => {
|
|
638
|
-
return { method, path, ...opts };
|
|
639
|
-
}),
|
|
640
|
-
);
|
|
641
|
-
}
|
|
642
|
-
|
|
643
|
-
request<Rsp>(
|
|
644
|
-
options: PromiseOrValue<FinalRequestOptions>,
|
|
645
|
-
remainingRetries: number | null = null,
|
|
646
|
-
): APIPromise<Rsp> {
|
|
647
|
-
return new APIPromise(this, this.makeRequest(options, remainingRetries, undefined));
|
|
648
|
-
}
|
|
649
|
-
|
|
650
|
-
private async makeRequest(
|
|
651
|
-
optionsInput: PromiseOrValue<FinalRequestOptions>,
|
|
652
|
-
retriesRemaining: number | null,
|
|
653
|
-
retryOfRequestLogID: string | undefined,
|
|
654
|
-
): Promise<APIResponseProps> {
|
|
655
|
-
const options = await optionsInput;
|
|
656
|
-
const maxRetries = options.maxRetries ?? this.maxRetries;
|
|
657
|
-
if (retriesRemaining == null) {
|
|
658
|
-
retriesRemaining = maxRetries;
|
|
659
|
-
}
|
|
660
|
-
|
|
661
|
-
await this.prepareOptions(options);
|
|
662
|
-
|
|
663
|
-
const { req, url, timeout } = await this.buildRequest(options, {
|
|
664
|
-
retryCount: maxRetries - retriesRemaining,
|
|
665
|
-
});
|
|
666
|
-
|
|
667
|
-
await this.prepareRequest(req, { url, options });
|
|
668
|
-
|
|
669
|
-
/** Not an API request ID, just for correlating local log entries. */
|
|
670
|
-
const requestLogID = 'log_' + ((Math.random() * (1 << 24)) | 0).toString(16).padStart(6, '0');
|
|
671
|
-
const retryLogStr = retryOfRequestLogID === undefined ? '' : `, retryOf: ${retryOfRequestLogID}`;
|
|
672
|
-
const startTime = Date.now();
|
|
673
|
-
|
|
674
|
-
loggerFor(this).debug(
|
|
675
|
-
`[${requestLogID}] sending request`,
|
|
676
|
-
formatRequestDetails({
|
|
677
|
-
retryOfRequestLogID,
|
|
678
|
-
method: options.method,
|
|
679
|
-
url,
|
|
680
|
-
options,
|
|
681
|
-
headers: req.headers,
|
|
682
|
-
}),
|
|
683
|
-
);
|
|
684
|
-
|
|
685
|
-
if (options.signal?.aborted) {
|
|
686
|
-
throw new Errors.APIUserAbortError();
|
|
687
|
-
}
|
|
688
|
-
|
|
689
|
-
const controller = new AbortController();
|
|
690
|
-
const response = await this.fetchWithTimeout(url, req, timeout, controller).catch(castToError);
|
|
691
|
-
const headersTime = Date.now();
|
|
692
|
-
|
|
693
|
-
if (response instanceof globalThis.Error) {
|
|
694
|
-
const retryMessage = `retrying, ${retriesRemaining} attempts remaining`;
|
|
695
|
-
if (options.signal?.aborted) {
|
|
696
|
-
throw new Errors.APIUserAbortError();
|
|
697
|
-
}
|
|
698
|
-
// detect native connection timeout errors
|
|
699
|
-
// deno throws "TypeError: error sending request for url (https://example/): client error (Connect): tcp connect error: Operation timed out (os error 60): Operation timed out (os error 60)"
|
|
700
|
-
// undici throws "TypeError: fetch failed" with cause "ConnectTimeoutError: Connect Timeout Error (attempted address: example:443, timeout: 1ms)"
|
|
701
|
-
// others do not provide enough information to distinguish timeouts from other connection errors
|
|
702
|
-
const isTimeout =
|
|
703
|
-
isAbortError(response) ||
|
|
704
|
-
/timed? ?out/i.test(String(response) + ('cause' in response ? String(response.cause) : ''));
|
|
705
|
-
if (retriesRemaining) {
|
|
706
|
-
loggerFor(this).info(
|
|
707
|
-
`[${requestLogID}] connection ${isTimeout ? 'timed out' : 'failed'} - ${retryMessage}`,
|
|
708
|
-
);
|
|
709
|
-
loggerFor(this).debug(
|
|
710
|
-
`[${requestLogID}] connection ${isTimeout ? 'timed out' : 'failed'} (${retryMessage})`,
|
|
711
|
-
formatRequestDetails({
|
|
712
|
-
retryOfRequestLogID,
|
|
713
|
-
url,
|
|
714
|
-
durationMs: headersTime - startTime,
|
|
715
|
-
message: response.message,
|
|
716
|
-
}),
|
|
717
|
-
);
|
|
718
|
-
return this.retryRequest(options, retriesRemaining, retryOfRequestLogID ?? requestLogID);
|
|
719
|
-
}
|
|
720
|
-
loggerFor(this).info(
|
|
721
|
-
`[${requestLogID}] connection ${isTimeout ? 'timed out' : 'failed'} - error; no more retries left`,
|
|
722
|
-
);
|
|
723
|
-
loggerFor(this).debug(
|
|
724
|
-
`[${requestLogID}] connection ${isTimeout ? 'timed out' : 'failed'} (error; no more retries left)`,
|
|
725
|
-
formatRequestDetails({
|
|
726
|
-
retryOfRequestLogID,
|
|
727
|
-
url,
|
|
728
|
-
durationMs: headersTime - startTime,
|
|
729
|
-
message: response.message,
|
|
730
|
-
}),
|
|
731
|
-
);
|
|
732
|
-
if (isTimeout) {
|
|
733
|
-
throw new Errors.APIConnectionTimeoutError();
|
|
734
|
-
}
|
|
735
|
-
throw new Errors.APIConnectionError({ cause: response });
|
|
736
|
-
}
|
|
737
|
-
|
|
738
|
-
const responseInfo = `[${requestLogID}${retryLogStr}] ${req.method} ${url} ${
|
|
739
|
-
response.ok ? 'succeeded' : 'failed'
|
|
740
|
-
} with status ${response.status} in ${headersTime - startTime}ms`;
|
|
741
|
-
|
|
742
|
-
if (!response.ok) {
|
|
743
|
-
const shouldRetry = await this.shouldRetry(response);
|
|
744
|
-
if (retriesRemaining && shouldRetry) {
|
|
745
|
-
const retryMessage = `retrying, ${retriesRemaining} attempts remaining`;
|
|
746
|
-
|
|
747
|
-
// We don't need the body of this response.
|
|
748
|
-
await Shims.CancelReadableStream(response.body);
|
|
749
|
-
loggerFor(this).info(`${responseInfo} - ${retryMessage}`);
|
|
750
|
-
loggerFor(this).debug(
|
|
751
|
-
`[${requestLogID}] response error (${retryMessage})`,
|
|
752
|
-
formatRequestDetails({
|
|
753
|
-
retryOfRequestLogID,
|
|
754
|
-
url: response.url,
|
|
755
|
-
status: response.status,
|
|
756
|
-
headers: response.headers,
|
|
757
|
-
durationMs: headersTime - startTime,
|
|
758
|
-
}),
|
|
759
|
-
);
|
|
760
|
-
return this.retryRequest(
|
|
761
|
-
options,
|
|
762
|
-
retriesRemaining,
|
|
763
|
-
retryOfRequestLogID ?? requestLogID,
|
|
764
|
-
response.headers,
|
|
765
|
-
);
|
|
766
|
-
}
|
|
767
|
-
|
|
768
|
-
const retryMessage = shouldRetry ? `error; no more retries left` : `error; not retryable`;
|
|
769
|
-
|
|
770
|
-
loggerFor(this).info(`${responseInfo} - ${retryMessage}`);
|
|
771
|
-
|
|
772
|
-
const errText = await response.text().catch((err: any) => castToError(err).message);
|
|
773
|
-
const errJSON = safeJSON(errText) as any;
|
|
774
|
-
const errMessage = errJSON ? undefined : errText;
|
|
115
|
+
function readEnv(name: string): string | undefined {
|
|
116
|
+
const env = (globalThis as { process?: { env?: Record<string, string | undefined> } })
|
|
117
|
+
.process?.env;
|
|
118
|
+
return env?.[name];
|
|
119
|
+
}
|
|
775
120
|
|
|
776
|
-
|
|
777
|
-
|
|
778
|
-
|
|
779
|
-
|
|
780
|
-
|
|
781
|
-
|
|
782
|
-
|
|
783
|
-
|
|
784
|
-
|
|
785
|
-
|
|
121
|
+
// Presence is not validity: an explicitly provided option must be usable —
|
|
122
|
+
// a blank value is a configuration mistake and never silently falls back to
|
|
123
|
+
// the environment or a default. Only an OMITTED option reads the env.
|
|
124
|
+
function resolveOption(
|
|
125
|
+
label: string,
|
|
126
|
+
explicit: string | undefined,
|
|
127
|
+
env: string | undefined,
|
|
128
|
+
): string | undefined {
|
|
129
|
+
if (explicit !== undefined) {
|
|
130
|
+
const value = explicit.trim();
|
|
131
|
+
if (!value) {
|
|
132
|
+
throw new Error(
|
|
133
|
+
`${label} must not be blank when provided explicitly; omit it to use the environment instead.`,
|
|
786
134
|
);
|
|
787
|
-
|
|
788
|
-
const err = this.makeStatusError(response.status, errJSON, errMessage, response.headers);
|
|
789
|
-
throw err;
|
|
790
|
-
}
|
|
791
|
-
|
|
792
|
-
loggerFor(this).info(responseInfo);
|
|
793
|
-
loggerFor(this).debug(
|
|
794
|
-
`[${requestLogID}] response start`,
|
|
795
|
-
formatRequestDetails({
|
|
796
|
-
retryOfRequestLogID,
|
|
797
|
-
url: response.url,
|
|
798
|
-
status: response.status,
|
|
799
|
-
headers: response.headers,
|
|
800
|
-
durationMs: headersTime - startTime,
|
|
801
|
-
}),
|
|
802
|
-
);
|
|
803
|
-
|
|
804
|
-
return { response, options, controller, requestLogID, retryOfRequestLogID, startTime };
|
|
805
|
-
}
|
|
806
|
-
|
|
807
|
-
getAPIList<Item, PageClass extends Pagination.AbstractPage<Item> = Pagination.AbstractPage<Item>>(
|
|
808
|
-
path: string,
|
|
809
|
-
Page: new (...args: any[]) => PageClass,
|
|
810
|
-
opts?: PromiseOrValue<RequestOptions>,
|
|
811
|
-
): Pagination.PagePromise<PageClass, Item> {
|
|
812
|
-
return this.requestAPIList(
|
|
813
|
-
Page,
|
|
814
|
-
opts && 'then' in opts ?
|
|
815
|
-
opts.then((opts) => ({ method: 'get', path, ...opts }))
|
|
816
|
-
: { method: 'get', path, ...opts },
|
|
817
|
-
);
|
|
818
|
-
}
|
|
819
|
-
|
|
820
|
-
requestAPIList<
|
|
821
|
-
Item = unknown,
|
|
822
|
-
PageClass extends Pagination.AbstractPage<Item> = Pagination.AbstractPage<Item>,
|
|
823
|
-
>(
|
|
824
|
-
Page: new (...args: ConstructorParameters<typeof Pagination.AbstractPage>) => PageClass,
|
|
825
|
-
options: PromiseOrValue<FinalRequestOptions>,
|
|
826
|
-
): Pagination.PagePromise<PageClass, Item> {
|
|
827
|
-
const request = this.makeRequest(options, null, undefined);
|
|
828
|
-
return new Pagination.PagePromise<PageClass, Item>(this as any as Cadenya, request, Page);
|
|
829
|
-
}
|
|
830
|
-
|
|
831
|
-
async fetchWithTimeout(
|
|
832
|
-
url: RequestInfo,
|
|
833
|
-
init: RequestInit | undefined,
|
|
834
|
-
ms: number,
|
|
835
|
-
controller: AbortController,
|
|
836
|
-
): Promise<Response> {
|
|
837
|
-
const { signal, method, ...options } = init || {};
|
|
838
|
-
const abort = this._makeAbort(controller);
|
|
839
|
-
if (signal) signal.addEventListener('abort', abort, { once: true });
|
|
840
|
-
|
|
841
|
-
const timeout = setTimeout(abort, ms);
|
|
842
|
-
|
|
843
|
-
const isReadableBody =
|
|
844
|
-
((globalThis as any).ReadableStream && options.body instanceof (globalThis as any).ReadableStream) ||
|
|
845
|
-
(typeof options.body === 'object' && options.body !== null && Symbol.asyncIterator in options.body);
|
|
846
|
-
|
|
847
|
-
const fetchOptions: RequestInit = {
|
|
848
|
-
signal: controller.signal as any,
|
|
849
|
-
...(isReadableBody ? { duplex: 'half' } : {}),
|
|
850
|
-
method: 'GET',
|
|
851
|
-
...options,
|
|
852
|
-
};
|
|
853
|
-
if (method) {
|
|
854
|
-
// Custom methods like 'patch' need to be uppercased
|
|
855
|
-
// See https://github.com/nodejs/undici/issues/2294
|
|
856
|
-
fetchOptions.method = method.toUpperCase();
|
|
857
|
-
}
|
|
858
|
-
|
|
859
|
-
try {
|
|
860
|
-
// use undefined this binding; fetch errors if bound to something else in browser/cloudflare
|
|
861
|
-
return await this.fetch.call(undefined, url, fetchOptions);
|
|
862
|
-
} finally {
|
|
863
|
-
clearTimeout(timeout);
|
|
864
|
-
}
|
|
865
|
-
}
|
|
866
|
-
|
|
867
|
-
private async shouldRetry(response: Response): Promise<boolean> {
|
|
868
|
-
// Note this is not a standard header.
|
|
869
|
-
const shouldRetryHeader = response.headers.get('x-should-retry');
|
|
870
|
-
|
|
871
|
-
// If the server explicitly says whether or not to retry, obey.
|
|
872
|
-
if (shouldRetryHeader === 'true') return true;
|
|
873
|
-
if (shouldRetryHeader === 'false') return false;
|
|
874
|
-
|
|
875
|
-
// Retry on request timeouts.
|
|
876
|
-
if (response.status === 408) return true;
|
|
877
|
-
|
|
878
|
-
// Retry on lock timeouts.
|
|
879
|
-
if (response.status === 409) return true;
|
|
880
|
-
|
|
881
|
-
// Retry on rate limits.
|
|
882
|
-
if (response.status === 429) return true;
|
|
883
|
-
|
|
884
|
-
// Retry internal errors.
|
|
885
|
-
if (response.status >= 500) return true;
|
|
886
|
-
|
|
887
|
-
return false;
|
|
888
|
-
}
|
|
889
|
-
|
|
890
|
-
private async retryRequest(
|
|
891
|
-
options: FinalRequestOptions,
|
|
892
|
-
retriesRemaining: number,
|
|
893
|
-
requestLogID: string,
|
|
894
|
-
responseHeaders?: Headers | undefined,
|
|
895
|
-
): Promise<APIResponseProps> {
|
|
896
|
-
let timeoutMillis: number | undefined;
|
|
897
|
-
|
|
898
|
-
// Note the `retry-after-ms` header may not be standard, but is a good idea and we'd like proactive support for it.
|
|
899
|
-
const retryAfterMillisHeader = responseHeaders?.get('retry-after-ms');
|
|
900
|
-
if (retryAfterMillisHeader) {
|
|
901
|
-
const timeoutMs = parseFloat(retryAfterMillisHeader);
|
|
902
|
-
if (!Number.isNaN(timeoutMs)) {
|
|
903
|
-
timeoutMillis = timeoutMs;
|
|
904
|
-
}
|
|
905
|
-
}
|
|
906
|
-
|
|
907
|
-
// About the Retry-After header: https://developer.mozilla.org/en-US/docs/Web/HTTP/Headers/Retry-After
|
|
908
|
-
const retryAfterHeader = responseHeaders?.get('retry-after');
|
|
909
|
-
if (retryAfterHeader && !timeoutMillis) {
|
|
910
|
-
const timeoutSeconds = parseFloat(retryAfterHeader);
|
|
911
|
-
if (!Number.isNaN(timeoutSeconds)) {
|
|
912
|
-
timeoutMillis = timeoutSeconds * 1000;
|
|
913
|
-
} else {
|
|
914
|
-
timeoutMillis = Date.parse(retryAfterHeader) - Date.now();
|
|
915
|
-
}
|
|
916
|
-
}
|
|
917
|
-
|
|
918
|
-
// If the API asks us to wait a certain amount of time, just do what it
|
|
919
|
-
// says, but otherwise calculate a default
|
|
920
|
-
if (timeoutMillis === undefined) {
|
|
921
|
-
const maxRetries = options.maxRetries ?? this.maxRetries;
|
|
922
|
-
timeoutMillis = this.calculateDefaultRetryTimeoutMillis(retriesRemaining, maxRetries);
|
|
923
|
-
}
|
|
924
|
-
await sleep(timeoutMillis);
|
|
925
|
-
|
|
926
|
-
return this.makeRequest(options, retriesRemaining - 1, requestLogID);
|
|
927
|
-
}
|
|
928
|
-
|
|
929
|
-
private calculateDefaultRetryTimeoutMillis(retriesRemaining: number, maxRetries: number): number {
|
|
930
|
-
const initialRetryDelay = 0.5;
|
|
931
|
-
const maxRetryDelay = 8.0;
|
|
932
|
-
|
|
933
|
-
const numRetries = maxRetries - retriesRemaining;
|
|
934
|
-
|
|
935
|
-
// Apply exponential backoff, but not more than the max.
|
|
936
|
-
const sleepSeconds = Math.min(initialRetryDelay * Math.pow(2, numRetries), maxRetryDelay);
|
|
937
|
-
|
|
938
|
-
// Apply some jitter, take up to at most 25 percent of the retry time.
|
|
939
|
-
const jitter = 1 - Math.random() * 0.25;
|
|
940
|
-
|
|
941
|
-
return sleepSeconds * jitter * 1000;
|
|
942
|
-
}
|
|
943
|
-
|
|
944
|
-
async buildRequest(
|
|
945
|
-
inputOptions: FinalRequestOptions,
|
|
946
|
-
{ retryCount = 0 }: { retryCount?: number } = {},
|
|
947
|
-
): Promise<{ req: FinalizedRequestInit; url: string; timeout: number }> {
|
|
948
|
-
const options = { ...inputOptions };
|
|
949
|
-
const { method, path, query, defaultBaseURL } = options;
|
|
950
|
-
|
|
951
|
-
const url = this.buildURL(path!, query as Record<string, unknown>, defaultBaseURL);
|
|
952
|
-
if ('timeout' in options) validatePositiveInteger('timeout', options.timeout);
|
|
953
|
-
options.timeout = options.timeout ?? this.timeout;
|
|
954
|
-
const { bodyHeaders, body } = this.buildBody({ options });
|
|
955
|
-
const reqHeaders = await this.buildHeaders({ options: inputOptions, method, bodyHeaders, retryCount });
|
|
956
|
-
|
|
957
|
-
const req: FinalizedRequestInit = {
|
|
958
|
-
method,
|
|
959
|
-
headers: reqHeaders,
|
|
960
|
-
...(options.signal && { signal: options.signal }),
|
|
961
|
-
...((globalThis as any).ReadableStream &&
|
|
962
|
-
body instanceof (globalThis as any).ReadableStream && { duplex: 'half' }),
|
|
963
|
-
...(body && { body }),
|
|
964
|
-
...((this.fetchOptions as any) ?? {}),
|
|
965
|
-
...((options.fetchOptions as any) ?? {}),
|
|
966
|
-
};
|
|
967
|
-
|
|
968
|
-
return { req, url, timeout: options.timeout };
|
|
969
|
-
}
|
|
970
|
-
|
|
971
|
-
private async buildHeaders({
|
|
972
|
-
options,
|
|
973
|
-
method,
|
|
974
|
-
bodyHeaders,
|
|
975
|
-
retryCount,
|
|
976
|
-
}: {
|
|
977
|
-
options: FinalRequestOptions;
|
|
978
|
-
method: HTTPMethod;
|
|
979
|
-
bodyHeaders: HeadersLike;
|
|
980
|
-
retryCount: number;
|
|
981
|
-
}): Promise<Headers> {
|
|
982
|
-
let idempotencyHeaders: HeadersLike = {};
|
|
983
|
-
if (this.idempotencyHeader && method !== 'get') {
|
|
984
|
-
if (!options.idempotencyKey) options.idempotencyKey = this.defaultIdempotencyKey();
|
|
985
|
-
idempotencyHeaders[this.idempotencyHeader] = options.idempotencyKey;
|
|
986
|
-
}
|
|
987
|
-
|
|
988
|
-
const headers = buildHeaders([
|
|
989
|
-
idempotencyHeaders,
|
|
990
|
-
{
|
|
991
|
-
Accept: 'application/json',
|
|
992
|
-
'User-Agent': this.getUserAgent(),
|
|
993
|
-
'X-Cadenya-Retry-Count': String(retryCount),
|
|
994
|
-
...(options.timeout ? { 'X-Cadenya-Timeout': String(Math.trunc(options.timeout / 1000)) } : {}),
|
|
995
|
-
...getPlatformHeaders(),
|
|
996
|
-
},
|
|
997
|
-
await this.authHeaders(options),
|
|
998
|
-
this._options.defaultHeaders,
|
|
999
|
-
bodyHeaders,
|
|
1000
|
-
options.headers,
|
|
1001
|
-
]);
|
|
1002
|
-
|
|
1003
|
-
this.validateHeaders(headers);
|
|
1004
|
-
|
|
1005
|
-
return headers.values;
|
|
1006
|
-
}
|
|
1007
|
-
|
|
1008
|
-
private _makeAbort(controller: AbortController) {
|
|
1009
|
-
// note: we can't just inline this method inside `fetchWithTimeout()` because then the closure
|
|
1010
|
-
// would capture all request options, and cause a memory leak.
|
|
1011
|
-
return () => controller.abort();
|
|
1012
|
-
}
|
|
1013
|
-
|
|
1014
|
-
private buildBody({ options }: { options: FinalRequestOptions }): {
|
|
1015
|
-
bodyHeaders: HeadersLike;
|
|
1016
|
-
body: BodyInit | undefined;
|
|
1017
|
-
} {
|
|
1018
|
-
const { body, headers: rawHeaders } = options;
|
|
1019
|
-
if (!body) {
|
|
1020
|
-
// A resource method always passes a `body` key when its operation defines a
|
|
1021
|
-
// request body, even if the caller omitted an optional body param. Keep the
|
|
1022
|
-
// content-type for those, and only elide it for operations with no body at
|
|
1023
|
-
// all (e.g. GET/DELETE).
|
|
1024
|
-
if (body == null && 'body' in options) {
|
|
1025
|
-
return this.#encoder({ body, headers: buildHeaders([rawHeaders]) });
|
|
1026
|
-
}
|
|
1027
|
-
return { bodyHeaders: undefined, body: undefined };
|
|
1028
|
-
}
|
|
1029
|
-
const headers = buildHeaders([rawHeaders]);
|
|
1030
|
-
if (
|
|
1031
|
-
// Pass raw type verbatim
|
|
1032
|
-
ArrayBuffer.isView(body) ||
|
|
1033
|
-
body instanceof ArrayBuffer ||
|
|
1034
|
-
body instanceof DataView ||
|
|
1035
|
-
(typeof body === 'string' &&
|
|
1036
|
-
// Preserve legacy string encoding behavior for now
|
|
1037
|
-
headers.values.has('content-type')) ||
|
|
1038
|
-
// `Blob` is superset of `File`
|
|
1039
|
-
((globalThis as any).Blob && body instanceof (globalThis as any).Blob) ||
|
|
1040
|
-
// `FormData` -> `multipart/form-data`
|
|
1041
|
-
body instanceof FormData ||
|
|
1042
|
-
// `URLSearchParams` -> `application/x-www-form-urlencoded`
|
|
1043
|
-
body instanceof URLSearchParams ||
|
|
1044
|
-
// Send chunked stream (each chunk has own `length`)
|
|
1045
|
-
((globalThis as any).ReadableStream && body instanceof (globalThis as any).ReadableStream)
|
|
1046
|
-
) {
|
|
1047
|
-
return { bodyHeaders: undefined, body: body as BodyInit };
|
|
1048
|
-
} else if (
|
|
1049
|
-
typeof body === 'object' &&
|
|
1050
|
-
(Symbol.asyncIterator in body ||
|
|
1051
|
-
(Symbol.iterator in body && 'next' in body && typeof body.next === 'function'))
|
|
1052
|
-
) {
|
|
1053
|
-
return { bodyHeaders: undefined, body: Shims.ReadableStreamFrom(body as AsyncIterable<Uint8Array>) };
|
|
1054
|
-
} else if (
|
|
1055
|
-
typeof body === 'object' &&
|
|
1056
|
-
headers.values.get('content-type') === 'application/x-www-form-urlencoded'
|
|
1057
|
-
) {
|
|
1058
|
-
return {
|
|
1059
|
-
bodyHeaders: { 'content-type': 'application/x-www-form-urlencoded' },
|
|
1060
|
-
body: this.stringifyQuery(body),
|
|
1061
|
-
};
|
|
1062
|
-
} else {
|
|
1063
|
-
return this.#encoder({ body, headers });
|
|
1064
135
|
}
|
|
136
|
+
return value;
|
|
1065
137
|
}
|
|
1066
|
-
|
|
1067
|
-
static Cadenya = this;
|
|
1068
|
-
static DEFAULT_TIMEOUT = 60000; // 1 minute
|
|
1069
|
-
|
|
1070
|
-
static CadenyaError = Errors.CadenyaError;
|
|
1071
|
-
static APIError = Errors.APIError;
|
|
1072
|
-
static APIConnectionError = Errors.APIConnectionError;
|
|
1073
|
-
static APIConnectionTimeoutError = Errors.APIConnectionTimeoutError;
|
|
1074
|
-
static APIUserAbortError = Errors.APIUserAbortError;
|
|
1075
|
-
static NotFoundError = Errors.NotFoundError;
|
|
1076
|
-
static ConflictError = Errors.ConflictError;
|
|
1077
|
-
static RateLimitError = Errors.RateLimitError;
|
|
1078
|
-
static BadRequestError = Errors.BadRequestError;
|
|
1079
|
-
static AuthenticationError = Errors.AuthenticationError;
|
|
1080
|
-
static InternalServerError = Errors.InternalServerError;
|
|
1081
|
-
static PermissionDeniedError = Errors.PermissionDeniedError;
|
|
1082
|
-
static UnprocessableEntityError = Errors.UnprocessableEntityError;
|
|
1083
|
-
|
|
1084
|
-
static toFile = Uploads.toFile;
|
|
1085
|
-
|
|
1086
|
-
aiProviderKeys: API.AIProviderKeys = new API.AIProviderKeys(this);
|
|
1087
|
-
/**
|
|
1088
|
-
* Manage the authenticated account. Accounts are the top-level organizational
|
|
1089
|
-
* unit and contain one or more workspaces.
|
|
1090
|
-
*/
|
|
1091
|
-
account: API.AccountResource = new API.AccountResource(this);
|
|
1092
|
-
/**
|
|
1093
|
-
* Operations on profiles, the account-level principals (users, API keys,
|
|
1094
|
-
* system) that authenticate against the API.
|
|
1095
|
-
*/
|
|
1096
|
-
profiles: API.Profiles = new API.Profiles(this);
|
|
1097
|
-
/**
|
|
1098
|
-
* Manage AI agents within a workspace. Agents define AI behavior and tool access.
|
|
1099
|
-
*/
|
|
1100
|
-
agents: API.Agents = new API.Agents(this);
|
|
1101
|
-
objectives: API.Objectives = new API.Objectives(this);
|
|
1102
|
-
/**
|
|
1103
|
-
* Manage memory layers and their entries. Layers are named containers that can
|
|
1104
|
-
* be composed into an objective's memory cascade; entries are the keyed values
|
|
1105
|
-
* within a layer. System-managed layers (e.g., episodic layers created by the
|
|
1106
|
-
* runtime) cannot be mutated through this API.
|
|
1107
|
-
*/
|
|
1108
|
-
memoryLayers: API.MemoryLayers = new API.MemoryLayers(this);
|
|
1109
|
-
/**
|
|
1110
|
-
* Issue short-lived presigned URLs for direct client-to-object-storage
|
|
1111
|
-
* uploads. Created uploads can be referenced by id when creating or updating
|
|
1112
|
-
* resources that accept binary content (e.g., MemoryEntry).
|
|
1113
|
-
*/
|
|
1114
|
-
uploads: API.Uploads = new API.Uploads(this);
|
|
1115
|
-
/**
|
|
1116
|
-
* Manage LLM models available to a workspace. Models represent provider and
|
|
1117
|
-
* family pairs (e.g., "anthropic/claude-sonnet-4.6"). Workspaces are seeded
|
|
1118
|
-
* with the supported models and you can enable or disable each one.
|
|
1119
|
-
*/
|
|
1120
|
-
models: API.Models = new API.Models(this);
|
|
1121
|
-
search: API.Search = new API.Search(this);
|
|
1122
|
-
/**
|
|
1123
|
-
* Manage tool sets and the tools they contain. Tool sets group related tools,
|
|
1124
|
-
* and tools define specific capabilities available to agents.
|
|
1125
|
-
*
|
|
1126
|
-
* When a tool set is managed, only API key actors can modify its tools; human
|
|
1127
|
-
* (profile) actors cannot.
|
|
1128
|
-
*/
|
|
1129
|
-
toolSets: API.ToolSets = new API.ToolSets(this);
|
|
1130
|
-
/**
|
|
1131
|
-
* Issue, rotate, disable, and revoke a workspace's API keys. Every key
|
|
1132
|
-
* belongs to exactly one workspace; the system-managed global account key is
|
|
1133
|
-
* managed via GlobalAPIKeyService instead.
|
|
1134
|
-
*/
|
|
1135
|
-
apiKeys: API.APIKeys = new API.APIKeys(this);
|
|
1136
|
-
/**
|
|
1137
|
-
* Manage the account's system-provisioned global API key. The global key is
|
|
1138
|
-
* the only key that spans every workspace; it is created by the system and
|
|
1139
|
-
* cannot be deleted, so the surface is retrieve, rotate, and the
|
|
1140
|
-
* disable/enable kill switch.
|
|
1141
|
-
*/
|
|
1142
|
-
globalAPIKey: API.GlobalAPIKey = new API.GlobalAPIKey(this);
|
|
1143
|
-
workspaceSecrets: API.WorkspaceSecrets = new API.WorkspaceSecrets(this);
|
|
1144
|
-
/**
|
|
1145
|
-
* Manage workspaces within an account. Workspaces provide organizational
|
|
1146
|
-
* grouping and isolation for resources such as agents, tools, and API keys.
|
|
1147
|
-
*
|
|
1148
|
-
* This is the workspace-scoped, end-user surface. Administrative operations
|
|
1149
|
-
* (create / archive workspaces, manage members) live in WorkspaceAdminService
|
|
1150
|
-
* under /v1/account/workspaces and require the admin role.
|
|
1151
|
-
*/
|
|
1152
|
-
workspaces: API.Workspaces = new API.Workspaces(this);
|
|
1153
|
-
/**
|
|
1154
|
-
* Administer workspaces across the account: create and archive workspaces and
|
|
1155
|
-
* manage their membership. These operations are account-scoped and require the
|
|
1156
|
-
* admin role (a token whose profile holds the WorkOS admin role); they live
|
|
1157
|
-
* under /v1/account/workspaces rather than the workspace-scoped /v1/workspaces
|
|
1158
|
-
* tree so an admin can manage any workspace in the account, including ones they
|
|
1159
|
-
* are not themselves a member of.
|
|
1160
|
-
*/
|
|
1161
|
-
workspaceAdmin: API.WorkspaceAdmin = new API.WorkspaceAdmin(this);
|
|
1162
|
-
webhooks: API.Webhooks = new API.Webhooks(this);
|
|
1163
|
-
/**
|
|
1164
|
-
* Manage embeddable chat widgets. A widget binds an agent to a globally
|
|
1165
|
-
* unique hostname with a per-widget origin allowlist; browsers reach it with
|
|
1166
|
-
* session tokens minted via WidgetSessionService.
|
|
1167
|
-
*/
|
|
1168
|
-
widgets: API.Widgets = new API.Widgets(this);
|
|
1169
|
-
/**
|
|
1170
|
-
* Read and erase tenants and the subjects under them. Tenants and subjects are
|
|
1171
|
-
* created by assertion — on objective creation or widget session mint — never
|
|
1172
|
-
* directly, so this service has no create or update: it exists to enumerate what
|
|
1173
|
-
* assertions have produced, and to destroy it on request.
|
|
1174
|
-
*/
|
|
1175
|
-
tenants: API.Tenants = new API.Tenants(this);
|
|
1176
|
-
/**
|
|
1177
|
-
* Mint and manage widget sessions. Session creation is server-to-server only:
|
|
1178
|
-
* the customer's backend authenticates its visitor, asserts tenant/subject
|
|
1179
|
-
* context, attaches any per-visitor secrets, and receives a short-lived
|
|
1180
|
-
* bearer token the browser uses against the widget host.
|
|
1181
|
-
*/
|
|
1182
|
-
widgetSessions: API.WidgetSessions = new API.WidgetSessions(this);
|
|
1183
|
-
}
|
|
1184
|
-
|
|
1185
|
-
Cadenya.AIProviderKeys = AIProviderKeys;
|
|
1186
|
-
Cadenya.AccountResource = AccountResource;
|
|
1187
|
-
Cadenya.Profiles = Profiles;
|
|
1188
|
-
Cadenya.Agents = Agents;
|
|
1189
|
-
Cadenya.Objectives = Objectives;
|
|
1190
|
-
Cadenya.MemoryLayers = MemoryLayers;
|
|
1191
|
-
Cadenya.Uploads = UploadsAPIUploads;
|
|
1192
|
-
Cadenya.Models = Models;
|
|
1193
|
-
Cadenya.Search = Search;
|
|
1194
|
-
Cadenya.ToolSets = ToolSets;
|
|
1195
|
-
Cadenya.APIKeys = APIKeys;
|
|
1196
|
-
Cadenya.GlobalAPIKey = GlobalAPIKey;
|
|
1197
|
-
Cadenya.WorkspaceSecrets = WorkspaceSecrets;
|
|
1198
|
-
Cadenya.Workspaces = Workspaces;
|
|
1199
|
-
Cadenya.WorkspaceAdmin = WorkspaceAdmin;
|
|
1200
|
-
Cadenya.Webhooks = Webhooks;
|
|
1201
|
-
Cadenya.Widgets = Widgets;
|
|
1202
|
-
Cadenya.Tenants = Tenants;
|
|
1203
|
-
Cadenya.WidgetSessions = WidgetSessions;
|
|
1204
|
-
|
|
1205
|
-
export declare namespace Cadenya {
|
|
1206
|
-
export type RequestOptions = Opts.RequestOptions;
|
|
1207
|
-
|
|
1208
|
-
export import CursorPagination = Pagination.CursorPagination;
|
|
1209
|
-
export {
|
|
1210
|
-
type CursorPaginationParams as CursorPaginationParams,
|
|
1211
|
-
type CursorPaginationResponse as CursorPaginationResponse,
|
|
1212
|
-
};
|
|
1213
|
-
|
|
1214
|
-
export {
|
|
1215
|
-
AIProviderKeys as AIProviderKeys,
|
|
1216
|
-
type AIProviderConfigOpenAI as AIProviderConfigOpenAI,
|
|
1217
|
-
type AIProviderConfigOpenAICompatible as AIProviderConfigOpenAICompatible,
|
|
1218
|
-
type AIProviderConfigOpenrouter as AIProviderConfigOpenrouter,
|
|
1219
|
-
type AIProviderCredentialAPIKey as AIProviderCredentialAPIKey,
|
|
1220
|
-
type AIProviderCredentialHeaders as AIProviderCredentialHeaders,
|
|
1221
|
-
type AIProviderKey as AIProviderKey,
|
|
1222
|
-
type AIProviderKeySpec as AIProviderKeySpec,
|
|
1223
|
-
type AIProviderKeysCursorPagination as AIProviderKeysCursorPagination,
|
|
1224
|
-
type AIProviderKeyCreateParams as AIProviderKeyCreateParams,
|
|
1225
|
-
type AIProviderKeyRetrieveParams as AIProviderKeyRetrieveParams,
|
|
1226
|
-
type AIProviderKeyUpdateParams as AIProviderKeyUpdateParams,
|
|
1227
|
-
type AIProviderKeyListParams as AIProviderKeyListParams,
|
|
1228
|
-
type AIProviderKeyDeleteParams as AIProviderKeyDeleteParams,
|
|
1229
|
-
};
|
|
1230
|
-
|
|
1231
|
-
export {
|
|
1232
|
-
AccountResource as AccountResource,
|
|
1233
|
-
type Account as Account,
|
|
1234
|
-
type AccountInfo as AccountInfo,
|
|
1235
|
-
type AccountSpec as AccountSpec,
|
|
1236
|
-
type Profile as Profile,
|
|
1237
|
-
type ProfileSpec as ProfileSpec,
|
|
1238
|
-
type RotateChallengeTokenResponse as RotateChallengeTokenResponse,
|
|
1239
|
-
type RotateWebhookSigningKeyResponse as RotateWebhookSigningKeyResponse,
|
|
1240
|
-
};
|
|
1241
|
-
|
|
1242
|
-
export { Profiles as Profiles };
|
|
1243
|
-
|
|
1244
|
-
export {
|
|
1245
|
-
Agents as Agents,
|
|
1246
|
-
type Agent as Agent,
|
|
1247
|
-
type AgentInfo as AgentInfo,
|
|
1248
|
-
type AgentSpec as AgentSpec,
|
|
1249
|
-
type Page as Page,
|
|
1250
|
-
type AgentsCursorPagination as AgentsCursorPagination,
|
|
1251
|
-
type AgentCreateParams as AgentCreateParams,
|
|
1252
|
-
type AgentRetrieveParams as AgentRetrieveParams,
|
|
1253
|
-
type AgentUpdateParams as AgentUpdateParams,
|
|
1254
|
-
type AgentListParams as AgentListParams,
|
|
1255
|
-
type AgentDeleteParams as AgentDeleteParams,
|
|
1256
|
-
type AgentArchiveParams as AgentArchiveParams,
|
|
1257
|
-
type AgentPublishParams as AgentPublishParams,
|
|
1258
|
-
type AgentUnarchiveParams as AgentUnarchiveParams,
|
|
1259
|
-
type AgentUnpublishParams as AgentUnpublishParams,
|
|
1260
|
-
};
|
|
1261
|
-
|
|
1262
|
-
export {
|
|
1263
|
-
Objectives as Objectives,
|
|
1264
|
-
type AssistantMessage as AssistantMessage,
|
|
1265
|
-
type AssistantToolCall as AssistantToolCall,
|
|
1266
|
-
type CallableTool as CallableTool,
|
|
1267
|
-
type CallableToolAgent as CallableToolAgent,
|
|
1268
|
-
type CallableToolCadenyaProvidedTool as CallableToolCadenyaProvidedTool,
|
|
1269
|
-
type CallableToolTool as CallableToolTool,
|
|
1270
|
-
type ContextLengths as ContextLengths,
|
|
1271
|
-
type ContextWindowCompacted as ContextWindowCompacted,
|
|
1272
|
-
type MemoryRead as MemoryRead,
|
|
1273
|
-
type MemoryReference as MemoryReference,
|
|
1274
|
-
type Objective as Objective,
|
|
1275
|
-
type ObjectiveConfigSnapshot as ObjectiveConfigSnapshot,
|
|
1276
|
-
type ObjectiveContextWindow as ObjectiveContextWindow,
|
|
1277
|
-
type ObjectiveContextWindowData as ObjectiveContextWindowData,
|
|
1278
|
-
type ObjectiveDiagnostics as ObjectiveDiagnostics,
|
|
1279
|
-
type ObjectiveError as ObjectiveError,
|
|
1280
|
-
type ObjectiveEvent as ObjectiveEvent,
|
|
1281
|
-
type ObjectiveEventData as ObjectiveEventData,
|
|
1282
|
-
type ObjectiveEventDataAssistantMessage as ObjectiveEventDataAssistantMessage,
|
|
1283
|
-
type ObjectiveEventDataCancelled as ObjectiveEventDataCancelled,
|
|
1284
|
-
type ObjectiveEventDataContextWindowCompacted as ObjectiveEventDataContextWindowCompacted,
|
|
1285
|
-
type ObjectiveEventDataError as ObjectiveEventDataError,
|
|
1286
|
-
type ObjectiveEventDataFinalized as ObjectiveEventDataFinalized,
|
|
1287
|
-
type ObjectiveEventDataMemoryRead as ObjectiveEventDataMemoryRead,
|
|
1288
|
-
type ObjectiveEventDataNotice as ObjectiveEventDataNotice,
|
|
1289
|
-
type ObjectiveEventDataReasoning as ObjectiveEventDataReasoning,
|
|
1290
|
-
type ObjectiveEventDataSubAgentSpawned as ObjectiveEventDataSubAgentSpawned,
|
|
1291
|
-
type ObjectiveEventDataSubAgentUpdated as ObjectiveEventDataSubAgentUpdated,
|
|
1292
|
-
type ObjectiveEventDataTimedOut as ObjectiveEventDataTimedOut,
|
|
1293
|
-
type ObjectiveEventDataToolApprovalRequested as ObjectiveEventDataToolApprovalRequested,
|
|
1294
|
-
type ObjectiveEventDataToolApproved as ObjectiveEventDataToolApproved,
|
|
1295
|
-
type ObjectiveEventDataToolCalled as ObjectiveEventDataToolCalled,
|
|
1296
|
-
type ObjectiveEventDataToolDenied as ObjectiveEventDataToolDenied,
|
|
1297
|
-
type ObjectiveEventDataToolError as ObjectiveEventDataToolError,
|
|
1298
|
-
type ObjectiveEventDataToolResult as ObjectiveEventDataToolResult,
|
|
1299
|
-
type ObjectiveEventDataUserMessage as ObjectiveEventDataUserMessage,
|
|
1300
|
-
type ObjectiveEventInfo as ObjectiveEventInfo,
|
|
1301
|
-
type ObjectiveEventWebhookData as ObjectiveEventWebhookData,
|
|
1302
|
-
type ObjectiveInfo as ObjectiveInfo,
|
|
1303
|
-
type ObjectiveSecret as ObjectiveSecret,
|
|
1304
|
-
type Reasoning as Reasoning,
|
|
1305
|
-
type SubAgentSpawned as SubAgentSpawned,
|
|
1306
|
-
type SubAgentUpdated as SubAgentUpdated,
|
|
1307
|
-
type ToolApprovalRequested as ToolApprovalRequested,
|
|
1308
|
-
type ToolApproved as ToolApproved,
|
|
1309
|
-
type ToolCalled as ToolCalled,
|
|
1310
|
-
type ToolDenied as ToolDenied,
|
|
1311
|
-
type ToolError as ToolError,
|
|
1312
|
-
type ToolResult as ToolResult,
|
|
1313
|
-
type UserMessage as UserMessage,
|
|
1314
|
-
type ObjectiveCompactResponse as ObjectiveCompactResponse,
|
|
1315
|
-
type ObjectiveRetrieveDiagnosticsResponse as ObjectiveRetrieveDiagnosticsResponse,
|
|
1316
|
-
type ObjectivesCursorPagination as ObjectivesCursorPagination,
|
|
1317
|
-
type ObjectiveContextWindowsCursorPagination as ObjectiveContextWindowsCursorPagination,
|
|
1318
|
-
type ObjectiveEventsCursorPagination as ObjectiveEventsCursorPagination,
|
|
1319
|
-
type ObjectiveCreateParams as ObjectiveCreateParams,
|
|
1320
|
-
type ObjectiveRetrieveParams as ObjectiveRetrieveParams,
|
|
1321
|
-
type ObjectiveListParams as ObjectiveListParams,
|
|
1322
|
-
type ObjectiveCancelParams as ObjectiveCancelParams,
|
|
1323
|
-
type ObjectiveCompactParams as ObjectiveCompactParams,
|
|
1324
|
-
type ObjectiveContinueParams as ObjectiveContinueParams,
|
|
1325
|
-
type ObjectiveListContextWindowsParams as ObjectiveListContextWindowsParams,
|
|
1326
|
-
type ObjectiveListEventsParams as ObjectiveListEventsParams,
|
|
1327
|
-
type ObjectiveRetrieveDiagnosticsParams as ObjectiveRetrieveDiagnosticsParams,
|
|
1328
|
-
type ObjectiveStreamEventsParams as ObjectiveStreamEventsParams,
|
|
1329
|
-
};
|
|
1330
|
-
|
|
1331
|
-
export {
|
|
1332
|
-
MemoryLayers as MemoryLayers,
|
|
1333
|
-
type MemoryLayer as MemoryLayer,
|
|
1334
|
-
type MemoryLayerInfo as MemoryLayerInfo,
|
|
1335
|
-
type MemoryLayerSpec as MemoryLayerSpec,
|
|
1336
|
-
type MemoryLayersCursorPagination as MemoryLayersCursorPagination,
|
|
1337
|
-
type MemoryLayerCreateParams as MemoryLayerCreateParams,
|
|
1338
|
-
type MemoryLayerRetrieveParams as MemoryLayerRetrieveParams,
|
|
1339
|
-
type MemoryLayerUpdateParams as MemoryLayerUpdateParams,
|
|
1340
|
-
type MemoryLayerListParams as MemoryLayerListParams,
|
|
1341
|
-
type MemoryLayerDeleteParams as MemoryLayerDeleteParams,
|
|
1342
|
-
};
|
|
1343
|
-
|
|
1344
|
-
export {
|
|
1345
|
-
UploadsAPIUploads as Uploads,
|
|
1346
|
-
type Upload as Upload,
|
|
1347
|
-
type UploadInfo as UploadInfo,
|
|
1348
|
-
type UploadSpec as UploadSpec,
|
|
1349
|
-
type UploadCreateParams as UploadCreateParams,
|
|
1350
|
-
type UploadRetrieveParams as UploadRetrieveParams,
|
|
1351
|
-
};
|
|
1352
|
-
|
|
1353
|
-
export {
|
|
1354
|
-
Models as Models,
|
|
1355
|
-
type CapabilityCaching as CapabilityCaching,
|
|
1356
|
-
type CapabilityMaxOutputTokens as CapabilityMaxOutputTokens,
|
|
1357
|
-
type CapabilityReasoning as CapabilityReasoning,
|
|
1358
|
-
type CapabilityStopSequences as CapabilityStopSequences,
|
|
1359
|
-
type CapabilityTemperature as CapabilityTemperature,
|
|
1360
|
-
type CapabilityTopK as CapabilityTopK,
|
|
1361
|
-
type CapabilityTopP as CapabilityTopP,
|
|
1362
|
-
type Model as Model,
|
|
1363
|
-
type ModelSpec as ModelSpec,
|
|
1364
|
-
type ModelSpecCapability as ModelSpecCapability,
|
|
1365
|
-
type ModelSpecCapabilityCaching as ModelSpecCapabilityCaching,
|
|
1366
|
-
type ModelSpecCapabilityMaxOutputTokens as ModelSpecCapabilityMaxOutputTokens,
|
|
1367
|
-
type ModelSpecCapabilityReasoning as ModelSpecCapabilityReasoning,
|
|
1368
|
-
type ModelSpecCapabilityStopSequences as ModelSpecCapabilityStopSequences,
|
|
1369
|
-
type ModelSpecCapabilityTemperature as ModelSpecCapabilityTemperature,
|
|
1370
|
-
type ModelSpecCapabilityTopK as ModelSpecCapabilityTopK,
|
|
1371
|
-
type ModelSpecCapabilityTopP as ModelSpecCapabilityTopP,
|
|
1372
|
-
type ModelSwapResponse as ModelSwapResponse,
|
|
1373
|
-
type ModelsCursorPagination as ModelsCursorPagination,
|
|
1374
|
-
type ModelRetrieveParams as ModelRetrieveParams,
|
|
1375
|
-
type ModelListParams as ModelListParams,
|
|
1376
|
-
type ModelDisableParams as ModelDisableParams,
|
|
1377
|
-
type ModelEnableParams as ModelEnableParams,
|
|
1378
|
-
type ModelSwapParams as ModelSwapParams,
|
|
1379
|
-
};
|
|
1380
|
-
|
|
1381
|
-
export {
|
|
1382
|
-
Search as Search,
|
|
1383
|
-
type SearchSearchToolsOrToolSetsResponse as SearchSearchToolsOrToolSetsResponse,
|
|
1384
|
-
type SearchSearchToolsOrToolSetsParams as SearchSearchToolsOrToolSetsParams,
|
|
1385
|
-
};
|
|
1386
|
-
|
|
1387
|
-
export {
|
|
1388
|
-
ToolSets as ToolSets,
|
|
1389
|
-
type ApprovalRequirementFilter as ApprovalRequirementFilter,
|
|
1390
|
-
type ApprovalRequirementFilterAlways as ApprovalRequirementFilterAlways,
|
|
1391
|
-
type ApprovalRequirementFilterOnly as ApprovalRequirementFilterOnly,
|
|
1392
|
-
type AttributeFilter as AttributeFilter,
|
|
1393
|
-
type StringMatcher as StringMatcher,
|
|
1394
|
-
type StringMatcherContains as StringMatcherContains,
|
|
1395
|
-
type StringMatcherEndsWith as StringMatcherEndsWith,
|
|
1396
|
-
type StringMatcherExact as StringMatcherExact,
|
|
1397
|
-
type StringMatcherRegex as StringMatcherRegex,
|
|
1398
|
-
type StringMatcherStartsWith as StringMatcherStartsWith,
|
|
1399
|
-
type SyncCompleted as SyncCompleted,
|
|
1400
|
-
type SyncFailed as SyncFailed,
|
|
1401
|
-
type SyncStarted as SyncStarted,
|
|
1402
|
-
type ToolFilter as ToolFilter,
|
|
1403
|
-
type ToolSet as ToolSet,
|
|
1404
|
-
type ToolSetAdapter as ToolSetAdapter,
|
|
1405
|
-
type ToolSetAdapterBare as ToolSetAdapterBare,
|
|
1406
|
-
type ToolSetAdapterBareVariant as ToolSetAdapterBareVariant,
|
|
1407
|
-
type ToolSetAdapterHTTP as ToolSetAdapterHTTP,
|
|
1408
|
-
type ToolSetAdapterHTTPVariant as ToolSetAdapterHTTPVariant,
|
|
1409
|
-
type ToolSetAdapterMCP as ToolSetAdapterMCP,
|
|
1410
|
-
type ToolSetAdapterMCPVariant as ToolSetAdapterMCPVariant,
|
|
1411
|
-
type ToolSetAdapterOpenAPI as ToolSetAdapterOpenAPI,
|
|
1412
|
-
type ToolSetAdapterOpenAPIUploadID as ToolSetAdapterOpenAPIUploadID,
|
|
1413
|
-
type ToolSetAdapterOpenAPIURL as ToolSetAdapterOpenAPIURL,
|
|
1414
|
-
type ToolSetAdapterOpenAPIVariant as ToolSetAdapterOpenAPIVariant,
|
|
1415
|
-
type ToolSetEvent as ToolSetEvent,
|
|
1416
|
-
type ToolSetEventData as ToolSetEventData,
|
|
1417
|
-
type ToolSetEventDataSyncCompleted as ToolSetEventDataSyncCompleted,
|
|
1418
|
-
type ToolSetEventDataSyncFailed as ToolSetEventDataSyncFailed,
|
|
1419
|
-
type ToolSetEventDataSyncStarted as ToolSetEventDataSyncStarted,
|
|
1420
|
-
type ToolSetInfo as ToolSetInfo,
|
|
1421
|
-
type ToolSetSpec as ToolSetSpec,
|
|
1422
|
-
type ToolSetUsage as ToolSetUsage,
|
|
1423
|
-
type ToolSetGetOpenAPISpecResponse as ToolSetGetOpenAPISpecResponse,
|
|
1424
|
-
type ToolSetsCursorPagination as ToolSetsCursorPagination,
|
|
1425
|
-
type ToolSetEventsCursorPagination as ToolSetEventsCursorPagination,
|
|
1426
|
-
type ToolSetUsagesCursorPagination as ToolSetUsagesCursorPagination,
|
|
1427
|
-
type ToolSetCreateParams as ToolSetCreateParams,
|
|
1428
|
-
type ToolSetRetrieveParams as ToolSetRetrieveParams,
|
|
1429
|
-
type ToolSetUpdateParams as ToolSetUpdateParams,
|
|
1430
|
-
type ToolSetListParams as ToolSetListParams,
|
|
1431
|
-
type ToolSetDeleteParams as ToolSetDeleteParams,
|
|
1432
|
-
type ToolSetArchiveParams as ToolSetArchiveParams,
|
|
1433
|
-
type ToolSetGetOpenAPISpecParams as ToolSetGetOpenAPISpecParams,
|
|
1434
|
-
type ToolSetListEventsParams as ToolSetListEventsParams,
|
|
1435
|
-
type ToolSetListUsageParams as ToolSetListUsageParams,
|
|
1436
|
-
type ToolSetUnarchiveParams as ToolSetUnarchiveParams,
|
|
1437
|
-
};
|
|
1438
|
-
|
|
1439
|
-
export {
|
|
1440
|
-
APIKeys as APIKeys,
|
|
1441
|
-
type APIKey as APIKey,
|
|
1442
|
-
type APIKeyInfo as APIKeyInfo,
|
|
1443
|
-
type APIKeySpec as APIKeySpec,
|
|
1444
|
-
type APIKeysCursorPagination as APIKeysCursorPagination,
|
|
1445
|
-
type APIKeyCreateParams as APIKeyCreateParams,
|
|
1446
|
-
type APIKeyRetrieveParams as APIKeyRetrieveParams,
|
|
1447
|
-
type APIKeyUpdateParams as APIKeyUpdateParams,
|
|
1448
|
-
type APIKeyListParams as APIKeyListParams,
|
|
1449
|
-
type APIKeyDeleteParams as APIKeyDeleteParams,
|
|
1450
|
-
type APIKeyDisableParams as APIKeyDisableParams,
|
|
1451
|
-
type APIKeyEnableParams as APIKeyEnableParams,
|
|
1452
|
-
type APIKeyRotateParams as APIKeyRotateParams,
|
|
1453
|
-
};
|
|
1454
|
-
|
|
1455
|
-
export { GlobalAPIKey as GlobalAPIKey };
|
|
1456
|
-
|
|
1457
|
-
export {
|
|
1458
|
-
WorkspaceSecrets as WorkspaceSecrets,
|
|
1459
|
-
type WorkspaceSecret as WorkspaceSecret,
|
|
1460
|
-
type WorkspaceSecretInfo as WorkspaceSecretInfo,
|
|
1461
|
-
type WorkspaceSecretSpec as WorkspaceSecretSpec,
|
|
1462
|
-
type WorkspaceSecretsCursorPagination as WorkspaceSecretsCursorPagination,
|
|
1463
|
-
type WorkspaceSecretCreateParams as WorkspaceSecretCreateParams,
|
|
1464
|
-
type WorkspaceSecretRetrieveParams as WorkspaceSecretRetrieveParams,
|
|
1465
|
-
type WorkspaceSecretUpdateParams as WorkspaceSecretUpdateParams,
|
|
1466
|
-
type WorkspaceSecretListParams as WorkspaceSecretListParams,
|
|
1467
|
-
type WorkspaceSecretDeleteParams as WorkspaceSecretDeleteParams,
|
|
1468
|
-
};
|
|
1469
|
-
|
|
1470
|
-
export {
|
|
1471
|
-
Workspaces as Workspaces,
|
|
1472
|
-
type Workspace as Workspace,
|
|
1473
|
-
type WorkspaceSpec as WorkspaceSpec,
|
|
1474
|
-
type WorkspacesCursorPagination as WorkspacesCursorPagination,
|
|
1475
|
-
type WorkspaceListParams as WorkspaceListParams,
|
|
1476
|
-
};
|
|
1477
|
-
|
|
1478
|
-
export {
|
|
1479
|
-
WorkspaceAdmin as WorkspaceAdmin,
|
|
1480
|
-
type WorkspaceMember as WorkspaceMember,
|
|
1481
|
-
type WorkspaceAdminCreateParams as WorkspaceAdminCreateParams,
|
|
1482
|
-
type WorkspaceAdminRetrieveParams as WorkspaceAdminRetrieveParams,
|
|
1483
|
-
type WorkspaceAdminUpdateParams as WorkspaceAdminUpdateParams,
|
|
1484
|
-
type WorkspaceAdminListParams as WorkspaceAdminListParams,
|
|
1485
|
-
type WorkspaceAdminArchiveParams as WorkspaceAdminArchiveParams,
|
|
1486
|
-
};
|
|
1487
|
-
|
|
1488
|
-
export {
|
|
1489
|
-
Webhooks as Webhooks,
|
|
1490
|
-
type UnsafeUnwrapWebhookEvent as UnsafeUnwrapWebhookEvent,
|
|
1491
|
-
type UnwrapWebhookEvent as UnwrapWebhookEvent,
|
|
1492
|
-
};
|
|
1493
|
-
|
|
1494
|
-
export {
|
|
1495
|
-
Widgets as Widgets,
|
|
1496
|
-
type Widget as Widget,
|
|
1497
|
-
type WidgetInfo as WidgetInfo,
|
|
1498
|
-
type WidgetSpec as WidgetSpec,
|
|
1499
|
-
type WidgetsCursorPagination as WidgetsCursorPagination,
|
|
1500
|
-
type WidgetCreateParams as WidgetCreateParams,
|
|
1501
|
-
type WidgetRetrieveParams as WidgetRetrieveParams,
|
|
1502
|
-
type WidgetUpdateParams as WidgetUpdateParams,
|
|
1503
|
-
type WidgetListParams as WidgetListParams,
|
|
1504
|
-
type WidgetDeleteParams as WidgetDeleteParams,
|
|
1505
|
-
type WidgetArchiveParams as WidgetArchiveParams,
|
|
1506
|
-
type WidgetUnarchiveParams as WidgetUnarchiveParams,
|
|
1507
|
-
};
|
|
1508
|
-
|
|
1509
|
-
export {
|
|
1510
|
-
Tenants as Tenants,
|
|
1511
|
-
type Subject as Subject,
|
|
1512
|
-
type SubjectInfo as SubjectInfo,
|
|
1513
|
-
type Tenant as Tenant,
|
|
1514
|
-
type TenantInfo as TenantInfo,
|
|
1515
|
-
type TenantsCursorPagination as TenantsCursorPagination,
|
|
1516
|
-
type TenantRetrieveParams as TenantRetrieveParams,
|
|
1517
|
-
type TenantListParams as TenantListParams,
|
|
1518
|
-
type TenantDeleteParams as TenantDeleteParams,
|
|
1519
|
-
};
|
|
1520
|
-
|
|
1521
|
-
export {
|
|
1522
|
-
WidgetSessions as WidgetSessions,
|
|
1523
|
-
type SubjectAssertion as SubjectAssertion,
|
|
1524
|
-
type SubjectReference as SubjectReference,
|
|
1525
|
-
type TenantAssertion as TenantAssertion,
|
|
1526
|
-
type TenantReference as TenantReference,
|
|
1527
|
-
type WidgetSession as WidgetSession,
|
|
1528
|
-
type WidgetSessionInfo as WidgetSessionInfo,
|
|
1529
|
-
type WidgetSessionSpec as WidgetSessionSpec,
|
|
1530
|
-
type WidgetSessionDeleteTenantResponse as WidgetSessionDeleteTenantResponse,
|
|
1531
|
-
type WidgetSessionsCursorPagination as WidgetSessionsCursorPagination,
|
|
1532
|
-
type WidgetSessionCreateParams as WidgetSessionCreateParams,
|
|
1533
|
-
type WidgetSessionRetrieveParams as WidgetSessionRetrieveParams,
|
|
1534
|
-
type WidgetSessionListParams as WidgetSessionListParams,
|
|
1535
|
-
type WidgetSessionDeleteParams as WidgetSessionDeleteParams,
|
|
1536
|
-
type WidgetSessionDeleteTenantParams as WidgetSessionDeleteTenantParams,
|
|
1537
|
-
type WidgetSessionRevokeParams as WidgetSessionRevokeParams,
|
|
1538
|
-
};
|
|
1539
|
-
|
|
1540
|
-
export type AccountResourceMetadata = API.AccountResourceMetadata;
|
|
1541
|
-
export type BareMetadata = API.BareMetadata;
|
|
1542
|
-
export type CreateOperationMetadata = API.CreateOperationMetadata;
|
|
1543
|
-
export type CreateResourceMetadata = API.CreateResourceMetadata;
|
|
1544
|
-
export type OperationMetadata = API.OperationMetadata;
|
|
1545
|
-
export type ResourceMetadata = API.ResourceMetadata;
|
|
1546
|
-
export type UpdateResourceMetadata = API.UpdateResourceMetadata;
|
|
138
|
+
return env?.trim() || undefined;
|
|
1547
139
|
}
|