@tambo-ai/typescript-sdk 0.70.0 → 0.72.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/CHANGELOG.md +25 -0
- package/README.md +117 -48
- package/api-promise.d.mts +2 -0
- package/api-promise.d.mts.map +1 -0
- package/api-promise.d.ts +2 -0
- package/api-promise.d.ts.map +1 -0
- package/api-promise.js +6 -0
- package/api-promise.js.map +1 -0
- package/api-promise.mjs +2 -0
- package/api-promise.mjs.map +1 -0
- package/bin/cli +53 -0
- package/bin/migration-config.json +213 -0
- package/client.d.mts +213 -0
- package/client.d.mts.map +1 -0
- package/client.d.ts +213 -0
- package/client.d.ts.map +1 -0
- package/client.js +504 -0
- package/client.js.map +1 -0
- package/client.mjs +500 -0
- package/client.mjs.map +1 -0
- package/core/api-promise.d.mts +46 -0
- package/core/api-promise.d.mts.map +1 -0
- package/core/api-promise.d.ts +46 -0
- package/core/api-promise.d.ts.map +1 -0
- package/core/api-promise.js +74 -0
- package/core/api-promise.js.map +1 -0
- package/core/api-promise.mjs +70 -0
- package/core/api-promise.mjs.map +1 -0
- package/core/error.d.mts +46 -0
- package/core/error.d.mts.map +1 -0
- package/core/error.d.ts +46 -0
- package/core/error.d.ts.map +1 -0
- package/core/error.js +113 -0
- package/core/error.js.map +1 -0
- package/core/error.mjs +97 -0
- package/core/error.mjs.map +1 -0
- package/core/pagination.d.mts +56 -0
- package/core/pagination.d.mts.map +1 -0
- package/core/pagination.d.ts +56 -0
- package/core/pagination.d.ts.map +1 -0
- package/core/pagination.js +111 -0
- package/core/pagination.js.map +1 -0
- package/core/pagination.mjs +105 -0
- package/core/pagination.mjs.map +1 -0
- package/core/resource.d.mts +6 -0
- package/core/resource.d.mts.map +1 -0
- package/core/resource.d.ts +6 -0
- package/core/resource.d.ts.map +1 -0
- package/core/resource.js +11 -0
- package/core/resource.js.map +1 -0
- package/core/resource.mjs +7 -0
- package/core/resource.mjs.map +1 -0
- package/core/uploads.d.mts +3 -0
- package/core/uploads.d.mts.map +1 -0
- package/core/uploads.d.ts +3 -0
- package/core/uploads.d.ts.map +1 -0
- package/core/uploads.js +6 -0
- package/core/uploads.js.map +1 -0
- package/core/uploads.mjs +2 -0
- package/core/uploads.mjs.map +1 -0
- package/error.d.mts +2 -0
- package/error.d.mts.map +1 -0
- package/error.d.ts +1 -46
- package/error.d.ts.map +1 -1
- package/error.js +3 -110
- package/error.js.map +1 -1
- package/error.mjs +1 -96
- package/error.mjs.map +1 -1
- package/index.d.mts +8 -146
- package/index.d.mts.map +1 -0
- package/index.d.ts +6 -144
- package/index.d.ts.map +1 -1
- package/index.js +21 -155
- package/index.js.map +1 -1
- package/index.mjs +6 -121
- package/index.mjs.map +1 -1
- package/internal/builtin-types.d.mts +73 -0
- package/internal/builtin-types.d.mts.map +1 -0
- package/internal/builtin-types.d.ts +73 -0
- package/internal/builtin-types.d.ts.map +1 -0
- package/internal/builtin-types.js +4 -0
- package/internal/builtin-types.js.map +1 -0
- package/internal/builtin-types.mjs +3 -0
- package/internal/builtin-types.mjs.map +1 -0
- package/internal/detect-platform.d.mts +15 -0
- package/internal/detect-platform.d.mts.map +1 -0
- package/internal/detect-platform.d.ts +15 -0
- package/internal/detect-platform.d.ts.map +1 -0
- package/internal/detect-platform.js +162 -0
- package/internal/detect-platform.js.map +1 -0
- package/internal/detect-platform.mjs +157 -0
- package/internal/detect-platform.mjs.map +1 -0
- package/internal/errors.d.mts +3 -0
- package/internal/errors.d.mts.map +1 -0
- package/internal/errors.d.ts +3 -0
- package/internal/errors.d.ts.map +1 -0
- package/internal/errors.js +41 -0
- package/internal/errors.js.map +1 -0
- package/internal/errors.mjs +36 -0
- package/internal/errors.mjs.map +1 -0
- package/internal/headers.d.mts +20 -0
- package/internal/headers.d.mts.map +1 -0
- package/internal/headers.d.ts +20 -0
- package/internal/headers.d.ts.map +1 -0
- package/internal/headers.js +79 -0
- package/internal/headers.js.map +1 -0
- package/internal/headers.mjs +74 -0
- package/internal/headers.mjs.map +1 -0
- package/internal/parse.d.mts +12 -0
- package/internal/parse.d.mts.map +1 -0
- package/internal/parse.d.ts +12 -0
- package/internal/parse.d.ts.map +1 -0
- package/internal/parse.js +35 -0
- package/internal/parse.js.map +1 -0
- package/internal/parse.mjs +32 -0
- package/internal/parse.mjs.map +1 -0
- package/internal/request-options.d.mts +75 -0
- package/internal/request-options.d.mts.map +1 -0
- package/internal/request-options.d.ts +75 -0
- package/internal/request-options.d.ts.map +1 -0
- package/internal/request-options.js +14 -0
- package/internal/request-options.js.map +1 -0
- package/internal/request-options.mjs +10 -0
- package/internal/request-options.mjs.map +1 -0
- package/internal/shim-types.d.mts +17 -0
- package/internal/shim-types.d.mts.map +1 -0
- package/internal/shim-types.d.ts +17 -0
- package/internal/shim-types.d.ts.map +1 -0
- package/internal/shim-types.js +4 -0
- package/internal/shim-types.js.map +1 -0
- package/internal/shim-types.mjs +3 -0
- package/internal/shim-types.mjs.map +1 -0
- package/internal/shims.d.mts +20 -0
- package/internal/shims.d.mts.map +1 -0
- package/internal/shims.d.ts +20 -0
- package/internal/shims.d.ts.map +1 -0
- package/internal/shims.js +92 -0
- package/internal/shims.js.map +1 -0
- package/internal/shims.mjs +85 -0
- package/internal/shims.mjs.map +1 -0
- package/internal/to-file.d.mts +45 -0
- package/internal/to-file.d.mts.map +1 -0
- package/internal/to-file.d.ts +45 -0
- package/internal/to-file.d.ts.map +1 -0
- package/internal/to-file.js +91 -0
- package/internal/to-file.js.map +1 -0
- package/internal/to-file.mjs +88 -0
- package/internal/to-file.mjs.map +1 -0
- package/internal/tslib.js +81 -0
- package/internal/tslib.mjs +17 -0
- package/internal/types.d.mts +69 -0
- package/internal/types.d.mts.map +1 -0
- package/internal/types.d.ts +69 -0
- package/internal/types.d.ts.map +1 -0
- package/internal/types.js +4 -0
- package/internal/types.js.map +1 -0
- package/internal/types.mjs +3 -0
- package/internal/types.mjs.map +1 -0
- package/internal/uploads.d.mts +42 -0
- package/internal/uploads.d.mts.map +1 -0
- package/internal/uploads.d.ts +42 -0
- package/internal/uploads.d.ts.map +1 -0
- package/internal/uploads.js +141 -0
- package/internal/uploads.js.map +1 -0
- package/internal/uploads.mjs +131 -0
- package/internal/uploads.mjs.map +1 -0
- package/internal/utils/base64.d.mts +3 -0
- package/internal/utils/base64.d.mts.map +1 -0
- package/internal/utils/base64.d.ts +3 -0
- package/internal/utils/base64.d.ts.map +1 -0
- package/internal/utils/base64.js +38 -0
- package/internal/utils/base64.js.map +1 -0
- package/internal/utils/base64.mjs +33 -0
- package/internal/utils/base64.mjs.map +1 -0
- package/internal/utils/bytes.d.mts +4 -0
- package/internal/utils/bytes.d.mts.map +1 -0
- package/internal/utils/bytes.d.ts +4 -0
- package/internal/utils/bytes.d.ts.map +1 -0
- package/internal/utils/bytes.js +31 -0
- package/internal/utils/bytes.js.map +1 -0
- package/internal/utils/bytes.mjs +26 -0
- package/internal/utils/bytes.mjs.map +1 -0
- package/internal/utils/env.d.mts +9 -0
- package/internal/utils/env.d.mts.map +1 -0
- package/internal/utils/env.d.ts +9 -0
- package/internal/utils/env.d.ts.map +1 -0
- package/internal/utils/env.js +22 -0
- package/internal/utils/env.js.map +1 -0
- package/internal/utils/env.mjs +18 -0
- package/internal/utils/env.mjs.map +1 -0
- package/internal/utils/log.d.mts +37 -0
- package/internal/utils/log.d.mts.map +1 -0
- package/internal/utils/log.d.ts +37 -0
- package/internal/utils/log.d.ts.map +1 -0
- package/internal/utils/log.js +86 -0
- package/internal/utils/log.js.map +1 -0
- package/internal/utils/log.mjs +80 -0
- package/internal/utils/log.mjs.map +1 -0
- package/internal/utils/path.d.mts +15 -0
- package/internal/utils/path.d.mts.map +1 -0
- package/internal/utils/path.d.ts +15 -0
- package/internal/utils/path.d.ts.map +1 -0
- package/internal/utils/path.js +79 -0
- package/internal/utils/path.js.map +1 -0
- package/internal/utils/path.mjs +74 -0
- package/internal/utils/path.mjs.map +1 -0
- package/internal/utils/sleep.d.mts +2 -0
- package/internal/utils/sleep.d.mts.map +1 -0
- package/internal/utils/sleep.d.ts +2 -0
- package/internal/utils/sleep.d.ts.map +1 -0
- package/internal/utils/sleep.js +7 -0
- package/internal/utils/sleep.js.map +1 -0
- package/internal/utils/sleep.mjs +3 -0
- package/internal/utils/sleep.mjs.map +1 -0
- package/internal/utils/uuid.d.mts +5 -0
- package/internal/utils/uuid.d.mts.map +1 -0
- package/internal/utils/uuid.d.ts +5 -0
- package/internal/utils/uuid.d.ts.map +1 -0
- package/internal/utils/uuid.js +19 -0
- package/internal/utils/uuid.js.map +1 -0
- package/internal/utils/uuid.mjs +15 -0
- package/internal/utils/uuid.mjs.map +1 -0
- package/internal/utils/values.d.mts +18 -0
- package/internal/utils/values.d.mts.map +1 -0
- package/internal/utils/values.d.ts +18 -0
- package/internal/utils/values.d.ts.map +1 -0
- package/internal/utils/values.js +112 -0
- package/internal/utils/values.js.map +1 -0
- package/internal/utils/values.mjs +94 -0
- package/internal/utils/values.mjs.map +1 -0
- package/internal/utils.d.mts +7 -0
- package/internal/utils.d.mts.map +1 -0
- package/internal/utils.d.ts +7 -0
- package/internal/utils.d.ts.map +1 -0
- package/internal/utils.js +11 -0
- package/internal/utils.js.map +1 -0
- package/internal/utils.mjs +8 -0
- package/internal/utils.mjs.map +1 -0
- package/lib/advance-stream.d.mts +5 -0
- package/lib/advance-stream.d.mts.map +1 -0
- package/lib/advance-stream.d.ts +3 -3
- package/lib/advance-stream.d.ts.map +1 -1
- package/lib/advance-stream.js +1 -2
- package/lib/advance-stream.js.map +1 -1
- package/lib/advance-stream.mjs.map +1 -1
- package/package.json +123 -62
- package/pagination.d.mts +2 -0
- package/pagination.d.mts.map +1 -0
- package/pagination.d.ts +1 -19
- package/pagination.d.ts.map +1 -1
- package/pagination.js +3 -43
- package/pagination.js.map +1 -1
- package/pagination.mjs +1 -41
- package/pagination.mjs.map +1 -1
- package/resource.d.mts +2 -0
- package/resource.d.mts.map +1 -0
- package/resource.d.ts +1 -5
- package/resource.d.ts.map +1 -1
- package/resource.js +3 -8
- package/resource.js.map +1 -1
- package/resource.mjs +1 -6
- package/resource.mjs.map +1 -1
- package/resources/beta/auth.d.mts +103 -0
- package/resources/beta/auth.d.mts.map +1 -0
- package/resources/beta/auth.d.ts +5 -4
- package/resources/beta/auth.d.ts.map +1 -1
- package/resources/beta/auth.js +3 -2
- package/resources/beta/auth.js.map +1 -1
- package/resources/beta/auth.mjs +3 -2
- package/resources/beta/auth.mjs.map +1 -1
- package/resources/beta/beta.d.mts +22 -0
- package/resources/beta/beta.d.mts.map +1 -0
- package/resources/beta/beta.d.ts +2 -2
- package/resources/beta/beta.d.ts.map +1 -1
- package/resources/beta/beta.js +6 -29
- package/resources/beta/beta.js.map +1 -1
- package/resources/beta/beta.mjs +2 -3
- package/resources/beta/beta.mjs.map +1 -1
- package/resources/beta/index.d.mts +6 -0
- package/resources/beta/index.d.mts.map +1 -0
- package/resources/beta/index.d.ts +1 -1
- package/resources/beta/index.d.ts.map +1 -1
- package/resources/beta/index.js +1 -2
- package/resources/beta/index.js.map +1 -1
- package/resources/beta/index.mjs +1 -1
- package/resources/beta/index.mjs.map +1 -1
- package/resources/beta/projects/api-key.d.mts +43 -0
- package/resources/beta/projects/api-key.d.mts.map +1 -0
- package/resources/beta/projects/api-key.d.ts +10 -6
- package/resources/beta/projects/api-key.d.ts.map +1 -1
- package/resources/beta/projects/api-key.js +7 -5
- package/resources/beta/projects/api-key.js.map +1 -1
- package/resources/beta/projects/api-key.mjs +7 -5
- package/resources/beta/projects/api-key.mjs.map +1 -1
- package/resources/beta/projects/index.d.mts +4 -0
- package/resources/beta/projects/index.d.mts.map +1 -0
- package/resources/beta/projects/index.d.ts +2 -2
- package/resources/beta/projects/index.d.ts.map +1 -1
- package/resources/beta/projects/index.js.map +1 -1
- package/resources/beta/projects/index.mjs +2 -2
- package/resources/beta/projects/index.mjs.map +1 -1
- package/resources/beta/projects/projects.d.mts +75 -0
- package/resources/beta/projects/projects.d.mts.map +1 -0
- package/resources/beta/projects/projects.d.ts +14 -9
- package/resources/beta/projects/projects.d.ts.map +1 -1
- package/resources/beta/projects/projects.js +7 -28
- package/resources/beta/projects/projects.js.map +1 -1
- package/resources/beta/projects/projects.mjs +5 -4
- package/resources/beta/projects/projects.mjs.map +1 -1
- package/resources/beta/projects/provider-key.d.mts +44 -0
- package/resources/beta/projects/provider-key.d.mts.map +1 -0
- package/resources/beta/projects/provider-key.d.ts +10 -6
- package/resources/beta/projects/provider-key.d.ts.map +1 -1
- package/resources/beta/projects/provider-key.js +7 -5
- package/resources/beta/projects/provider-key.js.map +1 -1
- package/resources/beta/projects/provider-key.mjs +7 -5
- package/resources/beta/projects/provider-key.mjs.map +1 -1
- package/resources/beta/projects.d.mts +2 -0
- package/resources/beta/projects.d.mts.map +1 -0
- package/resources/beta/projects.d.ts.map +1 -1
- package/resources/beta/projects.js +2 -15
- package/resources/beta/projects.js.map +1 -1
- package/resources/beta/registry.d.mts +19 -0
- package/resources/beta/registry.d.mts.map +1 -0
- package/resources/beta/registry.d.ts +4 -3
- package/resources/beta/registry.d.ts.map +1 -1
- package/resources/beta/registry.js +3 -2
- package/resources/beta/registry.js.map +1 -1
- package/resources/beta/registry.mjs +3 -2
- package/resources/beta/registry.mjs.map +1 -1
- package/resources/beta/threads/index.d.mts +4 -0
- package/resources/beta/threads/index.d.mts.map +1 -0
- package/resources/beta/threads/index.d.ts +3 -3
- package/resources/beta/threads/index.d.ts.map +1 -1
- package/resources/beta/threads/index.js +1 -2
- package/resources/beta/threads/index.js.map +1 -1
- package/resources/beta/threads/index.mjs +1 -1
- package/resources/beta/threads/index.mjs.map +1 -1
- package/resources/beta/threads/messages.d.mts +112 -0
- package/resources/beta/threads/messages.d.mts.map +1 -0
- package/resources/beta/threads/messages.d.ts +26 -14
- package/resources/beta/threads/messages.d.ts.map +1 -1
- package/resources/beta/threads/messages.js +23 -18
- package/resources/beta/threads/messages.js.map +1 -1
- package/resources/beta/threads/messages.mjs +23 -18
- package/resources/beta/threads/messages.mjs.map +1 -1
- package/resources/beta/threads/suggestions.d.mts +92 -0
- package/resources/beta/threads/suggestions.d.mts.map +1 -0
- package/resources/beta/threads/suggestions.d.ts +20 -9
- package/resources/beta/threads/suggestions.d.ts.map +1 -1
- package/resources/beta/threads/suggestions.js +10 -7
- package/resources/beta/threads/suggestions.js.map +1 -1
- package/resources/beta/threads/suggestions.mjs +10 -7
- package/resources/beta/threads/suggestions.mjs.map +1 -1
- package/resources/beta/threads/threads.d.mts +482 -0
- package/resources/beta/threads/threads.d.mts.map +1 -0
- package/resources/beta/threads/threads.d.ts +120 -24
- package/resources/beta/threads/threads.d.ts.map +1 -1
- package/resources/beta/threads/threads.js +48 -54
- package/resources/beta/threads/threads.js.map +1 -1
- package/resources/beta/threads/threads.mjs +44 -27
- package/resources/beta/threads/threads.mjs.map +1 -1
- package/resources/beta/threads.d.mts +2 -0
- package/resources/beta/threads.d.mts.map +1 -0
- package/resources/beta/threads.d.ts.map +1 -1
- package/resources/beta/threads.js +2 -15
- package/resources/beta/threads.js.map +1 -1
- package/resources/beta.d.mts +2 -0
- package/resources/beta.d.mts.map +1 -0
- package/resources/beta.d.ts.map +1 -1
- package/resources/beta.js +2 -15
- package/resources/beta.js.map +1 -1
- package/resources/index.d.mts +3 -0
- package/resources/index.d.mts.map +1 -0
- package/resources/index.d.ts.map +1 -1
- package/resources/index.js +2 -15
- package/resources/index.js.map +1 -1
- package/resources/shared.d.mts +46 -0
- package/resources/shared.d.mts.map +1 -0
- package/resources.d.mts +2 -0
- package/resources.d.mts.map +1 -0
- package/resources.d.ts.map +1 -1
- package/resources.js +2 -15
- package/resources.js.map +1 -1
- package/src/api-promise.ts +2 -0
- package/src/client.ts +818 -0
- package/src/core/README.md +3 -0
- package/src/core/api-promise.ts +92 -0
- package/src/core/error.ts +130 -0
- package/src/core/pagination.ts +174 -0
- package/src/core/resource.ts +11 -0
- package/src/core/uploads.ts +2 -0
- package/src/error.ts +2 -130
- package/src/index.ts +12 -263
- package/src/internal/README.md +3 -0
- package/src/internal/builtin-types.ts +93 -0
- package/src/internal/detect-platform.ts +196 -0
- package/src/internal/errors.ts +33 -0
- package/src/internal/headers.ts +97 -0
- package/src/internal/parse.ts +50 -0
- package/src/internal/request-options.ts +91 -0
- package/src/internal/shim-types.ts +26 -0
- package/src/internal/shims.ts +107 -0
- package/src/internal/to-file.ts +154 -0
- package/src/internal/types.ts +95 -0
- package/src/internal/uploads.ts +187 -0
- package/src/internal/utils/base64.ts +40 -0
- package/src/internal/utils/bytes.ts +32 -0
- package/src/internal/utils/env.ts +18 -0
- package/src/internal/utils/log.ts +127 -0
- package/src/internal/utils/path.ts +88 -0
- package/src/internal/utils/sleep.ts +3 -0
- package/src/internal/utils/uuid.ts +17 -0
- package/src/internal/utils/values.ts +105 -0
- package/src/internal/utils.ts +8 -0
- package/src/lib/advance-stream.ts +5 -6
- package/src/pagination.ts +2 -73
- package/src/resource.ts +2 -11
- package/src/resources/beta/auth.ts +7 -8
- package/src/resources/beta/beta.ts +2 -3
- package/src/resources/beta/index.ts +1 -1
- package/src/resources/beta/projects/api-key.ts +23 -8
- package/src/resources/beta/projects/index.ts +12 -2
- package/src/resources/beta/projects/projects.ts +26 -9
- package/src/resources/beta/projects/provider-key.ts +18 -10
- package/src/resources/beta/registry.ts +6 -4
- package/src/resources/beta/threads/index.ts +3 -1
- package/src/resources/beta/threads/messages.ts +43 -33
- package/src/resources/beta/threads/suggestions.ts +33 -17
- package/src/resources/beta/threads/threads.ts +159 -64
- package/src/tsconfig.json +2 -1
- package/src/uploads.ts +2 -255
- package/src/version.ts +1 -1
- package/uploads.d.mts +2 -0
- package/uploads.d.mts.map +1 -0
- package/uploads.d.ts +1 -74
- package/uploads.d.ts.map +1 -1
- package/uploads.js +3 -168
- package/uploads.js.map +1 -1
- package/uploads.mjs +1 -157
- package/uploads.mjs.map +1 -1
- package/version.d.mts +2 -0
- package/version.d.mts.map +1 -0
- package/version.d.ts +1 -1
- package/version.js +1 -1
- package/version.mjs +1 -1
- package/_shims/MultipartBody.d.ts +0 -9
- package/_shims/MultipartBody.d.ts.map +0 -1
- package/_shims/MultipartBody.js +0 -16
- package/_shims/MultipartBody.js.map +0 -1
- package/_shims/MultipartBody.mjs +0 -12
- package/_shims/MultipartBody.mjs.map +0 -1
- package/_shims/README.md +0 -46
- package/_shims/auto/runtime-bun.d.ts +0 -5
- package/_shims/auto/runtime-bun.d.ts.map +0 -1
- package/_shims/auto/runtime-bun.js +0 -21
- package/_shims/auto/runtime-bun.js.map +0 -1
- package/_shims/auto/runtime-bun.mjs +0 -2
- package/_shims/auto/runtime-bun.mjs.map +0 -1
- package/_shims/auto/runtime-node.d.ts +0 -5
- package/_shims/auto/runtime-node.d.ts.map +0 -1
- package/_shims/auto/runtime-node.js +0 -21
- package/_shims/auto/runtime-node.js.map +0 -1
- package/_shims/auto/runtime-node.mjs +0 -2
- package/_shims/auto/runtime-node.mjs.map +0 -1
- package/_shims/auto/runtime.d.ts +0 -5
- package/_shims/auto/runtime.d.ts.map +0 -1
- package/_shims/auto/runtime.js +0 -21
- package/_shims/auto/runtime.js.map +0 -1
- package/_shims/auto/runtime.mjs +0 -2
- package/_shims/auto/runtime.mjs.map +0 -1
- package/_shims/auto/types-node.d.ts +0 -5
- package/_shims/auto/types-node.d.ts.map +0 -1
- package/_shims/auto/types-node.js +0 -21
- package/_shims/auto/types-node.js.map +0 -1
- package/_shims/auto/types-node.mjs +0 -2
- package/_shims/auto/types-node.mjs.map +0 -1
- package/_shims/auto/types.d.ts +0 -101
- package/_shims/auto/types.js +0 -3
- package/_shims/auto/types.mjs +0 -3
- package/_shims/bun-runtime.d.ts +0 -6
- package/_shims/bun-runtime.d.ts.map +0 -1
- package/_shims/bun-runtime.js +0 -14
- package/_shims/bun-runtime.js.map +0 -1
- package/_shims/bun-runtime.mjs +0 -10
- package/_shims/bun-runtime.mjs.map +0 -1
- package/_shims/index.d.ts +0 -83
- package/_shims/index.js +0 -17
- package/_shims/index.mjs +0 -11
- package/_shims/manual-types.d.ts +0 -12
- package/_shims/manual-types.js +0 -3
- package/_shims/manual-types.mjs +0 -3
- package/_shims/node-runtime.d.ts +0 -3
- package/_shims/node-runtime.d.ts.map +0 -1
- package/_shims/node-runtime.js +0 -89
- package/_shims/node-runtime.js.map +0 -1
- package/_shims/node-runtime.mjs +0 -56
- package/_shims/node-runtime.mjs.map +0 -1
- package/_shims/node-types.d.ts +0 -42
- package/_shims/node-types.js +0 -3
- package/_shims/node-types.mjs +0 -3
- package/_shims/registry.d.ts +0 -37
- package/_shims/registry.d.ts.map +0 -1
- package/_shims/registry.js +0 -41
- package/_shims/registry.js.map +0 -1
- package/_shims/registry.mjs +0 -37
- package/_shims/registry.mjs.map +0 -1
- package/_shims/web-runtime.d.ts +0 -5
- package/_shims/web-runtime.d.ts.map +0 -1
- package/_shims/web-runtime.js +0 -78
- package/_shims/web-runtime.js.map +0 -1
- package/_shims/web-runtime.mjs +0 -71
- package/_shims/web-runtime.mjs.map +0 -1
- package/_shims/web-types.d.ts +0 -83
- package/_shims/web-types.js +0 -3
- package/_shims/web-types.mjs +0 -3
- package/core.d.ts +0 -255
- package/core.d.ts.map +0 -1
- package/core.js +0 -924
- package/core.js.map +0 -1
- package/core.mjs +0 -892
- package/core.mjs.map +0 -1
- package/shims/node.d.ts +0 -30
- package/shims/node.d.ts.map +0 -1
- package/shims/node.js +0 -31
- package/shims/node.js.map +0 -1
- package/shims/node.mjs +0 -5
- package/shims/node.mjs.map +0 -1
- package/shims/web.d.ts +0 -26
- package/shims/web.d.ts.map +0 -1
- package/shims/web.js +0 -31
- package/shims/web.js.map +0 -1
- package/shims/web.mjs +0 -5
- package/shims/web.mjs.map +0 -1
- package/src/_shims/MultipartBody.ts +0 -9
- package/src/_shims/README.md +0 -46
- package/src/_shims/auto/runtime-bun.ts +0 -4
- package/src/_shims/auto/runtime-node.ts +0 -4
- package/src/_shims/auto/runtime.ts +0 -4
- package/src/_shims/auto/types-node.ts +0 -4
- package/src/_shims/auto/types.d.ts +0 -101
- package/src/_shims/auto/types.js +0 -3
- package/src/_shims/auto/types.mjs +0 -3
- package/src/_shims/bun-runtime.ts +0 -14
- package/src/_shims/index.d.ts +0 -83
- package/src/_shims/index.js +0 -17
- package/src/_shims/index.mjs +0 -11
- package/src/_shims/manual-types.d.ts +0 -12
- package/src/_shims/manual-types.js +0 -3
- package/src/_shims/manual-types.mjs +0 -3
- package/src/_shims/node-runtime.ts +0 -81
- package/src/_shims/node-types.d.ts +0 -42
- package/src/_shims/node-types.js +0 -3
- package/src/_shims/node-types.mjs +0 -3
- package/src/_shims/registry.ts +0 -67
- package/src/_shims/web-runtime.ts +0 -103
- package/src/_shims/web-types.d.ts +0 -83
- package/src/_shims/web-types.js +0 -3
- package/src/_shims/web-types.mjs +0 -3
- package/src/core.ts +0 -1236
- package/src/shims/node.ts +0 -50
- package/src/shims/web.ts +0 -50
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
// File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
|
|
2
|
-
import { APIResource } from "../../../resource.mjs";
|
|
2
|
+
import { APIResource } from "../../../core/resource.mjs";
|
|
3
|
+
import { path } from "../../../internal/utils/path.mjs";
|
|
3
4
|
export class ProviderKey extends APIResource {
|
|
4
5
|
/**
|
|
5
6
|
* @example
|
|
@@ -9,20 +10,21 @@ export class ProviderKey extends APIResource {
|
|
|
9
10
|
* ```
|
|
10
11
|
*/
|
|
11
12
|
list(id, options) {
|
|
12
|
-
return this._client.get(`/projects/${id}/provider-keys`, options);
|
|
13
|
+
return this._client.get(path `/projects/${id}/provider-keys`, options);
|
|
13
14
|
}
|
|
14
15
|
/**
|
|
15
16
|
* @example
|
|
16
17
|
* ```ts
|
|
17
18
|
* const providerKey =
|
|
18
19
|
* await client.beta.projects.providerKey.delete(
|
|
19
|
-
* 'id',
|
|
20
20
|
* 'providerKeyId',
|
|
21
|
+
* { id: 'id' },
|
|
21
22
|
* );
|
|
22
23
|
* ```
|
|
23
24
|
*/
|
|
24
|
-
delete(
|
|
25
|
-
|
|
25
|
+
delete(providerKeyID, params, options) {
|
|
26
|
+
const { id } = params;
|
|
27
|
+
return this._client.delete(path `/projects/${id}/provider-key/${providerKeyID}`, options);
|
|
26
28
|
}
|
|
27
29
|
}
|
|
28
30
|
//# sourceMappingURL=provider-key.mjs.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"provider-key.mjs","sourceRoot":"","sources":["../../../src/resources/beta/projects/provider-key.ts"],"names":[],"mappings":"AAAA,sFAAsF;OAE/E,EAAE,WAAW,EAAE;
|
|
1
|
+
{"version":3,"file":"provider-key.mjs","sourceRoot":"","sources":["../../../src/resources/beta/projects/provider-key.ts"],"names":[],"mappings":"AAAA,sFAAsF;OAE/E,EAAE,WAAW,EAAE;OAGf,EAAE,IAAI,EAAE;AAEf,MAAM,OAAO,WAAY,SAAQ,WAAW;IAC1C;;;;;;OAMG;IACH,IAAI,CAAC,EAAU,EAAE,OAAwB;QACvC,OAAO,IAAI,CAAC,OAAO,CAAC,GAAG,CAAC,IAAI,CAAA,aAAa,EAAE,gBAAgB,EAAE,OAAO,CAAC,CAAC;IACxE,CAAC;IAED;;;;;;;;;OASG;IACH,MAAM,CACJ,aAAqB,EACrB,MAA+B,EAC/B,OAAwB;QAExB,MAAM,EAAE,EAAE,EAAE,GAAG,MAAM,CAAC;QACtB,OAAO,IAAI,CAAC,OAAO,CAAC,MAAM,CAAC,IAAI,CAAA,aAAa,EAAE,iBAAiB,aAAa,EAAE,EAAE,OAAO,CAAC,CAAC;IAC3F,CAAC;CACF"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"projects.d.mts","sourceRoot":"","sources":["../../src/resources/beta/projects.ts"],"names":[],"mappings":""}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"projects.d.ts","sourceRoot":"","sources":["../../src/resources/beta/projects.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"projects.d.ts","sourceRoot":"","sources":["../../src/resources/beta/projects.ts"],"names":[],"mappings":""}
|
|
@@ -1,19 +1,6 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
// File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
|
|
3
|
-
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
|
|
4
|
-
if (k2 === undefined) k2 = k;
|
|
5
|
-
var desc = Object.getOwnPropertyDescriptor(m, k);
|
|
6
|
-
if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
|
|
7
|
-
desc = { enumerable: true, get: function() { return m[k]; } };
|
|
8
|
-
}
|
|
9
|
-
Object.defineProperty(o, k2, desc);
|
|
10
|
-
}) : (function(o, m, k, k2) {
|
|
11
|
-
if (k2 === undefined) k2 = k;
|
|
12
|
-
o[k2] = m[k];
|
|
13
|
-
}));
|
|
14
|
-
var __exportStar = (this && this.__exportStar) || function(m, exports) {
|
|
15
|
-
for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
|
|
16
|
-
};
|
|
17
3
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
18
|
-
|
|
4
|
+
const tslib_1 = require("../../internal/tslib.js");
|
|
5
|
+
tslib_1.__exportStar(require("./projects/index.js"), exports);
|
|
19
6
|
//# sourceMappingURL=projects.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"projects.js","sourceRoot":"","sources":["../../src/resources/beta/projects.ts"],"names":[],"mappings":";AAAA,sFAAsF
|
|
1
|
+
{"version":3,"file":"projects.js","sourceRoot":"","sources":["../../src/resources/beta/projects.ts"],"names":[],"mappings":";AAAA,sFAAsF;;;AAEtF,8DAAiC"}
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
import { APIResource } from "../../core/resource.mjs";
|
|
2
|
+
import { APIPromise } from "../../core/api-promise.mjs";
|
|
3
|
+
import { RequestOptions } from "../../internal/request-options.mjs";
|
|
4
|
+
export declare class Registry extends APIResource {
|
|
5
|
+
/**
|
|
6
|
+
* @example
|
|
7
|
+
* ```ts
|
|
8
|
+
* const registry = await client.beta.registry.retrieve(
|
|
9
|
+
* 'componentname',
|
|
10
|
+
* );
|
|
11
|
+
* ```
|
|
12
|
+
*/
|
|
13
|
+
retrieve(componentname: string, options?: RequestOptions): APIPromise<unknown>;
|
|
14
|
+
}
|
|
15
|
+
export type RegistryRetrieveResponse = unknown;
|
|
16
|
+
export declare namespace Registry {
|
|
17
|
+
export { type RegistryRetrieveResponse as RegistryRetrieveResponse };
|
|
18
|
+
}
|
|
19
|
+
//# sourceMappingURL=registry.d.mts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"registry.d.mts","sourceRoot":"","sources":["../../src/resources/beta/registry.ts"],"names":[],"mappings":"OAEO,EAAE,WAAW,EAAE;OACf,EAAE,UAAU,EAAE;OACd,EAAE,cAAc,EAAE;AAGzB,qBAAa,QAAS,SAAQ,WAAW;IACvC;;;;;;;OAOG;IACH,QAAQ,CAAC,aAAa,EAAE,MAAM,EAAE,OAAO,CAAC,EAAE,cAAc,GAAG,UAAU,CAAC,OAAO,CAAC;CAG/E;AAED,MAAM,MAAM,wBAAwB,GAAG,OAAO,CAAC;AAE/C,MAAM,CAAC,OAAO,WAAW,QAAQ,CAAC;IAChC,OAAO,EAAE,KAAK,wBAAwB,IAAI,wBAAwB,EAAE,CAAC;CACtE"}
|
|
@@ -1,5 +1,6 @@
|
|
|
1
|
-
import { APIResource } from "../../resource.js";
|
|
2
|
-
import
|
|
1
|
+
import { APIResource } from "../../core/resource.js";
|
|
2
|
+
import { APIPromise } from "../../core/api-promise.js";
|
|
3
|
+
import { RequestOptions } from "../../internal/request-options.js";
|
|
3
4
|
export declare class Registry extends APIResource {
|
|
4
5
|
/**
|
|
5
6
|
* @example
|
|
@@ -9,7 +10,7 @@ export declare class Registry extends APIResource {
|
|
|
9
10
|
* );
|
|
10
11
|
* ```
|
|
11
12
|
*/
|
|
12
|
-
retrieve(componentname: string, options?:
|
|
13
|
+
retrieve(componentname: string, options?: RequestOptions): APIPromise<unknown>;
|
|
13
14
|
}
|
|
14
15
|
export type RegistryRetrieveResponse = unknown;
|
|
15
16
|
export declare namespace Registry {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"registry.d.ts","sourceRoot":"","sources":["../../src/resources/beta/registry.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"registry.d.ts","sourceRoot":"","sources":["../../src/resources/beta/registry.ts"],"names":[],"mappings":"OAEO,EAAE,WAAW,EAAE;OACf,EAAE,UAAU,EAAE;OACd,EAAE,cAAc,EAAE;AAGzB,qBAAa,QAAS,SAAQ,WAAW;IACvC;;;;;;;OAOG;IACH,QAAQ,CAAC,aAAa,EAAE,MAAM,EAAE,OAAO,CAAC,EAAE,cAAc,GAAG,UAAU,CAAC,OAAO,CAAC;CAG/E;AAED,MAAM,MAAM,wBAAwB,GAAG,OAAO,CAAC;AAE/C,MAAM,CAAC,OAAO,WAAW,QAAQ,CAAC;IAChC,OAAO,EAAE,KAAK,wBAAwB,IAAI,wBAAwB,EAAE,CAAC;CACtE"}
|
|
@@ -2,7 +2,8 @@
|
|
|
2
2
|
// File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
|
|
3
3
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
4
4
|
exports.Registry = void 0;
|
|
5
|
-
const resource_1 = require("../../resource.js");
|
|
5
|
+
const resource_1 = require("../../core/resource.js");
|
|
6
|
+
const path_1 = require("../../internal/utils/path.js");
|
|
6
7
|
class Registry extends resource_1.APIResource {
|
|
7
8
|
/**
|
|
8
9
|
* @example
|
|
@@ -13,7 +14,7 @@ class Registry extends resource_1.APIResource {
|
|
|
13
14
|
* ```
|
|
14
15
|
*/
|
|
15
16
|
retrieve(componentname, options) {
|
|
16
|
-
return this._client.get(`/registry/${componentname}`, options);
|
|
17
|
+
return this._client.get((0, path_1.path) `/registry/${componentname}`, options);
|
|
17
18
|
}
|
|
18
19
|
}
|
|
19
20
|
exports.Registry = Registry;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"registry.js","sourceRoot":"","sources":["../../src/resources/beta/registry.ts"],"names":[],"mappings":";AAAA,sFAAsF;;;AAEtF,
|
|
1
|
+
{"version":3,"file":"registry.js","sourceRoot":"","sources":["../../src/resources/beta/registry.ts"],"names":[],"mappings":";AAAA,sFAAsF;;;AAEtF,qDAAkD;AAGlD,uDAAiD;AAEjD,MAAa,QAAS,SAAQ,sBAAW;IACvC;;;;;;;OAOG;IACH,QAAQ,CAAC,aAAqB,EAAE,OAAwB;QACtD,OAAO,IAAI,CAAC,OAAO,CAAC,GAAG,CAAC,IAAA,WAAI,EAAA,aAAa,aAAa,EAAE,EAAE,OAAO,CAAC,CAAC;IACrE,CAAC;CACF;AAZD,4BAYC"}
|
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
// File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
|
|
2
|
-
import { APIResource } from "../../resource.mjs";
|
|
2
|
+
import { APIResource } from "../../core/resource.mjs";
|
|
3
|
+
import { path } from "../../internal/utils/path.mjs";
|
|
3
4
|
export class Registry extends APIResource {
|
|
4
5
|
/**
|
|
5
6
|
* @example
|
|
@@ -10,7 +11,7 @@ export class Registry extends APIResource {
|
|
|
10
11
|
* ```
|
|
11
12
|
*/
|
|
12
13
|
retrieve(componentname, options) {
|
|
13
|
-
return this._client.get(`/registry/${componentname}`, options);
|
|
14
|
+
return this._client.get(path `/registry/${componentname}`, options);
|
|
14
15
|
}
|
|
15
16
|
}
|
|
16
17
|
//# sourceMappingURL=registry.mjs.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"registry.mjs","sourceRoot":"","sources":["../../src/resources/beta/registry.ts"],"names":[],"mappings":"AAAA,sFAAsF;OAE/E,EAAE,WAAW,EAAE;
|
|
1
|
+
{"version":3,"file":"registry.mjs","sourceRoot":"","sources":["../../src/resources/beta/registry.ts"],"names":[],"mappings":"AAAA,sFAAsF;OAE/E,EAAE,WAAW,EAAE;OAGf,EAAE,IAAI,EAAE;AAEf,MAAM,OAAO,QAAS,SAAQ,WAAW;IACvC;;;;;;;OAOG;IACH,QAAQ,CAAC,aAAqB,EAAE,OAAwB;QACtD,OAAO,IAAI,CAAC,OAAO,CAAC,GAAG,CAAC,IAAI,CAAA,aAAa,aAAa,EAAE,EAAE,OAAO,CAAC,CAAC;IACrE,CAAC;CACF"}
|
|
@@ -0,0 +1,4 @@
|
|
|
1
|
+
export { Messages, type MessageCreateResponse, type MessageListResponse, type MessageCreateParams, type MessageListParams, type MessageDeleteParams, type MessageUpdateComponentStateParams, } from "./messages.mjs";
|
|
2
|
+
export { Suggestions, type Suggestion, type SuggestionsGenerate, type SuggestionListResponse, type SuggestionGenerateResponse, type SuggestionListParams, type SuggestionGenerateParams, } from "./suggestions.mjs";
|
|
3
|
+
export { Threads, type ChatCompletionContentPart, type ComponentDecisionV2, type Thread, type ThreadMessage, type ThreadRetrieveResponse, type ThreadAdvanceResponse, type ThreadAdvanceByIDResponse, type ThreadCreateParams, type ThreadRetrieveParams, type ThreadUpdateParams, type ThreadListParams, type ThreadAdvanceParams, type ThreadAdvanceByIDParams, type ThreadGenerateNameParams, type ThreadsOffsetAndLimit, } from "./threads.mjs";
|
|
4
|
+
//# sourceMappingURL=index.d.mts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.mts","sourceRoot":"","sources":["../../../src/resources/beta/threads/index.ts"],"names":[],"mappings":"OAEO,EACL,QAAQ,EACR,KAAK,qBAAqB,EAC1B,KAAK,mBAAmB,EACxB,KAAK,mBAAmB,EACxB,KAAK,iBAAiB,EACtB,KAAK,mBAAmB,EACxB,KAAK,iCAAiC,GACvC;OACM,EACL,WAAW,EACX,KAAK,UAAU,EACf,KAAK,mBAAmB,EACxB,KAAK,sBAAsB,EAC3B,KAAK,0BAA0B,EAC/B,KAAK,oBAAoB,EACzB,KAAK,wBAAwB,GAC9B;OACM,EACL,OAAO,EACP,KAAK,yBAAyB,EAC9B,KAAK,mBAAmB,EACxB,KAAK,MAAM,EACX,KAAK,aAAa,EAClB,KAAK,sBAAsB,EAC3B,KAAK,qBAAqB,EAC1B,KAAK,yBAAyB,EAC9B,KAAK,kBAAkB,EACvB,KAAK,oBAAoB,EACzB,KAAK,kBAAkB,EACvB,KAAK,gBAAgB,EACrB,KAAK,mBAAmB,EACxB,KAAK,uBAAuB,EAC5B,KAAK,wBAAwB,EAC7B,KAAK,qBAAqB,GAC3B"}
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
export { Messages, type MessageCreateResponse, type MessageListResponse, type MessageCreateParams, type MessageListParams, type MessageUpdateComponentStateParams, } from "./messages.js";
|
|
2
|
-
export { Suggestions, type Suggestion, type SuggestionsGenerate, type SuggestionListResponse, type SuggestionGenerateResponse, type SuggestionGenerateParams, } from "./suggestions.js";
|
|
3
|
-
export {
|
|
1
|
+
export { Messages, type MessageCreateResponse, type MessageListResponse, type MessageCreateParams, type MessageListParams, type MessageDeleteParams, type MessageUpdateComponentStateParams, } from "./messages.js";
|
|
2
|
+
export { Suggestions, type Suggestion, type SuggestionsGenerate, type SuggestionListResponse, type SuggestionGenerateResponse, type SuggestionListParams, type SuggestionGenerateParams, } from "./suggestions.js";
|
|
3
|
+
export { Threads, type ChatCompletionContentPart, type ComponentDecisionV2, type Thread, type ThreadMessage, type ThreadRetrieveResponse, type ThreadAdvanceResponse, type ThreadAdvanceByIDResponse, type ThreadCreateParams, type ThreadRetrieveParams, type ThreadUpdateParams, type ThreadListParams, type ThreadAdvanceParams, type ThreadAdvanceByIDParams, type ThreadGenerateNameParams, type ThreadsOffsetAndLimit, } from "./threads.js";
|
|
4
4
|
//# sourceMappingURL=index.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/resources/beta/threads/index.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/resources/beta/threads/index.ts"],"names":[],"mappings":"OAEO,EACL,QAAQ,EACR,KAAK,qBAAqB,EAC1B,KAAK,mBAAmB,EACxB,KAAK,mBAAmB,EACxB,KAAK,iBAAiB,EACtB,KAAK,mBAAmB,EACxB,KAAK,iCAAiC,GACvC;OACM,EACL,WAAW,EACX,KAAK,UAAU,EACf,KAAK,mBAAmB,EACxB,KAAK,sBAAsB,EAC3B,KAAK,0BAA0B,EAC/B,KAAK,oBAAoB,EACzB,KAAK,wBAAwB,GAC9B;OACM,EACL,OAAO,EACP,KAAK,yBAAyB,EAC9B,KAAK,mBAAmB,EACxB,KAAK,MAAM,EACX,KAAK,aAAa,EAClB,KAAK,sBAAsB,EAC3B,KAAK,qBAAqB,EAC1B,KAAK,yBAAyB,EAC9B,KAAK,kBAAkB,EACvB,KAAK,oBAAoB,EACzB,KAAK,kBAAkB,EACvB,KAAK,gBAAgB,EACrB,KAAK,mBAAmB,EACxB,KAAK,uBAAuB,EAC5B,KAAK,wBAAwB,EAC7B,KAAK,qBAAqB,GAC3B"}
|
|
@@ -1,12 +1,11 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
// File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
|
|
3
3
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
4
|
-
exports.Threads = exports.
|
|
4
|
+
exports.Threads = exports.Suggestions = exports.Messages = void 0;
|
|
5
5
|
var messages_1 = require("./messages.js");
|
|
6
6
|
Object.defineProperty(exports, "Messages", { enumerable: true, get: function () { return messages_1.Messages; } });
|
|
7
7
|
var suggestions_1 = require("./suggestions.js");
|
|
8
8
|
Object.defineProperty(exports, "Suggestions", { enumerable: true, get: function () { return suggestions_1.Suggestions; } });
|
|
9
9
|
var threads_1 = require("./threads.js");
|
|
10
|
-
Object.defineProperty(exports, "ThreadsOffsetAndLimit", { enumerable: true, get: function () { return threads_1.ThreadsOffsetAndLimit; } });
|
|
11
10
|
Object.defineProperty(exports, "Threads", { enumerable: true, get: function () { return threads_1.Threads; } });
|
|
12
11
|
//# sourceMappingURL=index.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/resources/beta/threads/index.ts"],"names":[],"mappings":";AAAA,sFAAsF;;;AAEtF,
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/resources/beta/threads/index.ts"],"names":[],"mappings":";AAAA,sFAAsF;;;AAEtF,0CAQoB;AAPlB,oGAAA,QAAQ,OAAA;AAQV,gDAQuB;AAPrB,0GAAA,WAAW,OAAA;AAQb,wCAiBmB;AAhBjB,kGAAA,OAAO,OAAA"}
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
// File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
|
|
2
2
|
export { Messages, } from "./messages.mjs";
|
|
3
3
|
export { Suggestions, } from "./suggestions.mjs";
|
|
4
|
-
export {
|
|
4
|
+
export { Threads, } from "./threads.mjs";
|
|
5
5
|
//# sourceMappingURL=index.mjs.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.mjs","sourceRoot":"","sources":["../../../src/resources/beta/threads/index.ts"],"names":[],"mappings":"AAAA,sFAAsF;OAE/E,EACL,QAAQ,
|
|
1
|
+
{"version":3,"file":"index.mjs","sourceRoot":"","sources":["../../../src/resources/beta/threads/index.ts"],"names":[],"mappings":"AAAA,sFAAsF;OAE/E,EACL,QAAQ,GAOT;OACM,EACL,WAAW,GAOZ;OACM,EACL,OAAO,GAgBR"}
|
|
@@ -0,0 +1,112 @@
|
|
|
1
|
+
import { APIResource } from "../../../core/resource.mjs";
|
|
2
|
+
import * as Shared from "../../shared.mjs";
|
|
3
|
+
import * as ThreadsAPI from "./threads.mjs";
|
|
4
|
+
import { APIPromise } from "../../../core/api-promise.mjs";
|
|
5
|
+
import { RequestOptions } from "../../../internal/request-options.mjs";
|
|
6
|
+
export declare class Messages extends APIResource {
|
|
7
|
+
/**
|
|
8
|
+
* @example
|
|
9
|
+
* ```ts
|
|
10
|
+
* const message = await client.beta.threads.messages.create(
|
|
11
|
+
* 'id',
|
|
12
|
+
* { content: [{ type: 'text' }], role: 'user' },
|
|
13
|
+
* );
|
|
14
|
+
* ```
|
|
15
|
+
*/
|
|
16
|
+
create(id: string, body: MessageCreateParams, options?: RequestOptions): APIPromise<unknown>;
|
|
17
|
+
/**
|
|
18
|
+
* @example
|
|
19
|
+
* ```ts
|
|
20
|
+
* const threadMessages =
|
|
21
|
+
* await client.beta.threads.messages.list('id');
|
|
22
|
+
* ```
|
|
23
|
+
*/
|
|
24
|
+
list(id: string, query?: MessageListParams | null | undefined, options?: RequestOptions): APIPromise<MessageListResponse>;
|
|
25
|
+
/**
|
|
26
|
+
* @example
|
|
27
|
+
* ```ts
|
|
28
|
+
* await client.beta.threads.messages.delete('messageId', {
|
|
29
|
+
* id: 'id',
|
|
30
|
+
* });
|
|
31
|
+
* ```
|
|
32
|
+
*/
|
|
33
|
+
delete(messageID: string, params: MessageDeleteParams, options?: RequestOptions): APIPromise<void>;
|
|
34
|
+
/**
|
|
35
|
+
* @example
|
|
36
|
+
* ```ts
|
|
37
|
+
* const threadMessage =
|
|
38
|
+
* await client.beta.threads.messages.updateComponentState(
|
|
39
|
+
* 'messageId',
|
|
40
|
+
* { id: 'id', state: { foo: 'bar' } },
|
|
41
|
+
* );
|
|
42
|
+
* ```
|
|
43
|
+
*/
|
|
44
|
+
updateComponentState(messageID: string, params: MessageUpdateComponentStateParams, options?: RequestOptions): APIPromise<ThreadsAPI.ThreadMessage>;
|
|
45
|
+
}
|
|
46
|
+
export type MessageCreateResponse = unknown;
|
|
47
|
+
export type MessageListResponse = Array<ThreadsAPI.ThreadMessage>;
|
|
48
|
+
export interface MessageCreateParams {
|
|
49
|
+
content: Array<ThreadsAPI.ChatCompletionContentPart>;
|
|
50
|
+
role: 'user' | 'assistant' | 'system' | 'tool' | 'hydra';
|
|
51
|
+
/**
|
|
52
|
+
* @deprecated No longer used - instead set role and the tool call information
|
|
53
|
+
*/
|
|
54
|
+
actionType?: 'tool_call' | 'tool_response';
|
|
55
|
+
/**
|
|
56
|
+
* Additional context to provide to the AI beyond the user query, such as the info
|
|
57
|
+
* about the current page the user is visiting.
|
|
58
|
+
*/
|
|
59
|
+
additionalContext?: {
|
|
60
|
+
[key: string]: unknown;
|
|
61
|
+
};
|
|
62
|
+
component?: ThreadsAPI.ComponentDecisionV2;
|
|
63
|
+
/**
|
|
64
|
+
* The initial state of the component
|
|
65
|
+
*/
|
|
66
|
+
componentState?: {
|
|
67
|
+
[key: string]: unknown;
|
|
68
|
+
};
|
|
69
|
+
error?: string;
|
|
70
|
+
/**
|
|
71
|
+
* Whether the message has been cancelled
|
|
72
|
+
*/
|
|
73
|
+
isCancelled?: boolean;
|
|
74
|
+
metadata?: {
|
|
75
|
+
[key: string]: unknown;
|
|
76
|
+
};
|
|
77
|
+
/**
|
|
78
|
+
* Reasoning text from the LLM, if the model supports it.
|
|
79
|
+
*/
|
|
80
|
+
reasoning?: Array<string>;
|
|
81
|
+
tool_call_id?: string;
|
|
82
|
+
toolCallRequest?: Shared.ToolCallRequest;
|
|
83
|
+
/**
|
|
84
|
+
* @deprecated Put the response in the content instead
|
|
85
|
+
*/
|
|
86
|
+
toolResponse?: unknown;
|
|
87
|
+
}
|
|
88
|
+
export interface MessageListParams {
|
|
89
|
+
/**
|
|
90
|
+
* Whether to include internal messages
|
|
91
|
+
*/
|
|
92
|
+
includeInternal?: boolean;
|
|
93
|
+
}
|
|
94
|
+
export interface MessageDeleteParams {
|
|
95
|
+
id: string;
|
|
96
|
+
}
|
|
97
|
+
export interface MessageUpdateComponentStateParams {
|
|
98
|
+
/**
|
|
99
|
+
* Path param:
|
|
100
|
+
*/
|
|
101
|
+
id: string;
|
|
102
|
+
/**
|
|
103
|
+
* Body param:
|
|
104
|
+
*/
|
|
105
|
+
state: {
|
|
106
|
+
[key: string]: unknown;
|
|
107
|
+
};
|
|
108
|
+
}
|
|
109
|
+
export declare namespace Messages {
|
|
110
|
+
export { type MessageCreateResponse as MessageCreateResponse, type MessageListResponse as MessageListResponse, type MessageCreateParams as MessageCreateParams, type MessageListParams as MessageListParams, type MessageDeleteParams as MessageDeleteParams, type MessageUpdateComponentStateParams as MessageUpdateComponentStateParams, };
|
|
111
|
+
}
|
|
112
|
+
//# sourceMappingURL=messages.d.mts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"messages.d.mts","sourceRoot":"","sources":["../../../src/resources/beta/threads/messages.ts"],"names":[],"mappings":"OAEO,EAAE,WAAW,EAAE;OACf,KAAK,MAAM;OACX,KAAK,UAAU;OACf,EAAE,UAAU,EAAE;OAEd,EAAE,cAAc,EAAE;AAGzB,qBAAa,QAAS,SAAQ,WAAW;IACvC;;;;;;;;OAQG;IACH,MAAM,CAAC,EAAE,EAAE,MAAM,EAAE,IAAI,EAAE,mBAAmB,EAAE,OAAO,CAAC,EAAE,cAAc,GAAG,UAAU,CAAC,OAAO,CAAC;IAI5F;;;;;;OAMG;IACH,IAAI,CACF,EAAE,EAAE,MAAM,EACV,KAAK,GAAE,iBAAiB,GAAG,IAAI,GAAG,SAAc,EAChD,OAAO,CAAC,EAAE,cAAc,GACvB,UAAU,CAAC,mBAAmB,CAAC;IAIlC;;;;;;;OAOG;IACH,MAAM,CAAC,SAAS,EAAE,MAAM,EAAE,MAAM,EAAE,mBAAmB,EAAE,OAAO,CAAC,EAAE,cAAc,GAAG,UAAU,CAAC,IAAI,CAAC;IAQlG;;;;;;;;;OASG;IACH,oBAAoB,CAClB,SAAS,EAAE,MAAM,EACjB,MAAM,EAAE,iCAAiC,EACzC,OAAO,CAAC,EAAE,cAAc,GACvB,UAAU,CAAC,UAAU,CAAC,aAAa,CAAC;CAIxC;AAED,MAAM,MAAM,qBAAqB,GAAG,OAAO,CAAC;AAE5C,MAAM,MAAM,mBAAmB,GAAG,KAAK,CAAC,UAAU,CAAC,aAAa,CAAC,CAAC;AAElE,MAAM,WAAW,mBAAmB;IAClC,OAAO,EAAE,KAAK,CAAC,UAAU,CAAC,yBAAyB,CAAC,CAAC;IAErD,IAAI,EAAE,MAAM,GAAG,WAAW,GAAG,QAAQ,GAAG,MAAM,GAAG,OAAO,CAAC;IAEzD;;OAEG;IACH,UAAU,CAAC,EAAE,WAAW,GAAG,eAAe,CAAC;IAE3C;;;OAGG;IACH,iBAAiB,CAAC,EAAE;QAAE,CAAC,GAAG,EAAE,MAAM,GAAG,OAAO,CAAA;KAAE,CAAC;IAE/C,SAAS,CAAC,EAAE,UAAU,CAAC,mBAAmB,CAAC;IAE3C;;OAEG;IACH,cAAc,CAAC,EAAE;QAAE,CAAC,GAAG,EAAE,MAAM,GAAG,OAAO,CAAA;KAAE,CAAC;IAE5C,KAAK,CAAC,EAAE,MAAM,CAAC;IAEf;;OAEG;IACH,WAAW,CAAC,EAAE,OAAO,CAAC;IAEtB,QAAQ,CAAC,EAAE;QAAE,CAAC,GAAG,EAAE,MAAM,GAAG,OAAO,CAAA;KAAE,CAAC;IAEtC;;OAEG;IACH,SAAS,CAAC,EAAE,KAAK,CAAC,MAAM,CAAC,CAAC;IAE1B,YAAY,CAAC,EAAE,MAAM,CAAC;IAEtB,eAAe,CAAC,EAAE,MAAM,CAAC,eAAe,CAAC;IAEzC;;OAEG;IACH,YAAY,CAAC,EAAE,OAAO,CAAC;CACxB;AAED,MAAM,WAAW,iBAAiB;IAChC;;OAEG;IACH,eAAe,CAAC,EAAE,OAAO,CAAC;CAC3B;AAED,MAAM,WAAW,mBAAmB;IAClC,EAAE,EAAE,MAAM,CAAC;CACZ;AAED,MAAM,WAAW,iCAAiC;IAChD;;OAEG;IACH,EAAE,EAAE,MAAM,CAAC;IAEX;;OAEG;IACH,KAAK,EAAE;QAAE,CAAC,GAAG,EAAE,MAAM,GAAG,OAAO,CAAA;KAAE,CAAC;CACnC;AAED,MAAM,CAAC,OAAO,WAAW,QAAQ,CAAC;IAChC,OAAO,EACL,KAAK,qBAAqB,IAAI,qBAAqB,EACnD,KAAK,mBAAmB,IAAI,mBAAmB,EAC/C,KAAK,mBAAmB,IAAI,mBAAmB,EAC/C,KAAK,iBAAiB,IAAI,iBAAiB,EAC3C,KAAK,mBAAmB,IAAI,mBAAmB,EAC/C,KAAK,iCAAiC,IAAI,iCAAiC,GAC5E,CAAC;CACH"}
|
|
@@ -1,7 +1,8 @@
|
|
|
1
|
-
import { APIResource } from "../../../resource.js";
|
|
2
|
-
import * as Core from "../../../core.js";
|
|
1
|
+
import { APIResource } from "../../../core/resource.js";
|
|
3
2
|
import * as Shared from "../../shared.js";
|
|
4
3
|
import * as ThreadsAPI from "./threads.js";
|
|
4
|
+
import { APIPromise } from "../../../core/api-promise.js";
|
|
5
|
+
import { RequestOptions } from "../../../internal/request-options.js";
|
|
5
6
|
export declare class Messages extends APIResource {
|
|
6
7
|
/**
|
|
7
8
|
* @example
|
|
@@ -12,7 +13,7 @@ export declare class Messages extends APIResource {
|
|
|
12
13
|
* );
|
|
13
14
|
* ```
|
|
14
15
|
*/
|
|
15
|
-
create(id: string, body: MessageCreateParams, options?:
|
|
16
|
+
create(id: string, body: MessageCreateParams, options?: RequestOptions): APIPromise<unknown>;
|
|
16
17
|
/**
|
|
17
18
|
* @example
|
|
18
19
|
* ```ts
|
|
@@ -20,30 +21,27 @@ export declare class Messages extends APIResource {
|
|
|
20
21
|
* await client.beta.threads.messages.list('id');
|
|
21
22
|
* ```
|
|
22
23
|
*/
|
|
23
|
-
list(id: string, query?: MessageListParams, options?:
|
|
24
|
-
list(id: string, options?: Core.RequestOptions): Core.APIPromise<MessageListResponse>;
|
|
24
|
+
list(id: string, query?: MessageListParams | null | undefined, options?: RequestOptions): APIPromise<MessageListResponse>;
|
|
25
25
|
/**
|
|
26
26
|
* @example
|
|
27
27
|
* ```ts
|
|
28
|
-
* await client.beta.threads.messages.delete(
|
|
29
|
-
* 'id',
|
|
30
|
-
*
|
|
31
|
-
* );
|
|
28
|
+
* await client.beta.threads.messages.delete('messageId', {
|
|
29
|
+
* id: 'id',
|
|
30
|
+
* });
|
|
32
31
|
* ```
|
|
33
32
|
*/
|
|
34
|
-
delete(
|
|
33
|
+
delete(messageID: string, params: MessageDeleteParams, options?: RequestOptions): APIPromise<void>;
|
|
35
34
|
/**
|
|
36
35
|
* @example
|
|
37
36
|
* ```ts
|
|
38
37
|
* const threadMessage =
|
|
39
38
|
* await client.beta.threads.messages.updateComponentState(
|
|
40
|
-
* 'id',
|
|
41
39
|
* 'messageId',
|
|
42
|
-
* { state: { foo: 'bar' } },
|
|
40
|
+
* { id: 'id', state: { foo: 'bar' } },
|
|
43
41
|
* );
|
|
44
42
|
* ```
|
|
45
43
|
*/
|
|
46
|
-
updateComponentState(
|
|
44
|
+
updateComponentState(messageID: string, params: MessageUpdateComponentStateParams, options?: RequestOptions): APIPromise<ThreadsAPI.ThreadMessage>;
|
|
47
45
|
}
|
|
48
46
|
export type MessageCreateResponse = unknown;
|
|
49
47
|
export type MessageListResponse = Array<ThreadsAPI.ThreadMessage>;
|
|
@@ -76,6 +74,10 @@ export interface MessageCreateParams {
|
|
|
76
74
|
metadata?: {
|
|
77
75
|
[key: string]: unknown;
|
|
78
76
|
};
|
|
77
|
+
/**
|
|
78
|
+
* Reasoning text from the LLM, if the model supports it.
|
|
79
|
+
*/
|
|
80
|
+
reasoning?: Array<string>;
|
|
79
81
|
tool_call_id?: string;
|
|
80
82
|
toolCallRequest?: Shared.ToolCallRequest;
|
|
81
83
|
/**
|
|
@@ -89,12 +91,22 @@ export interface MessageListParams {
|
|
|
89
91
|
*/
|
|
90
92
|
includeInternal?: boolean;
|
|
91
93
|
}
|
|
94
|
+
export interface MessageDeleteParams {
|
|
95
|
+
id: string;
|
|
96
|
+
}
|
|
92
97
|
export interface MessageUpdateComponentStateParams {
|
|
98
|
+
/**
|
|
99
|
+
* Path param:
|
|
100
|
+
*/
|
|
101
|
+
id: string;
|
|
102
|
+
/**
|
|
103
|
+
* Body param:
|
|
104
|
+
*/
|
|
93
105
|
state: {
|
|
94
106
|
[key: string]: unknown;
|
|
95
107
|
};
|
|
96
108
|
}
|
|
97
109
|
export declare namespace Messages {
|
|
98
|
-
export { type MessageCreateResponse as MessageCreateResponse, type MessageListResponse as MessageListResponse, type MessageCreateParams as MessageCreateParams, type MessageListParams as MessageListParams, type MessageUpdateComponentStateParams as MessageUpdateComponentStateParams, };
|
|
110
|
+
export { type MessageCreateResponse as MessageCreateResponse, type MessageListResponse as MessageListResponse, type MessageCreateParams as MessageCreateParams, type MessageListParams as MessageListParams, type MessageDeleteParams as MessageDeleteParams, type MessageUpdateComponentStateParams as MessageUpdateComponentStateParams, };
|
|
99
111
|
}
|
|
100
112
|
//# sourceMappingURL=messages.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"messages.d.ts","sourceRoot":"","sources":["../../../src/resources/beta/threads/messages.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"messages.d.ts","sourceRoot":"","sources":["../../../src/resources/beta/threads/messages.ts"],"names":[],"mappings":"OAEO,EAAE,WAAW,EAAE;OACf,KAAK,MAAM;OACX,KAAK,UAAU;OACf,EAAE,UAAU,EAAE;OAEd,EAAE,cAAc,EAAE;AAGzB,qBAAa,QAAS,SAAQ,WAAW;IACvC;;;;;;;;OAQG;IACH,MAAM,CAAC,EAAE,EAAE,MAAM,EAAE,IAAI,EAAE,mBAAmB,EAAE,OAAO,CAAC,EAAE,cAAc,GAAG,UAAU,CAAC,OAAO,CAAC;IAI5F;;;;;;OAMG;IACH,IAAI,CACF,EAAE,EAAE,MAAM,EACV,KAAK,GAAE,iBAAiB,GAAG,IAAI,GAAG,SAAc,EAChD,OAAO,CAAC,EAAE,cAAc,GACvB,UAAU,CAAC,mBAAmB,CAAC;IAIlC;;;;;;;OAOG;IACH,MAAM,CAAC,SAAS,EAAE,MAAM,EAAE,MAAM,EAAE,mBAAmB,EAAE,OAAO,CAAC,EAAE,cAAc,GAAG,UAAU,CAAC,IAAI,CAAC;IAQlG;;;;;;;;;OASG;IACH,oBAAoB,CAClB,SAAS,EAAE,MAAM,EACjB,MAAM,EAAE,iCAAiC,EACzC,OAAO,CAAC,EAAE,cAAc,GACvB,UAAU,CAAC,UAAU,CAAC,aAAa,CAAC;CAIxC;AAED,MAAM,MAAM,qBAAqB,GAAG,OAAO,CAAC;AAE5C,MAAM,MAAM,mBAAmB,GAAG,KAAK,CAAC,UAAU,CAAC,aAAa,CAAC,CAAC;AAElE,MAAM,WAAW,mBAAmB;IAClC,OAAO,EAAE,KAAK,CAAC,UAAU,CAAC,yBAAyB,CAAC,CAAC;IAErD,IAAI,EAAE,MAAM,GAAG,WAAW,GAAG,QAAQ,GAAG,MAAM,GAAG,OAAO,CAAC;IAEzD;;OAEG;IACH,UAAU,CAAC,EAAE,WAAW,GAAG,eAAe,CAAC;IAE3C;;;OAGG;IACH,iBAAiB,CAAC,EAAE;QAAE,CAAC,GAAG,EAAE,MAAM,GAAG,OAAO,CAAA;KAAE,CAAC;IAE/C,SAAS,CAAC,EAAE,UAAU,CAAC,mBAAmB,CAAC;IAE3C;;OAEG;IACH,cAAc,CAAC,EAAE;QAAE,CAAC,GAAG,EAAE,MAAM,GAAG,OAAO,CAAA;KAAE,CAAC;IAE5C,KAAK,CAAC,EAAE,MAAM,CAAC;IAEf;;OAEG;IACH,WAAW,CAAC,EAAE,OAAO,CAAC;IAEtB,QAAQ,CAAC,EAAE;QAAE,CAAC,GAAG,EAAE,MAAM,GAAG,OAAO,CAAA;KAAE,CAAC;IAEtC;;OAEG;IACH,SAAS,CAAC,EAAE,KAAK,CAAC,MAAM,CAAC,CAAC;IAE1B,YAAY,CAAC,EAAE,MAAM,CAAC;IAEtB,eAAe,CAAC,EAAE,MAAM,CAAC,eAAe,CAAC;IAEzC;;OAEG;IACH,YAAY,CAAC,EAAE,OAAO,CAAC;CACxB;AAED,MAAM,WAAW,iBAAiB;IAChC;;OAEG;IACH,eAAe,CAAC,EAAE,OAAO,CAAC;CAC3B;AAED,MAAM,WAAW,mBAAmB;IAClC,EAAE,EAAE,MAAM,CAAC;CACZ;AAED,MAAM,WAAW,iCAAiC;IAChD;;OAEG;IACH,EAAE,EAAE,MAAM,CAAC;IAEX;;OAEG;IACH,KAAK,EAAE;QAAE,CAAC,GAAG,EAAE,MAAM,GAAG,OAAO,CAAA;KAAE,CAAC;CACnC;AAED,MAAM,CAAC,OAAO,WAAW,QAAQ,CAAC;IAChC,OAAO,EACL,KAAK,qBAAqB,IAAI,qBAAqB,EACnD,KAAK,mBAAmB,IAAI,mBAAmB,EAC/C,KAAK,mBAAmB,IAAI,mBAAmB,EAC/C,KAAK,iBAAiB,IAAI,iBAAiB,EAC3C,KAAK,mBAAmB,IAAI,mBAAmB,EAC/C,KAAK,iCAAiC,IAAI,iCAAiC,GAC5E,CAAC;CACH"}
|
|
@@ -2,8 +2,9 @@
|
|
|
2
2
|
// File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
|
|
3
3
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
4
4
|
exports.Messages = void 0;
|
|
5
|
-
const resource_1 = require("../../../resource.js");
|
|
6
|
-
const
|
|
5
|
+
const resource_1 = require("../../../core/resource.js");
|
|
6
|
+
const headers_1 = require("../../../internal/headers.js");
|
|
7
|
+
const path_1 = require("../../../internal/utils/path.js");
|
|
7
8
|
class Messages extends resource_1.APIResource {
|
|
8
9
|
/**
|
|
9
10
|
* @example
|
|
@@ -15,27 +16,31 @@ class Messages extends resource_1.APIResource {
|
|
|
15
16
|
* ```
|
|
16
17
|
*/
|
|
17
18
|
create(id, body, options) {
|
|
18
|
-
return this._client.post(`/threads/${id}/messages`, { body, ...options });
|
|
19
|
+
return this._client.post((0, path_1.path) `/threads/${id}/messages`, { body, ...options });
|
|
19
20
|
}
|
|
21
|
+
/**
|
|
22
|
+
* @example
|
|
23
|
+
* ```ts
|
|
24
|
+
* const threadMessages =
|
|
25
|
+
* await client.beta.threads.messages.list('id');
|
|
26
|
+
* ```
|
|
27
|
+
*/
|
|
20
28
|
list(id, query = {}, options) {
|
|
21
|
-
|
|
22
|
-
return this.list(id, {}, query);
|
|
23
|
-
}
|
|
24
|
-
return this._client.get(`/threads/${id}/messages`, { query, ...options });
|
|
29
|
+
return this._client.get((0, path_1.path) `/threads/${id}/messages`, { query, ...options });
|
|
25
30
|
}
|
|
26
31
|
/**
|
|
27
32
|
* @example
|
|
28
33
|
* ```ts
|
|
29
|
-
* await client.beta.threads.messages.delete(
|
|
30
|
-
* 'id',
|
|
31
|
-
*
|
|
32
|
-
* );
|
|
34
|
+
* await client.beta.threads.messages.delete('messageId', {
|
|
35
|
+
* id: 'id',
|
|
36
|
+
* });
|
|
33
37
|
* ```
|
|
34
38
|
*/
|
|
35
|
-
delete(
|
|
36
|
-
|
|
39
|
+
delete(messageID, params, options) {
|
|
40
|
+
const { id } = params;
|
|
41
|
+
return this._client.delete((0, path_1.path) `/threads/${id}/messages/${messageID}`, {
|
|
37
42
|
...options,
|
|
38
|
-
headers: { Accept: '*/*',
|
|
43
|
+
headers: (0, headers_1.buildHeaders)([{ Accept: '*/*' }, options?.headers]),
|
|
39
44
|
});
|
|
40
45
|
}
|
|
41
46
|
/**
|
|
@@ -43,14 +48,14 @@ class Messages extends resource_1.APIResource {
|
|
|
43
48
|
* ```ts
|
|
44
49
|
* const threadMessage =
|
|
45
50
|
* await client.beta.threads.messages.updateComponentState(
|
|
46
|
-
* 'id',
|
|
47
51
|
* 'messageId',
|
|
48
|
-
* { state: { foo: 'bar' } },
|
|
52
|
+
* { id: 'id', state: { foo: 'bar' } },
|
|
49
53
|
* );
|
|
50
54
|
* ```
|
|
51
55
|
*/
|
|
52
|
-
updateComponentState(
|
|
53
|
-
|
|
56
|
+
updateComponentState(messageID, params, options) {
|
|
57
|
+
const { id, ...body } = params;
|
|
58
|
+
return this._client.put((0, path_1.path) `/threads/${id}/messages/${messageID}/component-state`, { body, ...options });
|
|
54
59
|
}
|
|
55
60
|
}
|
|
56
61
|
exports.Messages = Messages;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"messages.js","sourceRoot":"","sources":["../../../src/resources/beta/threads/messages.ts"],"names":[],"mappings":";AAAA,sFAAsF;;;AAEtF,
|
|
1
|
+
{"version":3,"file":"messages.js","sourceRoot":"","sources":["../../../src/resources/beta/threads/messages.ts"],"names":[],"mappings":";AAAA,sFAAsF;;;AAEtF,wDAAqD;AAIrD,0DAAyD;AAEzD,0DAAoD;AAEpD,MAAa,QAAS,SAAQ,sBAAW;IACvC;;;;;;;;OAQG;IACH,MAAM,CAAC,EAAU,EAAE,IAAyB,EAAE,OAAwB;QACpE,OAAO,IAAI,CAAC,OAAO,CAAC,IAAI,CAAC,IAAA,WAAI,EAAA,YAAY,EAAE,WAAW,EAAE,EAAE,IAAI,EAAE,GAAG,OAAO,EAAE,CAAC,CAAC;IAChF,CAAC;IAED;;;;;;OAMG;IACH,IAAI,CACF,EAAU,EACV,QAA8C,EAAE,EAChD,OAAwB;QAExB,OAAO,IAAI,CAAC,OAAO,CAAC,GAAG,CAAC,IAAA,WAAI,EAAA,YAAY,EAAE,WAAW,EAAE,EAAE,KAAK,EAAE,GAAG,OAAO,EAAE,CAAC,CAAC;IAChF,CAAC;IAED;;;;;;;OAOG;IACH,MAAM,CAAC,SAAiB,EAAE,MAA2B,EAAE,OAAwB;QAC7E,MAAM,EAAE,EAAE,EAAE,GAAG,MAAM,CAAC;QACtB,OAAO,IAAI,CAAC,OAAO,CAAC,MAAM,CAAC,IAAA,WAAI,EAAA,YAAY,EAAE,aAAa,SAAS,EAAE,EAAE;YACrE,GAAG,OAAO;YACV,OAAO,EAAE,IAAA,sBAAY,EAAC,CAAC,EAAE,MAAM,EAAE,KAAK,EAAE,EAAE,OAAO,EAAE,OAAO,CAAC,CAAC;SAC7D,CAAC,CAAC;IACL,CAAC;IAED;;;;;;;;;OASG;IACH,oBAAoB,CAClB,SAAiB,EACjB,MAAyC,EACzC,OAAwB;QAExB,MAAM,EAAE,EAAE,EAAE,GAAG,IAAI,EAAE,GAAG,MAAM,CAAC;QAC/B,OAAO,IAAI,CAAC,OAAO,CAAC,GAAG,CAAC,IAAA,WAAI,EAAA,YAAY,EAAE,aAAa,SAAS,kBAAkB,EAAE,EAAE,IAAI,EAAE,GAAG,OAAO,EAAE,CAAC,CAAC;IAC5G,CAAC;CACF;AA/DD,4BA+DC"}
|
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
// File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
|
|
2
|
-
import { APIResource } from "../../../resource.mjs";
|
|
3
|
-
import {
|
|
2
|
+
import { APIResource } from "../../../core/resource.mjs";
|
|
3
|
+
import { buildHeaders } from "../../../internal/headers.mjs";
|
|
4
|
+
import { path } from "../../../internal/utils/path.mjs";
|
|
4
5
|
export class Messages extends APIResource {
|
|
5
6
|
/**
|
|
6
7
|
* @example
|
|
@@ -12,27 +13,31 @@ export class Messages extends APIResource {
|
|
|
12
13
|
* ```
|
|
13
14
|
*/
|
|
14
15
|
create(id, body, options) {
|
|
15
|
-
return this._client.post(`/threads/${id}/messages`, { body, ...options });
|
|
16
|
+
return this._client.post(path `/threads/${id}/messages`, { body, ...options });
|
|
16
17
|
}
|
|
18
|
+
/**
|
|
19
|
+
* @example
|
|
20
|
+
* ```ts
|
|
21
|
+
* const threadMessages =
|
|
22
|
+
* await client.beta.threads.messages.list('id');
|
|
23
|
+
* ```
|
|
24
|
+
*/
|
|
17
25
|
list(id, query = {}, options) {
|
|
18
|
-
|
|
19
|
-
return this.list(id, {}, query);
|
|
20
|
-
}
|
|
21
|
-
return this._client.get(`/threads/${id}/messages`, { query, ...options });
|
|
26
|
+
return this._client.get(path `/threads/${id}/messages`, { query, ...options });
|
|
22
27
|
}
|
|
23
28
|
/**
|
|
24
29
|
* @example
|
|
25
30
|
* ```ts
|
|
26
|
-
* await client.beta.threads.messages.delete(
|
|
27
|
-
* 'id',
|
|
28
|
-
*
|
|
29
|
-
* );
|
|
31
|
+
* await client.beta.threads.messages.delete('messageId', {
|
|
32
|
+
* id: 'id',
|
|
33
|
+
* });
|
|
30
34
|
* ```
|
|
31
35
|
*/
|
|
32
|
-
delete(
|
|
33
|
-
|
|
36
|
+
delete(messageID, params, options) {
|
|
37
|
+
const { id } = params;
|
|
38
|
+
return this._client.delete(path `/threads/${id}/messages/${messageID}`, {
|
|
34
39
|
...options,
|
|
35
|
-
headers: { Accept: '*/*',
|
|
40
|
+
headers: buildHeaders([{ Accept: '*/*' }, options?.headers]),
|
|
36
41
|
});
|
|
37
42
|
}
|
|
38
43
|
/**
|
|
@@ -40,14 +45,14 @@ export class Messages extends APIResource {
|
|
|
40
45
|
* ```ts
|
|
41
46
|
* const threadMessage =
|
|
42
47
|
* await client.beta.threads.messages.updateComponentState(
|
|
43
|
-
* 'id',
|
|
44
48
|
* 'messageId',
|
|
45
|
-
* { state: { foo: 'bar' } },
|
|
49
|
+
* { id: 'id', state: { foo: 'bar' } },
|
|
46
50
|
* );
|
|
47
51
|
* ```
|
|
48
52
|
*/
|
|
49
|
-
updateComponentState(
|
|
50
|
-
|
|
53
|
+
updateComponentState(messageID, params, options) {
|
|
54
|
+
const { id, ...body } = params;
|
|
55
|
+
return this._client.put(path `/threads/${id}/messages/${messageID}/component-state`, { body, ...options });
|
|
51
56
|
}
|
|
52
57
|
}
|
|
53
58
|
//# sourceMappingURL=messages.mjs.map
|