@clear-street/clearstreet 0.0.0 → 0.73.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 +994 -0
- package/LICENSE +201 -0
- package/README.md +358 -0
- package/api-promise.d.mts +3 -0
- package/api-promise.d.mts.map +1 -0
- package/api-promise.d.ts +3 -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 +3 -0
- package/api-promise.mjs.map +1 -0
- package/client.d.mts +195 -0
- package/client.d.mts.map +1 -0
- package/client.d.ts +195 -0
- package/client.d.ts.map +1 -0
- package/client.js +489 -0
- package/client.js.map +1 -0
- package/client.mjs +485 -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/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 +3 -0
- package/error.d.mts.map +1 -0
- package/error.d.ts +3 -0
- package/error.d.ts.map +1 -0
- package/error.js +6 -0
- package/error.js.map +1 -0
- package/error.mjs +3 -0
- package/error.mjs.map +1 -0
- package/index.d.mts +6 -0
- package/index.d.mts.map +1 -0
- package/index.d.ts +6 -0
- package/index.d.ts.map +1 -0
- package/index.js +30 -0
- package/index.js.map +1 -0
- package/index.mjs +7 -0
- package/index.mjs.map +1 -0
- 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 +40 -0
- package/internal/parse.js.map +1 -0
- package/internal/parse.mjs +37 -0
- package/internal/parse.mjs.map +1 -0
- package/internal/qs/formats.d.mts +7 -0
- package/internal/qs/formats.d.mts.map +1 -0
- package/internal/qs/formats.d.ts +7 -0
- package/internal/qs/formats.d.ts.map +1 -0
- package/internal/qs/formats.js +13 -0
- package/internal/qs/formats.js.map +1 -0
- package/internal/qs/formats.mjs +9 -0
- package/internal/qs/formats.mjs.map +1 -0
- package/internal/qs/index.d.mts +10 -0
- package/internal/qs/index.d.mts.map +1 -0
- package/internal/qs/index.d.ts +10 -0
- package/internal/qs/index.d.ts.map +1 -0
- package/internal/qs/index.js +14 -0
- package/internal/qs/index.js.map +1 -0
- package/internal/qs/index.mjs +10 -0
- package/internal/qs/index.mjs.map +1 -0
- package/internal/qs/stringify.d.mts +3 -0
- package/internal/qs/stringify.d.mts.map +1 -0
- package/internal/qs/stringify.d.ts +3 -0
- package/internal/qs/stringify.d.ts.map +1 -0
- package/internal/qs/stringify.js +277 -0
- package/internal/qs/stringify.js.map +1 -0
- package/internal/qs/stringify.mjs +274 -0
- package/internal/qs/stringify.mjs.map +1 -0
- package/internal/qs/types.d.mts +57 -0
- package/internal/qs/types.d.mts.map +1 -0
- package/internal/qs/types.d.ts +57 -0
- package/internal/qs/types.d.ts.map +1 -0
- package/internal/qs/types.js +3 -0
- package/internal/qs/types.js.map +1 -0
- package/internal/qs/types.mjs +2 -0
- package/internal/qs/types.mjs.map +1 -0
- package/internal/qs/utils.d.mts +15 -0
- package/internal/qs/utils.d.mts.map +1 -0
- package/internal/qs/utils.d.ts +15 -0
- package/internal/qs/utils.d.ts.map +1 -0
- package/internal/qs/utils.js +230 -0
- package/internal/qs/utils.js.map +1 -0
- package/internal/qs/utils.mjs +217 -0
- package/internal/qs/utils.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 +26 -0
- package/internal/shims.d.mts.map +1 -0
- package/internal/shims.d.ts +26 -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 +87 -0
- package/internal/utils/log.js.map +1 -0
- package/internal/utils/log.mjs +81 -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/query.d.mts +2 -0
- package/internal/utils/query.d.mts.map +1 -0
- package/internal/utils/query.d.ts +2 -0
- package/internal/utils/query.d.ts.map +1 -0
- package/internal/utils/query.js +10 -0
- package/internal/utils/query.js.map +1 -0
- package/internal/utils/query.mjs +6 -0
- package/internal/utils/query.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 +8 -0
- package/internal/utils.d.mts.map +1 -0
- package/internal/utils.d.ts +8 -0
- package/internal/utils.d.ts.map +1 -0
- package/internal/utils.js +12 -0
- package/internal/utils.js.map +1 -0
- package/internal/utils.mjs +9 -0
- package/internal/utils.mjs.map +1 -0
- package/package.json +147 -3
- package/resource.d.mts +3 -0
- package/resource.d.mts.map +1 -0
- package/resource.d.ts +3 -0
- package/resource.d.ts.map +1 -0
- package/resource.js +6 -0
- package/resource.js.map +1 -0
- package/resource.mjs +3 -0
- package/resource.mjs.map +1 -0
- package/resources/index.d.mts +3 -0
- package/resources/index.d.mts.map +1 -0
- package/resources/index.d.ts +3 -0
- package/resources/index.d.ts.map +1 -0
- package/resources/index.js +9 -0
- package/resources/index.js.map +1 -0
- package/resources/index.mjs +4 -0
- package/resources/index.mjs.map +1 -0
- package/resources/shared.d.mts +63 -0
- package/resources/shared.d.mts.map +1 -0
- package/resources/shared.d.ts +63 -0
- package/resources/shared.d.ts.map +1 -0
- package/resources/shared.js +4 -0
- package/resources/shared.js.map +1 -0
- package/resources/shared.mjs +3 -0
- package/resources/shared.mjs.map +1 -0
- package/resources/v1/accounts.d.mts +436 -0
- package/resources/v1/accounts.d.mts.map +1 -0
- package/resources/v1/accounts.d.ts +436 -0
- package/resources/v1/accounts.d.ts.map +1 -0
- package/resources/v1/accounts.js +74 -0
- package/resources/v1/accounts.js.map +1 -0
- package/resources/v1/accounts.mjs +70 -0
- package/resources/v1/accounts.mjs.map +1 -0
- package/resources/v1/api-version.d.mts +37 -0
- package/resources/v1/api-version.d.mts.map +1 -0
- package/resources/v1/api-version.d.ts +37 -0
- package/resources/v1/api-version.d.ts.map +1 -0
- package/resources/v1/api-version.js +23 -0
- package/resources/v1/api-version.js.map +1 -0
- package/resources/v1/api-version.mjs +19 -0
- package/resources/v1/api-version.mjs.map +1 -0
- package/resources/v1/calendar.d.mts +170 -0
- package/resources/v1/calendar.d.mts.map +1 -0
- package/resources/v1/calendar.d.ts +170 -0
- package/resources/v1/calendar.d.ts.map +1 -0
- package/resources/v1/calendar.js +39 -0
- package/resources/v1/calendar.js.map +1 -0
- package/resources/v1/calendar.mjs +35 -0
- package/resources/v1/calendar.mjs.map +1 -0
- package/resources/v1/index.d.mts +12 -0
- package/resources/v1/index.d.mts.map +1 -0
- package/resources/v1/index.d.ts +12 -0
- package/resources/v1/index.d.ts.map +1 -0
- package/resources/v1/index.js +27 -0
- package/resources/v1/index.js.map +1 -0
- package/resources/v1/index.mjs +13 -0
- package/resources/v1/index.mjs.map +1 -0
- package/resources/v1/instrument-data/index.d.mts +4 -0
- package/resources/v1/instrument-data/index.d.mts.map +1 -0
- package/resources/v1/instrument-data/index.d.ts +4 -0
- package/resources/v1/instrument-data/index.d.ts.map +1 -0
- package/resources/v1/instrument-data/index.js +11 -0
- package/resources/v1/instrument-data/index.js.map +1 -0
- package/resources/v1/instrument-data/index.mjs +5 -0
- package/resources/v1/instrument-data/index.mjs.map +1 -0
- package/resources/v1/instrument-data/instrument-data.d.mts +1202 -0
- package/resources/v1/instrument-data/instrument-data.d.mts.map +1 -0
- package/resources/v1/instrument-data/instrument-data.d.ts +1202 -0
- package/resources/v1/instrument-data/instrument-data.d.ts.map +1 -0
- package/resources/v1/instrument-data/instrument-data.js +150 -0
- package/resources/v1/instrument-data/instrument-data.js.map +1 -0
- package/resources/v1/instrument-data/instrument-data.mjs +145 -0
- package/resources/v1/instrument-data/instrument-data.mjs.map +1 -0
- package/resources/v1/instrument-data/market-data.d.mts +240 -0
- package/resources/v1/instrument-data/market-data.d.mts.map +1 -0
- package/resources/v1/instrument-data/market-data.d.ts +240 -0
- package/resources/v1/instrument-data/market-data.d.ts.map +1 -0
- package/resources/v1/instrument-data/market-data.js +49 -0
- package/resources/v1/instrument-data/market-data.js.map +1 -0
- package/resources/v1/instrument-data/market-data.mjs +45 -0
- package/resources/v1/instrument-data/market-data.mjs.map +1 -0
- package/resources/v1/instrument-data/news.d.mts +136 -0
- package/resources/v1/instrument-data/news.d.mts.map +1 -0
- package/resources/v1/instrument-data/news.d.ts +136 -0
- package/resources/v1/instrument-data/news.d.ts.map +1 -0
- package/resources/v1/instrument-data/news.js +25 -0
- package/resources/v1/instrument-data/news.js.map +1 -0
- package/resources/v1/instrument-data/news.mjs +21 -0
- package/resources/v1/instrument-data/news.mjs.map +1 -0
- package/resources/v1/instrument-data.d.mts +2 -0
- package/resources/v1/instrument-data.d.mts.map +1 -0
- package/resources/v1/instrument-data.d.ts +2 -0
- package/resources/v1/instrument-data.d.ts.map +1 -0
- package/resources/v1/instrument-data.js +6 -0
- package/resources/v1/instrument-data.js.map +1 -0
- package/resources/v1/instrument-data.mjs +3 -0
- package/resources/v1/instrument-data.mjs.map +1 -0
- package/resources/v1/instruments.d.mts +473 -0
- package/resources/v1/instruments.d.mts.map +1 -0
- package/resources/v1/instruments.d.ts +473 -0
- package/resources/v1/instruments.d.ts.map +1 -0
- package/resources/v1/instruments.js +77 -0
- package/resources/v1/instruments.js.map +1 -0
- package/resources/v1/instruments.mjs +73 -0
- package/resources/v1/instruments.mjs.map +1 -0
- package/resources/v1/omni-ai/entitlements.d.mts +108 -0
- package/resources/v1/omni-ai/entitlements.d.mts.map +1 -0
- package/resources/v1/omni-ai/entitlements.d.ts +108 -0
- package/resources/v1/omni-ai/entitlements.d.ts.map +1 -0
- package/resources/v1/omni-ai/entitlements.js +67 -0
- package/resources/v1/omni-ai/entitlements.js.map +1 -0
- package/resources/v1/omni-ai/entitlements.mjs +63 -0
- package/resources/v1/omni-ai/entitlements.mjs.map +1 -0
- package/resources/v1/omni-ai/index.d.mts +6 -0
- package/resources/v1/omni-ai/index.d.mts.map +1 -0
- package/resources/v1/omni-ai/index.d.ts +6 -0
- package/resources/v1/omni-ai/index.d.ts.map +1 -0
- package/resources/v1/omni-ai/index.js +15 -0
- package/resources/v1/omni-ai/index.js.map +1 -0
- package/resources/v1/omni-ai/index.mjs +7 -0
- package/resources/v1/omni-ai/index.mjs.map +1 -0
- package/resources/v1/omni-ai/messages.d.mts +85 -0
- package/resources/v1/omni-ai/messages.d.mts.map +1 -0
- package/resources/v1/omni-ai/messages.d.ts +85 -0
- package/resources/v1/omni-ai/messages.d.ts.map +1 -0
- package/resources/v1/omni-ai/messages.js +51 -0
- package/resources/v1/omni-ai/messages.js.map +1 -0
- package/resources/v1/omni-ai/messages.mjs +47 -0
- package/resources/v1/omni-ai/messages.mjs.map +1 -0
- package/resources/v1/omni-ai/omni-ai.d.mts +323 -0
- package/resources/v1/omni-ai/omni-ai.d.mts.map +1 -0
- package/resources/v1/omni-ai/omni-ai.d.ts +323 -0
- package/resources/v1/omni-ai/omni-ai.d.ts.map +1 -0
- package/resources/v1/omni-ai/omni-ai.js +29 -0
- package/resources/v1/omni-ai/omni-ai.js.map +1 -0
- package/resources/v1/omni-ai/omni-ai.mjs +24 -0
- package/resources/v1/omni-ai/omni-ai.mjs.map +1 -0
- package/resources/v1/omni-ai/responses.d.mts +158 -0
- package/resources/v1/omni-ai/responses.d.mts.map +1 -0
- package/resources/v1/omni-ai/responses.d.ts +158 -0
- package/resources/v1/omni-ai/responses.d.ts.map +1 -0
- package/resources/v1/omni-ai/responses.js +60 -0
- package/resources/v1/omni-ai/responses.js.map +1 -0
- package/resources/v1/omni-ai/responses.mjs +56 -0
- package/resources/v1/omni-ai/responses.mjs.map +1 -0
- package/resources/v1/omni-ai/threads.d.mts +338 -0
- package/resources/v1/omni-ai/threads.d.mts.map +1 -0
- package/resources/v1/omni-ai/threads.d.ts +338 -0
- package/resources/v1/omni-ai/threads.d.ts.map +1 -0
- package/resources/v1/omni-ai/threads.js +141 -0
- package/resources/v1/omni-ai/threads.js.map +1 -0
- package/resources/v1/omni-ai/threads.mjs +137 -0
- package/resources/v1/omni-ai/threads.mjs.map +1 -0
- package/resources/v1/omni-ai.d.mts +2 -0
- package/resources/v1/omni-ai.d.mts.map +1 -0
- package/resources/v1/omni-ai.d.ts +2 -0
- package/resources/v1/omni-ai.d.ts.map +1 -0
- package/resources/v1/omni-ai.js +6 -0
- package/resources/v1/omni-ai.js.map +1 -0
- package/resources/v1/omni-ai.mjs +3 -0
- package/resources/v1/omni-ai.mjs.map +1 -0
- package/resources/v1/orders.d.mts +643 -0
- package/resources/v1/orders.d.mts.map +1 -0
- package/resources/v1/orders.d.ts +643 -0
- package/resources/v1/orders.d.ts.map +1 -0
- package/resources/v1/orders.js +134 -0
- package/resources/v1/orders.js.map +1 -0
- package/resources/v1/orders.mjs +130 -0
- package/resources/v1/orders.mjs.map +1 -0
- package/resources/v1/positions.d.mts +385 -0
- package/resources/v1/positions.d.mts.map +1 -0
- package/resources/v1/positions.d.ts +385 -0
- package/resources/v1/positions.d.ts.map +1 -0
- package/resources/v1/positions.js +130 -0
- package/resources/v1/positions.js.map +1 -0
- package/resources/v1/positions.mjs +126 -0
- package/resources/v1/positions.mjs.map +1 -0
- package/resources/v1/v1.d.mts +51 -0
- package/resources/v1/v1.d.mts.map +1 -0
- package/resources/v1/v1.d.ts +51 -0
- package/resources/v1/v1.d.ts.map +1 -0
- package/resources/v1/v1.js +53 -0
- package/resources/v1/v1.js.map +1 -0
- package/resources/v1/v1.mjs +48 -0
- package/resources/v1/v1.mjs.map +1 -0
- package/resources/v1/watchlist.d.mts +210 -0
- package/resources/v1/watchlist.d.mts.map +1 -0
- package/resources/v1/watchlist.d.ts +210 -0
- package/resources/v1/watchlist.d.ts.map +1 -0
- package/resources/v1/watchlist.js +95 -0
- package/resources/v1/watchlist.js.map +1 -0
- package/resources/v1/watchlist.mjs +91 -0
- package/resources/v1/watchlist.mjs.map +1 -0
- package/resources/v1/websocket.d.mts +18 -0
- package/resources/v1/websocket.d.mts.map +1 -0
- package/resources/v1/websocket.d.ts +18 -0
- package/resources/v1/websocket.d.ts.map +1 -0
- package/resources/v1/websocket.js +27 -0
- package/resources/v1/websocket.js.map +1 -0
- package/resources/v1/websocket.mjs +23 -0
- package/resources/v1/websocket.mjs.map +1 -0
- package/resources/v1.d.mts +2 -0
- package/resources/v1.d.mts.map +1 -0
- package/resources/v1.d.ts +2 -0
- package/resources/v1.d.ts.map +1 -0
- package/resources/v1.js +6 -0
- package/resources/v1.js.map +1 -0
- package/resources/v1.mjs +3 -0
- package/resources/v1.mjs.map +1 -0
- package/resources.d.mts +2 -0
- package/resources.d.mts.map +1 -0
- package/resources.d.ts +2 -0
- package/resources.d.ts.map +1 -0
- package/resources.js +5 -0
- package/resources.js.map +1 -0
- package/resources.mjs +2 -0
- package/resources.mjs.map +1 -0
- package/src/api-promise.ts +2 -0
- package/src/client.ts +769 -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/resource.ts +11 -0
- package/src/core/uploads.ts +2 -0
- package/src/error.ts +2 -0
- package/src/index.ts +22 -0
- 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 +56 -0
- package/src/internal/qs/LICENSE.md +13 -0
- package/src/internal/qs/README.md +3 -0
- package/src/internal/qs/formats.ts +10 -0
- package/src/internal/qs/index.ts +13 -0
- package/src/internal/qs/stringify.ts +385 -0
- package/src/internal/qs/types.ts +71 -0
- package/src/internal/qs/utils.ts +265 -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 +93 -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 +128 -0
- package/src/internal/utils/path.ts +88 -0
- package/src/internal/utils/query.ts +7 -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 +9 -0
- package/src/lib/.keep +4 -0
- package/src/resource.ts +2 -0
- package/src/resources/index.ts +4 -0
- package/src/resources/shared.ts +72 -0
- package/src/resources/v1/accounts.ts +586 -0
- package/src/resources/v1/api-version.ts +44 -0
- package/src/resources/v1/calendar.ts +221 -0
- package/src/resources/v1/index.ts +203 -0
- package/src/resources/v1/instrument-data/index.ts +63 -0
- package/src/resources/v1/instrument-data/instrument-data.ts +1584 -0
- package/src/resources/v1/instrument-data/market-data.ts +306 -0
- package/src/resources/v1/instrument-data/news.ts +188 -0
- package/src/resources/v1/instrument-data.ts +3 -0
- package/src/resources/v1/instruments.ts +611 -0
- package/src/resources/v1/omni-ai/entitlements.ts +170 -0
- package/src/resources/v1/omni-ai/index.ts +89 -0
- package/src/resources/v1/omni-ai/messages.ts +117 -0
- package/src/resources/v1/omni-ai/omni-ai.ts +527 -0
- package/src/resources/v1/omni-ai/responses.ts +220 -0
- package/src/resources/v1/omni-ai/threads.ts +460 -0
- package/src/resources/v1/omni-ai.ts +3 -0
- package/src/resources/v1/orders.ts +912 -0
- package/src/resources/v1/positions.ts +533 -0
- package/src/resources/v1/v1.ts +460 -0
- package/src/resources/v1/watchlist.ts +292 -0
- package/src/resources/v1/websocket.ts +26 -0
- package/src/resources/v1.ts +3 -0
- package/src/resources.ts +1 -0
- package/src/tsconfig.json +11 -0
- package/src/uploads.ts +2 -0
- package/src/version.ts +1 -0
- package/uploads.d.mts +3 -0
- package/uploads.d.mts.map +1 -0
- package/uploads.d.ts +3 -0
- package/uploads.d.ts.map +1 -0
- package/uploads.js +6 -0
- package/uploads.js.map +1 -0
- package/uploads.mjs +3 -0
- package/uploads.mjs.map +1 -0
- package/version.d.mts +2 -0
- package/version.d.mts.map +1 -0
- package/version.d.ts +2 -0
- package/version.d.ts.map +1 -0
- package/version.js +5 -0
- package/version.js.map +1 -0
- package/version.mjs +2 -0
- package/version.mjs.map +1 -0
|
@@ -0,0 +1,338 @@
|
|
|
1
|
+
import { APIResource } from "../../../core/resource.js";
|
|
2
|
+
import * as Shared from "../../shared.js";
|
|
3
|
+
import * as OmniAIAPI from "./omni-ai.js";
|
|
4
|
+
import * as ResponsesAPI from "./responses.js";
|
|
5
|
+
import { APIPromise } from "../../../core/api-promise.js";
|
|
6
|
+
import { RequestOptions } from "../../../internal/request-options.js";
|
|
7
|
+
/**
|
|
8
|
+
* Thread-centric AI assistant for conversational trading. Create threads to start conversations, poll response objects for in-progress output, and read finalized messages from thread history. Thread/message/response endpoints require an explicit account_id. Entitlement endpoints are caller-scoped and use account_ids.
|
|
9
|
+
*/
|
|
10
|
+
export declare class Threads extends APIResource {
|
|
11
|
+
/**
|
|
12
|
+
* Continue an existing conversation thread.
|
|
13
|
+
*
|
|
14
|
+
* Appends a new user message to the thread and starts an assistant response. Only
|
|
15
|
+
* one response may be active per thread at a time — if the previous turn is still
|
|
16
|
+
* in progress, this endpoint returns **409 Conflict**. Wait for the active
|
|
17
|
+
* response to reach a terminal status before submitting the next turn.
|
|
18
|
+
*
|
|
19
|
+
* Poll the returned `response_id` via `GET /omni-ai/responses/{response_id}` for
|
|
20
|
+
* assistant output.
|
|
21
|
+
*
|
|
22
|
+
* @example
|
|
23
|
+
* ```ts
|
|
24
|
+
* const response =
|
|
25
|
+
* await client.v1.omniAI.threads.createMessage(
|
|
26
|
+
* '182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e',
|
|
27
|
+
* { account_id: 19816, text: 'Compare that to AMD.' },
|
|
28
|
+
* );
|
|
29
|
+
* ```
|
|
30
|
+
*/
|
|
31
|
+
createMessage(threadID: string, body: ThreadCreateMessageParams, options?: RequestOptions): APIPromise<ThreadCreateMessageResponse>;
|
|
32
|
+
/**
|
|
33
|
+
* Create a new conversation thread.
|
|
34
|
+
*
|
|
35
|
+
* Atomically creates a new thread and submits the first user turn. The response
|
|
36
|
+
* contains a `response_id` that should be polled via
|
|
37
|
+
* `GET /omni-ai/responses/{response_id}` for assistant output.
|
|
38
|
+
*
|
|
39
|
+
* Two creation modes are supported:
|
|
40
|
+
*
|
|
41
|
+
* - **instant** — provide `text` with a natural-language prompt.
|
|
42
|
+
* - **deep_insights** — provide a `target` ticker and optional `thesis` for
|
|
43
|
+
* long-form research.
|
|
44
|
+
*
|
|
45
|
+
* @example
|
|
46
|
+
* ```ts
|
|
47
|
+
* const response =
|
|
48
|
+
* await client.v1.omniAI.threads.createThread({
|
|
49
|
+
* account_id: 19816,
|
|
50
|
+
* type: 'instant',
|
|
51
|
+
* });
|
|
52
|
+
* ```
|
|
53
|
+
*/
|
|
54
|
+
createThread(body: ThreadCreateThreadParams, options?: RequestOptions): APIPromise<ThreadCreateThreadResponse>;
|
|
55
|
+
/**
|
|
56
|
+
* List finalized messages in a thread.
|
|
57
|
+
*
|
|
58
|
+
* Returns the latest page of **finalized** messages by default, with messages
|
|
59
|
+
* within each page ordered chronologically. Messages from in-progress assistant
|
|
60
|
+
* turns are excluded — use `GET /omni-ai/threads/{thread_id}/response` or
|
|
61
|
+
* `GET /omni-ai/responses/{response_id}` for live output.
|
|
62
|
+
*
|
|
63
|
+
* If the last finalized message has role `USER`, an active response likely exists
|
|
64
|
+
* and should be polled separately.
|
|
65
|
+
*
|
|
66
|
+
* @example
|
|
67
|
+
* ```ts
|
|
68
|
+
* const response = await client.v1.omniAI.threads.getMessages(
|
|
69
|
+
* '182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e',
|
|
70
|
+
* { account_id: 0 },
|
|
71
|
+
* );
|
|
72
|
+
* ```
|
|
73
|
+
*/
|
|
74
|
+
getMessages(threadID: string, query: ThreadGetMessagesParams, options?: RequestOptions): APIPromise<ThreadGetMessagesResponse>;
|
|
75
|
+
/**
|
|
76
|
+
* Get a specific thread.
|
|
77
|
+
*
|
|
78
|
+
* Returns metadata (title, timestamps) for a single thread. Does not include
|
|
79
|
+
* messages — use `GET /omni-ai/threads/{thread_id}/messages` for conversation
|
|
80
|
+
* history.
|
|
81
|
+
*
|
|
82
|
+
* @example
|
|
83
|
+
* ```ts
|
|
84
|
+
* const response =
|
|
85
|
+
* await client.v1.omniAI.threads.getThreadByID(
|
|
86
|
+
* '182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e',
|
|
87
|
+
* { account_id: 0 },
|
|
88
|
+
* );
|
|
89
|
+
* ```
|
|
90
|
+
*/
|
|
91
|
+
getThreadByID(threadID: string, query: ThreadGetThreadByIDParams, options?: RequestOptions): APIPromise<ThreadGetThreadByIDResponse>;
|
|
92
|
+
/**
|
|
93
|
+
* Get the active response for a thread.
|
|
94
|
+
*
|
|
95
|
+
* Convenience endpoint to look up the currently active response for a thread
|
|
96
|
+
* without knowing the `response_id`. Useful when reloading a thread whose last
|
|
97
|
+
* finalized message is a `USER` message — this indicates an assistant turn is
|
|
98
|
+
* likely in progress.
|
|
99
|
+
*
|
|
100
|
+
* Returns **404** if no active response exists (the thread is idle).
|
|
101
|
+
*
|
|
102
|
+
* @example
|
|
103
|
+
* ```ts
|
|
104
|
+
* const response =
|
|
105
|
+
* await client.v1.omniAI.threads.getThreadResponse(
|
|
106
|
+
* '182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e',
|
|
107
|
+
* { account_id: 0 },
|
|
108
|
+
* );
|
|
109
|
+
* ```
|
|
110
|
+
*/
|
|
111
|
+
getThreadResponse(threadID: string, query: ThreadGetThreadResponseParams, options?: RequestOptions): APIPromise<ThreadGetThreadResponseResponse>;
|
|
112
|
+
/**
|
|
113
|
+
* List conversation threads.
|
|
114
|
+
*
|
|
115
|
+
* Returns thread metadata ordered by most recently created first. Use `page_size`
|
|
116
|
+
* and `page_token` for pagination. Thread objects contain only metadata (title,
|
|
117
|
+
* timestamps) — use the messages endpoint for conversation history.
|
|
118
|
+
*
|
|
119
|
+
* @example
|
|
120
|
+
* ```ts
|
|
121
|
+
* const response = await client.v1.omniAI.threads.getThreads({
|
|
122
|
+
* account_id: 0,
|
|
123
|
+
* });
|
|
124
|
+
* ```
|
|
125
|
+
*/
|
|
126
|
+
getThreads(query: ThreadGetThreadsParams, options?: RequestOptions): APIPromise<ThreadGetThreadsResponse>;
|
|
127
|
+
}
|
|
128
|
+
/**
|
|
129
|
+
* Response payload for continuing a thread with a new message.
|
|
130
|
+
*/
|
|
131
|
+
export interface CreateMessageResponse {
|
|
132
|
+
response_id: string;
|
|
133
|
+
thread_id: string;
|
|
134
|
+
user_message_id: string;
|
|
135
|
+
}
|
|
136
|
+
/**
|
|
137
|
+
* Response payload for thread creation.
|
|
138
|
+
*/
|
|
139
|
+
export interface CreateThreadResponse {
|
|
140
|
+
response_id: string;
|
|
141
|
+
thread_id: string;
|
|
142
|
+
user_message_id: string;
|
|
143
|
+
}
|
|
144
|
+
/**
|
|
145
|
+
* Final immutable message.
|
|
146
|
+
*/
|
|
147
|
+
export interface Message {
|
|
148
|
+
id: string;
|
|
149
|
+
/**
|
|
150
|
+
* Finalized immutable message content container. Never includes thinking parts.
|
|
151
|
+
*/
|
|
152
|
+
content: MessageContent;
|
|
153
|
+
created_at: string;
|
|
154
|
+
/**
|
|
155
|
+
* Immutable terminal outcome for a finalized assistant message.
|
|
156
|
+
*/
|
|
157
|
+
outcome: MessageOutcome;
|
|
158
|
+
/**
|
|
159
|
+
* Finalized message role in the public contract.
|
|
160
|
+
*/
|
|
161
|
+
role: MessageRole;
|
|
162
|
+
seq: number;
|
|
163
|
+
thread_id: string;
|
|
164
|
+
/**
|
|
165
|
+
* Shared sanitized error payload.
|
|
166
|
+
*/
|
|
167
|
+
error?: ResponsesAPI.ErrorStatus | null;
|
|
168
|
+
}
|
|
169
|
+
/**
|
|
170
|
+
* Finalized immutable message content container. Never includes thinking parts.
|
|
171
|
+
*/
|
|
172
|
+
export interface MessageContent {
|
|
173
|
+
parts: Array<MessageContentPart>;
|
|
174
|
+
}
|
|
175
|
+
/**
|
|
176
|
+
* Final immutable content part visible on persisted messages.
|
|
177
|
+
*/
|
|
178
|
+
export type MessageContentPart = MessageContentPart.ContentPartText | MessageContentPart.ContentPartStructuredAction | MessageContentPart.ContentPartChart | MessageContentPart.ContentPartSuggestedActions | MessageContentPart.ContentPartCustom;
|
|
179
|
+
export declare namespace MessageContentPart {
|
|
180
|
+
/**
|
|
181
|
+
* Text content part.
|
|
182
|
+
*/
|
|
183
|
+
interface ContentPartText extends OmniAIAPI.ContentPartTextPayload {
|
|
184
|
+
type: 'text';
|
|
185
|
+
}
|
|
186
|
+
/**
|
|
187
|
+
* Structured action content part.
|
|
188
|
+
*/
|
|
189
|
+
interface ContentPartStructuredAction extends OmniAIAPI.ContentPartStructuredActionPayload {
|
|
190
|
+
type: 'structured_action';
|
|
191
|
+
}
|
|
192
|
+
/**
|
|
193
|
+
* Chart payload content part.
|
|
194
|
+
*/
|
|
195
|
+
interface ContentPartChart extends OmniAIAPI.ContentPartChartPayload {
|
|
196
|
+
type: 'chart';
|
|
197
|
+
}
|
|
198
|
+
/**
|
|
199
|
+
* Suggested actions payload content part.
|
|
200
|
+
*/
|
|
201
|
+
interface ContentPartSuggestedActions extends OmniAIAPI.ContentPartSuggestedActionsPayload {
|
|
202
|
+
type: 'suggested_actions';
|
|
203
|
+
}
|
|
204
|
+
/**
|
|
205
|
+
* Escape-hatch custom payload content part.
|
|
206
|
+
*/
|
|
207
|
+
interface ContentPartCustom extends OmniAIAPI.ContentPartCustomPayload {
|
|
208
|
+
type: 'custom';
|
|
209
|
+
}
|
|
210
|
+
}
|
|
211
|
+
export type MessageList = Array<Message>;
|
|
212
|
+
/**
|
|
213
|
+
* Immutable terminal outcome for a finalized assistant message.
|
|
214
|
+
*/
|
|
215
|
+
export type MessageOutcome = 'completed' | 'errored' | 'canceled';
|
|
216
|
+
/**
|
|
217
|
+
* Finalized message role in the public contract.
|
|
218
|
+
*/
|
|
219
|
+
export type MessageRole = 'USER' | 'ASSISTANT';
|
|
220
|
+
/**
|
|
221
|
+
* Thread metadata returned by list/get thread endpoints.
|
|
222
|
+
*/
|
|
223
|
+
export interface Thread {
|
|
224
|
+
id: string;
|
|
225
|
+
created_at: string;
|
|
226
|
+
title: string;
|
|
227
|
+
updated_at: string;
|
|
228
|
+
}
|
|
229
|
+
export type ThreadList = Array<Thread>;
|
|
230
|
+
export interface ThreadCreateMessageResponse extends Shared.BaseResponse {
|
|
231
|
+
/**
|
|
232
|
+
* Response payload for continuing a thread with a new message.
|
|
233
|
+
*/
|
|
234
|
+
data: CreateMessageResponse;
|
|
235
|
+
}
|
|
236
|
+
export interface ThreadCreateThreadResponse extends Shared.BaseResponse {
|
|
237
|
+
/**
|
|
238
|
+
* Response payload for thread creation.
|
|
239
|
+
*/
|
|
240
|
+
data: CreateThreadResponse;
|
|
241
|
+
}
|
|
242
|
+
export interface ThreadGetMessagesResponse extends Shared.BaseResponse {
|
|
243
|
+
data: MessageList;
|
|
244
|
+
}
|
|
245
|
+
export interface ThreadGetThreadByIDResponse extends Shared.BaseResponse {
|
|
246
|
+
/**
|
|
247
|
+
* Thread metadata returned by list/get thread endpoints.
|
|
248
|
+
*/
|
|
249
|
+
data: Thread;
|
|
250
|
+
}
|
|
251
|
+
export interface ThreadGetThreadResponseResponse extends Shared.BaseResponse {
|
|
252
|
+
/**
|
|
253
|
+
* Dynamic pollable response.
|
|
254
|
+
*/
|
|
255
|
+
data: ResponsesAPI.Response;
|
|
256
|
+
}
|
|
257
|
+
export interface ThreadGetThreadsResponse extends Shared.BaseResponse {
|
|
258
|
+
data: ThreadList;
|
|
259
|
+
}
|
|
260
|
+
export interface ThreadCreateMessageParams {
|
|
261
|
+
account_id: number;
|
|
262
|
+
text: string;
|
|
263
|
+
capabilities?: Array<'PREFILL_ORDER' | 'OPEN_CHART' | 'OPEN_SCREENER' | 'OPEN_ENTITLEMENT_CONSENT'>;
|
|
264
|
+
}
|
|
265
|
+
export interface ThreadCreateThreadParams {
|
|
266
|
+
account_id: number;
|
|
267
|
+
/**
|
|
268
|
+
* Thread creation mode.
|
|
269
|
+
*/
|
|
270
|
+
type: 'instant' | 'deep_insights';
|
|
271
|
+
capabilities?: Array<'PREFILL_ORDER' | 'OPEN_CHART' | 'OPEN_SCREENER' | 'OPEN_ENTITLEMENT_CONSENT'>;
|
|
272
|
+
/**
|
|
273
|
+
* Deep-insights target payload.
|
|
274
|
+
*/
|
|
275
|
+
target?: ThreadCreateThreadParams.Target | null;
|
|
276
|
+
text?: string | null;
|
|
277
|
+
thesis?: string | null;
|
|
278
|
+
}
|
|
279
|
+
export declare namespace ThreadCreateThreadParams {
|
|
280
|
+
/**
|
|
281
|
+
* Deep-insights target payload.
|
|
282
|
+
*/
|
|
283
|
+
interface Target {
|
|
284
|
+
ticker: string;
|
|
285
|
+
/**
|
|
286
|
+
* Deep-insights target type. Launch supports ticker-only.
|
|
287
|
+
*/
|
|
288
|
+
type: 'ticker';
|
|
289
|
+
}
|
|
290
|
+
}
|
|
291
|
+
export interface ThreadGetMessagesParams {
|
|
292
|
+
/**
|
|
293
|
+
* Account ID for the request
|
|
294
|
+
*/
|
|
295
|
+
account_id: number;
|
|
296
|
+
/**
|
|
297
|
+
* The number of items to return per page. Only used when page_token is not
|
|
298
|
+
* provided.
|
|
299
|
+
*/
|
|
300
|
+
page_size?: number;
|
|
301
|
+
/**
|
|
302
|
+
* Token for retrieving the next or previous page of results. Contains encoded
|
|
303
|
+
* pagination state; when provided, page_size is ignored.
|
|
304
|
+
*/
|
|
305
|
+
page_token?: string;
|
|
306
|
+
}
|
|
307
|
+
export interface ThreadGetThreadByIDParams {
|
|
308
|
+
/**
|
|
309
|
+
* Account ID for the request
|
|
310
|
+
*/
|
|
311
|
+
account_id: number;
|
|
312
|
+
}
|
|
313
|
+
export interface ThreadGetThreadResponseParams {
|
|
314
|
+
/**
|
|
315
|
+
* Account ID for the request
|
|
316
|
+
*/
|
|
317
|
+
account_id: number;
|
|
318
|
+
}
|
|
319
|
+
export interface ThreadGetThreadsParams {
|
|
320
|
+
/**
|
|
321
|
+
* Account ID for the request
|
|
322
|
+
*/
|
|
323
|
+
account_id: number;
|
|
324
|
+
/**
|
|
325
|
+
* The number of items to return per page. Only used when page_token is not
|
|
326
|
+
* provided.
|
|
327
|
+
*/
|
|
328
|
+
page_size?: number;
|
|
329
|
+
/**
|
|
330
|
+
* Token for retrieving the next or previous page of results. Contains encoded
|
|
331
|
+
* pagination state; when provided, page_size is ignored.
|
|
332
|
+
*/
|
|
333
|
+
page_token?: string;
|
|
334
|
+
}
|
|
335
|
+
export declare namespace Threads {
|
|
336
|
+
export { type CreateMessageResponse as CreateMessageResponse, type CreateThreadResponse as CreateThreadResponse, type Message as Message, type MessageContent as MessageContent, type MessageContentPart as MessageContentPart, type MessageList as MessageList, type MessageOutcome as MessageOutcome, type MessageRole as MessageRole, type Thread as Thread, type ThreadList as ThreadList, type ThreadCreateMessageResponse as ThreadCreateMessageResponse, type ThreadCreateThreadResponse as ThreadCreateThreadResponse, type ThreadGetMessagesResponse as ThreadGetMessagesResponse, type ThreadGetThreadByIDResponse as ThreadGetThreadByIDResponse, type ThreadGetThreadResponseResponse as ThreadGetThreadResponseResponse, type ThreadGetThreadsResponse as ThreadGetThreadsResponse, type ThreadCreateMessageParams as ThreadCreateMessageParams, type ThreadCreateThreadParams as ThreadCreateThreadParams, type ThreadGetMessagesParams as ThreadGetMessagesParams, type ThreadGetThreadByIDParams as ThreadGetThreadByIDParams, type ThreadGetThreadResponseParams as ThreadGetThreadResponseParams, type ThreadGetThreadsParams as ThreadGetThreadsParams, };
|
|
337
|
+
}
|
|
338
|
+
//# sourceM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;IACH,UAAU,CAAC,EAAE,MAAM,CAAC;CACrB;AAED,MAAM,CAAC,OAAO,WAAW,OAAO,CAAC;IAC/B,OAAO,EACL,KAAK,qBAAqB,IAAI,qBAAqB,EACnD,KAAK,oBAAoB,IAAI,oBAAoB,EACjD,KAAK,OAAO,IAAI,OAAO,EACvB,KAAK,cAAc,IAAI,cAAc,EACrC,KAAK,kBAAkB,IAAI,kBAAkB,EAC7C,KAAK,WAAW,IAAI,WAAW,EAC/B,KAAK,cAAc,IAAI,cAAc,EACrC,KAAK,WAAW,IAAI,WAAW,EAC/B,KAAK,MAAM,IAAI,MAAM,EACrB,KAAK,UAAU,IAAI,UAAU,EAC7B,KAAK,2BAA2B,IAAI,2BAA2B,EAC/D,KAAK,0BAA0B,IAAI,0BAA0B,EAC7D,KAAK,yBAAyB,IAAI,yBAAyB,EAC3D,KAAK,2BAA2B,IAAI,2BAA2B,EAC/D,KAAK,+BAA+B,IAAI,+BAA+B,EACvE,KAAK,wBAAwB,IAAI,wBAAwB,EACzD,KAAK,yBAAyB,IAAI,yBAAyB,EAC3D,KAAK,wBAAwB,IAAI,wBAAwB,EACzD,KAAK,uBAAuB,IAAI,uBAAuB,EACvD,KAAK,yBAAyB,IAAI,yBAAyB,EAC3D,KAAK,6BAA6B,IAAI,6BAA6B,EACnE,KAAK,sBAAsB,IAAI,sBAAsB,GACtD,CAAC;CACH"}
|
|
@@ -0,0 +1,141 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
// File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
|
|
3
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
4
|
+
exports.Threads = void 0;
|
|
5
|
+
const resource_1 = require("../../../core/resource.js");
|
|
6
|
+
const path_1 = require("../../../internal/utils/path.js");
|
|
7
|
+
/**
|
|
8
|
+
* Thread-centric AI assistant for conversational trading. Create threads to start conversations, poll response objects for in-progress output, and read finalized messages from thread history. Thread/message/response endpoints require an explicit account_id. Entitlement endpoints are caller-scoped and use account_ids.
|
|
9
|
+
*/
|
|
10
|
+
class Threads extends resource_1.APIResource {
|
|
11
|
+
/**
|
|
12
|
+
* Continue an existing conversation thread.
|
|
13
|
+
*
|
|
14
|
+
* Appends a new user message to the thread and starts an assistant response. Only
|
|
15
|
+
* one response may be active per thread at a time — if the previous turn is still
|
|
16
|
+
* in progress, this endpoint returns **409 Conflict**. Wait for the active
|
|
17
|
+
* response to reach a terminal status before submitting the next turn.
|
|
18
|
+
*
|
|
19
|
+
* Poll the returned `response_id` via `GET /omni-ai/responses/{response_id}` for
|
|
20
|
+
* assistant output.
|
|
21
|
+
*
|
|
22
|
+
* @example
|
|
23
|
+
* ```ts
|
|
24
|
+
* const response =
|
|
25
|
+
* await client.v1.omniAI.threads.createMessage(
|
|
26
|
+
* '182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e',
|
|
27
|
+
* { account_id: 19816, text: 'Compare that to AMD.' },
|
|
28
|
+
* );
|
|
29
|
+
* ```
|
|
30
|
+
*/
|
|
31
|
+
createMessage(threadID, body, options) {
|
|
32
|
+
return this._client.post((0, path_1.path) `/v1/omni-ai/threads/${threadID}/messages`, { body, ...options });
|
|
33
|
+
}
|
|
34
|
+
/**
|
|
35
|
+
* Create a new conversation thread.
|
|
36
|
+
*
|
|
37
|
+
* Atomically creates a new thread and submits the first user turn. The response
|
|
38
|
+
* contains a `response_id` that should be polled via
|
|
39
|
+
* `GET /omni-ai/responses/{response_id}` for assistant output.
|
|
40
|
+
*
|
|
41
|
+
* Two creation modes are supported:
|
|
42
|
+
*
|
|
43
|
+
* - **instant** — provide `text` with a natural-language prompt.
|
|
44
|
+
* - **deep_insights** — provide a `target` ticker and optional `thesis` for
|
|
45
|
+
* long-form research.
|
|
46
|
+
*
|
|
47
|
+
* @example
|
|
48
|
+
* ```ts
|
|
49
|
+
* const response =
|
|
50
|
+
* await client.v1.omniAI.threads.createThread({
|
|
51
|
+
* account_id: 19816,
|
|
52
|
+
* type: 'instant',
|
|
53
|
+
* });
|
|
54
|
+
* ```
|
|
55
|
+
*/
|
|
56
|
+
createThread(body, options) {
|
|
57
|
+
return this._client.post('/v1/omni-ai/threads', { body, ...options });
|
|
58
|
+
}
|
|
59
|
+
/**
|
|
60
|
+
* List finalized messages in a thread.
|
|
61
|
+
*
|
|
62
|
+
* Returns the latest page of **finalized** messages by default, with messages
|
|
63
|
+
* within each page ordered chronologically. Messages from in-progress assistant
|
|
64
|
+
* turns are excluded — use `GET /omni-ai/threads/{thread_id}/response` or
|
|
65
|
+
* `GET /omni-ai/responses/{response_id}` for live output.
|
|
66
|
+
*
|
|
67
|
+
* If the last finalized message has role `USER`, an active response likely exists
|
|
68
|
+
* and should be polled separately.
|
|
69
|
+
*
|
|
70
|
+
* @example
|
|
71
|
+
* ```ts
|
|
72
|
+
* const response = await client.v1.omniAI.threads.getMessages(
|
|
73
|
+
* '182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e',
|
|
74
|
+
* { account_id: 0 },
|
|
75
|
+
* );
|
|
76
|
+
* ```
|
|
77
|
+
*/
|
|
78
|
+
getMessages(threadID, query, options) {
|
|
79
|
+
return this._client.get((0, path_1.path) `/v1/omni-ai/threads/${threadID}/messages`, { query, ...options });
|
|
80
|
+
}
|
|
81
|
+
/**
|
|
82
|
+
* Get a specific thread.
|
|
83
|
+
*
|
|
84
|
+
* Returns metadata (title, timestamps) for a single thread. Does not include
|
|
85
|
+
* messages — use `GET /omni-ai/threads/{thread_id}/messages` for conversation
|
|
86
|
+
* history.
|
|
87
|
+
*
|
|
88
|
+
* @example
|
|
89
|
+
* ```ts
|
|
90
|
+
* const response =
|
|
91
|
+
* await client.v1.omniAI.threads.getThreadByID(
|
|
92
|
+
* '182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e',
|
|
93
|
+
* { account_id: 0 },
|
|
94
|
+
* );
|
|
95
|
+
* ```
|
|
96
|
+
*/
|
|
97
|
+
getThreadByID(threadID, query, options) {
|
|
98
|
+
return this._client.get((0, path_1.path) `/v1/omni-ai/threads/${threadID}`, { query, ...options });
|
|
99
|
+
}
|
|
100
|
+
/**
|
|
101
|
+
* Get the active response for a thread.
|
|
102
|
+
*
|
|
103
|
+
* Convenience endpoint to look up the currently active response for a thread
|
|
104
|
+
* without knowing the `response_id`. Useful when reloading a thread whose last
|
|
105
|
+
* finalized message is a `USER` message — this indicates an assistant turn is
|
|
106
|
+
* likely in progress.
|
|
107
|
+
*
|
|
108
|
+
* Returns **404** if no active response exists (the thread is idle).
|
|
109
|
+
*
|
|
110
|
+
* @example
|
|
111
|
+
* ```ts
|
|
112
|
+
* const response =
|
|
113
|
+
* await client.v1.omniAI.threads.getThreadResponse(
|
|
114
|
+
* '182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e',
|
|
115
|
+
* { account_id: 0 },
|
|
116
|
+
* );
|
|
117
|
+
* ```
|
|
118
|
+
*/
|
|
119
|
+
getThreadResponse(threadID, query, options) {
|
|
120
|
+
return this._client.get((0, path_1.path) `/v1/omni-ai/threads/${threadID}/response`, { query, ...options });
|
|
121
|
+
}
|
|
122
|
+
/**
|
|
123
|
+
* List conversation threads.
|
|
124
|
+
*
|
|
125
|
+
* Returns thread metadata ordered by most recently created first. Use `page_size`
|
|
126
|
+
* and `page_token` for pagination. Thread objects contain only metadata (title,
|
|
127
|
+
* timestamps) — use the messages endpoint for conversation history.
|
|
128
|
+
*
|
|
129
|
+
* @example
|
|
130
|
+
* ```ts
|
|
131
|
+
* const response = await client.v1.omniAI.threads.getThreads({
|
|
132
|
+
* account_id: 0,
|
|
133
|
+
* });
|
|
134
|
+
* ```
|
|
135
|
+
*/
|
|
136
|
+
getThreads(query, options) {
|
|
137
|
+
return this._client.get('/v1/omni-ai/threads', { query, ...options });
|
|
138
|
+
}
|
|
139
|
+
}
|
|
140
|
+
exports.Threads = Threads;
|
|
141
|
+
//# sourceMappingURL=threads.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"threads.js","sourceRoot":"","sources":["../../../src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GAAG,OAAO,EAAE,CAAC,CAAC;IACjG,CAAC;IAED;;;;;;;;;;;;;OAaG;IACH,UAAU,CAAC,KAA6B,EAAE,OAAwB;QAChE,OAAO,IAAI,CAAC,OAAO,CAAC,GAAG,CAAC,qBAAqB,EAAE,EAAE,KAAK,EAAE,GAAG,OAAO,EAAE,CAAC,CAAC;IACxE,CAAC;CACF;AAzJD,0BAyJC"}
|
|
@@ -0,0 +1,137 @@
|
|
|
1
|
+
// File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
|
|
2
|
+
import { APIResource } from "../../../core/resource.mjs";
|
|
3
|
+
import { path } from "../../../internal/utils/path.mjs";
|
|
4
|
+
/**
|
|
5
|
+
* Thread-centric AI assistant for conversational trading. Create threads to start conversations, poll response objects for in-progress output, and read finalized messages from thread history. Thread/message/response endpoints require an explicit account_id. Entitlement endpoints are caller-scoped and use account_ids.
|
|
6
|
+
*/
|
|
7
|
+
export class Threads extends APIResource {
|
|
8
|
+
/**
|
|
9
|
+
* Continue an existing conversation thread.
|
|
10
|
+
*
|
|
11
|
+
* Appends a new user message to the thread and starts an assistant response. Only
|
|
12
|
+
* one response may be active per thread at a time — if the previous turn is still
|
|
13
|
+
* in progress, this endpoint returns **409 Conflict**. Wait for the active
|
|
14
|
+
* response to reach a terminal status before submitting the next turn.
|
|
15
|
+
*
|
|
16
|
+
* Poll the returned `response_id` via `GET /omni-ai/responses/{response_id}` for
|
|
17
|
+
* assistant output.
|
|
18
|
+
*
|
|
19
|
+
* @example
|
|
20
|
+
* ```ts
|
|
21
|
+
* const response =
|
|
22
|
+
* await client.v1.omniAI.threads.createMessage(
|
|
23
|
+
* '182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e',
|
|
24
|
+
* { account_id: 19816, text: 'Compare that to AMD.' },
|
|
25
|
+
* );
|
|
26
|
+
* ```
|
|
27
|
+
*/
|
|
28
|
+
createMessage(threadID, body, options) {
|
|
29
|
+
return this._client.post(path `/v1/omni-ai/threads/${threadID}/messages`, { body, ...options });
|
|
30
|
+
}
|
|
31
|
+
/**
|
|
32
|
+
* Create a new conversation thread.
|
|
33
|
+
*
|
|
34
|
+
* Atomically creates a new thread and submits the first user turn. The response
|
|
35
|
+
* contains a `response_id` that should be polled via
|
|
36
|
+
* `GET /omni-ai/responses/{response_id}` for assistant output.
|
|
37
|
+
*
|
|
38
|
+
* Two creation modes are supported:
|
|
39
|
+
*
|
|
40
|
+
* - **instant** — provide `text` with a natural-language prompt.
|
|
41
|
+
* - **deep_insights** — provide a `target` ticker and optional `thesis` for
|
|
42
|
+
* long-form research.
|
|
43
|
+
*
|
|
44
|
+
* @example
|
|
45
|
+
* ```ts
|
|
46
|
+
* const response =
|
|
47
|
+
* await client.v1.omniAI.threads.createThread({
|
|
48
|
+
* account_id: 19816,
|
|
49
|
+
* type: 'instant',
|
|
50
|
+
* });
|
|
51
|
+
* ```
|
|
52
|
+
*/
|
|
53
|
+
createThread(body, options) {
|
|
54
|
+
return this._client.post('/v1/omni-ai/threads', { body, ...options });
|
|
55
|
+
}
|
|
56
|
+
/**
|
|
57
|
+
* List finalized messages in a thread.
|
|
58
|
+
*
|
|
59
|
+
* Returns the latest page of **finalized** messages by default, with messages
|
|
60
|
+
* within each page ordered chronologically. Messages from in-progress assistant
|
|
61
|
+
* turns are excluded — use `GET /omni-ai/threads/{thread_id}/response` or
|
|
62
|
+
* `GET /omni-ai/responses/{response_id}` for live output.
|
|
63
|
+
*
|
|
64
|
+
* If the last finalized message has role `USER`, an active response likely exists
|
|
65
|
+
* and should be polled separately.
|
|
66
|
+
*
|
|
67
|
+
* @example
|
|
68
|
+
* ```ts
|
|
69
|
+
* const response = await client.v1.omniAI.threads.getMessages(
|
|
70
|
+
* '182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e',
|
|
71
|
+
* { account_id: 0 },
|
|
72
|
+
* );
|
|
73
|
+
* ```
|
|
74
|
+
*/
|
|
75
|
+
getMessages(threadID, query, options) {
|
|
76
|
+
return this._client.get(path `/v1/omni-ai/threads/${threadID}/messages`, { query, ...options });
|
|
77
|
+
}
|
|
78
|
+
/**
|
|
79
|
+
* Get a specific thread.
|
|
80
|
+
*
|
|
81
|
+
* Returns metadata (title, timestamps) for a single thread. Does not include
|
|
82
|
+
* messages — use `GET /omni-ai/threads/{thread_id}/messages` for conversation
|
|
83
|
+
* history.
|
|
84
|
+
*
|
|
85
|
+
* @example
|
|
86
|
+
* ```ts
|
|
87
|
+
* const response =
|
|
88
|
+
* await client.v1.omniAI.threads.getThreadByID(
|
|
89
|
+
* '182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e',
|
|
90
|
+
* { account_id: 0 },
|
|
91
|
+
* );
|
|
92
|
+
* ```
|
|
93
|
+
*/
|
|
94
|
+
getThreadByID(threadID, query, options) {
|
|
95
|
+
return this._client.get(path `/v1/omni-ai/threads/${threadID}`, { query, ...options });
|
|
96
|
+
}
|
|
97
|
+
/**
|
|
98
|
+
* Get the active response for a thread.
|
|
99
|
+
*
|
|
100
|
+
* Convenience endpoint to look up the currently active response for a thread
|
|
101
|
+
* without knowing the `response_id`. Useful when reloading a thread whose last
|
|
102
|
+
* finalized message is a `USER` message — this indicates an assistant turn is
|
|
103
|
+
* likely in progress.
|
|
104
|
+
*
|
|
105
|
+
* Returns **404** if no active response exists (the thread is idle).
|
|
106
|
+
*
|
|
107
|
+
* @example
|
|
108
|
+
* ```ts
|
|
109
|
+
* const response =
|
|
110
|
+
* await client.v1.omniAI.threads.getThreadResponse(
|
|
111
|
+
* '182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e',
|
|
112
|
+
* { account_id: 0 },
|
|
113
|
+
* );
|
|
114
|
+
* ```
|
|
115
|
+
*/
|
|
116
|
+
getThreadResponse(threadID, query, options) {
|
|
117
|
+
return this._client.get(path `/v1/omni-ai/threads/${threadID}/response`, { query, ...options });
|
|
118
|
+
}
|
|
119
|
+
/**
|
|
120
|
+
* List conversation threads.
|
|
121
|
+
*
|
|
122
|
+
* Returns thread metadata ordered by most recently created first. Use `page_size`
|
|
123
|
+
* and `page_token` for pagination. Thread objects contain only metadata (title,
|
|
124
|
+
* timestamps) — use the messages endpoint for conversation history.
|
|
125
|
+
*
|
|
126
|
+
* @example
|
|
127
|
+
* ```ts
|
|
128
|
+
* const response = await client.v1.omniAI.threads.getThreads({
|
|
129
|
+
* account_id: 0,
|
|
130
|
+
* });
|
|
131
|
+
* ```
|
|
132
|
+
*/
|
|
133
|
+
getThreads(query, options) {
|
|
134
|
+
return this._client.get('/v1/omni-ai/threads', { query, ...options });
|
|
135
|
+
}
|
|
136
|
+
}
|
|
137
|
+
//# sourceMappingURL=threads.mjs.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"threads.mjs","sourceRoot":"","sources":["../../../src/resources/v1/omni-ai/threads.ts"],"names":[],"mappings":"AAAA,sFAAsF;AAEtF,OAAO,EAAE,WAAW,EAAE,mCAA+B;AAMrD,OAAO,EAAE,IAAI,EAAE,yCAAqC;AAEpD;;GAEG;AACH,MAAM,OAAO,OAAQ,SAAQ,WAAW;IACtC;;;;;;;;;;;;;;;;;;;OAmBG;IACH,aAAa,CACX,QAAgB,EAChB,IAA+B,EAC/B,OAAwB;QAExB,OAAO,IAAI,CAAC,OAAO,CAAC,IAAI,CAAC,IAAI,CAAA,uBAAuB,QAAQ,WAAW,EAAE,EAAE,IAAI,EAAE,GAAG,OAAO,EAAE,CAAC,CAAC;IACjG,CAAC;IAED;;;;;;;;;;;;;;;;;;;;;OAqBG;IACH,YAAY,CACV,IAA8B,EAC9B,OAAwB;QAExB,OAAO,IAAI,CAAC,OAAO,CAAC,IAAI,CAAC,qBAAqB,EAAE,EAAE,IAAI,EAAE,GAAG,OAAO,EAAE,CAAC,CAAC;IACxE,CAAC;IAED;;;;;;;;;;;;;;;;;;OAkBG;IACH,WAAW,CACT,QAAgB,EAChB,KAA8B,EAC9B,OAAwB;QAExB,OAAO,IAAI,CAAC,OAAO,CAAC,GAAG,CAAC,IAAI,CAAA,uBAAuB,QAAQ,WAAW,EAAE,EAAE,KAAK,EAAE,GAAG,OAAO,EAAE,CAAC,CAAC;IACjG,CAAC;IAED;;;;;;;;;;;;;;;OAeG;IACH,aAAa,CACX,QAAgB,EAChB,KAAgC,EAChC,OAAwB;QAExB,OAAO,IAAI,CAAC,OAAO,CAAC,GAAG,CAAC,IAAI,CAAA,uBAAuB,QAAQ,EAAE,EAAE,EAAE,KAAK,EAAE,GAAG,OAAO,EAAE,CAAC,CAAC;IACxF,CAAC;IAED;;;;;;;;;;;;;;;;;;OAkBG;IACH,iBAAiB,CACf,QAAgB,EAChB,KAAoC,EACpC,OAAwB;QAExB,OAAO,IAAI,CAAC,OAAO,CAAC,GAAG,CAAC,IAAI,CAAA,uBAAuB,QAAQ,WAAW,EAAE,EAAE,KAAK,EAAE,GAAG,OAAO,EAAE,CAAC,CAAC;IACjG,CAAC;IAED;;;;;;;;;;;;;OAaG;IACH,UAAU,CAAC,KAA6B,EAAE,OAAwB;QAChE,OAAO,IAAI,CAAC,OAAO,CAAC,GAAG,CAAC,qBAAqB,EAAE,EAAE,KAAK,EAAE,GAAG,OAAO,EAAE,CAAC,CAAC;IACxE,CAAC;CACF"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"omni-ai.d.mts","sourceRoot":"","sources":["../../src/resources/v1/omni-ai.ts"],"names":[],"mappings":"AAEA,oCAAgC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"omni-ai.d.ts","sourceRoot":"","sources":["../../src/resources/v1/omni-ai.ts"],"names":[],"mappings":"AAEA,mCAAgC"}
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
// File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
|
|
3
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
4
|
+
const tslib_1 = require("../../internal/tslib.js");
|
|
5
|
+
tslib_1.__exportStar(require("./omni-ai/index.js"), exports);
|
|
6
|
+
//# sourceMappingURL=omni-ai.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"omni-ai.js","sourceRoot":"","sources":["../../src/resources/v1/omni-ai.ts"],"names":[],"mappings":";AAAA,sFAAsF;;;AAEtF,6DAAgC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"omni-ai.mjs","sourceRoot":"","sources":["../../src/resources/v1/omni-ai.ts"],"names":[],"mappings":"AAAA,sFAAsF;AAEtF,oCAAgC"}
|