ogx-client 0.7.2-rc1
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 +512 -0
- package/LICENSE +7 -0
- package/README.md +391 -0
- package/_shims/MultipartBody.d.ts +9 -0
- package/_shims/MultipartBody.d.ts.map +1 -0
- package/_shims/MultipartBody.js +21 -0
- package/_shims/MultipartBody.js.map +1 -0
- package/_shims/MultipartBody.mjs +17 -0
- package/_shims/MultipartBody.mjs.map +1 -0
- package/_shims/README.md +46 -0
- package/_shims/auto/runtime-bun.d.ts +5 -0
- package/_shims/auto/runtime-bun.d.ts.map +1 -0
- package/_shims/auto/runtime-bun.js +26 -0
- package/_shims/auto/runtime-bun.js.map +1 -0
- package/_shims/auto/runtime-bun.mjs +7 -0
- package/_shims/auto/runtime-bun.mjs.map +1 -0
- package/_shims/auto/runtime-node.d.ts +5 -0
- package/_shims/auto/runtime-node.d.ts.map +1 -0
- package/_shims/auto/runtime-node.js +26 -0
- package/_shims/auto/runtime-node.js.map +1 -0
- package/_shims/auto/runtime-node.mjs +7 -0
- package/_shims/auto/runtime-node.mjs.map +1 -0
- package/_shims/auto/runtime.d.ts +5 -0
- package/_shims/auto/runtime.d.ts.map +1 -0
- package/_shims/auto/runtime.js +26 -0
- package/_shims/auto/runtime.js.map +1 -0
- package/_shims/auto/runtime.mjs +7 -0
- package/_shims/auto/runtime.mjs.map +1 -0
- package/_shims/auto/types-node.d.ts +5 -0
- package/_shims/auto/types-node.d.ts.map +1 -0
- package/_shims/auto/types-node.js +26 -0
- package/_shims/auto/types-node.js.map +1 -0
- package/_shims/auto/types-node.mjs +7 -0
- package/_shims/auto/types-node.mjs.map +1 -0
- package/_shims/auto/types.d.ts +107 -0
- package/_shims/auto/types.js +9 -0
- package/_shims/auto/types.mjs +10 -0
- package/_shims/bun-runtime.d.ts +6 -0
- package/_shims/bun-runtime.d.ts.map +1 -0
- package/_shims/bun-runtime.js +19 -0
- package/_shims/bun-runtime.js.map +1 -0
- package/_shims/bun-runtime.mjs +15 -0
- package/_shims/bun-runtime.mjs.map +1 -0
- package/_shims/index.d.ts +89 -0
- package/_shims/index.js +23 -0
- package/_shims/index.mjs +18 -0
- package/_shims/manual-types.d.ts +18 -0
- package/_shims/manual-types.js +9 -0
- package/_shims/manual-types.mjs +10 -0
- package/_shims/node-runtime.d.ts +3 -0
- package/_shims/node-runtime.d.ts.map +1 -0
- package/_shims/node-runtime.js +94 -0
- package/_shims/node-runtime.js.map +1 -0
- package/_shims/node-runtime.mjs +61 -0
- package/_shims/node-runtime.mjs.map +1 -0
- package/_shims/node-types.d.ts +48 -0
- package/_shims/node-types.js +9 -0
- package/_shims/node-types.mjs +10 -0
- package/_shims/registry.d.ts +37 -0
- package/_shims/registry.d.ts.map +1 -0
- package/_shims/registry.js +46 -0
- package/_shims/registry.js.map +1 -0
- package/_shims/registry.mjs +42 -0
- package/_shims/registry.mjs.map +1 -0
- package/_shims/web-runtime.d.ts +5 -0
- package/_shims/web-runtime.d.ts.map +1 -0
- package/_shims/web-runtime.js +83 -0
- package/_shims/web-runtime.js.map +1 -0
- package/_shims/web-runtime.mjs +76 -0
- package/_shims/web-runtime.mjs.map +1 -0
- package/_shims/web-types.d.ts +89 -0
- package/_shims/web-types.js +9 -0
- package/_shims/web-types.mjs +10 -0
- package/core.d.ts +257 -0
- package/core.d.ts.map +1 -0
- package/core.js +936 -0
- package/core.js.map +1 -0
- package/core.mjs +904 -0
- package/core.mjs.map +1 -0
- package/error.d.ts +47 -0
- package/error.d.ts.map +1 -0
- package/error.js +119 -0
- package/error.js.map +1 -0
- package/error.mjs +101 -0
- package/error.mjs.map +1 -0
- package/index.d.mts +233 -0
- package/index.d.ts +233 -0
- package/index.d.ts.map +1 -0
- package/index.js +254 -0
- package/index.js.map +1 -0
- package/index.mjs +210 -0
- package/index.mjs.map +1 -0
- package/internal/decoders/line.d.ts +21 -0
- package/internal/decoders/line.d.ts.map +1 -0
- package/internal/decoders/line.js +155 -0
- package/internal/decoders/line.js.map +1 -0
- package/internal/decoders/line.mjs +150 -0
- package/internal/decoders/line.mjs.map +1 -0
- package/internal/qs/formats.d.ts +6 -0
- package/internal/qs/formats.d.ts.map +1 -0
- package/internal/qs/formats.js +16 -0
- package/internal/qs/formats.js.map +1 -0
- package/internal/qs/formats.mjs +13 -0
- package/internal/qs/formats.mjs.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 +19 -0
- package/internal/qs/index.js.map +1 -0
- package/internal/qs/index.mjs +15 -0
- package/internal/qs/index.mjs.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 +285 -0
- package/internal/qs/stringify.js.map +1 -0
- package/internal/qs/stringify.mjs +281 -0
- package/internal/qs/stringify.mjs.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 +8 -0
- package/internal/qs/types.js.map +1 -0
- package/internal/qs/types.mjs +7 -0
- package/internal/qs/types.mjs.map +1 -0
- package/internal/qs/utils.d.ts +14 -0
- package/internal/qs/utils.d.ts.map +1 -0
- package/internal/qs/utils.js +234 -0
- package/internal/qs/utils.js.map +1 -0
- package/internal/qs/utils.mjs +222 -0
- package/internal/qs/utils.mjs.map +1 -0
- package/internal/stream-utils.d.ts +8 -0
- package/internal/stream-utils.d.ts.map +1 -0
- package/internal/stream-utils.js +44 -0
- package/internal/stream-utils.js.map +1 -0
- package/internal/stream-utils.mjs +40 -0
- package/internal/stream-utils.mjs.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 +39 -0
- package/internal/utils/query.js.map +1 -0
- package/internal/utils/query.mjs +12 -0
- package/internal/utils/query.mjs.map +1 -0
- package/lib/response-helpers.d.ts +23 -0
- package/lib/response-helpers.d.ts.map +1 -0
- package/lib/response-helpers.js +53 -0
- package/lib/response-helpers.js.map +1 -0
- package/lib/response-helpers.mjs +49 -0
- package/lib/response-helpers.mjs.map +1 -0
- package/ogx-client-0.7.2-rc1.tgz +0 -0
- package/package.json +108 -0
- package/pagination.d.ts +21 -0
- package/pagination.d.ts.map +1 -0
- package/pagination.js +53 -0
- package/pagination.js.map +1 -0
- package/pagination.mjs +47 -0
- package/pagination.mjs.map +1 -0
- package/resource.d.ts +6 -0
- package/resource.d.ts.map +1 -0
- package/resource.js +15 -0
- package/resource.js.map +1 -0
- package/resource.mjs +11 -0
- package/resource.mjs.map +1 -0
- package/resources/alpha/admin.d.ts +44 -0
- package/resources/alpha/admin.d.ts.map +1 -0
- package/resources/alpha/admin.js +49 -0
- package/resources/alpha/admin.js.map +1 -0
- package/resources/alpha/admin.mjs +45 -0
- package/resources/alpha/admin.mjs.map +1 -0
- package/resources/alpha/alpha.d.ts +14 -0
- package/resources/alpha/alpha.d.ts.map +1 -0
- package/resources/alpha/alpha.js +49 -0
- package/resources/alpha/alpha.js.map +1 -0
- package/resources/alpha/alpha.mjs +22 -0
- package/resources/alpha/alpha.mjs.map +1 -0
- package/resources/alpha/benchmarks.d.ts +104 -0
- package/resources/alpha/benchmarks.d.ts.map +1 -0
- package/resources/alpha/benchmarks.js +50 -0
- package/resources/alpha/benchmarks.js.map +1 -0
- package/resources/alpha/benchmarks.mjs +44 -0
- package/resources/alpha/benchmarks.mjs.map +1 -0
- package/resources/alpha/index.d.ts +4 -0
- package/resources/alpha/index.d.ts.map +1 -0
- package/resources/alpha/index.js +17 -0
- package/resources/alpha/index.js.map +1 -0
- package/resources/alpha/index.mjs +11 -0
- package/resources/alpha/index.mjs.map +1 -0
- package/resources/alpha/inference.d.ts +144 -0
- package/resources/alpha/inference.d.ts.map +1 -0
- package/resources/alpha/inference.js +29 -0
- package/resources/alpha/inference.js.map +1 -0
- package/resources/alpha/inference.mjs +25 -0
- package/resources/alpha/inference.mjs.map +1 -0
- package/resources/alpha.d.ts +2 -0
- package/resources/alpha.d.ts.map +1 -0
- package/resources/alpha.js +25 -0
- package/resources/alpha.js.map +1 -0
- package/resources/alpha.mjs +9 -0
- package/resources/alpha.mjs.map +1 -0
- package/resources/batches.d.ts +442 -0
- package/resources/batches.d.ts.map +1 -0
- package/resources/batches.js +53 -0
- package/resources/batches.js.map +1 -0
- package/resources/batches.mjs +48 -0
- package/resources/batches.mjs.map +1 -0
- package/resources/chat/chat.d.ts +276 -0
- package/resources/chat/chat.d.ts.map +1 -0
- package/resources/chat/chat.js +45 -0
- package/resources/chat/chat.js.map +1 -0
- package/resources/chat/chat.mjs +18 -0
- package/resources/chat/chat.mjs.map +1 -0
- package/resources/chat/completions.d.ts +2021 -0
- package/resources/chat/completions.d.ts.map +1 -0
- package/resources/chat/completions.js +39 -0
- package/resources/chat/completions.js.map +1 -0
- package/resources/chat/completions.mjs +35 -0
- package/resources/chat/completions.mjs.map +1 -0
- package/resources/chat/index.d.ts +3 -0
- package/resources/chat/index.d.ts.map +1 -0
- package/resources/chat/index.js +15 -0
- package/resources/chat/index.js.map +1 -0
- package/resources/chat/index.mjs +10 -0
- package/resources/chat/index.mjs.map +1 -0
- package/resources/chat.d.ts +2 -0
- package/resources/chat.d.ts.map +1 -0
- package/resources/chat.js +25 -0
- package/resources/chat.js.map +1 -0
- package/resources/chat.mjs +9 -0
- package/resources/chat.mjs.map +1 -0
- package/resources/completions.d.ts +273 -0
- package/resources/completions.d.ts.map +1 -0
- package/resources/completions.js +26 -0
- package/resources/completions.js.map +1 -0
- package/resources/completions.mjs +22 -0
- package/resources/completions.mjs.map +1 -0
- package/resources/conversations/conversations.d.ts +429 -0
- package/resources/conversations/conversations.d.ts.map +1 -0
- package/resources/conversations/conversations.js +73 -0
- package/resources/conversations/conversations.js.map +1 -0
- package/resources/conversations/conversations.mjs +46 -0
- package/resources/conversations/conversations.mjs.map +1 -0
- package/resources/conversations/index.d.ts +3 -0
- package/resources/conversations/index.d.ts.map +1 -0
- package/resources/conversations/index.js +16 -0
- package/resources/conversations/index.js.map +1 -0
- package/resources/conversations/index.mjs +10 -0
- package/resources/conversations/index.mjs.map +1 -0
- package/resources/conversations/items.d.ts +1408 -0
- package/resources/conversations/items.d.ts.map +1 -0
- package/resources/conversations/items.js +48 -0
- package/resources/conversations/items.js.map +1 -0
- package/resources/conversations/items.mjs +43 -0
- package/resources/conversations/items.mjs.map +1 -0
- package/resources/conversations.d.ts +2 -0
- package/resources/conversations.d.ts.map +1 -0
- package/resources/conversations.js +25 -0
- package/resources/conversations.js.map +1 -0
- package/resources/conversations.mjs +9 -0
- package/resources/conversations.mjs.map +1 -0
- package/resources/embeddings.d.ts +98 -0
- package/resources/embeddings.d.ts.map +1 -0
- package/resources/embeddings.js +30 -0
- package/resources/embeddings.js.map +1 -0
- package/resources/embeddings.mjs +26 -0
- package/resources/embeddings.mjs.map +1 -0
- package/resources/files.d.ts +159 -0
- package/resources/files.d.ts.map +1 -0
- package/resources/files.js +78 -0
- package/resources/files.js.map +1 -0
- package/resources/files.mjs +50 -0
- package/resources/files.mjs.map +1 -0
- package/resources/index.d.ts +20 -0
- package/resources/index.d.ts.map +1 -0
- package/resources/index.js +66 -0
- package/resources/index.js.map +1 -0
- package/resources/index.mjs +27 -0
- package/resources/index.mjs.map +1 -0
- package/resources/inspect.d.ts +17 -0
- package/resources/inspect.d.ts.map +1 -0
- package/resources/inspect.js +30 -0
- package/resources/inspect.js.map +1 -0
- package/resources/inspect.mjs +26 -0
- package/resources/inspect.mjs.map +1 -0
- package/resources/models/index.d.ts +3 -0
- package/resources/models/index.d.ts.map +1 -0
- package/resources/models/index.js +15 -0
- package/resources/models/index.js.map +1 -0
- package/resources/models/index.mjs +10 -0
- package/resources/models/index.mjs.map +1 -0
- package/resources/models/models.d.ts +97 -0
- package/resources/models/models.d.ts.map +1 -0
- package/resources/models/models.js +57 -0
- package/resources/models/models.js.map +1 -0
- package/resources/models/models.mjs +30 -0
- package/resources/models/models.mjs.map +1 -0
- package/resources/models/openai.d.ts +10 -0
- package/resources/models/openai.d.ts.map +1 -0
- package/resources/models/openai.js +21 -0
- package/resources/models/openai.js.map +1 -0
- package/resources/models/openai.mjs +17 -0
- package/resources/models/openai.mjs.map +1 -0
- package/resources/models.d.ts +2 -0
- package/resources/models.d.ts.map +1 -0
- package/resources/models.js +25 -0
- package/resources/models.js.map +1 -0
- package/resources/models.mjs +9 -0
- package/resources/models.mjs.map +1 -0
- package/resources/moderations.d.ts +83 -0
- package/resources/moderations.d.ts.map +1 -0
- package/resources/moderations.js +24 -0
- package/resources/moderations.js.map +1 -0
- package/resources/moderations.mjs +20 -0
- package/resources/moderations.mjs.map +1 -0
- package/resources/prompts/index.d.ts +3 -0
- package/resources/prompts/index.d.ts.map +1 -0
- package/resources/prompts/index.js +15 -0
- package/resources/prompts/index.js.map +1 -0
- package/resources/prompts/index.mjs +10 -0
- package/resources/prompts/index.mjs.map +1 -0
- package/resources/prompts/prompts.d.ts +113 -0
- package/resources/prompts/prompts.d.ts.map +1 -0
- package/resources/prompts/prompts.js +88 -0
- package/resources/prompts/prompts.js.map +1 -0
- package/resources/prompts/prompts.mjs +61 -0
- package/resources/prompts/prompts.mjs.map +1 -0
- package/resources/prompts/versions.d.ts +13 -0
- package/resources/prompts/versions.d.ts.map +1 -0
- package/resources/prompts/versions.js +24 -0
- package/resources/prompts/versions.js.map +1 -0
- package/resources/prompts/versions.mjs +20 -0
- package/resources/prompts/versions.mjs.map +1 -0
- package/resources/prompts.d.ts +2 -0
- package/resources/prompts.d.ts.map +1 -0
- package/resources/prompts.js +25 -0
- package/resources/prompts.js.map +1 -0
- package/resources/prompts.mjs +9 -0
- package/resources/prompts.mjs.map +1 -0
- package/resources/providers.d.ts +24 -0
- package/resources/providers.d.ts.map +1 -0
- package/resources/providers.js +30 -0
- package/resources/providers.js.map +1 -0
- package/resources/providers.mjs +26 -0
- package/resources/providers.mjs.map +1 -0
- package/resources/responses/index.d.ts +3 -0
- package/resources/responses/index.d.ts.map +1 -0
- package/resources/responses/index.js +16 -0
- package/resources/responses/index.js.map +1 -0
- package/resources/responses/index.mjs +10 -0
- package/resources/responses/index.mjs.map +1 -0
- package/resources/responses/input-items.d.ts +382 -0
- package/resources/responses/input-items.d.ts.map +1 -0
- package/resources/responses/input-items.js +25 -0
- package/resources/responses/input-items.js.map +1 -0
- package/resources/responses/input-items.mjs +21 -0
- package/resources/responses/input-items.mjs.map +1 -0
- package/resources/responses/responses.d.ts +4808 -0
- package/resources/responses/responses.d.ts.map +1 -0
- package/resources/responses/responses.js +85 -0
- package/resources/responses/responses.js.map +1 -0
- package/resources/responses/responses.mjs +57 -0
- package/resources/responses/responses.mjs.map +1 -0
- package/resources/responses.d.ts +2 -0
- package/resources/responses.d.ts.map +1 -0
- package/resources/responses.js +25 -0
- package/resources/responses.js.map +1 -0
- package/resources/responses.mjs +9 -0
- package/resources/responses.mjs.map +1 -0
- package/resources/routes.d.ts +30 -0
- package/resources/routes.d.ts.map +1 -0
- package/resources/routes.js +25 -0
- package/resources/routes.js.map +1 -0
- package/resources/routes.mjs +21 -0
- package/resources/routes.mjs.map +1 -0
- package/resources/safety.d.ts +297 -0
- package/resources/safety.d.ts.map +1 -0
- package/resources/safety.js +24 -0
- package/resources/safety.js.map +1 -0
- package/resources/safety.mjs +20 -0
- package/resources/safety.mjs.map +1 -0
- package/resources/shared.d.ts +447 -0
- package/resources/shared.d.ts.map +1 -0
- package/resources/shared.js +10 -0
- package/resources/shared.js.map +1 -0
- package/resources/shared.mjs +9 -0
- package/resources/shared.mjs.map +1 -0
- package/resources/shields.d.ts +82 -0
- package/resources/shields.d.ts.map +1 -0
- package/resources/shields.js +46 -0
- package/resources/shields.js.map +1 -0
- package/resources/shields.mjs +42 -0
- package/resources/shields.mjs.map +1 -0
- package/resources/vector-io.d.ts +375 -0
- package/resources/vector-io.d.ts.map +1 -0
- package/resources/vector-io.js +31 -0
- package/resources/vector-io.js.map +1 -0
- package/resources/vector-io.mjs +27 -0
- package/resources/vector-io.mjs.map +1 -0
- package/resources/vector-stores/file-batches.d.ts +268 -0
- package/resources/vector-stores/file-batches.d.ts.map +1 -0
- package/resources/vector-stores/file-batches.js +42 -0
- package/resources/vector-stores/file-batches.js.map +1 -0
- package/resources/vector-stores/file-batches.mjs +38 -0
- package/resources/vector-stores/file-batches.mjs.map +1 -0
- package/resources/vector-stores/files.d.ts +335 -0
- package/resources/vector-stores/files.d.ts.map +1 -0
- package/resources/vector-stores/files.js +60 -0
- package/resources/vector-stores/files.js.map +1 -0
- package/resources/vector-stores/files.mjs +55 -0
- package/resources/vector-stores/files.mjs.map +1 -0
- package/resources/vector-stores/index.d.ts +4 -0
- package/resources/vector-stores/index.d.ts.map +1 -0
- package/resources/vector-stores/index.js +19 -0
- package/resources/vector-stores/index.js.map +1 -0
- package/resources/vector-stores/index.mjs +11 -0
- package/resources/vector-stores/index.mjs.map +1 -0
- package/resources/vector-stores/vector-stores.d.ts +412 -0
- package/resources/vector-stores/vector-stores.d.ts.map +1 -0
- package/resources/vector-stores/vector-stores.js +92 -0
- package/resources/vector-stores/vector-stores.js.map +1 -0
- package/resources/vector-stores/vector-stores.mjs +64 -0
- package/resources/vector-stores/vector-stores.mjs.map +1 -0
- package/resources/vector-stores.d.ts +2 -0
- package/resources/vector-stores.d.ts.map +1 -0
- package/resources/vector-stores.js +25 -0
- package/resources/vector-stores.js.map +1 -0
- package/resources/vector-stores.mjs +9 -0
- package/resources/vector-stores.mjs.map +1 -0
- package/resources.d.ts +2 -0
- package/resources.d.ts.map +1 -0
- package/resources.js +23 -0
- package/resources.js.map +1 -0
- package/resources.mjs +7 -0
- package/resources.mjs.map +1 -0
- package/shims/node.d.ts +30 -0
- package/shims/node.d.ts.map +1 -0
- package/shims/node.js +36 -0
- package/shims/node.js.map +1 -0
- package/shims/node.mjs +10 -0
- package/shims/node.mjs.map +1 -0
- package/shims/web.d.ts +26 -0
- package/shims/web.d.ts.map +1 -0
- package/shims/web.js +36 -0
- package/shims/web.js.map +1 -0
- package/shims/web.mjs +10 -0
- package/shims/web.mjs.map +1 -0
- package/src/_shims/MultipartBody.ts +15 -0
- package/src/_shims/README.md +46 -0
- package/src/_shims/auto/runtime-bun.ts +10 -0
- package/src/_shims/auto/runtime-node.ts +10 -0
- package/src/_shims/auto/runtime.ts +10 -0
- package/src/_shims/auto/types-node.ts +10 -0
- package/src/_shims/auto/types.d.ts +107 -0
- package/src/_shims/auto/types.js +9 -0
- package/src/_shims/auto/types.mjs +10 -0
- package/src/_shims/bun-runtime.ts +20 -0
- package/src/_shims/index.d.ts +89 -0
- package/src/_shims/index.js +23 -0
- package/src/_shims/index.mjs +18 -0
- package/src/_shims/manual-types.d.ts +18 -0
- package/src/_shims/manual-types.js +9 -0
- package/src/_shims/manual-types.mjs +10 -0
- package/src/_shims/node-runtime.ts +87 -0
- package/src/_shims/node-types.d.ts +48 -0
- package/src/_shims/node-types.js +9 -0
- package/src/_shims/node-types.mjs +10 -0
- package/src/_shims/registry.ts +73 -0
- package/src/_shims/web-runtime.ts +109 -0
- package/src/_shims/web-types.d.ts +89 -0
- package/src/_shims/web-types.js +9 -0
- package/src/_shims/web-types.mjs +10 -0
- package/src/core.ts +1253 -0
- package/src/error.ts +137 -0
- package/src/index.ts +554 -0
- package/src/internal/decoders/line.ts +182 -0
- package/src/internal/qs/LICENSE.md +13 -0
- package/src/internal/qs/README.md +3 -0
- package/src/internal/qs/formats.ts +15 -0
- package/src/internal/qs/index.ts +19 -0
- package/src/internal/qs/stringify.ts +394 -0
- package/src/internal/qs/types.ts +77 -0
- package/src/internal/qs/utils.ts +271 -0
- package/src/internal/stream-utils.ts +38 -0
- package/src/internal/utils/query.ts +13 -0
- package/src/lib/response-helpers.ts +60 -0
- package/src/pagination.ts +80 -0
- package/src/resource.ts +18 -0
- package/src/resources/alpha/admin.ts +87 -0
- package/src/resources/alpha/alpha.ts +31 -0
- package/src/resources/alpha/benchmarks.ts +152 -0
- package/src/resources/alpha/index.ts +11 -0
- package/src/resources/alpha/inference.ts +191 -0
- package/src/resources/alpha.ts +9 -0
- package/src/resources/batches.ts +692 -0
- package/src/resources/chat/chat.ts +351 -0
- package/src/resources/chat/completions.ts +2430 -0
- package/src/resources/chat/index.ts +19 -0
- package/src/resources/chat.ts +9 -0
- package/src/resources/completions.ts +350 -0
- package/src/resources/conversations/conversations.ts +627 -0
- package/src/resources/conversations/index.ts +25 -0
- package/src/resources/conversations/items.ts +2061 -0
- package/src/resources/conversations.ts +9 -0
- package/src/resources/embeddings.ts +130 -0
- package/src/resources/files.ts +225 -0
- package/src/resources/index.ts +104 -0
- package/src/resources/inspect.ts +30 -0
- package/src/resources/models/index.ts +10 -0
- package/src/resources/models/models.ts +133 -0
- package/src/resources/models/openai.ts +20 -0
- package/src/resources/models.ts +9 -0
- package/src/resources/moderations.ts +97 -0
- package/src/resources/prompts/index.ts +19 -0
- package/src/resources/prompts/prompts.ts +188 -0
- package/src/resources/prompts/versions.ts +27 -0
- package/src/resources/prompts.ts +9 -0
- package/src/resources/providers.ts +41 -0
- package/src/resources/responses/index.ts +26 -0
- package/src/resources/responses/input-items.ts +571 -0
- package/src/resources/responses/responses.ts +6718 -0
- package/src/resources/responses.ts +9 -0
- package/src/resources/routes.ts +55 -0
- package/src/resources/safety.ts +367 -0
- package/src/resources/shared.ts +544 -0
- package/src/resources/shields.ts +119 -0
- package/src/resources/vector-io.ts +485 -0
- package/src/resources/vector-stores/file-batches.ts +386 -0
- package/src/resources/vector-stores/files.ts +496 -0
- package/src/resources/vector-stores/index.ts +38 -0
- package/src/resources/vector-stores/vector-stores.ts +588 -0
- package/src/resources/vector-stores.ts +9 -0
- package/src/resources.ts +7 -0
- package/src/shims/node.ts +56 -0
- package/src/shims/web.ts +56 -0
- package/src/streaming.ts +315 -0
- package/src/tsconfig.json +11 -0
- package/src/uploads.ts +261 -0
- package/src/version.ts +7 -0
- package/streaming.d.ts +32 -0
- package/streaming.d.ts.map +1 -0
- package/streaming.js +272 -0
- package/streaming.js.map +1 -0
- package/streaming.mjs +267 -0
- package/streaming.mjs.map +1 -0
- package/uploads.d.ts +75 -0
- package/uploads.d.ts.map +1 -0
- package/uploads.js +176 -0
- package/uploads.js.map +1 -0
- package/uploads.mjs +163 -0
- package/uploads.mjs.map +1 -0
- package/version.d.ts +2 -0
- package/version.d.ts.map +1 -0
- package/version.js +10 -0
- package/version.js.map +1 -0
- package/version.mjs +7 -0
- package/version.mjs.map +1 -0
|
@@ -0,0 +1,447 @@
|
|
|
1
|
+
import * as ProvidersAPI from "./providers.js";
|
|
2
|
+
import * as RoutesAPI from "./routes.js";
|
|
3
|
+
/**
|
|
4
|
+
* Health status information for the service.
|
|
5
|
+
*/
|
|
6
|
+
export interface HealthInfo {
|
|
7
|
+
/**
|
|
8
|
+
* The health status of the service
|
|
9
|
+
*/
|
|
10
|
+
status: 'OK' | 'Error' | 'Not Implemented';
|
|
11
|
+
}
|
|
12
|
+
/**
|
|
13
|
+
* A image content item
|
|
14
|
+
*/
|
|
15
|
+
export type InterleavedContent = string | InterleavedContent.ImageContentItem | InterleavedContent.TextContentItem | Array<InterleavedContent.ImageContentItem | InterleavedContent.TextContentItem>;
|
|
16
|
+
export declare namespace InterleavedContent {
|
|
17
|
+
/**
|
|
18
|
+
* A image content item
|
|
19
|
+
*/
|
|
20
|
+
interface ImageContentItem {
|
|
21
|
+
/**
|
|
22
|
+
* A URL or a base64 encoded string
|
|
23
|
+
*/
|
|
24
|
+
image: ImageContentItem.Image;
|
|
25
|
+
type?: 'image';
|
|
26
|
+
}
|
|
27
|
+
namespace ImageContentItem {
|
|
28
|
+
/**
|
|
29
|
+
* A URL or a base64 encoded string
|
|
30
|
+
*/
|
|
31
|
+
interface Image {
|
|
32
|
+
data?: string | null;
|
|
33
|
+
/**
|
|
34
|
+
* A URL reference to external content.
|
|
35
|
+
*/
|
|
36
|
+
url?: Image.URL | null;
|
|
37
|
+
}
|
|
38
|
+
namespace Image {
|
|
39
|
+
/**
|
|
40
|
+
* A URL reference to external content.
|
|
41
|
+
*/
|
|
42
|
+
interface URL {
|
|
43
|
+
uri: string;
|
|
44
|
+
}
|
|
45
|
+
}
|
|
46
|
+
}
|
|
47
|
+
/**
|
|
48
|
+
* A text content item
|
|
49
|
+
*/
|
|
50
|
+
interface TextContentItem {
|
|
51
|
+
text: string;
|
|
52
|
+
type?: 'text';
|
|
53
|
+
}
|
|
54
|
+
/**
|
|
55
|
+
* A image content item
|
|
56
|
+
*/
|
|
57
|
+
interface ImageContentItem {
|
|
58
|
+
/**
|
|
59
|
+
* A URL or a base64 encoded string
|
|
60
|
+
*/
|
|
61
|
+
image: ImageContentItem.Image;
|
|
62
|
+
type?: 'image';
|
|
63
|
+
}
|
|
64
|
+
namespace ImageContentItem {
|
|
65
|
+
/**
|
|
66
|
+
* A URL or a base64 encoded string
|
|
67
|
+
*/
|
|
68
|
+
interface Image {
|
|
69
|
+
data?: string | null;
|
|
70
|
+
/**
|
|
71
|
+
* A URL reference to external content.
|
|
72
|
+
*/
|
|
73
|
+
url?: Image.URL | null;
|
|
74
|
+
}
|
|
75
|
+
namespace Image {
|
|
76
|
+
/**
|
|
77
|
+
* A URL reference to external content.
|
|
78
|
+
*/
|
|
79
|
+
interface URL {
|
|
80
|
+
uri: string;
|
|
81
|
+
}
|
|
82
|
+
}
|
|
83
|
+
}
|
|
84
|
+
/**
|
|
85
|
+
* A text content item
|
|
86
|
+
*/
|
|
87
|
+
interface TextContentItem {
|
|
88
|
+
text: string;
|
|
89
|
+
type?: 'text';
|
|
90
|
+
}
|
|
91
|
+
}
|
|
92
|
+
/**
|
|
93
|
+
* A image content item
|
|
94
|
+
*/
|
|
95
|
+
export type InterleavedContentItem = InterleavedContentItem.ImageContentItem | InterleavedContentItem.TextContentItem;
|
|
96
|
+
export declare namespace InterleavedContentItem {
|
|
97
|
+
/**
|
|
98
|
+
* A image content item
|
|
99
|
+
*/
|
|
100
|
+
interface ImageContentItem {
|
|
101
|
+
/**
|
|
102
|
+
* A URL or a base64 encoded string
|
|
103
|
+
*/
|
|
104
|
+
image: ImageContentItem.Image;
|
|
105
|
+
type?: 'image';
|
|
106
|
+
}
|
|
107
|
+
namespace ImageContentItem {
|
|
108
|
+
/**
|
|
109
|
+
* A URL or a base64 encoded string
|
|
110
|
+
*/
|
|
111
|
+
interface Image {
|
|
112
|
+
data?: string | null;
|
|
113
|
+
/**
|
|
114
|
+
* A URL reference to external content.
|
|
115
|
+
*/
|
|
116
|
+
url?: Image.URL | null;
|
|
117
|
+
}
|
|
118
|
+
namespace Image {
|
|
119
|
+
/**
|
|
120
|
+
* A URL reference to external content.
|
|
121
|
+
*/
|
|
122
|
+
interface URL {
|
|
123
|
+
uri: string;
|
|
124
|
+
}
|
|
125
|
+
}
|
|
126
|
+
}
|
|
127
|
+
/**
|
|
128
|
+
* A text content item
|
|
129
|
+
*/
|
|
130
|
+
interface TextContentItem {
|
|
131
|
+
text: string;
|
|
132
|
+
type?: 'text';
|
|
133
|
+
}
|
|
134
|
+
}
|
|
135
|
+
/**
|
|
136
|
+
* Response containing a list of all available providers.
|
|
137
|
+
*/
|
|
138
|
+
export interface ListProvidersResponse {
|
|
139
|
+
/**
|
|
140
|
+
* List of provider information objects
|
|
141
|
+
*/
|
|
142
|
+
data: ProvidersAPI.ProviderListResponse;
|
|
143
|
+
}
|
|
144
|
+
/**
|
|
145
|
+
* Response containing a list of all available API routes.
|
|
146
|
+
*/
|
|
147
|
+
export interface ListRoutesResponse {
|
|
148
|
+
/**
|
|
149
|
+
* List of available API routes
|
|
150
|
+
*/
|
|
151
|
+
data: RoutesAPI.RouteListResponse;
|
|
152
|
+
}
|
|
153
|
+
/**
|
|
154
|
+
* Parameter type for string values.
|
|
155
|
+
*/
|
|
156
|
+
export type ParamType = ParamType.StringType | ParamType.NumberType | ParamType.BooleanType | ParamType.ArrayType | ParamType.ObjectType | ParamType.JsonType | ParamType.UnionType | ParamType.ChatCompletionInputType | ParamType.CompletionInputType;
|
|
157
|
+
export declare namespace ParamType {
|
|
158
|
+
/**
|
|
159
|
+
* Parameter type for string values.
|
|
160
|
+
*/
|
|
161
|
+
interface StringType {
|
|
162
|
+
type?: 'string';
|
|
163
|
+
}
|
|
164
|
+
/**
|
|
165
|
+
* Parameter type for numeric values.
|
|
166
|
+
*/
|
|
167
|
+
interface NumberType {
|
|
168
|
+
type?: 'number';
|
|
169
|
+
}
|
|
170
|
+
/**
|
|
171
|
+
* Parameter type for boolean values.
|
|
172
|
+
*/
|
|
173
|
+
interface BooleanType {
|
|
174
|
+
type?: 'boolean';
|
|
175
|
+
}
|
|
176
|
+
/**
|
|
177
|
+
* Parameter type for array values.
|
|
178
|
+
*/
|
|
179
|
+
interface ArrayType {
|
|
180
|
+
type?: 'array';
|
|
181
|
+
}
|
|
182
|
+
/**
|
|
183
|
+
* Parameter type for object values.
|
|
184
|
+
*/
|
|
185
|
+
interface ObjectType {
|
|
186
|
+
type?: 'object';
|
|
187
|
+
}
|
|
188
|
+
/**
|
|
189
|
+
* Parameter type for JSON values.
|
|
190
|
+
*/
|
|
191
|
+
interface JsonType {
|
|
192
|
+
type?: 'json';
|
|
193
|
+
}
|
|
194
|
+
/**
|
|
195
|
+
* Parameter type for union values.
|
|
196
|
+
*/
|
|
197
|
+
interface UnionType {
|
|
198
|
+
type?: 'union';
|
|
199
|
+
}
|
|
200
|
+
/**
|
|
201
|
+
* Parameter type for chat completion input.
|
|
202
|
+
*/
|
|
203
|
+
interface ChatCompletionInputType {
|
|
204
|
+
type?: 'chat_completion_input';
|
|
205
|
+
}
|
|
206
|
+
/**
|
|
207
|
+
* Parameter type for completion input.
|
|
208
|
+
*/
|
|
209
|
+
interface CompletionInputType {
|
|
210
|
+
type?: 'completion_input';
|
|
211
|
+
}
|
|
212
|
+
}
|
|
213
|
+
/**
|
|
214
|
+
* Information about a registered provider including its configuration and health
|
|
215
|
+
* status.
|
|
216
|
+
*/
|
|
217
|
+
export interface ProviderInfo {
|
|
218
|
+
/**
|
|
219
|
+
* The API name this provider implements
|
|
220
|
+
*/
|
|
221
|
+
api: string;
|
|
222
|
+
/**
|
|
223
|
+
* Configuration parameters for the provider
|
|
224
|
+
*/
|
|
225
|
+
config: {
|
|
226
|
+
[key: string]: unknown;
|
|
227
|
+
};
|
|
228
|
+
/**
|
|
229
|
+
* Current health status of the provider
|
|
230
|
+
*/
|
|
231
|
+
health: {
|
|
232
|
+
[key: string]: unknown;
|
|
233
|
+
};
|
|
234
|
+
/**
|
|
235
|
+
* Unique identifier for the provider
|
|
236
|
+
*/
|
|
237
|
+
provider_id: string;
|
|
238
|
+
/**
|
|
239
|
+
* The type of provider implementation
|
|
240
|
+
*/
|
|
241
|
+
provider_type: string;
|
|
242
|
+
}
|
|
243
|
+
/**
|
|
244
|
+
* Information about an API route including its path, method, and implementing
|
|
245
|
+
* providers.
|
|
246
|
+
*/
|
|
247
|
+
export interface RouteInfo {
|
|
248
|
+
/**
|
|
249
|
+
* The HTTP method for the route
|
|
250
|
+
*/
|
|
251
|
+
method: string;
|
|
252
|
+
/**
|
|
253
|
+
* List of provider types implementing this route
|
|
254
|
+
*/
|
|
255
|
+
provider_types: Array<string>;
|
|
256
|
+
/**
|
|
257
|
+
* The API route path
|
|
258
|
+
*/
|
|
259
|
+
route: string;
|
|
260
|
+
}
|
|
261
|
+
/**
|
|
262
|
+
* Details of a safety violation detected by content moderation.
|
|
263
|
+
*/
|
|
264
|
+
export interface SafetyViolation {
|
|
265
|
+
/**
|
|
266
|
+
* Severity level of the violation
|
|
267
|
+
*/
|
|
268
|
+
violation_level: 'info' | 'warn' | 'error';
|
|
269
|
+
/**
|
|
270
|
+
* Additional metadata including specific violation codes
|
|
271
|
+
*/
|
|
272
|
+
metadata?: {
|
|
273
|
+
[key: string]: unknown;
|
|
274
|
+
};
|
|
275
|
+
/**
|
|
276
|
+
* Message to convey to the user about the violation
|
|
277
|
+
*/
|
|
278
|
+
user_message?: string | null;
|
|
279
|
+
}
|
|
280
|
+
/**
|
|
281
|
+
* Sampling parameters for text generation.
|
|
282
|
+
*/
|
|
283
|
+
export interface SamplingParams {
|
|
284
|
+
/**
|
|
285
|
+
* The maximum number of tokens that can be generated in the completion. The token
|
|
286
|
+
* count of your prompt plus max_tokens cannot exceed the model's context length.
|
|
287
|
+
*/
|
|
288
|
+
max_tokens?: number | null;
|
|
289
|
+
/**
|
|
290
|
+
* Number between -2.0 and 2.0. Positive values penalize new tokens based on
|
|
291
|
+
* whether they appear in the text so far.
|
|
292
|
+
*/
|
|
293
|
+
repetition_penalty?: number | null;
|
|
294
|
+
/**
|
|
295
|
+
* Up to 4 sequences where the API will stop generating further tokens. The
|
|
296
|
+
* returned text will not contain the stop sequence.
|
|
297
|
+
*/
|
|
298
|
+
stop?: Array<string> | null;
|
|
299
|
+
/**
|
|
300
|
+
* The sampling strategy to use.
|
|
301
|
+
*/
|
|
302
|
+
strategy?: SamplingParams.GreedySamplingStrategy | SamplingParams.TopPSamplingStrategy | SamplingParams.TopKSamplingStrategy;
|
|
303
|
+
}
|
|
304
|
+
export declare namespace SamplingParams {
|
|
305
|
+
/**
|
|
306
|
+
* Greedy sampling strategy that selects the highest probability token at each
|
|
307
|
+
* step.
|
|
308
|
+
*/
|
|
309
|
+
interface GreedySamplingStrategy {
|
|
310
|
+
/**
|
|
311
|
+
* Must be 'greedy' to identify this sampling strategy.
|
|
312
|
+
*/
|
|
313
|
+
type?: 'greedy';
|
|
314
|
+
}
|
|
315
|
+
/**
|
|
316
|
+
* Top-p (nucleus) sampling strategy that samples from the smallest set of tokens
|
|
317
|
+
* with cumulative probability >= p.
|
|
318
|
+
*/
|
|
319
|
+
interface TopPSamplingStrategy {
|
|
320
|
+
/**
|
|
321
|
+
* Controls randomness in sampling. Higher values increase randomness.
|
|
322
|
+
*/
|
|
323
|
+
temperature: number;
|
|
324
|
+
/**
|
|
325
|
+
* Cumulative probability threshold for nucleus sampling.
|
|
326
|
+
*/
|
|
327
|
+
top_p?: number;
|
|
328
|
+
/**
|
|
329
|
+
* Must be 'top_p' to identify this sampling strategy.
|
|
330
|
+
*/
|
|
331
|
+
type?: 'top_p';
|
|
332
|
+
}
|
|
333
|
+
/**
|
|
334
|
+
* Top-k sampling strategy that restricts sampling to the k most likely tokens.
|
|
335
|
+
*/
|
|
336
|
+
interface TopKSamplingStrategy {
|
|
337
|
+
/**
|
|
338
|
+
* Number of top tokens to consider for sampling. Must be at least 1.
|
|
339
|
+
*/
|
|
340
|
+
top_k: number;
|
|
341
|
+
/**
|
|
342
|
+
* Must be 'top_k' to identify this sampling strategy.
|
|
343
|
+
*/
|
|
344
|
+
type?: 'top_k';
|
|
345
|
+
}
|
|
346
|
+
}
|
|
347
|
+
/**
|
|
348
|
+
* A system message providing instructions or context to the model.
|
|
349
|
+
*/
|
|
350
|
+
export interface SystemMessage {
|
|
351
|
+
/**
|
|
352
|
+
* The content of the 'system prompt'. If multiple system messages are provided,
|
|
353
|
+
* they are concatenated. The underlying OGX code may also add other system
|
|
354
|
+
* messages.
|
|
355
|
+
*/
|
|
356
|
+
content: string | SystemMessage.ImageContentItem | SystemMessage.TextContentItem | Array<SystemMessage.ImageContentItem | SystemMessage.TextContentItem>;
|
|
357
|
+
/**
|
|
358
|
+
* Must be 'system' to identify this as a system message.
|
|
359
|
+
*/
|
|
360
|
+
role?: 'system';
|
|
361
|
+
}
|
|
362
|
+
export declare namespace SystemMessage {
|
|
363
|
+
/**
|
|
364
|
+
* A image content item
|
|
365
|
+
*/
|
|
366
|
+
interface ImageContentItem {
|
|
367
|
+
/**
|
|
368
|
+
* A URL or a base64 encoded string
|
|
369
|
+
*/
|
|
370
|
+
image: ImageContentItem.Image;
|
|
371
|
+
type?: 'image';
|
|
372
|
+
}
|
|
373
|
+
namespace ImageContentItem {
|
|
374
|
+
/**
|
|
375
|
+
* A URL or a base64 encoded string
|
|
376
|
+
*/
|
|
377
|
+
interface Image {
|
|
378
|
+
data?: string | null;
|
|
379
|
+
/**
|
|
380
|
+
* A URL reference to external content.
|
|
381
|
+
*/
|
|
382
|
+
url?: Image.URL | null;
|
|
383
|
+
}
|
|
384
|
+
namespace Image {
|
|
385
|
+
/**
|
|
386
|
+
* A URL reference to external content.
|
|
387
|
+
*/
|
|
388
|
+
interface URL {
|
|
389
|
+
uri: string;
|
|
390
|
+
}
|
|
391
|
+
}
|
|
392
|
+
}
|
|
393
|
+
/**
|
|
394
|
+
* A text content item
|
|
395
|
+
*/
|
|
396
|
+
interface TextContentItem {
|
|
397
|
+
text: string;
|
|
398
|
+
type?: 'text';
|
|
399
|
+
}
|
|
400
|
+
/**
|
|
401
|
+
* A image content item
|
|
402
|
+
*/
|
|
403
|
+
interface ImageContentItem {
|
|
404
|
+
/**
|
|
405
|
+
* A URL or a base64 encoded string
|
|
406
|
+
*/
|
|
407
|
+
image: ImageContentItem.Image;
|
|
408
|
+
type?: 'image';
|
|
409
|
+
}
|
|
410
|
+
namespace ImageContentItem {
|
|
411
|
+
/**
|
|
412
|
+
* A URL or a base64 encoded string
|
|
413
|
+
*/
|
|
414
|
+
interface Image {
|
|
415
|
+
data?: string | null;
|
|
416
|
+
/**
|
|
417
|
+
* A URL reference to external content.
|
|
418
|
+
*/
|
|
419
|
+
url?: Image.URL | null;
|
|
420
|
+
}
|
|
421
|
+
namespace Image {
|
|
422
|
+
/**
|
|
423
|
+
* A URL reference to external content.
|
|
424
|
+
*/
|
|
425
|
+
interface URL {
|
|
426
|
+
uri: string;
|
|
427
|
+
}
|
|
428
|
+
}
|
|
429
|
+
}
|
|
430
|
+
/**
|
|
431
|
+
* A text content item
|
|
432
|
+
*/
|
|
433
|
+
interface TextContentItem {
|
|
434
|
+
text: string;
|
|
435
|
+
type?: 'text';
|
|
436
|
+
}
|
|
437
|
+
}
|
|
438
|
+
/**
|
|
439
|
+
* Version information for the service.
|
|
440
|
+
*/
|
|
441
|
+
export interface VersionInfo {
|
|
442
|
+
/**
|
|
443
|
+
* The version string of the service
|
|
444
|
+
*/
|
|
445
|
+
version: string;
|
|
446
|
+
}
|
|
447
|
+
//# sourceMappingURL=shared.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":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ACF;IAED;;OAEG;IACH,UAAiB,eAAe;QAC9B,IAAI,EAAE,MAAM,CAAC;QAEb,IAAI,CAAC,EAAE,MAAM,CAAC;KACf;CACF;AAED;;GAEG;AACH,MAAM,WAAW,WAAW;IAC1B;;OAEG;IACH,OAAO,EAAE,MAAM,CAAC;CACjB"}
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
// Copyright (c) The OGX Contributors.
|
|
3
|
+
// All rights reserved.
|
|
4
|
+
//
|
|
5
|
+
// This source code is licensed under the terms described in the LICENSE file in
|
|
6
|
+
// the root directory of this source tree.
|
|
7
|
+
//
|
|
8
|
+
// File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
|
|
9
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
10
|
+
//# sourceMappingURL=shared.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"shared.js","sourceRoot":"","sources":["../src/resources/shared.ts"],"names":[],"mappings":";AAAA,sCAAsC;AACtC,uBAAuB;AACvB,EAAE;AACF,gFAAgF;AAChF,0CAA0C;AAC1C,EAAE;AACF,sFAAsF"}
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
// Copyright (c) The OGX Contributors.
|
|
2
|
+
// All rights reserved.
|
|
3
|
+
//
|
|
4
|
+
// This source code is licensed under the terms described in the LICENSE file in
|
|
5
|
+
// the root directory of this source tree.
|
|
6
|
+
//
|
|
7
|
+
// File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
|
|
8
|
+
export {};
|
|
9
|
+
//# sourceMappingURL=shared.mjs.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"shared.mjs","sourceRoot":"","sources":["../src/resources/shared.ts"],"names":[],"mappings":"AAAA,sCAAsC;AACtC,uBAAuB;AACvB,EAAE;AACF,gFAAgF;AAChF,0CAA0C;AAC1C,EAAE;AACF,sFAAsF"}
|
|
@@ -0,0 +1,82 @@
|
|
|
1
|
+
import { APIResource } from "../resource.js";
|
|
2
|
+
import * as Core from "../core.js";
|
|
3
|
+
export declare class Shields extends APIResource {
|
|
4
|
+
/**
|
|
5
|
+
* Get a shield by its identifier.
|
|
6
|
+
*/
|
|
7
|
+
retrieve(identifier: string, options?: Core.RequestOptions): Core.APIPromise<Shield>;
|
|
8
|
+
/**
|
|
9
|
+
* List all shields.
|
|
10
|
+
*/
|
|
11
|
+
list(options?: Core.RequestOptions): Core.APIPromise<ShieldListResponse>;
|
|
12
|
+
/**
|
|
13
|
+
* Unregister a shield.
|
|
14
|
+
*
|
|
15
|
+
* @deprecated
|
|
16
|
+
*/
|
|
17
|
+
delete(identifier: string, options?: Core.RequestOptions): Core.APIPromise<void>;
|
|
18
|
+
/**
|
|
19
|
+
* Register a shield.
|
|
20
|
+
*
|
|
21
|
+
* @deprecated
|
|
22
|
+
*/
|
|
23
|
+
register(body: ShieldRegisterParams, options?: Core.RequestOptions): Core.APIPromise<Shield>;
|
|
24
|
+
}
|
|
25
|
+
/**
|
|
26
|
+
* Response containing a list of all shields.
|
|
27
|
+
*/
|
|
28
|
+
export interface ListShieldsResponse {
|
|
29
|
+
/**
|
|
30
|
+
* List of shield objects
|
|
31
|
+
*/
|
|
32
|
+
data: ShieldListResponse;
|
|
33
|
+
}
|
|
34
|
+
/**
|
|
35
|
+
* A safety shield resource that can be used to check content.
|
|
36
|
+
*/
|
|
37
|
+
export interface Shield {
|
|
38
|
+
/**
|
|
39
|
+
* Unique identifier for this resource in ogx
|
|
40
|
+
*/
|
|
41
|
+
identifier: string;
|
|
42
|
+
/**
|
|
43
|
+
* ID of the provider that owns this resource
|
|
44
|
+
*/
|
|
45
|
+
provider_id: string;
|
|
46
|
+
params?: {
|
|
47
|
+
[key: string]: unknown;
|
|
48
|
+
} | null;
|
|
49
|
+
/**
|
|
50
|
+
* Unique identifier for this resource in the provider
|
|
51
|
+
*/
|
|
52
|
+
provider_resource_id?: string | null;
|
|
53
|
+
type?: 'shield';
|
|
54
|
+
}
|
|
55
|
+
/**
|
|
56
|
+
* List of shield objects
|
|
57
|
+
*/
|
|
58
|
+
export type ShieldListResponse = Array<Shield>;
|
|
59
|
+
export interface ShieldRegisterParams {
|
|
60
|
+
/**
|
|
61
|
+
* The identifier of the shield to register.
|
|
62
|
+
*/
|
|
63
|
+
shield_id: string;
|
|
64
|
+
/**
|
|
65
|
+
* The parameters of the shield.
|
|
66
|
+
*/
|
|
67
|
+
params?: {
|
|
68
|
+
[key: string]: unknown;
|
|
69
|
+
} | null;
|
|
70
|
+
/**
|
|
71
|
+
* The identifier of the provider.
|
|
72
|
+
*/
|
|
73
|
+
provider_id?: string | null;
|
|
74
|
+
/**
|
|
75
|
+
* The identifier of the shield in the provider.
|
|
76
|
+
*/
|
|
77
|
+
provider_shield_id?: string | null;
|
|
78
|
+
}
|
|
79
|
+
export declare namespace Shields {
|
|
80
|
+
export { type ListShieldsResponse as ListShieldsResponse, type Shield as Shield, type ShieldListResponse as ShieldListResponse, type ShieldRegisterParams as ShieldRegisterParams, };
|
|
81
|
+
}
|
|
82
|
+
//# sourceMappingURL=shields.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"shields.d.ts","sourceRoot":"","sources":["../src/resources/shields.ts"],"names":[],"mappings":"AAQA,OAAO,EAAE,WAAW,EAAE,MAAM,aAAa,CAAC;AAC1C,OAAO,KAAK,IAAI,MAAM,SAAS,CAAC;AAEhC,qBAAa,OAAQ,SAAQ,WAAW;IACtC;;OAEG;IACH,QAAQ,CAAC,UAAU,EAAE,MAAM,EAAE,OAAO,CAAC,EAAE,IAAI,CAAC,cAAc,GAAG,IAAI,CAAC,UAAU,CAAC,MAAM,CAAC;IAIpF;;OAEG;IACH,IAAI,CAAC,OAAO,CAAC,EAAE,IAAI,CAAC,cAAc,GAAG,IAAI,CAAC,UAAU,CAAC,kBAAkB,CAAC;IAMxE;;;;OAIG;IACH,MAAM,CAAC,UAAU,EAAE,MAAM,EAAE,OA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
@@ -0,0 +1,46 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
// Copyright (c) The OGX Contributors.
|
|
3
|
+
// All rights reserved.
|
|
4
|
+
//
|
|
5
|
+
// This source code is licensed under the terms described in the LICENSE file in
|
|
6
|
+
// the root directory of this source tree.
|
|
7
|
+
//
|
|
8
|
+
// File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
|
|
9
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
10
|
+
exports.Shields = void 0;
|
|
11
|
+
const resource_1 = require("../resource.js");
|
|
12
|
+
class Shields extends resource_1.APIResource {
|
|
13
|
+
/**
|
|
14
|
+
* Get a shield by its identifier.
|
|
15
|
+
*/
|
|
16
|
+
retrieve(identifier, options) {
|
|
17
|
+
return this._client.get(`/v1/shields/${identifier}`, options);
|
|
18
|
+
}
|
|
19
|
+
/**
|
|
20
|
+
* List all shields.
|
|
21
|
+
*/
|
|
22
|
+
list(options) {
|
|
23
|
+
return this._client.get('/v1/shields', options)._thenUnwrap((obj) => obj.data);
|
|
24
|
+
}
|
|
25
|
+
/**
|
|
26
|
+
* Unregister a shield.
|
|
27
|
+
*
|
|
28
|
+
* @deprecated
|
|
29
|
+
*/
|
|
30
|
+
delete(identifier, options) {
|
|
31
|
+
return this._client.delete(`/v1/shields/${identifier}`, {
|
|
32
|
+
...options,
|
|
33
|
+
headers: { Accept: '*/*', ...options?.headers },
|
|
34
|
+
});
|
|
35
|
+
}
|
|
36
|
+
/**
|
|
37
|
+
* Register a shield.
|
|
38
|
+
*
|
|
39
|
+
* @deprecated
|
|
40
|
+
*/
|
|
41
|
+
register(body, options) {
|
|
42
|
+
return this._client.post('/v1/shields', { body, ...options });
|
|
43
|
+
}
|
|
44
|
+
}
|
|
45
|
+
exports.Shields = Shields;
|
|
46
|
+
//# sourceMappingURL=shields.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"shields.js","sourceRoot":"","sources":["../src/resources/shields.ts"],"names":[],"mappings":";AAAA,sCAAsC;AACtC,uBAAuB;AACvB,EAAE;AACF,gFAAgF;AAChF,0CAA0C;AAC1C,EAAE;AACF,sFAAsF;;;AAEtF,6CAA0C;AAG1C,MAAa,OAAQ,SAAQ,sBAAW;IACtC;;OAEG;IACH,QAAQ,CAAC,UAAkB,EAAE,OAA6B;QACxD,OAAO,IAAI,CAAC,OAAO,CAAC,GAAG,CAAC,eAAe,UAAU,EAAE,EAAE,OAAO,CAAC,CAAC;IAChE,CAAC;IAED;;OAEG;IACH,IAAI,CAAC,OAA6B;QAChC,OACE,IAAI,CAAC,OAAO,CAAC,GAAG,CAAC,aAAa,EAAE,OAAO,CACxC,CAAC,WAAW,CAAC,CAAC,GAAG,EAAE,EAAE,CAAC,GAAG,CAAC,IAAI,CAAC,CAAC;IACnC,CAAC;IAED;;;;OAIG;IACH,MAAM,CAAC,UAAkB,EAAE,OAA6B;QACtD,OAAO,IAAI,CAAC,OAAO,CAAC,MAAM,CAAC,eAAe,UAAU,EAAE,EAAE;YACtD,GAAG,OAAO;YACV,OAAO,EAAE,EAAE,MAAM,EAAE,KAAK,EAAE,GAAG,OAAO,EAAE,OAAO,EAAE;SAChD,CAAC,CAAC;IACL,CAAC;IAED;;;;OAIG;IACH,QAAQ,CAAC,IAA0B,EAAE,OAA6B;QAChE,OAAO,IAAI,CAAC,OAAO,CAAC,IAAI,CAAC,aAAa,EAAE,EAAE,IAAI,EAAE,GAAG,OAAO,EAAE,CAAC,CAAC;IAChE,CAAC;CACF;AArCD,0BAqCC"}
|
|
@@ -0,0 +1,42 @@
|
|
|
1
|
+
// Copyright (c) The OGX Contributors.
|
|
2
|
+
// All rights reserved.
|
|
3
|
+
//
|
|
4
|
+
// This source code is licensed under the terms described in the LICENSE file in
|
|
5
|
+
// the root directory of this source tree.
|
|
6
|
+
//
|
|
7
|
+
// File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
|
|
8
|
+
import { APIResource } from "../resource.mjs";
|
|
9
|
+
export class Shields extends APIResource {
|
|
10
|
+
/**
|
|
11
|
+
* Get a shield by its identifier.
|
|
12
|
+
*/
|
|
13
|
+
retrieve(identifier, options) {
|
|
14
|
+
return this._client.get(`/v1/shields/${identifier}`, options);
|
|
15
|
+
}
|
|
16
|
+
/**
|
|
17
|
+
* List all shields.
|
|
18
|
+
*/
|
|
19
|
+
list(options) {
|
|
20
|
+
return this._client.get('/v1/shields', options)._thenUnwrap((obj) => obj.data);
|
|
21
|
+
}
|
|
22
|
+
/**
|
|
23
|
+
* Unregister a shield.
|
|
24
|
+
*
|
|
25
|
+
* @deprecated
|
|
26
|
+
*/
|
|
27
|
+
delete(identifier, options) {
|
|
28
|
+
return this._client.delete(`/v1/shields/${identifier}`, {
|
|
29
|
+
...options,
|
|
30
|
+
headers: { Accept: '*/*', ...options?.headers },
|
|
31
|
+
});
|
|
32
|
+
}
|
|
33
|
+
/**
|
|
34
|
+
* Register a shield.
|
|
35
|
+
*
|
|
36
|
+
* @deprecated
|
|
37
|
+
*/
|
|
38
|
+
register(body, options) {
|
|
39
|
+
return this._client.post('/v1/shields', { body, ...options });
|
|
40
|
+
}
|
|
41
|
+
}
|
|
42
|
+
//# sourceMappingURL=shields.mjs.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"shields.mjs","sourceRoot":"","sources":["../src/resources/shields.ts"],"names":[],"mappings":"AAAA,sCAAsC;AACtC,uBAAuB;AACvB,EAAE;AACF,gFAAgF;AAChF,0CAA0C;AAC1C,EAAE;AACF,sFAAsF;OAE/E,EAAE,WAAW,EAAE;AAGtB,MAAM,OAAO,OAAQ,SAAQ,WAAW;IACtC;;OAEG;IACH,QAAQ,CAAC,UAAkB,EAAE,OAA6B;QACxD,OAAO,IAAI,CAAC,OAAO,CAAC,GAAG,CAAC,eAAe,UAAU,EAAE,EAAE,OAAO,CAAC,CAAC;IAChE,CAAC;IAED;;OAEG;IACH,IAAI,CAAC,OAA6B;QAChC,OACE,IAAI,CAAC,OAAO,CAAC,GAAG,CAAC,aAAa,EAAE,OAAO,CACxC,CAAC,WAAW,CAAC,CAAC,GAAG,EAAE,EAAE,CAAC,GAAG,CAAC,IAAI,CAAC,CAAC;IACnC,CAAC;IAED;;;;OAIG;IACH,MAAM,CAAC,UAAkB,EAAE,OAA6B;QACtD,OAAO,IAAI,CAAC,OAAO,CAAC,MAAM,CAAC,eAAe,UAAU,EAAE,EAAE;YACtD,GAAG,OAAO;YACV,OAAO,EAAE,EAAE,MAAM,EAAE,KAAK,EAAE,GAAG,OAAO,EAAE,OAAO,EAAE;SAChD,CAAC,CAAC;IACL,CAAC;IAED;;;;OAIG;IACH,QAAQ,CAAC,IAA0B,EAAE,OAA6B;QAChE,OAAO,IAAI,CAAC,OAAO,CAAC,IAAI,CAAC,aAAa,EAAE,EAAE,IAAI,EAAE,GAAG,OAAO,EAAE,CAAC,CAAC;IAChE,CAAC;CACF"}
|