diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index b1f175a9..91198208 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -1,12 +1,14 @@ name: CI on: push: - branches-ignore: - - 'generated' - - 'codegen/**' - - 'integrated/**' - - 'stl-preview-head/**' - - 'stl-preview-base/**' + branches: + - '**' + - '!integrated/**' + - '!stl-preview-head/**' + - '!stl-preview-base/**' + - '!generated' + - '!codegen/**' + - 'codegen/stl/**' pull_request: branches-ignore: - 'stl-preview-head/**' @@ -17,9 +19,9 @@ jobs: timeout-minutes: 10 name: lint runs-on: ${{ github.repository == 'stainless-sdks/gradient-typescript' && 'depot-ubuntu-24.04' || 'ubuntu-latest' }} - if: github.event_name == 'push' || github.event.pull_request.head.repo.fork + if: (github.event_name == 'push' || github.event.pull_request.head.repo.fork) && (github.event_name != 'push' || github.event.head_commit.message != 'codegen metadata') steps: - - uses: actions/checkout@v4 + - uses: actions/checkout@v6 - name: Set up Node uses: actions/setup-node@v5 @@ -36,12 +38,12 @@ jobs: timeout-minutes: 5 name: build runs-on: ${{ github.repository == 'stainless-sdks/gradient-typescript' && 'depot-ubuntu-24.04' || 'ubuntu-latest' }} - if: github.event_name == 'push' || github.event.pull_request.head.repo.fork + if: (github.event_name == 'push' || github.event.pull_request.head.repo.fork) && (github.event_name != 'push' || github.event.head_commit.message != 'codegen metadata') permissions: contents: read id-token: write steps: - - uses: actions/checkout@v4 + - uses: actions/checkout@v6 - name: Set up Node uses: actions/setup-node@v5 @@ -55,14 +57,18 @@ jobs: run: ./scripts/build - name: Get GitHub OIDC Token - if: github.repository == 'stainless-sdks/gradient-typescript' + if: |- + github.repository == 'stainless-sdks/gradient-typescript' && + !startsWith(github.ref, 'refs/heads/stl/') id: github-oidc uses: actions/github-script@v8 with: script: core.setOutput('github_token', await core.getIDToken()); - name: Upload tarball - if: github.repository == 'stainless-sdks/gradient-typescript' + if: |- + github.repository == 'stainless-sdks/gradient-typescript' && + !startsWith(github.ref, 'refs/heads/stl/') env: URL: https://pkg.stainless.com/s AUTH: ${{ steps.github-oidc.outputs.github_token }} @@ -74,7 +80,7 @@ jobs: runs-on: ${{ github.repository == 'stainless-sdks/gradient-typescript' && 'depot-ubuntu-24.04' || 'ubuntu-latest' }} if: github.event_name == 'push' || github.event.pull_request.head.repo.fork steps: - - uses: actions/checkout@v4 + - uses: actions/checkout@v6 - name: Set up Node uses: actions/setup-node@v5 diff --git a/.github/workflows/publish-npm.yml b/.github/workflows/publish-npm.yml index 7c858cfe..6e32ea39 100644 --- a/.github/workflows/publish-npm.yml +++ b/.github/workflows/publish-npm.yml @@ -14,7 +14,7 @@ jobs: runs-on: ubuntu-latest steps: - - uses: actions/checkout@v4 + - uses: actions/checkout@v6 - name: Set up Node uses: actions/setup-node@v3 diff --git a/.github/workflows/release-doctor.yml b/.github/workflows/release-doctor.yml index 9f2310f7..2937e584 100644 --- a/.github/workflows/release-doctor.yml +++ b/.github/workflows/release-doctor.yml @@ -12,7 +12,7 @@ jobs: if: github.repository == 'digitalocean/gradient-typescript' && (github.event_name == 'push' || github.event_name == 'workflow_dispatch' || startsWith(github.head_ref, 'release-please') || github.head_ref == 'next') steps: - - uses: actions/checkout@v4 + - uses: actions/checkout@v6 - name: Check release environment run: | diff --git a/.gitignore b/.gitignore index b6c67468..55936924 100644 --- a/.gitignore +++ b/.gitignore @@ -1,4 +1,5 @@ .prism.log +.stdy.log node_modules yarn-error.log codegen.log diff --git a/.release-please-manifest.json b/.release-please-manifest.json index c5e8a3ed..17473a20 100644 --- a/.release-please-manifest.json +++ b/.release-please-manifest.json @@ -1,3 +1,3 @@ { - ".": "0.1.0-alpha.2" + ".": "0.1.0-alpha.3" } diff --git a/.stats.yml b/.stats.yml index af483f0a..58ad35ae 100644 --- a/.stats.yml +++ b/.stats.yml @@ -1,4 +1,4 @@ -configured_endpoints: 175 -openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/digitalocean%2Fgradient-cb3bf9b21459cad24410206c27a32fd31ef6cf86711700597549dbbd0d634002.yml -openapi_spec_hash: 6a9149a81ba15e7c5c5c1f4d77daad92 -config_hash: bad49c3bf949d5168ec3896bedff253a +configured_endpoints: 193 +openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/digitalocean%2Fgradient-8e914ac57f864a395f0c0c4635603cfbbe8fc5daa8bf6b8427f1ed95fd9d4277.yml +openapi_spec_hash: f1faf4e4e0fc37e518fe55ff7c01086d +config_hash: 244791562e694cfcd3514c0bb917057a diff --git a/CHANGELOG.md b/CHANGELOG.md index 2178147d..7a6b87cc 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,5 +1,74 @@ # Changelog +## 0.1.0-alpha.3 (2026-07-29) + +Full Changelog: [v0.1.0-alpha.2...v0.1.0-alpha.3](https://github.com/digitalocean/gradient-typescript/compare/v0.1.0-alpha.2...v0.1.0-alpha.3) + +### Features + +* add waitForAgentReady helper for agent deployment polling ([#9](https://github.com/digitalocean/gradient-typescript/issues/9)) ([48a9366](https://github.com/digitalocean/gradient-typescript/commit/48a9366dbb8879bb6a4be7b59a6bba26840d50d9)) +* **api:** include indexing jobs ([9b9f776](https://github.com/digitalocean/gradient-typescript/commit/9b9f776c88182c0c26fbc92dc3085f96250675c7)) +* **api:** manual updates ([5618f39](https://github.com/digitalocean/gradient-typescript/commit/5618f394ab5a374946cb1dd9349693863209a12b)) +* **api:** manual updates ([06dce24](https://github.com/digitalocean/gradient-typescript/commit/06dce245c0aebeea23e8a36e1cec7fc8810bcc89)) +* **api:** manual updates ([f1902bc](https://github.com/digitalocean/gradient-typescript/commit/f1902bc99ef0f8cb35914720c54e0ccee1ead5c1)) +* **api:** remove inf endpoint env ([6c3a74a](https://github.com/digitalocean/gradient-typescript/commit/6c3a74ac681c92b30b4c07bfc4a43f730a6a6373)) +* **api:** responses ([b07a208](https://github.com/digitalocean/gradient-typescript/commit/b07a208fc60c300d84e52b8e25b1613a50a9688a)) +* **api:** update urls for endpoints ([5160e2a](https://github.com/digitalocean/gradient-typescript/commit/5160e2ab9e4fefb2fa871843b38ac5247638e2c8)) +* knowledge base indexing poller ([#14](https://github.com/digitalocean/gradient-typescript/issues/14)) ([04e35f0](https://github.com/digitalocean/gradient-typescript/commit/04e35f0553c622fe33b422f611bb7f1592346510)) +* **knowledge-bases:** add waitForDatabase polling helper ([#8](https://github.com/digitalocean/gradient-typescript/issues/8)) ([12d1af3](https://github.com/digitalocean/gradient-typescript/commit/12d1af3c82962f420eef7160b8ac043aa96087f7)) + + +### Bug Fixes + +* **client:** avoid memory leak with abort signals ([ca552af](https://github.com/digitalocean/gradient-typescript/commit/ca552afb6f448731169e822608f8fb6a29325340)) +* **client:** avoid removing abort listener too early ([82b3689](https://github.com/digitalocean/gradient-typescript/commit/82b3689c13fc60009c9ff3c40b5cc3c4c800c5db)) +* **client:** improve parameter names ([d7270e4](https://github.com/digitalocean/gradient-typescript/commit/d7270e4e4a29b458daa5d7eceb5b640aff9a5ffe)) +* **docs/contributing:** correct pnpm link command ([a17c344](https://github.com/digitalocean/gradient-typescript/commit/a17c344075b2a92c102990fb4137e591239256bf)) +* **docs:** remove extraneous example object fields ([1eaa98c](https://github.com/digitalocean/gradient-typescript/commit/1eaa98c75d63934e5c3f16c4b021d7ff9958f399)) +* **internal:** set inference endpoint URL ([2611294](https://github.com/digitalocean/gradient-typescript/commit/2611294c68d30b23488b1d2290dc64515c05a48f)) +* **internal:** update default chat completions endpoint ([49a0a0c](https://github.com/digitalocean/gradient-typescript/commit/49a0a0c0f8895b3235da1378d01476e63b74812e)) +* **mcp:** correct code tool API endpoint ([630724d](https://github.com/digitalocean/gradient-typescript/commit/630724ddaea98da99a14cb42b0475378057a35a0)) +* **mcp:** return correct lines on typescript errors ([c35d0f7](https://github.com/digitalocean/gradient-typescript/commit/c35d0f71ac4bf58c702ea6a31a2cfe5a0d5126c3)) + + +### Chores + +* break long lines in snippets into multiline ([7d854f0](https://github.com/digitalocean/gradient-typescript/commit/7d854f0a63467bd8701d4e8ff8991ecfd0c330fd)) +* **ci:** skip lint on metadata-only changes ([1450f0a](https://github.com/digitalocean/gradient-typescript/commit/1450f0a819e7050550559ecf8ccd3e1d86876990)) +* **client:** do not parse responses with empty content-length ([b769165](https://github.com/digitalocean/gradient-typescript/commit/b769165fd73b45a53893c390a159018ddaa6bd1f)) +* **client:** fix logger property type ([ba0b91b](https://github.com/digitalocean/gradient-typescript/commit/ba0b91b64e8b5e86014ef7d9a21e7c55c0459eaa)) +* **client:** restructure abort controller binding ([ab12908](https://github.com/digitalocean/gradient-typescript/commit/ab12908cb196ae8d67415c506f2d222ac42fb42a)) +* fix typo in descriptions ([3013c92](https://github.com/digitalocean/gradient-typescript/commit/3013c9222ef4602cfe55ee7b7a677059375cb89c)) +* **formatter:** run prettier and eslint separately ([ecf993c](https://github.com/digitalocean/gradient-typescript/commit/ecf993cea0b0f17d269a9bb6c89b68b4764d8031)) +* formatting fixes ([b2388ec](https://github.com/digitalocean/gradient-typescript/commit/b2388ec757d21bdb00365969af5b083ae1e574b0)) +* **internal/client:** fix form-urlencoded requests ([ff211a6](https://github.com/digitalocean/gradient-typescript/commit/ff211a6b9444f7cb9c50ca3438ed1d201e3dcd14)) +* **internal:** avoid type checking errors with ts-reset ([e8fe038](https://github.com/digitalocean/gradient-typescript/commit/e8fe038c8b5fe1df4d8dbd480266eb43ae50cd1e)) +* **internal:** codegen related update ([29f7706](https://github.com/digitalocean/gradient-typescript/commit/29f7706a099d2158e096d7f89516fe0622dd8b5a)) +* **internal:** codegen related update ([200759f](https://github.com/digitalocean/gradient-typescript/commit/200759f7bb6b792f6ce1f669f2c9ea87f5558a80)) +* **internal:** codegen related update ([faaff42](https://github.com/digitalocean/gradient-typescript/commit/faaff427fd6d74899742c237b40b2a29f3c5c55a)) +* **internal:** codegen related update ([34d9a70](https://github.com/digitalocean/gradient-typescript/commit/34d9a7043b1aa3b37b388ba9d19f8eac514e7704)) +* **internal:** codegen related update ([600003a](https://github.com/digitalocean/gradient-typescript/commit/600003a3eb5f04dc56ec1b3248a6b9474b9abfae)) +* **internal:** codegen related update ([1ca1124](https://github.com/digitalocean/gradient-typescript/commit/1ca11248647b73d08bb9ddea00ff441a078d6342)) +* **internal:** codegen related update ([dbb66cf](https://github.com/digitalocean/gradient-typescript/commit/dbb66cf1059261dab15c7b296bee93876ea7cf36)) +* **internal:** codegen related update ([0d19438](https://github.com/digitalocean/gradient-typescript/commit/0d194383fd46a6bdb17fc56bd9458e2fe4164ac2)) +* **internal:** improve import alias names ([b385dcf](https://github.com/digitalocean/gradient-typescript/commit/b385dcf68e3b5c7ffc3103abd8d8e9d5dda71100)) +* **internal:** more robust bootstrap script ([ef7a88b](https://github.com/digitalocean/gradient-typescript/commit/ef7a88bd36f4b3abafd9f93e6ca7ffea96ae7bb9)) +* **internal:** move stringifyQuery implementation to internal function ([5042cb3](https://github.com/digitalocean/gradient-typescript/commit/5042cb353be22f28f0f41c4e5bafc946f0c27efb)) +* **internal:** remove mock server code ([caa3b9a](https://github.com/digitalocean/gradient-typescript/commit/caa3b9a9fc7cde0ef52d91aba6cbf4d255bb5a6d)) +* **internal:** tweak CI branches ([e1e13d1](https://github.com/digitalocean/gradient-typescript/commit/e1e13d11bb8087d98c0a0e6426313af3f2cab103)) +* **internal:** update `actions/checkout` version ([4443a16](https://github.com/digitalocean/gradient-typescript/commit/4443a167ef1f8fdaf6996583373387e5a9bae6d0)) +* **internal:** update dependencies to address dependabot vulnerabilities ([6728544](https://github.com/digitalocean/gradient-typescript/commit/6728544dea74c0968bbb365370a4740dbb603732)) +* **internal:** update gitignore ([f13993e](https://github.com/digitalocean/gradient-typescript/commit/f13993eb0c665e03a04898978ef33cc11802e6f3)) +* **internal:** upgrade babel, qs, js-yaml ([44e9f8e](https://github.com/digitalocean/gradient-typescript/commit/44e9f8e1d12b9281aa972b9f9c5fefe3c6b20eb7)) +* **internal:** upgrade eslint ([dda1ff1](https://github.com/digitalocean/gradient-typescript/commit/dda1ff112b3dd01e58718a8c52e5e30a6cc7aa97)) +* **mcp-server:** improve instructions ([05f9c0b](https://github.com/digitalocean/gradient-typescript/commit/05f9c0bf787dd80801e43622b9a02376d7cbcf4f)) +* update mock server docs ([026c664](https://github.com/digitalocean/gradient-typescript/commit/026c664dcedc9fc52ab8d49f469b52d88f54622a)) + + +### Refactors + +* normalize wait-for implementations ([#20](https://github.com/digitalocean/gradient-typescript/issues/20)) ([30419d1](https://github.com/digitalocean/gradient-typescript/commit/30419d1f1b238a5d2fcb4720c9599c66daa78ce9)) + ## 0.1.0-alpha.2 (2025-10-16) Full Changelog: [v0.1.0-alpha.1...v0.1.0-alpha.2](https://github.com/digitalocean/gradient-typescript/compare/v0.1.0-alpha.1...v0.1.0-alpha.2) diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md index e7739f99..95c3e3e1 100644 --- a/CONTRIBUTING.md +++ b/CONTRIBUTING.md @@ -60,17 +60,11 @@ $ yarn link @digitalocean/gradient # With pnpm $ pnpm link --global $ cd ../my-package -$ pnpm link -—global @digitalocean/gradient +$ pnpm link --global @digitalocean/gradient ``` ## Running tests -Most tests require you to [set up a mock server](https://github.com/stoplightio/prism) against the OpenAPI spec to run the tests. - -```sh -$ npx prism mock path/to/your/openapi.yml -``` - ```sh $ yarn run test ``` diff --git a/LICENSE b/LICENSE index 5ab1db50..01d7d929 100644 --- a/LICENSE +++ b/LICENSE @@ -186,7 +186,7 @@ same "printed page" as the copyright notice for easier identification within third-party archives. - Copyright 2025 DigitalOcean, LLC + Copyright 2026 DigitalOcean, LLC Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/README.md b/README.md index 1855fc05..23050a47 100644 --- a/README.md +++ b/README.md @@ -84,7 +84,9 @@ const params: Gradient.Chat.CompletionCreateParams = { messages: [{ role: 'user', content: 'What is the capital of France?' }], model: 'llama3.3-70b-instruct', }; -const completion: Gradient.Chat.CompletionCreateResponse = await client.chat.completions.create(params); +const completion: Gradient.Chat.CompletionCreateResponse = await client.chat.completions.create( + params, +); ``` Documentation for each method, request param, and response field are available in docstrings and will appear on hover in most modern editors. diff --git a/api.md b/api.md index 2b128885..ba5588f5 100644 --- a/api.md +++ b/api.md @@ -10,6 +10,8 @@ Types: - ChatCompletionChunk - ChatCompletionTokenLogprob - CompletionUsage +- CreateResponseResponse +- CreateResponseStreamResponse - DiskInfo - Droplet - DropletNextBackupWindow @@ -57,11 +59,11 @@ Methods: - client.agents.create({ ...params }) -> AgentCreateResponse - client.agents.retrieve(uuid) -> AgentRetrieveResponse -- client.agents.update(pathUuid, { ...params }) -> AgentUpdateResponse +- client.agents.update(uuid, { ...params }) -> AgentUpdateResponse - client.agents.list({ ...params }) -> AgentListResponse - client.agents.delete(uuid) -> AgentDeleteResponse - client.agents.retrieveUsage(uuid, { ...params }) -> AgentRetrieveUsageResponse -- client.agents.updateStatus(pathUuid, { ...params }) -> AgentUpdateStatusResponse +- client.agents.updateStatus(uuid, { ...params }) -> AgentUpdateStatusResponse ## APIKeys @@ -137,16 +139,6 @@ Methods: - client.agents.evaluationMetrics.workspaces.agents.list(workspaceUuid, { ...params }) -> AgentListResponse - client.agents.evaluationMetrics.workspaces.agents.move(workspaceUuid, { ...params }) -> AgentMoveResponse -### Models - -Types: - -- ModelListResponse - -Methods: - -- client.agents.evaluationMetrics.models.list({ ...params }) -> ModelListResponse - ### Anthropic #### Keys @@ -211,6 +203,20 @@ Methods: - client.agents.evaluationMetrics.oauth2.dropbox.createTokens({ ...params }) -> DropboxCreateTokensResponse +### ScheduledIndexing + +Types: + +- ScheduledIndexingCreateResponse +- ScheduledIndexingRetrieveResponse +- ScheduledIndexingDeleteResponse + +Methods: + +- client.agents.evaluationMetrics.scheduledIndexing.create({ ...params }) -> ScheduledIndexingCreateResponse +- client.agents.evaluationMetrics.scheduledIndexing.retrieve(knowledgeBaseUuid) -> ScheduledIndexingRetrieveResponse +- client.agents.evaluationMetrics.scheduledIndexing.delete(uuid) -> ScheduledIndexingDeleteResponse + ## EvaluationRuns Types: @@ -286,7 +292,7 @@ Types: Methods: -- client.agents.versions.update(pathUuid, { ...params }) -> VersionUpdateResponse +- client.agents.versions.update(uuid, { ...params }) -> VersionUpdateResponse - client.agents.versions.list(uuid, { ...params }) -> VersionListResponse ## KnowledgeBases @@ -340,6 +346,12 @@ Methods: - client.images.generate({ ...params }) -> ImageGenerateResponse +# Responses + +Methods: + +- client.responses.create({ ...params }) -> CreateResponseResponse + # GPUDroplets Types: @@ -700,14 +712,16 @@ Types: - KnowledgeBaseUpdateResponse - KnowledgeBaseListResponse - KnowledgeBaseDeleteResponse +- KnowledgeBaseListIndexingJobsResponse Methods: - client.knowledgeBases.create({ ...params }) -> KnowledgeBaseCreateResponse - client.knowledgeBases.retrieve(uuid) -> KnowledgeBaseRetrieveResponse -- client.knowledgeBases.update(pathUuid, { ...params }) -> KnowledgeBaseUpdateResponse +- client.knowledgeBases.update(uuid, { ...params }) -> KnowledgeBaseUpdateResponse - client.knowledgeBases.list({ ...params }) -> KnowledgeBaseListResponse - client.knowledgeBases.delete(uuid) -> KnowledgeBaseDeleteResponse +- client.knowledgeBases.listIndexingJobs(knowledgeBaseUuid) -> KnowledgeBaseListIndexingJobsResponse ## DataSources @@ -719,6 +733,7 @@ Types: - APIWebCrawlerDataSource - AwsDataSource - DataSourceCreateResponse +- DataSourceUpdateResponse - DataSourceListResponse - DataSourceDeleteResponse - DataSourceCreatePresignedURLsResponse @@ -726,6 +741,7 @@ Types: Methods: - client.knowledgeBases.dataSources.create(knowledgeBaseUuid, { ...params }) -> DataSourceCreateResponse +- client.knowledgeBases.dataSources.update(dataSourceUuid, { ...params }) -> DataSourceUpdateResponse - client.knowledgeBases.dataSources.list(knowledgeBaseUuid, { ...params }) -> DataSourceListResponse - client.knowledgeBases.dataSources.delete(dataSourceUuid, { ...params }) -> DataSourceDeleteResponse - client.knowledgeBases.dataSources.createPresignedURLs({ ...params }) -> DataSourceCreatePresignedURLsResponse @@ -740,6 +756,7 @@ Types: - IndexingJobRetrieveResponse - IndexingJobListResponse - IndexingJobRetrieveDataSourcesResponse +- IndexingJobRetrieveSignedURLResponse - IndexingJobUpdateCancelResponse Methods: @@ -748,6 +765,8 @@ Methods: - client.knowledgeBases.indexingJobs.retrieve(uuid) -> IndexingJobRetrieveResponse - client.knowledgeBases.indexingJobs.list({ ...params }) -> IndexingJobListResponse - client.knowledgeBases.indexingJobs.retrieveDataSources(indexingJobUuid) -> IndexingJobRetrieveDataSourcesResponse +- client.knowledgeBases.indexingJobs.retrieveSignedURL(indexingJobUuid) -> IndexingJobRetrieveSignedURLResponse +- client.knowledgeBases.indexingJobs.updateCancel(uuid, { ...params }) -> IndexingJobUpdateCancelResponse - client.knowledgeBases.indexingJobs.updateCancel(pathUuid, { ...params }) -> IndexingJobUpdateCancelResponse - client.knowledgeBases.indexingJobs.waitForCompletion(uuid, { ...options }) -> IndexingJobRetrieveResponse @@ -835,3 +854,65 @@ Methods: - client.databases.schemaRegistry.config.update(databaseClusterUuid, { ...params }) -> ConfigUpdateResponse - client.databases.schemaRegistry.config.retrieveSubject(subjectName, { ...params }) -> ConfigRetrieveSubjectResponse - client.databases.schemaRegistry.config.updateSubject(subjectName, { ...params }) -> ConfigUpdateSubjectResponse + +# Nfs + +Types: + +- NfCreateResponse +- NfRetrieveResponse +- NfListResponse +- NfInitiateActionResponse + +Methods: + +- client.nfs.create({ ...params }) -> NfCreateResponse +- client.nfs.retrieve(nfsID, { ...params }) -> NfRetrieveResponse +- client.nfs.list({ ...params }) -> NfListResponse +- client.nfs.delete(nfsID, { ...params }) -> void +- client.nfs.initiateAction(nfsID, { ...params }) -> NfInitiateActionResponse + +## Snapshots + +Types: + +- SnapshotRetrieveResponse +- SnapshotListResponse + +Methods: + +- client.nfs.snapshots.retrieve(nfsSnapshotID, { ...params }) -> SnapshotRetrieveResponse +- client.nfs.snapshots.list({ ...params }) -> SnapshotListResponse +- client.nfs.snapshots.delete(nfsSnapshotID, { ...params }) -> void + +# Retrieve + +Types: + +- RetrieveDocumentsResponse + +Methods: + +- client.retrieve.documents(knowledgeBaseID, { ...params }) -> RetrieveDocumentsResponse + +# Apps + +## JobInvocations + +Types: + +- JobInvocationCancelResponse + +Methods: + +- client.apps.jobInvocations.cancel(jobInvocationID, { ...params }) -> JobInvocationCancelResponse + +# Billing + +Types: + +- BillingListInsightsResponse + +Methods: + +- client.billing.listInsights(endDate, { ...params }) -> BillingListInsightsResponse diff --git a/eslint.config.mjs b/eslint.config.mjs index f409f9cc..2ef554c5 100644 --- a/eslint.config.mjs +++ b/eslint.config.mjs @@ -1,7 +1,6 @@ // @ts-check import tseslint from 'typescript-eslint'; import unusedImports from 'eslint-plugin-unused-imports'; -import prettier from 'eslint-plugin-prettier'; export default tseslint.config( { @@ -14,11 +13,9 @@ export default tseslint.config( plugins: { '@typescript-eslint': tseslint.plugin, 'unused-imports': unusedImports, - prettier, }, rules: { 'no-unused-vars': 'off', - 'prettier/prettier': 'error', 'unused-imports/no-unused-imports': 'error', 'no-restricted-imports': [ 'error', diff --git a/package.json b/package.json index 14c6dd7f..f209e348 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "@digitalocean/gradient", - "version": "0.1.0-alpha.2", + "version": "0.1.0-alpha.3", "description": "The official TypeScript library for the Gradient API", "author": "DigitalOcean, LLC ", "types": "dist/index.d.ts", @@ -35,8 +35,7 @@ "@types/node": "^20.17.6", "@typescript-eslint/eslint-plugin": "8.31.1", "@typescript-eslint/parser": "8.31.1", - "eslint": "^9.20.1", - "eslint-plugin-prettier": "^5.4.1", + "eslint": "^9.39.1", "eslint-plugin-unused-imports": "^4.1.4", "iconv-lite": "^0.6.3", "jest": "^29.4.0", @@ -50,6 +49,17 @@ "typescript": "5.8.3", "typescript-eslint": "8.31.1" }, + "overrides": { + "minimatch": "^9.0.5" + }, + "pnpm": { + "overrides": { + "minimatch": "^9.0.5" + } + }, + "resolutions": { + "minimatch": "^9.0.5" + }, "exports": { ".": { "import": "./dist/index.mjs", diff --git a/scripts/bootstrap b/scripts/bootstrap index a8b69ff3..2e315f53 100755 --- a/scripts/bootstrap +++ b/scripts/bootstrap @@ -4,7 +4,7 @@ set -e cd "$(dirname "$0")/.." -if [ -f "Brewfile" ] && [ "$(uname -s)" = "Darwin" ] && [ "$SKIP_BREW" != "1" ] && [ -t 0 ]; then +if [ -f "Brewfile" ] && [ "$(uname -s)" = "Darwin" ] && [ "${SKIP_BREW:-}" != "1" ] && [ -t 0 ]; then brew bundle check >/dev/null 2>&1 || { echo -n "==> Install Homebrew dependencies? (y/N): " read -r response diff --git a/scripts/fast-format b/scripts/fast-format index 53721ac0..e1723136 100755 --- a/scripts/fast-format +++ b/scripts/fast-format @@ -31,10 +31,8 @@ if ! [ -z "$ESLINT_FILES" ]; then fi echo "==> Running prettier --write" -# format things eslint didn't -PRETTIER_FILES="$(grep '\.\(js\|json\)$' "$FILE_LIST" || true)" +PRETTIER_FILES="$(grep '\.\([mc]?tsx?\|[mc]?jsx?\|json\)$' "$FILE_LIST" || true)" if ! [ -z "$PRETTIER_FILES" ]; then echo "$PRETTIER_FILES" | xargs ./node_modules/.bin/prettier \ - --write --cache --cache-strategy metadata --no-error-on-unmatched-pattern \ - '!**/dist' '!**/*.ts' '!**/*.mts' '!**/*.cts' '!**/*.js' '!**/*.mjs' '!**/*.cjs' + --write --cache --cache-strategy metadata --no-error-on-unmatched-pattern fi diff --git a/scripts/format b/scripts/format index 7a756401..b1b2c17a 100755 --- a/scripts/format +++ b/scripts/format @@ -8,5 +8,4 @@ echo "==> Running eslint --fix" ./node_modules/.bin/eslint --fix . echo "==> Running prettier --write" -# format things eslint didn't -./node_modules/.bin/prettier --write --cache --cache-strategy metadata . '!**/dist' '!**/*.ts' '!**/*.mts' '!**/*.cts' '!**/*.js' '!**/*.mjs' '!**/*.cjs' +./node_modules/.bin/prettier --write --cache --cache-strategy metadata . diff --git a/scripts/lint b/scripts/lint index 3ffb78a6..1f532548 100755 --- a/scripts/lint +++ b/scripts/lint @@ -4,6 +4,9 @@ set -e cd "$(dirname "$0")/.." +echo "==> Running prettier --check" +./node_modules/.bin/prettier --check . + echo "==> Running eslint" ./node_modules/.bin/eslint . diff --git a/scripts/mock b/scripts/mock deleted file mode 100755 index 0b28f6ea..00000000 --- a/scripts/mock +++ /dev/null @@ -1,41 +0,0 @@ -#!/usr/bin/env bash - -set -e - -cd "$(dirname "$0")/.." - -if [[ -n "$1" && "$1" != '--'* ]]; then - URL="$1" - shift -else - URL="$(grep 'openapi_spec_url' .stats.yml | cut -d' ' -f2)" -fi - -# Check if the URL is empty -if [ -z "$URL" ]; then - echo "Error: No OpenAPI spec path/url provided or found in .stats.yml" - exit 1 -fi - -echo "==> Starting mock server with URL ${URL}" - -# Run prism mock on the given spec -if [ "$1" == "--daemon" ]; then - npm exec --package=@stainless-api/prism-cli@5.15.0 -- prism mock "$URL" &> .prism.log & - - # Wait for server to come online - echo -n "Waiting for server" - while ! grep -q "✖ fatal\|Prism is listening" ".prism.log" ; do - echo -n "." - sleep 0.1 - done - - if grep -q "✖ fatal" ".prism.log"; then - cat .prism.log - exit 1 - fi - - echo -else - npm exec --package=@stainless-api/prism-cli@5.15.0 -- prism mock "$URL" -fi diff --git a/scripts/test b/scripts/test index 7bce0516..548da9bb 100755 --- a/scripts/test +++ b/scripts/test @@ -4,53 +4,7 @@ set -e cd "$(dirname "$0")/.." -RED='\033[0;31m' -GREEN='\033[0;32m' -YELLOW='\033[0;33m' -NC='\033[0m' # No Color -function prism_is_running() { - curl --silent "http://localhost:4010" >/dev/null 2>&1 -} - -kill_server_on_port() { - pids=$(lsof -t -i tcp:"$1" || echo "") - if [ "$pids" != "" ]; then - kill "$pids" - echo "Stopped $pids." - fi -} - -function is_overriding_api_base_url() { - [ -n "$TEST_API_BASE_URL" ] -} - -if ! is_overriding_api_base_url && ! prism_is_running ; then - # When we exit this script, make sure to kill the background mock server process - trap 'kill_server_on_port 4010' EXIT - - # Start the dev server - ./scripts/mock --daemon -fi - -if is_overriding_api_base_url ; then - echo -e "${GREEN}✔ Running tests against ${TEST_API_BASE_URL}${NC}" - echo -elif ! prism_is_running ; then - echo -e "${RED}ERROR:${NC} The test suite will not run without a mock Prism server" - echo -e "running against your OpenAPI spec." - echo - echo -e "To run the server, pass in the path or url of your OpenAPI" - echo -e "spec to the prism command:" - echo - echo -e " \$ ${YELLOW}npm exec --package=@stainless-api/prism-cli@5.15.0 -- prism mock path/to/your.openapi.yml${NC}" - echo - - exit 1 -else - echo -e "${GREEN}✔ Mock prism server is running with your OpenAPI spec${NC}" - echo -fi echo "==> Running tests" ./node_modules/.bin/jest "$@" diff --git a/src/api-promise.ts b/src/api-promise.ts index 8c775ee6..4e701286 100644 --- a/src/api-promise.ts +++ b/src/api-promise.ts @@ -1,2 +1,2 @@ /** @deprecated Import from ./core/api-promise instead */ -export * from './core/api-promise'; +export * from "./core/api-promise" \ No newline at end of file diff --git a/src/client.ts b/src/client.ts index 98aa8dd4..f8c2eeee 100644 --- a/src/client.ts +++ b/src/client.ts @@ -11,94 +11,31 @@ import type { APIResponseProps } from './internal/parse'; import { getPlatformHeaders } from './internal/detect-platform'; import * as Shims from './internal/shims'; import * as Opts from './internal/request-options'; -import * as qs from './internal/qs'; +import { stringifyQuery } from './internal/utils/query'; import { VERSION } from './version'; import * as Errors from './core/error'; import * as Uploads from './core/uploads'; import * as API from './resources/index'; import { APIPromise } from './core/api-promise'; -import { - ImageGenerateParams, - ImageGenerateParamsNonStreaming, - ImageGenerateParamsStreaming, - ImageGenerateResponse, - Images, -} from './resources/images'; +import { Billing, BillingListInsightsParams, BillingListInsightsResponse } from './resources/billing'; +import { ImageGenerateParams, ImageGenerateParamsNonStreaming, ImageGenerateParamsStreaming, ImageGenerateResponse, Images } from './resources/images'; import { RegionListParams, RegionListResponse, Regions } from './resources/regions'; -import { - APIAgent, - APIAgentAPIKeyInfo, - APIAgentModel, - APIAnthropicAPIKeyInfo, - APIDeploymentVisibility, - APIOpenAIAPIKeyInfo, - APIRetrievalMethod, - APIWorkspace, - AgentCreateParams, - AgentCreateResponse, - AgentDeleteResponse, - AgentListParams, - AgentListResponse, - AgentRetrieveResponse, - AgentRetrieveUsageParams, - AgentRetrieveUsageResponse, - AgentUpdateParams, - AgentUpdateResponse, - AgentUpdateStatusParams, - AgentUpdateStatusResponse, - Agents, -} from './resources/agents/agents'; +import { ResponseCreateParams, ResponseCreateParamsNonStreaming, ResponseCreateParamsStreaming, Responses } from './resources/responses'; +import { Retrieve, RetrieveDocumentsParams, RetrieveDocumentsResponse } from './resources/retrieve'; +import { APIAgent, APIAgentAPIKeyInfo, APIAgentModel, APIAnthropicAPIKeyInfo, APIDeploymentVisibility, APIOpenAIAPIKeyInfo, APIRetrievalMethod, APIWorkspace, AgentCreateParams, AgentCreateResponse, AgentDeleteResponse, AgentListParams, AgentListResponse, AgentRetrieveResponse, AgentRetrieveUsageParams, AgentRetrieveUsageResponse, AgentUpdateParams, AgentUpdateResponse, AgentUpdateStatusParams, AgentUpdateStatusResponse, Agents } from './resources/agents/agents'; +import { Apps } from './resources/apps/apps'; import { Chat } from './resources/chat/chat'; import { Databases } from './resources/databases/databases'; -import { - DropletBackupPolicy, - GPUDropletCreateParams, - GPUDropletCreateResponse, - GPUDropletDeleteByTagParams, - GPUDropletListFirewallsParams, - GPUDropletListFirewallsResponse, - GPUDropletListKernelsParams, - GPUDropletListKernelsResponse, - GPUDropletListNeighborsResponse, - GPUDropletListParams, - GPUDropletListResponse, - GPUDropletListSnapshotsParams, - GPUDropletListSnapshotsResponse, - GPUDropletRetrieveResponse, - GPUDroplets, -} from './resources/gpu-droplets/gpu-droplets'; +import { DropletBackupPolicy, GPUDropletCreateParams, GPUDropletCreateResponse, GPUDropletDeleteByTagParams, GPUDropletListFirewallsParams, GPUDropletListFirewallsResponse, GPUDropletListKernelsParams, GPUDropletListKernelsResponse, GPUDropletListNeighborsResponse, GPUDropletListParams, GPUDropletListResponse, GPUDropletListSnapshotsParams, GPUDropletListSnapshotsResponse, GPUDropletRetrieveResponse, GPUDroplets } from './resources/gpu-droplets/gpu-droplets'; import { Inference } from './resources/inference/inference'; -import { - APIKnowledgeBase, - KnowledgeBaseCreateParams, - KnowledgeBaseCreateResponse, - KnowledgeBaseDeleteResponse, - KnowledgeBaseListParams, - KnowledgeBaseListResponse, - KnowledgeBaseRetrieveResponse, - KnowledgeBaseUpdateParams, - KnowledgeBaseUpdateResponse, - KnowledgeBases, -} from './resources/knowledge-bases/knowledge-bases'; -import { - APIAgreement, - APIModel, - APIModelVersion, - ModelListParams, - ModelListResponse, - Models, -} from './resources/models/models'; +import { APIKnowledgeBase, KnowledgeBaseCreateParams, KnowledgeBaseCreateResponse, KnowledgeBaseDeleteResponse, KnowledgeBaseListIndexingJobsResponse, KnowledgeBaseListParams, KnowledgeBaseListResponse, KnowledgeBaseRetrieveResponse, KnowledgeBaseUpdateParams, KnowledgeBaseUpdateResponse, KnowledgeBases } from './resources/knowledge-bases/knowledge-bases'; +import { APIAgreement, APIModel, APIModelVersion, ModelListParams, ModelListResponse, Models } from './resources/models/models'; +import { NfCreateParams, NfCreateResponse, NfDeleteParams, NfInitiateActionParams, NfInitiateActionResponse, NfListParams, NfListResponse, NfRetrieveParams, NfRetrieveResponse, Nfs } from './resources/nfs/nfs'; import { type Fetch } from './internal/builtin-types'; import { HeadersLike, NullableHeaders, buildHeaders } from './internal/headers'; import { FinalRequestOptions, RequestOptions } from './internal/request-options'; import { readEnv } from './internal/utils/env'; -import { - type LogLevel, - type Logger, - formatRequestDetails, - loggerFor, - parseLogLevel, -} from './internal/utils/log'; +import { type LogLevel, type Logger, formatRequestDetails, loggerFor, parseLogLevel } from './internal/utils/log'; import { isEmptyObj } from './internal/utils/values'; export interface ClientOptions { @@ -122,10 +59,12 @@ export interface ClientOptions { */ agentEndpoint?: string | null | undefined; + inferenceEndpoint?: string | null | undefined; + /** - * Defaults to process.env['GRADIENT_INFERENCE_ENDPOINT']. + * Defaults to process.env['GRADIENT_KBASS_ENDPOINT']. */ - inferenceEndpoint?: string | null | undefined; + kbassEndpoint?: string | null | undefined; /** * Override the default base URL for the API, e.g., "https://api.example.com/v2/" @@ -197,7 +136,7 @@ export interface ClientOptions { } /** - * API Client for interfacing with the Gradient API. + * API Client for interfacing with the Gradient API. */ export class Gradient { accessToken: string | null; @@ -205,11 +144,12 @@ export class Gradient { agentAccessKey: string | null; agentEndpoint: string | null; inferenceEndpoint: string | null; + kbassEndpoint: string | null; baseURL: string; maxRetries: number; timeout: number; - logger: Logger | undefined; + logger: Logger; logLevel: LogLevel | undefined; fetchOptions: MergedRequestInit | undefined; @@ -225,7 +165,8 @@ export class Gradient { * @param {string | null | undefined} [opts.modelAccessKey=process.env['GRADIENT_MODEL_ACCESS_KEY'] ?? null] * @param {string | null | undefined} [opts.agentAccessKey=process.env['GRADIENT_AGENT_ACCESS_KEY'] ?? null] * @param {string | null | undefined} [opts.agentEndpoint=process.env['GRADIENT_AGENT_ENDPOINT'] ?? null] - * @param {string | null | undefined} [opts.inferenceEndpoint=process.env['GRADIENT_INFERENCE_ENDPOINT'] ?? inference.do-ai.run] + * @param {string | null | undefined} [opts.inferenceEndpoint=https://inference.do-ai.run] + * @param {string | null | undefined} [opts.kbassEndpoint=process.env['GRADIENT_KBASS_ENDPOINT'] ?? kbaas.do-ai.run] * @param {string} [opts.baseURL=process.env['GRADIENT_BASE_URL'] ?? https://api.digitalocean.com] - Override the default base URL for the API. * @param {number} [opts.timeout=1 minute] - The maximum amount of time (in milliseconds) the client will wait for a response before timing out. * @param {MergedRequestInit} [opts.fetchOptions] - Additional `RequestInit` options to be passed to `fetch` calls. @@ -240,15 +181,18 @@ export class Gradient { modelAccessKey = readEnv('GRADIENT_MODEL_ACCESS_KEY') ?? null, agentAccessKey = readEnv('GRADIENT_AGENT_ACCESS_KEY') ?? null, agentEndpoint = readEnv('GRADIENT_AGENT_ENDPOINT') ?? null, - inferenceEndpoint = readEnv('GRADIENT_INFERENCE_ENDPOINT') ?? 'inference.do-ai.run', + inferenceEndpoint = 'https://inference.do-ai.run', + kbassEndpoint = readEnv('GRADIENT_KBASS_ENDPOINT') ?? 'kbaas.do-ai.run', ...opts }: ClientOptions = {}) { + const options: ClientOptions = { accessToken, modelAccessKey, agentAccessKey, agentEndpoint, inferenceEndpoint, + kbassEndpoint, ...opts, baseURL: baseURL || `https://api.digitalocean.com`, }; @@ -259,10 +203,7 @@ export class Gradient { const defaultLogLevel = 'warn'; // Set default logLevel early so that we can log a warning in parseLogLevel. this.logLevel = defaultLogLevel; - this.logLevel = - parseLogLevel(options.logLevel, 'ClientOptions.logLevel', this) ?? - parseLogLevel(readEnv('GRADIENT_LOG'), "process.env['GRADIENT_LOG']", this) ?? - defaultLogLevel; + this.logLevel = parseLogLevel(options.logLevel, 'ClientOptions.logLevel', this) ?? parseLogLevel(readEnv('GRADIENT_LOG'), 'process.env[\'GRADIENT_LOG\']', this) ?? defaultLogLevel; this.fetchOptions = options.fetchOptions; this.maxRetries = options.maxRetries ?? 2; this.fetch = options.fetch ?? Shims.getDefaultFetch(); @@ -275,6 +216,7 @@ export class Gradient { this.agentAccessKey = agentAccessKey; this.agentEndpoint = agentEndpoint; this.inferenceEndpoint = inferenceEndpoint; + this.kbassEndpoint = kbassEndpoint; } /** @@ -295,7 +237,8 @@ export class Gradient { agentAccessKey: this.agentAccessKey, agentEndpoint: this.agentEndpoint, inferenceEndpoint: this.inferenceEndpoint, - ...options, + kbassEndpoint: this.kbassEndpoint, + ...options }); return client; } @@ -308,7 +251,7 @@ export class Gradient { } protected defaultQuery(): Record | undefined { - return this._options.defaultQuery; + return this._options.defaultQuery } protected validateHeaders({ values, nulls }: NullableHeaders) { @@ -333,17 +276,11 @@ export class Gradient { return; } - throw new Error( - 'Could not resolve authentication method. Expected one of accessToken, modelAccessKey or agentAccessKey to be set. Or for one of the "Authorization", "Authorization" or "Authorization" headers to be explicitly omitted', - ); + throw new Error('Could not resolve authentication method. Expected one of accessToken, modelAccessKey or agentAccessKey to be set. Or for one of the "Authorization", "Authorization" or "Authorization" headers to be explicitly omitted') } protected async authHeaders(opts: FinalRequestOptions): Promise { - return buildHeaders([ - await this.bearerAuth(opts), - await this.modelAccessKeyAuth(opts), - await this.agentAccessKeyAuth(opts), - ]); + return buildHeaders([await this.bearerAuth(opts), await this.modelAccessKeyAuth(opts), await this.agentAccessKeyAuth(opts)]); } protected async bearerAuth(opts: FinalRequestOptions): Promise { @@ -367,8 +304,8 @@ export class Gradient { return buildHeaders([{ Authorization: `Bearer ${this.agentAccessKey}` }]); } - protected stringifyQuery(query: Record): string { - return qs.stringify(query, { arrayFormat: 'comma' }); + protected stringifyQuery(query: object | Record): string { + return stringifyQuery(query); } private getUserAgent(): string { @@ -388,11 +325,7 @@ export class Gradient { return Errors.APIError.generate(status, error, message, headers); } - buildURL( - path: string, - query: Record | null | undefined, - defaultBaseURL?: string | undefined, - ): string { + buildURL(path: string, query: Record | null | undefined, defaultBaseURL?: string | undefined): string { const baseURL = (!this.#baseURLOverridden() && defaultBaseURL) || this.baseURL; const url = isAbsoluteURL(path) ? @@ -400,12 +333,13 @@ export class Gradient { : new URL(baseURL + (baseURL.endsWith('/') && path.startsWith('/') ? path.slice(1) : path)); const defaultQuery = this.defaultQuery(); - if (!isEmptyObj(defaultQuery)) { - query = { ...defaultQuery, ...query }; + const pathQuery = Object.fromEntries(url.searchParams); + if (!isEmptyObj(defaultQuery) || !isEmptyObj(pathQuery)) { + query = { ...pathQuery, ...defaultQuery, ...query }; } if (typeof query === 'object' && query && !Array.isArray(query)) { - url.search = this.stringifyQuery(query as Record); + url.search = this.stringifyQuery(query); } return url.toString(); @@ -479,9 +413,7 @@ export class Gradient { await this.prepareOptions(options); - const { req, url, timeout } = await this.buildRequest(options, { - retryCount: maxRetries - retriesRemaining, - }); + const { req, url, timeout } = await this.buildRequest(options, { retryCount: maxRetries - retriesRemaining }); await this.prepareRequest(req, { url, options }); @@ -490,16 +422,7 @@ export class Gradient { const retryLogStr = retryOfRequestLogID === undefined ? '' : `, retryOf: ${retryOfRequestLogID}`; const startTime = Date.now(); - loggerFor(this).debug( - `[${requestLogID}] sending request`, - formatRequestDetails({ - retryOfRequestLogID, - method: options.method, - url, - options, - headers: req.headers, - }), - ); + loggerFor(this).debug(`[${requestLogID}] sending request`, formatRequestDetails({ retryOfRequestLogID, method: options.method, url, options, headers: req.headers })); if (options.signal?.aborted) { throw new Errors.APIUserAbortError(); @@ -518,45 +441,21 @@ export class Gradient { // deno throws "TypeError: error sending request for url (https://example/): client error (Connect): tcp connect error: Operation timed out (os error 60): Operation timed out (os error 60)" // undici throws "TypeError: fetch failed" with cause "ConnectTimeoutError: Connect Timeout Error (attempted address: example:443, timeout: 1ms)" // others do not provide enough information to distinguish timeouts from other connection errors - const isTimeout = - isAbortError(response) || - /timed? ?out/i.test(String(response) + ('cause' in response ? String(response.cause) : '')); + const isTimeout = isAbortError(response) || /timed? ?out/i.test(String(response) + ('cause' in response ? String(response.cause) : '')) if (retriesRemaining) { - loggerFor(this).info( - `[${requestLogID}] connection ${isTimeout ? 'timed out' : 'failed'} - ${retryMessage}`, - ); - loggerFor(this).debug( - `[${requestLogID}] connection ${isTimeout ? 'timed out' : 'failed'} (${retryMessage})`, - formatRequestDetails({ - retryOfRequestLogID, - url, - durationMs: headersTime - startTime, - message: response.message, - }), - ); + loggerFor(this).info(`[${requestLogID}] connection ${isTimeout ? 'timed out' : 'failed'} - ${retryMessage}`) + loggerFor(this).debug(`[${requestLogID}] connection ${isTimeout ? 'timed out' : 'failed'} (${retryMessage})`, formatRequestDetails({ retryOfRequestLogID, url, durationMs: headersTime - startTime, message: response.message })); return this.retryRequest(options, retriesRemaining, retryOfRequestLogID ?? requestLogID); } - loggerFor(this).info( - `[${requestLogID}] connection ${isTimeout ? 'timed out' : 'failed'} - error; no more retries left`, - ); - loggerFor(this).debug( - `[${requestLogID}] connection ${isTimeout ? 'timed out' : 'failed'} (error; no more retries left)`, - formatRequestDetails({ - retryOfRequestLogID, - url, - durationMs: headersTime - startTime, - message: response.message, - }), - ); + loggerFor(this).info(`[${requestLogID}] connection ${isTimeout ? 'timed out' : 'failed'} - error; no more retries left`) + loggerFor(this).debug(`[${requestLogID}] connection ${isTimeout ? 'timed out' : 'failed'} (error; no more retries left)`, formatRequestDetails({ retryOfRequestLogID, url, durationMs: headersTime - startTime, message: response.message })); if (isTimeout) { throw new Errors.APIConnectionTimeoutError(); } throw new Errors.APIConnectionError({ cause: response }); } - const responseInfo = `[${requestLogID}${retryLogStr}] ${req.method} ${url} ${ - response.ok ? 'succeeded' : 'failed' - } with status ${response.status} in ${headersTime - startTime}ms`; + const responseInfo = `[${requestLogID}${retryLogStr}] ${req.method} ${url} ${response.ok ? 'succeeded' : 'failed'} with status ${response.status} in ${headersTime - startTime}ms`; if (!response.ok) { const shouldRetry = await this.shouldRetry(response); @@ -565,60 +464,27 @@ export class Gradient { // We don't need the body of this response. await Shims.CancelReadableStream(response.body); - loggerFor(this).info(`${responseInfo} - ${retryMessage}`); - loggerFor(this).debug( - `[${requestLogID}] response error (${retryMessage})`, - formatRequestDetails({ - retryOfRequestLogID, - url: response.url, - status: response.status, - headers: response.headers, - durationMs: headersTime - startTime, - }), - ); - return this.retryRequest( - options, - retriesRemaining, - retryOfRequestLogID ?? requestLogID, - response.headers, - ); + loggerFor(this).info(`${responseInfo} - ${retryMessage}`) + loggerFor(this).debug(`[${requestLogID}] response error (${retryMessage})`, formatRequestDetails({ retryOfRequestLogID, url: response.url, status: response.status, headers: response.headers, durationMs: headersTime - startTime })); + return this.retryRequest(options, retriesRemaining, retryOfRequestLogID ?? requestLogID, response.headers); } const retryMessage = shouldRetry ? `error; no more retries left` : `error; not retryable`; - loggerFor(this).info(`${responseInfo} - ${retryMessage}`); + loggerFor(this).info(`${responseInfo} - ${retryMessage}`) const errText = await response.text().catch((err: any) => castToError(err).message); - const errJSON = safeJSON(errText); + const errJSON = safeJSON(errText) as any; const errMessage = errJSON ? undefined : errText; - loggerFor(this).debug( - `[${requestLogID}] response error (${retryMessage})`, - formatRequestDetails({ - retryOfRequestLogID, - url: response.url, - status: response.status, - headers: response.headers, - message: errMessage, - durationMs: Date.now() - startTime, - }), - ); + loggerFor(this).debug(`[${requestLogID}] response error (${retryMessage})`, formatRequestDetails({ retryOfRequestLogID, url: response.url, status: response.status, headers: response.headers, message: errMessage, durationMs: Date.now() - startTime })); const err = this.makeStatusError(response.status, errJSON, errMessage, response.headers); throw err; } - loggerFor(this).info(responseInfo); - loggerFor(this).debug( - `[${requestLogID}] response start`, - formatRequestDetails({ - retryOfRequestLogID, - url: response.url, - status: response.status, - headers: response.headers, - durationMs: headersTime - startTime, - }), - ); + loggerFor(this).info(responseInfo) + loggerFor(this).debug(`[${requestLogID}] response start`, formatRequestDetails({ retryOfRequestLogID, url: response.url, status: response.status, headers: response.headers, durationMs: headersTime - startTime })); return { response, options, controller, requestLogID, retryOfRequestLogID, startTime }; } @@ -630,13 +496,12 @@ export class Gradient { controller: AbortController, ): Promise { const { signal, method, ...options } = init || {}; - if (signal) signal.addEventListener('abort', () => controller.abort()); + const abort = this._makeAbort(controller); + if (signal) signal.addEventListener('abort', abort, { once: true }); - const timeout = setTimeout(() => controller.abort(), ms); + const timeout = setTimeout(abort, ms); - const isReadableBody = - ((globalThis as any).ReadableStream && options.body instanceof (globalThis as any).ReadableStream) || - (typeof options.body === 'object' && options.body !== null && Symbol.asyncIterator in options.body); + const isReadableBody = ((globalThis as any).ReadableStream && options.body instanceof (globalThis as any).ReadableStream) || (typeof options.body === "object" && options.body !== null && Symbol.asyncIterator in options.body); const fetchOptions: RequestInit = { signal: controller.signal as any, @@ -651,6 +516,7 @@ export class Gradient { } try { + // use undefined this binding; fetch errors if bound to something else in browser/cloudflare return await this.fetch.call(undefined, url, fetchOptions); } finally { @@ -709,9 +575,9 @@ export class Gradient { } } - // If the API asks us to wait a certain amount of time (and it's a reasonable amount), - // just do what it says, but otherwise calculate a default - if (!(timeoutMillis && 0 <= timeoutMillis && timeoutMillis < 60 * 1000)) { + // If the API asks us to wait a certain amount of time, just do what it + // says, but otherwise calculate a default + if (timeoutMillis === undefined) { const maxRetries = options.maxRetries ?? this.maxRetries; timeoutMillis = this.calculateDefaultRetryTimeoutMillis(retriesRemaining, maxRetries); } @@ -751,12 +617,11 @@ export class Gradient { const req: FinalizedRequestInit = { method, headers: reqHeaders, - ...(options.signal && { signal: options.signal }), - ...((globalThis as any).ReadableStream && - body instanceof (globalThis as any).ReadableStream && { duplex: 'half' }), + ...(options.signal && { signal: options.signal}), + ...((globalThis as any).ReadableStream && body instanceof (globalThis as any).ReadableStream && { duplex: "half" }), ...(body && { body }), - ...((this.fetchOptions as any) ?? {}), - ...((options.fetchOptions as any) ?? {}), + ...(this.fetchOptions as any ?? {}), + ...(options.fetchOptions as any ?? {}), }; return { req, url, timeout: options.timeout }; @@ -781,17 +646,15 @@ export class Gradient { const headers = buildHeaders([ idempotencyHeaders, - { - Accept: 'application/json', - 'User-Agent': this.getUserAgent(), - 'X-Stainless-Retry-Count': String(retryCount), - ...(options.timeout ? { 'X-Stainless-Timeout': String(Math.trunc(options.timeout / 1000)) } : {}), - ...getPlatformHeaders(), - }, + {Accept: 'application/json', + 'User-Agent': this.getUserAgent(), + 'X-Stainless-Retry-Count': String(retryCount), + ...(options.timeout ? { 'X-Stainless-Timeout': String(Math.trunc(options.timeout / 1000)) } : {}), + ...getPlatformHeaders()}, await this.authHeaders(options), this._options.defaultHeaders, bodyHeaders, - options.headers, + options.headers ]); this.validateHeaders(headers); @@ -799,6 +662,12 @@ export class Gradient { return headers.values; } + private _makeAbort(controller: AbortController) { + // note: we can't just inline this method inside `fetchWithTimeout()` because then the closure + // would capture all request options, and cause a memory leak. + return () => controller.abort(); + } + private buildBody({ options: { body, headers: rawHeaders } }: { options: FinalRequestOptions }): { bodyHeaders: HeadersLike; body: BodyInit | undefined; @@ -812,9 +681,11 @@ export class Gradient { ArrayBuffer.isView(body) || body instanceof ArrayBuffer || body instanceof DataView || - (typeof body === 'string' && + ( + typeof body === 'string' && // Preserve legacy string encoding behavior for now - headers.values.has('content-type')) || + headers.values.has('content-type') + ) || // `Blob` is superset of `File` ((globalThis as any).Blob && body instanceof (globalThis as any).Blob) || // `FormData` -> `multipart/form-data` @@ -831,13 +702,21 @@ export class Gradient { (Symbol.iterator in body && 'next' in body && typeof body.next === 'function')) ) { return { bodyHeaders: undefined, body: Shims.ReadableStreamFrom(body as AsyncIterable) }; + } else if ( + typeof body === 'object' && + headers.values.get('content-type') === 'application/x-www-form-urlencoded' + ) { + return { + bodyHeaders: { 'content-type': 'application/x-www-form-urlencoded' }, + body: this.stringifyQuery(body), + }; } else { return this.#encoder({ body, headers }); } } static Gradient = this; - static DEFAULT_TIMEOUT = 60000; // 1 minute + static DEFAULT_TIMEOUT = 60000 // 1 minute static GradientError = Errors.GradientError; static APIError = Errors.APIError; @@ -862,142 +741,253 @@ export class Gradient { static toFile = Uploads.toFile; + /** + * The API lets you build GPU-powered AI agents with pre-built or custom foundation models, function and agent routes, and RAG pipelines with knowledge bases. + */ agents: API.Agents = new API.Agents(this); chat: API.Chat = new API.Chat(this); + /** + * Generate images from text prompts using various AI models. + */ images: API.Images = new API.Images(this); + /** + * Generate text-to-text responses from text prompts. + */ + responses: API.Responses = new API.Responses(this); + /** + * A [Droplet](https://docs.digitalocean.com/products/droplets/) is a DigitalOcean + * virtual machine. By sending requests to the Droplet endpoint, you can + * list, create, or delete Droplets. + * + * Some of the attributes will have an object value. The `region` and `image` + * objects will all contain the standard attributes of their associated + * types. Find more information about each of these objects in their + * respective sections. + */ gpuDroplets: API.GPUDroplets = new API.GPUDroplets(this); inference: API.Inference = new API.Inference(this); + /** + * The API lets you build GPU-powered AI agents with pre-built or custom foundation models, function and agent routes, and RAG pipelines with knowledge bases. + */ knowledgeBases: API.KnowledgeBases = new API.KnowledgeBases(this); + /** + * The API lets you build GPU-powered AI agents with pre-built or custom foundation models, function and agent routes, and RAG pipelines with knowledge bases. + */ models: API.Models = new API.Models(this); + /** + * Provides information about DigitalOcean data center regions. + */ regions: API.Regions = new API.Regions(this); databases: API.Databases = new API.Databases(this); + nfs: API.Nfs = new API.Nfs(this); + retrieve: API.Retrieve = new API.Retrieve(this); + apps: API.Apps = new API.Apps(this); + /** + * The billing endpoints allow you to retrieve your account balance, invoices, + * billing history, and insights. + * + * **Balance:** By sending requests to the `/v2/customers/my/balance` endpoint, you can + * retrieve the balance information for the requested customer account. + * + * **Invoices:** [Invoices](https://docs.digitalocean.com/platform/billing/invoices/) + * are generated on the first of each month for every DigitalOcean + * customer. An invoice preview is generated daily, which can be accessed + * with the `preview` keyword in place of `$INVOICE_UUID`. To interact with + * invoices, you will generally send requests to the invoices endpoint at + * `/v2/customers/my/invoices`. + * + * **Billing History:** Billing history is a record of billing events for your account. + * For example, entries may include events like payments made, invoices + * issued, or credits granted. To interact with invoices, you + * will generally send requests to the invoices endpoint at + * `/v2/customers/my/billing_history`. + * + * **Billing Insights:** Day-over-day changes in billing resource usage based on nightly invoice items, + * including total amount, region, SKU, and description for a specified date range. + * It is important to note that the daily resource usage may not reflect month-end billing totals when totaled for + * a given month as nightly invoice items do not necessarily encompass all invoicing factors for the entire month. + * `v2/billing/{account_urn}/insights/{start_date}/{end_date}` where account_urn is the URN of the customer + * account, can be a team (do:team:uuid) or an organization (do:teamgroup:uuid). The date range specified by + * start_date and end_date must be in YYYY-MM-DD format. + */ + billing: API.Billing = new API.Billing(this); } Gradient.Agents = Agents; Gradient.Chat = Chat; Gradient.Images = Images; +Gradient.Responses = Responses; Gradient.GPUDroplets = GPUDroplets; Gradient.Inference = Inference; Gradient.KnowledgeBases = KnowledgeBases; Gradient.Models = Models; Gradient.Regions = Regions; Gradient.Databases = Databases; +Gradient.Nfs = Nfs; +Gradient.Retrieve = Retrieve; +Gradient.Apps = Apps; +Gradient.Billing = Billing; export declare namespace Gradient { - export type RequestOptions = Opts.RequestOptions; - - export { - Agents as Agents, - type APIAgent as APIAgent, - type APIAgentAPIKeyInfo as APIAgentAPIKeyInfo, - type APIAgentModel as APIAgentModel, - type APIAnthropicAPIKeyInfo as APIAnthropicAPIKeyInfo, - type APIDeploymentVisibility as APIDeploymentVisibility, - type APIOpenAIAPIKeyInfo as APIOpenAIAPIKeyInfo, - type APIRetrievalMethod as APIRetrievalMethod, - type APIWorkspace as APIWorkspace, - type AgentCreateResponse as AgentCreateResponse, - type AgentRetrieveResponse as AgentRetrieveResponse, - type AgentUpdateResponse as AgentUpdateResponse, - type AgentListResponse as AgentListResponse, - type AgentDeleteResponse as AgentDeleteResponse, - type AgentRetrieveUsageResponse as AgentRetrieveUsageResponse, - type AgentUpdateStatusResponse as AgentUpdateStatusResponse, - type AgentCreateParams as AgentCreateParams, - type AgentUpdateParams as AgentUpdateParams, - type AgentListParams as AgentListParams, - type AgentRetrieveUsageParams as AgentRetrieveUsageParams, - type AgentUpdateStatusParams as AgentUpdateStatusParams, - }; - - export { Chat as Chat }; - - export { - Images as Images, - type ImageGenerateResponse as ImageGenerateResponse, - type ImageGenerateParams as ImageGenerateParams, - type ImageGenerateParamsNonStreaming as ImageGenerateParamsNonStreaming, - type ImageGenerateParamsStreaming as ImageGenerateParamsStreaming, - }; - - export { - GPUDroplets as GPUDroplets, - type DropletBackupPolicy as DropletBackupPolicy, - type GPUDropletCreateResponse as GPUDropletCreateResponse, - type GPUDropletRetrieveResponse as GPUDropletRetrieveResponse, - type GPUDropletListResponse as GPUDropletListResponse, - type GPUDropletListFirewallsResponse as GPUDropletListFirewallsResponse, - type GPUDropletListKernelsResponse as GPUDropletListKernelsResponse, - type GPUDropletListNeighborsResponse as GPUDropletListNeighborsResponse, - type GPUDropletListSnapshotsResponse as GPUDropletListSnapshotsResponse, - type GPUDropletCreateParams as GPUDropletCreateParams, - type GPUDropletListParams as GPUDropletListParams, - type GPUDropletDeleteByTagParams as GPUDropletDeleteByTagParams, - type GPUDropletListFirewallsParams as GPUDropletListFirewallsParams, - type GPUDropletListKernelsParams as GPUDropletListKernelsParams, - type GPUDropletListSnapshotsParams as GPUDropletListSnapshotsParams, - }; - - export { Inference as Inference }; - - export { - KnowledgeBases as KnowledgeBases, - type APIKnowledgeBase as APIKnowledgeBase, - type KnowledgeBaseCreateResponse as KnowledgeBaseCreateResponse, - type KnowledgeBaseRetrieveResponse as KnowledgeBaseRetrieveResponse, - type KnowledgeBaseUpdateResponse as KnowledgeBaseUpdateResponse, - type KnowledgeBaseListResponse as KnowledgeBaseListResponse, - type KnowledgeBaseDeleteResponse as KnowledgeBaseDeleteResponse, - type KnowledgeBaseCreateParams as KnowledgeBaseCreateParams, - type KnowledgeBaseUpdateParams as KnowledgeBaseUpdateParams, - type KnowledgeBaseListParams as KnowledgeBaseListParams, - }; - - export { - Models as Models, - type APIAgreement as APIAgreement, - type APIModel as APIModel, - type APIModelVersion as APIModelVersion, - type ModelListResponse as ModelListResponse, - type ModelListParams as ModelListParams, - }; - - export { - Regions as Regions, - type RegionListResponse as RegionListResponse, - type RegionListParams as RegionListParams, - }; - - export { Databases as Databases }; - - export type Action = API.Action; - export type ActionLink = API.ActionLink; - export type APILinks = API.APILinks; - export type APIMeta = API.APIMeta; - export type BackwardLinks = API.BackwardLinks; - export type ChatCompletionChunk = API.ChatCompletionChunk; - export type ChatCompletionTokenLogprob = API.ChatCompletionTokenLogprob; - export type CompletionUsage = API.CompletionUsage; - export type DiskInfo = API.DiskInfo; - export type Droplet = API.Droplet; - export type DropletNextBackupWindow = API.DropletNextBackupWindow; - export type FirewallRuleTarget = API.FirewallRuleTarget; - export type ForwardLinks = API.ForwardLinks; - export type GarbageCollection = API.GarbageCollection; - export type GPUInfo = API.GPUInfo; - export type Image = API.Image; - export type ImageGenCompletedEvent = API.ImageGenCompletedEvent; - export type ImageGenPartialImageEvent = API.ImageGenPartialImageEvent; - export type ImageGenStreamEvent = API.ImageGenStreamEvent; - export type Kernel = API.Kernel; - export type MetaProperties = API.MetaProperties; - export type NetworkV4 = API.NetworkV4; - export type NetworkV6 = API.NetworkV6; - export type PageLinks = API.PageLinks; - export type Region = API.Region; - export type Size = API.Size; - export type Snapshots = API.Snapshots; - export type Subscription = API.Subscription; - export type SubscriptionTierBase = API.SubscriptionTierBase; - export type VpcPeering = API.VpcPeering; -} + export type RequestOptions = Opts.RequestOptions; + + export { + Agents as Agents, + type APIAgent as APIAgent, + type APIAgentAPIKeyInfo as APIAgentAPIKeyInfo, + type APIAgentModel as APIAgentModel, + type APIAnthropicAPIKeyInfo as APIAnthropicAPIKeyInfo, + type APIDeploymentVisibility as APIDeploymentVisibility, + type APIOpenAIAPIKeyInfo as APIOpenAIAPIKeyInfo, + type APIRetrievalMethod as APIRetrievalMethod, + type APIWorkspace as APIWorkspace, + type AgentCreateResponse as AgentCreateResponse, + type AgentRetrieveResponse as AgentRetrieveResponse, + type AgentUpdateResponse as AgentUpdateResponse, + type AgentListResponse as AgentListResponse, + type AgentDeleteResponse as AgentDeleteResponse, + type AgentRetrieveUsageResponse as AgentRetrieveUsageResponse, + type AgentUpdateStatusResponse as AgentUpdateStatusResponse, + type AgentCreateParams as AgentCreateParams, + type AgentUpdateParams as AgentUpdateParams, + type AgentListParams as AgentListParams, + type AgentRetrieveUsageParams as AgentRetrieveUsageParams, + type AgentUpdateStatusParams as AgentUpdateStatusParams +}; + +export { + Chat as Chat +}; + +export { + Images as Images, + type ImageGenerateResponse as ImageGenerateResponse, + type ImageGenerateParams as ImageGenerateParams, + type ImageGenerateParamsNonStreaming as ImageGenerateParamsNonStreaming, + type ImageGenerateParamsStreaming as ImageGenerateParamsStreaming +}; + +export { + Responses as Responses, + type ResponseCreateParams as ResponseCreateParams, + type ResponseCreateParamsNonStreaming as ResponseCreateParamsNonStreaming, + type ResponseCreateParamsStreaming as ResponseCreateParamsStreaming +}; + +export { + GPUDroplets as GPUDroplets, + type DropletBackupPolicy as DropletBackupPolicy, + type GPUDropletCreateResponse as GPUDropletCreateResponse, + type GPUDropletRetrieveResponse as GPUDropletRetrieveResponse, + type GPUDropletListResponse as GPUDropletListResponse, + type GPUDropletListFirewallsResponse as GPUDropletListFirewallsResponse, + type GPUDropletListKernelsResponse as GPUDropletListKernelsResponse, + type GPUDropletListNeighborsResponse as GPUDropletListNeighborsResponse, + type GPUDropletListSnapshotsResponse as GPUDropletListSnapshotsResponse, + type GPUDropletCreateParams as GPUDropletCreateParams, + type GPUDropletListParams as GPUDropletListParams, + type GPUDropletDeleteByTagParams as GPUDropletDeleteByTagParams, + type GPUDropletListFirewallsParams as GPUDropletListFirewallsParams, + type GPUDropletListKernelsParams as GPUDropletListKernelsParams, + type GPUDropletListSnapshotsParams as GPUDropletListSnapshotsParams +}; + +export { + Inference as Inference +}; + +export { + KnowledgeBases as KnowledgeBases, + type APIKnowledgeBase as APIKnowledgeBase, + type KnowledgeBaseCreateResponse as KnowledgeBaseCreateResponse, + type KnowledgeBaseRetrieveResponse as KnowledgeBaseRetrieveResponse, + type KnowledgeBaseUpdateResponse as KnowledgeBaseUpdateResponse, + type KnowledgeBaseListResponse as KnowledgeBaseListResponse, + type KnowledgeBaseDeleteResponse as KnowledgeBaseDeleteResponse, + type KnowledgeBaseListIndexingJobsResponse as KnowledgeBaseListIndexingJobsResponse, + type KnowledgeBaseCreateParams as KnowledgeBaseCreateParams, + type KnowledgeBaseUpdateParams as KnowledgeBaseUpdateParams, + type KnowledgeBaseListParams as KnowledgeBaseListParams +}; + +export { + Models as Models, + type APIAgreement as APIAgreement, + type APIModel as APIModel, + type APIModelVersion as APIModelVersion, + type ModelListResponse as ModelListResponse, + type ModelListParams as ModelListParams +}; + +export { + Regions as Regions, + type RegionListResponse as RegionListResponse, + type RegionListParams as RegionListParams +}; + +export { + Databases as Databases +}; + +export { + Nfs as Nfs, + type NfCreateResponse as NfCreateResponse, + type NfRetrieveResponse as NfRetrieveResponse, + type NfListResponse as NfListResponse, + type NfInitiateActionResponse as NfInitiateActionResponse, + type NfCreateParams as NfCreateParams, + type NfRetrieveParams as NfRetrieveParams, + type NfListParams as NfListParams, + type NfDeleteParams as NfDeleteParams, + type NfInitiateActionParams as NfInitiateActionParams +}; + +export { + Retrieve as Retrieve, + type RetrieveDocumentsResponse as RetrieveDocumentsResponse, + type RetrieveDocumentsParams as RetrieveDocumentsParams +}; + +export { + Apps as Apps +}; + +export { + Billing as Billing, + type BillingListInsightsResponse as BillingListInsightsResponse, + type BillingListInsightsParams as BillingListInsightsParams +}; + +export type Action = API.Action; +export type ActionLink = API.ActionLink; +export type APILinks = API.APILinks; +export type APIMeta = API.APIMeta; +export type BackwardLinks = API.BackwardLinks; +export type ChatCompletionChunk = API.ChatCompletionChunk; +export type ChatCompletionTokenLogprob = API.ChatCompletionTokenLogprob; +export type CompletionUsage = API.CompletionUsage; +export type CreateResponseResponse = API.CreateResponseResponse; +export type CreateResponseStreamResponse = API.CreateResponseStreamResponse; +export type DiskInfo = API.DiskInfo; +export type Droplet = API.Droplet; +export type DropletNextBackupWindow = API.DropletNextBackupWindow; +export type FirewallRuleTarget = API.FirewallRuleTarget; +export type ForwardLinks = API.ForwardLinks; +export type GarbageCollection = API.GarbageCollection; +export type GPUInfo = API.GPUInfo; +export type Image = API.Image; +export type ImageGenCompletedEvent = API.ImageGenCompletedEvent; +export type ImageGenPartialImageEvent = API.ImageGenPartialImageEvent; +export type ImageGenStreamEvent = API.ImageGenStreamEvent; +export type Kernel = API.Kernel; +export type MetaProperties = API.MetaProperties; +export type NetworkV4 = API.NetworkV4; +export type NetworkV6 = API.NetworkV6; +export type PageLinks = API.PageLinks; +export type Region = API.Region; +export type Size = API.Size; +export type Snapshots = API.Snapshots; +export type Subscription = API.Subscription; +export type SubscriptionTierBase = API.SubscriptionTierBase; +export type VpcPeering = API.VpcPeering; + } diff --git a/src/core/api-promise.ts b/src/core/api-promise.ts index c56dfce1..1f372cb3 100644 --- a/src/core/api-promise.ts +++ b/src/core/api-promise.ts @@ -16,10 +16,7 @@ export class APIPromise extends Promise { constructor( client: Gradient, private responsePromise: Promise, - private parseResponse: ( - client: Gradient, - props: APIResponseProps, - ) => PromiseOrValue = defaultParseResponse, + private parseResponse: (client: Gradient, props: APIResponseProps) => PromiseOrValue = defaultParseResponse, ) { super((resolve) => { // this is maybe a bit weird but this has to be a no-op to not implicitly @@ -31,9 +28,7 @@ export class APIPromise extends Promise { } _thenUnwrap(transform: (data: T, props: APIResponseProps) => U): APIPromise { - return new APIPromise(this.#client, this.responsePromise, async (client, props) => - transform(await this.parseResponse(client, props), props), - ); + return new APIPromise(this.#client, this.responsePromise, async (client, props) => transform(await this.parseResponse(client, props), props)); } /** diff --git a/src/core/error.ts b/src/core/error.ts index f550fbce..1ea76dd2 100644 --- a/src/core/error.ts +++ b/src/core/error.ts @@ -2,13 +2,10 @@ import { castToError } from '../internal/errors'; -export class GradientError extends Error {} +export class GradientError extends Error { +} -export class APIError< - TStatus extends number | undefined = number | undefined, - THeaders extends Headers | undefined = Headers | undefined, - TError extends Object | undefined = Object | undefined, -> extends GradientError { +export class APIError extends GradientError { /** HTTP status for the response that caused the error */ readonly status: TStatus; /** HTTP headers for the response that caused the error */ @@ -16,6 +13,9 @@ export class APIError< /** JSON body of the response that caused the error */ readonly error: TError; + + ; + constructor(status: TStatus, error: TError, message: string | undefined, headers: THeaders) { super(`${APIError.makeMessage(status, error, message)}`); this.status = status; @@ -26,8 +26,7 @@ export class APIError< private static makeMessage(status: number | undefined, error: any, message: string | undefined) { const msg = error?.message ? - typeof error.message === 'string' ? - error.message + typeof error.message === 'string' ? error.message : JSON.stringify(error.message) : error ? JSON.stringify(error) : message; @@ -44,12 +43,7 @@ export class APIError< return '(no status code or body)'; } - static generate( - status: number | undefined, - errorResponse: Object | undefined, - message: string | undefined, - headers: Headers | undefined, - ): APIError { + static generate(status: number | undefined, errorResponse: Object | undefined, message: string | undefined, headers: Headers | undefined): APIError { if (!status || !headers) { return new APIConnectionError({ message, cause: castToError(errorResponse) }); } @@ -113,18 +107,26 @@ export class APIConnectionTimeoutError extends APIConnectionError { } } -export class BadRequestError extends APIError<400, Headers> {} +export class BadRequestError extends APIError<400, Headers> { +} -export class AuthenticationError extends APIError<401, Headers> {} +export class AuthenticationError extends APIError<401, Headers> { +} -export class PermissionDeniedError extends APIError<403, Headers> {} +export class PermissionDeniedError extends APIError<403, Headers> { +} -export class NotFoundError extends APIError<404, Headers> {} +export class NotFoundError extends APIError<404, Headers> { +} -export class ConflictError extends APIError<409, Headers> {} +export class ConflictError extends APIError<409, Headers> { +} -export class UnprocessableEntityError extends APIError<422, Headers> {} +export class UnprocessableEntityError extends APIError<422, Headers> { +} -export class RateLimitError extends APIError<429, Headers> {} +export class RateLimitError extends APIError<429, Headers> { +} -export class InternalServerError extends APIError {} +export class InternalServerError extends APIError { +} diff --git a/src/core/streaming.ts b/src/core/streaming.ts index d909add7..4aec1467 100644 --- a/src/core/streaming.ts +++ b/src/core/streaming.ts @@ -8,7 +8,7 @@ import { encodeUTF8 } from '../internal/utils/bytes'; import { loggerFor } from '../internal/utils/log'; import type { Gradient } from '../client'; -import { APIError } from './error'; +import { APIError } from './error';; type Bytes = string | ArrayBuffer | Uint8Array | null | undefined; @@ -31,44 +31,46 @@ export class Stream implements AsyncIterable { this.#client = client; } - static fromSSEResponse( - response: Response, - controller: AbortController, - client?: Gradient, - ): Stream { + static fromSSEResponse(response: Response, +controller: AbortController, +client?: Gradient,): Stream { let consumed = false; const logger = client ? loggerFor(client) : console; async function* iterator(): AsyncIterator { if (consumed) { - throw new GradientError('Cannot iterate over a consumed stream, use `.tee()` to split the stream.'); + throw new GradientError( + 'Cannot iterate over a consumed stream, use `.tee()` to split the stream.', + ); } consumed = true; let done = false; try { for await (const sse of _iterSSEMessages(response, controller)) { if (done) continue; - + if (sse.data.startsWith('[DONE]')) { done = true; continue; - } else { + } + + else { let data; - + try { - data = JSON.parse(sse.data); + data = JSON.parse(sse.data) as any; } catch (e) { logger.error(`Could not parse message into JSON:`, sse.data); logger.error(`From chunk:`, sse.raw); throw e; } - + if (data && data.error) { - throw new APIError(undefined, data.error, undefined, response.headers); + throw new APIError(undefined, data.error, undefined, response.headers) } - - yield data; - } + + yield data + }; } done = true; } catch (e) { @@ -112,14 +114,16 @@ export class Stream implements AsyncIterable { async function* iterator(): AsyncIterator { if (consumed) { - throw new GradientError('Cannot iterate over a consumed stream, use `.tee()` to split the stream.'); + throw new GradientError( + 'Cannot iterate over a consumed stream, use `.tee()` to split the stream.', + ); } consumed = true; let done = false; try { for await (const line of iterLines()) { if (done) continue; - if (line) yield JSON.parse(line); + if (line) yield JSON.parse(line) as Item; } done = true; } catch (e) { diff --git a/src/error.ts b/src/error.ts index fc55f46c..d0832d34 100644 --- a/src/error.ts +++ b/src/error.ts @@ -1,2 +1,2 @@ /** @deprecated Import from ./core/error instead */ -export * from './core/error'; +export * from "./core/error" \ No newline at end of file diff --git a/src/index.ts b/src/index.ts index bb264809..18781493 100644 --- a/src/index.ts +++ b/src/index.ts @@ -5,21 +5,7 @@ export { Gradient as default } from './client'; export { type Uploadable, toFile } from './core/uploads'; export { APIPromise } from './core/api-promise'; export { Gradient, type ClientOptions } from './client'; -export { - GradientError, - APIError, - APIConnectionError, - APIConnectionTimeoutError, - APIUserAbortError, - NotFoundError, - ConflictError, - RateLimitError, - BadRequestError, - AuthenticationError, - InternalServerError, - PermissionDeniedError, - UnprocessableEntityError, -} from './core/error'; +export { GradientError, APIError, APIConnectionError, APIConnectionTimeoutError, APIUserAbortError, NotFoundError, ConflictError, RateLimitError, BadRequestError, AuthenticationError, InternalServerError, PermissionDeniedError, UnprocessableEntityError } from './core/error'; // Export knowledge base helpers export { diff --git a/src/internal/builtin-types.ts b/src/internal/builtin-types.ts index c23d3bde..6059d5db 100644 --- a/src/internal/builtin-types.ts +++ b/src/internal/builtin-types.ts @@ -1,20 +1,23 @@ // File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details. -export type Fetch = (input: string | URL | Request, init?: RequestInit) => Promise; +export type Fetch = ( + input: string | URL | Request, + init?: RequestInit, +) => Promise /** * An alias to the builtin `RequestInit` type so we can * easily alias it in import statements if there are name clashes. - * - * https://developer.mozilla.org/docs/Web/API/RequestInit + * + * https://developer.mozilla.org/docs/Web/API/RequestInit */ type _RequestInit = RequestInit; /** * An alias to the builtin `Response` type so we can * easily alias it in import statements if there are name clashes. - * - * https://developer.mozilla.org/docs/Web/API/Response + * + * https://developer.mozilla.org/docs/Web/API/Response */ type _Response = Response; @@ -51,15 +54,7 @@ type _Array = Array; */ type _Record = Record; -export type { - _Array as Array, - _BodyInit as BodyInit, - _HeadersInit as HeadersInit, - _Record as Record, - _RequestInfo as RequestInfo, - _RequestInit as RequestInit, - _Response as Response, -}; +export type { _Array as Array, _BodyInit as BodyInit, _HeadersInit as HeadersInit, _Record as Record, _RequestInfo as RequestInfo, _RequestInit as RequestInit, _Response as Response }; /** * A copy of the builtin `EndingType` type as it isn't fully supported in certain diff --git a/src/internal/detect-platform.ts b/src/internal/detect-platform.ts index 0120a785..184d0c13 100644 --- a/src/internal/detect-platform.ts +++ b/src/internal/detect-platform.ts @@ -40,11 +40,7 @@ function getDetectedPlatform(): DetectedPlatform { return 'edge'; } // Node.js - if ( - Object.prototype.toString.call( - typeof (globalThis as any).process !== 'undefined' ? (globalThis as any).process : 0, - ) === '[object process]' - ) { + if (Object.prototype.toString.call(typeof (globalThis as any).process !== 'undefined' ? (globalThis as any).process : 0) === '[object process]') { return 'node'; } // Fallback Node.js heuristic for environments where toString check fails (e.g., some test runners) diff --git a/src/internal/errors.ts b/src/internal/errors.ts index 82c7b14d..c14a742b 100644 --- a/src/internal/errors.ts +++ b/src/internal/errors.ts @@ -2,12 +2,12 @@ export function isAbortError(err: unknown) { return ( - typeof err === 'object' && - err !== null && - // Spec-compliant fetch implementations - (('name' in err && (err as any).name === 'AbortError') || + typeof err === 'object' && err !== null && ( + // Spec-compliant fetch implementations + ('name' in err && (err as any).name === 'AbortError') || // Expo fetch - ('message' in err && String((err as any).message).includes('FetchRequestCanceledException'))) + ('message' in err && String((err as any).message).includes('FetchRequestCanceledException')) + ) ); } @@ -24,10 +24,10 @@ export const castToError = (err: any): Error => { if (err.name) error.name = err.name; return error; } - } catch {} + } catch { } try { return new Error(JSON.stringify(err)); - } catch {} + } catch { } } return new Error(err); }; diff --git a/src/internal/headers.ts b/src/internal/headers.ts index c724a9d2..fa2ea2b9 100644 --- a/src/internal/headers.ts +++ b/src/internal/headers.ts @@ -1,6 +1,6 @@ // File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details. -import { isReadonlyArray } from './utils/values'; +import { isReadonlyArray } from "./utils/values"; type HeaderValue = string | undefined | null; export type HeadersLike = @@ -51,7 +51,7 @@ function* iterateHeaders(headers: HeadersLike): IterableIterator(client: Gradient, props: APIRespon const mediaType = contentType?.split(';')[0]?.trim(); const isJSON = mediaType?.includes('application/json') || mediaType?.endsWith('+json'); if (isJSON) { + const contentLength = response.headers.get('content-length'); + if (contentLength === '0') { + // if there is no content we can't do anything + return undefined as T; + } + const json = await response.json(); return json as T; } @@ -50,15 +56,6 @@ export async function defaultParseResponse(client: Gradient, props: APIRespon const text = await response.text(); return text as unknown as T; })(); - loggerFor(client).debug( - `[${requestLogID}] response parsed`, - formatRequestDetails({ - retryOfRequestLogID, - url: response.url, - status: response.status, - body, - durationMs: Date.now() - startTime, - }), - ); + loggerFor(client).debug(`[${requestLogID}] response parsed`, formatRequestDetails({ retryOfRequestLogID, url: response.url, status: response.status, body, durationMs: Date.now() - startTime })); return body; } diff --git a/src/internal/qs/utils.ts b/src/internal/qs/utils.ts index 4cd56579..f21d955b 100644 --- a/src/internal/qs/utils.ts +++ b/src/internal/qs/utils.ts @@ -62,7 +62,10 @@ export function merge( if (isArray(target)) { target.push(source); } else if (target && typeof target === 'object') { - if ((options && (options.plainObjects || options.allowPrototypes)) || !has(Object.prototype, source)) { + if ( + (options && (options.plainObjects || options.allowPrototypes)) || + !has(Object.prototype, source) + ) { target[source] = true; } } else { diff --git a/src/internal/request-options.ts b/src/internal/request-options.ts index 56765e5a..0a02e610 100644 --- a/src/internal/request-options.ts +++ b/src/internal/request-options.ts @@ -77,11 +77,14 @@ export type RequestOptions = { defaultBaseURL?: string | undefined; __binaryResponse?: boolean | undefined; - __streamClass?: typeof Stream; + __streamClass?: typeof Stream }; export type EncodedContent = { bodyHeaders: HeadersLike; body: BodyInit }; -export type RequestEncoder = (request: { headers: NullableHeaders; body: unknown }) => EncodedContent; +export type RequestEncoder = (request: { + headers: NullableHeaders; + body: unknown; +}) => EncodedContent; export const FallbackEncoder: RequestEncoder = ({ headers, body }) => { return { diff --git a/src/internal/shim-types.ts b/src/internal/shim-types.ts index 8ddf7b0a..accbf576 100644 --- a/src/internal/shim-types.ts +++ b/src/internal/shim-types.ts @@ -19,8 +19,8 @@ type _ConditionalNodeReadableStream = typeof globalThis extends { ReadableStream: any } ? never : _NodeReadableStream; type _ReadableStream = NeverToAny< - | ([0] extends [1 & _DOMReadableStream] ? never : _DOMReadableStream) - | ([0] extends [1 & _ConditionalNodeReadableStream] ? never : _ConditionalNodeReadableStream) + ([0] extends [1 & _DOMReadableStream] ? never : _DOMReadableStream) | + ([0] extends [1 & _ConditionalNodeReadableStream] ? never : _ConditionalNodeReadableStream) >; export type { _ReadableStream as ReadableStream }; diff --git a/src/internal/shims.ts b/src/internal/shims.ts index 988f35aa..603421e2 100644 --- a/src/internal/shims.ts +++ b/src/internal/shims.ts @@ -27,9 +27,7 @@ export function makeReadableStream(...args: ReadableStreamArgs): ReadableStream if (typeof ReadableStream === 'undefined') { // Note: All of the platforms / runtimes we officially support already define // `ReadableStream` as a global, so this should only ever be hit on unsupported runtimes. - throw new Error( - '`ReadableStream` is not defined as a global; You will need to polyfill it, `globalThis.ReadableStream = ReadableStream`', - ); + throw new Error('`ReadableStream` is not defined as a global; You will need to polyfill it, `globalThis.ReadableStream = ReadableStream`'); } return new ReadableStream(...args); diff --git a/src/internal/to-file.ts b/src/internal/to-file.ts index 30eada32..c72a2b41 100644 --- a/src/internal/to-file.ts +++ b/src/internal/to-file.ts @@ -1,4 +1,4 @@ -import { BlobPart, getName, makeFile, isAsyncIterable } from './uploads'; +import { BlobPart, getName, makeFile, isAsyncIterable } from "./uploads"; import type { FilePropertyBag } from './builtin-types'; import { checkFileSupport } from './uploads'; @@ -65,11 +65,8 @@ const isResponseLike = (value: any): value is ResponseLike => typeof value.url === 'string' && typeof value.blob === 'function'; -export type ToFileInput = - | FileLike - | ResponseLike - | Exclude - | AsyncIterable; +export type ToFileInput = FileLike | ResponseLike | Exclude | AsyncIterable; + /** * Helper for creating a {@link File} to pass to an SDK upload method from a variety of different data formats @@ -119,7 +116,9 @@ export async function toFile( return makeFile(parts, name, options); } -async function getBytes(value: BlobLikePart | AsyncIterable): Promise> { +async function getBytes( + value: BlobLikePart | AsyncIterable, +): Promise> { let parts: Array = []; if ( typeof value === 'string' || @@ -152,3 +151,4 @@ function propsForError(value: unknown): string { const props = Object.getOwnPropertyNames(value); return `; props: [${props.map((p) => `"${p}"`).join(', ')}]`; } + diff --git a/src/internal/types.ts b/src/internal/types.ts index b668dfc0..c45fee32 100644 --- a/src/internal/types.ts +++ b/src/internal/types.ts @@ -7,40 +7,34 @@ export type KeysEnum = { [P in keyof Required]: true }; export type FinalizedRequestInit = RequestInit & { headers: Headers }; -type NotAny = [0] extends [1 & T] ? never : T; +type NotAny = [0] extends [(1 & T)] ? never : T; /** * Some environments overload the global fetch function, and Parameters only gets the last signature. */ -type OverloadedParameters = - T extends ( - { +type OverloadedParameters = T extends { + (...args: infer A): unknown; + (...args: infer B): unknown; + (...args: infer C): unknown; + (...args: infer D): unknown; +} + ? A | B | C | D + : T extends { (...args: infer A): unknown; (...args: infer B): unknown; (...args: infer C): unknown; - (...args: infer D): unknown; } - ) ? - A | B | C | D - : T extends ( - { - (...args: infer A): unknown; - (...args: infer B): unknown; - (...args: infer C): unknown; - } - ) ? - A | B | C - : T extends ( - { + ? A | B | C + : T extends { (...args: infer A): unknown; (...args: infer B): unknown; } - ) ? - A | B - : T extends (...args: infer A) => unknown ? A + ? A | B + : T extends (...args: infer A) => unknown + ? A : never; -/* eslint-disable */ + /** * These imports attempt to get types from a parent package's dependencies. * Unresolved bare specifiers can trigger [automatic type acquisition][1] in some projects, which @@ -63,19 +57,19 @@ type OverloadedParameters = * * [1]: https://www.typescriptlang.org/tsconfig/#typeAcquisition */ -/** @ts-ignore For users with \@types/node */ +/** @ts-ignore For users with \@types/node */ /* prettier-ignore */ type UndiciTypesRequestInit = NotAny | NotAny | NotAny | NotAny | NotAny | NotAny | NotAny | NotAny | NotAny | NotAny; -/** @ts-ignore For users with undici */ +/** @ts-ignore For users with undici */ /* prettier-ignore */ type UndiciRequestInit = NotAny | NotAny | NotAny | NotAny | NotAny | NotAny | NotAny | NotAny | NotAny | NotAny; -/** @ts-ignore For users with \@types/bun */ +/** @ts-ignore For users with \@types/bun */ /* prettier-ignore */ type BunRequestInit = globalThis.FetchRequestInit; -/** @ts-ignore For users with node-fetch@2 */ +/** @ts-ignore For users with node-fetch@2 */ /* prettier-ignore */ type NodeFetch2RequestInit = NotAny | NotAny | NotAny | NotAny | NotAny | NotAny | NotAny | NotAny | NotAny | NotAny; -/** @ts-ignore For users with node-fetch@3, doesn't need file extension because types are at ./@types/index.d.ts */ +/** @ts-ignore For users with node-fetch@3, doesn't need file extension because types are at ./@types/index.d.ts */ /* prettier-ignore */ type NodeFetch3RequestInit = NotAny | NotAny | NotAny | NotAny | NotAny | NotAny | NotAny | NotAny | NotAny | NotAny; -/** @ts-ignore For users who use Deno */ +/** @ts-ignore For users who use Deno */ /* prettier-ignore */ type FetchRequestInit = NonNullable[1]>; -/* eslint-enable */ + type RequestInits = | NotAny diff --git a/src/internal/utils.ts b/src/internal/utils.ts index 3cbfacce..c591353b 100644 --- a/src/internal/utils.ts +++ b/src/internal/utils.ts @@ -6,3 +6,4 @@ export * from './utils/env'; export * from './utils/log'; export * from './utils/uuid'; export * from './utils/sleep'; +export * from './utils/query'; diff --git a/src/internal/utils/env.ts b/src/internal/utils/env.ts index 2d848007..cc5fa0fa 100644 --- a/src/internal/utils/env.ts +++ b/src/internal/utils/env.ts @@ -9,10 +9,10 @@ */ export const readEnv = (env: string): string | undefined => { if (typeof (globalThis as any).process !== 'undefined') { - return (globalThis as any).process.env?.[env]?.trim() ?? undefined; + return (globalThis as any).process.env?.[env]?.trim() || undefined; } if (typeof (globalThis as any).Deno !== 'undefined') { - return (globalThis as any).Deno.env?.get?.(env)?.trim(); + return (globalThis as any).Deno.env?.get?.(env)?.trim() || undefined; } return undefined; }; diff --git a/src/internal/utils/log.ts b/src/internal/utils/log.ts index e8a930fa..06541df6 100644 --- a/src/internal/utils/log.ts +++ b/src/internal/utils/log.ts @@ -4,7 +4,7 @@ import { hasOwn } from './values'; import { type Gradient } from '../../client'; import { RequestOptions } from '../request-options'; -type LogFn = (message: string, ...rest: unknown[]) => void; +type LogFn = (message: string, ...rest: unknown[]) => void export type Logger = { error: LogFn; warn: LogFn; @@ -21,22 +21,14 @@ const levelNumbers = { debug: 500, }; -export const parseLogLevel = ( - maybeLevel: string | undefined, - sourceName: string, - client: Gradient, -): LogLevel | undefined => { +export const parseLogLevel = (maybeLevel: string | undefined, sourceName: string, client: Gradient): LogLevel | undefined => { if (!maybeLevel) { return undefined; } if (hasOwn(levelNumbers, maybeLevel)) { return maybeLevel; - } - loggerFor(client).warn( - `${sourceName} was set to ${JSON.stringify(maybeLevel)}, expected one of ${JSON.stringify( - Object.keys(levelNumbers), - )}`, - ); + }; + loggerFor(client).warn(`${sourceName} was set to ${JSON.stringify(maybeLevel)}, expected one of ${JSON.stringify(Object.keys(levelNumbers))}`); return undefined; }; @@ -97,24 +89,11 @@ export const formatRequestDetails = (details: { body?: unknown; }) => { if (details.options) { - details.options = { ...details.options }; + details.options = {...details.options}; delete details.options['headers']; // redundant + leaks internals } if (details.headers) { - details.headers = Object.fromEntries( - (details.headers instanceof Headers ? [...details.headers] : Object.entries(details.headers)).map( - ([name, value]) => [ - name, - ( - name.toLowerCase() === 'authorization' || - name.toLowerCase() === 'cookie' || - name.toLowerCase() === 'set-cookie' - ) ? - '***' - : value, - ], - ), - ); + details.headers = Object.fromEntries((details.headers instanceof Headers ? [...details.headers] : Object.entries(details.headers)).map(([name, value]) => [name, name.toLowerCase() === 'authorization' || name.toLowerCase() === 'cookie' || name.toLowerCase() === 'set-cookie' ? '***' : value])) } if ('retryOfRequestLogID' in details) { if (details.retryOfRequestLogID) { @@ -122,5 +101,5 @@ export const formatRequestDetails = (details: { } delete details.retryOfRequestLogID; } - return details; -}; + return details +} diff --git a/src/internal/utils/query.ts b/src/internal/utils/query.ts new file mode 100644 index 00000000..06e72d93 --- /dev/null +++ b/src/internal/utils/query.ts @@ -0,0 +1,7 @@ +// File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details. + +import * as qs from '../qs/stringify'; + +export function stringifyQuery(query: object | Record) { + return qs.stringify(query, { arrayFormat: 'comma' }) +} diff --git a/src/internal/utils/uuid.ts b/src/internal/utils/uuid.ts index b0e53aaf..53708ba6 100644 --- a/src/internal/utils/uuid.ts +++ b/src/internal/utils/uuid.ts @@ -10,8 +10,10 @@ export let uuid4 = function () { return crypto.randomUUID(); } const u8 = new Uint8Array(1); - const randomByte = crypto ? () => crypto.getRandomValues(u8)[0]! : () => (Math.random() * 0xff) & 0xff; - return '10000000-1000-4000-8000-100000000000'.replace(/[018]/g, (c) => + const randomByte = crypto + ? () => crypto.getRandomValues(u8)[0]! + : () => (Math.random() * 0xff) & 0xff; + return "10000000-1000-4000-8000-100000000000".replace(/[018]/g, (c) => (+c ^ (randomByte() & (15 >> (+c / 4)))).toString(16), ); -}; +} diff --git a/src/resource.ts b/src/resource.ts index 363e3516..57a27a94 100644 --- a/src/resource.ts +++ b/src/resource.ts @@ -1,2 +1,2 @@ /** @deprecated Import from ./core/resource instead */ -export * from './core/resource'; +export * from "./core/resource" \ No newline at end of file diff --git a/src/resources/agents/agents.ts b/src/resources/agents/agents.ts index ba6d606b..826ca7ea 100644 --- a/src/resources/agents/agents.ts +++ b/src/resources/agents/agents.ts @@ -6,105 +6,27 @@ import * as AgentsAPI from './agents'; import * as Shared from '../shared'; import * as APIKeysAPI from './api-keys'; import { GradientError } from '../../core/error'; -import { - APIKeyCreateParams, - APIKeyCreateResponse, - APIKeyDeleteParams, - APIKeyDeleteResponse, - APIKeyListParams, - APIKeyListResponse, - APIKeyRegenerateParams, - APIKeyRegenerateResponse, - APIKeyUpdateParams, - APIKeyUpdateResponse, - APIKeys, -} from './api-keys'; +import { APIKeyCreateParams, APIKeyCreateResponse, APIKeyDeleteParams, APIKeyDeleteResponse, APIKeyListParams, APIKeyListResponse, APIKeyRegenerateParams, APIKeyRegenerateResponse, APIKeyUpdateParams, APIKeyUpdateResponse, APIKeys } from './api-keys'; import * as EvaluationDatasetsAPI from './evaluation-datasets'; -import { - EvaluationDatasetCreateFileUploadPresignedURLsParams, - EvaluationDatasetCreateFileUploadPresignedURLsResponse, - EvaluationDatasetCreateParams, - EvaluationDatasetCreateResponse, - EvaluationDatasets, -} from './evaluation-datasets'; +import { EvaluationDatasetCreateFileUploadPresignedURLsParams, EvaluationDatasetCreateFileUploadPresignedURLsResponse, EvaluationDatasetCreateParams, EvaluationDatasetCreateResponse, EvaluationDatasets } from './evaluation-datasets'; import * as EvaluationRunsAPI from './evaluation-runs'; -import { - APIEvaluationMetric, - APIEvaluationMetricResult, - APIEvaluationPrompt, - APIEvaluationRun, - EvaluationRunCreateParams, - EvaluationRunCreateResponse, - EvaluationRunListResultsParams, - EvaluationRunListResultsResponse, - EvaluationRunRetrieveResponse, - EvaluationRunRetrieveResultsParams, - EvaluationRunRetrieveResultsResponse, - EvaluationRuns, -} from './evaluation-runs'; +import { APIEvaluationMetric, APIEvaluationMetricResult, APIEvaluationPrompt, APIEvaluationRun, EvaluationRunCreateParams, EvaluationRunCreateResponse, EvaluationRunListResultsParams, EvaluationRunListResultsResponse, EvaluationRunRetrieveResponse, EvaluationRunRetrieveResultsParams, EvaluationRunRetrieveResultsResponse, EvaluationRuns } from './evaluation-runs'; import * as EvaluationTestCasesAPI from './evaluation-test-cases'; -import { - APIEvaluationTestCase, - APIStarMetric, - EvaluationTestCaseCreateParams, - EvaluationTestCaseCreateResponse, - EvaluationTestCaseListEvaluationRunsParams, - EvaluationTestCaseListEvaluationRunsResponse, - EvaluationTestCaseListResponse, - EvaluationTestCaseRetrieveParams, - EvaluationTestCaseRetrieveResponse, - EvaluationTestCaseUpdateParams, - EvaluationTestCaseUpdateResponse, - EvaluationTestCases, -} from './evaluation-test-cases'; +import { APIEvaluationTestCase, APIStarMetric, EvaluationTestCaseCreateParams, EvaluationTestCaseCreateResponse, EvaluationTestCaseListEvaluationRunsParams, EvaluationTestCaseListEvaluationRunsResponse, EvaluationTestCaseListResponse, EvaluationTestCaseRetrieveParams, EvaluationTestCaseRetrieveResponse, EvaluationTestCaseUpdateParams, EvaluationTestCaseUpdateResponse, EvaluationTestCases } from './evaluation-test-cases'; import * as FunctionsAPI from './functions'; -import { - FunctionCreateParams, - FunctionCreateResponse, - FunctionDeleteParams, - FunctionDeleteResponse, - FunctionUpdateParams, - FunctionUpdateResponse, - Functions, -} from './functions'; +import { FunctionCreateParams, FunctionCreateResponse, FunctionDeleteParams, FunctionDeleteResponse, FunctionUpdateParams, FunctionUpdateResponse, Functions } from './functions'; import * as KnowledgeBasesAPI from './knowledge-bases'; -import { - APILinkKnowledgeBaseOutput, - KnowledgeBaseAttachSingleParams, - KnowledgeBaseDetachParams, - KnowledgeBaseDetachResponse, - KnowledgeBases, -} from './knowledge-bases'; +import { APILinkKnowledgeBaseOutput, KnowledgeBaseAttachSingleParams, KnowledgeBaseDetachParams, KnowledgeBaseDetachResponse, KnowledgeBases } from './knowledge-bases'; import * as RoutesAPI from './routes'; -import { - RouteAddParams, - RouteAddResponse, - RouteDeleteParams, - RouteDeleteResponse, - RouteUpdateParams, - RouteUpdateResponse, - RouteViewResponse, - Routes, -} from './routes'; +import { RouteAddParams, RouteAddResponse, RouteDeleteParams, RouteDeleteResponse, RouteUpdateParams, RouteUpdateResponse, RouteViewResponse, Routes } from './routes'; import * as VersionsAPI from './versions'; -import { - VersionListParams, - VersionListResponse, - VersionUpdateParams, - VersionUpdateResponse, - Versions, -} from './versions'; -import * as KnowledgeBasesKnowledgeBasesAPI from '../knowledge-bases/knowledge-bases'; +import { VersionListParams, VersionListResponse, VersionUpdateParams, VersionUpdateResponse, Versions } from './versions'; +import * as ResourcesKnowledgeBasesAPI from '../knowledge-bases/knowledge-bases'; import * as ModelsAPI from '../models/models'; import * as ChatAPI from './chat/chat'; import { Chat } from './chat/chat'; import * as EvaluationMetricsAPI from './evaluation-metrics/evaluation-metrics'; -import { - EvaluationMetricListRegionsParams, - EvaluationMetricListRegionsResponse, - EvaluationMetricListResponse, - EvaluationMetrics, -} from './evaluation-metrics/evaluation-metrics'; +import { EvaluationMetricListRegionsParams, EvaluationMetricListRegionsResponse, EvaluationMetricListResponse, EvaluationMetrics } from './evaluation-metrics/evaluation-metrics'; import { APIPromise } from '../../core/api-promise'; import { RequestOptions } from '../../internal/request-options'; import { path } from '../../internal/utils/path'; @@ -136,18 +58,16 @@ export class AgentDeploymentError extends GradientError { } } +/** + * The API lets you build GPU-powered AI agents with pre-built or custom foundation models, function and agent routes, and RAG pipelines with knowledge bases. + */ export class Agents extends APIResource { apiKeys: APIKeysAPI.APIKeys = new APIKeysAPI.APIKeys(this._client); chat: ChatAPI.Chat = new ChatAPI.Chat(this._client); - evaluationMetrics: EvaluationMetricsAPI.EvaluationMetrics = new EvaluationMetricsAPI.EvaluationMetrics( - this._client, - ); + evaluationMetrics: EvaluationMetricsAPI.EvaluationMetrics = new EvaluationMetricsAPI.EvaluationMetrics(this._client); evaluationRuns: EvaluationRunsAPI.EvaluationRuns = new EvaluationRunsAPI.EvaluationRuns(this._client); - evaluationTestCases: EvaluationTestCasesAPI.EvaluationTestCases = - new EvaluationTestCasesAPI.EvaluationTestCases(this._client); - evaluationDatasets: EvaluationDatasetsAPI.EvaluationDatasets = new EvaluationDatasetsAPI.EvaluationDatasets( - this._client, - ); + evaluationTestCases: EvaluationTestCasesAPI.EvaluationTestCases = new EvaluationTestCasesAPI.EvaluationTestCases(this._client); + evaluationDatasets: EvaluationDatasetsAPI.EvaluationDatasets = new EvaluationDatasetsAPI.EvaluationDatasets(this._client); functions: FunctionsAPI.Functions = new FunctionsAPI.Functions(this._client); versions: VersionsAPI.Versions = new VersionsAPI.Versions(this._client); knowledgeBases: KnowledgeBasesAPI.KnowledgeBases = new KnowledgeBasesAPI.KnowledgeBases(this._client); @@ -162,15 +82,8 @@ export class Agents extends APIResource { * const agent = await client.agents.create(); * ``` */ - create( - body: AgentCreateParams | null | undefined = {}, - options?: RequestOptions, - ): APIPromise { - return this._client.post('/v2/gen-ai/agents', { - body, - defaultBaseURL: 'https://api.digitalocean.com', - ...options, - }); + create(body: AgentCreateParams | null | undefined = {}, options?: RequestOptions): APIPromise { + return this._client.post('/v2/gen-ai/agents', { body, defaultBaseURL: 'https://api.digitalocean.com', ...options }); } /** @@ -185,10 +98,7 @@ export class Agents extends APIResource { * ``` */ retrieve(uuid: string, options?: RequestOptions): APIPromise { - return this._client.get(path`/v2/gen-ai/agents/${uuid}`, { - defaultBaseURL: 'https://api.digitalocean.com', - ...options, - }); + return this._client.get(path`/v2/gen-ai/agents/${uuid}`, { defaultBaseURL: 'https://api.digitalocean.com', ...options }); } /** @@ -202,16 +112,8 @@ export class Agents extends APIResource { * ); * ``` */ - update( - pathUuid: string, - body: AgentUpdateParams | null | undefined = {}, - options?: RequestOptions, - ): APIPromise { - return this._client.put(path`/v2/gen-ai/agents/${pathUuid}`, { - body, - defaultBaseURL: 'https://api.digitalocean.com', - ...options, - }); + update(uuid: string, body: AgentUpdateParams | null | undefined = {}, options?: RequestOptions): APIPromise { + return this._client.put(path`/v2/gen-ai/agents/${uuid}`, { body, defaultBaseURL: 'https://api.digitalocean.com', ...options }); } /** @@ -222,15 +124,8 @@ export class Agents extends APIResource { * const agents = await client.agents.list(); * ``` */ - list( - query: AgentListParams | null | undefined = {}, - options?: RequestOptions, - ): APIPromise { - return this._client.get('/v2/gen-ai/agents', { - query, - defaultBaseURL: 'https://api.digitalocean.com', - ...options, - }); + list(query: AgentListParams | null | undefined = {}, options?: RequestOptions): APIPromise { + return this._client.get('/v2/gen-ai/agents', { query, defaultBaseURL: 'https://api.digitalocean.com', ...options }); } /** @@ -244,10 +139,7 @@ export class Agents extends APIResource { * ``` */ delete(uuid: string, options?: RequestOptions): APIPromise { - return this._client.delete(path`/v2/gen-ai/agents/${uuid}`, { - defaultBaseURL: 'https://api.digitalocean.com', - ...options, - }); + return this._client.delete(path`/v2/gen-ai/agents/${uuid}`, { defaultBaseURL: 'https://api.digitalocean.com', ...options }); } /** @@ -261,16 +153,8 @@ export class Agents extends APIResource { * ); * ``` */ - retrieveUsage( - uuid: string, - query: AgentRetrieveUsageParams | null | undefined = {}, - options?: RequestOptions, - ): APIPromise { - return this._client.get(path`/v2/gen-ai/agents/${uuid}/usage`, { - query, - defaultBaseURL: 'https://api.digitalocean.com', - ...options, - }); + retrieveUsage(uuid: string, query: AgentRetrieveUsageParams | null | undefined = {}, options?: RequestOptions): APIPromise { + return this._client.get(path`/v2/gen-ai/agents/${uuid}/usage`, { query, defaultBaseURL: 'https://api.digitalocean.com', ...options }); } /** @@ -284,16 +168,8 @@ export class Agents extends APIResource { * ); * ``` */ - updateStatus( - pathUuid: string, - body: AgentUpdateStatusParams | null | undefined = {}, - options?: RequestOptions, - ): APIPromise { - return this._client.put(path`/v2/gen-ai/agents/${pathUuid}/deployment_visibility`, { - body, - defaultBaseURL: 'https://api.digitalocean.com', - ...options, - }); + updateStatus(uuid: string, body: AgentUpdateStatusParams | null | undefined = {}, options?: RequestOptions): APIPromise { + return this._client.put(path`/v2/gen-ai/agents/${uuid}/deployment_visibility`, { body, defaultBaseURL: 'https://api.digitalocean.com', ...options }); } /** @@ -421,7 +297,7 @@ export interface APIAgent { /** * Knowledge bases */ - knowledge_bases?: Array; + knowledge_bases?: Array; logging_config?: APIAgent.LoggingConfig; @@ -432,6 +308,8 @@ export interface APIAgent { */ model?: APIAgentModel; + model_provider_key?: APIAgent.ModelProviderKey; + /** * Agent name */ @@ -521,6 +399,13 @@ export interface APIAgent { */ version_hash?: string; + /** + * VPC Egress IPs + */ + vpc_egress_ips?: Array; + + vpc_uuid?: string; + workspace?: APIWorkspace; } @@ -539,6 +424,8 @@ export namespace APIAgent { * A Chatbot */ export interface Chatbot { + allowed_domains?: Array; + button_background_color?: string; logo?: string; @@ -579,16 +466,7 @@ export namespace APIAgent { */ name?: string; - status?: - | 'STATUS_UNKNOWN' - | 'STATUS_WAITING_FOR_DEPLOYMENT' - | 'STATUS_DEPLOYING' - | 'STATUS_RUNNING' - | 'STATUS_FAILED' - | 'STATUS_WAITING_FOR_UNDEPLOYMENT' - | 'STATUS_UNDEPLOYING' - | 'STATUS_UNDEPLOYMENT_FAILED' - | 'STATUS_DELETED'; + status?: 'STATUS_UNKNOWN' | 'STATUS_WAITING_FOR_DEPLOYMENT' | 'STATUS_DEPLOYING' | 'STATUS_RUNNING' | 'STATUS_FAILED' | 'STATUS_WAITING_FOR_UNDEPLOYMENT' | 'STATUS_UNDEPLOYING' | 'STATUS_UNDEPLOYMENT_FAILED' | 'STATUS_DELETED' | 'STATUS_BUILDING'; /** * Last modified @@ -695,11 +573,7 @@ export namespace APIAgent { priority?: number; - type?: - | 'GUARDRAIL_TYPE_UNKNOWN' - | 'GUARDRAIL_TYPE_JAILBREAK' - | 'GUARDRAIL_TYPE_SENSITIVE_DATA' - | 'GUARDRAIL_TYPE_CONTENT_MODERATION'; + type?: 'GUARDRAIL_TYPE_UNKNOWN' | 'GUARDRAIL_TYPE_JAILBREAK' | 'GUARDRAIL_TYPE_SENSITIVE_DATA' | 'GUARDRAIL_TYPE_CONTENT_MODERATION'; updated_at?: string; @@ -738,6 +612,45 @@ export namespace APIAgent { log_stream_name?: string; } + export interface ModelProviderKey { + /** + * API key ID + */ + api_key_uuid?: string; + + /** + * Key creation date + */ + created_at?: string; + + /** + * Created by user id from DO + */ + created_by?: string; + + /** + * Key deleted date + */ + deleted_at?: string; + + /** + * Models supported by the openAI api key + */ + models?: Array; + + /** + * Name of the key + */ + name?: string; + + provider?: 'MODEL_PROVIDER_DIGITALOCEAN' | 'MODEL_PROVIDER_ANTHROPIC' | 'MODEL_PROVIDER_OPENAI'; + + /** + * Key last updated date + */ + updated_at?: string; + } + /** * Represents an AgentTemplate entity */ @@ -770,7 +683,7 @@ export namespace APIAgent { /** * List of knowledge bases associated with the agent template */ - knowledge_bases?: Array; + knowledge_bases?: Array; /** * The long description of the agent template @@ -910,6 +823,21 @@ export interface APIAgentModel { */ is_foundational?: boolean; + /** + * Default chunking size limit to show in UI + */ + kb_default_chunk_size?: number; + + /** + * Maximum chunk size limit of model + */ + kb_max_chunk_size?: number; + + /** + * Minimum chunking size token limits if model supports KNOWLEDGEBASE usecase + */ + kb_min_chunk_size?: number; + /** * Additional meta data */ @@ -945,15 +873,7 @@ export interface APIAgentModel { /** * Usecases of the model */ - usecases?: Array< - | 'MODEL_USECASE_UNKNOWN' - | 'MODEL_USECASE_AGENT' - | 'MODEL_USECASE_FINETUNED' - | 'MODEL_USECASE_KNOWLEDGEBASE' - | 'MODEL_USECASE_GUARDRAIL' - | 'MODEL_USECASE_REASONING' - | 'MODEL_USECASE_SERVERLESS' - >; + usecases?: Array<'MODEL_USECASE_UNKNOWN' | 'MODEL_USECASE_AGENT' | 'MODEL_USECASE_FINETUNED' | 'MODEL_USECASE_KNOWLEDGEBASE' | 'MODEL_USECASE_GUARDRAIL' | 'MODEL_USECASE_REASONING' | 'MODEL_USECASE_SERVERLESS'>; /** * Unique id @@ -1011,12 +931,7 @@ export interface APIAnthropicAPIKeyInfo { * - VISIBILITY_PRIVATE: The deployment is private and will only service requests * from other agents, or through API keys */ -export type APIDeploymentVisibility = - | 'VISIBILITY_UNKNOWN' - | 'VISIBILITY_DISABLED' - | 'VISIBILITY_PLAYGROUND' - | 'VISIBILITY_PUBLIC' - | 'VISIBILITY_PRIVATE'; +export type APIDeploymentVisibility = 'VISIBILITY_UNKNOWN' | 'VISIBILITY_DISABLED' | 'VISIBILITY_PLAYGROUND' | 'VISIBILITY_PUBLIC' | 'VISIBILITY_PRIVATE' /** * OpenAI API Key Info @@ -1065,12 +980,7 @@ export interface APIOpenAIAPIKeyInfo { * - RETRIEVAL_METHOD_SUB_QUERIES: The retrieval method is sub queries * - RETRIEVAL_METHOD_NONE: The retrieval method is none */ -export type APIRetrievalMethod = - | 'RETRIEVAL_METHOD_UNKNOWN' - | 'RETRIEVAL_METHOD_REWRITE' - | 'RETRIEVAL_METHOD_STEP_BACK' - | 'RETRIEVAL_METHOD_SUB_QUERIES' - | 'RETRIEVAL_METHOD_NONE'; +export type APIRetrievalMethod = 'RETRIEVAL_METHOD_UNKNOWN' | 'RETRIEVAL_METHOD_REWRITE' | 'RETRIEVAL_METHOD_STEP_BACK' | 'RETRIEVAL_METHOD_SUB_QUERIES' | 'RETRIEVAL_METHOD_NONE' export interface APIWorkspace { /** @@ -1348,6 +1258,8 @@ export namespace AgentListResponse { * A Chatbot */ export interface Chatbot { + allowed_domains?: Array; + button_background_color?: string; logo?: string; @@ -1388,16 +1300,7 @@ export namespace AgentListResponse { */ name?: string; - status?: - | 'STATUS_UNKNOWN' - | 'STATUS_WAITING_FOR_DEPLOYMENT' - | 'STATUS_DEPLOYING' - | 'STATUS_RUNNING' - | 'STATUS_FAILED' - | 'STATUS_WAITING_FOR_UNDEPLOYMENT' - | 'STATUS_UNDEPLOYING' - | 'STATUS_UNDEPLOYMENT_FAILED' - | 'STATUS_DELETED'; + status?: 'STATUS_UNKNOWN' | 'STATUS_WAITING_FOR_DEPLOYMENT' | 'STATUS_DEPLOYING' | 'STATUS_RUNNING' | 'STATUS_FAILED' | 'STATUS_WAITING_FOR_UNDEPLOYMENT' | 'STATUS_UNDEPLOYING' | 'STATUS_UNDEPLOYMENT_FAILED' | 'STATUS_DELETED' | 'STATUS_BUILDING'; /** * Last modified @@ -1459,7 +1362,7 @@ export namespace AgentListResponse { /** * List of knowledge bases associated with the agent template */ - knowledge_bases?: Array; + knowledge_bases?: Array; /** * The long description of the agent template @@ -1648,6 +1551,8 @@ export interface AgentCreateParams { */ knowledge_base_uuid?: Array; + model_provider_key_uuid?: string; + /** * Identifier for the foundation model. */ @@ -1677,11 +1582,22 @@ export interface AgentCreateParams { * Agent tag to organize related resources */ tags?: Array; + + /** + * Identifier for the workspace + */ + workspace_uuid?: string; } export interface AgentUpdateParams { agent_log_insights_enabled?: boolean; + /** + * Optional list of allowed domains for the chatbot - Must use fully qualified + * domain name (FQDN) such as https://example.com + */ + allowed_domains?: Array; + /** * Optional anthropic key uuid for use with anthropic models */ @@ -1717,6 +1633,11 @@ export interface AgentUpdateParams { */ max_tokens?: number; + /** + * Optional Model Provider uuid for use with provider models + */ + model_provider_key_uuid?: string; + /** * Identifier for the foundation model. */ @@ -1770,7 +1691,7 @@ export interface AgentUpdateParams { /** * Unique agent id */ - body_uuid?: string; + uuid?: string; } export interface AgentListParams { @@ -1807,7 +1728,7 @@ export interface AgentUpdateStatusParams { /** * Unique id */ - body_uuid?: string; + uuid?: string; /** * - VISIBILITY_UNKNOWN: The status of the deployment is unknown @@ -1855,7 +1776,7 @@ export declare namespace Agents { type AgentUpdateParams as AgentUpdateParams, type AgentListParams as AgentListParams, type AgentRetrieveUsageParams as AgentRetrieveUsageParams, - type AgentUpdateStatusParams as AgentUpdateStatusParams, + type AgentUpdateStatusParams as AgentUpdateStatusParams }; export { @@ -1869,16 +1790,18 @@ export declare namespace Agents { type APIKeyUpdateParams as APIKeyUpdateParams, type APIKeyListParams as APIKeyListParams, type APIKeyDeleteParams as APIKeyDeleteParams, - type APIKeyRegenerateParams as APIKeyRegenerateParams, + type APIKeyRegenerateParams as APIKeyRegenerateParams }; - export { Chat as Chat }; + export { + Chat as Chat + }; export { EvaluationMetrics as EvaluationMetrics, type EvaluationMetricListResponse as EvaluationMetricListResponse, type EvaluationMetricListRegionsResponse as EvaluationMetricListRegionsResponse, - type EvaluationMetricListRegionsParams as EvaluationMetricListRegionsParams, + type EvaluationMetricListRegionsParams as EvaluationMetricListRegionsParams }; export { @@ -1893,7 +1816,7 @@ export declare namespace Agents { type EvaluationRunRetrieveResultsResponse as EvaluationRunRetrieveResultsResponse, type EvaluationRunCreateParams as EvaluationRunCreateParams, type EvaluationRunListResultsParams as EvaluationRunListResultsParams, - type EvaluationRunRetrieveResultsParams as EvaluationRunRetrieveResultsParams, + type EvaluationRunRetrieveResultsParams as EvaluationRunRetrieveResultsParams }; export { @@ -1908,7 +1831,7 @@ export declare namespace Agents { type EvaluationTestCaseCreateParams as EvaluationTestCaseCreateParams, type EvaluationTestCaseRetrieveParams as EvaluationTestCaseRetrieveParams, type EvaluationTestCaseUpdateParams as EvaluationTestCaseUpdateParams, - type EvaluationTestCaseListEvaluationRunsParams as EvaluationTestCaseListEvaluationRunsParams, + type EvaluationTestCaseListEvaluationRunsParams as EvaluationTestCaseListEvaluationRunsParams }; export { @@ -1916,7 +1839,7 @@ export declare namespace Agents { type EvaluationDatasetCreateResponse as EvaluationDatasetCreateResponse, type EvaluationDatasetCreateFileUploadPresignedURLsResponse as EvaluationDatasetCreateFileUploadPresignedURLsResponse, type EvaluationDatasetCreateParams as EvaluationDatasetCreateParams, - type EvaluationDatasetCreateFileUploadPresignedURLsParams as EvaluationDatasetCreateFileUploadPresignedURLsParams, + type EvaluationDatasetCreateFileUploadPresignedURLsParams as EvaluationDatasetCreateFileUploadPresignedURLsParams }; export { @@ -1926,7 +1849,7 @@ export declare namespace Agents { type FunctionDeleteResponse as FunctionDeleteResponse, type FunctionCreateParams as FunctionCreateParams, type FunctionUpdateParams as FunctionUpdateParams, - type FunctionDeleteParams as FunctionDeleteParams, + type FunctionDeleteParams as FunctionDeleteParams }; export { @@ -1934,7 +1857,7 @@ export declare namespace Agents { type VersionUpdateResponse as VersionUpdateResponse, type VersionListResponse as VersionListResponse, type VersionUpdateParams as VersionUpdateParams, - type VersionListParams as VersionListParams, + type VersionListParams as VersionListParams }; export { @@ -1942,7 +1865,7 @@ export declare namespace Agents { type APILinkKnowledgeBaseOutput as APILinkKnowledgeBaseOutput, type KnowledgeBaseDetachResponse as KnowledgeBaseDetachResponse, type KnowledgeBaseAttachSingleParams as KnowledgeBaseAttachSingleParams, - type KnowledgeBaseDetachParams as KnowledgeBaseDetachParams, + type KnowledgeBaseDetachParams as KnowledgeBaseDetachParams }; export { @@ -1953,6 +1876,6 @@ export declare namespace Agents { type RouteViewResponse as RouteViewResponse, type RouteUpdateParams as RouteUpdateParams, type RouteDeleteParams as RouteDeleteParams, - type RouteAddParams as RouteAddParams, + type RouteAddParams as RouteAddParams }; } diff --git a/src/resources/agents/api-keys.ts b/src/resources/agents/api-keys.ts index cb9994bb..84c2a9de 100644 --- a/src/resources/agents/api-keys.ts +++ b/src/resources/agents/api-keys.ts @@ -7,6 +7,9 @@ import { APIPromise } from '../../core/api-promise'; import { RequestOptions } from '../../internal/request-options'; import { path } from '../../internal/utils/path'; +/** + * The API lets you build GPU-powered AI agents with pre-built or custom foundation models, function and agent routes, and RAG pipelines with knowledge bases. + */ export class APIKeys extends APIResource { /** * To create an agent API key, send a POST request to @@ -19,16 +22,8 @@ export class APIKeys extends APIResource { * ); * ``` */ - create( - agentUuid: string, - body: APIKeyCreateParams | null | undefined = {}, - options?: RequestOptions, - ): APIPromise { - return this._client.post(path`/v2/gen-ai/agents/${agentUuid}/api_keys`, { - body, - defaultBaseURL: 'https://api.digitalocean.com', - ...options, - }); + create(agentUuid: string, body: APIKeyCreateParams | null | undefined = {}, options?: RequestOptions): APIPromise { + return this._client.post(path`/v2/gen-ai/agents/${agentUuid}/api_keys`, { body, defaultBaseURL: 'https://api.digitalocean.com', ...options }); } /** @@ -46,17 +41,9 @@ export class APIKeys extends APIResource { * ); * ``` */ - update( - apiKeyUuid: string, - params: APIKeyUpdateParams, - options?: RequestOptions, - ): APIPromise { - const { path_agent_uuid, ...body } = params; - return this._client.put(path`/v2/gen-ai/agents/${path_agent_uuid}/api_keys/${apiKeyUuid}`, { - body, - defaultBaseURL: 'https://api.digitalocean.com', - ...options, - }); + update(apiKeyUuid: string, params: APIKeyUpdateParams, options?: RequestOptions): APIPromise { + const { path_agent_uuid, ...body } = params + return this._client.put(path`/v2/gen-ai/agents/${path_agent_uuid}/api_keys/${apiKeyUuid}`, { body, defaultBaseURL: 'https://api.digitalocean.com', ...options }); } /** @@ -70,16 +57,8 @@ export class APIKeys extends APIResource { * ); * ``` */ - list( - agentUuid: string, - query: APIKeyListParams | null | undefined = {}, - options?: RequestOptions, - ): APIPromise { - return this._client.get(path`/v2/gen-ai/agents/${agentUuid}/api_keys`, { - query, - defaultBaseURL: 'https://api.digitalocean.com', - ...options, - }); + list(agentUuid: string, query: APIKeyListParams | null | undefined = {}, options?: RequestOptions): APIPromise { + return this._client.get(path`/v2/gen-ai/agents/${agentUuid}/api_keys`, { query, defaultBaseURL: 'https://api.digitalocean.com', ...options }); } /** @@ -94,16 +73,9 @@ export class APIKeys extends APIResource { * ); * ``` */ - delete( - apiKeyUuid: string, - params: APIKeyDeleteParams, - options?: RequestOptions, - ): APIPromise { - const { agent_uuid } = params; - return this._client.delete(path`/v2/gen-ai/agents/${agent_uuid}/api_keys/${apiKeyUuid}`, { - defaultBaseURL: 'https://api.digitalocean.com', - ...options, - }); + delete(apiKeyUuid: string, params: APIKeyDeleteParams, options?: RequestOptions): APIPromise { + const { agent_uuid } = params + return this._client.delete(path`/v2/gen-ai/agents/${agent_uuid}/api_keys/${apiKeyUuid}`, { defaultBaseURL: 'https://api.digitalocean.com', ...options }); } /** @@ -118,16 +90,9 @@ export class APIKeys extends APIResource { * ); * ``` */ - regenerate( - apiKeyUuid: string, - params: APIKeyRegenerateParams, - options?: RequestOptions, - ): APIPromise { - const { agent_uuid } = params; - return this._client.put(path`/v2/gen-ai/agents/${agent_uuid}/api_keys/${apiKeyUuid}/regenerate`, { - defaultBaseURL: 'https://api.digitalocean.com', - ...options, - }); + regenerate(apiKeyUuid: string, params: APIKeyRegenerateParams, options?: RequestOptions): APIPromise { + const { agent_uuid } = params + return this._client.put(path`/v2/gen-ai/agents/${agent_uuid}/api_keys/${apiKeyUuid}/regenerate`, { defaultBaseURL: 'https://api.digitalocean.com', ...options }); } } @@ -180,7 +145,7 @@ export interface APIKeyCreateParams { /** * Agent id */ - body_agent_uuid?: string; + agent_uuid?: string; /** * A human friendly name to identify the key @@ -202,7 +167,7 @@ export interface APIKeyUpdateParams { /** * Body param: API key ID */ - body_api_key_uuid?: string; + api_key_uuid?: string; /** * Body param: Name @@ -247,6 +212,6 @@ export declare namespace APIKeys { type APIKeyUpdateParams as APIKeyUpdateParams, type APIKeyListParams as APIKeyListParams, type APIKeyDeleteParams as APIKeyDeleteParams, - type APIKeyRegenerateParams as APIKeyRegenerateParams, + type APIKeyRegenerateParams as APIKeyRegenerateParams }; } diff --git a/src/resources/agents/chat/chat.ts b/src/resources/agents/chat/chat.ts index e9e3f118..f15ab26c 100644 --- a/src/resources/agents/chat/chat.ts +++ b/src/resources/agents/chat/chat.ts @@ -2,13 +2,7 @@ import { APIResource } from '../../../core/resource'; import * as CompletionsAPI from './completions'; -import { - CompletionCreateParams, - CompletionCreateParamsNonStreaming, - CompletionCreateParamsStreaming, - CompletionCreateResponse, - Completions, -} from './completions'; +import { CompletionCreateParams, CompletionCreateParamsNonStreaming, CompletionCreateParamsStreaming, CompletionCreateResponse, Completions } from './completions'; export class Chat extends APIResource { completions: CompletionsAPI.Completions = new CompletionsAPI.Completions(this._client); @@ -22,6 +16,6 @@ export declare namespace Chat { type CompletionCreateResponse as CompletionCreateResponse, type CompletionCreateParams as CompletionCreateParams, type CompletionCreateParamsNonStreaming as CompletionCreateParamsNonStreaming, - type CompletionCreateParamsStreaming as CompletionCreateParamsStreaming, + type CompletionCreateParamsStreaming as CompletionCreateParamsStreaming }; } diff --git a/src/resources/agents/chat/completions.ts b/src/resources/agents/chat/completions.ts index c5591483..000f5c58 100644 --- a/src/resources/agents/chat/completions.ts +++ b/src/resources/agents/chat/completions.ts @@ -7,6 +7,9 @@ import { APIPromise } from '../../../core/api-promise'; import { Stream } from '../../../core/streaming'; import { RequestOptions } from '../../../internal/request-options'; +/** + * Given a list of messages comprising a conversation, the model will return a response. + */ export class Completions extends APIResource { /** * Creates a model response for the given chat conversation. @@ -20,28 +23,11 @@ export class Completions extends APIResource { * }); * ``` */ - create( - body: CompletionCreateParamsNonStreaming, - options?: RequestOptions, - ): APIPromise; - create( - body: CompletionCreateParamsStreaming, - options?: RequestOptions, - ): APIPromise>; - create( - body: CompletionCreateParamsBase, - options?: RequestOptions, - ): APIPromise | CompletionCreateResponse>; - create( - body: CompletionCreateParams, - options?: RequestOptions, - ): APIPromise | APIPromise> { - return this._client.post('/chat/completions?agent=true', { - body, - defaultBaseURL: '{agentEndpoint}/api/v1', - ...options, - stream: body.stream ?? false, - }) as APIPromise | APIPromise>; + create(body: CompletionCreateParamsNonStreaming, options?: RequestOptions): APIPromise + create(body: CompletionCreateParamsStreaming, options?: RequestOptions): APIPromise> + create(body: CompletionCreateParamsBase, options?: RequestOptions): APIPromise | CompletionCreateResponse> + create(body: CompletionCreateParams, options?: RequestOptions): APIPromise | APIPromise> { + return this._client.post('/chat/completions?agent=true', { body, defaultBaseURL: '{agentEndpoint}/api/v1', ...options, stream: body.stream ?? false }) as APIPromise | APIPromise>; } } @@ -195,19 +181,13 @@ export namespace CompletionCreateResponse { } } -export type CompletionCreateParams = CompletionCreateParamsNonStreaming | CompletionCreateParamsStreaming; +export type CompletionCreateParams = CompletionCreateParamsNonStreaming | CompletionCreateParamsStreaming export interface CompletionCreateParamsBase { /** * A list of messages comprising the conversation so far. */ - messages: Array< - | CompletionCreateParams.ChatCompletionRequestSystemMessage - | CompletionCreateParams.ChatCompletionRequestDeveloperMessage - | CompletionCreateParams.ChatCompletionRequestUserMessage - | CompletionCreateParams.ChatCompletionRequestAssistantMessage - | CompletionCreateParams.ChatCompletionRequestToolMessage - >; + messages: Array; /** * Model ID used to generate the response. @@ -279,6 +259,12 @@ export interface CompletionCreateParamsBase { */ presence_penalty?: number | null; + /** + * Constrains effort on reasoning for reasoning models. Reducing reasoning effort + * can result in faster responses and fewer tokens used on reasoning in a response. + */ + reasoning_effort?: 'none' | 'minimal' | 'low' | 'medium' | 'high' | 'xhigh' | null; + /** * Up to 4 sequences where the API will stop generating further tokens. The * returned text will not contain the stop sequence. @@ -345,7 +331,7 @@ export interface CompletionCreateParamsBase { */ user?: string; - [k: string]: unknown; +[k: string]: unknown } export namespace CompletionCreateParams { @@ -357,7 +343,7 @@ export namespace CompletionCreateParams { /** * The contents of the system message. */ - content: string | Array; + content: string | ChatCompletionRequestSystemMessage.ChatCompletionRequestContentPartText | Array; /** * The role of the messages author, in this case `system`. @@ -369,7 +355,7 @@ export namespace CompletionCreateParams { /** * Content part with type and text */ - export interface UnionMember1 { + export interface ChatCompletionRequestContentPartText { /** * The text content */ @@ -379,6 +365,65 @@ export namespace CompletionCreateParams { * The type of content part */ type: 'text'; + + /** + * Cache control settings for the content part. + */ + cache_control?: ChatCompletionRequestContentPartText.CacheControl; + } + + export namespace ChatCompletionRequestContentPartText { + /** + * Cache control settings for the content part. + */ + export interface CacheControl { + /** + * The cache control type. + */ + type: 'ephemeral'; + + /** + * The cache TTL. + */ + ttl?: '5m' | '1h'; + } + } + + /** + * Content part with type and text + */ + export interface ChatCompletionRequestContentPartText { + /** + * The text content + */ + text: string; + + /** + * The type of content part + */ + type: 'text'; + + /** + * Cache control settings for the content part. + */ + cache_control?: ChatCompletionRequestContentPartText.CacheControl; + } + + export namespace ChatCompletionRequestContentPartText { + /** + * Cache control settings for the content part. + */ + export interface CacheControl { + /** + * The cache control type. + */ + type: 'ephemeral'; + + /** + * The cache TTL. + */ + ttl?: '5m' | '1h'; + } } } @@ -390,7 +435,7 @@ export namespace CompletionCreateParams { /** * The contents of the developer message. */ - content: string | Array; + content: string | ChatCompletionRequestDeveloperMessage.ChatCompletionRequestContentPartText | Array; /** * The role of the messages author, in this case `developer`. @@ -402,7 +447,7 @@ export namespace CompletionCreateParams { /** * Content part with type and text */ - export interface UnionMember1 { + export interface ChatCompletionRequestContentPartText { /** * The text content */ @@ -412,6 +457,65 @@ export namespace CompletionCreateParams { * The type of content part */ type: 'text'; + + /** + * Cache control settings for the content part. + */ + cache_control?: ChatCompletionRequestContentPartText.CacheControl; + } + + export namespace ChatCompletionRequestContentPartText { + /** + * Cache control settings for the content part. + */ + export interface CacheControl { + /** + * The cache control type. + */ + type: 'ephemeral'; + + /** + * The cache TTL. + */ + ttl?: '5m' | '1h'; + } + } + + /** + * Content part with type and text + */ + export interface ChatCompletionRequestContentPartText { + /** + * The text content + */ + text: string; + + /** + * The type of content part + */ + type: 'text'; + + /** + * Cache control settings for the content part. + */ + cache_control?: ChatCompletionRequestContentPartText.CacheControl; + } + + export namespace ChatCompletionRequestContentPartText { + /** + * Cache control settings for the content part. + */ + export interface CacheControl { + /** + * The cache control type. + */ + type: 'ephemeral'; + + /** + * The cache TTL. + */ + ttl?: '5m' | '1h'; + } } } @@ -423,7 +527,7 @@ export namespace CompletionCreateParams { /** * The contents of the user message. */ - content: string | Array; + content: string | ChatCompletionRequestUserMessage.ChatCompletionRequestContentPartText | ChatCompletionRequestUserMessage.ChatCompletionRequestContentPartImageURL | ChatCompletionRequestUserMessage.ChatCompletionRequestContentPartVideoURL | Array; /** * The role of the messages author, in this case `user`. @@ -435,7 +539,103 @@ export namespace CompletionCreateParams { /** * Content part with type and text */ - export interface UnionMember1 { + export interface ChatCompletionRequestContentPartText { + /** + * The text content + */ + text: string; + + /** + * The type of content part + */ + type: 'text'; + + /** + * Cache control settings for the content part. + */ + cache_control?: ChatCompletionRequestContentPartText.CacheControl; + } + + export namespace ChatCompletionRequestContentPartText { + /** + * Cache control settings for the content part. + */ + export interface CacheControl { + /** + * The cache control type. + */ + type: 'ephemeral'; + + /** + * The cache TTL. + */ + ttl?: '5m' | '1h'; + } + } + + /** + * Content part with type and image URL. + */ + export interface ChatCompletionRequestContentPartImageURL { + /** + * Image URL settings. + */ + image_url: ChatCompletionRequestContentPartImageURL.ImageURL; + + /** + * The type of content part + */ + type: 'image_url'; + } + + export namespace ChatCompletionRequestContentPartImageURL { + /** + * Image URL settings. + */ + export interface ImageURL { + /** + * A URL or data URL containing image content. + */ + url: string; + + /** + * Optional detail level for image understanding. + */ + detail?: 'auto' | 'low' | 'high'; + } + } + + /** + * Content part with type and video URL. + */ + export interface ChatCompletionRequestContentPartVideoURL { + /** + * The type of content part + */ + type: 'video_url'; + + /** + * Video URL settings. + */ + video_url: ChatCompletionRequestContentPartVideoURL.VideoURL; + } + + export namespace ChatCompletionRequestContentPartVideoURL { + /** + * Video URL settings. + */ + export interface VideoURL { + /** + * A URL or data URL containing video content. + */ + url: string; + } + } + + /** + * Content part with type and text + */ + export interface ChatCompletionRequestContentPartText { /** * The text content */ @@ -445,6 +645,87 @@ export namespace CompletionCreateParams { * The type of content part */ type: 'text'; + + /** + * Cache control settings for the content part. + */ + cache_control?: ChatCompletionRequestContentPartText.CacheControl; + } + + export namespace ChatCompletionRequestContentPartText { + /** + * Cache control settings for the content part. + */ + export interface CacheControl { + /** + * The cache control type. + */ + type: 'ephemeral'; + + /** + * The cache TTL. + */ + ttl?: '5m' | '1h'; + } + } + + /** + * Content part with type and image URL. + */ + export interface ChatCompletionRequestContentPartImageURL { + /** + * Image URL settings. + */ + image_url: ChatCompletionRequestContentPartImageURL.ImageURL; + + /** + * The type of content part + */ + type: 'image_url'; + } + + export namespace ChatCompletionRequestContentPartImageURL { + /** + * Image URL settings. + */ + export interface ImageURL { + /** + * A URL or data URL containing image content. + */ + url: string; + + /** + * Optional detail level for image understanding. + */ + detail?: 'auto' | 'low' | 'high'; + } + } + + /** + * Content part with type and video URL. + */ + export interface ChatCompletionRequestContentPartVideoURL { + /** + * The type of content part + */ + type: 'video_url'; + + /** + * Video URL settings. + */ + video_url: ChatCompletionRequestContentPartVideoURL.VideoURL; + } + + export namespace ChatCompletionRequestContentPartVideoURL { + /** + * Video URL settings. + */ + export interface VideoURL { + /** + * A URL or data URL containing video content. + */ + url: string; + } } } @@ -460,7 +741,7 @@ export namespace CompletionCreateParams { /** * The contents of the assistant message. */ - content?: string | Array | null; + content?: string | ChatCompletionRequestAssistantMessage.ChatCompletionRequestContentPartText | Array | null; /** * The tool calls generated by the model, such as function calls. @@ -472,7 +753,7 @@ export namespace CompletionCreateParams { /** * Content part with type and text */ - export interface UnionMember1 { + export interface ChatCompletionRequestContentPartText { /** * The text content */ @@ -482,6 +763,65 @@ export namespace CompletionCreateParams { * The type of content part */ type: 'text'; + + /** + * Cache control settings for the content part. + */ + cache_control?: ChatCompletionRequestContentPartText.CacheControl; + } + + export namespace ChatCompletionRequestContentPartText { + /** + * Cache control settings for the content part. + */ + export interface CacheControl { + /** + * The cache control type. + */ + type: 'ephemeral'; + + /** + * The cache TTL. + */ + ttl?: '5m' | '1h'; + } + } + + /** + * Content part with type and text + */ + export interface ChatCompletionRequestContentPartText { + /** + * The text content + */ + text: string; + + /** + * The type of content part + */ + type: 'text'; + + /** + * Cache control settings for the content part. + */ + cache_control?: ChatCompletionRequestContentPartText.CacheControl; + } + + export namespace ChatCompletionRequestContentPartText { + /** + * Cache control settings for the content part. + */ + export interface CacheControl { + /** + * The cache control type. + */ + type: 'ephemeral'; + + /** + * The cache TTL. + */ + ttl?: '5m' | '1h'; + } } export interface ToolCall { @@ -526,7 +866,7 @@ export namespace CompletionCreateParams { /** * The contents of the tool message. */ - content: string; + content: string | ChatCompletionRequestToolMessage.ChatCompletionRequestContentPartText | Array; /** * The role of the messages author, in this case `tool`. @@ -539,6 +879,82 @@ export namespace CompletionCreateParams { tool_call_id: string; } + export namespace ChatCompletionRequestToolMessage { + /** + * Content part with type and text + */ + export interface ChatCompletionRequestContentPartText { + /** + * The text content + */ + text: string; + + /** + * The type of content part + */ + type: 'text'; + + /** + * Cache control settings for the content part. + */ + cache_control?: ChatCompletionRequestContentPartText.CacheControl; + } + + export namespace ChatCompletionRequestContentPartText { + /** + * Cache control settings for the content part. + */ + export interface CacheControl { + /** + * The cache control type. + */ + type: 'ephemeral'; + + /** + * The cache TTL. + */ + ttl?: '5m' | '1h'; + } + } + + /** + * Content part with type and text + */ + export interface ChatCompletionRequestContentPartText { + /** + * The text content + */ + text: string; + + /** + * The type of content part + */ + type: 'text'; + + /** + * Cache control settings for the content part. + */ + cache_control?: ChatCompletionRequestContentPartText.CacheControl; + } + + export namespace ChatCompletionRequestContentPartText { + /** + * Cache control settings for the content part. + */ + export interface CacheControl { + /** + * The cache control type. + */ + type: 'ephemeral'; + + /** + * The cache TTL. + */ + ttl?: '5m' | '1h'; + } + } + } + /** * Options for streaming response. Only set this when you set `stream: true`. */ @@ -612,8 +1028,8 @@ export namespace CompletionCreateParams { } } - export type CompletionCreateParamsNonStreaming = CompletionsAPI.CompletionCreateParamsNonStreaming; - export type CompletionCreateParamsStreaming = CompletionsAPI.CompletionCreateParamsStreaming; + export type CompletionCreateParamsNonStreaming = CompletionsAPI.CompletionCreateParamsNonStreaming + export type CompletionCreateParamsStreaming = CompletionsAPI.CompletionCreateParamsStreaming } export interface CompletionCreateParamsNonStreaming extends CompletionCreateParamsBase { @@ -623,7 +1039,7 @@ export interface CompletionCreateParamsNonStreaming extends CompletionCreatePara */ stream?: false | null; - [k: string]: unknown; +[k: string]: unknown } export interface CompletionCreateParamsStreaming extends CompletionCreateParamsBase { @@ -633,7 +1049,7 @@ export interface CompletionCreateParamsStreaming extends CompletionCreateParamsB */ stream: true; - [k: string]: unknown; +[k: string]: unknown } export declare namespace Completions { @@ -641,6 +1057,6 @@ export declare namespace Completions { type CompletionCreateResponse as CompletionCreateResponse, type CompletionCreateParams as CompletionCreateParams, type CompletionCreateParamsNonStreaming as CompletionCreateParamsNonStreaming, - type CompletionCreateParamsStreaming as CompletionCreateParamsStreaming, + type CompletionCreateParamsStreaming as CompletionCreateParamsStreaming }; } diff --git a/src/resources/agents/chat/index.ts b/src/resources/agents/chat/index.ts index 5b5443de..7e3f4953 100644 --- a/src/resources/agents/chat/index.ts +++ b/src/resources/agents/chat/index.ts @@ -1,10 +1,4 @@ // File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details. -export { Chat } from './chat'; -export { - Completions, - type CompletionCreateResponse, - type CompletionCreateParams, - type CompletionCreateParamsNonStreaming, - type CompletionCreateParamsStreaming, -} from './completions'; +export { Chat } from './chat';; +export { Completions, type CompletionCreateResponse, type CompletionCreateParams, type CompletionCreateParamsNonStreaming, type CompletionCreateParamsStreaming } from './completions';; diff --git a/src/resources/agents/evaluation-datasets.ts b/src/resources/agents/evaluation-datasets.ts index 4ec0791c..2d23fbc3 100644 --- a/src/resources/agents/evaluation-datasets.ts +++ b/src/resources/agents/evaluation-datasets.ts @@ -5,6 +5,9 @@ import * as DataSourcesAPI from '../knowledge-bases/data-sources'; import { APIPromise } from '../../core/api-promise'; import { RequestOptions } from '../../internal/request-options'; +/** + * The API lets you build GPU-powered AI agents with pre-built or custom foundation models, function and agent routes, and RAG pipelines with knowledge bases. + */ export class EvaluationDatasets extends APIResource { /** * To create an evaluation dataset, send a POST request to @@ -16,15 +19,8 @@ export class EvaluationDatasets extends APIResource { * await client.agents.evaluationDatasets.create(); * ``` */ - create( - body: EvaluationDatasetCreateParams | null | undefined = {}, - options?: RequestOptions, - ): APIPromise { - return this._client.post('/v2/gen-ai/evaluation_datasets', { - body, - defaultBaseURL: 'https://api.digitalocean.com', - ...options, - }); + create(body: EvaluationDatasetCreateParams | null | undefined = {}, options?: RequestOptions): APIPromise { + return this._client.post('/v2/gen-ai/evaluation_datasets', { body, defaultBaseURL: 'https://api.digitalocean.com', ...options }); } /** @@ -37,15 +33,8 @@ export class EvaluationDatasets extends APIResource { * await client.agents.evaluationDatasets.createFileUploadPresignedURLs(); * ``` */ - createFileUploadPresignedURLs( - body: EvaluationDatasetCreateFileUploadPresignedURLsParams | null | undefined = {}, - options?: RequestOptions, - ): APIPromise { - return this._client.post('/v2/gen-ai/evaluation_datasets/file_upload_presigned_urls', { - body, - defaultBaseURL: 'https://api.digitalocean.com', - ...options, - }); + createFileUploadPresignedURLs(body: EvaluationDatasetCreateFileUploadPresignedURLsParams | null | undefined = {}, options?: RequestOptions): APIPromise { + return this._client.post('/v2/gen-ai/evaluation_datasets/file_upload_presigned_urls', { body, defaultBaseURL: 'https://api.digitalocean.com', ...options }); } } @@ -102,6 +91,8 @@ export namespace EvaluationDatasetCreateFileUploadPresignedURLsResponse { } export interface EvaluationDatasetCreateParams { + dataset_type?: 'EVALUATION_DATASET_TYPE_UNKNOWN' | 'EVALUATION_DATASET_TYPE_ADK' | 'EVALUATION_DATASET_TYPE_NON_ADK'; + /** * File to upload as data source for knowledge base. */ @@ -142,6 +133,6 @@ export declare namespace EvaluationDatasets { type EvaluationDatasetCreateResponse as EvaluationDatasetCreateResponse, type EvaluationDatasetCreateFileUploadPresignedURLsResponse as EvaluationDatasetCreateFileUploadPresignedURLsResponse, type EvaluationDatasetCreateParams as EvaluationDatasetCreateParams, - type EvaluationDatasetCreateFileUploadPresignedURLsParams as EvaluationDatasetCreateFileUploadPresignedURLsParams, + type EvaluationDatasetCreateFileUploadPresignedURLsParams as EvaluationDatasetCreateFileUploadPresignedURLsParams }; } diff --git a/src/resources/agents/evaluation-metrics/anthropic/anthropic.ts b/src/resources/agents/evaluation-metrics/anthropic/anthropic.ts index 69cf6025..bd8ddabc 100644 --- a/src/resources/agents/evaluation-metrics/anthropic/anthropic.ts +++ b/src/resources/agents/evaluation-metrics/anthropic/anthropic.ts @@ -2,19 +2,7 @@ import { APIResource } from '../../../../core/resource'; import * as KeysAPI from './keys'; -import { - KeyCreateParams, - KeyCreateResponse, - KeyDeleteResponse, - KeyListAgentsParams, - KeyListAgentsResponse, - KeyListParams, - KeyListResponse, - KeyRetrieveResponse, - KeyUpdateParams, - KeyUpdateResponse, - Keys, -} from './keys'; +import { KeyCreateParams, KeyCreateResponse, KeyDeleteResponse, KeyListAgentsParams, KeyListAgentsResponse, KeyListParams, KeyListResponse, KeyRetrieveResponse, KeyUpdateParams, KeyUpdateResponse, Keys } from './keys'; export class Anthropic extends APIResource { keys: KeysAPI.Keys = new KeysAPI.Keys(this._client); @@ -34,6 +22,6 @@ export declare namespace Anthropic { type KeyCreateParams as KeyCreateParams, type KeyUpdateParams as KeyUpdateParams, type KeyListParams as KeyListParams, - type KeyListAgentsParams as KeyListAgentsParams, + type KeyListAgentsParams as KeyListAgentsParams }; } diff --git a/src/resources/agents/evaluation-metrics/anthropic/index.ts b/src/resources/agents/evaluation-metrics/anthropic/index.ts index eed17c6c..807ed47f 100644 --- a/src/resources/agents/evaluation-metrics/anthropic/index.ts +++ b/src/resources/agents/evaluation-metrics/anthropic/index.ts @@ -1,16 +1,4 @@ // File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details. -export { Anthropic } from './anthropic'; -export { - Keys, - type KeyCreateResponse, - type KeyRetrieveResponse, - type KeyUpdateResponse, - type KeyListResponse, - type KeyDeleteResponse, - type KeyListAgentsResponse, - type KeyCreateParams, - type KeyUpdateParams, - type KeyListParams, - type KeyListAgentsParams, -} from './keys'; +export { Anthropic } from './anthropic';; +export { Keys, type KeyCreateResponse, type KeyRetrieveResponse, type KeyUpdateResponse, type KeyListResponse, type KeyDeleteResponse, type KeyListAgentsResponse, type KeyCreateParams, type KeyUpdateParams, type KeyListParams, type KeyListAgentsParams } from './keys';; diff --git a/src/resources/agents/evaluation-metrics/anthropic/keys.ts b/src/resources/agents/evaluation-metrics/anthropic/keys.ts index 5471c980..fa3d8288 100644 --- a/src/resources/agents/evaluation-metrics/anthropic/keys.ts +++ b/src/resources/agents/evaluation-metrics/anthropic/keys.ts @@ -7,6 +7,9 @@ import { APIPromise } from '../../../../core/api-promise'; import { RequestOptions } from '../../../../internal/request-options'; import { path } from '../../../../internal/utils/path'; +/** + * The API lets you build GPU-powered AI agents with pre-built or custom foundation models, function and agent routes, and RAG pipelines with knowledge bases. + */ export class Keys extends APIResource { /** * To create an Anthropic API key, send a POST request to @@ -18,15 +21,8 @@ export class Keys extends APIResource { * await client.agents.evaluationMetrics.anthropic.keys.create(); * ``` */ - create( - body: KeyCreateParams | null | undefined = {}, - options?: RequestOptions, - ): APIPromise { - return this._client.post('/v2/gen-ai/anthropic/keys', { - body, - defaultBaseURL: 'https://api.digitalocean.com', - ...options, - }); + create(body: KeyCreateParams | null | undefined = {}, options?: RequestOptions): APIPromise { + return this._client.post('/v2/gen-ai/anthropic/keys', { body, defaultBaseURL: 'https://api.digitalocean.com', ...options }); } /** @@ -42,10 +38,7 @@ export class Keys extends APIResource { * ``` */ retrieve(apiKeyUuid: string, options?: RequestOptions): APIPromise { - return this._client.get(path`/v2/gen-ai/anthropic/keys/${apiKeyUuid}`, { - defaultBaseURL: 'https://api.digitalocean.com', - ...options, - }); + return this._client.get(path`/v2/gen-ai/anthropic/keys/${apiKeyUuid}`, { defaultBaseURL: 'https://api.digitalocean.com', ...options }); } /** @@ -60,16 +53,8 @@ export class Keys extends APIResource { * ); * ``` */ - update( - apiKeyUuid: string, - body: KeyUpdateParams | null | undefined = {}, - options?: RequestOptions, - ): APIPromise { - return this._client.put(path`/v2/gen-ai/anthropic/keys/${apiKeyUuid}`, { - body, - defaultBaseURL: 'https://api.digitalocean.com', - ...options, - }); + update(apiKeyUuid: string, body: KeyUpdateParams | null | undefined = {}, options?: RequestOptions): APIPromise { + return this._client.put(path`/v2/gen-ai/anthropic/keys/${apiKeyUuid}`, { body, defaultBaseURL: 'https://api.digitalocean.com', ...options }); } /** @@ -83,11 +68,7 @@ export class Keys extends APIResource { * ``` */ list(query: KeyListParams | null | undefined = {}, options?: RequestOptions): APIPromise { - return this._client.get('/v2/gen-ai/anthropic/keys', { - query, - defaultBaseURL: 'https://api.digitalocean.com', - ...options, - }); + return this._client.get('/v2/gen-ai/anthropic/keys', { query, defaultBaseURL: 'https://api.digitalocean.com', ...options }); } /** @@ -103,10 +84,7 @@ export class Keys extends APIResource { * ``` */ delete(apiKeyUuid: string, options?: RequestOptions): APIPromise { - return this._client.delete(path`/v2/gen-ai/anthropic/keys/${apiKeyUuid}`, { - defaultBaseURL: 'https://api.digitalocean.com', - ...options, - }); + return this._client.delete(path`/v2/gen-ai/anthropic/keys/${apiKeyUuid}`, { defaultBaseURL: 'https://api.digitalocean.com', ...options }); } /** @@ -120,16 +98,8 @@ export class Keys extends APIResource { * ); * ``` */ - listAgents( - uuid: string, - query: KeyListAgentsParams | null | undefined = {}, - options?: RequestOptions, - ): APIPromise { - return this._client.get(path`/v2/gen-ai/anthropic/keys/${uuid}/agents`, { - query, - defaultBaseURL: 'https://api.digitalocean.com', - ...options, - }); + listAgents(uuid: string, query: KeyListAgentsParams | null | undefined = {}, options?: RequestOptions): APIPromise { + return this._client.get(path`/v2/gen-ai/anthropic/keys/${uuid}/agents`, { query, defaultBaseURL: 'https://api.digitalocean.com', ...options }); } } @@ -230,7 +200,7 @@ export interface KeyUpdateParams { /** * API key ID */ - body_api_key_uuid?: string; + api_key_uuid?: string; /** * Name of the key @@ -273,6 +243,6 @@ export declare namespace Keys { type KeyCreateParams as KeyCreateParams, type KeyUpdateParams as KeyUpdateParams, type KeyListParams as KeyListParams, - type KeyListAgentsParams as KeyListAgentsParams, + type KeyListAgentsParams as KeyListAgentsParams }; } diff --git a/src/resources/agents/evaluation-metrics/evaluation-metrics.ts b/src/resources/agents/evaluation-metrics/evaluation-metrics.ts index 690033ec..9bcf31c5 100644 --- a/src/resources/agents/evaluation-metrics/evaluation-metrics.ts +++ b/src/resources/agents/evaluation-metrics/evaluation-metrics.ts @@ -2,8 +2,8 @@ import { APIResource } from '../../../core/resource'; import * as EvaluationRunsAPI from '../evaluation-runs'; -import * as ModelsAPI from './models'; -import { ModelListParams, ModelListResponse, Models } from './models'; +import * as ScheduledIndexingAPI from './scheduled-indexing'; +import { ScheduledIndexing, ScheduledIndexingCreateParams, ScheduledIndexingCreateResponse, ScheduledIndexingDeleteResponse, ScheduledIndexingRetrieveResponse } from './scheduled-indexing'; import * as AnthropicAPI from './anthropic/anthropic'; import { Anthropic } from './anthropic/anthropic'; import * as Oauth2API from './oauth2/oauth2'; @@ -11,26 +11,19 @@ import { Oauth2, Oauth2GenerateURLParams, Oauth2GenerateURLResponse } from './oa import * as OpenAIAPI from './openai/openai'; import { OpenAI } from './openai/openai'; import * as WorkspacesAPI from './workspaces/workspaces'; -import { - WorkspaceCreateParams, - WorkspaceCreateResponse, - WorkspaceDeleteResponse, - WorkspaceListEvaluationTestCasesResponse, - WorkspaceListResponse, - WorkspaceRetrieveResponse, - WorkspaceUpdateParams, - WorkspaceUpdateResponse, - Workspaces, -} from './workspaces/workspaces'; +import { WorkspaceCreateParams, WorkspaceCreateResponse, WorkspaceDeleteResponse, WorkspaceListEvaluationTestCasesResponse, WorkspaceListResponse, WorkspaceRetrieveResponse, WorkspaceUpdateParams, WorkspaceUpdateResponse, Workspaces } from './workspaces/workspaces'; import { APIPromise } from '../../../core/api-promise'; import { RequestOptions } from '../../../internal/request-options'; +/** + * The API lets you build GPU-powered AI agents with pre-built or custom foundation models, function and agent routes, and RAG pipelines with knowledge bases. + */ export class EvaluationMetrics extends APIResource { workspaces: WorkspacesAPI.Workspaces = new WorkspacesAPI.Workspaces(this._client); - models: ModelsAPI.Models = new ModelsAPI.Models(this._client); anthropic: AnthropicAPI.Anthropic = new AnthropicAPI.Anthropic(this._client); openai: OpenAIAPI.OpenAI = new OpenAIAPI.OpenAI(this._client); oauth2: Oauth2API.Oauth2 = new Oauth2API.Oauth2(this._client); + scheduledIndexing: ScheduledIndexingAPI.ScheduledIndexing = new ScheduledIndexingAPI.ScheduledIndexing(this._client); /** * To list all evaluation metrics, send a GET request to @@ -43,10 +36,7 @@ export class EvaluationMetrics extends APIResource { * ``` */ list(options?: RequestOptions): APIPromise { - return this._client.get('/v2/gen-ai/evaluation_metrics', { - defaultBaseURL: 'https://api.digitalocean.com', - ...options, - }); + return this._client.get('/v2/gen-ai/evaluation_metrics', { defaultBaseURL: 'https://api.digitalocean.com', ...options }); } /** @@ -58,15 +48,8 @@ export class EvaluationMetrics extends APIResource { * await client.agents.evaluationMetrics.listRegions(); * ``` */ - listRegions( - query: EvaluationMetricListRegionsParams | null | undefined = {}, - options?: RequestOptions, - ): APIPromise { - return this._client.get('/v2/gen-ai/regions', { - query, - defaultBaseURL: 'https://api.digitalocean.com', - ...options, - }); + listRegions(query: EvaluationMetricListRegionsParams | null | undefined = {}, options?: RequestOptions): APIPromise { + return this._client.get('/v2/gen-ai/regions', { query, defaultBaseURL: 'https://api.digitalocean.com', ...options }); } } @@ -129,16 +112,16 @@ export interface EvaluationMetricListRegionsParams { } EvaluationMetrics.Workspaces = Workspaces; -EvaluationMetrics.Models = Models; EvaluationMetrics.Anthropic = Anthropic; EvaluationMetrics.OpenAI = OpenAI; EvaluationMetrics.Oauth2 = Oauth2; +EvaluationMetrics.ScheduledIndexing = ScheduledIndexing; export declare namespace EvaluationMetrics { export { type EvaluationMetricListResponse as EvaluationMetricListResponse, type EvaluationMetricListRegionsResponse as EvaluationMetricListRegionsResponse, - type EvaluationMetricListRegionsParams as EvaluationMetricListRegionsParams, + type EvaluationMetricListRegionsParams as EvaluationMetricListRegionsParams }; export { @@ -150,22 +133,28 @@ export declare namespace EvaluationMetrics { type WorkspaceDeleteResponse as WorkspaceDeleteResponse, type WorkspaceListEvaluationTestCasesResponse as WorkspaceListEvaluationTestCasesResponse, type WorkspaceCreateParams as WorkspaceCreateParams, - type WorkspaceUpdateParams as WorkspaceUpdateParams, + type WorkspaceUpdateParams as WorkspaceUpdateParams }; export { - Models as Models, - type ModelListResponse as ModelListResponse, - type ModelListParams as ModelListParams, + Anthropic as Anthropic }; - export { Anthropic as Anthropic }; - - export { OpenAI as OpenAI }; + export { + OpenAI as OpenAI + }; export { Oauth2 as Oauth2, type Oauth2GenerateURLResponse as Oauth2GenerateURLResponse, - type Oauth2GenerateURLParams as Oauth2GenerateURLParams, + type Oauth2GenerateURLParams as Oauth2GenerateURLParams + }; + + export { + ScheduledIndexing as ScheduledIndexing, + type ScheduledIndexingCreateResponse as ScheduledIndexingCreateResponse, + type ScheduledIndexingRetrieveResponse as ScheduledIndexingRetrieveResponse, + type ScheduledIndexingDeleteResponse as ScheduledIndexingDeleteResponse, + type ScheduledIndexingCreateParams as ScheduledIndexingCreateParams }; } diff --git a/src/resources/agents/evaluation-metrics/index.ts b/src/resources/agents/evaluation-metrics/index.ts index 7941c926..ec5ab1e2 100644 --- a/src/resources/agents/evaluation-metrics/index.ts +++ b/src/resources/agents/evaluation-metrics/index.ts @@ -1,23 +1,8 @@ // File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details. -export { Anthropic } from './anthropic/index'; -export { - EvaluationMetrics, - type EvaluationMetricListResponse, - type EvaluationMetricListRegionsResponse, - type EvaluationMetricListRegionsParams, -} from './evaluation-metrics'; -export { Models, type ModelListResponse, type ModelListParams } from './models'; -export { Oauth2, type Oauth2GenerateURLResponse, type Oauth2GenerateURLParams } from './oauth2/index'; -export { OpenAI } from './openai/index'; -export { - Workspaces, - type WorkspaceCreateResponse, - type WorkspaceRetrieveResponse, - type WorkspaceUpdateResponse, - type WorkspaceListResponse, - type WorkspaceDeleteResponse, - type WorkspaceListEvaluationTestCasesResponse, - type WorkspaceCreateParams, - type WorkspaceUpdateParams, -} from './workspaces/index'; +export { Anthropic } from './anthropic/index';; +export { EvaluationMetrics, type EvaluationMetricListResponse, type EvaluationMetricListRegionsResponse, type EvaluationMetricListRegionsParams } from './evaluation-metrics';; +export { Oauth2, type Oauth2GenerateURLResponse, type Oauth2GenerateURLParams } from './oauth2/index';; +export { OpenAI } from './openai/index';; +export { ScheduledIndexing, type ScheduledIndexingCreateResponse, type ScheduledIndexingRetrieveResponse, type ScheduledIndexingDeleteResponse, type ScheduledIndexingCreateParams } from './scheduled-indexing';; +export { Workspaces, type WorkspaceCreateResponse, type WorkspaceRetrieveResponse, type WorkspaceUpdateResponse, type WorkspaceListResponse, type WorkspaceDeleteResponse, type WorkspaceListEvaluationTestCasesResponse, type WorkspaceCreateParams, type WorkspaceUpdateParams } from './workspaces/index';; diff --git a/src/resources/agents/evaluation-metrics/models.ts b/src/resources/agents/evaluation-metrics/models.ts deleted file mode 100644 index 2a8bfef3..00000000 --- a/src/resources/agents/evaluation-metrics/models.ts +++ /dev/null @@ -1,92 +0,0 @@ -// File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details. - -import { APIResource } from '../../../core/resource'; -import * as Shared from '../../shared'; -import * as ModelsAPI from '../../models/models'; -import { APIPromise } from '../../../core/api-promise'; -import { RequestOptions } from '../../../internal/request-options'; - -export class Models extends APIResource { - /** - * To list all models, send a GET request to `/v2/gen-ai/models`. - * - * @example - * ```ts - * const models = - * await client.agents.evaluationMetrics.models.list(); - * ``` - */ - list( - query: ModelListParams | null | undefined = {}, - options?: RequestOptions, - ): APIPromise { - return this._client.get('/v2/gen-ai/models', { - query, - defaultBaseURL: 'https://api.digitalocean.com', - ...options, - }); - } -} - -/** - * A list of models - */ -export interface ModelListResponse { - /** - * Links to other pages - */ - links?: Shared.APILinks; - - /** - * Meta information about the data set - */ - meta?: Shared.APIMeta; - - /** - * The models - */ - models?: Array; -} - -export interface ModelListParams { - /** - * Page number. - */ - page?: number; - - /** - * Items per page. - */ - per_page?: number; - - /** - * Only include models that are publicly available. - */ - public_only?: boolean; - - /** - * Include only models defined for the listed usecases. - * - * - MODEL_USECASE_UNKNOWN: The use case of the model is unknown - * - MODEL_USECASE_AGENT: The model maybe used in an agent - * - MODEL_USECASE_FINETUNED: The model maybe used for fine tuning - * - MODEL_USECASE_KNOWLEDGEBASE: The model maybe used for knowledge bases - * (embedding models) - * - MODEL_USECASE_GUARDRAIL: The model maybe used for guardrails - * - MODEL_USECASE_REASONING: The model usecase for reasoning - * - MODEL_USECASE_SERVERLESS: The model usecase for serverless inference - */ - usecases?: Array< - | 'MODEL_USECASE_UNKNOWN' - | 'MODEL_USECASE_AGENT' - | 'MODEL_USECASE_FINETUNED' - | 'MODEL_USECASE_KNOWLEDGEBASE' - | 'MODEL_USECASE_GUARDRAIL' - | 'MODEL_USECASE_REASONING' - | 'MODEL_USECASE_SERVERLESS' - >; -} - -export declare namespace Models { - export { type ModelListResponse as ModelListResponse, type ModelListParams as ModelListParams }; -} diff --git a/src/resources/agents/evaluation-metrics/oauth2/dropbox.ts b/src/resources/agents/evaluation-metrics/oauth2/dropbox.ts index b0cabd8f..3ab5a95c 100644 --- a/src/resources/agents/evaluation-metrics/oauth2/dropbox.ts +++ b/src/resources/agents/evaluation-metrics/oauth2/dropbox.ts @@ -4,6 +4,9 @@ import { APIResource } from '../../../../core/resource'; import { APIPromise } from '../../../../core/api-promise'; import { RequestOptions } from '../../../../internal/request-options'; +/** + * The API lets you build GPU-powered AI agents with pre-built or custom foundation models, function and agent routes, and RAG pipelines with knowledge bases. + */ export class Dropbox extends APIResource { /** * To obtain the refresh token, needed for creation of data sources, send a GET @@ -16,15 +19,8 @@ export class Dropbox extends APIResource { * await client.agents.evaluationMetrics.oauth2.dropbox.createTokens(); * ``` */ - createTokens( - body: DropboxCreateTokensParams | null | undefined = {}, - options?: RequestOptions, - ): APIPromise { - return this._client.post('/v2/gen-ai/oauth2/dropbox/tokens', { - body, - defaultBaseURL: 'https://api.digitalocean.com', - ...options, - }); + createTokens(body: DropboxCreateTokensParams | null | undefined = {}, options?: RequestOptions): APIPromise { + return this._client.post('/v2/gen-ai/oauth2/dropbox/tokens', { body, defaultBaseURL: 'https://api.digitalocean.com', ...options }); } } @@ -58,6 +54,6 @@ export interface DropboxCreateTokensParams { export declare namespace Dropbox { export { type DropboxCreateTokensResponse as DropboxCreateTokensResponse, - type DropboxCreateTokensParams as DropboxCreateTokensParams, + type DropboxCreateTokensParams as DropboxCreateTokensParams }; } diff --git a/src/resources/agents/evaluation-metrics/oauth2/index.ts b/src/resources/agents/evaluation-metrics/oauth2/index.ts index 01e94cc2..411ee4e8 100644 --- a/src/resources/agents/evaluation-metrics/oauth2/index.ts +++ b/src/resources/agents/evaluation-metrics/oauth2/index.ts @@ -1,4 +1,4 @@ // File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details. -export { Dropbox, type DropboxCreateTokensResponse, type DropboxCreateTokensParams } from './dropbox'; -export { Oauth2, type Oauth2GenerateURLResponse, type Oauth2GenerateURLParams } from './oauth2'; +export { Dropbox, type DropboxCreateTokensResponse, type DropboxCreateTokensParams } from './dropbox';; +export { Oauth2, type Oauth2GenerateURLResponse, type Oauth2GenerateURLParams } from './oauth2';; diff --git a/src/resources/agents/evaluation-metrics/oauth2/oauth2.ts b/src/resources/agents/evaluation-metrics/oauth2/oauth2.ts index a27cd165..292b9054 100644 --- a/src/resources/agents/evaluation-metrics/oauth2/oauth2.ts +++ b/src/resources/agents/evaluation-metrics/oauth2/oauth2.ts @@ -6,6 +6,9 @@ import { Dropbox, DropboxCreateTokensParams, DropboxCreateTokensResponse } from import { APIPromise } from '../../../../core/api-promise'; import { RequestOptions } from '../../../../internal/request-options'; +/** + * The API lets you build GPU-powered AI agents with pre-built or custom foundation models, function and agent routes, and RAG pipelines with knowledge bases. + */ export class Oauth2 extends APIResource { dropbox: DropboxAPI.Dropbox = new DropboxAPI.Dropbox(this._client); @@ -19,15 +22,8 @@ export class Oauth2 extends APIResource { * await client.agents.evaluationMetrics.oauth2.generateURL(); * ``` */ - generateURL( - query: Oauth2GenerateURLParams | null | undefined = {}, - options?: RequestOptions, - ): APIPromise { - return this._client.get('/v2/gen-ai/oauth2/url', { - query, - defaultBaseURL: 'https://api.digitalocean.com', - ...options, - }); + generateURL(query: Oauth2GenerateURLParams | null | undefined = {}, options?: RequestOptions): APIPromise { + return this._client.get('/v2/gen-ai/oauth2/url', { query, defaultBaseURL: 'https://api.digitalocean.com', ...options }); } } @@ -58,12 +54,12 @@ Oauth2.Dropbox = Dropbox; export declare namespace Oauth2 { export { type Oauth2GenerateURLResponse as Oauth2GenerateURLResponse, - type Oauth2GenerateURLParams as Oauth2GenerateURLParams, + type Oauth2GenerateURLParams as Oauth2GenerateURLParams }; export { Dropbox as Dropbox, type DropboxCreateTokensResponse as DropboxCreateTokensResponse, - type DropboxCreateTokensParams as DropboxCreateTokensParams, + type DropboxCreateTokensParams as DropboxCreateTokensParams }; } diff --git a/src/resources/agents/evaluation-metrics/openai/index.ts b/src/resources/agents/evaluation-metrics/openai/index.ts index 86bab9a1..716e6089 100644 --- a/src/resources/agents/evaluation-metrics/openai/index.ts +++ b/src/resources/agents/evaluation-metrics/openai/index.ts @@ -1,16 +1,4 @@ // File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details. -export { - Keys, - type KeyCreateResponse, - type KeyRetrieveResponse, - type KeyUpdateResponse, - type KeyListResponse, - type KeyDeleteResponse, - type KeyListAgentsResponse, - type KeyCreateParams, - type KeyUpdateParams, - type KeyListParams, - type KeyListAgentsParams, -} from './keys'; -export { OpenAI } from './openai'; +export { Keys, type KeyCreateResponse, type KeyRetrieveResponse, type KeyUpdateResponse, type KeyListResponse, type KeyDeleteResponse, type KeyListAgentsResponse, type KeyCreateParams, type KeyUpdateParams, type KeyListParams, type KeyListAgentsParams } from './keys';; +export { OpenAI } from './openai';; diff --git a/src/resources/agents/evaluation-metrics/openai/keys.ts b/src/resources/agents/evaluation-metrics/openai/keys.ts index fabb9428..0c3c1489 100644 --- a/src/resources/agents/evaluation-metrics/openai/keys.ts +++ b/src/resources/agents/evaluation-metrics/openai/keys.ts @@ -7,6 +7,9 @@ import { APIPromise } from '../../../../core/api-promise'; import { RequestOptions } from '../../../../internal/request-options'; import { path } from '../../../../internal/utils/path'; +/** + * The API lets you build GPU-powered AI agents with pre-built or custom foundation models, function and agent routes, and RAG pipelines with knowledge bases. + */ export class Keys extends APIResource { /** * To create an OpenAI API key, send a POST request to `/v2/gen-ai/openai/keys`. @@ -17,15 +20,8 @@ export class Keys extends APIResource { * await client.agents.evaluationMetrics.openai.keys.create(); * ``` */ - create( - body: KeyCreateParams | null | undefined = {}, - options?: RequestOptions, - ): APIPromise { - return this._client.post('/v2/gen-ai/openai/keys', { - body, - defaultBaseURL: 'https://api.digitalocean.com', - ...options, - }); + create(body: KeyCreateParams | null | undefined = {}, options?: RequestOptions): APIPromise { + return this._client.post('/v2/gen-ai/openai/keys', { body, defaultBaseURL: 'https://api.digitalocean.com', ...options }); } /** @@ -41,10 +37,7 @@ export class Keys extends APIResource { * ``` */ retrieve(apiKeyUuid: string, options?: RequestOptions): APIPromise { - return this._client.get(path`/v2/gen-ai/openai/keys/${apiKeyUuid}`, { - defaultBaseURL: 'https://api.digitalocean.com', - ...options, - }); + return this._client.get(path`/v2/gen-ai/openai/keys/${apiKeyUuid}`, { defaultBaseURL: 'https://api.digitalocean.com', ...options }); } /** @@ -59,16 +52,8 @@ export class Keys extends APIResource { * ); * ``` */ - update( - apiKeyUuid: string, - body: KeyUpdateParams | null | undefined = {}, - options?: RequestOptions, - ): APIPromise { - return this._client.put(path`/v2/gen-ai/openai/keys/${apiKeyUuid}`, { - body, - defaultBaseURL: 'https://api.digitalocean.com', - ...options, - }); + update(apiKeyUuid: string, body: KeyUpdateParams | null | undefined = {}, options?: RequestOptions): APIPromise { + return this._client.put(path`/v2/gen-ai/openai/keys/${apiKeyUuid}`, { body, defaultBaseURL: 'https://api.digitalocean.com', ...options }); } /** @@ -81,11 +66,7 @@ export class Keys extends APIResource { * ``` */ list(query: KeyListParams | null | undefined = {}, options?: RequestOptions): APIPromise { - return this._client.get('/v2/gen-ai/openai/keys', { - query, - defaultBaseURL: 'https://api.digitalocean.com', - ...options, - }); + return this._client.get('/v2/gen-ai/openai/keys', { query, defaultBaseURL: 'https://api.digitalocean.com', ...options }); } /** @@ -101,10 +82,7 @@ export class Keys extends APIResource { * ``` */ delete(apiKeyUuid: string, options?: RequestOptions): APIPromise { - return this._client.delete(path`/v2/gen-ai/openai/keys/${apiKeyUuid}`, { - defaultBaseURL: 'https://api.digitalocean.com', - ...options, - }); + return this._client.delete(path`/v2/gen-ai/openai/keys/${apiKeyUuid}`, { defaultBaseURL: 'https://api.digitalocean.com', ...options }); } /** @@ -118,16 +96,8 @@ export class Keys extends APIResource { * ); * ``` */ - listAgents( - uuid: string, - query: KeyListAgentsParams | null | undefined = {}, - options?: RequestOptions, - ): APIPromise { - return this._client.get(path`/v2/gen-ai/openai/keys/${uuid}/agents`, { - query, - defaultBaseURL: 'https://api.digitalocean.com', - ...options, - }); + listAgents(uuid: string, query: KeyListAgentsParams | null | undefined = {}, options?: RequestOptions): APIPromise { + return this._client.get(path`/v2/gen-ai/openai/keys/${uuid}/agents`, { query, defaultBaseURL: 'https://api.digitalocean.com', ...options }); } } @@ -227,7 +197,7 @@ export interface KeyUpdateParams { /** * API key ID */ - body_api_key_uuid?: string; + api_key_uuid?: string; /** * Name of the key @@ -270,6 +240,6 @@ export declare namespace Keys { type KeyCreateParams as KeyCreateParams, type KeyUpdateParams as KeyUpdateParams, type KeyListParams as KeyListParams, - type KeyListAgentsParams as KeyListAgentsParams, + type KeyListAgentsParams as KeyListAgentsParams }; } diff --git a/src/resources/agents/evaluation-metrics/openai/openai.ts b/src/resources/agents/evaluation-metrics/openai/openai.ts index b05622b8..e965012b 100644 --- a/src/resources/agents/evaluation-metrics/openai/openai.ts +++ b/src/resources/agents/evaluation-metrics/openai/openai.ts @@ -2,19 +2,7 @@ import { APIResource } from '../../../../core/resource'; import * as KeysAPI from './keys'; -import { - KeyCreateParams, - KeyCreateResponse, - KeyDeleteResponse, - KeyListAgentsParams, - KeyListAgentsResponse, - KeyListParams, - KeyListResponse, - KeyRetrieveResponse, - KeyUpdateParams, - KeyUpdateResponse, - Keys, -} from './keys'; +import { KeyCreateParams, KeyCreateResponse, KeyDeleteResponse, KeyListAgentsParams, KeyListAgentsResponse, KeyListParams, KeyListResponse, KeyRetrieveResponse, KeyUpdateParams, KeyUpdateResponse, Keys } from './keys'; export class OpenAI extends APIResource { keys: KeysAPI.Keys = new KeysAPI.Keys(this._client); @@ -34,6 +22,6 @@ export declare namespace OpenAI { type KeyCreateParams as KeyCreateParams, type KeyUpdateParams as KeyUpdateParams, type KeyListParams as KeyListParams, - type KeyListAgentsParams as KeyListAgentsParams, + type KeyListAgentsParams as KeyListAgentsParams }; } diff --git a/src/resources/agents/evaluation-metrics/scheduled-indexing.ts b/src/resources/agents/evaluation-metrics/scheduled-indexing.ts new file mode 100644 index 00000000..7edbbabf --- /dev/null +++ b/src/resources/agents/evaluation-metrics/scheduled-indexing.ts @@ -0,0 +1,279 @@ +// File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details. + +import { APIResource } from '../../../core/resource'; +import { APIPromise } from '../../../core/api-promise'; +import { RequestOptions } from '../../../internal/request-options'; +import { path } from '../../../internal/utils/path'; + +/** + * The API lets you build GPU-powered AI agents with pre-built or custom foundation models, function and agent routes, and RAG pipelines with knowledge bases. + */ +export class ScheduledIndexing extends APIResource { + /** + * To create scheduled indexing for a knowledge base, send a POST request to + * `/v2/gen-ai/scheduled-indexing`. + * + * @example + * ```ts + * const scheduledIndexing = + * await client.agents.evaluationMetrics.scheduledIndexing.create(); + * ``` + */ + create(body: ScheduledIndexingCreateParams | null | undefined = {}, options?: RequestOptions): APIPromise { + return this._client.post('/v2/gen-ai/scheduled-indexing', { body, defaultBaseURL: 'https://api.digitalocean.com', ...options }); + } + + /** + * Get Scheduled Indexing for knowledge base using knoweldge base uuid, send a GET + * request to `/v2/gen-ai/scheduled-indexing/knowledge-base/{knowledge_base_uuid}`. + * + * @example + * ```ts + * const scheduledIndexing = + * await client.agents.evaluationMetrics.scheduledIndexing.retrieve( + * '"123e4567-e89b-12d3-a456-426614174000"', + * ); + * ``` + */ + retrieve(knowledgeBaseUuid: string, options?: RequestOptions): APIPromise { + return this._client.get(path`/v2/gen-ai/scheduled-indexing/knowledge-base/${knowledgeBaseUuid}`, { defaultBaseURL: 'https://api.digitalocean.com', ...options }); + } + + /** + * Delete Scheduled Indexing for knowledge base, send a DELETE request to + * `/v2/gen-ai/scheduled-indexing/{uuid}`. + * + * @example + * ```ts + * const scheduledIndexing = + * await client.agents.evaluationMetrics.scheduledIndexing.delete( + * '"123e4567-e89b-12d3-a456-426614174000"', + * ); + * ``` + */ + delete(uuid: string, options?: RequestOptions): APIPromise { + return this._client.delete(path`/v2/gen-ai/scheduled-indexing/${uuid}`, { defaultBaseURL: 'https://api.digitalocean.com', ...options }); + } +} + +export interface ScheduledIndexingCreateResponse { + /** + * Metadata for scheduled indexing entries + */ + indexing_info?: ScheduledIndexingCreateResponse.IndexingInfo; +} + +export namespace ScheduledIndexingCreateResponse { + /** + * Metadata for scheduled indexing entries + */ + export interface IndexingInfo { + /** + * Created at timestamp + */ + created_at?: string; + + /** + * Days for execution (day is represented same as in a cron expression, e.g. Monday + * begins with 1 ) + */ + days?: Array; + + /** + * Deleted at timestamp (if soft deleted) + */ + deleted_at?: string; + + /** + * Whether the schedule is currently active + */ + is_active?: boolean; + + /** + * Knowledge base uuid associated with this schedule + */ + knowledge_base_uuid?: string; + + /** + * Last time the schedule was executed + */ + last_ran_at?: string; + + /** + * Next scheduled run + */ + next_run_at?: string; + + /** + * Scheduled time of execution (HH:MM:SS format) + */ + time?: string; + + /** + * Updated at timestamp + */ + updated_at?: string; + + /** + * Unique identifier for the scheduled indexing entry + */ + uuid?: string; + } +} + +export interface ScheduledIndexingRetrieveResponse { + /** + * Metadata for scheduled indexing entries + */ + indexing_info?: ScheduledIndexingRetrieveResponse.IndexingInfo; +} + +export namespace ScheduledIndexingRetrieveResponse { + /** + * Metadata for scheduled indexing entries + */ + export interface IndexingInfo { + /** + * Created at timestamp + */ + created_at?: string; + + /** + * Days for execution (day is represented same as in a cron expression, e.g. Monday + * begins with 1 ) + */ + days?: Array; + + /** + * Deleted at timestamp (if soft deleted) + */ + deleted_at?: string; + + /** + * Whether the schedule is currently active + */ + is_active?: boolean; + + /** + * Knowledge base uuid associated with this schedule + */ + knowledge_base_uuid?: string; + + /** + * Last time the schedule was executed + */ + last_ran_at?: string; + + /** + * Next scheduled run + */ + next_run_at?: string; + + /** + * Scheduled time of execution (HH:MM:SS format) + */ + time?: string; + + /** + * Updated at timestamp + */ + updated_at?: string; + + /** + * Unique identifier for the scheduled indexing entry + */ + uuid?: string; + } +} + +export interface ScheduledIndexingDeleteResponse { + /** + * Metadata for scheduled indexing entries + */ + indexing_info?: ScheduledIndexingDeleteResponse.IndexingInfo; +} + +export namespace ScheduledIndexingDeleteResponse { + /** + * Metadata for scheduled indexing entries + */ + export interface IndexingInfo { + /** + * Created at timestamp + */ + created_at?: string; + + /** + * Days for execution (day is represented same as in a cron expression, e.g. Monday + * begins with 1 ) + */ + days?: Array; + + /** + * Deleted at timestamp (if soft deleted) + */ + deleted_at?: string; + + /** + * Whether the schedule is currently active + */ + is_active?: boolean; + + /** + * Knowledge base uuid associated with this schedule + */ + knowledge_base_uuid?: string; + + /** + * Last time the schedule was executed + */ + last_ran_at?: string; + + /** + * Next scheduled run + */ + next_run_at?: string; + + /** + * Scheduled time of execution (HH:MM:SS format) + */ + time?: string; + + /** + * Updated at timestamp + */ + updated_at?: string; + + /** + * Unique identifier for the scheduled indexing entry + */ + uuid?: string; + } +} + +export interface ScheduledIndexingCreateParams { + /** + * Days for execution (day is represented same as in a cron expression, e.g. Monday + * begins with 1 ) + */ + days?: Array; + + /** + * Knowledge base uuid for which the schedule is created + */ + knowledge_base_uuid?: string; + + /** + * Time of execution (HH:MM) UTC + */ + time?: string; +} + +export declare namespace ScheduledIndexing { + export { + type ScheduledIndexingCreateResponse as ScheduledIndexingCreateResponse, + type ScheduledIndexingRetrieveResponse as ScheduledIndexingRetrieveResponse, + type ScheduledIndexingDeleteResponse as ScheduledIndexingDeleteResponse, + type ScheduledIndexingCreateParams as ScheduledIndexingCreateParams + }; +} diff --git a/src/resources/agents/evaluation-metrics/workspaces/agents.ts b/src/resources/agents/evaluation-metrics/workspaces/agents.ts index b31c2e70..840bfa68 100644 --- a/src/resources/agents/evaluation-metrics/workspaces/agents.ts +++ b/src/resources/agents/evaluation-metrics/workspaces/agents.ts @@ -7,6 +7,9 @@ import { APIPromise } from '../../../../core/api-promise'; import { RequestOptions } from '../../../../internal/request-options'; import { path } from '../../../../internal/utils/path'; +/** + * The API lets you build GPU-powered AI agents with pre-built or custom foundation models, function and agent routes, and RAG pipelines with knowledge bases. + */ export class Agents extends APIResource { /** * To list all agents by a Workspace, send a GET request to @@ -20,16 +23,8 @@ export class Agents extends APIResource { * ); * ``` */ - list( - workspaceUuid: string, - query: AgentListParams | null | undefined = {}, - options?: RequestOptions, - ): APIPromise { - return this._client.get(path`/v2/gen-ai/workspaces/${workspaceUuid}/agents`, { - query, - defaultBaseURL: 'https://api.digitalocean.com', - ...options, - }); + list(workspaceUuid: string, query: AgentListParams | null | undefined = {}, options?: RequestOptions): APIPromise { + return this._client.get(path`/v2/gen-ai/workspaces/${workspaceUuid}/agents`, { query, defaultBaseURL: 'https://api.digitalocean.com', ...options }); } /** @@ -44,16 +39,8 @@ export class Agents extends APIResource { * ); * ``` */ - move( - workspaceUuid: string, - body: AgentMoveParams | null | undefined = {}, - options?: RequestOptions, - ): APIPromise { - return this._client.put(path`/v2/gen-ai/workspaces/${workspaceUuid}/agents`, { - body, - defaultBaseURL: 'https://api.digitalocean.com', - ...options, - }); + move(workspaceUuid: string, body: AgentMoveParams | null | undefined = {}, options?: RequestOptions): APIPromise { + return this._client.put(path`/v2/gen-ai/workspaces/${workspaceUuid}/agents`, { body, defaultBaseURL: 'https://api.digitalocean.com', ...options }); } } @@ -101,7 +88,7 @@ export interface AgentMoveParams { /** * Workspace uuid to move agents to */ - body_workspace_uuid?: string; + workspace_uuid?: string; } export declare namespace Agents { @@ -109,6 +96,6 @@ export declare namespace Agents { type AgentListResponse as AgentListResponse, type AgentMoveResponse as AgentMoveResponse, type AgentListParams as AgentListParams, - type AgentMoveParams as AgentMoveParams, + type AgentMoveParams as AgentMoveParams }; } diff --git a/src/resources/agents/evaluation-metrics/workspaces/index.ts b/src/resources/agents/evaluation-metrics/workspaces/index.ts index 1fafa844..ee9944b0 100644 --- a/src/resources/agents/evaluation-metrics/workspaces/index.ts +++ b/src/resources/agents/evaluation-metrics/workspaces/index.ts @@ -1,20 +1,4 @@ // File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details. -export { - Agents, - type AgentListResponse, - type AgentMoveResponse, - type AgentListParams, - type AgentMoveParams, -} from './agents'; -export { - Workspaces, - type WorkspaceCreateResponse, - type WorkspaceRetrieveResponse, - type WorkspaceUpdateResponse, - type WorkspaceListResponse, - type WorkspaceDeleteResponse, - type WorkspaceListEvaluationTestCasesResponse, - type WorkspaceCreateParams, - type WorkspaceUpdateParams, -} from './workspaces'; +export { Agents, type AgentListResponse, type AgentMoveResponse, type AgentListParams, type AgentMoveParams } from './agents';; +export { Workspaces, type WorkspaceCreateResponse, type WorkspaceRetrieveResponse, type WorkspaceUpdateResponse, type WorkspaceListResponse, type WorkspaceDeleteResponse, type WorkspaceListEvaluationTestCasesResponse, type WorkspaceCreateParams, type WorkspaceUpdateParams } from './workspaces';; diff --git a/src/resources/agents/evaluation-metrics/workspaces/workspaces.ts b/src/resources/agents/evaluation-metrics/workspaces/workspaces.ts index 74475cbd..17c8c740 100644 --- a/src/resources/agents/evaluation-metrics/workspaces/workspaces.ts +++ b/src/resources/agents/evaluation-metrics/workspaces/workspaces.ts @@ -9,6 +9,9 @@ import { APIPromise } from '../../../../core/api-promise'; import { RequestOptions } from '../../../../internal/request-options'; import { path } from '../../../../internal/utils/path'; +/** + * The API lets you build GPU-powered AI agents with pre-built or custom foundation models, function and agent routes, and RAG pipelines with knowledge bases. + */ export class Workspaces extends APIResource { agents: WorkspacesAgentsAPI.Agents = new WorkspacesAgentsAPI.Agents(this._client); @@ -22,15 +25,8 @@ export class Workspaces extends APIResource { * await client.agents.evaluationMetrics.workspaces.create(); * ``` */ - create( - body: WorkspaceCreateParams | null | undefined = {}, - options?: RequestOptions, - ): APIPromise { - return this._client.post('/v2/gen-ai/workspaces', { - body, - defaultBaseURL: 'https://api.digitalocean.com', - ...options, - }); + create(body: WorkspaceCreateParams | null | undefined = {}, options?: RequestOptions): APIPromise { + return this._client.post('/v2/gen-ai/workspaces', { body, defaultBaseURL: 'https://api.digitalocean.com', ...options }); } /** @@ -47,10 +43,7 @@ export class Workspaces extends APIResource { * ``` */ retrieve(workspaceUuid: string, options?: RequestOptions): APIPromise { - return this._client.get(path`/v2/gen-ai/workspaces/${workspaceUuid}`, { - defaultBaseURL: 'https://api.digitalocean.com', - ...options, - }); + return this._client.get(path`/v2/gen-ai/workspaces/${workspaceUuid}`, { defaultBaseURL: 'https://api.digitalocean.com', ...options }); } /** @@ -66,16 +59,8 @@ export class Workspaces extends APIResource { * ); * ``` */ - update( - workspaceUuid: string, - body: WorkspaceUpdateParams | null | undefined = {}, - options?: RequestOptions, - ): APIPromise { - return this._client.put(path`/v2/gen-ai/workspaces/${workspaceUuid}`, { - body, - defaultBaseURL: 'https://api.digitalocean.com', - ...options, - }); + update(workspaceUuid: string, body: WorkspaceUpdateParams | null | undefined = {}, options?: RequestOptions): APIPromise { + return this._client.put(path`/v2/gen-ai/workspaces/${workspaceUuid}`, { body, defaultBaseURL: 'https://api.digitalocean.com', ...options }); } /** @@ -88,10 +73,7 @@ export class Workspaces extends APIResource { * ``` */ list(options?: RequestOptions): APIPromise { - return this._client.get('/v2/gen-ai/workspaces', { - defaultBaseURL: 'https://api.digitalocean.com', - ...options, - }); + return this._client.get('/v2/gen-ai/workspaces', { defaultBaseURL: 'https://api.digitalocean.com', ...options }); } /** @@ -107,10 +89,7 @@ export class Workspaces extends APIResource { * ``` */ delete(workspaceUuid: string, options?: RequestOptions): APIPromise { - return this._client.delete(path`/v2/gen-ai/workspaces/${workspaceUuid}`, { - defaultBaseURL: 'https://api.digitalocean.com', - ...options, - }); + return this._client.delete(path`/v2/gen-ai/workspaces/${workspaceUuid}`, { defaultBaseURL: 'https://api.digitalocean.com', ...options }); } /** @@ -125,14 +104,8 @@ export class Workspaces extends APIResource { * ); * ``` */ - listEvaluationTestCases( - workspaceUuid: string, - options?: RequestOptions, - ): APIPromise { - return this._client.get(path`/v2/gen-ai/workspaces/${workspaceUuid}/evaluation_test_cases`, { - defaultBaseURL: 'https://api.digitalocean.com', - ...options, - }); + listEvaluationTestCases(workspaceUuid: string, options?: RequestOptions): APIPromise { + return this._client.get(path`/v2/gen-ai/workspaces/${workspaceUuid}/evaluation_test_cases`, { defaultBaseURL: 'https://api.digitalocean.com', ...options }); } } @@ -197,7 +170,7 @@ export interface WorkspaceUpdateParams { /** * Workspace UUID. */ - body_workspace_uuid?: string; + workspace_uuid?: string; } Workspaces.Agents = Agents; @@ -211,7 +184,7 @@ export declare namespace Workspaces { type WorkspaceDeleteResponse as WorkspaceDeleteResponse, type WorkspaceListEvaluationTestCasesResponse as WorkspaceListEvaluationTestCasesResponse, type WorkspaceCreateParams as WorkspaceCreateParams, - type WorkspaceUpdateParams as WorkspaceUpdateParams, + type WorkspaceUpdateParams as WorkspaceUpdateParams }; export { @@ -219,6 +192,6 @@ export declare namespace Workspaces { type AgentListResponse as AgentListResponse, type AgentMoveResponse as AgentMoveResponse, type AgentListParams as AgentListParams, - type AgentMoveParams as AgentMoveParams, + type AgentMoveParams as AgentMoveParams }; } diff --git a/src/resources/agents/evaluation-runs.ts b/src/resources/agents/evaluation-runs.ts index 76b773c5..d79fc445 100644 --- a/src/resources/agents/evaluation-runs.ts +++ b/src/resources/agents/evaluation-runs.ts @@ -1,11 +1,15 @@ // File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details. import { APIResource } from '../../core/resource'; +import * as EvaluationRunsAPI from './evaluation-runs'; import * as Shared from '../shared'; import { APIPromise } from '../../core/api-promise'; import { RequestOptions } from '../../internal/request-options'; import { path } from '../../internal/utils/path'; +/** + * The API lets you build GPU-powered AI agents with pre-built or custom foundation models, function and agent routes, and RAG pipelines with knowledge bases. + */ export class EvaluationRuns extends APIResource { /** * To run an evaluation test case, send a POST request to @@ -17,15 +21,8 @@ export class EvaluationRuns extends APIResource { * await client.agents.evaluationRuns.create(); * ``` */ - create( - body: EvaluationRunCreateParams | null | undefined = {}, - options?: RequestOptions, - ): APIPromise { - return this._client.post('/v2/gen-ai/evaluation_runs', { - body, - defaultBaseURL: 'https://api.digitalocean.com', - ...options, - }); + create(body: EvaluationRunCreateParams | null | undefined = {}, options?: RequestOptions): APIPromise { + return this._client.post('/v2/gen-ai/evaluation_runs', { body, defaultBaseURL: 'https://api.digitalocean.com', ...options }); } /** @@ -41,10 +38,7 @@ export class EvaluationRuns extends APIResource { * ``` */ retrieve(evaluationRunUuid: string, options?: RequestOptions): APIPromise { - return this._client.get(path`/v2/gen-ai/evaluation_runs/${evaluationRunUuid}`, { - defaultBaseURL: 'https://api.digitalocean.com', - ...options, - }); + return this._client.get(path`/v2/gen-ai/evaluation_runs/${evaluationRunUuid}`, { defaultBaseURL: 'https://api.digitalocean.com', ...options }); } /** @@ -59,16 +53,8 @@ export class EvaluationRuns extends APIResource { * ); * ``` */ - listResults( - evaluationRunUuid: string, - query: EvaluationRunListResultsParams | null | undefined = {}, - options?: RequestOptions, - ): APIPromise { - return this._client.get(path`/v2/gen-ai/evaluation_runs/${evaluationRunUuid}/results`, { - query, - defaultBaseURL: 'https://api.digitalocean.com', - ...options, - }); + listResults(evaluationRunUuid: string, query: EvaluationRunListResultsParams | null | undefined = {}, options?: RequestOptions): APIPromise { + return this._client.get(path`/v2/gen-ai/evaluation_runs/${evaluationRunUuid}/results`, { query, defaultBaseURL: 'https://api.digitalocean.com', ...options }); } /** @@ -84,20 +70,15 @@ export class EvaluationRuns extends APIResource { * }); * ``` */ - retrieveResults( - promptID: number, - params: EvaluationRunRetrieveResultsParams, - options?: RequestOptions, - ): APIPromise { - const { evaluation_run_uuid } = params; - return this._client.get(path`/v2/gen-ai/evaluation_runs/${evaluation_run_uuid}/results/${promptID}`, { - defaultBaseURL: 'https://api.digitalocean.com', - ...options, - }); + retrieveResults(promptID: number, params: EvaluationRunRetrieveResultsParams, options?: RequestOptions): APIPromise { + const { evaluation_run_uuid } = params + return this._client.get(path`/v2/gen-ai/evaluation_runs/${evaluation_run_uuid}/results/${promptID}`, { defaultBaseURL: 'https://api.digitalocean.com', ...options }); } } export interface APIEvaluationMetric { + category?: 'METRIC_CATEGORY_UNSPECIFIED' | 'METRIC_CATEGORY_CORRECTNESS' | 'METRIC_CATEGORY_USER_OUTCOMES' | 'METRIC_CATEGORY_SAFETY_AND_SECURITY' | 'METRIC_CATEGORY_CONTEXT_QUALITY' | 'METRIC_CATEGORY_MODEL_FIT'; + description?: string; /** @@ -105,17 +86,17 @@ export interface APIEvaluationMetric { */ inverted?: boolean; + is_metric_goal?: boolean; + metric_name?: string; + metric_rank?: number; + metric_type?: 'METRIC_TYPE_UNSPECIFIED' | 'METRIC_TYPE_GENERAL_QUALITY' | 'METRIC_TYPE_RAG_AND_TOOL'; metric_uuid?: string; - metric_value_type?: - | 'METRIC_VALUE_TYPE_UNSPECIFIED' - | 'METRIC_VALUE_TYPE_NUMBER' - | 'METRIC_VALUE_TYPE_STRING' - | 'METRIC_VALUE_TYPE_PERCENTAGE'; + metric_value_type?: 'METRIC_VALUE_TYPE_UNSPECIFIED' | 'METRIC_VALUE_TYPE_NUMBER' | 'METRIC_VALUE_TYPE_STRING' | 'METRIC_VALUE_TYPE_PERCENTAGE'; /** * The maximum value for the metric. @@ -139,11 +120,7 @@ export interface APIEvaluationMetricResult { */ metric_name?: string; - metric_value_type?: - | 'METRIC_VALUE_TYPE_UNSPECIFIED' - | 'METRIC_VALUE_TYPE_NUMBER' - | 'METRIC_VALUE_TYPE_STRING' - | 'METRIC_VALUE_TYPE_PERCENTAGE'; + metric_value_type?: 'METRIC_VALUE_TYPE_UNSPECIFIED' | 'METRIC_VALUE_TYPE_NUMBER' | 'METRIC_VALUE_TYPE_STRING' | 'METRIC_VALUE_TYPE_PERCENTAGE'; /** * The value of the metric as a number. @@ -162,6 +139,11 @@ export interface APIEvaluationMetricResult { } export interface APIEvaluationPrompt { + /** + * The evaluated trace spans. + */ + evaluation_trace_spans?: Array; + /** * The ground truth for the prompt. */ @@ -195,9 +177,84 @@ export interface APIEvaluationPrompt { * The metric results for the prompt. */ prompt_level_metric_results?: Array; + + /** + * The trace id for the prompt. + */ + trace_id?: string; } export namespace APIEvaluationPrompt { + /** + * Represents a span within an evaluatioin trace (e.g., LLM call, tool call, etc.) + */ + export interface EvaluationTraceSpan { + /** + * When the span was created + */ + created_at?: string; + + /** + * Input data for the span (flexible structure - can be messages array, string, + * etc.) + */ + input?: unknown; + + /** + * Name/identifier for the span + */ + name?: string; + + /** + * Output data from the span (flexible structure - can be message, string, etc.) + */ + output?: unknown; + + /** + * Any retriever span chunks that were included as part of the span. + */ + retriever_chunks?: Array; + + /** + * The span-level metric results. + */ + span_level_metric_results?: Array; + + /** + * Types of spans in a trace + */ + type?: 'TRACE_SPAN_TYPE_UNKNOWN' | 'TRACE_SPAN_TYPE_LLM' | 'TRACE_SPAN_TYPE_RETRIEVER' | 'TRACE_SPAN_TYPE_TOOL'; + } + + export namespace EvaluationTraceSpan { + export interface RetrieverChunk { + /** + * The usage percentage of the chunk. + */ + chunk_usage_pct?: number; + + /** + * Indicates if the chunk was used in the prompt. + */ + chunk_used?: boolean; + + /** + * The index uuid (Knowledge Base) of the chunk. + */ + index_uuid?: string; + + /** + * The source name for the chunk, e.g., the file name or document title. + */ + source_name?: string; + + /** + * Text content of the chunk. + */ + text?: string; + } + } + export interface PromptChunk { /** * The usage percentage of the chunk. @@ -232,6 +289,11 @@ export interface APIEvaluationRun { */ agent_deleted?: boolean; + /** + * The agent deployment name + */ + agent_deployment_name?: string; + /** * Agent name */ @@ -303,16 +365,7 @@ export interface APIEvaluationRun { /** * Evaluation Run Statuses */ - status?: - | 'EVALUATION_RUN_STATUS_UNSPECIFIED' - | 'EVALUATION_RUN_QUEUED' - | 'EVALUATION_RUN_RUNNING_DATASET' - | 'EVALUATION_RUN_EVALUATING_RESULTS' - | 'EVALUATION_RUN_CANCELLING' - | 'EVALUATION_RUN_CANCELLED' - | 'EVALUATION_RUN_SUCCESSFUL' - | 'EVALUATION_RUN_PARTIALLY_SUCCESSFUL' - | 'EVALUATION_RUN_FAILED'; + status?: 'EVALUATION_RUN_STATUS_UNSPECIFIED' | 'EVALUATION_RUN_QUEUED' | 'EVALUATION_RUN_RUNNING_DATASET' | 'EVALUATION_RUN_EVALUATING_RESULTS' | 'EVALUATION_RUN_CANCELLING' | 'EVALUATION_RUN_CANCELLED' | 'EVALUATION_RUN_SUCCESSFUL' | 'EVALUATION_RUN_PARTIALLY_SUCCESSFUL' | 'EVALUATION_RUN_FAILED'; /** * Test case description. @@ -371,7 +424,12 @@ export interface EvaluationRunRetrieveResultsResponse { export interface EvaluationRunCreateParams { /** - * Agent UUIDs to run the test case against. + * Agent deployment names to run the test case against (ADK agent workspaces). + */ + agent_deployment_names?: Array; + + /** + * Agent UUIDs to run the test case against (legacy agents). */ agent_uuids?: Array; @@ -417,6 +475,6 @@ export declare namespace EvaluationRuns { type EvaluationRunRetrieveResultsResponse as EvaluationRunRetrieveResultsResponse, type EvaluationRunCreateParams as EvaluationRunCreateParams, type EvaluationRunListResultsParams as EvaluationRunListResultsParams, - type EvaluationRunRetrieveResultsParams as EvaluationRunRetrieveResultsParams, + type EvaluationRunRetrieveResultsParams as EvaluationRunRetrieveResultsParams }; } diff --git a/src/resources/agents/evaluation-test-cases.ts b/src/resources/agents/evaluation-test-cases.ts index 87be4c49..cdf0eb99 100644 --- a/src/resources/agents/evaluation-test-cases.ts +++ b/src/resources/agents/evaluation-test-cases.ts @@ -6,6 +6,9 @@ import { APIPromise } from '../../core/api-promise'; import { RequestOptions } from '../../internal/request-options'; import { path } from '../../internal/utils/path'; +/** + * The API lets you build GPU-powered AI agents with pre-built or custom foundation models, function and agent routes, and RAG pipelines with knowledge bases. + */ export class EvaluationTestCases extends APIResource { /** * To create an evaluation test-case send a POST request to @@ -17,15 +20,8 @@ export class EvaluationTestCases extends APIResource { * await client.agents.evaluationTestCases.create(); * ``` */ - create( - body: EvaluationTestCaseCreateParams | null | undefined = {}, - options?: RequestOptions, - ): APIPromise { - return this._client.post('/v2/gen-ai/evaluation_test_cases', { - body, - defaultBaseURL: 'https://api.digitalocean.com', - ...options, - }); + create(body: EvaluationTestCaseCreateParams | null | undefined = {}, options?: RequestOptions): APIPromise { + return this._client.post('/v2/gen-ai/evaluation_test_cases', { body, defaultBaseURL: 'https://api.digitalocean.com', ...options }); } /** @@ -40,16 +36,8 @@ export class EvaluationTestCases extends APIResource { * ); * ``` */ - retrieve( - testCaseUuid: string, - query: EvaluationTestCaseRetrieveParams | null | undefined = {}, - options?: RequestOptions, - ): APIPromise { - return this._client.get(path`/v2/gen-ai/evaluation_test_cases/${testCaseUuid}`, { - query, - defaultBaseURL: 'https://api.digitalocean.com', - ...options, - }); + retrieve(testCaseUuid: string, query: EvaluationTestCaseRetrieveParams | null | undefined = {}, options?: RequestOptions): APIPromise { + return this._client.get(path`/v2/gen-ai/evaluation_test_cases/${testCaseUuid}`, { query, defaultBaseURL: 'https://api.digitalocean.com', ...options }); } /** @@ -64,16 +52,8 @@ export class EvaluationTestCases extends APIResource { * ); * ``` */ - update( - testCaseUuid: string, - body: EvaluationTestCaseUpdateParams | null | undefined = {}, - options?: RequestOptions, - ): APIPromise { - return this._client.put(path`/v2/gen-ai/evaluation_test_cases/${testCaseUuid}`, { - body, - defaultBaseURL: 'https://api.digitalocean.com', - ...options, - }); + update(testCaseUuid: string, body: EvaluationTestCaseUpdateParams | null | undefined = {}, options?: RequestOptions): APIPromise { + return this._client.put(path`/v2/gen-ai/evaluation_test_cases/${testCaseUuid}`, { body, defaultBaseURL: 'https://api.digitalocean.com', ...options }); } /** @@ -87,10 +67,7 @@ export class EvaluationTestCases extends APIResource { * ``` */ list(options?: RequestOptions): APIPromise { - return this._client.get('/v2/gen-ai/evaluation_test_cases', { - defaultBaseURL: 'https://api.digitalocean.com', - ...options, - }); + return this._client.get('/v2/gen-ai/evaluation_test_cases', { defaultBaseURL: 'https://api.digitalocean.com', ...options }); } /** @@ -105,15 +82,8 @@ export class EvaluationTestCases extends APIResource { * ); * ``` */ - listEvaluationRuns( - evaluationTestCaseUuid: string, - query: EvaluationTestCaseListEvaluationRunsParams | null | undefined = {}, - options?: RequestOptions, - ): APIPromise { - return this._client.get( - path`/v2/gen-ai/evaluation_test_cases/${evaluationTestCaseUuid}/evaluation_runs`, - { query, defaultBaseURL: 'https://api.digitalocean.com', ...options }, - ); + listEvaluationRuns(evaluationTestCaseUuid: string, query: EvaluationTestCaseListEvaluationRunsParams | null | undefined = {}, options?: RequestOptions): APIPromise { + return this._client.get(path`/v2/gen-ai/evaluation_test_cases/${evaluationTestCaseUuid}/evaluation_runs`, { query, defaultBaseURL: 'https://api.digitalocean.com', ...options }); } } @@ -243,6 +213,8 @@ export interface EvaluationTestCaseListEvaluationRunsResponse { } export interface EvaluationTestCaseCreateParams { + agent_workspace_name?: string; + /** * Dataset against which the test‑case is executed. */ @@ -301,7 +273,7 @@ export interface EvaluationTestCaseUpdateParams { /** * Test-case UUID to update */ - body_test_case_uuid?: string; + test_case_uuid?: string; } export namespace EvaluationTestCaseUpdateParams { @@ -329,6 +301,6 @@ export declare namespace EvaluationTestCases { type EvaluationTestCaseCreateParams as EvaluationTestCaseCreateParams, type EvaluationTestCaseRetrieveParams as EvaluationTestCaseRetrieveParams, type EvaluationTestCaseUpdateParams as EvaluationTestCaseUpdateParams, - type EvaluationTestCaseListEvaluationRunsParams as EvaluationTestCaseListEvaluationRunsParams, + type EvaluationTestCaseListEvaluationRunsParams as EvaluationTestCaseListEvaluationRunsParams }; } diff --git a/src/resources/agents/functions.ts b/src/resources/agents/functions.ts index bdc8f84d..1d23a492 100644 --- a/src/resources/agents/functions.ts +++ b/src/resources/agents/functions.ts @@ -6,6 +6,9 @@ import { APIPromise } from '../../core/api-promise'; import { RequestOptions } from '../../internal/request-options'; import { path } from '../../internal/utils/path'; +/** + * The API lets you build GPU-powered AI agents with pre-built or custom foundation models, function and agent routes, and RAG pipelines with knowledge bases. + */ export class Functions extends APIResource { /** * To create a function route for an agent, send a POST request to @@ -18,16 +21,8 @@ export class Functions extends APIResource { * ); * ``` */ - create( - agentUuid: string, - body: FunctionCreateParams | null | undefined = {}, - options?: RequestOptions, - ): APIPromise { - return this._client.post(path`/v2/gen-ai/agents/${agentUuid}/functions`, { - body, - defaultBaseURL: 'https://api.digitalocean.com', - ...options, - }); + create(agentUuid: string, body: FunctionCreateParams | null | undefined = {}, options?: RequestOptions): APIPromise { + return this._client.post(path`/v2/gen-ai/agents/${agentUuid}/functions`, { body, defaultBaseURL: 'https://api.digitalocean.com', ...options }); } /** @@ -45,17 +40,9 @@ export class Functions extends APIResource { * ); * ``` */ - update( - functionUuid: string, - params: FunctionUpdateParams, - options?: RequestOptions, - ): APIPromise { - const { path_agent_uuid, ...body } = params; - return this._client.put(path`/v2/gen-ai/agents/${path_agent_uuid}/functions/${functionUuid}`, { - body, - defaultBaseURL: 'https://api.digitalocean.com', - ...options, - }); + update(functionUuid: string, params: FunctionUpdateParams, options?: RequestOptions): APIPromise { + const { path_agent_uuid, ...body } = params + return this._client.put(path`/v2/gen-ai/agents/${path_agent_uuid}/functions/${functionUuid}`, { body, defaultBaseURL: 'https://api.digitalocean.com', ...options }); } /** @@ -70,16 +57,9 @@ export class Functions extends APIResource { * ); * ``` */ - delete( - functionUuid: string, - params: FunctionDeleteParams, - options?: RequestOptions, - ): APIPromise { - const { agent_uuid } = params; - return this._client.delete(path`/v2/gen-ai/agents/${agent_uuid}/functions/${functionUuid}`, { - defaultBaseURL: 'https://api.digitalocean.com', - ...options, - }); + delete(functionUuid: string, params: FunctionDeleteParams, options?: RequestOptions): APIPromise { + const { agent_uuid } = params + return this._client.delete(path`/v2/gen-ai/agents/${agent_uuid}/functions/${functionUuid}`, { defaultBaseURL: 'https://api.digitalocean.com', ...options }); } } @@ -117,7 +97,7 @@ export interface FunctionCreateParams { /** * Agent id */ - body_agent_uuid?: string; + agent_uuid?: string; /** * Function description @@ -184,7 +164,7 @@ export interface FunctionUpdateParams { /** * Body param: Function id */ - body_function_uuid?: string; + function_uuid?: string; /** * Body param: Describe the input schema for the function so the agent may call it @@ -212,6 +192,6 @@ export declare namespace Functions { type FunctionDeleteResponse as FunctionDeleteResponse, type FunctionCreateParams as FunctionCreateParams, type FunctionUpdateParams as FunctionUpdateParams, - type FunctionDeleteParams as FunctionDeleteParams, + type FunctionDeleteParams as FunctionDeleteParams }; } diff --git a/src/resources/agents/index.ts b/src/resources/agents/index.ts index 862f9855..a7a4e9b9 100644 --- a/src/resources/agents/index.ts +++ b/src/resources/agents/index.ts @@ -1,113 +1,13 @@ // File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details. -export { - APIKeys, - type APIKeyCreateResponse, - type APIKeyUpdateResponse, - type APIKeyListResponse, - type APIKeyDeleteResponse, - type APIKeyRegenerateResponse, - type APIKeyCreateParams, - type APIKeyUpdateParams, - type APIKeyListParams, - type APIKeyDeleteParams, - type APIKeyRegenerateParams, -} from './api-keys'; -export { - Agents, - type APIAgent, - type APIAgentAPIKeyInfo, - type APIAgentModel, - type APIAnthropicAPIKeyInfo, - type APIDeploymentVisibility, - type APIOpenAIAPIKeyInfo, - type APIRetrievalMethod, - type APIWorkspace, - type AgentCreateResponse, - type AgentRetrieveResponse, - type AgentUpdateResponse, - type AgentListResponse, - type AgentDeleteResponse, - type AgentRetrieveUsageResponse, - type AgentUpdateStatusResponse, - type AgentCreateParams, - type AgentUpdateParams, - type AgentListParams, - type AgentRetrieveUsageParams, - type AgentUpdateStatusParams, -} from './agents'; -export { Chat } from './chat/index'; -export { - EvaluationDatasets, - type EvaluationDatasetCreateResponse, - type EvaluationDatasetCreateFileUploadPresignedURLsResponse, - type EvaluationDatasetCreateParams, - type EvaluationDatasetCreateFileUploadPresignedURLsParams, -} from './evaluation-datasets'; -export { - EvaluationMetrics, - type EvaluationMetricListResponse, - type EvaluationMetricListRegionsResponse, - type EvaluationMetricListRegionsParams, -} from './evaluation-metrics/index'; -export { - EvaluationRuns, - type APIEvaluationMetric, - type APIEvaluationMetricResult, - type APIEvaluationPrompt, - type APIEvaluationRun, - type EvaluationRunCreateResponse, - type EvaluationRunRetrieveResponse, - type EvaluationRunListResultsResponse, - type EvaluationRunRetrieveResultsResponse, - type EvaluationRunCreateParams, - type EvaluationRunListResultsParams, - type EvaluationRunRetrieveResultsParams, -} from './evaluation-runs'; -export { - EvaluationTestCases, - type APIEvaluationTestCase, - type APIStarMetric, - type EvaluationTestCaseCreateResponse, - type EvaluationTestCaseRetrieveResponse, - type EvaluationTestCaseUpdateResponse, - type EvaluationTestCaseListResponse, - type EvaluationTestCaseListEvaluationRunsResponse, - type EvaluationTestCaseCreateParams, - type EvaluationTestCaseRetrieveParams, - type EvaluationTestCaseUpdateParams, - type EvaluationTestCaseListEvaluationRunsParams, -} from './evaluation-test-cases'; -export { - Functions, - type FunctionCreateResponse, - type FunctionUpdateResponse, - type FunctionDeleteResponse, - type FunctionCreateParams, - type FunctionUpdateParams, - type FunctionDeleteParams, -} from './functions'; -export { - KnowledgeBases, - type APILinkKnowledgeBaseOutput, - type KnowledgeBaseDetachResponse, - type KnowledgeBaseAttachSingleParams, - type KnowledgeBaseDetachParams, -} from './knowledge-bases'; -export { - Routes, - type RouteUpdateResponse, - type RouteDeleteResponse, - type RouteAddResponse, - type RouteViewResponse, - type RouteUpdateParams, - type RouteDeleteParams, - type RouteAddParams, -} from './routes'; -export { - Versions, - type VersionUpdateResponse, - type VersionListResponse, - type VersionUpdateParams, - type VersionListParams, -} from './versions'; +export { APIKeys, type APIKeyCreateResponse, type APIKeyUpdateResponse, type APIKeyListResponse, type APIKeyDeleteResponse, type APIKeyRegenerateResponse, type APIKeyCreateParams, type APIKeyUpdateParams, type APIKeyListParams, type APIKeyDeleteParams, type APIKeyRegenerateParams } from './api-keys';; +export { Agents, type APIAgent, type APIAgentAPIKeyInfo, type APIAgentModel, type APIAnthropicAPIKeyInfo, type APIDeploymentVisibility, type APIOpenAIAPIKeyInfo, type APIRetrievalMethod, type APIWorkspace, type AgentCreateResponse, type AgentRetrieveResponse, type AgentUpdateResponse, type AgentListResponse, type AgentDeleteResponse, type AgentRetrieveUsageResponse, type AgentUpdateStatusResponse, type AgentCreateParams, type AgentUpdateParams, type AgentListParams, type AgentRetrieveUsageParams, type AgentUpdateStatusParams } from './agents';; +export { Chat } from './chat/index';; +export { EvaluationDatasets, type EvaluationDatasetCreateResponse, type EvaluationDatasetCreateFileUploadPresignedURLsResponse, type EvaluationDatasetCreateParams, type EvaluationDatasetCreateFileUploadPresignedURLsParams } from './evaluation-datasets';; +export { EvaluationMetrics, type EvaluationMetricListResponse, type EvaluationMetricListRegionsResponse, type EvaluationMetricListRegionsParams } from './evaluation-metrics/index';; +export { EvaluationRuns, type APIEvaluationMetric, type APIEvaluationMetricResult, type APIEvaluationPrompt, type APIEvaluationRun, type EvaluationRunCreateResponse, type EvaluationRunRetrieveResponse, type EvaluationRunListResultsResponse, type EvaluationRunRetrieveResultsResponse, type EvaluationRunCreateParams, type EvaluationRunListResultsParams, type EvaluationRunRetrieveResultsParams } from './evaluation-runs';; +export { EvaluationTestCases, type APIEvaluationTestCase, type APIStarMetric, type EvaluationTestCaseCreateResponse, type EvaluationTestCaseRetrieveResponse, type EvaluationTestCaseUpdateResponse, type EvaluationTestCaseListResponse, type EvaluationTestCaseListEvaluationRunsResponse, type EvaluationTestCaseCreateParams, type EvaluationTestCaseRetrieveParams, type EvaluationTestCaseUpdateParams, type EvaluationTestCaseListEvaluationRunsParams } from './evaluation-test-cases';; +export { Functions, type FunctionCreateResponse, type FunctionUpdateResponse, type FunctionDeleteResponse, type FunctionCreateParams, type FunctionUpdateParams, type FunctionDeleteParams } from './functions';; +export { KnowledgeBases, type APILinkKnowledgeBaseOutput, type KnowledgeBaseDetachResponse, type KnowledgeBaseAttachSingleParams, type KnowledgeBaseDetachParams } from './knowledge-bases';; +export { Routes, type RouteUpdateResponse, type RouteDeleteResponse, type RouteAddResponse, type RouteViewResponse, type RouteUpdateParams, type RouteDeleteParams, type RouteAddParams } from './routes';; +export { Versions, type VersionUpdateResponse, type VersionListResponse, type VersionUpdateParams, type VersionListParams } from './versions';; diff --git a/src/resources/agents/knowledge-bases.ts b/src/resources/agents/knowledge-bases.ts index 25f9dbc7..10318410 100644 --- a/src/resources/agents/knowledge-bases.ts +++ b/src/resources/agents/knowledge-bases.ts @@ -6,6 +6,9 @@ import { APIPromise } from '../../core/api-promise'; import { RequestOptions } from '../../internal/request-options'; import { path } from '../../internal/utils/path'; +/** + * The API lets you build GPU-powered AI agents with pre-built or custom foundation models, function and agent routes, and RAG pipelines with knowledge bases. + */ export class KnowledgeBases extends APIResource { /** * To attach knowledge bases to an agent, send a POST request to @@ -20,10 +23,7 @@ export class KnowledgeBases extends APIResource { * ``` */ attach(agentUuid: string, options?: RequestOptions): APIPromise { - return this._client.post(path`/v2/gen-ai/agents/${agentUuid}/knowledge_bases`, { - defaultBaseURL: 'https://api.digitalocean.com', - ...options, - }); + return this._client.post(path`/v2/gen-ai/agents/${agentUuid}/knowledge_bases`, { defaultBaseURL: 'https://api.digitalocean.com', ...options }); } /** @@ -41,16 +41,9 @@ export class KnowledgeBases extends APIResource { * ); * ``` */ - attachSingle( - knowledgeBaseUuid: string, - params: KnowledgeBaseAttachSingleParams, - options?: RequestOptions, - ): APIPromise { - const { agent_uuid } = params; - return this._client.post(path`/v2/gen-ai/agents/${agent_uuid}/knowledge_bases/${knowledgeBaseUuid}`, { - defaultBaseURL: 'https://api.digitalocean.com', - ...options, - }); + attachSingle(knowledgeBaseUuid: string, params: KnowledgeBaseAttachSingleParams, options?: RequestOptions): APIPromise { + const { agent_uuid } = params + return this._client.post(path`/v2/gen-ai/agents/${agent_uuid}/knowledge_bases/${knowledgeBaseUuid}`, { defaultBaseURL: 'https://api.digitalocean.com', ...options }); } /** @@ -65,16 +58,9 @@ export class KnowledgeBases extends APIResource { * ); * ``` */ - detach( - knowledgeBaseUuid: string, - params: KnowledgeBaseDetachParams, - options?: RequestOptions, - ): APIPromise { - const { agent_uuid } = params; - return this._client.delete(path`/v2/gen-ai/agents/${agent_uuid}/knowledge_bases/${knowledgeBaseUuid}`, { - defaultBaseURL: 'https://api.digitalocean.com', - ...options, - }); + detach(knowledgeBaseUuid: string, params: KnowledgeBaseDetachParams, options?: RequestOptions): APIPromise { + const { agent_uuid } = params + return this._client.delete(path`/v2/gen-ai/agents/${agent_uuid}/knowledge_bases/${knowledgeBaseUuid}`, { defaultBaseURL: 'https://api.digitalocean.com', ...options }); } } @@ -117,6 +103,6 @@ export declare namespace KnowledgeBases { type APILinkKnowledgeBaseOutput as APILinkKnowledgeBaseOutput, type KnowledgeBaseDetachResponse as KnowledgeBaseDetachResponse, type KnowledgeBaseAttachSingleParams as KnowledgeBaseAttachSingleParams, - type KnowledgeBaseDetachParams as KnowledgeBaseDetachParams, + type KnowledgeBaseDetachParams as KnowledgeBaseDetachParams }; } diff --git a/src/resources/agents/routes.ts b/src/resources/agents/routes.ts index 7102397a..7a185df2 100644 --- a/src/resources/agents/routes.ts +++ b/src/resources/agents/routes.ts @@ -6,6 +6,9 @@ import { APIPromise } from '../../core/api-promise'; import { RequestOptions } from '../../internal/request-options'; import { path } from '../../internal/utils/path'; +/** + * The API lets you build GPU-powered AI agents with pre-built or custom foundation models, function and agent routes, and RAG pipelines with knowledge bases. + */ export class Routes extends APIResource { /** * To update an agent route for an agent, send a PUT request to @@ -22,16 +25,9 @@ export class Routes extends APIResource { * ); * ``` */ - update( - childAgentUuid: string, - params: RouteUpdateParams, - options?: RequestOptions, - ): APIPromise { - const { path_parent_agent_uuid, ...body } = params; - return this._client.put( - path`/v2/gen-ai/agents/${path_parent_agent_uuid}/child_agents/${childAgentUuid}`, - { body, defaultBaseURL: 'https://api.digitalocean.com', ...options }, - ); + update(childAgentUuid: string, params: RouteUpdateParams, options?: RequestOptions): APIPromise { + const { path_parent_agent_uuid, ...body } = params + return this._client.put(path`/v2/gen-ai/agents/${path_parent_agent_uuid}/child_agents/${childAgentUuid}`, { body, defaultBaseURL: 'https://api.digitalocean.com', ...options }); } /** @@ -49,16 +45,9 @@ export class Routes extends APIResource { * ); * ``` */ - delete( - childAgentUuid: string, - params: RouteDeleteParams, - options?: RequestOptions, - ): APIPromise { - const { parent_agent_uuid } = params; - return this._client.delete(path`/v2/gen-ai/agents/${parent_agent_uuid}/child_agents/${childAgentUuid}`, { - defaultBaseURL: 'https://api.digitalocean.com', - ...options, - }); + delete(childAgentUuid: string, params: RouteDeleteParams, options?: RequestOptions): APIPromise { + const { parent_agent_uuid } = params + return this._client.delete(path`/v2/gen-ai/agents/${parent_agent_uuid}/child_agents/${childAgentUuid}`, { defaultBaseURL: 'https://api.digitalocean.com', ...options }); } /** @@ -76,16 +65,9 @@ export class Routes extends APIResource { * ); * ``` */ - add( - childAgentUuid: string, - params: RouteAddParams, - options?: RequestOptions, - ): APIPromise { - const { path_parent_agent_uuid, ...body } = params; - return this._client.post( - path`/v2/gen-ai/agents/${path_parent_agent_uuid}/child_agents/${childAgentUuid}`, - { body, defaultBaseURL: 'https://api.digitalocean.com', ...options }, - ); + add(childAgentUuid: string, params: RouteAddParams, options?: RequestOptions): APIPromise { + const { path_parent_agent_uuid, ...body } = params + return this._client.post(path`/v2/gen-ai/agents/${path_parent_agent_uuid}/child_agents/${childAgentUuid}`, { body, defaultBaseURL: 'https://api.digitalocean.com', ...options }); } /** @@ -100,10 +82,7 @@ export class Routes extends APIResource { * ``` */ view(uuid: string, options?: RequestOptions): APIPromise { - return this._client.get(path`/v2/gen-ai/agents/${uuid}/child_agents`, { - defaultBaseURL: 'https://api.digitalocean.com', - ...options, - }); + return this._client.get(path`/v2/gen-ai/agents/${uuid}/child_agents`, { defaultBaseURL: 'https://api.digitalocean.com', ...options }); } } @@ -178,7 +157,7 @@ export interface RouteUpdateParams { /** * Body param: Routed agent id */ - body_child_agent_uuid?: string; + child_agent_uuid?: string; /** * Body param: Describes the case in which the child agent should be used @@ -217,10 +196,10 @@ export interface RouteAddParams { /** * Body param: Routed agent id */ - body_child_agent_uuid?: string; + child_agent_uuid?: string; /** - * Body param: + * Body param */ if_case?: string; @@ -243,6 +222,6 @@ export declare namespace Routes { type RouteViewResponse as RouteViewResponse, type RouteUpdateParams as RouteUpdateParams, type RouteDeleteParams as RouteDeleteParams, - type RouteAddParams as RouteAddParams, + type RouteAddParams as RouteAddParams }; } diff --git a/src/resources/agents/versions.ts b/src/resources/agents/versions.ts index fe0865c1..a628f992 100644 --- a/src/resources/agents/versions.ts +++ b/src/resources/agents/versions.ts @@ -7,6 +7,9 @@ import { APIPromise } from '../../core/api-promise'; import { RequestOptions } from '../../internal/request-options'; import { path } from '../../internal/utils/path'; +/** + * The API lets you build GPU-powered AI agents with pre-built or custom foundation models, function and agent routes, and RAG pipelines with knowledge bases. + */ export class Versions extends APIResource { /** * To update to a specific agent version, send a PUT request to @@ -19,16 +22,8 @@ export class Versions extends APIResource { * ); * ``` */ - update( - pathUuid: string, - body: VersionUpdateParams | null | undefined = {}, - options?: RequestOptions, - ): APIPromise { - return this._client.put(path`/v2/gen-ai/agents/${pathUuid}/versions`, { - body, - defaultBaseURL: 'https://api.digitalocean.com', - ...options, - }); + update(uuid: string, body: VersionUpdateParams | null | undefined = {}, options?: RequestOptions): APIPromise { + return this._client.put(path`/v2/gen-ai/agents/${uuid}/versions`, { body, defaultBaseURL: 'https://api.digitalocean.com', ...options }); } /** @@ -42,16 +37,8 @@ export class Versions extends APIResource { * ); * ``` */ - list( - uuid: string, - query: VersionListParams | null | undefined = {}, - options?: RequestOptions, - ): APIPromise { - return this._client.get(path`/v2/gen-ai/agents/${uuid}/versions`, { - query, - defaultBaseURL: 'https://api.digitalocean.com', - ...options, - }); + list(uuid: string, query: VersionListParams | null | undefined = {}, options?: RequestOptions): APIPromise { + return this._client.get(path`/v2/gen-ai/agents/${uuid}/versions`, { query, defaultBaseURL: 'https://api.digitalocean.com', ...options }); } } @@ -339,7 +326,7 @@ export interface VersionUpdateParams { /** * Agent unique identifier */ - body_uuid?: string; + uuid?: string; /** * Unique identifier @@ -364,6 +351,6 @@ export declare namespace Versions { type VersionUpdateResponse as VersionUpdateResponse, type VersionListResponse as VersionListResponse, type VersionUpdateParams as VersionUpdateParams, - type VersionListParams as VersionListParams, + type VersionListParams as VersionListParams }; } diff --git a/src/resources/apps.ts b/src/resources/apps.ts new file mode 100644 index 00000000..c368b826 --- /dev/null +++ b/src/resources/apps.ts @@ -0,0 +1,3 @@ +// File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details. + +export * from './apps/index'; diff --git a/src/resources/apps/apps.ts b/src/resources/apps/apps.ts new file mode 100644 index 00000000..05af6e6d --- /dev/null +++ b/src/resources/apps/apps.ts @@ -0,0 +1,19 @@ +// File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details. + +import { APIResource } from '../../core/resource'; +import * as JobInvocationsAPI from './job-invocations'; +import { JobInvocationCancelParams, JobInvocationCancelResponse, JobInvocations } from './job-invocations'; + +export class Apps extends APIResource { + jobInvocations: JobInvocationsAPI.JobInvocations = new JobInvocationsAPI.JobInvocations(this._client); +} + +Apps.JobInvocations = JobInvocations; + +export declare namespace Apps { + export { + JobInvocations as JobInvocations, + type JobInvocationCancelResponse as JobInvocationCancelResponse, + type JobInvocationCancelParams as JobInvocationCancelParams + }; +} diff --git a/src/resources/apps/index.ts b/src/resources/apps/index.ts new file mode 100644 index 00000000..93b85928 --- /dev/null +++ b/src/resources/apps/index.ts @@ -0,0 +1,4 @@ +// File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details. + +export { Apps } from './apps';; +export { JobInvocations, type JobInvocationCancelResponse, type JobInvocationCancelParams } from './job-invocations';; diff --git a/src/resources/apps/job-invocations.ts b/src/resources/apps/job-invocations.ts new file mode 100644 index 00000000..2e0b1987 --- /dev/null +++ b/src/resources/apps/job-invocations.ts @@ -0,0 +1,141 @@ +// File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details. + +import { APIResource } from '../../core/resource'; +import { APIPromise } from '../../core/api-promise'; +import { RequestOptions } from '../../internal/request-options'; +import { path } from '../../internal/utils/path'; + +/** + * App Platform is a Platform-as-a-Service (PaaS) offering from DigitalOcean that allows + * developers to publish code directly to DigitalOcean servers without worrying about the + * underlying infrastructure. + * + * Most API operations are centered around a few core object types. Following are the + * definitions of these types. These definitions will be omitted from the operation-specific + * documentation. + * + * For documentation on app specifications (`AppSpec` objects), please refer to the + * [product documentation](https://docs.digitalocean.com/products/app-platform/reference/app-spec/)). + */ +export class JobInvocations extends APIResource { + /** + * Cancel a specific job invocation for an app. + * + * @example + * ```ts + * const response = await client.apps.jobInvocations.cancel( + * '123e4567-e89b-12d3-a456-426', + * { app_id: '4f6c71e2-1e90-4762-9fee-6cc4a0a9f2cf' }, + * ); + * ``` + */ + cancel(jobInvocationID: string, params: JobInvocationCancelParams, options?: RequestOptions): APIPromise { + const { app_id, job_name } = params + return this._client.post(path`/v2/apps/${app_id}/job-invocations/${jobInvocationID}/cancel`, { query: { job_name }, defaultBaseURL: 'https://api.digitalocean.com', ...options }); + } +} + +export interface JobInvocationCancelResponse { + id?: string; + + completed_at?: string; + + created_at?: string; + + deployment_id?: string; + + job_name?: string; + + /** + * The phase of the job invocation + */ + phase?: 'UNKNOWN' | 'PENDING' | 'RUNNING' | 'SUCCEEDED' | 'FAILED' | 'CANCELED' | 'SKIPPED'; + + started_at?: string; + + trigger?: JobInvocationCancelResponse.Trigger; +} + +export namespace JobInvocationCancelResponse { + export interface Trigger { + /** + * Details about the manual trigger, if applicable + */ + manual?: Trigger.Manual; + + /** + * The schedule for the job + */ + scheduled?: Trigger.Scheduled; + + /** + * The type of trigger that initiated the job invocation. + */ + type?: 'MANUAL' | 'SCHEDULE' | 'UNKNOWN'; + } + + export namespace Trigger { + /** + * Details about the manual trigger, if applicable + */ + export interface Manual { + /** + * The user who triggered the job + */ + user?: Manual.User; + } + + export namespace Manual { + /** + * The user who triggered the job + */ + export interface User { + email?: string; + + full_name?: string; + + uuid?: string; + } + } + + /** + * The schedule for the job + */ + export interface Scheduled { + schedule?: Scheduled.Schedule; + } + + export namespace Scheduled { + export interface Schedule { + /** + * The cron expression defining the schedule + */ + cron?: string; + + /** + * The time zone for the schedule + */ + time_zone?: string; + } + } + } +} + +export interface JobInvocationCancelParams { + /** + * Path param: The app ID + */ + app_id: string; + + /** + * Query param: The job name to list job invocations for. + */ + job_name?: string; +} + +export declare namespace JobInvocations { + export { + type JobInvocationCancelResponse as JobInvocationCancelResponse, + type JobInvocationCancelParams as JobInvocationCancelParams + }; +} diff --git a/src/resources/billing.ts b/src/resources/billing.ts new file mode 100644 index 00000000..21cbc754 --- /dev/null +++ b/src/resources/billing.ts @@ -0,0 +1,154 @@ +// File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details. + +import { APIResource } from '../core/resource'; +import { APIPromise } from '../core/api-promise'; +import { RequestOptions } from '../internal/request-options'; +import { path } from '../internal/utils/path'; + +/** + * The billing endpoints allow you to retrieve your account balance, invoices, + * billing history, and insights. + * + * **Balance:** By sending requests to the `/v2/customers/my/balance` endpoint, you can + * retrieve the balance information for the requested customer account. + * + * **Invoices:** [Invoices](https://docs.digitalocean.com/platform/billing/invoices/) + * are generated on the first of each month for every DigitalOcean + * customer. An invoice preview is generated daily, which can be accessed + * with the `preview` keyword in place of `$INVOICE_UUID`. To interact with + * invoices, you will generally send requests to the invoices endpoint at + * `/v2/customers/my/invoices`. + * + * **Billing History:** Billing history is a record of billing events for your account. + * For example, entries may include events like payments made, invoices + * issued, or credits granted. To interact with invoices, you + * will generally send requests to the invoices endpoint at + * `/v2/customers/my/billing_history`. + * + * **Billing Insights:** Day-over-day changes in billing resource usage based on nightly invoice items, + * including total amount, region, SKU, and description for a specified date range. + * It is important to note that the daily resource usage may not reflect month-end billing totals when totaled for + * a given month as nightly invoice items do not necessarily encompass all invoicing factors for the entire month. + * `v2/billing/{account_urn}/insights/{start_date}/{end_date}` where account_urn is the URN of the customer + * account, can be a team (do:team:uuid) or an organization (do:teamgroup:uuid). The date range specified by + * start_date and end_date must be in YYYY-MM-DD format. + */ +export class Billing extends APIResource { + /** + * This endpoint returns day-over-day changes in billing resource usage based on + * nightly invoice items, including total amount, region, SKU, and description for + * a specified date range. It is important to note that the daily resource usage + * may not reflect month-end billing totals when totaled for a given month as + * nightly invoice item estimates do not necessarily encompass all invoicing + * factors for the entire month. + * + * @example + * ```ts + * const response = await client.billing.listInsights( + * '2025-01-31', + * { + * account_urn: + * 'do:team:12345678-1234-1234-1234-123456789012', + * start_date: '2025-01-01', + * }, + * ); + * ``` + */ + listInsights(endDate: string, params: BillingListInsightsParams, options?: RequestOptions): APIPromise { + const { account_urn, start_date, ...query } = params + return this._client.get(path`/v2/billing/${account_urn}/insights/${start_date}/${endDate}`, { query, defaultBaseURL: 'https://api.digitalocean.com', ...options }); + } +} + +export interface BillingListInsightsResponse { + /** + * Current page number + */ + current_page: number; + + /** + * Array of billing data points, which are day-over-day changes in billing resource + * usage based on nightly invoice item estimates, for the requested period + */ + data_points: Array; + + /** + * Total number of items available across all pages + */ + total_items: number; + + /** + * Total number of pages available + */ + total_pages: number; +} + +export namespace BillingListInsightsResponse { + export interface DataPoint { + /** + * Description of the billed resource or service as shown on an invoice item + */ + description?: string; + + /** + * Optional invoice item group name of the billed resource or service, blank when + * not part an invoice item group + */ + group_description?: string; + + /** + * Region where the usage occurred + */ + region?: string; + + /** + * Unique SKU identifier for the billed resource + */ + sku?: string; + + /** + * Start date of the billing data point in YYYY-MM-DD format + */ + start_date?: string; + + /** + * Total amount for this data point in USD + */ + total_amount?: string; + + /** + * URN of the team that incurred the usage + */ + usage_team_urn?: string; + } +} + +export interface BillingListInsightsParams { + /** + * Path param: URN of the customer account, can be a team (do:team:uuid) or an + * organization (do:teamgroup:uuid) + */ + account_urn: string; + + /** + * Path param: Start date for billing insights in YYYY-MM-DD format + */ + start_date: string; + + /** + * Query param: Which 'page' of paginated results to return. + */ + page?: number; + + /** + * Query param: Number of items returned per page + */ + per_page?: number; +} + +export declare namespace Billing { + export { + type BillingListInsightsResponse as BillingListInsightsResponse, + type BillingListInsightsParams as BillingListInsightsParams + }; +} diff --git a/src/resources/chat/chat.ts b/src/resources/chat/chat.ts index f5804990..71798349 100644 --- a/src/resources/chat/chat.ts +++ b/src/resources/chat/chat.ts @@ -2,13 +2,7 @@ import { APIResource } from '../../core/resource'; import * as CompletionsAPI from './completions'; -import { - CompletionCreateParams, - CompletionCreateParamsNonStreaming, - CompletionCreateParamsStreaming, - CompletionCreateResponse, - Completions, -} from './completions'; +import { CompletionCreateParams, CompletionCreateParamsNonStreaming, CompletionCreateParamsStreaming, CompletionCreateResponse, Completions } from './completions'; export class Chat extends APIResource { completions: CompletionsAPI.Completions = new CompletionsAPI.Completions(this._client); @@ -22,6 +16,6 @@ export declare namespace Chat { type CompletionCreateResponse as CompletionCreateResponse, type CompletionCreateParams as CompletionCreateParams, type CompletionCreateParamsNonStreaming as CompletionCreateParamsNonStreaming, - type CompletionCreateParamsStreaming as CompletionCreateParamsStreaming, + type CompletionCreateParamsStreaming as CompletionCreateParamsStreaming }; } diff --git a/src/resources/chat/completions.ts b/src/resources/chat/completions.ts index 6dd6e2ca..1eb69c9a 100644 --- a/src/resources/chat/completions.ts +++ b/src/resources/chat/completions.ts @@ -7,6 +7,9 @@ import { APIPromise } from '../../core/api-promise'; import { Stream } from '../../core/streaming'; import { RequestOptions } from '../../internal/request-options'; +/** + * Given a list of messages comprising a conversation, the model will return a response. + */ export class Completions extends APIResource { /** * Creates a model response for the given chat conversation. @@ -19,28 +22,11 @@ export class Completions extends APIResource { * }); * ``` */ - create( - body: CompletionCreateParamsNonStreaming, - options?: RequestOptions, - ): APIPromise; - create( - body: CompletionCreateParamsStreaming, - options?: RequestOptions, - ): APIPromise>; - create( - body: CompletionCreateParamsBase, - options?: RequestOptions, - ): APIPromise | CompletionCreateResponse>; - create( - body: CompletionCreateParams, - options?: RequestOptions, - ): APIPromise | APIPromise> { - return this._client.post('/chat/completions', { - body, - defaultBaseURL: '{inferenceEndpoint}/v1', - ...options, - stream: body.stream ?? false, - }) as APIPromise | APIPromise>; + create(body: CompletionCreateParamsNonStreaming, options?: RequestOptions): APIPromise + create(body: CompletionCreateParamsStreaming, options?: RequestOptions): APIPromise> + create(body: CompletionCreateParamsBase, options?: RequestOptions): APIPromise | CompletionCreateResponse> + create(body: CompletionCreateParams, options?: RequestOptions): APIPromise | APIPromise> { + return this._client.post('/chat/completions', { body, defaultBaseURL: 'https://inference.do-ai.run/v1', ...options, stream: body.stream ?? false }) as APIPromise | APIPromise>; } } @@ -194,19 +180,13 @@ export namespace CompletionCreateResponse { } } -export type CompletionCreateParams = CompletionCreateParamsNonStreaming | CompletionCreateParamsStreaming; +export type CompletionCreateParams = CompletionCreateParamsNonStreaming | CompletionCreateParamsStreaming export interface CompletionCreateParamsBase { /** * A list of messages comprising the conversation so far. */ - messages: Array< - | CompletionCreateParams.ChatCompletionRequestSystemMessage - | CompletionCreateParams.ChatCompletionRequestDeveloperMessage - | CompletionCreateParams.ChatCompletionRequestUserMessage - | CompletionCreateParams.ChatCompletionRequestAssistantMessage - | CompletionCreateParams.ChatCompletionRequestToolMessage - >; + messages: Array; /** * Model ID used to generate the response. @@ -278,6 +258,12 @@ export interface CompletionCreateParamsBase { */ presence_penalty?: number | null; + /** + * Constrains effort on reasoning for reasoning models. Reducing reasoning effort + * can result in faster responses and fewer tokens used on reasoning in a response. + */ + reasoning_effort?: 'none' | 'minimal' | 'low' | 'medium' | 'high' | 'xhigh' | null; + /** * Up to 4 sequences where the API will stop generating further tokens. The * returned text will not contain the stop sequence. @@ -344,7 +330,7 @@ export interface CompletionCreateParamsBase { */ user?: string; - [k: string]: unknown; +[k: string]: unknown } export namespace CompletionCreateParams { @@ -356,7 +342,7 @@ export namespace CompletionCreateParams { /** * The contents of the system message. */ - content: string | Array; + content: string | ChatCompletionRequestSystemMessage.ChatCompletionRequestContentPartText | Array; /** * The role of the messages author, in this case `system`. @@ -368,7 +354,7 @@ export namespace CompletionCreateParams { /** * Content part with type and text */ - export interface UnionMember1 { + export interface ChatCompletionRequestContentPartText { /** * The text content */ @@ -378,6 +364,65 @@ export namespace CompletionCreateParams { * The type of content part */ type: 'text'; + + /** + * Cache control settings for the content part. + */ + cache_control?: ChatCompletionRequestContentPartText.CacheControl; + } + + export namespace ChatCompletionRequestContentPartText { + /** + * Cache control settings for the content part. + */ + export interface CacheControl { + /** + * The cache control type. + */ + type: 'ephemeral'; + + /** + * The cache TTL. + */ + ttl?: '5m' | '1h'; + } + } + + /** + * Content part with type and text + */ + export interface ChatCompletionRequestContentPartText { + /** + * The text content + */ + text: string; + + /** + * The type of content part + */ + type: 'text'; + + /** + * Cache control settings for the content part. + */ + cache_control?: ChatCompletionRequestContentPartText.CacheControl; + } + + export namespace ChatCompletionRequestContentPartText { + /** + * Cache control settings for the content part. + */ + export interface CacheControl { + /** + * The cache control type. + */ + type: 'ephemeral'; + + /** + * The cache TTL. + */ + ttl?: '5m' | '1h'; + } } } @@ -389,7 +434,7 @@ export namespace CompletionCreateParams { /** * The contents of the developer message. */ - content: string | Array; + content: string | ChatCompletionRequestDeveloperMessage.ChatCompletionRequestContentPartText | Array; /** * The role of the messages author, in this case `developer`. @@ -401,7 +446,7 @@ export namespace CompletionCreateParams { /** * Content part with type and text */ - export interface UnionMember1 { + export interface ChatCompletionRequestContentPartText { /** * The text content */ @@ -411,6 +456,65 @@ export namespace CompletionCreateParams { * The type of content part */ type: 'text'; + + /** + * Cache control settings for the content part. + */ + cache_control?: ChatCompletionRequestContentPartText.CacheControl; + } + + export namespace ChatCompletionRequestContentPartText { + /** + * Cache control settings for the content part. + */ + export interface CacheControl { + /** + * The cache control type. + */ + type: 'ephemeral'; + + /** + * The cache TTL. + */ + ttl?: '5m' | '1h'; + } + } + + /** + * Content part with type and text + */ + export interface ChatCompletionRequestContentPartText { + /** + * The text content + */ + text: string; + + /** + * The type of content part + */ + type: 'text'; + + /** + * Cache control settings for the content part. + */ + cache_control?: ChatCompletionRequestContentPartText.CacheControl; + } + + export namespace ChatCompletionRequestContentPartText { + /** + * Cache control settings for the content part. + */ + export interface CacheControl { + /** + * The cache control type. + */ + type: 'ephemeral'; + + /** + * The cache TTL. + */ + ttl?: '5m' | '1h'; + } } } @@ -422,7 +526,7 @@ export namespace CompletionCreateParams { /** * The contents of the user message. */ - content: string | Array; + content: string | ChatCompletionRequestUserMessage.ChatCompletionRequestContentPartText | ChatCompletionRequestUserMessage.ChatCompletionRequestContentPartImageURL | ChatCompletionRequestUserMessage.ChatCompletionRequestContentPartVideoURL | Array; /** * The role of the messages author, in this case `user`. @@ -434,7 +538,103 @@ export namespace CompletionCreateParams { /** * Content part with type and text */ - export interface UnionMember1 { + export interface ChatCompletionRequestContentPartText { + /** + * The text content + */ + text: string; + + /** + * The type of content part + */ + type: 'text'; + + /** + * Cache control settings for the content part. + */ + cache_control?: ChatCompletionRequestContentPartText.CacheControl; + } + + export namespace ChatCompletionRequestContentPartText { + /** + * Cache control settings for the content part. + */ + export interface CacheControl { + /** + * The cache control type. + */ + type: 'ephemeral'; + + /** + * The cache TTL. + */ + ttl?: '5m' | '1h'; + } + } + + /** + * Content part with type and image URL. + */ + export interface ChatCompletionRequestContentPartImageURL { + /** + * Image URL settings. + */ + image_url: ChatCompletionRequestContentPartImageURL.ImageURL; + + /** + * The type of content part + */ + type: 'image_url'; + } + + export namespace ChatCompletionRequestContentPartImageURL { + /** + * Image URL settings. + */ + export interface ImageURL { + /** + * A URL or data URL containing image content. + */ + url: string; + + /** + * Optional detail level for image understanding. + */ + detail?: 'auto' | 'low' | 'high'; + } + } + + /** + * Content part with type and video URL. + */ + export interface ChatCompletionRequestContentPartVideoURL { + /** + * The type of content part + */ + type: 'video_url'; + + /** + * Video URL settings. + */ + video_url: ChatCompletionRequestContentPartVideoURL.VideoURL; + } + + export namespace ChatCompletionRequestContentPartVideoURL { + /** + * Video URL settings. + */ + export interface VideoURL { + /** + * A URL or data URL containing video content. + */ + url: string; + } + } + + /** + * Content part with type and text + */ + export interface ChatCompletionRequestContentPartText { /** * The text content */ @@ -444,6 +644,87 @@ export namespace CompletionCreateParams { * The type of content part */ type: 'text'; + + /** + * Cache control settings for the content part. + */ + cache_control?: ChatCompletionRequestContentPartText.CacheControl; + } + + export namespace ChatCompletionRequestContentPartText { + /** + * Cache control settings for the content part. + */ + export interface CacheControl { + /** + * The cache control type. + */ + type: 'ephemeral'; + + /** + * The cache TTL. + */ + ttl?: '5m' | '1h'; + } + } + + /** + * Content part with type and image URL. + */ + export interface ChatCompletionRequestContentPartImageURL { + /** + * Image URL settings. + */ + image_url: ChatCompletionRequestContentPartImageURL.ImageURL; + + /** + * The type of content part + */ + type: 'image_url'; + } + + export namespace ChatCompletionRequestContentPartImageURL { + /** + * Image URL settings. + */ + export interface ImageURL { + /** + * A URL or data URL containing image content. + */ + url: string; + + /** + * Optional detail level for image understanding. + */ + detail?: 'auto' | 'low' | 'high'; + } + } + + /** + * Content part with type and video URL. + */ + export interface ChatCompletionRequestContentPartVideoURL { + /** + * The type of content part + */ + type: 'video_url'; + + /** + * Video URL settings. + */ + video_url: ChatCompletionRequestContentPartVideoURL.VideoURL; + } + + export namespace ChatCompletionRequestContentPartVideoURL { + /** + * Video URL settings. + */ + export interface VideoURL { + /** + * A URL or data URL containing video content. + */ + url: string; + } } } @@ -459,7 +740,7 @@ export namespace CompletionCreateParams { /** * The contents of the assistant message. */ - content?: string | Array | null; + content?: string | ChatCompletionRequestAssistantMessage.ChatCompletionRequestContentPartText | Array | null; /** * The tool calls generated by the model, such as function calls. @@ -471,7 +752,7 @@ export namespace CompletionCreateParams { /** * Content part with type and text */ - export interface UnionMember1 { + export interface ChatCompletionRequestContentPartText { /** * The text content */ @@ -481,6 +762,65 @@ export namespace CompletionCreateParams { * The type of content part */ type: 'text'; + + /** + * Cache control settings for the content part. + */ + cache_control?: ChatCompletionRequestContentPartText.CacheControl; + } + + export namespace ChatCompletionRequestContentPartText { + /** + * Cache control settings for the content part. + */ + export interface CacheControl { + /** + * The cache control type. + */ + type: 'ephemeral'; + + /** + * The cache TTL. + */ + ttl?: '5m' | '1h'; + } + } + + /** + * Content part with type and text + */ + export interface ChatCompletionRequestContentPartText { + /** + * The text content + */ + text: string; + + /** + * The type of content part + */ + type: 'text'; + + /** + * Cache control settings for the content part. + */ + cache_control?: ChatCompletionRequestContentPartText.CacheControl; + } + + export namespace ChatCompletionRequestContentPartText { + /** + * Cache control settings for the content part. + */ + export interface CacheControl { + /** + * The cache control type. + */ + type: 'ephemeral'; + + /** + * The cache TTL. + */ + ttl?: '5m' | '1h'; + } } export interface ToolCall { @@ -525,7 +865,7 @@ export namespace CompletionCreateParams { /** * The contents of the tool message. */ - content: string; + content: string | ChatCompletionRequestToolMessage.ChatCompletionRequestContentPartText | Array; /** * The role of the messages author, in this case `tool`. @@ -538,6 +878,82 @@ export namespace CompletionCreateParams { tool_call_id: string; } + export namespace ChatCompletionRequestToolMessage { + /** + * Content part with type and text + */ + export interface ChatCompletionRequestContentPartText { + /** + * The text content + */ + text: string; + + /** + * The type of content part + */ + type: 'text'; + + /** + * Cache control settings for the content part. + */ + cache_control?: ChatCompletionRequestContentPartText.CacheControl; + } + + export namespace ChatCompletionRequestContentPartText { + /** + * Cache control settings for the content part. + */ + export interface CacheControl { + /** + * The cache control type. + */ + type: 'ephemeral'; + + /** + * The cache TTL. + */ + ttl?: '5m' | '1h'; + } + } + + /** + * Content part with type and text + */ + export interface ChatCompletionRequestContentPartText { + /** + * The text content + */ + text: string; + + /** + * The type of content part + */ + type: 'text'; + + /** + * Cache control settings for the content part. + */ + cache_control?: ChatCompletionRequestContentPartText.CacheControl; + } + + export namespace ChatCompletionRequestContentPartText { + /** + * Cache control settings for the content part. + */ + export interface CacheControl { + /** + * The cache control type. + */ + type: 'ephemeral'; + + /** + * The cache TTL. + */ + ttl?: '5m' | '1h'; + } + } + } + /** * Options for streaming response. Only set this when you set `stream: true`. */ @@ -611,8 +1027,8 @@ export namespace CompletionCreateParams { } } - export type CompletionCreateParamsNonStreaming = CompletionsAPI.CompletionCreateParamsNonStreaming; - export type CompletionCreateParamsStreaming = CompletionsAPI.CompletionCreateParamsStreaming; + export type CompletionCreateParamsNonStreaming = CompletionsAPI.CompletionCreateParamsNonStreaming + export type CompletionCreateParamsStreaming = CompletionsAPI.CompletionCreateParamsStreaming } export interface CompletionCreateParamsNonStreaming extends CompletionCreateParamsBase { @@ -622,7 +1038,7 @@ export interface CompletionCreateParamsNonStreaming extends CompletionCreatePara */ stream?: false | null; - [k: string]: unknown; +[k: string]: unknown } export interface CompletionCreateParamsStreaming extends CompletionCreateParamsBase { @@ -632,7 +1048,7 @@ export interface CompletionCreateParamsStreaming extends CompletionCreateParamsB */ stream: true; - [k: string]: unknown; +[k: string]: unknown } export declare namespace Completions { @@ -640,6 +1056,6 @@ export declare namespace Completions { type CompletionCreateResponse as CompletionCreateResponse, type CompletionCreateParams as CompletionCreateParams, type CompletionCreateParamsNonStreaming as CompletionCreateParamsNonStreaming, - type CompletionCreateParamsStreaming as CompletionCreateParamsStreaming, + type CompletionCreateParamsStreaming as CompletionCreateParamsStreaming }; } diff --git a/src/resources/chat/index.ts b/src/resources/chat/index.ts index 5b5443de..7e3f4953 100644 --- a/src/resources/chat/index.ts +++ b/src/resources/chat/index.ts @@ -1,10 +1,4 @@ // File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details. -export { Chat } from './chat'; -export { - Completions, - type CompletionCreateResponse, - type CompletionCreateParams, - type CompletionCreateParamsNonStreaming, - type CompletionCreateParamsStreaming, -} from './completions'; +export { Chat } from './chat';; +export { Completions, type CompletionCreateResponse, type CompletionCreateParams, type CompletionCreateParamsNonStreaming, type CompletionCreateParamsStreaming } from './completions';; diff --git a/src/resources/databases/databases.ts b/src/resources/databases/databases.ts index 2be52d33..91b7e32f 100644 --- a/src/resources/databases/databases.ts +++ b/src/resources/databases/databases.ts @@ -11,5 +11,7 @@ export class Databases extends APIResource { Databases.SchemaRegistry = SchemaRegistry; export declare namespace Databases { - export { SchemaRegistry as SchemaRegistry }; + export { + SchemaRegistry as SchemaRegistry + }; } diff --git a/src/resources/databases/index.ts b/src/resources/databases/index.ts index e97bd276..2ae9a50b 100644 --- a/src/resources/databases/index.ts +++ b/src/resources/databases/index.ts @@ -1,4 +1,4 @@ // File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details. -export { Databases } from './databases'; -export { SchemaRegistry } from './schema-registry/index'; +export { Databases } from './databases';; +export { SchemaRegistry } from './schema-registry/index';; diff --git a/src/resources/databases/schema-registry/config.ts b/src/resources/databases/schema-registry/config.ts index b466b1c1..392bddfc 100644 --- a/src/resources/databases/schema-registry/config.ts +++ b/src/resources/databases/schema-registry/config.ts @@ -5,6 +5,31 @@ import { APIPromise } from '../../../core/api-promise'; import { RequestOptions } from '../../../internal/request-options'; import { path } from '../../../internal/utils/path'; +/** + * DigitalOcean's [managed database service](https://docs.digitalocean.com/products/databases) + * simplifies the creation and management of highly available database clusters. Currently, it + * offers support for [PostgreSQL](http://docs.digitalocean.com/products/databases/postgresql/), + * [Caching](https://docs.digitalocean.com/products/databases/redis/), + * [Valkey](https://docs.digitalocean.com/products/databases/valkey/), + * [MySQL](https://docs.digitalocean.com/products/databases/mysql/), + * [MongoDB](https://docs.digitalocean.com/products/databases/mongodb/), and + * [OpenSearch](https://docs.digitalocean.com/products/databases/opensearch/). + * + * By sending requests to the `/v2/databases` endpoint, you can list, create, or delete + * database clusters as well as scale the size of a cluster, add or remove read-only replicas, + * and manage other configuration details. + * + * Database clusters may be deployed in a multi-node, high-availability configuration. + * If your machine type is above the basic nodes, your node plan is above the smallest option, + * or you are running MongoDB, you may additionally include up to two standby nodes in your cluster. + * + * The size of individual nodes in a database cluster is represented by a human-readable slug, + * which is used in some of the following requests. Each slug denotes the node's identifier, + * CPU count, and amount of RAM, in that order. + * + * For a list of currently available database slugs and options, use the `/v2/databases/options` endpoint or use the + * `doctl databases options` [command](https://docs.digitalocean.com/reference/doctl/reference/databases/options). + */ export class Config extends APIResource { /** * To retrieve the Schema Registry configuration for a Kafka cluster, send a GET @@ -21,10 +46,7 @@ export class Config extends APIResource { * ``` */ retrieve(databaseClusterUuid: string, options?: RequestOptions): APIPromise { - return this._client.get(path`/v2/databases/${databaseClusterUuid}/schema-registry/config`, { - defaultBaseURL: 'https://api.digitalocean.com', - ...options, - }); + return this._client.get(path`/v2/databases/${databaseClusterUuid}/schema-registry/config`, { defaultBaseURL: 'https://api.digitalocean.com', ...options }); } /** @@ -42,16 +64,8 @@ export class Config extends APIResource { * ); * ``` */ - update( - databaseClusterUuid: string, - body: ConfigUpdateParams, - options?: RequestOptions, - ): APIPromise { - return this._client.put(path`/v2/databases/${databaseClusterUuid}/schema-registry/config`, { - body, - defaultBaseURL: 'https://api.digitalocean.com', - ...options, - }); + update(databaseClusterUuid: string, body: ConfigUpdateParams, options?: RequestOptions): APIPromise { + return this._client.put(path`/v2/databases/${databaseClusterUuid}/schema-registry/config`, { body, defaultBaseURL: 'https://api.digitalocean.com', ...options }); } /** @@ -73,16 +87,9 @@ export class Config extends APIResource { * ); * ``` */ - retrieveSubject( - subjectName: string, - params: ConfigRetrieveSubjectParams, - options?: RequestOptions, - ): APIPromise { - const { database_cluster_uuid } = params; - return this._client.get( - path`/v2/databases/${database_cluster_uuid}/schema-registry/config/${subjectName}`, - { defaultBaseURL: 'https://api.digitalocean.com', ...options }, - ); + retrieveSubject(subjectName: string, params: ConfigRetrieveSubjectParams, options?: RequestOptions): APIPromise { + const { database_cluster_uuid } = params + return this._client.get(path`/v2/databases/${database_cluster_uuid}/schema-registry/config/${subjectName}`, { defaultBaseURL: 'https://api.digitalocean.com', ...options }); } /** @@ -105,16 +112,9 @@ export class Config extends APIResource { * ); * ``` */ - updateSubject( - subjectName: string, - params: ConfigUpdateSubjectParams, - options?: RequestOptions, - ): APIPromise { - const { database_cluster_uuid, ...body } = params; - return this._client.put( - path`/v2/databases/${database_cluster_uuid}/schema-registry/config/${subjectName}`, - { body, defaultBaseURL: 'https://api.digitalocean.com', ...options }, - ); + updateSubject(subjectName: string, params: ConfigUpdateSubjectParams, options?: RequestOptions): APIPromise { + const { database_cluster_uuid, ...body } = params + return this._client.put(path`/v2/databases/${database_cluster_uuid}/schema-registry/config/${subjectName}`, { body, defaultBaseURL: 'https://api.digitalocean.com', ...options }); } } @@ -122,42 +122,21 @@ export interface ConfigRetrieveResponse { /** * The compatibility level of the schema registry. */ - compatibility_level: - | 'NONE' - | 'BACKWARD' - | 'BACKWARD_TRANSITIVE' - | 'FORWARD' - | 'FORWARD_TRANSITIVE' - | 'FULL' - | 'FULL_TRANSITIVE'; + compatibility_level: 'NONE' | 'BACKWARD' | 'BACKWARD_TRANSITIVE' | 'FORWARD' | 'FORWARD_TRANSITIVE' | 'FULL' | 'FULL_TRANSITIVE'; } export interface ConfigUpdateResponse { /** * The compatibility level of the schema registry. */ - compatibility_level: - | 'NONE' - | 'BACKWARD' - | 'BACKWARD_TRANSITIVE' - | 'FORWARD' - | 'FORWARD_TRANSITIVE' - | 'FULL' - | 'FULL_TRANSITIVE'; + compatibility_level: 'NONE' | 'BACKWARD' | 'BACKWARD_TRANSITIVE' | 'FORWARD' | 'FORWARD_TRANSITIVE' | 'FULL' | 'FULL_TRANSITIVE'; } export interface ConfigRetrieveSubjectResponse { /** * The compatibility level of the schema registry. */ - compatibility_level: - | 'NONE' - | 'BACKWARD' - | 'BACKWARD_TRANSITIVE' - | 'FORWARD' - | 'FORWARD_TRANSITIVE' - | 'FULL' - | 'FULL_TRANSITIVE'; + compatibility_level: 'NONE' | 'BACKWARD' | 'BACKWARD_TRANSITIVE' | 'FORWARD' | 'FORWARD_TRANSITIVE' | 'FULL' | 'FULL_TRANSITIVE'; /** * The name of the schema subject. @@ -169,14 +148,7 @@ export interface ConfigUpdateSubjectResponse { /** * The compatibility level of the schema registry. */ - compatibility_level: - | 'NONE' - | 'BACKWARD' - | 'BACKWARD_TRANSITIVE' - | 'FORWARD' - | 'FORWARD_TRANSITIVE' - | 'FULL' - | 'FULL_TRANSITIVE'; + compatibility_level: 'NONE' | 'BACKWARD' | 'BACKWARD_TRANSITIVE' | 'FORWARD' | 'FORWARD_TRANSITIVE' | 'FULL' | 'FULL_TRANSITIVE'; /** * The name of the schema subject. @@ -188,14 +160,7 @@ export interface ConfigUpdateParams { /** * The compatibility level of the schema registry. */ - compatibility_level: - | 'NONE' - | 'BACKWARD' - | 'BACKWARD_TRANSITIVE' - | 'FORWARD' - | 'FORWARD_TRANSITIVE' - | 'FULL' - | 'FULL_TRANSITIVE'; + compatibility_level: 'NONE' | 'BACKWARD' | 'BACKWARD_TRANSITIVE' | 'FORWARD' | 'FORWARD_TRANSITIVE' | 'FULL' | 'FULL_TRANSITIVE'; } export interface ConfigRetrieveSubjectParams { @@ -214,14 +179,7 @@ export interface ConfigUpdateSubjectParams { /** * Body param: The compatibility level of the schema registry. */ - compatibility_level: - | 'NONE' - | 'BACKWARD' - | 'BACKWARD_TRANSITIVE' - | 'FORWARD' - | 'FORWARD_TRANSITIVE' - | 'FULL' - | 'FULL_TRANSITIVE'; + compatibility_level: 'NONE' | 'BACKWARD' | 'BACKWARD_TRANSITIVE' | 'FORWARD' | 'FORWARD_TRANSITIVE' | 'FULL' | 'FULL_TRANSITIVE'; } export declare namespace Config { @@ -232,6 +190,6 @@ export declare namespace Config { type ConfigUpdateSubjectResponse as ConfigUpdateSubjectResponse, type ConfigUpdateParams as ConfigUpdateParams, type ConfigRetrieveSubjectParams as ConfigRetrieveSubjectParams, - type ConfigUpdateSubjectParams as ConfigUpdateSubjectParams, + type ConfigUpdateSubjectParams as ConfigUpdateSubjectParams }; } diff --git a/src/resources/databases/schema-registry/index.ts b/src/resources/databases/schema-registry/index.ts index 085a8a6b..648c3365 100644 --- a/src/resources/databases/schema-registry/index.ts +++ b/src/resources/databases/schema-registry/index.ts @@ -1,13 +1,4 @@ // File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details. -export { - Config, - type ConfigRetrieveResponse, - type ConfigUpdateResponse, - type ConfigRetrieveSubjectResponse, - type ConfigUpdateSubjectResponse, - type ConfigUpdateParams, - type ConfigRetrieveSubjectParams, - type ConfigUpdateSubjectParams, -} from './config'; -export { SchemaRegistry } from './schema-registry'; +export { Config, type ConfigRetrieveResponse, type ConfigUpdateResponse, type ConfigRetrieveSubjectResponse, type ConfigUpdateSubjectResponse, type ConfigUpdateParams, type ConfigRetrieveSubjectParams, type ConfigUpdateSubjectParams } from './config';; +export { SchemaRegistry } from './schema-registry';; diff --git a/src/resources/databases/schema-registry/schema-registry.ts b/src/resources/databases/schema-registry/schema-registry.ts index 80249f70..91266ef7 100644 --- a/src/resources/databases/schema-registry/schema-registry.ts +++ b/src/resources/databases/schema-registry/schema-registry.ts @@ -2,16 +2,7 @@ import { APIResource } from '../../../core/resource'; import * as ConfigAPI from './config'; -import { - Config, - ConfigRetrieveResponse, - ConfigRetrieveSubjectParams, - ConfigRetrieveSubjectResponse, - ConfigUpdateParams, - ConfigUpdateResponse, - ConfigUpdateSubjectParams, - ConfigUpdateSubjectResponse, -} from './config'; +import { Config, ConfigRetrieveResponse, ConfigRetrieveSubjectParams, ConfigRetrieveSubjectResponse, ConfigUpdateParams, ConfigUpdateResponse, ConfigUpdateSubjectParams, ConfigUpdateSubjectResponse } from './config'; export class SchemaRegistry extends APIResource { config: ConfigAPI.Config = new ConfigAPI.Config(this._client); @@ -28,6 +19,6 @@ export declare namespace SchemaRegistry { type ConfigUpdateSubjectResponse as ConfigUpdateSubjectResponse, type ConfigUpdateParams as ConfigUpdateParams, type ConfigRetrieveSubjectParams as ConfigRetrieveSubjectParams, - type ConfigUpdateSubjectParams as ConfigUpdateSubjectParams, + type ConfigUpdateSubjectParams as ConfigUpdateSubjectParams }; } diff --git a/src/resources/gpu-droplets/account/account.ts b/src/resources/gpu-droplets/account/account.ts index be1d4790..7eeaec9a 100644 --- a/src/resources/gpu-droplets/account/account.ts +++ b/src/resources/gpu-droplets/account/account.ts @@ -2,17 +2,7 @@ import { APIResource } from '../../../core/resource'; import * as KeysAPI from './keys'; -import { - KeyCreateParams, - KeyCreateResponse, - KeyListParams, - KeyListResponse, - KeyRetrieveResponse, - KeyUpdateParams, - KeyUpdateResponse, - Keys, - SSHKeys, -} from './keys'; +import { KeyCreateParams, KeyCreateResponse, KeyListParams, KeyListResponse, KeyRetrieveResponse, KeyUpdateParams, KeyUpdateResponse, Keys, SSHKeys } from './keys'; export class Account extends APIResource { keys: KeysAPI.Keys = new KeysAPI.Keys(this._client); @@ -30,6 +20,6 @@ export declare namespace Account { type KeyListResponse as KeyListResponse, type KeyCreateParams as KeyCreateParams, type KeyUpdateParams as KeyUpdateParams, - type KeyListParams as KeyListParams, + type KeyListParams as KeyListParams }; } diff --git a/src/resources/gpu-droplets/account/index.ts b/src/resources/gpu-droplets/account/index.ts index bb5815b4..9f50d87f 100644 --- a/src/resources/gpu-droplets/account/index.ts +++ b/src/resources/gpu-droplets/account/index.ts @@ -1,14 +1,4 @@ // File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details. -export { Account } from './account'; -export { - Keys, - type SSHKeys, - type KeyCreateResponse, - type KeyRetrieveResponse, - type KeyUpdateResponse, - type KeyListResponse, - type KeyCreateParams, - type KeyUpdateParams, - type KeyListParams, -} from './keys'; +export { Account } from './account';; +export { Keys, type SSHKeys, type KeyCreateResponse, type KeyRetrieveResponse, type KeyUpdateResponse, type KeyListResponse, type KeyCreateParams, type KeyUpdateParams, type KeyListParams } from './keys';; diff --git a/src/resources/gpu-droplets/account/keys.ts b/src/resources/gpu-droplets/account/keys.ts index 286acd38..465a32e8 100644 --- a/src/resources/gpu-droplets/account/keys.ts +++ b/src/resources/gpu-droplets/account/keys.ts @@ -7,6 +7,9 @@ import { buildHeaders } from '../../../internal/headers'; import { RequestOptions } from '../../../internal/request-options'; import { path } from '../../../internal/utils/path'; +/** + * Manage SSH keys available on your account. + */ export class Keys extends APIResource { /** * To add a new SSH public key to your DigitalOcean account, send a POST request to @@ -23,11 +26,7 @@ export class Keys extends APIResource { * ``` */ create(body: KeyCreateParams, options?: RequestOptions): APIPromise { - return this._client.post('/v2/account/keys', { - body, - defaultBaseURL: 'https://api.digitalocean.com', - ...options, - }); + return this._client.post('/v2/account/keys', { body, defaultBaseURL: 'https://api.digitalocean.com', ...options }); } /** @@ -44,10 +43,7 @@ export class Keys extends APIResource { * ``` */ retrieve(sshKeyIdentifier: number | string, options?: RequestOptions): APIPromise { - return this._client.get(path`/v2/account/keys/${sshKeyIdentifier}`, { - defaultBaseURL: 'https://api.digitalocean.com', - ...options, - }); + return this._client.get(path`/v2/account/keys/${sshKeyIdentifier}`, { defaultBaseURL: 'https://api.digitalocean.com', ...options }); } /** @@ -62,16 +58,8 @@ export class Keys extends APIResource { * ); * ``` */ - update( - sshKeyIdentifier: number | string, - body: KeyUpdateParams, - options?: RequestOptions, - ): APIPromise { - return this._client.put(path`/v2/account/keys/${sshKeyIdentifier}`, { - body, - defaultBaseURL: 'https://api.digitalocean.com', - ...options, - }); + update(sshKeyIdentifier: number | string, body: KeyUpdateParams, options?: RequestOptions): APIPromise { + return this._client.put(path`/v2/account/keys/${sshKeyIdentifier}`, { body, defaultBaseURL: 'https://api.digitalocean.com', ...options }); } /** @@ -86,11 +74,7 @@ export class Keys extends APIResource { * ``` */ list(query: KeyListParams | null | undefined = {}, options?: RequestOptions): APIPromise { - return this._client.get('/v2/account/keys', { - query, - defaultBaseURL: 'https://api.digitalocean.com', - ...options, - }); + return this._client.get('/v2/account/keys', { query, defaultBaseURL: 'https://api.digitalocean.com', ...options }); } /** @@ -105,11 +89,7 @@ export class Keys extends APIResource { * ``` */ delete(sshKeyIdentifier: number | string, options?: RequestOptions): APIPromise { - return this._client.delete(path`/v2/account/keys/${sshKeyIdentifier}`, { - defaultBaseURL: 'https://api.digitalocean.com', - ...options, - headers: buildHeaders([{ Accept: '*/*' }, options?.headers]), - }); + return this._client.delete(path`/v2/account/keys/${sshKeyIdentifier}`, { defaultBaseURL: 'https://api.digitalocean.com', ...options, headers: buildHeaders([{Accept: '*/*'}, options?.headers]) }); } } @@ -206,6 +186,6 @@ export declare namespace Keys { type KeyListResponse as KeyListResponse, type KeyCreateParams as KeyCreateParams, type KeyUpdateParams as KeyUpdateParams, - type KeyListParams as KeyListParams, + type KeyListParams as KeyListParams }; } diff --git a/src/resources/gpu-droplets/actions.ts b/src/resources/gpu-droplets/actions.ts index e489578d..7227050f 100644 --- a/src/resources/gpu-droplets/actions.ts +++ b/src/resources/gpu-droplets/actions.ts @@ -7,6 +7,25 @@ import { APIPromise } from '../../core/api-promise'; import { RequestOptions } from '../../internal/request-options'; import { path } from '../../internal/utils/path'; +/** + * Droplet actions are tasks that can be executed on a Droplet. These can be + * things like rebooting, resizing, snapshotting, etc. + * + * Droplet action requests are generally targeted at one of the "actions" + * endpoints for a specific Droplet. The specific actions are usually + * initiated by sending a POST request with the action and arguments as + * parameters. + * + * Droplet action requests create a Droplet actions object, which can be used + * to get information about the status of an action. Creating a Droplet + * action is asynchronous: the HTTP call will return the action object before + * the action has finished processing on the Droplet. The current status of + * an action can be retrieved from either the Droplet actions endpoint or the + * global actions endpoint. If a Droplet action is uncompleted it may block + * the creation of a subsequent action for that Droplet, the locked attribute + * of the Droplet will be true and attempts to create a Droplet action will + * fail with a status of 422. + */ export class Actions extends APIResource { /** * To retrieve a Droplet action, send a GET request to @@ -23,16 +42,9 @@ export class Actions extends APIResource { * ); * ``` */ - retrieve( - actionID: number, - params: ActionRetrieveParams, - options?: RequestOptions, - ): APIPromise { - const { droplet_id } = params; - return this._client.get(path`/v2/droplets/${droplet_id}/actions/${actionID}`, { - defaultBaseURL: 'https://api.digitalocean.com', - ...options, - }); + retrieve(actionID: number, params: ActionRetrieveParams, options?: RequestOptions): APIPromise { + const { droplet_id } = params + return this._client.get(path`/v2/droplets/${droplet_id}/actions/${actionID}`, { defaultBaseURL: 'https://api.digitalocean.com', ...options }); } /** @@ -50,16 +62,8 @@ export class Actions extends APIResource { * ); * ``` */ - list( - dropletID: number, - query: ActionListParams | null | undefined = {}, - options?: RequestOptions, - ): APIPromise { - return this._client.get(path`/v2/droplets/${dropletID}/actions`, { - query, - defaultBaseURL: 'https://api.digitalocean.com', - ...options, - }); + list(dropletID: number, query: ActionListParams | null | undefined = {}, options?: RequestOptions): APIPromise { + return this._client.get(path`/v2/droplets/${dropletID}/actions`, { query, defaultBaseURL: 'https://api.digitalocean.com', ...options }); } /** @@ -86,17 +90,9 @@ export class Actions extends APIResource { * }); * ``` */ - bulkInitiate( - params: ActionBulkInitiateParams, - options?: RequestOptions, - ): APIPromise { - const { tag_name, ...body } = params; - return this._client.post('/v2/droplets/actions', { - query: { tag_name }, - body, - defaultBaseURL: 'https://api.digitalocean.com', - ...options, - }); + bulkInitiate(params: ActionBulkInitiateParams, options?: RequestOptions): APIPromise { + const { tag_name, ...body } = params + return this._client.post('/v2/droplets/actions', { query: { tag_name }, body, defaultBaseURL: 'https://api.digitalocean.com', ...options }); } /** @@ -131,16 +127,8 @@ export class Actions extends APIResource { * ); * ``` */ - initiate( - dropletID: number, - body: ActionInitiateParams, - options?: RequestOptions, - ): APIPromise { - return this._client.post(path`/v2/droplets/${dropletID}/actions`, { - body, - defaultBaseURL: 'https://api.digitalocean.com', - ...options, - }); + initiate(dropletID: number, body: ActionInitiateParams, options?: RequestOptions): APIPromise { + return this._client.post(path`/v2/droplets/${dropletID}/actions`, { body, defaultBaseURL: 'https://api.digitalocean.com', ...options }); } } @@ -186,31 +174,14 @@ export interface ActionListParams { per_page?: number; } -export type ActionBulkInitiateParams = - | ActionBulkInitiateParams.DropletAction - | ActionBulkInitiateParams.DropletActionSnapshot; +export type ActionBulkInitiateParams = ActionBulkInitiateParams.DropletAction | ActionBulkInitiateParams.DropletActionSnapshot export declare namespace ActionBulkInitiateParams { export interface DropletAction { /** * Body param: The type of action to initiate for the Droplet. */ - type: - | 'enable_backups' - | 'disable_backups' - | 'reboot' - | 'power_cycle' - | 'shutdown' - | 'power_off' - | 'power_on' - | 'restore' - | 'password_reset' - | 'resize' - | 'rebuild' - | 'rename' - | 'change_kernel' - | 'enable_ipv6' - | 'snapshot'; + type: 'enable_backups' | 'disable_backups' | 'reboot' | 'power_cycle' | 'shutdown' | 'power_off' | 'power_on' | 'restore' | 'password_reset' | 'resize' | 'rebuild' | 'rename' | 'change_kernel' | 'enable_ipv6' | 'snapshot'; /** * Query param: Used to filter Droplets by a specific tag. Can not be combined with @@ -223,22 +194,7 @@ export declare namespace ActionBulkInitiateParams { /** * Body param: The type of action to initiate for the Droplet. */ - type: - | 'enable_backups' - | 'disable_backups' - | 'reboot' - | 'power_cycle' - | 'shutdown' - | 'power_off' - | 'power_on' - | 'restore' - | 'password_reset' - | 'resize' - | 'rebuild' - | 'rename' - | 'change_kernel' - | 'enable_ipv6' - | 'snapshot'; + type: 'enable_backups' | 'disable_backups' | 'reboot' | 'power_cycle' | 'shutdown' | 'power_off' | 'power_on' | 'restore' | 'password_reset' | 'resize' | 'rebuild' | 'rename' | 'change_kernel' | 'enable_ipv6' | 'snapshot'; /** * Query param: Used to filter Droplets by a specific tag. Can not be combined with @@ -253,60 +209,21 @@ export declare namespace ActionBulkInitiateParams { } } -export type ActionInitiateParams = - | ActionInitiateParams.DropletAction - | ActionInitiateParams.DropletActionEnableBackups - | ActionInitiateParams.DropletActionChangeBackupPolicy - | ActionInitiateParams.DropletActionRestore - | ActionInitiateParams.DropletActionResize - | ActionInitiateParams.DropletActionRebuild - | ActionInitiateParams.DropletActionRename - | ActionInitiateParams.DropletActionChangeKernel - | ActionInitiateParams.DropletActionSnapshot; +export type ActionInitiateParams = ActionInitiateParams.DropletAction | ActionInitiateParams.DropletActionEnableBackups | ActionInitiateParams.DropletActionChangeBackupPolicy | ActionInitiateParams.DropletActionRestore | ActionInitiateParams.DropletActionResize | ActionInitiateParams.DropletActionRebuild | ActionInitiateParams.DropletActionRename | ActionInitiateParams.DropletActionChangeKernel | ActionInitiateParams.DropletActionSnapshot export declare namespace ActionInitiateParams { export interface DropletAction { /** * The type of action to initiate for the Droplet. */ - type: - | 'enable_backups' - | 'disable_backups' - | 'reboot' - | 'power_cycle' - | 'shutdown' - | 'power_off' - | 'power_on' - | 'restore' - | 'password_reset' - | 'resize' - | 'rebuild' - | 'rename' - | 'change_kernel' - | 'enable_ipv6' - | 'snapshot'; + type: 'enable_backups' | 'disable_backups' | 'reboot' | 'power_cycle' | 'shutdown' | 'power_off' | 'power_on' | 'restore' | 'password_reset' | 'resize' | 'rebuild' | 'rename' | 'change_kernel' | 'enable_ipv6' | 'snapshot'; } export interface DropletActionEnableBackups { /** * The type of action to initiate for the Droplet. */ - type: - | 'enable_backups' - | 'disable_backups' - | 'reboot' - | 'power_cycle' - | 'shutdown' - | 'power_off' - | 'power_on' - | 'restore' - | 'password_reset' - | 'resize' - | 'rebuild' - | 'rename' - | 'change_kernel' - | 'enable_ipv6' - | 'snapshot'; + type: 'enable_backups' | 'disable_backups' | 'reboot' | 'power_cycle' | 'shutdown' | 'power_off' | 'power_on' | 'restore' | 'password_reset' | 'resize' | 'rebuild' | 'rename' | 'change_kernel' | 'enable_ipv6' | 'snapshot'; /** * An object specifying the backup policy for the Droplet. If omitted, the backup @@ -319,22 +236,7 @@ export declare namespace ActionInitiateParams { /** * The type of action to initiate for the Droplet. */ - type: - | 'enable_backups' - | 'disable_backups' - | 'reboot' - | 'power_cycle' - | 'shutdown' - | 'power_off' - | 'power_on' - | 'restore' - | 'password_reset' - | 'resize' - | 'rebuild' - | 'rename' - | 'change_kernel' - | 'enable_ipv6' - | 'snapshot'; + type: 'enable_backups' | 'disable_backups' | 'reboot' | 'power_cycle' | 'shutdown' | 'power_off' | 'power_on' | 'restore' | 'password_reset' | 'resize' | 'rebuild' | 'rename' | 'change_kernel' | 'enable_ipv6' | 'snapshot'; /** * An object specifying the backup policy for the Droplet. @@ -346,22 +248,7 @@ export declare namespace ActionInitiateParams { /** * The type of action to initiate for the Droplet. */ - type: - | 'enable_backups' - | 'disable_backups' - | 'reboot' - | 'power_cycle' - | 'shutdown' - | 'power_off' - | 'power_on' - | 'restore' - | 'password_reset' - | 'resize' - | 'rebuild' - | 'rename' - | 'change_kernel' - | 'enable_ipv6' - | 'snapshot'; + type: 'enable_backups' | 'disable_backups' | 'reboot' | 'power_cycle' | 'shutdown' | 'power_off' | 'power_on' | 'restore' | 'password_reset' | 'resize' | 'rebuild' | 'rename' | 'change_kernel' | 'enable_ipv6' | 'snapshot'; /** * The ID of a backup of the current Droplet instance to restore from. @@ -373,22 +260,7 @@ export declare namespace ActionInitiateParams { /** * The type of action to initiate for the Droplet. */ - type: - | 'enable_backups' - | 'disable_backups' - | 'reboot' - | 'power_cycle' - | 'shutdown' - | 'power_off' - | 'power_on' - | 'restore' - | 'password_reset' - | 'resize' - | 'rebuild' - | 'rename' - | 'change_kernel' - | 'enable_ipv6' - | 'snapshot'; + type: 'enable_backups' | 'disable_backups' | 'reboot' | 'power_cycle' | 'shutdown' | 'power_off' | 'power_on' | 'restore' | 'password_reset' | 'resize' | 'rebuild' | 'rename' | 'change_kernel' | 'enable_ipv6' | 'snapshot'; /** * When `true`, the Droplet's disk will be resized in addition to its RAM and CPU. @@ -407,22 +279,7 @@ export declare namespace ActionInitiateParams { /** * The type of action to initiate for the Droplet. */ - type: - | 'enable_backups' - | 'disable_backups' - | 'reboot' - | 'power_cycle' - | 'shutdown' - | 'power_off' - | 'power_on' - | 'restore' - | 'password_reset' - | 'resize' - | 'rebuild' - | 'rename' - | 'change_kernel' - | 'enable_ipv6' - | 'snapshot'; + type: 'enable_backups' | 'disable_backups' | 'reboot' | 'power_cycle' | 'shutdown' | 'power_off' | 'power_on' | 'restore' | 'password_reset' | 'resize' | 'rebuild' | 'rename' | 'change_kernel' | 'enable_ipv6' | 'snapshot'; /** * The image ID of a public or private image or the slug identifier for a public @@ -435,22 +292,7 @@ export declare namespace ActionInitiateParams { /** * The type of action to initiate for the Droplet. */ - type: - | 'enable_backups' - | 'disable_backups' - | 'reboot' - | 'power_cycle' - | 'shutdown' - | 'power_off' - | 'power_on' - | 'restore' - | 'password_reset' - | 'resize' - | 'rebuild' - | 'rename' - | 'change_kernel' - | 'enable_ipv6' - | 'snapshot'; + type: 'enable_backups' | 'disable_backups' | 'reboot' | 'power_cycle' | 'shutdown' | 'power_off' | 'power_on' | 'restore' | 'password_reset' | 'resize' | 'rebuild' | 'rename' | 'change_kernel' | 'enable_ipv6' | 'snapshot'; /** * The new name for the Droplet. @@ -462,22 +304,7 @@ export declare namespace ActionInitiateParams { /** * The type of action to initiate for the Droplet. */ - type: - | 'enable_backups' - | 'disable_backups' - | 'reboot' - | 'power_cycle' - | 'shutdown' - | 'power_off' - | 'power_on' - | 'restore' - | 'password_reset' - | 'resize' - | 'rebuild' - | 'rename' - | 'change_kernel' - | 'enable_ipv6' - | 'snapshot'; + type: 'enable_backups' | 'disable_backups' | 'reboot' | 'power_cycle' | 'shutdown' | 'power_off' | 'power_on' | 'restore' | 'password_reset' | 'resize' | 'rebuild' | 'rename' | 'change_kernel' | 'enable_ipv6' | 'snapshot'; /** * A unique number used to identify and reference a specific kernel. @@ -489,22 +316,7 @@ export declare namespace ActionInitiateParams { /** * The type of action to initiate for the Droplet. */ - type: - | 'enable_backups' - | 'disable_backups' - | 'reboot' - | 'power_cycle' - | 'shutdown' - | 'power_off' - | 'power_on' - | 'restore' - | 'password_reset' - | 'resize' - | 'rebuild' - | 'rename' - | 'change_kernel' - | 'enable_ipv6' - | 'snapshot'; + type: 'enable_backups' | 'disable_backups' | 'reboot' | 'power_cycle' | 'shutdown' | 'power_off' | 'power_on' | 'restore' | 'password_reset' | 'resize' | 'rebuild' | 'rename' | 'change_kernel' | 'enable_ipv6' | 'snapshot'; /** * The name to give the new snapshot of the Droplet. @@ -522,6 +334,6 @@ export declare namespace Actions { type ActionRetrieveParams as ActionRetrieveParams, type ActionListParams as ActionListParams, type ActionBulkInitiateParams as ActionBulkInitiateParams, - type ActionInitiateParams as ActionInitiateParams, + type ActionInitiateParams as ActionInitiateParams }; } diff --git a/src/resources/gpu-droplets/autoscale.ts b/src/resources/gpu-droplets/autoscale.ts index 2918b761..42cb6de7 100644 --- a/src/resources/gpu-droplets/autoscale.ts +++ b/src/resources/gpu-droplets/autoscale.ts @@ -7,6 +7,9 @@ import { buildHeaders } from '../../internal/headers'; import { RequestOptions } from '../../internal/request-options'; import { path } from '../../internal/utils/path'; +/** + * Droplet autoscale pools manage automatic horizontal scaling for your applications based on resource usage (CPU, memory, or both) or a static configuration. + */ export class Autoscale extends APIResource { /** * To create a new autoscale pool, send a POST request to `/v2/droplets/autoscale` @@ -33,9 +36,7 @@ export class Autoscale extends APIResource { * ssh_keys: [ * '3b:16:e4:bf:8b:00:8b:b8:59:8c:a9:d3:f0:19:fa:45', * ], - * backups: true, * ipv6: true, - * monitoring: true, * tags: ['env:prod', 'web'], * user_data: * '#cloud-config\nruncmd:\n - touch /test.txt\n', @@ -47,11 +48,7 @@ export class Autoscale extends APIResource { * ``` */ create(body: AutoscaleCreateParams, options?: RequestOptions): APIPromise { - return this._client.post('/v2/droplets/autoscale', { - body, - defaultBaseURL: 'https://api.digitalocean.com', - ...options, - }); + return this._client.post('/v2/droplets/autoscale', { body, defaultBaseURL: 'https://api.digitalocean.com', ...options }); } /** @@ -67,10 +64,7 @@ export class Autoscale extends APIResource { * ``` */ retrieve(autoscalePoolID: string, options?: RequestOptions): APIPromise { - return this._client.get(path`/v2/droplets/autoscale/${autoscalePoolID}`, { - defaultBaseURL: 'https://api.digitalocean.com', - ...options, - }); + return this._client.get(path`/v2/droplets/autoscale/${autoscalePoolID}`, { defaultBaseURL: 'https://api.digitalocean.com', ...options }); } /** @@ -92,9 +86,7 @@ export class Autoscale extends APIResource { * ssh_keys: [ * '3b:16:e4:bf:8b:00:8b:b8:59:8c:a9:d3:f0:19:fa:45', * ], - * backups: true, * ipv6: true, - * monitoring: true, * tags: ['env:prod', 'web'], * user_data: * '#cloud-config\nruncmd:\n - touch /test.txt\n', @@ -105,16 +97,8 @@ export class Autoscale extends APIResource { * ); * ``` */ - update( - autoscalePoolID: string, - body: AutoscaleUpdateParams, - options?: RequestOptions, - ): APIPromise { - return this._client.put(path`/v2/droplets/autoscale/${autoscalePoolID}`, { - body, - defaultBaseURL: 'https://api.digitalocean.com', - ...options, - }); + update(autoscalePoolID: string, body: AutoscaleUpdateParams, options?: RequestOptions): APIPromise { + return this._client.put(path`/v2/droplets/autoscale/${autoscalePoolID}`, { body, defaultBaseURL: 'https://api.digitalocean.com', ...options }); } /** @@ -129,15 +113,8 @@ export class Autoscale extends APIResource { * await client.gpuDroplets.autoscale.list(); * ``` */ - list( - query: AutoscaleListParams | null | undefined = {}, - options?: RequestOptions, - ): APIPromise { - return this._client.get('/v2/droplets/autoscale', { - query, - defaultBaseURL: 'https://api.digitalocean.com', - ...options, - }); + list(query: AutoscaleListParams | null | undefined = {}, options?: RequestOptions): APIPromise { + return this._client.get('/v2/droplets/autoscale', { query, defaultBaseURL: 'https://api.digitalocean.com', ...options }); } /** @@ -154,11 +131,7 @@ export class Autoscale extends APIResource { * ``` */ delete(autoscalePoolID: string, options?: RequestOptions): APIPromise { - return this._client.delete(path`/v2/droplets/autoscale/${autoscalePoolID}`, { - defaultBaseURL: 'https://api.digitalocean.com', - ...options, - headers: buildHeaders([{ Accept: '*/*' }, options?.headers]), - }); + return this._client.delete(path`/v2/droplets/autoscale/${autoscalePoolID}`, { defaultBaseURL: 'https://api.digitalocean.com', ...options, headers: buildHeaders([{Accept: '*/*'}, options?.headers]) }); } /** @@ -174,17 +147,9 @@ export class Autoscale extends APIResource { * ); * ``` */ - deleteDangerous( - autoscalePoolID: string, - params: AutoscaleDeleteDangerousParams, - options?: RequestOptions, - ): APIPromise { - const { 'X-Dangerous': xDangerous } = params; - return this._client.delete(path`/v2/droplets/autoscale/${autoscalePoolID}/dangerous`, { - defaultBaseURL: 'https://api.digitalocean.com', - ...options, - headers: buildHeaders([{ Accept: '*/*', 'X-Dangerous': xDangerous.toString() }, options?.headers]), - }); + deleteDangerous(autoscalePoolID: string, params: AutoscaleDeleteDangerousParams, options?: RequestOptions): APIPromise { + const { 'X-Dangerous': xDangerous } = params + return this._client.delete(path`/v2/droplets/autoscale/${autoscalePoolID}/dangerous`, { defaultBaseURL: 'https://api.digitalocean.com', ...options, headers: buildHeaders([{Accept: '*/*', 'X-Dangerous': xDangerous.toString()}, options?.headers]) }); } /** @@ -202,16 +167,8 @@ export class Autoscale extends APIResource { * ); * ``` */ - listHistory( - autoscalePoolID: string, - query: AutoscaleListHistoryParams | null | undefined = {}, - options?: RequestOptions, - ): APIPromise { - return this._client.get(path`/v2/droplets/autoscale/${autoscalePoolID}/history`, { - query, - defaultBaseURL: 'https://api.digitalocean.com', - ...options, - }); + listHistory(autoscalePoolID: string, query: AutoscaleListHistoryParams | null | undefined = {}, options?: RequestOptions): APIPromise { + return this._client.get(path`/v2/droplets/autoscale/${autoscalePoolID}/history`, { query, defaultBaseURL: 'https://api.digitalocean.com', ...options }); } /** @@ -230,16 +187,8 @@ export class Autoscale extends APIResource { * ); * ``` */ - listMembers( - autoscalePoolID: string, - query: AutoscaleListMembersParams | null | undefined = {}, - options?: RequestOptions, - ): APIPromise { - return this._client.get(path`/v2/droplets/autoscale/${autoscalePoolID}/members`, { - query, - defaultBaseURL: 'https://api.digitalocean.com', - ...options, - }); + listMembers(autoscalePoolID: string, query: AutoscaleListMembersParams | null | undefined = {}, options?: RequestOptions): APIPromise { + return this._client.get(path`/v2/droplets/autoscale/${autoscalePoolID}/members`, { query, defaultBaseURL: 'https://api.digitalocean.com', ...options }); } } @@ -298,21 +247,7 @@ export interface AutoscalePoolDropletTemplate { /** * The datacenter in which all of the Droplets will be created. */ - region: - | 'nyc1' - | 'nyc2' - | 'nyc3' - | 'ams2' - | 'ams3' - | 'sfo1' - | 'sfo2' - | 'sfo3' - | 'sgp1' - | 'lon1' - | 'fra1' - | 'tor1' - | 'blr1' - | 'syd1'; + region: 'nyc1' | 'nyc2' | 'nyc3' | 'ams2' | 'ams3' | 'sfo1' | 'sfo2' | 'sfo3' | 'sgp1' | 'lon1' | 'fra1' | 'tor1' | 'blr1' | 'syd1'; /** * The Droplet size to be used for all Droplets in the autoscale pool. @@ -642,6 +577,6 @@ export declare namespace Autoscale { type AutoscaleListParams as AutoscaleListParams, type AutoscaleDeleteDangerousParams as AutoscaleDeleteDangerousParams, type AutoscaleListHistoryParams as AutoscaleListHistoryParams, - type AutoscaleListMembersParams as AutoscaleListMembersParams, + type AutoscaleListMembersParams as AutoscaleListMembersParams }; } diff --git a/src/resources/gpu-droplets/backups.ts b/src/resources/gpu-droplets/backups.ts index bd096aab..b027faa2 100644 --- a/src/resources/gpu-droplets/backups.ts +++ b/src/resources/gpu-droplets/backups.ts @@ -7,6 +7,16 @@ import { APIPromise } from '../../core/api-promise'; import { RequestOptions } from '../../internal/request-options'; import { path } from '../../internal/utils/path'; +/** + * A [Droplet](https://docs.digitalocean.com/products/droplets/) is a DigitalOcean + * virtual machine. By sending requests to the Droplet endpoint, you can + * list, create, or delete Droplets. + * + * Some of the attributes will have an object value. The `region` and `image` + * objects will all contain the standard attributes of their associated + * types. Find more information about each of these objects in their + * respective sections. + */ export class Backups extends APIResource { /** * To retrieve any backups associated with a Droplet, send a GET request to @@ -23,16 +33,8 @@ export class Backups extends APIResource { * ); * ``` */ - list( - dropletID: number, - query: BackupListParams | null | undefined = {}, - options?: RequestOptions, - ): APIPromise { - return this._client.get(path`/v2/droplets/${dropletID}/backups`, { - query, - defaultBaseURL: 'https://api.digitalocean.com', - ...options, - }); + list(dropletID: number, query: BackupListParams | null | undefined = {}, options?: RequestOptions): APIPromise { + return this._client.get(path`/v2/droplets/${dropletID}/backups`, { query, defaultBaseURL: 'https://api.digitalocean.com', ...options }); } /** @@ -45,15 +47,8 @@ export class Backups extends APIResource { * await client.gpuDroplets.backups.listPolicies(); * ``` */ - listPolicies( - query: BackupListPoliciesParams | null | undefined = {}, - options?: RequestOptions, - ): APIPromise { - return this._client.get('/v2/droplets/backups/policies', { - query, - defaultBaseURL: 'https://api.digitalocean.com', - ...options, - }); + listPolicies(query: BackupListPoliciesParams | null | undefined = {}, options?: RequestOptions): APIPromise { + return this._client.get('/v2/droplets/backups/policies', { query, defaultBaseURL: 'https://api.digitalocean.com', ...options }); } /** @@ -67,10 +62,7 @@ export class Backups extends APIResource { * ``` */ listSupportedPolicies(options?: RequestOptions): APIPromise { - return this._client.get('/v2/droplets/backups/supported_policies', { - defaultBaseURL: 'https://api.digitalocean.com', - ...options, - }); + return this._client.get('/v2/droplets/backups/supported_policies', { defaultBaseURL: 'https://api.digitalocean.com', ...options }); } /** @@ -84,10 +76,7 @@ export class Backups extends APIResource { * ``` */ retrievePolicy(dropletID: number, options?: RequestOptions): APIPromise { - return this._client.get(path`/v2/droplets/${dropletID}/backups/policy`, { - defaultBaseURL: 'https://api.digitalocean.com', - ...options, - }); + return this._client.get(path`/v2/droplets/${dropletID}/backups/policy`, { defaultBaseURL: 'https://api.digitalocean.com', ...options }); } } @@ -278,6 +267,6 @@ export declare namespace Backups { type BackupListSupportedPoliciesResponse as BackupListSupportedPoliciesResponse, type BackupRetrievePolicyResponse as BackupRetrievePolicyResponse, type BackupListParams as BackupListParams, - type BackupListPoliciesParams as BackupListPoliciesParams, + type BackupListPoliciesParams as BackupListPoliciesParams }; } diff --git a/src/resources/gpu-droplets/destroy-with-associated-resources.ts b/src/resources/gpu-droplets/destroy-with-associated-resources.ts index c8034298..03f95835 100644 --- a/src/resources/gpu-droplets/destroy-with-associated-resources.ts +++ b/src/resources/gpu-droplets/destroy-with-associated-resources.ts @@ -7,6 +7,16 @@ import { buildHeaders } from '../../internal/headers'; import { RequestOptions } from '../../internal/request-options'; import { path } from '../../internal/utils/path'; +/** + * A [Droplet](https://docs.digitalocean.com/products/droplets/) is a DigitalOcean + * virtual machine. By sending requests to the Droplet endpoint, you can + * list, create, or delete Droplets. + * + * Some of the attributes will have an object value. The `region` and `image` + * objects will all contain the standard attributes of their associated + * types. Find more information about each of these objects in their + * respective sections. + */ export class DestroyWithAssociatedResources extends APIResource { /** * To list the associated billable resources that can be destroyed along with a @@ -29,10 +39,7 @@ export class DestroyWithAssociatedResources extends APIResource { * ``` */ list(dropletID: number, options?: RequestOptions): APIPromise { - return this._client.get(path`/v2/droplets/${dropletID}/destroy_with_associated_resources`, { - defaultBaseURL: 'https://api.digitalocean.com', - ...options, - }); + return this._client.get(path`/v2/droplets/${dropletID}/destroy_with_associated_resources`, { defaultBaseURL: 'https://api.digitalocean.com', ...options }); } /** @@ -48,14 +55,8 @@ export class DestroyWithAssociatedResources extends APIResource { * ); * ``` */ - checkStatus( - dropletID: number, - options?: RequestOptions, - ): APIPromise { - return this._client.get(path`/v2/droplets/${dropletID}/destroy_with_associated_resources/status`, { - defaultBaseURL: 'https://api.digitalocean.com', - ...options, - }); + checkStatus(dropletID: number, options?: RequestOptions): APIPromise { + return this._client.get(path`/v2/droplets/${dropletID}/destroy_with_associated_resources/status`, { defaultBaseURL: 'https://api.digitalocean.com', ...options }); } /** @@ -78,17 +79,9 @@ export class DestroyWithAssociatedResources extends APIResource { * ); * ``` */ - deleteDangerous( - dropletID: number, - params: DestroyWithAssociatedResourceDeleteDangerousParams, - options?: RequestOptions, - ): APIPromise { - const { 'X-Dangerous': xDangerous } = params; - return this._client.delete(path`/v2/droplets/${dropletID}/destroy_with_associated_resources/dangerous`, { - defaultBaseURL: 'https://api.digitalocean.com', - ...options, - headers: buildHeaders([{ Accept: '*/*', 'X-Dangerous': xDangerous.toString() }, options?.headers]), - }); + deleteDangerous(dropletID: number, params: DestroyWithAssociatedResourceDeleteDangerousParams, options?: RequestOptions): APIPromise { + const { 'X-Dangerous': xDangerous } = params + return this._client.delete(path`/v2/droplets/${dropletID}/destroy_with_associated_resources/dangerous`, { defaultBaseURL: 'https://api.digitalocean.com', ...options, headers: buildHeaders([{Accept: '*/*', 'X-Dangerous': xDangerous.toString()}, options?.headers]) }); } /** @@ -112,17 +105,8 @@ export class DestroyWithAssociatedResources extends APIResource { * ); * ``` */ - deleteSelective( - dropletID: number, - body: DestroyWithAssociatedResourceDeleteSelectiveParams | null | undefined = {}, - options?: RequestOptions, - ): APIPromise { - return this._client.delete(path`/v2/droplets/${dropletID}/destroy_with_associated_resources/selective`, { - body, - defaultBaseURL: 'https://api.digitalocean.com', - ...options, - headers: buildHeaders([{ Accept: '*/*' }, options?.headers]), - }); + deleteSelective(dropletID: number, body: DestroyWithAssociatedResourceDeleteSelectiveParams | null | undefined = {}, options?: RequestOptions): APIPromise { + return this._client.delete(path`/v2/droplets/${dropletID}/destroy_with_associated_resources/selective`, { body, defaultBaseURL: 'https://api.digitalocean.com', ...options, headers: buildHeaders([{Accept: '*/*'}, options?.headers]) }); } /** @@ -142,11 +126,7 @@ export class DestroyWithAssociatedResources extends APIResource { * ``` */ retry(dropletID: number, options?: RequestOptions): APIPromise { - return this._client.post(path`/v2/droplets/${dropletID}/destroy_with_associated_resources/retry`, { - defaultBaseURL: 'https://api.digitalocean.com', - ...options, - headers: buildHeaders([{ Accept: '*/*' }, options?.headers]), - }); + return this._client.post(path`/v2/droplets/${dropletID}/destroy_with_associated_resources/retry`, { defaultBaseURL: 'https://api.digitalocean.com', ...options, headers: buildHeaders([{Accept: '*/*'}, options?.headers]) }); } } @@ -319,6 +299,6 @@ export declare namespace DestroyWithAssociatedResources { type DestroyWithAssociatedResourceListResponse as DestroyWithAssociatedResourceListResponse, type DestroyWithAssociatedResourceCheckStatusResponse as DestroyWithAssociatedResourceCheckStatusResponse, type DestroyWithAssociatedResourceDeleteDangerousParams as DestroyWithAssociatedResourceDeleteDangerousParams, - type DestroyWithAssociatedResourceDeleteSelectiveParams as DestroyWithAssociatedResourceDeleteSelectiveParams, + type DestroyWithAssociatedResourceDeleteSelectiveParams as DestroyWithAssociatedResourceDeleteSelectiveParams }; } diff --git a/src/resources/gpu-droplets/firewalls/droplets.ts b/src/resources/gpu-droplets/firewalls/droplets.ts index 23805cc9..23fbdc23 100644 --- a/src/resources/gpu-droplets/firewalls/droplets.ts +++ b/src/resources/gpu-droplets/firewalls/droplets.ts @@ -6,6 +6,13 @@ import { buildHeaders } from '../../../internal/headers'; import { RequestOptions } from '../../../internal/request-options'; import { path } from '../../../internal/utils/path'; +/** + * [DigitalOcean Cloud Firewalls](https://docs.digitalocean.com/products/networking/firewalls/) + * provide the ability to restrict network access to and from a Droplet + * allowing you to define which ports will accept inbound or outbound + * connections. By sending requests to the `/v2/firewalls` endpoint, you can + * list, create, or delete firewalls as well as modify access rules. + */ export class Droplets extends APIResource { /** * To assign a Droplet to a firewall, send a POST request to @@ -25,12 +32,7 @@ export class Droplets extends APIResource { * ``` */ add(firewallID: string, body: DropletAddParams, options?: RequestOptions): APIPromise { - return this._client.post(path`/v2/firewalls/${firewallID}/droplets`, { - body, - defaultBaseURL: 'https://api.digitalocean.com', - ...options, - headers: buildHeaders([{ Accept: '*/*' }, options?.headers]), - }); + return this._client.post(path`/v2/firewalls/${firewallID}/droplets`, { body, defaultBaseURL: 'https://api.digitalocean.com', ...options, headers: buildHeaders([{Accept: '*/*'}, options?.headers]) }); } /** @@ -51,12 +53,7 @@ export class Droplets extends APIResource { * ``` */ remove(firewallID: string, body: DropletRemoveParams, options?: RequestOptions): APIPromise { - return this._client.delete(path`/v2/firewalls/${firewallID}/droplets`, { - body, - defaultBaseURL: 'https://api.digitalocean.com', - ...options, - headers: buildHeaders([{ Accept: '*/*' }, options?.headers]), - }); + return this._client.delete(path`/v2/firewalls/${firewallID}/droplets`, { body, defaultBaseURL: 'https://api.digitalocean.com', ...options, headers: buildHeaders([{Accept: '*/*'}, options?.headers]) }); } } @@ -75,5 +72,8 @@ export interface DropletRemoveParams { } export declare namespace Droplets { - export { type DropletAddParams as DropletAddParams, type DropletRemoveParams as DropletRemoveParams }; + export { + type DropletAddParams as DropletAddParams, + type DropletRemoveParams as DropletRemoveParams + }; } diff --git a/src/resources/gpu-droplets/firewalls/firewalls.ts b/src/resources/gpu-droplets/firewalls/firewalls.ts index b5372de8..d0597bfc 100644 --- a/src/resources/gpu-droplets/firewalls/firewalls.ts +++ b/src/resources/gpu-droplets/firewalls/firewalls.ts @@ -14,6 +14,13 @@ import { buildHeaders } from '../../../internal/headers'; import { RequestOptions } from '../../../internal/request-options'; import { path } from '../../../internal/utils/path'; +/** + * [DigitalOcean Cloud Firewalls](https://docs.digitalocean.com/products/networking/firewalls/) + * provide the ability to restrict network access to and from a Droplet + * allowing you to define which ports will accept inbound or outbound + * connections. By sending requests to the `/v2/firewalls` endpoint, you can + * list, create, or delete firewalls as well as modify access rules. + */ export class Firewalls extends APIResource { droplets: DropletsAPI.Droplets = new DropletsAPI.Droplets(this._client); tags: TagsAPI.Tags = new TagsAPI.Tags(this._client); @@ -29,16 +36,9 @@ export class Firewalls extends APIResource { * await client.gpuDroplets.firewalls.create(); * ``` */ - create( - params: FirewallCreateParams | null | undefined = undefined, - options?: RequestOptions, - ): APIPromise { - const { body } = params ?? {}; - return this._client.post('/v2/firewalls', { - body: body, - defaultBaseURL: 'https://api.digitalocean.com', - ...options, - }); + create(params: FirewallCreateParams | null | undefined = undefined, options?: RequestOptions): APIPromise { + const { body } = params ?? {} + return this._client.post('/v2/firewalls', { body: body, defaultBaseURL: 'https://api.digitalocean.com', ...options }); } /** @@ -54,10 +54,7 @@ export class Firewalls extends APIResource { * ``` */ retrieve(firewallID: string, options?: RequestOptions): APIPromise { - return this._client.get(path`/v2/firewalls/${firewallID}`, { - defaultBaseURL: 'https://api.digitalocean.com', - ...options, - }); + return this._client.get(path`/v2/firewalls/${firewallID}`, { defaultBaseURL: 'https://api.digitalocean.com', ...options }); } /** @@ -77,17 +74,9 @@ export class Firewalls extends APIResource { * ); * ``` */ - update( - firewallID: string, - params: FirewallUpdateParams, - options?: RequestOptions, - ): APIPromise { - const { firewall } = params; - return this._client.put(path`/v2/firewalls/${firewallID}`, { - body: firewall, - defaultBaseURL: 'https://api.digitalocean.com', - ...options, - }); + update(firewallID: string, params: FirewallUpdateParams, options?: RequestOptions): APIPromise { + const { firewall } = params + return this._client.put(path`/v2/firewalls/${firewallID}`, { body: firewall, defaultBaseURL: 'https://api.digitalocean.com', ...options }); } /** @@ -99,15 +88,8 @@ export class Firewalls extends APIResource { * const firewalls = await client.gpuDroplets.firewalls.list(); * ``` */ - list( - query: FirewallListParams | null | undefined = {}, - options?: RequestOptions, - ): APIPromise { - return this._client.get('/v2/firewalls', { - query, - defaultBaseURL: 'https://api.digitalocean.com', - ...options, - }); + list(query: FirewallListParams | null | undefined = {}, options?: RequestOptions): APIPromise { + return this._client.get('/v2/firewalls', { query, defaultBaseURL: 'https://api.digitalocean.com', ...options }); } /** @@ -125,11 +107,7 @@ export class Firewalls extends APIResource { * ``` */ delete(firewallID: string, options?: RequestOptions): APIPromise { - return this._client.delete(path`/v2/firewalls/${firewallID}`, { - defaultBaseURL: 'https://api.digitalocean.com', - ...options, - headers: buildHeaders([{ Accept: '*/*' }, options?.headers]), - }); + return this._client.delete(path`/v2/firewalls/${firewallID}`, { defaultBaseURL: 'https://api.digitalocean.com', ...options, headers: buildHeaders([{Accept: '*/*'}, options?.headers]) }); } } @@ -262,7 +240,8 @@ export interface FirewallCreateParams { } export namespace FirewallCreateParams { - export interface Body extends FirewallsAPI.Firewall {} + export interface Body extends FirewallsAPI.Firewall { + } } export interface FirewallUpdateParams { @@ -294,16 +273,24 @@ export declare namespace Firewalls { type FirewallListResponse as FirewallListResponse, type FirewallCreateParams as FirewallCreateParams, type FirewallUpdateParams as FirewallUpdateParams, - type FirewallListParams as FirewallListParams, + type FirewallListParams as FirewallListParams }; export { Droplets as Droplets, type DropletAddParams as DropletAddParams, - type DropletRemoveParams as DropletRemoveParams, + type DropletRemoveParams as DropletRemoveParams }; - export { Tags as Tags, type TagAddParams as TagAddParams, type TagRemoveParams as TagRemoveParams }; + export { + Tags as Tags, + type TagAddParams as TagAddParams, + type TagRemoveParams as TagRemoveParams + }; - export { Rules as Rules, type RuleAddParams as RuleAddParams, type RuleRemoveParams as RuleRemoveParams }; + export { + Rules as Rules, + type RuleAddParams as RuleAddParams, + type RuleRemoveParams as RuleRemoveParams + }; } diff --git a/src/resources/gpu-droplets/firewalls/index.ts b/src/resources/gpu-droplets/firewalls/index.ts index a8f3fb34..a1df0e90 100644 --- a/src/resources/gpu-droplets/firewalls/index.ts +++ b/src/resources/gpu-droplets/firewalls/index.ts @@ -1,16 +1,6 @@ // File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details. -export { Droplets, type DropletAddParams, type DropletRemoveParams } from './droplets'; -export { - Firewalls, - type Firewall, - type FirewallCreateResponse, - type FirewallRetrieveResponse, - type FirewallUpdateResponse, - type FirewallListResponse, - type FirewallCreateParams, - type FirewallUpdateParams, - type FirewallListParams, -} from './firewalls'; -export { Rules, type RuleAddParams, type RuleRemoveParams } from './rules'; -export { Tags, type TagAddParams, type TagRemoveParams } from './tags'; +export { Droplets, type DropletAddParams, type DropletRemoveParams } from './droplets';; +export { Firewalls, type Firewall, type FirewallCreateResponse, type FirewallRetrieveResponse, type FirewallUpdateResponse, type FirewallListResponse, type FirewallCreateParams, type FirewallUpdateParams, type FirewallListParams } from './firewalls';; +export { Rules, type RuleAddParams, type RuleRemoveParams } from './rules';; +export { Tags, type TagAddParams, type TagRemoveParams } from './tags';; diff --git a/src/resources/gpu-droplets/firewalls/rules.ts b/src/resources/gpu-droplets/firewalls/rules.ts index 66a5804b..de21c9ca 100644 --- a/src/resources/gpu-droplets/firewalls/rules.ts +++ b/src/resources/gpu-droplets/firewalls/rules.ts @@ -7,6 +7,13 @@ import { buildHeaders } from '../../../internal/headers'; import { RequestOptions } from '../../../internal/request-options'; import { path } from '../../../internal/utils/path'; +/** + * [DigitalOcean Cloud Firewalls](https://docs.digitalocean.com/products/networking/firewalls/) + * provide the ability to restrict network access to and from a Droplet + * allowing you to define which ports will accept inbound or outbound + * connections. By sending requests to the `/v2/firewalls` endpoint, you can + * list, create, or delete firewalls as well as modify access rules. + */ export class Rules extends APIResource { /** * To add additional access rules to a firewall, send a POST request to @@ -41,17 +48,8 @@ export class Rules extends APIResource { * ); * ``` */ - add( - firewallID: string, - body: RuleAddParams | null | undefined = {}, - options?: RequestOptions, - ): APIPromise { - return this._client.post(path`/v2/firewalls/${firewallID}/rules`, { - body, - defaultBaseURL: 'https://api.digitalocean.com', - ...options, - headers: buildHeaders([{ Accept: '*/*' }, options?.headers]), - }); + add(firewallID: string, body: RuleAddParams | null | undefined = {}, options?: RequestOptions): APIPromise { + return this._client.post(path`/v2/firewalls/${firewallID}/rules`, { body, defaultBaseURL: 'https://api.digitalocean.com', ...options, headers: buildHeaders([{Accept: '*/*'}, options?.headers]) }); } /** @@ -87,17 +85,8 @@ export class Rules extends APIResource { * ); * ``` */ - remove( - firewallID: string, - body: RuleRemoveParams | null | undefined = {}, - options?: RequestOptions, - ): APIPromise { - return this._client.delete(path`/v2/firewalls/${firewallID}/rules`, { - body, - defaultBaseURL: 'https://api.digitalocean.com', - ...options, - headers: buildHeaders([{ Accept: '*/*' }, options?.headers]), - }); + remove(firewallID: string, body: RuleRemoveParams | null | undefined = {}, options?: RequestOptions): APIPromise { + return this._client.delete(path`/v2/firewalls/${firewallID}/rules`, { body, defaultBaseURL: 'https://api.digitalocean.com', ...options, headers: buildHeaders([{Accept: '*/*'}, options?.headers]) }); } } @@ -194,5 +183,8 @@ export namespace RuleRemoveParams { } export declare namespace Rules { - export { type RuleAddParams as RuleAddParams, type RuleRemoveParams as RuleRemoveParams }; + export { + type RuleAddParams as RuleAddParams, + type RuleRemoveParams as RuleRemoveParams + }; } diff --git a/src/resources/gpu-droplets/firewalls/tags.ts b/src/resources/gpu-droplets/firewalls/tags.ts index c70534a8..927cbde5 100644 --- a/src/resources/gpu-droplets/firewalls/tags.ts +++ b/src/resources/gpu-droplets/firewalls/tags.ts @@ -6,6 +6,13 @@ import { buildHeaders } from '../../../internal/headers'; import { RequestOptions } from '../../../internal/request-options'; import { path } from '../../../internal/utils/path'; +/** + * [DigitalOcean Cloud Firewalls](https://docs.digitalocean.com/products/networking/firewalls/) + * provide the ability to restrict network access to and from a Droplet + * allowing you to define which ports will accept inbound or outbound + * connections. By sending requests to the `/v2/firewalls` endpoint, you can + * list, create, or delete firewalls as well as modify access rules. + */ export class Tags extends APIResource { /** * To assign a tag representing a group of Droplets to a firewall, send a POST @@ -25,12 +32,7 @@ export class Tags extends APIResource { * ``` */ add(firewallID: string, body: TagAddParams, options?: RequestOptions): APIPromise { - return this._client.post(path`/v2/firewalls/${firewallID}/tags`, { - body, - defaultBaseURL: 'https://api.digitalocean.com', - ...options, - headers: buildHeaders([{ Accept: '*/*' }, options?.headers]), - }); + return this._client.post(path`/v2/firewalls/${firewallID}/tags`, { body, defaultBaseURL: 'https://api.digitalocean.com', ...options, headers: buildHeaders([{Accept: '*/*'}, options?.headers]) }); } /** @@ -51,12 +53,7 @@ export class Tags extends APIResource { * ``` */ remove(firewallID: string, body: TagRemoveParams, options?: RequestOptions): APIPromise { - return this._client.delete(path`/v2/firewalls/${firewallID}/tags`, { - body, - defaultBaseURL: 'https://api.digitalocean.com', - ...options, - headers: buildHeaders([{ Accept: '*/*' }, options?.headers]), - }); + return this._client.delete(path`/v2/firewalls/${firewallID}/tags`, { body, defaultBaseURL: 'https://api.digitalocean.com', ...options, headers: buildHeaders([{Accept: '*/*'}, options?.headers]) }); } } @@ -81,5 +78,8 @@ export interface TagRemoveParams { } export declare namespace Tags { - export { type TagAddParams as TagAddParams, type TagRemoveParams as TagRemoveParams }; + export { + type TagAddParams as TagAddParams, + type TagRemoveParams as TagRemoveParams + }; } diff --git a/src/resources/gpu-droplets/floating-ips/actions.ts b/src/resources/gpu-droplets/floating-ips/actions.ts index 472a63c8..e7101656 100644 --- a/src/resources/gpu-droplets/floating-ips/actions.ts +++ b/src/resources/gpu-droplets/floating-ips/actions.ts @@ -6,6 +6,27 @@ import { APIPromise } from '../../../core/api-promise'; import { RequestOptions } from '../../../internal/request-options'; import { path } from '../../../internal/utils/path'; +/** + * As of 16 June 2022, we have renamed the Floating IP product to [Reserved IPs](https://docs.digitalocean.com/reference/api/api-reference/#tag/Reserved-IPs). + * The Reserved IP product's endpoints function the exact same way as Floating IPs. + * The only difference is the name change throughout the URLs and fields. + * For example, the `floating_ips` field is now the `reserved_ips` field. + * The Floating IP endpoints will remain active until fall 2023 before being + * permanently deprecated. + * + * With the exception of the [Projects API](https://docs.digitalocean.com/reference/api/api-reference/#tag/Projects), + * we will reflect this change as an additional field in the responses across the API + * where the `floating_ip` field is used. For example, the Droplet metadata response + * will contain the field `reserved_ips` in addition to the `floating_ips` field. + * Floating IPs retrieved using the Projects API will retain the original name. + * + * Floating IP actions are commands that can be given to a DigitalOcean + * floating IP. These requests are made on the actions endpoint of a specific + * floating IP. + * + * An action object is returned. These objects hold the current status of the + * requested action. + */ export class Actions extends APIResource { /** * To initiate an action on a floating IP send a POST request to @@ -26,16 +47,8 @@ export class Actions extends APIResource { * ); * ``` */ - create( - floatingIP: string, - body: ActionCreateParams, - options?: RequestOptions, - ): APIPromise { - return this._client.post(path`/v2/floating_ips/${floatingIP}/actions`, { - body, - defaultBaseURL: 'https://api.digitalocean.com', - ...options, - }); + create(floatingIP: string, body: ActionCreateParams, options?: RequestOptions): APIPromise { + return this._client.post(path`/v2/floating_ips/${floatingIP}/actions`, { body, defaultBaseURL: 'https://api.digitalocean.com', ...options }); } /** @@ -51,16 +64,9 @@ export class Actions extends APIResource { * ); * ``` */ - retrieve( - actionID: number, - params: ActionRetrieveParams, - options?: RequestOptions, - ): APIPromise { - const { floating_ip } = params; - return this._client.get(path`/v2/floating_ips/${floating_ip}/actions/${actionID}`, { - defaultBaseURL: 'https://api.digitalocean.com', - ...options, - }); + retrieve(actionID: number, params: ActionRetrieveParams, options?: RequestOptions): APIPromise { + const { floating_ip } = params + return this._client.get(path`/v2/floating_ips/${floating_ip}/actions/${actionID}`, { defaultBaseURL: 'https://api.digitalocean.com', ...options }); } /** @@ -76,10 +82,7 @@ export class Actions extends APIResource { * ``` */ list(floatingIP: string, options?: RequestOptions): APIPromise { - return this._client.get(path`/v2/floating_ips/${floatingIP}/actions`, { - defaultBaseURL: 'https://api.digitalocean.com', - ...options, - }); + return this._client.get(path`/v2/floating_ips/${floatingIP}/actions`, { defaultBaseURL: 'https://api.digitalocean.com', ...options }); } } @@ -120,9 +123,7 @@ export interface ActionListResponse { links?: Shared.PageLinks; } -export type ActionCreateParams = - | ActionCreateParams.FloatingIPActionUnassign - | ActionCreateParams.FloatingIPActionAssign; +export type ActionCreateParams = ActionCreateParams.FloatingIPActionUnassign | ActionCreateParams.FloatingIPActionAssign export declare namespace ActionCreateParams { export interface FloatingIPActionUnassign { @@ -158,6 +159,6 @@ export declare namespace Actions { type ActionRetrieveResponse as ActionRetrieveResponse, type ActionListResponse as ActionListResponse, type ActionCreateParams as ActionCreateParams, - type ActionRetrieveParams as ActionRetrieveParams, + type ActionRetrieveParams as ActionRetrieveParams }; } diff --git a/src/resources/gpu-droplets/floating-ips/floating-ips.ts b/src/resources/gpu-droplets/floating-ips/floating-ips.ts index 086c96af..a1a68f62 100644 --- a/src/resources/gpu-droplets/floating-ips/floating-ips.ts +++ b/src/resources/gpu-droplets/floating-ips/floating-ips.ts @@ -3,19 +3,33 @@ import { APIResource } from '../../../core/resource'; import * as Shared from '../../shared'; import * as ActionsAPI from './actions'; -import { - ActionCreateParams, - ActionCreateResponse, - ActionListResponse, - ActionRetrieveParams, - ActionRetrieveResponse, - Actions, -} from './actions'; +import { ActionCreateParams, ActionCreateResponse, ActionListResponse, ActionRetrieveParams, ActionRetrieveResponse, Actions } from './actions'; import { APIPromise } from '../../../core/api-promise'; import { buildHeaders } from '../../../internal/headers'; import { RequestOptions } from '../../../internal/request-options'; import { path } from '../../../internal/utils/path'; +/** + * As of 16 June 2022, we have renamed the Floating IP product to [Reserved IPs](https://docs.digitalocean.com/reference/api/api-reference/#tag/Reserved-IPs). + * The Reserved IP product's endpoints function the exact same way as Floating IPs. + * The only difference is the name change throughout the URLs and fields. + * For example, the `floating_ips` field is now the `reserved_ips` field. + * The Floating IP endpoints will remain active until fall 2023 before being + * permanently deprecated. + * + * With the exception of the [Projects API](https://docs.digitalocean.com/reference/api/api-reference/#tag/Projects), + * we will reflect this change as an additional field in the responses across the API + * where the `floating_ip` field is used. For example, the Droplet metadata response + * will contain the field `reserved_ips` in addition to the `floating_ips` field. + * Floating IPs retrieved using the Projects API will retain the original name. + * + * [DigitalOcean Floating IPs](https://docs.digitalocean.com/products/networking/reserved-ips/) + * are publicly-accessible static IP addresses that can be mapped to one of + * your Droplets. They can be used to create highly available setups or other + * configurations requiring movable addresses. + * + * Floating IPs are bound to a specific region. + */ export class FloatingIPs extends APIResource { actions: ActionsAPI.Actions = new ActionsAPI.Actions(this._client); @@ -38,11 +52,7 @@ export class FloatingIPs extends APIResource { * ``` */ create(body: FloatingIPCreateParams, options?: RequestOptions): APIPromise { - return this._client.post('/v2/floating_ips', { - body, - defaultBaseURL: 'https://api.digitalocean.com', - ...options, - }); + return this._client.post('/v2/floating_ips', { body, defaultBaseURL: 'https://api.digitalocean.com', ...options }); } /** @@ -58,10 +68,7 @@ export class FloatingIPs extends APIResource { * ``` */ retrieve(floatingIP: string, options?: RequestOptions): APIPromise { - return this._client.get(path`/v2/floating_ips/${floatingIP}`, { - defaultBaseURL: 'https://api.digitalocean.com', - ...options, - }); + return this._client.get(path`/v2/floating_ips/${floatingIP}`, { defaultBaseURL: 'https://api.digitalocean.com', ...options }); } /** @@ -74,15 +81,8 @@ export class FloatingIPs extends APIResource { * await client.gpuDroplets.floatingIPs.list(); * ``` */ - list( - query: FloatingIPListParams | null | undefined = {}, - options?: RequestOptions, - ): APIPromise { - return this._client.get('/v2/floating_ips', { - query, - defaultBaseURL: 'https://api.digitalocean.com', - ...options, - }); + list(query: FloatingIPListParams | null | undefined = {}, options?: RequestOptions): APIPromise { + return this._client.get('/v2/floating_ips', { query, defaultBaseURL: 'https://api.digitalocean.com', ...options }); } /** @@ -98,11 +98,7 @@ export class FloatingIPs extends APIResource { * ``` */ delete(floatingIP: string, options?: RequestOptions): APIPromise { - return this._client.delete(path`/v2/floating_ips/${floatingIP}`, { - defaultBaseURL: 'https://api.digitalocean.com', - ...options, - headers: buildHeaders([{ Accept: '*/*' }, options?.headers]), - }); + return this._client.delete(path`/v2/floating_ips/${floatingIP}`, { defaultBaseURL: 'https://api.digitalocean.com', ...options, headers: buildHeaders([{Accept: '*/*'}, options?.headers]) }); } } @@ -146,7 +142,8 @@ export namespace FloatingIP { * The region that the floating IP is reserved to. When you query a floating IP, * the entire region object will be returned. */ - export interface Region extends Shared.Region {} + export interface Region extends Shared.Region { + } } export interface FloatingIPCreateResponse { @@ -178,9 +175,7 @@ export interface FloatingIPListResponse { links?: Shared.PageLinks; } -export type FloatingIPCreateParams = - | FloatingIPCreateParams.AssignToDroplet - | FloatingIPCreateParams.ReserveToRegion; +export type FloatingIPCreateParams = FloatingIPCreateParams.AssignToDroplet | FloatingIPCreateParams.ReserveToRegion export declare namespace FloatingIPCreateParams { export interface AssignToDroplet { @@ -224,7 +219,7 @@ export declare namespace FloatingIPs { type FloatingIPRetrieveResponse as FloatingIPRetrieveResponse, type FloatingIPListResponse as FloatingIPListResponse, type FloatingIPCreateParams as FloatingIPCreateParams, - type FloatingIPListParams as FloatingIPListParams, + type FloatingIPListParams as FloatingIPListParams }; export { @@ -233,6 +228,6 @@ export declare namespace FloatingIPs { type ActionRetrieveResponse as ActionRetrieveResponse, type ActionListResponse as ActionListResponse, type ActionCreateParams as ActionCreateParams, - type ActionRetrieveParams as ActionRetrieveParams, + type ActionRetrieveParams as ActionRetrieveParams }; } diff --git a/src/resources/gpu-droplets/floating-ips/index.ts b/src/resources/gpu-droplets/floating-ips/index.ts index 72642765..b40db85a 100644 --- a/src/resources/gpu-droplets/floating-ips/index.ts +++ b/src/resources/gpu-droplets/floating-ips/index.ts @@ -1,19 +1,4 @@ // File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details. -export { - Actions, - type ActionCreateResponse, - type ActionRetrieveResponse, - type ActionListResponse, - type ActionCreateParams, - type ActionRetrieveParams, -} from './actions'; -export { - FloatingIPs, - type FloatingIP, - type FloatingIPCreateResponse, - type FloatingIPRetrieveResponse, - type FloatingIPListResponse, - type FloatingIPCreateParams, - type FloatingIPListParams, -} from './floating-ips'; +export { Actions, type ActionCreateResponse, type ActionRetrieveResponse, type ActionListResponse, type ActionCreateParams, type ActionRetrieveParams } from './actions';; +export { FloatingIPs, type FloatingIP, type FloatingIPCreateResponse, type FloatingIPRetrieveResponse, type FloatingIPListResponse, type FloatingIPCreateParams, type FloatingIPListParams } from './floating-ips';; diff --git a/src/resources/gpu-droplets/gpu-droplets.ts b/src/resources/gpu-droplets/gpu-droplets.ts index 3fea2db1..938607a5 100644 --- a/src/resources/gpu-droplets/gpu-droplets.ts +++ b/src/resources/gpu-droplets/gpu-droplets.ts @@ -3,58 +3,13 @@ import { APIResource } from '../../core/resource'; import * as Shared from '../shared'; import * as ActionsAPI from './actions'; -import { - ActionBulkInitiateParams, - ActionBulkInitiateResponse, - ActionInitiateParams, - ActionInitiateResponse, - ActionListParams, - ActionListResponse, - ActionRetrieveParams, - ActionRetrieveResponse, - Actions, -} from './actions'; +import { ActionBulkInitiateParams, ActionBulkInitiateResponse, ActionInitiateParams, ActionInitiateResponse, ActionListParams, ActionListResponse, ActionRetrieveParams, ActionRetrieveResponse, Actions } from './actions'; import * as AutoscaleAPI from './autoscale'; -import { - Autoscale, - AutoscaleCreateParams, - AutoscaleCreateResponse, - AutoscaleDeleteDangerousParams, - AutoscaleListHistoryParams, - AutoscaleListHistoryResponse, - AutoscaleListMembersParams, - AutoscaleListMembersResponse, - AutoscaleListParams, - AutoscaleListResponse, - AutoscalePool, - AutoscalePoolDropletTemplate, - AutoscalePoolDynamicConfig, - AutoscalePoolStaticConfig, - AutoscaleRetrieveResponse, - AutoscaleUpdateParams, - AutoscaleUpdateResponse, - CurrentUtilization, -} from './autoscale'; +import { Autoscale, AutoscaleCreateParams, AutoscaleCreateResponse, AutoscaleDeleteDangerousParams, AutoscaleListHistoryParams, AutoscaleListHistoryResponse, AutoscaleListMembersParams, AutoscaleListMembersResponse, AutoscaleListParams, AutoscaleListResponse, AutoscalePool, AutoscalePoolDropletTemplate, AutoscalePoolDynamicConfig, AutoscalePoolStaticConfig, AutoscaleRetrieveResponse, AutoscaleUpdateParams, AutoscaleUpdateResponse, CurrentUtilization } from './autoscale'; import * as BackupsAPI from './backups'; -import { - BackupListParams, - BackupListPoliciesParams, - BackupListPoliciesResponse, - BackupListResponse, - BackupListSupportedPoliciesResponse, - BackupRetrievePolicyResponse, - Backups, -} from './backups'; +import { BackupListParams, BackupListPoliciesParams, BackupListPoliciesResponse, BackupListResponse, BackupListSupportedPoliciesResponse, BackupRetrievePolicyResponse, Backups } from './backups'; import * as DestroyWithAssociatedResourcesAPI from './destroy-with-associated-resources'; -import { - AssociatedResource, - DestroyWithAssociatedResourceCheckStatusResponse, - DestroyWithAssociatedResourceDeleteDangerousParams, - DestroyWithAssociatedResourceDeleteSelectiveParams, - DestroyWithAssociatedResourceListResponse, - DestroyWithAssociatedResources, - DestroyedAssociatedResource, -} from './destroy-with-associated-resources'; +import { AssociatedResource, DestroyWithAssociatedResourceCheckStatusResponse, DestroyWithAssociatedResourceDeleteDangerousParams, DestroyWithAssociatedResourceDeleteSelectiveParams, DestroyWithAssociatedResourceListResponse, DestroyWithAssociatedResources, DestroyedAssociatedResource } from './destroy-with-associated-resources'; import * as SizesAPI from './sizes'; import { SizeListParams, SizeListResponse, Sizes } from './sizes'; import * as SnapshotsAPI from './snapshots'; @@ -62,76 +17,34 @@ import { SnapshotListParams, SnapshotListResponse, SnapshotRetrieveResponse, Sna import * as AccountAPI from './account/account'; import { Account } from './account/account'; import * as FirewallsAPI from './firewalls/firewalls'; -import { - Firewall, - FirewallCreateParams, - FirewallCreateResponse, - FirewallListParams, - FirewallListResponse, - FirewallRetrieveResponse, - FirewallUpdateParams, - FirewallUpdateResponse, - Firewalls, -} from './firewalls/firewalls'; +import { Firewall, FirewallCreateParams, FirewallCreateResponse, FirewallListParams, FirewallListResponse, FirewallRetrieveResponse, FirewallUpdateParams, FirewallUpdateResponse, Firewalls } from './firewalls/firewalls'; import * as FloatingIPsAPI from './floating-ips/floating-ips'; -import { - FloatingIP, - FloatingIPCreateParams, - FloatingIPCreateResponse, - FloatingIPListParams, - FloatingIPListResponse, - FloatingIPRetrieveResponse, - FloatingIPs, -} from './floating-ips/floating-ips'; +import { FloatingIP, FloatingIPCreateParams, FloatingIPCreateResponse, FloatingIPListParams, FloatingIPListResponse, FloatingIPRetrieveResponse, FloatingIPs } from './floating-ips/floating-ips'; import * as ImagesAPI from './images/images'; -import { - ImageCreateParams, - ImageCreateResponse, - ImageListParams, - ImageListResponse, - ImageRetrieveResponse, - ImageUpdateParams, - ImageUpdateResponse, - Images, -} from './images/images'; +import { ImageCreateParams, ImageCreateResponse, ImageListParams, ImageListResponse, ImageRetrieveResponse, ImageUpdateParams, ImageUpdateResponse, Images } from './images/images'; import * as LoadBalancersAPI from './load-balancers/load-balancers'; -import { - Domains, - ForwardingRule, - GlbSettings, - HealthCheck, - LbFirewall, - LoadBalancer, - LoadBalancerCreateParams, - LoadBalancerCreateResponse, - LoadBalancerListParams, - LoadBalancerListResponse, - LoadBalancerRetrieveResponse, - LoadBalancerUpdateParams, - LoadBalancerUpdateResponse, - LoadBalancers, - StickySessions, -} from './load-balancers/load-balancers'; +import { Domains, ForwardingRule, GlbSettings, HealthCheck, LbFirewall, LoadBalancer, LoadBalancerCreateParams, LoadBalancerCreateResponse, LoadBalancerListParams, LoadBalancerListResponse, LoadBalancerRetrieveResponse, LoadBalancerUpdateParams, LoadBalancerUpdateResponse, LoadBalancers, StickySessions } from './load-balancers/load-balancers'; import * as VolumesAPI from './volumes/volumes'; -import { - VolumeCreateParams, - VolumeCreateResponse, - VolumeDeleteByNameParams, - VolumeListParams, - VolumeListResponse, - VolumeRetrieveResponse, - Volumes, -} from './volumes/volumes'; +import { VolumeCreateParams, VolumeCreateResponse, VolumeDeleteByNameParams, VolumeListParams, VolumeListResponse, VolumeRetrieveResponse, Volumes } from './volumes/volumes'; import { APIPromise } from '../../core/api-promise'; import { buildHeaders } from '../../internal/headers'; import { RequestOptions } from '../../internal/request-options'; import { path } from '../../internal/utils/path'; +/** + * A [Droplet](https://docs.digitalocean.com/products/droplets/) is a DigitalOcean + * virtual machine. By sending requests to the Droplet endpoint, you can + * list, create, or delete Droplets. + * + * Some of the attributes will have an object value. The `region` and `image` + * objects will all contain the standard attributes of their associated + * types. Find more information about each of these objects in their + * respective sections. + */ export class GPUDroplets extends APIResource { backups: BackupsAPI.Backups = new BackupsAPI.Backups(this._client); actions: ActionsAPI.Actions = new ActionsAPI.Actions(this._client); - destroyWithAssociatedResources: DestroyWithAssociatedResourcesAPI.DestroyWithAssociatedResources = - new DestroyWithAssociatedResourcesAPI.DestroyWithAssociatedResources(this._client); + destroyWithAssociatedResources: DestroyWithAssociatedResourcesAPI.DestroyWithAssociatedResources = new DestroyWithAssociatedResourcesAPI.DestroyWithAssociatedResources(this._client); autoscale: AutoscaleAPI.Autoscale = new AutoscaleAPI.Autoscale(this._client); firewalls: FirewallsAPI.Firewalls = new FirewallsAPI.Firewalls(this._client); floatingIPs: FloatingIPsAPI.FloatingIPs = new FloatingIPsAPI.FloatingIPs(this._client); @@ -191,11 +104,7 @@ export class GPUDroplets extends APIResource { * ``` */ create(body: GPUDropletCreateParams, options?: RequestOptions): APIPromise { - return this._client.post('/v2/droplets', { - body, - defaultBaseURL: 'https://api.digitalocean.com', - ...options, - }); + return this._client.post('/v2/droplets', { body, defaultBaseURL: 'https://api.digitalocean.com', ...options }); } /** @@ -210,10 +119,7 @@ export class GPUDroplets extends APIResource { * ``` */ retrieve(dropletID: number, options?: RequestOptions): APIPromise { - return this._client.get(path`/v2/droplets/${dropletID}`, { - defaultBaseURL: 'https://api.digitalocean.com', - ...options, - }); + return this._client.get(path`/v2/droplets/${dropletID}`, { defaultBaseURL: 'https://api.digitalocean.com', ...options }); } /** @@ -240,15 +146,8 @@ export class GPUDroplets extends APIResource { * const gpuDroplets = await client.gpuDroplets.list(); * ``` */ - list( - query: GPUDropletListParams | null | undefined = {}, - options?: RequestOptions, - ): APIPromise { - return this._client.get('/v2/droplets', { - query, - defaultBaseURL: 'https://api.digitalocean.com', - ...options, - }); + list(query: GPUDropletListParams | null | undefined = {}, options?: RequestOptions): APIPromise { + return this._client.get('/v2/droplets', { query, defaultBaseURL: 'https://api.digitalocean.com', ...options }); } /** @@ -263,11 +162,7 @@ export class GPUDroplets extends APIResource { * ``` */ delete(dropletID: number, options?: RequestOptions): APIPromise { - return this._client.delete(path`/v2/droplets/${dropletID}`, { - defaultBaseURL: 'https://api.digitalocean.com', - ...options, - headers: buildHeaders([{ Accept: '*/*' }, options?.headers]), - }); + return this._client.delete(path`/v2/droplets/${dropletID}`, { defaultBaseURL: 'https://api.digitalocean.com', ...options, headers: buildHeaders([{Accept: '*/*'}, options?.headers]) }); } /** @@ -288,13 +183,8 @@ export class GPUDroplets extends APIResource { * ``` */ deleteByTag(params: GPUDropletDeleteByTagParams, options?: RequestOptions): APIPromise { - const { tag_name } = params; - return this._client.delete('/v2/droplets', { - query: { tag_name }, - defaultBaseURL: 'https://api.digitalocean.com', - ...options, - headers: buildHeaders([{ Accept: '*/*' }, options?.headers]), - }); + const { tag_name } = params + return this._client.delete('/v2/droplets', { query: { tag_name }, defaultBaseURL: 'https://api.digitalocean.com', ...options, headers: buildHeaders([{Accept: '*/*'}, options?.headers]) }); } /** @@ -312,16 +202,8 @@ export class GPUDroplets extends APIResource { * ); * ``` */ - listFirewalls( - dropletID: number, - query: GPUDropletListFirewallsParams | null | undefined = {}, - options?: RequestOptions, - ): APIPromise { - return this._client.get(path`/v2/droplets/${dropletID}/firewalls`, { - query, - defaultBaseURL: 'https://api.digitalocean.com', - ...options, - }); + listFirewalls(dropletID: number, query: GPUDropletListFirewallsParams | null | undefined = {}, options?: RequestOptions): APIPromise { + return this._client.get(path`/v2/droplets/${dropletID}/firewalls`, { query, defaultBaseURL: 'https://api.digitalocean.com', ...options }); } /** @@ -339,16 +221,8 @@ export class GPUDroplets extends APIResource { * ); * ``` */ - listKernels( - dropletID: number, - query: GPUDropletListKernelsParams | null | undefined = {}, - options?: RequestOptions, - ): APIPromise { - return this._client.get(path`/v2/droplets/${dropletID}/kernels`, { - query, - defaultBaseURL: 'https://api.digitalocean.com', - ...options, - }); + listKernels(dropletID: number, query: GPUDropletListKernelsParams | null | undefined = {}, options?: RequestOptions): APIPromise { + return this._client.get(path`/v2/droplets/${dropletID}/kernels`, { query, defaultBaseURL: 'https://api.digitalocean.com', ...options }); } /** @@ -369,10 +243,7 @@ export class GPUDroplets extends APIResource { * ``` */ listNeighbors(dropletID: number, options?: RequestOptions): APIPromise { - return this._client.get(path`/v2/droplets/${dropletID}/neighbors`, { - defaultBaseURL: 'https://api.digitalocean.com', - ...options, - }); + return this._client.get(path`/v2/droplets/${dropletID}/neighbors`, { defaultBaseURL: 'https://api.digitalocean.com', ...options }); } /** @@ -390,16 +261,8 @@ export class GPUDroplets extends APIResource { * ); * ``` */ - listSnapshots( - dropletID: number, - query: GPUDropletListSnapshotsParams | null | undefined = {}, - options?: RequestOptions, - ): APIPromise { - return this._client.get(path`/v2/droplets/${dropletID}/snapshots`, { - query, - defaultBaseURL: 'https://api.digitalocean.com', - ...options, - }); + listSnapshots(dropletID: number, query: GPUDropletListSnapshotsParams | null | undefined = {}, options?: RequestOptions): APIPromise { + return this._client.get(path`/v2/droplets/${dropletID}/snapshots`, { query, defaultBaseURL: 'https://api.digitalocean.com', ...options }); } } @@ -431,9 +294,7 @@ export interface DropletBackupPolicy { window_length_hours?: number; } -export type GPUDropletCreateResponse = - | GPUDropletCreateResponse.SingleDropletResponse - | GPUDropletCreateResponse.MultipleDropletResponse; +export type GPUDropletCreateResponse = GPUDropletCreateResponse.SingleDropletResponse | GPUDropletCreateResponse.MultipleDropletResponse export namespace GPUDropletCreateResponse { export interface SingleDropletResponse { @@ -556,9 +417,7 @@ export namespace GPUDropletListSnapshotsResponse { } } -export type GPUDropletCreateParams = - | GPUDropletCreateParams.DropletSingleCreate - | GPUDropletCreateParams.DropletMultiCreate; +export type GPUDropletCreateParams = GPUDropletCreateParams.DropletSingleCreate | GPUDropletCreateParams.DropletMultiCreate export declare namespace GPUDropletCreateParams { export interface DropletSingleCreate { @@ -872,7 +731,7 @@ export declare namespace GPUDroplets { type GPUDropletDeleteByTagParams as GPUDropletDeleteByTagParams, type GPUDropletListFirewallsParams as GPUDropletListFirewallsParams, type GPUDropletListKernelsParams as GPUDropletListKernelsParams, - type GPUDropletListSnapshotsParams as GPUDropletListSnapshotsParams, + type GPUDropletListSnapshotsParams as GPUDropletListSnapshotsParams }; export { @@ -882,7 +741,7 @@ export declare namespace GPUDroplets { type BackupListSupportedPoliciesResponse as BackupListSupportedPoliciesResponse, type BackupRetrievePolicyResponse as BackupRetrievePolicyResponse, type BackupListParams as BackupListParams, - type BackupListPoliciesParams as BackupListPoliciesParams, + type BackupListPoliciesParams as BackupListPoliciesParams }; export { @@ -894,7 +753,7 @@ export declare namespace GPUDroplets { type ActionRetrieveParams as ActionRetrieveParams, type ActionListParams as ActionListParams, type ActionBulkInitiateParams as ActionBulkInitiateParams, - type ActionInitiateParams as ActionInitiateParams, + type ActionInitiateParams as ActionInitiateParams }; export { @@ -904,7 +763,7 @@ export declare namespace GPUDroplets { type DestroyWithAssociatedResourceListResponse as DestroyWithAssociatedResourceListResponse, type DestroyWithAssociatedResourceCheckStatusResponse as DestroyWithAssociatedResourceCheckStatusResponse, type DestroyWithAssociatedResourceDeleteDangerousParams as DestroyWithAssociatedResourceDeleteDangerousParams, - type DestroyWithAssociatedResourceDeleteSelectiveParams as DestroyWithAssociatedResourceDeleteSelectiveParams, + type DestroyWithAssociatedResourceDeleteSelectiveParams as DestroyWithAssociatedResourceDeleteSelectiveParams }; export { @@ -925,7 +784,7 @@ export declare namespace GPUDroplets { type AutoscaleListParams as AutoscaleListParams, type AutoscaleDeleteDangerousParams as AutoscaleDeleteDangerousParams, type AutoscaleListHistoryParams as AutoscaleListHistoryParams, - type AutoscaleListMembersParams as AutoscaleListMembersParams, + type AutoscaleListMembersParams as AutoscaleListMembersParams }; export { @@ -937,7 +796,7 @@ export declare namespace GPUDroplets { type FirewallListResponse as FirewallListResponse, type FirewallCreateParams as FirewallCreateParams, type FirewallUpdateParams as FirewallUpdateParams, - type FirewallListParams as FirewallListParams, + type FirewallListParams as FirewallListParams }; export { @@ -947,7 +806,7 @@ export declare namespace GPUDroplets { type FloatingIPRetrieveResponse as FloatingIPRetrieveResponse, type FloatingIPListResponse as FloatingIPListResponse, type FloatingIPCreateParams as FloatingIPCreateParams, - type FloatingIPListParams as FloatingIPListParams, + type FloatingIPListParams as FloatingIPListParams }; export { @@ -958,7 +817,7 @@ export declare namespace GPUDroplets { type ImageListResponse as ImageListResponse, type ImageCreateParams as ImageCreateParams, type ImageUpdateParams as ImageUpdateParams, - type ImageListParams as ImageListParams, + type ImageListParams as ImageListParams }; export { @@ -976,16 +835,20 @@ export declare namespace GPUDroplets { type LoadBalancerListResponse as LoadBalancerListResponse, type LoadBalancerCreateParams as LoadBalancerCreateParams, type LoadBalancerUpdateParams as LoadBalancerUpdateParams, - type LoadBalancerListParams as LoadBalancerListParams, + type LoadBalancerListParams as LoadBalancerListParams }; - export { Sizes as Sizes, type SizeListResponse as SizeListResponse, type SizeListParams as SizeListParams }; + export { + Sizes as Sizes, + type SizeListResponse as SizeListResponse, + type SizeListParams as SizeListParams + }; export { Snapshots as Snapshots, type SnapshotRetrieveResponse as SnapshotRetrieveResponse, type SnapshotListResponse as SnapshotListResponse, - type SnapshotListParams as SnapshotListParams, + type SnapshotListParams as SnapshotListParams }; export { @@ -995,8 +858,10 @@ export declare namespace GPUDroplets { type VolumeListResponse as VolumeListResponse, type VolumeCreateParams as VolumeCreateParams, type VolumeListParams as VolumeListParams, - type VolumeDeleteByNameParams as VolumeDeleteByNameParams, + type VolumeDeleteByNameParams as VolumeDeleteByNameParams }; - export { Account as Account }; + export { + Account as Account + }; } diff --git a/src/resources/gpu-droplets/images/actions.ts b/src/resources/gpu-droplets/images/actions.ts index acdb8f37..0a00395e 100644 --- a/src/resources/gpu-droplets/images/actions.ts +++ b/src/resources/gpu-droplets/images/actions.ts @@ -6,6 +6,14 @@ import { APIPromise } from '../../../core/api-promise'; import { RequestOptions } from '../../../internal/request-options'; import { path } from '../../../internal/utils/path'; +/** + * Image actions are commands that can be given to a DigitalOcean image. In + * general, these requests are made on the actions endpoint of a specific + * image. + * + * An image action object is returned. These objects hold the current status + * of the requested action. + */ export class Actions extends APIResource { /** * The following actions are available on an Image. @@ -30,11 +38,7 @@ export class Actions extends APIResource { * ``` */ create(imageID: number, body: ActionCreateParams, options?: RequestOptions): APIPromise { - return this._client.post(path`/v2/images/${imageID}/actions`, { - body, - defaultBaseURL: 'https://api.digitalocean.com', - ...options, - }); + return this._client.post(path`/v2/images/${imageID}/actions`, { body, defaultBaseURL: 'https://api.digitalocean.com', ...options }); } /** @@ -50,16 +54,9 @@ export class Actions extends APIResource { * ); * ``` */ - retrieve( - actionID: number, - params: ActionRetrieveParams, - options?: RequestOptions, - ): APIPromise { - const { image_id } = params; - return this._client.get(path`/v2/images/${image_id}/actions/${actionID}`, { - defaultBaseURL: 'https://api.digitalocean.com', - ...options, - }); + retrieve(actionID: number, params: ActionRetrieveParams, options?: RequestOptions): APIPromise { + const { image_id } = params + return this._client.get(path`/v2/images/${image_id}/actions/${actionID}`, { defaultBaseURL: 'https://api.digitalocean.com', ...options }); } /** @@ -73,10 +70,7 @@ export class Actions extends APIResource { * ``` */ list(imageID: number, options?: RequestOptions): APIPromise { - return this._client.get(path`/v2/images/${imageID}/actions`, { - defaultBaseURL: 'https://api.digitalocean.com', - ...options, - }); + return this._client.get(path`/v2/images/${imageID}/actions`, { defaultBaseURL: 'https://api.digitalocean.com', ...options }); } } @@ -91,7 +85,7 @@ export interface ActionListResponse { links?: Shared.PageLinks; } -export type ActionCreateParams = ActionCreateParams.ImageActionBase | ActionCreateParams.ImageActionTransfer; +export type ActionCreateParams = ActionCreateParams.ImageActionBase | ActionCreateParams.ImageActionTransfer export declare namespace ActionCreateParams { export interface ImageActionBase { @@ -106,22 +100,7 @@ export declare namespace ActionCreateParams { * The slug identifier for the region where the resource will initially be * available. */ - region: - | 'ams1' - | 'ams2' - | 'ams3' - | 'blr1' - | 'fra1' - | 'lon1' - | 'nyc1' - | 'nyc2' - | 'nyc3' - | 'sfo1' - | 'sfo2' - | 'sfo3' - | 'sgp1' - | 'tor1' - | 'syd1'; + region: 'ams1' | 'ams2' | 'ams3' | 'blr1' | 'fra1' | 'lon1' | 'nyc1' | 'nyc2' | 'nyc3' | 'sfo1' | 'sfo2' | 'sfo3' | 'sgp1' | 'tor1' | 'syd1'; /** * The action to be taken on the image. Can be either `convert` or `transfer`. @@ -141,6 +120,6 @@ export declare namespace Actions { export { type ActionListResponse as ActionListResponse, type ActionCreateParams as ActionCreateParams, - type ActionRetrieveParams as ActionRetrieveParams, + type ActionRetrieveParams as ActionRetrieveParams }; } diff --git a/src/resources/gpu-droplets/images/images.ts b/src/resources/gpu-droplets/images/images.ts index 2127a972..0b7a14f8 100644 --- a/src/resources/gpu-droplets/images/images.ts +++ b/src/resources/gpu-droplets/images/images.ts @@ -9,6 +9,32 @@ import { buildHeaders } from '../../../internal/headers'; import { RequestOptions } from '../../../internal/request-options'; import { path } from '../../../internal/utils/path'; +/** + * A DigitalOcean [image](https://docs.digitalocean.com/products/images/) can be + * used to create a Droplet and may come in a number of flavors. Currently, + * there are five types of images: snapshots, backups, applications, + * distributions, and custom images. + * + * * [Snapshots](https://docs.digitalocean.com/products/snapshots/) provide + * a full copy of an existing Droplet instance taken on demand. + * + * * [Backups](https://docs.digitalocean.com/products/backups/) are similar + * to snapshots but are created automatically at regular intervals when + * enabled for a Droplet. + * + * * [Custom images](https://docs.digitalocean.com/products/custom-images/) + * are Linux-based virtual machine images (raw, qcow2, vhdx, vdi, and vmdk + * formats are supported) that you may upload for use on DigitalOcean. + * + * * Distributions are the public Linux distributions that are available to + * be used as a base to create Droplets. + * + * * Applications, or [1-Click Apps](https://docs.digitalocean.com/products/marketplace/), + * are distributions pre-configured with additional software. + * + * To interact with images, you will generally send requests to the images + * endpoint at /v2/images. + */ export class Images extends APIResource { actions: ActionsAPI.Actions = new ActionsAPI.Actions(this._client); @@ -25,11 +51,7 @@ export class Images extends APIResource { * ``` */ create(body: ImageCreateParams, options?: RequestOptions): APIPromise { - return this._client.post('/v2/images', { - body, - defaultBaseURL: 'https://api.digitalocean.com', - ...options, - }); + return this._client.post('/v2/images', { body, defaultBaseURL: 'https://api.digitalocean.com', ...options }); } /** @@ -42,10 +64,7 @@ export class Images extends APIResource { * ``` */ retrieve(imageID: number | string, options?: RequestOptions): APIPromise { - return this._client.get(path`/v2/images/${imageID}`, { - defaultBaseURL: 'https://api.digitalocean.com', - ...options, - }); + return this._client.get(path`/v2/images/${imageID}`, { defaultBaseURL: 'https://api.digitalocean.com', ...options }); } /** @@ -60,16 +79,8 @@ export class Images extends APIResource { * ); * ``` */ - update( - imageID: number, - body: ImageUpdateParams, - options?: RequestOptions, - ): APIPromise { - return this._client.put(path`/v2/images/${imageID}`, { - body, - defaultBaseURL: 'https://api.digitalocean.com', - ...options, - }); + update(imageID: number, body: ImageUpdateParams, options?: RequestOptions): APIPromise { + return this._client.put(path`/v2/images/${imageID}`, { body, defaultBaseURL: 'https://api.digitalocean.com', ...options }); } /** @@ -112,15 +123,8 @@ export class Images extends APIResource { * const images = await client.gpuDroplets.images.list(); * ``` */ - list( - query: ImageListParams | null | undefined = {}, - options?: RequestOptions, - ): APIPromise { - return this._client.get('/v2/images', { - query, - defaultBaseURL: 'https://api.digitalocean.com', - ...options, - }); + list(query: ImageListParams | null | undefined = {}, options?: RequestOptions): APIPromise { + return this._client.get('/v2/images', { query, defaultBaseURL: 'https://api.digitalocean.com', ...options }); } /** @@ -133,11 +137,7 @@ export class Images extends APIResource { * ``` */ delete(imageID: number, options?: RequestOptions): APIPromise { - return this._client.delete(path`/v2/images/${imageID}`, { - defaultBaseURL: 'https://api.digitalocean.com', - ...options, - headers: buildHeaders([{ Accept: '*/*' }, options?.headers]), - }); + return this._client.delete(path`/v2/images/${imageID}`, { defaultBaseURL: 'https://api.digitalocean.com', ...options, headers: buildHeaders([{Accept: '*/*'}, options?.headers]) }); } } @@ -177,20 +177,7 @@ export interface ImageCreateParams { * `Unknown`. Any other value will be accepted but ignored, and `Unknown` will be * used in its place. */ - distribution?: - | 'Arch Linux' - | 'CentOS' - | 'CoreOS' - | 'Debian' - | 'Fedora' - | 'Fedora Atomic' - | 'FreeBSD' - | 'Gentoo' - | 'openSUSE' - | 'RancherOS' - | 'Rocky Linux' - | 'Ubuntu' - | 'Unknown'; + distribution?: 'Arch Linux' | 'CentOS' | 'CoreOS' | 'Debian' | 'Fedora' | 'Fedora Atomic' | 'FreeBSD' | 'Gentoo' | 'openSUSE' | 'RancherOS' | 'Rocky Linux' | 'Ubuntu' | 'Unknown'; /** * The display name that has been given to an image. This is what is shown in the @@ -202,22 +189,7 @@ export interface ImageCreateParams { * The slug identifier for the region where the resource will initially be * available. */ - region?: - | 'ams1' - | 'ams2' - | 'ams3' - | 'blr1' - | 'fra1' - | 'lon1' - | 'nyc1' - | 'nyc2' - | 'nyc3' - | 'sfo1' - | 'sfo2' - | 'sfo3' - | 'sgp1' - | 'tor1' - | 'syd1'; + region?: 'ams1' | 'ams2' | 'ams3' | 'blr1' | 'fra1' | 'lon1' | 'nyc1' | 'nyc2' | 'nyc3' | 'sfo1' | 'sfo2' | 'sfo3' | 'sgp1' | 'tor1' | 'syd1'; /** * A flat array of tag names as strings to be applied to the resource. Tag names @@ -249,20 +221,7 @@ export interface ImageUpdateParams { * `Unknown`. Any other value will be accepted but ignored, and `Unknown` will be * used in its place. */ - distribution?: - | 'Arch Linux' - | 'CentOS' - | 'CoreOS' - | 'Debian' - | 'Fedora' - | 'Fedora Atomic' - | 'FreeBSD' - | 'Gentoo' - | 'openSUSE' - | 'RancherOS' - | 'Rocky Linux' - | 'Ubuntu' - | 'Unknown'; + distribution?: 'Arch Linux' | 'CentOS' | 'CoreOS' | 'Debian' | 'Fedora' | 'Fedora Atomic' | 'FreeBSD' | 'Gentoo' | 'openSUSE' | 'RancherOS' | 'Rocky Linux' | 'Ubuntu' | 'Unknown'; /** * The display name that has been given to an image. This is what is shown in the @@ -309,13 +268,13 @@ export declare namespace Images { type ImageListResponse as ImageListResponse, type ImageCreateParams as ImageCreateParams, type ImageUpdateParams as ImageUpdateParams, - type ImageListParams as ImageListParams, + type ImageListParams as ImageListParams }; export { Actions as Actions, type ActionListResponse as ActionListResponse, type ActionCreateParams as ActionCreateParams, - type ActionRetrieveParams as ActionRetrieveParams, + type ActionRetrieveParams as ActionRetrieveParams }; } diff --git a/src/resources/gpu-droplets/images/index.ts b/src/resources/gpu-droplets/images/index.ts index b60919e7..d57d0d96 100644 --- a/src/resources/gpu-droplets/images/index.ts +++ b/src/resources/gpu-droplets/images/index.ts @@ -1,18 +1,4 @@ // File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details. -export { - Actions, - type ActionListResponse, - type ActionCreateParams, - type ActionRetrieveParams, -} from './actions'; -export { - Images, - type ImageCreateResponse, - type ImageRetrieveResponse, - type ImageUpdateResponse, - type ImageListResponse, - type ImageCreateParams, - type ImageUpdateParams, - type ImageListParams, -} from './images'; +export { Actions, type ActionListResponse, type ActionCreateParams, type ActionRetrieveParams } from './actions';; +export { Images, type ImageCreateResponse, type ImageRetrieveResponse, type ImageUpdateResponse, type ImageListResponse, type ImageCreateParams, type ImageUpdateParams, type ImageListParams } from './images';; diff --git a/src/resources/gpu-droplets/index.ts b/src/resources/gpu-droplets/index.ts index b7f687e0..83f63d2e 100644 --- a/src/resources/gpu-droplets/index.ts +++ b/src/resources/gpu-droplets/index.ts @@ -1,132 +1,15 @@ // File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details. -export { Account } from './account/index'; -export { - Actions, - type ActionRetrieveResponse, - type ActionListResponse, - type ActionBulkInitiateResponse, - type ActionInitiateResponse, - type ActionRetrieveParams, - type ActionListParams, - type ActionBulkInitiateParams, - type ActionInitiateParams, -} from './actions'; -export { - Autoscale, - type AutoscalePool, - type AutoscalePoolDropletTemplate, - type AutoscalePoolDynamicConfig, - type AutoscalePoolStaticConfig, - type CurrentUtilization, - type AutoscaleCreateResponse, - type AutoscaleRetrieveResponse, - type AutoscaleUpdateResponse, - type AutoscaleListResponse, - type AutoscaleListHistoryResponse, - type AutoscaleListMembersResponse, - type AutoscaleCreateParams, - type AutoscaleUpdateParams, - type AutoscaleListParams, - type AutoscaleDeleteDangerousParams, - type AutoscaleListHistoryParams, - type AutoscaleListMembersParams, -} from './autoscale'; -export { - Backups, - type BackupListResponse, - type BackupListPoliciesResponse, - type BackupListSupportedPoliciesResponse, - type BackupRetrievePolicyResponse, - type BackupListParams, - type BackupListPoliciesParams, -} from './backups'; -export { - DestroyWithAssociatedResources, - type AssociatedResource, - type DestroyedAssociatedResource, - type DestroyWithAssociatedResourceListResponse, - type DestroyWithAssociatedResourceCheckStatusResponse, - type DestroyWithAssociatedResourceDeleteDangerousParams, - type DestroyWithAssociatedResourceDeleteSelectiveParams, -} from './destroy-with-associated-resources'; -export { - Firewalls, - type Firewall, - type FirewallCreateResponse, - type FirewallRetrieveResponse, - type FirewallUpdateResponse, - type FirewallListResponse, - type FirewallCreateParams, - type FirewallUpdateParams, - type FirewallListParams, -} from './firewalls/index'; -export { - FloatingIPs, - type FloatingIP, - type FloatingIPCreateResponse, - type FloatingIPRetrieveResponse, - type FloatingIPListResponse, - type FloatingIPCreateParams, - type FloatingIPListParams, -} from './floating-ips/index'; -export { - GPUDroplets, - type DropletBackupPolicy, - type GPUDropletCreateResponse, - type GPUDropletRetrieveResponse, - type GPUDropletListResponse, - type GPUDropletListFirewallsResponse, - type GPUDropletListKernelsResponse, - type GPUDropletListNeighborsResponse, - type GPUDropletListSnapshotsResponse, - type GPUDropletCreateParams, - type GPUDropletListParams, - type GPUDropletDeleteByTagParams, - type GPUDropletListFirewallsParams, - type GPUDropletListKernelsParams, - type GPUDropletListSnapshotsParams, -} from './gpu-droplets'; -export { - Images, - type ImageCreateResponse, - type ImageRetrieveResponse, - type ImageUpdateResponse, - type ImageListResponse, - type ImageCreateParams, - type ImageUpdateParams, - type ImageListParams, -} from './images/index'; -export { - LoadBalancers, - type Domains, - type ForwardingRule, - type GlbSettings, - type HealthCheck, - type LbFirewall, - type LoadBalancer, - type StickySessions, - type LoadBalancerCreateResponse, - type LoadBalancerRetrieveResponse, - type LoadBalancerUpdateResponse, - type LoadBalancerListResponse, - type LoadBalancerCreateParams, - type LoadBalancerUpdateParams, - type LoadBalancerListParams, -} from './load-balancers/index'; -export { Sizes, type SizeListResponse, type SizeListParams } from './sizes'; -export { - Snapshots, - type SnapshotRetrieveResponse, - type SnapshotListResponse, - type SnapshotListParams, -} from './snapshots'; -export { - Volumes, - type VolumeCreateResponse, - type VolumeRetrieveResponse, - type VolumeListResponse, - type VolumeCreateParams, - type VolumeListParams, - type VolumeDeleteByNameParams, -} from './volumes/index'; +export { Account } from './account/index';; +export { Actions, type ActionRetrieveResponse, type ActionListResponse, type ActionBulkInitiateResponse, type ActionInitiateResponse, type ActionRetrieveParams, type ActionListParams, type ActionBulkInitiateParams, type ActionInitiateParams } from './actions';; +export { Autoscale, type AutoscalePool, type AutoscalePoolDropletTemplate, type AutoscalePoolDynamicConfig, type AutoscalePoolStaticConfig, type CurrentUtilization, type AutoscaleCreateResponse, type AutoscaleRetrieveResponse, type AutoscaleUpdateResponse, type AutoscaleListResponse, type AutoscaleListHistoryResponse, type AutoscaleListMembersResponse, type AutoscaleCreateParams, type AutoscaleUpdateParams, type AutoscaleListParams, type AutoscaleDeleteDangerousParams, type AutoscaleListHistoryParams, type AutoscaleListMembersParams } from './autoscale';; +export { Backups, type BackupListResponse, type BackupListPoliciesResponse, type BackupListSupportedPoliciesResponse, type BackupRetrievePolicyResponse, type BackupListParams, type BackupListPoliciesParams } from './backups';; +export { DestroyWithAssociatedResources, type AssociatedResource, type DestroyedAssociatedResource, type DestroyWithAssociatedResourceListResponse, type DestroyWithAssociatedResourceCheckStatusResponse, type DestroyWithAssociatedResourceDeleteDangerousParams, type DestroyWithAssociatedResourceDeleteSelectiveParams } from './destroy-with-associated-resources';; +export { Firewalls, type Firewall, type FirewallCreateResponse, type FirewallRetrieveResponse, type FirewallUpdateResponse, type FirewallListResponse, type FirewallCreateParams, type FirewallUpdateParams, type FirewallListParams } from './firewalls/index';; +export { FloatingIPs, type FloatingIP, type FloatingIPCreateResponse, type FloatingIPRetrieveResponse, type FloatingIPListResponse, type FloatingIPCreateParams, type FloatingIPListParams } from './floating-ips/index';; +export { GPUDroplets, type DropletBackupPolicy, type GPUDropletCreateResponse, type GPUDropletRetrieveResponse, type GPUDropletListResponse, type GPUDropletListFirewallsResponse, type GPUDropletListKernelsResponse, type GPUDropletListNeighborsResponse, type GPUDropletListSnapshotsResponse, type GPUDropletCreateParams, type GPUDropletListParams, type GPUDropletDeleteByTagParams, type GPUDropletListFirewallsParams, type GPUDropletListKernelsParams, type GPUDropletListSnapshotsParams } from './gpu-droplets';; +export { Images, type ImageCreateResponse, type ImageRetrieveResponse, type ImageUpdateResponse, type ImageListResponse, type ImageCreateParams, type ImageUpdateParams, type ImageListParams } from './images/index';; +export { LoadBalancers, type Domains, type ForwardingRule, type GlbSettings, type HealthCheck, type LbFirewall, type LoadBalancer, type StickySessions, type LoadBalancerCreateResponse, type LoadBalancerRetrieveResponse, type LoadBalancerUpdateResponse, type LoadBalancerListResponse, type LoadBalancerCreateParams, type LoadBalancerUpdateParams, type LoadBalancerListParams } from './load-balancers/index';; +export { Sizes, type SizeListResponse, type SizeListParams } from './sizes';; +export { Snapshots, type SnapshotRetrieveResponse, type SnapshotListResponse, type SnapshotListParams } from './snapshots';; +export { Volumes, type VolumeCreateResponse, type VolumeRetrieveResponse, type VolumeListResponse, type VolumeCreateParams, type VolumeListParams, type VolumeDeleteByNameParams } from './volumes/index';; diff --git a/src/resources/gpu-droplets/load-balancers/droplets.ts b/src/resources/gpu-droplets/load-balancers/droplets.ts index da6ecc1a..8ecf378b 100644 --- a/src/resources/gpu-droplets/load-balancers/droplets.ts +++ b/src/resources/gpu-droplets/load-balancers/droplets.ts @@ -6,6 +6,13 @@ import { buildHeaders } from '../../../internal/headers'; import { RequestOptions } from '../../../internal/request-options'; import { path } from '../../../internal/utils/path'; +/** + * [DigitalOcean Load Balancers](https://docs.digitalocean.com/products/networking/load-balancers/) + * provide a way to distribute traffic across multiple Droplets. By sending + * requests to the `/v2/load_balancers` endpoint, you can list, create, or + * delete load balancers as well as add or remove Droplets, forwarding rules, + * and other configuration details. + */ export class Droplets extends APIResource { /** * To assign a Droplet to a load balancer instance, send a POST request to @@ -28,12 +35,7 @@ export class Droplets extends APIResource { * ``` */ add(lbID: string, body: DropletAddParams, options?: RequestOptions): APIPromise { - return this._client.post(path`/v2/load_balancers/${lbID}/droplets`, { - body, - defaultBaseURL: 'https://api.digitalocean.com', - ...options, - headers: buildHeaders([{ Accept: '*/*' }, options?.headers]), - }); + return this._client.post(path`/v2/load_balancers/${lbID}/droplets`, { body, defaultBaseURL: 'https://api.digitalocean.com', ...options, headers: buildHeaders([{Accept: '*/*'}, options?.headers]) }); } /** @@ -54,12 +56,7 @@ export class Droplets extends APIResource { * ``` */ remove(lbID: string, body: DropletRemoveParams, options?: RequestOptions): APIPromise { - return this._client.delete(path`/v2/load_balancers/${lbID}/droplets`, { - body, - defaultBaseURL: 'https://api.digitalocean.com', - ...options, - headers: buildHeaders([{ Accept: '*/*' }, options?.headers]), - }); + return this._client.delete(path`/v2/load_balancers/${lbID}/droplets`, { body, defaultBaseURL: 'https://api.digitalocean.com', ...options, headers: buildHeaders([{Accept: '*/*'}, options?.headers]) }); } } @@ -78,5 +75,8 @@ export interface DropletRemoveParams { } export declare namespace Droplets { - export { type DropletAddParams as DropletAddParams, type DropletRemoveParams as DropletRemoveParams }; + export { + type DropletAddParams as DropletAddParams, + type DropletRemoveParams as DropletRemoveParams + }; } diff --git a/src/resources/gpu-droplets/load-balancers/forwarding-rules.ts b/src/resources/gpu-droplets/load-balancers/forwarding-rules.ts index 7b463976..b539a4f0 100644 --- a/src/resources/gpu-droplets/load-balancers/forwarding-rules.ts +++ b/src/resources/gpu-droplets/load-balancers/forwarding-rules.ts @@ -7,6 +7,13 @@ import { buildHeaders } from '../../../internal/headers'; import { RequestOptions } from '../../../internal/request-options'; import { path } from '../../../internal/utils/path'; +/** + * [DigitalOcean Load Balancers](https://docs.digitalocean.com/products/networking/load-balancers/) + * provide a way to distribute traffic across multiple Droplets. By sending + * requests to the `/v2/load_balancers` endpoint, you can list, create, or + * delete load balancers as well as add or remove Droplets, forwarding rules, + * and other configuration details. + */ export class ForwardingRules extends APIResource { /** * To add an additional forwarding rule to a load balancer instance, send a POST @@ -36,12 +43,7 @@ export class ForwardingRules extends APIResource { * ``` */ add(lbID: string, body: ForwardingRuleAddParams, options?: RequestOptions): APIPromise { - return this._client.post(path`/v2/load_balancers/${lbID}/forwarding_rules`, { - body, - defaultBaseURL: 'https://api.digitalocean.com', - ...options, - headers: buildHeaders([{ Accept: '*/*' }, options?.headers]), - }); + return this._client.post(path`/v2/load_balancers/${lbID}/forwarding_rules`, { body, defaultBaseURL: 'https://api.digitalocean.com', ...options, headers: buildHeaders([{Accept: '*/*'}, options?.headers]) }); } /** @@ -72,12 +74,7 @@ export class ForwardingRules extends APIResource { * ``` */ remove(lbID: string, body: ForwardingRuleRemoveParams, options?: RequestOptions): APIPromise { - return this._client.delete(path`/v2/load_balancers/${lbID}/forwarding_rules`, { - body, - defaultBaseURL: 'https://api.digitalocean.com', - ...options, - headers: buildHeaders([{ Accept: '*/*' }, options?.headers]), - }); + return this._client.delete(path`/v2/load_balancers/${lbID}/forwarding_rules`, { body, defaultBaseURL: 'https://api.digitalocean.com', ...options, headers: buildHeaders([{Accept: '*/*'}, options?.headers]) }); } } @@ -92,6 +89,6 @@ export interface ForwardingRuleRemoveParams { export declare namespace ForwardingRules { export { type ForwardingRuleAddParams as ForwardingRuleAddParams, - type ForwardingRuleRemoveParams as ForwardingRuleRemoveParams, + type ForwardingRuleRemoveParams as ForwardingRuleRemoveParams }; } diff --git a/src/resources/gpu-droplets/load-balancers/index.ts b/src/resources/gpu-droplets/load-balancers/index.ts index 960651d6..96e21a89 100644 --- a/src/resources/gpu-droplets/load-balancers/index.ts +++ b/src/resources/gpu-droplets/load-balancers/index.ts @@ -1,25 +1,5 @@ // File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details. -export { Droplets, type DropletAddParams, type DropletRemoveParams } from './droplets'; -export { - ForwardingRules, - type ForwardingRuleAddParams, - type ForwardingRuleRemoveParams, -} from './forwarding-rules'; -export { - LoadBalancers, - type Domains, - type ForwardingRule, - type GlbSettings, - type HealthCheck, - type LbFirewall, - type LoadBalancer, - type StickySessions, - type LoadBalancerCreateResponse, - type LoadBalancerRetrieveResponse, - type LoadBalancerUpdateResponse, - type LoadBalancerListResponse, - type LoadBalancerCreateParams, - type LoadBalancerUpdateParams, - type LoadBalancerListParams, -} from './load-balancers'; +export { Droplets, type DropletAddParams, type DropletRemoveParams } from './droplets';; +export { ForwardingRules, type ForwardingRuleAddParams, type ForwardingRuleRemoveParams } from './forwarding-rules';; +export { LoadBalancers, type Domains, type ForwardingRule, type GlbSettings, type HealthCheck, type LbFirewall, type LoadBalancer, type StickySessions, type LoadBalancerCreateResponse, type LoadBalancerRetrieveResponse, type LoadBalancerUpdateResponse, type LoadBalancerListResponse, type LoadBalancerCreateParams, type LoadBalancerUpdateParams, type LoadBalancerListParams } from './load-balancers';; diff --git a/src/resources/gpu-droplets/load-balancers/load-balancers.ts b/src/resources/gpu-droplets/load-balancers/load-balancers.ts index fe65a1dc..20af1c85 100644 --- a/src/resources/gpu-droplets/load-balancers/load-balancers.ts +++ b/src/resources/gpu-droplets/load-balancers/load-balancers.ts @@ -11,6 +11,13 @@ import { buildHeaders } from '../../../internal/headers'; import { RequestOptions } from '../../../internal/request-options'; import { path } from '../../../internal/utils/path'; +/** + * [DigitalOcean Load Balancers](https://docs.digitalocean.com/products/networking/load-balancers/) + * provide a way to distribute traffic across multiple Droplets. By sending + * requests to the `/v2/load_balancers` endpoint, you can list, create, or + * delete load balancers as well as add or remove Droplets, forwarding rules, + * and other configuration details. + */ export class LoadBalancers extends APIResource { droplets: DropletsAPI.Droplets = new DropletsAPI.Droplets(this._client); forwardingRules: ForwardingRulesAPI.ForwardingRules = new ForwardingRulesAPI.ForwardingRules(this._client); @@ -61,11 +68,7 @@ export class LoadBalancers extends APIResource { * ``` */ create(body: LoadBalancerCreateParams, options?: RequestOptions): APIPromise { - return this._client.post('/v2/load_balancers', { - body, - defaultBaseURL: 'https://api.digitalocean.com', - ...options, - }); + return this._client.post('/v2/load_balancers', { body, defaultBaseURL: 'https://api.digitalocean.com', ...options }); } /** @@ -81,10 +84,7 @@ export class LoadBalancers extends APIResource { * ``` */ retrieve(lbID: string, options?: RequestOptions): APIPromise { - return this._client.get(path`/v2/load_balancers/${lbID}`, { - defaultBaseURL: 'https://api.digitalocean.com', - ...options, - }); + return this._client.get(path`/v2/load_balancers/${lbID}`, { defaultBaseURL: 'https://api.digitalocean.com', ...options }); } /** @@ -145,16 +145,8 @@ export class LoadBalancers extends APIResource { * ); * ``` */ - update( - lbID: string, - body: LoadBalancerUpdateParams, - options?: RequestOptions, - ): APIPromise { - return this._client.put(path`/v2/load_balancers/${lbID}`, { - body, - defaultBaseURL: 'https://api.digitalocean.com', - ...options, - }); + update(lbID: string, body: LoadBalancerUpdateParams, options?: RequestOptions): APIPromise { + return this._client.put(path`/v2/load_balancers/${lbID}`, { body, defaultBaseURL: 'https://api.digitalocean.com', ...options }); } /** @@ -167,15 +159,8 @@ export class LoadBalancers extends APIResource { * await client.gpuDroplets.loadBalancers.list(); * ``` */ - list( - query: LoadBalancerListParams | null | undefined = {}, - options?: RequestOptions, - ): APIPromise { - return this._client.get('/v2/load_balancers', { - query, - defaultBaseURL: 'https://api.digitalocean.com', - ...options, - }); + list(query: LoadBalancerListParams | null | undefined = {}, options?: RequestOptions): APIPromise { + return this._client.get('/v2/load_balancers', { query, defaultBaseURL: 'https://api.digitalocean.com', ...options }); } /** @@ -194,11 +179,7 @@ export class LoadBalancers extends APIResource { * ``` */ delete(lbID: string, options?: RequestOptions): APIPromise { - return this._client.delete(path`/v2/load_balancers/${lbID}`, { - defaultBaseURL: 'https://api.digitalocean.com', - ...options, - headers: buildHeaders([{ Accept: '*/*' }, options?.headers]), - }); + return this._client.delete(path`/v2/load_balancers/${lbID}`, { defaultBaseURL: 'https://api.digitalocean.com', ...options, headers: buildHeaders([{Accept: '*/*'}, options?.headers]) }); } /** @@ -216,11 +197,7 @@ export class LoadBalancers extends APIResource { * ``` */ deleteCache(lbID: string, options?: RequestOptions): APIPromise { - return this._client.delete(path`/v2/load_balancers/${lbID}/cache`, { - defaultBaseURL: 'https://api.digitalocean.com', - ...options, - headers: buildHeaders([{ Accept: '*/*' }, options?.headers]), - }); + return this._client.delete(path`/v2/load_balancers/${lbID}/cache`, { defaultBaseURL: 'https://api.digitalocean.com', ...options, headers: buildHeaders([{Accept: '*/*'}, options?.headers]) }); } } @@ -641,9 +618,7 @@ export interface LoadBalancerListResponse { load_balancers?: Array; } -export type LoadBalancerCreateParams = - | LoadBalancerCreateParams.AssignDropletsByID - | LoadBalancerCreateParams.AssignDropletsByTag; +export type LoadBalancerCreateParams = LoadBalancerCreateParams.AssignDropletsByID | LoadBalancerCreateParams.AssignDropletsByTag export declare namespace LoadBalancerCreateParams { export interface AssignDropletsByID { @@ -746,22 +721,7 @@ export declare namespace LoadBalancerCreateParams { * The slug identifier for the region where the resource will initially be * available. */ - region?: - | 'ams1' - | 'ams2' - | 'ams3' - | 'blr1' - | 'fra1' - | 'lon1' - | 'nyc1' - | 'nyc2' - | 'nyc3' - | 'sfo1' - | 'sfo2' - | 'sfo3' - | 'sgp1' - | 'tor1' - | 'syd1'; + region?: 'ams1' | 'ams2' | 'ams3' | 'blr1' | 'fra1' | 'lon1' | 'nyc1' | 'nyc2' | 'nyc3' | 'sfo1' | 'sfo2' | 'sfo3' | 'sgp1' | 'tor1' | 'syd1'; /** * @deprecated This field has been replaced by the `size_unit` field for all @@ -912,22 +872,7 @@ export declare namespace LoadBalancerCreateParams { * The slug identifier for the region where the resource will initially be * available. */ - region?: - | 'ams1' - | 'ams2' - | 'ams3' - | 'blr1' - | 'fra1' - | 'lon1' - | 'nyc1' - | 'nyc2' - | 'nyc3' - | 'sfo1' - | 'sfo2' - | 'sfo3' - | 'sgp1' - | 'tor1' - | 'syd1'; + region?: 'ams1' | 'ams2' | 'ams3' | 'blr1' | 'fra1' | 'lon1' | 'nyc1' | 'nyc2' | 'nyc3' | 'sfo1' | 'sfo2' | 'sfo3' | 'sgp1' | 'tor1' | 'syd1'; /** * @deprecated This field has been replaced by the `size_unit` field for all @@ -990,9 +935,7 @@ export declare namespace LoadBalancerCreateParams { } } -export type LoadBalancerUpdateParams = - | LoadBalancerUpdateParams.AssignDropletsByID - | LoadBalancerUpdateParams.AssignDropletsByTag; +export type LoadBalancerUpdateParams = LoadBalancerUpdateParams.AssignDropletsByID | LoadBalancerUpdateParams.AssignDropletsByTag export declare namespace LoadBalancerUpdateParams { export interface AssignDropletsByID { @@ -1095,22 +1038,7 @@ export declare namespace LoadBalancerUpdateParams { * The slug identifier for the region where the resource will initially be * available. */ - region?: - | 'ams1' - | 'ams2' - | 'ams3' - | 'blr1' - | 'fra1' - | 'lon1' - | 'nyc1' - | 'nyc2' - | 'nyc3' - | 'sfo1' - | 'sfo2' - | 'sfo3' - | 'sgp1' - | 'tor1' - | 'syd1'; + region?: 'ams1' | 'ams2' | 'ams3' | 'blr1' | 'fra1' | 'lon1' | 'nyc1' | 'nyc2' | 'nyc3' | 'sfo1' | 'sfo2' | 'sfo3' | 'sgp1' | 'tor1' | 'syd1'; /** * @deprecated This field has been replaced by the `size_unit` field for all @@ -1261,22 +1189,7 @@ export declare namespace LoadBalancerUpdateParams { * The slug identifier for the region where the resource will initially be * available. */ - region?: - | 'ams1' - | 'ams2' - | 'ams3' - | 'blr1' - | 'fra1' - | 'lon1' - | 'nyc1' - | 'nyc2' - | 'nyc3' - | 'sfo1' - | 'sfo2' - | 'sfo3' - | 'sgp1' - | 'tor1' - | 'syd1'; + region?: 'ams1' | 'ams2' | 'ams3' | 'blr1' | 'fra1' | 'lon1' | 'nyc1' | 'nyc2' | 'nyc3' | 'sfo1' | 'sfo2' | 'sfo3' | 'sgp1' | 'tor1' | 'syd1'; /** * @deprecated This field has been replaced by the `size_unit` field for all @@ -1369,18 +1282,18 @@ export declare namespace LoadBalancers { type LoadBalancerListResponse as LoadBalancerListResponse, type LoadBalancerCreateParams as LoadBalancerCreateParams, type LoadBalancerUpdateParams as LoadBalancerUpdateParams, - type LoadBalancerListParams as LoadBalancerListParams, + type LoadBalancerListParams as LoadBalancerListParams }; export { Droplets as Droplets, type DropletAddParams as DropletAddParams, - type DropletRemoveParams as DropletRemoveParams, + type DropletRemoveParams as DropletRemoveParams }; export { ForwardingRules as ForwardingRules, type ForwardingRuleAddParams as ForwardingRuleAddParams, - type ForwardingRuleRemoveParams as ForwardingRuleRemoveParams, + type ForwardingRuleRemoveParams as ForwardingRuleRemoveParams }; } diff --git a/src/resources/gpu-droplets/sizes.ts b/src/resources/gpu-droplets/sizes.ts index 93fe0afa..d5e38414 100644 --- a/src/resources/gpu-droplets/sizes.ts +++ b/src/resources/gpu-droplets/sizes.ts @@ -5,6 +5,16 @@ import * as Shared from '../shared'; import { APIPromise } from '../../core/api-promise'; import { RequestOptions } from '../../internal/request-options'; +/** + * The sizes objects represent different packages of hardware resources that + * can be used for Droplets. When a Droplet is created, a size must be + * selected so that the correct resources can be allocated. + * + * Each size represents a plan that bundles together specific sets of + * resources. This includes the amount of RAM, the number of virtual CPUs, + * disk space, and transfer. The size object also includes the pricing + * details and the regions that the size is available in. + */ export class Sizes extends APIResource { /** * To list all of available Droplet sizes, send a GET request to `/v2/sizes`. The @@ -17,15 +27,8 @@ export class Sizes extends APIResource { * const sizes = await client.gpuDroplets.sizes.list(); * ``` */ - list( - query: SizeListParams | null | undefined = {}, - options?: RequestOptions, - ): APIPromise { - return this._client.get('/v2/sizes', { - query, - defaultBaseURL: 'https://api.digitalocean.com', - ...options, - }); + list(query: SizeListParams | null | undefined = {}, options?: RequestOptions): APIPromise { + return this._client.get('/v2/sizes', { query, defaultBaseURL: 'https://api.digitalocean.com', ...options }); } } @@ -53,5 +56,8 @@ export interface SizeListParams { } export declare namespace Sizes { - export { type SizeListResponse as SizeListResponse, type SizeListParams as SizeListParams }; + export { + type SizeListResponse as SizeListResponse, + type SizeListParams as SizeListParams + }; } diff --git a/src/resources/gpu-droplets/snapshots.ts b/src/resources/gpu-droplets/snapshots.ts index 8c05b969..3518e2f3 100644 --- a/src/resources/gpu-droplets/snapshots.ts +++ b/src/resources/gpu-droplets/snapshots.ts @@ -7,6 +7,17 @@ import { buildHeaders } from '../../internal/headers'; import { RequestOptions } from '../../internal/request-options'; import { path } from '../../internal/utils/path'; +/** + * [Snapshots](https://docs.digitalocean.com/products/snapshots/) are saved + * instances of a Droplet or a block storage volume, which is reflected in + * the `resource_type` attribute. In order to avoid problems with compressing + * filesystems, each defines a `min_disk_size` attribute which is the minimum + * size of the Droplet or volume disk when creating a new resource from the + * saved snapshot. + * + * To interact with snapshots, you will generally send requests to the + * snapshots endpoint at `/v2/snapshots`. + */ export class Snapshots extends APIResource { /** * To retrieve information about a snapshot, send a GET request to @@ -22,10 +33,7 @@ export class Snapshots extends APIResource { * ``` */ retrieve(snapshotID: number | string, options?: RequestOptions): APIPromise { - return this._client.get(path`/v2/snapshots/${snapshotID}`, { - defaultBaseURL: 'https://api.digitalocean.com', - ...options, - }); + return this._client.get(path`/v2/snapshots/${snapshotID}`, { defaultBaseURL: 'https://api.digitalocean.com', ...options }); } /** @@ -55,15 +63,8 @@ export class Snapshots extends APIResource { * const snapshots = await client.gpuDroplets.snapshots.list(); * ``` */ - list( - query: SnapshotListParams | null | undefined = {}, - options?: RequestOptions, - ): APIPromise { - return this._client.get('/v2/snapshots', { - query, - defaultBaseURL: 'https://api.digitalocean.com', - ...options, - }); + list(query: SnapshotListParams | null | undefined = {}, options?: RequestOptions): APIPromise { + return this._client.get('/v2/snapshots', { query, defaultBaseURL: 'https://api.digitalocean.com', ...options }); } /** @@ -80,11 +81,7 @@ export class Snapshots extends APIResource { * ``` */ delete(snapshotID: number | string, options?: RequestOptions): APIPromise { - return this._client.delete(path`/v2/snapshots/${snapshotID}`, { - defaultBaseURL: 'https://api.digitalocean.com', - ...options, - headers: buildHeaders([{ Accept: '*/*' }, options?.headers]), - }); + return this._client.delete(path`/v2/snapshots/${snapshotID}`, { defaultBaseURL: 'https://api.digitalocean.com', ...options, headers: buildHeaders([{Accept: '*/*'}, options?.headers]) }); } } @@ -124,6 +121,6 @@ export declare namespace Snapshots { export { type SnapshotRetrieveResponse as SnapshotRetrieveResponse, type SnapshotListResponse as SnapshotListResponse, - type SnapshotListParams as SnapshotListParams, + type SnapshotListParams as SnapshotListParams }; } diff --git a/src/resources/gpu-droplets/volumes/actions.ts b/src/resources/gpu-droplets/volumes/actions.ts index f2633303..e41e8ca7 100644 --- a/src/resources/gpu-droplets/volumes/actions.ts +++ b/src/resources/gpu-droplets/volumes/actions.ts @@ -6,6 +6,15 @@ import { APIPromise } from '../../../core/api-promise'; import { RequestOptions } from '../../../internal/request-options'; import { path } from '../../../internal/utils/path'; +/** + * Block storage actions are commands that can be given to a DigitalOcean + * Block Storage Volume. An example would be detaching or attaching a volume + * from a Droplet. These requests are made on the + * `/v2/volumes/$VOLUME_ID/actions` endpoint. + * + * An action object is returned. These objects hold the current status of the + * requested action. + */ export class Actions extends APIResource { /** * To retrieve the status of a volume action, send a GET request to @@ -20,17 +29,9 @@ export class Actions extends APIResource { * ); * ``` */ - retrieve( - actionID: number, - params: ActionRetrieveParams, - options?: RequestOptions, - ): APIPromise { - const { volume_id, ...query } = params; - return this._client.get(path`/v2/volumes/${volume_id}/actions/${actionID}`, { - query, - defaultBaseURL: 'https://api.digitalocean.com', - ...options, - }); + retrieve(actionID: number, params: ActionRetrieveParams, options?: RequestOptions): APIPromise { + const { volume_id, ...query } = params + return this._client.get(path`/v2/volumes/${volume_id}/actions/${actionID}`, { query, defaultBaseURL: 'https://api.digitalocean.com', ...options }); } /** @@ -45,16 +46,8 @@ export class Actions extends APIResource { * ); * ``` */ - list( - volumeID: string, - query: ActionListParams | null | undefined = {}, - options?: RequestOptions, - ): APIPromise { - return this._client.get(path`/v2/volumes/${volumeID}/actions`, { - query, - defaultBaseURL: 'https://api.digitalocean.com', - ...options, - }); + list(volumeID: string, query: ActionListParams | null | undefined = {}, options?: RequestOptions): APIPromise { + return this._client.get(path`/v2/volumes/${volumeID}/actions`, { query, defaultBaseURL: 'https://api.digitalocean.com', ...options }); } /** @@ -109,18 +102,9 @@ export class Actions extends APIResource { * ); * ``` */ - initiateByID( - volumeID: string, - params: ActionInitiateByIDParams, - options?: RequestOptions, - ): APIPromise { - const { page, per_page, ...body } = params; - return this._client.post(path`/v2/volumes/${volumeID}/actions`, { - query: { page, per_page }, - body, - defaultBaseURL: 'https://api.digitalocean.com', - ...options, - }); + initiateByID(volumeID: string, params: ActionInitiateByIDParams, options?: RequestOptions): APIPromise { + const { page, per_page, ...body } = params + return this._client.post(path`/v2/volumes/${volumeID}/actions`, { query: { page, per_page }, body, defaultBaseURL: 'https://api.digitalocean.com', ...options }); } /** @@ -164,17 +148,9 @@ export class Actions extends APIResource { * }); * ``` */ - initiateByName( - params: ActionInitiateByNameParams, - options?: RequestOptions, - ): APIPromise { - const { page, per_page, ...body } = params; - return this._client.post('/v2/volumes/actions', { - query: { page, per_page }, - body, - defaultBaseURL: 'https://api.digitalocean.com', - ...options, - }); + initiateByName(params: ActionInitiateByNameParams, options?: RequestOptions): APIPromise { + const { page, per_page, ...body } = params + return this._client.post('/v2/volumes/actions', { query: { page, per_page }, body, defaultBaseURL: 'https://api.digitalocean.com', ...options }); } } @@ -240,10 +216,7 @@ export interface ActionListParams { per_page?: number; } -export type ActionInitiateByIDParams = - | ActionInitiateByIDParams.VolumeActionPostAttach - | ActionInitiateByIDParams.VolumeActionPostDetach - | ActionInitiateByIDParams.VolumeActionPostResize; +export type ActionInitiateByIDParams = ActionInitiateByIDParams.VolumeActionPostAttach | ActionInitiateByIDParams.VolumeActionPostDetach | ActionInitiateByIDParams.VolumeActionPostResize export declare namespace ActionInitiateByIDParams { export interface VolumeActionPostAttach { @@ -272,22 +245,7 @@ export declare namespace ActionInitiateByIDParams { * Body param: The slug identifier for the region where the resource will initially * be available. */ - region?: - | 'ams1' - | 'ams2' - | 'ams3' - | 'blr1' - | 'fra1' - | 'lon1' - | 'nyc1' - | 'nyc2' - | 'nyc3' - | 'sfo1' - | 'sfo2' - | 'sfo3' - | 'sgp1' - | 'tor1' - | 'syd1'; + region?: 'ams1' | 'ams2' | 'ams3' | 'blr1' | 'fra1' | 'lon1' | 'nyc1' | 'nyc2' | 'nyc3' | 'sfo1' | 'sfo2' | 'sfo3' | 'sgp1' | 'tor1' | 'syd1'; /** * Body param: A flat array of tag names as strings to be applied to the resource. @@ -324,22 +282,7 @@ export declare namespace ActionInitiateByIDParams { * Body param: The slug identifier for the region where the resource will initially * be available. */ - region?: - | 'ams1' - | 'ams2' - | 'ams3' - | 'blr1' - | 'fra1' - | 'lon1' - | 'nyc1' - | 'nyc2' - | 'nyc3' - | 'sfo1' - | 'sfo2' - | 'sfo3' - | 'sgp1' - | 'tor1' - | 'syd1'; + region?: 'ams1' | 'ams2' | 'ams3' | 'blr1' | 'fra1' | 'lon1' | 'nyc1' | 'nyc2' | 'nyc3' | 'sfo1' | 'sfo2' | 'sfo3' | 'sgp1' | 'tor1' | 'syd1'; } export interface VolumeActionPostResize { @@ -367,28 +310,11 @@ export declare namespace ActionInitiateByIDParams { * Body param: The slug identifier for the region where the resource will initially * be available. */ - region?: - | 'ams1' - | 'ams2' - | 'ams3' - | 'blr1' - | 'fra1' - | 'lon1' - | 'nyc1' - | 'nyc2' - | 'nyc3' - | 'sfo1' - | 'sfo2' - | 'sfo3' - | 'sgp1' - | 'tor1' - | 'syd1'; + region?: 'ams1' | 'ams2' | 'ams3' | 'blr1' | 'fra1' | 'lon1' | 'nyc1' | 'nyc2' | 'nyc3' | 'sfo1' | 'sfo2' | 'sfo3' | 'sgp1' | 'tor1' | 'syd1'; } } -export type ActionInitiateByNameParams = - | ActionInitiateByNameParams.VolumeActionPostAttach - | ActionInitiateByNameParams.VolumeActionPostDetach; +export type ActionInitiateByNameParams = ActionInitiateByNameParams.VolumeActionPostAttach | ActionInitiateByNameParams.VolumeActionPostDetach export declare namespace ActionInitiateByNameParams { export interface VolumeActionPostAttach { @@ -417,22 +343,7 @@ export declare namespace ActionInitiateByNameParams { * Body param: The slug identifier for the region where the resource will initially * be available. */ - region?: - | 'ams1' - | 'ams2' - | 'ams3' - | 'blr1' - | 'fra1' - | 'lon1' - | 'nyc1' - | 'nyc2' - | 'nyc3' - | 'sfo1' - | 'sfo2' - | 'sfo3' - | 'sgp1' - | 'tor1' - | 'syd1'; + region?: 'ams1' | 'ams2' | 'ams3' | 'blr1' | 'fra1' | 'lon1' | 'nyc1' | 'nyc2' | 'nyc3' | 'sfo1' | 'sfo2' | 'sfo3' | 'sgp1' | 'tor1' | 'syd1'; /** * Body param: A flat array of tag names as strings to be applied to the resource. @@ -469,22 +380,7 @@ export declare namespace ActionInitiateByNameParams { * Body param: The slug identifier for the region where the resource will initially * be available. */ - region?: - | 'ams1' - | 'ams2' - | 'ams3' - | 'blr1' - | 'fra1' - | 'lon1' - | 'nyc1' - | 'nyc2' - | 'nyc3' - | 'sfo1' - | 'sfo2' - | 'sfo3' - | 'sgp1' - | 'tor1' - | 'syd1'; + region?: 'ams1' | 'ams2' | 'ams3' | 'blr1' | 'fra1' | 'lon1' | 'nyc1' | 'nyc2' | 'nyc3' | 'sfo1' | 'sfo2' | 'sfo3' | 'sgp1' | 'tor1' | 'syd1'; } } @@ -498,6 +394,6 @@ export declare namespace Actions { type ActionRetrieveParams as ActionRetrieveParams, type ActionListParams as ActionListParams, type ActionInitiateByIDParams as ActionInitiateByIDParams, - type ActionInitiateByNameParams as ActionInitiateByNameParams, + type ActionInitiateByNameParams as ActionInitiateByNameParams }; } diff --git a/src/resources/gpu-droplets/volumes/index.ts b/src/resources/gpu-droplets/volumes/index.ts index 8815899c..5a2359e2 100644 --- a/src/resources/gpu-droplets/volumes/index.ts +++ b/src/resources/gpu-droplets/volumes/index.ts @@ -1,31 +1,5 @@ // File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details. -export { - Actions, - type VolumeAction, - type ActionRetrieveResponse, - type ActionListResponse, - type ActionInitiateByIDResponse, - type ActionInitiateByNameResponse, - type ActionRetrieveParams, - type ActionListParams, - type ActionInitiateByIDParams, - type ActionInitiateByNameParams, -} from './actions'; -export { - Snapshots, - type SnapshotCreateResponse, - type SnapshotRetrieveResponse, - type SnapshotListResponse, - type SnapshotCreateParams, - type SnapshotListParams, -} from './snapshots'; -export { - Volumes, - type VolumeCreateResponse, - type VolumeRetrieveResponse, - type VolumeListResponse, - type VolumeCreateParams, - type VolumeListParams, - type VolumeDeleteByNameParams, -} from './volumes'; +export { Actions, type VolumeAction, type ActionRetrieveResponse, type ActionListResponse, type ActionInitiateByIDResponse, type ActionInitiateByNameResponse, type ActionRetrieveParams, type ActionListParams, type ActionInitiateByIDParams, type ActionInitiateByNameParams } from './actions';; +export { Snapshots, type SnapshotCreateResponse, type SnapshotRetrieveResponse, type SnapshotListResponse, type SnapshotCreateParams, type SnapshotListParams } from './snapshots';; +export { Volumes, type VolumeCreateResponse, type VolumeRetrieveResponse, type VolumeListResponse, type VolumeCreateParams, type VolumeListParams, type VolumeDeleteByNameParams } from './volumes';; diff --git a/src/resources/gpu-droplets/volumes/snapshots.ts b/src/resources/gpu-droplets/volumes/snapshots.ts index 873dc62e..b1007395 100644 --- a/src/resources/gpu-droplets/volumes/snapshots.ts +++ b/src/resources/gpu-droplets/volumes/snapshots.ts @@ -7,6 +7,19 @@ import { buildHeaders } from '../../../internal/headers'; import { RequestOptions } from '../../../internal/request-options'; import { path } from '../../../internal/utils/path'; +/** + * [DigitalOcean Block Storage Volumes](https://docs.digitalocean.com/products/volumes/) + * provide expanded storage capacity for your Droplets and can be moved + * between Droplets within a specific region. + * + * Volumes function as raw block devices, meaning they appear to the + * operating system as locally attached storage which can be formatted using + * any file system supported by the OS. They may be created in sizes from + * 1GiB to 16TiB. + * + * By sending requests to the `/v2/volumes` endpoint, you can list, create, or + * delete volumes as well as attach and detach them from Droplets + */ export class Snapshots extends APIResource { /** * To create a snapshot from a volume, sent a POST request to @@ -21,16 +34,8 @@ export class Snapshots extends APIResource { * ); * ``` */ - create( - volumeID: string, - body: SnapshotCreateParams, - options?: RequestOptions, - ): APIPromise { - return this._client.post(path`/v2/volumes/${volumeID}/snapshots`, { - body, - defaultBaseURL: 'https://api.digitalocean.com', - ...options, - }); + create(volumeID: string, body: SnapshotCreateParams, options?: RequestOptions): APIPromise { + return this._client.post(path`/v2/volumes/${volumeID}/snapshots`, { body, defaultBaseURL: 'https://api.digitalocean.com', ...options }); } /** @@ -46,10 +51,7 @@ export class Snapshots extends APIResource { * ``` */ retrieve(snapshotID: string, options?: RequestOptions): APIPromise { - return this._client.get(path`/v2/volumes/snapshots/${snapshotID}`, { - defaultBaseURL: 'https://api.digitalocean.com', - ...options, - }); + return this._client.get(path`/v2/volumes/snapshots/${snapshotID}`, { defaultBaseURL: 'https://api.digitalocean.com', ...options }); } /** @@ -64,16 +66,8 @@ export class Snapshots extends APIResource { * ); * ``` */ - list( - volumeID: string, - query: SnapshotListParams | null | undefined = {}, - options?: RequestOptions, - ): APIPromise { - return this._client.get(path`/v2/volumes/${volumeID}/snapshots`, { - query, - defaultBaseURL: 'https://api.digitalocean.com', - ...options, - }); + list(volumeID: string, query: SnapshotListParams | null | undefined = {}, options?: RequestOptions): APIPromise { + return this._client.get(path`/v2/volumes/${volumeID}/snapshots`, { query, defaultBaseURL: 'https://api.digitalocean.com', ...options }); } /** @@ -91,11 +85,7 @@ export class Snapshots extends APIResource { * ``` */ delete(snapshotID: string, options?: RequestOptions): APIPromise { - return this._client.delete(path`/v2/volumes/snapshots/${snapshotID}`, { - defaultBaseURL: 'https://api.digitalocean.com', - ...options, - headers: buildHeaders([{ Accept: '*/*' }, options?.headers]), - }); + return this._client.delete(path`/v2/volumes/snapshots/${snapshotID}`, { defaultBaseURL: 'https://api.digitalocean.com', ...options, headers: buildHeaders([{Accept: '*/*'}, options?.headers]) }); } } @@ -151,6 +141,6 @@ export declare namespace Snapshots { type SnapshotRetrieveResponse as SnapshotRetrieveResponse, type SnapshotListResponse as SnapshotListResponse, type SnapshotCreateParams as SnapshotCreateParams, - type SnapshotListParams as SnapshotListParams, + type SnapshotListParams as SnapshotListParams }; } diff --git a/src/resources/gpu-droplets/volumes/volumes.ts b/src/resources/gpu-droplets/volumes/volumes.ts index 7b721c7e..a3642e4d 100644 --- a/src/resources/gpu-droplets/volumes/volumes.ts +++ b/src/resources/gpu-droplets/volumes/volumes.ts @@ -3,32 +3,27 @@ import { APIResource } from '../../../core/resource'; import * as Shared from '../../shared'; import * as ActionsAPI from './actions'; -import { - ActionInitiateByIDParams, - ActionInitiateByIDResponse, - ActionInitiateByNameParams, - ActionInitiateByNameResponse, - ActionListParams, - ActionListResponse, - ActionRetrieveParams, - ActionRetrieveResponse, - Actions, - VolumeAction, -} from './actions'; +import { ActionInitiateByIDParams, ActionInitiateByIDResponse, ActionInitiateByNameParams, ActionInitiateByNameResponse, ActionListParams, ActionListResponse, ActionRetrieveParams, ActionRetrieveResponse, Actions, VolumeAction } from './actions'; import * as SnapshotsAPI from './snapshots'; -import { - SnapshotCreateParams, - SnapshotCreateResponse, - SnapshotListParams, - SnapshotListResponse, - SnapshotRetrieveResponse, - Snapshots, -} from './snapshots'; +import { SnapshotCreateParams, SnapshotCreateResponse, SnapshotListParams, SnapshotListResponse, SnapshotRetrieveResponse, Snapshots } from './snapshots'; import { APIPromise } from '../../../core/api-promise'; import { buildHeaders } from '../../../internal/headers'; import { RequestOptions } from '../../../internal/request-options'; import { path } from '../../../internal/utils/path'; +/** + * [DigitalOcean Block Storage Volumes](https://docs.digitalocean.com/products/volumes/) + * provide expanded storage capacity for your Droplets and can be moved + * between Droplets within a specific region. + * + * Volumes function as raw block devices, meaning they appear to the + * operating system as locally attached storage which can be formatted using + * any file system supported by the OS. They may be created in sizes from + * 1GiB to 16TiB. + * + * By sending requests to the `/v2/volumes` endpoint, you can list, create, or + * delete volumes as well as attach and detach them from Droplets + */ export class Volumes extends APIResource { actions: ActionsAPI.Actions = new ActionsAPI.Actions(this._client); snapshots: SnapshotsAPI.Snapshots = new SnapshotsAPI.Snapshots(this._client); @@ -54,11 +49,7 @@ export class Volumes extends APIResource { * ``` */ create(body: VolumeCreateParams, options?: RequestOptions): APIPromise { - return this._client.post('/v2/volumes', { - body, - defaultBaseURL: 'https://api.digitalocean.com', - ...options, - }); + return this._client.post('/v2/volumes', { body, defaultBaseURL: 'https://api.digitalocean.com', ...options }); } /** @@ -73,10 +64,7 @@ export class Volumes extends APIResource { * ``` */ retrieve(volumeID: string, options?: RequestOptions): APIPromise { - return this._client.get(path`/v2/volumes/${volumeID}`, { - defaultBaseURL: 'https://api.digitalocean.com', - ...options, - }); + return this._client.get(path`/v2/volumes/${volumeID}`, { defaultBaseURL: 'https://api.digitalocean.com', ...options }); } /** @@ -109,15 +97,8 @@ export class Volumes extends APIResource { * const volumes = await client.gpuDroplets.volumes.list(); * ``` */ - list( - query: VolumeListParams | null | undefined = {}, - options?: RequestOptions, - ): APIPromise { - return this._client.get('/v2/volumes', { - query, - defaultBaseURL: 'https://api.digitalocean.com', - ...options, - }); + list(query: VolumeListParams | null | undefined = {}, options?: RequestOptions): APIPromise { + return this._client.get('/v2/volumes', { query, defaultBaseURL: 'https://api.digitalocean.com', ...options }); } /** @@ -135,11 +116,7 @@ export class Volumes extends APIResource { * ``` */ delete(volumeID: string, options?: RequestOptions): APIPromise { - return this._client.delete(path`/v2/volumes/${volumeID}`, { - defaultBaseURL: 'https://api.digitalocean.com', - ...options, - headers: buildHeaders([{ Accept: '*/*' }, options?.headers]), - }); + return this._client.delete(path`/v2/volumes/${volumeID}`, { defaultBaseURL: 'https://api.digitalocean.com', ...options, headers: buildHeaders([{Accept: '*/*'}, options?.headers]) }); } /** @@ -155,17 +132,9 @@ export class Volumes extends APIResource { * await client.gpuDroplets.volumes.deleteByName(); * ``` */ - deleteByName( - params: VolumeDeleteByNameParams | null | undefined = {}, - options?: RequestOptions, - ): APIPromise { - const { name, region } = params ?? {}; - return this._client.delete('/v2/volumes', { - query: { name, region }, - defaultBaseURL: 'https://api.digitalocean.com', - ...options, - headers: buildHeaders([{ Accept: '*/*' }, options?.headers]), - }); + deleteByName(params: VolumeDeleteByNameParams | null | undefined = {}, options?: RequestOptions): APIPromise { + const { name, region } = params ?? {} + return this._client.delete('/v2/volumes', { query: { name, region }, defaultBaseURL: 'https://api.digitalocean.com', ...options, headers: buildHeaders([{Accept: '*/*'}, options?.headers]) }); } } @@ -380,7 +349,7 @@ export namespace VolumeListResponse { } } -export type VolumeCreateParams = VolumeCreateParams.VolumesExt4 | VolumeCreateParams.VolumesXfs; +export type VolumeCreateParams = VolumeCreateParams.VolumesExt4 | VolumeCreateParams.VolumesXfs export declare namespace VolumeCreateParams { export interface VolumesExt4 { @@ -395,22 +364,7 @@ export declare namespace VolumeCreateParams { * The slug identifier for the region where the resource will initially be * available. */ - region: - | 'ams1' - | 'ams2' - | 'ams3' - | 'blr1' - | 'fra1' - | 'lon1' - | 'nyc1' - | 'nyc2' - | 'nyc3' - | 'sfo1' - | 'sfo2' - | 'sfo3' - | 'sgp1' - | 'tor1' - | 'syd1'; + region: 'ams1' | 'ams2' | 'ams3' | 'blr1' | 'fra1' | 'lon1' | 'nyc1' | 'nyc2' | 'nyc3' | 'sfo1' | 'sfo2' | 'sfo3' | 'sgp1' | 'tor1' | 'syd1'; /** * The size of the block storage volume in GiB (1024^3). This field does not apply @@ -466,22 +420,7 @@ export declare namespace VolumeCreateParams { * The slug identifier for the region where the resource will initially be * available. */ - region: - | 'ams1' - | 'ams2' - | 'ams3' - | 'blr1' - | 'fra1' - | 'lon1' - | 'nyc1' - | 'nyc2' - | 'nyc3' - | 'sfo1' - | 'sfo2' - | 'sfo3' - | 'sgp1' - | 'tor1' - | 'syd1'; + region: 'ams1' | 'ams2' | 'ams3' | 'blr1' | 'fra1' | 'lon1' | 'nyc1' | 'nyc2' | 'nyc3' | 'sfo1' | 'sfo2' | 'sfo3' | 'sgp1' | 'tor1' | 'syd1'; /** * The size of the block storage volume in GiB (1024^3). This field does not apply @@ -545,22 +484,7 @@ export interface VolumeListParams { /** * The slug identifier for the region where the resource is available. */ - region?: - | 'ams1' - | 'ams2' - | 'ams3' - | 'blr1' - | 'fra1' - | 'lon1' - | 'nyc1' - | 'nyc2' - | 'nyc3' - | 'sfo1' - | 'sfo2' - | 'sfo3' - | 'sgp1' - | 'tor1' - | 'syd1'; + region?: 'ams1' | 'ams2' | 'ams3' | 'blr1' | 'fra1' | 'lon1' | 'nyc1' | 'nyc2' | 'nyc3' | 'sfo1' | 'sfo2' | 'sfo3' | 'sgp1' | 'tor1' | 'syd1'; } export interface VolumeDeleteByNameParams { @@ -572,22 +496,7 @@ export interface VolumeDeleteByNameParams { /** * The slug identifier for the region where the resource is available. */ - region?: - | 'ams1' - | 'ams2' - | 'ams3' - | 'blr1' - | 'fra1' - | 'lon1' - | 'nyc1' - | 'nyc2' - | 'nyc3' - | 'sfo1' - | 'sfo2' - | 'sfo3' - | 'sgp1' - | 'tor1' - | 'syd1'; + region?: 'ams1' | 'ams2' | 'ams3' | 'blr1' | 'fra1' | 'lon1' | 'nyc1' | 'nyc2' | 'nyc3' | 'sfo1' | 'sfo2' | 'sfo3' | 'sgp1' | 'tor1' | 'syd1'; } Volumes.Actions = Actions; @@ -600,7 +509,7 @@ export declare namespace Volumes { type VolumeListResponse as VolumeListResponse, type VolumeCreateParams as VolumeCreateParams, type VolumeListParams as VolumeListParams, - type VolumeDeleteByNameParams as VolumeDeleteByNameParams, + type VolumeDeleteByNameParams as VolumeDeleteByNameParams }; export { @@ -613,7 +522,7 @@ export declare namespace Volumes { type ActionRetrieveParams as ActionRetrieveParams, type ActionListParams as ActionListParams, type ActionInitiateByIDParams as ActionInitiateByIDParams, - type ActionInitiateByNameParams as ActionInitiateByNameParams, + type ActionInitiateByNameParams as ActionInitiateByNameParams }; export { @@ -622,6 +531,6 @@ export declare namespace Volumes { type SnapshotRetrieveResponse as SnapshotRetrieveResponse, type SnapshotListResponse as SnapshotListResponse, type SnapshotCreateParams as SnapshotCreateParams, - type SnapshotListParams as SnapshotListParams, + type SnapshotListParams as SnapshotListParams }; } diff --git a/src/resources/images.ts b/src/resources/images.ts index 47603686..1ab75464 100644 --- a/src/resources/images.ts +++ b/src/resources/images.ts @@ -7,6 +7,9 @@ import { APIPromise } from '../core/api-promise'; import { Stream } from '../core/streaming'; import { RequestOptions } from '../internal/request-options'; +/** + * Generate images from text prompts using various AI models. + */ export class Images extends APIResource { /** * Creates a high-quality image from a text prompt using GPT-IMAGE-1, the latest @@ -21,28 +24,11 @@ export class Images extends APIResource { * }); * ``` */ - generate( - body: ImageGenerateParamsNonStreaming, - options?: RequestOptions, - ): APIPromise; - generate( - body: ImageGenerateParamsStreaming, - options?: RequestOptions, - ): APIPromise>; - generate( - body: ImageGenerateParamsBase, - options?: RequestOptions, - ): APIPromise | ImageGenerateResponse>; - generate( - body: ImageGenerateParams, - options?: RequestOptions, - ): APIPromise | APIPromise> { - return this._client.post('/images/generations', { - body, - defaultBaseURL: '{inferenceEndpoint}/v1', - ...options, - stream: body.stream ?? false, - }) as APIPromise | APIPromise>; + generate(body: ImageGenerateParamsNonStreaming, options?: RequestOptions): APIPromise + generate(body: ImageGenerateParamsStreaming, options?: RequestOptions): APIPromise> + generate(body: ImageGenerateParamsBase, options?: RequestOptions): APIPromise | ImageGenerateResponse> + generate(body: ImageGenerateParams, options?: RequestOptions): APIPromise | APIPromise> { + return this._client.post('/images/generations', { body, defaultBaseURL: 'https://inference.do-ai.run/v1', ...options, stream: body.stream ?? false }) as APIPromise | APIPromise>; } } @@ -142,7 +128,7 @@ export namespace ImageGenerateResponse { } } -export type ImageGenerateParams = ImageGenerateParamsNonStreaming | ImageGenerateParamsStreaming; +export type ImageGenerateParams = ImageGenerateParamsNonStreaming | ImageGenerateParamsStreaming export interface ImageGenerateParamsBase { /** @@ -222,8 +208,8 @@ export interface ImageGenerateParamsBase { } export namespace ImageGenerateParams { - export type ImageGenerateParamsNonStreaming = ImagesAPI.ImageGenerateParamsNonStreaming; - export type ImageGenerateParamsStreaming = ImagesAPI.ImageGenerateParamsStreaming; + export type ImageGenerateParamsNonStreaming = ImagesAPI.ImageGenerateParamsNonStreaming + export type ImageGenerateParamsStreaming = ImagesAPI.ImageGenerateParamsStreaming } export interface ImageGenerateParamsNonStreaming extends ImageGenerateParamsBase { @@ -251,6 +237,6 @@ export declare namespace Images { type ImageGenerateResponse as ImageGenerateResponse, type ImageGenerateParams as ImageGenerateParams, type ImageGenerateParamsNonStreaming as ImageGenerateParamsNonStreaming, - type ImageGenerateParamsStreaming as ImageGenerateParamsStreaming, + type ImageGenerateParamsStreaming as ImageGenerateParamsStreaming }; } diff --git a/src/resources/index.ts b/src/resources/index.ts index bb622ec5..bdb06578 100644 --- a/src/resources/index.ts +++ b/src/resources/index.ts @@ -1,74 +1,17 @@ // File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details. -export * from './shared'; -export { - Agents, - type APIAgent, - type APIAgentAPIKeyInfo, - type APIAgentModel, - type APIAnthropicAPIKeyInfo, - type APIDeploymentVisibility, - type APIOpenAIAPIKeyInfo, - type APIRetrievalMethod, - type APIWorkspace, - type AgentCreateResponse, - type AgentRetrieveResponse, - type AgentUpdateResponse, - type AgentListResponse, - type AgentDeleteResponse, - type AgentRetrieveUsageResponse, - type AgentUpdateStatusResponse, - type AgentCreateParams, - type AgentUpdateParams, - type AgentListParams, - type AgentRetrieveUsageParams, - type AgentUpdateStatusParams, -} from './agents/agents'; -export { Chat } from './chat/chat'; -export { Databases } from './databases/databases'; -export { - GPUDroplets, - type DropletBackupPolicy, - type GPUDropletCreateResponse, - type GPUDropletRetrieveResponse, - type GPUDropletListResponse, - type GPUDropletListFirewallsResponse, - type GPUDropletListKernelsResponse, - type GPUDropletListNeighborsResponse, - type GPUDropletListSnapshotsResponse, - type GPUDropletCreateParams, - type GPUDropletListParams, - type GPUDropletDeleteByTagParams, - type GPUDropletListFirewallsParams, - type GPUDropletListKernelsParams, - type GPUDropletListSnapshotsParams, -} from './gpu-droplets/gpu-droplets'; -export { - Images, - type ImageGenerateResponse, - type ImageGenerateParams, - type ImageGenerateParamsNonStreaming, - type ImageGenerateParamsStreaming, -} from './images'; -export { Inference } from './inference/inference'; -export { - KnowledgeBases, - type APIKnowledgeBase, - type KnowledgeBaseCreateResponse, - type KnowledgeBaseRetrieveResponse, - type KnowledgeBaseUpdateResponse, - type KnowledgeBaseListResponse, - type KnowledgeBaseDeleteResponse, - type KnowledgeBaseCreateParams, - type KnowledgeBaseUpdateParams, - type KnowledgeBaseListParams, -} from './knowledge-bases/knowledge-bases'; -export { - Models, - type APIAgreement, - type APIModel, - type APIModelVersion, - type ModelListResponse, - type ModelListParams, -} from './models/models'; -export { Regions, type RegionListResponse, type RegionListParams } from './regions'; +export * from './shared';; +export { Agents, type APIAgent, type APIAgentAPIKeyInfo, type APIAgentModel, type APIAnthropicAPIKeyInfo, type APIDeploymentVisibility, type APIOpenAIAPIKeyInfo, type APIRetrievalMethod, type APIWorkspace, type AgentCreateResponse, type AgentRetrieveResponse, type AgentUpdateResponse, type AgentListResponse, type AgentDeleteResponse, type AgentRetrieveUsageResponse, type AgentUpdateStatusResponse, type AgentCreateParams, type AgentUpdateParams, type AgentListParams, type AgentRetrieveUsageParams, type AgentUpdateStatusParams } from './agents/agents';; +export { Apps } from './apps/apps';; +export { Billing, type BillingListInsightsResponse, type BillingListInsightsParams } from './billing';; +export { Chat } from './chat/chat';; +export { Databases } from './databases/databases';; +export { GPUDroplets, type DropletBackupPolicy, type GPUDropletCreateResponse, type GPUDropletRetrieveResponse, type GPUDropletListResponse, type GPUDropletListFirewallsResponse, type GPUDropletListKernelsResponse, type GPUDropletListNeighborsResponse, type GPUDropletListSnapshotsResponse, type GPUDropletCreateParams, type GPUDropletListParams, type GPUDropletDeleteByTagParams, type GPUDropletListFirewallsParams, type GPUDropletListKernelsParams, type GPUDropletListSnapshotsParams } from './gpu-droplets/gpu-droplets';; +export { Images, type ImageGenerateResponse, type ImageGenerateParams, type ImageGenerateParamsNonStreaming, type ImageGenerateParamsStreaming } from './images';; +export { Inference } from './inference/inference';; +export { KnowledgeBases, type APIKnowledgeBase, type KnowledgeBaseCreateResponse, type KnowledgeBaseRetrieveResponse, type KnowledgeBaseUpdateResponse, type KnowledgeBaseListResponse, type KnowledgeBaseDeleteResponse, type KnowledgeBaseListIndexingJobsResponse, type KnowledgeBaseCreateParams, type KnowledgeBaseUpdateParams, type KnowledgeBaseListParams } from './knowledge-bases/knowledge-bases';; +export { Models, type APIAgreement, type APIModel, type APIModelVersion, type ModelListResponse, type ModelListParams } from './models/models';; +export { Nfs, type NfCreateResponse, type NfRetrieveResponse, type NfListResponse, type NfInitiateActionResponse, type NfCreateParams, type NfRetrieveParams, type NfListParams, type NfDeleteParams, type NfInitiateActionParams } from './nfs/nfs';; +export { Regions, type RegionListResponse, type RegionListParams } from './regions';; +export { Responses, type ResponseCreateParams, type ResponseCreateParamsNonStreaming, type ResponseCreateParamsStreaming } from './responses';; +export { Retrieve, type RetrieveDocumentsResponse, type RetrieveDocumentsParams } from './retrieve';; diff --git a/src/resources/inference/api-keys.ts b/src/resources/inference/api-keys.ts index ebdb98a0..77f9dfd0 100644 --- a/src/resources/inference/api-keys.ts +++ b/src/resources/inference/api-keys.ts @@ -6,6 +6,9 @@ import { APIPromise } from '../../core/api-promise'; import { RequestOptions } from '../../internal/request-options'; import { path } from '../../internal/utils/path'; +/** + * The API lets you build GPU-powered AI agents with pre-built or custom foundation models, function and agent routes, and RAG pipelines with knowledge bases. + */ export class APIKeys extends APIResource { /** * To create a model API key, send a POST request to `/v2/gen-ai/models/api_keys`. @@ -15,15 +18,8 @@ export class APIKeys extends APIResource { * const apiKey = await client.inference.apiKeys.create(); * ``` */ - create( - body: APIKeyCreateParams | null | undefined = {}, - options?: RequestOptions, - ): APIPromise { - return this._client.post('/v2/gen-ai/models/api_keys', { - body, - defaultBaseURL: 'https://api.digitalocean.com', - ...options, - }); + create(body: APIKeyCreateParams | null | undefined = {}, options?: RequestOptions): APIPromise { + return this._client.post('/v2/gen-ai/models/api_keys', { body, defaultBaseURL: 'https://api.digitalocean.com', ...options }); } /** @@ -37,16 +33,8 @@ export class APIKeys extends APIResource { * ); * ``` */ - update( - apiKeyUuid: string, - body: APIKeyUpdateParams | null | undefined = {}, - options?: RequestOptions, - ): APIPromise { - return this._client.put(path`/v2/gen-ai/models/api_keys/${apiKeyUuid}`, { - body, - defaultBaseURL: 'https://api.digitalocean.com', - ...options, - }); + update(apiKeyUuid: string, body: APIKeyUpdateParams | null | undefined = {}, options?: RequestOptions): APIPromise { + return this._client.put(path`/v2/gen-ai/models/api_keys/${apiKeyUuid}`, { body, defaultBaseURL: 'https://api.digitalocean.com', ...options }); } /** @@ -57,15 +45,8 @@ export class APIKeys extends APIResource { * const apiKeys = await client.inference.apiKeys.list(); * ``` */ - list( - query: APIKeyListParams | null | undefined = {}, - options?: RequestOptions, - ): APIPromise { - return this._client.get('/v2/gen-ai/models/api_keys', { - query, - defaultBaseURL: 'https://api.digitalocean.com', - ...options, - }); + list(query: APIKeyListParams | null | undefined = {}, options?: RequestOptions): APIPromise { + return this._client.get('/v2/gen-ai/models/api_keys', { query, defaultBaseURL: 'https://api.digitalocean.com', ...options }); } /** @@ -80,10 +61,7 @@ export class APIKeys extends APIResource { * ``` */ delete(apiKeyUuid: string, options?: RequestOptions): APIPromise { - return this._client.delete(path`/v2/gen-ai/models/api_keys/${apiKeyUuid}`, { - defaultBaseURL: 'https://api.digitalocean.com', - ...options, - }); + return this._client.delete(path`/v2/gen-ai/models/api_keys/${apiKeyUuid}`, { defaultBaseURL: 'https://api.digitalocean.com', ...options }); } /** @@ -99,10 +77,7 @@ export class APIKeys extends APIResource { * ``` */ updateRegenerate(apiKeyUuid: string, options?: RequestOptions): APIPromise { - return this._client.put(path`/v2/gen-ai/models/api_keys/${apiKeyUuid}/regenerate`, { - defaultBaseURL: 'https://api.digitalocean.com', - ...options, - }); + return this._client.put(path`/v2/gen-ai/models/api_keys/${apiKeyUuid}/regenerate`, { defaultBaseURL: 'https://api.digitalocean.com', ...options }); } } @@ -194,7 +169,7 @@ export interface APIKeyUpdateParams { /** * API key ID */ - body_api_key_uuid?: string; + api_key_uuid?: string; /** * Name @@ -224,6 +199,6 @@ export declare namespace APIKeys { type APIKeyUpdateRegenerateResponse as APIKeyUpdateRegenerateResponse, type APIKeyCreateParams as APIKeyCreateParams, type APIKeyUpdateParams as APIKeyUpdateParams, - type APIKeyListParams as APIKeyListParams, + type APIKeyListParams as APIKeyListParams }; } diff --git a/src/resources/inference/index.ts b/src/resources/inference/index.ts index 0b453d1b..d8237bf8 100644 --- a/src/resources/inference/index.ts +++ b/src/resources/inference/index.ts @@ -1,15 +1,4 @@ // File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details. -export { - APIKeys, - type APIModelAPIKeyInfo, - type APIKeyCreateResponse, - type APIKeyUpdateResponse, - type APIKeyListResponse, - type APIKeyDeleteResponse, - type APIKeyUpdateRegenerateResponse, - type APIKeyCreateParams, - type APIKeyUpdateParams, - type APIKeyListParams, -} from './api-keys'; -export { Inference } from './inference'; +export { APIKeys, type APIModelAPIKeyInfo, type APIKeyCreateResponse, type APIKeyUpdateResponse, type APIKeyListResponse, type APIKeyDeleteResponse, type APIKeyUpdateRegenerateResponse, type APIKeyCreateParams, type APIKeyUpdateParams, type APIKeyListParams } from './api-keys';; +export { Inference } from './inference';; diff --git a/src/resources/inference/inference.ts b/src/resources/inference/inference.ts index 0cd1571f..bacabe51 100644 --- a/src/resources/inference/inference.ts +++ b/src/resources/inference/inference.ts @@ -2,18 +2,7 @@ import { APIResource } from '../../core/resource'; import * as APIKeysAPI from './api-keys'; -import { - APIKeyCreateParams, - APIKeyCreateResponse, - APIKeyDeleteResponse, - APIKeyListParams, - APIKeyListResponse, - APIKeyUpdateParams, - APIKeyUpdateRegenerateResponse, - APIKeyUpdateResponse, - APIKeys, - APIModelAPIKeyInfo, -} from './api-keys'; +import { APIKeyCreateParams, APIKeyCreateResponse, APIKeyDeleteResponse, APIKeyListParams, APIKeyListResponse, APIKeyUpdateParams, APIKeyUpdateRegenerateResponse, APIKeyUpdateResponse, APIKeys, APIModelAPIKeyInfo } from './api-keys'; export class Inference extends APIResource { apiKeys: APIKeysAPI.APIKeys = new APIKeysAPI.APIKeys(this._client); @@ -32,6 +21,6 @@ export declare namespace Inference { type APIKeyUpdateRegenerateResponse as APIKeyUpdateRegenerateResponse, type APIKeyCreateParams as APIKeyCreateParams, type APIKeyUpdateParams as APIKeyUpdateParams, - type APIKeyListParams as APIKeyListParams, + type APIKeyListParams as APIKeyListParams }; } diff --git a/src/resources/knowledge-bases/data-sources.ts b/src/resources/knowledge-bases/data-sources.ts index 73271de3..6d672390 100644 --- a/src/resources/knowledge-bases/data-sources.ts +++ b/src/resources/knowledge-bases/data-sources.ts @@ -7,6 +7,9 @@ import { APIPromise } from '../../core/api-promise'; import { RequestOptions } from '../../internal/request-options'; import { path } from '../../internal/utils/path'; +/** + * The API lets you build GPU-powered AI agents with pre-built or custom foundation models, function and agent routes, and RAG pipelines with knowledge bases. + */ export class DataSources extends APIResource { /** * To add a data source to a knowledge base, send a POST request to @@ -20,16 +23,29 @@ export class DataSources extends APIResource { * ); * ``` */ - create( - knowledgeBaseUuid: string, - body: DataSourceCreateParams | null | undefined = {}, - options?: RequestOptions, - ): APIPromise { - return this._client.post(path`/v2/gen-ai/knowledge_bases/${knowledgeBaseUuid}/data_sources`, { - body, - defaultBaseURL: 'https://api.digitalocean.com', - ...options, - }); + create(knowledgeBaseUuid: string, body: DataSourceCreateParams | null | undefined = {}, options?: RequestOptions): APIPromise { + return this._client.post(path`/v2/gen-ai/knowledge_bases/${knowledgeBaseUuid}/data_sources`, { body, defaultBaseURL: 'https://api.digitalocean.com', ...options }); + } + + /** + * To update a data source (e.g. chunking options), send a PUT request to + * `/v2/gen-ai/knowledge_bases/{knowledge_base_uuid}/data_sources/{data_source_uuid}`. + * + * @example + * ```ts + * const dataSource = + * await client.knowledgeBases.dataSources.update( + * '123e4567-e89b-12d3-a456-426614174000', + * { + * path_knowledge_base_uuid: + * '123e4567-e89b-12d3-a456-426614174000', + * }, + * ); + * ``` + */ + update(dataSourceUuid: string, params: DataSourceUpdateParams, options?: RequestOptions): APIPromise { + const { path_knowledge_base_uuid, ...body } = params + return this._client.put(path`/v2/gen-ai/knowledge_bases/${path_knowledge_base_uuid}/data_sources/${dataSourceUuid}`, { body, defaultBaseURL: 'https://api.digitalocean.com', ...options }); } /** @@ -44,16 +60,8 @@ export class DataSources extends APIResource { * ); * ``` */ - list( - knowledgeBaseUuid: string, - query: DataSourceListParams | null | undefined = {}, - options?: RequestOptions, - ): APIPromise { - return this._client.get(path`/v2/gen-ai/knowledge_bases/${knowledgeBaseUuid}/data_sources`, { - query, - defaultBaseURL: 'https://api.digitalocean.com', - ...options, - }); + list(knowledgeBaseUuid: string, query: DataSourceListParams | null | undefined = {}, options?: RequestOptions): APIPromise { + return this._client.get(path`/v2/gen-ai/knowledge_bases/${knowledgeBaseUuid}/data_sources`, { query, defaultBaseURL: 'https://api.digitalocean.com', ...options }); } /** @@ -72,16 +80,9 @@ export class DataSources extends APIResource { * ); * ``` */ - delete( - dataSourceUuid: string, - params: DataSourceDeleteParams, - options?: RequestOptions, - ): APIPromise { - const { knowledge_base_uuid } = params; - return this._client.delete( - path`/v2/gen-ai/knowledge_bases/${knowledge_base_uuid}/data_sources/${dataSourceUuid}`, - { defaultBaseURL: 'https://api.digitalocean.com', ...options }, - ); + delete(dataSourceUuid: string, params: DataSourceDeleteParams, options?: RequestOptions): APIPromise { + const { knowledge_base_uuid } = params + return this._client.delete(path`/v2/gen-ai/knowledge_bases/${knowledge_base_uuid}/data_sources/${dataSourceUuid}`, { defaultBaseURL: 'https://api.digitalocean.com', ...options }); } /** @@ -94,15 +95,8 @@ export class DataSources extends APIResource { * await client.knowledgeBases.dataSources.createPresignedURLs(); * ``` */ - createPresignedURLs( - body: DataSourceCreatePresignedURLsParams | null | undefined = {}, - options?: RequestOptions, - ): APIPromise { - return this._client.post('/v2/gen-ai/knowledge_bases/data_sources/file_upload_presigned_urls', { - body, - defaultBaseURL: 'https://api.digitalocean.com', - ...options, - }); + createPresignedURLs(body: DataSourceCreatePresignedURLsParams | null | undefined = {}, options?: RequestOptions): APIPromise { + return this._client.post('/v2/gen-ai/knowledge_bases/data_sources/file_upload_presigned_urls', { body, defaultBaseURL: 'https://api.digitalocean.com', ...options }); } } @@ -140,6 +134,22 @@ export interface APIKnowledgeBaseDataSource { */ bucket_name?: string; + /** + * The chunking algorithm to use for processing data sources. + * + * **Note: This feature requires enabling the knowledgebase enhancements feature + * preview flag.** + */ + chunking_algorithm?: 'CHUNKING_ALGORITHM_UNKNOWN' | 'CHUNKING_ALGORITHM_SECTION_BASED' | 'CHUNKING_ALGORITHM_HIERARCHICAL' | 'CHUNKING_ALGORITHM_SEMANTIC' | 'CHUNKING_ALGORITHM_FIXED_LENGTH'; + + /** + * Configuration options for the chunking algorithm. + * + * **Note: This feature requires enabling the knowledgebase enhancements feature + * preview flag.** + */ + chunking_options?: APIKnowledgeBaseDataSource.ChunkingOptions; + /** * Creation date / time */ @@ -155,6 +165,11 @@ export interface APIKnowledgeBaseDataSource { */ file_upload_data_source?: APIFileUploadDataSource; + /** + * Google Drive Data Source for Display + */ + google_drive_data_source?: APIKnowledgeBaseDataSource.GoogleDriveDataSource; + /** * Path of folder or object in bucket - Deprecated, moved to data_source_details */ @@ -162,11 +177,6 @@ export interface APIKnowledgeBaseDataSource { last_datasource_indexing_job?: IndexingJobsAPI.APIIndexedDataSource; - /** - * IndexingJob description - */ - last_indexing_job?: IndexingJobsAPI.APIIndexingJob; - /** * Region code - Deprecated, moved to data_source_details */ @@ -211,12 +221,52 @@ export namespace APIKnowledgeBaseDataSource { region?: string; } + /** + * Configuration options for the chunking algorithm. + * + * **Note: This feature requires enabling the knowledgebase enhancements feature + * preview flag.** + */ + export interface ChunkingOptions { + /** + * Hierarchical options + */ + child_chunk_size?: number; + + /** + * Section_Based and Fixed_Length options + */ + max_chunk_size?: number; + + /** + * Hierarchical options + */ + parent_chunk_size?: number; + + /** + * Semantic options + */ + semantic_threshold?: number; + } + /** * Dropbox Data Source for Display */ export interface DropboxDataSource { folder?: string; } + + /** + * Google Drive Data Source for Display + */ + export interface GoogleDriveDataSource { + folder_id?: string; + + /** + * Name of the selected folder if available + */ + folder_name?: string; + } } /** @@ -253,13 +303,19 @@ export interface APIWebCrawlerDataSource { * - PATH: Crawl the base URL and linked pages within the URL path. * - DOMAIN: Crawl the base URL and linked pages within the same domain. * - SUBDOMAINS: Crawl the base URL and linked pages for any subdomain. + * - SITEMAP: Crawl URLs discovered in the sitemap. */ - crawling_option?: 'UNKNOWN' | 'SCOPED' | 'PATH' | 'DOMAIN' | 'SUBDOMAINS'; + crawling_option?: 'UNKNOWN' | 'SCOPED' | 'PATH' | 'DOMAIN' | 'SUBDOMAINS' | 'SITEMAP'; /** * Whether to ingest and index media (images, etc.) on web pages. */ embed_media?: boolean; + + /** + * Declaring which tags to exclude in web pages while webcrawling + */ + exclude_tags?: Array; } /** @@ -299,6 +355,17 @@ export interface DataSourceCreateResponse { knowledge_base_data_source?: APIKnowledgeBaseDataSource; } +/** + * Update a data source of a knowledge base with change in chunking + * algorithm/options + */ +export interface DataSourceUpdateResponse { + /** + * Data Source configuration for Knowledge Bases + */ + knowledge_base_data_source?: APIKnowledgeBaseDataSource; +} + /** * A list of knowledge base data sources */ @@ -382,10 +449,26 @@ export interface DataSourceCreateParams { */ aws_data_source?: AwsDataSource; + /** + * The chunking algorithm to use for processing data sources. + * + * **Note: This feature requires enabling the knowledgebase enhancements feature + * preview flag.** + */ + chunking_algorithm?: 'CHUNKING_ALGORITHM_UNKNOWN' | 'CHUNKING_ALGORITHM_SECTION_BASED' | 'CHUNKING_ALGORITHM_HIERARCHICAL' | 'CHUNKING_ALGORITHM_SEMANTIC' | 'CHUNKING_ALGORITHM_FIXED_LENGTH'; + + /** + * Configuration options for the chunking algorithm. + * + * **Note: This feature requires enabling the knowledgebase enhancements feature + * preview flag.** + */ + chunking_options?: DataSourceCreateParams.ChunkingOptions; + /** * Knowledge base id */ - body_knowledge_base_uuid?: string; + knowledge_base_uuid?: string; /** * Spaces Bucket Data Source @@ -398,6 +481,99 @@ export interface DataSourceCreateParams { web_crawler_data_source?: APIWebCrawlerDataSource; } +export namespace DataSourceCreateParams { + /** + * Configuration options for the chunking algorithm. + * + * **Note: This feature requires enabling the knowledgebase enhancements feature + * preview flag.** + */ + export interface ChunkingOptions { + /** + * Hierarchical options + */ + child_chunk_size?: number; + + /** + * Section_Based and Fixed_Length options + */ + max_chunk_size?: number; + + /** + * Hierarchical options + */ + parent_chunk_size?: number; + + /** + * Semantic options + */ + semantic_threshold?: number; + } +} + +export interface DataSourceUpdateParams { + /** + * Path param: Knowledge Base ID (Path Parameter) + */ + path_knowledge_base_uuid: string; + + /** + * Body param: The chunking algorithm to use for processing data sources. + * + * **Note: This feature requires enabling the knowledgebase enhancements feature + * preview flag.** + */ + chunking_algorithm?: 'CHUNKING_ALGORITHM_UNKNOWN' | 'CHUNKING_ALGORITHM_SECTION_BASED' | 'CHUNKING_ALGORITHM_HIERARCHICAL' | 'CHUNKING_ALGORITHM_SEMANTIC' | 'CHUNKING_ALGORITHM_FIXED_LENGTH'; + + /** + * Body param: Configuration options for the chunking algorithm. + * + * **Note: This feature requires enabling the knowledgebase enhancements feature + * preview flag.** + */ + chunking_options?: DataSourceUpdateParams.ChunkingOptions; + + /** + * Body param: Data Source ID (Path Parameter) + */ + data_source_uuid?: string; + + /** + * Body param: Knowledge Base ID (Path Parameter) + */ + body_knowledge_base_uuid?: string; +} + +export namespace DataSourceUpdateParams { + /** + * Configuration options for the chunking algorithm. + * + * **Note: This feature requires enabling the knowledgebase enhancements feature + * preview flag.** + */ + export interface ChunkingOptions { + /** + * Hierarchical options + */ + child_chunk_size?: number; + + /** + * Section_Based and Fixed_Length options + */ + max_chunk_size?: number; + + /** + * Hierarchical options + */ + parent_chunk_size?: number; + + /** + * Semantic options + */ + semantic_threshold?: number; + } +} + export interface DataSourceListParams { /** * Page number. @@ -449,12 +625,14 @@ export declare namespace DataSources { type APIWebCrawlerDataSource as APIWebCrawlerDataSource, type AwsDataSource as AwsDataSource, type DataSourceCreateResponse as DataSourceCreateResponse, + type DataSourceUpdateResponse as DataSourceUpdateResponse, type DataSourceListResponse as DataSourceListResponse, type DataSourceDeleteResponse as DataSourceDeleteResponse, type DataSourceCreatePresignedURLsResponse as DataSourceCreatePresignedURLsResponse, type DataSourceCreateParams as DataSourceCreateParams, + type DataSourceUpdateParams as DataSourceUpdateParams, type DataSourceListParams as DataSourceListParams, type DataSourceDeleteParams as DataSourceDeleteParams, - type DataSourceCreatePresignedURLsParams as DataSourceCreatePresignedURLsParams, + type DataSourceCreatePresignedURLsParams as DataSourceCreatePresignedURLsParams }; } diff --git a/src/resources/knowledge-bases/index.ts b/src/resources/knowledge-bases/index.ts index f64b0d24..5092569a 100644 --- a/src/resources/knowledge-bases/index.ts +++ b/src/resources/knowledge-bases/index.ts @@ -1,43 +1,5 @@ // File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details. -export { - DataSources, - type APIFileUploadDataSource, - type APIKnowledgeBaseDataSource, - type APISpacesDataSource, - type APIWebCrawlerDataSource, - type AwsDataSource, - type DataSourceCreateResponse, - type DataSourceListResponse, - type DataSourceDeleteResponse, - type DataSourceCreatePresignedURLsResponse, - type DataSourceCreateParams, - type DataSourceListParams, - type DataSourceDeleteParams, - type DataSourceCreatePresignedURLsParams, -} from './data-sources'; -export { - IndexingJobs, - type APIIndexedDataSource, - type APIIndexingJob, - type IndexingJobCreateResponse, - type IndexingJobRetrieveResponse, - type IndexingJobListResponse, - type IndexingJobRetrieveDataSourcesResponse, - type IndexingJobUpdateCancelResponse, - type IndexingJobCreateParams, - type IndexingJobListParams, - type IndexingJobUpdateCancelParams, -} from './indexing-jobs'; -export { - KnowledgeBases, - type APIKnowledgeBase, - type KnowledgeBaseCreateResponse, - type KnowledgeBaseRetrieveResponse, - type KnowledgeBaseUpdateResponse, - type KnowledgeBaseListResponse, - type KnowledgeBaseDeleteResponse, - type KnowledgeBaseCreateParams, - type KnowledgeBaseUpdateParams, - type KnowledgeBaseListParams, -} from './knowledge-bases'; +export { DataSources, type APIFileUploadDataSource, type APIKnowledgeBaseDataSource, type APISpacesDataSource, type APIWebCrawlerDataSource, type AwsDataSource, type DataSourceCreateResponse, type DataSourceUpdateResponse, type DataSourceListResponse, type DataSourceDeleteResponse, type DataSourceCreatePresignedURLsResponse, type DataSourceCreateParams, type DataSourceUpdateParams, type DataSourceListParams, type DataSourceDeleteParams, type DataSourceCreatePresignedURLsParams } from './data-sources';; +export { IndexingJobs, type APIIndexedDataSource, type APIIndexingJob, type IndexingJobCreateResponse, type IndexingJobRetrieveResponse, type IndexingJobListResponse, type IndexingJobRetrieveDataSourcesResponse, type IndexingJobRetrieveSignedURLResponse, type IndexingJobUpdateCancelResponse, type IndexingJobCreateParams, type IndexingJobListParams, type IndexingJobUpdateCancelParams } from './indexing-jobs';; +export { KnowledgeBases, type APIKnowledgeBase, type KnowledgeBaseCreateResponse, type KnowledgeBaseRetrieveResponse, type KnowledgeBaseUpdateResponse, type KnowledgeBaseListResponse, type KnowledgeBaseDeleteResponse, type KnowledgeBaseListIndexingJobsResponse, type KnowledgeBaseCreateParams, type KnowledgeBaseUpdateParams, type KnowledgeBaseListParams } from './knowledge-bases';; diff --git a/src/resources/knowledge-bases/indexing-jobs.ts b/src/resources/knowledge-bases/indexing-jobs.ts index 657f7d8d..87839ec9 100644 --- a/src/resources/knowledge-bases/indexing-jobs.ts +++ b/src/resources/knowledge-bases/indexing-jobs.ts @@ -65,6 +65,9 @@ export class IndexingJobTimeoutError extends Error { } } +/** + * The API lets you build GPU-powered AI agents with pre-built or custom foundation models, function and agent routes, and RAG pipelines with knowledge bases. + */ export class IndexingJobs extends APIResource { /** * To start an indexing job for a knowledge base, send a POST request to @@ -149,6 +152,28 @@ export class IndexingJobs extends APIResource { }); } + /** + * To get a signed URL for indexing job details, send a GET request to + * `/v2/gen-ai/indexing_jobs/{uuid}/details_signed_url`. + * + * @example + * ```ts + * const response = + * await client.knowledgeBases.indexingJobs.retrieveSignedURL( + * '"123e4567-e89b-12d3-a456-426614174000"', + * ); + * ``` + */ + retrieveSignedURL( + indexingJobUuid: string, + options?: RequestOptions, + ): APIPromise { + return this._client.get(path`/v2/gen-ai/indexing_jobs/${indexingJobUuid}/details_signed_url`, { + defaultBaseURL: 'https://api.digitalocean.com', + ...options, + }); + } + /** * To cancel an indexing job for a knowledge base, send a PUT request to * `/v2/gen-ai/indexing_jobs/{uuid}/cancel`. @@ -162,11 +187,11 @@ export class IndexingJobs extends APIResource { * ``` */ updateCancel( - pathUuid: string, + uuid: string, body: IndexingJobUpdateCancelParams | null | undefined = {}, options?: RequestOptions, ): APIPromise { - return this._client.put(path`/v2/gen-ai/indexing_jobs/${pathUuid}/cancel`, { + return this._client.put(path`/v2/gen-ai/indexing_jobs/${uuid}/cancel`, { body, defaultBaseURL: 'https://api.digitalocean.com', ...options, @@ -355,7 +380,8 @@ export interface APIIndexedDataSource { | 'DATA_SOURCE_STATUS_UPDATED' | 'DATA_SOURCE_STATUS_PARTIALLY_UPDATED' | 'DATA_SOURCE_STATUS_NOT_UPDATED' - | 'DATA_SOURCE_STATUS_FAILED'; + | 'DATA_SOURCE_STATUS_FAILED' + | 'DATA_SOURCE_STATUS_CANCELLED'; /** * Total size of files in data source in bytes @@ -387,10 +413,20 @@ export interface APIIndexingJob { */ created_at?: string; + /** + * Details on Data Sources included in the Indexing Job + */ + data_source_jobs?: Array; + data_source_uuids?: Array; finished_at?: string; + /** + * Boolean value to determine if the indexing job details are available + */ + is_report_available?: boolean; + /** * Knowledge base id */ @@ -414,10 +450,11 @@ export interface APIIndexingJob { | 'INDEX_JOB_STATUS_COMPLETED' | 'INDEX_JOB_STATUS_FAILED' | 'INDEX_JOB_STATUS_NO_CHANGES' - | 'INDEX_JOB_STATUS_PENDING'; + | 'INDEX_JOB_STATUS_PENDING' + | 'INDEX_JOB_STATUS_CANCELLED'; /** - * Number of tokens + * Number of tokens [This field is deprecated] */ tokens?: number; @@ -427,19 +464,9 @@ export interface APIIndexingJob { total_datasources?: number; /** - * Total Items Failed - */ - total_items_failed?: string; - - /** - * Total Items Indexed + * Total Tokens Consumed By the Indexing Job */ - total_items_indexed?: string; - - /** - * Total Items Skipped - */ - total_items_skipped?: string; + total_tokens?: string; /** * Last modified @@ -496,6 +523,13 @@ export interface IndexingJobRetrieveDataSourcesResponse { indexed_data_sources?: Array; } +export interface IndexingJobRetrieveSignedURLResponse { + /** + * The signed url for downloading the indexing job details + */ + signed_url?: string; +} + /** * CancelKnowledgeBaseIndexingJobOutput description */ @@ -535,7 +569,7 @@ export interface IndexingJobUpdateCancelParams { /** * A unique identifier for an indexing job. */ - body_uuid?: string; + uuid?: string; } export declare namespace IndexingJobs { @@ -546,6 +580,7 @@ export declare namespace IndexingJobs { type IndexingJobRetrieveResponse as IndexingJobRetrieveResponse, type IndexingJobListResponse as IndexingJobListResponse, type IndexingJobRetrieveDataSourcesResponse as IndexingJobRetrieveDataSourcesResponse, + type IndexingJobRetrieveSignedURLResponse as IndexingJobRetrieveSignedURLResponse, type IndexingJobUpdateCancelResponse as IndexingJobUpdateCancelResponse, type IndexingJobCreateParams as IndexingJobCreateParams, type IndexingJobListParams as IndexingJobListParams, diff --git a/src/resources/knowledge-bases/knowledge-bases.ts b/src/resources/knowledge-bases/knowledge-bases.ts index f5f1d5ce..e760816f 100644 --- a/src/resources/knowledge-bases/knowledge-bases.ts +++ b/src/resources/knowledge-bases/knowledge-bases.ts @@ -3,36 +3,9 @@ import { APIResource } from '../../core/resource'; import * as Shared from '../shared'; import * as DataSourcesAPI from './data-sources'; -import { - APIFileUploadDataSource, - APIKnowledgeBaseDataSource, - APISpacesDataSource, - APIWebCrawlerDataSource, - AwsDataSource, - DataSourceCreateParams, - DataSourceCreatePresignedURLsParams, - DataSourceCreatePresignedURLsResponse, - DataSourceCreateResponse, - DataSourceDeleteParams, - DataSourceDeleteResponse, - DataSourceListParams, - DataSourceListResponse, - DataSources, -} from './data-sources'; +import { APIFileUploadDataSource, APIKnowledgeBaseDataSource, APISpacesDataSource, APIWebCrawlerDataSource, AwsDataSource, DataSourceCreateParams, DataSourceCreatePresignedURLsParams, DataSourceCreatePresignedURLsResponse, DataSourceCreateResponse, DataSourceDeleteParams, DataSourceDeleteResponse, DataSourceListParams, DataSourceListResponse, DataSourceUpdateParams, DataSourceUpdateResponse, DataSources } from './data-sources'; import * as IndexingJobsAPI from './indexing-jobs'; -import { - APIIndexedDataSource, - APIIndexingJob, - IndexingJobCreateParams, - IndexingJobCreateResponse, - IndexingJobListParams, - IndexingJobListResponse, - IndexingJobRetrieveDataSourcesResponse, - IndexingJobRetrieveResponse, - IndexingJobUpdateCancelParams, - IndexingJobUpdateCancelResponse, - IndexingJobs, -} from './indexing-jobs'; +import { APIIndexedDataSource, APIIndexingJob, IndexingJobCreateParams, IndexingJobCreateResponse, IndexingJobListParams, IndexingJobListResponse, IndexingJobRetrieveDataSourcesResponse, IndexingJobRetrieveResponse, IndexingJobRetrieveSignedURLResponse, IndexingJobUpdateCancelParams, IndexingJobUpdateCancelResponse, IndexingJobs } from './indexing-jobs'; import { APIPromise } from '../../core/api-promise'; import { RequestOptions } from '../../internal/request-options'; import { path } from '../../internal/utils/path'; @@ -143,6 +116,9 @@ export class WaitForDatabaseFailedError extends GradientError { * @throws Error - If the operation is aborted via AbortSignal */ +/** + * The API lets you build GPU-powered AI agents with pre-built or custom foundation models, function and agent routes, and RAG pipelines with knowledge bases. + */ export class KnowledgeBases extends APIResource { dataSources: DataSourcesAPI.DataSources = new DataSourcesAPI.DataSources(this._client); indexingJobs: IndexingJobsAPI.IndexingJobs = new IndexingJobsAPI.IndexingJobs(this._client); @@ -155,15 +131,8 @@ export class KnowledgeBases extends APIResource { * const knowledgeBase = await client.knowledgeBases.create(); * ``` */ - create( - body: KnowledgeBaseCreateParams | null | undefined = {}, - options?: RequestOptions, - ): APIPromise { - return this._client.post('/v2/gen-ai/knowledge_bases', { - body, - defaultBaseURL: 'https://api.digitalocean.com', - ...options, - }); + create(body: KnowledgeBaseCreateParams | null | undefined = {}, options?: RequestOptions): APIPromise { + return this._client.post('/v2/gen-ai/knowledge_bases', { body, defaultBaseURL: 'https://api.digitalocean.com', ...options }); } /** @@ -178,10 +147,7 @@ export class KnowledgeBases extends APIResource { * ``` */ retrieve(uuid: string, options?: RequestOptions): APIPromise { - return this._client.get(path`/v2/gen-ai/knowledge_bases/${uuid}`, { - defaultBaseURL: 'https://api.digitalocean.com', - ...options, - }); + return this._client.get(path`/v2/gen-ai/knowledge_bases/${uuid}`, { defaultBaseURL: 'https://api.digitalocean.com', ...options }); } /** @@ -195,16 +161,8 @@ export class KnowledgeBases extends APIResource { * ); * ``` */ - update( - pathUuid: string, - body: KnowledgeBaseUpdateParams | null | undefined = {}, - options?: RequestOptions, - ): APIPromise { - return this._client.put(path`/v2/gen-ai/knowledge_bases/${pathUuid}`, { - body, - defaultBaseURL: 'https://api.digitalocean.com', - ...options, - }); + update(uuid: string, body: KnowledgeBaseUpdateParams | null | undefined = {}, options?: RequestOptions): APIPromise { + return this._client.put(path`/v2/gen-ai/knowledge_bases/${uuid}`, { body, defaultBaseURL: 'https://api.digitalocean.com', ...options }); } /** @@ -215,15 +173,8 @@ export class KnowledgeBases extends APIResource { * const knowledgeBases = await client.knowledgeBases.list(); * ``` */ - list( - query: KnowledgeBaseListParams | null | undefined = {}, - options?: RequestOptions, - ): APIPromise { - return this._client.get('/v2/gen-ai/knowledge_bases', { - query, - defaultBaseURL: 'https://api.digitalocean.com', - ...options, - }); + list(query: KnowledgeBaseListParams | null | undefined = {}, options?: RequestOptions): APIPromise { + return this._client.get('/v2/gen-ai/knowledge_bases', { query, defaultBaseURL: 'https://api.digitalocean.com', ...options }); } /** @@ -238,10 +189,7 @@ export class KnowledgeBases extends APIResource { * ``` */ delete(uuid: string, options?: RequestOptions): APIPromise { - return this._client.delete(path`/v2/gen-ai/knowledge_bases/${uuid}`, { - defaultBaseURL: 'https://api.digitalocean.com', - ...options, - }); + return this._client.delete(path`/v2/gen-ai/knowledge_bases/${uuid}`, { defaultBaseURL: 'https://api.digitalocean.com', ...options }); } /** @@ -334,6 +282,22 @@ export class KnowledgeBases extends APIResource { } } } + + /** + * To list latest 15 indexing jobs for a knowledge base, send a GET request to + * `/v2/gen-ai/knowledge_bases/{knowledge_base_uuid}/indexing_jobs`. + * + * @example + * ```ts + * const response = + * await client.knowledgeBases.listIndexingJobs( + * '"123e4567-e89b-12d3-a456-426614174000"', + * ); + * ``` + */ + listIndexingJobs(knowledgeBaseUuid: string, options?: RequestOptions): APIPromise { + return this._client.get(path`/v2/gen-ai/knowledge_bases/${knowledgeBaseUuid}/indexing_jobs`, { defaultBaseURL: 'https://api.digitalocean.com', ...options }); + } } /** @@ -411,19 +375,7 @@ export interface KnowledgeBaseCreateResponse { * The knowledge base */ export interface KnowledgeBaseRetrieveResponse { - database_status?: - | 'CREATING' - | 'ONLINE' - | 'POWEROFF' - | 'REBUILDING' - | 'REBALANCING' - | 'DECOMMISSIONED' - | 'FORKING' - | 'MIGRATING' - | 'RESIZING' - | 'RESTORING' - | 'POWERING_ON' - | 'UNHEALTHY'; + database_status?: 'CREATING' | 'ONLINE' | 'POWEROFF' | 'REBUILDING' | 'REBALANCING' | 'DECOMMISSIONED' | 'FORKING' | 'MIGRATING' | 'RESIZING' | 'RESTORING' | 'POWERING_ON' | 'UNHEALTHY'; /** * Knowledgebase Description @@ -471,6 +423,26 @@ export interface KnowledgeBaseDeleteResponse { uuid?: string; } +/** + * Indexing jobs + */ +export interface KnowledgeBaseListIndexingJobsResponse { + /** + * The indexing jobs + */ + jobs?: Array; + + /** + * Links to other pages + */ + links?: Shared.APILinks; + + /** + * Meta information about the data set + */ + meta?: Shared.APIMeta; +} + export interface KnowledgeBaseCreateParams { /** * Identifier of the DigitalOcean OpenSearch database this knowledge base will use, @@ -535,6 +507,22 @@ export namespace KnowledgeBaseCreateParams { */ bucket_region?: string; + /** + * The chunking algorithm to use for processing data sources. + * + * **Note: This feature requires enabling the knowledgebase enhancements feature + * preview flag.** + */ + chunking_algorithm?: 'CHUNKING_ALGORITHM_UNKNOWN' | 'CHUNKING_ALGORITHM_SECTION_BASED' | 'CHUNKING_ALGORITHM_HIERARCHICAL' | 'CHUNKING_ALGORITHM_SEMANTIC' | 'CHUNKING_ALGORITHM_FIXED_LENGTH'; + + /** + * Configuration options for the chunking algorithm. + * + * **Note: This feature requires enabling the knowledgebase enhancements feature + * preview flag.** + */ + chunking_options?: Datasource.ChunkingOptions; + /** * Dropbox Data Source */ @@ -545,6 +533,11 @@ export namespace KnowledgeBaseCreateParams { */ file_upload_data_source?: DataSourcesAPI.APIFileUploadDataSource; + /** + * Google Drive Data Source + */ + google_drive_data_source?: Datasource.GoogleDriveDataSource; + item_path?: string; /** @@ -559,6 +552,34 @@ export namespace KnowledgeBaseCreateParams { } export namespace Datasource { + /** + * Configuration options for the chunking algorithm. + * + * **Note: This feature requires enabling the knowledgebase enhancements feature + * preview flag.** + */ + export interface ChunkingOptions { + /** + * Hierarchical options + */ + child_chunk_size?: number; + + /** + * Section_Based and Fixed_Length options + */ + max_chunk_size?: number; + + /** + * Hierarchical options + */ + parent_chunk_size?: number; + + /** + * Semantic options + */ + semantic_threshold?: number; + } + /** * Dropbox Data Source */ @@ -571,6 +592,19 @@ export namespace KnowledgeBaseCreateParams { */ refresh_token?: string; } + + /** + * Google Drive Data Source + */ + export interface GoogleDriveDataSource { + folder_id?: string; + + /** + * Refresh token. you can obrain a refresh token by following the oauth2 flow. see + * /v2/gen-ai/oauth2/google/tokens for reference. + */ + refresh_token?: string; + } } } @@ -603,7 +637,7 @@ export interface KnowledgeBaseUpdateParams { /** * Knowledge base id */ - body_uuid?: string; + uuid?: string; } export interface KnowledgeBaseListParams { @@ -629,9 +663,10 @@ export declare namespace KnowledgeBases { type KnowledgeBaseUpdateResponse as KnowledgeBaseUpdateResponse, type KnowledgeBaseListResponse as KnowledgeBaseListResponse, type KnowledgeBaseDeleteResponse as KnowledgeBaseDeleteResponse, + type KnowledgeBaseListIndexingJobsResponse as KnowledgeBaseListIndexingJobsResponse, type KnowledgeBaseCreateParams as KnowledgeBaseCreateParams, type KnowledgeBaseUpdateParams as KnowledgeBaseUpdateParams, - type KnowledgeBaseListParams as KnowledgeBaseListParams, + type KnowledgeBaseListParams as KnowledgeBaseListParams }; export { @@ -642,13 +677,15 @@ export declare namespace KnowledgeBases { type APIWebCrawlerDataSource as APIWebCrawlerDataSource, type AwsDataSource as AwsDataSource, type DataSourceCreateResponse as DataSourceCreateResponse, + type DataSourceUpdateResponse as DataSourceUpdateResponse, type DataSourceListResponse as DataSourceListResponse, type DataSourceDeleteResponse as DataSourceDeleteResponse, type DataSourceCreatePresignedURLsResponse as DataSourceCreatePresignedURLsResponse, type DataSourceCreateParams as DataSourceCreateParams, + type DataSourceUpdateParams as DataSourceUpdateParams, type DataSourceListParams as DataSourceListParams, type DataSourceDeleteParams as DataSourceDeleteParams, - type DataSourceCreatePresignedURLsParams as DataSourceCreatePresignedURLsParams, + type DataSourceCreatePresignedURLsParams as DataSourceCreatePresignedURLsParams }; export { @@ -659,9 +696,10 @@ export declare namespace KnowledgeBases { type IndexingJobRetrieveResponse as IndexingJobRetrieveResponse, type IndexingJobListResponse as IndexingJobListResponse, type IndexingJobRetrieveDataSourcesResponse as IndexingJobRetrieveDataSourcesResponse, + type IndexingJobRetrieveSignedURLResponse as IndexingJobRetrieveSignedURLResponse, type IndexingJobUpdateCancelResponse as IndexingJobUpdateCancelResponse, type IndexingJobCreateParams as IndexingJobCreateParams, type IndexingJobListParams as IndexingJobListParams, - type IndexingJobUpdateCancelParams as IndexingJobUpdateCancelParams, + type IndexingJobUpdateCancelParams as IndexingJobUpdateCancelParams }; } diff --git a/src/resources/models/index.ts b/src/resources/models/index.ts index 0b351b1c..3fea3792 100644 --- a/src/resources/models/index.ts +++ b/src/resources/models/index.ts @@ -1,11 +1,4 @@ // File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details. -export { - Models, - type APIAgreement, - type APIModel, - type APIModelVersion, - type ModelListResponse, - type ModelListParams, -} from './models'; -export { Providers } from './providers/index'; +export { Models, type APIAgreement, type APIModel, type APIModelVersion, type ModelListResponse, type ModelListParams } from './models';; +export { Providers } from './providers/index';; diff --git a/src/resources/models/models.ts b/src/resources/models/models.ts index b726c2a2..f1810965 100644 --- a/src/resources/models/models.ts +++ b/src/resources/models/models.ts @@ -7,6 +7,9 @@ import { Providers } from './providers/providers'; import { APIPromise } from '../../core/api-promise'; import { RequestOptions } from '../../internal/request-options'; +/** + * The API lets you build GPU-powered AI agents with pre-built or custom foundation models, function and agent routes, and RAG pipelines with knowledge bases. + */ export class Models extends APIResource { providers: ProvidersAPI.Providers = new ProvidersAPI.Providers(this._client); @@ -18,15 +21,8 @@ export class Models extends APIResource { * const models = await client.models.list(); * ``` */ - list( - query: ModelListParams | null | undefined = {}, - options?: RequestOptions, - ): APIPromise { - return this._client.get('/v2/gen-ai/models', { - query, - defaultBaseURL: 'https://api.digitalocean.com', - ...options, - }); + list(query: ModelListParams | null | undefined = {}, options?: RequestOptions): APIPromise { + return this._client.get('/v2/gen-ai/models', { query, defaultBaseURL: 'https://api.digitalocean.com', ...options }); } } @@ -67,6 +63,21 @@ export interface APIModel { */ is_foundational?: boolean; + /** + * Default chunking size limit to show in UI + */ + kb_default_chunk_size?: number; + + /** + * Maximum chunk size limit of model + */ + kb_max_chunk_size?: number; + + /** + * Minimum chunking size token limits if model supports KNOWLEDGEBASE usecase + */ + kb_min_chunk_size?: number; + /** * Display name of the model */ @@ -171,15 +182,7 @@ export interface ModelListParams { * - MODEL_USECASE_REASONING: The model usecase for reasoning * - MODEL_USECASE_SERVERLESS: The model usecase for serverless inference */ - usecases?: Array< - | 'MODEL_USECASE_UNKNOWN' - | 'MODEL_USECASE_AGENT' - | 'MODEL_USECASE_FINETUNED' - | 'MODEL_USECASE_KNOWLEDGEBASE' - | 'MODEL_USECASE_GUARDRAIL' - | 'MODEL_USECASE_REASONING' - | 'MODEL_USECASE_SERVERLESS' - >; + usecases?: Array<'MODEL_USECASE_UNKNOWN' | 'MODEL_USECASE_AGENT' | 'MODEL_USECASE_FINETUNED' | 'MODEL_USECASE_KNOWLEDGEBASE' | 'MODEL_USECASE_GUARDRAIL' | 'MODEL_USECASE_REASONING' | 'MODEL_USECASE_SERVERLESS'>; } Models.Providers = Providers; @@ -190,8 +193,10 @@ export declare namespace Models { type APIModel as APIModel, type APIModelVersion as APIModelVersion, type ModelListResponse as ModelListResponse, - type ModelListParams as ModelListParams, + type ModelListParams as ModelListParams }; - export { Providers as Providers }; + export { + Providers as Providers + }; } diff --git a/src/resources/models/providers/anthropic.ts b/src/resources/models/providers/anthropic.ts index e1cf0aac..7478de99 100644 --- a/src/resources/models/providers/anthropic.ts +++ b/src/resources/models/providers/anthropic.ts @@ -7,6 +7,9 @@ import { APIPromise } from '../../../core/api-promise'; import { RequestOptions } from '../../../internal/request-options'; import { path } from '../../../internal/utils/path'; +/** + * The API lets you build GPU-powered AI agents with pre-built or custom foundation models, function and agent routes, and RAG pipelines with knowledge bases. + */ export class Anthropic extends APIResource { /** * To create an Anthropic API key, send a POST request to @@ -18,15 +21,8 @@ export class Anthropic extends APIResource { * await client.models.providers.anthropic.create(); * ``` */ - create( - body: AnthropicCreateParams | null | undefined = {}, - options?: RequestOptions, - ): APIPromise { - return this._client.post('/v2/gen-ai/anthropic/keys', { - body, - defaultBaseURL: 'https://api.digitalocean.com', - ...options, - }); + create(body: AnthropicCreateParams | null | undefined = {}, options?: RequestOptions): APIPromise { + return this._client.post('/v2/gen-ai/anthropic/keys', { body, defaultBaseURL: 'https://api.digitalocean.com', ...options }); } /** @@ -42,10 +38,7 @@ export class Anthropic extends APIResource { * ``` */ retrieve(apiKeyUuid: string, options?: RequestOptions): APIPromise { - return this._client.get(path`/v2/gen-ai/anthropic/keys/${apiKeyUuid}`, { - defaultBaseURL: 'https://api.digitalocean.com', - ...options, - }); + return this._client.get(path`/v2/gen-ai/anthropic/keys/${apiKeyUuid}`, { defaultBaseURL: 'https://api.digitalocean.com', ...options }); } /** @@ -60,16 +53,8 @@ export class Anthropic extends APIResource { * ); * ``` */ - update( - apiKeyUuid: string, - body: AnthropicUpdateParams | null | undefined = {}, - options?: RequestOptions, - ): APIPromise { - return this._client.put(path`/v2/gen-ai/anthropic/keys/${apiKeyUuid}`, { - body, - defaultBaseURL: 'https://api.digitalocean.com', - ...options, - }); + update(apiKeyUuid: string, body: AnthropicUpdateParams | null | undefined = {}, options?: RequestOptions): APIPromise { + return this._client.put(path`/v2/gen-ai/anthropic/keys/${apiKeyUuid}`, { body, defaultBaseURL: 'https://api.digitalocean.com', ...options }); } /** @@ -82,15 +67,8 @@ export class Anthropic extends APIResource { * await client.models.providers.anthropic.list(); * ``` */ - list( - query: AnthropicListParams | null | undefined = {}, - options?: RequestOptions, - ): APIPromise { - return this._client.get('/v2/gen-ai/anthropic/keys', { - query, - defaultBaseURL: 'https://api.digitalocean.com', - ...options, - }); + list(query: AnthropicListParams | null | undefined = {}, options?: RequestOptions): APIPromise { + return this._client.get('/v2/gen-ai/anthropic/keys', { query, defaultBaseURL: 'https://api.digitalocean.com', ...options }); } /** @@ -106,10 +84,7 @@ export class Anthropic extends APIResource { * ``` */ delete(apiKeyUuid: string, options?: RequestOptions): APIPromise { - return this._client.delete(path`/v2/gen-ai/anthropic/keys/${apiKeyUuid}`, { - defaultBaseURL: 'https://api.digitalocean.com', - ...options, - }); + return this._client.delete(path`/v2/gen-ai/anthropic/keys/${apiKeyUuid}`, { defaultBaseURL: 'https://api.digitalocean.com', ...options }); } /** @@ -123,16 +98,8 @@ export class Anthropic extends APIResource { * ); * ``` */ - listAgents( - uuid: string, - query: AnthropicListAgentsParams | null | undefined = {}, - options?: RequestOptions, - ): APIPromise { - return this._client.get(path`/v2/gen-ai/anthropic/keys/${uuid}/agents`, { - query, - defaultBaseURL: 'https://api.digitalocean.com', - ...options, - }); + listAgents(uuid: string, query: AnthropicListAgentsParams | null | undefined = {}, options?: RequestOptions): APIPromise { + return this._client.get(path`/v2/gen-ai/anthropic/keys/${uuid}/agents`, { query, defaultBaseURL: 'https://api.digitalocean.com', ...options }); } } @@ -233,7 +200,7 @@ export interface AnthropicUpdateParams { /** * API key ID */ - body_api_key_uuid?: string; + api_key_uuid?: string; /** * Name of the key @@ -276,6 +243,6 @@ export declare namespace Anthropic { type AnthropicCreateParams as AnthropicCreateParams, type AnthropicUpdateParams as AnthropicUpdateParams, type AnthropicListParams as AnthropicListParams, - type AnthropicListAgentsParams as AnthropicListAgentsParams, + type AnthropicListAgentsParams as AnthropicListAgentsParams }; } diff --git a/src/resources/models/providers/index.ts b/src/resources/models/providers/index.ts index 2690ee24..4e1ecf42 100644 --- a/src/resources/models/providers/index.ts +++ b/src/resources/models/providers/index.ts @@ -1,29 +1,5 @@ // File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details. -export { - Anthropic, - type AnthropicCreateResponse, - type AnthropicRetrieveResponse, - type AnthropicUpdateResponse, - type AnthropicListResponse, - type AnthropicDeleteResponse, - type AnthropicListAgentsResponse, - type AnthropicCreateParams, - type AnthropicUpdateParams, - type AnthropicListParams, - type AnthropicListAgentsParams, -} from './anthropic'; -export { - OpenAI, - type OpenAICreateResponse, - type OpenAIRetrieveResponse, - type OpenAIUpdateResponse, - type OpenAIListResponse, - type OpenAIDeleteResponse, - type OpenAIRetrieveAgentsResponse, - type OpenAICreateParams, - type OpenAIUpdateParams, - type OpenAIListParams, - type OpenAIRetrieveAgentsParams, -} from './openai'; -export { Providers } from './providers'; +export { Anthropic, type AnthropicCreateResponse, type AnthropicRetrieveResponse, type AnthropicUpdateResponse, type AnthropicListResponse, type AnthropicDeleteResponse, type AnthropicListAgentsResponse, type AnthropicCreateParams, type AnthropicUpdateParams, type AnthropicListParams, type AnthropicListAgentsParams } from './anthropic';; +export { OpenAI, type OpenAICreateResponse, type OpenAIRetrieveResponse, type OpenAIUpdateResponse, type OpenAIListResponse, type OpenAIDeleteResponse, type OpenAIRetrieveAgentsResponse, type OpenAICreateParams, type OpenAIUpdateParams, type OpenAIListParams, type OpenAIRetrieveAgentsParams } from './openai';; +export { Providers } from './providers';; diff --git a/src/resources/models/providers/openai.ts b/src/resources/models/providers/openai.ts index 2a0b5813..cb3bd6e1 100644 --- a/src/resources/models/providers/openai.ts +++ b/src/resources/models/providers/openai.ts @@ -7,6 +7,9 @@ import { APIPromise } from '../../../core/api-promise'; import { RequestOptions } from '../../../internal/request-options'; import { path } from '../../../internal/utils/path'; +/** + * The API lets you build GPU-powered AI agents with pre-built or custom foundation models, function and agent routes, and RAG pipelines with knowledge bases. + */ export class OpenAI extends APIResource { /** * To create an OpenAI API key, send a POST request to `/v2/gen-ai/openai/keys`. @@ -17,15 +20,8 @@ export class OpenAI extends APIResource { * await client.models.providers.openai.create(); * ``` */ - create( - body: OpenAICreateParams | null | undefined = {}, - options?: RequestOptions, - ): APIPromise { - return this._client.post('/v2/gen-ai/openai/keys', { - body, - defaultBaseURL: 'https://api.digitalocean.com', - ...options, - }); + create(body: OpenAICreateParams | null | undefined = {}, options?: RequestOptions): APIPromise { + return this._client.post('/v2/gen-ai/openai/keys', { body, defaultBaseURL: 'https://api.digitalocean.com', ...options }); } /** @@ -41,10 +37,7 @@ export class OpenAI extends APIResource { * ``` */ retrieve(apiKeyUuid: string, options?: RequestOptions): APIPromise { - return this._client.get(path`/v2/gen-ai/openai/keys/${apiKeyUuid}`, { - defaultBaseURL: 'https://api.digitalocean.com', - ...options, - }); + return this._client.get(path`/v2/gen-ai/openai/keys/${apiKeyUuid}`, { defaultBaseURL: 'https://api.digitalocean.com', ...options }); } /** @@ -58,16 +51,8 @@ export class OpenAI extends APIResource { * ); * ``` */ - update( - apiKeyUuid: string, - body: OpenAIUpdateParams | null | undefined = {}, - options?: RequestOptions, - ): APIPromise { - return this._client.put(path`/v2/gen-ai/openai/keys/${apiKeyUuid}`, { - body, - defaultBaseURL: 'https://api.digitalocean.com', - ...options, - }); + update(apiKeyUuid: string, body: OpenAIUpdateParams | null | undefined = {}, options?: RequestOptions): APIPromise { + return this._client.put(path`/v2/gen-ai/openai/keys/${apiKeyUuid}`, { body, defaultBaseURL: 'https://api.digitalocean.com', ...options }); } /** @@ -78,15 +63,8 @@ export class OpenAI extends APIResource { * const openais = await client.models.providers.openai.list(); * ``` */ - list( - query: OpenAIListParams | null | undefined = {}, - options?: RequestOptions, - ): APIPromise { - return this._client.get('/v2/gen-ai/openai/keys', { - query, - defaultBaseURL: 'https://api.digitalocean.com', - ...options, - }); + list(query: OpenAIListParams | null | undefined = {}, options?: RequestOptions): APIPromise { + return this._client.get('/v2/gen-ai/openai/keys', { query, defaultBaseURL: 'https://api.digitalocean.com', ...options }); } /** @@ -101,10 +79,7 @@ export class OpenAI extends APIResource { * ``` */ delete(apiKeyUuid: string, options?: RequestOptions): APIPromise { - return this._client.delete(path`/v2/gen-ai/openai/keys/${apiKeyUuid}`, { - defaultBaseURL: 'https://api.digitalocean.com', - ...options, - }); + return this._client.delete(path`/v2/gen-ai/openai/keys/${apiKeyUuid}`, { defaultBaseURL: 'https://api.digitalocean.com', ...options }); } /** @@ -118,16 +93,8 @@ export class OpenAI extends APIResource { * ); * ``` */ - retrieveAgents( - uuid: string, - query: OpenAIRetrieveAgentsParams | null | undefined = {}, - options?: RequestOptions, - ): APIPromise { - return this._client.get(path`/v2/gen-ai/openai/keys/${uuid}/agents`, { - query, - defaultBaseURL: 'https://api.digitalocean.com', - ...options, - }); + retrieveAgents(uuid: string, query: OpenAIRetrieveAgentsParams | null | undefined = {}, options?: RequestOptions): APIPromise { + return this._client.get(path`/v2/gen-ai/openai/keys/${uuid}/agents`, { query, defaultBaseURL: 'https://api.digitalocean.com', ...options }); } } @@ -227,7 +194,7 @@ export interface OpenAIUpdateParams { /** * API key ID */ - body_api_key_uuid?: string; + api_key_uuid?: string; /** * Name of the key @@ -270,6 +237,6 @@ export declare namespace OpenAI { type OpenAICreateParams as OpenAICreateParams, type OpenAIUpdateParams as OpenAIUpdateParams, type OpenAIListParams as OpenAIListParams, - type OpenAIRetrieveAgentsParams as OpenAIRetrieveAgentsParams, + type OpenAIRetrieveAgentsParams as OpenAIRetrieveAgentsParams }; } diff --git a/src/resources/models/providers/providers.ts b/src/resources/models/providers/providers.ts index dcef8edc..33558e75 100644 --- a/src/resources/models/providers/providers.ts +++ b/src/resources/models/providers/providers.ts @@ -2,33 +2,9 @@ import { APIResource } from '../../../core/resource'; import * as AnthropicAPI from './anthropic'; -import { - Anthropic, - AnthropicCreateParams, - AnthropicCreateResponse, - AnthropicDeleteResponse, - AnthropicListAgentsParams, - AnthropicListAgentsResponse, - AnthropicListParams, - AnthropicListResponse, - AnthropicRetrieveResponse, - AnthropicUpdateParams, - AnthropicUpdateResponse, -} from './anthropic'; +import { Anthropic, AnthropicCreateParams, AnthropicCreateResponse, AnthropicDeleteResponse, AnthropicListAgentsParams, AnthropicListAgentsResponse, AnthropicListParams, AnthropicListResponse, AnthropicRetrieveResponse, AnthropicUpdateParams, AnthropicUpdateResponse } from './anthropic'; import * as OpenAIAPI from './openai'; -import { - OpenAI, - OpenAICreateParams, - OpenAICreateResponse, - OpenAIDeleteResponse, - OpenAIListParams, - OpenAIListResponse, - OpenAIRetrieveAgentsParams, - OpenAIRetrieveAgentsResponse, - OpenAIRetrieveResponse, - OpenAIUpdateParams, - OpenAIUpdateResponse, -} from './openai'; +import { OpenAI, OpenAICreateParams, OpenAICreateResponse, OpenAIDeleteResponse, OpenAIListParams, OpenAIListResponse, OpenAIRetrieveAgentsParams, OpenAIRetrieveAgentsResponse, OpenAIRetrieveResponse, OpenAIUpdateParams, OpenAIUpdateResponse } from './openai'; export class Providers extends APIResource { anthropic: AnthropicAPI.Anthropic = new AnthropicAPI.Anthropic(this._client); @@ -50,7 +26,7 @@ export declare namespace Providers { type AnthropicCreateParams as AnthropicCreateParams, type AnthropicUpdateParams as AnthropicUpdateParams, type AnthropicListParams as AnthropicListParams, - type AnthropicListAgentsParams as AnthropicListAgentsParams, + type AnthropicListAgentsParams as AnthropicListAgentsParams }; export { @@ -64,6 +40,6 @@ export declare namespace Providers { type OpenAICreateParams as OpenAICreateParams, type OpenAIUpdateParams as OpenAIUpdateParams, type OpenAIListParams as OpenAIListParams, - type OpenAIRetrieveAgentsParams as OpenAIRetrieveAgentsParams, + type OpenAIRetrieveAgentsParams as OpenAIRetrieveAgentsParams }; } diff --git a/src/resources/nfs.ts b/src/resources/nfs.ts new file mode 100644 index 00000000..f45540de --- /dev/null +++ b/src/resources/nfs.ts @@ -0,0 +1,3 @@ +// File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details. + +export * from './nfs/index'; diff --git a/src/resources/nfs/index.ts b/src/resources/nfs/index.ts new file mode 100644 index 00000000..444b806e --- /dev/null +++ b/src/resources/nfs/index.ts @@ -0,0 +1,4 @@ +// File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details. + +export { Nfs, type NfCreateResponse, type NfRetrieveResponse, type NfListResponse, type NfInitiateActionResponse, type NfCreateParams, type NfRetrieveParams, type NfListParams, type NfDeleteParams, type NfInitiateActionParams } from './nfs';; +export { Snapshots, type SnapshotRetrieveResponse, type SnapshotListResponse, type SnapshotRetrieveParams, type SnapshotListParams, type SnapshotDeleteParams } from './snapshots';; diff --git a/src/resources/nfs/nfs.ts b/src/resources/nfs/nfs.ts new file mode 100644 index 00000000..d9b8733c --- /dev/null +++ b/src/resources/nfs/nfs.ts @@ -0,0 +1,507 @@ +// File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details. + +import { APIResource } from '../../core/resource'; +import * as SnapshotsAPI from './snapshots'; +import { SnapshotDeleteParams, SnapshotListParams, SnapshotListResponse, SnapshotRetrieveParams, SnapshotRetrieveResponse, Snapshots } from './snapshots'; +import { APIPromise } from '../../core/api-promise'; +import { buildHeaders } from '../../internal/headers'; +import { RequestOptions } from '../../internal/request-options'; +import { path } from '../../internal/utils/path'; + +export class Nfs extends APIResource { + snapshots: SnapshotsAPI.Snapshots = new SnapshotsAPI.Snapshots(this._client); + + /** + * To create a new NFS share, send a POST request to `/v2/nfs`. + * + * @example + * ```ts + * const nf = await client.nfs.create({ + * name: 'sammy-share-drive', + * region: 'atl1', + * size_gib: 1024, + * vpc_ids: ['796c6fe3-2a1d-4da2-9f3e-38239827dc91'], + * performance_tier: 'standard', + * }); + * ``` + */ + create(body: NfCreateParams, options?: RequestOptions): APIPromise { + return this._client.post('/v2/nfs', { body, defaultBaseURL: 'https://api.digitalocean.com', ...options }); + } + + /** + * To get an NFS share, send a GET request to `/v2/nfs/{nfs_id}?region=${region}`. + * + * A successful request will return the NFS share. + * + * @example + * ```ts + * const nf = await client.nfs.retrieve( + * '0a1b2c3d-4e5f-6a7b-8c9d-0e1f2a3b4c5d', + * ); + * ``` + */ + retrieve(nfsID: string, query: NfRetrieveParams | null | undefined = {}, options?: RequestOptions): APIPromise { + return this._client.get(path`/v2/nfs/${nfsID}`, { query, defaultBaseURL: 'https://api.digitalocean.com', ...options }); + } + + /** + * To list NFS shares, send a GET request to `/v2/nfs?region=${region}`. + * + * A successful request will return all NFS shares belonging to the authenticated + * user. + * + * @example + * ```ts + * const nfs = await client.nfs.list(); + * ``` + */ + list(query: NfListParams | null | undefined = {}, options?: RequestOptions): APIPromise { + return this._client.get('/v2/nfs', { query, defaultBaseURL: 'https://api.digitalocean.com', ...options }); + } + + /** + * To delete an NFS share, send a DELETE request to + * `/v2/nfs/{nfs_id}?region=${region}`. + * + * A successful request will return a `204 No Content` status code. + * + * @example + * ```ts + * await client.nfs.delete( + * '0a1b2c3d-4e5f-6a7b-8c9d-0e1f2a3b4c5d', + * ); + * ``` + */ + delete(nfsID: string, params: NfDeleteParams | null | undefined = {}, options?: RequestOptions): APIPromise { + const { region } = params ?? {} + return this._client.delete(path`/v2/nfs/${nfsID}`, { query: { region }, defaultBaseURL: 'https://api.digitalocean.com', ...options, headers: buildHeaders([{Accept: '*/*'}, options?.headers]) }); + } + + /** + * To execute an action (such as resize) on a specified NFS share, send a POST + * request to `/v2/nfs/{nfs_id}/actions`. In the JSON body to the request, set the + * `type` attribute to on of the supported action types: + * + * | Action | Details | + * | -------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------- | + * | `resize` | Resizes an NFS share. Set the size_gib attribute to a desired value in GiB | + * | `snapshot` | Takes a snapshot of an NFS share | + * | `attach` | Attaches an NFS share to a VPC. Set the vpc_id attribute to the desired VPC ID | + * | `detach` | Detaches an NFS share from a VPC. Set the vpc_id attribute to the desired VPC ID | + * | `switch_performance_tier` | Switches the performance tier of an NFS share. Set the performance_tier attribute to the desired tier (e.g., standard, high) | + * + * @example + * ```ts + * const response = await client.nfs.initiateAction( + * '0a1b2c3d-4e5f-6a7b-8c9d-0e1f2a3b4c5d', + * { type: 'resize' }, + * ); + * ``` + */ + initiateAction(nfsID: string, body: NfInitiateActionParams, options?: RequestOptions): APIPromise { + return this._client.post(path`/v2/nfs/${nfsID}/actions`, { body, defaultBaseURL: 'https://api.digitalocean.com', ...options }); + } +} + +export interface NfCreateResponse { + share?: NfCreateResponse.Share; +} + +export namespace NfCreateResponse { + export interface Share { + /** + * The unique identifier of the NFS share. + */ + id: string; + + /** + * Timestamp for when the NFS share was created. + */ + created_at: string; + + /** + * The human-readable name of the share. + */ + name: string; + + /** + * The DigitalOcean region slug (e.g., nyc2, atl1) where the NFS share resides. + */ + region: string; + + /** + * The desired/provisioned size of the share in GiB (Gibibytes). Must be >= 50. + */ + size_gib: number; + + /** + * The current status of the share. + */ + status: 'CREATING' | 'ACTIVE' | 'FAILED' | 'DELETED'; + + /** + * The host IP of the NFS server that will be accessible from the associated VPC + */ + host?: string; + + /** + * Path at which the share will be available, to be mounted at a target of the + * user's choice within the client + */ + mount_path?: string; + + /** + * List of VPC IDs that should be able to access the share. + */ + vpc_ids?: Array; + } +} + +export interface NfRetrieveResponse { + share?: NfRetrieveResponse.Share; +} + +export namespace NfRetrieveResponse { + export interface Share { + /** + * The unique identifier of the NFS share. + */ + id: string; + + /** + * Timestamp for when the NFS share was created. + */ + created_at: string; + + /** + * The human-readable name of the share. + */ + name: string; + + /** + * The DigitalOcean region slug (e.g., nyc2, atl1) where the NFS share resides. + */ + region: string; + + /** + * The desired/provisioned size of the share in GiB (Gibibytes). Must be >= 50. + */ + size_gib: number; + + /** + * The current status of the share. + */ + status: 'CREATING' | 'ACTIVE' | 'FAILED' | 'DELETED'; + + /** + * The host IP of the NFS server that will be accessible from the associated VPC + */ + host?: string; + + /** + * Path at which the share will be available, to be mounted at a target of the + * user's choice within the client + */ + mount_path?: string; + + /** + * List of VPC IDs that should be able to access the share. + */ + vpc_ids?: Array; + } +} + +export interface NfListResponse { + shares?: Array; +} + +export namespace NfListResponse { + export interface Share { + /** + * The unique identifier of the NFS share. + */ + id: string; + + /** + * Timestamp for when the NFS share was created. + */ + created_at: string; + + /** + * The human-readable name of the share. + */ + name: string; + + /** + * The DigitalOcean region slug (e.g., nyc2, atl1) where the NFS share resides. + */ + region: string; + + /** + * The desired/provisioned size of the share in GiB (Gibibytes). Must be >= 50. + */ + size_gib: number; + + /** + * The current status of the share. + */ + status: 'CREATING' | 'ACTIVE' | 'FAILED' | 'DELETED'; + + /** + * The host IP of the NFS server that will be accessible from the associated VPC + */ + host?: string; + + /** + * Path at which the share will be available, to be mounted at a target of the + * user's choice within the client + */ + mount_path?: string; + + /** + * List of VPC IDs that should be able to access the share. + */ + vpc_ids?: Array; + } +} + +/** + * Action response of an NFS share. + */ +export interface NfInitiateActionResponse { + /** + * The action that was submitted. + */ + action: NfInitiateActionResponse.Action; +} + +export namespace NfInitiateActionResponse { + /** + * The action that was submitted. + */ + export interface Action { + /** + * The DigitalOcean region slug where the resource is located. + */ + region_slug: string; + + /** + * The unique identifier of the resource on which the action is being performed. + */ + resource_id: string; + + /** + * The type of resource on which the action is being performed. + */ + resource_type: 'network_file_share' | 'network_file_share_snapshot'; + + /** + * The timestamp when the action was started. + */ + started_at: string; + + /** + * The current status of the action. + */ + status: 'in-progress' | 'completed' | 'errored'; + + /** + * The type of action being performed. + */ + type: string; + } +} + +export interface NfCreateParams { + /** + * The human-readable name of the share. + */ + name: string; + + /** + * The DigitalOcean region slug (e.g., nyc2, atl1) where the NFS share resides. + */ + region: string; + + /** + * The desired/provisioned size of the share in GiB (Gibibytes). Must be >= 50. + */ + size_gib: number; + + /** + * List of VPC IDs that should be able to access the share. + */ + vpc_ids: Array; + + /** + * The performance tier of the share. + */ + performance_tier?: string; +} + +export interface NfRetrieveParams { + /** + * The DigitalOcean region slug (e.g., nyc2, atl1) where the NFS share resides. + */ + region?: string; +} + +export interface NfListParams { + /** + * The DigitalOcean region slug (e.g., nyc2, atl1) where the NFS share resides. + */ + region?: string; +} + +export interface NfDeleteParams { + /** + * The DigitalOcean region slug (e.g., nyc2, atl1) where the NFS share resides. + */ + region?: string; +} + +export type NfInitiateActionParams = NfInitiateActionParams.NfsActionResize | NfInitiateActionParams.NfsActionSnapshot | NfInitiateActionParams.NfsActionAttach | NfInitiateActionParams.NfsActionDetach | NfInitiateActionParams.NfsActionSwitchPerformanceTier + +export declare namespace NfInitiateActionParams { + export interface NfsActionResize { + /** + * The type of action to initiate for the NFS share (such as resize or snapshot). + */ + type: 'resize' | 'snapshot'; + + params?: NfsActionResize.Params; + + /** + * The DigitalOcean region slug (e.g. atl1, nyc2) where the NFS snapshot resides. + */ + region?: string; + } + + export namespace NfsActionResize { + export interface Params { + /** + * The new size for the NFS share. + */ + size_gib: number; + } + } + + export interface NfsActionSnapshot { + /** + * The type of action to initiate for the NFS share (such as resize or snapshot). + */ + type: 'resize' | 'snapshot'; + + params?: NfsActionSnapshot.Params; + + /** + * The DigitalOcean region slug (e.g. atl1, nyc2) where the NFS snapshot resides. + */ + region?: string; + } + + export namespace NfsActionSnapshot { + export interface Params { + /** + * Snapshot name of the NFS share + */ + name: string; + } + } + + export interface NfsActionAttach { + /** + * The type of action to initiate for the NFS share (such as resize or snapshot). + */ + type: 'resize' | 'snapshot'; + + params?: NfsActionAttach.Params; + + /** + * The DigitalOcean region slug (e.g. atl1, nyc2) where the NFS snapshot resides. + */ + region?: string; + } + + export namespace NfsActionAttach { + export interface Params { + /** + * The ID of the VPC to which the NFS share will be attached + */ + vpc_id: string; + } + } + + export interface NfsActionDetach { + /** + * The type of action to initiate for the NFS share (such as resize or snapshot). + */ + type: 'resize' | 'snapshot'; + + params?: NfsActionDetach.Params; + + /** + * The DigitalOcean region slug (e.g. atl1, nyc2) where the NFS snapshot resides. + */ + region?: string; + } + + export namespace NfsActionDetach { + export interface Params { + /** + * The ID of the VPC from which the NFS share will be detached + */ + vpc_id: string; + } + } + + export interface NfsActionSwitchPerformanceTier { + /** + * The type of action to initiate for the NFS share (such as resize or snapshot). + */ + type: 'resize' | 'snapshot'; + + params?: NfsActionSwitchPerformanceTier.Params; + + /** + * The DigitalOcean region slug (e.g. atl1, nyc2) where the NFS snapshot resides. + */ + region?: string; + } + + export namespace NfsActionSwitchPerformanceTier { + export interface Params { + /** + * The performance tier to which the NFS share will be switched (e.g., standard, + * high). + */ + performance_tier: string; + } + } +} + +Nfs.Snapshots = Snapshots; + +export declare namespace Nfs { + export { + type NfCreateResponse as NfCreateResponse, + type NfRetrieveResponse as NfRetrieveResponse, + type NfListResponse as NfListResponse, + type NfInitiateActionResponse as NfInitiateActionResponse, + type NfCreateParams as NfCreateParams, + type NfRetrieveParams as NfRetrieveParams, + type NfListParams as NfListParams, + type NfDeleteParams as NfDeleteParams, + type NfInitiateActionParams as NfInitiateActionParams + }; + + export { + Snapshots as Snapshots, + type SnapshotRetrieveResponse as SnapshotRetrieveResponse, + type SnapshotListResponse as SnapshotListResponse, + type SnapshotRetrieveParams as SnapshotRetrieveParams, + type SnapshotListParams as SnapshotListParams, + type SnapshotDeleteParams as SnapshotDeleteParams + }; +} diff --git a/src/resources/nfs/snapshots.ts b/src/resources/nfs/snapshots.ts new file mode 100644 index 00000000..49076234 --- /dev/null +++ b/src/resources/nfs/snapshots.ts @@ -0,0 +1,199 @@ +// File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details. + +import { APIResource } from '../../core/resource'; +import { APIPromise } from '../../core/api-promise'; +import { buildHeaders } from '../../internal/headers'; +import { RequestOptions } from '../../internal/request-options'; +import { path } from '../../internal/utils/path'; + +/** + * NFS lets you create fully managed, POSIX-compliant network file storage that delivers secure, + * high-performance shared storage right inside your VPC. This enables seamless data sharing across Droplets in a VPC. + */ +export class Snapshots extends APIResource { + /** + * To get an NFS snapshot, send a GET request to + * `/v2/nfs/snapshots/{nfs_snapshot_id}?region=${region}`. + * + * A successful request will return the NFS snapshot. + * + * @example + * ```ts + * const snapshot = await client.nfs.snapshots.retrieve( + * '0a1b2c3d-4e5f-6a7b-8c9d-0e1f2a3b4c5d', + * ); + * ``` + */ + retrieve(nfsSnapshotID: string, query: SnapshotRetrieveParams | null | undefined = {}, options?: RequestOptions): APIPromise { + return this._client.get(path`/v2/nfs/snapshots/${nfsSnapshotID}`, { query, defaultBaseURL: 'https://api.digitalocean.com', ...options }); + } + + /** + * To list all NFS snapshots, send a GET request to + * `/v2/nfs/snapshots?region=${region}&share_id={share_id}`. + * + * A successful request will return all NFS snapshots belonging to the + * authenticated user in the specified region. + * + * Optionally, you can filter snapshots by a specific NFS share by including the + * `share_id` query parameter. + * + * @example + * ```ts + * const snapshots = await client.nfs.snapshots.list(); + * ``` + */ + list(query: SnapshotListParams | null | undefined = {}, options?: RequestOptions): APIPromise { + return this._client.get('/v2/nfs/snapshots', { query, defaultBaseURL: 'https://api.digitalocean.com', ...options }); + } + + /** + * To delete an NFS snapshot, send a DELETE request to + * `/v2/nfs/snapshots/{nfs_snapshot_id}?region=${region}`. + * + * A successful request will return a `204 No Content` status code. + * + * @example + * ```ts + * await client.nfs.snapshots.delete( + * '0a1b2c3d-4e5f-6a7b-8c9d-0e1f2a3b4c5d', + * ); + * ``` + */ + delete(nfsSnapshotID: string, params: SnapshotDeleteParams | null | undefined = {}, options?: RequestOptions): APIPromise { + const { region } = params ?? {} + return this._client.delete(path`/v2/nfs/snapshots/${nfsSnapshotID}`, { query: { region }, defaultBaseURL: 'https://api.digitalocean.com', ...options, headers: buildHeaders([{Accept: '*/*'}, options?.headers]) }); + } +} + +export interface SnapshotRetrieveResponse { + /** + * Represents an NFS snapshot. + */ + snapshot?: SnapshotRetrieveResponse.Snapshot; +} + +export namespace SnapshotRetrieveResponse { + /** + * Represents an NFS snapshot. + */ + export interface Snapshot { + /** + * The unique identifier of the snapshot. + */ + id: string; + + /** + * The timestamp when the snapshot was created. + */ + created_at: string; + + /** + * The human-readable name of the snapshot. + */ + name: string; + + /** + * The DigitalOcean region slug where the snapshot is located. + */ + region: string; + + /** + * The unique identifier of the share from which this snapshot was created. + */ + share_id: string; + + /** + * The size of the snapshot in GiB. + */ + size_gib: number; + + /** + * The current status of the snapshot. + */ + status: 'UNKNOWN' | 'CREATING' | 'ACTIVE' | 'FAILED' | 'DELETED'; + } +} + +export interface SnapshotListResponse { + snapshots?: Array; +} + +export namespace SnapshotListResponse { + /** + * Represents an NFS snapshot. + */ + export interface Snapshot { + /** + * The unique identifier of the snapshot. + */ + id: string; + + /** + * The timestamp when the snapshot was created. + */ + created_at: string; + + /** + * The human-readable name of the snapshot. + */ + name: string; + + /** + * The DigitalOcean region slug where the snapshot is located. + */ + region: string; + + /** + * The unique identifier of the share from which this snapshot was created. + */ + share_id: string; + + /** + * The size of the snapshot in GiB. + */ + size_gib: number; + + /** + * The current status of the snapshot. + */ + status: 'UNKNOWN' | 'CREATING' | 'ACTIVE' | 'FAILED' | 'DELETED'; + } +} + +export interface SnapshotRetrieveParams { + /** + * The DigitalOcean region slug (e.g., nyc2, atl1) where the NFS share resides. + */ + region?: string; +} + +export interface SnapshotListParams { + /** + * The DigitalOcean region slug (e.g., nyc2, atl1) where the NFS share resides. + */ + region?: string; + + /** + * The unique ID of an NFS share. If provided, only snapshots of this specific + * share will be returned. + */ + share_id?: string; +} + +export interface SnapshotDeleteParams { + /** + * The DigitalOcean region slug (e.g., nyc2, atl1) where the NFS share resides. + */ + region?: string; +} + +export declare namespace Snapshots { + export { + type SnapshotRetrieveResponse as SnapshotRetrieveResponse, + type SnapshotListResponse as SnapshotListResponse, + type SnapshotRetrieveParams as SnapshotRetrieveParams, + type SnapshotListParams as SnapshotListParams, + type SnapshotDeleteParams as SnapshotDeleteParams + }; +} diff --git a/src/resources/regions.ts b/src/resources/regions.ts index ef67cdec..02af81b3 100644 --- a/src/resources/regions.ts +++ b/src/resources/regions.ts @@ -5,6 +5,9 @@ import * as Shared from './shared'; import { APIPromise } from '../core/api-promise'; import { RequestOptions } from '../internal/request-options'; +/** + * Provides information about DigitalOcean data center regions. + */ export class Regions extends APIResource { /** * To list all of the regions that are available, send a GET request to @@ -17,15 +20,8 @@ export class Regions extends APIResource { * const regions = await client.regions.list(); * ``` */ - list( - query: RegionListParams | null | undefined = {}, - options?: RequestOptions, - ): APIPromise { - return this._client.get('/v2/regions', { - query, - defaultBaseURL: 'https://api.digitalocean.com', - ...options, - }); + list(query: RegionListParams | null | undefined = {}, options?: RequestOptions): APIPromise { + return this._client.get('/v2/regions', { query, defaultBaseURL: 'https://api.digitalocean.com', ...options }); } } @@ -53,5 +49,8 @@ export interface RegionListParams { } export declare namespace Regions { - export { type RegionListResponse as RegionListResponse, type RegionListParams as RegionListParams }; + export { + type RegionListResponse as RegionListResponse, + type RegionListParams as RegionListParams + }; } diff --git a/src/resources/responses.ts b/src/resources/responses.ts new file mode 100644 index 00000000..7d257efe --- /dev/null +++ b/src/resources/responses.ts @@ -0,0 +1,408 @@ +// File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details. + +import { APIResource } from '../core/resource'; +import * as ResponsesAPI from './responses'; +import * as Shared from './shared'; +import { APIPromise } from '../core/api-promise'; +import { Stream } from '../core/streaming'; +import { RequestOptions } from '../internal/request-options'; + +/** + * Generate text-to-text responses from text prompts. + */ +export class Responses extends APIResource { + /** + * Generate text responses from text prompts. This endpoint supports both streaming + * and non-streaming responses for VLLM models only. + * + * @example + * ```ts + * const createResponseResponse = + * await client.responses.create({ + * input: + * 'Tell me a three-sentence bedtime story about a unicorn.', + * model: 'llama3-8b-instruct', + * }); + * ``` + */ + create(body: ResponseCreateParamsNonStreaming, options?: RequestOptions): APIPromise + create(body: ResponseCreateParamsStreaming, options?: RequestOptions): APIPromise> + create(body: ResponseCreateParamsBase, options?: RequestOptions): APIPromise | Shared.CreateResponseResponse> + create(body: ResponseCreateParams, options?: RequestOptions): APIPromise | APIPromise> { + return this._client.post('/responses', { body, defaultBaseURL: 'https://inference.do-ai.run/v1', ...options, stream: body.stream ?? false }) as APIPromise | APIPromise>; + } +} + +export type ResponseCreateParams = ResponseCreateParamsNonStreaming | ResponseCreateParamsStreaming + +export interface ResponseCreateParamsBase { + /** + * The input text prompt or conversation history. Can be a string or an array of + * message objects for conversation context. + */ + input: string | Array; + + /** + * Model ID used to generate the response. Must be a VLLM model. + */ + model: string; + + /** + * System-level instructions for the model. This sets the behavior and context for + * the response generation. + */ + instructions?: string | null; + + /** + * Maximum number of tokens to generate in the response. If not specified, the + * model will use a default value. + */ + max_output_tokens?: number | null; + + /** + * The maximum number of tokens that can be generated in the completion. Alias for + * max_output_tokens for compatibility. + */ + max_tokens?: number | null; + + /** + * Set of 16 key-value pairs that can be attached to an object. This can be useful + * for storing additional information about the object in a structured format, and + * querying for objects via API or the dashboard. + * + * Keys are strings with a maximum length of 64 characters. Values are strings with + * a maximum length of 512 characters. + */ + metadata?: { [key: string]: string } | null; + + /** + * Specifies the output types the model should generate. For text-to-text, this + * should be ["text"]. + */ + modalities?: Array<'text'> | null; + + /** + * Whether to enable parallel tool calls. When true, the model can make multiple + * tool calls in parallel. + */ + parallel_tool_calls?: boolean | null; + + /** + * Up to 4 sequences where the API will stop generating further tokens. The + * returned text will not contain the stop sequence. + */ + stop?: string | null | Array; + + /** + * If set to true, the model response data will be streamed to the client as it is + * generated using server-sent events. + */ + stream?: boolean | null; + + /** + * Options for streaming response. Only set this when you set `stream: true`. + */ + stream_options?: ResponseCreateParams.StreamOptions | null; + + /** + * What sampling temperature to use, between 0 and 2. Higher values like 0.8 will + * make the output more random, while lower values like 0.2 will make it more + * focused and deterministic. We generally recommend altering this or `top_p` but + * not both. + */ + temperature?: number | null; + + /** + * Controls which (if any) tool is called by the model. `none` means the model will + * not call any tool and instead generates a message. `auto` means the model can + * pick between generating a message or calling one or more tools. `required` means + * the model must call one or more tools. Specifying a particular tool via + * `{"type": "function", "function": {"name": "my_function"}}` forces the model to + * call that tool. + * + * `none` is the default when no tools are present. `auto` is the default if tools + * are present. + */ + tool_choice?: 'none' | 'auto' | 'required' | ResponseCreateParams.ChatCompletionNamedToolChoice; + + /** + * A list of tools the model may call. Currently, only functions are supported as a + * tool. Uses Responses API format (with `name`, `description`, `parameters` at top + * level). + */ + tools?: Array; + + /** + * An alternative to sampling with temperature, called nucleus sampling, where the + * model considers the results of the tokens with top_p probability mass. So 0.1 + * means only the tokens comprising the top 10% probability mass are considered. + * + * We generally recommend altering this or `temperature` but not both. + */ + top_p?: number | null; + + /** + * A unique identifier representing your end-user, which can help DigitalOcean to + * monitor and detect abuse. + */ + user?: string; + +[k: string]: unknown +} + +export namespace ResponseCreateParams { + export interface UnionMember0 { + /** + * The type of input item (must be function_call, function_call_output, or + * reasoning) + */ + type: 'function_call' | 'function_call_output' | 'reasoning'; + + /** + * The unique ID of the reasoning item (optional for reasoning) + */ + id?: string; + + /** + * JSON string of function arguments (required for function_call) + */ + arguments?: string; + + /** + * The call ID (required for function_call and function_call_output) + */ + call_id?: string; + + /** + * Array of reasoning content parts (optional for reasoning, can be null) + */ + content?: Array | null; + + /** + * Encrypted content (optional) + */ + encrypted_content?: string | null; + + /** + * The function name (required for function_call) + */ + name?: string; + + /** + * JSON string of function output (required for function_call_output) + */ + output?: string; + + /** + * Status of the item (optional, can be null) + */ + status?: string | null; + + /** + * Summary of the reasoning (optional for reasoning) + */ + summary?: Array; + + [k: string]: unknown + } + + export namespace UnionMember0 { + export interface Content { + /** + * The reasoning text content + */ + text?: string; + + /** + * The type of content + */ + type?: 'reasoning_text'; + + [k: string]: unknown + } + } + + export interface UnionMember1 { + /** + * The content of the message (string or content parts array) + */ + content: string | Array; + + /** + * The role of the message author + */ + role?: 'user' | 'assistant' | 'system' | 'tool' | 'developer'; + + /** + * Tool call ID that this message is responding to (required for tool role) + */ + tool_call_id?: string; + + /** + * Tool calls made by the assistant (for assistant role messages) + */ + tool_calls?: Array; + + /** + * Optional type identifier for message items (used by some clients like Codex) + */ + type?: 'message'; + + [k: string]: unknown + } + + export namespace UnionMember1 { + export interface UnionMember0 { + /** + * The text content + */ + text: string; + + /** + * The type of content part + */ + type: 'input_text'; + } + + export interface ToolCall { + /** + * The ID of the tool call. + */ + id: string; + + /** + * The function that the model called. + */ + function: ToolCall.Function; + + /** + * The type of the tool. Currently, only `function` is supported. + */ + type: 'function'; + } + + export namespace ToolCall { + /** + * The function that the model called. + */ + export interface Function { + /** + * The arguments to call the function with, as generated by the model in JSON + * format. Note that the model does not always generate valid JSON, and may + * hallucinate parameters not defined by your function schema. Validate the + * arguments in your code before calling your function. + */ + arguments: string; + + /** + * The name of the function to call. + */ + name: string; + } + } + } + + /** + * Options for streaming response. Only set this when you set `stream: true`. + */ + export interface StreamOptions { + /** + * If set, an additional chunk will be streamed before the `data: [DONE]` message. + * The `usage` field on this chunk shows the token usage statistics for the entire + * request, and the `choices` field will always be an empty array. + * + * All other chunks will also include a `usage` field, but with a null value. + * **NOTE:** If the stream is interrupted, you may not receive the final usage + * chunk which contains the total token usage for the request. + */ + include_usage?: boolean; + } + + /** + * Specifies a tool the model should use. Use to force the model to call a specific + * function. + */ + export interface ChatCompletionNamedToolChoice { + function: ChatCompletionNamedToolChoice.Function; + + /** + * The type of the tool. Currently, only `function` is supported. + */ + type: 'function'; + } + + export namespace ChatCompletionNamedToolChoice { + export interface Function { + /** + * The name of the function to call. + */ + name: string; + } + } + + /** + * Tool definition for Responses API (flat format). This format is used by VLLM's + * Responses API where name, description, and parameters are at the top level of + * the tool object. + */ + export interface Tool { + /** + * The type of the tool. Supported values are `function` (custom tools), + * `web_search`, and `web_search_2025_08_26` (built-in web search). + */ + type: 'function' | 'web_search' | 'web_search_2025_08_26'; + + /** + * A description of what the function does, used by the model to choose when and + * how to call the function. + */ + description?: string; + + /** + * The name of the function to be called. Must be a-z, A-Z, 0-9, or contain + * underscores and dashes, with a maximum length of 64. + */ + name?: string; + + /** + * The parameters the functions accepts, described as a JSON Schema object. See the + * [guide](/docs/guides/function-calling) for examples, and the + * [JSON Schema reference](https://json-schema.org/understanding-json-schema/) for + * documentation about the format. + * + * Omitting `parameters` defines a function with an empty parameter list. + */ + parameters?: { [key: string]: unknown }; + } + + export type ResponseCreateParamsNonStreaming = ResponsesAPI.ResponseCreateParamsNonStreaming + export type ResponseCreateParamsStreaming = ResponsesAPI.ResponseCreateParamsStreaming +} + +export interface ResponseCreateParamsNonStreaming extends ResponseCreateParamsBase { + /** + * If set to true, the model response data will be streamed to the client as it is + * generated using server-sent events. + */ + stream?: false | null; + +[k: string]: unknown +} + +export interface ResponseCreateParamsStreaming extends ResponseCreateParamsBase { + /** + * If set to true, the model response data will be streamed to the client as it is + * generated using server-sent events. + */ + stream: true; + +[k: string]: unknown +} + +export declare namespace Responses { + export { + type ResponseCreateParams as ResponseCreateParams, + type ResponseCreateParamsNonStreaming as ResponseCreateParamsNonStreaming, + type ResponseCreateParamsStreaming as ResponseCreateParamsStreaming + }; +} diff --git a/src/resources/retrieve.ts b/src/resources/retrieve.ts new file mode 100644 index 00000000..a5efe0a2 --- /dev/null +++ b/src/resources/retrieve.ts @@ -0,0 +1,175 @@ +// File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details. + +import { APIResource } from '../core/resource'; +import { APIPromise } from '../core/api-promise'; +import { RequestOptions } from '../internal/request-options'; +import { path } from '../internal/utils/path'; + +export class Retrieve extends APIResource { + /** + * Retrieve relevant documents from a knowledge base using semantic search. + * + * This endpoint: + * + * 1. Authenticates the request using the provided bearer token + * 2. Generates embeddings for the query using the knowledge base's configured + * model + * 3. Performs vector similarity search in the knowledge base + * 4. Returns the most relevant document chunks + * + * The search supports hybrid search combining: + * + * - Vector similarity (semantic search) + * - Keyword matching (BM25) + * - Custom metadata filters + * + * @example + * ```ts + * const response = await client.retrieve.documents( + * '550e8400-e29b-41d4-a716-446655440000', + * { + * num_results: 5, + * query: + * 'What are the best practices for deploying machine learning models?', + * }, + * ); + * ``` + */ + documents(knowledgeBaseID: string, body: RetrieveDocumentsParams, options?: RequestOptions): APIPromise { + return this._client.post(path`/${knowledgeBaseID}/retrieve`, { body, defaultBaseURL: 'https://kbaas.do-ai.run/v1', ...options }); + } +} + +export interface RetrieveDocumentsResponse { + /** + * Array of retrieved document chunks + */ + results: Array; + + /** + * Number of results returned + */ + total_results: number; +} + +export namespace RetrieveDocumentsResponse { + export interface Result { + /** + * Metadata associated with the document + */ + metadata: { [key: string]: unknown }; + + /** + * The text content of the document chunk + */ + text_content: string; + } +} + +export interface RetrieveDocumentsParams { + /** + * Number of results to return + */ + num_results: number; + + /** + * The search query text + */ + query: string; + + /** + * Weight for hybrid search (0-1): + * + * - 0 = pure keyword search (BM25) + * - 1 = pure vector search (default) + * - 0.5 = balanced hybrid search + */ + alpha?: number; + + /** + * Metadata filters to apply to the search + */ + filters?: RetrieveDocumentsParams.Filters; +} + +export namespace RetrieveDocumentsParams { + /** + * Metadata filters to apply to the search + */ + export interface Filters { + /** + * All conditions must match (AND) + */ + must?: Array; + + /** + * No conditions should match (NOT) + */ + must_not?: Array; + + /** + * At least one condition must match (OR) + */ + should?: Array; + } + + export namespace Filters { + export interface Must { + /** + * Metadata field name + */ + field: string; + + /** + * Comparison operator + */ + operator: 'eq' | 'ne' | 'gt' | 'gte' | 'lt' | 'lte' | 'in' | 'not_in' | 'contains'; + + /** + * Value to compare against (type depends on field) + */ + value: string | number | boolean | Array; + } + + export interface MustNot { + /** + * Metadata field name + */ + field: string; + + /** + * Comparison operator + */ + operator: 'eq' | 'ne' | 'gt' | 'gte' | 'lt' | 'lte' | 'in' | 'not_in' | 'contains'; + + /** + * Value to compare against (type depends on field) + */ + value: string | number | boolean | Array; + } + + export interface Should { + /** + * Metadata field name + */ + field: string; + + /** + * Comparison operator + */ + operator: 'eq' | 'ne' | 'gt' | 'gte' | 'lt' | 'lte' | 'in' | 'not_in' | 'contains'; + + /** + * Value to compare against (type depends on field) + */ + value: string | number | boolean | Array; + } + } +} + +export declare namespace Retrieve { + export { + type RetrieveDocumentsResponse as RetrieveDocumentsResponse, + type RetrieveDocumentsParams as RetrieveDocumentsParams + }; +} diff --git a/src/resources/shared.ts b/src/resources/shared.ts index 3633e973..28827a5f 100644 --- a/src/resources/shared.ts +++ b/src/resources/shared.ts @@ -353,6 +353,21 @@ export namespace ChatCompletionTokenLogprob { * Usage statistics for the completion request. */ export interface CompletionUsage { + /** + * Number of prompt tokens written to cache. + */ + cache_created_input_tokens: number; + + /** + * Breakdown of prompt tokens written to cache. + */ + cache_creation: CompletionUsage.CacheCreation; + + /** + * Number of prompt tokens read from cache. + */ + cache_read_input_tokens: number; + /** * Number of tokens in the generated completion. */ @@ -369,6 +384,604 @@ export interface CompletionUsage { total_tokens: number; } +export namespace CompletionUsage { + /** + * Breakdown of prompt tokens written to cache. + */ + export interface CacheCreation { + /** + * Number of prompt tokens written to 1h cache. + */ + ephemeral_1h_input_tokens: number; + + /** + * Number of prompt tokens written to 5m cache. + */ + ephemeral_5m_input_tokens: number; + } +} + +/** + * Represents a text-to-text response returned by the model, based on the provided + * input. VLLM models only. + */ +export interface CreateResponseResponse { + /** + * A unique identifier for the response. + */ + id: string; + + /** + * The Unix timestamp (in seconds) of when the response was created. + */ + created: number; + + /** + * The model used to generate the response. + */ + model: string; + + /** + * The object type, which is always `response`. + */ + object: 'response'; + + /** + * Detailed token usage statistics for the request, including input/output token + * counts and detailed breakdowns. + */ + usage: CreateResponseResponse.Usage; + + /** + * Whether the request was processed in the background + */ + background?: boolean | null; + + /** + * A list of response choices. Can be more than one if `n` is greater than 1. + * Optional - Responses API primarily uses the output array. + */ + choices?: Array | null; + + /** + * Input messages (if applicable) + */ + input_messages?: Array | null; + + /** + * Maximum output tokens setting + */ + max_output_tokens?: number | null; + + /** + * Maximum tool calls setting + */ + max_tool_calls?: number | null; + + /** + * An array of content items generated by the model. This includes text content, + * function calls, reasoning items, and other output types. Use this field for + * Responses API compatibility. + */ + output?: Array; + + /** + * Output messages (if applicable) + */ + output_messages?: Array | null; + + /** + * Whether parallel tool calls are enabled + */ + parallel_tool_calls?: boolean | null; + + /** + * Previous response ID (for multi-turn conversations) + */ + previous_response_id?: string | null; + + /** + * Prompt used for the response + */ + prompt?: string | null; + + /** + * Reasoning content + */ + reasoning?: string | null; + + /** + * Service tier used + */ + service_tier?: string | null; + + /** + * Status of the response + */ + status?: string | null; + + /** + * Temperature setting used for the response + */ + temperature?: number | null; + + /** + * Text content + */ + text?: string | null; + + /** + * Tool choice setting used for the response + */ + tool_choice?: string | null; + + /** + * Tools available for the response + */ + tools?: Array | null; + + /** + * Top logprobs setting + */ + top_logprobs?: number | null; + + /** + * Top-p setting used for the response + */ + top_p?: number | null; + + /** + * Truncation setting + */ + truncation?: string | null; + + /** + * User identifier + */ + user?: string | null; +} + +export namespace CreateResponseResponse { + /** + * Detailed token usage statistics for the request, including input/output token + * counts and detailed breakdowns. + */ + export interface Usage { + /** + * The number of input tokens. + */ + input_tokens: number; + + /** + * A detailed breakdown of the input tokens. + */ + input_tokens_details: Usage.InputTokensDetails; + + /** + * The number of output tokens. + */ + output_tokens: number; + + /** + * A detailed breakdown of the output tokens. + */ + output_tokens_details: Usage.OutputTokensDetails; + + /** + * The total number of tokens used. + */ + total_tokens: number; + } + + export namespace Usage { + /** + * A detailed breakdown of the input tokens. + */ + export interface InputTokensDetails { + /** + * The number of tokens that were retrieved from the cache. + * [More on prompt caching](https://platform.openai.com/docs/guides/prompt-caching). + */ + cached_tokens: number; + } + + /** + * A detailed breakdown of the output tokens. + */ + export interface OutputTokensDetails { + /** + * The number of reasoning tokens. + */ + reasoning_tokens: number; + + /** + * The number of tool output tokens. + */ + tool_output_tokens: number; + } + } + + export interface Choice { + /** + * The reason the model stopped generating tokens. This will be `stop` if the model + * hit a natural stop point or a provided stop sequence, `length` if the maximum + * number of tokens specified in the request was reached, or `tool_calls` if the + * model called a tool. + */ + finish_reason: 'stop' | 'length' | 'tool_calls' | 'content_filter'; + + /** + * The index of the choice in the list of choices. + */ + index: number; + + /** + * The generated message response. + */ + message: Choice.Message; + + /** + * Log probability information for the choice. Only present if logprobs was + * requested in the request. + */ + logprobs?: Choice.Logprobs | null; + } + + export namespace Choice { + /** + * The generated message response. + */ + export interface Message { + /** + * The generated text content. + */ + content?: string; + + /** + * The role of the message author, which is always `assistant`. + */ + role?: 'assistant'; + + /** + * The tool calls generated by the model, such as function calls. + */ + tool_calls?: Array; + } + + export namespace Message { + export interface ToolCall { + /** + * The ID of the tool call. + */ + id: string; + + /** + * The function that the model called. + */ + function: ToolCall.Function; + + /** + * The type of the tool. Currently, only `function` is supported. + */ + type: 'function'; + } + + export namespace ToolCall { + /** + * The function that the model called. + */ + export interface Function { + /** + * The arguments to call the function with, as generated by the model in JSON + * format. Note that the model does not always generate valid JSON, and may + * hallucinate parameters not defined by your function schema. Validate the + * arguments in your code before calling your function. + */ + arguments: string; + + /** + * The name of the function to call. + */ + name: string; + } + } + } + + /** + * Log probability information for the choice. Only present if logprobs was + * requested in the request. + */ + export interface Logprobs { + /** + * A list of message content tokens with log probability information. + */ + content: Array | null; + } + } + + export interface UnionMember0 { + /** + * JSON string of function arguments + */ + arguments: string; + + /** + * The unique ID of the function tool call + */ + call_id: string; + + /** + * The name of the function to call + */ + name: string; + + /** + * The type of output item + */ + type: 'function_call'; + + /** + * The unique ID of the function tool call (same as call_id) + */ + id?: string; + + /** + * Encrypted content (optional) + */ + encrypted_content?: string | null; + + /** + * Status of the item (optional, can be null) + */ + status?: string | null; + } + + export interface UnionMember1 { + /** + * The text content + */ + text: string; + + /** + * The type of output item + */ + type: 'text'; + } + + export interface UnionMember2 { + /** + * The unique ID of the reasoning item + */ + id: string; + + /** + * Array of reasoning content parts + */ + content: Array; + + /** + * Summary of the reasoning (usually empty) + */ + summary: Array; + + /** + * The type of output item + */ + type: 'reasoning'; + + /** + * Encrypted content (optional) + */ + encrypted_content?: string | null; + + /** + * Status of the item (optional, can be null) + */ + status?: string | null; + } + + export namespace UnionMember2 { + export interface Content { + /** + * The reasoning text content + */ + text: string; + + /** + * The type of content + */ + type: 'reasoning_text'; + } + } + + /** + * Tool definition for Responses API (flat format). This format is used by VLLM's + * Responses API where name, description, and parameters are at the top level of + * the tool object. + */ + export interface Tool { + /** + * The type of the tool. Supported values are `function` (custom tools), + * `web_search`, and `web_search_2025_08_26` (built-in web search). + */ + type: 'function' | 'web_search' | 'web_search_2025_08_26'; + + /** + * A description of what the function does, used by the model to choose when and + * how to call the function. + */ + description?: string; + + /** + * The name of the function to be called. Must be a-z, A-Z, 0-9, or contain + * underscores and dashes, with a maximum length of 64. + */ + name?: string; + + /** + * The parameters the functions accepts, described as a JSON Schema object. See the + * [guide](/docs/guides/function-calling) for examples, and the + * [JSON Schema reference](https://json-schema.org/understanding-json-schema/) for + * documentation about the format. + * + * Omitting `parameters` defines a function with an empty parameter list. + */ + parameters?: { [key: string]: unknown }; + } +} + +/** + * Represents a streamed chunk of a text-to-text response returned by the model, + * based on the provided input. VLLM models only. + */ +export interface CreateResponseStreamResponse { + /** + * A unique identifier for the response. Each chunk has the same ID. + */ + id: string; + + /** + * A list of response choice chunks. Can contain more than one element if `n` is + * greater than 1. Can also be empty for the last chunk if you set + * `stream_options: {"include_usage": true}`. + */ + choices: Array; + + /** + * The Unix timestamp (in seconds) of when the response was created. Each chunk has + * the same timestamp. + */ + created: number; + + /** + * The model used to generate the response. + */ + model: string; + + /** + * The object type, which is always `response.chunk`. + */ + object: 'response.chunk'; + + /** + * An optional field that will only be present when you set + * `stream_options: {"include_usage": true}` in your request. When present, it + * contains a null value **except for the last chunk** which contains the token + * usage statistics for the entire request. **NOTE:** If the stream is interrupted + * or cancelled, you may not receive the final usage chunk which contains the total + * token usage for the request. + */ + usage?: CompletionUsage | null; +} + +export namespace CreateResponseStreamResponse { + export interface Choice { + /** + * A chunk of the response message generated by the model. + */ + delta: Choice.Delta; + + /** + * The index of the choice in the list of choices. + */ + index: number; + + /** + * The reason the model stopped generating tokens. This will be `stop` if the model + * hit a natural stop point or a provided stop sequence, `length` if the maximum + * number of tokens specified in the request was reached, or `tool_calls` if the + * model called a tool. Only present in the final chunk. + */ + finish_reason?: 'stop' | 'length' | 'tool_calls' | 'content_filter' | null; + + /** + * Log probability information for the choice. Only present if logprobs was + * requested in the request. + */ + logprobs?: Choice.Logprobs | null; + } + + export namespace Choice { + /** + * A chunk of the response message generated by the model. + */ + export interface Delta { + /** + * The contents of the chunk message. Can be null for chunks with tool calls or + * other non-text content. + */ + content?: string | null; + + /** + * The reasoning content generated by the model. Only present when the model + * generates reasoning text. + */ + reasoning_content?: string | null; + + /** + * The role of the message author. Only present in the first chunk. + */ + role?: 'assistant' | null; + + /** + * The tool calls generated by the model, such as function calls. Only present when + * the model decides to call a tool. + */ + tool_calls?: Array | null; + } + + export namespace Delta { + export interface ToolCall { + /** + * The ID of the tool call. + */ + id: string; + + /** + * The function that the model called. + */ + function: ToolCall.Function; + + /** + * The type of the tool. Currently, only `function` is supported. + */ + type: 'function'; + } + + export namespace ToolCall { + /** + * The function that the model called. + */ + export interface Function { + /** + * The arguments to call the function with, as generated by the model in JSON + * format. Note that the model does not always generate valid JSON, and may + * hallucinate parameters not defined by your function schema. Validate the + * arguments in your code before calling your function. + */ + arguments: string; + + /** + * The name of the function to call. + */ + name: string; + } + } + } + + /** + * Log probability information for the choice. Only present if logprobs was + * requested in the request. + */ + export interface Logprobs { + /** + * A list of message content tokens with log probability information. + */ + content: Array | null; + } + } +} + export interface DiskInfo { size?: DiskInfo.Size; @@ -626,15 +1239,7 @@ export interface GarbageCollection { /** * The current status of this garbage collection. */ - status?: - | 'requested' - | 'waiting for write JWTs to expire' - | 'scanning manifests' - | 'deleting unreferenced blobs' - | 'cancelling' - | 'failed' - | 'succeeded' - | 'cancelled'; + status?: 'requested' | 'waiting for write JWTs to expire' | 'scanning manifests' | 'deleting unreferenced blobs' | 'cancelling' | 'failed' | 'succeeded' | 'cancelled'; /** * The time the garbage collection was last updated. @@ -703,20 +1308,7 @@ export interface Image { * `Unknown`. Any other value will be accepted but ignored, and `Unknown` will be * used in its place. */ - distribution?: - | 'Arch Linux' - | 'CentOS' - | 'CoreOS' - | 'Debian' - | 'Fedora' - | 'Fedora Atomic' - | 'FreeBSD' - | 'Gentoo' - | 'openSUSE' - | 'RancherOS' - | 'Rocky Linux' - | 'Ubuntu' - | 'Unknown'; + distribution?: 'Arch Linux' | 'CentOS' | 'CoreOS' | 'Debian' | 'Fedora' | 'Fedora Atomic' | 'FreeBSD' | 'Gentoo' | 'openSUSE' | 'RancherOS' | 'Rocky Linux' | 'Ubuntu' | 'Unknown'; /** * A string containing information about errors that may occur when importing a @@ -746,23 +1338,7 @@ export interface Image { * This attribute is an array of the regions that the image is available in. The * regions are represented by their identifying slug values. */ - regions?: Array< - | 'ams1' - | 'ams2' - | 'ams3' - | 'blr1' - | 'fra1' - | 'lon1' - | 'nyc1' - | 'nyc2' - | 'nyc3' - | 'sfo1' - | 'sfo2' - | 'sfo3' - | 'sgp1' - | 'tor1' - | 'syd1' - >; + regions?: Array<'ams1' | 'ams2' | 'ams3' | 'blr1' | 'fra1' | 'lon1' | 'nyc1' | 'nyc2' | 'nyc3' | 'sfo1' | 'sfo2' | 'sfo3' | 'sgp1' | 'tor1' | 'syd1'>; /** * The size of the image in gigabytes. @@ -937,7 +1513,7 @@ export interface ImageGenPartialImageEvent { /** * Emitted when a partial image is available during image generation streaming. */ -export type ImageGenStreamEvent = ImageGenPartialImageEvent | ImageGenCompletedEvent; +export type ImageGenStreamEvent = ImageGenPartialImageEvent | ImageGenCompletedEvent /** * @deprecated **Note**: All Droplets created after March 2017 use internal kernels diff --git a/src/streaming.ts b/src/streaming.ts index 9e6da106..17085360 100644 --- a/src/streaming.ts +++ b/src/streaming.ts @@ -1,2 +1,2 @@ /** @deprecated Import from ./core/streaming instead */ -export * from './core/streaming'; +export * from "./core/streaming" \ No newline at end of file diff --git a/src/uploads.ts b/src/uploads.ts index b2ef6471..d5437085 100644 --- a/src/uploads.ts +++ b/src/uploads.ts @@ -1,2 +1,2 @@ /** @deprecated Import from ./core/uploads instead */ -export * from './core/uploads'; +export * from "./core/uploads" \ No newline at end of file diff --git a/src/version.ts b/src/version.ts index a528f635..c6a4d2ae 100644 --- a/src/version.ts +++ b/src/version.ts @@ -1 +1 @@ -export const VERSION = '0.1.0-alpha.2'; // x-release-please-version +export const VERSION = '0.1.0-alpha.3';// x-release-please-version diff --git a/tests/api-resources/agents/agents.test.ts b/tests/api-resources/agents/agents.test.ts index f2994600..1e70ff08 100644 --- a/tests/api-resources/agents/agents.test.ts +++ b/tests/api-resources/agents/agents.test.ts @@ -2,13 +2,10 @@ import Gradient from '@digitalocean/gradient'; -const client = new Gradient({ - accessToken: 'My Access Token', - baseURL: process.env['TEST_API_BASE_URL'] ?? 'http://127.0.0.1:4010', -}); +const client = new Gradient({ accessToken: 'My Access Token', baseURL: process.env["TEST_API_BASE_URL"] ?? 'http://127.0.0.1:4010' }); describe('resource agents', () => { - // Prism tests are disabled + // Mock server tests are disabled test.skip('create', async () => { const responsePromise = client.agents.create(); const rawResponse = await responsePromise.asResponse(); @@ -20,29 +17,28 @@ describe('resource agents', () => { expect(dataAndResponse.response).toBe(rawResponse); }); - // Prism tests are disabled + // Mock server tests are disabled test.skip('create: request options and params are passed correctly', async () => { // ensure the request options are being passed correctly by passing an invalid HTTP method in order to cause an error - await expect( - client.agents.create( - { - anthropic_key_uuid: '"12345678-1234-1234-1234-123456789012"', - description: '"My Agent Description"', - instruction: '"You are an agent who thinks deeply about the world"', - knowledge_base_uuid: ['example string'], - model_uuid: '"12345678-1234-1234-1234-123456789012"', - name: '"My Agent"', - open_ai_key_uuid: '"12345678-1234-1234-1234-123456789012"', - project_id: '"12345678-1234-1234-1234-123456789012"', - region: '"tor1"', - tags: ['example string'], - }, - { path: '/_stainless_unknown_path' }, - ), - ).rejects.toThrow(Gradient.NotFoundError); + await expect(client.agents.create({ + anthropic_key_uuid: '"12345678-1234-1234-1234-123456789012"', + description: '"My Agent Description"', + instruction: '"You are an agent who thinks deeply about the world"', + knowledge_base_uuid: ['example string'], + model_provider_key_uuid: '"12345678-1234-1234-1234-123456789012"', + model_uuid: '"12345678-1234-1234-1234-123456789012"', + name: '"My Agent"', + open_ai_key_uuid: '"12345678-1234-1234-1234-123456789012"', + project_id: '"12345678-1234-1234-1234-123456789012"', + region: '"tor1"', + tags: ['example string'], + workspace_uuid: '123e4567-e89b-12d3-a456-426614174000', + }, { path: '/_stainless_unknown_path' })) + .rejects + .toThrow(Gradient.NotFoundError); }); - // Prism tests are disabled + // Mock server tests are disabled test.skip('retrieve', async () => { const responsePromise = client.agents.retrieve('"123e4567-e89b-12d3-a456-426614174000"'); const rawResponse = await responsePromise.asResponse(); @@ -54,7 +50,7 @@ describe('resource agents', () => { expect(dataAndResponse.response).toBe(rawResponse); }); - // Prism tests are disabled + // Mock server tests are disabled test.skip('update', async () => { const responsePromise = client.agents.update('"123e4567-e89b-12d3-a456-426614174000"'); const rawResponse = await responsePromise.asResponse(); @@ -66,37 +62,35 @@ describe('resource agents', () => { expect(dataAndResponse.response).toBe(rawResponse); }); - // Prism tests are disabled + // Mock server tests are disabled test.skip('update: request options and params are passed correctly', async () => { // ensure the request options are being passed correctly by passing an invalid HTTP method in order to cause an error - await expect( - client.agents.update( - '"123e4567-e89b-12d3-a456-426614174000"', - { - agent_log_insights_enabled: true, - anthropic_key_uuid: '"12345678-1234-1234-1234-123456789012"', - conversation_logs_enabled: true, - description: '"My Agent Description"', - instruction: '"You are an agent who thinks deeply about the world"', - k: 5, - max_tokens: 100, - model_uuid: '"12345678-1234-1234-1234-123456789012"', - name: '"My New Agent Name"', - open_ai_key_uuid: '"12345678-1234-1234-1234-123456789012"', - project_id: '"12345678-1234-1234-1234-123456789012"', - provide_citations: true, - retrieval_method: 'RETRIEVAL_METHOD_UNKNOWN', - tags: ['example string'], - temperature: 0.7, - top_p: 0.9, - body_uuid: '"12345678-1234-1234-1234-123456789012"', - }, - { path: '/_stainless_unknown_path' }, - ), - ).rejects.toThrow(Gradient.NotFoundError); + await expect(client.agents.update('"123e4567-e89b-12d3-a456-426614174000"', { + agent_log_insights_enabled: true, + allowed_domains: ['example string'], + anthropic_key_uuid: '"12345678-1234-1234-1234-123456789012"', + conversation_logs_enabled: true, + description: '"My Agent Description"', + instruction: '"You are an agent who thinks deeply about the world"', + k: 5, + max_tokens: 100, + model_provider_key_uuid: '"12345678-1234-1234-1234-123456789012"', + model_uuid: '"12345678-1234-1234-1234-123456789012"', + name: '"My New Agent Name"', + open_ai_key_uuid: '"12345678-1234-1234-1234-123456789012"', + project_id: '"12345678-1234-1234-1234-123456789012"', + provide_citations: true, + retrieval_method: 'RETRIEVAL_METHOD_UNKNOWN', + tags: ['example string'], + temperature: 0.7, + top_p: 0.9, + uuid: '"12345678-1234-1234-1234-123456789012"', + }, { path: '/_stainless_unknown_path' })) + .rejects + .toThrow(Gradient.NotFoundError); }); - // Prism tests are disabled + // Mock server tests are disabled test.skip('list', async () => { const responsePromise = client.agents.list(); const rawResponse = await responsePromise.asResponse(); @@ -108,15 +102,19 @@ describe('resource agents', () => { expect(dataAndResponse.response).toBe(rawResponse); }); - // Prism tests are disabled + // Mock server tests are disabled test.skip('list: request options and params are passed correctly', async () => { // ensure the request options are being passed correctly by passing an invalid HTTP method in order to cause an error - await expect( - client.agents.list({ only_deployed: true, page: 0, per_page: 0 }, { path: '/_stainless_unknown_path' }), - ).rejects.toThrow(Gradient.NotFoundError); + await expect(client.agents.list({ + only_deployed: true, + page: 0, + per_page: 0, + }, { path: '/_stainless_unknown_path' })) + .rejects + .toThrow(Gradient.NotFoundError); }); - // Prism tests are disabled + // Mock server tests are disabled test.skip('delete', async () => { const responsePromise = client.agents.delete('"123e4567-e89b-12d3-a456-426614174000"'); const rawResponse = await responsePromise.asResponse(); @@ -128,7 +126,7 @@ describe('resource agents', () => { expect(dataAndResponse.response).toBe(rawResponse); }); - // Prism tests are disabled + // Mock server tests are disabled test.skip('retrieveUsage', async () => { const responsePromise = client.agents.retrieveUsage('"123e4567-e89b-12d3-a456-426614174000"'); const rawResponse = await responsePromise.asResponse(); @@ -140,19 +138,15 @@ describe('resource agents', () => { expect(dataAndResponse.response).toBe(rawResponse); }); - // Prism tests are disabled + // Mock server tests are disabled test.skip('retrieveUsage: request options and params are passed correctly', async () => { // ensure the request options are being passed correctly by passing an invalid HTTP method in order to cause an error - await expect( - client.agents.retrieveUsage( - '"123e4567-e89b-12d3-a456-426614174000"', - { start: 'start', stop: 'stop' }, - { path: '/_stainless_unknown_path' }, - ), - ).rejects.toThrow(Gradient.NotFoundError); + await expect(client.agents.retrieveUsage('"123e4567-e89b-12d3-a456-426614174000"', { start: 'start', stop: 'stop' }, { path: '/_stainless_unknown_path' })) + .rejects + .toThrow(Gradient.NotFoundError); }); - // Prism tests are disabled + // Mock server tests are disabled test.skip('updateStatus', async () => { const responsePromise = client.agents.updateStatus('"123e4567-e89b-12d3-a456-426614174000"'); const rawResponse = await responsePromise.asResponse(); @@ -164,15 +158,11 @@ describe('resource agents', () => { expect(dataAndResponse.response).toBe(rawResponse); }); - // Prism tests are disabled + // Mock server tests are disabled test.skip('updateStatus: request options and params are passed correctly', async () => { // ensure the request options are being passed correctly by passing an invalid HTTP method in order to cause an error - await expect( - client.agents.updateStatus( - '"123e4567-e89b-12d3-a456-426614174000"', - { body_uuid: '"12345678-1234-1234-1234-123456789012"', visibility: 'VISIBILITY_UNKNOWN' }, - { path: '/_stainless_unknown_path' }, - ), - ).rejects.toThrow(Gradient.NotFoundError); + await expect(client.agents.updateStatus('"123e4567-e89b-12d3-a456-426614174000"', { uuid: '"12345678-1234-1234-1234-123456789012"', visibility: 'VISIBILITY_UNKNOWN' }, { path: '/_stainless_unknown_path' })) + .rejects + .toThrow(Gradient.NotFoundError); }); }); diff --git a/tests/api-resources/agents/api-keys.test.ts b/tests/api-resources/agents/api-keys.test.ts index e7cf0511..2953fede 100644 --- a/tests/api-resources/agents/api-keys.test.ts +++ b/tests/api-resources/agents/api-keys.test.ts @@ -2,13 +2,10 @@ import Gradient from '@digitalocean/gradient'; -const client = new Gradient({ - accessToken: 'My Access Token', - baseURL: process.env['TEST_API_BASE_URL'] ?? 'http://127.0.0.1:4010', -}); +const client = new Gradient({ accessToken: 'My Access Token', baseURL: process.env["TEST_API_BASE_URL"] ?? 'http://127.0.0.1:4010' }); describe('resource apiKeys', () => { - // Prism tests are disabled + // Mock server tests are disabled test.skip('create', async () => { const responsePromise = client.agents.apiKeys.create('"123e4567-e89b-12d3-a456-426614174000"'); const rawResponse = await responsePromise.asResponse(); @@ -20,23 +17,17 @@ describe('resource apiKeys', () => { expect(dataAndResponse.response).toBe(rawResponse); }); - // Prism tests are disabled + // Mock server tests are disabled test.skip('create: request options and params are passed correctly', async () => { // ensure the request options are being passed correctly by passing an invalid HTTP method in order to cause an error - await expect( - client.agents.apiKeys.create( - '"123e4567-e89b-12d3-a456-426614174000"', - { body_agent_uuid: '"12345678-1234-1234-1234-123456789012"', name: 'Production Key' }, - { path: '/_stainless_unknown_path' }, - ), - ).rejects.toThrow(Gradient.NotFoundError); + await expect(client.agents.apiKeys.create('"123e4567-e89b-12d3-a456-426614174000"', { agent_uuid: '"12345678-1234-1234-1234-123456789012"', name: 'Production Key' }, { path: '/_stainless_unknown_path' })) + .rejects + .toThrow(Gradient.NotFoundError); }); - // Prism tests are disabled + // Mock server tests are disabled test.skip('update: only required params', async () => { - const responsePromise = client.agents.apiKeys.update('"123e4567-e89b-12d3-a456-426614174000"', { - path_agent_uuid: '"123e4567-e89b-12d3-a456-426614174000"', - }); + const responsePromise = client.agents.apiKeys.update('"123e4567-e89b-12d3-a456-426614174000"', { path_agent_uuid: '"123e4567-e89b-12d3-a456-426614174000"' }); const rawResponse = await responsePromise.asResponse(); expect(rawResponse).toBeInstanceOf(Response); const response = await responsePromise; @@ -46,17 +37,17 @@ describe('resource apiKeys', () => { expect(dataAndResponse.response).toBe(rawResponse); }); - // Prism tests are disabled + // Mock server tests are disabled test.skip('update: required and optional params', async () => { const response = await client.agents.apiKeys.update('"123e4567-e89b-12d3-a456-426614174000"', { - path_agent_uuid: '"123e4567-e89b-12d3-a456-426614174000"', - body_agent_uuid: '"12345678-1234-1234-1234-123456789012"', - body_api_key_uuid: '"12345678-1234-1234-1234-123456789012"', - name: '"Production Key"', - }); + path_agent_uuid: '"123e4567-e89b-12d3-a456-426614174000"', + body_agent_uuid: '"12345678-1234-1234-1234-123456789012"', + api_key_uuid: '"12345678-1234-1234-1234-123456789012"', + name: '"Production Key"', + }); }); - // Prism tests are disabled + // Mock server tests are disabled test.skip('list', async () => { const responsePromise = client.agents.apiKeys.list('"123e4567-e89b-12d3-a456-426614174000"'); const rawResponse = await responsePromise.asResponse(); @@ -68,23 +59,17 @@ describe('resource apiKeys', () => { expect(dataAndResponse.response).toBe(rawResponse); }); - // Prism tests are disabled + // Mock server tests are disabled test.skip('list: request options and params are passed correctly', async () => { // ensure the request options are being passed correctly by passing an invalid HTTP method in order to cause an error - await expect( - client.agents.apiKeys.list( - '"123e4567-e89b-12d3-a456-426614174000"', - { page: 0, per_page: 0 }, - { path: '/_stainless_unknown_path' }, - ), - ).rejects.toThrow(Gradient.NotFoundError); + await expect(client.agents.apiKeys.list('"123e4567-e89b-12d3-a456-426614174000"', { page: 0, per_page: 0 }, { path: '/_stainless_unknown_path' })) + .rejects + .toThrow(Gradient.NotFoundError); }); - // Prism tests are disabled + // Mock server tests are disabled test.skip('delete: only required params', async () => { - const responsePromise = client.agents.apiKeys.delete('"123e4567-e89b-12d3-a456-426614174000"', { - agent_uuid: '"123e4567-e89b-12d3-a456-426614174000"', - }); + const responsePromise = client.agents.apiKeys.delete('"123e4567-e89b-12d3-a456-426614174000"', { agent_uuid: '"123e4567-e89b-12d3-a456-426614174000"' }); const rawResponse = await responsePromise.asResponse(); expect(rawResponse).toBeInstanceOf(Response); const response = await responsePromise; @@ -94,18 +79,14 @@ describe('resource apiKeys', () => { expect(dataAndResponse.response).toBe(rawResponse); }); - // Prism tests are disabled + // Mock server tests are disabled test.skip('delete: required and optional params', async () => { - const response = await client.agents.apiKeys.delete('"123e4567-e89b-12d3-a456-426614174000"', { - agent_uuid: '"123e4567-e89b-12d3-a456-426614174000"', - }); + const response = await client.agents.apiKeys.delete('"123e4567-e89b-12d3-a456-426614174000"', { agent_uuid: '"123e4567-e89b-12d3-a456-426614174000"' }); }); - // Prism tests are disabled + // Mock server tests are disabled test.skip('regenerate: only required params', async () => { - const responsePromise = client.agents.apiKeys.regenerate('"123e4567-e89b-12d3-a456-426614174000"', { - agent_uuid: '"123e4567-e89b-12d3-a456-426614174000"', - }); + const responsePromise = client.agents.apiKeys.regenerate('"123e4567-e89b-12d3-a456-426614174000"', { agent_uuid: '"123e4567-e89b-12d3-a456-426614174000"' }); const rawResponse = await responsePromise.asResponse(); expect(rawResponse).toBeInstanceOf(Response); const response = await responsePromise; @@ -115,10 +96,8 @@ describe('resource apiKeys', () => { expect(dataAndResponse.response).toBe(rawResponse); }); - // Prism tests are disabled + // Mock server tests are disabled test.skip('regenerate: required and optional params', async () => { - const response = await client.agents.apiKeys.regenerate('"123e4567-e89b-12d3-a456-426614174000"', { - agent_uuid: '"123e4567-e89b-12d3-a456-426614174000"', - }); + const response = await client.agents.apiKeys.regenerate('"123e4567-e89b-12d3-a456-426614174000"', { agent_uuid: '"123e4567-e89b-12d3-a456-426614174000"' }); }); }); diff --git a/tests/api-resources/agents/chat/completions.test.ts b/tests/api-resources/agents/chat/completions.test.ts index 4981bcb2..547a87cb 100644 --- a/tests/api-resources/agents/chat/completions.test.ts +++ b/tests/api-resources/agents/chat/completions.test.ts @@ -2,18 +2,12 @@ import Gradient from '@digitalocean/gradient'; -const client = new Gradient({ - accessToken: 'My Access Token', - baseURL: process.env['TEST_API_BASE_URL'] ?? 'http://127.0.0.1:4010', -}); +const client = new Gradient({ accessToken: 'My Access Token', baseURL: process.env["TEST_API_BASE_URL"] ?? 'http://127.0.0.1:4010' }); describe('resource completions', () => { - // Prism tests are disabled + // Mock server tests are disabled test.skip('create: only required params', async () => { - const responsePromise = client.agents.chat.completions.create({ - messages: [{ content: 'string', role: 'system' }], - model: 'llama3-8b-instruct', - }); + const responsePromise = client.agents.chat.completions.create({ messages: [{ content: 'string', role: 'system' }], model: 'llama3-8b-instruct' }); const rawResponse = await responsePromise.asResponse(); expect(rawResponse).toBeInstanceOf(Response); const response = await responsePromise; @@ -23,33 +17,36 @@ describe('resource completions', () => { expect(dataAndResponse.response).toBe(rawResponse); }); - // Prism tests are disabled + // Mock server tests are disabled test.skip('create: required and optional params', async () => { const response = await client.agents.chat.completions.create({ - messages: [{ content: 'string', role: 'system' }], - model: 'llama3-8b-instruct', - frequency_penalty: -2, - logit_bias: { foo: 0 }, - logprobs: true, - max_completion_tokens: 256, - max_tokens: 0, - metadata: { foo: 'string' }, - n: 1, - presence_penalty: -2, - stop: '\n', - stream: false, - stream_options: { include_usage: true }, - temperature: 1, - tool_choice: 'none', - tools: [ - { - function: { name: 'name', description: 'description', parameters: { foo: 'bar' } }, - type: 'function', - }, - ], - top_logprobs: 0, - top_p: 1, - user: 'user-1234', - }); + messages: [{ content: 'string', role: 'system' }], + model: 'llama3-8b-instruct', + frequency_penalty: -2, + logit_bias: { foo: 0 }, + logprobs: true, + max_completion_tokens: 256, + max_tokens: 0, + metadata: { foo: 'string' }, + n: 1, + presence_penalty: -2, + reasoning_effort: 'none', + stop: '\n', + stream: false, + stream_options: { include_usage: true }, + temperature: 1, + tool_choice: 'none', + tools: [{ + function: { + name: 'name', + description: 'description', + parameters: { foo: 'bar' }, + }, + type: 'function', + }], + top_logprobs: 0, + top_p: 1, + user: 'user-1234', + }); }); }); diff --git a/tests/api-resources/agents/evaluation-datasets.test.ts b/tests/api-resources/agents/evaluation-datasets.test.ts index 53fbc661..dde47a75 100644 --- a/tests/api-resources/agents/evaluation-datasets.test.ts +++ b/tests/api-resources/agents/evaluation-datasets.test.ts @@ -2,13 +2,10 @@ import Gradient from '@digitalocean/gradient'; -const client = new Gradient({ - accessToken: 'My Access Token', - baseURL: process.env['TEST_API_BASE_URL'] ?? 'http://127.0.0.1:4010', -}); +const client = new Gradient({ accessToken: 'My Access Token', baseURL: process.env["TEST_API_BASE_URL"] ?? 'http://127.0.0.1:4010' }); describe('resource evaluationDatasets', () => { - // Prism tests are disabled + // Mock server tests are disabled test.skip('create', async () => { const responsePromise = client.agents.evaluationDatasets.create(); const rawResponse = await responsePromise.asResponse(); @@ -20,25 +17,23 @@ describe('resource evaluationDatasets', () => { expect(dataAndResponse.response).toBe(rawResponse); }); - // Prism tests are disabled + // Mock server tests are disabled test.skip('create: request options and params are passed correctly', async () => { // ensure the request options are being passed correctly by passing an invalid HTTP method in order to cause an error - await expect( - client.agents.evaluationDatasets.create( - { - file_upload_dataset: { - original_file_name: 'example name', - size_in_bytes: '12345', - stored_object_key: 'example string', - }, - name: 'example name', - }, - { path: '/_stainless_unknown_path' }, - ), - ).rejects.toThrow(Gradient.NotFoundError); + await expect(client.agents.evaluationDatasets.create({ + dataset_type: 'EVALUATION_DATASET_TYPE_UNKNOWN', + file_upload_dataset: { + original_file_name: 'example name', + size_in_bytes: '12345', + stored_object_key: 'example string', + }, + name: 'example name', + }, { path: '/_stainless_unknown_path' })) + .rejects + .toThrow(Gradient.NotFoundError); }); - // Prism tests are disabled + // Mock server tests are disabled test.skip('createFileUploadPresignedURLs', async () => { const responsePromise = client.agents.evaluationDatasets.createFileUploadPresignedURLs(); const rawResponse = await responsePromise.asResponse(); @@ -50,14 +45,11 @@ describe('resource evaluationDatasets', () => { expect(dataAndResponse.response).toBe(rawResponse); }); - // Prism tests are disabled + // Mock server tests are disabled test.skip('createFileUploadPresignedURLs: request options and params are passed correctly', async () => { // ensure the request options are being passed correctly by passing an invalid HTTP method in order to cause an error - await expect( - client.agents.evaluationDatasets.createFileUploadPresignedURLs( - { files: [{ file_name: 'example name', file_size: 'file_size' }] }, - { path: '/_stainless_unknown_path' }, - ), - ).rejects.toThrow(Gradient.NotFoundError); + await expect(client.agents.evaluationDatasets.createFileUploadPresignedURLs({ files: [{ file_name: 'example name', file_size: 'file_size' }] }, { path: '/_stainless_unknown_path' })) + .rejects + .toThrow(Gradient.NotFoundError); }); }); diff --git a/tests/api-resources/agents/evaluation-metrics/anthropic/keys.test.ts b/tests/api-resources/agents/evaluation-metrics/anthropic/keys.test.ts index 5c967174..7337ce4b 100644 --- a/tests/api-resources/agents/evaluation-metrics/anthropic/keys.test.ts +++ b/tests/api-resources/agents/evaluation-metrics/anthropic/keys.test.ts @@ -2,13 +2,10 @@ import Gradient from '@digitalocean/gradient'; -const client = new Gradient({ - accessToken: 'My Access Token', - baseURL: process.env['TEST_API_BASE_URL'] ?? 'http://127.0.0.1:4010', -}); +const client = new Gradient({ accessToken: 'My Access Token', baseURL: process.env["TEST_API_BASE_URL"] ?? 'http://127.0.0.1:4010' }); describe('resource keys', () => { - // Prism tests are disabled + // Mock server tests are disabled test.skip('create', async () => { const responsePromise = client.agents.evaluationMetrics.anthropic.keys.create(); const rawResponse = await responsePromise.asResponse(); @@ -20,22 +17,17 @@ describe('resource keys', () => { expect(dataAndResponse.response).toBe(rawResponse); }); - // Prism tests are disabled + // Mock server tests are disabled test.skip('create: request options and params are passed correctly', async () => { // ensure the request options are being passed correctly by passing an invalid HTTP method in order to cause an error - await expect( - client.agents.evaluationMetrics.anthropic.keys.create( - { api_key: '"sk-ant-12345678901234567890123456789012"', name: '"Production Key"' }, - { path: '/_stainless_unknown_path' }, - ), - ).rejects.toThrow(Gradient.NotFoundError); + await expect(client.agents.evaluationMetrics.anthropic.keys.create({ api_key: '"sk-ant-12345678901234567890123456789012"', name: '"Production Key"' }, { path: '/_stainless_unknown_path' })) + .rejects + .toThrow(Gradient.NotFoundError); }); - // Prism tests are disabled + // Mock server tests are disabled test.skip('retrieve', async () => { - const responsePromise = client.agents.evaluationMetrics.anthropic.keys.retrieve( - '"123e4567-e89b-12d3-a456-426614174000"', - ); + const responsePromise = client.agents.evaluationMetrics.anthropic.keys.retrieve('"123e4567-e89b-12d3-a456-426614174000"'); const rawResponse = await responsePromise.asResponse(); expect(rawResponse).toBeInstanceOf(Response); const response = await responsePromise; @@ -45,11 +37,9 @@ describe('resource keys', () => { expect(dataAndResponse.response).toBe(rawResponse); }); - // Prism tests are disabled + // Mock server tests are disabled test.skip('update', async () => { - const responsePromise = client.agents.evaluationMetrics.anthropic.keys.update( - '"123e4567-e89b-12d3-a456-426614174000"', - ); + const responsePromise = client.agents.evaluationMetrics.anthropic.keys.update('"123e4567-e89b-12d3-a456-426614174000"'); const rawResponse = await responsePromise.asResponse(); expect(rawResponse).toBeInstanceOf(Response); const response = await responsePromise; @@ -59,23 +49,19 @@ describe('resource keys', () => { expect(dataAndResponse.response).toBe(rawResponse); }); - // Prism tests are disabled + // Mock server tests are disabled test.skip('update: request options and params are passed correctly', async () => { // ensure the request options are being passed correctly by passing an invalid HTTP method in order to cause an error - await expect( - client.agents.evaluationMetrics.anthropic.keys.update( - '"123e4567-e89b-12d3-a456-426614174000"', - { - api_key: '"sk-ant-12345678901234567890123456789012"', - body_api_key_uuid: '"12345678-1234-1234-1234-123456789012"', - name: '"Production Key"', - }, - { path: '/_stainless_unknown_path' }, - ), - ).rejects.toThrow(Gradient.NotFoundError); + await expect(client.agents.evaluationMetrics.anthropic.keys.update('"123e4567-e89b-12d3-a456-426614174000"', { + api_key: '"sk-ant-12345678901234567890123456789012"', + api_key_uuid: '"12345678-1234-1234-1234-123456789012"', + name: '"Production Key"', + }, { path: '/_stainless_unknown_path' })) + .rejects + .toThrow(Gradient.NotFoundError); }); - // Prism tests are disabled + // Mock server tests are disabled test.skip('list', async () => { const responsePromise = client.agents.evaluationMetrics.anthropic.keys.list(); const rawResponse = await responsePromise.asResponse(); @@ -87,22 +73,17 @@ describe('resource keys', () => { expect(dataAndResponse.response).toBe(rawResponse); }); - // Prism tests are disabled + // Mock server tests are disabled test.skip('list: request options and params are passed correctly', async () => { // ensure the request options are being passed correctly by passing an invalid HTTP method in order to cause an error - await expect( - client.agents.evaluationMetrics.anthropic.keys.list( - { page: 0, per_page: 0 }, - { path: '/_stainless_unknown_path' }, - ), - ).rejects.toThrow(Gradient.NotFoundError); + await expect(client.agents.evaluationMetrics.anthropic.keys.list({ page: 0, per_page: 0 }, { path: '/_stainless_unknown_path' })) + .rejects + .toThrow(Gradient.NotFoundError); }); - // Prism tests are disabled + // Mock server tests are disabled test.skip('delete', async () => { - const responsePromise = client.agents.evaluationMetrics.anthropic.keys.delete( - '"123e4567-e89b-12d3-a456-426614174000"', - ); + const responsePromise = client.agents.evaluationMetrics.anthropic.keys.delete('"123e4567-e89b-12d3-a456-426614174000"'); const rawResponse = await responsePromise.asResponse(); expect(rawResponse).toBeInstanceOf(Response); const response = await responsePromise; @@ -112,11 +93,9 @@ describe('resource keys', () => { expect(dataAndResponse.response).toBe(rawResponse); }); - // Prism tests are disabled + // Mock server tests are disabled test.skip('listAgents', async () => { - const responsePromise = client.agents.evaluationMetrics.anthropic.keys.listAgents( - '"123e4567-e89b-12d3-a456-426614174000"', - ); + const responsePromise = client.agents.evaluationMetrics.anthropic.keys.listAgents('"123e4567-e89b-12d3-a456-426614174000"'); const rawResponse = await responsePromise.asResponse(); expect(rawResponse).toBeInstanceOf(Response); const response = await responsePromise; @@ -126,15 +105,11 @@ describe('resource keys', () => { expect(dataAndResponse.response).toBe(rawResponse); }); - // Prism tests are disabled + // Mock server tests are disabled test.skip('listAgents: request options and params are passed correctly', async () => { // ensure the request options are being passed correctly by passing an invalid HTTP method in order to cause an error - await expect( - client.agents.evaluationMetrics.anthropic.keys.listAgents( - '"123e4567-e89b-12d3-a456-426614174000"', - { page: 0, per_page: 0 }, - { path: '/_stainless_unknown_path' }, - ), - ).rejects.toThrow(Gradient.NotFoundError); + await expect(client.agents.evaluationMetrics.anthropic.keys.listAgents('"123e4567-e89b-12d3-a456-426614174000"', { page: 0, per_page: 0 }, { path: '/_stainless_unknown_path' })) + .rejects + .toThrow(Gradient.NotFoundError); }); }); diff --git a/tests/api-resources/agents/evaluation-metrics/evaluation-metrics.test.ts b/tests/api-resources/agents/evaluation-metrics/evaluation-metrics.test.ts index 20670f25..6721adc9 100644 --- a/tests/api-resources/agents/evaluation-metrics/evaluation-metrics.test.ts +++ b/tests/api-resources/agents/evaluation-metrics/evaluation-metrics.test.ts @@ -2,13 +2,10 @@ import Gradient from '@digitalocean/gradient'; -const client = new Gradient({ - accessToken: 'My Access Token', - baseURL: process.env['TEST_API_BASE_URL'] ?? 'http://127.0.0.1:4010', -}); +const client = new Gradient({ accessToken: 'My Access Token', baseURL: process.env["TEST_API_BASE_URL"] ?? 'http://127.0.0.1:4010' }); describe('resource evaluationMetrics', () => { - // Prism tests are disabled + // Mock server tests are disabled test.skip('list', async () => { const responsePromise = client.agents.evaluationMetrics.list(); const rawResponse = await responsePromise.asResponse(); @@ -20,7 +17,7 @@ describe('resource evaluationMetrics', () => { expect(dataAndResponse.response).toBe(rawResponse); }); - // Prism tests are disabled + // Mock server tests are disabled test.skip('listRegions', async () => { const responsePromise = client.agents.evaluationMetrics.listRegions(); const rawResponse = await responsePromise.asResponse(); @@ -32,14 +29,11 @@ describe('resource evaluationMetrics', () => { expect(dataAndResponse.response).toBe(rawResponse); }); - // Prism tests are disabled + // Mock server tests are disabled test.skip('listRegions: request options and params are passed correctly', async () => { // ensure the request options are being passed correctly by passing an invalid HTTP method in order to cause an error - await expect( - client.agents.evaluationMetrics.listRegions( - { serves_batch: true, serves_inference: true }, - { path: '/_stainless_unknown_path' }, - ), - ).rejects.toThrow(Gradient.NotFoundError); + await expect(client.agents.evaluationMetrics.listRegions({ serves_batch: true, serves_inference: true }, { path: '/_stainless_unknown_path' })) + .rejects + .toThrow(Gradient.NotFoundError); }); }); diff --git a/tests/api-resources/agents/evaluation-metrics/models.test.ts b/tests/api-resources/agents/evaluation-metrics/models.test.ts deleted file mode 100644 index fcc84253..00000000 --- a/tests/api-resources/agents/evaluation-metrics/models.test.ts +++ /dev/null @@ -1,33 +0,0 @@ -// File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details. - -import Gradient from '@digitalocean/gradient'; - -const client = new Gradient({ - accessToken: 'My Access Token', - baseURL: process.env['TEST_API_BASE_URL'] ?? 'http://127.0.0.1:4010', -}); - -describe('resource models', () => { - // Prism tests are disabled - test.skip('list', async () => { - const responsePromise = client.agents.evaluationMetrics.models.list(); - const rawResponse = await responsePromise.asResponse(); - expect(rawResponse).toBeInstanceOf(Response); - const response = await responsePromise; - expect(response).not.toBeInstanceOf(Response); - const dataAndResponse = await responsePromise.withResponse(); - expect(dataAndResponse.data).toBe(response); - expect(dataAndResponse.response).toBe(rawResponse); - }); - - // Prism tests are disabled - test.skip('list: request options and params are passed correctly', async () => { - // ensure the request options are being passed correctly by passing an invalid HTTP method in order to cause an error - await expect( - client.agents.evaluationMetrics.models.list( - { page: 0, per_page: 0, public_only: true, usecases: ['MODEL_USECASE_UNKNOWN'] }, - { path: '/_stainless_unknown_path' }, - ), - ).rejects.toThrow(Gradient.NotFoundError); - }); -}); diff --git a/tests/api-resources/agents/evaluation-metrics/oauth2/dropbox.test.ts b/tests/api-resources/agents/evaluation-metrics/oauth2/dropbox.test.ts index b4d0e13c..e76cce10 100644 --- a/tests/api-resources/agents/evaluation-metrics/oauth2/dropbox.test.ts +++ b/tests/api-resources/agents/evaluation-metrics/oauth2/dropbox.test.ts @@ -2,13 +2,10 @@ import Gradient from '@digitalocean/gradient'; -const client = new Gradient({ - accessToken: 'My Access Token', - baseURL: process.env['TEST_API_BASE_URL'] ?? 'http://127.0.0.1:4010', -}); +const client = new Gradient({ accessToken: 'My Access Token', baseURL: process.env["TEST_API_BASE_URL"] ?? 'http://127.0.0.1:4010' }); describe('resource dropbox', () => { - // Prism tests are disabled + // Mock server tests are disabled test.skip('createTokens', async () => { const responsePromise = client.agents.evaluationMetrics.oauth2.dropbox.createTokens(); const rawResponse = await responsePromise.asResponse(); @@ -20,14 +17,11 @@ describe('resource dropbox', () => { expect(dataAndResponse.response).toBe(rawResponse); }); - // Prism tests are disabled + // Mock server tests are disabled test.skip('createTokens: request options and params are passed correctly', async () => { // ensure the request options are being passed correctly by passing an invalid HTTP method in order to cause an error - await expect( - client.agents.evaluationMetrics.oauth2.dropbox.createTokens( - { code: 'example string', redirect_url: 'example string' }, - { path: '/_stainless_unknown_path' }, - ), - ).rejects.toThrow(Gradient.NotFoundError); + await expect(client.agents.evaluationMetrics.oauth2.dropbox.createTokens({ code: 'example string', redirect_url: 'example string' }, { path: '/_stainless_unknown_path' })) + .rejects + .toThrow(Gradient.NotFoundError); }); }); diff --git a/tests/api-resources/agents/evaluation-metrics/oauth2/oauth2.test.ts b/tests/api-resources/agents/evaluation-metrics/oauth2/oauth2.test.ts index cb353f15..0f81c4e7 100644 --- a/tests/api-resources/agents/evaluation-metrics/oauth2/oauth2.test.ts +++ b/tests/api-resources/agents/evaluation-metrics/oauth2/oauth2.test.ts @@ -2,13 +2,10 @@ import Gradient from '@digitalocean/gradient'; -const client = new Gradient({ - accessToken: 'My Access Token', - baseURL: process.env['TEST_API_BASE_URL'] ?? 'http://127.0.0.1:4010', -}); +const client = new Gradient({ accessToken: 'My Access Token', baseURL: process.env["TEST_API_BASE_URL"] ?? 'http://127.0.0.1:4010' }); describe('resource oauth2', () => { - // Prism tests are disabled + // Mock server tests are disabled test.skip('generateURL', async () => { const responsePromise = client.agents.evaluationMetrics.oauth2.generateURL(); const rawResponse = await responsePromise.asResponse(); @@ -20,14 +17,11 @@ describe('resource oauth2', () => { expect(dataAndResponse.response).toBe(rawResponse); }); - // Prism tests are disabled + // Mock server tests are disabled test.skip('generateURL: request options and params are passed correctly', async () => { // ensure the request options are being passed correctly by passing an invalid HTTP method in order to cause an error - await expect( - client.agents.evaluationMetrics.oauth2.generateURL( - { redirect_url: 'redirect_url', type: 'type' }, - { path: '/_stainless_unknown_path' }, - ), - ).rejects.toThrow(Gradient.NotFoundError); + await expect(client.agents.evaluationMetrics.oauth2.generateURL({ redirect_url: 'redirect_url', type: 'type' }, { path: '/_stainless_unknown_path' })) + .rejects + .toThrow(Gradient.NotFoundError); }); }); diff --git a/tests/api-resources/agents/evaluation-metrics/openai/keys.test.ts b/tests/api-resources/agents/evaluation-metrics/openai/keys.test.ts index 33063249..92dcc42d 100644 --- a/tests/api-resources/agents/evaluation-metrics/openai/keys.test.ts +++ b/tests/api-resources/agents/evaluation-metrics/openai/keys.test.ts @@ -2,13 +2,10 @@ import Gradient from '@digitalocean/gradient'; -const client = new Gradient({ - accessToken: 'My Access Token', - baseURL: process.env['TEST_API_BASE_URL'] ?? 'http://127.0.0.1:4010', -}); +const client = new Gradient({ accessToken: 'My Access Token', baseURL: process.env["TEST_API_BASE_URL"] ?? 'http://127.0.0.1:4010' }); describe('resource keys', () => { - // Prism tests are disabled + // Mock server tests are disabled test.skip('create', async () => { const responsePromise = client.agents.evaluationMetrics.openai.keys.create(); const rawResponse = await responsePromise.asResponse(); @@ -20,22 +17,17 @@ describe('resource keys', () => { expect(dataAndResponse.response).toBe(rawResponse); }); - // Prism tests are disabled + // Mock server tests are disabled test.skip('create: request options and params are passed correctly', async () => { // ensure the request options are being passed correctly by passing an invalid HTTP method in order to cause an error - await expect( - client.agents.evaluationMetrics.openai.keys.create( - { api_key: '"sk-proj--123456789098765432123456789"', name: '"Production Key"' }, - { path: '/_stainless_unknown_path' }, - ), - ).rejects.toThrow(Gradient.NotFoundError); + await expect(client.agents.evaluationMetrics.openai.keys.create({ api_key: '"sk-proj--123456789098765432123456789"', name: '"Production Key"' }, { path: '/_stainless_unknown_path' })) + .rejects + .toThrow(Gradient.NotFoundError); }); - // Prism tests are disabled + // Mock server tests are disabled test.skip('retrieve', async () => { - const responsePromise = client.agents.evaluationMetrics.openai.keys.retrieve( - '"123e4567-e89b-12d3-a456-426614174000"', - ); + const responsePromise = client.agents.evaluationMetrics.openai.keys.retrieve('"123e4567-e89b-12d3-a456-426614174000"'); const rawResponse = await responsePromise.asResponse(); expect(rawResponse).toBeInstanceOf(Response); const response = await responsePromise; @@ -45,11 +37,9 @@ describe('resource keys', () => { expect(dataAndResponse.response).toBe(rawResponse); }); - // Prism tests are disabled + // Mock server tests are disabled test.skip('update', async () => { - const responsePromise = client.agents.evaluationMetrics.openai.keys.update( - '"123e4567-e89b-12d3-a456-426614174000"', - ); + const responsePromise = client.agents.evaluationMetrics.openai.keys.update('"123e4567-e89b-12d3-a456-426614174000"'); const rawResponse = await responsePromise.asResponse(); expect(rawResponse).toBeInstanceOf(Response); const response = await responsePromise; @@ -59,23 +49,19 @@ describe('resource keys', () => { expect(dataAndResponse.response).toBe(rawResponse); }); - // Prism tests are disabled + // Mock server tests are disabled test.skip('update: request options and params are passed correctly', async () => { // ensure the request options are being passed correctly by passing an invalid HTTP method in order to cause an error - await expect( - client.agents.evaluationMetrics.openai.keys.update( - '"123e4567-e89b-12d3-a456-426614174000"', - { - api_key: '"sk-ant-12345678901234567890123456789012"', - body_api_key_uuid: '"12345678-1234-1234-1234-123456789012"', - name: '"Production Key"', - }, - { path: '/_stainless_unknown_path' }, - ), - ).rejects.toThrow(Gradient.NotFoundError); + await expect(client.agents.evaluationMetrics.openai.keys.update('"123e4567-e89b-12d3-a456-426614174000"', { + api_key: '"sk-ant-12345678901234567890123456789012"', + api_key_uuid: '"12345678-1234-1234-1234-123456789012"', + name: '"Production Key"', + }, { path: '/_stainless_unknown_path' })) + .rejects + .toThrow(Gradient.NotFoundError); }); - // Prism tests are disabled + // Mock server tests are disabled test.skip('list', async () => { const responsePromise = client.agents.evaluationMetrics.openai.keys.list(); const rawResponse = await responsePromise.asResponse(); @@ -87,22 +73,17 @@ describe('resource keys', () => { expect(dataAndResponse.response).toBe(rawResponse); }); - // Prism tests are disabled + // Mock server tests are disabled test.skip('list: request options and params are passed correctly', async () => { // ensure the request options are being passed correctly by passing an invalid HTTP method in order to cause an error - await expect( - client.agents.evaluationMetrics.openai.keys.list( - { page: 0, per_page: 0 }, - { path: '/_stainless_unknown_path' }, - ), - ).rejects.toThrow(Gradient.NotFoundError); + await expect(client.agents.evaluationMetrics.openai.keys.list({ page: 0, per_page: 0 }, { path: '/_stainless_unknown_path' })) + .rejects + .toThrow(Gradient.NotFoundError); }); - // Prism tests are disabled + // Mock server tests are disabled test.skip('delete', async () => { - const responsePromise = client.agents.evaluationMetrics.openai.keys.delete( - '"123e4567-e89b-12d3-a456-426614174000"', - ); + const responsePromise = client.agents.evaluationMetrics.openai.keys.delete('"123e4567-e89b-12d3-a456-426614174000"'); const rawResponse = await responsePromise.asResponse(); expect(rawResponse).toBeInstanceOf(Response); const response = await responsePromise; @@ -112,11 +93,9 @@ describe('resource keys', () => { expect(dataAndResponse.response).toBe(rawResponse); }); - // Prism tests are disabled + // Mock server tests are disabled test.skip('listAgents', async () => { - const responsePromise = client.agents.evaluationMetrics.openai.keys.listAgents( - '"123e4567-e89b-12d3-a456-426614174000"', - ); + const responsePromise = client.agents.evaluationMetrics.openai.keys.listAgents('"123e4567-e89b-12d3-a456-426614174000"'); const rawResponse = await responsePromise.asResponse(); expect(rawResponse).toBeInstanceOf(Response); const response = await responsePromise; @@ -126,15 +105,11 @@ describe('resource keys', () => { expect(dataAndResponse.response).toBe(rawResponse); }); - // Prism tests are disabled + // Mock server tests are disabled test.skip('listAgents: request options and params are passed correctly', async () => { // ensure the request options are being passed correctly by passing an invalid HTTP method in order to cause an error - await expect( - client.agents.evaluationMetrics.openai.keys.listAgents( - '"123e4567-e89b-12d3-a456-426614174000"', - { page: 0, per_page: 0 }, - { path: '/_stainless_unknown_path' }, - ), - ).rejects.toThrow(Gradient.NotFoundError); + await expect(client.agents.evaluationMetrics.openai.keys.listAgents('"123e4567-e89b-12d3-a456-426614174000"', { page: 0, per_page: 0 }, { path: '/_stainless_unknown_path' })) + .rejects + .toThrow(Gradient.NotFoundError); }); }); diff --git a/tests/api-resources/agents/evaluation-metrics/scheduled-indexing.test.ts b/tests/api-resources/agents/evaluation-metrics/scheduled-indexing.test.ts new file mode 100644 index 00000000..74008ca2 --- /dev/null +++ b/tests/api-resources/agents/evaluation-metrics/scheduled-indexing.test.ts @@ -0,0 +1,55 @@ +// File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details. + +import Gradient from '@digitalocean/gradient'; + +const client = new Gradient({ accessToken: 'My Access Token', baseURL: process.env["TEST_API_BASE_URL"] ?? 'http://127.0.0.1:4010' }); + +describe('resource scheduledIndexing', () => { + // Mock server tests are disabled + test.skip('create', async () => { + const responsePromise = client.agents.evaluationMetrics.scheduledIndexing.create(); + const rawResponse = await responsePromise.asResponse(); + expect(rawResponse).toBeInstanceOf(Response); + const response = await responsePromise; + expect(response).not.toBeInstanceOf(Response); + const dataAndResponse = await responsePromise.withResponse(); + expect(dataAndResponse.data).toBe(response); + expect(dataAndResponse.response).toBe(rawResponse); + }); + + // Mock server tests are disabled + test.skip('create: request options and params are passed correctly', async () => { + // ensure the request options are being passed correctly by passing an invalid HTTP method in order to cause an error + await expect(client.agents.evaluationMetrics.scheduledIndexing.create({ + days: [123], + knowledge_base_uuid: '123e4567-e89b-12d3-a456-426614174000', + time: 'example string', + }, { path: '/_stainless_unknown_path' })) + .rejects + .toThrow(Gradient.NotFoundError); + }); + + // Mock server tests are disabled + test.skip('retrieve', async () => { + const responsePromise = client.agents.evaluationMetrics.scheduledIndexing.retrieve('"123e4567-e89b-12d3-a456-426614174000"'); + const rawResponse = await responsePromise.asResponse(); + expect(rawResponse).toBeInstanceOf(Response); + const response = await responsePromise; + expect(response).not.toBeInstanceOf(Response); + const dataAndResponse = await responsePromise.withResponse(); + expect(dataAndResponse.data).toBe(response); + expect(dataAndResponse.response).toBe(rawResponse); + }); + + // Mock server tests are disabled + test.skip('delete', async () => { + const responsePromise = client.agents.evaluationMetrics.scheduledIndexing.delete('"123e4567-e89b-12d3-a456-426614174000"'); + const rawResponse = await responsePromise.asResponse(); + expect(rawResponse).toBeInstanceOf(Response); + const response = await responsePromise; + expect(response).not.toBeInstanceOf(Response); + const dataAndResponse = await responsePromise.withResponse(); + expect(dataAndResponse.data).toBe(response); + expect(dataAndResponse.response).toBe(rawResponse); + }); +}); diff --git a/tests/api-resources/agents/evaluation-metrics/workspaces/agents.test.ts b/tests/api-resources/agents/evaluation-metrics/workspaces/agents.test.ts index f05d5945..93e50d6a 100644 --- a/tests/api-resources/agents/evaluation-metrics/workspaces/agents.test.ts +++ b/tests/api-resources/agents/evaluation-metrics/workspaces/agents.test.ts @@ -2,17 +2,12 @@ import Gradient from '@digitalocean/gradient'; -const client = new Gradient({ - accessToken: 'My Access Token', - baseURL: process.env['TEST_API_BASE_URL'] ?? 'http://127.0.0.1:4010', -}); +const client = new Gradient({ accessToken: 'My Access Token', baseURL: process.env["TEST_API_BASE_URL"] ?? 'http://127.0.0.1:4010' }); describe('resource agents', () => { - // Prism tests are disabled + // Mock server tests are disabled test.skip('list', async () => { - const responsePromise = client.agents.evaluationMetrics.workspaces.agents.list( - '"123e4567-e89b-12d3-a456-426614174000"', - ); + const responsePromise = client.agents.evaluationMetrics.workspaces.agents.list('"123e4567-e89b-12d3-a456-426614174000"'); const rawResponse = await responsePromise.asResponse(); expect(rawResponse).toBeInstanceOf(Response); const response = await responsePromise; @@ -22,23 +17,21 @@ describe('resource agents', () => { expect(dataAndResponse.response).toBe(rawResponse); }); - // Prism tests are disabled + // Mock server tests are disabled test.skip('list: request options and params are passed correctly', async () => { // ensure the request options are being passed correctly by passing an invalid HTTP method in order to cause an error - await expect( - client.agents.evaluationMetrics.workspaces.agents.list( - '"123e4567-e89b-12d3-a456-426614174000"', - { only_deployed: true, page: 0, per_page: 0 }, - { path: '/_stainless_unknown_path' }, - ), - ).rejects.toThrow(Gradient.NotFoundError); + await expect(client.agents.evaluationMetrics.workspaces.agents.list('"123e4567-e89b-12d3-a456-426614174000"', { + only_deployed: true, + page: 0, + per_page: 0, + }, { path: '/_stainless_unknown_path' })) + .rejects + .toThrow(Gradient.NotFoundError); }); - // Prism tests are disabled + // Mock server tests are disabled test.skip('move', async () => { - const responsePromise = client.agents.evaluationMetrics.workspaces.agents.move( - '"123e4567-e89b-12d3-a456-426614174000"', - ); + const responsePromise = client.agents.evaluationMetrics.workspaces.agents.move('"123e4567-e89b-12d3-a456-426614174000"'); const rawResponse = await responsePromise.asResponse(); expect(rawResponse).toBeInstanceOf(Response); const response = await responsePromise; @@ -48,15 +41,11 @@ describe('resource agents', () => { expect(dataAndResponse.response).toBe(rawResponse); }); - // Prism tests are disabled + // Mock server tests are disabled test.skip('move: request options and params are passed correctly', async () => { // ensure the request options are being passed correctly by passing an invalid HTTP method in order to cause an error - await expect( - client.agents.evaluationMetrics.workspaces.agents.move( - '"123e4567-e89b-12d3-a456-426614174000"', - { agent_uuids: ['example string'], body_workspace_uuid: '123e4567-e89b-12d3-a456-426614174000' }, - { path: '/_stainless_unknown_path' }, - ), - ).rejects.toThrow(Gradient.NotFoundError); + await expect(client.agents.evaluationMetrics.workspaces.agents.move('"123e4567-e89b-12d3-a456-426614174000"', { agent_uuids: ['example string'], workspace_uuid: '123e4567-e89b-12d3-a456-426614174000' }, { path: '/_stainless_unknown_path' })) + .rejects + .toThrow(Gradient.NotFoundError); }); }); diff --git a/tests/api-resources/agents/evaluation-metrics/workspaces/workspaces.test.ts b/tests/api-resources/agents/evaluation-metrics/workspaces/workspaces.test.ts index 340d2839..ff9af86c 100644 --- a/tests/api-resources/agents/evaluation-metrics/workspaces/workspaces.test.ts +++ b/tests/api-resources/agents/evaluation-metrics/workspaces/workspaces.test.ts @@ -2,13 +2,10 @@ import Gradient from '@digitalocean/gradient'; -const client = new Gradient({ - accessToken: 'My Access Token', - baseURL: process.env['TEST_API_BASE_URL'] ?? 'http://127.0.0.1:4010', -}); +const client = new Gradient({ accessToken: 'My Access Token', baseURL: process.env["TEST_API_BASE_URL"] ?? 'http://127.0.0.1:4010' }); describe('resource workspaces', () => { - // Prism tests are disabled + // Mock server tests are disabled test.skip('create', async () => { const responsePromise = client.agents.evaluationMetrics.workspaces.create(); const rawResponse = await responsePromise.asResponse(); @@ -20,22 +17,21 @@ describe('resource workspaces', () => { expect(dataAndResponse.response).toBe(rawResponse); }); - // Prism tests are disabled + // Mock server tests are disabled test.skip('create: request options and params are passed correctly', async () => { // ensure the request options are being passed correctly by passing an invalid HTTP method in order to cause an error - await expect( - client.agents.evaluationMetrics.workspaces.create( - { agent_uuids: ['example string'], description: 'example string', name: 'example name' }, - { path: '/_stainless_unknown_path' }, - ), - ).rejects.toThrow(Gradient.NotFoundError); + await expect(client.agents.evaluationMetrics.workspaces.create({ + agent_uuids: ['example string'], + description: 'example string', + name: 'example name', + }, { path: '/_stainless_unknown_path' })) + .rejects + .toThrow(Gradient.NotFoundError); }); - // Prism tests are disabled + // Mock server tests are disabled test.skip('retrieve', async () => { - const responsePromise = client.agents.evaluationMetrics.workspaces.retrieve( - '"123e4567-e89b-12d3-a456-426614174000"', - ); + const responsePromise = client.agents.evaluationMetrics.workspaces.retrieve('"123e4567-e89b-12d3-a456-426614174000"'); const rawResponse = await responsePromise.asResponse(); expect(rawResponse).toBeInstanceOf(Response); const response = await responsePromise; @@ -45,11 +41,9 @@ describe('resource workspaces', () => { expect(dataAndResponse.response).toBe(rawResponse); }); - // Prism tests are disabled + // Mock server tests are disabled test.skip('update', async () => { - const responsePromise = client.agents.evaluationMetrics.workspaces.update( - '"123e4567-e89b-12d3-a456-426614174000"', - ); + const responsePromise = client.agents.evaluationMetrics.workspaces.update('"123e4567-e89b-12d3-a456-426614174000"'); const rawResponse = await responsePromise.asResponse(); expect(rawResponse).toBeInstanceOf(Response); const response = await responsePromise; @@ -59,23 +53,19 @@ describe('resource workspaces', () => { expect(dataAndResponse.response).toBe(rawResponse); }); - // Prism tests are disabled + // Mock server tests are disabled test.skip('update: request options and params are passed correctly', async () => { // ensure the request options are being passed correctly by passing an invalid HTTP method in order to cause an error - await expect( - client.agents.evaluationMetrics.workspaces.update( - '"123e4567-e89b-12d3-a456-426614174000"', - { - description: 'example string', - name: 'example name', - body_workspace_uuid: '123e4567-e89b-12d3-a456-426614174000', - }, - { path: '/_stainless_unknown_path' }, - ), - ).rejects.toThrow(Gradient.NotFoundError); + await expect(client.agents.evaluationMetrics.workspaces.update('"123e4567-e89b-12d3-a456-426614174000"', { + description: 'example string', + name: 'example name', + workspace_uuid: '123e4567-e89b-12d3-a456-426614174000', + }, { path: '/_stainless_unknown_path' })) + .rejects + .toThrow(Gradient.NotFoundError); }); - // Prism tests are disabled + // Mock server tests are disabled test.skip('list', async () => { const responsePromise = client.agents.evaluationMetrics.workspaces.list(); const rawResponse = await responsePromise.asResponse(); @@ -87,11 +77,9 @@ describe('resource workspaces', () => { expect(dataAndResponse.response).toBe(rawResponse); }); - // Prism tests are disabled + // Mock server tests are disabled test.skip('delete', async () => { - const responsePromise = client.agents.evaluationMetrics.workspaces.delete( - '"123e4567-e89b-12d3-a456-426614174000"', - ); + const responsePromise = client.agents.evaluationMetrics.workspaces.delete('"123e4567-e89b-12d3-a456-426614174000"'); const rawResponse = await responsePromise.asResponse(); expect(rawResponse).toBeInstanceOf(Response); const response = await responsePromise; @@ -101,11 +89,9 @@ describe('resource workspaces', () => { expect(dataAndResponse.response).toBe(rawResponse); }); - // Prism tests are disabled + // Mock server tests are disabled test.skip('listEvaluationTestCases', async () => { - const responsePromise = client.agents.evaluationMetrics.workspaces.listEvaluationTestCases( - '"123e4567-e89b-12d3-a456-426614174000"', - ); + const responsePromise = client.agents.evaluationMetrics.workspaces.listEvaluationTestCases('"123e4567-e89b-12d3-a456-426614174000"'); const rawResponse = await responsePromise.asResponse(); expect(rawResponse).toBeInstanceOf(Response); const response = await responsePromise; diff --git a/tests/api-resources/agents/evaluation-runs.test.ts b/tests/api-resources/agents/evaluation-runs.test.ts index 20aa8331..955f7465 100644 --- a/tests/api-resources/agents/evaluation-runs.test.ts +++ b/tests/api-resources/agents/evaluation-runs.test.ts @@ -2,13 +2,10 @@ import Gradient from '@digitalocean/gradient'; -const client = new Gradient({ - accessToken: 'My Access Token', - baseURL: process.env['TEST_API_BASE_URL'] ?? 'http://127.0.0.1:4010', -}); +const client = new Gradient({ accessToken: 'My Access Token', baseURL: process.env["TEST_API_BASE_URL"] ?? 'http://127.0.0.1:4010' }); describe('resource evaluationRuns', () => { - // Prism tests are disabled + // Mock server tests are disabled test.skip('create', async () => { const responsePromise = client.agents.evaluationRuns.create(); const rawResponse = await responsePromise.asResponse(); @@ -20,22 +17,20 @@ describe('resource evaluationRuns', () => { expect(dataAndResponse.response).toBe(rawResponse); }); - // Prism tests are disabled + // Mock server tests are disabled test.skip('create: request options and params are passed correctly', async () => { // ensure the request options are being passed correctly by passing an invalid HTTP method in order to cause an error - await expect( - client.agents.evaluationRuns.create( - { - agent_uuids: ['example string'], - run_name: 'Evaluation Run Name', - test_case_uuid: '"12345678-1234-1234-1234-123456789012"', - }, - { path: '/_stainless_unknown_path' }, - ), - ).rejects.toThrow(Gradient.NotFoundError); + await expect(client.agents.evaluationRuns.create({ + agent_deployment_names: ['example string'], + agent_uuids: ['example string'], + run_name: 'Evaluation Run Name', + test_case_uuid: '"12345678-1234-1234-1234-123456789012"', + }, { path: '/_stainless_unknown_path' })) + .rejects + .toThrow(Gradient.NotFoundError); }); - // Prism tests are disabled + // Mock server tests are disabled test.skip('retrieve', async () => { const responsePromise = client.agents.evaluationRuns.retrieve('"123e4567-e89b-12d3-a456-426614174000"'); const rawResponse = await responsePromise.asResponse(); @@ -47,11 +42,9 @@ describe('resource evaluationRuns', () => { expect(dataAndResponse.response).toBe(rawResponse); }); - // Prism tests are disabled + // Mock server tests are disabled test.skip('listResults', async () => { - const responsePromise = client.agents.evaluationRuns.listResults( - '"123e4567-e89b-12d3-a456-426614174000"', - ); + const responsePromise = client.agents.evaluationRuns.listResults('"123e4567-e89b-12d3-a456-426614174000"'); const rawResponse = await responsePromise.asResponse(); expect(rawResponse).toBeInstanceOf(Response); const response = await responsePromise; @@ -61,23 +54,17 @@ describe('resource evaluationRuns', () => { expect(dataAndResponse.response).toBe(rawResponse); }); - // Prism tests are disabled + // Mock server tests are disabled test.skip('listResults: request options and params are passed correctly', async () => { // ensure the request options are being passed correctly by passing an invalid HTTP method in order to cause an error - await expect( - client.agents.evaluationRuns.listResults( - '"123e4567-e89b-12d3-a456-426614174000"', - { page: 0, per_page: 0 }, - { path: '/_stainless_unknown_path' }, - ), - ).rejects.toThrow(Gradient.NotFoundError); + await expect(client.agents.evaluationRuns.listResults('"123e4567-e89b-12d3-a456-426614174000"', { page: 0, per_page: 0 }, { path: '/_stainless_unknown_path' })) + .rejects + .toThrow(Gradient.NotFoundError); }); - // Prism tests are disabled + // Mock server tests are disabled test.skip('retrieveResults: only required params', async () => { - const responsePromise = client.agents.evaluationRuns.retrieveResults(1, { - evaluation_run_uuid: '"123e4567-e89b-12d3-a456-426614174000"', - }); + const responsePromise = client.agents.evaluationRuns.retrieveResults(1, { evaluation_run_uuid: '"123e4567-e89b-12d3-a456-426614174000"' }); const rawResponse = await responsePromise.asResponse(); expect(rawResponse).toBeInstanceOf(Response); const response = await responsePromise; @@ -87,10 +74,8 @@ describe('resource evaluationRuns', () => { expect(dataAndResponse.response).toBe(rawResponse); }); - // Prism tests are disabled + // Mock server tests are disabled test.skip('retrieveResults: required and optional params', async () => { - const response = await client.agents.evaluationRuns.retrieveResults(1, { - evaluation_run_uuid: '"123e4567-e89b-12d3-a456-426614174000"', - }); + const response = await client.agents.evaluationRuns.retrieveResults(1, { evaluation_run_uuid: '"123e4567-e89b-12d3-a456-426614174000"' }); }); }); diff --git a/tests/api-resources/agents/evaluation-test-cases.test.ts b/tests/api-resources/agents/evaluation-test-cases.test.ts index e57a6b59..cfc56342 100644 --- a/tests/api-resources/agents/evaluation-test-cases.test.ts +++ b/tests/api-resources/agents/evaluation-test-cases.test.ts @@ -2,13 +2,10 @@ import Gradient from '@digitalocean/gradient'; -const client = new Gradient({ - accessToken: 'My Access Token', - baseURL: process.env['TEST_API_BASE_URL'] ?? 'http://127.0.0.1:4010', -}); +const client = new Gradient({ accessToken: 'My Access Token', baseURL: process.env["TEST_API_BASE_URL"] ?? 'http://127.0.0.1:4010' }); describe('resource evaluationTestCases', () => { - // Prism tests are disabled + // Mock server tests are disabled test.skip('create', async () => { const responsePromise = client.agents.evaluationTestCases.create(); const rawResponse = await responsePromise.asResponse(); @@ -20,34 +17,30 @@ describe('resource evaluationTestCases', () => { expect(dataAndResponse.response).toBe(rawResponse); }); - // Prism tests are disabled + // Mock server tests are disabled test.skip('create: request options and params are passed correctly', async () => { // ensure the request options are being passed correctly by passing an invalid HTTP method in order to cause an error - await expect( - client.agents.evaluationTestCases.create( - { - dataset_uuid: '123e4567-e89b-12d3-a456-426614174000', - description: 'example string', - metrics: ['example string'], - name: 'example name', - star_metric: { - metric_uuid: '123e4567-e89b-12d3-a456-426614174000', - name: 'example name', - success_threshold: 123, - success_threshold_pct: 123, - }, - workspace_uuid: '123e4567-e89b-12d3-a456-426614174000', - }, - { path: '/_stainless_unknown_path' }, - ), - ).rejects.toThrow(Gradient.NotFoundError); + await expect(client.agents.evaluationTestCases.create({ + agent_workspace_name: 'example name', + dataset_uuid: '123e4567-e89b-12d3-a456-426614174000', + description: 'example string', + metrics: ['example string'], + name: 'example name', + star_metric: { + metric_uuid: '123e4567-e89b-12d3-a456-426614174000', + name: 'example name', + success_threshold: 123, + success_threshold_pct: 123, + }, + workspace_uuid: '123e4567-e89b-12d3-a456-426614174000', + }, { path: '/_stainless_unknown_path' })) + .rejects + .toThrow(Gradient.NotFoundError); }); - // Prism tests are disabled + // Mock server tests are disabled test.skip('retrieve', async () => { - const responsePromise = client.agents.evaluationTestCases.retrieve( - '"123e4567-e89b-12d3-a456-426614174000"', - ); + const responsePromise = client.agents.evaluationTestCases.retrieve('"123e4567-e89b-12d3-a456-426614174000"'); const rawResponse = await responsePromise.asResponse(); expect(rawResponse).toBeInstanceOf(Response); const response = await responsePromise; @@ -57,23 +50,17 @@ describe('resource evaluationTestCases', () => { expect(dataAndResponse.response).toBe(rawResponse); }); - // Prism tests are disabled + // Mock server tests are disabled test.skip('retrieve: request options and params are passed correctly', async () => { // ensure the request options are being passed correctly by passing an invalid HTTP method in order to cause an error - await expect( - client.agents.evaluationTestCases.retrieve( - '"123e4567-e89b-12d3-a456-426614174000"', - { evaluation_test_case_version: 0 }, - { path: '/_stainless_unknown_path' }, - ), - ).rejects.toThrow(Gradient.NotFoundError); + await expect(client.agents.evaluationTestCases.retrieve('"123e4567-e89b-12d3-a456-426614174000"', { evaluation_test_case_version: 0 }, { path: '/_stainless_unknown_path' })) + .rejects + .toThrow(Gradient.NotFoundError); }); - // Prism tests are disabled + // Mock server tests are disabled test.skip('update', async () => { - const responsePromise = client.agents.evaluationTestCases.update( - '"123e4567-e89b-12d3-a456-426614174000"', - ); + const responsePromise = client.agents.evaluationTestCases.update('"123e4567-e89b-12d3-a456-426614174000"'); const rawResponse = await responsePromise.asResponse(); expect(rawResponse).toBeInstanceOf(Response); const response = await responsePromise; @@ -83,31 +70,27 @@ describe('resource evaluationTestCases', () => { expect(dataAndResponse.response).toBe(rawResponse); }); - // Prism tests are disabled + // Mock server tests are disabled test.skip('update: request options and params are passed correctly', async () => { // ensure the request options are being passed correctly by passing an invalid HTTP method in order to cause an error - await expect( - client.agents.evaluationTestCases.update( - '"123e4567-e89b-12d3-a456-426614174000"', - { - dataset_uuid: '123e4567-e89b-12d3-a456-426614174000', - description: 'example string', - metrics: { metric_uuids: ['example string'] }, - name: 'example name', - star_metric: { - metric_uuid: '123e4567-e89b-12d3-a456-426614174000', - name: 'example name', - success_threshold: 123, - success_threshold_pct: 123, - }, - body_test_case_uuid: '123e4567-e89b-12d3-a456-426614174000', - }, - { path: '/_stainless_unknown_path' }, - ), - ).rejects.toThrow(Gradient.NotFoundError); + await expect(client.agents.evaluationTestCases.update('"123e4567-e89b-12d3-a456-426614174000"', { + dataset_uuid: '123e4567-e89b-12d3-a456-426614174000', + description: 'example string', + metrics: { metric_uuids: ['example string'] }, + name: 'example name', + star_metric: { + metric_uuid: '123e4567-e89b-12d3-a456-426614174000', + name: 'example name', + success_threshold: 123, + success_threshold_pct: 123, + }, + test_case_uuid: '123e4567-e89b-12d3-a456-426614174000', + }, { path: '/_stainless_unknown_path' })) + .rejects + .toThrow(Gradient.NotFoundError); }); - // Prism tests are disabled + // Mock server tests are disabled test.skip('list', async () => { const responsePromise = client.agents.evaluationTestCases.list(); const rawResponse = await responsePromise.asResponse(); @@ -119,11 +102,9 @@ describe('resource evaluationTestCases', () => { expect(dataAndResponse.response).toBe(rawResponse); }); - // Prism tests are disabled + // Mock server tests are disabled test.skip('listEvaluationRuns', async () => { - const responsePromise = client.agents.evaluationTestCases.listEvaluationRuns( - '"123e4567-e89b-12d3-a456-426614174000"', - ); + const responsePromise = client.agents.evaluationTestCases.listEvaluationRuns('"123e4567-e89b-12d3-a456-426614174000"'); const rawResponse = await responsePromise.asResponse(); expect(rawResponse).toBeInstanceOf(Response); const response = await responsePromise; @@ -133,15 +114,11 @@ describe('resource evaluationTestCases', () => { expect(dataAndResponse.response).toBe(rawResponse); }); - // Prism tests are disabled + // Mock server tests are disabled test.skip('listEvaluationRuns: request options and params are passed correctly', async () => { // ensure the request options are being passed correctly by passing an invalid HTTP method in order to cause an error - await expect( - client.agents.evaluationTestCases.listEvaluationRuns( - '"123e4567-e89b-12d3-a456-426614174000"', - { evaluation_test_case_version: 0 }, - { path: '/_stainless_unknown_path' }, - ), - ).rejects.toThrow(Gradient.NotFoundError); + await expect(client.agents.evaluationTestCases.listEvaluationRuns('"123e4567-e89b-12d3-a456-426614174000"', { evaluation_test_case_version: 0 }, { path: '/_stainless_unknown_path' })) + .rejects + .toThrow(Gradient.NotFoundError); }); }); diff --git a/tests/api-resources/agents/functions.test.ts b/tests/api-resources/agents/functions.test.ts index 775389e3..2fd34027 100644 --- a/tests/api-resources/agents/functions.test.ts +++ b/tests/api-resources/agents/functions.test.ts @@ -2,13 +2,10 @@ import Gradient from '@digitalocean/gradient'; -const client = new Gradient({ - accessToken: 'My Access Token', - baseURL: process.env['TEST_API_BASE_URL'] ?? 'http://127.0.0.1:4010', -}); +const client = new Gradient({ accessToken: 'My Access Token', baseURL: process.env["TEST_API_BASE_URL"] ?? 'http://127.0.0.1:4010' }); describe('resource functions', () => { - // Prism tests are disabled + // Mock server tests are disabled test.skip('create', async () => { const responsePromise = client.agents.functions.create('"123e4567-e89b-12d3-a456-426614174000"'); const rawResponse = await responsePromise.asResponse(); @@ -20,31 +17,25 @@ describe('resource functions', () => { expect(dataAndResponse.response).toBe(rawResponse); }); - // Prism tests are disabled + // Mock server tests are disabled test.skip('create: request options and params are passed correctly', async () => { // ensure the request options are being passed correctly by passing an invalid HTTP method in order to cause an error - await expect( - client.agents.functions.create( - '"123e4567-e89b-12d3-a456-426614174000"', - { - body_agent_uuid: '"12345678-1234-1234-1234-123456789012"', - description: '"My Function Description"', - faas_name: '"my-function"', - faas_namespace: '"default"', - function_name: '"My Function"', - input_schema: {}, - output_schema: {}, - }, - { path: '/_stainless_unknown_path' }, - ), - ).rejects.toThrow(Gradient.NotFoundError); + await expect(client.agents.functions.create('"123e4567-e89b-12d3-a456-426614174000"', { + agent_uuid: '"12345678-1234-1234-1234-123456789012"', + description: '"My Function Description"', + faas_name: '"my-function"', + faas_namespace: '"default"', + function_name: '"My Function"', + input_schema: {}, + output_schema: {}, + }, { path: '/_stainless_unknown_path' })) + .rejects + .toThrow(Gradient.NotFoundError); }); - // Prism tests are disabled + // Mock server tests are disabled test.skip('update: only required params', async () => { - const responsePromise = client.agents.functions.update('"123e4567-e89b-12d3-a456-426614174000"', { - path_agent_uuid: '"123e4567-e89b-12d3-a456-426614174000"', - }); + const responsePromise = client.agents.functions.update('"123e4567-e89b-12d3-a456-426614174000"', { path_agent_uuid: '"123e4567-e89b-12d3-a456-426614174000"' }); const rawResponse = await responsePromise.asResponse(); expect(rawResponse).toBeInstanceOf(Response); const response = await responsePromise; @@ -54,26 +45,24 @@ describe('resource functions', () => { expect(dataAndResponse.response).toBe(rawResponse); }); - // Prism tests are disabled + // Mock server tests are disabled test.skip('update: required and optional params', async () => { const response = await client.agents.functions.update('"123e4567-e89b-12d3-a456-426614174000"', { - path_agent_uuid: '"123e4567-e89b-12d3-a456-426614174000"', - body_agent_uuid: '"12345678-1234-1234-1234-123456789012"', - description: '"My Function Description"', - faas_name: '"my-function"', - faas_namespace: '"default"', - function_name: '"My Function"', - body_function_uuid: '"12345678-1234-1234-1234-123456789012"', - input_schema: {}, - output_schema: {}, - }); + path_agent_uuid: '"123e4567-e89b-12d3-a456-426614174000"', + body_agent_uuid: '"12345678-1234-1234-1234-123456789012"', + description: '"My Function Description"', + faas_name: '"my-function"', + faas_namespace: '"default"', + function_name: '"My Function"', + function_uuid: '"12345678-1234-1234-1234-123456789012"', + input_schema: {}, + output_schema: {}, + }); }); - // Prism tests are disabled + // Mock server tests are disabled test.skip('delete: only required params', async () => { - const responsePromise = client.agents.functions.delete('"123e4567-e89b-12d3-a456-426614174000"', { - agent_uuid: '"123e4567-e89b-12d3-a456-426614174000"', - }); + const responsePromise = client.agents.functions.delete('"123e4567-e89b-12d3-a456-426614174000"', { agent_uuid: '"123e4567-e89b-12d3-a456-426614174000"' }); const rawResponse = await responsePromise.asResponse(); expect(rawResponse).toBeInstanceOf(Response); const response = await responsePromise; @@ -83,10 +72,8 @@ describe('resource functions', () => { expect(dataAndResponse.response).toBe(rawResponse); }); - // Prism tests are disabled + // Mock server tests are disabled test.skip('delete: required and optional params', async () => { - const response = await client.agents.functions.delete('"123e4567-e89b-12d3-a456-426614174000"', { - agent_uuid: '"123e4567-e89b-12d3-a456-426614174000"', - }); + const response = await client.agents.functions.delete('"123e4567-e89b-12d3-a456-426614174000"', { agent_uuid: '"123e4567-e89b-12d3-a456-426614174000"' }); }); }); diff --git a/tests/api-resources/agents/knowledge-bases.test.ts b/tests/api-resources/agents/knowledge-bases.test.ts index aa575f2c..6d58f1d5 100644 --- a/tests/api-resources/agents/knowledge-bases.test.ts +++ b/tests/api-resources/agents/knowledge-bases.test.ts @@ -2,13 +2,10 @@ import Gradient from '@digitalocean/gradient'; -const client = new Gradient({ - accessToken: 'My Access Token', - baseURL: process.env['TEST_API_BASE_URL'] ?? 'http://127.0.0.1:4010', -}); +const client = new Gradient({ accessToken: 'My Access Token', baseURL: process.env["TEST_API_BASE_URL"] ?? 'http://127.0.0.1:4010' }); describe('resource knowledgeBases', () => { - // Prism tests are disabled + // Mock server tests are disabled test.skip('attach', async () => { const responsePromise = client.agents.knowledgeBases.attach('"123e4567-e89b-12d3-a456-426614174000"'); const rawResponse = await responsePromise.asResponse(); @@ -20,12 +17,9 @@ describe('resource knowledgeBases', () => { expect(dataAndResponse.response).toBe(rawResponse); }); - // Prism tests are disabled + // Mock server tests are disabled test.skip('attachSingle: only required params', async () => { - const responsePromise = client.agents.knowledgeBases.attachSingle( - '"123e4567-e89b-12d3-a456-426614174000"', - { agent_uuid: '"123e4567-e89b-12d3-a456-426614174000"' }, - ); + const responsePromise = client.agents.knowledgeBases.attachSingle('"123e4567-e89b-12d3-a456-426614174000"', { agent_uuid: '"123e4567-e89b-12d3-a456-426614174000"' }); const rawResponse = await responsePromise.asResponse(); expect(rawResponse).toBeInstanceOf(Response); const response = await responsePromise; @@ -35,19 +29,14 @@ describe('resource knowledgeBases', () => { expect(dataAndResponse.response).toBe(rawResponse); }); - // Prism tests are disabled + // Mock server tests are disabled test.skip('attachSingle: required and optional params', async () => { - const response = await client.agents.knowledgeBases.attachSingle( - '"123e4567-e89b-12d3-a456-426614174000"', - { agent_uuid: '"123e4567-e89b-12d3-a456-426614174000"' }, - ); + const response = await client.agents.knowledgeBases.attachSingle('"123e4567-e89b-12d3-a456-426614174000"', { agent_uuid: '"123e4567-e89b-12d3-a456-426614174000"' }); }); - // Prism tests are disabled + // Mock server tests are disabled test.skip('detach: only required params', async () => { - const responsePromise = client.agents.knowledgeBases.detach('"123e4567-e89b-12d3-a456-426614174000"', { - agent_uuid: '"123e4567-e89b-12d3-a456-426614174000"', - }); + const responsePromise = client.agents.knowledgeBases.detach('"123e4567-e89b-12d3-a456-426614174000"', { agent_uuid: '"123e4567-e89b-12d3-a456-426614174000"' }); const rawResponse = await responsePromise.asResponse(); expect(rawResponse).toBeInstanceOf(Response); const response = await responsePromise; @@ -57,10 +46,8 @@ describe('resource knowledgeBases', () => { expect(dataAndResponse.response).toBe(rawResponse); }); - // Prism tests are disabled + // Mock server tests are disabled test.skip('detach: required and optional params', async () => { - const response = await client.agents.knowledgeBases.detach('"123e4567-e89b-12d3-a456-426614174000"', { - agent_uuid: '"123e4567-e89b-12d3-a456-426614174000"', - }); + const response = await client.agents.knowledgeBases.detach('"123e4567-e89b-12d3-a456-426614174000"', { agent_uuid: '"123e4567-e89b-12d3-a456-426614174000"' }); }); }); diff --git a/tests/api-resources/agents/routes.test.ts b/tests/api-resources/agents/routes.test.ts index 00f0d4b3..13a717fd 100644 --- a/tests/api-resources/agents/routes.test.ts +++ b/tests/api-resources/agents/routes.test.ts @@ -2,17 +2,12 @@ import Gradient from '@digitalocean/gradient'; -const client = new Gradient({ - accessToken: 'My Access Token', - baseURL: process.env['TEST_API_BASE_URL'] ?? 'http://127.0.0.1:4010', -}); +const client = new Gradient({ accessToken: 'My Access Token', baseURL: process.env["TEST_API_BASE_URL"] ?? 'http://127.0.0.1:4010' }); describe('resource routes', () => { - // Prism tests are disabled + // Mock server tests are disabled test.skip('update: only required params', async () => { - const responsePromise = client.agents.routes.update('"123e4567-e89b-12d3-a456-426614174000"', { - path_parent_agent_uuid: '"123e4567-e89b-12d3-a456-426614174000"', - }); + const responsePromise = client.agents.routes.update('"123e4567-e89b-12d3-a456-426614174000"', { path_parent_agent_uuid: '"123e4567-e89b-12d3-a456-426614174000"' }); const rawResponse = await responsePromise.asResponse(); expect(rawResponse).toBeInstanceOf(Response); const response = await responsePromise; @@ -22,23 +17,21 @@ describe('resource routes', () => { expect(dataAndResponse.response).toBe(rawResponse); }); - // Prism tests are disabled + // Mock server tests are disabled test.skip('update: required and optional params', async () => { const response = await client.agents.routes.update('"123e4567-e89b-12d3-a456-426614174000"', { - path_parent_agent_uuid: '"123e4567-e89b-12d3-a456-426614174000"', - body_child_agent_uuid: '"12345678-1234-1234-1234-123456789012"', - if_case: '"use this to get weather information"', - body_parent_agent_uuid: '"12345678-1234-1234-1234-123456789012"', - route_name: '"weather_route"', - uuid: '"12345678-1234-1234-1234-123456789012"', - }); + path_parent_agent_uuid: '"123e4567-e89b-12d3-a456-426614174000"', + child_agent_uuid: '"12345678-1234-1234-1234-123456789012"', + if_case: '"use this to get weather information"', + body_parent_agent_uuid: '"12345678-1234-1234-1234-123456789012"', + route_name: '"weather_route"', + uuid: '"12345678-1234-1234-1234-123456789012"', + }); }); - // Prism tests are disabled + // Mock server tests are disabled test.skip('delete: only required params', async () => { - const responsePromise = client.agents.routes.delete('"123e4567-e89b-12d3-a456-426614174000"', { - parent_agent_uuid: '"123e4567-e89b-12d3-a456-426614174000"', - }); + const responsePromise = client.agents.routes.delete('"123e4567-e89b-12d3-a456-426614174000"', { parent_agent_uuid: '"123e4567-e89b-12d3-a456-426614174000"' }); const rawResponse = await responsePromise.asResponse(); expect(rawResponse).toBeInstanceOf(Response); const response = await responsePromise; @@ -48,18 +41,14 @@ describe('resource routes', () => { expect(dataAndResponse.response).toBe(rawResponse); }); - // Prism tests are disabled + // Mock server tests are disabled test.skip('delete: required and optional params', async () => { - const response = await client.agents.routes.delete('"123e4567-e89b-12d3-a456-426614174000"', { - parent_agent_uuid: '"123e4567-e89b-12d3-a456-426614174000"', - }); + const response = await client.agents.routes.delete('"123e4567-e89b-12d3-a456-426614174000"', { parent_agent_uuid: '"123e4567-e89b-12d3-a456-426614174000"' }); }); - // Prism tests are disabled + // Mock server tests are disabled test.skip('add: only required params', async () => { - const responsePromise = client.agents.routes.add('"123e4567-e89b-12d3-a456-426614174000"', { - path_parent_agent_uuid: '"123e4567-e89b-12d3-a456-426614174000"', - }); + const responsePromise = client.agents.routes.add('"123e4567-e89b-12d3-a456-426614174000"', { path_parent_agent_uuid: '"123e4567-e89b-12d3-a456-426614174000"' }); const rawResponse = await responsePromise.asResponse(); expect(rawResponse).toBeInstanceOf(Response); const response = await responsePromise; @@ -69,18 +58,18 @@ describe('resource routes', () => { expect(dataAndResponse.response).toBe(rawResponse); }); - // Prism tests are disabled + // Mock server tests are disabled test.skip('add: required and optional params', async () => { const response = await client.agents.routes.add('"123e4567-e89b-12d3-a456-426614174000"', { - path_parent_agent_uuid: '"123e4567-e89b-12d3-a456-426614174000"', - body_child_agent_uuid: '"12345678-1234-1234-1234-123456789012"', - if_case: '"use this to get weather information"', - body_parent_agent_uuid: '"12345678-1234-1234-1234-123456789012"', - route_name: '"weather_route"', - }); + path_parent_agent_uuid: '"123e4567-e89b-12d3-a456-426614174000"', + child_agent_uuid: '"12345678-1234-1234-1234-123456789012"', + if_case: '"use this to get weather information"', + body_parent_agent_uuid: '"12345678-1234-1234-1234-123456789012"', + route_name: '"weather_route"', + }); }); - // Prism tests are disabled + // Mock server tests are disabled test.skip('view', async () => { const responsePromise = client.agents.routes.view('"123e4567-e89b-12d3-a456-426614174000"'); const rawResponse = await responsePromise.asResponse(); diff --git a/tests/api-resources/agents/versions.test.ts b/tests/api-resources/agents/versions.test.ts index af0da44f..15a91489 100644 --- a/tests/api-resources/agents/versions.test.ts +++ b/tests/api-resources/agents/versions.test.ts @@ -2,13 +2,10 @@ import Gradient from '@digitalocean/gradient'; -const client = new Gradient({ - accessToken: 'My Access Token', - baseURL: process.env['TEST_API_BASE_URL'] ?? 'http://127.0.0.1:4010', -}); +const client = new Gradient({ accessToken: 'My Access Token', baseURL: process.env["TEST_API_BASE_URL"] ?? 'http://127.0.0.1:4010' }); describe('resource versions', () => { - // Prism tests are disabled + // Mock server tests are disabled test.skip('update', async () => { const responsePromise = client.agents.versions.update('"123e4567-e89b-12d3-a456-426614174000"'); const rawResponse = await responsePromise.asResponse(); @@ -20,22 +17,15 @@ describe('resource versions', () => { expect(dataAndResponse.response).toBe(rawResponse); }); - // Prism tests are disabled + // Mock server tests are disabled test.skip('update: request options and params are passed correctly', async () => { // ensure the request options are being passed correctly by passing an invalid HTTP method in order to cause an error - await expect( - client.agents.versions.update( - '"123e4567-e89b-12d3-a456-426614174000"', - { - body_uuid: '"12345678-1234-1234-1234-123456789012"', - version_hash: 'c3658d8b5c05494cd03ce042926ef08157889ed54b1b74b5ee0b3d66dcee4b73', - }, - { path: '/_stainless_unknown_path' }, - ), - ).rejects.toThrow(Gradient.NotFoundError); + await expect(client.agents.versions.update('"123e4567-e89b-12d3-a456-426614174000"', { uuid: '"12345678-1234-1234-1234-123456789012"', version_hash: 'c3658d8b5c05494cd03ce042926ef08157889ed54b1b74b5ee0b3d66dcee4b73' }, { path: '/_stainless_unknown_path' })) + .rejects + .toThrow(Gradient.NotFoundError); }); - // Prism tests are disabled + // Mock server tests are disabled test.skip('list', async () => { const responsePromise = client.agents.versions.list('"123e4567-e89b-12d3-a456-426614174000"'); const rawResponse = await responsePromise.asResponse(); @@ -47,15 +37,11 @@ describe('resource versions', () => { expect(dataAndResponse.response).toBe(rawResponse); }); - // Prism tests are disabled + // Mock server tests are disabled test.skip('list: request options and params are passed correctly', async () => { // ensure the request options are being passed correctly by passing an invalid HTTP method in order to cause an error - await expect( - client.agents.versions.list( - '"123e4567-e89b-12d3-a456-426614174000"', - { page: 0, per_page: 0 }, - { path: '/_stainless_unknown_path' }, - ), - ).rejects.toThrow(Gradient.NotFoundError); + await expect(client.agents.versions.list('"123e4567-e89b-12d3-a456-426614174000"', { page: 0, per_page: 0 }, { path: '/_stainless_unknown_path' })) + .rejects + .toThrow(Gradient.NotFoundError); }); }); diff --git a/tests/api-resources/apps/job-invocations.test.ts b/tests/api-resources/apps/job-invocations.test.ts new file mode 100644 index 00000000..0383b207 --- /dev/null +++ b/tests/api-resources/apps/job-invocations.test.ts @@ -0,0 +1,24 @@ +// File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details. + +import Gradient from '@digitalocean/gradient'; + +const client = new Gradient({ accessToken: 'My Access Token', baseURL: process.env["TEST_API_BASE_URL"] ?? 'http://127.0.0.1:4010' }); + +describe('resource jobInvocations', () => { + // Mock server tests are disabled + test.skip('cancel: only required params', async () => { + const responsePromise = client.apps.jobInvocations.cancel('123e4567-e89b-12d3-a456-426', { app_id: '4f6c71e2-1e90-4762-9fee-6cc4a0a9f2cf' }); + const rawResponse = await responsePromise.asResponse(); + expect(rawResponse).toBeInstanceOf(Response); + const response = await responsePromise; + expect(response).not.toBeInstanceOf(Response); + const dataAndResponse = await responsePromise.withResponse(); + expect(dataAndResponse.data).toBe(response); + expect(dataAndResponse.response).toBe(rawResponse); + }); + + // Mock server tests are disabled + test.skip('cancel: required and optional params', async () => { + const response = await client.apps.jobInvocations.cancel('123e4567-e89b-12d3-a456-426', { app_id: '4f6c71e2-1e90-4762-9fee-6cc4a0a9f2cf', job_name: 'job_name' }); + }); +}); diff --git a/tests/api-resources/billing.test.ts b/tests/api-resources/billing.test.ts new file mode 100644 index 00000000..dca6f925 --- /dev/null +++ b/tests/api-resources/billing.test.ts @@ -0,0 +1,29 @@ +// File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details. + +import Gradient from '@digitalocean/gradient'; + +const client = new Gradient({ accessToken: 'My Access Token', baseURL: process.env["TEST_API_BASE_URL"] ?? 'http://127.0.0.1:4010' }); + +describe('resource billing', () => { + // Mock server tests are disabled + test.skip('listInsights: only required params', async () => { + const responsePromise = client.billing.listInsights('2025-01-31', { account_urn: 'do:team:12345678-1234-1234-1234-123456789012', start_date: '2025-01-01' }); + const rawResponse = await responsePromise.asResponse(); + expect(rawResponse).toBeInstanceOf(Response); + const response = await responsePromise; + expect(response).not.toBeInstanceOf(Response); + const dataAndResponse = await responsePromise.withResponse(); + expect(dataAndResponse.data).toBe(response); + expect(dataAndResponse.response).toBe(rawResponse); + }); + + // Mock server tests are disabled + test.skip('listInsights: required and optional params', async () => { + const response = await client.billing.listInsights('2025-01-31', { + account_urn: 'do:team:12345678-1234-1234-1234-123456789012', + start_date: '2025-01-01', + page: 1, + per_page: 1, + }); + }); +}); diff --git a/tests/api-resources/chat/completions.test.ts b/tests/api-resources/chat/completions.test.ts index 42d966da..fbb2cb69 100644 --- a/tests/api-resources/chat/completions.test.ts +++ b/tests/api-resources/chat/completions.test.ts @@ -2,18 +2,12 @@ import Gradient from '@digitalocean/gradient'; -const client = new Gradient({ - accessToken: 'My Access Token', - baseURL: process.env['TEST_API_BASE_URL'] ?? 'http://127.0.0.1:4010', -}); +const client = new Gradient({ accessToken: 'My Access Token', baseURL: process.env["TEST_API_BASE_URL"] ?? 'http://127.0.0.1:4010' }); describe('resource completions', () => { - // Prism tests are disabled + // Mock server tests are disabled test.skip('create: only required params', async () => { - const responsePromise = client.chat.completions.create({ - messages: [{ content: 'string', role: 'system' }], - model: 'llama3-8b-instruct', - }); + const responsePromise = client.chat.completions.create({ messages: [{ content: 'string', role: 'system' }], model: 'llama3-8b-instruct' }); const rawResponse = await responsePromise.asResponse(); expect(rawResponse).toBeInstanceOf(Response); const response = await responsePromise; @@ -23,33 +17,36 @@ describe('resource completions', () => { expect(dataAndResponse.response).toBe(rawResponse); }); - // Prism tests are disabled + // Mock server tests are disabled test.skip('create: required and optional params', async () => { const response = await client.chat.completions.create({ - messages: [{ content: 'string', role: 'system' }], - model: 'llama3-8b-instruct', - frequency_penalty: -2, - logit_bias: { foo: 0 }, - logprobs: true, - max_completion_tokens: 256, - max_tokens: 0, - metadata: { foo: 'string' }, - n: 1, - presence_penalty: -2, - stop: '\n', - stream: false, - stream_options: { include_usage: true }, - temperature: 1, - tool_choice: 'none', - tools: [ - { - function: { name: 'name', description: 'description', parameters: { foo: 'bar' } }, - type: 'function', - }, - ], - top_logprobs: 0, - top_p: 1, - user: 'user-1234', - }); + messages: [{ content: 'string', role: 'system' }], + model: 'llama3-8b-instruct', + frequency_penalty: -2, + logit_bias: { foo: 0 }, + logprobs: true, + max_completion_tokens: 256, + max_tokens: 0, + metadata: { foo: 'string' }, + n: 1, + presence_penalty: -2, + reasoning_effort: 'none', + stop: '\n', + stream: false, + stream_options: { include_usage: true }, + temperature: 1, + tool_choice: 'none', + tools: [{ + function: { + name: 'name', + description: 'description', + parameters: { foo: 'bar' }, + }, + type: 'function', + }], + top_logprobs: 0, + top_p: 1, + user: 'user-1234', + }); }); }); diff --git a/tests/api-resources/databases/schema-registry/config.test.ts b/tests/api-resources/databases/schema-registry/config.test.ts index 5a58a671..1dc6b7bf 100644 --- a/tests/api-resources/databases/schema-registry/config.test.ts +++ b/tests/api-resources/databases/schema-registry/config.test.ts @@ -2,17 +2,12 @@ import Gradient from '@digitalocean/gradient'; -const client = new Gradient({ - accessToken: 'My Access Token', - baseURL: process.env['TEST_API_BASE_URL'] ?? 'http://127.0.0.1:4010', -}); +const client = new Gradient({ accessToken: 'My Access Token', baseURL: process.env["TEST_API_BASE_URL"] ?? 'http://127.0.0.1:4010' }); describe('resource config', () => { - // Prism tests are disabled + // Mock server tests are disabled test.skip('retrieve', async () => { - const responsePromise = client.databases.schemaRegistry.config.retrieve( - '9cc10173-e9ea-4176-9dbc-a4cee4c4ff30', - ); + const responsePromise = client.databases.schemaRegistry.config.retrieve('9cc10173-e9ea-4176-9dbc-a4cee4c4ff30'); const rawResponse = await responsePromise.asResponse(); expect(rawResponse).toBeInstanceOf(Response); const response = await responsePromise; @@ -22,12 +17,9 @@ describe('resource config', () => { expect(dataAndResponse.response).toBe(rawResponse); }); - // Prism tests are disabled + // Mock server tests are disabled test.skip('update: only required params', async () => { - const responsePromise = client.databases.schemaRegistry.config.update( - '9cc10173-e9ea-4176-9dbc-a4cee4c4ff30', - { compatibility_level: 'BACKWARD' }, - ); + const responsePromise = client.databases.schemaRegistry.config.update('9cc10173-e9ea-4176-9dbc-a4cee4c4ff30', { compatibility_level: 'BACKWARD' }); const rawResponse = await responsePromise.asResponse(); expect(rawResponse).toBeInstanceOf(Response); const response = await responsePromise; @@ -37,19 +29,14 @@ describe('resource config', () => { expect(dataAndResponse.response).toBe(rawResponse); }); - // Prism tests are disabled + // Mock server tests are disabled test.skip('update: required and optional params', async () => { - const response = await client.databases.schemaRegistry.config.update( - '9cc10173-e9ea-4176-9dbc-a4cee4c4ff30', - { compatibility_level: 'BACKWARD' }, - ); + const response = await client.databases.schemaRegistry.config.update('9cc10173-e9ea-4176-9dbc-a4cee4c4ff30', { compatibility_level: 'BACKWARD' }); }); - // Prism tests are disabled + // Mock server tests are disabled test.skip('retrieveSubject: only required params', async () => { - const responsePromise = client.databases.schemaRegistry.config.retrieveSubject('customer-schema', { - database_cluster_uuid: '9cc10173-e9ea-4176-9dbc-a4cee4c4ff30', - }); + const responsePromise = client.databases.schemaRegistry.config.retrieveSubject('customer-schema', { database_cluster_uuid: '9cc10173-e9ea-4176-9dbc-a4cee4c4ff30' }); const rawResponse = await responsePromise.asResponse(); expect(rawResponse).toBeInstanceOf(Response); const response = await responsePromise; @@ -59,19 +46,14 @@ describe('resource config', () => { expect(dataAndResponse.response).toBe(rawResponse); }); - // Prism tests are disabled + // Mock server tests are disabled test.skip('retrieveSubject: required and optional params', async () => { - const response = await client.databases.schemaRegistry.config.retrieveSubject('customer-schema', { - database_cluster_uuid: '9cc10173-e9ea-4176-9dbc-a4cee4c4ff30', - }); + const response = await client.databases.schemaRegistry.config.retrieveSubject('customer-schema', { database_cluster_uuid: '9cc10173-e9ea-4176-9dbc-a4cee4c4ff30' }); }); - // Prism tests are disabled + // Mock server tests are disabled test.skip('updateSubject: only required params', async () => { - const responsePromise = client.databases.schemaRegistry.config.updateSubject('customer-schema', { - database_cluster_uuid: '9cc10173-e9ea-4176-9dbc-a4cee4c4ff30', - compatibility_level: 'BACKWARD', - }); + const responsePromise = client.databases.schemaRegistry.config.updateSubject('customer-schema', { database_cluster_uuid: '9cc10173-e9ea-4176-9dbc-a4cee4c4ff30', compatibility_level: 'BACKWARD' }); const rawResponse = await responsePromise.asResponse(); expect(rawResponse).toBeInstanceOf(Response); const response = await responsePromise; @@ -81,11 +63,8 @@ describe('resource config', () => { expect(dataAndResponse.response).toBe(rawResponse); }); - // Prism tests are disabled + // Mock server tests are disabled test.skip('updateSubject: required and optional params', async () => { - const response = await client.databases.schemaRegistry.config.updateSubject('customer-schema', { - database_cluster_uuid: '9cc10173-e9ea-4176-9dbc-a4cee4c4ff30', - compatibility_level: 'BACKWARD', - }); + const response = await client.databases.schemaRegistry.config.updateSubject('customer-schema', { database_cluster_uuid: '9cc10173-e9ea-4176-9dbc-a4cee4c4ff30', compatibility_level: 'BACKWARD' }); }); }); diff --git a/tests/api-resources/gpu-droplets/account/keys.test.ts b/tests/api-resources/gpu-droplets/account/keys.test.ts index 8c4282f6..5827579f 100644 --- a/tests/api-resources/gpu-droplets/account/keys.test.ts +++ b/tests/api-resources/gpu-droplets/account/keys.test.ts @@ -2,19 +2,12 @@ import Gradient from '@digitalocean/gradient'; -const client = new Gradient({ - accessToken: 'My Access Token', - baseURL: process.env['TEST_API_BASE_URL'] ?? 'http://127.0.0.1:4010', -}); +const client = new Gradient({ accessToken: 'My Access Token', baseURL: process.env["TEST_API_BASE_URL"] ?? 'http://127.0.0.1:4010' }); describe('resource keys', () => { - // Prism tests are disabled + // Mock server tests are disabled test.skip('create: only required params', async () => { - const responsePromise = client.gpuDroplets.account.keys.create({ - name: 'My SSH Public Key', - public_key: - 'ssh-rsa AEXAMPLEaC1yc2EAAAADAQABAAAAQQDDHr/jh2Jy4yALcK4JyWbVkPRaWmhck3IgCoeOO3z1e2dBowLh64QAM+Qb72pxekALga2oi4GvT+TlWNhzPH4V example', - }); + const responsePromise = client.gpuDroplets.account.keys.create({ name: 'My SSH Public Key', public_key: 'ssh-rsa AEXAMPLEaC1yc2EAAAADAQABAAAAQQDDHr/jh2Jy4yALcK4JyWbVkPRaWmhck3IgCoeOO3z1e2dBowLh64QAM+Qb72pxekALga2oi4GvT+TlWNhzPH4V example' }); const rawResponse = await responsePromise.asResponse(); expect(rawResponse).toBeInstanceOf(Response); const response = await responsePromise; @@ -24,16 +17,12 @@ describe('resource keys', () => { expect(dataAndResponse.response).toBe(rawResponse); }); - // Prism tests are disabled + // Mock server tests are disabled test.skip('create: required and optional params', async () => { - const response = await client.gpuDroplets.account.keys.create({ - name: 'My SSH Public Key', - public_key: - 'ssh-rsa AEXAMPLEaC1yc2EAAAADAQABAAAAQQDDHr/jh2Jy4yALcK4JyWbVkPRaWmhck3IgCoeOO3z1e2dBowLh64QAM+Qb72pxekALga2oi4GvT+TlWNhzPH4V example', - }); + const response = await client.gpuDroplets.account.keys.create({ name: 'My SSH Public Key', public_key: 'ssh-rsa AEXAMPLEaC1yc2EAAAADAQABAAAAQQDDHr/jh2Jy4yALcK4JyWbVkPRaWmhck3IgCoeOO3z1e2dBowLh64QAM+Qb72pxekALga2oi4GvT+TlWNhzPH4V example' }); }); - // Prism tests are disabled + // Mock server tests are disabled test.skip('retrieve', async () => { const responsePromise = client.gpuDroplets.account.keys.retrieve(512189); const rawResponse = await responsePromise.asResponse(); @@ -45,7 +34,7 @@ describe('resource keys', () => { expect(dataAndResponse.response).toBe(rawResponse); }); - // Prism tests are disabled + // Mock server tests are disabled test.skip('update', async () => { const responsePromise = client.gpuDroplets.account.keys.update(512189, {}); const rawResponse = await responsePromise.asResponse(); @@ -57,7 +46,7 @@ describe('resource keys', () => { expect(dataAndResponse.response).toBe(rawResponse); }); - // Prism tests are disabled + // Mock server tests are disabled test.skip('list', async () => { const responsePromise = client.gpuDroplets.account.keys.list(); const rawResponse = await responsePromise.asResponse(); @@ -69,15 +58,15 @@ describe('resource keys', () => { expect(dataAndResponse.response).toBe(rawResponse); }); - // Prism tests are disabled + // Mock server tests are disabled test.skip('list: request options and params are passed correctly', async () => { // ensure the request options are being passed correctly by passing an invalid HTTP method in order to cause an error - await expect( - client.gpuDroplets.account.keys.list({ page: 1, per_page: 1 }, { path: '/_stainless_unknown_path' }), - ).rejects.toThrow(Gradient.NotFoundError); + await expect(client.gpuDroplets.account.keys.list({ page: 1, per_page: 1 }, { path: '/_stainless_unknown_path' })) + .rejects + .toThrow(Gradient.NotFoundError); }); - // Prism tests are disabled + // Mock server tests are disabled test.skip('delete', async () => { const responsePromise = client.gpuDroplets.account.keys.delete(512189); const rawResponse = await responsePromise.asResponse(); diff --git a/tests/api-resources/gpu-droplets/actions.test.ts b/tests/api-resources/gpu-droplets/actions.test.ts index 3ab1754c..1c904875 100644 --- a/tests/api-resources/gpu-droplets/actions.test.ts +++ b/tests/api-resources/gpu-droplets/actions.test.ts @@ -2,13 +2,10 @@ import Gradient from '@digitalocean/gradient'; -const client = new Gradient({ - accessToken: 'My Access Token', - baseURL: process.env['TEST_API_BASE_URL'] ?? 'http://127.0.0.1:4010', -}); +const client = new Gradient({ accessToken: 'My Access Token', baseURL: process.env["TEST_API_BASE_URL"] ?? 'http://127.0.0.1:4010' }); describe('resource actions', () => { - // Prism tests are disabled + // Mock server tests are disabled test.skip('retrieve: only required params', async () => { const responsePromise = client.gpuDroplets.actions.retrieve(36804636, { droplet_id: 3164444 }); const rawResponse = await responsePromise.asResponse(); @@ -20,12 +17,12 @@ describe('resource actions', () => { expect(dataAndResponse.response).toBe(rawResponse); }); - // Prism tests are disabled + // Mock server tests are disabled test.skip('retrieve: required and optional params', async () => { const response = await client.gpuDroplets.actions.retrieve(36804636, { droplet_id: 3164444 }); }); - // Prism tests are disabled + // Mock server tests are disabled test.skip('list', async () => { const responsePromise = client.gpuDroplets.actions.list(3164444); const rawResponse = await responsePromise.asResponse(); @@ -37,19 +34,15 @@ describe('resource actions', () => { expect(dataAndResponse.response).toBe(rawResponse); }); - // Prism tests are disabled + // Mock server tests are disabled test.skip('list: request options and params are passed correctly', async () => { // ensure the request options are being passed correctly by passing an invalid HTTP method in order to cause an error - await expect( - client.gpuDroplets.actions.list( - 3164444, - { page: 1, per_page: 1 }, - { path: '/_stainless_unknown_path' }, - ), - ).rejects.toThrow(Gradient.NotFoundError); + await expect(client.gpuDroplets.actions.list(3164444, { page: 1, per_page: 1 }, { path: '/_stainless_unknown_path' })) + .rejects + .toThrow(Gradient.NotFoundError); }); - // Prism tests are disabled + // Mock server tests are disabled test.skip('bulkInitiate: only required params', async () => { const responsePromise = client.gpuDroplets.actions.bulkInitiate({ type: 'reboot' }); const rawResponse = await responsePromise.asResponse(); @@ -61,12 +54,12 @@ describe('resource actions', () => { expect(dataAndResponse.response).toBe(rawResponse); }); - // Prism tests are disabled + // Mock server tests are disabled test.skip('bulkInitiate: required and optional params', async () => { const response = await client.gpuDroplets.actions.bulkInitiate({ type: 'reboot', tag_name: 'tag_name' }); }); - // Prism tests are disabled + // Mock server tests are disabled test.skip('initiate: only required params', async () => { const responsePromise = client.gpuDroplets.actions.initiate(3164444, { type: 'reboot' }); const rawResponse = await responsePromise.asResponse(); @@ -78,7 +71,7 @@ describe('resource actions', () => { expect(dataAndResponse.response).toBe(rawResponse); }); - // Prism tests are disabled + // Mock server tests are disabled test.skip('initiate: required and optional params', async () => { const response = await client.gpuDroplets.actions.initiate(3164444, { type: 'reboot' }); }); diff --git a/tests/api-resources/gpu-droplets/autoscale.test.ts b/tests/api-resources/gpu-droplets/autoscale.test.ts index 31e8df0f..20245f33 100644 --- a/tests/api-resources/gpu-droplets/autoscale.test.ts +++ b/tests/api-resources/gpu-droplets/autoscale.test.ts @@ -2,24 +2,21 @@ import Gradient from '@digitalocean/gradient'; -const client = new Gradient({ - accessToken: 'My Access Token', - baseURL: process.env['TEST_API_BASE_URL'] ?? 'http://127.0.0.1:4010', -}); +const client = new Gradient({ accessToken: 'My Access Token', baseURL: process.env["TEST_API_BASE_URL"] ?? 'http://127.0.0.1:4010' }); describe('resource autoscale', () => { - // Prism tests are disabled + // Mock server tests are disabled test.skip('create: only required params', async () => { const responsePromise = client.gpuDroplets.autoscale.create({ - config: { max_instances: 5, min_instances: 1 }, - droplet_template: { - image: 'ubuntu-20-04-x64', - region: 'nyc3', - size: 'c-2', - ssh_keys: ['3b:16:e4:bf:8b:00:8b:b8:59:8c:a9:d3:f0:19:fa:45'], - }, - name: 'my-autoscale-pool', - }); + config: { max_instances: 5, min_instances: 1 }, + droplet_template: { + image: 'ubuntu-20-04-x64', + region: 'nyc3', + size: 'c-2', + ssh_keys: ['3b:16:e4:bf:8b:00:8b:b8:59:8c:a9:d3:f0:19:fa:45'], + }, + name: 'my-autoscale-pool', + }); const rawResponse = await responsePromise.asResponse(); expect(rawResponse).toBeInstanceOf(Response); const response = await responsePromise; @@ -29,34 +26,34 @@ describe('resource autoscale', () => { expect(dataAndResponse.response).toBe(rawResponse); }); - // Prism tests are disabled + // Mock server tests are disabled test.skip('create: required and optional params', async () => { const response = await client.gpuDroplets.autoscale.create({ - config: { - max_instances: 5, - min_instances: 1, - cooldown_minutes: 10, - target_cpu_utilization: 0.5, - target_memory_utilization: 0.6, - }, - droplet_template: { - image: 'ubuntu-20-04-x64', - region: 'nyc3', - size: 'c-2', - ssh_keys: ['3b:16:e4:bf:8b:00:8b:b8:59:8c:a9:d3:f0:19:fa:45'], - ipv6: true, - name: 'example.com', - project_id: '746c6152-2fa2-11ed-92d3-27aaa54e4988', - tags: ['env:prod', 'web'], - user_data: '#cloud-config\nruncmd:\n - touch /test.txt\n', - vpc_uuid: '760e09ef-dc84-11e8-981e-3cfdfeaae000', - with_droplet_agent: true, - }, - name: 'my-autoscale-pool', - }); - }); - - // Prism tests are disabled + config: { + max_instances: 5, + min_instances: 1, + cooldown_minutes: 10, + target_cpu_utilization: 0.5, + target_memory_utilization: 0.6, + }, + droplet_template: { + image: 'ubuntu-20-04-x64', + region: 'nyc3', + size: 'c-2', + ssh_keys: ['3b:16:e4:bf:8b:00:8b:b8:59:8c:a9:d3:f0:19:fa:45'], + ipv6: true, + name: 'example.com', + project_id: '746c6152-2fa2-11ed-92d3-27aaa54e4988', + tags: ['env:prod', 'web'], + user_data: '#cloud-config\nruncmd:\n - touch /test.txt\n', + vpc_uuid: '760e09ef-dc84-11e8-981e-3cfdfeaae000', + with_droplet_agent: true, + }, + name: 'my-autoscale-pool', + }); + }); + + // Mock server tests are disabled test.skip('retrieve', async () => { const responsePromise = client.gpuDroplets.autoscale.retrieve('0d3db13e-a604-4944-9827-7ec2642d32ac'); const rawResponse = await responsePromise.asResponse(); @@ -68,18 +65,18 @@ describe('resource autoscale', () => { expect(dataAndResponse.response).toBe(rawResponse); }); - // Prism tests are disabled + // Mock server tests are disabled test.skip('update: only required params', async () => { const responsePromise = client.gpuDroplets.autoscale.update('0d3db13e-a604-4944-9827-7ec2642d32ac', { - config: { target_number_instances: 2 }, - droplet_template: { - image: 'ubuntu-20-04-x64', - region: 'nyc3', - size: 'c-2', - ssh_keys: ['3b:16:e4:bf:8b:00:8b:b8:59:8c:a9:d3:f0:19:fa:45'], - }, - name: 'my-autoscale-pool', - }); + config: { target_number_instances: 2 }, + droplet_template: { + image: 'ubuntu-20-04-x64', + region: 'nyc3', + size: 'c-2', + ssh_keys: ['3b:16:e4:bf:8b:00:8b:b8:59:8c:a9:d3:f0:19:fa:45'], + }, + name: 'my-autoscale-pool', + }); const rawResponse = await responsePromise.asResponse(); expect(rawResponse).toBeInstanceOf(Response); const response = await responsePromise; @@ -89,28 +86,28 @@ describe('resource autoscale', () => { expect(dataAndResponse.response).toBe(rawResponse); }); - // Prism tests are disabled + // Mock server tests are disabled test.skip('update: required and optional params', async () => { const response = await client.gpuDroplets.autoscale.update('0d3db13e-a604-4944-9827-7ec2642d32ac', { - config: { target_number_instances: 2 }, - droplet_template: { - image: 'ubuntu-20-04-x64', - region: 'nyc3', - size: 'c-2', - ssh_keys: ['3b:16:e4:bf:8b:00:8b:b8:59:8c:a9:d3:f0:19:fa:45'], - ipv6: true, - name: 'example.com', - project_id: '746c6152-2fa2-11ed-92d3-27aaa54e4988', - tags: ['env:prod', 'web'], - user_data: '#cloud-config\nruncmd:\n - touch /test.txt\n', - vpc_uuid: '760e09ef-dc84-11e8-981e-3cfdfeaae000', - with_droplet_agent: true, - }, - name: 'my-autoscale-pool', - }); - }); - - // Prism tests are disabled + config: { target_number_instances: 2 }, + droplet_template: { + image: 'ubuntu-20-04-x64', + region: 'nyc3', + size: 'c-2', + ssh_keys: ['3b:16:e4:bf:8b:00:8b:b8:59:8c:a9:d3:f0:19:fa:45'], + ipv6: true, + name: 'example.com', + project_id: '746c6152-2fa2-11ed-92d3-27aaa54e4988', + tags: ['env:prod', 'web'], + user_data: '#cloud-config\nruncmd:\n - touch /test.txt\n', + vpc_uuid: '760e09ef-dc84-11e8-981e-3cfdfeaae000', + with_droplet_agent: true, + }, + name: 'my-autoscale-pool', + }); + }); + + // Mock server tests are disabled test.skip('list', async () => { const responsePromise = client.gpuDroplets.autoscale.list(); const rawResponse = await responsePromise.asResponse(); @@ -122,18 +119,19 @@ describe('resource autoscale', () => { expect(dataAndResponse.response).toBe(rawResponse); }); - // Prism tests are disabled + // Mock server tests are disabled test.skip('list: request options and params are passed correctly', async () => { // ensure the request options are being passed correctly by passing an invalid HTTP method in order to cause an error - await expect( - client.gpuDroplets.autoscale.list( - { name: 'name', page: 1, per_page: 1 }, - { path: '/_stainless_unknown_path' }, - ), - ).rejects.toThrow(Gradient.NotFoundError); + await expect(client.gpuDroplets.autoscale.list({ + name: 'name', + page: 1, + per_page: 1, + }, { path: '/_stainless_unknown_path' })) + .rejects + .toThrow(Gradient.NotFoundError); }); - // Prism tests are disabled + // Mock server tests are disabled test.skip('delete', async () => { const responsePromise = client.gpuDroplets.autoscale.delete('0d3db13e-a604-4944-9827-7ec2642d32ac'); const rawResponse = await responsePromise.asResponse(); @@ -145,12 +143,9 @@ describe('resource autoscale', () => { expect(dataAndResponse.response).toBe(rawResponse); }); - // Prism tests are disabled + // Mock server tests are disabled test.skip('deleteDangerous: only required params', async () => { - const responsePromise = client.gpuDroplets.autoscale.deleteDangerous( - '0d3db13e-a604-4944-9827-7ec2642d32ac', - { 'X-Dangerous': true }, - ); + const responsePromise = client.gpuDroplets.autoscale.deleteDangerous('0d3db13e-a604-4944-9827-7ec2642d32ac', { 'X-Dangerous': true }); const rawResponse = await responsePromise.asResponse(); expect(rawResponse).toBeInstanceOf(Response); const response = await responsePromise; @@ -160,15 +155,12 @@ describe('resource autoscale', () => { expect(dataAndResponse.response).toBe(rawResponse); }); - // Prism tests are disabled + // Mock server tests are disabled test.skip('deleteDangerous: required and optional params', async () => { - const response = await client.gpuDroplets.autoscale.deleteDangerous( - '0d3db13e-a604-4944-9827-7ec2642d32ac', - { 'X-Dangerous': true }, - ); + const response = await client.gpuDroplets.autoscale.deleteDangerous('0d3db13e-a604-4944-9827-7ec2642d32ac', { 'X-Dangerous': true }); }); - // Prism tests are disabled + // Mock server tests are disabled test.skip('listHistory', async () => { const responsePromise = client.gpuDroplets.autoscale.listHistory('0d3db13e-a604-4944-9827-7ec2642d32ac'); const rawResponse = await responsePromise.asResponse(); @@ -180,19 +172,15 @@ describe('resource autoscale', () => { expect(dataAndResponse.response).toBe(rawResponse); }); - // Prism tests are disabled + // Mock server tests are disabled test.skip('listHistory: request options and params are passed correctly', async () => { // ensure the request options are being passed correctly by passing an invalid HTTP method in order to cause an error - await expect( - client.gpuDroplets.autoscale.listHistory( - '0d3db13e-a604-4944-9827-7ec2642d32ac', - { page: 1, per_page: 1 }, - { path: '/_stainless_unknown_path' }, - ), - ).rejects.toThrow(Gradient.NotFoundError); + await expect(client.gpuDroplets.autoscale.listHistory('0d3db13e-a604-4944-9827-7ec2642d32ac', { page: 1, per_page: 1 }, { path: '/_stainless_unknown_path' })) + .rejects + .toThrow(Gradient.NotFoundError); }); - // Prism tests are disabled + // Mock server tests are disabled test.skip('listMembers', async () => { const responsePromise = client.gpuDroplets.autoscale.listMembers('0d3db13e-a604-4944-9827-7ec2642d32ac'); const rawResponse = await responsePromise.asResponse(); @@ -204,15 +192,11 @@ describe('resource autoscale', () => { expect(dataAndResponse.response).toBe(rawResponse); }); - // Prism tests are disabled + // Mock server tests are disabled test.skip('listMembers: request options and params are passed correctly', async () => { // ensure the request options are being passed correctly by passing an invalid HTTP method in order to cause an error - await expect( - client.gpuDroplets.autoscale.listMembers( - '0d3db13e-a604-4944-9827-7ec2642d32ac', - { page: 1, per_page: 1 }, - { path: '/_stainless_unknown_path' }, - ), - ).rejects.toThrow(Gradient.NotFoundError); + await expect(client.gpuDroplets.autoscale.listMembers('0d3db13e-a604-4944-9827-7ec2642d32ac', { page: 1, per_page: 1 }, { path: '/_stainless_unknown_path' })) + .rejects + .toThrow(Gradient.NotFoundError); }); }); diff --git a/tests/api-resources/gpu-droplets/backups.test.ts b/tests/api-resources/gpu-droplets/backups.test.ts index 5638af99..ec738386 100644 --- a/tests/api-resources/gpu-droplets/backups.test.ts +++ b/tests/api-resources/gpu-droplets/backups.test.ts @@ -2,13 +2,10 @@ import Gradient from '@digitalocean/gradient'; -const client = new Gradient({ - accessToken: 'My Access Token', - baseURL: process.env['TEST_API_BASE_URL'] ?? 'http://127.0.0.1:4010', -}); +const client = new Gradient({ accessToken: 'My Access Token', baseURL: process.env["TEST_API_BASE_URL"] ?? 'http://127.0.0.1:4010' }); describe('resource backups', () => { - // Prism tests are disabled + // Mock server tests are disabled test.skip('list', async () => { const responsePromise = client.gpuDroplets.backups.list(3164444); const rawResponse = await responsePromise.asResponse(); @@ -20,19 +17,15 @@ describe('resource backups', () => { expect(dataAndResponse.response).toBe(rawResponse); }); - // Prism tests are disabled + // Mock server tests are disabled test.skip('list: request options and params are passed correctly', async () => { // ensure the request options are being passed correctly by passing an invalid HTTP method in order to cause an error - await expect( - client.gpuDroplets.backups.list( - 3164444, - { page: 1, per_page: 1 }, - { path: '/_stainless_unknown_path' }, - ), - ).rejects.toThrow(Gradient.NotFoundError); + await expect(client.gpuDroplets.backups.list(3164444, { page: 1, per_page: 1 }, { path: '/_stainless_unknown_path' })) + .rejects + .toThrow(Gradient.NotFoundError); }); - // Prism tests are disabled + // Mock server tests are disabled test.skip('listPolicies', async () => { const responsePromise = client.gpuDroplets.backups.listPolicies(); const rawResponse = await responsePromise.asResponse(); @@ -44,15 +37,15 @@ describe('resource backups', () => { expect(dataAndResponse.response).toBe(rawResponse); }); - // Prism tests are disabled + // Mock server tests are disabled test.skip('listPolicies: request options and params are passed correctly', async () => { // ensure the request options are being passed correctly by passing an invalid HTTP method in order to cause an error - await expect( - client.gpuDroplets.backups.listPolicies({ page: 1, per_page: 1 }, { path: '/_stainless_unknown_path' }), - ).rejects.toThrow(Gradient.NotFoundError); + await expect(client.gpuDroplets.backups.listPolicies({ page: 1, per_page: 1 }, { path: '/_stainless_unknown_path' })) + .rejects + .toThrow(Gradient.NotFoundError); }); - // Prism tests are disabled + // Mock server tests are disabled test.skip('listSupportedPolicies', async () => { const responsePromise = client.gpuDroplets.backups.listSupportedPolicies(); const rawResponse = await responsePromise.asResponse(); @@ -64,7 +57,7 @@ describe('resource backups', () => { expect(dataAndResponse.response).toBe(rawResponse); }); - // Prism tests are disabled + // Mock server tests are disabled test.skip('retrievePolicy', async () => { const responsePromise = client.gpuDroplets.backups.retrievePolicy(3164444); const rawResponse = await responsePromise.asResponse(); diff --git a/tests/api-resources/gpu-droplets/destroy-with-associated-resources.test.ts b/tests/api-resources/gpu-droplets/destroy-with-associated-resources.test.ts index ec46c075..b61e534f 100644 --- a/tests/api-resources/gpu-droplets/destroy-with-associated-resources.test.ts +++ b/tests/api-resources/gpu-droplets/destroy-with-associated-resources.test.ts @@ -2,13 +2,10 @@ import Gradient from '@digitalocean/gradient'; -const client = new Gradient({ - accessToken: 'My Access Token', - baseURL: process.env['TEST_API_BASE_URL'] ?? 'http://127.0.0.1:4010', -}); +const client = new Gradient({ accessToken: 'My Access Token', baseURL: process.env["TEST_API_BASE_URL"] ?? 'http://127.0.0.1:4010' }); describe('resource destroyWithAssociatedResources', () => { - // Prism tests are disabled + // Mock server tests are disabled test.skip('list', async () => { const responsePromise = client.gpuDroplets.destroyWithAssociatedResources.list(3164444); const rawResponse = await responsePromise.asResponse(); @@ -20,7 +17,7 @@ describe('resource destroyWithAssociatedResources', () => { expect(dataAndResponse.response).toBe(rawResponse); }); - // Prism tests are disabled + // Mock server tests are disabled test.skip('checkStatus', async () => { const responsePromise = client.gpuDroplets.destroyWithAssociatedResources.checkStatus(3164444); const rawResponse = await responsePromise.asResponse(); @@ -32,11 +29,9 @@ describe('resource destroyWithAssociatedResources', () => { expect(dataAndResponse.response).toBe(rawResponse); }); - // Prism tests are disabled + // Mock server tests are disabled test.skip('deleteDangerous: only required params', async () => { - const responsePromise = client.gpuDroplets.destroyWithAssociatedResources.deleteDangerous(3164444, { - 'X-Dangerous': true, - }); + const responsePromise = client.gpuDroplets.destroyWithAssociatedResources.deleteDangerous(3164444, { 'X-Dangerous': true }); const rawResponse = await responsePromise.asResponse(); expect(rawResponse).toBeInstanceOf(Response); const response = await responsePromise; @@ -46,14 +41,12 @@ describe('resource destroyWithAssociatedResources', () => { expect(dataAndResponse.response).toBe(rawResponse); }); - // Prism tests are disabled + // Mock server tests are disabled test.skip('deleteDangerous: required and optional params', async () => { - const response = await client.gpuDroplets.destroyWithAssociatedResources.deleteDangerous(3164444, { - 'X-Dangerous': true, - }); + const response = await client.gpuDroplets.destroyWithAssociatedResources.deleteDangerous(3164444, { 'X-Dangerous': true }); }); - // Prism tests are disabled + // Mock server tests are disabled test.skip('deleteSelective', async () => { const responsePromise = client.gpuDroplets.destroyWithAssociatedResources.deleteSelective(3164444); const rawResponse = await responsePromise.asResponse(); @@ -65,25 +58,21 @@ describe('resource destroyWithAssociatedResources', () => { expect(dataAndResponse.response).toBe(rawResponse); }); - // Prism tests are disabled + // Mock server tests are disabled test.skip('deleteSelective: request options and params are passed correctly', async () => { // ensure the request options are being passed correctly by passing an invalid HTTP method in order to cause an error - await expect( - client.gpuDroplets.destroyWithAssociatedResources.deleteSelective( - 3164444, - { - floating_ips: ['6186916'], - reserved_ips: ['6186916'], - snapshots: ['61486916'], - volume_snapshots: ['edb0478d-7436-11ea-86e6-0a58ac144b91'], - volumes: ['ba49449a-7435-11ea-b89e-0a58ac14480f'], - }, - { path: '/_stainless_unknown_path' }, - ), - ).rejects.toThrow(Gradient.NotFoundError); + await expect(client.gpuDroplets.destroyWithAssociatedResources.deleteSelective(3164444, { + floating_ips: ['6186916'], + reserved_ips: ['6186916'], + snapshots: ['61486916'], + volume_snapshots: ['edb0478d-7436-11ea-86e6-0a58ac144b91'], + volumes: ['ba49449a-7435-11ea-b89e-0a58ac14480f'], + }, { path: '/_stainless_unknown_path' })) + .rejects + .toThrow(Gradient.NotFoundError); }); - // Prism tests are disabled + // Mock server tests are disabled test.skip('retry', async () => { const responsePromise = client.gpuDroplets.destroyWithAssociatedResources.retry(3164444); const rawResponse = await responsePromise.asResponse(); diff --git a/tests/api-resources/gpu-droplets/firewalls/droplets.test.ts b/tests/api-resources/gpu-droplets/firewalls/droplets.test.ts index 5ee4546b..80c88278 100644 --- a/tests/api-resources/gpu-droplets/firewalls/droplets.test.ts +++ b/tests/api-resources/gpu-droplets/firewalls/droplets.test.ts @@ -2,18 +2,12 @@ import Gradient from '@digitalocean/gradient'; -const client = new Gradient({ - accessToken: 'My Access Token', - baseURL: process.env['TEST_API_BASE_URL'] ?? 'http://127.0.0.1:4010', -}); +const client = new Gradient({ accessToken: 'My Access Token', baseURL: process.env["TEST_API_BASE_URL"] ?? 'http://127.0.0.1:4010' }); describe('resource droplets', () => { - // Prism tests are disabled + // Mock server tests are disabled test.skip('add: only required params', async () => { - const responsePromise = client.gpuDroplets.firewalls.droplets.add( - 'bb4b2611-3d72-467b-8602-280330ecd65c', - { droplet_ids: [49696269] }, - ); + const responsePromise = client.gpuDroplets.firewalls.droplets.add('bb4b2611-3d72-467b-8602-280330ecd65c', { droplet_ids: [49696269] }); const rawResponse = await responsePromise.asResponse(); expect(rawResponse).toBeInstanceOf(Response); const response = await responsePromise; @@ -23,19 +17,14 @@ describe('resource droplets', () => { expect(dataAndResponse.response).toBe(rawResponse); }); - // Prism tests are disabled + // Mock server tests are disabled test.skip('add: required and optional params', async () => { - const response = await client.gpuDroplets.firewalls.droplets.add('bb4b2611-3d72-467b-8602-280330ecd65c', { - droplet_ids: [49696269], - }); + const response = await client.gpuDroplets.firewalls.droplets.add('bb4b2611-3d72-467b-8602-280330ecd65c', { droplet_ids: [49696269] }); }); - // Prism tests are disabled + // Mock server tests are disabled test.skip('remove: only required params', async () => { - const responsePromise = client.gpuDroplets.firewalls.droplets.remove( - 'bb4b2611-3d72-467b-8602-280330ecd65c', - { droplet_ids: [49696269] }, - ); + const responsePromise = client.gpuDroplets.firewalls.droplets.remove('bb4b2611-3d72-467b-8602-280330ecd65c', { droplet_ids: [49696269] }); const rawResponse = await responsePromise.asResponse(); expect(rawResponse).toBeInstanceOf(Response); const response = await responsePromise; @@ -45,11 +34,8 @@ describe('resource droplets', () => { expect(dataAndResponse.response).toBe(rawResponse); }); - // Prism tests are disabled + // Mock server tests are disabled test.skip('remove: required and optional params', async () => { - const response = await client.gpuDroplets.firewalls.droplets.remove( - 'bb4b2611-3d72-467b-8602-280330ecd65c', - { droplet_ids: [49696269] }, - ); + const response = await client.gpuDroplets.firewalls.droplets.remove('bb4b2611-3d72-467b-8602-280330ecd65c', { droplet_ids: [49696269] }); }); }); diff --git a/tests/api-resources/gpu-droplets/firewalls/firewalls.test.ts b/tests/api-resources/gpu-droplets/firewalls/firewalls.test.ts index e0c8dfaa..149eb74a 100644 --- a/tests/api-resources/gpu-droplets/firewalls/firewalls.test.ts +++ b/tests/api-resources/gpu-droplets/firewalls/firewalls.test.ts @@ -2,13 +2,10 @@ import Gradient from '@digitalocean/gradient'; -const client = new Gradient({ - accessToken: 'My Access Token', - baseURL: process.env['TEST_API_BASE_URL'] ?? 'http://127.0.0.1:4010', -}); +const client = new Gradient({ accessToken: 'My Access Token', baseURL: process.env["TEST_API_BASE_URL"] ?? 'http://127.0.0.1:4010' }); describe('resource firewalls', () => { - // Prism tests are disabled + // Mock server tests are disabled test.skip('create', async () => { const responsePromise = client.gpuDroplets.firewalls.create(); const rawResponse = await responsePromise.asResponse(); @@ -20,61 +17,51 @@ describe('resource firewalls', () => { expect(dataAndResponse.response).toBe(rawResponse); }); - // Prism tests are disabled + // Mock server tests are disabled test.skip('create: request options and params are passed correctly', async () => { // ensure the request options are being passed correctly by passing an invalid HTTP method in order to cause an error - await expect( - client.gpuDroplets.firewalls.create( - { - body: { - droplet_ids: [8043964], - inbound_rules: [ - { - ports: '80', - protocol: 'tcp', - sources: { - addresses: ['1.2.3.4', '18.0.0.0/8'], - droplet_ids: [8043964], - kubernetes_ids: ['41b74c5d-9bd0-5555-5555-a57c495b81a3'], - load_balancer_uids: ['4de7ac8b-495b-4884-9a69-1050c6793cd6'], - tags: ['base-image', 'prod'], - }, - }, - { - ports: '22', - protocol: 'tcp', - sources: { - addresses: ['18.0.0.0/8'], - droplet_ids: [8043964], - kubernetes_ids: ['41b74c5d-9bd0-5555-5555-a57c495b81a3'], - load_balancer_uids: ['4de7ac8b-495b-4884-9a69-1050c6793cd6'], - tags: ['gateway'], - }, - }, - ], - name: 'firewall', - outbound_rules: [ - { - destinations: { - addresses: ['0.0.0.0/0', '::/0'], - droplet_ids: [8043964], - kubernetes_ids: ['41b74c5d-9bd0-5555-5555-a57c495b81a3'], - load_balancer_uids: ['4de7ac8b-495b-4884-9a69-1050c6793cd6'], - tags: ['base-image', 'prod'], - }, - ports: '80', - protocol: 'tcp', - }, - ], - tags: ['base-image', 'prod'], - }, - }, - { path: '/_stainless_unknown_path' }, - ), - ).rejects.toThrow(Gradient.NotFoundError); + await expect(client.gpuDroplets.firewalls.create({ body: { + droplet_ids: [8043964], + inbound_rules: [{ + ports: '80', + protocol: 'tcp', + sources: { + addresses: ['1.2.3.4', '18.0.0.0/8'], + droplet_ids: [8043964], + kubernetes_ids: ['41b74c5d-9bd0-5555-5555-a57c495b81a3'], + load_balancer_uids: ['4de7ac8b-495b-4884-9a69-1050c6793cd6'], + tags: ['base-image', 'prod'], + }, + }, { + ports: '22', + protocol: 'tcp', + sources: { + addresses: ['18.0.0.0/8'], + droplet_ids: [8043964], + kubernetes_ids: ['41b74c5d-9bd0-5555-5555-a57c495b81a3'], + load_balancer_uids: ['4de7ac8b-495b-4884-9a69-1050c6793cd6'], + tags: ['gateway'], + }, + }], + name: 'firewall', + outbound_rules: [{ + destinations: { + addresses: ['0.0.0.0/0', '::/0'], + droplet_ids: [8043964], + kubernetes_ids: ['41b74c5d-9bd0-5555-5555-a57c495b81a3'], + load_balancer_uids: ['4de7ac8b-495b-4884-9a69-1050c6793cd6'], + tags: ['base-image', 'prod'], + }, + ports: '80', + protocol: 'tcp', + }], + tags: ['base-image', 'prod'], + } }, { path: '/_stainless_unknown_path' })) + .rejects + .toThrow(Gradient.NotFoundError); }); - // Prism tests are disabled + // Mock server tests are disabled test.skip('retrieve', async () => { const responsePromise = client.gpuDroplets.firewalls.retrieve('bb4b2611-3d72-467b-8602-280330ecd65c'); const rawResponse = await responsePromise.asResponse(); @@ -86,11 +73,9 @@ describe('resource firewalls', () => { expect(dataAndResponse.response).toBe(rawResponse); }); - // Prism tests are disabled + // Mock server tests are disabled test.skip('update: only required params', async () => { - const responsePromise = client.gpuDroplets.firewalls.update('bb4b2611-3d72-467b-8602-280330ecd65c', { - firewall: { name: 'frontend-firewall' }, - }); + const responsePromise = client.gpuDroplets.firewalls.update('bb4b2611-3d72-467b-8602-280330ecd65c', { firewall: { name: 'frontend-firewall' } }); const rawResponse = await responsePromise.asResponse(); expect(rawResponse).toBeInstanceOf(Response); const response = await responsePromise; @@ -100,55 +85,48 @@ describe('resource firewalls', () => { expect(dataAndResponse.response).toBe(rawResponse); }); - // Prism tests are disabled + // Mock server tests are disabled test.skip('update: required and optional params', async () => { - const response = await client.gpuDroplets.firewalls.update('bb4b2611-3d72-467b-8602-280330ecd65c', { - firewall: { - droplet_ids: [8043964], - inbound_rules: [ - { - ports: '8080', - protocol: 'tcp', - sources: { - addresses: ['1.2.3.4', '18.0.0.0/8'], - droplet_ids: [8043964], - kubernetes_ids: ['41b74c5d-9bd0-5555-5555-a57c495b81a3'], - load_balancer_uids: ['4de7ac8b-495b-4884-9a69-1050c6793cd6'], - tags: ['base-image', 'prod'], - }, - }, - { - ports: '22', - protocol: 'tcp', - sources: { - addresses: ['18.0.0.0/8'], - droplet_ids: [8043964], - kubernetes_ids: ['41b74c5d-9bd0-5555-5555-a57c495b81a3'], - load_balancer_uids: ['4de7ac8b-495b-4884-9a69-1050c6793cd6'], - tags: ['gateway'], - }, - }, - ], - name: 'frontend-firewall', - outbound_rules: [ - { - destinations: { - addresses: ['0.0.0.0/0', '::/0'], - droplet_ids: [8043964], - kubernetes_ids: ['41b74c5d-9bd0-5555-5555-a57c495b81a3'], - load_balancer_uids: ['4de7ac8b-495b-4884-9a69-1050c6793cd6'], - tags: ['base-image', 'prod'], - }, - ports: '8080', - protocol: 'tcp', - }, - ], - tags: ['frontend'], - }, - }); + const response = await client.gpuDroplets.firewalls.update('bb4b2611-3d72-467b-8602-280330ecd65c', { firewall: { + droplet_ids: [8043964], + inbound_rules: [{ + ports: '8080', + protocol: 'tcp', + sources: { + addresses: ['1.2.3.4', '18.0.0.0/8'], + droplet_ids: [8043964], + kubernetes_ids: ['41b74c5d-9bd0-5555-5555-a57c495b81a3'], + load_balancer_uids: ['4de7ac8b-495b-4884-9a69-1050c6793cd6'], + tags: ['base-image', 'prod'], + }, + }, { + ports: '22', + protocol: 'tcp', + sources: { + addresses: ['18.0.0.0/8'], + droplet_ids: [8043964], + kubernetes_ids: ['41b74c5d-9bd0-5555-5555-a57c495b81a3'], + load_balancer_uids: ['4de7ac8b-495b-4884-9a69-1050c6793cd6'], + tags: ['gateway'], + }, + }], + name: 'frontend-firewall', + outbound_rules: [{ + destinations: { + addresses: ['0.0.0.0/0', '::/0'], + droplet_ids: [8043964], + kubernetes_ids: ['41b74c5d-9bd0-5555-5555-a57c495b81a3'], + load_balancer_uids: ['4de7ac8b-495b-4884-9a69-1050c6793cd6'], + tags: ['base-image', 'prod'], + }, + ports: '8080', + protocol: 'tcp', + }], + tags: ['frontend'], + } }); }); - // Prism tests are disabled + // Mock server tests are disabled test.skip('list', async () => { const responsePromise = client.gpuDroplets.firewalls.list(); const rawResponse = await responsePromise.asResponse(); @@ -160,15 +138,15 @@ describe('resource firewalls', () => { expect(dataAndResponse.response).toBe(rawResponse); }); - // Prism tests are disabled + // Mock server tests are disabled test.skip('list: request options and params are passed correctly', async () => { // ensure the request options are being passed correctly by passing an invalid HTTP method in order to cause an error - await expect( - client.gpuDroplets.firewalls.list({ page: 1, per_page: 1 }, { path: '/_stainless_unknown_path' }), - ).rejects.toThrow(Gradient.NotFoundError); + await expect(client.gpuDroplets.firewalls.list({ page: 1, per_page: 1 }, { path: '/_stainless_unknown_path' })) + .rejects + .toThrow(Gradient.NotFoundError); }); - // Prism tests are disabled + // Mock server tests are disabled test.skip('delete', async () => { const responsePromise = client.gpuDroplets.firewalls.delete('bb4b2611-3d72-467b-8602-280330ecd65c'); const rawResponse = await responsePromise.asResponse(); diff --git a/tests/api-resources/gpu-droplets/firewalls/rules.test.ts b/tests/api-resources/gpu-droplets/firewalls/rules.test.ts index c30ffc07..e0357ea9 100644 --- a/tests/api-resources/gpu-droplets/firewalls/rules.test.ts +++ b/tests/api-resources/gpu-droplets/firewalls/rules.test.ts @@ -2,13 +2,10 @@ import Gradient from '@digitalocean/gradient'; -const client = new Gradient({ - accessToken: 'My Access Token', - baseURL: process.env['TEST_API_BASE_URL'] ?? 'http://127.0.0.1:4010', -}); +const client = new Gradient({ accessToken: 'My Access Token', baseURL: process.env["TEST_API_BASE_URL"] ?? 'http://127.0.0.1:4010' }); describe('resource rules', () => { - // Prism tests are disabled + // Mock server tests are disabled test.skip('add', async () => { const responsePromise = client.gpuDroplets.firewalls.rules.add('bb4b2611-3d72-467b-8602-280330ecd65c'); const rawResponse = await responsePromise.asResponse(); @@ -20,46 +17,35 @@ describe('resource rules', () => { expect(dataAndResponse.response).toBe(rawResponse); }); - // Prism tests are disabled + // Mock server tests are disabled test.skip('add: request options and params are passed correctly', async () => { // ensure the request options are being passed correctly by passing an invalid HTTP method in order to cause an error - await expect( - client.gpuDroplets.firewalls.rules.add( - 'bb4b2611-3d72-467b-8602-280330ecd65c', - { - inbound_rules: [ - { - ports: '3306', - protocol: 'tcp', - sources: { - addresses: ['1.2.3.4', '18.0.0.0/8'], - droplet_ids: [49696269], - kubernetes_ids: ['41b74c5d-9bd0-5555-5555-a57c495b81a3'], - load_balancer_uids: ['4de7ac8b-495b-4884-9a69-1050c6793cd6'], - tags: ['base-image', 'prod'], - }, - }, - ], - outbound_rules: [ - { - destinations: { - addresses: ['1.2.3.4', '18.0.0.0/8'], - droplet_ids: [49696269], - kubernetes_ids: ['41b74c5d-9bd0-5555-5555-a57c495b81a3'], - load_balancer_uids: ['4de7ac8b-495b-4884-9a69-1050c6793cd6'], - tags: ['base-image', 'prod'], - }, - ports: '3306', - protocol: 'tcp', - }, - ], - }, - { path: '/_stainless_unknown_path' }, - ), - ).rejects.toThrow(Gradient.NotFoundError); + await expect(client.gpuDroplets.firewalls.rules.add('bb4b2611-3d72-467b-8602-280330ecd65c', { inbound_rules: [{ + ports: '3306', + protocol: 'tcp', + sources: { + addresses: ['1.2.3.4', '18.0.0.0/8'], + droplet_ids: [49696269], + kubernetes_ids: ['41b74c5d-9bd0-5555-5555-a57c495b81a3'], + load_balancer_uids: ['4de7ac8b-495b-4884-9a69-1050c6793cd6'], + tags: ['base-image', 'prod'], + }, + }], outbound_rules: [{ + destinations: { + addresses: ['1.2.3.4', '18.0.0.0/8'], + droplet_ids: [49696269], + kubernetes_ids: ['41b74c5d-9bd0-5555-5555-a57c495b81a3'], + load_balancer_uids: ['4de7ac8b-495b-4884-9a69-1050c6793cd6'], + tags: ['base-image', 'prod'], + }, + ports: '3306', + protocol: 'tcp', + }] }, { path: '/_stainless_unknown_path' })) + .rejects + .toThrow(Gradient.NotFoundError); }); - // Prism tests are disabled + // Mock server tests are disabled test.skip('remove', async () => { const responsePromise = client.gpuDroplets.firewalls.rules.remove('bb4b2611-3d72-467b-8602-280330ecd65c'); const rawResponse = await responsePromise.asResponse(); @@ -71,42 +57,31 @@ describe('resource rules', () => { expect(dataAndResponse.response).toBe(rawResponse); }); - // Prism tests are disabled + // Mock server tests are disabled test.skip('remove: request options and params are passed correctly', async () => { // ensure the request options are being passed correctly by passing an invalid HTTP method in order to cause an error - await expect( - client.gpuDroplets.firewalls.rules.remove( - 'bb4b2611-3d72-467b-8602-280330ecd65c', - { - inbound_rules: [ - { - ports: '3306', - protocol: 'tcp', - sources: { - addresses: ['1.2.3.4', '18.0.0.0/8'], - droplet_ids: [49696269], - kubernetes_ids: ['41b74c5d-9bd0-5555-5555-a57c495b81a3'], - load_balancer_uids: ['4de7ac8b-495b-4884-9a69-1050c6793cd6'], - tags: ['base-image', 'prod'], - }, - }, - ], - outbound_rules: [ - { - destinations: { - addresses: ['1.2.3.4', '18.0.0.0/8'], - droplet_ids: [49696269], - kubernetes_ids: ['41b74c5d-9bd0-5555-5555-a57c495b81a3'], - load_balancer_uids: ['4de7ac8b-495b-4884-9a69-1050c6793cd6'], - tags: ['base-image', 'prod'], - }, - ports: '3306', - protocol: 'tcp', - }, - ], - }, - { path: '/_stainless_unknown_path' }, - ), - ).rejects.toThrow(Gradient.NotFoundError); + await expect(client.gpuDroplets.firewalls.rules.remove('bb4b2611-3d72-467b-8602-280330ecd65c', { inbound_rules: [{ + ports: '3306', + protocol: 'tcp', + sources: { + addresses: ['1.2.3.4', '18.0.0.0/8'], + droplet_ids: [49696269], + kubernetes_ids: ['41b74c5d-9bd0-5555-5555-a57c495b81a3'], + load_balancer_uids: ['4de7ac8b-495b-4884-9a69-1050c6793cd6'], + tags: ['base-image', 'prod'], + }, + }], outbound_rules: [{ + destinations: { + addresses: ['1.2.3.4', '18.0.0.0/8'], + droplet_ids: [49696269], + kubernetes_ids: ['41b74c5d-9bd0-5555-5555-a57c495b81a3'], + load_balancer_uids: ['4de7ac8b-495b-4884-9a69-1050c6793cd6'], + tags: ['base-image', 'prod'], + }, + ports: '3306', + protocol: 'tcp', + }] }, { path: '/_stainless_unknown_path' })) + .rejects + .toThrow(Gradient.NotFoundError); }); }); diff --git a/tests/api-resources/gpu-droplets/firewalls/tags.test.ts b/tests/api-resources/gpu-droplets/firewalls/tags.test.ts index c4a39f92..003e012a 100644 --- a/tests/api-resources/gpu-droplets/firewalls/tags.test.ts +++ b/tests/api-resources/gpu-droplets/firewalls/tags.test.ts @@ -2,17 +2,12 @@ import Gradient from '@digitalocean/gradient'; -const client = new Gradient({ - accessToken: 'My Access Token', - baseURL: process.env['TEST_API_BASE_URL'] ?? 'http://127.0.0.1:4010', -}); +const client = new Gradient({ accessToken: 'My Access Token', baseURL: process.env["TEST_API_BASE_URL"] ?? 'http://127.0.0.1:4010' }); describe('resource tags', () => { - // Prism tests are disabled + // Mock server tests are disabled test.skip('add: only required params', async () => { - const responsePromise = client.gpuDroplets.firewalls.tags.add('bb4b2611-3d72-467b-8602-280330ecd65c', { - tags: ['frontend'], - }); + const responsePromise = client.gpuDroplets.firewalls.tags.add('bb4b2611-3d72-467b-8602-280330ecd65c', { tags: ['frontend'] }); const rawResponse = await responsePromise.asResponse(); expect(rawResponse).toBeInstanceOf(Response); const response = await responsePromise; @@ -22,18 +17,14 @@ describe('resource tags', () => { expect(dataAndResponse.response).toBe(rawResponse); }); - // Prism tests are disabled + // Mock server tests are disabled test.skip('add: required and optional params', async () => { - const response = await client.gpuDroplets.firewalls.tags.add('bb4b2611-3d72-467b-8602-280330ecd65c', { - tags: ['frontend'], - }); + const response = await client.gpuDroplets.firewalls.tags.add('bb4b2611-3d72-467b-8602-280330ecd65c', { tags: ['frontend'] }); }); - // Prism tests are disabled + // Mock server tests are disabled test.skip('remove: only required params', async () => { - const responsePromise = client.gpuDroplets.firewalls.tags.remove('bb4b2611-3d72-467b-8602-280330ecd65c', { - tags: ['frontend'], - }); + const responsePromise = client.gpuDroplets.firewalls.tags.remove('bb4b2611-3d72-467b-8602-280330ecd65c', { tags: ['frontend'] }); const rawResponse = await responsePromise.asResponse(); expect(rawResponse).toBeInstanceOf(Response); const response = await responsePromise; @@ -43,10 +34,8 @@ describe('resource tags', () => { expect(dataAndResponse.response).toBe(rawResponse); }); - // Prism tests are disabled + // Mock server tests are disabled test.skip('remove: required and optional params', async () => { - const response = await client.gpuDroplets.firewalls.tags.remove('bb4b2611-3d72-467b-8602-280330ecd65c', { - tags: ['frontend'], - }); + const response = await client.gpuDroplets.firewalls.tags.remove('bb4b2611-3d72-467b-8602-280330ecd65c', { tags: ['frontend'] }); }); }); diff --git a/tests/api-resources/gpu-droplets/floating-ips/actions.test.ts b/tests/api-resources/gpu-droplets/floating-ips/actions.test.ts index d0a8b3c9..4db8bce6 100644 --- a/tests/api-resources/gpu-droplets/floating-ips/actions.test.ts +++ b/tests/api-resources/gpu-droplets/floating-ips/actions.test.ts @@ -2,13 +2,10 @@ import Gradient from '@digitalocean/gradient'; -const client = new Gradient({ - accessToken: 'My Access Token', - baseURL: process.env['TEST_API_BASE_URL'] ?? 'http://127.0.0.1:4010', -}); +const client = new Gradient({ accessToken: 'My Access Token', baseURL: process.env["TEST_API_BASE_URL"] ?? 'http://127.0.0.1:4010' }); describe('resource actions', () => { - // Prism tests are disabled + // Mock server tests are disabled test.skip('create: only required params', async () => { const responsePromise = client.gpuDroplets.floatingIPs.actions.create('45.55.96.47', { type: 'assign' }); const rawResponse = await responsePromise.asResponse(); @@ -20,16 +17,14 @@ describe('resource actions', () => { expect(dataAndResponse.response).toBe(rawResponse); }); - // Prism tests are disabled + // Mock server tests are disabled test.skip('create: required and optional params', async () => { const response = await client.gpuDroplets.floatingIPs.actions.create('45.55.96.47', { type: 'assign' }); }); - // Prism tests are disabled + // Mock server tests are disabled test.skip('retrieve: only required params', async () => { - const responsePromise = client.gpuDroplets.floatingIPs.actions.retrieve(36804636, { - floating_ip: '45.55.96.47', - }); + const responsePromise = client.gpuDroplets.floatingIPs.actions.retrieve(36804636, { floating_ip: '45.55.96.47' }); const rawResponse = await responsePromise.asResponse(); expect(rawResponse).toBeInstanceOf(Response); const response = await responsePromise; @@ -39,14 +34,12 @@ describe('resource actions', () => { expect(dataAndResponse.response).toBe(rawResponse); }); - // Prism tests are disabled + // Mock server tests are disabled test.skip('retrieve: required and optional params', async () => { - const response = await client.gpuDroplets.floatingIPs.actions.retrieve(36804636, { - floating_ip: '45.55.96.47', - }); + const response = await client.gpuDroplets.floatingIPs.actions.retrieve(36804636, { floating_ip: '45.55.96.47' }); }); - // Prism tests are disabled + // Mock server tests are disabled test.skip('list', async () => { const responsePromise = client.gpuDroplets.floatingIPs.actions.list('45.55.96.47'); const rawResponse = await responsePromise.asResponse(); diff --git a/tests/api-resources/gpu-droplets/floating-ips/floating-ips.test.ts b/tests/api-resources/gpu-droplets/floating-ips/floating-ips.test.ts index fb6c5402..fb76abf9 100644 --- a/tests/api-resources/gpu-droplets/floating-ips/floating-ips.test.ts +++ b/tests/api-resources/gpu-droplets/floating-ips/floating-ips.test.ts @@ -2,13 +2,10 @@ import Gradient from '@digitalocean/gradient'; -const client = new Gradient({ - accessToken: 'My Access Token', - baseURL: process.env['TEST_API_BASE_URL'] ?? 'http://127.0.0.1:4010', -}); +const client = new Gradient({ accessToken: 'My Access Token', baseURL: process.env["TEST_API_BASE_URL"] ?? 'http://127.0.0.1:4010' }); describe('resource floatingIPs', () => { - // Prism tests are disabled + // Mock server tests are disabled test.skip('create: only required params', async () => { const responsePromise = client.gpuDroplets.floatingIPs.create({ droplet_id: 2457247 }); const rawResponse = await responsePromise.asResponse(); @@ -20,12 +17,12 @@ describe('resource floatingIPs', () => { expect(dataAndResponse.response).toBe(rawResponse); }); - // Prism tests are disabled + // Mock server tests are disabled test.skip('create: required and optional params', async () => { const response = await client.gpuDroplets.floatingIPs.create({ droplet_id: 2457247 }); }); - // Prism tests are disabled + // Mock server tests are disabled test.skip('retrieve', async () => { const responsePromise = client.gpuDroplets.floatingIPs.retrieve('45.55.96.47'); const rawResponse = await responsePromise.asResponse(); @@ -37,7 +34,7 @@ describe('resource floatingIPs', () => { expect(dataAndResponse.response).toBe(rawResponse); }); - // Prism tests are disabled + // Mock server tests are disabled test.skip('list', async () => { const responsePromise = client.gpuDroplets.floatingIPs.list(); const rawResponse = await responsePromise.asResponse(); @@ -49,15 +46,15 @@ describe('resource floatingIPs', () => { expect(dataAndResponse.response).toBe(rawResponse); }); - // Prism tests are disabled + // Mock server tests are disabled test.skip('list: request options and params are passed correctly', async () => { // ensure the request options are being passed correctly by passing an invalid HTTP method in order to cause an error - await expect( - client.gpuDroplets.floatingIPs.list({ page: 1, per_page: 1 }, { path: '/_stainless_unknown_path' }), - ).rejects.toThrow(Gradient.NotFoundError); + await expect(client.gpuDroplets.floatingIPs.list({ page: 1, per_page: 1 }, { path: '/_stainless_unknown_path' })) + .rejects + .toThrow(Gradient.NotFoundError); }); - // Prism tests are disabled + // Mock server tests are disabled test.skip('delete', async () => { const responsePromise = client.gpuDroplets.floatingIPs.delete('45.55.96.47'); const rawResponse = await responsePromise.asResponse(); diff --git a/tests/api-resources/gpu-droplets/gpu-droplets.test.ts b/tests/api-resources/gpu-droplets/gpu-droplets.test.ts index 112ebd0c..298f1cef 100644 --- a/tests/api-resources/gpu-droplets/gpu-droplets.test.ts +++ b/tests/api-resources/gpu-droplets/gpu-droplets.test.ts @@ -2,19 +2,16 @@ import Gradient from '@digitalocean/gradient'; -const client = new Gradient({ - accessToken: 'My Access Token', - baseURL: process.env['TEST_API_BASE_URL'] ?? 'http://127.0.0.1:4010', -}); +const client = new Gradient({ accessToken: 'My Access Token', baseURL: process.env["TEST_API_BASE_URL"] ?? 'http://127.0.0.1:4010' }); describe('resource gpuDroplets', () => { - // Prism tests are disabled + // Mock server tests are disabled test.skip('create: only required params', async () => { const responsePromise = client.gpuDroplets.create({ - image: 'ubuntu-20-04-x64', - name: 'example.com', - size: 's-1vcpu-1gb', - }); + image: 'ubuntu-20-04-x64', + name: 'example.com', + size: 's-1vcpu-1gb', + }); const rawResponse = await responsePromise.asResponse(); expect(rawResponse).toBeInstanceOf(Response); const response = await responsePromise; @@ -24,28 +21,32 @@ describe('resource gpuDroplets', () => { expect(dataAndResponse.response).toBe(rawResponse); }); - // Prism tests are disabled + // Mock server tests are disabled test.skip('create: required and optional params', async () => { const response = await client.gpuDroplets.create({ - image: 'ubuntu-20-04-x64', - name: 'example.com', - size: 's-1vcpu-1gb', - backup_policy: { hour: 0, plan: 'daily', weekday: 'SUN' }, - backups: true, - ipv6: true, - monitoring: true, - private_networking: true, - region: 'nyc3', - ssh_keys: [289794, '3b:16:e4:bf:8b:00:8b:b8:59:8c:a9:d3:f0:19:fa:45'], - tags: ['env:prod', 'web'], - user_data: '#cloud-config\nruncmd:\n - touch /test.txt\n', - volumes: ['12e97116-7280-11ed-b3d0-0a58ac146812'], - vpc_uuid: '760e09ef-dc84-11e8-981e-3cfdfeaae000', - with_droplet_agent: true, - }); - }); - - // Prism tests are disabled + image: 'ubuntu-20-04-x64', + name: 'example.com', + size: 's-1vcpu-1gb', + backup_policy: { + hour: 0, + plan: 'daily', + weekday: 'SUN', + }, + backups: true, + ipv6: true, + monitoring: true, + private_networking: true, + region: 'nyc3', + ssh_keys: [289794, '3b:16:e4:bf:8b:00:8b:b8:59:8c:a9:d3:f0:19:fa:45'], + tags: ['env:prod', 'web'], + user_data: '#cloud-config\nruncmd:\n - touch /test.txt\n', + volumes: ['12e97116-7280-11ed-b3d0-0a58ac146812'], + vpc_uuid: '760e09ef-dc84-11e8-981e-3cfdfeaae000', + with_droplet_agent: true, + }); + }); + + // Mock server tests are disabled test.skip('retrieve', async () => { const responsePromise = client.gpuDroplets.retrieve(3164444); const rawResponse = await responsePromise.asResponse(); @@ -57,7 +58,7 @@ describe('resource gpuDroplets', () => { expect(dataAndResponse.response).toBe(rawResponse); }); - // Prism tests are disabled + // Mock server tests are disabled test.skip('list', async () => { const responsePromise = client.gpuDroplets.list(); const rawResponse = await responsePromise.asResponse(); @@ -69,18 +70,21 @@ describe('resource gpuDroplets', () => { expect(dataAndResponse.response).toBe(rawResponse); }); - // Prism tests are disabled + // Mock server tests are disabled test.skip('list: request options and params are passed correctly', async () => { // ensure the request options are being passed correctly by passing an invalid HTTP method in order to cause an error - await expect( - client.gpuDroplets.list( - { name: 'name', page: 1, per_page: 1, tag_name: 'tag_name', type: 'droplets' }, - { path: '/_stainless_unknown_path' }, - ), - ).rejects.toThrow(Gradient.NotFoundError); + await expect(client.gpuDroplets.list({ + name: 'name', + page: 1, + per_page: 1, + tag_name: 'tag_name', + type: 'droplets', + }, { path: '/_stainless_unknown_path' })) + .rejects + .toThrow(Gradient.NotFoundError); }); - // Prism tests are disabled + // Mock server tests are disabled test.skip('delete', async () => { const responsePromise = client.gpuDroplets.delete(3164444); const rawResponse = await responsePromise.asResponse(); @@ -92,7 +96,7 @@ describe('resource gpuDroplets', () => { expect(dataAndResponse.response).toBe(rawResponse); }); - // Prism tests are disabled + // Mock server tests are disabled test.skip('deleteByTag: only required params', async () => { const responsePromise = client.gpuDroplets.deleteByTag({ tag_name: 'tag_name' }); const rawResponse = await responsePromise.asResponse(); @@ -104,12 +108,12 @@ describe('resource gpuDroplets', () => { expect(dataAndResponse.response).toBe(rawResponse); }); - // Prism tests are disabled + // Mock server tests are disabled test.skip('deleteByTag: required and optional params', async () => { const response = await client.gpuDroplets.deleteByTag({ tag_name: 'tag_name' }); }); - // Prism tests are disabled + // Mock server tests are disabled test.skip('listFirewalls', async () => { const responsePromise = client.gpuDroplets.listFirewalls(3164444); const rawResponse = await responsePromise.asResponse(); @@ -121,19 +125,15 @@ describe('resource gpuDroplets', () => { expect(dataAndResponse.response).toBe(rawResponse); }); - // Prism tests are disabled + // Mock server tests are disabled test.skip('listFirewalls: request options and params are passed correctly', async () => { // ensure the request options are being passed correctly by passing an invalid HTTP method in order to cause an error - await expect( - client.gpuDroplets.listFirewalls( - 3164444, - { page: 1, per_page: 1 }, - { path: '/_stainless_unknown_path' }, - ), - ).rejects.toThrow(Gradient.NotFoundError); + await expect(client.gpuDroplets.listFirewalls(3164444, { page: 1, per_page: 1 }, { path: '/_stainless_unknown_path' })) + .rejects + .toThrow(Gradient.NotFoundError); }); - // Prism tests are disabled + // Mock server tests are disabled test.skip('listKernels', async () => { const responsePromise = client.gpuDroplets.listKernels(3164444); const rawResponse = await responsePromise.asResponse(); @@ -145,15 +145,15 @@ describe('resource gpuDroplets', () => { expect(dataAndResponse.response).toBe(rawResponse); }); - // Prism tests are disabled + // Mock server tests are disabled test.skip('listKernels: request options and params are passed correctly', async () => { // ensure the request options are being passed correctly by passing an invalid HTTP method in order to cause an error - await expect( - client.gpuDroplets.listKernels(3164444, { page: 1, per_page: 1 }, { path: '/_stainless_unknown_path' }), - ).rejects.toThrow(Gradient.NotFoundError); + await expect(client.gpuDroplets.listKernels(3164444, { page: 1, per_page: 1 }, { path: '/_stainless_unknown_path' })) + .rejects + .toThrow(Gradient.NotFoundError); }); - // Prism tests are disabled + // Mock server tests are disabled test.skip('listNeighbors', async () => { const responsePromise = client.gpuDroplets.listNeighbors(3164444); const rawResponse = await responsePromise.asResponse(); @@ -165,7 +165,7 @@ describe('resource gpuDroplets', () => { expect(dataAndResponse.response).toBe(rawResponse); }); - // Prism tests are disabled + // Mock server tests are disabled test.skip('listSnapshots', async () => { const responsePromise = client.gpuDroplets.listSnapshots(3164444); const rawResponse = await responsePromise.asResponse(); @@ -177,15 +177,11 @@ describe('resource gpuDroplets', () => { expect(dataAndResponse.response).toBe(rawResponse); }); - // Prism tests are disabled + // Mock server tests are disabled test.skip('listSnapshots: request options and params are passed correctly', async () => { // ensure the request options are being passed correctly by passing an invalid HTTP method in order to cause an error - await expect( - client.gpuDroplets.listSnapshots( - 3164444, - { page: 1, per_page: 1 }, - { path: '/_stainless_unknown_path' }, - ), - ).rejects.toThrow(Gradient.NotFoundError); + await expect(client.gpuDroplets.listSnapshots(3164444, { page: 1, per_page: 1 }, { path: '/_stainless_unknown_path' })) + .rejects + .toThrow(Gradient.NotFoundError); }); }); diff --git a/tests/api-resources/gpu-droplets/images/actions.test.ts b/tests/api-resources/gpu-droplets/images/actions.test.ts index e6a849b8..221c38a1 100644 --- a/tests/api-resources/gpu-droplets/images/actions.test.ts +++ b/tests/api-resources/gpu-droplets/images/actions.test.ts @@ -2,13 +2,10 @@ import Gradient from '@digitalocean/gradient'; -const client = new Gradient({ - accessToken: 'My Access Token', - baseURL: process.env['TEST_API_BASE_URL'] ?? 'http://127.0.0.1:4010', -}); +const client = new Gradient({ accessToken: 'My Access Token', baseURL: process.env["TEST_API_BASE_URL"] ?? 'http://127.0.0.1:4010' }); describe('resource actions', () => { - // Prism tests are disabled + // Mock server tests are disabled test.skip('create: only required params', async () => { const responsePromise = client.gpuDroplets.images.actions.create(62137902, { type: 'convert' }); const rawResponse = await responsePromise.asResponse(); @@ -20,12 +17,12 @@ describe('resource actions', () => { expect(dataAndResponse.response).toBe(rawResponse); }); - // Prism tests are disabled + // Mock server tests are disabled test.skip('create: required and optional params', async () => { const response = await client.gpuDroplets.images.actions.create(62137902, { type: 'convert' }); }); - // Prism tests are disabled + // Mock server tests are disabled test.skip('retrieve: only required params', async () => { const responsePromise = client.gpuDroplets.images.actions.retrieve(36804636, { image_id: 62137902 }); const rawResponse = await responsePromise.asResponse(); @@ -37,12 +34,12 @@ describe('resource actions', () => { expect(dataAndResponse.response).toBe(rawResponse); }); - // Prism tests are disabled + // Mock server tests are disabled test.skip('retrieve: required and optional params', async () => { const response = await client.gpuDroplets.images.actions.retrieve(36804636, { image_id: 62137902 }); }); - // Prism tests are disabled + // Mock server tests are disabled test.skip('list', async () => { const responsePromise = client.gpuDroplets.images.actions.list(62137902); const rawResponse = await responsePromise.asResponse(); diff --git a/tests/api-resources/gpu-droplets/images/images.test.ts b/tests/api-resources/gpu-droplets/images/images.test.ts index 5865610e..499e7a1c 100644 --- a/tests/api-resources/gpu-droplets/images/images.test.ts +++ b/tests/api-resources/gpu-droplets/images/images.test.ts @@ -2,13 +2,10 @@ import Gradient from '@digitalocean/gradient'; -const client = new Gradient({ - accessToken: 'My Access Token', - baseURL: process.env['TEST_API_BASE_URL'] ?? 'http://127.0.0.1:4010', -}); +const client = new Gradient({ accessToken: 'My Access Token', baseURL: process.env["TEST_API_BASE_URL"] ?? 'http://127.0.0.1:4010' }); describe('resource images', () => { - // Prism tests are disabled + // Mock server tests are disabled test.skip('create', async () => { const responsePromise = client.gpuDroplets.images.create({}); const rawResponse = await responsePromise.asResponse(); @@ -20,7 +17,7 @@ describe('resource images', () => { expect(dataAndResponse.response).toBe(rawResponse); }); - // Prism tests are disabled + // Mock server tests are disabled test.skip('retrieve', async () => { const responsePromise = client.gpuDroplets.images.retrieve(0); const rawResponse = await responsePromise.asResponse(); @@ -32,7 +29,7 @@ describe('resource images', () => { expect(dataAndResponse.response).toBe(rawResponse); }); - // Prism tests are disabled + // Mock server tests are disabled test.skip('update', async () => { const responsePromise = client.gpuDroplets.images.update(62137902, {}); const rawResponse = await responsePromise.asResponse(); @@ -44,7 +41,7 @@ describe('resource images', () => { expect(dataAndResponse.response).toBe(rawResponse); }); - // Prism tests are disabled + // Mock server tests are disabled test.skip('list', async () => { const responsePromise = client.gpuDroplets.images.list(); const rawResponse = await responsePromise.asResponse(); @@ -56,18 +53,21 @@ describe('resource images', () => { expect(dataAndResponse.response).toBe(rawResponse); }); - // Prism tests are disabled + // Mock server tests are disabled test.skip('list: request options and params are passed correctly', async () => { // ensure the request options are being passed correctly by passing an invalid HTTP method in order to cause an error - await expect( - client.gpuDroplets.images.list( - { page: 1, per_page: 1, private: true, tag_name: 'tag_name', type: 'application' }, - { path: '/_stainless_unknown_path' }, - ), - ).rejects.toThrow(Gradient.NotFoundError); + await expect(client.gpuDroplets.images.list({ + page: 1, + per_page: 1, + private: true, + tag_name: 'tag_name', + type: 'application', + }, { path: '/_stainless_unknown_path' })) + .rejects + .toThrow(Gradient.NotFoundError); }); - // Prism tests are disabled + // Mock server tests are disabled test.skip('delete', async () => { const responsePromise = client.gpuDroplets.images.delete(62137902); const rawResponse = await responsePromise.asResponse(); diff --git a/tests/api-resources/gpu-droplets/load-balancers/droplets.test.ts b/tests/api-resources/gpu-droplets/load-balancers/droplets.test.ts index eb8c4bb0..a4aed6a3 100644 --- a/tests/api-resources/gpu-droplets/load-balancers/droplets.test.ts +++ b/tests/api-resources/gpu-droplets/load-balancers/droplets.test.ts @@ -2,18 +2,12 @@ import Gradient from '@digitalocean/gradient'; -const client = new Gradient({ - accessToken: 'My Access Token', - baseURL: process.env['TEST_API_BASE_URL'] ?? 'http://127.0.0.1:4010', -}); +const client = new Gradient({ accessToken: 'My Access Token', baseURL: process.env["TEST_API_BASE_URL"] ?? 'http://127.0.0.1:4010' }); describe('resource droplets', () => { - // Prism tests are disabled + // Mock server tests are disabled test.skip('add: only required params', async () => { - const responsePromise = client.gpuDroplets.loadBalancers.droplets.add( - '4de7ac8b-495b-4884-9a69-1050c6793cd6', - { droplet_ids: [3164444, 3164445] }, - ); + const responsePromise = client.gpuDroplets.loadBalancers.droplets.add('4de7ac8b-495b-4884-9a69-1050c6793cd6', { droplet_ids: [3164444, 3164445] }); const rawResponse = await responsePromise.asResponse(); expect(rawResponse).toBeInstanceOf(Response); const response = await responsePromise; @@ -23,20 +17,14 @@ describe('resource droplets', () => { expect(dataAndResponse.response).toBe(rawResponse); }); - // Prism tests are disabled + // Mock server tests are disabled test.skip('add: required and optional params', async () => { - const response = await client.gpuDroplets.loadBalancers.droplets.add( - '4de7ac8b-495b-4884-9a69-1050c6793cd6', - { droplet_ids: [3164444, 3164445] }, - ); + const response = await client.gpuDroplets.loadBalancers.droplets.add('4de7ac8b-495b-4884-9a69-1050c6793cd6', { droplet_ids: [3164444, 3164445] }); }); - // Prism tests are disabled + // Mock server tests are disabled test.skip('remove: only required params', async () => { - const responsePromise = client.gpuDroplets.loadBalancers.droplets.remove( - '4de7ac8b-495b-4884-9a69-1050c6793cd6', - { droplet_ids: [3164444, 3164445] }, - ); + const responsePromise = client.gpuDroplets.loadBalancers.droplets.remove('4de7ac8b-495b-4884-9a69-1050c6793cd6', { droplet_ids: [3164444, 3164445] }); const rawResponse = await responsePromise.asResponse(); expect(rawResponse).toBeInstanceOf(Response); const response = await responsePromise; @@ -46,11 +34,8 @@ describe('resource droplets', () => { expect(dataAndResponse.response).toBe(rawResponse); }); - // Prism tests are disabled + // Mock server tests are disabled test.skip('remove: required and optional params', async () => { - const response = await client.gpuDroplets.loadBalancers.droplets.remove( - '4de7ac8b-495b-4884-9a69-1050c6793cd6', - { droplet_ids: [3164444, 3164445] }, - ); + const response = await client.gpuDroplets.loadBalancers.droplets.remove('4de7ac8b-495b-4884-9a69-1050c6793cd6', { droplet_ids: [3164444, 3164445] }); }); }); diff --git a/tests/api-resources/gpu-droplets/load-balancers/forwarding-rules.test.ts b/tests/api-resources/gpu-droplets/load-balancers/forwarding-rules.test.ts index ed2a816b..43f4866b 100644 --- a/tests/api-resources/gpu-droplets/load-balancers/forwarding-rules.test.ts +++ b/tests/api-resources/gpu-droplets/load-balancers/forwarding-rules.test.ts @@ -2,22 +2,17 @@ import Gradient from '@digitalocean/gradient'; -const client = new Gradient({ - accessToken: 'My Access Token', - baseURL: process.env['TEST_API_BASE_URL'] ?? 'http://127.0.0.1:4010', -}); +const client = new Gradient({ accessToken: 'My Access Token', baseURL: process.env["TEST_API_BASE_URL"] ?? 'http://127.0.0.1:4010' }); describe('resource forwardingRules', () => { - // Prism tests are disabled + // Mock server tests are disabled test.skip('add: only required params', async () => { - const responsePromise = client.gpuDroplets.loadBalancers.forwardingRules.add( - '4de7ac8b-495b-4884-9a69-1050c6793cd6', - { - forwarding_rules: [ - { entry_port: 443, entry_protocol: 'https', target_port: 80, target_protocol: 'http' }, - ], - }, - ); + const responsePromise = client.gpuDroplets.loadBalancers.forwardingRules.add('4de7ac8b-495b-4884-9a69-1050c6793cd6', { forwarding_rules: [{ + entry_port: 443, + entry_protocol: 'https', + target_port: 80, + target_protocol: 'http', + }] }); const rawResponse = await responsePromise.asResponse(); expect(rawResponse).toBeInstanceOf(Response); const response = await responsePromise; @@ -27,35 +22,26 @@ describe('resource forwardingRules', () => { expect(dataAndResponse.response).toBe(rawResponse); }); - // Prism tests are disabled + // Mock server tests are disabled test.skip('add: required and optional params', async () => { - const response = await client.gpuDroplets.loadBalancers.forwardingRules.add( - '4de7ac8b-495b-4884-9a69-1050c6793cd6', - { - forwarding_rules: [ - { - entry_port: 443, - entry_protocol: 'https', - target_port: 80, - target_protocol: 'http', - certificate_id: '892071a0-bb95-49bc-8021-3afd67a210bf', - tls_passthrough: false, - }, - ], - }, - ); + const response = await client.gpuDroplets.loadBalancers.forwardingRules.add('4de7ac8b-495b-4884-9a69-1050c6793cd6', { forwarding_rules: [{ + entry_port: 443, + entry_protocol: 'https', + target_port: 80, + target_protocol: 'http', + certificate_id: '892071a0-bb95-49bc-8021-3afd67a210bf', + tls_passthrough: false, + }] }); }); - // Prism tests are disabled + // Mock server tests are disabled test.skip('remove: only required params', async () => { - const responsePromise = client.gpuDroplets.loadBalancers.forwardingRules.remove( - '4de7ac8b-495b-4884-9a69-1050c6793cd6', - { - forwarding_rules: [ - { entry_port: 443, entry_protocol: 'https', target_port: 80, target_protocol: 'http' }, - ], - }, - ); + const responsePromise = client.gpuDroplets.loadBalancers.forwardingRules.remove('4de7ac8b-495b-4884-9a69-1050c6793cd6', { forwarding_rules: [{ + entry_port: 443, + entry_protocol: 'https', + target_port: 80, + target_protocol: 'http', + }] }); const rawResponse = await responsePromise.asResponse(); expect(rawResponse).toBeInstanceOf(Response); const response = await responsePromise; @@ -65,22 +51,15 @@ describe('resource forwardingRules', () => { expect(dataAndResponse.response).toBe(rawResponse); }); - // Prism tests are disabled + // Mock server tests are disabled test.skip('remove: required and optional params', async () => { - const response = await client.gpuDroplets.loadBalancers.forwardingRules.remove( - '4de7ac8b-495b-4884-9a69-1050c6793cd6', - { - forwarding_rules: [ - { - entry_port: 443, - entry_protocol: 'https', - target_port: 80, - target_protocol: 'http', - certificate_id: '892071a0-bb95-49bc-8021-3afd67a210bf', - tls_passthrough: false, - }, - ], - }, - ); + const response = await client.gpuDroplets.loadBalancers.forwardingRules.remove('4de7ac8b-495b-4884-9a69-1050c6793cd6', { forwarding_rules: [{ + entry_port: 443, + entry_protocol: 'https', + target_port: 80, + target_protocol: 'http', + certificate_id: '892071a0-bb95-49bc-8021-3afd67a210bf', + tls_passthrough: false, + }] }); }); }); diff --git a/tests/api-resources/gpu-droplets/load-balancers/load-balancers.test.ts b/tests/api-resources/gpu-droplets/load-balancers/load-balancers.test.ts index 95b097ac..ecb28492 100644 --- a/tests/api-resources/gpu-droplets/load-balancers/load-balancers.test.ts +++ b/tests/api-resources/gpu-droplets/load-balancers/load-balancers.test.ts @@ -2,19 +2,17 @@ import Gradient from '@digitalocean/gradient'; -const client = new Gradient({ - accessToken: 'My Access Token', - baseURL: process.env['TEST_API_BASE_URL'] ?? 'http://127.0.0.1:4010', -}); +const client = new Gradient({ accessToken: 'My Access Token', baseURL: process.env["TEST_API_BASE_URL"] ?? 'http://127.0.0.1:4010' }); describe('resource loadBalancers', () => { - // Prism tests are disabled + // Mock server tests are disabled test.skip('create: only required params', async () => { - const responsePromise = client.gpuDroplets.loadBalancers.create({ - forwarding_rules: [ - { entry_port: 443, entry_protocol: 'https', target_port: 80, target_protocol: 'http' }, - ], - }); + const responsePromise = client.gpuDroplets.loadBalancers.create({ forwarding_rules: [{ + entry_port: 443, + entry_protocol: 'https', + target_port: 80, + target_protocol: 'http', + }] }); const rawResponse = await responsePromise.asResponse(); expect(rawResponse).toBeInstanceOf(Response); const response = await responsePromise; @@ -24,65 +22,70 @@ describe('resource loadBalancers', () => { expect(dataAndResponse.response).toBe(rawResponse); }); - // Prism tests are disabled + // Mock server tests are disabled test.skip('create: required and optional params', async () => { const response = await client.gpuDroplets.loadBalancers.create({ - forwarding_rules: [ - { - entry_port: 443, - entry_protocol: 'https', - target_port: 80, - target_protocol: 'http', - certificate_id: '892071a0-bb95-49bc-8021-3afd67a210bf', - tls_passthrough: false, - }, - ], - algorithm: 'round_robin', - disable_lets_encrypt_dns_records: true, - domains: [ - { certificate_id: '892071a0-bb95-49bc-8021-3afd67a210bf', is_managed: true, name: 'example.com' }, - ], - droplet_ids: [3164444, 3164445], - enable_backend_keepalive: true, - enable_proxy_protocol: true, - firewall: { allow: ['ip:1.2.3.4', 'cidr:2.3.0.0/16'], deny: ['ip:1.2.3.4', 'cidr:2.3.0.0/16'] }, - glb_settings: { - cdn: { is_enabled: true }, - failover_threshold: 50, - region_priorities: { nyc1: 1, fra1: 2, sgp1: 3 }, - target_port: 80, - target_protocol: 'http', - }, - health_check: { - check_interval_seconds: 10, - healthy_threshold: 3, - path: '/', - port: 80, - protocol: 'http', - response_timeout_seconds: 5, - unhealthy_threshold: 5, - }, - http_idle_timeout_seconds: 90, - name: 'example-lb-01', - network: 'EXTERNAL', - network_stack: 'IPV4', - project_id: '4de7ac8b-495b-4884-9a69-1050c6793cd6', - redirect_http_to_https: true, - region: 'nyc3', - size: 'lb-small', - size_unit: 3, - sticky_sessions: { cookie_name: 'DO-LB', cookie_ttl_seconds: 300, type: 'cookies' }, - target_load_balancer_ids: [ - '7dbf91fe-cbdb-48dc-8290-c3a181554905', - '996fa239-fac3-42a2-b9a1-9fa822268b7a', - ], - tls_cipher_policy: 'STRONG', - type: 'REGIONAL', - vpc_uuid: 'c33931f2-a26a-4e61-b85c-4e95a2ec431b', - }); + forwarding_rules: [{ + entry_port: 443, + entry_protocol: 'https', + target_port: 80, + target_protocol: 'http', + certificate_id: '892071a0-bb95-49bc-8021-3afd67a210bf', + tls_passthrough: false, + }], + algorithm: 'round_robin', + disable_lets_encrypt_dns_records: true, + domains: [{ + certificate_id: '892071a0-bb95-49bc-8021-3afd67a210bf', + is_managed: true, + name: 'example.com', + }], + droplet_ids: [3164444, 3164445], + enable_backend_keepalive: true, + enable_proxy_protocol: true, + firewall: { allow: ['ip:1.2.3.4', 'cidr:2.3.0.0/16'], deny: ['ip:1.2.3.4', 'cidr:2.3.0.0/16'] }, + glb_settings: { + cdn: { is_enabled: true }, + failover_threshold: 50, + region_priorities: { + nyc1: 1, + fra1: 2, + sgp1: 3, + }, + target_port: 80, + target_protocol: 'http', + }, + health_check: { + check_interval_seconds: 10, + healthy_threshold: 3, + path: '/', + port: 80, + protocol: 'http', + response_timeout_seconds: 5, + unhealthy_threshold: 5, + }, + http_idle_timeout_seconds: 90, + name: 'example-lb-01', + network: 'EXTERNAL', + network_stack: 'IPV4', + project_id: '4de7ac8b-495b-4884-9a69-1050c6793cd6', + redirect_http_to_https: true, + region: 'nyc3', + size: 'lb-small', + size_unit: 3, + sticky_sessions: { + cookie_name: 'DO-LB', + cookie_ttl_seconds: 300, + type: 'cookies', + }, + target_load_balancer_ids: ['7dbf91fe-cbdb-48dc-8290-c3a181554905', '996fa239-fac3-42a2-b9a1-9fa822268b7a'], + tls_cipher_policy: 'STRONG', + type: 'REGIONAL', + vpc_uuid: 'c33931f2-a26a-4e61-b85c-4e95a2ec431b', + }); }); - // Prism tests are disabled + // Mock server tests are disabled test.skip('retrieve', async () => { const responsePromise = client.gpuDroplets.loadBalancers.retrieve('4de7ac8b-495b-4884-9a69-1050c6793cd6'); const rawResponse = await responsePromise.asResponse(); @@ -94,13 +97,14 @@ describe('resource loadBalancers', () => { expect(dataAndResponse.response).toBe(rawResponse); }); - // Prism tests are disabled + // Mock server tests are disabled test.skip('update: only required params', async () => { - const responsePromise = client.gpuDroplets.loadBalancers.update('4de7ac8b-495b-4884-9a69-1050c6793cd6', { - forwarding_rules: [ - { entry_port: 443, entry_protocol: 'https', target_port: 80, target_protocol: 'http' }, - ], - }); + const responsePromise = client.gpuDroplets.loadBalancers.update('4de7ac8b-495b-4884-9a69-1050c6793cd6', { forwarding_rules: [{ + entry_port: 443, + entry_protocol: 'https', + target_port: 80, + target_protocol: 'http', + }] }); const rawResponse = await responsePromise.asResponse(); expect(rawResponse).toBeInstanceOf(Response); const response = await responsePromise; @@ -110,65 +114,70 @@ describe('resource loadBalancers', () => { expect(dataAndResponse.response).toBe(rawResponse); }); - // Prism tests are disabled + // Mock server tests are disabled test.skip('update: required and optional params', async () => { const response = await client.gpuDroplets.loadBalancers.update('4de7ac8b-495b-4884-9a69-1050c6793cd6', { - forwarding_rules: [ - { - entry_port: 443, - entry_protocol: 'https', - target_port: 80, - target_protocol: 'http', - certificate_id: '892071a0-bb95-49bc-8021-3afd67a210bf', - tls_passthrough: false, - }, - ], - algorithm: 'round_robin', - disable_lets_encrypt_dns_records: true, - domains: [ - { certificate_id: '892071a0-bb95-49bc-8021-3afd67a210bf', is_managed: true, name: 'example.com' }, - ], - droplet_ids: [3164444, 3164445], - enable_backend_keepalive: true, - enable_proxy_protocol: true, - firewall: { allow: ['ip:1.2.3.4', 'cidr:2.3.0.0/16'], deny: ['ip:1.2.3.4', 'cidr:2.3.0.0/16'] }, - glb_settings: { - cdn: { is_enabled: true }, - failover_threshold: 50, - region_priorities: { nyc1: 1, fra1: 2, sgp1: 3 }, - target_port: 80, - target_protocol: 'http', - }, - health_check: { - check_interval_seconds: 10, - healthy_threshold: 3, - path: '/', - port: 80, - protocol: 'http', - response_timeout_seconds: 5, - unhealthy_threshold: 5, - }, - http_idle_timeout_seconds: 90, - name: 'example-lb-01', - network: 'EXTERNAL', - network_stack: 'IPV4', - project_id: '4de7ac8b-495b-4884-9a69-1050c6793cd6', - redirect_http_to_https: true, - region: 'nyc3', - size: 'lb-small', - size_unit: 3, - sticky_sessions: { cookie_name: 'DO-LB', cookie_ttl_seconds: 300, type: 'cookies' }, - target_load_balancer_ids: [ - '7dbf91fe-cbdb-48dc-8290-c3a181554905', - '996fa239-fac3-42a2-b9a1-9fa822268b7a', - ], - tls_cipher_policy: 'STRONG', - type: 'REGIONAL', - vpc_uuid: 'c33931f2-a26a-4e61-b85c-4e95a2ec431b', - }); + forwarding_rules: [{ + entry_port: 443, + entry_protocol: 'https', + target_port: 80, + target_protocol: 'http', + certificate_id: '892071a0-bb95-49bc-8021-3afd67a210bf', + tls_passthrough: false, + }], + algorithm: 'round_robin', + disable_lets_encrypt_dns_records: true, + domains: [{ + certificate_id: '892071a0-bb95-49bc-8021-3afd67a210bf', + is_managed: true, + name: 'example.com', + }], + droplet_ids: [3164444, 3164445], + enable_backend_keepalive: true, + enable_proxy_protocol: true, + firewall: { allow: ['ip:1.2.3.4', 'cidr:2.3.0.0/16'], deny: ['ip:1.2.3.4', 'cidr:2.3.0.0/16'] }, + glb_settings: { + cdn: { is_enabled: true }, + failover_threshold: 50, + region_priorities: { + nyc1: 1, + fra1: 2, + sgp1: 3, + }, + target_port: 80, + target_protocol: 'http', + }, + health_check: { + check_interval_seconds: 10, + healthy_threshold: 3, + path: '/', + port: 80, + protocol: 'http', + response_timeout_seconds: 5, + unhealthy_threshold: 5, + }, + http_idle_timeout_seconds: 90, + name: 'example-lb-01', + network: 'EXTERNAL', + network_stack: 'IPV4', + project_id: '4de7ac8b-495b-4884-9a69-1050c6793cd6', + redirect_http_to_https: true, + region: 'nyc3', + size: 'lb-small', + size_unit: 3, + sticky_sessions: { + cookie_name: 'DO-LB', + cookie_ttl_seconds: 300, + type: 'cookies', + }, + target_load_balancer_ids: ['7dbf91fe-cbdb-48dc-8290-c3a181554905', '996fa239-fac3-42a2-b9a1-9fa822268b7a'], + tls_cipher_policy: 'STRONG', + type: 'REGIONAL', + vpc_uuid: 'c33931f2-a26a-4e61-b85c-4e95a2ec431b', + }); }); - // Prism tests are disabled + // Mock server tests are disabled test.skip('list', async () => { const responsePromise = client.gpuDroplets.loadBalancers.list(); const rawResponse = await responsePromise.asResponse(); @@ -180,15 +189,15 @@ describe('resource loadBalancers', () => { expect(dataAndResponse.response).toBe(rawResponse); }); - // Prism tests are disabled + // Mock server tests are disabled test.skip('list: request options and params are passed correctly', async () => { // ensure the request options are being passed correctly by passing an invalid HTTP method in order to cause an error - await expect( - client.gpuDroplets.loadBalancers.list({ page: 1, per_page: 1 }, { path: '/_stainless_unknown_path' }), - ).rejects.toThrow(Gradient.NotFoundError); + await expect(client.gpuDroplets.loadBalancers.list({ page: 1, per_page: 1 }, { path: '/_stainless_unknown_path' })) + .rejects + .toThrow(Gradient.NotFoundError); }); - // Prism tests are disabled + // Mock server tests are disabled test.skip('delete', async () => { const responsePromise = client.gpuDroplets.loadBalancers.delete('4de7ac8b-495b-4884-9a69-1050c6793cd6'); const rawResponse = await responsePromise.asResponse(); @@ -200,11 +209,9 @@ describe('resource loadBalancers', () => { expect(dataAndResponse.response).toBe(rawResponse); }); - // Prism tests are disabled + // Mock server tests are disabled test.skip('deleteCache', async () => { - const responsePromise = client.gpuDroplets.loadBalancers.deleteCache( - '4de7ac8b-495b-4884-9a69-1050c6793cd6', - ); + const responsePromise = client.gpuDroplets.loadBalancers.deleteCache('4de7ac8b-495b-4884-9a69-1050c6793cd6'); const rawResponse = await responsePromise.asResponse(); expect(rawResponse).toBeInstanceOf(Response); const response = await responsePromise; diff --git a/tests/api-resources/gpu-droplets/sizes.test.ts b/tests/api-resources/gpu-droplets/sizes.test.ts index 0fef6101..3827aa4b 100644 --- a/tests/api-resources/gpu-droplets/sizes.test.ts +++ b/tests/api-resources/gpu-droplets/sizes.test.ts @@ -2,13 +2,10 @@ import Gradient from '@digitalocean/gradient'; -const client = new Gradient({ - accessToken: 'My Access Token', - baseURL: process.env['TEST_API_BASE_URL'] ?? 'http://127.0.0.1:4010', -}); +const client = new Gradient({ accessToken: 'My Access Token', baseURL: process.env["TEST_API_BASE_URL"] ?? 'http://127.0.0.1:4010' }); describe('resource sizes', () => { - // Prism tests are disabled + // Mock server tests are disabled test.skip('list', async () => { const responsePromise = client.gpuDroplets.sizes.list(); const rawResponse = await responsePromise.asResponse(); @@ -20,11 +17,11 @@ describe('resource sizes', () => { expect(dataAndResponse.response).toBe(rawResponse); }); - // Prism tests are disabled + // Mock server tests are disabled test.skip('list: request options and params are passed correctly', async () => { // ensure the request options are being passed correctly by passing an invalid HTTP method in order to cause an error - await expect( - client.gpuDroplets.sizes.list({ page: 1, per_page: 1 }, { path: '/_stainless_unknown_path' }), - ).rejects.toThrow(Gradient.NotFoundError); + await expect(client.gpuDroplets.sizes.list({ page: 1, per_page: 1 }, { path: '/_stainless_unknown_path' })) + .rejects + .toThrow(Gradient.NotFoundError); }); }); diff --git a/tests/api-resources/gpu-droplets/snapshots.test.ts b/tests/api-resources/gpu-droplets/snapshots.test.ts index a98ce15b..783c7ab5 100644 --- a/tests/api-resources/gpu-droplets/snapshots.test.ts +++ b/tests/api-resources/gpu-droplets/snapshots.test.ts @@ -2,13 +2,10 @@ import Gradient from '@digitalocean/gradient'; -const client = new Gradient({ - accessToken: 'My Access Token', - baseURL: process.env['TEST_API_BASE_URL'] ?? 'http://127.0.0.1:4010', -}); +const client = new Gradient({ accessToken: 'My Access Token', baseURL: process.env["TEST_API_BASE_URL"] ?? 'http://127.0.0.1:4010' }); describe('resource snapshots', () => { - // Prism tests are disabled + // Mock server tests are disabled test.skip('retrieve', async () => { const responsePromise = client.gpuDroplets.snapshots.retrieve(6372321); const rawResponse = await responsePromise.asResponse(); @@ -20,7 +17,7 @@ describe('resource snapshots', () => { expect(dataAndResponse.response).toBe(rawResponse); }); - // Prism tests are disabled + // Mock server tests are disabled test.skip('list', async () => { const responsePromise = client.gpuDroplets.snapshots.list(); const rawResponse = await responsePromise.asResponse(); @@ -32,18 +29,19 @@ describe('resource snapshots', () => { expect(dataAndResponse.response).toBe(rawResponse); }); - // Prism tests are disabled + // Mock server tests are disabled test.skip('list: request options and params are passed correctly', async () => { // ensure the request options are being passed correctly by passing an invalid HTTP method in order to cause an error - await expect( - client.gpuDroplets.snapshots.list( - { page: 1, per_page: 1, resource_type: 'droplet' }, - { path: '/_stainless_unknown_path' }, - ), - ).rejects.toThrow(Gradient.NotFoundError); + await expect(client.gpuDroplets.snapshots.list({ + page: 1, + per_page: 1, + resource_type: 'droplet', + }, { path: '/_stainless_unknown_path' })) + .rejects + .toThrow(Gradient.NotFoundError); }); - // Prism tests are disabled + // Mock server tests are disabled test.skip('delete', async () => { const responsePromise = client.gpuDroplets.snapshots.delete(6372321); const rawResponse = await responsePromise.asResponse(); diff --git a/tests/api-resources/gpu-droplets/volumes/actions.test.ts b/tests/api-resources/gpu-droplets/volumes/actions.test.ts index bdb97659..e11ea049 100644 --- a/tests/api-resources/gpu-droplets/volumes/actions.test.ts +++ b/tests/api-resources/gpu-droplets/volumes/actions.test.ts @@ -2,17 +2,12 @@ import Gradient from '@digitalocean/gradient'; -const client = new Gradient({ - accessToken: 'My Access Token', - baseURL: process.env['TEST_API_BASE_URL'] ?? 'http://127.0.0.1:4010', -}); +const client = new Gradient({ accessToken: 'My Access Token', baseURL: process.env["TEST_API_BASE_URL"] ?? 'http://127.0.0.1:4010' }); describe('resource actions', () => { - // Prism tests are disabled + // Mock server tests are disabled test.skip('retrieve: only required params', async () => { - const responsePromise = client.gpuDroplets.volumes.actions.retrieve(36804636, { - volume_id: '7724db7c-e098-11e5-b522-000f53304e51', - }); + const responsePromise = client.gpuDroplets.volumes.actions.retrieve(36804636, { volume_id: '7724db7c-e098-11e5-b522-000f53304e51' }); const rawResponse = await responsePromise.asResponse(); expect(rawResponse).toBeInstanceOf(Response); const response = await responsePromise; @@ -22,16 +17,16 @@ describe('resource actions', () => { expect(dataAndResponse.response).toBe(rawResponse); }); - // Prism tests are disabled + // Mock server tests are disabled test.skip('retrieve: required and optional params', async () => { const response = await client.gpuDroplets.volumes.actions.retrieve(36804636, { - volume_id: '7724db7c-e098-11e5-b522-000f53304e51', - page: 1, - per_page: 1, - }); + volume_id: '7724db7c-e098-11e5-b522-000f53304e51', + page: 1, + per_page: 1, + }); }); - // Prism tests are disabled + // Mock server tests are disabled test.skip('list', async () => { const responsePromise = client.gpuDroplets.volumes.actions.list('7724db7c-e098-11e5-b522-000f53304e51'); const rawResponse = await responsePromise.asResponse(); @@ -43,24 +38,17 @@ describe('resource actions', () => { expect(dataAndResponse.response).toBe(rawResponse); }); - // Prism tests are disabled + // Mock server tests are disabled test.skip('list: request options and params are passed correctly', async () => { // ensure the request options are being passed correctly by passing an invalid HTTP method in order to cause an error - await expect( - client.gpuDroplets.volumes.actions.list( - '7724db7c-e098-11e5-b522-000f53304e51', - { page: 1, per_page: 1 }, - { path: '/_stainless_unknown_path' }, - ), - ).rejects.toThrow(Gradient.NotFoundError); + await expect(client.gpuDroplets.volumes.actions.list('7724db7c-e098-11e5-b522-000f53304e51', { page: 1, per_page: 1 }, { path: '/_stainless_unknown_path' })) + .rejects + .toThrow(Gradient.NotFoundError); }); - // Prism tests are disabled + // Mock server tests are disabled test.skip('initiateByID: only required params', async () => { - const responsePromise = client.gpuDroplets.volumes.actions.initiateByID( - '7724db7c-e098-11e5-b522-000f53304e51', - { droplet_id: 11612190, type: 'attach' }, - ); + const responsePromise = client.gpuDroplets.volumes.actions.initiateByID('7724db7c-e098-11e5-b522-000f53304e51', { droplet_id: 11612190, type: 'attach' }); const rawResponse = await responsePromise.asResponse(); expect(rawResponse).toBeInstanceOf(Response); const response = await responsePromise; @@ -70,27 +58,21 @@ describe('resource actions', () => { expect(dataAndResponse.response).toBe(rawResponse); }); - // Prism tests are disabled + // Mock server tests are disabled test.skip('initiateByID: required and optional params', async () => { - const response = await client.gpuDroplets.volumes.actions.initiateByID( - '7724db7c-e098-11e5-b522-000f53304e51', - { - droplet_id: 11612190, - type: 'attach', - page: 1, - per_page: 1, - region: 'nyc3', - tags: ['base-image', 'prod'], - }, - ); + const response = await client.gpuDroplets.volumes.actions.initiateByID('7724db7c-e098-11e5-b522-000f53304e51', { + droplet_id: 11612190, + type: 'attach', + page: 1, + per_page: 1, + region: 'nyc3', + tags: ['base-image', 'prod'], + }); }); - // Prism tests are disabled + // Mock server tests are disabled test.skip('initiateByName: only required params', async () => { - const responsePromise = client.gpuDroplets.volumes.actions.initiateByName({ - droplet_id: 11612190, - type: 'attach', - }); + const responsePromise = client.gpuDroplets.volumes.actions.initiateByName({ droplet_id: 11612190, type: 'attach' }); const rawResponse = await responsePromise.asResponse(); expect(rawResponse).toBeInstanceOf(Response); const response = await responsePromise; @@ -100,15 +82,15 @@ describe('resource actions', () => { expect(dataAndResponse.response).toBe(rawResponse); }); - // Prism tests are disabled + // Mock server tests are disabled test.skip('initiateByName: required and optional params', async () => { const response = await client.gpuDroplets.volumes.actions.initiateByName({ - droplet_id: 11612190, - type: 'attach', - page: 1, - per_page: 1, - region: 'nyc3', - tags: ['base-image', 'prod'], - }); + droplet_id: 11612190, + type: 'attach', + page: 1, + per_page: 1, + region: 'nyc3', + tags: ['base-image', 'prod'], + }); }); }); diff --git a/tests/api-resources/gpu-droplets/volumes/snapshots.test.ts b/tests/api-resources/gpu-droplets/volumes/snapshots.test.ts index 852eb93b..97afb21a 100644 --- a/tests/api-resources/gpu-droplets/volumes/snapshots.test.ts +++ b/tests/api-resources/gpu-droplets/volumes/snapshots.test.ts @@ -2,18 +2,12 @@ import Gradient from '@digitalocean/gradient'; -const client = new Gradient({ - accessToken: 'My Access Token', - baseURL: process.env['TEST_API_BASE_URL'] ?? 'http://127.0.0.1:4010', -}); +const client = new Gradient({ accessToken: 'My Access Token', baseURL: process.env["TEST_API_BASE_URL"] ?? 'http://127.0.0.1:4010' }); describe('resource snapshots', () => { - // Prism tests are disabled + // Mock server tests are disabled test.skip('create: only required params', async () => { - const responsePromise = client.gpuDroplets.volumes.snapshots.create( - '7724db7c-e098-11e5-b522-000f53304e51', - { name: 'big-data-snapshot1475261774' }, - ); + const responsePromise = client.gpuDroplets.volumes.snapshots.create('7724db7c-e098-11e5-b522-000f53304e51', { name: 'big-data-snapshot1475261774' }); const rawResponse = await responsePromise.asResponse(); expect(rawResponse).toBeInstanceOf(Response); const response = await responsePromise; @@ -23,19 +17,14 @@ describe('resource snapshots', () => { expect(dataAndResponse.response).toBe(rawResponse); }); - // Prism tests are disabled + // Mock server tests are disabled test.skip('create: required and optional params', async () => { - const response = await client.gpuDroplets.volumes.snapshots.create( - '7724db7c-e098-11e5-b522-000f53304e51', - { name: 'big-data-snapshot1475261774', tags: ['base-image', 'prod'] }, - ); + const response = await client.gpuDroplets.volumes.snapshots.create('7724db7c-e098-11e5-b522-000f53304e51', { name: 'big-data-snapshot1475261774', tags: ['base-image', 'prod'] }); }); - // Prism tests are disabled + // Mock server tests are disabled test.skip('retrieve', async () => { - const responsePromise = client.gpuDroplets.volumes.snapshots.retrieve( - 'fbe805e8-866b-11e6-96bf-000f53315a41', - ); + const responsePromise = client.gpuDroplets.volumes.snapshots.retrieve('fbe805e8-866b-11e6-96bf-000f53315a41'); const rawResponse = await responsePromise.asResponse(); expect(rawResponse).toBeInstanceOf(Response); const response = await responsePromise; @@ -45,7 +34,7 @@ describe('resource snapshots', () => { expect(dataAndResponse.response).toBe(rawResponse); }); - // Prism tests are disabled + // Mock server tests are disabled test.skip('list', async () => { const responsePromise = client.gpuDroplets.volumes.snapshots.list('7724db7c-e098-11e5-b522-000f53304e51'); const rawResponse = await responsePromise.asResponse(); @@ -57,23 +46,17 @@ describe('resource snapshots', () => { expect(dataAndResponse.response).toBe(rawResponse); }); - // Prism tests are disabled + // Mock server tests are disabled test.skip('list: request options and params are passed correctly', async () => { // ensure the request options are being passed correctly by passing an invalid HTTP method in order to cause an error - await expect( - client.gpuDroplets.volumes.snapshots.list( - '7724db7c-e098-11e5-b522-000f53304e51', - { page: 1, per_page: 1 }, - { path: '/_stainless_unknown_path' }, - ), - ).rejects.toThrow(Gradient.NotFoundError); + await expect(client.gpuDroplets.volumes.snapshots.list('7724db7c-e098-11e5-b522-000f53304e51', { page: 1, per_page: 1 }, { path: '/_stainless_unknown_path' })) + .rejects + .toThrow(Gradient.NotFoundError); }); - // Prism tests are disabled + // Mock server tests are disabled test.skip('delete', async () => { - const responsePromise = client.gpuDroplets.volumes.snapshots.delete( - 'fbe805e8-866b-11e6-96bf-000f53315a41', - ); + const responsePromise = client.gpuDroplets.volumes.snapshots.delete('fbe805e8-866b-11e6-96bf-000f53315a41'); const rawResponse = await responsePromise.asResponse(); expect(rawResponse).toBeInstanceOf(Response); const response = await responsePromise; diff --git a/tests/api-resources/gpu-droplets/volumes/volumes.test.ts b/tests/api-resources/gpu-droplets/volumes/volumes.test.ts index f938c26b..622086d5 100644 --- a/tests/api-resources/gpu-droplets/volumes/volumes.test.ts +++ b/tests/api-resources/gpu-droplets/volumes/volumes.test.ts @@ -2,19 +2,16 @@ import Gradient from '@digitalocean/gradient'; -const client = new Gradient({ - accessToken: 'My Access Token', - baseURL: process.env['TEST_API_BASE_URL'] ?? 'http://127.0.0.1:4010', -}); +const client = new Gradient({ accessToken: 'My Access Token', baseURL: process.env["TEST_API_BASE_URL"] ?? 'http://127.0.0.1:4010' }); describe('resource volumes', () => { - // Prism tests are disabled + // Mock server tests are disabled test.skip('create: only required params', async () => { const responsePromise = client.gpuDroplets.volumes.create({ - name: 'example', - region: 'nyc3', - size_gigabytes: 10, - }); + name: 'example', + region: 'nyc3', + size_gigabytes: 10, + }); const rawResponse = await responsePromise.asResponse(); expect(rawResponse).toBeInstanceOf(Response); const response = await responsePromise; @@ -24,21 +21,21 @@ describe('resource volumes', () => { expect(dataAndResponse.response).toBe(rawResponse); }); - // Prism tests are disabled + // Mock server tests are disabled test.skip('create: required and optional params', async () => { const response = await client.gpuDroplets.volumes.create({ - name: 'example', - region: 'nyc3', - size_gigabytes: 10, - description: 'Block store for examples', - filesystem_label: 'example', - filesystem_type: 'ext4', - snapshot_id: 'b0798135-fb76-11eb-946a-0a58ac146f33', - tags: ['base-image', 'prod'], - }); + name: 'example', + region: 'nyc3', + size_gigabytes: 10, + description: 'Block store for examples', + filesystem_label: 'example', + filesystem_type: 'ext4', + snapshot_id: 'b0798135-fb76-11eb-946a-0a58ac146f33', + tags: ['base-image', 'prod'], + }); }); - // Prism tests are disabled + // Mock server tests are disabled test.skip('retrieve', async () => { const responsePromise = client.gpuDroplets.volumes.retrieve('7724db7c-e098-11e5-b522-000f53304e51'); const rawResponse = await responsePromise.asResponse(); @@ -50,7 +47,7 @@ describe('resource volumes', () => { expect(dataAndResponse.response).toBe(rawResponse); }); - // Prism tests are disabled + // Mock server tests are disabled test.skip('list', async () => { const responsePromise = client.gpuDroplets.volumes.list(); const rawResponse = await responsePromise.asResponse(); @@ -62,18 +59,20 @@ describe('resource volumes', () => { expect(dataAndResponse.response).toBe(rawResponse); }); - // Prism tests are disabled + // Mock server tests are disabled test.skip('list: request options and params are passed correctly', async () => { // ensure the request options are being passed correctly by passing an invalid HTTP method in order to cause an error - await expect( - client.gpuDroplets.volumes.list( - { name: 'name', page: 1, per_page: 1, region: 'nyc3' }, - { path: '/_stainless_unknown_path' }, - ), - ).rejects.toThrow(Gradient.NotFoundError); + await expect(client.gpuDroplets.volumes.list({ + name: 'name', + page: 1, + per_page: 1, + region: 'nyc3', + }, { path: '/_stainless_unknown_path' })) + .rejects + .toThrow(Gradient.NotFoundError); }); - // Prism tests are disabled + // Mock server tests are disabled test.skip('delete', async () => { const responsePromise = client.gpuDroplets.volumes.delete('7724db7c-e098-11e5-b522-000f53304e51'); const rawResponse = await responsePromise.asResponse(); @@ -85,7 +84,7 @@ describe('resource volumes', () => { expect(dataAndResponse.response).toBe(rawResponse); }); - // Prism tests are disabled + // Mock server tests are disabled test.skip('deleteByName', async () => { const responsePromise = client.gpuDroplets.volumes.deleteByName(); const rawResponse = await responsePromise.asResponse(); @@ -97,14 +96,11 @@ describe('resource volumes', () => { expect(dataAndResponse.response).toBe(rawResponse); }); - // Prism tests are disabled + // Mock server tests are disabled test.skip('deleteByName: request options and params are passed correctly', async () => { // ensure the request options are being passed correctly by passing an invalid HTTP method in order to cause an error - await expect( - client.gpuDroplets.volumes.deleteByName( - { name: 'name', region: 'nyc3' }, - { path: '/_stainless_unknown_path' }, - ), - ).rejects.toThrow(Gradient.NotFoundError); + await expect(client.gpuDroplets.volumes.deleteByName({ name: 'name', region: 'nyc3' }, { path: '/_stainless_unknown_path' })) + .rejects + .toThrow(Gradient.NotFoundError); }); }); diff --git a/tests/api-resources/images.test.ts b/tests/api-resources/images.test.ts index d728a2c2..c0b95210 100644 --- a/tests/api-resources/images.test.ts +++ b/tests/api-resources/images.test.ts @@ -2,17 +2,12 @@ import Gradient from '@digitalocean/gradient'; -const client = new Gradient({ - accessToken: 'My Access Token', - baseURL: process.env['TEST_API_BASE_URL'] ?? 'http://127.0.0.1:4010', -}); +const client = new Gradient({ accessToken: 'My Access Token', baseURL: process.env["TEST_API_BASE_URL"] ?? 'http://127.0.0.1:4010' }); describe('resource images', () => { - // Prism tests are disabled + // Mock server tests are disabled test.skip('generate: only required params', async () => { - const responsePromise = client.images.generate({ - prompt: 'A cute baby sea otter floating on its back in calm blue water', - }); + const responsePromise = client.images.generate({ prompt: 'A cute baby sea otter floating on its back in calm blue water' }); const rawResponse = await responsePromise.asResponse(); expect(rawResponse).toBeInstanceOf(Response); const response = await responsePromise; @@ -22,21 +17,21 @@ describe('resource images', () => { expect(dataAndResponse.response).toBe(rawResponse); }); - // Prism tests are disabled + // Mock server tests are disabled test.skip('generate: required and optional params', async () => { const response = await client.images.generate({ - prompt: 'A cute baby sea otter floating on its back in calm blue water', - background: 'auto', - model: 'openai-gpt-image-1', - moderation: 'auto', - n: 1, - output_compression: 100, - output_format: 'png', - partial_images: 1, - quality: 'auto', - size: 'auto', - stream: false, - user: 'user-1234', - }); + prompt: 'A cute baby sea otter floating on its back in calm blue water', + background: 'auto', + model: 'openai-gpt-image-1', + moderation: 'auto', + n: 1, + output_compression: 100, + output_format: 'png', + partial_images: 1, + quality: 'auto', + size: 'auto', + stream: false, + user: 'user-1234', + }); }); }); diff --git a/tests/api-resources/inference/api-keys.test.ts b/tests/api-resources/inference/api-keys.test.ts index d12443c1..99fa98a6 100644 --- a/tests/api-resources/inference/api-keys.test.ts +++ b/tests/api-resources/inference/api-keys.test.ts @@ -2,13 +2,10 @@ import Gradient from '@digitalocean/gradient'; -const client = new Gradient({ - accessToken: 'My Access Token', - baseURL: process.env['TEST_API_BASE_URL'] ?? 'http://127.0.0.1:4010', -}); +const client = new Gradient({ accessToken: 'My Access Token', baseURL: process.env["TEST_API_BASE_URL"] ?? 'http://127.0.0.1:4010' }); describe('resource apiKeys', () => { - // Prism tests are disabled + // Mock server tests are disabled test.skip('create', async () => { const responsePromise = client.inference.apiKeys.create(); const rawResponse = await responsePromise.asResponse(); @@ -20,15 +17,15 @@ describe('resource apiKeys', () => { expect(dataAndResponse.response).toBe(rawResponse); }); - // Prism tests are disabled + // Mock server tests are disabled test.skip('create: request options and params are passed correctly', async () => { // ensure the request options are being passed correctly by passing an invalid HTTP method in order to cause an error - await expect( - client.inference.apiKeys.create({ name: 'Production Key' }, { path: '/_stainless_unknown_path' }), - ).rejects.toThrow(Gradient.NotFoundError); + await expect(client.inference.apiKeys.create({ name: 'Production Key' }, { path: '/_stainless_unknown_path' })) + .rejects + .toThrow(Gradient.NotFoundError); }); - // Prism tests are disabled + // Mock server tests are disabled test.skip('update', async () => { const responsePromise = client.inference.apiKeys.update('"123e4567-e89b-12d3-a456-426614174000"'); const rawResponse = await responsePromise.asResponse(); @@ -40,19 +37,15 @@ describe('resource apiKeys', () => { expect(dataAndResponse.response).toBe(rawResponse); }); - // Prism tests are disabled + // Mock server tests are disabled test.skip('update: request options and params are passed correctly', async () => { // ensure the request options are being passed correctly by passing an invalid HTTP method in order to cause an error - await expect( - client.inference.apiKeys.update( - '"123e4567-e89b-12d3-a456-426614174000"', - { body_api_key_uuid: '"12345678-1234-1234-1234-123456789012"', name: '"Production Key"' }, - { path: '/_stainless_unknown_path' }, - ), - ).rejects.toThrow(Gradient.NotFoundError); + await expect(client.inference.apiKeys.update('"123e4567-e89b-12d3-a456-426614174000"', { api_key_uuid: '"12345678-1234-1234-1234-123456789012"', name: '"Production Key"' }, { path: '/_stainless_unknown_path' })) + .rejects + .toThrow(Gradient.NotFoundError); }); - // Prism tests are disabled + // Mock server tests are disabled test.skip('list', async () => { const responsePromise = client.inference.apiKeys.list(); const rawResponse = await responsePromise.asResponse(); @@ -64,15 +57,15 @@ describe('resource apiKeys', () => { expect(dataAndResponse.response).toBe(rawResponse); }); - // Prism tests are disabled + // Mock server tests are disabled test.skip('list: request options and params are passed correctly', async () => { // ensure the request options are being passed correctly by passing an invalid HTTP method in order to cause an error - await expect( - client.inference.apiKeys.list({ page: 0, per_page: 0 }, { path: '/_stainless_unknown_path' }), - ).rejects.toThrow(Gradient.NotFoundError); + await expect(client.inference.apiKeys.list({ page: 0, per_page: 0 }, { path: '/_stainless_unknown_path' })) + .rejects + .toThrow(Gradient.NotFoundError); }); - // Prism tests are disabled + // Mock server tests are disabled test.skip('delete', async () => { const responsePromise = client.inference.apiKeys.delete('"123e4567-e89b-12d3-a456-426614174000"'); const rawResponse = await responsePromise.asResponse(); @@ -84,11 +77,9 @@ describe('resource apiKeys', () => { expect(dataAndResponse.response).toBe(rawResponse); }); - // Prism tests are disabled + // Mock server tests are disabled test.skip('updateRegenerate', async () => { - const responsePromise = client.inference.apiKeys.updateRegenerate( - '"123e4567-e89b-12d3-a456-426614174000"', - ); + const responsePromise = client.inference.apiKeys.updateRegenerate('"123e4567-e89b-12d3-a456-426614174000"'); const rawResponse = await responsePromise.asResponse(); expect(rawResponse).toBeInstanceOf(Response); const response = await responsePromise; diff --git a/tests/api-resources/knowledge-bases/data-sources.test.ts b/tests/api-resources/knowledge-bases/data-sources.test.ts index e5c75177..4605e555 100644 --- a/tests/api-resources/knowledge-bases/data-sources.test.ts +++ b/tests/api-resources/knowledge-bases/data-sources.test.ts @@ -2,17 +2,12 @@ import Gradient from '@digitalocean/gradient'; -const client = new Gradient({ - accessToken: 'My Access Token', - baseURL: process.env['TEST_API_BASE_URL'] ?? 'http://127.0.0.1:4010', -}); +const client = new Gradient({ accessToken: 'My Access Token', baseURL: process.env["TEST_API_BASE_URL"] ?? 'http://127.0.0.1:4010' }); describe('resource dataSources', () => { - // Prism tests are disabled + // Mock server tests are disabled test.skip('create', async () => { - const responsePromise = client.knowledgeBases.dataSources.create( - '"123e4567-e89b-12d3-a456-426614174000"', - ); + const responsePromise = client.knowledgeBases.dataSources.create('"123e4567-e89b-12d3-a456-426614174000"'); const rawResponse = await responsePromise.asResponse(); expect(rawResponse).toBeInstanceOf(Response); const response = await responsePromise; @@ -22,38 +17,70 @@ describe('resource dataSources', () => { expect(dataAndResponse.response).toBe(rawResponse); }); - // Prism tests are disabled + // Mock server tests are disabled test.skip('create: request options and params are passed correctly', async () => { // ensure the request options are being passed correctly by passing an invalid HTTP method in order to cause an error - await expect( - client.knowledgeBases.dataSources.create( - '"123e4567-e89b-12d3-a456-426614174000"', - { - aws_data_source: { - bucket_name: 'example name', - item_path: 'example string', - key_id: '123e4567-e89b-12d3-a456-426614174000', - region: 'example string', - secret_key: 'example string', - }, - body_knowledge_base_uuid: '"12345678-1234-1234-1234-123456789012"', - spaces_data_source: { - bucket_name: 'example name', - item_path: 'example string', - region: 'example string', - }, - web_crawler_data_source: { - base_url: 'example string', - crawling_option: 'UNKNOWN', - embed_media: true, - }, - }, - { path: '/_stainless_unknown_path' }, - ), - ).rejects.toThrow(Gradient.NotFoundError); + await expect(client.knowledgeBases.dataSources.create('"123e4567-e89b-12d3-a456-426614174000"', { + aws_data_source: { + bucket_name: 'example name', + item_path: 'example string', + key_id: '123e4567-e89b-12d3-a456-426614174000', + region: 'example string', + secret_key: 'example string', + }, + chunking_algorithm: 'CHUNKING_ALGORITHM_SECTION_BASED', + chunking_options: { + child_chunk_size: 350, + max_chunk_size: 750, + parent_chunk_size: 1000, + semantic_threshold: 0.5, + }, + knowledge_base_uuid: '"12345678-1234-1234-1234-123456789012"', + spaces_data_source: { + bucket_name: 'example name', + item_path: 'example string', + region: 'example string', + }, + web_crawler_data_source: { + base_url: 'example string', + crawling_option: 'UNKNOWN', + embed_media: true, + exclude_tags: ['example string'], + }, + }, { path: '/_stainless_unknown_path' })) + .rejects + .toThrow(Gradient.NotFoundError); + }); + + // Mock server tests are disabled + test.skip('update: only required params', async () => { + const responsePromise = client.knowledgeBases.dataSources.update('123e4567-e89b-12d3-a456-426614174000', { path_knowledge_base_uuid: '123e4567-e89b-12d3-a456-426614174000' }); + const rawResponse = await responsePromise.asResponse(); + expect(rawResponse).toBeInstanceOf(Response); + const response = await responsePromise; + expect(response).not.toBeInstanceOf(Response); + const dataAndResponse = await responsePromise.withResponse(); + expect(dataAndResponse.data).toBe(response); + expect(dataAndResponse.response).toBe(rawResponse); + }); + + // Mock server tests are disabled + test.skip('update: required and optional params', async () => { + const response = await client.knowledgeBases.dataSources.update('123e4567-e89b-12d3-a456-426614174000', { + path_knowledge_base_uuid: '123e4567-e89b-12d3-a456-426614174000', + chunking_algorithm: 'CHUNKING_ALGORITHM_SECTION_BASED', + chunking_options: { + child_chunk_size: 350, + max_chunk_size: 750, + parent_chunk_size: 1000, + semantic_threshold: 0.5, + }, + data_source_uuid: '98765432-1234-1234-1234-123456789012', + body_knowledge_base_uuid: '12345678-1234-1234-1234-123456789012', + }); }); - // Prism tests are disabled + // Mock server tests are disabled test.skip('list', async () => { const responsePromise = client.knowledgeBases.dataSources.list('"123e4567-e89b-12d3-a456-426614174000"'); const rawResponse = await responsePromise.asResponse(); @@ -65,24 +92,17 @@ describe('resource dataSources', () => { expect(dataAndResponse.response).toBe(rawResponse); }); - // Prism tests are disabled + // Mock server tests are disabled test.skip('list: request options and params are passed correctly', async () => { // ensure the request options are being passed correctly by passing an invalid HTTP method in order to cause an error - await expect( - client.knowledgeBases.dataSources.list( - '"123e4567-e89b-12d3-a456-426614174000"', - { page: 0, per_page: 0 }, - { path: '/_stainless_unknown_path' }, - ), - ).rejects.toThrow(Gradient.NotFoundError); + await expect(client.knowledgeBases.dataSources.list('"123e4567-e89b-12d3-a456-426614174000"', { page: 0, per_page: 0 }, { path: '/_stainless_unknown_path' })) + .rejects + .toThrow(Gradient.NotFoundError); }); - // Prism tests are disabled + // Mock server tests are disabled test.skip('delete: only required params', async () => { - const responsePromise = client.knowledgeBases.dataSources.delete( - '"123e4567-e89b-12d3-a456-426614174000"', - { knowledge_base_uuid: '"123e4567-e89b-12d3-a456-426614174000"' }, - ); + const responsePromise = client.knowledgeBases.dataSources.delete('"123e4567-e89b-12d3-a456-426614174000"', { knowledge_base_uuid: '"123e4567-e89b-12d3-a456-426614174000"' }); const rawResponse = await responsePromise.asResponse(); expect(rawResponse).toBeInstanceOf(Response); const response = await responsePromise; @@ -92,15 +112,12 @@ describe('resource dataSources', () => { expect(dataAndResponse.response).toBe(rawResponse); }); - // Prism tests are disabled + // Mock server tests are disabled test.skip('delete: required and optional params', async () => { - const response = await client.knowledgeBases.dataSources.delete( - '"123e4567-e89b-12d3-a456-426614174000"', - { knowledge_base_uuid: '"123e4567-e89b-12d3-a456-426614174000"' }, - ); + const response = await client.knowledgeBases.dataSources.delete('"123e4567-e89b-12d3-a456-426614174000"', { knowledge_base_uuid: '"123e4567-e89b-12d3-a456-426614174000"' }); }); - // Prism tests are disabled + // Mock server tests are disabled test.skip('createPresignedURLs', async () => { const responsePromise = client.knowledgeBases.dataSources.createPresignedURLs(); const rawResponse = await responsePromise.asResponse(); @@ -112,14 +129,11 @@ describe('resource dataSources', () => { expect(dataAndResponse.response).toBe(rawResponse); }); - // Prism tests are disabled + // Mock server tests are disabled test.skip('createPresignedURLs: request options and params are passed correctly', async () => { // ensure the request options are being passed correctly by passing an invalid HTTP method in order to cause an error - await expect( - client.knowledgeBases.dataSources.createPresignedURLs( - { files: [{ file_name: 'example name', file_size: 'file_size' }] }, - { path: '/_stainless_unknown_path' }, - ), - ).rejects.toThrow(Gradient.NotFoundError); + await expect(client.knowledgeBases.dataSources.createPresignedURLs({ files: [{ file_name: 'example name', file_size: 'file_size' }] }, { path: '/_stainless_unknown_path' })) + .rejects + .toThrow(Gradient.NotFoundError); }); }); diff --git a/tests/api-resources/knowledge-bases/indexing-jobs.test.ts b/tests/api-resources/knowledge-bases/indexing-jobs.test.ts index fc19fd5b..8fb83469 100644 --- a/tests/api-resources/knowledge-bases/indexing-jobs.test.ts +++ b/tests/api-resources/knowledge-bases/indexing-jobs.test.ts @@ -2,13 +2,10 @@ import Gradient from '@digitalocean/gradient'; -const client = new Gradient({ - accessToken: 'My Access Token', - baseURL: process.env['TEST_API_BASE_URL'] ?? 'http://127.0.0.1:4010', -}); +const client = new Gradient({ accessToken: 'My Access Token', baseURL: process.env["TEST_API_BASE_URL"] ?? 'http://127.0.0.1:4010' }); describe('resource indexingJobs', () => { - // Prism tests are disabled + // Mock server tests are disabled test.skip('create', async () => { const responsePromise = client.knowledgeBases.indexingJobs.create(); const rawResponse = await responsePromise.asResponse(); @@ -20,25 +17,17 @@ describe('resource indexingJobs', () => { expect(dataAndResponse.response).toBe(rawResponse); }); - // Prism tests are disabled + // Mock server tests are disabled test.skip('create: request options and params are passed correctly', async () => { // ensure the request options are being passed correctly by passing an invalid HTTP method in order to cause an error - await expect( - client.knowledgeBases.indexingJobs.create( - { - data_source_uuids: ['example string'], - knowledge_base_uuid: '"12345678-1234-1234-1234-123456789012"', - }, - { path: '/_stainless_unknown_path' }, - ), - ).rejects.toThrow(Gradient.NotFoundError); + await expect(client.knowledgeBases.indexingJobs.create({ data_source_uuids: ['example string'], knowledge_base_uuid: '"12345678-1234-1234-1234-123456789012"' }, { path: '/_stainless_unknown_path' })) + .rejects + .toThrow(Gradient.NotFoundError); }); - // Prism tests are disabled + // Mock server tests are disabled test.skip('retrieve', async () => { - const responsePromise = client.knowledgeBases.indexingJobs.retrieve( - '"123e4567-e89b-12d3-a456-426614174000"', - ); + const responsePromise = client.knowledgeBases.indexingJobs.retrieve('"123e4567-e89b-12d3-a456-426614174000"'); const rawResponse = await responsePromise.asResponse(); expect(rawResponse).toBeInstanceOf(Response); const response = await responsePromise; @@ -48,7 +37,7 @@ describe('resource indexingJobs', () => { expect(dataAndResponse.response).toBe(rawResponse); }); - // Prism tests are disabled + // Mock server tests are disabled test.skip('list', async () => { const responsePromise = client.knowledgeBases.indexingJobs.list(); const rawResponse = await responsePromise.asResponse(); @@ -60,19 +49,29 @@ describe('resource indexingJobs', () => { expect(dataAndResponse.response).toBe(rawResponse); }); - // Prism tests are disabled + // Mock server tests are disabled test.skip('list: request options and params are passed correctly', async () => { // ensure the request options are being passed correctly by passing an invalid HTTP method in order to cause an error - await expect( - client.knowledgeBases.indexingJobs.list({ page: 0, per_page: 0 }, { path: '/_stainless_unknown_path' }), - ).rejects.toThrow(Gradient.NotFoundError); + await expect(client.knowledgeBases.indexingJobs.list({ page: 0, per_page: 0 }, { path: '/_stainless_unknown_path' })) + .rejects + .toThrow(Gradient.NotFoundError); }); - // Prism tests are disabled + // Mock server tests are disabled test.skip('retrieveDataSources', async () => { - const responsePromise = client.knowledgeBases.indexingJobs.retrieveDataSources( - '"123e4567-e89b-12d3-a456-426614174000"', - ); + const responsePromise = client.knowledgeBases.indexingJobs.retrieveDataSources('"123e4567-e89b-12d3-a456-426614174000"'); + const rawResponse = await responsePromise.asResponse(); + expect(rawResponse).toBeInstanceOf(Response); + const response = await responsePromise; + expect(response).not.toBeInstanceOf(Response); + const dataAndResponse = await responsePromise.withResponse(); + expect(dataAndResponse.data).toBe(response); + expect(dataAndResponse.response).toBe(rawResponse); + }); + + // Mock server tests are disabled + test.skip('retrieveSignedURL', async () => { + const responsePromise = client.knowledgeBases.indexingJobs.retrieveSignedURL('"123e4567-e89b-12d3-a456-426614174000"'); const rawResponse = await responsePromise.asResponse(); expect(rawResponse).toBeInstanceOf(Response); const response = await responsePromise; @@ -82,11 +81,9 @@ describe('resource indexingJobs', () => { expect(dataAndResponse.response).toBe(rawResponse); }); - // Prism tests are disabled + // Mock server tests are disabled test.skip('updateCancel', async () => { - const responsePromise = client.knowledgeBases.indexingJobs.updateCancel( - '"123e4567-e89b-12d3-a456-426614174000"', - ); + const responsePromise = client.knowledgeBases.indexingJobs.updateCancel('"123e4567-e89b-12d3-a456-426614174000"'); const rawResponse = await responsePromise.asResponse(); expect(rawResponse).toBeInstanceOf(Response); const response = await responsePromise; @@ -96,16 +93,12 @@ describe('resource indexingJobs', () => { expect(dataAndResponse.response).toBe(rawResponse); }); - // Prism tests are disabled + // Mock server tests are disabled test.skip('updateCancel: request options and params are passed correctly', async () => { // ensure the request options are being passed correctly by passing an invalid HTTP method in order to cause an error - await expect( - client.knowledgeBases.indexingJobs.updateCancel( - '"123e4567-e89b-12d3-a456-426614174000"', - { body_uuid: '"12345678-1234-1234-1234-123456789012"' }, - { path: '/_stainless_unknown_path' }, - ), - ).rejects.toThrow(Gradient.NotFoundError); + await expect(client.knowledgeBases.indexingJobs.updateCancel('"123e4567-e89b-12d3-a456-426614174000"', { uuid: '"12345678-1234-1234-1234-123456789012"' }, { path: '/_stainless_unknown_path' })) + .rejects + .toThrow(Gradient.NotFoundError); }); describe('waitForCompletion', () => { diff --git a/tests/api-resources/knowledge-bases/knowledge-bases.test.ts b/tests/api-resources/knowledge-bases/knowledge-bases.test.ts index 27355664..e4f65f00 100644 --- a/tests/api-resources/knowledge-bases/knowledge-bases.test.ts +++ b/tests/api-resources/knowledge-bases/knowledge-bases.test.ts @@ -2,13 +2,10 @@ import Gradient from '@digitalocean/gradient'; -const client = new Gradient({ - accessToken: 'My Access Token', - baseURL: process.env['TEST_API_BASE_URL'] ?? 'http://127.0.0.1:4010', -}); +const client = new Gradient({ accessToken: 'My Access Token', baseURL: process.env["TEST_API_BASE_URL"] ?? 'http://127.0.0.1:4010' }); describe('resource knowledgeBases', () => { - // Prism tests are disabled + // Mock server tests are disabled test.skip('create', async () => { const responsePromise = client.knowledgeBases.create(); const rawResponse = await responsePromise.asResponse(); @@ -20,56 +17,60 @@ describe('resource knowledgeBases', () => { expect(dataAndResponse.response).toBe(rawResponse); }); - // Prism tests are disabled + // Mock server tests are disabled test.skip('create: request options and params are passed correctly', async () => { // ensure the request options are being passed correctly by passing an invalid HTTP method in order to cause an error - await expect( - client.knowledgeBases.create( - { - database_id: '"12345678-1234-1234-1234-123456789012"', - datasources: [ - { - aws_data_source: { - bucket_name: 'example name', - item_path: 'example string', - key_id: '123e4567-e89b-12d3-a456-426614174000', - region: 'example string', - secret_key: 'example string', - }, - bucket_name: 'example name', - bucket_region: 'example string', - dropbox_data_source: { folder: 'example string', refresh_token: 'example string' }, - file_upload_data_source: { - original_file_name: 'example name', - size_in_bytes: '12345', - stored_object_key: 'example string', - }, - item_path: 'example string', - spaces_data_source: { - bucket_name: 'example name', - item_path: 'example string', - region: 'example string', - }, - web_crawler_data_source: { - base_url: 'example string', - crawling_option: 'UNKNOWN', - embed_media: true, - }, - }, - ], - embedding_model_uuid: '"12345678-1234-1234-1234-123456789012"', - name: '"My Knowledge Base"', - project_id: '"12345678-1234-1234-1234-123456789012"', - region: '"tor1"', - tags: ['example string'], - vpc_uuid: '"12345678-1234-1234-1234-123456789012"', - }, - { path: '/_stainless_unknown_path' }, - ), - ).rejects.toThrow(Gradient.NotFoundError); + await expect(client.knowledgeBases.create({ + database_id: '"12345678-1234-1234-1234-123456789012"', + datasources: [{ + aws_data_source: { + bucket_name: 'example name', + item_path: 'example string', + key_id: '123e4567-e89b-12d3-a456-426614174000', + region: 'example string', + secret_key: 'example string', + }, + bucket_name: 'example name', + bucket_region: 'example string', + chunking_algorithm: 'CHUNKING_ALGORITHM_SECTION_BASED', + chunking_options: { + child_chunk_size: 350, + max_chunk_size: 750, + parent_chunk_size: 1000, + semantic_threshold: 0.5, + }, + dropbox_data_source: { folder: 'example string', refresh_token: 'example string' }, + file_upload_data_source: { + original_file_name: 'example name', + size_in_bytes: '12345', + stored_object_key: 'example string', + }, + google_drive_data_source: { folder_id: '123e4567-e89b-12d3-a456-426614174000', refresh_token: 'example string' }, + item_path: 'example string', + spaces_data_source: { + bucket_name: 'example name', + item_path: 'example string', + region: 'example string', + }, + web_crawler_data_source: { + base_url: 'example string', + crawling_option: 'UNKNOWN', + embed_media: true, + exclude_tags: ['example string'], + }, + }], + embedding_model_uuid: '"12345678-1234-1234-1234-123456789012"', + name: '"My Knowledge Base"', + project_id: '"12345678-1234-1234-1234-123456789012"', + region: '"tor1"', + tags: ['example string'], + vpc_uuid: '"12345678-1234-1234-1234-123456789012"', + }, { path: '/_stainless_unknown_path' })) + .rejects + .toThrow(Gradient.NotFoundError); }); - // Prism tests are disabled + // Mock server tests are disabled test.skip('retrieve', async () => { const responsePromise = client.knowledgeBases.retrieve('"123e4567-e89b-12d3-a456-426614174000"'); const rawResponse = await responsePromise.asResponse(); @@ -81,7 +82,7 @@ describe('resource knowledgeBases', () => { expect(dataAndResponse.response).toBe(rawResponse); }); - // Prism tests are disabled + // Mock server tests are disabled test.skip('update', async () => { const responsePromise = client.knowledgeBases.update('"123e4567-e89b-12d3-a456-426614174000"'); const rawResponse = await responsePromise.asResponse(); @@ -93,26 +94,22 @@ describe('resource knowledgeBases', () => { expect(dataAndResponse.response).toBe(rawResponse); }); - // Prism tests are disabled + // Mock server tests are disabled test.skip('update: request options and params are passed correctly', async () => { // ensure the request options are being passed correctly by passing an invalid HTTP method in order to cause an error - await expect( - client.knowledgeBases.update( - '"123e4567-e89b-12d3-a456-426614174000"', - { - database_id: '"12345678-1234-1234-1234-123456789012"', - embedding_model_uuid: '"12345678-1234-1234-1234-123456789012"', - name: '"My Knowledge Base"', - project_id: '"12345678-1234-1234-1234-123456789012"', - tags: ['example string'], - body_uuid: '"12345678-1234-1234-1234-123456789012"', - }, - { path: '/_stainless_unknown_path' }, - ), - ).rejects.toThrow(Gradient.NotFoundError); + await expect(client.knowledgeBases.update('"123e4567-e89b-12d3-a456-426614174000"', { + database_id: '"12345678-1234-1234-1234-123456789012"', + embedding_model_uuid: '"12345678-1234-1234-1234-123456789012"', + name: '"My Knowledge Base"', + project_id: '"12345678-1234-1234-1234-123456789012"', + tags: ['example string'], + uuid: '"12345678-1234-1234-1234-123456789012"', + }, { path: '/_stainless_unknown_path' })) + .rejects + .toThrow(Gradient.NotFoundError); }); - // Prism tests are disabled + // Mock server tests are disabled test.skip('list', async () => { const responsePromise = client.knowledgeBases.list(); const rawResponse = await responsePromise.asResponse(); @@ -124,15 +121,15 @@ describe('resource knowledgeBases', () => { expect(dataAndResponse.response).toBe(rawResponse); }); - // Prism tests are disabled + // Mock server tests are disabled test.skip('list: request options and params are passed correctly', async () => { // ensure the request options are being passed correctly by passing an invalid HTTP method in order to cause an error - await expect( - client.knowledgeBases.list({ page: 0, per_page: 0 }, { path: '/_stainless_unknown_path' }), - ).rejects.toThrow(Gradient.NotFoundError); + await expect(client.knowledgeBases.list({ page: 0, per_page: 0 }, { path: '/_stainless_unknown_path' })) + .rejects + .toThrow(Gradient.NotFoundError); }); - // Prism tests are disabled + // Mock server tests are disabled test.skip('delete', async () => { const responsePromise = client.knowledgeBases.delete('"123e4567-e89b-12d3-a456-426614174000"'); const rawResponse = await responsePromise.asResponse(); @@ -143,4 +140,16 @@ describe('resource knowledgeBases', () => { expect(dataAndResponse.data).toBe(response); expect(dataAndResponse.response).toBe(rawResponse); }); + + // Mock server tests are disabled + test.skip('listIndexingJobs', async () => { + const responsePromise = client.knowledgeBases.listIndexingJobs('"123e4567-e89b-12d3-a456-426614174000"'); + const rawResponse = await responsePromise.asResponse(); + expect(rawResponse).toBeInstanceOf(Response); + const response = await responsePromise; + expect(response).not.toBeInstanceOf(Response); + const dataAndResponse = await responsePromise.withResponse(); + expect(dataAndResponse.data).toBe(response); + expect(dataAndResponse.response).toBe(rawResponse); + }); }); diff --git a/tests/api-resources/models/models.test.ts b/tests/api-resources/models/models.test.ts index bffc2e5b..842b5f01 100644 --- a/tests/api-resources/models/models.test.ts +++ b/tests/api-resources/models/models.test.ts @@ -2,13 +2,10 @@ import Gradient from '@digitalocean/gradient'; -const client = new Gradient({ - accessToken: 'My Access Token', - baseURL: process.env['TEST_API_BASE_URL'] ?? 'http://127.0.0.1:4010', -}); +const client = new Gradient({ accessToken: 'My Access Token', baseURL: process.env["TEST_API_BASE_URL"] ?? 'http://127.0.0.1:4010' }); describe('resource models', () => { - // Prism tests are disabled + // Mock server tests are disabled test.skip('list', async () => { const responsePromise = client.models.list(); const rawResponse = await responsePromise.asResponse(); @@ -20,14 +17,16 @@ describe('resource models', () => { expect(dataAndResponse.response).toBe(rawResponse); }); - // Prism tests are disabled + // Mock server tests are disabled test.skip('list: request options and params are passed correctly', async () => { // ensure the request options are being passed correctly by passing an invalid HTTP method in order to cause an error - await expect( - client.models.list( - { page: 0, per_page: 0, public_only: true, usecases: ['MODEL_USECASE_UNKNOWN'] }, - { path: '/_stainless_unknown_path' }, - ), - ).rejects.toThrow(Gradient.NotFoundError); + await expect(client.models.list({ + page: 0, + per_page: 0, + public_only: true, + usecases: ['MODEL_USECASE_UNKNOWN'], + }, { path: '/_stainless_unknown_path' })) + .rejects + .toThrow(Gradient.NotFoundError); }); }); diff --git a/tests/api-resources/models/providers/anthropic.test.ts b/tests/api-resources/models/providers/anthropic.test.ts index 10256b06..b6fb43ed 100644 --- a/tests/api-resources/models/providers/anthropic.test.ts +++ b/tests/api-resources/models/providers/anthropic.test.ts @@ -2,13 +2,10 @@ import Gradient from '@digitalocean/gradient'; -const client = new Gradient({ - accessToken: 'My Access Token', - baseURL: process.env['TEST_API_BASE_URL'] ?? 'http://127.0.0.1:4010', -}); +const client = new Gradient({ accessToken: 'My Access Token', baseURL: process.env["TEST_API_BASE_URL"] ?? 'http://127.0.0.1:4010' }); describe('resource anthropic', () => { - // Prism tests are disabled + // Mock server tests are disabled test.skip('create', async () => { const responsePromise = client.models.providers.anthropic.create(); const rawResponse = await responsePromise.asResponse(); @@ -20,22 +17,17 @@ describe('resource anthropic', () => { expect(dataAndResponse.response).toBe(rawResponse); }); - // Prism tests are disabled + // Mock server tests are disabled test.skip('create: request options and params are passed correctly', async () => { // ensure the request options are being passed correctly by passing an invalid HTTP method in order to cause an error - await expect( - client.models.providers.anthropic.create( - { api_key: '"sk-ant-12345678901234567890123456789012"', name: '"Production Key"' }, - { path: '/_stainless_unknown_path' }, - ), - ).rejects.toThrow(Gradient.NotFoundError); + await expect(client.models.providers.anthropic.create({ api_key: '"sk-ant-12345678901234567890123456789012"', name: '"Production Key"' }, { path: '/_stainless_unknown_path' })) + .rejects + .toThrow(Gradient.NotFoundError); }); - // Prism tests are disabled + // Mock server tests are disabled test.skip('retrieve', async () => { - const responsePromise = client.models.providers.anthropic.retrieve( - '"123e4567-e89b-12d3-a456-426614174000"', - ); + const responsePromise = client.models.providers.anthropic.retrieve('"123e4567-e89b-12d3-a456-426614174000"'); const rawResponse = await responsePromise.asResponse(); expect(rawResponse).toBeInstanceOf(Response); const response = await responsePromise; @@ -45,11 +37,9 @@ describe('resource anthropic', () => { expect(dataAndResponse.response).toBe(rawResponse); }); - // Prism tests are disabled + // Mock server tests are disabled test.skip('update', async () => { - const responsePromise = client.models.providers.anthropic.update( - '"123e4567-e89b-12d3-a456-426614174000"', - ); + const responsePromise = client.models.providers.anthropic.update('"123e4567-e89b-12d3-a456-426614174000"'); const rawResponse = await responsePromise.asResponse(); expect(rawResponse).toBeInstanceOf(Response); const response = await responsePromise; @@ -59,23 +49,19 @@ describe('resource anthropic', () => { expect(dataAndResponse.response).toBe(rawResponse); }); - // Prism tests are disabled + // Mock server tests are disabled test.skip('update: request options and params are passed correctly', async () => { // ensure the request options are being passed correctly by passing an invalid HTTP method in order to cause an error - await expect( - client.models.providers.anthropic.update( - '"123e4567-e89b-12d3-a456-426614174000"', - { - api_key: '"sk-ant-12345678901234567890123456789012"', - body_api_key_uuid: '"12345678-1234-1234-1234-123456789012"', - name: '"Production Key"', - }, - { path: '/_stainless_unknown_path' }, - ), - ).rejects.toThrow(Gradient.NotFoundError); + await expect(client.models.providers.anthropic.update('"123e4567-e89b-12d3-a456-426614174000"', { + api_key: '"sk-ant-12345678901234567890123456789012"', + api_key_uuid: '"12345678-1234-1234-1234-123456789012"', + name: '"Production Key"', + }, { path: '/_stainless_unknown_path' })) + .rejects + .toThrow(Gradient.NotFoundError); }); - // Prism tests are disabled + // Mock server tests are disabled test.skip('list', async () => { const responsePromise = client.models.providers.anthropic.list(); const rawResponse = await responsePromise.asResponse(); @@ -87,19 +73,17 @@ describe('resource anthropic', () => { expect(dataAndResponse.response).toBe(rawResponse); }); - // Prism tests are disabled + // Mock server tests are disabled test.skip('list: request options and params are passed correctly', async () => { // ensure the request options are being passed correctly by passing an invalid HTTP method in order to cause an error - await expect( - client.models.providers.anthropic.list({ page: 0, per_page: 0 }, { path: '/_stainless_unknown_path' }), - ).rejects.toThrow(Gradient.NotFoundError); + await expect(client.models.providers.anthropic.list({ page: 0, per_page: 0 }, { path: '/_stainless_unknown_path' })) + .rejects + .toThrow(Gradient.NotFoundError); }); - // Prism tests are disabled + // Mock server tests are disabled test.skip('delete', async () => { - const responsePromise = client.models.providers.anthropic.delete( - '"123e4567-e89b-12d3-a456-426614174000"', - ); + const responsePromise = client.models.providers.anthropic.delete('"123e4567-e89b-12d3-a456-426614174000"'); const rawResponse = await responsePromise.asResponse(); expect(rawResponse).toBeInstanceOf(Response); const response = await responsePromise; @@ -109,11 +93,9 @@ describe('resource anthropic', () => { expect(dataAndResponse.response).toBe(rawResponse); }); - // Prism tests are disabled + // Mock server tests are disabled test.skip('listAgents', async () => { - const responsePromise = client.models.providers.anthropic.listAgents( - '"123e4567-e89b-12d3-a456-426614174000"', - ); + const responsePromise = client.models.providers.anthropic.listAgents('"123e4567-e89b-12d3-a456-426614174000"'); const rawResponse = await responsePromise.asResponse(); expect(rawResponse).toBeInstanceOf(Response); const response = await responsePromise; @@ -123,15 +105,11 @@ describe('resource anthropic', () => { expect(dataAndResponse.response).toBe(rawResponse); }); - // Prism tests are disabled + // Mock server tests are disabled test.skip('listAgents: request options and params are passed correctly', async () => { // ensure the request options are being passed correctly by passing an invalid HTTP method in order to cause an error - await expect( - client.models.providers.anthropic.listAgents( - '"123e4567-e89b-12d3-a456-426614174000"', - { page: 0, per_page: 0 }, - { path: '/_stainless_unknown_path' }, - ), - ).rejects.toThrow(Gradient.NotFoundError); + await expect(client.models.providers.anthropic.listAgents('"123e4567-e89b-12d3-a456-426614174000"', { page: 0, per_page: 0 }, { path: '/_stainless_unknown_path' })) + .rejects + .toThrow(Gradient.NotFoundError); }); }); diff --git a/tests/api-resources/models/providers/openai.test.ts b/tests/api-resources/models/providers/openai.test.ts index 486c0e0e..4d5eb0fa 100644 --- a/tests/api-resources/models/providers/openai.test.ts +++ b/tests/api-resources/models/providers/openai.test.ts @@ -2,13 +2,10 @@ import Gradient from '@digitalocean/gradient'; -const client = new Gradient({ - accessToken: 'My Access Token', - baseURL: process.env['TEST_API_BASE_URL'] ?? 'http://127.0.0.1:4010', -}); +const client = new Gradient({ accessToken: 'My Access Token', baseURL: process.env["TEST_API_BASE_URL"] ?? 'http://127.0.0.1:4010' }); describe('resource openai', () => { - // Prism tests are disabled + // Mock server tests are disabled test.skip('create', async () => { const responsePromise = client.models.providers.openai.create(); const rawResponse = await responsePromise.asResponse(); @@ -20,18 +17,15 @@ describe('resource openai', () => { expect(dataAndResponse.response).toBe(rawResponse); }); - // Prism tests are disabled + // Mock server tests are disabled test.skip('create: request options and params are passed correctly', async () => { // ensure the request options are being passed correctly by passing an invalid HTTP method in order to cause an error - await expect( - client.models.providers.openai.create( - { api_key: '"sk-proj--123456789098765432123456789"', name: '"Production Key"' }, - { path: '/_stainless_unknown_path' }, - ), - ).rejects.toThrow(Gradient.NotFoundError); + await expect(client.models.providers.openai.create({ api_key: '"sk-proj--123456789098765432123456789"', name: '"Production Key"' }, { path: '/_stainless_unknown_path' })) + .rejects + .toThrow(Gradient.NotFoundError); }); - // Prism tests are disabled + // Mock server tests are disabled test.skip('retrieve', async () => { const responsePromise = client.models.providers.openai.retrieve('"123e4567-e89b-12d3-a456-426614174000"'); const rawResponse = await responsePromise.asResponse(); @@ -43,7 +37,7 @@ describe('resource openai', () => { expect(dataAndResponse.response).toBe(rawResponse); }); - // Prism tests are disabled + // Mock server tests are disabled test.skip('update', async () => { const responsePromise = client.models.providers.openai.update('"123e4567-e89b-12d3-a456-426614174000"'); const rawResponse = await responsePromise.asResponse(); @@ -55,23 +49,19 @@ describe('resource openai', () => { expect(dataAndResponse.response).toBe(rawResponse); }); - // Prism tests are disabled + // Mock server tests are disabled test.skip('update: request options and params are passed correctly', async () => { // ensure the request options are being passed correctly by passing an invalid HTTP method in order to cause an error - await expect( - client.models.providers.openai.update( - '"123e4567-e89b-12d3-a456-426614174000"', - { - api_key: '"sk-ant-12345678901234567890123456789012"', - body_api_key_uuid: '"12345678-1234-1234-1234-123456789012"', - name: '"Production Key"', - }, - { path: '/_stainless_unknown_path' }, - ), - ).rejects.toThrow(Gradient.NotFoundError); + await expect(client.models.providers.openai.update('"123e4567-e89b-12d3-a456-426614174000"', { + api_key: '"sk-ant-12345678901234567890123456789012"', + api_key_uuid: '"12345678-1234-1234-1234-123456789012"', + name: '"Production Key"', + }, { path: '/_stainless_unknown_path' })) + .rejects + .toThrow(Gradient.NotFoundError); }); - // Prism tests are disabled + // Mock server tests are disabled test.skip('list', async () => { const responsePromise = client.models.providers.openai.list(); const rawResponse = await responsePromise.asResponse(); @@ -83,15 +73,15 @@ describe('resource openai', () => { expect(dataAndResponse.response).toBe(rawResponse); }); - // Prism tests are disabled + // Mock server tests are disabled test.skip('list: request options and params are passed correctly', async () => { // ensure the request options are being passed correctly by passing an invalid HTTP method in order to cause an error - await expect( - client.models.providers.openai.list({ page: 0, per_page: 0 }, { path: '/_stainless_unknown_path' }), - ).rejects.toThrow(Gradient.NotFoundError); + await expect(client.models.providers.openai.list({ page: 0, per_page: 0 }, { path: '/_stainless_unknown_path' })) + .rejects + .toThrow(Gradient.NotFoundError); }); - // Prism tests are disabled + // Mock server tests are disabled test.skip('delete', async () => { const responsePromise = client.models.providers.openai.delete('"123e4567-e89b-12d3-a456-426614174000"'); const rawResponse = await responsePromise.asResponse(); @@ -103,11 +93,9 @@ describe('resource openai', () => { expect(dataAndResponse.response).toBe(rawResponse); }); - // Prism tests are disabled + // Mock server tests are disabled test.skip('retrieveAgents', async () => { - const responsePromise = client.models.providers.openai.retrieveAgents( - '"123e4567-e89b-12d3-a456-426614174000"', - ); + const responsePromise = client.models.providers.openai.retrieveAgents('"123e4567-e89b-12d3-a456-426614174000"'); const rawResponse = await responsePromise.asResponse(); expect(rawResponse).toBeInstanceOf(Response); const response = await responsePromise; @@ -117,15 +105,11 @@ describe('resource openai', () => { expect(dataAndResponse.response).toBe(rawResponse); }); - // Prism tests are disabled + // Mock server tests are disabled test.skip('retrieveAgents: request options and params are passed correctly', async () => { // ensure the request options are being passed correctly by passing an invalid HTTP method in order to cause an error - await expect( - client.models.providers.openai.retrieveAgents( - '"123e4567-e89b-12d3-a456-426614174000"', - { page: 0, per_page: 0 }, - { path: '/_stainless_unknown_path' }, - ), - ).rejects.toThrow(Gradient.NotFoundError); + await expect(client.models.providers.openai.retrieveAgents('"123e4567-e89b-12d3-a456-426614174000"', { page: 0, per_page: 0 }, { path: '/_stainless_unknown_path' })) + .rejects + .toThrow(Gradient.NotFoundError); }); }); diff --git a/tests/api-resources/nfs/nfs.test.ts b/tests/api-resources/nfs/nfs.test.ts new file mode 100644 index 00000000..8c5a3e21 --- /dev/null +++ b/tests/api-resources/nfs/nfs.test.ts @@ -0,0 +1,116 @@ +// File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details. + +import Gradient from '@digitalocean/gradient'; + +const client = new Gradient({ accessToken: 'My Access Token', baseURL: process.env["TEST_API_BASE_URL"] ?? 'http://127.0.0.1:4010' }); + +describe('resource nfs', () => { + // Mock server tests are disabled + test.skip('create: only required params', async () => { + const responsePromise = client.nfs.create({ + name: 'sammy-share-drive', + region: 'atl1', + size_gib: 1024, + vpc_ids: ['796c6fe3-2a1d-4da2-9f3e-38239827dc91'], + }); + const rawResponse = await responsePromise.asResponse(); + expect(rawResponse).toBeInstanceOf(Response); + const response = await responsePromise; + expect(response).not.toBeInstanceOf(Response); + const dataAndResponse = await responsePromise.withResponse(); + expect(dataAndResponse.data).toBe(response); + expect(dataAndResponse.response).toBe(rawResponse); + }); + + // Mock server tests are disabled + test.skip('create: required and optional params', async () => { + const response = await client.nfs.create({ + name: 'sammy-share-drive', + region: 'atl1', + size_gib: 1024, + vpc_ids: ['796c6fe3-2a1d-4da2-9f3e-38239827dc91'], + performance_tier: 'standard', + }); + }); + + // Mock server tests are disabled + test.skip('retrieve', async () => { + const responsePromise = client.nfs.retrieve('0a1b2c3d-4e5f-6a7b-8c9d-0e1f2a3b4c5d'); + const rawResponse = await responsePromise.asResponse(); + expect(rawResponse).toBeInstanceOf(Response); + const response = await responsePromise; + expect(response).not.toBeInstanceOf(Response); + const dataAndResponse = await responsePromise.withResponse(); + expect(dataAndResponse.data).toBe(response); + expect(dataAndResponse.response).toBe(rawResponse); + }); + + // Mock server tests are disabled + test.skip('retrieve: request options and params are passed correctly', async () => { + // ensure the request options are being passed correctly by passing an invalid HTTP method in order to cause an error + await expect(client.nfs.retrieve('0a1b2c3d-4e5f-6a7b-8c9d-0e1f2a3b4c5d', { region: 'region' }, { path: '/_stainless_unknown_path' })) + .rejects + .toThrow(Gradient.NotFoundError); + }); + + // Mock server tests are disabled + test.skip('list', async () => { + const responsePromise = client.nfs.list(); + const rawResponse = await responsePromise.asResponse(); + expect(rawResponse).toBeInstanceOf(Response); + const response = await responsePromise; + expect(response).not.toBeInstanceOf(Response); + const dataAndResponse = await responsePromise.withResponse(); + expect(dataAndResponse.data).toBe(response); + expect(dataAndResponse.response).toBe(rawResponse); + }); + + // Mock server tests are disabled + test.skip('list: request options and params are passed correctly', async () => { + // ensure the request options are being passed correctly by passing an invalid HTTP method in order to cause an error + await expect(client.nfs.list({ region: 'region' }, { path: '/_stainless_unknown_path' })) + .rejects + .toThrow(Gradient.NotFoundError); + }); + + // Mock server tests are disabled + test.skip('delete', async () => { + const responsePromise = client.nfs.delete('0a1b2c3d-4e5f-6a7b-8c9d-0e1f2a3b4c5d'); + const rawResponse = await responsePromise.asResponse(); + expect(rawResponse).toBeInstanceOf(Response); + const response = await responsePromise; + expect(response).not.toBeInstanceOf(Response); + const dataAndResponse = await responsePromise.withResponse(); + expect(dataAndResponse.data).toBe(response); + expect(dataAndResponse.response).toBe(rawResponse); + }); + + // Mock server tests are disabled + test.skip('delete: request options and params are passed correctly', async () => { + // ensure the request options are being passed correctly by passing an invalid HTTP method in order to cause an error + await expect(client.nfs.delete('0a1b2c3d-4e5f-6a7b-8c9d-0e1f2a3b4c5d', { region: 'region' }, { path: '/_stainless_unknown_path' })) + .rejects + .toThrow(Gradient.NotFoundError); + }); + + // Mock server tests are disabled + test.skip('initiateAction: only required params', async () => { + const responsePromise = client.nfs.initiateAction('0a1b2c3d-4e5f-6a7b-8c9d-0e1f2a3b4c5d', { type: 'resize' }); + const rawResponse = await responsePromise.asResponse(); + expect(rawResponse).toBeInstanceOf(Response); + const response = await responsePromise; + expect(response).not.toBeInstanceOf(Response); + const dataAndResponse = await responsePromise.withResponse(); + expect(dataAndResponse.data).toBe(response); + expect(dataAndResponse.response).toBe(rawResponse); + }); + + // Mock server tests are disabled + test.skip('initiateAction: required and optional params', async () => { + const response = await client.nfs.initiateAction('0a1b2c3d-4e5f-6a7b-8c9d-0e1f2a3b4c5d', { + type: 'resize', + params: { size_gib: 2048 }, + region: 'atl1', + }); + }); +}); diff --git a/tests/api-resources/nfs/snapshots.test.ts b/tests/api-resources/nfs/snapshots.test.ts new file mode 100644 index 00000000..1a2786d4 --- /dev/null +++ b/tests/api-resources/nfs/snapshots.test.ts @@ -0,0 +1,67 @@ +// File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details. + +import Gradient from '@digitalocean/gradient'; + +const client = new Gradient({ accessToken: 'My Access Token', baseURL: process.env["TEST_API_BASE_URL"] ?? 'http://127.0.0.1:4010' }); + +describe('resource snapshots', () => { + // Mock server tests are disabled + test.skip('retrieve', async () => { + const responsePromise = client.nfs.snapshots.retrieve('0a1b2c3d-4e5f-6a7b-8c9d-0e1f2a3b4c5d'); + const rawResponse = await responsePromise.asResponse(); + expect(rawResponse).toBeInstanceOf(Response); + const response = await responsePromise; + expect(response).not.toBeInstanceOf(Response); + const dataAndResponse = await responsePromise.withResponse(); + expect(dataAndResponse.data).toBe(response); + expect(dataAndResponse.response).toBe(rawResponse); + }); + + // Mock server tests are disabled + test.skip('retrieve: request options and params are passed correctly', async () => { + // ensure the request options are being passed correctly by passing an invalid HTTP method in order to cause an error + await expect(client.nfs.snapshots.retrieve('0a1b2c3d-4e5f-6a7b-8c9d-0e1f2a3b4c5d', { region: 'region' }, { path: '/_stainless_unknown_path' })) + .rejects + .toThrow(Gradient.NotFoundError); + }); + + // Mock server tests are disabled + test.skip('list', async () => { + const responsePromise = client.nfs.snapshots.list(); + const rawResponse = await responsePromise.asResponse(); + expect(rawResponse).toBeInstanceOf(Response); + const response = await responsePromise; + expect(response).not.toBeInstanceOf(Response); + const dataAndResponse = await responsePromise.withResponse(); + expect(dataAndResponse.data).toBe(response); + expect(dataAndResponse.response).toBe(rawResponse); + }); + + // Mock server tests are disabled + test.skip('list: request options and params are passed correctly', async () => { + // ensure the request options are being passed correctly by passing an invalid HTTP method in order to cause an error + await expect(client.nfs.snapshots.list({ region: 'region', share_id: 'share_id' }, { path: '/_stainless_unknown_path' })) + .rejects + .toThrow(Gradient.NotFoundError); + }); + + // Mock server tests are disabled + test.skip('delete', async () => { + const responsePromise = client.nfs.snapshots.delete('0a1b2c3d-4e5f-6a7b-8c9d-0e1f2a3b4c5d'); + const rawResponse = await responsePromise.asResponse(); + expect(rawResponse).toBeInstanceOf(Response); + const response = await responsePromise; + expect(response).not.toBeInstanceOf(Response); + const dataAndResponse = await responsePromise.withResponse(); + expect(dataAndResponse.data).toBe(response); + expect(dataAndResponse.response).toBe(rawResponse); + }); + + // Mock server tests are disabled + test.skip('delete: request options and params are passed correctly', async () => { + // ensure the request options are being passed correctly by passing an invalid HTTP method in order to cause an error + await expect(client.nfs.snapshots.delete('0a1b2c3d-4e5f-6a7b-8c9d-0e1f2a3b4c5d', { region: 'region' }, { path: '/_stainless_unknown_path' })) + .rejects + .toThrow(Gradient.NotFoundError); + }); +}); diff --git a/tests/api-resources/regions.test.ts b/tests/api-resources/regions.test.ts index 60dfa5c9..6c63d7cb 100644 --- a/tests/api-resources/regions.test.ts +++ b/tests/api-resources/regions.test.ts @@ -2,13 +2,10 @@ import Gradient from '@digitalocean/gradient'; -const client = new Gradient({ - accessToken: 'My Access Token', - baseURL: process.env['TEST_API_BASE_URL'] ?? 'http://127.0.0.1:4010', -}); +const client = new Gradient({ accessToken: 'My Access Token', baseURL: process.env["TEST_API_BASE_URL"] ?? 'http://127.0.0.1:4010' }); describe('resource regions', () => { - // Prism tests are disabled + // Mock server tests are disabled test.skip('list', async () => { const responsePromise = client.regions.list(); const rawResponse = await responsePromise.asResponse(); @@ -20,11 +17,11 @@ describe('resource regions', () => { expect(dataAndResponse.response).toBe(rawResponse); }); - // Prism tests are disabled + // Mock server tests are disabled test.skip('list: request options and params are passed correctly', async () => { // ensure the request options are being passed correctly by passing an invalid HTTP method in order to cause an error - await expect( - client.regions.list({ page: 1, per_page: 1 }, { path: '/_stainless_unknown_path' }), - ).rejects.toThrow(Gradient.NotFoundError); + await expect(client.regions.list({ page: 1, per_page: 1 }, { path: '/_stainless_unknown_path' })) + .rejects + .toThrow(Gradient.NotFoundError); }); }); diff --git a/tests/api-resources/responses.test.ts b/tests/api-resources/responses.test.ts new file mode 100644 index 00000000..6d7bfc12 --- /dev/null +++ b/tests/api-resources/responses.test.ts @@ -0,0 +1,46 @@ +// File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details. + +import Gradient from '@digitalocean/gradient'; + +const client = new Gradient({ accessToken: 'My Access Token', baseURL: process.env["TEST_API_BASE_URL"] ?? 'http://127.0.0.1:4010' }); + +describe('resource responses', () => { + // Mock server tests are disabled + test.skip('create: only required params', async () => { + const responsePromise = client.responses.create({ input: 'Tell me a three-sentence bedtime story about a unicorn.', model: 'llama3-8b-instruct' }); + const rawResponse = await responsePromise.asResponse(); + expect(rawResponse).toBeInstanceOf(Response); + const response = await responsePromise; + expect(response).not.toBeInstanceOf(Response); + const dataAndResponse = await responsePromise.withResponse(); + expect(dataAndResponse.data).toBe(response); + expect(dataAndResponse.response).toBe(rawResponse); + }); + + // Mock server tests are disabled + test.skip('create: required and optional params', async () => { + const response = await client.responses.create({ + input: 'Tell me a three-sentence bedtime story about a unicorn.', + model: 'llama3-8b-instruct', + instructions: 'You are a helpful assistant.', + max_output_tokens: 1024, + max_tokens: 1024, + metadata: { foo: 'string' }, + modalities: ['text'], + parallel_tool_calls: true, + stop: '\n', + stream: false, + stream_options: { include_usage: true }, + temperature: 1, + tool_choice: 'none', + tools: [{ + type: 'function', + description: 'description', + name: 'name', + parameters: { foo: 'bar' }, + }], + top_p: 1, + user: 'user-1234', + }); + }); +}); diff --git a/tests/api-resources/retrieve.test.ts b/tests/api-resources/retrieve.test.ts new file mode 100644 index 00000000..9719e4c0 --- /dev/null +++ b/tests/api-resources/retrieve.test.ts @@ -0,0 +1,45 @@ +// File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details. + +import Gradient from '@digitalocean/gradient'; + +const client = new Gradient({ accessToken: 'My Access Token', baseURL: process.env["TEST_API_BASE_URL"] ?? 'http://127.0.0.1:4010' }); + +describe('resource retrieve', () => { + // Mock server tests are disabled + test.skip('documents: only required params', async () => { + const responsePromise = client.retrieve.documents('550e8400-e29b-41d4-a716-446655440000', { num_results: 5, query: 'What are the best practices for deploying machine learning models?' }); + const rawResponse = await responsePromise.asResponse(); + expect(rawResponse).toBeInstanceOf(Response); + const response = await responsePromise; + expect(response).not.toBeInstanceOf(Response); + const dataAndResponse = await responsePromise.withResponse(); + expect(dataAndResponse.data).toBe(response); + expect(dataAndResponse.response).toBe(rawResponse); + }); + + // Mock server tests are disabled + test.skip('documents: required and optional params', async () => { + const response = await client.retrieve.documents('550e8400-e29b-41d4-a716-446655440000', { + num_results: 5, + query: 'What are the best practices for deploying machine learning models?', + alpha: 0.75, + filters: { + must: [{ + field: 'category', + operator: 'eq', + value: 'documentation', + }], + must_not: [{ + field: 'category', + operator: 'eq', + value: 'documentation', + }], + should: [{ + field: 'category', + operator: 'eq', + value: 'documentation', + }], + }, + }); + }); +}); diff --git a/tests/buildHeaders.test.ts b/tests/buildHeaders.test.ts index 6a9f96bc..1862bc53 100644 --- a/tests/buildHeaders.test.ts +++ b/tests/buildHeaders.test.ts @@ -1,9 +1,5 @@ import { inspect } from 'node:util'; -import { - buildHeaders, - type HeadersLike, - type NullableHeaders, -} from '@digitalocean/gradient/internal/headers'; +import { buildHeaders, type HeadersLike, type NullableHeaders } from '@digitalocean/gradient/internal/headers'; function inspectNullableHeaders(headers: NullableHeaders) { return `NullableHeaders {${[ diff --git a/tests/index.test.ts b/tests/index.test.ts index 11828f9e..cf6db4a6 100644 --- a/tests/index.test.ts +++ b/tests/index.test.ts @@ -21,10 +21,10 @@ describe('instantiate client', () => { describe('defaultHeaders', () => { const client = new Gradient({ - baseURL: 'http://localhost:5000/', - defaultHeaders: { 'X-My-Default-Header': '2' }, - accessToken: 'My Access Token', - }); + baseURL: 'http://localhost:5000/', + defaultHeaders: { 'X-My-Default-Header': '2' }, + accessToken: 'My Access Token', +}) test('they are used in the request', async () => { const { req } = await client.buildRequest({ path: '/foo', method: 'post' }); @@ -49,177 +49,191 @@ describe('instantiate client', () => { expect(req.headers.has('x-my-default-header')).toBe(false); }); }); - describe('logging', () => { - const env = process.env; +describe('logging', () => { + const env = process.env; - beforeEach(() => { - process.env = { ...env }; - process.env['GRADIENT_LOG'] = undefined; - }); + beforeEach(() => { + process.env = { ...env }; + process.env['GRADIENT_LOG'] = undefined; + }); - afterEach(() => { - process.env = env; - }); + afterEach(() => { + process.env = env; + }); - const forceAPIResponseForClient = async (client: Gradient) => { - await new APIPromise( - client, - Promise.resolve({ - response: new Response(), - controller: new AbortController(), - requestLogID: 'log_000000', - retryOfRequestLogID: undefined, - startTime: Date.now(), - options: { - method: 'get', - path: '/', - }, - }), - ); + const forceAPIResponseForClient = async (client: Gradient) => { + await new APIPromise( + client, + Promise.resolve({ + response: new Response(), + controller: new AbortController(), + requestLogID: 'log_000000', + retryOfRequestLogID: undefined, + startTime: Date.now(), + options: { + method: 'get', + path: '/', + }, + }), + ); + }; + + test('debug logs when log level is debug', async () => { + const debugMock = jest.fn(); + const logger = { + debug: debugMock, + info: jest.fn(), + warn: jest.fn(), + error: jest.fn(), }; - test('debug logs when log level is debug', async () => { - const debugMock = jest.fn(); - const logger = { - debug: debugMock, - info: jest.fn(), - warn: jest.fn(), - error: jest.fn(), - }; - - const client = new Gradient({ logger: logger, logLevel: 'debug', accessToken: 'My Access Token' }); + const client = new Gradient({ + logger: logger, + logLevel: 'debug', + accessToken: 'My Access Token', +}); - await forceAPIResponseForClient(client); - expect(debugMock).toHaveBeenCalled(); - }); + await forceAPIResponseForClient(client); + expect(debugMock).toHaveBeenCalled(); + }); - test('default logLevel is warn', async () => { - const client = new Gradient({ accessToken: 'My Access Token' }); - expect(client.logLevel).toBe('warn'); - }); + test('default logLevel is warn', async () => { + const client = new Gradient({ accessToken: 'My Access Token' }); + expect(client.logLevel).toBe('warn'); + }); - test('debug logs are skipped when log level is info', async () => { - const debugMock = jest.fn(); - const logger = { - debug: debugMock, - info: jest.fn(), - warn: jest.fn(), - error: jest.fn(), - }; + test('debug logs are skipped when log level is info', async () => { + const debugMock = jest.fn(); + const logger = { + debug: debugMock, + info: jest.fn(), + warn: jest.fn(), + error: jest.fn(), + }; - const client = new Gradient({ logger: logger, logLevel: 'info', accessToken: 'My Access Token' }); + const client = new Gradient({ + logger: logger, + logLevel: 'info', + accessToken: 'My Access Token', +}); - await forceAPIResponseForClient(client); - expect(debugMock).not.toHaveBeenCalled(); - }); + await forceAPIResponseForClient(client); + expect(debugMock).not.toHaveBeenCalled(); + }); - test('debug logs happen with debug env var', async () => { - const debugMock = jest.fn(); - const logger = { - debug: debugMock, - info: jest.fn(), - warn: jest.fn(), - error: jest.fn(), - }; + test('debug logs happen with debug env var', async () => { + const debugMock = jest.fn(); + const logger = { + debug: debugMock, + info: jest.fn(), + warn: jest.fn(), + error: jest.fn(), + }; - process.env['GRADIENT_LOG'] = 'debug'; - const client = new Gradient({ logger: logger, accessToken: 'My Access Token' }); - expect(client.logLevel).toBe('debug'); + process.env['GRADIENT_LOG'] = 'debug'; + const client = new Gradient({ logger: logger, accessToken: 'My Access Token' }); + expect(client.logLevel).toBe('debug'); - await forceAPIResponseForClient(client); - expect(debugMock).toHaveBeenCalled(); - }); + await forceAPIResponseForClient(client); + expect(debugMock).toHaveBeenCalled(); + }); - test('warn when env var level is invalid', async () => { - const warnMock = jest.fn(); - const logger = { - debug: jest.fn(), - info: jest.fn(), - warn: warnMock, - error: jest.fn(), - }; + test('warn when env var level is invalid', async () => { + const warnMock = jest.fn(); + const logger = { + debug: jest.fn(), + info: jest.fn(), + warn: warnMock, + error: jest.fn(), + }; - process.env['GRADIENT_LOG'] = 'not a log level'; - const client = new Gradient({ logger: logger, accessToken: 'My Access Token' }); - expect(client.logLevel).toBe('warn'); - expect(warnMock).toHaveBeenCalledWith( - 'process.env[\'GRADIENT_LOG\'] was set to "not a log level", expected one of ["off","error","warn","info","debug"]', - ); - }); + process.env['GRADIENT_LOG'] = 'not a log level'; + const client = new Gradient({ logger: logger, accessToken: 'My Access Token' }); + expect(client.logLevel).toBe('warn'); + expect(warnMock).toHaveBeenCalledWith('process.env[\'GRADIENT_LOG\'] was set to "not a log level", expected one of ["off","error","warn","info","debug"]'); + }); - test('client log level overrides env var', async () => { - const debugMock = jest.fn(); - const logger = { - debug: debugMock, - info: jest.fn(), - warn: jest.fn(), - error: jest.fn(), - }; + test('client log level overrides env var', async () => { + const debugMock = jest.fn(); + const logger = { + debug: debugMock, + info: jest.fn(), + warn: jest.fn(), + error: jest.fn(), + }; - process.env['GRADIENT_LOG'] = 'debug'; - const client = new Gradient({ logger: logger, logLevel: 'off', accessToken: 'My Access Token' }); + process.env['GRADIENT_LOG'] = 'debug'; + const client = new Gradient({ + logger: logger, + logLevel: 'off', + accessToken: 'My Access Token', +}); - await forceAPIResponseForClient(client); - expect(debugMock).not.toHaveBeenCalled(); - }); + await forceAPIResponseForClient(client); + expect(debugMock).not.toHaveBeenCalled(); + }); - test('no warning logged for invalid env var level + valid client level', async () => { - const warnMock = jest.fn(); - const logger = { - debug: jest.fn(), - info: jest.fn(), - warn: warnMock, - error: jest.fn(), - }; + test('no warning logged for invalid env var level + valid client level', async () => { + const warnMock = jest.fn(); + const logger = { + debug: jest.fn(), + info: jest.fn(), + warn: warnMock, + error: jest.fn(), + }; - process.env['GRADIENT_LOG'] = 'not a log level'; - const client = new Gradient({ logger: logger, logLevel: 'debug', accessToken: 'My Access Token' }); - expect(client.logLevel).toBe('debug'); - expect(warnMock).not.toHaveBeenCalled(); - }); + process.env['GRADIENT_LOG'] = 'not a log level'; + const client = new Gradient({ + logger: logger, + logLevel: 'debug', + accessToken: 'My Access Token', +}); + expect(client.logLevel).toBe('debug'); + expect(warnMock).not.toHaveBeenCalled(); }); +}); describe('defaultQuery', () => { test('with null query params given', () => { const client = new Gradient({ - baseURL: 'http://localhost:5000/', - defaultQuery: { apiVersion: 'foo' }, - accessToken: 'My Access Token', - }); + baseURL: 'http://localhost:5000/', + defaultQuery: { apiVersion: 'foo' }, + accessToken: 'My Access Token', +}); expect(client.buildURL('/foo', null)).toEqual('http://localhost:5000/foo?apiVersion=foo'); }); test('multiple default query params', () => { const client = new Gradient({ - baseURL: 'http://localhost:5000/', - defaultQuery: { apiVersion: 'foo', hello: 'world' }, - accessToken: 'My Access Token', - }); + baseURL: 'http://localhost:5000/', + defaultQuery: { apiVersion: 'foo', hello: 'world' }, + accessToken: 'My Access Token', +}); expect(client.buildURL('/foo', null)).toEqual('http://localhost:5000/foo?apiVersion=foo&hello=world'); }); test('overriding with `undefined`', () => { const client = new Gradient({ - baseURL: 'http://localhost:5000/', - defaultQuery: { hello: 'world' }, - accessToken: 'My Access Token', - }); + baseURL: 'http://localhost:5000/', + defaultQuery: { hello: 'world' }, + accessToken: 'My Access Token', +}) expect(client.buildURL('/foo', { hello: undefined })).toEqual('http://localhost:5000/foo'); }); }); test('custom fetch', async () => { const client = new Gradient({ - baseURL: 'http://localhost:5000/', - accessToken: 'My Access Token', - fetch: (url) => { - return Promise.resolve( - new Response(JSON.stringify({ url, custom: true }), { - headers: { 'Content-Type': 'application/json' }, - }), - ); - }, - }); + baseURL: 'http://localhost:5000/', + accessToken: 'My Access Token', + fetch: (url) => { + return Promise.resolve( + new Response(JSON.stringify({ url, custom: true }), { + headers: { 'Content-Type': 'application/json' }, + }), + ); +}, +}); const response = await client.get('/foo'); expect(response).toEqual({ url: 'http://localhost:5000/foo', custom: true }); @@ -228,35 +242,37 @@ describe('instantiate client', () => { test('explicit global fetch', async () => { // make sure the global fetch type is assignable to our Fetch type const client = new Gradient({ - baseURL: 'http://localhost:5000/', - accessToken: 'My Access Token', - fetch: defaultFetch, - }); + baseURL: 'http://localhost:5000/', + accessToken: 'My Access Token', + fetch: defaultFetch, +}); }); test('custom signal', async () => { const client = new Gradient({ - baseURL: process.env['TEST_API_BASE_URL'] ?? 'http://127.0.0.1:4010', - accessToken: 'My Access Token', - fetch: (...args) => { - return new Promise((resolve, reject) => - setTimeout( - () => - defaultFetch(...args) - .then(resolve) - .catch(reject), - 300, - ), - ); - }, - }); + baseURL: process.env["TEST_API_BASE_URL"] ?? 'http://127.0.0.1:4010', + accessToken: 'My Access Token', + fetch: (...args) => { + return new Promise((resolve, reject) => + setTimeout( + () => + defaultFetch(...args) + .then(resolve) + .catch(reject), + 300, + ), + ); +}, +}); const controller = new AbortController(); setTimeout(() => controller.abort(), 200); const spy = jest.spyOn(client, 'request'); - await expect(client.get('/foo', { signal: controller.signal })).rejects.toThrowError(APIUserAbortError); + await expect(client.get('/foo', { signal: controller.signal })).rejects.toThrowError( + APIUserAbortError, + ); expect(spy).toHaveBeenCalledTimes(1); }); @@ -268,10 +284,10 @@ describe('instantiate client', () => { }; const client = new Gradient({ - baseURL: 'http://localhost:5000/', - accessToken: 'My Access Token', - fetch: testFetch, - }); + baseURL: 'http://localhost:5000/', + accessToken: 'My Access Token', + fetch: testFetch, +}); await client.patch('/foo'); expect(capturedRequest?.method).toEqual('PATCH'); @@ -279,18 +295,12 @@ describe('instantiate client', () => { describe('baseUrl', () => { test('trailing slash', () => { - const client = new Gradient({ - baseURL: 'http://localhost:5000/custom/path/', - accessToken: 'My Access Token', - }); + const client = new Gradient({ baseURL: 'http://localhost:5000/custom/path/', accessToken: 'My Access Token' }); expect(client.buildURL('/foo', null)).toEqual('http://localhost:5000/custom/path/foo'); }); test('no trailing slash', () => { - const client = new Gradient({ - baseURL: 'http://localhost:5000/custom/path', - accessToken: 'My Access Token', - }); + const client = new Gradient({ baseURL: 'http://localhost:5000/custom/path', accessToken: 'My Access Token' }); expect(client.buildURL('/foo', null)).toEqual('http://localhost:5000/custom/path/foo'); }); @@ -312,14 +322,15 @@ describe('instantiate client', () => { test('empty env variable', () => { process.env['GRADIENT_BASE_URL'] = ''; // empty const client = new Gradient({ accessToken: 'My Access Token' }); - expect(client.baseURL).toEqual('https://api.digitalocean.com'); + expect(client.baseURL).toEqual('https://api.digitalocean.com') }); test('blank env variable', () => { process.env['GRADIENT_BASE_URL'] = ' '; // blank const client = new Gradient({ accessToken: 'My Access Token' }); - expect(client.baseURL).toEqual('https://api.digitalocean.com'); + expect(client.baseURL).toEqual('https://api.digitalocean.com') }); + }); test('maxRetries option is correctly set', () => { @@ -334,10 +345,10 @@ describe('instantiate client', () => { describe('withOptions', () => { test('creates a new client with overridden options', async () => { const client = new Gradient({ - baseURL: 'http://localhost:5000/', - maxRetries: 3, - accessToken: 'My Access Token', - }); + baseURL: 'http://localhost:5000/', + maxRetries: 3, + accessToken: 'My Access Token', + }); const newClient = client.withOptions({ maxRetries: 5, @@ -359,11 +370,11 @@ describe('instantiate client', () => { test('inherits options from the parent client', async () => { const client = new Gradient({ - baseURL: 'http://localhost:5000/', - defaultHeaders: { 'X-Test-Header': 'test-value' }, - defaultQuery: { 'test-param': 'test-value' }, - accessToken: 'My Access Token', - }); + baseURL: 'http://localhost:5000/', + defaultHeaders: { 'X-Test-Header': 'test-value' }, + defaultQuery: { 'test-param': 'test-value' }, + accessToken: 'My Access Token', + }); const newClient = client.withOptions({ baseURL: 'http://localhost:5001/', @@ -378,10 +389,10 @@ describe('instantiate client', () => { test('respects runtime property changes when creating new client', () => { const client = new Gradient({ - baseURL: 'http://localhost:5000/', - timeout: 1000, - accessToken: 'My Access Token', - }); + baseURL: 'http://localhost:5000/', + timeout: 1000, + accessToken: 'My Access Token', + }); // Modify the client properties directly after creation client.baseURL = 'http://localhost:6000/'; @@ -427,18 +438,13 @@ describe('request building', () => { describe('custom headers', () => { test('handles undefined', async () => { - const { req } = await client.buildRequest({ - path: '/foo', - method: 'post', - body: { value: 'hello' }, - headers: { 'X-Foo': 'baz', 'x-foo': 'bar', 'x-Foo': undefined, 'x-baz': 'bam', 'X-Baz': null }, - }); + const { req } = await client.buildRequest({ path: '/foo', method: 'post', body: { value: 'hello' }, headers: { 'X-Foo': 'baz', 'x-foo': 'bar', 'x-Foo': undefined, 'x-baz': 'bam', 'X-Baz': null } }); expect(req.headers.get('x-foo')).toEqual('bar'); expect(req.headers.get('x-Foo')).toEqual('bar'); expect(req.headers.get('X-Foo')).toEqual('bar'); expect(req.headers.get('x-baz')).toEqual(null); }); - }); + }) }); describe('default encoder', () => { @@ -515,36 +521,37 @@ describe('default encoder', () => { describe('retries', () => { test('retry on timeout', async () => { let count = 0; - const testFetch = async ( - url: string | URL | Request, - { signal }: RequestInit = {}, - ): Promise => { - if (count++ === 0) { - return new Promise( - (resolve, reject) => signal?.addEventListener('abort', () => reject(new Error('timed out'))), - ); - } - return new Response(JSON.stringify({ a: 1 }), { headers: { 'Content-Type': 'application/json' } }); - }; - - const client = new Gradient({ accessToken: 'My Access Token', timeout: 10, fetch: testFetch }); + const testFetch = async (url: string | URL | Request, { signal }: RequestInit = {}): Promise => { + if (count++ === 0) { + return new Promise((resolve, reject) => + signal?.addEventListener('abort', () => reject(new Error('timed out'))), + ); + } + return new Response(JSON.stringify({ a: 1 }), { headers: { 'Content-Type': 'application/json' } }); + }; - expect(await client.request({ path: '/foo', method: 'get' })).toEqual({ a: 1 }); - expect(count).toEqual(2); - expect( - await client - .request({ path: '/foo', method: 'get' }) - .asResponse() - .then((r) => r.text()), - ).toEqual(JSON.stringify({ a: 1 })); - expect(count).toEqual(3); + const client = new Gradient({ + accessToken: 'My Access Token', + timeout: 10, + fetch: testFetch, }); + expect(await client.request({ path: '/foo', method: 'get' })).toEqual({ a: 1 }); + expect(count).toEqual(2); + expect( + await client + .request({ path: '/foo', method: 'get' }) + .asResponse() + .then((r) => r.text()), + ).toEqual(JSON.stringify({ a: 1 })); + expect(count).toEqual(3); + }); + test('retry count header', async () => { let count = 0; let capturedRequest: RequestInit | undefined; const testFetch = async (url: string | URL | Request, init: RequestInit = {}): Promise => { - count++; + count++ if (count <= 2) { return new Response(undefined, { status: 429, @@ -557,7 +564,11 @@ describe('retries', () => { return new Response(JSON.stringify({ a: 1 }), { headers: { 'Content-Type': 'application/json' } }); }; - const client = new Gradient({ accessToken: 'My Access Token', fetch: testFetch, maxRetries: 4 }); + const client = new Gradient({ + accessToken: 'My Access Token', + fetch: testFetch, + maxRetries: 4, + }); expect(await client.request({ path: '/foo', method: 'get' })).toEqual({ a: 1 }); @@ -569,7 +580,7 @@ describe('retries', () => { let count = 0; let capturedRequest: RequestInit | undefined; const testFetch = async (url: string | URL | Request, init: RequestInit = {}): Promise => { - count++; + count++ if (count <= 2) { return new Response(undefined, { status: 429, @@ -581,7 +592,11 @@ describe('retries', () => { capturedRequest = init; return new Response(JSON.stringify({ a: 1 }), { headers: { 'Content-Type': 'application/json' } }); }; - const client = new Gradient({ accessToken: 'My Access Token', fetch: testFetch, maxRetries: 4 }); + const client = new Gradient({ + accessToken: 'My Access Token', + fetch: testFetch, + maxRetries: 4, + }); expect( await client.request({ @@ -598,7 +613,7 @@ describe('retries', () => { let count = 0; let capturedRequest: RequestInit | undefined; const testFetch = async (url: string | URL | Request, init: RequestInit = {}): Promise => { - count++; + count++ if (count <= 2) { return new Response(undefined, { status: 429, @@ -611,11 +626,11 @@ describe('retries', () => { return new Response(JSON.stringify({ a: 1 }), { headers: { 'Content-Type': 'application/json' } }); }; const client = new Gradient({ - accessToken: 'My Access Token', - fetch: testFetch, - maxRetries: 4, - defaultHeaders: { 'X-Stainless-Retry-Count': null }, - }); + accessToken: 'My Access Token', + fetch: testFetch, + maxRetries: 4, + defaultHeaders: { 'X-Stainless-Retry-Count': null }, + }); expect( await client.request({ @@ -631,7 +646,7 @@ describe('retries', () => { let count = 0; let capturedRequest: RequestInit | undefined; const testFetch = async (url: string | URL | Request, init: RequestInit = {}): Promise => { - count++; + count++ if (count <= 2) { return new Response(undefined, { status: 429, @@ -643,7 +658,11 @@ describe('retries', () => { capturedRequest = init; return new Response(JSON.stringify({ a: 1 }), { headers: { 'Content-Type': 'application/json' } }); }; - const client = new Gradient({ accessToken: 'My Access Token', fetch: testFetch, maxRetries: 4 }); + const client = new Gradient({ + accessToken: 'My Access Token', + fetch: testFetch, + maxRetries: 4, + }); expect( await client.request({ @@ -658,10 +677,7 @@ describe('retries', () => { test('retry on 429 with retry-after', async () => { let count = 0; - const testFetch = async ( - url: string | URL | Request, - { signal }: RequestInit = {}, - ): Promise => { + const testFetch = async (url: string | URL | Request, { signal }: RequestInit = {}): Promise => { if (count++ === 0) { return new Response(undefined, { status: 429, @@ -688,10 +704,7 @@ describe('retries', () => { test('retry on 429 with retry-after-ms', async () => { let count = 0; - const testFetch = async ( - url: string | URL | Request, - { signal }: RequestInit = {}, - ): Promise => { + const testFetch = async (url: string | URL | Request, { signal }: RequestInit = {}): Promise => { if (count++ === 0) { return new Response(undefined, { status: 429, diff --git a/tests/qs/utils.test.ts b/tests/qs/utils.test.ts index c8c997af..127f8a17 100644 --- a/tests/qs/utils.test.ts +++ b/tests/qs/utils.test.ts @@ -66,7 +66,7 @@ describe('merge()', function () { // st.equal(getCount, 1); expect(setCount).toEqual(0); expect(getCount).toEqual(1); - observed[0] = observed[0]; + observed[0] = observed[0]; // st.equal(setCount, 1); // st.equal(getCount, 2); expect(setCount).toEqual(1); diff --git a/tests/streaming.test.ts b/tests/streaming.test.ts index 0c9c60da..5ec2ee38 100644 --- a/tests/streaming.test.ts +++ b/tests/streaming.test.ts @@ -217,3 +217,5 @@ describe('streaming decoding', () => { expect(event.done).toBeTruthy(); }); }); + +; diff --git a/tests/stringifyQuery.test.ts b/tests/stringifyQuery.test.ts index 7c509bfd..254e0bdf 100644 --- a/tests/stringifyQuery.test.ts +++ b/tests/stringifyQuery.test.ts @@ -1,23 +1,19 @@ // File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details. -import { Gradient } from '@digitalocean/gradient'; +import { stringifyQuery } from '@digitalocean/gradient/internal/utils/query'; -const { stringifyQuery } = Gradient.prototype as any; - -describe(stringifyQuery, () => { - for (const [input, expected] of [ - [{ a: '1', b: 2, c: true }, 'a=1&b=2&c=true'], - [{ a: null, b: false, c: undefined }, 'a=&b=false'], - [{ 'a/b': 1.28341 }, `${encodeURIComponent('a/b')}=1.28341`], - [ - { 'a/b': 'c/d', 'e=f': 'g&h' }, - `${encodeURIComponent('a/b')}=${encodeURIComponent('c/d')}&${encodeURIComponent( - 'e=f', - )}=${encodeURIComponent('g&h')}`, - ], - ]) { - it(`${JSON.stringify(input)} -> ${expected}`, () => { - expect(stringifyQuery(input)).toEqual(expected); - }); - } -}); +describe(stringifyQuery, () => { for (const [input, expected] of [ + [{ a: '1', b: 2, c: true }, 'a=1&b=2&c=true'], + [{ a: null, b: false, c: undefined }, 'a=&b=false'], + [{ 'a/b': 1.28341 }, `${encodeURIComponent('a/b')}=1.28341`], + [ + { 'a/b': 'c/d', 'e=f': 'g&h' }, + `${encodeURIComponent('a/b')}=${encodeURIComponent('c/d')}&${encodeURIComponent( + 'e=f', + )}=${encodeURIComponent('g&h')}`, + ], +] as const) { + it(`${JSON.stringify(input)} -> ${expected}`, () => { + expect(stringifyQuery(input)).toEqual(expected); + }); +} }) diff --git a/yarn.lock b/yarn.lock index e6c8f7a0..18e7cbdc 100644 --- a/yarn.lock +++ b/yarn.lock @@ -4,25 +4,17 @@ "@aashutoshrathi/word-wrap@^1.2.3": version "1.2.6" - resolved "https://registry.npmjs.org/@aashutoshrathi/word-wrap/-/word-wrap-1.2.6.tgz" + resolved "https://registry.yarnpkg.com/@aashutoshrathi/word-wrap/-/word-wrap-1.2.6.tgz#bd9154aec9983f77b3a034ecaa015c2e4201f6cf" integrity sha512-1Yjs2SvM8TflER/OD3cOjhWWOZb58A2t7wpE2S9XfBYTiIl+XFhQG2bjy4Pu1I+EAlCNUzRDYDdFwFYUKvXcIA== -"@ampproject/remapping@^2.2.0": - version "2.2.1" - resolved "https://registry.npmjs.org/@ampproject/remapping/-/remapping-2.2.1.tgz" - integrity sha512-lFMjJTrFL3j7L9yBxwYfCq2k6qqwHyzuUl/XBnif78PWTJYyL/dfowQHWE3sp6U6ZzqWiiIZnpTMO96zhkjwtg== - dependencies: - "@jridgewell/gen-mapping" "^0.3.0" - "@jridgewell/trace-mapping" "^0.3.9" - "@andrewbranch/untar.js@^1.0.3": version "1.0.3" - resolved "https://registry.npmjs.org/@andrewbranch/untar.js/-/untar.js-1.0.3.tgz" + resolved "https://registry.yarnpkg.com/@andrewbranch/untar.js/-/untar.js-1.0.3.tgz#ba9494f85eb83017c5c855763969caf1d0adea00" integrity sha512-Jh15/qVmrLGhkKJBdXlK1+9tY4lZruYjsgkDFj08ZmDiWVBLJcqkok7Z0/R0In+i1rScBpJlSvrTS2Lm41Pbnw== "@arethetypeswrong/cli@^0.17.0": version "0.17.0" - resolved "https://registry.npmjs.org/@arethetypeswrong/cli/-/cli-0.17.0.tgz" + resolved "https://registry.yarnpkg.com/@arethetypeswrong/cli/-/cli-0.17.0.tgz#f97f10926b3f9f9eb5117550242d2e06c25cadac" integrity sha512-xSMW7bfzVWpYw5JFgZqBXqr6PdR0/REmn3DkxCES5N0JTcB0CVgbIynJCvKBFmXaPc3hzmmTrb7+yPDRoOSZdA== dependencies: "@arethetypeswrong/core" "0.17.0" @@ -35,7 +27,7 @@ "@arethetypeswrong/core@0.17.0": version "0.17.0" - resolved "https://registry.npmjs.org/@arethetypeswrong/core/-/core-0.17.0.tgz" + resolved "https://registry.yarnpkg.com/@arethetypeswrong/core/-/core-0.17.0.tgz#abb3b5f425056d37193644c2a2de4aecf866b76b" integrity sha512-FHyhFizXNetigTVsIhqXKGYLpazPS5YNojEPpZEUcBPt9wVvoEbNIvG+hybuBR+pjlRcbyuqhukHZm1fr+bDgA== dependencies: "@andrewbranch/untar.js" "^1.0.3" @@ -46,341 +38,337 @@ typescript "5.6.1-rc" validate-npm-package-name "^5.0.0" -"@babel/code-frame@^7.0.0", "@babel/code-frame@^7.12.13", "@babel/code-frame@^7.23.5", "@babel/code-frame@^7.27.1": - version "7.27.1" - resolved "https://registry.npmjs.org/@babel/code-frame/-/code-frame-7.27.1.tgz" - integrity sha512-cjQ7ZlQ0Mv3b47hABuTevyTuYN4i+loJKGeV9flcCgIK37cCXRh+L1bd3iBHlynerhQ7BhCkn2BPbQUL+rGqFg== +"@babel/code-frame@^7.0.0", "@babel/code-frame@^7.12.13", "@babel/code-frame@^7.28.6": + version "7.28.6" + resolved "https://registry.yarnpkg.com/@babel/code-frame/-/code-frame-7.28.6.tgz#72499312ec58b1e2245ba4a4f550c132be4982f7" + integrity sha512-JYgintcMjRiCvS8mMECzaEn+m3PfoQiyqukOMCCVQtoJGYJw8j/8LBJEiqkHLkfwCcs74E3pbAUFNg7d9VNJ+Q== dependencies: - "@babel/helper-validator-identifier" "^7.27.1" + "@babel/helper-validator-identifier" "^7.28.5" js-tokens "^4.0.0" picocolors "^1.1.1" -"@babel/compat-data@^7.23.5": - version "7.23.5" - resolved "https://registry.npmjs.org/@babel/compat-data/-/compat-data-7.23.5.tgz" - integrity sha512-uU27kfDRlhfKl+w1U6vp16IuvSLtjAxdArVXPa9BvLkrr7CYIsxH5adpHObeAGY/41+syctUWOZ140a2Rvkgjw== +"@babel/compat-data@^7.28.6": + version "7.28.6" + resolved "https://registry.yarnpkg.com/@babel/compat-data/-/compat-data-7.28.6.tgz#103f466803fa0f059e82ccac271475470570d74c" + integrity sha512-2lfu57JtzctfIrcGMz992hyLlByuzgIk58+hhGCxjKZ3rWI82NnVLjXcaTqkI2NvlcvOskZaiZ5kjUALo3Lpxg== "@babel/core@^7.11.6", "@babel/core@^7.12.3": - version "7.23.6" - resolved "https://registry.npmjs.org/@babel/core/-/core-7.23.6.tgz" - integrity sha512-FxpRyGjrMJXh7X3wGLGhNDCRiwpWEF74sKjTLDJSG5Kyvow3QZaG0Adbqzi9ZrVjTWpsX+2cxWXD71NMg93kdw== - dependencies: - "@ampproject/remapping" "^2.2.0" - "@babel/code-frame" "^7.23.5" - "@babel/generator" "^7.23.6" - "@babel/helper-compilation-targets" "^7.23.6" - "@babel/helper-module-transforms" "^7.23.3" - "@babel/helpers" "^7.23.6" - "@babel/parser" "^7.23.6" - "@babel/template" "^7.22.15" - "@babel/traverse" "^7.23.6" - "@babel/types" "^7.23.6" + version "7.28.6" + resolved "https://registry.yarnpkg.com/@babel/core/-/core-7.28.6.tgz#531bf883a1126e53501ba46eb3bb414047af507f" + integrity sha512-H3mcG6ZDLTlYfaSNi0iOKkigqMFvkTKlGUYlD8GW7nNOYRrevuA46iTypPyv+06V3fEmvvazfntkBU34L0azAw== + dependencies: + "@babel/code-frame" "^7.28.6" + "@babel/generator" "^7.28.6" + "@babel/helper-compilation-targets" "^7.28.6" + "@babel/helper-module-transforms" "^7.28.6" + "@babel/helpers" "^7.28.6" + "@babel/parser" "^7.28.6" + "@babel/template" "^7.28.6" + "@babel/traverse" "^7.28.6" + "@babel/types" "^7.28.6" + "@jridgewell/remapping" "^2.3.5" convert-source-map "^2.0.0" debug "^4.1.0" gensync "^1.0.0-beta.2" json5 "^2.2.3" semver "^6.3.1" -"@babel/generator@^7.23.6", "@babel/generator@^7.7.2": - version "7.23.6" - resolved "https://registry.npmjs.org/@babel/generator/-/generator-7.23.6.tgz" - integrity sha512-qrSfCYxYQB5owCmGLbl8XRpX1ytXlpueOb0N0UmQwA073KZxejgQTzAmJezxvpwQD9uGtK2shHdi55QT+MbjIw== - dependencies: - "@babel/types" "^7.23.6" - "@jridgewell/gen-mapping" "^0.3.2" - "@jridgewell/trace-mapping" "^0.3.17" - jsesc "^2.5.1" - -"@babel/helper-compilation-targets@^7.23.6": - version "7.23.6" - resolved "https://registry.npmjs.org/@babel/helper-compilation-targets/-/helper-compilation-targets-7.23.6.tgz" - integrity sha512-9JB548GZoQVmzrFgp8o7KxdgkTGm6xs9DW0o/Pim72UDjzr5ObUQ6ZzYPqA+g9OTS2bBQoctLJrky0RDCAWRgQ== - dependencies: - "@babel/compat-data" "^7.23.5" - "@babel/helper-validator-option" "^7.23.5" - browserslist "^4.22.2" +"@babel/generator@^7.28.6", "@babel/generator@^7.7.2": + version "7.28.6" + resolved "https://registry.yarnpkg.com/@babel/generator/-/generator-7.28.6.tgz#48dcc65d98fcc8626a48f72b62e263d25fc3c3f1" + integrity sha512-lOoVRwADj8hjf7al89tvQ2a1lf53Z+7tiXMgpZJL3maQPDxh0DgLMN62B2MKUOFcoodBHLMbDM6WAbKgNy5Suw== + dependencies: + "@babel/parser" "^7.28.6" + "@babel/types" "^7.28.6" + "@jridgewell/gen-mapping" "^0.3.12" + "@jridgewell/trace-mapping" "^0.3.28" + jsesc "^3.0.2" + +"@babel/helper-compilation-targets@^7.28.6": + version "7.28.6" + resolved "https://registry.yarnpkg.com/@babel/helper-compilation-targets/-/helper-compilation-targets-7.28.6.tgz#32c4a3f41f12ed1532179b108a4d746e105c2b25" + integrity sha512-JYtls3hqi15fcx5GaSNL7SCTJ2MNmjrkHXg4FSpOA/grxK8KwyZ5bubHsCq8FXCkua6xhuaaBit+3b7+VZRfcA== + dependencies: + "@babel/compat-data" "^7.28.6" + "@babel/helper-validator-option" "^7.27.1" + browserslist "^4.24.0" lru-cache "^5.1.1" semver "^6.3.1" -"@babel/helper-environment-visitor@^7.22.20": - version "7.22.20" - resolved "https://registry.npmjs.org/@babel/helper-environment-visitor/-/helper-environment-visitor-7.22.20.tgz" - integrity sha512-zfedSIzFhat/gFhWfHtgWvlec0nqB9YEIVrpuwjruLlXfUSnA8cJB0miHKwqDnQ7d32aKo2xt88/xZptwxbfhA== +"@babel/helper-globals@^7.28.0": + version "7.28.0" + resolved "https://registry.yarnpkg.com/@babel/helper-globals/-/helper-globals-7.28.0.tgz#b9430df2aa4e17bc28665eadeae8aa1d985e6674" + integrity sha512-+W6cISkXFa1jXsDEdYA8HeevQT/FULhxzR99pxphltZcVaugps53THCeiWA8SguxxpSp3gKPiuYfSWopkLQ4hw== -"@babel/helper-function-name@^7.23.0": - version "7.23.0" - resolved "https://registry.npmjs.org/@babel/helper-function-name/-/helper-function-name-7.23.0.tgz" - integrity sha512-OErEqsrxjZTJciZ4Oo+eoZqeW9UIiOcuYKRJA4ZAgV9myA+pOXhhmpfNCKjEH/auVfEYVFJ6y1Tc4r0eIApqiw== +"@babel/helper-module-imports@^7.28.6": + version "7.28.6" + resolved "https://registry.yarnpkg.com/@babel/helper-module-imports/-/helper-module-imports-7.28.6.tgz#60632cbd6ffb70b22823187201116762a03e2d5c" + integrity sha512-l5XkZK7r7wa9LucGw9LwZyyCUscb4x37JWTPz7swwFE/0FMQAGpiWUZn8u9DzkSBWEcK25jmvubfpw2dnAMdbw== dependencies: - "@babel/template" "^7.22.15" - "@babel/types" "^7.23.0" + "@babel/traverse" "^7.28.6" + "@babel/types" "^7.28.6" -"@babel/helper-hoist-variables@^7.22.5": - version "7.22.5" - resolved "https://registry.npmjs.org/@babel/helper-hoist-variables/-/helper-hoist-variables-7.22.5.tgz" - integrity sha512-wGjk9QZVzvknA6yKIUURb8zY3grXCcOZt+/7Wcy8O2uctxhplmUPkOdlgoNhmdVee2c92JXbf1xpMtVNbfoxRw== +"@babel/helper-module-transforms@^7.28.6": + version "7.28.6" + resolved "https://registry.yarnpkg.com/@babel/helper-module-transforms/-/helper-module-transforms-7.28.6.tgz#9312d9d9e56edc35aeb6e95c25d4106b50b9eb1e" + integrity sha512-67oXFAYr2cDLDVGLXTEABjdBJZ6drElUSI7WKp70NrpyISso3plG9SAGEF6y7zbha/wOzUByWWTJvEDVNIUGcA== dependencies: - "@babel/types" "^7.22.5" + "@babel/helper-module-imports" "^7.28.6" + "@babel/helper-validator-identifier" "^7.28.5" + "@babel/traverse" "^7.28.6" -"@babel/helper-module-imports@^7.22.15": - version "7.22.15" - resolved "https://registry.npmjs.org/@babel/helper-module-imports/-/helper-module-imports-7.22.15.tgz" - integrity sha512-0pYVBnDKZO2fnSPCrgM/6WMc7eS20Fbok+0r88fp+YtWVLZrp4CkafFGIp+W0VKw4a22sgebPT99y+FDNMdP4w== - dependencies: - "@babel/types" "^7.22.15" - -"@babel/helper-module-transforms@^7.23.3": - version "7.23.3" - resolved "https://registry.npmjs.org/@babel/helper-module-transforms/-/helper-module-transforms-7.23.3.tgz" - integrity sha512-7bBs4ED9OmswdfDzpz4MpWgSrV7FXlc3zIagvLFjS5H+Mk7Snr21vQ6QwrsoCGMfNC4e4LQPdoULEt4ykz0SRQ== - dependencies: - "@babel/helper-environment-visitor" "^7.22.20" - "@babel/helper-module-imports" "^7.22.15" - "@babel/helper-simple-access" "^7.22.5" - "@babel/helper-split-export-declaration" "^7.22.6" - "@babel/helper-validator-identifier" "^7.22.20" - -"@babel/helper-plugin-utils@^7.0.0", "@babel/helper-plugin-utils@^7.10.4", "@babel/helper-plugin-utils@^7.12.13", "@babel/helper-plugin-utils@^7.14.5", "@babel/helper-plugin-utils@^7.22.5", "@babel/helper-plugin-utils@^7.8.0": - version "7.22.5" - resolved "https://registry.npmjs.org/@babel/helper-plugin-utils/-/helper-plugin-utils-7.22.5.tgz" - integrity sha512-uLls06UVKgFG9QD4OeFYLEGteMIAa5kpTPcFL28yuCIIzsf6ZyKZMllKVOCZFhiZ5ptnwX4mtKdWCBE/uT4amg== - -"@babel/helper-simple-access@^7.22.5": - version "7.22.5" - resolved "https://registry.npmjs.org/@babel/helper-simple-access/-/helper-simple-access-7.22.5.tgz" - integrity sha512-n0H99E/K+Bika3++WNL17POvo4rKWZ7lZEp1Q+fStVbUi8nxPQEBOlTmCOxW/0JsS56SKKQ+ojAe2pHKJHN35w== - dependencies: - "@babel/types" "^7.22.5" - -"@babel/helper-split-export-declaration@^7.22.6": - version "7.22.6" - resolved "https://registry.npmjs.org/@babel/helper-split-export-declaration/-/helper-split-export-declaration-7.22.6.tgz" - integrity sha512-AsUnxuLhRYsisFiaJwvp1QF+I3KjD5FOxut14q/GzovUe6orHLesW2C7d754kRm53h5gqrz6sFl6sxc4BVtE/g== - dependencies: - "@babel/types" "^7.22.5" +"@babel/helper-plugin-utils@^7.0.0", "@babel/helper-plugin-utils@^7.10.4", "@babel/helper-plugin-utils@^7.12.13", "@babel/helper-plugin-utils@^7.14.5", "@babel/helper-plugin-utils@^7.28.6", "@babel/helper-plugin-utils@^7.8.0": + version "7.28.6" + resolved "https://registry.yarnpkg.com/@babel/helper-plugin-utils/-/helper-plugin-utils-7.28.6.tgz#6f13ea251b68c8532e985fd532f28741a8af9ac8" + integrity sha512-S9gzZ/bz83GRysI7gAD4wPT/AI3uCnY+9xn+Mx/KPs2JwHJIz1W8PZkg2cqyt3RNOBM8ejcXhV6y8Og7ly/Dug== "@babel/helper-string-parser@^7.27.1": version "7.27.1" - resolved "https://registry.npmjs.org/@babel/helper-string-parser/-/helper-string-parser-7.27.1.tgz" + resolved "https://registry.yarnpkg.com/@babel/helper-string-parser/-/helper-string-parser-7.27.1.tgz#54da796097ab19ce67ed9f88b47bb2ec49367687" integrity sha512-qMlSxKbpRlAridDExk92nSobyDdpPijUq2DW6oDnUqd0iOGxmQjyqhMIihI9+zv4LPyZdRje2cavWPbCbWm3eA== -"@babel/helper-validator-identifier@^7.22.20", "@babel/helper-validator-identifier@^7.27.1": - version "7.27.1" - resolved "https://registry.npmjs.org/@babel/helper-validator-identifier/-/helper-validator-identifier-7.27.1.tgz" - integrity sha512-D2hP9eA+Sqx1kBZgzxZh0y1trbuU+JoDkiEwqhQ36nodYqJwyEIhPSdMNd7lOm/4io72luTPWH20Yda0xOuUow== +"@babel/helper-validator-identifier@^7.28.5": + version "7.28.5" + resolved "https://registry.yarnpkg.com/@babel/helper-validator-identifier/-/helper-validator-identifier-7.28.5.tgz#010b6938fab7cb7df74aa2bbc06aa503b8fe5fb4" + integrity sha512-qSs4ifwzKJSV39ucNjsvc6WVHs6b7S03sOh2OcHF9UHfVPqWWALUsNUVzhSBiItjRZoLHx7nIarVjqKVusUZ1Q== -"@babel/helper-validator-option@^7.23.5": - version "7.23.5" - resolved "https://registry.npmjs.org/@babel/helper-validator-option/-/helper-validator-option-7.23.5.tgz" - integrity sha512-85ttAOMLsr53VgXkTbkx8oA6YTfT4q7/HzXSLEYmjcSTJPMPQtvq1BD79Byep5xMUYbGRzEpDsjUf3dyp54IKw== +"@babel/helper-validator-option@^7.27.1": + version "7.27.1" + resolved "https://registry.yarnpkg.com/@babel/helper-validator-option/-/helper-validator-option-7.27.1.tgz#fa52f5b1e7db1ab049445b421c4471303897702f" + integrity sha512-YvjJow9FxbhFFKDSuFnVCe2WxXk1zWc22fFePVNEaWJEu8IrZVlda6N0uHwzZrUM1il7NC9Mlp4MaJYbYd9JSg== -"@babel/helpers@^7.23.6": - version "7.28.4" - resolved "https://registry.npmjs.org/@babel/helpers/-/helpers-7.28.4.tgz" - integrity sha512-HFN59MmQXGHVyYadKLVumYsA9dBFun/ldYxipEjzA4196jpLZd8UjEEBLkbEkvfYreDqJhZxYAWFPtrfhNpj4w== +"@babel/helpers@^7.28.6": + version "7.28.6" + resolved "https://registry.yarnpkg.com/@babel/helpers/-/helpers-7.28.6.tgz#fca903a313ae675617936e8998b814c415cbf5d7" + integrity sha512-xOBvwq86HHdB7WUDTfKfT/Vuxh7gElQ+Sfti2Cy6yIWNW05P8iUslOVcZ4/sKbE+/jQaukQAdz/gf3724kYdqw== dependencies: - "@babel/template" "^7.27.2" - "@babel/types" "^7.28.4" + "@babel/template" "^7.28.6" + "@babel/types" "^7.28.6" -"@babel/parser@^7.1.0", "@babel/parser@^7.14.7", "@babel/parser@^7.20.7", "@babel/parser@^7.23.6", "@babel/parser@^7.27.2": - version "7.28.4" - resolved "https://registry.npmjs.org/@babel/parser/-/parser-7.28.4.tgz" - integrity sha512-yZbBqeM6TkpP9du/I2pUZnJsRMGGvOuIrhjzC1AwHwW+6he4mni6Bp/m8ijn0iOuZuPI2BfkCoSRunpyjnrQKg== +"@babel/parser@^7.1.0", "@babel/parser@^7.14.7", "@babel/parser@^7.20.7", "@babel/parser@^7.28.6": + version "7.28.6" + resolved "https://registry.yarnpkg.com/@babel/parser/-/parser-7.28.6.tgz#f01a8885b7fa1e56dd8a155130226cd698ef13fd" + integrity sha512-TeR9zWR18BvbfPmGbLampPMW+uW1NZnJlRuuHso8i87QZNq2JRF9i6RgxRqtEq+wQGsS19NNTWr2duhnE49mfQ== dependencies: - "@babel/types" "^7.28.4" + "@babel/types" "^7.28.6" "@babel/plugin-syntax-async-generators@^7.8.4": version "7.8.4" - resolved "https://registry.npmjs.org/@babel/plugin-syntax-async-generators/-/plugin-syntax-async-generators-7.8.4.tgz" + resolved "https://registry.yarnpkg.com/@babel/plugin-syntax-async-generators/-/plugin-syntax-async-generators-7.8.4.tgz#a983fb1aeb2ec3f6ed042a210f640e90e786fe0d" integrity sha512-tycmZxkGfZaxhMRbXlPXuVFpdWlXpir2W4AMhSJgRKzk/eDlIXOhb2LHWoLpDF7TEHylV5zNhykX6KAgHJmTNw== dependencies: "@babel/helper-plugin-utils" "^7.8.0" "@babel/plugin-syntax-bigint@^7.8.3": version "7.8.3" - resolved "https://registry.npmjs.org/@babel/plugin-syntax-bigint/-/plugin-syntax-bigint-7.8.3.tgz" + resolved "https://registry.yarnpkg.com/@babel/plugin-syntax-bigint/-/plugin-syntax-bigint-7.8.3.tgz#4c9a6f669f5d0cdf1b90a1671e9a146be5300cea" integrity sha512-wnTnFlG+YxQm3vDxpGE57Pj0srRU4sHE/mDkt1qv2YJJSeUAec2ma4WLUnUPeKjyrfntVwe/N6dCXpU+zL3Npg== dependencies: "@babel/helper-plugin-utils" "^7.8.0" -"@babel/plugin-syntax-class-properties@^7.8.3": +"@babel/plugin-syntax-class-properties@^7.12.13": version "7.12.13" - resolved "https://registry.npmjs.org/@babel/plugin-syntax-class-properties/-/plugin-syntax-class-properties-7.12.13.tgz" + resolved "https://registry.yarnpkg.com/@babel/plugin-syntax-class-properties/-/plugin-syntax-class-properties-7.12.13.tgz#b5c987274c4a3a82b89714796931a6b53544ae10" integrity sha512-fm4idjKla0YahUNgFNLCB0qySdsoPiZP3iQE3rky0mBUtMZ23yDJ9SJdg6dXTSDnulOVqiF3Hgr9nbXvXTQZYA== dependencies: "@babel/helper-plugin-utils" "^7.12.13" -"@babel/plugin-syntax-import-meta@^7.8.3": +"@babel/plugin-syntax-class-static-block@^7.14.5": + version "7.14.5" + resolved "https://registry.yarnpkg.com/@babel/plugin-syntax-class-static-block/-/plugin-syntax-class-static-block-7.14.5.tgz#195df89b146b4b78b3bf897fd7a257c84659d406" + integrity sha512-b+YyPmr6ldyNnM6sqYeMWE+bgJcJpO6yS4QD7ymxgH34GBPNDM/THBh8iunyvKIZztiwLH4CJZ0RxTk9emgpjw== + dependencies: + "@babel/helper-plugin-utils" "^7.14.5" + +"@babel/plugin-syntax-import-attributes@^7.24.7": + version "7.28.6" + resolved "https://registry.yarnpkg.com/@babel/plugin-syntax-import-attributes/-/plugin-syntax-import-attributes-7.28.6.tgz#b71d5914665f60124e133696f17cd7669062c503" + integrity sha512-jiLC0ma9XkQT3TKJ9uYvlakm66Pamywo+qwL+oL8HJOvc6TWdZXVfhqJr8CCzbSGUAbDOzlGHJC1U+vRfLQDvw== + dependencies: + "@babel/helper-plugin-utils" "^7.28.6" + +"@babel/plugin-syntax-import-meta@^7.10.4": version "7.10.4" - resolved "https://registry.npmjs.org/@babel/plugin-syntax-import-meta/-/plugin-syntax-import-meta-7.10.4.tgz" + resolved "https://registry.yarnpkg.com/@babel/plugin-syntax-import-meta/-/plugin-syntax-import-meta-7.10.4.tgz#ee601348c370fa334d2207be158777496521fd51" integrity sha512-Yqfm+XDx0+Prh3VSeEQCPU81yC+JWZ2pDPFSS4ZdpfZhp4MkFMaDC1UqseovEKwSUpnIL7+vK+Clp7bfh0iD7g== dependencies: "@babel/helper-plugin-utils" "^7.10.4" "@babel/plugin-syntax-json-strings@^7.8.3": version "7.8.3" - resolved "https://registry.npmjs.org/@babel/plugin-syntax-json-strings/-/plugin-syntax-json-strings-7.8.3.tgz" + resolved "https://registry.yarnpkg.com/@babel/plugin-syntax-json-strings/-/plugin-syntax-json-strings-7.8.3.tgz#01ca21b668cd8218c9e640cb6dd88c5412b2c96a" integrity sha512-lY6kdGpWHvjoe2vk4WrAapEuBR69EMxZl+RoGRhrFGNYVK8mOPAW8VfbT/ZgrFbXlDNiiaxQnAtgVCZ6jv30EA== dependencies: "@babel/helper-plugin-utils" "^7.8.0" "@babel/plugin-syntax-jsx@^7.7.2": - version "7.23.3" - resolved "https://registry.npmjs.org/@babel/plugin-syntax-jsx/-/plugin-syntax-jsx-7.23.3.tgz" - integrity sha512-EB2MELswq55OHUoRZLGg/zC7QWUKfNLpE57m/S2yr1uEneIgsTgrSzXP3NXEsMkVn76OlaVVnzN+ugObuYGwhg== + version "7.28.6" + resolved "https://registry.yarnpkg.com/@babel/plugin-syntax-jsx/-/plugin-syntax-jsx-7.28.6.tgz#f8ca28bbd84883b5fea0e447c635b81ba73997ee" + integrity sha512-wgEmr06G6sIpqr8YDwA2dSRTE3bJ+V0IfpzfSY3Lfgd7YWOaAdlykvJi13ZKBt8cZHfgH1IXN+CL656W3uUa4w== dependencies: - "@babel/helper-plugin-utils" "^7.22.5" + "@babel/helper-plugin-utils" "^7.28.6" -"@babel/plugin-syntax-logical-assignment-operators@^7.8.3": +"@babel/plugin-syntax-logical-assignment-operators@^7.10.4": version "7.10.4" - resolved "https://registry.npmjs.org/@babel/plugin-syntax-logical-assignment-operators/-/plugin-syntax-logical-assignment-operators-7.10.4.tgz" + resolved "https://registry.yarnpkg.com/@babel/plugin-syntax-logical-assignment-operators/-/plugin-syntax-logical-assignment-operators-7.10.4.tgz#ca91ef46303530448b906652bac2e9fe9941f699" integrity sha512-d8waShlpFDinQ5MtvGU9xDAOzKH47+FFoney2baFIoMr952hKOLp1HR7VszoZvOsV/4+RRszNY7D17ba0te0ig== dependencies: "@babel/helper-plugin-utils" "^7.10.4" "@babel/plugin-syntax-nullish-coalescing-operator@^7.8.3": version "7.8.3" - resolved "https://registry.npmjs.org/@babel/plugin-syntax-nullish-coalescing-operator/-/plugin-syntax-nullish-coalescing-operator-7.8.3.tgz" + resolved "https://registry.yarnpkg.com/@babel/plugin-syntax-nullish-coalescing-operator/-/plugin-syntax-nullish-coalescing-operator-7.8.3.tgz#167ed70368886081f74b5c36c65a88c03b66d1a9" integrity sha512-aSff4zPII1u2QD7y+F8oDsz19ew4IGEJg9SVW+bqwpwtfFleiQDMdzA/R+UlWDzfnHFCxxleFT0PMIrR36XLNQ== dependencies: "@babel/helper-plugin-utils" "^7.8.0" -"@babel/plugin-syntax-numeric-separator@^7.8.3": +"@babel/plugin-syntax-numeric-separator@^7.10.4": version "7.10.4" - resolved "https://registry.npmjs.org/@babel/plugin-syntax-numeric-separator/-/plugin-syntax-numeric-separator-7.10.4.tgz" + resolved "https://registry.yarnpkg.com/@babel/plugin-syntax-numeric-separator/-/plugin-syntax-numeric-separator-7.10.4.tgz#b9b070b3e33570cd9fd07ba7fa91c0dd37b9af97" integrity sha512-9H6YdfkcK/uOnY/K7/aA2xpzaAgkQn37yzWUMRK7OaPOqOpGS1+n0H5hxT9AUw9EsSjPW8SVyMJwYRtWs3X3ug== dependencies: "@babel/helper-plugin-utils" "^7.10.4" "@babel/plugin-syntax-object-rest-spread@^7.8.3": version "7.8.3" - resolved "https://registry.npmjs.org/@babel/plugin-syntax-object-rest-spread/-/plugin-syntax-object-rest-spread-7.8.3.tgz" + resolved "https://registry.yarnpkg.com/@babel/plugin-syntax-object-rest-spread/-/plugin-syntax-object-rest-spread-7.8.3.tgz#60e225edcbd98a640332a2e72dd3e66f1af55871" integrity sha512-XoqMijGZb9y3y2XskN+P1wUGiVwWZ5JmoDRwx5+3GmEplNyVM2s2Dg8ILFQm8rWM48orGy5YpI5Bl8U1y7ydlA== dependencies: "@babel/helper-plugin-utils" "^7.8.0" "@babel/plugin-syntax-optional-catch-binding@^7.8.3": version "7.8.3" - resolved "https://registry.npmjs.org/@babel/plugin-syntax-optional-catch-binding/-/plugin-syntax-optional-catch-binding-7.8.3.tgz" + resolved "https://registry.yarnpkg.com/@babel/plugin-syntax-optional-catch-binding/-/plugin-syntax-optional-catch-binding-7.8.3.tgz#6111a265bcfb020eb9efd0fdfd7d26402b9ed6c1" integrity sha512-6VPD0Pc1lpTqw0aKoeRTMiB+kWhAoT24PA+ksWSBrFtl5SIRVpZlwN3NNPQjehA2E/91FV3RjLWoVTglWcSV3Q== dependencies: "@babel/helper-plugin-utils" "^7.8.0" "@babel/plugin-syntax-optional-chaining@^7.8.3": version "7.8.3" - resolved "https://registry.npmjs.org/@babel/plugin-syntax-optional-chaining/-/plugin-syntax-optional-chaining-7.8.3.tgz" + resolved "https://registry.yarnpkg.com/@babel/plugin-syntax-optional-chaining/-/plugin-syntax-optional-chaining-7.8.3.tgz#4f69c2ab95167e0180cd5336613f8c5788f7d48a" integrity sha512-KoK9ErH1MBlCPxV0VANkXW2/dw4vlbGDrFgz8bmUsBGYkFRcbRwMh6cIJubdPrkxRwuGdtCk0v/wPTKbQgBjkg== dependencies: "@babel/helper-plugin-utils" "^7.8.0" -"@babel/plugin-syntax-top-level-await@^7.8.3": +"@babel/plugin-syntax-private-property-in-object@^7.14.5": version "7.14.5" - resolved "https://registry.npmjs.org/@babel/plugin-syntax-top-level-await/-/plugin-syntax-top-level-await-7.14.5.tgz" + resolved "https://registry.yarnpkg.com/@babel/plugin-syntax-private-property-in-object/-/plugin-syntax-private-property-in-object-7.14.5.tgz#0dc6671ec0ea22b6e94a1114f857970cd39de1ad" + integrity sha512-0wVnp9dxJ72ZUJDV27ZfbSj6iHLoytYZmh3rFcxNnvsJF3ktkzLDZPy/mA17HGsaQT3/DQsWYX1f1QGWkCoVUg== + dependencies: + "@babel/helper-plugin-utils" "^7.14.5" + +"@babel/plugin-syntax-top-level-await@^7.14.5": + version "7.14.5" + resolved "https://registry.yarnpkg.com/@babel/plugin-syntax-top-level-await/-/plugin-syntax-top-level-await-7.14.5.tgz#c1cfdadc35a646240001f06138247b741c34d94c" integrity sha512-hx++upLv5U1rgYfwe1xBQUhRmU41NEvpUvrp8jkrSCdvGSnM5/qdRMtylJ6PG5OFkBaHkbTAKTnd3/YyESRHFw== dependencies: "@babel/helper-plugin-utils" "^7.14.5" "@babel/plugin-syntax-typescript@^7.7.2": - version "7.23.3" - resolved "https://registry.npmjs.org/@babel/plugin-syntax-typescript/-/plugin-syntax-typescript-7.23.3.tgz" - integrity sha512-9EiNjVJOMwCO+43TqoTrgQ8jMwcAd0sWyXi9RPfIsLTj4R2MADDDQXELhffaUx/uJv2AYcxBgPwH6j4TIA4ytQ== - dependencies: - "@babel/helper-plugin-utils" "^7.22.5" - -"@babel/template@^7.22.15", "@babel/template@^7.27.2", "@babel/template@^7.3.3": - version "7.27.2" - resolved "https://registry.npmjs.org/@babel/template/-/template-7.27.2.tgz" - integrity sha512-LPDZ85aEJyYSd18/DkjNh4/y1ntkE5KwUHWTiqgRxruuZL2F1yuHligVHLvcHY2vMHXttKFpJn6LwfI7cw7ODw== - dependencies: - "@babel/code-frame" "^7.27.1" - "@babel/parser" "^7.27.2" - "@babel/types" "^7.27.1" - -"@babel/traverse@^7.23.6": - version "7.23.6" - resolved "https://registry.npmjs.org/@babel/traverse/-/traverse-7.23.6.tgz" - integrity sha512-czastdK1e8YByZqezMPFiZ8ahwVMh/ESl9vPgvgdB9AmFMGP5jfpFax74AQgl5zj4XHzqeYAg2l8PuUeRS1MgQ== - dependencies: - "@babel/code-frame" "^7.23.5" - "@babel/generator" "^7.23.6" - "@babel/helper-environment-visitor" "^7.22.20" - "@babel/helper-function-name" "^7.23.0" - "@babel/helper-hoist-variables" "^7.22.5" - "@babel/helper-split-export-declaration" "^7.22.6" - "@babel/parser" "^7.23.6" - "@babel/types" "^7.23.6" + version "7.28.6" + resolved "https://registry.yarnpkg.com/@babel/plugin-syntax-typescript/-/plugin-syntax-typescript-7.28.6.tgz#c7b2ddf1d0a811145b1de800d1abd146af92e3a2" + integrity sha512-+nDNmQye7nlnuuHDboPbGm00Vqg3oO8niRRL27/4LYHUsHYh0zJ1xWOz0uRwNFmM1Avzk8wZbc6rdiYhomzv/A== + dependencies: + "@babel/helper-plugin-utils" "^7.28.6" + +"@babel/template@^7.28.6", "@babel/template@^7.3.3": + version "7.28.6" + resolved "https://registry.yarnpkg.com/@babel/template/-/template-7.28.6.tgz#0e7e56ecedb78aeef66ce7972b082fce76a23e57" + integrity sha512-YA6Ma2KsCdGb+WC6UpBVFJGXL58MDA6oyONbjyF/+5sBgxY/dwkhLogbMT2GXXyU84/IhRw/2D1Os1B/giz+BQ== + dependencies: + "@babel/code-frame" "^7.28.6" + "@babel/parser" "^7.28.6" + "@babel/types" "^7.28.6" + +"@babel/traverse@^7.28.6": + version "7.28.6" + resolved "https://registry.yarnpkg.com/@babel/traverse/-/traverse-7.28.6.tgz#871ddc79a80599a5030c53b1cc48cbe3a5583c2e" + integrity sha512-fgWX62k02qtjqdSNTAGxmKYY/7FSL9WAS1o2Hu5+I5m9T0yxZzr4cnrfXQ/MX0rIifthCSs6FKTlzYbJcPtMNg== + dependencies: + "@babel/code-frame" "^7.28.6" + "@babel/generator" "^7.28.6" + "@babel/helper-globals" "^7.28.0" + "@babel/parser" "^7.28.6" + "@babel/template" "^7.28.6" + "@babel/types" "^7.28.6" debug "^4.3.1" - globals "^11.1.0" -"@babel/types@^7.0.0", "@babel/types@^7.20.7", "@babel/types@^7.22.15", "@babel/types@^7.22.5", "@babel/types@^7.23.0", "@babel/types@^7.23.6", "@babel/types@^7.27.1", "@babel/types@^7.28.4", "@babel/types@^7.3.3": - version "7.28.4" - resolved "https://registry.npmjs.org/@babel/types/-/types-7.28.4.tgz" - integrity sha512-bkFqkLhh3pMBUQQkpVgWDWq/lqzc2678eUyDlTBhRqhCHFguYYGM0Efga7tYk4TogG/3x0EEl66/OQ+WGbWB/Q== +"@babel/types@^7.0.0", "@babel/types@^7.20.7", "@babel/types@^7.28.6", "@babel/types@^7.3.3": + version "7.28.6" + resolved "https://registry.yarnpkg.com/@babel/types/-/types-7.28.6.tgz#c3e9377f1b155005bcc4c46020e7e394e13089df" + integrity sha512-0ZrskXVEHSWIqZM/sQZ4EV3jZJXRkio/WCxaqKZP1g//CEWEPSfeZFcms4XeKBCHU0ZKnIkdJeU/kF+eRp5lBg== dependencies: "@babel/helper-string-parser" "^7.27.1" - "@babel/helper-validator-identifier" "^7.27.1" + "@babel/helper-validator-identifier" "^7.28.5" "@bcoe/v8-coverage@^0.2.3": version "0.2.3" - resolved "https://registry.npmjs.org/@bcoe/v8-coverage/-/v8-coverage-0.2.3.tgz" + resolved "https://registry.yarnpkg.com/@bcoe/v8-coverage/-/v8-coverage-0.2.3.tgz#75a2e8b51cb758a7553d6804a5932d7aace75c39" integrity sha512-0hYQ8SB4Db5zvZB4axdMHGwEaQjkZzFjQiN9LVYvIFB2nSUHW9tYpxWriPrWDASIxiaXax83REcLxuSdnGPZtw== "@colors/colors@1.5.0": version "1.5.0" - resolved "https://registry.npmjs.org/@colors/colors/-/colors-1.5.0.tgz" + resolved "https://registry.yarnpkg.com/@colors/colors/-/colors-1.5.0.tgz#bb504579c1cae923e6576a4f5da43d25f97bdbd9" integrity sha512-ooWCrlZP11i8GImSjTHYHLkvFDP48nS4+204nGb1RiX/WXYHmJA2III9/e2DWVabCESdW7hBAEzHRqUn9OUVvQ== "@cspotcode/source-map-consumer@0.8.0": version "0.8.0" - resolved "https://registry.npmjs.org/@cspotcode/source-map-consumer/-/source-map-consumer-0.8.0.tgz" + resolved "https://registry.yarnpkg.com/@cspotcode/source-map-consumer/-/source-map-consumer-0.8.0.tgz#33bf4b7b39c178821606f669bbc447a6a629786b" integrity sha512-41qniHzTU8yAGbCp04ohlmSrZf8bkf/iJsl3V0dRGsQN/5GFfx+LbCSsCpp2gqrqjTVg/K6O8ycoV35JIwAzAg== "@cspotcode/source-map-support@0.7.0": version "0.7.0" - resolved "https://registry.npmjs.org/@cspotcode/source-map-support/-/source-map-support-0.7.0.tgz" + resolved "https://registry.yarnpkg.com/@cspotcode/source-map-support/-/source-map-support-0.7.0.tgz#4789840aa859e46d2f3173727ab707c66bf344f5" integrity sha512-X4xqRHqN8ACt2aHVe51OxeA2HjbcL4MqFqXkrmQszJ1NOUuUu5u6Vqx/0lZSVNku7velL5FC/s5uEAj1lsBMhA== dependencies: "@cspotcode/source-map-consumer" "0.8.0" -"@eslint-community/eslint-utils@^4.2.0", "@eslint-community/eslint-utils@^4.4.0": +"@eslint-community/eslint-utils@^4.4.0": version "4.4.0" - resolved "https://registry.npmjs.org/@eslint-community/eslint-utils/-/eslint-utils-4.4.0.tgz" + resolved "https://registry.yarnpkg.com/@eslint-community/eslint-utils/-/eslint-utils-4.4.0.tgz#a23514e8fb9af1269d5f7788aa556798d61c6b59" integrity sha512-1/sA4dwrzBAyeUoQ6oxahHKmrZvsnLCg4RfxW3ZFGGmQkSNQPFNLV9CUEFQP1x9EYXHTo5p6xdhZM1Ne9p/AfA== dependencies: eslint-visitor-keys "^3.3.0" +"@eslint-community/eslint-utils@^4.8.0": + version "4.9.0" + resolved "https://registry.yarnpkg.com/@eslint-community/eslint-utils/-/eslint-utils-4.9.0.tgz#7308df158e064f0dd8b8fdb58aa14fa2a7f913b3" + integrity sha512-ayVFHdtZ+hsq1t2Dy24wCmGXGe4q9Gu3smhLYALJrr473ZH27MsnSL+LKUlimp4BWJqMDMLmPpx/Q9R3OAlL4g== + dependencies: + eslint-visitor-keys "^3.4.3" + "@eslint-community/regexpp@^4.10.0", "@eslint-community/regexpp@^4.12.1": version "4.12.1" - resolved "https://registry.npmjs.org/@eslint-community/regexpp/-/regexpp-4.12.1.tgz" + resolved "https://registry.yarnpkg.com/@eslint-community/regexpp/-/regexpp-4.12.1.tgz#cfc6cffe39df390a3841cde2abccf92eaa7ae0e0" integrity sha512-CCZCDJuduB9OUkFkY2IgppNZMi2lBQgD2qzwXkEia16cge2pijY/aXi96CJMquDMn3nJdlPV1A5KrJEXwfLNzQ== -"@eslint/config-array@^0.19.0": - version "0.19.2" - resolved "https://registry.npmjs.org/@eslint/config-array/-/config-array-0.19.2.tgz" - integrity sha512-GNKqxfHG2ySmJOBSHg7LxeUx4xpuCoFjacmlCoYWEbaPXLwvfIjixRI12xCQZeULksQb23uiA8F40w5TojpV7w== +"@eslint/config-array@^0.21.1": + version "0.21.1" + resolved "https://registry.yarnpkg.com/@eslint/config-array/-/config-array-0.21.1.tgz#7d1b0060fea407f8301e932492ba8c18aff29713" + integrity sha512-aw1gNayWpdI/jSYVgzN5pL0cfzU02GT3NBpeT/DXbx1/1x7ZKxFPd9bwrzygx/qiwIQiJ1sw/zD8qY/kRvlGHA== dependencies: - "@eslint/object-schema" "^2.1.6" + "@eslint/object-schema" "^2.1.7" debug "^4.3.1" minimatch "^3.1.2" -"@eslint/core@^0.10.0": - version "0.10.0" - resolved "https://registry.npmjs.org/@eslint/core/-/core-0.10.0.tgz" - integrity sha512-gFHJ+xBOo4G3WRlR1e/3G8A6/KZAH6zcE/hkLRCZTi/B9avAG365QhFA8uOGzTMqgTghpn7/fSnscW++dpMSAw== +"@eslint/config-helpers@^0.4.2": + version "0.4.2" + resolved "https://registry.yarnpkg.com/@eslint/config-helpers/-/config-helpers-0.4.2.tgz#1bd006ceeb7e2e55b2b773ab318d300e1a66aeda" + integrity sha512-gBrxN88gOIf3R7ja5K9slwNayVcZgK6SOUORm2uBzTeIEfeVaIhOpCtTox3P6R7o2jLFwLFTLnC7kU/RGcYEgw== dependencies: - "@types/json-schema" "^7.0.15" + "@eslint/core" "^0.17.0" -"@eslint/core@^0.11.0": - version "0.11.0" - resolved "https://registry.npmjs.org/@eslint/core/-/core-0.11.0.tgz" - integrity sha512-DWUB2pksgNEb6Bz2fggIy1wh6fGgZP4Xyy/Mt0QZPiloKKXerbqq9D3SBQTlCRYOrcRPu4vuz+CGjwdfqxnoWA== +"@eslint/core@^0.17.0": + version "0.17.0" + resolved "https://registry.yarnpkg.com/@eslint/core/-/core-0.17.0.tgz#77225820413d9617509da9342190a2019e78761c" + integrity sha512-yL/sLrpmtDaFEiUj1osRP4TI2MDz1AddJL+jZ7KSqvBuliN4xqYY54IfdN8qD8Toa6g1iloph1fxQNkjOxrrpQ== dependencies: "@types/json-schema" "^7.0.15" -"@eslint/eslintrc@^3.2.0": - version "3.2.0" - resolved "https://registry.npmjs.org/@eslint/eslintrc/-/eslintrc-3.2.0.tgz" - integrity sha512-grOjVNN8P3hjJn/eIETF1wwd12DdnwFDoyceUJLYYdkpbwq3nLi+4fqrTAONx7XDALqlL220wC/RHSC/QTI/0w== +"@eslint/eslintrc@^3.3.1": + version "3.3.3" + resolved "https://registry.yarnpkg.com/@eslint/eslintrc/-/eslintrc-3.3.3.tgz#26393a0806501b5e2b6a43aa588a4d8df67880ac" + integrity sha512-Kr+LPIUVKz2qkx1HAMH8q1q6azbqBAsXJUxBl/ODDuVPX45Z9DfwB8tPjTi6nNZ8BuM3nbJxC5zCAg5elnBUTQ== dependencies: ajv "^6.12.4" debug "^4.3.2" @@ -388,36 +376,36 @@ globals "^14.0.0" ignore "^5.2.0" import-fresh "^3.2.1" - js-yaml "^4.1.0" + js-yaml "^4.1.1" minimatch "^3.1.2" strip-json-comments "^3.1.1" -"@eslint/js@9.20.0": - version "9.20.0" - resolved "https://registry.npmjs.org/@eslint/js/-/js-9.20.0.tgz" - integrity sha512-iZA07H9io9Wn836aVTytRaNqh00Sad+EamwOVJT12GTLw1VGMFV/4JaME+JjLtr9fiGaoWgYnS54wrfWsSs4oQ== +"@eslint/js@9.39.1": + version "9.39.1" + resolved "https://registry.yarnpkg.com/@eslint/js/-/js-9.39.1.tgz#0dd59c3a9f40e3f1882975c321470969243e0164" + integrity sha512-S26Stp4zCy88tH94QbBv3XCuzRQiZ9yXofEILmglYTh/Ug/a9/umqvgFtYBAo3Lp0nsI/5/qH1CCrbdK3AP1Tw== -"@eslint/object-schema@^2.1.6": - version "2.1.6" - resolved "https://registry.npmjs.org/@eslint/object-schema/-/object-schema-2.1.6.tgz" - integrity sha512-RBMg5FRL0I0gs51M/guSAj5/e14VQ4tpZnQNWwuDT66P14I43ItmPfIZRhO9fUVIPOAQXU47atlywZ/czoqFPA== +"@eslint/object-schema@^2.1.7": + version "2.1.7" + resolved "https://registry.yarnpkg.com/@eslint/object-schema/-/object-schema-2.1.7.tgz#6e2126a1347e86a4dedf8706ec67ff8e107ebbad" + integrity sha512-VtAOaymWVfZcmZbp6E2mympDIHvyjXs/12LqWYjVw6qjrfF+VK+fyG33kChz3nnK+SU5/NeHOqrTEHS8sXO3OA== -"@eslint/plugin-kit@^0.2.5": - version "0.2.5" - resolved "https://registry.npmjs.org/@eslint/plugin-kit/-/plugin-kit-0.2.5.tgz" - integrity sha512-lB05FkqEdUg2AA0xEbUz0SnkXT1LcCTa438W4IWTUh4hdOnVbQyOJ81OrDXsJk/LSiJHubgGEFoR5EHq1NsH1A== +"@eslint/plugin-kit@^0.4.1": + version "0.4.1" + resolved "https://registry.yarnpkg.com/@eslint/plugin-kit/-/plugin-kit-0.4.1.tgz#9779e3fd9b7ee33571a57435cf4335a1794a6cb2" + integrity sha512-43/qtrDUokr7LJqoF2c3+RInu/t4zfrpYdoSDfYyhg52rwLV6TnOvdG4fXm7IkSB3wErkcmJS9iEhjVtOSEjjA== dependencies: - "@eslint/core" "^0.10.0" + "@eslint/core" "^0.17.0" levn "^0.4.1" "@humanfs/core@^0.19.1": version "0.19.1" - resolved "https://registry.npmjs.org/@humanfs/core/-/core-0.19.1.tgz" + resolved "https://registry.yarnpkg.com/@humanfs/core/-/core-0.19.1.tgz#17c55ca7d426733fe3c561906b8173c336b40a77" integrity sha512-5DyQ4+1JEUzejeK1JGICcideyfUbGixgS9jNgex5nqkW+cY7WZhxBigmieN5Qnw9ZosSNVC9KQKyb+GUaGyKUA== "@humanfs/node@^0.16.6": version "0.16.6" - resolved "https://registry.npmjs.org/@humanfs/node/-/node-0.16.6.tgz" + resolved "https://registry.yarnpkg.com/@humanfs/node/-/node-0.16.6.tgz#ee2a10eaabd1131987bf0488fd9b820174cd765e" integrity sha512-YuI2ZHQL78Q5HbhDiBA1X4LmYdXCKCMQIfw0pw7piHJwyREFebJUvrQN4cMssyES6x+vfUbx1CIpaQUKYdQZOw== dependencies: "@humanfs/core" "^0.19.1" @@ -425,22 +413,22 @@ "@humanwhocodes/module-importer@^1.0.1": version "1.0.1" - resolved "https://registry.npmjs.org/@humanwhocodes/module-importer/-/module-importer-1.0.1.tgz" + resolved "https://registry.yarnpkg.com/@humanwhocodes/module-importer/-/module-importer-1.0.1.tgz#af5b2691a22b44be847b0ca81641c5fb6ad0172c" integrity sha512-bxveV4V8v5Yb4ncFTT3rPSgZBOpCkjfK0y4oVVVJwIuDVBRMDXrPyXRL988i5ap9m9bnyEEjWfm5WkBmtffLfA== "@humanwhocodes/retry@^0.3.0": version "0.3.1" - resolved "https://registry.npmjs.org/@humanwhocodes/retry/-/retry-0.3.1.tgz" + resolved "https://registry.yarnpkg.com/@humanwhocodes/retry/-/retry-0.3.1.tgz#c72a5c76a9fbaf3488e231b13dc52c0da7bab42a" integrity sha512-JBxkERygn7Bv/GbN5Rv8Ul6LVknS+5Bp6RgDC/O8gEBU/yeH5Ui5C/OlWrTb6qct7LjjfT6Re2NxB0ln0yYybA== -"@humanwhocodes/retry@^0.4.1": - version "0.4.1" - resolved "https://registry.npmjs.org/@humanwhocodes/retry/-/retry-0.4.1.tgz" - integrity sha512-c7hNEllBlenFTHBky65mhq8WD2kbN9Q6gk0bTk8lSBvc554jpXSkST1iePudpt7+A/AQvuHs9EMqjHDXMY1lrA== +"@humanwhocodes/retry@^0.4.2": + version "0.4.3" + resolved "https://registry.yarnpkg.com/@humanwhocodes/retry/-/retry-0.4.3.tgz#c2b9d2e374ee62c586d3adbea87199b1d7a7a6ba" + integrity sha512-bV0Tgo9K4hfPCek+aMAn81RppFKv2ySDQeMoSZuvTASywNTnVJCArCZE2FWqpvIatKu7VMRLWlR1EazvVhDyhQ== "@istanbuljs/load-nyc-config@^1.0.0": version "1.1.0" - resolved "https://registry.npmjs.org/@istanbuljs/load-nyc-config/-/load-nyc-config-1.1.0.tgz" + resolved "https://registry.yarnpkg.com/@istanbuljs/load-nyc-config/-/load-nyc-config-1.1.0.tgz#fd3db1d59ecf7cf121e80650bb86712f9b55eced" integrity sha512-VjeHSlIzpv/NyD3N0YuHfXOPDIixcA1q2ZV98wsMqcYlPmv2n3Yb2lYP9XMElnaFVXg5A7YLTeLu6V84uQDjmQ== dependencies: camelcase "^5.3.1" @@ -451,12 +439,12 @@ "@istanbuljs/schema@^0.1.2": version "0.1.3" - resolved "https://registry.npmjs.org/@istanbuljs/schema/-/schema-0.1.3.tgz" + resolved "https://registry.yarnpkg.com/@istanbuljs/schema/-/schema-0.1.3.tgz#e45e384e4b8ec16bce2fd903af78450f6bf7ec98" integrity sha512-ZXRY4jNvVgSVQ8DL3LTcakaAtXwTVUxE81hslsyD2AtoXW/wVob10HkOJ1X/pAlcI7D+2YoZKg5do8G/w6RYgA== "@jest/console@^29.7.0": version "29.7.0" - resolved "https://registry.npmjs.org/@jest/console/-/console-29.7.0.tgz" + resolved "https://registry.yarnpkg.com/@jest/console/-/console-29.7.0.tgz#cd4822dbdb84529265c5a2bdb529a3c9cc950ffc" integrity sha512-5Ni4CU7XHQi32IJ398EEP4RrB8eV09sXP2ROqD4bksHrnTree52PsxvX8tpL8LvTZ3pFzXyPbNQReSN41CAhOg== dependencies: "@jest/types" "^29.6.3" @@ -468,7 +456,7 @@ "@jest/core@^29.7.0": version "29.7.0" - resolved "https://registry.npmjs.org/@jest/core/-/core-29.7.0.tgz" + resolved "https://registry.yarnpkg.com/@jest/core/-/core-29.7.0.tgz#b6cccc239f30ff36609658c5a5e2291757ce448f" integrity sha512-n7aeXWKMnGtDA48y8TLWJPJmLmmZ642Ceo78cYWEpiD7FzDgmNDV/GCVRorPABdXLJZ/9wzzgZAlHjXjxDHGsg== dependencies: "@jest/console" "^29.7.0" @@ -502,14 +490,14 @@ "@jest/create-cache-key-function@^29.7.0": version "29.7.0" - resolved "https://registry.npmjs.org/@jest/create-cache-key-function/-/create-cache-key-function-29.7.0.tgz" + resolved "https://registry.yarnpkg.com/@jest/create-cache-key-function/-/create-cache-key-function-29.7.0.tgz#793be38148fab78e65f40ae30c36785f4ad859f0" integrity sha512-4QqS3LY5PBmTRHj9sAg1HLoPzqAI0uOX6wI/TRqHIcOxlFidy6YEmCQJk6FSZjNLGCeubDMfmkWL+qaLKhSGQA== dependencies: "@jest/types" "^29.6.3" "@jest/environment@^29.7.0": version "29.7.0" - resolved "https://registry.npmjs.org/@jest/environment/-/environment-29.7.0.tgz" + resolved "https://registry.yarnpkg.com/@jest/environment/-/environment-29.7.0.tgz#24d61f54ff1f786f3cd4073b4b94416383baf2a7" integrity sha512-aQIfHDq33ExsN4jP1NWGXhxgQ/wixs60gDiKO+XVMd8Mn0NWPWgc34ZQDTb2jKaUWQ7MuwoitXAsN2XVXNMpAw== dependencies: "@jest/fake-timers" "^29.7.0" @@ -519,14 +507,14 @@ "@jest/expect-utils@^29.7.0": version "29.7.0" - resolved "https://registry.npmjs.org/@jest/expect-utils/-/expect-utils-29.7.0.tgz" + resolved "https://registry.yarnpkg.com/@jest/expect-utils/-/expect-utils-29.7.0.tgz#023efe5d26a8a70f21677d0a1afc0f0a44e3a1c6" integrity sha512-GlsNBWiFQFCVi9QVSx7f5AgMeLxe9YCCs5PuP2O2LdjDAA8Jh9eX7lA1Jq/xdXw3Wb3hyvlFNfZIfcRetSzYcA== dependencies: jest-get-type "^29.6.3" "@jest/expect@^29.7.0": version "29.7.0" - resolved "https://registry.npmjs.org/@jest/expect/-/expect-29.7.0.tgz" + resolved "https://registry.yarnpkg.com/@jest/expect/-/expect-29.7.0.tgz#76a3edb0cb753b70dfbfe23283510d3d45432bf2" integrity sha512-8uMeAMycttpva3P1lBHB8VciS9V0XAr3GymPpipdyQXbBcuhkLQOSe8E/p92RyAdToS6ZD1tFkX+CkhoECE0dQ== dependencies: expect "^29.7.0" @@ -534,7 +522,7 @@ "@jest/fake-timers@^29.7.0": version "29.7.0" - resolved "https://registry.npmjs.org/@jest/fake-timers/-/fake-timers-29.7.0.tgz" + resolved "https://registry.yarnpkg.com/@jest/fake-timers/-/fake-timers-29.7.0.tgz#fd91bf1fffb16d7d0d24a426ab1a47a49881a565" integrity sha512-q4DH1Ha4TTFPdxLsqDXK1d3+ioSL7yL5oCMJZgDYm6i+6CygW5E5xVr/D1HdsGxjt1ZWSfUAs9OxSB/BNelWrQ== dependencies: "@jest/types" "^29.6.3" @@ -546,7 +534,7 @@ "@jest/globals@^29.7.0": version "29.7.0" - resolved "https://registry.npmjs.org/@jest/globals/-/globals-29.7.0.tgz" + resolved "https://registry.yarnpkg.com/@jest/globals/-/globals-29.7.0.tgz#8d9290f9ec47ff772607fa864ca1d5a2efae1d4d" integrity sha512-mpiz3dutLbkW2MNFubUGUEVLkTGiqW6yLVTA+JbP6fI6J5iL9Y0Nlg8k95pcF8ctKwCS7WVxteBs29hhfAotzQ== dependencies: "@jest/environment" "^29.7.0" @@ -556,7 +544,7 @@ "@jest/reporters@^29.7.0": version "29.7.0" - resolved "https://registry.npmjs.org/@jest/reporters/-/reporters-29.7.0.tgz" + resolved "https://registry.yarnpkg.com/@jest/reporters/-/reporters-29.7.0.tgz#04b262ecb3b8faa83b0b3d321623972393e8f4c7" integrity sha512-DApq0KJbJOEzAFYjHADNNxAE3KbhxQB1y5Kplb5Waqw6zVbuWatSnMjE5gs8FUgEPmNsnZA3NCWl9NG0ia04Pg== dependencies: "@bcoe/v8-coverage" "^0.2.3" @@ -586,14 +574,14 @@ "@jest/schemas@^29.6.3": version "29.6.3" - resolved "https://registry.npmjs.org/@jest/schemas/-/schemas-29.6.3.tgz" + resolved "https://registry.yarnpkg.com/@jest/schemas/-/schemas-29.6.3.tgz#430b5ce8a4e0044a7e3819663305a7b3091c8e03" integrity sha512-mo5j5X+jIZmJQveBKeS/clAueipV7KgiX1vMgCxam1RNYiqE1w62n0/tJJnHtjW8ZHcQco5gY85jA3mi0L+nSA== dependencies: "@sinclair/typebox" "^0.27.8" "@jest/source-map@^29.6.3": version "29.6.3" - resolved "https://registry.npmjs.org/@jest/source-map/-/source-map-29.6.3.tgz" + resolved "https://registry.yarnpkg.com/@jest/source-map/-/source-map-29.6.3.tgz#d90ba772095cf37a34a5eb9413f1b562a08554c4" integrity sha512-MHjT95QuipcPrpLM+8JMSzFx6eHp5Bm+4XeFDJlwsvVBjmKNiIAvasGK2fxz2WbGRlnvqehFbh07MMa7n3YJnw== dependencies: "@jridgewell/trace-mapping" "^0.3.18" @@ -602,7 +590,7 @@ "@jest/test-result@^29.7.0": version "29.7.0" - resolved "https://registry.npmjs.org/@jest/test-result/-/test-result-29.7.0.tgz" + resolved "https://registry.yarnpkg.com/@jest/test-result/-/test-result-29.7.0.tgz#8db9a80aa1a097bb2262572686734baed9b1657c" integrity sha512-Fdx+tv6x1zlkJPcWXmMDAG2HBnaR9XPSd5aDWQVsfrZmLVT3lU1cwyxLgRmXR9yrq4NBoEm9BMsfgFzTQAbJYA== dependencies: "@jest/console" "^29.7.0" @@ -612,7 +600,7 @@ "@jest/test-sequencer@^29.7.0": version "29.7.0" - resolved "https://registry.npmjs.org/@jest/test-sequencer/-/test-sequencer-29.7.0.tgz" + resolved "https://registry.yarnpkg.com/@jest/test-sequencer/-/test-sequencer-29.7.0.tgz#6cef977ce1d39834a3aea887a1726628a6f072ce" integrity sha512-GQwJ5WZVrKnOJuiYiAF52UNUJXgTZx1NHjFSEB0qEMmSZKAkdMoIzw/Cj6x6NF4AvV23AUqDpFzQkN/eYCYTxw== dependencies: "@jest/test-result" "^29.7.0" @@ -622,7 +610,7 @@ "@jest/transform@^29.7.0": version "29.7.0" - resolved "https://registry.npmjs.org/@jest/transform/-/transform-29.7.0.tgz" + resolved "https://registry.yarnpkg.com/@jest/transform/-/transform-29.7.0.tgz#df2dd9c346c7d7768b8a06639994640c642e284c" integrity sha512-ok/BTPFzFKVMwO5eOHRrvnBVHdRy9IrsrW1GpMaQ9MCnilNLXQKmAX8s1YXDFaai9xJpac2ySzV0YeRRECr2Vw== dependencies: "@babel/core" "^7.11.6" @@ -643,7 +631,7 @@ "@jest/types@^29.6.3": version "29.6.3" - resolved "https://registry.npmjs.org/@jest/types/-/types-29.6.3.tgz" + resolved "https://registry.yarnpkg.com/@jest/types/-/types-29.6.3.tgz#1131f8cf634e7e84c5e77bab12f052af585fba59" integrity sha512-u3UPsIilWKOM3F9CXtrG8LEJmNxwoCQC/XVj4IKYXvvpx7QIi/Kg1LI5uDmDpKlac62NUtX7eLjRh+jVZcLOzw== dependencies: "@jest/schemas" "^29.6.3" @@ -653,41 +641,56 @@ "@types/yargs" "^17.0.8" chalk "^4.0.0" -"@jridgewell/gen-mapping@^0.3.0", "@jridgewell/gen-mapping@^0.3.2": - version "0.3.3" - resolved "https://registry.npmjs.org/@jridgewell/gen-mapping/-/gen-mapping-0.3.3.tgz" - integrity sha512-HLhSWOLRi875zjjMG/r+Nv0oCW8umGb0BgEhyX3dDX3egwZtB8PqLnjz3yedt8R5StBrzcg4aBpnh8UA9D1BoQ== +"@jridgewell/gen-mapping@^0.3.12", "@jridgewell/gen-mapping@^0.3.5": + version "0.3.13" + resolved "https://registry.yarnpkg.com/@jridgewell/gen-mapping/-/gen-mapping-0.3.13.tgz#6342a19f44347518c93e43b1ac69deb3c4656a1f" + integrity sha512-2kkt/7niJ6MgEPxF0bYdQ6etZaA+fQvDcLKckhy1yIQOzaoKjBBjSj63/aLVjYE3qhRt5dvM+uUyfCg6UKCBbA== + dependencies: + "@jridgewell/sourcemap-codec" "^1.5.0" + "@jridgewell/trace-mapping" "^0.3.24" + +"@jridgewell/remapping@^2.3.5": + version "2.3.5" + resolved "https://registry.yarnpkg.com/@jridgewell/remapping/-/remapping-2.3.5.tgz#375c476d1972947851ba1e15ae8f123047445aa1" + integrity sha512-LI9u/+laYG4Ds1TDKSJW2YPrIlcVYOwi2fUC6xB43lueCjgxV4lffOCZCtYFiH6TNOX+tQKXx97T4IKHbhyHEQ== dependencies: - "@jridgewell/set-array" "^1.0.1" - "@jridgewell/sourcemap-codec" "^1.4.10" - "@jridgewell/trace-mapping" "^0.3.9" + "@jridgewell/gen-mapping" "^0.3.5" + "@jridgewell/trace-mapping" "^0.3.24" "@jridgewell/resolve-uri@^3.1.0": version "3.1.1" - resolved "https://registry.npmjs.org/@jridgewell/resolve-uri/-/resolve-uri-3.1.1.tgz" + resolved "https://registry.yarnpkg.com/@jridgewell/resolve-uri/-/resolve-uri-3.1.1.tgz#c08679063f279615a3326583ba3a90d1d82cc721" integrity sha512-dSYZh7HhCDtCKm4QakX0xFpsRDqjjtZf/kjI/v3T3Nwt5r8/qz/M19F9ySyOqU94SXBmeG9ttTul+YnR4LOxFA== -"@jridgewell/set-array@^1.0.1": - version "1.1.2" - resolved "https://registry.npmjs.org/@jridgewell/set-array/-/set-array-1.1.2.tgz" - integrity sha512-xnkseuNADM0gt2bs+BvhO0p78Mk762YnZdsuzFV018NoG1Sj1SCQvpSqa7XUaTam5vAGasABV9qXASMKnFMwMw== - -"@jridgewell/sourcemap-codec@^1.4.10", "@jridgewell/sourcemap-codec@^1.4.14": +"@jridgewell/sourcemap-codec@^1.4.14": version "1.4.15" - resolved "https://registry.npmjs.org/@jridgewell/sourcemap-codec/-/sourcemap-codec-1.4.15.tgz" + resolved "https://registry.yarnpkg.com/@jridgewell/sourcemap-codec/-/sourcemap-codec-1.4.15.tgz#d7c6e6755c78567a951e04ab52ef0fd26de59f32" integrity sha512-eF2rxCRulEKXHTRiDrDy6erMYWqNw4LPdQ8UQA4huuxaQsVeRPFl2oM8oDGxMFhJUWZf9McpLtJasDDZb/Bpeg== -"@jridgewell/trace-mapping@^0.3.12", "@jridgewell/trace-mapping@^0.3.17", "@jridgewell/trace-mapping@^0.3.18", "@jridgewell/trace-mapping@^0.3.9": +"@jridgewell/sourcemap-codec@^1.5.0": + version "1.5.5" + resolved "https://registry.yarnpkg.com/@jridgewell/sourcemap-codec/-/sourcemap-codec-1.5.5.tgz#6912b00d2c631c0d15ce1a7ab57cd657f2a8f8ba" + integrity sha512-cYQ9310grqxueWbl+WuIUIaiUaDcj7WOq5fVhEljNVgRfOUhY9fy2zTvfoqWsnebh8Sl70VScFbICvJnLKB0Og== + +"@jridgewell/trace-mapping@^0.3.12", "@jridgewell/trace-mapping@^0.3.18": version "0.3.20" - resolved "https://registry.npmjs.org/@jridgewell/trace-mapping/-/trace-mapping-0.3.20.tgz" + resolved "https://registry.yarnpkg.com/@jridgewell/trace-mapping/-/trace-mapping-0.3.20.tgz#72e45707cf240fa6b081d0366f8265b0cd10197f" integrity sha512-R8LcPeWZol2zR8mmH3JeKQ6QRCFb7XgUhV9ZlGhHLGyg4wpPiPZNQOOWhFZhxKw8u//yTbNGI42Bx/3paXEQ+Q== dependencies: "@jridgewell/resolve-uri" "^3.1.0" "@jridgewell/sourcemap-codec" "^1.4.14" +"@jridgewell/trace-mapping@^0.3.24", "@jridgewell/trace-mapping@^0.3.28": + version "0.3.31" + resolved "https://registry.yarnpkg.com/@jridgewell/trace-mapping/-/trace-mapping-0.3.31.tgz#db15d6781c931f3a251a3dac39501c98a6082fd0" + integrity sha512-zzNR+SdQSDJzc8joaeP8QQoCQr8NuYx2dIIytl1QeBEZHJ9uW6hebsrYgbz8hJwUQao3TWCMtmfV8Nu1twOLAw== + dependencies: + "@jridgewell/resolve-uri" "^3.1.0" + "@jridgewell/sourcemap-codec" "^1.4.14" + "@nodelib/fs.scandir@2.1.5": version "2.1.5" - resolved "https://registry.npmjs.org/@nodelib/fs.scandir/-/fs.scandir-2.1.5.tgz" + resolved "https://registry.yarnpkg.com/@nodelib/fs.scandir/-/fs.scandir-2.1.5.tgz#7619c2eb21b25483f6d167548b4cfd5a7488c3d5" integrity sha512-vq24Bq3ym5HEQm2NKCr3yXDwjc7vTsEThRDnkp2DK9p1uqLR+DHurm/NOTo0KG7HYHU7eppKZj3MyqYuMBf62g== dependencies: "@nodelib/fs.stat" "2.0.5" @@ -695,42 +698,37 @@ "@nodelib/fs.stat@2.0.5", "@nodelib/fs.stat@^2.0.2": version "2.0.5" - resolved "https://registry.npmjs.org/@nodelib/fs.stat/-/fs.stat-2.0.5.tgz" + resolved "https://registry.yarnpkg.com/@nodelib/fs.stat/-/fs.stat-2.0.5.tgz#5bd262af94e9d25bd1e71b05deed44876a222e8b" integrity sha512-RkhPPp2zrqDAQA/2jNhnztcPAlv64XdhIp7a7454A5ovI7Bukxgt7MX7udwAu3zg1DcpPU0rz3VV1SeaqvY4+A== "@nodelib/fs.walk@^1.2.3": version "1.2.8" - resolved "https://registry.npmjs.org/@nodelib/fs.walk/-/fs.walk-1.2.8.tgz" + resolved "https://registry.yarnpkg.com/@nodelib/fs.walk/-/fs.walk-1.2.8.tgz#e95737e8bb6746ddedf69c556953494f196fe69a" integrity sha512-oGB+UxlgWcgQkgwo8GcEGwemoTFt3FIO9ababBmaGwXIoBKZ+GTy0pP185beGg7Llih/NSHSV2XAs1lnznocSg== dependencies: "@nodelib/fs.scandir" "2.1.5" fastq "^1.6.0" -"@pkgr/core@^0.2.4": - version "0.2.4" - resolved "https://registry.npmjs.org/@pkgr/core/-/core-0.2.4.tgz" - integrity sha512-ROFF39F6ZrnzSUEmQQZUar0Jt4xVoP9WnDRdWwF4NNcXs3xBTLgBUDoOwW141y1jP+S8nahIbdxbFC7IShw9Iw== - "@sinclair/typebox@^0.27.8": version "0.27.8" - resolved "https://registry.npmjs.org/@sinclair/typebox/-/typebox-0.27.8.tgz" + resolved "https://registry.yarnpkg.com/@sinclair/typebox/-/typebox-0.27.8.tgz#6667fac16c436b5434a387a34dedb013198f6e6e" integrity sha512-+Fj43pSMwJs4KRrH/938Uf+uAELIgVBmQzg/q1YG10djyfA3TnrU8N8XzqCh/okZdszqBQTZf96idMfE5lnwTA== "@sindresorhus/is@^4.6.0": version "4.6.0" - resolved "https://registry.npmjs.org/@sindresorhus/is/-/is-4.6.0.tgz" + resolved "https://registry.yarnpkg.com/@sindresorhus/is/-/is-4.6.0.tgz#3c7c9c46e678feefe7a2e5bb609d3dbd665ffb3f" integrity sha512-t09vSN3MdfsyCHoFcTRCH/iUtG7OJ0CsjzB8cjAmKc/va/kIgeDI/TxsigdncE/4be734m0cvIYwNaV4i2XqAw== "@sinonjs/commons@^3.0.0": version "3.0.0" - resolved "https://registry.npmjs.org/@sinonjs/commons/-/commons-3.0.0.tgz" + resolved "https://registry.yarnpkg.com/@sinonjs/commons/-/commons-3.0.0.tgz#beb434fe875d965265e04722ccfc21df7f755d72" integrity sha512-jXBtWAF4vmdNmZgD5FoKsVLv3rPgDnLgPbU84LIJ3otV44vJlDRokVng5v8NFJdCf/da9legHcKaRuZs4L7faA== dependencies: type-detect "4.0.8" "@sinonjs/fake-timers@^10.0.2": version "10.3.0" - resolved "https://registry.npmjs.org/@sinonjs/fake-timers/-/fake-timers-10.3.0.tgz" + resolved "https://registry.yarnpkg.com/@sinonjs/fake-timers/-/fake-timers-10.3.0.tgz#55fdff1ecab9f354019129daf4df0dd4d923ea66" integrity sha512-V4BG07kuYSUkTCSBHG8G8TNhM+F19jXFWnQtzj+we8DrkpSBCee9Z3Ms8yiGer/dlmhe35/Xdgyo3/0rQKg7YA== dependencies: "@sinonjs/commons" "^3.0.0" @@ -782,12 +780,12 @@ "@swc/core-win32-x64-msvc@1.4.16": version "1.4.16" - resolved "https://registry.npmjs.org/@swc/core-win32-x64-msvc/-/core-win32-x64-msvc-1.4.16.tgz" + resolved "https://registry.yarnpkg.com/@swc/core-win32-x64-msvc/-/core-win32-x64-msvc-1.4.16.tgz#f880939fca32c181adfe7e3abd2b6b7857bd3489" integrity sha512-BPAfFfODWXtUu6SwaTTftDHvcbDyWBSI/oanUeRbQR5vVWkXoQ3cxLTsDluc3H74IqXS5z1Uyoe0vNo2hB1opA== "@swc/core@^1.3.102": version "1.4.16" - resolved "https://registry.npmjs.org/@swc/core/-/core-1.4.16.tgz" + resolved "https://registry.yarnpkg.com/@swc/core/-/core-1.4.16.tgz#d175bae2acfecd53bcbd4293f1fba5ec316634a0" integrity sha512-Xaf+UBvW6JNuV131uvSNyMXHn+bh6LyKN4tbv7tOUFQpXyz/t9YWRE04emtlUW9Y0qrm/GKFCbY8n3z6BpZbTA== dependencies: "@swc/counter" "^0.1.2" @@ -806,12 +804,12 @@ "@swc/counter@^0.1.2", "@swc/counter@^0.1.3": version "0.1.3" - resolved "https://registry.npmjs.org/@swc/counter/-/counter-0.1.3.tgz" + resolved "https://registry.yarnpkg.com/@swc/counter/-/counter-0.1.3.tgz#cc7463bd02949611c6329596fccd2b0ec782b0e9" integrity sha512-e2BR4lsJkkRlKZ/qCHPw9ZaSxc0MVUd7gtbtaB7aMvHeJVYe8sOB8DBZkP2DtISHGSku9sCK6T6cnY0CtXrOCQ== "@swc/jest@^0.2.29": version "0.2.36" - resolved "https://registry.npmjs.org/@swc/jest/-/jest-0.2.36.tgz" + resolved "https://registry.yarnpkg.com/@swc/jest/-/jest-0.2.36.tgz#2797450a30d28b471997a17e901ccad946fe693e" integrity sha512-8X80dp81ugxs4a11z1ka43FPhP+/e+mJNXJSxiNYk8gIX/jPBtY4gQTrKu/KIoco8bzKuPI5lUxjfLiGsfvnlw== dependencies: "@jest/create-cache-key-function" "^29.7.0" @@ -820,34 +818,34 @@ "@swc/types@^0.1.5": version "0.1.6" - resolved "https://registry.npmjs.org/@swc/types/-/types-0.1.6.tgz" + resolved "https://registry.yarnpkg.com/@swc/types/-/types-0.1.6.tgz#2f13f748995b247d146de2784d3eb7195410faba" integrity sha512-/JLo/l2JsT/LRd80C3HfbmVpxOAJ11FO2RCEslFrgzLltoP9j8XIbsyDcfCt2WWyX+CM96rBoNM+IToAkFOugg== dependencies: "@swc/counter" "^0.1.3" "@tsconfig/node10@^1.0.7": version "1.0.8" - resolved "https://registry.npmjs.org/@tsconfig/node10/-/node10-1.0.8.tgz" + resolved "https://registry.yarnpkg.com/@tsconfig/node10/-/node10-1.0.8.tgz#c1e4e80d6f964fbecb3359c43bd48b40f7cadad9" integrity sha512-6XFfSQmMgq0CFLY1MslA/CPUfhIL919M1rMsa5lP2P097N2Wd1sSX0tx1u4olM16fLNhtHZpRhedZJphNJqmZg== "@tsconfig/node12@^1.0.7": version "1.0.9" - resolved "https://registry.npmjs.org/@tsconfig/node12/-/node12-1.0.9.tgz" + resolved "https://registry.yarnpkg.com/@tsconfig/node12/-/node12-1.0.9.tgz#62c1f6dee2ebd9aead80dc3afa56810e58e1a04c" integrity sha512-/yBMcem+fbvhSREH+s14YJi18sp7J9jpuhYByADT2rypfajMZZN4WQ6zBGgBKp53NKmqI36wFYDb3yaMPurITw== "@tsconfig/node14@^1.0.0": version "1.0.1" - resolved "https://registry.npmjs.org/@tsconfig/node14/-/node14-1.0.1.tgz" + resolved "https://registry.yarnpkg.com/@tsconfig/node14/-/node14-1.0.1.tgz#95f2d167ffb9b8d2068b0b235302fafd4df711f2" integrity sha512-509r2+yARFfHHE7T6Puu2jjkoycftovhXRqW328PDXTVGKihlb1P8Z9mMZH04ebyajfRY7dedfGynlrFHJUQCg== "@tsconfig/node16@^1.0.2": version "1.0.2" - resolved "https://registry.npmjs.org/@tsconfig/node16/-/node16-1.0.2.tgz" + resolved "https://registry.yarnpkg.com/@tsconfig/node16/-/node16-1.0.2.tgz#423c77877d0569db20e1fc80885ac4118314010e" integrity sha512-eZxlbI8GZscaGS7kkc/trHTT5xgrjH3/1n2JDwusC9iahPKWMRvRjJSAN5mCXviuTGQ/lHnhvv8Q1YTpnfz9gA== "@types/babel__core@^7.1.14": version "7.20.5" - resolved "https://registry.npmjs.org/@types/babel__core/-/babel__core-7.20.5.tgz" + resolved "https://registry.yarnpkg.com/@types/babel__core/-/babel__core-7.20.5.tgz#3df15f27ba85319caa07ba08d0721889bb39c017" integrity sha512-qoQprZvz5wQFJwMDqeseRXWv3rqMvhgpbXFfVyWhbx9X47POIA6i/+dXefEmZKoAgOaTdaIgNSMqMIU61yRyzA== dependencies: "@babel/parser" "^7.20.7" @@ -858,14 +856,14 @@ "@types/babel__generator@*": version "7.6.8" - resolved "https://registry.npmjs.org/@types/babel__generator/-/babel__generator-7.6.8.tgz" + resolved "https://registry.yarnpkg.com/@types/babel__generator/-/babel__generator-7.6.8.tgz#f836c61f48b1346e7d2b0d93c6dacc5b9535d3ab" integrity sha512-ASsj+tpEDsEiFr1arWrlN6V3mdfjRMZt6LtK/Vp/kreFLnr5QH5+DhvD5nINYZXzwJvXeGq+05iUXcAzVrqWtw== dependencies: "@babel/types" "^7.0.0" "@types/babel__template@*": version "7.4.4" - resolved "https://registry.npmjs.org/@types/babel__template/-/babel__template-7.4.4.tgz" + resolved "https://registry.yarnpkg.com/@types/babel__template/-/babel__template-7.4.4.tgz#5672513701c1b2199bc6dad636a9d7491586766f" integrity sha512-h/NUaSyG5EyxBIp8YRxo4RMe2/qQgvyowRwVMzhYhBCONbW8PUsg4lkFMrhgZhUe5z3L3MiLDuvyJ/CaPa2A8A== dependencies: "@babel/parser" "^7.1.0" @@ -873,45 +871,45 @@ "@types/babel__traverse@*", "@types/babel__traverse@^7.0.6": version "7.20.4" - resolved "https://registry.npmjs.org/@types/babel__traverse/-/babel__traverse-7.20.4.tgz" + resolved "https://registry.yarnpkg.com/@types/babel__traverse/-/babel__traverse-7.20.4.tgz#ec2c06fed6549df8bc0eb4615b683749a4a92e1b" integrity sha512-mSM/iKUk5fDDrEV/e83qY+Cr3I1+Q3qqTuEn++HAWYjEa1+NxZr6CNrcJGf2ZTnq4HoFGC3zaTPZTobCzCFukA== dependencies: "@babel/types" "^7.20.7" "@types/estree@^1.0.6": version "1.0.6" - resolved "https://registry.npmjs.org/@types/estree/-/estree-1.0.6.tgz" + resolved "https://registry.yarnpkg.com/@types/estree/-/estree-1.0.6.tgz#628effeeae2064a1b4e79f78e81d87b7e5fc7b50" integrity sha512-AYnb1nQyY49te+VRAVgmzfcgjYS91mY5P0TKUDCLEM+gNnA+3T6rWITXRLYCpahpqSQbN5cE+gHpnPyXjHWxcw== "@types/graceful-fs@^4.1.3": version "4.1.9" - resolved "https://registry.npmjs.org/@types/graceful-fs/-/graceful-fs-4.1.9.tgz" + resolved "https://registry.yarnpkg.com/@types/graceful-fs/-/graceful-fs-4.1.9.tgz#2a06bc0f68a20ab37b3e36aa238be6abdf49e8b4" integrity sha512-olP3sd1qOEe5dXTSaFvQG+02VdRXcdytWLAZsAq1PecU8uqQAhkrnbli7DagjtXKW/Bl7YJbUsa8MPcuc8LHEQ== dependencies: "@types/node" "*" "@types/istanbul-lib-coverage@*", "@types/istanbul-lib-coverage@^2.0.0", "@types/istanbul-lib-coverage@^2.0.1": version "2.0.6" - resolved "https://registry.npmjs.org/@types/istanbul-lib-coverage/-/istanbul-lib-coverage-2.0.6.tgz" + resolved "https://registry.yarnpkg.com/@types/istanbul-lib-coverage/-/istanbul-lib-coverage-2.0.6.tgz#7739c232a1fee9b4d3ce8985f314c0c6d33549d7" integrity sha512-2QF/t/auWm0lsy8XtKVPG19v3sSOQlJe/YHZgfjb/KBBHOGSV+J2q/S671rcq9uTBrLAXmZpqJiaQbMT+zNU1w== "@types/istanbul-lib-report@*": version "3.0.3" - resolved "https://registry.npmjs.org/@types/istanbul-lib-report/-/istanbul-lib-report-3.0.3.tgz" + resolved "https://registry.yarnpkg.com/@types/istanbul-lib-report/-/istanbul-lib-report-3.0.3.tgz#53047614ae72e19fc0401d872de3ae2b4ce350bf" integrity sha512-NQn7AHQnk/RSLOxrBbGyJM/aVQ+pjj5HCgasFxc0K/KhoATfQ/47AyUl15I2yBUpihjmas+a+VJBOqecrFH+uA== dependencies: "@types/istanbul-lib-coverage" "*" "@types/istanbul-reports@^3.0.0": version "3.0.4" - resolved "https://registry.npmjs.org/@types/istanbul-reports/-/istanbul-reports-3.0.4.tgz" + resolved "https://registry.yarnpkg.com/@types/istanbul-reports/-/istanbul-reports-3.0.4.tgz#0f03e3d2f670fbdac586e34b433783070cc16f54" integrity sha512-pk2B1NWalF9toCRu6gjBzR69syFjP4Od8WRAX+0mmf9lAjCRicLOWc+ZrxZHx/0XRjotgkF9t6iaMJ+aXcOdZQ== dependencies: "@types/istanbul-lib-report" "*" "@types/jest@^29.4.0": version "29.5.11" - resolved "https://registry.npmjs.org/@types/jest/-/jest-29.5.11.tgz" + resolved "https://registry.yarnpkg.com/@types/jest/-/jest-29.5.11.tgz#0c13aa0da7d0929f078ab080ae5d4ced80fa2f2c" integrity sha512-S2mHmYIVe13vrm6q4kN6fLYYAka15ALQki/vgDC3mIukEOx8WJlv0kQPM+d4w8Gp6u0uSdKND04IlTXBv0rwnQ== dependencies: expect "^29.0.0" @@ -919,36 +917,43 @@ "@types/json-schema@^7.0.15": version "7.0.15" - resolved "https://registry.npmjs.org/@types/json-schema/-/json-schema-7.0.15.tgz" + resolved "https://registry.yarnpkg.com/@types/json-schema/-/json-schema-7.0.15.tgz#596a1747233694d50f6ad8a7869fcb6f56cf5841" integrity sha512-5+fP8P8MFNC+AyZCDxrB2pkZFPGzqQWUzpSeuuVLvm8VMcorNYavBqoFcxK8bQz4Qsbn4oUEEem4wDLfcysGHA== -"@types/node@*", "@types/node@^20.17.6": +"@types/node@*": + version "20.10.5" + resolved "https://registry.yarnpkg.com/@types/node/-/node-20.10.5.tgz#47ad460b514096b7ed63a1dae26fad0914ed3ab2" + integrity sha512-nNPsNE65wjMxEKI93yOP+NPGGBJz/PoN3kZsVLee0XMiJolxSekEVD8wRwBUBqkwc7UWop0edW50yrCQW4CyRw== + dependencies: + undici-types "~5.26.4" + +"@types/node@^20.17.6": version "20.19.11" - resolved "https://registry.npmjs.org/@types/node/-/node-20.19.11.tgz" + resolved "https://registry.yarnpkg.com/@types/node/-/node-20.19.11.tgz#728cab53092bd5f143beed7fbba7ba99de3c16c4" integrity sha512-uug3FEEGv0r+jrecvUUpbY8lLisvIjg6AAic6a2bSP5OEOLeJsDSnvhCDov7ipFFMXS3orMpzlmi0ZcuGkBbow== dependencies: undici-types "~6.21.0" "@types/stack-utils@^2.0.0": version "2.0.3" - resolved "https://registry.npmjs.org/@types/stack-utils/-/stack-utils-2.0.3.tgz" + resolved "https://registry.yarnpkg.com/@types/stack-utils/-/stack-utils-2.0.3.tgz#6209321eb2c1712a7e7466422b8cb1fc0d9dd5d8" integrity sha512-9aEbYZ3TbYMznPdcdr3SmIrLXwC/AKZXQeCf9Pgao5CKb8CyHuEX5jzWPTkvregvhRJHcpRO6BFoGW9ycaOkYw== "@types/yargs-parser@*": version "21.0.3" - resolved "https://registry.npmjs.org/@types/yargs-parser/-/yargs-parser-21.0.3.tgz" + resolved "https://registry.yarnpkg.com/@types/yargs-parser/-/yargs-parser-21.0.3.tgz#815e30b786d2e8f0dcd85fd5bcf5e1a04d008f15" integrity sha512-I4q9QU9MQv4oEOz4tAHJtNz1cwuLxn2F3xcc2iV5WdqLPpUnj30aUuxt1mAxYTG+oe8CZMV/+6rU4S4gRDzqtQ== "@types/yargs@^17.0.8": version "17.0.32" - resolved "https://registry.npmjs.org/@types/yargs/-/yargs-17.0.32.tgz" + resolved "https://registry.yarnpkg.com/@types/yargs/-/yargs-17.0.32.tgz#030774723a2f7faafebf645f4e5a48371dca6229" integrity sha512-xQ67Yc/laOG5uMfX/093MRlGGCIBzZMarVa+gfNKJxWAIgykYpVGkBdbqEzGDDfCrVUj6Hiff4mTZ5BA6TmAog== dependencies: "@types/yargs-parser" "*" "@typescript-eslint/eslint-plugin@8.31.1": version "8.31.1" - resolved "https://registry.npmjs.org/@typescript-eslint/eslint-plugin/-/eslint-plugin-8.31.1.tgz" + resolved "https://registry.yarnpkg.com/@typescript-eslint/eslint-plugin/-/eslint-plugin-8.31.1.tgz#62f1befe59647524994e89de4516d8dcba7a850a" integrity sha512-oUlH4h1ABavI4F0Xnl8/fOtML/eu8nI2A1nYd+f+55XI0BLu+RIqKoCiZKNo6DtqZBEQm5aNKA20G3Z5w3R6GQ== dependencies: "@eslint-community/regexpp" "^4.10.0" @@ -963,7 +968,7 @@ "@typescript-eslint/parser@8.31.1": version "8.31.1" - resolved "https://registry.npmjs.org/@typescript-eslint/parser/-/parser-8.31.1.tgz" + resolved "https://registry.yarnpkg.com/@typescript-eslint/parser/-/parser-8.31.1.tgz#e9b0ccf30d37dde724ee4d15f4dbc195995cce1b" integrity sha512-oU/OtYVydhXnumd0BobL9rkJg7wFJ9bFFPmSmB/bf/XWN85hlViji59ko6bSKBXyseT9V8l+CN1nwmlbiN0G7Q== dependencies: "@typescript-eslint/scope-manager" "8.31.1" @@ -974,7 +979,7 @@ "@typescript-eslint/scope-manager@8.31.1": version "8.31.1" - resolved "https://registry.npmjs.org/@typescript-eslint/scope-manager/-/scope-manager-8.31.1.tgz" + resolved "https://registry.yarnpkg.com/@typescript-eslint/scope-manager/-/scope-manager-8.31.1.tgz#1eb52e76878f545e4add142e0d8e3e97e7aa443b" integrity sha512-BMNLOElPxrtNQMIsFHE+3P0Yf1z0dJqV9zLdDxN/xLlWMlXK/ApEsVEKzpizg9oal8bAT5Sc7+ocal7AC1HCVw== dependencies: "@typescript-eslint/types" "8.31.1" @@ -982,7 +987,7 @@ "@typescript-eslint/type-utils@8.31.1": version "8.31.1" - resolved "https://registry.npmjs.org/@typescript-eslint/type-utils/-/type-utils-8.31.1.tgz" + resolved "https://registry.yarnpkg.com/@typescript-eslint/type-utils/-/type-utils-8.31.1.tgz#be0f438fb24b03568e282a0aed85f776409f970c" integrity sha512-fNaT/m9n0+dpSp8G/iOQ05GoHYXbxw81x+yvr7TArTuZuCA6VVKbqWYVZrV5dVagpDTtj/O8k5HBEE/p/HM5LA== dependencies: "@typescript-eslint/typescript-estree" "8.31.1" @@ -992,12 +997,12 @@ "@typescript-eslint/types@8.31.1": version "8.31.1" - resolved "https://registry.npmjs.org/@typescript-eslint/types/-/types-8.31.1.tgz" + resolved "https://registry.yarnpkg.com/@typescript-eslint/types/-/types-8.31.1.tgz#478ed6f7e8aee1be7b63a60212b6bffe1423b5d4" integrity sha512-SfepaEFUDQYRoA70DD9GtytljBePSj17qPxFHA/h3eg6lPTqGJ5mWOtbXCk1YrVU1cTJRd14nhaXWFu0l2troQ== "@typescript-eslint/typescript-estree@8.31.1": version "8.31.1" - resolved "https://registry.npmjs.org/@typescript-eslint/typescript-estree/-/typescript-estree-8.31.1.tgz" + resolved "https://registry.yarnpkg.com/@typescript-eslint/typescript-estree/-/typescript-estree-8.31.1.tgz#37792fe7ef4d3021c7580067c8f1ae66daabacdf" integrity sha512-kaA0ueLe2v7KunYOyWYtlf/QhhZb7+qh4Yw6Ni5kgukMIG+iP773tjgBiLWIXYumWCwEq3nLW+TUywEp8uEeag== dependencies: "@typescript-eslint/types" "8.31.1" @@ -1011,7 +1016,7 @@ "@typescript-eslint/utils@8.31.1": version "8.31.1" - resolved "https://registry.npmjs.org/@typescript-eslint/utils/-/utils-8.31.1.tgz" + resolved "https://registry.yarnpkg.com/@typescript-eslint/utils/-/utils-8.31.1.tgz#5628ea0393598a0b2f143d0fc6d019f0dee9dd14" integrity sha512-2DSI4SNfF5T4oRveQ4nUrSjUqjMND0nLq9rEkz0gfGr3tg0S5KB6DhwR+WZPCjzkZl3cH+4x2ce3EsL50FubjQ== dependencies: "@eslint-community/eslint-utils" "^4.4.0" @@ -1021,7 +1026,7 @@ "@typescript-eslint/visitor-keys@8.31.1": version "8.31.1" - resolved "https://registry.npmjs.org/@typescript-eslint/visitor-keys/-/visitor-keys-8.31.1.tgz" + resolved "https://registry.yarnpkg.com/@typescript-eslint/visitor-keys/-/visitor-keys-8.31.1.tgz#6742b0e3ba1e0c1e35bdaf78c03e759eb8dd8e75" integrity sha512-I+/rgqOVBn6f0o7NDTmAPWWC6NuqhV174lfYvAm9fUaWeiefLdux9/YI3/nLugEn9L8fcSi0XmpKi/r5u0nmpw== dependencies: "@typescript-eslint/types" "8.31.1" @@ -1029,22 +1034,32 @@ acorn-jsx@^5.3.2: version "5.3.2" - resolved "https://registry.npmjs.org/acorn-jsx/-/acorn-jsx-5.3.2.tgz" + resolved "https://registry.yarnpkg.com/acorn-jsx/-/acorn-jsx-5.3.2.tgz#7ed5bb55908b3b2f1bc55c6af1653bada7f07937" integrity sha512-rq9s+JNhf0IChjtDXxllJ7g41oZk5SlXtp0LHwyA5cejwn7vKmKp4pPri6YEePv2PU65sAsegbXtIinmDFDXgQ== acorn-walk@^8.1.1: version "8.2.0" - resolved "https://registry.npmjs.org/acorn-walk/-/acorn-walk-8.2.0.tgz" + resolved "https://registry.yarnpkg.com/acorn-walk/-/acorn-walk-8.2.0.tgz#741210f2e2426454508853a2f44d0ab83b7f69c1" integrity sha512-k+iyHEuPgSw6SbuDpGQM+06HQUa04DZ3o+F6CSzXMvvI5KMvnaEqXe+YVe555R9nn6GPt404fos4wcgpw12SDA== -acorn@^8.14.0, acorn@^8.4.1: +acorn@^8.14.0: version "8.14.0" - resolved "https://registry.npmjs.org/acorn/-/acorn-8.14.0.tgz" + resolved "https://registry.yarnpkg.com/acorn/-/acorn-8.14.0.tgz#063e2c70cac5fb4f6467f0b11152e04c682795b0" integrity sha512-cl669nCJTZBsL97OF4kUQm5g5hC2uihk0NxY3WENAC0TYdILVkAyHymAntgxGkl7K+t0cXIrH5siy5S4XkFycA== +acorn@^8.15.0: + version "8.15.0" + resolved "https://registry.yarnpkg.com/acorn/-/acorn-8.15.0.tgz#a360898bc415edaac46c8241f6383975b930b816" + integrity sha512-NZyJarBfL7nWwIq+FDL6Zp/yHEhePMNnnJ0y3qfieCrmNvYct8uvtiV41UvlSe6apAfk0fY1FbWx+NwfmpvtTg== + +acorn@^8.4.1: + version "8.7.0" + resolved "https://registry.yarnpkg.com/acorn/-/acorn-8.7.0.tgz#90951fde0f8f09df93549481e5fc141445b791cf" + integrity sha512-V/LGr1APy+PXIwKebEWrkZPwoeoF+w1jiOBUmuxuiUIaOHtob8Qc9BTrYo7VuI5fR8tqsy+buA2WFooR5olqvQ== + aggregate-error@^3.0.0: version "3.1.0" - resolved "https://registry.npmjs.org/aggregate-error/-/aggregate-error-3.1.0.tgz" + resolved "https://registry.yarnpkg.com/aggregate-error/-/aggregate-error-3.1.0.tgz#92670ff50f5359bdb7a3e0d40d0ec30c5737687a" integrity sha512-4I7Td01quW/RpocfNayFdFVk1qSuoh0E7JrbRJ16nH01HhKFQ88INq9Sd+nd72zqRySlr9BmDA8xlEJ6vJMrYA== dependencies: clean-stack "^2.0.0" @@ -1052,7 +1067,7 @@ aggregate-error@^3.0.0: ajv@^6.12.4: version "6.12.6" - resolved "https://registry.npmjs.org/ajv/-/ajv-6.12.6.tgz" + resolved "https://registry.yarnpkg.com/ajv/-/ajv-6.12.6.tgz#baf5a62e802b07d977034586f8c3baf5adf26df4" integrity sha512-j3fVLgvTo527anyYyJOGTYJbG+vnnQYvE0m5mmkc1TK+nxAppkCLMIL0aZ4dblVCNoGShhm+kzE4ZUykBoMg4g== dependencies: fast-deep-equal "^3.1.1" @@ -1062,48 +1077,48 @@ ajv@^6.12.4: ansi-escapes@^4.2.1: version "4.3.2" - resolved "https://registry.npmjs.org/ansi-escapes/-/ansi-escapes-4.3.2.tgz" + resolved "https://registry.yarnpkg.com/ansi-escapes/-/ansi-escapes-4.3.2.tgz#6b2291d1db7d98b6521d5f1efa42d0f3a9feb65e" integrity sha512-gKXj5ALrKWQLsYG9jlTRmR/xKluxHV+Z9QEwNIgCfM1/uwPMCuzVVnh5mwTd+OuBZcwSIMbqssNWRm1lE51QaQ== dependencies: type-fest "^0.21.3" ansi-escapes@^7.0.0: version "7.0.0" - resolved "https://registry.npmjs.org/ansi-escapes/-/ansi-escapes-7.0.0.tgz" + resolved "https://registry.yarnpkg.com/ansi-escapes/-/ansi-escapes-7.0.0.tgz#00fc19f491bbb18e1d481b97868204f92109bfe7" integrity sha512-GdYO7a61mR0fOlAsvC9/rIHf7L96sBc6dEWzeOu+KAea5bZyQRPIpojrVoI4AXGJS/ycu/fBTdLrUkA4ODrvjw== dependencies: environment "^1.0.0" ansi-regex@^5.0.1: version "5.0.1" - resolved "https://registry.npmjs.org/ansi-regex/-/ansi-regex-5.0.1.tgz" + resolved "https://registry.yarnpkg.com/ansi-regex/-/ansi-regex-5.0.1.tgz#082cb2c89c9fe8659a311a53bd6a4dc5301db304" integrity sha512-quJQXlTSUGL2LH9SUXo8VwsY4soanhgo6LNSm84E1LBcE8s3O0wpdiRzyR9z/ZZJMlMWv37qOOb9pdJlMUEKFQ== ansi-regex@^6.1.0: version "6.1.0" - resolved "https://registry.npmjs.org/ansi-regex/-/ansi-regex-6.1.0.tgz" + resolved "https://registry.yarnpkg.com/ansi-regex/-/ansi-regex-6.1.0.tgz#95ec409c69619d6cb1b8b34f14b660ef28ebd654" integrity sha512-7HSX4QQb4CspciLpVFwyRe79O3xsIZDDLER21kERQ71oaPodF8jL725AgJMFAYbooIqolJoRLuM81SpeUkpkvA== ansi-styles@^4.0.0, ansi-styles@^4.1.0: version "4.3.0" - resolved "https://registry.npmjs.org/ansi-styles/-/ansi-styles-4.3.0.tgz" + resolved "https://registry.yarnpkg.com/ansi-styles/-/ansi-styles-4.3.0.tgz#edd803628ae71c04c85ae7a0906edad34b648937" integrity sha512-zbB9rCJAT1rbjiVDb2hqKFHNYLxgtk8NURxZ3IZwD3F6NtxbXZQCnnSi1Lkx+IDohdPlFp222wVALIheZJQSEg== dependencies: color-convert "^2.0.1" ansi-styles@^5.0.0: version "5.2.0" - resolved "https://registry.npmjs.org/ansi-styles/-/ansi-styles-5.2.0.tgz" + resolved "https://registry.yarnpkg.com/ansi-styles/-/ansi-styles-5.2.0.tgz#07449690ad45777d1924ac2abb2fc8895dba836b" integrity sha512-Cxwpt2SfTzTtXcfOlzGEee8O+c+MmUgGrNiBcXnuWxuFJHe6a5Hz7qwhwe5OgaSYI0IJvkLqWX1ASG+cJOkEiA== any-promise@^1.0.0: version "1.3.0" - resolved "https://registry.npmjs.org/any-promise/-/any-promise-1.3.0.tgz" + resolved "https://registry.yarnpkg.com/any-promise/-/any-promise-1.3.0.tgz#abc6afeedcea52e809cdc0376aed3ce39635d17f" integrity sha512-7UvmKalWRt1wgjL1RrGxoSJW/0QZFIegpeGvZG9kjp8vrRu55XTHbwnqq2GpXm9uLbcuhxm3IqX9OB4MZR1b2A== anymatch@^3.0.3: version "3.1.3" - resolved "https://registry.npmjs.org/anymatch/-/anymatch-3.1.3.tgz" + resolved "https://registry.yarnpkg.com/anymatch/-/anymatch-3.1.3.tgz#790c58b19ba1720a84205b57c618d5ad8524973e" integrity sha512-KMReFUr0B4t+D+OBkjR3KYqvocp2XaSzO55UcB6mgQMd3KbcE+mWTyvVV7D/zsdEbNnV6acZUutkiHQXvTr1Rw== dependencies: normalize-path "^3.0.0" @@ -1111,24 +1126,24 @@ anymatch@^3.0.3: arg@^4.1.0: version "4.1.3" - resolved "https://registry.npmjs.org/arg/-/arg-4.1.3.tgz" + resolved "https://registry.yarnpkg.com/arg/-/arg-4.1.3.tgz#269fc7ad5b8e42cb63c896d5666017261c144089" integrity sha512-58S9QDqG0Xx27YwPSt9fJxivjYl432YCwfDMfZ+71RAqUrZef7LrKQZ3LHLOwCS4FLNBplP533Zx895SeOCHvA== argparse@^1.0.7: version "1.0.10" - resolved "https://registry.npmjs.org/argparse/-/argparse-1.0.10.tgz" + resolved "https://registry.yarnpkg.com/argparse/-/argparse-1.0.10.tgz#bcd6791ea5ae09725e17e5ad988134cd40b3d911" integrity sha512-o5Roy6tNG4SL/FOkCAN6RzjiakZS25RLYFrcMttJqbdd8BWrnA+fGz57iN5Pb06pvBGvl5gQ0B48dJlslXvoTg== dependencies: sprintf-js "~1.0.2" argparse@^2.0.1: version "2.0.1" - resolved "https://registry.npmjs.org/argparse/-/argparse-2.0.1.tgz" + resolved "https://registry.yarnpkg.com/argparse/-/argparse-2.0.1.tgz#246f50f3ca78a3240f6c997e8a9bd1eac49e4b38" integrity sha512-8+9WqebbFzpX9OR+Wa6O29asIogeRMzcGtAINdpMHHyAg10f05aSFVBbcEqGf/PXw1EjAZ+q2/bEBg3DvurK3Q== babel-jest@^29.7.0: version "29.7.0" - resolved "https://registry.npmjs.org/babel-jest/-/babel-jest-29.7.0.tgz" + resolved "https://registry.yarnpkg.com/babel-jest/-/babel-jest-29.7.0.tgz#f4369919225b684c56085998ac63dbd05be020d5" integrity sha512-BrvGY3xZSwEcCzKvKsCi2GgHqDqsYkOP4/by5xCgIwGXQxIEh+8ew3gmrE1y7XRR6LHZIj6yLYnUi/mm2KXKBg== dependencies: "@jest/transform" "^29.7.0" @@ -1141,7 +1156,7 @@ babel-jest@^29.7.0: babel-plugin-istanbul@^6.1.1: version "6.1.1" - resolved "https://registry.npmjs.org/babel-plugin-istanbul/-/babel-plugin-istanbul-6.1.1.tgz" + resolved "https://registry.yarnpkg.com/babel-plugin-istanbul/-/babel-plugin-istanbul-6.1.1.tgz#fa88ec59232fd9b4e36dbbc540a8ec9a9b47da73" integrity sha512-Y1IQok9821cC9onCx5otgFfRm7Lm+I+wwxOx738M/WLPZ9Q42m4IG5W0FNX8WLL2gYMZo3JkuXIH2DOpWM+qwA== dependencies: "@babel/helper-plugin-utils" "^7.0.0" @@ -1152,7 +1167,7 @@ babel-plugin-istanbul@^6.1.1: babel-plugin-jest-hoist@^29.6.3: version "29.6.3" - resolved "https://registry.npmjs.org/babel-plugin-jest-hoist/-/babel-plugin-jest-hoist-29.6.3.tgz" + resolved "https://registry.yarnpkg.com/babel-plugin-jest-hoist/-/babel-plugin-jest-hoist-29.6.3.tgz#aadbe943464182a8922c3c927c3067ff40d24626" integrity sha512-ESAc/RJvGTFEzRwOTT4+lNDk/GNHMkKbNzsvT0qKRfDyyYTskxB5rnU2njIDYVxXCBHHEI1c0YwHob3WaYujOg== dependencies: "@babel/template" "^7.3.3" @@ -1161,26 +1176,29 @@ babel-plugin-jest-hoist@^29.6.3: "@types/babel__traverse" "^7.0.6" babel-preset-current-node-syntax@^1.0.0: - version "1.0.1" - resolved "https://registry.npmjs.org/babel-preset-current-node-syntax/-/babel-preset-current-node-syntax-1.0.1.tgz" - integrity sha512-M7LQ0bxarkxQoN+vz5aJPsLBn77n8QgTFmo8WK0/44auK2xlCXrYcUxHFxgU7qW5Yzw/CjmLRK2uJzaCd7LvqQ== + version "1.2.0" + resolved "https://registry.yarnpkg.com/babel-preset-current-node-syntax/-/babel-preset-current-node-syntax-1.2.0.tgz#20730d6cdc7dda5d89401cab10ac6a32067acde6" + integrity sha512-E/VlAEzRrsLEb2+dv8yp3bo4scof3l9nR4lrld+Iy5NyVqgVYUJnDAmunkhPMisRI32Qc4iRiz425d8vM++2fg== dependencies: "@babel/plugin-syntax-async-generators" "^7.8.4" "@babel/plugin-syntax-bigint" "^7.8.3" - "@babel/plugin-syntax-class-properties" "^7.8.3" - "@babel/plugin-syntax-import-meta" "^7.8.3" + "@babel/plugin-syntax-class-properties" "^7.12.13" + "@babel/plugin-syntax-class-static-block" "^7.14.5" + "@babel/plugin-syntax-import-attributes" "^7.24.7" + "@babel/plugin-syntax-import-meta" "^7.10.4" "@babel/plugin-syntax-json-strings" "^7.8.3" - "@babel/plugin-syntax-logical-assignment-operators" "^7.8.3" + "@babel/plugin-syntax-logical-assignment-operators" "^7.10.4" "@babel/plugin-syntax-nullish-coalescing-operator" "^7.8.3" - "@babel/plugin-syntax-numeric-separator" "^7.8.3" + "@babel/plugin-syntax-numeric-separator" "^7.10.4" "@babel/plugin-syntax-object-rest-spread" "^7.8.3" "@babel/plugin-syntax-optional-catch-binding" "^7.8.3" "@babel/plugin-syntax-optional-chaining" "^7.8.3" - "@babel/plugin-syntax-top-level-await" "^7.8.3" + "@babel/plugin-syntax-private-property-in-object" "^7.14.5" + "@babel/plugin-syntax-top-level-await" "^7.14.5" babel-preset-jest@^29.6.3: version "29.6.3" - resolved "https://registry.npmjs.org/babel-preset-jest/-/babel-preset-jest-29.6.3.tgz" + resolved "https://registry.yarnpkg.com/babel-preset-jest/-/babel-preset-jest-29.6.3.tgz#fa05fa510e7d493896d7b0dd2033601c840f171c" integrity sha512-0B3bhxR6snWXJZtR/RliHTDPRgn1sNHOR0yVtq/IiQFyuOVjFS+wuio/R4gSNkyYmKmJB4wGZv2NZanmKmTnNA== dependencies: babel-plugin-jest-hoist "^29.6.3" @@ -1188,83 +1206,81 @@ babel-preset-jest@^29.6.3: balanced-match@^1.0.0: version "1.0.2" - resolved "https://registry.npmjs.org/balanced-match/-/balanced-match-1.0.2.tgz" + resolved "https://registry.yarnpkg.com/balanced-match/-/balanced-match-1.0.2.tgz#e83e3a7e3f300b34cb9d87f615fa0cbf357690ee" integrity sha512-3oSeUO0TMV67hN1AmbXsK4yaqU7tjiHlbxRDZOpH0KW9+CeX4bRAaX0Anxt0tx2MrpRpWwQaPwIlISEJhYU5Pw== -brace-expansion@^1.1.7: - version "1.1.11" - resolved "https://registry.npmjs.org/brace-expansion/-/brace-expansion-1.1.11.tgz" - integrity sha512-iCuPHDFgrHX7H2vEI/5xpz07zSHB00TpugqhmYtVmMO6518mCuRMoOYFldEBl0g187ufozdaHgWKcYFb61qGiA== - dependencies: - balanced-match "^1.0.0" - concat-map "0.0.1" +baseline-browser-mapping@^2.9.0: + version "2.9.14" + resolved "https://registry.yarnpkg.com/baseline-browser-mapping/-/baseline-browser-mapping-2.9.14.tgz#3b6af0bc032445bca04de58caa9a87cfe921cbb3" + integrity sha512-B0xUquLkiGLgHhpPBqvl7GWegWBUNuujQ6kXd/r1U38ElPT6Ok8KZ8e+FpUGEc2ZoRQUzq/aUnaKFc/svWUGSg== -brace-expansion@^2.0.1: - version "2.0.1" - resolved "https://registry.npmjs.org/brace-expansion/-/brace-expansion-2.0.1.tgz" - integrity sha512-XnAIvQ8eM+kC6aULx6wuQiwVsnzsi9d3WxzV3FpWTGA19F621kwdbsAcFKXgKUHZWsy+mY6iL1sHTxWEFCytDA== +brace-expansion@^2.0.2: + version "2.1.0" + resolved "https://registry.yarnpkg.com/brace-expansion/-/brace-expansion-2.1.0.tgz#4f41a41190216ee36067ec381526fe9539c4f0ae" + integrity sha512-TN1kCZAgdgweJhWWpgKYrQaMNHcDULHkWwQIspdtjV4Y5aurRdZpjAqn6yX3FPqTA9ngHCc4hJxMAMgGfve85w== dependencies: balanced-match "^1.0.0" braces@^3.0.3: version "3.0.3" - resolved "https://registry.npmjs.org/braces/-/braces-3.0.3.tgz" + resolved "https://registry.yarnpkg.com/braces/-/braces-3.0.3.tgz#490332f40919452272d55a8480adc0c441358789" integrity sha512-yQbXgO/OSZVD2IsiLlro+7Hf6Q18EJrKSEsdoMzKePKXct3gvD8oLcOQdIzGupr5Fj+EDe8gO/lxc1BzfMpxvA== dependencies: fill-range "^7.1.1" -browserslist@^4.22.2: - version "4.22.2" - resolved "https://registry.npmjs.org/browserslist/-/browserslist-4.22.2.tgz" - integrity sha512-0UgcrvQmBDvZHFGdYUehrCNIazki7/lUP3kkoi/r3YB2amZbFM9J43ZRkJTXBUZK4gmx56+Sqk9+Vs9mwZx9+A== +browserslist@^4.24.0: + version "4.28.1" + resolved "https://registry.yarnpkg.com/browserslist/-/browserslist-4.28.1.tgz#7f534594628c53c63101079e27e40de490456a95" + integrity sha512-ZC5Bd0LgJXgwGqUknZY/vkUQ04r8NXnJZ3yYi4vDmSiZmC/pdSN0NbNRPxZpbtO4uAfDUAFffO8IZoM3Gj8IkA== dependencies: - caniuse-lite "^1.0.30001565" - electron-to-chromium "^1.4.601" - node-releases "^2.0.14" - update-browserslist-db "^1.0.13" + baseline-browser-mapping "^2.9.0" + caniuse-lite "^1.0.30001759" + electron-to-chromium "^1.5.263" + node-releases "^2.0.27" + update-browserslist-db "^1.2.0" bs-logger@0.x: version "0.2.6" - resolved "https://registry.npmjs.org/bs-logger/-/bs-logger-0.2.6.tgz" + resolved "https://registry.yarnpkg.com/bs-logger/-/bs-logger-0.2.6.tgz#eb7d365307a72cf974cc6cda76b68354ad336bd8" integrity sha512-pd8DCoxmbgc7hyPKOvxtqNcjYoOsABPQdcCUjGp3d42VR2CX1ORhk2A87oqqu5R1kk+76nsxZupkmyd+MVtCog== dependencies: fast-json-stable-stringify "2.x" bser@2.1.1: version "2.1.1" - resolved "https://registry.npmjs.org/bser/-/bser-2.1.1.tgz" + resolved "https://registry.yarnpkg.com/bser/-/bser-2.1.1.tgz#e6787da20ece9d07998533cfd9de6f5c38f4bc05" integrity sha512-gQxTNE/GAfIIrmHLUE3oJyp5FO6HRBfhjnw4/wMmA63ZGDJnWBmgY/lyQBpnDUkGmAhbSe39tx2d/iTOAfglwQ== dependencies: node-int64 "^0.4.0" buffer-from@^1.0.0: version "1.1.2" - resolved "https://registry.npmjs.org/buffer-from/-/buffer-from-1.1.2.tgz" + resolved "https://registry.yarnpkg.com/buffer-from/-/buffer-from-1.1.2.tgz#2b146a6fd72e80b4f55d255f35ed59a3a9a41bd5" integrity sha512-E+XQCRwSbaaiChtv6k6Dwgc+bx+Bs6vuKJHHl5kox/BaKbhiXzqQOwK4cO22yElGp2OCmjwVhT3HmxgyPGnJfQ== callsites@^3.0.0: version "3.1.0" - resolved "https://registry.npmjs.org/callsites/-/callsites-3.1.0.tgz" + resolved "https://registry.yarnpkg.com/callsites/-/callsites-3.1.0.tgz#b3630abd8943432f54b3f0519238e33cd7df2f73" integrity sha512-P8BjAsXvZS+VIDUI11hHCQEv74YT67YUi5JJFNWIqL235sBmjX4+qx9Muvls5ivyNENctx46xQLQ3aTuE7ssaQ== camelcase@^5.3.1: version "5.3.1" - resolved "https://registry.npmjs.org/camelcase/-/camelcase-5.3.1.tgz" + resolved "https://registry.yarnpkg.com/camelcase/-/camelcase-5.3.1.tgz#e3c9b31569e106811df242f715725a1f4c494320" integrity sha512-L28STB170nwWS63UjtlEOE3dldQApaJXZkOI1uMFfzf3rRuPegHaHesyee+YxQ+W6SvRDQV6UrdOdRiR153wJg== camelcase@^6.2.0: version "6.3.0" - resolved "https://registry.npmjs.org/camelcase/-/camelcase-6.3.0.tgz" + resolved "https://registry.yarnpkg.com/camelcase/-/camelcase-6.3.0.tgz#5685b95eb209ac9c0c177467778c9c84df58ba9a" integrity sha512-Gmy6FhYlCY7uOElZUSbxo2UCDH8owEk996gkbrpsgGtrJLM3J7jGxl9Ic7Qwwj4ivOE5AWZWRMecDdF7hqGjFA== -caniuse-lite@^1.0.30001565: - version "1.0.30001570" - resolved "https://registry.npmjs.org/caniuse-lite/-/caniuse-lite-1.0.30001570.tgz" - integrity sha512-+3e0ASu4sw1SWaoCtvPeyXp+5PsjigkSt8OXZbF9StH5pQWbxEjLAZE3n8Aup5udop1uRiKA7a4utUk/uoSpUw== +caniuse-lite@^1.0.30001759: + version "1.0.30001764" + resolved "https://registry.yarnpkg.com/caniuse-lite/-/caniuse-lite-1.0.30001764.tgz#03206c56469f236103b90f9ae10bcb8b9e1f6005" + integrity sha512-9JGuzl2M+vPL+pz70gtMF9sHdMFbY9FJaQBi186cHKH3pSzDvzoUJUPV6fqiKIMyXbud9ZLg4F3Yza1vJ1+93g== chalk@^4.0.0, chalk@^4.1.2: version "4.1.2" - resolved "https://registry.npmjs.org/chalk/-/chalk-4.1.2.tgz" + resolved "https://registry.yarnpkg.com/chalk/-/chalk-4.1.2.tgz#aac4e2b7734a740867aeb16bf02aad556a1e7a01" integrity sha512-oKnbhFyRIXpUuez8iBMmyEa4nbj4IOQyuhc/wy9kY7/WVPcwIO9VA668Pu8RkO7+0G76SLROeyw9CpQ061i4mA== dependencies: ansi-styles "^4.1.0" @@ -1272,32 +1288,37 @@ chalk@^4.0.0, chalk@^4.1.2: chalk@^5.3.0: version "5.3.0" - resolved "https://registry.npmjs.org/chalk/-/chalk-5.3.0.tgz" + resolved "https://registry.yarnpkg.com/chalk/-/chalk-5.3.0.tgz#67c20a7ebef70e7f3970a01f90fa210cb6860385" integrity sha512-dLitG79d+GV1Nb/VYcCDFivJeK1hiukt9QjRNVOsUtTy1rR1YJsmpGGTZ3qJos+uw7WmWF4wUwBd9jxjocFC2w== char-regex@^1.0.2: version "1.0.2" - resolved "https://registry.npmjs.org/char-regex/-/char-regex-1.0.2.tgz" + resolved "https://registry.yarnpkg.com/char-regex/-/char-regex-1.0.2.tgz#d744358226217f981ed58f479b1d6bcc29545dcf" integrity sha512-kWWXztvZ5SBQV+eRgKFeh8q5sLuZY2+8WUIzlxWVTg+oGwY14qylx1KbKzHd8P6ZYkAg0xyIDU9JMHhyJMZ1jw== ci-info@^3.2.0: version "3.9.0" - resolved "https://registry.npmjs.org/ci-info/-/ci-info-3.9.0.tgz" + resolved "https://registry.yarnpkg.com/ci-info/-/ci-info-3.9.0.tgz#4279a62028a7b1f262f3473fc9605f5e218c59b4" integrity sha512-NIxF55hv4nSqQswkAeiOi1r83xy8JldOFDTWiug55KBu9Jnblncd2U6ViHmYgHf01TPZS77NJBhBMKdWj9HQMQ== -cjs-module-lexer@^1.0.0, cjs-module-lexer@^1.2.3: +cjs-module-lexer@^1.0.0: + version "1.2.3" + resolved "https://registry.yarnpkg.com/cjs-module-lexer/-/cjs-module-lexer-1.2.3.tgz#6c370ab19f8a3394e318fe682686ec0ac684d107" + integrity sha512-0TNiGstbQmCFwt4akjjBg5pLRTSyj/PkWQ1ZoO2zntmg9yLqSRxwEa4iCfQLGjqhiqBfOJa7W/E8wfGrTDmlZQ== + +cjs-module-lexer@^1.2.3: version "1.4.1" - resolved "https://registry.npmjs.org/cjs-module-lexer/-/cjs-module-lexer-1.4.1.tgz" + resolved "https://registry.yarnpkg.com/cjs-module-lexer/-/cjs-module-lexer-1.4.1.tgz#707413784dbb3a72aa11c2f2b042a0bef4004170" integrity sha512-cuSVIHi9/9E/+821Qjdvngor+xpnlwnuwIyZOaLmHBVdXL+gP+I6QQB9VkO7RI77YIcTV+S1W9AreJ5eN63JBA== clean-stack@^2.0.0: version "2.2.0" - resolved "https://registry.npmjs.org/clean-stack/-/clean-stack-2.2.0.tgz" + resolved "https://registry.yarnpkg.com/clean-stack/-/clean-stack-2.2.0.tgz#ee8472dbb129e727b31e8a10a427dee9dfe4008b" integrity sha512-4diC9HaTE+KRAMWhDhrGOECgWZxoevMc5TlkObMqNSsVU62PYzXZ/SMTjzyGAFF1YusgxGcSWTEXBhp0CPwQ1A== cli-highlight@^2.1.11: version "2.1.11" - resolved "https://registry.npmjs.org/cli-highlight/-/cli-highlight-2.1.11.tgz" + resolved "https://registry.yarnpkg.com/cli-highlight/-/cli-highlight-2.1.11.tgz#49736fa452f0aaf4fae580e30acb26828d2dc1bf" integrity sha512-9KDcoEVwyUXrjcJNvHD0NFc/hiwe/WPVYIleQh2O1N2Zro5gWJZ/K+3DGn8w8P/F6FxOgzyC5bxDyHIgCSPhGg== dependencies: chalk "^4.0.0" @@ -1309,7 +1330,7 @@ cli-highlight@^2.1.11: cli-table3@^0.6.3, cli-table3@^0.6.5: version "0.6.5" - resolved "https://registry.npmjs.org/cli-table3/-/cli-table3-0.6.5.tgz" + resolved "https://registry.yarnpkg.com/cli-table3/-/cli-table3-0.6.5.tgz#013b91351762739c16a9567c21a04632e449bf2f" integrity sha512-+W/5efTR7y5HRD7gACw9yQjqMVvEMLBHmboM/kPWam+H+Hmyrgjh6YncVKK122YZkXrLudzTuAukUw9FnMf7IQ== dependencies: string-width "^4.2.0" @@ -1318,7 +1339,7 @@ cli-table3@^0.6.3, cli-table3@^0.6.5: cliui@^7.0.2: version "7.0.4" - resolved "https://registry.npmjs.org/cliui/-/cliui-7.0.4.tgz" + resolved "https://registry.yarnpkg.com/cliui/-/cliui-7.0.4.tgz#a0265ee655476fc807aea9df3df8df7783808b4f" integrity sha512-OcRE68cOsVMXp1Yvonl/fzkQOyjLSu/8bhPDfQt0e0/Eb283TKP20Fs2MqoPsr9SwA595rRCA+QMzYc9nBP+JQ== dependencies: string-width "^4.2.0" @@ -1327,7 +1348,7 @@ cliui@^7.0.2: cliui@^8.0.1: version "8.0.1" - resolved "https://registry.npmjs.org/cliui/-/cliui-8.0.1.tgz" + resolved "https://registry.yarnpkg.com/cliui/-/cliui-8.0.1.tgz#0c04b075db02cbfe60dc8e6cf2f5486b1a3608aa" integrity sha512-BSeNnyus75C4//NQ9gQt1/csTXyo/8Sb+afLAkzAptFuMsod9HFokGNudZpi/oQV73hnVK+sR+5PVRMd+Dr7YQ== dependencies: string-width "^4.2.0" @@ -1336,44 +1357,39 @@ cliui@^8.0.1: co@^4.6.0: version "4.6.0" - resolved "https://registry.npmjs.org/co/-/co-4.6.0.tgz" + resolved "https://registry.yarnpkg.com/co/-/co-4.6.0.tgz#6ea6bdf3d853ae54ccb8e47bfa0bf3f9031fb184" integrity sha512-QVb0dM5HvG+uaxitm8wONl7jltx8dqhfU33DcqtOZcLSVIKSDDLDi7+0LbAKiyI8hD9u42m2YxXSkMGWThaecQ== collect-v8-coverage@^1.0.0: version "1.0.2" - resolved "https://registry.npmjs.org/collect-v8-coverage/-/collect-v8-coverage-1.0.2.tgz" + resolved "https://registry.yarnpkg.com/collect-v8-coverage/-/collect-v8-coverage-1.0.2.tgz#c0b29bcd33bcd0779a1344c2136051e6afd3d9e9" integrity sha512-lHl4d5/ONEbLlJvaJNtsF/Lz+WvB07u2ycqTYbdrq7UypDXailES4valYb2eWiJFxZlVmpGekfqoxQhzyFdT4Q== color-convert@^2.0.1: version "2.0.1" - resolved "https://registry.npmjs.org/color-convert/-/color-convert-2.0.1.tgz" + resolved "https://registry.yarnpkg.com/color-convert/-/color-convert-2.0.1.tgz#72d3a68d598c9bdb3af2ad1e84f21d896abd4de3" integrity sha512-RRECPsj7iu/xb5oKYcsFHSppFNnsj/52OVTRKb4zP5onXwVF3zVmmToNcOfGC+CRDpfK/U584fMg38ZHCaElKQ== dependencies: color-name "~1.1.4" color-name@~1.1.4: version "1.1.4" - resolved "https://registry.npmjs.org/color-name/-/color-name-1.1.4.tgz" + resolved "https://registry.yarnpkg.com/color-name/-/color-name-1.1.4.tgz#c2a09a87acbde69543de6f63fa3995c826c536a2" integrity sha512-dOy+3AuW3a2wNbZHIuMZpTcgjGuLU/uBL/ubcZF9OXbDo8ff4O8yVp5Bf0efS8uEoYo5q4Fx7dY9OgQGXgAsQA== commander@^10.0.1: version "10.0.1" - resolved "https://registry.npmjs.org/commander/-/commander-10.0.1.tgz" + resolved "https://registry.yarnpkg.com/commander/-/commander-10.0.1.tgz#881ee46b4f77d1c1dccc5823433aa39b022cbe06" integrity sha512-y4Mg2tXshplEbSGzx7amzPwKKOCGuoSRP/CjEdwwk0FOGlUbq6lKuoyDZTNZkmxHdJtp54hdfY/JUrdL7Xfdug== -concat-map@0.0.1: - version "0.0.1" - resolved "https://registry.npmjs.org/concat-map/-/concat-map-0.0.1.tgz" - integrity sha512-/Srv4dswyQNBfohGpz9o6Yb3Gz3SrUDqBH5rTuhGR7ahtlbYKnVxw2bCFMRljaA7EXHaXZ8wsHdodFvbkhKmqg== - convert-source-map@^2.0.0: version "2.0.0" - resolved "https://registry.npmjs.org/convert-source-map/-/convert-source-map-2.0.0.tgz" + resolved "https://registry.yarnpkg.com/convert-source-map/-/convert-source-map-2.0.0.tgz#4b560f649fc4e918dd0ab75cf4961e8bc882d82a" integrity sha512-Kvp459HrV2FEJ1CAsi1Ku+MY3kasH19TFykTz2xWmMeq6bk2NU3XXvfJ+Q61m0xktWwt+1HSYf3JZsTms3aRJg== create-jest@^29.7.0: version "29.7.0" - resolved "https://registry.npmjs.org/create-jest/-/create-jest-29.7.0.tgz" + resolved "https://registry.yarnpkg.com/create-jest/-/create-jest-29.7.0.tgz#a355c5b3cb1e1af02ba177fe7afd7feee49a5320" integrity sha512-Adz2bdH0Vq3F53KEMJOoftQFutWCukm6J24wbPWRO4k1kMY7gS7ds/uoJkNuV8wDCtWWnuwGcJwpWcih+zEW1Q== dependencies: "@jest/types" "^29.6.3" @@ -1386,158 +1402,167 @@ create-jest@^29.7.0: create-require@^1.1.0: version "1.1.1" - resolved "https://registry.npmjs.org/create-require/-/create-require-1.1.1.tgz" + resolved "https://registry.yarnpkg.com/create-require/-/create-require-1.1.1.tgz#c1d7e8f1e5f6cfc9ff65f9cd352d37348756c333" integrity sha512-dcKFX3jn0MpIaXjisoRvexIJVEKzaq7z2rZKxf+MSr9TkdmHmsU4m2lcLojrj/FHl8mk5VxMmYA+ftRkP/3oKQ== cross-spawn@^7.0.3, cross-spawn@^7.0.6: version "7.0.6" - resolved "https://registry.npmjs.org/cross-spawn/-/cross-spawn-7.0.6.tgz" + resolved "https://registry.yarnpkg.com/cross-spawn/-/cross-spawn-7.0.6.tgz#8a58fe78f00dcd70c370451759dfbfaf03e8ee9f" integrity sha512-uV2QOWP2nWzsy2aMp8aRibhi9dlzF5Hgh5SHaB9OiTGEyDTiJJyx0uy51QXdyWbtAHNua4XJzUKca3OzKUd3vA== dependencies: path-key "^3.1.0" shebang-command "^2.0.0" which "^2.0.1" -debug@^4.1.0, debug@^4.1.1, debug@^4.3.1, debug@^4.3.2, debug@^4.3.4, debug@^4.3.7: +debug@^4.1.0, debug@^4.1.1, debug@^4.3.1, debug@^4.3.2: + version "4.3.4" + resolved "https://registry.yarnpkg.com/debug/-/debug-4.3.4.tgz#1319f6579357f2338d3337d2cdd4914bb5dcc865" + integrity sha512-PRWFHuSU3eDtQJPvnNY7Jcket1j0t5OuOsFzPPzsekD52Zl8qUfFIPEiswXqIvHWGVHOgX+7G/vCNNhehwxfkQ== + dependencies: + ms "2.1.2" + +debug@^4.3.4, debug@^4.3.7: version "4.3.7" - resolved "https://registry.npmjs.org/debug/-/debug-4.3.7.tgz" + resolved "https://registry.yarnpkg.com/debug/-/debug-4.3.7.tgz#87945b4151a011d76d95a198d7111c865c360a52" integrity sha512-Er2nc/H7RrMXZBFCEim6TCmMk02Z8vLC2Rbi1KEBggpo0fS6l0S1nnapwmIi3yW/+GOJap1Krg4w0Hg80oCqgQ== dependencies: ms "^2.1.3" dedent@^1.0.0: version "1.5.1" - resolved "https://registry.npmjs.org/dedent/-/dedent-1.5.1.tgz" + resolved "https://registry.yarnpkg.com/dedent/-/dedent-1.5.1.tgz#4f3fc94c8b711e9bb2800d185cd6ad20f2a90aff" integrity sha512-+LxW+KLWxu3HW3M2w2ympwtqPrqYRzU8fqi6Fhd18fBALe15blJPI/I4+UHveMVG6lJqB4JNd4UG0S5cnVHwIg== deep-is@^0.1.3: version "0.1.4" - resolved "https://registry.npmjs.org/deep-is/-/deep-is-0.1.4.tgz" + resolved "https://registry.yarnpkg.com/deep-is/-/deep-is-0.1.4.tgz#a6f2dce612fadd2ef1f519b73551f17e85199831" integrity sha512-oIPzksmTg4/MriiaYGO+okXDT7ztn/w3Eptv/+gSIdMdKsJo0u4CfYNFJPy+4SKMuCqGw2wxnA+URMg3t8a/bQ== deepmerge@^4.2.2: version "4.3.1" - resolved "https://registry.npmjs.org/deepmerge/-/deepmerge-4.3.1.tgz" + resolved "https://registry.yarnpkg.com/deepmerge/-/deepmerge-4.3.1.tgz#44b5f2147cd3b00d4b56137685966f26fd25dd4a" integrity sha512-3sUqbMEc77XqpdNO7FRyRog+eW3ph+GYCbj+rK+uYyRMuwsVy0rMiVtPn+QJlKFvWP/1PYpapqYn0Me2knFn+A== detect-newline@^3.0.0: version "3.1.0" - resolved "https://registry.npmjs.org/detect-newline/-/detect-newline-3.1.0.tgz" + resolved "https://registry.yarnpkg.com/detect-newline/-/detect-newline-3.1.0.tgz#576f5dfc63ae1a192ff192d8ad3af6308991b651" integrity sha512-TLz+x/vEXm/Y7P7wn1EJFNLxYpUD4TgMosxY6fAVJUnJMbupHBOncxyWUG9OpTaH9EBD7uFI5LfEgmMOc54DsA== diff-sequences@^29.6.3: version "29.6.3" - resolved "https://registry.npmjs.org/diff-sequences/-/diff-sequences-29.6.3.tgz" + resolved "https://registry.yarnpkg.com/diff-sequences/-/diff-sequences-29.6.3.tgz#4deaf894d11407c51efc8418012f9e70b84ea921" integrity sha512-EjePK1srD3P08o2j4f0ExnylqRs5B9tJjcp9t1krH2qRi8CCdsYfwe9JgSLurFBWwq4uOlipzfk5fHNvwFKr8Q== diff@^4.0.1: version "4.0.2" - resolved "https://registry.npmjs.org/diff/-/diff-4.0.2.tgz" + resolved "https://registry.yarnpkg.com/diff/-/diff-4.0.2.tgz#60f3aecb89d5fae520c11aa19efc2bb982aade7d" integrity sha512-58lmxKSA4BNyLz+HHMUzlOEpg09FV+ev6ZMe3vJihgdxzgcwZ8VoEEPmALCZG9LmqfVoNMMKpttIYTVG6uDY7A== -electron-to-chromium@^1.4.601: - version "1.4.614" - resolved "https://registry.npmjs.org/electron-to-chromium/-/electron-to-chromium-1.4.614.tgz" - integrity sha512-X4ze/9Sc3QWs6h92yerwqv7aB/uU8vCjZcrMjA8N9R1pjMFRe44dLsck5FzLilOYvcXuDn93B+bpGYyufc70gQ== +electron-to-chromium@^1.5.263: + version "1.5.267" + resolved "https://registry.yarnpkg.com/electron-to-chromium/-/electron-to-chromium-1.5.267.tgz#5d84f2df8cdb6bfe7e873706bb21bd4bfb574dc7" + integrity sha512-0Drusm6MVRXSOJpGbaSVgcQsuB4hEkMpHXaVstcPmhu5LIedxs1xNK/nIxmQIU/RPC0+1/o0AVZfBTkTNJOdUw== emittery@^0.13.1: version "0.13.1" - resolved "https://registry.npmjs.org/emittery/-/emittery-0.13.1.tgz" + resolved "https://registry.yarnpkg.com/emittery/-/emittery-0.13.1.tgz#c04b8c3457490e0847ae51fced3af52d338e3dad" integrity sha512-DeWwawk6r5yR9jFgnDKYt4sLS0LmHJJi3ZOnb5/JdbYwj3nW+FxQnHIjhBKz8YLC7oRNPVM9NQ47I3CVx34eqQ== emoji-regex@^8.0.0: version "8.0.0" - resolved "https://registry.npmjs.org/emoji-regex/-/emoji-regex-8.0.0.tgz" + resolved "https://registry.yarnpkg.com/emoji-regex/-/emoji-regex-8.0.0.tgz#e818fd69ce5ccfcb404594f842963bf53164cc37" integrity sha512-MSjYzcWNOA0ewAHpz0MxpYFvwg6yjy1NG3xteoqz644VCo/RPgnr1/GGt+ic3iJTzQ8Eu3TdM14SawnVUmGE6A== emojilib@^2.4.0: version "2.4.0" - resolved "https://registry.npmjs.org/emojilib/-/emojilib-2.4.0.tgz" + resolved "https://registry.yarnpkg.com/emojilib/-/emojilib-2.4.0.tgz#ac518a8bb0d5f76dda57289ccb2fdf9d39ae721e" integrity sha512-5U0rVMU5Y2n2+ykNLQqMoqklN9ICBT/KsvC1Gz6vqHbz2AXXGkG+Pm5rMWk/8Vjrr/mY9985Hi8DYzn1F09Nyw== environment@^1.0.0: version "1.1.0" - resolved "https://registry.npmjs.org/environment/-/environment-1.1.0.tgz" + resolved "https://registry.yarnpkg.com/environment/-/environment-1.1.0.tgz#8e86c66b180f363c7ab311787e0259665f45a9f1" integrity sha512-xUtoPkMggbz0MPyPiIWr1Kp4aeWJjDZ6SMvURhimjdZgsRuDplF5/s9hcgGhyXMhs+6vpnuoiZ2kFiu3FMnS8Q== error-ex@^1.3.1: version "1.3.2" - resolved "https://registry.npmjs.org/error-ex/-/error-ex-1.3.2.tgz" + resolved "https://registry.yarnpkg.com/error-ex/-/error-ex-1.3.2.tgz#b4ac40648107fdcdcfae242f428bea8a14d4f1bf" integrity sha512-7dFHNmqeFSEt2ZBsCriorKnn3Z2pj+fd9kmI6QoWw4//DL+icEBfc0U7qJCisqrTsKTjw4fNFy2pW9OqStD84g== dependencies: is-arrayish "^0.2.1" escalade@^3.1.1: version "3.1.1" - resolved "https://registry.npmjs.org/escalade/-/escalade-3.1.1.tgz" + resolved "https://registry.yarnpkg.com/escalade/-/escalade-3.1.1.tgz#d8cfdc7000965c5a0174b4a82eaa5c0552742e40" integrity sha512-k0er2gUkLf8O0zKJiAhmkTnJlTvINGv7ygDNPbeIsX/TJjGJZHuh9B2UxbsaEkmlEo9MfhrSzmhIlhRlI2GXnw== +escalade@^3.2.0: + version "3.2.0" + resolved "https://registry.yarnpkg.com/escalade/-/escalade-3.2.0.tgz#011a3f69856ba189dffa7dc8fcce99d2a87903e5" + integrity sha512-WUj2qlxaQtO4g6Pq5c29GTcWGDyd8itL8zTlipgECz3JesAiiOKotd8JU6otB3PACgG6xkJUyVhboMS+bje/jA== + escape-string-regexp@^2.0.0: version "2.0.0" - resolved "https://registry.npmjs.org/escape-string-regexp/-/escape-string-regexp-2.0.0.tgz" + resolved "https://registry.yarnpkg.com/escape-string-regexp/-/escape-string-regexp-2.0.0.tgz#a30304e99daa32e23b2fd20f51babd07cffca344" integrity sha512-UpzcLCXolUWcNu5HtVMHYdXJjArjsF9C0aNnquZYY4uW/Vu0miy5YoWvbV345HauVvcAUnpRuhMMcqTcGOY2+w== escape-string-regexp@^4.0.0: version "4.0.0" - resolved "https://registry.npmjs.org/escape-string-regexp/-/escape-string-regexp-4.0.0.tgz" + resolved "https://registry.yarnpkg.com/escape-string-regexp/-/escape-string-regexp-4.0.0.tgz#14ba83a5d373e3d311e5afca29cf5bfad965bf34" integrity sha512-TtpcNJ3XAzx3Gq8sWRzJaVajRs0uVxA2YAkdb1jm2YkPz4G6egUFAyA3n5vtEIZefPk5Wa4UXbKuS5fKkJWdgA== -eslint-plugin-prettier@^5.4.1: - version "5.4.1" - resolved "https://registry.npmjs.org/eslint-plugin-prettier/-/eslint-plugin-prettier-5.4.1.tgz" - integrity sha512-9dF+KuU/Ilkq27A8idRP7N2DH8iUR6qXcjF3FR2wETY21PZdBrIjwCau8oboyGj9b7etWmTGEeM8e7oOed6ZWg== - dependencies: - prettier-linter-helpers "^1.0.0" - synckit "^0.11.7" - eslint-plugin-unused-imports@^4.1.4: version "4.1.4" - resolved "https://registry.npmjs.org/eslint-plugin-unused-imports/-/eslint-plugin-unused-imports-4.1.4.tgz" + resolved "https://registry.yarnpkg.com/eslint-plugin-unused-imports/-/eslint-plugin-unused-imports-4.1.4.tgz#62ddc7446ccbf9aa7b6f1f0b00a980423cda2738" integrity sha512-YptD6IzQjDardkl0POxnnRBhU1OEePMV0nd6siHaRBbd+lyh6NAhFEobiznKU7kTsSsDeSD62Pe7kAM1b7dAZQ== -eslint-scope@^8.2.0: - version "8.2.0" - resolved "https://registry.npmjs.org/eslint-scope/-/eslint-scope-8.2.0.tgz" - integrity sha512-PHlWUfG6lvPc3yvP5A4PNyBL1W8fkDUccmI21JUu/+GKZBoH/W5u6usENXUrWFRsyoW5ACUjFGgAFQp5gUlb/A== +eslint-scope@^8.4.0: + version "8.4.0" + resolved "https://registry.yarnpkg.com/eslint-scope/-/eslint-scope-8.4.0.tgz#88e646a207fad61436ffa39eb505147200655c82" + integrity sha512-sNXOfKCn74rt8RICKMvJS7XKV/Xk9kA7DyJr8mJik3S7Cwgy3qlkkmyS2uQB3jiJg6VNdZd/pDBJu0nvG2NlTg== dependencies: esrecurse "^4.3.0" estraverse "^5.2.0" -eslint-visitor-keys@^3.3.0: +eslint-visitor-keys@^3.3.0, eslint-visitor-keys@^3.4.3: version "3.4.3" - resolved "https://registry.npmjs.org/eslint-visitor-keys/-/eslint-visitor-keys-3.4.3.tgz" + resolved "https://registry.yarnpkg.com/eslint-visitor-keys/-/eslint-visitor-keys-3.4.3.tgz#0cd72fe8550e3c2eae156a96a4dddcd1c8ac5800" integrity sha512-wpc+LXeiyiisxPlEkUzU6svyS1frIO3Mgxj1fdy7Pm8Ygzguax2N3Fa/D/ag1WqbOprdI+uY6wMUl8/a2G+iag== eslint-visitor-keys@^4.2.0: version "4.2.0" - resolved "https://registry.npmjs.org/eslint-visitor-keys/-/eslint-visitor-keys-4.2.0.tgz" + resolved "https://registry.yarnpkg.com/eslint-visitor-keys/-/eslint-visitor-keys-4.2.0.tgz#687bacb2af884fcdda8a6e7d65c606f46a14cd45" integrity sha512-UyLnSehNt62FFhSwjZlHmeokpRK59rcz29j+F1/aDgbkbRTk7wIc9XzdoasMUbRNKDM0qQt/+BJ4BrpFeABemw== -eslint@^9.20.1: - version "9.20.1" - resolved "https://registry.npmjs.org/eslint/-/eslint-9.20.1.tgz" - integrity sha512-m1mM33o6dBUjxl2qb6wv6nGNwCAsns1eKtaQ4l/NPHeTvhiUPbtdfMyktxN4B3fgHIgsYh1VT3V9txblpQHq+g== +eslint-visitor-keys@^4.2.1: + version "4.2.1" + resolved "https://registry.yarnpkg.com/eslint-visitor-keys/-/eslint-visitor-keys-4.2.1.tgz#4cfea60fe7dd0ad8e816e1ed026c1d5251b512c1" + integrity sha512-Uhdk5sfqcee/9H/rCOJikYz67o0a2Tw2hGRPOG2Y1R2dg7brRe1uG0yaNQDHu+TO/uQPF/5eCapvYSmHUjt7JQ== + +eslint@^9.39.1: + version "9.39.1" + resolved "https://registry.yarnpkg.com/eslint/-/eslint-9.39.1.tgz#be8bf7c6de77dcc4252b5a8dcb31c2efff74a6e5" + integrity sha512-BhHmn2yNOFA9H9JmmIVKJmd288g9hrVRDkdoIgRCRuSySRUHH7r/DI6aAXW9T1WwUuY3DFgrcaqB+deURBLR5g== dependencies: - "@eslint-community/eslint-utils" "^4.2.0" + "@eslint-community/eslint-utils" "^4.8.0" "@eslint-community/regexpp" "^4.12.1" - "@eslint/config-array" "^0.19.0" - "@eslint/core" "^0.11.0" - "@eslint/eslintrc" "^3.2.0" - "@eslint/js" "9.20.0" - "@eslint/plugin-kit" "^0.2.5" + "@eslint/config-array" "^0.21.1" + "@eslint/config-helpers" "^0.4.2" + "@eslint/core" "^0.17.0" + "@eslint/eslintrc" "^3.3.1" + "@eslint/js" "9.39.1" + "@eslint/plugin-kit" "^0.4.1" "@humanfs/node" "^0.16.6" "@humanwhocodes/module-importer" "^1.0.1" - "@humanwhocodes/retry" "^0.4.1" + "@humanwhocodes/retry" "^0.4.2" "@types/estree" "^1.0.6" - "@types/json-schema" "^7.0.15" ajv "^6.12.4" chalk "^4.0.0" cross-spawn "^7.0.6" debug "^4.3.2" escape-string-regexp "^4.0.0" - eslint-scope "^8.2.0" - eslint-visitor-keys "^4.2.0" - espree "^10.3.0" + eslint-scope "^8.4.0" + eslint-visitor-keys "^4.2.1" + espree "^10.4.0" esquery "^1.5.0" esutils "^2.0.2" fast-deep-equal "^3.1.3" @@ -1553,47 +1578,56 @@ eslint@^9.20.1: natural-compare "^1.4.0" optionator "^0.9.3" -espree@^10.0.1, espree@^10.3.0: +espree@^10.0.1: version "10.3.0" - resolved "https://registry.npmjs.org/espree/-/espree-10.3.0.tgz" + resolved "https://registry.yarnpkg.com/espree/-/espree-10.3.0.tgz#29267cf5b0cb98735b65e64ba07e0ed49d1eed8a" integrity sha512-0QYC8b24HWY8zjRnDTL6RiHfDbAWn63qb4LMj1Z4b076A4une81+z03Kg7l7mn/48PUTqoLptSXez8oknU8Clg== dependencies: acorn "^8.14.0" acorn-jsx "^5.3.2" eslint-visitor-keys "^4.2.0" +espree@^10.4.0: + version "10.4.0" + resolved "https://registry.yarnpkg.com/espree/-/espree-10.4.0.tgz#d54f4949d4629005a1fa168d937c3ff1f7e2a837" + integrity sha512-j6PAQ2uUr79PZhBjP5C5fhl8e39FmRnOjsD5lGnWrFU8i2G776tBK7+nP8KuQUTTyAZUwfQqXAgrVH5MbH9CYQ== + dependencies: + acorn "^8.15.0" + acorn-jsx "^5.3.2" + eslint-visitor-keys "^4.2.1" + esprima@^4.0.0: version "4.0.1" - resolved "https://registry.npmjs.org/esprima/-/esprima-4.0.1.tgz" + resolved "https://registry.yarnpkg.com/esprima/-/esprima-4.0.1.tgz#13b04cdb3e6c5d19df91ab6987a8695619b0aa71" integrity sha512-eGuFFw7Upda+g4p+QHvnW0RyTX/SVeJBDM/gCtMARO0cLuT2HcEKnTPvhjV6aGeqrCB/sbNop0Kszm0jsaWU4A== esquery@^1.5.0: version "1.6.0" - resolved "https://registry.npmjs.org/esquery/-/esquery-1.6.0.tgz" + resolved "https://registry.yarnpkg.com/esquery/-/esquery-1.6.0.tgz#91419234f804d852a82dceec3e16cdc22cf9dae7" integrity sha512-ca9pw9fomFcKPvFLXhBKUK90ZvGibiGOvRJNbjljY7s7uq/5YO4BOzcYtJqExdx99rF6aAcnRxHmcUHcz6sQsg== dependencies: estraverse "^5.1.0" esrecurse@^4.3.0: version "4.3.0" - resolved "https://registry.npmjs.org/esrecurse/-/esrecurse-4.3.0.tgz" + resolved "https://registry.yarnpkg.com/esrecurse/-/esrecurse-4.3.0.tgz#7ad7964d679abb28bee72cec63758b1c5d2c9921" integrity sha512-KmfKL3b6G+RXvP8N1vr3Tq1kL/oCFgn2NYXEtqP8/L3pKapUA4G8cFVaoF3SU323CD4XypR/ffioHmkti6/Tag== dependencies: estraverse "^5.2.0" estraverse@^5.1.0, estraverse@^5.2.0: version "5.3.0" - resolved "https://registry.npmjs.org/estraverse/-/estraverse-5.3.0.tgz" + resolved "https://registry.yarnpkg.com/estraverse/-/estraverse-5.3.0.tgz#2eea5290702f26ab8fe5370370ff86c965d21123" integrity sha512-MMdARuVEQziNTeJD8DgMqmhwR11BRQ/cBP+pLtYdSTnf3MIO8fFeiINEbX36ZdNlfU/7A9f3gUw49B3oQsvwBA== esutils@^2.0.2: version "2.0.3" - resolved "https://registry.npmjs.org/esutils/-/esutils-2.0.3.tgz" + resolved "https://registry.yarnpkg.com/esutils/-/esutils-2.0.3.tgz#74d2eb4de0b8da1293711910d50775b9b710ef64" integrity sha512-kVscqXk4OCp68SZ0dkgEKVi6/8ij300KBWTJq32P/dYeWTSwK41WyTxalN1eRmA5Z9UU/LX9D7FWSmV9SAYx6g== execa@^5.0.0: version "5.1.1" - resolved "https://registry.npmjs.org/execa/-/execa-5.1.1.tgz" + resolved "https://registry.yarnpkg.com/execa/-/execa-5.1.1.tgz#f80ad9cbf4298f7bd1d4c9555c21e93741c411dd" integrity sha512-8uSpZZocAZRBAPIEINJj3Lo9HyGitllczc27Eh5YYojjMFMn8yHMDMaUHE2Jqfq05D/wucwI4JGURyXt1vchyg== dependencies: cross-spawn "^7.0.3" @@ -1608,12 +1642,12 @@ execa@^5.0.0: exit@^0.1.2: version "0.1.2" - resolved "https://registry.npmjs.org/exit/-/exit-0.1.2.tgz" + resolved "https://registry.yarnpkg.com/exit/-/exit-0.1.2.tgz#0632638f8d877cc82107d30a0fff1a17cba1cd0c" integrity sha512-Zk/eNKV2zbjpKzrsQ+n1G6poVbErQxJ0LBOJXaKZ1EViLzH+hrLu9cdXI4zw9dBQJslwBEpbQ2P1oS7nDxs6jQ== expect@^29.0.0, expect@^29.7.0: version "29.7.0" - resolved "https://registry.npmjs.org/expect/-/expect-29.7.0.tgz" + resolved "https://registry.yarnpkg.com/expect/-/expect-29.7.0.tgz#578874590dcb3214514084c08115d8aee61e11bc" integrity sha512-2Zks0hf1VLFYI1kbh0I5jP3KHHyCHpkfyHBzsSXRFgl/Bg9mWYfMW8oD+PdMPlEwy5HNsR9JutYy6pMeOh61nw== dependencies: "@jest/expect-utils" "^29.7.0" @@ -1624,17 +1658,12 @@ expect@^29.0.0, expect@^29.7.0: fast-deep-equal@^3.1.1, fast-deep-equal@^3.1.3: version "3.1.3" - resolved "https://registry.npmjs.org/fast-deep-equal/-/fast-deep-equal-3.1.3.tgz" + resolved "https://registry.yarnpkg.com/fast-deep-equal/-/fast-deep-equal-3.1.3.tgz#3a7d56b559d6cbc3eb512325244e619a65c6c525" integrity sha512-f3qQ9oQy9j2AhBe/H9VC91wLmKBCCU/gDOnKNAYG5hswO7BLKj09Hc5HYNz9cGI++xlpDCIgDaitVs03ATR84Q== -fast-diff@^1.1.2: - version "1.3.0" - resolved "https://registry.npmjs.org/fast-diff/-/fast-diff-1.3.0.tgz" - integrity sha512-VxPP4NqbUjj6MaAOafWeUn2cXWLcCtljklUtZf0Ind4XQ+QPtmA0b18zZy0jIQx+ExRVCR/ZQpBmik5lXshNsw== - fast-glob@^3.3.2: version "3.3.2" - resolved "https://registry.npmjs.org/fast-glob/-/fast-glob-3.3.2.tgz" + resolved "https://registry.yarnpkg.com/fast-glob/-/fast-glob-3.3.2.tgz#a904501e57cfdd2ffcded45e99a54fef55e46129" integrity sha512-oX2ruAFQwf/Orj8m737Y5adxDQO0LAB7/S5MnxCdTNDd4p6BsyIVsv9JQsATbTSq8KHRpLwIHbVlUNatxd+1Ow== dependencies: "@nodelib/fs.stat" "^2.0.2" @@ -1645,50 +1674,50 @@ fast-glob@^3.3.2: fast-json-stable-stringify@2.x, fast-json-stable-stringify@^2.0.0, fast-json-stable-stringify@^2.1.0: version "2.1.0" - resolved "https://registry.npmjs.org/fast-json-stable-stringify/-/fast-json-stable-stringify-2.1.0.tgz" + resolved "https://registry.yarnpkg.com/fast-json-stable-stringify/-/fast-json-stable-stringify-2.1.0.tgz#874bf69c6f404c2b5d99c481341399fd55892633" integrity sha512-lhd/wF+Lk98HZoTCtlVraHtfh5XYijIjalXck7saUtuanSDyLMxnHhSXEDJqHxD7msR8D0uCmqlkwjCV8xvwHw== fast-levenshtein@^2.0.6: version "2.0.6" - resolved "https://registry.npmjs.org/fast-levenshtein/-/fast-levenshtein-2.0.6.tgz" + resolved "https://registry.yarnpkg.com/fast-levenshtein/-/fast-levenshtein-2.0.6.tgz#3d8a5c66883a16a30ca8643e851f19baa7797917" integrity sha512-DCXu6Ifhqcks7TZKY3Hxp3y6qphY5SJZmrWMDrKcERSOXWQdMhU9Ig/PYrzyw/ul9jOIyh0N4M0tbC5hodg8dw== fastq@^1.6.0: version "1.17.1" - resolved "https://registry.npmjs.org/fastq/-/fastq-1.17.1.tgz" + resolved "https://registry.yarnpkg.com/fastq/-/fastq-1.17.1.tgz#2a523f07a4e7b1e81a42b91b8bf2254107753b47" integrity sha512-sRVD3lWVIXWg6By68ZN7vho9a1pQcN/WBFaAAsDDFzlJjvoGx0P8z7V1t72grFJfJhu3YPZBuu25f7Kaw2jN1w== dependencies: reusify "^1.0.4" fb-watchman@^2.0.0: version "2.0.2" - resolved "https://registry.npmjs.org/fb-watchman/-/fb-watchman-2.0.2.tgz" + resolved "https://registry.yarnpkg.com/fb-watchman/-/fb-watchman-2.0.2.tgz#e9524ee6b5c77e9e5001af0f85f3adbb8623255c" integrity sha512-p5161BqbuCaSnB8jIbzQHOlpgsPmK5rJVDfDKO91Axs5NC1uu3HRQm6wt9cd9/+GtQQIO53JdGXXoyDpTAsgYA== dependencies: bser "2.1.1" fflate@^0.8.2: version "0.8.2" - resolved "https://registry.npmjs.org/fflate/-/fflate-0.8.2.tgz" + resolved "https://registry.yarnpkg.com/fflate/-/fflate-0.8.2.tgz#fc8631f5347812ad6028bbe4a2308b2792aa1dea" integrity sha512-cPJU47OaAoCbg0pBvzsgpTPhmhqI5eJjh/JIu8tPj5q+T7iLvW/JAYUqmE7KOB4R1ZyEhzBaIQpQpardBF5z8A== file-entry-cache@^8.0.0: version "8.0.0" - resolved "https://registry.npmjs.org/file-entry-cache/-/file-entry-cache-8.0.0.tgz" + resolved "https://registry.yarnpkg.com/file-entry-cache/-/file-entry-cache-8.0.0.tgz#7787bddcf1131bffb92636c69457bbc0edd6d81f" integrity sha512-XXTUwCvisa5oacNGRP9SfNtYBNAMi+RPwBFmblZEF7N7swHYQS6/Zfk7SRwx4D5j3CH211YNRco1DEMNVfZCnQ== dependencies: flat-cache "^4.0.0" fill-range@^7.1.1: version "7.1.1" - resolved "https://registry.npmjs.org/fill-range/-/fill-range-7.1.1.tgz" + resolved "https://registry.yarnpkg.com/fill-range/-/fill-range-7.1.1.tgz#44265d3cac07e3ea7dc247516380643754a05292" integrity sha512-YsGpe3WHLK8ZYi4tWDg2Jy3ebRz2rXowDxnld4bkQB00cc/1Zw9AWnC0i9ztDJitivtQvaI9KaLyKrc+hBW0yg== dependencies: to-regex-range "^5.0.1" find-up@^4.0.0, find-up@^4.1.0: version "4.1.0" - resolved "https://registry.npmjs.org/find-up/-/find-up-4.1.0.tgz" + resolved "https://registry.yarnpkg.com/find-up/-/find-up-4.1.0.tgz#97afe7d6cdc0bc5928584b7c8d7b16e8a9aa5d19" integrity sha512-PpOwAdQ/YlXQ2vj8a3h8IipDuYRi3wceVQQGYWxNINccq40Anw7BlsEXCMbt1Zt+OLA6Fq9suIpIWD0OsnISlw== dependencies: locate-path "^5.0.0" @@ -1696,7 +1725,7 @@ find-up@^4.0.0, find-up@^4.1.0: find-up@^5.0.0: version "5.0.0" - resolved "https://registry.npmjs.org/find-up/-/find-up-5.0.0.tgz" + resolved "https://registry.yarnpkg.com/find-up/-/find-up-5.0.0.tgz#4c92819ecb7083561e4f4a240a86be5198f536fc" integrity sha512-78/PXT1wlLLDgTzDs7sjq9hzz0vXD+zn+7wypEe4fXQxCmdmqfGsEPQxmiCSQI3ajFV91bVSsvNtrJRiW6nGng== dependencies: locate-path "^6.0.0" @@ -1704,7 +1733,7 @@ find-up@^5.0.0: flat-cache@^4.0.0: version "4.0.1" - resolved "https://registry.npmjs.org/flat-cache/-/flat-cache-4.0.1.tgz" + resolved "https://registry.yarnpkg.com/flat-cache/-/flat-cache-4.0.1.tgz#0ece39fcb14ee012f4b0410bd33dd9c1f011127c" integrity sha512-f7ccFPK3SXFHpx15UIGyRJ/FJQctuKZ0zVuN3frBo4HnK3cay9VEW0R6yPYFHC0AgqhukPzKjq22t5DmAyqGyw== dependencies: flatted "^3.2.9" @@ -1712,12 +1741,12 @@ flat-cache@^4.0.0: flatted@^3.2.9: version "3.3.2" - resolved "https://registry.npmjs.org/flatted/-/flatted-3.3.2.tgz" + resolved "https://registry.yarnpkg.com/flatted/-/flatted-3.3.2.tgz#adba1448a9841bec72b42c532ea23dbbedef1a27" integrity sha512-AiwGJM8YcNOaobumgtng+6NHuOqC3A7MixFeDafM3X9cIUM+xUXoS5Vfgf+OihAYe20fxqNM9yPBXJzRtZ/4eA== fs.realpath@^1.0.0: version "1.0.0" - resolved "https://registry.npmjs.org/fs.realpath/-/fs.realpath-1.0.0.tgz" + resolved "https://registry.yarnpkg.com/fs.realpath/-/fs.realpath-1.0.0.tgz#1504ad2523158caa40db4a2787cb01411994ea4f" integrity sha512-OO0pH2lK6a0hZnAdau5ItzHPI6pUlvI7jMVnxUQRtw4owF2wk8lOSabtGDCTP4Ggrg2MbGnWO9X8K1t4+fGMDw== fsevents@^2.3.2: @@ -1727,51 +1756,51 @@ fsevents@^2.3.2: function-bind@^1.1.2: version "1.1.2" - resolved "https://registry.npmjs.org/function-bind/-/function-bind-1.1.2.tgz" + resolved "https://registry.yarnpkg.com/function-bind/-/function-bind-1.1.2.tgz#2c02d864d97f3ea6c8830c464cbd11ab6eab7a1c" integrity sha512-7XHNxH7qX9xG5mIwxkhumTox/MIRNcOgDrxWsMt2pAr23WHp6MrRlN7FBSFpCpr+oVO0F744iUgR82nJMfG2SA== gensync@^1.0.0-beta.2: version "1.0.0-beta.2" - resolved "https://registry.npmjs.org/gensync/-/gensync-1.0.0-beta.2.tgz" + resolved "https://registry.yarnpkg.com/gensync/-/gensync-1.0.0-beta.2.tgz#32a6ee76c3d7f52d46b2b1ae5d93fea8580a25e0" integrity sha512-3hN7NaskYvMDLQY55gnW3NQ+mesEAepTqlg+VEbj7zzqEMBVNhzcGYYeqFo/TlYz6eQiFcp1HcsCZO+nGgS8zg== get-caller-file@^2.0.5: version "2.0.5" - resolved "https://registry.npmjs.org/get-caller-file/-/get-caller-file-2.0.5.tgz" + resolved "https://registry.yarnpkg.com/get-caller-file/-/get-caller-file-2.0.5.tgz#4f94412a82db32f36e3b0b9741f8a97feb031f7e" integrity sha512-DyFP3BM/3YHTQOCUL/w0OZHR0lpKeGrxotcHWcqNEdnltqFwXVfhEBQ94eIo34AfQpo0rGki4cyIiftY06h2Fg== get-package-type@^0.1.0: version "0.1.0" - resolved "https://registry.npmjs.org/get-package-type/-/get-package-type-0.1.0.tgz" + resolved "https://registry.yarnpkg.com/get-package-type/-/get-package-type-0.1.0.tgz#8de2d803cff44df3bc6c456e6668b36c3926e11a" integrity sha512-pjzuKtY64GYfWizNAJ0fr9VqttZkNiK2iS430LtIHzjBEr6bX8Am2zm4sW4Ro5wjWW5cAlRL1qAMTcXbjNAO2Q== get-stdin@^8.0.0: version "8.0.0" - resolved "https://registry.npmjs.org/get-stdin/-/get-stdin-8.0.0.tgz" + resolved "https://registry.yarnpkg.com/get-stdin/-/get-stdin-8.0.0.tgz#cbad6a73feb75f6eeb22ba9e01f89aa28aa97a53" integrity sha512-sY22aA6xchAzprjyqmSEQv4UbAAzRN0L2dQB0NlN5acTTK9Don6nhoc3eAbUnpZiCANAMfd/+40kVdKfFygohg== get-stream@^6.0.0: version "6.0.1" - resolved "https://registry.npmjs.org/get-stream/-/get-stream-6.0.1.tgz" + resolved "https://registry.yarnpkg.com/get-stream/-/get-stream-6.0.1.tgz#a262d8eef67aced57c2852ad6167526a43cbf7b7" integrity sha512-ts6Wi+2j3jQjqi70w5AlN8DFnkSwC+MqmxEzdEALB2qXZYV3X/b1CTfgPLGJNMeAWxdPfU8FO1ms3NUfaHCPYg== glob-parent@^5.1.2: version "5.1.2" - resolved "https://registry.npmjs.org/glob-parent/-/glob-parent-5.1.2.tgz" + resolved "https://registry.yarnpkg.com/glob-parent/-/glob-parent-5.1.2.tgz#869832c58034fe68a4093c17dc15e8340d8401c4" integrity sha512-AOIgSQCepiJYwP3ARnGx+5VnTu2HBYdzbGP45eLw1vr3zB3vZLeyed1sC9hnbcOc9/SrMyM5RPQrkGz4aS9Zow== dependencies: is-glob "^4.0.1" glob-parent@^6.0.2: version "6.0.2" - resolved "https://registry.npmjs.org/glob-parent/-/glob-parent-6.0.2.tgz" + resolved "https://registry.yarnpkg.com/glob-parent/-/glob-parent-6.0.2.tgz#6d237d99083950c79290f24c7642a3de9a28f9e3" integrity sha512-XxwI8EOhVQgWp6iDL+3b0r86f4d6AX6zSU55HfB4ydCEuXLXc5FcYeOu+nnGftS4TEju/11rt4KJPTMgbfmv4A== dependencies: is-glob "^4.0.3" glob@^7.1.3, glob@^7.1.4: version "7.2.3" - resolved "https://registry.npmjs.org/glob/-/glob-7.2.3.tgz" + resolved "https://registry.yarnpkg.com/glob/-/glob-7.2.3.tgz#b8df0fb802bbfa8e89bd1d938b4e16578ed44f2b" integrity sha512-nFR0zLpU2YCaRxwoCJvL6UvCH2JFyFVIvwTLsIf21AuHlMskA1hhTdk+LlYJtOlYt9v6dvszD2BGRqBL+iQK9Q== dependencies: fs.realpath "^1.0.0" @@ -1783,7 +1812,7 @@ glob@^7.1.3, glob@^7.1.4: glob@^8.0.1: version "8.1.0" - resolved "https://registry.npmjs.org/glob/-/glob-8.1.0.tgz" + resolved "https://registry.yarnpkg.com/glob/-/glob-8.1.0.tgz#d388f656593ef708ee3e34640fdfb99a9fd1c33e" integrity sha512-r8hpEjiQEYlF2QU0df3dS+nxxSIreXQS1qRhMJM0Q5NDdR386C7jb7Hwwod8Fgiuex+k0GFjgft18yvxm5XoCQ== dependencies: fs.realpath "^1.0.0" @@ -1792,75 +1821,70 @@ glob@^8.0.1: minimatch "^5.0.1" once "^1.3.0" -globals@^11.1.0: - version "11.12.0" - resolved "https://registry.npmjs.org/globals/-/globals-11.12.0.tgz" - integrity sha512-WOBp/EEGUiIsJSp7wcv/y6MO+lV9UoncWqxuFfm8eBwzWNgyfBd6Gz+IeKQ9jCmyhoH99g15M3T+QaVHFjizVA== - globals@^14.0.0: version "14.0.0" - resolved "https://registry.npmjs.org/globals/-/globals-14.0.0.tgz" + resolved "https://registry.yarnpkg.com/globals/-/globals-14.0.0.tgz#898d7413c29babcf6bafe56fcadded858ada724e" integrity sha512-oahGvuMGQlPw/ivIYBjVSrWAfWLBeku5tpPE2fOPLi+WHffIWbuh2tCjhyQhTBPMf5E9jDEH4FOmTYgYwbKwtQ== graceful-fs@^4.2.9: version "4.2.11" - resolved "https://registry.npmjs.org/graceful-fs/-/graceful-fs-4.2.11.tgz" + resolved "https://registry.yarnpkg.com/graceful-fs/-/graceful-fs-4.2.11.tgz#4183e4e8bf08bb6e05bbb2f7d2e0c8f712ca40e3" integrity sha512-RbJ5/jmFcNNCcDV5o9eTnBLJ/HszWV0P73bc+Ff4nS/rJj+YaS6IGyiOL0VoBYX+l1Wrl3k63h/KrH+nhJ0XvQ== graphemer@^1.4.0: version "1.4.0" - resolved "https://registry.npmjs.org/graphemer/-/graphemer-1.4.0.tgz" + resolved "https://registry.yarnpkg.com/graphemer/-/graphemer-1.4.0.tgz#fb2f1d55e0e3a1849aeffc90c4fa0dd53a0e66c6" integrity sha512-EtKwoO6kxCL9WO5xipiHTZlSzBm7WLT627TqC/uVRd0HKmq8NXyebnNYxDoBi7wt8eTWrUrKXCOVaFq9x1kgag== has-flag@^4.0.0: version "4.0.0" - resolved "https://registry.npmjs.org/has-flag/-/has-flag-4.0.0.tgz" + resolved "https://registry.yarnpkg.com/has-flag/-/has-flag-4.0.0.tgz#944771fd9c81c81265c4d6941860da06bb59479b" integrity sha512-EykJT/Q1KjTWctppgIAgfSO0tKVuZUjhgMr17kqTumMl6Afv3EISleU7qZUzoXDFTAHTDC4NOoG/ZxU3EvlMPQ== hasown@^2.0.0: version "2.0.0" - resolved "https://registry.npmjs.org/hasown/-/hasown-2.0.0.tgz" + resolved "https://registry.yarnpkg.com/hasown/-/hasown-2.0.0.tgz#f4c513d454a57b7c7e1650778de226b11700546c" integrity sha512-vUptKVTpIJhcczKBbgnS+RtcuYMB8+oNzPK2/Hp3hanz8JmpATdmmgLgSaadVREkDm+e2giHwY3ZRkyjSIDDFA== dependencies: function-bind "^1.1.2" highlight.js@^10.7.1: version "10.7.3" - resolved "https://registry.npmjs.org/highlight.js/-/highlight.js-10.7.3.tgz" + resolved "https://registry.yarnpkg.com/highlight.js/-/highlight.js-10.7.3.tgz#697272e3991356e40c3cac566a74eef681756531" integrity sha512-tzcUFauisWKNHaRkN4Wjl/ZA07gENAjFl3J/c480dprkGTg5EQstgaNFqBfUqCq54kZRIEcreTsAgF/m2quD7A== html-escaper@^2.0.0: version "2.0.2" - resolved "https://registry.npmjs.org/html-escaper/-/html-escaper-2.0.2.tgz" + resolved "https://registry.yarnpkg.com/html-escaper/-/html-escaper-2.0.2.tgz#dfd60027da36a36dfcbe236262c00a5822681453" integrity sha512-H2iMtd0I4Mt5eYiapRdIDjp+XzelXQ0tFE4JS7YFwFevXXMmOp9myNrUvCg0D6ws8iqkRPBfKHgbwig1SmlLfg== human-signals@^2.1.0: version "2.1.0" - resolved "https://registry.npmjs.org/human-signals/-/human-signals-2.1.0.tgz" + resolved "https://registry.yarnpkg.com/human-signals/-/human-signals-2.1.0.tgz#dc91fcba42e4d06e4abaed33b3e7a3c02f514ea0" integrity sha512-B4FFZ6q/T2jhhksgkbEW3HBvWIfDW85snkQgawt07S7J5QXTk6BkNV+0yAeZrM5QpMAdYlocGoljn0sJ/WQkFw== iconv-lite@^0.6.3: version "0.6.3" - resolved "https://registry.npmjs.org/iconv-lite/-/iconv-lite-0.6.3.tgz" + resolved "https://registry.yarnpkg.com/iconv-lite/-/iconv-lite-0.6.3.tgz#a52f80bf38da1952eb5c681790719871a1a72501" integrity sha512-4fCk79wshMdzMp2rH06qWrJE4iolqLhCUH+OiuIgU++RB0+94NlDL81atO7GX55uUKueo0txHNtvEyI6D7WdMw== dependencies: safer-buffer ">= 2.1.2 < 3.0.0" ignore-walk@^5.0.1: version "5.0.1" - resolved "https://registry.npmjs.org/ignore-walk/-/ignore-walk-5.0.1.tgz" + resolved "https://registry.yarnpkg.com/ignore-walk/-/ignore-walk-5.0.1.tgz#5f199e23e1288f518d90358d461387788a154776" integrity sha512-yemi4pMf51WKT7khInJqAvsIGzoqYXblnsz0ql8tM+yi1EKYTY1evX4NAbJrLL/Aanr2HyZeluqU+Oi7MGHokw== dependencies: minimatch "^5.0.1" ignore@^5.2.0, ignore@^5.3.1: version "5.3.2" - resolved "https://registry.npmjs.org/ignore/-/ignore-5.3.2.tgz" + resolved "https://registry.yarnpkg.com/ignore/-/ignore-5.3.2.tgz#3cd40e729f3643fd87cb04e50bf0eb722bc596f5" integrity sha512-hsBTNUqQTDwkWtcdYI2i06Y/nUBEsNEDJKjWdigLvegy8kDuJAS8uRlpkkcQpyEXL0Z/pjDy5HBmMjRCJ2gq+g== import-fresh@^3.2.1: version "3.3.0" - resolved "https://registry.npmjs.org/import-fresh/-/import-fresh-3.3.0.tgz" + resolved "https://registry.yarnpkg.com/import-fresh/-/import-fresh-3.3.0.tgz#37162c25fcb9ebaa2e6e53d5b4d88ce17d9e0c2b" integrity sha512-veYYhQa+D1QBKznvhUHxb8faxlrwUnxseDAbAp457E0wLNio2bOSKnjYDhMj+YiAq61xrMGhQk9iXVk5FzgQMw== dependencies: parent-module "^1.0.0" @@ -1868,7 +1892,7 @@ import-fresh@^3.2.1: import-local@^3.0.2: version "3.1.0" - resolved "https://registry.npmjs.org/import-local/-/import-local-3.1.0.tgz" + resolved "https://registry.yarnpkg.com/import-local/-/import-local-3.1.0.tgz#b4479df8a5fd44f6cdce24070675676063c95cb4" integrity sha512-ASB07uLtnDs1o6EHjKpX34BKYDSqnFerfTOJL2HvMqF70LnxpjkzDB8J44oT9pu4AMPkQwf8jl6szgvNd2tRIg== dependencies: pkg-dir "^4.2.0" @@ -1876,17 +1900,17 @@ import-local@^3.0.2: imurmurhash@^0.1.4: version "0.1.4" - resolved "https://registry.npmjs.org/imurmurhash/-/imurmurhash-0.1.4.tgz" + resolved "https://registry.yarnpkg.com/imurmurhash/-/imurmurhash-0.1.4.tgz#9218b9b2b928a238b13dc4fb6b6d576f231453ea" integrity sha512-JmXMZ6wuvDmLiHEml9ykzqO6lwFbof0GG4IkcGaENdCRDDmMVnny7s5HsIgHCbaq0w2MyPhDqkhTUgS2LU2PHA== indent-string@^4.0.0: version "4.0.0" - resolved "https://registry.npmjs.org/indent-string/-/indent-string-4.0.0.tgz" + resolved "https://registry.yarnpkg.com/indent-string/-/indent-string-4.0.0.tgz#624f8f4497d619b2d9768531d58f4122854d7251" integrity sha512-EdDDZu4A2OyIK7Lr/2zG+w5jmbuk1DVBnEwREQvBzspBJkCEbRa8GxU1lghYcaGJCnRWibjDXlq779X1/y5xwg== inflight@^1.0.4: version "1.0.6" - resolved "https://registry.npmjs.org/inflight/-/inflight-1.0.6.tgz" + resolved "https://registry.yarnpkg.com/inflight/-/inflight-1.0.6.tgz#49bd6331d7d02d0c09bc910a1075ba8165b56df9" integrity sha512-k92I/b08q4wvFscXCLvqfsHCrjrF7yiXsQuIVvVE7N82W3+aqpzuUdBbfhWcy/FZR3/4IgflMgKLOsvPDrGCJA== dependencies: once "^1.3.0" @@ -1894,66 +1918,66 @@ inflight@^1.0.4: inherits@2, inherits@^2.0.3: version "2.0.4" - resolved "https://registry.npmjs.org/inherits/-/inherits-2.0.4.tgz" + resolved "https://registry.yarnpkg.com/inherits/-/inherits-2.0.4.tgz#0fa2c64f932917c3433a0ded55363aae37416b7c" integrity sha512-k/vGaX4/Yla3WzyMCvTQOXYeIHvqOKtnqBduzTHpzpQZzAskKMhZ2K+EnBiSM9zGSoIFeMpXKxa4dYeZIQqewQ== is-arrayish@^0.2.1: version "0.2.1" - resolved "https://registry.npmjs.org/is-arrayish/-/is-arrayish-0.2.1.tgz" + resolved "https://registry.yarnpkg.com/is-arrayish/-/is-arrayish-0.2.1.tgz#77c99840527aa8ecb1a8ba697b80645a7a926a9d" integrity sha512-zz06S8t0ozoDXMG+ube26zeCTNXcKIPJZJi8hBrF4idCLms4CG9QtK7qBl1boi5ODzFpjswb5JPmHCbMpjaYzg== is-core-module@^2.13.0: version "2.13.1" - resolved "https://registry.npmjs.org/is-core-module/-/is-core-module-2.13.1.tgz" + resolved "https://registry.yarnpkg.com/is-core-module/-/is-core-module-2.13.1.tgz#ad0d7532c6fea9da1ebdc82742d74525c6273384" integrity sha512-hHrIjvZsftOsvKSn2TRYl63zvxsgE0K+0mYMoH6gD4omR5IWB2KynivBQczo3+wF1cCkjzvptnI9Q0sPU66ilw== dependencies: hasown "^2.0.0" is-extglob@^2.1.1: version "2.1.1" - resolved "https://registry.npmjs.org/is-extglob/-/is-extglob-2.1.1.tgz" + resolved "https://registry.yarnpkg.com/is-extglob/-/is-extglob-2.1.1.tgz#a88c02535791f02ed37c76a1b9ea9773c833f8c2" integrity sha512-SbKbANkN603Vi4jEZv49LeVJMn4yGwsbzZworEoyEiutsN3nJYdbO36zfhGJ6QEDpOZIFkDtnq5JRxmvl3jsoQ== is-fullwidth-code-point@^3.0.0: version "3.0.0" - resolved "https://registry.npmjs.org/is-fullwidth-code-point/-/is-fullwidth-code-point-3.0.0.tgz" + resolved "https://registry.yarnpkg.com/is-fullwidth-code-point/-/is-fullwidth-code-point-3.0.0.tgz#f116f8064fe90b3f7844a38997c0b75051269f1d" integrity sha512-zymm5+u+sCsSWyD9qNaejV3DFvhCKclKdizYaJUuHA83RLjb7nSuGnddCHGv0hk+KY7BMAlsWeK4Ueg6EV6XQg== is-generator-fn@^2.0.0: version "2.1.0" - resolved "https://registry.npmjs.org/is-generator-fn/-/is-generator-fn-2.1.0.tgz" + resolved "https://registry.yarnpkg.com/is-generator-fn/-/is-generator-fn-2.1.0.tgz#7d140adc389aaf3011a8f2a2a4cfa6faadffb118" integrity sha512-cTIB4yPYL/Grw0EaSzASzg6bBy9gqCofvWN8okThAYIxKJZC+udlRAmGbM0XLeniEJSs8uEgHPGuHSe1XsOLSQ== is-glob@^4.0.0, is-glob@^4.0.1, is-glob@^4.0.3: version "4.0.3" - resolved "https://registry.npmjs.org/is-glob/-/is-glob-4.0.3.tgz" + resolved "https://registry.yarnpkg.com/is-glob/-/is-glob-4.0.3.tgz#64f61e42cbbb2eec2071a9dac0b28ba1e65d5084" integrity sha512-xelSayHH36ZgE7ZWhli7pW34hNbNl8Ojv5KVmkJD4hBdD3th8Tfk9vYasLM+mXWOZhFkgZfxhLSnrwRr4elSSg== dependencies: is-extglob "^2.1.1" is-number@^7.0.0: version "7.0.0" - resolved "https://registry.npmjs.org/is-number/-/is-number-7.0.0.tgz" + resolved "https://registry.yarnpkg.com/is-number/-/is-number-7.0.0.tgz#7535345b896734d5f80c4d06c50955527a14f12b" integrity sha512-41Cifkg6e8TylSpdtTpeLVMqvSBEVzTttHvERD741+pnZ8ANv0004MRL43QKPDlK9cGvNp6NZWZUBlbGXYxxng== is-stream@^2.0.0: version "2.0.1" - resolved "https://registry.npmjs.org/is-stream/-/is-stream-2.0.1.tgz" + resolved "https://registry.yarnpkg.com/is-stream/-/is-stream-2.0.1.tgz#fac1e3d53b97ad5a9d0ae9cef2389f5810a5c077" integrity sha512-hFoiJiTl63nn+kstHGBtewWSKnQLpyb155KHheA1l39uvtO9nWIop1p3udqPcUd/xbF1VLMO4n7OI6p7RbngDg== isexe@^2.0.0: version "2.0.0" - resolved "https://registry.npmjs.org/isexe/-/isexe-2.0.0.tgz" + resolved "https://registry.yarnpkg.com/isexe/-/isexe-2.0.0.tgz#e8fbf374dc556ff8947a10dcb0572d633f2cfa10" integrity sha512-RHxMLp9lnKHGHRng9QFhRCMbYAcVpn69smSGcq3f36xjgVVWThj4qqLbTLlq7Ssj8B+fIQ1EuCEGI2lKsyQeIw== istanbul-lib-coverage@^3.0.0, istanbul-lib-coverage@^3.2.0: version "3.2.2" - resolved "https://registry.npmjs.org/istanbul-lib-coverage/-/istanbul-lib-coverage-3.2.2.tgz" + resolved "https://registry.yarnpkg.com/istanbul-lib-coverage/-/istanbul-lib-coverage-3.2.2.tgz#2d166c4b0644d43a39f04bf6c2edd1e585f31756" integrity sha512-O8dpsF+r0WV/8MNRKfnmrtCWhuKjxrq2w+jpzBL5UZKTi2LeVWnWOmWRxFlesJONmc+wLAGvKQZEOanko0LFTg== istanbul-lib-instrument@^5.0.4: version "5.2.1" - resolved "https://registry.npmjs.org/istanbul-lib-instrument/-/istanbul-lib-instrument-5.2.1.tgz" + resolved "https://registry.yarnpkg.com/istanbul-lib-instrument/-/istanbul-lib-instrument-5.2.1.tgz#d10c8885c2125574e1c231cacadf955675e1ce3d" integrity sha512-pzqtp31nLv/XFOzXGuvhCb8qhjmTVo5vjVk19XE4CRlSWz0KoeJ3bw9XsA7nOp9YBf4qHjwBxkDzKcME/J29Yg== dependencies: "@babel/core" "^7.12.3" @@ -1964,7 +1988,7 @@ istanbul-lib-instrument@^5.0.4: istanbul-lib-instrument@^6.0.0: version "6.0.1" - resolved "https://registry.npmjs.org/istanbul-lib-instrument/-/istanbul-lib-instrument-6.0.1.tgz" + resolved "https://registry.yarnpkg.com/istanbul-lib-instrument/-/istanbul-lib-instrument-6.0.1.tgz#71e87707e8041428732518c6fb5211761753fbdf" integrity sha512-EAMEJBsYuyyztxMxW3g7ugGPkrZsV57v0Hmv3mm1uQsmB+QnZuepg731CRaIgeUVSdmsTngOkSnauNF8p7FIhA== dependencies: "@babel/core" "^7.12.3" @@ -1975,7 +1999,7 @@ istanbul-lib-instrument@^6.0.0: istanbul-lib-report@^3.0.0: version "3.0.1" - resolved "https://registry.npmjs.org/istanbul-lib-report/-/istanbul-lib-report-3.0.1.tgz" + resolved "https://registry.yarnpkg.com/istanbul-lib-report/-/istanbul-lib-report-3.0.1.tgz#908305bac9a5bd175ac6a74489eafd0fc2445a7d" integrity sha512-GCfE1mtsHGOELCU8e/Z7YWzpmybrx/+dSTfLrvY8qRmaY6zXTKWn6WQIjaAFw069icm6GVMNkgu0NzI4iPZUNw== dependencies: istanbul-lib-coverage "^3.0.0" @@ -1984,7 +2008,7 @@ istanbul-lib-report@^3.0.0: istanbul-lib-source-maps@^4.0.0: version "4.0.1" - resolved "https://registry.npmjs.org/istanbul-lib-source-maps/-/istanbul-lib-source-maps-4.0.1.tgz" + resolved "https://registry.yarnpkg.com/istanbul-lib-source-maps/-/istanbul-lib-source-maps-4.0.1.tgz#895f3a709fcfba34c6de5a42939022f3e4358551" integrity sha512-n3s8EwkdFIJCG3BPKBYvskgXGoy88ARzvegkitk60NxRdwltLOTaH7CUiMRXvwYorl0Q712iEjcWB+fK/MrWVw== dependencies: debug "^4.1.1" @@ -1993,7 +2017,7 @@ istanbul-lib-source-maps@^4.0.0: istanbul-reports@^3.1.3: version "3.1.6" - resolved "https://registry.npmjs.org/istanbul-reports/-/istanbul-reports-3.1.6.tgz" + resolved "https://registry.yarnpkg.com/istanbul-reports/-/istanbul-reports-3.1.6.tgz#2544bcab4768154281a2f0870471902704ccaa1a" integrity sha512-TLgnMkKg3iTDsQ9PbPTdpfAK2DzjF9mqUG7RMgcQl8oFjad8ob4laGxv5XV5U9MAfx8D6tSJiUyuAwzLicaxlg== dependencies: html-escaper "^2.0.0" @@ -2001,7 +2025,7 @@ istanbul-reports@^3.1.3: jest-changed-files@^29.7.0: version "29.7.0" - resolved "https://registry.npmjs.org/jest-changed-files/-/jest-changed-files-29.7.0.tgz" + resolved "https://registry.yarnpkg.com/jest-changed-files/-/jest-changed-files-29.7.0.tgz#1c06d07e77c78e1585d020424dedc10d6e17ac3a" integrity sha512-fEArFiwf1BpQ+4bXSprcDc3/x4HSzL4al2tozwVpDFpsxALjLYdyiIK4e5Vz66GQJIbXJ82+35PtysofptNX2w== dependencies: execa "^5.0.0" @@ -2010,7 +2034,7 @@ jest-changed-files@^29.7.0: jest-circus@^29.7.0: version "29.7.0" - resolved "https://registry.npmjs.org/jest-circus/-/jest-circus-29.7.0.tgz" + resolved "https://registry.yarnpkg.com/jest-circus/-/jest-circus-29.7.0.tgz#b6817a45fcc835d8b16d5962d0c026473ee3668a" integrity sha512-3E1nCMgipcTkCocFwM90XXQab9bS+GMsjdpmPrlelaxwD93Ad8iVEjX/vvHPdLPnFf+L40u+5+iutRdA1N9myw== dependencies: "@jest/environment" "^29.7.0" @@ -2036,7 +2060,7 @@ jest-circus@^29.7.0: jest-cli@^29.7.0: version "29.7.0" - resolved "https://registry.npmjs.org/jest-cli/-/jest-cli-29.7.0.tgz" + resolved "https://registry.yarnpkg.com/jest-cli/-/jest-cli-29.7.0.tgz#5592c940798e0cae677eec169264f2d839a37995" integrity sha512-OVVobw2IubN/GSYsxETi+gOe7Ka59EFMR/twOU3Jb2GnKKeMGJB5SGUUrEz3SFVmJASUdZUzy83sLNNQ2gZslg== dependencies: "@jest/core" "^29.7.0" @@ -2053,7 +2077,7 @@ jest-cli@^29.7.0: jest-config@^29.7.0: version "29.7.0" - resolved "https://registry.npmjs.org/jest-config/-/jest-config-29.7.0.tgz" + resolved "https://registry.yarnpkg.com/jest-config/-/jest-config-29.7.0.tgz#bcbda8806dbcc01b1e316a46bb74085a84b0245f" integrity sha512-uXbpfeQ7R6TZBqI3/TxCU4q4ttk3u0PJeC+E0zbfSoSjq6bJ7buBPxzQPL0ifrkY4DNu4JUdk0ImlBUYi840eQ== dependencies: "@babel/core" "^7.11.6" @@ -2081,7 +2105,7 @@ jest-config@^29.7.0: jest-diff@^29.7.0: version "29.7.0" - resolved "https://registry.npmjs.org/jest-diff/-/jest-diff-29.7.0.tgz" + resolved "https://registry.yarnpkg.com/jest-diff/-/jest-diff-29.7.0.tgz#017934a66ebb7ecf6f205e84699be10afd70458a" integrity sha512-LMIgiIrhigmPrs03JHpxUh2yISK3vLFPkAodPeo0+BuF7wA2FoQbkEg1u8gBYBThncu7e1oEDUfIXVuTqLRUjw== dependencies: chalk "^4.0.0" @@ -2091,14 +2115,14 @@ jest-diff@^29.7.0: jest-docblock@^29.7.0: version "29.7.0" - resolved "https://registry.npmjs.org/jest-docblock/-/jest-docblock-29.7.0.tgz" + resolved "https://registry.yarnpkg.com/jest-docblock/-/jest-docblock-29.7.0.tgz#8fddb6adc3cdc955c93e2a87f61cfd350d5d119a" integrity sha512-q617Auw3A612guyaFgsbFeYpNP5t2aoUNLwBUbc/0kD1R4t9ixDbyFTHd1nok4epoVFpr7PmeWHrhvuV3XaJ4g== dependencies: detect-newline "^3.0.0" jest-each@^29.7.0: version "29.7.0" - resolved "https://registry.npmjs.org/jest-each/-/jest-each-29.7.0.tgz" + resolved "https://registry.yarnpkg.com/jest-each/-/jest-each-29.7.0.tgz#162a9b3f2328bdd991beaabffbb74745e56577d1" integrity sha512-gns+Er14+ZrEoC5fhOfYCY1LOHHr0TI+rQUHZS8Ttw2l7gl+80eHc/gFf2Ktkw0+SIACDTeWvpFcv3B04VembQ== dependencies: "@jest/types" "^29.6.3" @@ -2109,7 +2133,7 @@ jest-each@^29.7.0: jest-environment-node@^29.7.0: version "29.7.0" - resolved "https://registry.npmjs.org/jest-environment-node/-/jest-environment-node-29.7.0.tgz" + resolved "https://registry.yarnpkg.com/jest-environment-node/-/jest-environment-node-29.7.0.tgz#0b93e111dda8ec120bc8300e6d1fb9576e164376" integrity sha512-DOSwCRqXirTOyheM+4d5YZOrWcdu0LNZ87ewUoywbcb2XR4wKgqiG8vNeYwhjFMbEkfju7wx2GYH0P2gevGvFw== dependencies: "@jest/environment" "^29.7.0" @@ -2121,12 +2145,12 @@ jest-environment-node@^29.7.0: jest-get-type@^29.6.3: version "29.6.3" - resolved "https://registry.npmjs.org/jest-get-type/-/jest-get-type-29.6.3.tgz" + resolved "https://registry.yarnpkg.com/jest-get-type/-/jest-get-type-29.6.3.tgz#36f499fdcea197c1045a127319c0481723908fd1" integrity sha512-zrteXnqYxfQh7l5FHyL38jL39di8H8rHoecLH3JNxH3BwOrBsNeabdap5e0I23lD4HHI8W5VFBZqG4Eaq5LNcw== jest-haste-map@^29.7.0: version "29.7.0" - resolved "https://registry.npmjs.org/jest-haste-map/-/jest-haste-map-29.7.0.tgz" + resolved "https://registry.yarnpkg.com/jest-haste-map/-/jest-haste-map-29.7.0.tgz#3c2396524482f5a0506376e6c858c3bbcc17b104" integrity sha512-fP8u2pyfqx0K1rGn1R9pyE0/KTn+G7PxktWidOBTqFPLYX0b9ksaMFkhK5vrS3DVun09pckLdlx90QthlW7AmA== dependencies: "@jest/types" "^29.6.3" @@ -2145,7 +2169,7 @@ jest-haste-map@^29.7.0: jest-leak-detector@^29.7.0: version "29.7.0" - resolved "https://registry.npmjs.org/jest-leak-detector/-/jest-leak-detector-29.7.0.tgz" + resolved "https://registry.yarnpkg.com/jest-leak-detector/-/jest-leak-detector-29.7.0.tgz#5b7ec0dadfdfec0ca383dc9aa016d36b5ea4c728" integrity sha512-kYA8IJcSYtST2BY9I+SMC32nDpBT3J2NvWJx8+JCuCdl/CR1I4EKUJROiP8XtCcxqgTTBGJNdbB1A8XRKbTetw== dependencies: jest-get-type "^29.6.3" @@ -2153,7 +2177,7 @@ jest-leak-detector@^29.7.0: jest-matcher-utils@^29.7.0: version "29.7.0" - resolved "https://registry.npmjs.org/jest-matcher-utils/-/jest-matcher-utils-29.7.0.tgz" + resolved "https://registry.yarnpkg.com/jest-matcher-utils/-/jest-matcher-utils-29.7.0.tgz#ae8fec79ff249fd592ce80e3ee474e83a6c44f12" integrity sha512-sBkD+Xi9DtcChsI3L3u0+N0opgPYnCRPtGcQYrgXmR+hmt/fYfWAL0xRXYU8eWOdfuLgBe0YCW3AFtnRLagq/g== dependencies: chalk "^4.0.0" @@ -2163,7 +2187,7 @@ jest-matcher-utils@^29.7.0: jest-message-util@^29.7.0: version "29.7.0" - resolved "https://registry.npmjs.org/jest-message-util/-/jest-message-util-29.7.0.tgz" + resolved "https://registry.yarnpkg.com/jest-message-util/-/jest-message-util-29.7.0.tgz#8bc392e204e95dfe7564abbe72a404e28e51f7f3" integrity sha512-GBEV4GRADeP+qtB2+6u61stea8mGcOT4mCtrYISZwfu9/ISHFJ/5zOMXYbpBE9RsS5+Gb63DW4FgmnKJ79Kf6w== dependencies: "@babel/code-frame" "^7.12.13" @@ -2178,7 +2202,7 @@ jest-message-util@^29.7.0: jest-mock@^29.7.0: version "29.7.0" - resolved "https://registry.npmjs.org/jest-mock/-/jest-mock-29.7.0.tgz" + resolved "https://registry.yarnpkg.com/jest-mock/-/jest-mock-29.7.0.tgz#4e836cf60e99c6fcfabe9f99d017f3fdd50a6347" integrity sha512-ITOMZn+UkYS4ZFh83xYAOzWStloNzJFO2s8DWrE4lhtGD+AorgnbkiKERe4wQVBydIGPx059g6riW5Btp6Llnw== dependencies: "@jest/types" "^29.6.3" @@ -2187,17 +2211,17 @@ jest-mock@^29.7.0: jest-pnp-resolver@^1.2.2: version "1.2.3" - resolved "https://registry.npmjs.org/jest-pnp-resolver/-/jest-pnp-resolver-1.2.3.tgz" + resolved "https://registry.yarnpkg.com/jest-pnp-resolver/-/jest-pnp-resolver-1.2.3.tgz#930b1546164d4ad5937d5540e711d4d38d4cad2e" integrity sha512-+3NpwQEnRoIBtx4fyhblQDPgJI0H1IEIkX7ShLUjPGA7TtUTvI1oiKi3SR4oBR0hQhQR80l4WAe5RrXBwWMA8w== jest-regex-util@^29.6.3: version "29.6.3" - resolved "https://registry.npmjs.org/jest-regex-util/-/jest-regex-util-29.6.3.tgz" + resolved "https://registry.yarnpkg.com/jest-regex-util/-/jest-regex-util-29.6.3.tgz#4a556d9c776af68e1c5f48194f4d0327d24e8a52" integrity sha512-KJJBsRCyyLNWCNBOvZyRDnAIfUiRJ8v+hOBQYGn8gDyF3UegwiP4gwRR3/SDa42g1YbVycTidUF3rKjyLFDWbg== jest-resolve-dependencies@^29.7.0: version "29.7.0" - resolved "https://registry.npmjs.org/jest-resolve-dependencies/-/jest-resolve-dependencies-29.7.0.tgz" + resolved "https://registry.yarnpkg.com/jest-resolve-dependencies/-/jest-resolve-dependencies-29.7.0.tgz#1b04f2c095f37fc776ff40803dc92921b1e88428" integrity sha512-un0zD/6qxJ+S0et7WxeI3H5XSe9lTBBR7bOHCHXkKR6luG5mwDDlIzVQ0V5cZCuoTgEdcdwzTghYkTWfubi+nA== dependencies: jest-regex-util "^29.6.3" @@ -2205,7 +2229,7 @@ jest-resolve-dependencies@^29.7.0: jest-resolve@^29.7.0: version "29.7.0" - resolved "https://registry.npmjs.org/jest-resolve/-/jest-resolve-29.7.0.tgz" + resolved "https://registry.yarnpkg.com/jest-resolve/-/jest-resolve-29.7.0.tgz#64d6a8992dd26f635ab0c01e5eef4399c6bcbc30" integrity sha512-IOVhZSrg+UvVAshDSDtHyFCCBUl/Q3AAJv8iZ6ZjnZ74xzvwuzLXid9IIIPgTnY62SJjfuupMKZsZQRsCvxEgA== dependencies: chalk "^4.0.0" @@ -2220,7 +2244,7 @@ jest-resolve@^29.7.0: jest-runner@^29.7.0: version "29.7.0" - resolved "https://registry.npmjs.org/jest-runner/-/jest-runner-29.7.0.tgz" + resolved "https://registry.yarnpkg.com/jest-runner/-/jest-runner-29.7.0.tgz#809af072d408a53dcfd2e849a4c976d3132f718e" integrity sha512-fsc4N6cPCAahybGBfTRcq5wFR6fpLznMg47sY5aDpsoejOcVYFb07AHuSnR0liMcPTgBsA3ZJL6kFOjPdoNipQ== dependencies: "@jest/console" "^29.7.0" @@ -2247,7 +2271,7 @@ jest-runner@^29.7.0: jest-runtime@^29.7.0: version "29.7.0" - resolved "https://registry.npmjs.org/jest-runtime/-/jest-runtime-29.7.0.tgz" + resolved "https://registry.yarnpkg.com/jest-runtime/-/jest-runtime-29.7.0.tgz#efecb3141cf7d3767a3a0cc8f7c9990587d3d817" integrity sha512-gUnLjgwdGqW7B4LvOIkbKs9WGbn+QLqRQQ9juC6HndeDiezIwhDP+mhMwHWCEcfQ5RUXa6OPnFF8BJh5xegwwQ== dependencies: "@jest/environment" "^29.7.0" @@ -2275,7 +2299,7 @@ jest-runtime@^29.7.0: jest-snapshot@^29.7.0: version "29.7.0" - resolved "https://registry.npmjs.org/jest-snapshot/-/jest-snapshot-29.7.0.tgz" + resolved "https://registry.yarnpkg.com/jest-snapshot/-/jest-snapshot-29.7.0.tgz#c2c574c3f51865da1bb329036778a69bf88a6be5" integrity sha512-Rm0BMWtxBcioHr1/OX5YCP8Uov4riHvKPknOGs804Zg9JGZgmIBkbtlxJC/7Z4msKYVbIJtfU+tKb8xlYNfdkw== dependencies: "@babel/core" "^7.11.6" @@ -2301,7 +2325,7 @@ jest-snapshot@^29.7.0: jest-util@^29.0.0, jest-util@^29.7.0: version "29.7.0" - resolved "https://registry.npmjs.org/jest-util/-/jest-util-29.7.0.tgz" + resolved "https://registry.yarnpkg.com/jest-util/-/jest-util-29.7.0.tgz#23c2b62bfb22be82b44de98055802ff3710fc0bc" integrity sha512-z6EbKajIpqGKU56y5KBUgy1dt1ihhQJgWzUlZHArA/+X2ad7Cb5iF+AK1EWVL/Bo7Rz9uurpqw6SiBCefUbCGA== dependencies: "@jest/types" "^29.6.3" @@ -2313,7 +2337,7 @@ jest-util@^29.0.0, jest-util@^29.7.0: jest-validate@^29.7.0: version "29.7.0" - resolved "https://registry.npmjs.org/jest-validate/-/jest-validate-29.7.0.tgz" + resolved "https://registry.yarnpkg.com/jest-validate/-/jest-validate-29.7.0.tgz#7bf705511c64da591d46b15fce41400d52147d9c" integrity sha512-ZB7wHqaRGVw/9hST/OuFUReG7M8vKeq0/J2egIGLdvjHCmYqGARhzXmtgi+gVeZ5uXFF219aOc3Ls2yLg27tkw== dependencies: "@jest/types" "^29.6.3" @@ -2325,7 +2349,7 @@ jest-validate@^29.7.0: jest-watcher@^29.7.0: version "29.7.0" - resolved "https://registry.npmjs.org/jest-watcher/-/jest-watcher-29.7.0.tgz" + resolved "https://registry.yarnpkg.com/jest-watcher/-/jest-watcher-29.7.0.tgz#7810d30d619c3a62093223ce6bb359ca1b28a2f2" integrity sha512-49Fg7WXkU3Vl2h6LbLtMQ/HyB6rXSIX7SqvBLQmssRBGN9I0PNvPmAmCWSOY6SOvrjhI/F7/bGAv9RtnsPA03g== dependencies: "@jest/test-result" "^29.7.0" @@ -2339,7 +2363,7 @@ jest-watcher@^29.7.0: jest-worker@^29.7.0: version "29.7.0" - resolved "https://registry.npmjs.org/jest-worker/-/jest-worker-29.7.0.tgz" + resolved "https://registry.yarnpkg.com/jest-worker/-/jest-worker-29.7.0.tgz#acad073acbbaeb7262bd5389e1bcf43e10058d4a" integrity sha512-eIz2msL/EzL9UFTFFx7jBTkeZfku0yUAyZZZmJ93H2TYEiroIx2PQjEXcwYtYl8zXCxb+PAmA2hLIt/6ZEkPHw== dependencies: "@types/node" "*" @@ -2349,7 +2373,7 @@ jest-worker@^29.7.0: jest@^29.4.0: version "29.7.0" - resolved "https://registry.npmjs.org/jest/-/jest-29.7.0.tgz" + resolved "https://registry.yarnpkg.com/jest/-/jest-29.7.0.tgz#994676fc24177f088f1c5e3737f5697204ff2613" integrity sha512-NIy3oAFp9shda19hy4HK0HRTWKtPJmGdnvywu01nOqNC2vZg+Z+fvJDxpMQA88eb2I9EcafcdjYgsDthnYTvGw== dependencies: "@jest/core" "^29.7.0" @@ -2359,79 +2383,79 @@ jest@^29.4.0: js-tokens@^4.0.0: version "4.0.0" - resolved "https://registry.npmjs.org/js-tokens/-/js-tokens-4.0.0.tgz" + resolved "https://registry.yarnpkg.com/js-tokens/-/js-tokens-4.0.0.tgz#19203fb59991df98e3a287050d4647cdeaf32499" integrity sha512-RdJUflcE3cUzKiMqQgsCu06FPu9UdIJO0beYbPhHN4k6apgJtifcoCtT9bcxOpYBtpD2kCM6Sbzg4CausW/PKQ== js-yaml@^3.13.1: - version "3.14.1" - resolved "https://registry.npmjs.org/js-yaml/-/js-yaml-3.14.1.tgz" - integrity sha512-okMH7OXXJ7YrN9Ok3/SXrnu4iX9yOk+25nqX4imS2npuvTYDmo/QEZoqwZkYaIDk3jVvBOTOIEgEhaLOynBS9g== + version "3.14.2" + resolved "https://registry.yarnpkg.com/js-yaml/-/js-yaml-3.14.2.tgz#77485ce1dd7f33c061fd1b16ecea23b55fcb04b0" + integrity sha512-PMSmkqxr106Xa156c2M265Z+FTrPl+oxd/rgOQy2tijQeK5TxQ43psO1ZCwhVOSdnn+RzkzlRz/eY4BgJBYVpg== dependencies: argparse "^1.0.7" esprima "^4.0.0" -js-yaml@^4.1.0: - version "4.1.0" - resolved "https://registry.npmjs.org/js-yaml/-/js-yaml-4.1.0.tgz" - integrity sha512-wpxZs9NoxZaJESJGIZTyDEaYpl0FKSA+FB9aJiyemKhMwkxQg63h4T1KJgUGHpTqPDNRcmmYLugrRjJlBtWvRA== +js-yaml@^4.1.1: + version "4.1.1" + resolved "https://registry.yarnpkg.com/js-yaml/-/js-yaml-4.1.1.tgz#854c292467705b699476e1a2decc0c8a3458806b" + integrity sha512-qQKT4zQxXl8lLwBtHMWwaTcGfFOZviOJet3Oy/xmGk2gZH677CJM9EvtfdSkgWcATZhj/55JZ0rmy3myCT5lsA== dependencies: argparse "^2.0.1" -jsesc@^2.5.1: - version "2.5.2" - resolved "https://registry.npmjs.org/jsesc/-/jsesc-2.5.2.tgz" - integrity sha512-OYu7XEzjkCQ3C5Ps3QIZsQfNpqoJyZZA99wd9aWd05NCtC5pWOkShK2mkL6HXQR6/Cy2lbNdPlZBpuQHXE63gA== +jsesc@^3.0.2: + version "3.1.0" + resolved "https://registry.yarnpkg.com/jsesc/-/jsesc-3.1.0.tgz#74d335a234f67ed19907fdadfac7ccf9d409825d" + integrity sha512-/sM3dO2FOzXjKQhJuo0Q173wf2KOo8t4I8vHy6lF9poUp7bKT0/NHE8fPX23PwfhnykfqnC2xRxOnVw5XuGIaA== json-buffer@3.0.1: version "3.0.1" - resolved "https://registry.npmjs.org/json-buffer/-/json-buffer-3.0.1.tgz" + resolved "https://registry.yarnpkg.com/json-buffer/-/json-buffer-3.0.1.tgz#9338802a30d3b6605fbe0613e094008ca8c05a13" integrity sha512-4bV5BfR2mqfQTJm+V5tPPdf+ZpuhiIvTuAB5g8kcrXOZpTT/QwwVRWBywX1ozr6lEuPdbHxwaJlm9G6mI2sfSQ== json-parse-even-better-errors@^2.3.0: version "2.3.1" - resolved "https://registry.npmjs.org/json-parse-even-better-errors/-/json-parse-even-better-errors-2.3.1.tgz" + resolved "https://registry.yarnpkg.com/json-parse-even-better-errors/-/json-parse-even-better-errors-2.3.1.tgz#7c47805a94319928e05777405dc12e1f7a4ee02d" integrity sha512-xyFwyhro/JEof6Ghe2iz2NcXoj2sloNsWr/XsERDK/oiPCfaNhl5ONfp+jQdAZRQQ0IJWNzH9zIZF7li91kh2w== json-schema-traverse@^0.4.1: version "0.4.1" - resolved "https://registry.npmjs.org/json-schema-traverse/-/json-schema-traverse-0.4.1.tgz" + resolved "https://registry.yarnpkg.com/json-schema-traverse/-/json-schema-traverse-0.4.1.tgz#69f6a87d9513ab8bb8fe63bdb0979c448e684660" integrity sha512-xbbCH5dCYU5T8LcEhhuh7HJ88HXuW3qsI3Y0zOZFKfZEHcpWiHU/Jxzk629Brsab/mMiHQti9wMP+845RPe3Vg== json-stable-stringify-without-jsonify@^1.0.1: version "1.0.1" - resolved "https://registry.npmjs.org/json-stable-stringify-without-jsonify/-/json-stable-stringify-without-jsonify-1.0.1.tgz" + resolved "https://registry.yarnpkg.com/json-stable-stringify-without-jsonify/-/json-stable-stringify-without-jsonify-1.0.1.tgz#9db7b59496ad3f3cfef30a75142d2d930ad72651" integrity sha512-Bdboy+l7tA3OGW6FjyFHWkP5LuByj1Tk33Ljyq0axyzdk9//JSi2u3fP1QSmd1KNwq6VOKYGlAu87CisVir6Pw== json5@^2.2.2, json5@^2.2.3: version "2.2.3" - resolved "https://registry.npmjs.org/json5/-/json5-2.2.3.tgz" + resolved "https://registry.yarnpkg.com/json5/-/json5-2.2.3.tgz#78cd6f1a19bdc12b73db5ad0c61efd66c1e29283" integrity sha512-XmOWe7eyHYH14cLdVPoyg+GOH3rYX++KpzrylJwSW98t3Nk+U8XOl8FWKOgwtzdb8lXGf6zYwDUzeHMWfxasyg== jsonc-parser@^3.2.0: version "3.2.1" - resolved "https://registry.npmjs.org/jsonc-parser/-/jsonc-parser-3.2.1.tgz" + resolved "https://registry.yarnpkg.com/jsonc-parser/-/jsonc-parser-3.2.1.tgz#031904571ccf929d7670ee8c547545081cb37f1a" integrity sha512-AilxAyFOAcK5wA1+LeaySVBrHsGQvUFCDWXKpZjzaL0PqW+xfBOttn8GNtWKFWqneyMZj41MWF9Kl6iPWLwgOA== keyv@^4.5.4: version "4.5.4" - resolved "https://registry.npmjs.org/keyv/-/keyv-4.5.4.tgz" + resolved "https://registry.yarnpkg.com/keyv/-/keyv-4.5.4.tgz#a879a99e29452f942439f2a405e3af8b31d4de93" integrity sha512-oxVHkHR/EJf2CNXnWxRLW6mg7JyCCUcG0DtEGmL2ctUo1PNTin1PUil+r/+4r5MpVgC/fn1kjsx7mjSujKqIpw== dependencies: json-buffer "3.0.1" kleur@^3.0.3: version "3.0.3" - resolved "https://registry.npmjs.org/kleur/-/kleur-3.0.3.tgz" + resolved "https://registry.yarnpkg.com/kleur/-/kleur-3.0.3.tgz#a79c9ecc86ee1ce3fa6206d1216c501f147fc07e" integrity sha512-eTIzlVOSUR+JxdDFepEYcBMtZ9Qqdef+rnzWdRZuMbOywu5tO2w2N7rqjoANZ5k9vywhL6Br1VRjUIgTQx4E8w== leven@^3.1.0: version "3.1.0" - resolved "https://registry.npmjs.org/leven/-/leven-3.1.0.tgz" + resolved "https://registry.yarnpkg.com/leven/-/leven-3.1.0.tgz#77891de834064cccba82ae7842bb6b14a13ed7f2" integrity sha512-qsda+H8jTaUaN/x5vzW2rzc+8Rw4TAQ/4KjB46IwK5VH+IlVeeeje/EoZRpiXvIqjFgK84QffqPztGI3VBLG1A== levn@^0.4.1: version "0.4.1" - resolved "https://registry.npmjs.org/levn/-/levn-0.4.1.tgz" + resolved "https://registry.yarnpkg.com/levn/-/levn-0.4.1.tgz#ae4562c007473b932a6200d403268dd2fffc6ade" integrity sha512-+bT2uH4E5LGE7h/n3evcS/sQlJXCpIp6ym8OWJ5eV6+67Dsql/LaaT7qJBAt2rzfoa/5QBGBhxDix1dMt2kQKQ== dependencies: prelude-ls "^1.2.1" @@ -2439,67 +2463,74 @@ levn@^0.4.1: lines-and-columns@^1.1.6: version "1.2.4" - resolved "https://registry.npmjs.org/lines-and-columns/-/lines-and-columns-1.2.4.tgz" + resolved "https://registry.yarnpkg.com/lines-and-columns/-/lines-and-columns-1.2.4.tgz#eca284f75d2965079309dc0ad9255abb2ebc1632" integrity sha512-7ylylesZQ/PV29jhEDl3Ufjo6ZX7gCqJr5F7PKrqc93v7fzSymt1BpwEU8nAUXs8qzzvqhbjhK5QZg6Mt/HkBg== locate-path@^5.0.0: version "5.0.0" - resolved "https://registry.npmjs.org/locate-path/-/locate-path-5.0.0.tgz" + resolved "https://registry.yarnpkg.com/locate-path/-/locate-path-5.0.0.tgz#1afba396afd676a6d42504d0a67a3a7eb9f62aa0" integrity sha512-t7hw9pI+WvuwNJXwk5zVHpyhIqzg2qTlklJOf0mVxGSbe3Fp2VieZcduNYjaLDoy6p9uGpQEGWG87WpMKlNq8g== dependencies: p-locate "^4.1.0" locate-path@^6.0.0: version "6.0.0" - resolved "https://registry.npmjs.org/locate-path/-/locate-path-6.0.0.tgz" + resolved "https://registry.yarnpkg.com/locate-path/-/locate-path-6.0.0.tgz#55321eb309febbc59c4801d931a72452a681d286" integrity sha512-iPZK6eYjbxRu3uB4/WZ3EsEIMJFMqAoopl3R+zuq0UjcAm/MO6KCweDgPfP3elTztoKP3KtnVHxTn2NHBSDVUw== dependencies: p-locate "^5.0.0" lodash.memoize@4.x: version "4.1.2" - resolved "https://registry.npmjs.org/lodash.memoize/-/lodash.memoize-4.1.2.tgz" + resolved "https://registry.yarnpkg.com/lodash.memoize/-/lodash.memoize-4.1.2.tgz#bcc6c49a42a2840ed997f323eada5ecd182e0bfe" integrity sha512-t7j+NzmgnQzTAYXcsHYLgimltOV1MXHtlOWf6GjL9Kj8GK5FInw5JotxvbOs+IvV1/Dzo04/fCGfLVs7aXb4Ag== lodash.merge@^4.6.2: version "4.6.2" - resolved "https://registry.npmjs.org/lodash.merge/-/lodash.merge-4.6.2.tgz" + resolved "https://registry.yarnpkg.com/lodash.merge/-/lodash.merge-4.6.2.tgz#558aa53b43b661e1925a0afdfa36a9a1085fe57a" integrity sha512-0KpjqXRVvrYyCsX1swR/XTK0va6VQkQM6MNo7PqW77ByjAhoARA8EfrP1N4+KlKj8YS0ZUCtRT/YUuhyYDujIQ== lru-cache@^10.4.3: version "10.4.3" - resolved "https://registry.npmjs.org/lru-cache/-/lru-cache-10.4.3.tgz" + resolved "https://registry.yarnpkg.com/lru-cache/-/lru-cache-10.4.3.tgz#410fc8a17b70e598013df257c2446b7f3383f119" integrity sha512-JNAzZcXrCt42VGLuYz0zfAzDfAvJWW6AfYlDBQyDV5DClI2m5sAmK+OIO7s59XfsRsWHp02jAJrRadPRGTt6SQ== lru-cache@^5.1.1: version "5.1.1" - resolved "https://registry.npmjs.org/lru-cache/-/lru-cache-5.1.1.tgz" + resolved "https://registry.yarnpkg.com/lru-cache/-/lru-cache-5.1.1.tgz#1da27e6710271947695daf6848e847f01d84b920" integrity sha512-KpNARQA3Iwv+jTA0utUVVbrh+Jlrr1Fv0e56GGzAFOXN7dk/FviaDW8LHmK52DlcH4WP2n6gI8vN1aesBFgo9w== dependencies: yallist "^3.0.2" +lru-cache@^6.0.0: + version "6.0.0" + resolved "https://registry.yarnpkg.com/lru-cache/-/lru-cache-6.0.0.tgz#6d6fe6570ebd96aaf90fcad1dafa3b2566db3a94" + integrity sha512-Jo6dJ04CmSjuznwJSS3pUeWmd/H0ffTlkXXgwZi+eq1UCmqQwCh+eLsYOYCwY991i2Fah4h1BEMCx4qThGbsiA== + dependencies: + yallist "^4.0.0" + make-dir@^4.0.0: version "4.0.0" - resolved "https://registry.npmjs.org/make-dir/-/make-dir-4.0.0.tgz" + resolved "https://registry.yarnpkg.com/make-dir/-/make-dir-4.0.0.tgz#c3c2307a771277cd9638305f915c29ae741b614e" integrity sha512-hXdUTZYIVOt1Ex//jAQi+wTZZpUpwBj/0QsOzqegb3rGMMeJiSEu5xLHnYfBrRV4RH2+OCSOO95Is/7x1WJ4bw== dependencies: semver "^7.5.3" make-error@1.x, make-error@^1.1.1: version "1.3.6" - resolved "https://registry.npmjs.org/make-error/-/make-error-1.3.6.tgz" + resolved "https://registry.yarnpkg.com/make-error/-/make-error-1.3.6.tgz#2eb2e37ea9b67c4891f684a1394799af484cf7a2" integrity sha512-s8UhlNe7vPKomQhC1qFelMokr/Sc3AgNbso3n74mVPA5LTZwkB9NlXf4XPamLxJE8h0gh73rM94xvwRT2CVInw== makeerror@1.0.12: version "1.0.12" - resolved "https://registry.npmjs.org/makeerror/-/makeerror-1.0.12.tgz" + resolved "https://registry.yarnpkg.com/makeerror/-/makeerror-1.0.12.tgz#3e5dd2079a82e812e983cc6610c4a2cb0eaa801a" integrity sha512-JmqCvUhmt43madlpFzG4BQzG2Z3m6tvQDNKdClZnO3VbIudJYmxsT0FNJMeiB2+JTSlTQTSbU8QdesVmwJcmLg== dependencies: tmpl "1.0.5" marked-terminal@^7.1.0: version "7.2.1" - resolved "https://registry.npmjs.org/marked-terminal/-/marked-terminal-7.2.1.tgz" + resolved "https://registry.yarnpkg.com/marked-terminal/-/marked-terminal-7.2.1.tgz#9c1ae073a245a03c6a13e3eeac6f586f29856068" integrity sha512-rQ1MoMFXZICWNsKMiiHwP/Z+92PLKskTPXj+e7uwXmuMPkNn7iTqC+IvDekVm1MPeC9wYQeLxeFaOvudRR/XbQ== dependencies: ansi-escapes "^7.0.0" @@ -2512,22 +2543,22 @@ marked-terminal@^7.1.0: marked@^9.1.2: version "9.1.6" - resolved "https://registry.npmjs.org/marked/-/marked-9.1.6.tgz" + resolved "https://registry.yarnpkg.com/marked/-/marked-9.1.6.tgz#5d2a3f8180abfbc5d62e3258a38a1c19c0381695" integrity sha512-jcByLnIFkd5gSXZmjNvS1TlmRhCXZjIzHYlaGkPlLIekG55JDR2Z4va9tZwCiP+/RDERiNhMOFu01xd6O5ct1Q== merge-stream@^2.0.0: version "2.0.0" - resolved "https://registry.npmjs.org/merge-stream/-/merge-stream-2.0.0.tgz" + resolved "https://registry.yarnpkg.com/merge-stream/-/merge-stream-2.0.0.tgz#52823629a14dd00c9770fb6ad47dc6310f2c1f60" integrity sha512-abv/qOcuPfk3URPfDzmZU1LKmuw8kT+0nIHvKrKgFrwifol/doWcdA4ZqsWQ8ENrFKkd67Mfpo/LovbIUsbt3w== merge2@^1.3.0: version "1.4.1" - resolved "https://registry.npmjs.org/merge2/-/merge2-1.4.1.tgz" + resolved "https://registry.yarnpkg.com/merge2/-/merge2-1.4.1.tgz#4368892f885e907455a6fd7dc55c0c9d404990ae" integrity sha512-8q7VEgMJW4J8tcfVPy8g09NcQwZdbwFEqhe/WZkoIzjn/3TGDwtOCYtXGxA3O8tPzpczCCDgv+P2P5y00ZJOOg== micromatch@^4.0.4: version "4.0.8" - resolved "https://registry.npmjs.org/micromatch/-/micromatch-4.0.8.tgz" + resolved "https://registry.yarnpkg.com/micromatch/-/micromatch-4.0.8.tgz#d66fa18f3a47076789320b9b1af32bd86d9fa202" integrity sha512-PXwfBhYu0hBCPw8Dn0E+WDYb7af3dSLVWKi3HGv84IdF4TyFoC0ysxFd0Goxw7nSv4T/PzEJQxsYsEiFCKo2BA== dependencies: braces "^3.0.3" @@ -2535,48 +2566,39 @@ micromatch@^4.0.4: mimic-fn@^2.1.0: version "2.1.0" - resolved "https://registry.npmjs.org/mimic-fn/-/mimic-fn-2.1.0.tgz" + resolved "https://registry.yarnpkg.com/mimic-fn/-/mimic-fn-2.1.0.tgz#7ed2c2ccccaf84d3ffcb7a69b57711fc2083401b" integrity sha512-OqbOk5oEQeAZ8WXWydlu9HJjz9WVdEIvamMCcXmuqUYjTknH/sqsWvhQ3vgwKFRR1HpjvNBKQ37nbJgYzGqGcg== -minimatch@^3.0.4, minimatch@^3.1.1, minimatch@^3.1.2: - version "3.1.2" - resolved "https://registry.npmjs.org/minimatch/-/minimatch-3.1.2.tgz" - integrity sha512-J7p63hRiAjw1NDEww1W7i37+ByIrOWO5XQQAzZ3VOcL0PNybwpfmV/N05zFAzwQ9USyEcX6t3UO+K5aqBQOIHw== - dependencies: - brace-expansion "^1.1.7" - -minimatch@^5.0.1: - version "5.1.6" - resolved "https://registry.npmjs.org/minimatch/-/minimatch-5.1.6.tgz" - integrity sha512-lKwV/1brpG6mBUFHtb7NUmtABCb2WZZmm2wNiOA5hAb8VdCS4B3dtMWyvcoViccwAW/COERjXLt0zP1zXUN26g== +minimatch@^3.0.4, minimatch@^3.1.1, minimatch@^3.1.2, minimatch@^5.0.1, minimatch@^9.0.4, minimatch@^9.0.5: + version "9.0.9" + resolved "https://registry.yarnpkg.com/minimatch/-/minimatch-9.0.9.tgz#9b0cb9fcb78087f6fd7eababe2511c4d3d60574e" + integrity sha512-OBwBN9AL4dqmETlpS2zasx+vTeWclWzkblfZk7KTA5j3jeOONz/tRCnZomUyvNg83wL5Zv9Ss6HMJXAgL8R2Yg== dependencies: - brace-expansion "^2.0.1" - -minimatch@^9.0.4: - version "9.0.5" - resolved "https://registry.npmjs.org/minimatch/-/minimatch-9.0.5.tgz" - integrity sha512-G6T0ZX48xgozx7587koeX9Ys2NYy6Gmv//P89sEte9V9whIapMNF4idKxnW2QtCcLiTWlb/wfCabAtAFWhhBow== - dependencies: - brace-expansion "^2.0.1" + brace-expansion "^2.0.2" minimist@^1.2.6: version "1.2.6" - resolved "https://registry.npmjs.org/minimist/-/minimist-1.2.6.tgz" + resolved "https://registry.yarnpkg.com/minimist/-/minimist-1.2.6.tgz#8637a5b759ea0d6e98702cfb3a9283323c93af44" integrity sha512-Jsjnk4bw3YJqYzbdyBiNsPWHPfO++UGG749Cxs6peCu5Xg4nrena6OVxOYxrQTqww0Jmwt+Ref8rggumkTLz9Q== mri@^1.1.0: version "1.2.0" - resolved "https://registry.npmjs.org/mri/-/mri-1.2.0.tgz" + resolved "https://registry.yarnpkg.com/mri/-/mri-1.2.0.tgz#6721480fec2a11a4889861115a48b6cbe7cc8f0b" integrity sha512-tzzskb3bG8LvYGFF/mDTpq3jpI6Q9wc3LEmBaghu+DdCssd1FakN7Bc0hVNmEyGq1bq3RgfkCb3cmQLpNPOroA== +ms@2.1.2: + version "2.1.2" + resolved "https://registry.yarnpkg.com/ms/-/ms-2.1.2.tgz#d09d1f357b443f493382a8eb3ccd183872ae6009" + integrity sha512-sGkPx+VjMtmA6MX27oA4FBFELFCZZ4S4XqeGOXCv68tT+jb3vk/RyaKWP0PTKyWtmLSM0b+adUTEvbs1PEaH2w== + ms@^2.1.3: version "2.1.3" - resolved "https://registry.npmjs.org/ms/-/ms-2.1.3.tgz" + resolved "https://registry.yarnpkg.com/ms/-/ms-2.1.3.tgz#574c8138ce1d2b5861f0b44579dbadd60c6615b2" integrity sha512-6FlzubTLZG3J2a/NVCAleEhjzq5oxgHyaCU9yYXvcLsvoVaHJq/s5xXI6/XXP6tz7R9xAOtHnSO/tXtF3WRTlA== mz@^2.4.0: version "2.7.0" - resolved "https://registry.npmjs.org/mz/-/mz-2.7.0.tgz" + resolved "https://registry.yarnpkg.com/mz/-/mz-2.7.0.tgz#95008057a56cafadc2bc63dde7f9ff6955948e32" integrity sha512-z81GNO7nnYMEhrGh9LeymoE4+Yr0Wn5McHIZMK5cfQCl+NDX08sCZgUc9/6MHni9IWuFLm1Z3HTCXu2z9fN62Q== dependencies: any-promise "^1.0.0" @@ -2585,12 +2607,12 @@ mz@^2.4.0: natural-compare@^1.4.0: version "1.4.0" - resolved "https://registry.npmjs.org/natural-compare/-/natural-compare-1.4.0.tgz" + resolved "https://registry.yarnpkg.com/natural-compare/-/natural-compare-1.4.0.tgz#4abebfeed7541f2c27acfb29bdbbd15c8d5ba4f7" integrity sha512-OWND8ei3VtNC9h7V60qff3SVobHr996CTwgxubgyQYEpg290h9J0buyECNNJexkFm5sOajh5G116RYA1c8ZMSw== node-emoji@^2.1.3: version "2.1.3" - resolved "https://registry.npmjs.org/node-emoji/-/node-emoji-2.1.3.tgz" + resolved "https://registry.yarnpkg.com/node-emoji/-/node-emoji-2.1.3.tgz#93cfabb5cc7c3653aa52f29d6ffb7927d8047c06" integrity sha512-E2WEOVsgs7O16zsURJ/eH8BqhF029wGpEOnv7Urwdo2wmQanOACwJQh0devF9D9RhoZru0+9JXIS0dBXIAz+lA== dependencies: "@sindresorhus/is" "^4.6.0" @@ -2600,34 +2622,34 @@ node-emoji@^2.1.3: node-int64@^0.4.0: version "0.4.0" - resolved "https://registry.npmjs.org/node-int64/-/node-int64-0.4.0.tgz" + resolved "https://registry.yarnpkg.com/node-int64/-/node-int64-0.4.0.tgz#87a9065cdb355d3182d8f94ce11188b825c68a3b" integrity sha512-O5lz91xSOeoXP6DulyHfllpq+Eg00MWitZIbtPfoSEvqIHdl5gfcY6hYzDWnj0qD5tz52PI08u9qUvSVeUBeHw== -node-releases@^2.0.14: - version "2.0.14" - resolved "https://registry.npmjs.org/node-releases/-/node-releases-2.0.14.tgz" - integrity sha512-y10wOWt8yZpqXmOgRo77WaHEmhYQYGNA6y421PKsKYWEK8aW+cqAphborZDhqfyKrbZEN92CN1X2KbafY2s7Yw== +node-releases@^2.0.27: + version "2.0.27" + resolved "https://registry.yarnpkg.com/node-releases/-/node-releases-2.0.27.tgz#eedca519205cf20f650f61d56b070db111231e4e" + integrity sha512-nmh3lCkYZ3grZvqcCH+fjmQ7X+H0OeZgP40OierEaAptX4XofMh5kwNbWh7lBduUzCcV/8kZ+NDLCwm2iorIlA== normalize-path@^3.0.0: version "3.0.0" - resolved "https://registry.npmjs.org/normalize-path/-/normalize-path-3.0.0.tgz" + resolved "https://registry.yarnpkg.com/normalize-path/-/normalize-path-3.0.0.tgz#0dcd69ff23a1c9b11fd0978316644a0388216a65" integrity sha512-6eZs5Ls3WtCisHWp9S2GUy8dqkpGi4BVSz3GaqiE6ezub0512ESztXUwUB6C6IKbQkY2Pnb/mD4WYojCRwcwLA== npm-bundled@^2.0.0: version "2.0.1" - resolved "https://registry.npmjs.org/npm-bundled/-/npm-bundled-2.0.1.tgz" + resolved "https://registry.yarnpkg.com/npm-bundled/-/npm-bundled-2.0.1.tgz#94113f7eb342cd7a67de1e789f896b04d2c600f4" integrity sha512-gZLxXdjEzE/+mOstGDqR6b0EkhJ+kM6fxM6vUuckuctuVPh80Q6pw/rSZj9s4Gex9GxWtIicO1pc8DB9KZWudw== dependencies: npm-normalize-package-bin "^2.0.0" npm-normalize-package-bin@^2.0.0: version "2.0.0" - resolved "https://registry.npmjs.org/npm-normalize-package-bin/-/npm-normalize-package-bin-2.0.0.tgz" + resolved "https://registry.yarnpkg.com/npm-normalize-package-bin/-/npm-normalize-package-bin-2.0.0.tgz#9447a1adaaf89d8ad0abe24c6c84ad614a675fff" integrity sha512-awzfKUO7v0FscrSpRoogyNm0sajikhBWpU0QMrW09AMi9n1PoKU6WaIqUzuJSQnpciZZmJ/jMZ2Egfmb/9LiWQ== npm-packlist@^5.1.3: version "5.1.3" - resolved "https://registry.npmjs.org/npm-packlist/-/npm-packlist-5.1.3.tgz" + resolved "https://registry.yarnpkg.com/npm-packlist/-/npm-packlist-5.1.3.tgz#69d253e6fd664b9058b85005905012e00e69274b" integrity sha512-263/0NGrn32YFYi4J533qzrQ/krmmrWwhKkzwTuM4f/07ug51odoaNjUexxO4vxlzURHcmYMH1QjvHjsNDKLVg== dependencies: glob "^8.0.1" @@ -2637,33 +2659,33 @@ npm-packlist@^5.1.3: npm-run-path@^4.0.1: version "4.0.1" - resolved "https://registry.npmjs.org/npm-run-path/-/npm-run-path-4.0.1.tgz" + resolved "https://registry.yarnpkg.com/npm-run-path/-/npm-run-path-4.0.1.tgz#b7ecd1e5ed53da8e37a55e1c2269e0b97ed748ea" integrity sha512-S48WzZW777zhNIrn7gxOlISNAqi9ZC/uQFnRdbeIHhZhCA6UqpkOT8T1G7BvfdgP4Er8gF4sUbaS0i7QvIfCWw== dependencies: path-key "^3.0.0" object-assign@^4.0.1: version "4.1.1" - resolved "https://registry.npmjs.org/object-assign/-/object-assign-4.1.1.tgz" + resolved "https://registry.yarnpkg.com/object-assign/-/object-assign-4.1.1.tgz#2109adc7965887cfc05cbbd442cac8bfbb360863" integrity sha512-rJgTQnkUnH1sFw8yT6VSU3zD3sWmu6sZhIseY8VX+GRu3P6F7Fu+JNDoXfklElbLJSnc3FUQHVe4cU5hj+BcUg== once@^1.3.0: version "1.4.0" - resolved "https://registry.npmjs.org/once/-/once-1.4.0.tgz" + resolved "https://registry.yarnpkg.com/once/-/once-1.4.0.tgz#583b1aa775961d4b113ac17d9c50baef9dd76bd1" integrity sha512-lNaJgI+2Q5URQBkccEKHTQOPaXdUxnZZElQTZY0MFUAuaEqe1E+Nyvgdz/aIyNi6Z9MzO5dv1H8n58/GELp3+w== dependencies: wrappy "1" onetime@^5.1.2: version "5.1.2" - resolved "https://registry.npmjs.org/onetime/-/onetime-5.1.2.tgz" + resolved "https://registry.yarnpkg.com/onetime/-/onetime-5.1.2.tgz#d0e96ebb56b07476df1dd9c4806e5237985ca45e" integrity sha512-kbpaSSGJTWdAY5KPVeMOKXSrPtr8C8C7wodJbcsd51jRnmD+GZu8Y0VoU6Dm5Z4vWr0Ig/1NKuWRKf7j5aaYSg== dependencies: mimic-fn "^2.1.0" optionator@^0.9.3: version "0.9.3" - resolved "https://registry.npmjs.org/optionator/-/optionator-0.9.3.tgz" + resolved "https://registry.yarnpkg.com/optionator/-/optionator-0.9.3.tgz#007397d44ed1872fdc6ed31360190f81814e2c64" integrity sha512-JjCoypp+jKn1ttEFExxhetCKeJt9zhAgAve5FXHixTvFDW/5aEktX9bufBKLRRMdU7bNtpLfcGu94B3cdEJgjg== dependencies: "@aashutoshrathi/word-wrap" "^1.2.3" @@ -2675,61 +2697,61 @@ optionator@^0.9.3: p-all@^3.0.0: version "3.0.0" - resolved "https://registry.npmjs.org/p-all/-/p-all-3.0.0.tgz" + resolved "https://registry.yarnpkg.com/p-all/-/p-all-3.0.0.tgz#077c023c37e75e760193badab2bad3ccd5782bfb" integrity sha512-qUZbvbBFVXm6uJ7U/WDiO0fv6waBMbjlCm4E66oZdRR+egswICarIdHyVSZZHudH8T5SF8x/JG0q0duFzPnlBw== dependencies: p-map "^4.0.0" p-limit@^2.2.0: version "2.3.0" - resolved "https://registry.npmjs.org/p-limit/-/p-limit-2.3.0.tgz" + resolved "https://registry.yarnpkg.com/p-limit/-/p-limit-2.3.0.tgz#3dd33c647a214fdfffd835933eb086da0dc21db1" integrity sha512-//88mFWSJx8lxCzwdAABTJL2MyWB12+eIY7MDL2SqLmAkeKU9qxRvWuSyTjm3FUmpBEMuFfckAIqEaVGUDxb6w== dependencies: p-try "^2.0.0" p-limit@^3.0.2, p-limit@^3.1.0: version "3.1.0" - resolved "https://registry.npmjs.org/p-limit/-/p-limit-3.1.0.tgz" + resolved "https://registry.yarnpkg.com/p-limit/-/p-limit-3.1.0.tgz#e1daccbe78d0d1388ca18c64fea38e3e57e3706b" integrity sha512-TYOanM3wGwNGsZN2cVTYPArw454xnXj5qmWF1bEoAc4+cU/ol7GVh7odevjp1FNHduHc3KZMcFduxU5Xc6uJRQ== dependencies: yocto-queue "^0.1.0" p-locate@^4.1.0: version "4.1.0" - resolved "https://registry.npmjs.org/p-locate/-/p-locate-4.1.0.tgz" + resolved "https://registry.yarnpkg.com/p-locate/-/p-locate-4.1.0.tgz#a3428bb7088b3a60292f66919278b7c297ad4f07" integrity sha512-R79ZZ/0wAxKGu3oYMlz8jy/kbhsNrS7SKZ7PxEHBgJ5+F2mtFW2fK2cOtBh1cHYkQsbzFV7I+EoRKe6Yt0oK7A== dependencies: p-limit "^2.2.0" p-locate@^5.0.0: version "5.0.0" - resolved "https://registry.npmjs.org/p-locate/-/p-locate-5.0.0.tgz" + resolved "https://registry.yarnpkg.com/p-locate/-/p-locate-5.0.0.tgz#83c8315c6785005e3bd021839411c9e110e6d834" integrity sha512-LaNjtRWUBY++zB5nE/NwcaoMylSPk+S+ZHNB1TzdbMJMny6dynpAGt7X/tl/QYq3TIeE6nxHppbo2LGymrG5Pw== dependencies: p-limit "^3.0.2" p-map@^4.0.0: version "4.0.0" - resolved "https://registry.npmjs.org/p-map/-/p-map-4.0.0.tgz" + resolved "https://registry.yarnpkg.com/p-map/-/p-map-4.0.0.tgz#bb2f95a5eda2ec168ec9274e06a747c3e2904d2b" integrity sha512-/bjOqmgETBYB5BoEeGVea8dmvHb2m9GLy1E9W43yeyfP6QQCZGFNa+XRceJEuDB6zqr+gKpIAmlLebMpykw/MQ== dependencies: aggregate-error "^3.0.0" p-try@^2.0.0: version "2.2.0" - resolved "https://registry.npmjs.org/p-try/-/p-try-2.2.0.tgz" + resolved "https://registry.yarnpkg.com/p-try/-/p-try-2.2.0.tgz#cb2868540e313d61de58fafbe35ce9004d5540e6" integrity sha512-R4nPAVTAU0B9D35/Gk3uJf/7XYbQcyohSKdvAxIRSNghFl4e71hVoGnBNQz9cWaXxO2I10KTC+3jMdvvoKw6dQ== parent-module@^1.0.0: version "1.0.1" - resolved "https://registry.npmjs.org/parent-module/-/parent-module-1.0.1.tgz" + resolved "https://registry.yarnpkg.com/parent-module/-/parent-module-1.0.1.tgz#691d2709e78c79fae3a156622452d00762caaaa2" integrity sha512-GQ2EWRpQV8/o+Aw8YqtfZZPfNRWZYkbidE9k5rpl/hC3vtHHBfGm2Ifi6qWV+coDGkrUKZAxE3Lot5kcsRlh+g== dependencies: callsites "^3.0.0" parse-json@^5.2.0: version "5.2.0" - resolved "https://registry.npmjs.org/parse-json/-/parse-json-5.2.0.tgz" + resolved "https://registry.yarnpkg.com/parse-json/-/parse-json-5.2.0.tgz#c76fc66dee54231c962b22bcc8a72cf2f99753cd" integrity sha512-ayCKvm/phCGxOkYRSCM82iDwct8/EonSEgCSxWxD7ve6jHggsFl4fZVQBPRNgQoKiuV/odhFrGzQXZwbifC8Rg== dependencies: "@babel/code-frame" "^7.0.0" @@ -2739,83 +2761,76 @@ parse-json@^5.2.0: parse5-htmlparser2-tree-adapter@^6.0.0: version "6.0.1" - resolved "https://registry.npmjs.org/parse5-htmlparser2-tree-adapter/-/parse5-htmlparser2-tree-adapter-6.0.1.tgz" + resolved "https://registry.yarnpkg.com/parse5-htmlparser2-tree-adapter/-/parse5-htmlparser2-tree-adapter-6.0.1.tgz#2cdf9ad823321140370d4dbf5d3e92c7c8ddc6e6" integrity sha512-qPuWvbLgvDGilKc5BoicRovlT4MtYT6JfJyBOMDsKoiT+GiuP5qyrPCnR9HcPECIJJmZh5jRndyNThnhhb/vlA== dependencies: parse5 "^6.0.1" parse5@^5.1.1: version "5.1.1" - resolved "https://registry.npmjs.org/parse5/-/parse5-5.1.1.tgz" + resolved "https://registry.yarnpkg.com/parse5/-/parse5-5.1.1.tgz#f68e4e5ba1852ac2cadc00f4555fff6c2abb6178" integrity sha512-ugq4DFI0Ptb+WWjAdOK16+u/nHfiIrcE+sh8kZMaM0WllQKLI9rOUq6c2b7cwPkXdzfQESqvoqK6ug7U/Yyzug== parse5@^6.0.1: version "6.0.1" - resolved "https://registry.npmjs.org/parse5/-/parse5-6.0.1.tgz" + resolved "https://registry.yarnpkg.com/parse5/-/parse5-6.0.1.tgz#e1a1c085c569b3dc08321184f19a39cc27f7c30b" integrity sha512-Ofn/CTFzRGTTxwpNEs9PP93gXShHcTq255nzRYSKe8AkVpZY7e1fpmTfOyoIvjP5HG7Z2ZM7VS9PPhQGW2pOpw== path-exists@^4.0.0: version "4.0.0" - resolved "https://registry.npmjs.org/path-exists/-/path-exists-4.0.0.tgz" + resolved "https://registry.yarnpkg.com/path-exists/-/path-exists-4.0.0.tgz#513bdbe2d3b95d7762e8c1137efa195c6c61b5b3" integrity sha512-ak9Qy5Q7jYb2Wwcey5Fpvg2KoAc/ZIhLSLOSBmRmygPsGwkVVt0fZa0qrtMz+m6tJTAHfZQ8FnmB4MG4LWy7/w== path-is-absolute@^1.0.0: version "1.0.1" - resolved "https://registry.npmjs.org/path-is-absolute/-/path-is-absolute-1.0.1.tgz" + resolved "https://registry.yarnpkg.com/path-is-absolute/-/path-is-absolute-1.0.1.tgz#174b9268735534ffbc7ace6bf53a5a9e1b5c5f5f" integrity sha512-AVbw3UJ2e9bq64vSaS9Am0fje1Pa8pbGqTTsmXfaIiMpnr5DlDhfJOuLj9Sf95ZPVDAUerDfEk88MPmPe7UCQg== path-key@^3.0.0, path-key@^3.1.0: version "3.1.1" - resolved "https://registry.npmjs.org/path-key/-/path-key-3.1.1.tgz" + resolved "https://registry.yarnpkg.com/path-key/-/path-key-3.1.1.tgz#581f6ade658cbba65a0d3380de7753295054f375" integrity sha512-ojmeN0qd+y0jszEtoY48r0Peq5dwMEkIlCOu6Q5f41lfkswXuKtYrhgoTpLnyIcHm24Uhqx+5Tqm2InSwLhE6Q== path-parse@^1.0.7: version "1.0.7" - resolved "https://registry.npmjs.org/path-parse/-/path-parse-1.0.7.tgz" + resolved "https://registry.yarnpkg.com/path-parse/-/path-parse-1.0.7.tgz#fbc114b60ca42b30d9daf5858e4bd68bbedb6735" integrity sha512-LDJzPVEEEPR+y48z93A0Ed0yXb8pAByGWo/k5YYdYgpY2/2EsOsksJrq7lOHxryrVOn1ejG6oAp8ahvOIQD8sw== -picocolors@^1.0.0, picocolors@^1.1.1: +picocolors@^1.1.1: version "1.1.1" - resolved "https://registry.npmjs.org/picocolors/-/picocolors-1.1.1.tgz" + resolved "https://registry.yarnpkg.com/picocolors/-/picocolors-1.1.1.tgz#3d321af3eab939b083c8f929a1d12cda81c26b6b" integrity sha512-xceH2snhtb5M9liqDsmEw56le376mTZkEX/jEb/RxNFyegNul7eNslCXP9FDj/Lcu0X8KEyMceP2ntpaHrDEVA== picomatch@^2.0.4, picomatch@^2.2.3, picomatch@^2.3.1: version "2.3.1" - resolved "https://registry.npmjs.org/picomatch/-/picomatch-2.3.1.tgz" + resolved "https://registry.yarnpkg.com/picomatch/-/picomatch-2.3.1.tgz#3ba3833733646d9d3e4995946c1365a67fb07a42" integrity sha512-JU3teHTNjmE2VCGFzuY8EXzCDVwEqB2a8fsIvwaStHhAWJEeVd1o1QD80CU6+ZdEXXSLbSsuLwJjkCBWqRQUVA== pirates@^4.0.4: version "4.0.6" - resolved "https://registry.npmjs.org/pirates/-/pirates-4.0.6.tgz" + resolved "https://registry.yarnpkg.com/pirates/-/pirates-4.0.6.tgz#3018ae32ecfcff6c29ba2267cbf21166ac1f36b9" integrity sha512-saLsH7WeYYPiD25LDuLRRY/i+6HaPYr6G1OUlN39otzkSTxKnubR9RTxS3/Kk50s1g2JTgFwWQDQyplC5/SHZg== pkg-dir@^4.2.0: version "4.2.0" - resolved "https://registry.npmjs.org/pkg-dir/-/pkg-dir-4.2.0.tgz" + resolved "https://registry.yarnpkg.com/pkg-dir/-/pkg-dir-4.2.0.tgz#f099133df7ede422e81d1d8448270eeb3e4261f3" integrity sha512-HRDzbaKjC+AOWVXxAU/x54COGeIv9eb+6CkDSQoNTt4XyWoIJvuPsXizxu/Fr23EiekbtZwmh1IcIG/l/a10GQ== dependencies: find-up "^4.0.0" prelude-ls@^1.2.1: version "1.2.1" - resolved "https://registry.npmjs.org/prelude-ls/-/prelude-ls-1.2.1.tgz" + resolved "https://registry.yarnpkg.com/prelude-ls/-/prelude-ls-1.2.1.tgz#debc6489d7a6e6b0e7611888cec880337d316396" integrity sha512-vkcDPrRZo1QZLbn5RLGPpg/WmIQ65qoWWhcGKf/b5eplkkarX0m9z8ppCat4mlOqUsWpyNuYgO3VRyrYHSzX5g== -prettier-linter-helpers@^1.0.0: - version "1.0.0" - resolved "https://registry.npmjs.org/prettier-linter-helpers/-/prettier-linter-helpers-1.0.0.tgz" - integrity sha512-GbK2cP9nraSSUF9N2XwUwqfzlAFlMNYYl+ShE/V+H8a9uNl/oUqB1w2EL54Jh0OlyRSd8RfWYJ3coVS4TROP2w== - dependencies: - fast-diff "^1.1.2" - prettier@^3.0.0: version "3.1.1" - resolved "https://registry.npmjs.org/prettier/-/prettier-3.1.1.tgz" + resolved "https://registry.yarnpkg.com/prettier/-/prettier-3.1.1.tgz#6ba9f23165d690b6cbdaa88cb0807278f7019848" integrity sha512-22UbSzg8luF4UuZtzgiUOfcGM8s4tjBv6dJRT7j275NXsy2jb4aJa4NNveul5x4eqlF1wuhuR2RElK71RvmVaw== pretty-format@^29.0.0, pretty-format@^29.7.0: version "29.7.0" - resolved "https://registry.npmjs.org/pretty-format/-/pretty-format-29.7.0.tgz" + resolved "https://registry.yarnpkg.com/pretty-format/-/pretty-format-29.7.0.tgz#ca42c758310f365bfa71a0bda0a807160b776812" integrity sha512-Pdlw/oPxN+aXdmM9R00JVC9WVFoCLTKJvDVLgmJ+qAffBMxsV85l/Lu7sNx4zSzPyoL2euImuEwHhOXdEgNFZQ== dependencies: "@jest/schemas" "^29.6.3" @@ -2824,7 +2839,7 @@ pretty-format@^29.0.0, pretty-format@^29.7.0: prompts@^2.0.1: version "2.4.2" - resolved "https://registry.npmjs.org/prompts/-/prompts-2.4.2.tgz" + resolved "https://registry.yarnpkg.com/prompts/-/prompts-2.4.2.tgz#7b57e73b3a48029ad10ebd44f74b01722a4cb069" integrity sha512-NxNv/kLguCA7p3jE8oL2aEBsrJWgAakBpgmgK6lpPWV+WuOmY6r2/zbAVnP+T8bQlA0nzHXSJSJW0Hq7ylaD2Q== dependencies: kleur "^3.0.3" @@ -2832,7 +2847,7 @@ prompts@^2.0.1: publint@^0.2.12: version "0.2.12" - resolved "https://registry.npmjs.org/publint/-/publint-0.2.12.tgz" + resolved "https://registry.yarnpkg.com/publint/-/publint-0.2.12.tgz#d25cd6bd243d5bdd640344ecdddb3eeafdcc4059" integrity sha512-YNeUtCVeM4j9nDiTT2OPczmlyzOkIXNtdDZnSuajAxS/nZ6j3t7Vs9SUB4euQNddiltIwu7Tdd3s+hr08fAsMw== dependencies: npm-packlist "^5.1.3" @@ -2841,27 +2856,27 @@ publint@^0.2.12: punycode@^2.1.0: version "2.3.0" - resolved "https://registry.npmjs.org/punycode/-/punycode-2.3.0.tgz" + resolved "https://registry.yarnpkg.com/punycode/-/punycode-2.3.0.tgz#f67fa67c94da8f4d0cfff981aee4118064199b8f" integrity sha512-rRV+zQD8tVFys26lAGR9WUuS4iUAngJScM+ZRSKtvl5tKeZ2t5bvdNFdNHBW9FWR4guGHlgmsZ1G7BSm2wTbuA== pure-rand@^6.0.0: version "6.0.4" - resolved "https://registry.npmjs.org/pure-rand/-/pure-rand-6.0.4.tgz" + resolved "https://registry.yarnpkg.com/pure-rand/-/pure-rand-6.0.4.tgz#50b737f6a925468679bff00ad20eade53f37d5c7" integrity sha512-LA0Y9kxMYv47GIPJy6MI84fqTd2HmYZI83W/kM/SkKfDlajnZYfmXFTxkbY+xSBPkLJxltMa9hIkmdc29eguMA== queue-microtask@^1.2.2: version "1.2.3" - resolved "https://registry.npmjs.org/queue-microtask/-/queue-microtask-1.2.3.tgz" + resolved "https://registry.yarnpkg.com/queue-microtask/-/queue-microtask-1.2.3.tgz#4929228bbc724dfac43e0efb058caf7b6cfb6243" integrity sha512-NuaNSa6flKT5JaSYQzJok04JzTL1CA6aGhv5rfLW3PgqA+M2ChpZQnAC8h8i4ZFkBS8X5RqkDBHA7r4hej3K9A== react-is@^18.0.0: version "18.2.0" - resolved "https://registry.npmjs.org/react-is/-/react-is-18.2.0.tgz" + resolved "https://registry.yarnpkg.com/react-is/-/react-is-18.2.0.tgz#199431eeaaa2e09f86427efbb4f1473edb47609b" integrity sha512-xWGDIW6x921xtzPkhiULtthJHoJvBbF3q26fzloPCK0hsvxtPVelvftw3zjbHWSkR2km9Z+4uxbDDK/6Zw9B8w== readable-stream@^3.4.0: version "3.6.2" - resolved "https://registry.npmjs.org/readable-stream/-/readable-stream-3.6.2.tgz" + resolved "https://registry.yarnpkg.com/readable-stream/-/readable-stream-3.6.2.tgz#56a9b36ea965c00c5a93ef31eb111a0f11056967" integrity sha512-9u/sniCrY3D5WdsERHzHE4G2YCXqoG5FTHUiCC4SIbr6XcLZBY05ya9EKjYek9O5xOAwjGq+1JdGBAS7Q9ScoA== dependencies: inherits "^2.0.3" @@ -2870,34 +2885,34 @@ readable-stream@^3.4.0: require-directory@^2.1.1: version "2.1.1" - resolved "https://registry.npmjs.org/require-directory/-/require-directory-2.1.1.tgz" + resolved "https://registry.yarnpkg.com/require-directory/-/require-directory-2.1.1.tgz#8c64ad5fd30dab1c976e2344ffe7f792a6a6df42" integrity sha512-fGxEI7+wsG9xrvdjsrlmL22OMTTiHRwAMroiEeMgq8gzoLC/PQr7RsRDSTLUg/bZAZtF+TVIkHc6/4RIKrui+Q== resolve-cwd@^3.0.0: version "3.0.0" - resolved "https://registry.npmjs.org/resolve-cwd/-/resolve-cwd-3.0.0.tgz" + resolved "https://registry.yarnpkg.com/resolve-cwd/-/resolve-cwd-3.0.0.tgz#0f0075f1bb2544766cf73ba6a6e2adfebcb13f2d" integrity sha512-OrZaX2Mb+rJCpH/6CpSqt9xFVpN++x01XnN2ie9g6P5/3xelLAkXWVADpdz1IHD/KFfEXyE6V0U01OQ3UO2rEg== dependencies: resolve-from "^5.0.0" resolve-from@^4.0.0: version "4.0.0" - resolved "https://registry.npmjs.org/resolve-from/-/resolve-from-4.0.0.tgz" + resolved "https://registry.yarnpkg.com/resolve-from/-/resolve-from-4.0.0.tgz#4abcd852ad32dd7baabfe9b40e00a36db5f392e6" integrity sha512-pb/MYmXstAkysRFx8piNI1tGFNQIFA3vkE3Gq4EuA1dF6gHp/+vgZqsCGJapvy8N3Q+4o7FwvquPJcnZ7RYy4g== resolve-from@^5.0.0: version "5.0.0" - resolved "https://registry.npmjs.org/resolve-from/-/resolve-from-5.0.0.tgz" + resolved "https://registry.yarnpkg.com/resolve-from/-/resolve-from-5.0.0.tgz#c35225843df8f776df21c57557bc087e9dfdfc69" integrity sha512-qYg9KP24dD5qka9J47d0aVky0N+b4fTU89LN9iDnjB5waksiC49rvMB0PrUJQGoTmH50XPiqOvAjDfaijGxYZw== resolve.exports@^2.0.0: version "2.0.2" - resolved "https://registry.npmjs.org/resolve.exports/-/resolve.exports-2.0.2.tgz" + resolved "https://registry.yarnpkg.com/resolve.exports/-/resolve.exports-2.0.2.tgz#f8c934b8e6a13f539e38b7098e2e36134f01e800" integrity sha512-X2UW6Nw3n/aMgDVy+0rSqgHlv39WZAlZrXCdnbyEiKm17DSqHX4MmQMaST3FbeWR5FTuRcUwYAziZajji0Y7mg== resolve@^1.20.0: version "1.22.8" - resolved "https://registry.npmjs.org/resolve/-/resolve-1.22.8.tgz" + resolved "https://registry.yarnpkg.com/resolve/-/resolve-1.22.8.tgz#b6c87a9f2aa06dfab52e3d70ac8cde321fa5a48d" integrity sha512-oKWePCxqpd6FlLvGV1VU0x7bkPmmCNolxzjMf4NczoDnQcIWrAF+cPtZn5i6n+RfD2d9i0tzpKnG6Yk168yIyw== dependencies: is-core-module "^2.13.0" @@ -2906,80 +2921,92 @@ resolve@^1.20.0: reusify@^1.0.4: version "1.0.4" - resolved "https://registry.npmjs.org/reusify/-/reusify-1.0.4.tgz" + resolved "https://registry.yarnpkg.com/reusify/-/reusify-1.0.4.tgz#90da382b1e126efc02146e90845a88db12925d76" integrity sha512-U9nH88a3fc/ekCF1l0/UP1IosiuIjyTh7hBvXVMHYgVcfGvt897Xguj2UOLDeI5BG2m7/uwyaLVT6fbtCwTyzw== run-parallel@^1.1.9: version "1.2.0" - resolved "https://registry.npmjs.org/run-parallel/-/run-parallel-1.2.0.tgz" + resolved "https://registry.yarnpkg.com/run-parallel/-/run-parallel-1.2.0.tgz#66d1368da7bdf921eb9d95bd1a9229e7f21a43ee" integrity sha512-5l4VyZR86LZ/lDxZTR6jqL8AFE2S0IFLMP26AbjsLVADxHdhB/c0GUsH+y39UfCi3dzz8OlQuPmnaJOMoDHQBA== dependencies: queue-microtask "^1.2.2" sade@^1.8.1: version "1.8.1" - resolved "https://registry.npmjs.org/sade/-/sade-1.8.1.tgz" + resolved "https://registry.yarnpkg.com/sade/-/sade-1.8.1.tgz#0a78e81d658d394887be57d2a409bf703a3b2701" integrity sha512-xal3CZX1Xlo/k4ApwCFrHVACi9fBqJ7V+mwhBsuf/1IOKbBy098Fex+Wa/5QMubw09pSZ/u8EY8PWgevJsXp1A== dependencies: mri "^1.1.0" safe-buffer@~5.2.0: version "5.2.1" - resolved "https://registry.npmjs.org/safe-buffer/-/safe-buffer-5.2.1.tgz" + resolved "https://registry.yarnpkg.com/safe-buffer/-/safe-buffer-5.2.1.tgz#1eaf9fa9bdb1fdd4ec75f58f9cdb4e6b7827eec6" integrity sha512-rp3So07KcdmmKbGvgaNxQSJr7bGVSVk5S9Eq1F+ppbRo70+YeaDxkw5Dd8NPN+GD6bjnYm2VuPuCXmpuYvmCXQ== "safer-buffer@>= 2.1.2 < 3.0.0": version "2.1.2" - resolved "https://registry.npmjs.org/safer-buffer/-/safer-buffer-2.1.2.tgz" + resolved "https://registry.yarnpkg.com/safer-buffer/-/safer-buffer-2.1.2.tgz#44fa161b0187b9549dd84bb91802f9bd8385cd6a" integrity sha512-YZo3K82SD7Riyi0E1EQPojLz7kpepnSQI9IyPbHHg1XXXevb5dJI7tpyN2ADxGcQbHG7vcyRHk0cbwqcQriUtg== semver@^6.3.0, semver@^6.3.1: version "6.3.1" - resolved "https://registry.npmjs.org/semver/-/semver-6.3.1.tgz" + resolved "https://registry.yarnpkg.com/semver/-/semver-6.3.1.tgz#556d2ef8689146e46dcea4bfdd095f3434dffcb4" integrity sha512-BR7VvDCVHO+q2xBEWskxS6DJE1qRnb7DxzUrogb71CWoSficBxYsiAGd+Kl0mmq/MprG9yArRkyrQxTO6XjMzA== -semver@^7.5.3, semver@^7.5.4, semver@^7.6.0: +semver@^7.5.3: + version "7.5.4" + resolved "https://registry.yarnpkg.com/semver/-/semver-7.5.4.tgz#483986ec4ed38e1c6c48c34894a9182dbff68a6e" + integrity sha512-1bCSESV6Pv+i21Hvpxp3Dx+pSD8lIPt8uVjRrxAUt/nbswYc+tK6Y2btiULjd4+fnq15PX+nqQDC7Oft7WkwcA== + dependencies: + lru-cache "^6.0.0" + +semver@^7.5.4: version "7.6.3" - resolved "https://registry.npmjs.org/semver/-/semver-7.6.3.tgz" + resolved "https://registry.yarnpkg.com/semver/-/semver-7.6.3.tgz#980f7b5550bc175fb4dc09403085627f9eb33143" integrity sha512-oVekP1cKtI+CTDvHWYFUcMtsK/00wmAEfyqKfNdARm8u1wNVhSgaX7A8d4UuIlUI5e84iEwOhs7ZPYRmzU9U6A== +semver@^7.6.0: + version "7.7.1" + resolved "https://registry.yarnpkg.com/semver/-/semver-7.7.1.tgz#abd5098d82b18c6c81f6074ff2647fd3e7220c9f" + integrity sha512-hlq8tAfn0m/61p4BVRcPzIGr6LKiMwo4VM6dGi6pt4qcRkmNzTcWq6eCEjEh+qXjkMDvPlOFFSGwQjoEa6gyMA== + shebang-command@^2.0.0: version "2.0.0" - resolved "https://registry.npmjs.org/shebang-command/-/shebang-command-2.0.0.tgz" + resolved "https://registry.yarnpkg.com/shebang-command/-/shebang-command-2.0.0.tgz#ccd0af4f8835fbdc265b82461aaf0c36663f34ea" integrity sha512-kHxr2zZpYtdmrN1qDjrrX/Z1rR1kG8Dx+gkpK1G4eXmvXswmcE1hTWBWYUzlraYw1/yZp6YuDY77YtvbN0dmDA== dependencies: shebang-regex "^3.0.0" shebang-regex@^3.0.0: version "3.0.0" - resolved "https://registry.npmjs.org/shebang-regex/-/shebang-regex-3.0.0.tgz" + resolved "https://registry.yarnpkg.com/shebang-regex/-/shebang-regex-3.0.0.tgz#ae16f1644d873ecad843b0307b143362d4c42172" integrity sha512-7++dFhtcx3353uBaq8DDR4NuxBetBzC7ZQOhmTQInHEd6bSrXdiEyzCvG07Z44UYdLShWUyXt5M/yhz8ekcb1A== signal-exit@^3.0.3, signal-exit@^3.0.7: version "3.0.7" - resolved "https://registry.npmjs.org/signal-exit/-/signal-exit-3.0.7.tgz" + resolved "https://registry.yarnpkg.com/signal-exit/-/signal-exit-3.0.7.tgz#a9a1767f8af84155114eaabd73f99273c8f59ad9" integrity sha512-wnD2ZE+l+SPC/uoS0vXeE9L1+0wuaMqKlfz9AMUo38JsyLSBWSFcHR1Rri62LZc12vLr1gb3jl7iwQhgwpAbGQ== sisteransi@^1.0.5: version "1.0.5" - resolved "https://registry.npmjs.org/sisteransi/-/sisteransi-1.0.5.tgz" + resolved "https://registry.yarnpkg.com/sisteransi/-/sisteransi-1.0.5.tgz#134d681297756437cc05ca01370d3a7a571075ed" integrity sha512-bLGGlR1QxBcynn2d5YmDX4MGjlZvy2MRBDRNHLJ8VI6l6+9FUiyTFNJ0IveOSP0bcXgVDPRcfGqA0pjaqUpfVg== skin-tone@^2.0.0: version "2.0.0" - resolved "https://registry.npmjs.org/skin-tone/-/skin-tone-2.0.0.tgz" + resolved "https://registry.yarnpkg.com/skin-tone/-/skin-tone-2.0.0.tgz#4e3933ab45c0d4f4f781745d64b9f4c208e41237" integrity sha512-kUMbT1oBJCpgrnKoSr0o6wPtvRWT9W9UKvGLwfJYO2WuahZRHOpEyL1ckyMGgMWh0UdpmaoFqKKD29WTomNEGA== dependencies: unicode-emoji-modifier-base "^1.0.0" slash@^3.0.0: version "3.0.0" - resolved "https://registry.npmjs.org/slash/-/slash-3.0.0.tgz" + resolved "https://registry.yarnpkg.com/slash/-/slash-3.0.0.tgz#6539be870c165adbd5240220dbe361f1bc4d4634" integrity sha512-g9Q1haeby36OSStwb4ntCGGGaKsaVSjQ68fBxoQcutl5fS1vuY18H3wSt3jFyFtrkx+Kz0V1G85A4MyAdDMi2Q== source-map-support@0.5.13: version "0.5.13" - resolved "https://registry.npmjs.org/source-map-support/-/source-map-support-0.5.13.tgz" + resolved "https://registry.yarnpkg.com/source-map-support/-/source-map-support-0.5.13.tgz#31b24a9c2e73c2de85066c0feb7d44767ed52932" integrity sha512-SHSKFHadjVA5oR4PPqhtAVdcBWwRYVd6g6cAXnIbRiIwc2EhPrTuKUBdSLvlEKyIP3GCf89fltvcZiP9MMFA1w== dependencies: buffer-from "^1.0.0" @@ -2987,24 +3014,24 @@ source-map-support@0.5.13: source-map@^0.6.0, source-map@^0.6.1: version "0.6.1" - resolved "https://registry.npmjs.org/source-map/-/source-map-0.6.1.tgz" + resolved "https://registry.yarnpkg.com/source-map/-/source-map-0.6.1.tgz#74722af32e9614e9c287a8d0bbde48b5e2f1a263" integrity sha512-UjgapumWlbMhkBgzT7Ykc5YXUT46F0iKu8SGXq0bcwP5dz/h0Plj6enJqjz1Zbq2l5WaqYnrVbwWOWMyF3F47g== sprintf-js@~1.0.2: version "1.0.3" - resolved "https://registry.npmjs.org/sprintf-js/-/sprintf-js-1.0.3.tgz" + resolved "https://registry.yarnpkg.com/sprintf-js/-/sprintf-js-1.0.3.tgz#04e6926f662895354f3dd015203633b857297e2c" integrity sha512-D9cPgkvLlV3t3IzL0D0YLvGA9Ahk4PcvVwUbN0dSGr1aP0Nrt4AEnTUbuGvquEC0mA64Gqt1fzirlRs5ibXx8g== stack-utils@^2.0.3: version "2.0.6" - resolved "https://registry.npmjs.org/stack-utils/-/stack-utils-2.0.6.tgz" + resolved "https://registry.yarnpkg.com/stack-utils/-/stack-utils-2.0.6.tgz#aaf0748169c02fc33c8232abccf933f54a1cc34f" integrity sha512-XlkWvfIm6RmsWtNJx+uqtKLS8eqFbxUg0ZzLXqY0caEy9l7hruX8IpiDnjsLavoBgqCCR71TqWO8MaXYheJ3RQ== dependencies: escape-string-regexp "^2.0.0" string-length@^4.0.1: version "4.0.2" - resolved "https://registry.npmjs.org/string-length/-/string-length-4.0.2.tgz" + resolved "https://registry.yarnpkg.com/string-length/-/string-length-4.0.2.tgz#a8a8dc7bd5c1a82b9b3c8b87e125f66871b6e57a" integrity sha512-+l6rNN5fYHNhZZy41RXsYptCjA2Igmq4EG7kZAYFQI1E1VTXarr6ZPXBg6eq7Y6eK4FEhY6AJlyuFIb/v/S0VQ== dependencies: char-regex "^1.0.2" @@ -3012,14 +3039,14 @@ string-length@^4.0.1: string-to-stream@^3.0.1: version "3.0.1" - resolved "https://registry.npmjs.org/string-to-stream/-/string-to-stream-3.0.1.tgz" + resolved "https://registry.yarnpkg.com/string-to-stream/-/string-to-stream-3.0.1.tgz#480e6fb4d5476d31cb2221f75307a5dcb6638a42" integrity sha512-Hl092MV3USJuUCC6mfl9sPzGloA3K5VwdIeJjYIkXY/8K+mUvaeEabWJgArp+xXrsWxCajeT2pc4axbVhIZJyg== dependencies: readable-stream "^3.4.0" string-width@^4.1.0, string-width@^4.2.0, string-width@^4.2.3: version "4.2.3" - resolved "https://registry.npmjs.org/string-width/-/string-width-4.2.3.tgz" + resolved "https://registry.yarnpkg.com/string-width/-/string-width-4.2.3.tgz#269c7117d27b05ad2e536830a8ec895ef9c6d010" integrity sha512-wKyQRQpjJ0sIp62ErSZdGsjMJWsap5oRNihHhu6G7JVO/9jIB6UyevL+tXuOqrng8j/cxKTWyWUwvSTriiZz/g== dependencies: emoji-regex "^8.0.0" @@ -3028,60 +3055,60 @@ string-width@^4.1.0, string-width@^4.2.0, string-width@^4.2.3: string_decoder@^1.1.1: version "1.3.0" - resolved "https://registry.npmjs.org/string_decoder/-/string_decoder-1.3.0.tgz" + resolved "https://registry.yarnpkg.com/string_decoder/-/string_decoder-1.3.0.tgz#42f114594a46cf1a8e30b0a84f56c78c3edac21e" integrity sha512-hkRX8U1WjJFd8LsDJ2yQ/wWWxaopEsABU1XfkM8A+j0+85JAGppt16cr1Whg6KIbb4okU6Mql6BOj+uup/wKeA== dependencies: safe-buffer "~5.2.0" strip-ansi@^6.0.0, strip-ansi@^6.0.1: version "6.0.1" - resolved "https://registry.npmjs.org/strip-ansi/-/strip-ansi-6.0.1.tgz" + resolved "https://registry.yarnpkg.com/strip-ansi/-/strip-ansi-6.0.1.tgz#9e26c63d30f53443e9489495b2105d37b67a85d9" integrity sha512-Y38VPSHcqkFrCpFnQ9vuSXmquuv5oXOKpGeT6aGrr3o3Gc9AlVa6JBfUSOCnbxGGZF+/0ooI7KrPuUSztUdU5A== dependencies: ansi-regex "^5.0.1" strip-bom@^3.0.0: version "3.0.0" - resolved "https://registry.npmjs.org/strip-bom/-/strip-bom-3.0.0.tgz" + resolved "https://registry.yarnpkg.com/strip-bom/-/strip-bom-3.0.0.tgz#2334c18e9c759f7bdd56fdef7e9ae3d588e68ed3" integrity sha512-vavAMRXOgBVNF6nyEEmL3DBK19iRpDcoIwW+swQ+CbGiu7lju6t+JklA1MHweoWtadgt4ISVUsXLyDq34ddcwA== strip-bom@^4.0.0: version "4.0.0" - resolved "https://registry.npmjs.org/strip-bom/-/strip-bom-4.0.0.tgz" + resolved "https://registry.yarnpkg.com/strip-bom/-/strip-bom-4.0.0.tgz#9c3505c1db45bcedca3d9cf7a16f5c5aa3901878" integrity sha512-3xurFv5tEgii33Zi8Jtp55wEIILR9eh34FAW00PZf+JnSsTmV/ioewSgQl97JHvgjoRGwPShsWm+IdrxB35d0w== strip-final-newline@^2.0.0: version "2.0.0" - resolved "https://registry.npmjs.org/strip-final-newline/-/strip-final-newline-2.0.0.tgz" + resolved "https://registry.yarnpkg.com/strip-final-newline/-/strip-final-newline-2.0.0.tgz#89b852fb2fcbe936f6f4b3187afb0a12c1ab58ad" integrity sha512-BrpvfNAE3dcvq7ll3xVumzjKjZQ5tI1sEUIKr3Uoks0XUl45St3FlatVqef9prk4jRDzhW6WZg+3bk93y6pLjA== strip-json-comments@^3.1.1: version "3.1.1" - resolved "https://registry.npmjs.org/strip-json-comments/-/strip-json-comments-3.1.1.tgz" + resolved "https://registry.yarnpkg.com/strip-json-comments/-/strip-json-comments-3.1.1.tgz#31f1281b3832630434831c310c01cccda8cbe006" integrity sha512-6fPc+R4ihwqP6N/aIv2f1gMH8lOVtWQHoqC4yK6oSDVVocumAsfCqjkXnqiYMhmMwS/mEHLp7Vehlt3ql6lEig== superstruct@^1.0.4: version "1.0.4" - resolved "https://registry.npmjs.org/superstruct/-/superstruct-1.0.4.tgz" + resolved "https://registry.yarnpkg.com/superstruct/-/superstruct-1.0.4.tgz#0adb99a7578bd2f1c526220da6571b2d485d91ca" integrity sha512-7JpaAoX2NGyoFlI9NBh66BQXGONc+uE+MRS5i2iOBKuS4e+ccgMDjATgZldkah+33DakBxDHiss9kvUcGAO8UQ== supports-color@^7.0.0, supports-color@^7.1.0: version "7.2.0" - resolved "https://registry.npmjs.org/supports-color/-/supports-color-7.2.0.tgz" + resolved "https://registry.yarnpkg.com/supports-color/-/supports-color-7.2.0.tgz#1b7dcdcb32b8138801b3e478ba6a51caa89648da" integrity sha512-qpCAvRl9stuOHveKsn7HncJRvv501qIacKzQlO/+Lwxc9+0q2wLyv4Dfvt80/DPn2pqOBsJdDiogXGR9+OvwRw== dependencies: has-flag "^4.0.0" supports-color@^8.0.0: version "8.1.1" - resolved "https://registry.npmjs.org/supports-color/-/supports-color-8.1.1.tgz" + resolved "https://registry.yarnpkg.com/supports-color/-/supports-color-8.1.1.tgz#cd6fc17e28500cff56c1b86c0a7fd4a54a73005c" integrity sha512-MpUEN2OodtUzxvKQl72cUF7RQ5EiHsGvSsVG0ia9c5RbWGL2CI4C7EpPS8UTBIplnlzZiNuV56w+FuNxy3ty2Q== dependencies: has-flag "^4.0.0" supports-hyperlinks@^3.1.0: version "3.1.0" - resolved "https://registry.npmjs.org/supports-hyperlinks/-/supports-hyperlinks-3.1.0.tgz" + resolved "https://registry.yarnpkg.com/supports-hyperlinks/-/supports-hyperlinks-3.1.0.tgz#b56150ff0173baacc15f21956450b61f2b18d3ac" integrity sha512-2rn0BZ+/f7puLOHZm1HOJfwBggfaHXUpPUSSG/SWM4TWp5KCfmNYwnC3hruy2rZlMnmWZ+QAGpZfchu3f3695A== dependencies: has-flag "^4.0.0" @@ -3089,19 +3116,12 @@ supports-hyperlinks@^3.1.0: supports-preserve-symlinks-flag@^1.0.0: version "1.0.0" - resolved "https://registry.npmjs.org/supports-preserve-symlinks-flag/-/supports-preserve-symlinks-flag-1.0.0.tgz" + resolved "https://registry.yarnpkg.com/supports-preserve-symlinks-flag/-/supports-preserve-symlinks-flag-1.0.0.tgz#6eda4bd344a3c94aea376d4cc31bc77311039e09" integrity sha512-ot0WnXS9fgdkgIcePe6RHNk1WA8+muPa6cSjeR3V8K27q9BB1rTE3R1p7Hv0z1ZyAc8s6Vvv8DIyWf681MAt0w== -synckit@^0.11.7: - version "0.11.8" - resolved "https://registry.npmjs.org/synckit/-/synckit-0.11.8.tgz" - integrity sha512-+XZ+r1XGIJGeQk3VvXhT6xx/VpbHsRzsTkGgF6E5RX9TTXD0118l87puaEBZ566FhqblC6U0d4XnubznJDm30A== - dependencies: - "@pkgr/core" "^0.2.4" - test-exclude@^6.0.0: version "6.0.0" - resolved "https://registry.npmjs.org/test-exclude/-/test-exclude-6.0.0.tgz" + resolved "https://registry.yarnpkg.com/test-exclude/-/test-exclude-6.0.0.tgz#04a8698661d805ea6fa293b6cb9e63ac044ef15e" integrity sha512-cAGWPIyOHU6zlmg88jwm7VRyXnMN7iV68OGAbYDk/Mh/xC/pzVPlQtY6ngoIH/5/tciuhGfvESU8GrHrcxD56w== dependencies: "@istanbuljs/schema" "^0.1.2" @@ -3110,38 +3130,38 @@ test-exclude@^6.0.0: thenify-all@^1.0.0: version "1.6.0" - resolved "https://registry.npmjs.org/thenify-all/-/thenify-all-1.6.0.tgz" + resolved "https://registry.yarnpkg.com/thenify-all/-/thenify-all-1.6.0.tgz#1a1918d402d8fc3f98fbf234db0bcc8cc10e9726" integrity sha512-RNxQH/qI8/t3thXJDwcstUO4zeqo64+Uy/+sNVRBx4Xn2OX+OZ9oP+iJnNFqplFra2ZUVeKCSa2oVWi3T4uVmA== dependencies: thenify ">= 3.1.0 < 4" "thenify@>= 3.1.0 < 4": version "3.3.1" - resolved "https://registry.npmjs.org/thenify/-/thenify-3.3.1.tgz" + resolved "https://registry.yarnpkg.com/thenify/-/thenify-3.3.1.tgz#8932e686a4066038a016dd9e2ca46add9838a95f" integrity sha512-RVZSIV5IG10Hk3enotrhvz0T9em6cyHBLkH/YAZuKqd8hRkKhSfCGIcP2KUY0EPxndzANBmNllzWPwak+bheSw== dependencies: any-promise "^1.0.0" tmpl@1.0.5: version "1.0.5" - resolved "https://registry.npmjs.org/tmpl/-/tmpl-1.0.5.tgz" + resolved "https://registry.yarnpkg.com/tmpl/-/tmpl-1.0.5.tgz#8683e0b902bb9c20c4f726e3c0b69f36518c07cc" integrity sha512-3f0uOEAQwIqGuWW2MVzYg8fV/QNnc/IpuJNG837rLuczAaLVHslWHZQj4IGiEl5Hs3kkbhwL9Ab7Hrsmuj+Smw== to-regex-range@^5.0.1: version "5.0.1" - resolved "https://registry.npmjs.org/to-regex-range/-/to-regex-range-5.0.1.tgz" + resolved "https://registry.yarnpkg.com/to-regex-range/-/to-regex-range-5.0.1.tgz#1648c44aae7c8d988a326018ed72f5b4dd0392e4" integrity sha512-65P7iz6X5yEr1cwcgvQxbbIw7Uk3gOy5dIdtZ4rDveLqhrdJP+Li/Hx6tyK0NEb+2GCyneCMJiGqrADCSNk8sQ== dependencies: is-number "^7.0.0" ts-api-utils@^2.0.1: version "2.0.1" - resolved "https://registry.npmjs.org/ts-api-utils/-/ts-api-utils-2.0.1.tgz" + resolved "https://registry.yarnpkg.com/ts-api-utils/-/ts-api-utils-2.0.1.tgz#660729385b625b939aaa58054f45c058f33f10cd" integrity sha512-dnlgjFSVetynI8nzgJ+qF62efpglpWRk8isUEWZGWlJYySCTD6aKvbUDu+zbPeDakk3bg5H4XpitHukgfL1m9w== ts-jest@^29.1.0: version "29.1.1" - resolved "https://registry.npmjs.org/ts-jest/-/ts-jest-29.1.1.tgz" + resolved "https://registry.yarnpkg.com/ts-jest/-/ts-jest-29.1.1.tgz#f58fe62c63caf7bfcc5cc6472082f79180f0815b" integrity sha512-D6xjnnbP17cC85nliwGiL+tpoKN0StpgE0TeOjXQTU6MVCfsB4v7aW05CgQ/1OywGb0x/oy9hHFnN+sczTiRaA== dependencies: bs-logger "0.x" @@ -3155,7 +3175,7 @@ ts-jest@^29.1.0: ts-node@^10.5.0: version "10.7.0" - resolved "https://registry.npmjs.org/ts-node/-/ts-node-10.7.0.tgz" + resolved "https://registry.yarnpkg.com/ts-node/-/ts-node-10.7.0.tgz#35d503d0fab3e2baa672a0e94f4b40653c2463f5" integrity sha512-TbIGS4xgJoX2i3do417KSaep1uRAW/Lu+WAL2doDHC0D6ummjirVOXU5/7aiZotbQ5p1Zp9tP7U6cYhA0O7M8A== dependencies: "@cspotcode/source-map-support" "0.7.0" @@ -3174,8 +3194,7 @@ ts-node@^10.5.0: "tsc-multi@https://github.com/stainless-api/tsc-multi/releases/download/v1.1.9/tsc-multi.tgz": version "1.1.9" - resolved "https://github.com/stainless-api/tsc-multi/releases/download/v1.1.9/tsc-multi.tgz" - integrity sha512-tWyCXnx0WqCkVlo5s+4KMj7HC0/0YrCZY0PustUwX9F2lNwd8Kp07q/Q56uGvV9q80XaSDrhy0YqBmrX5TDNpQ== + resolved "https://github.com/stainless-api/tsc-multi/releases/download/v1.1.9/tsc-multi.tgz#777f6f5d9e26bf0e94e5170990dd3a841d6707cd" dependencies: debug "^4.3.7" fast-glob "^3.3.2" @@ -3190,7 +3209,7 @@ ts-node@^10.5.0: tsconfig-paths@^4.0.0: version "4.2.0" - resolved "https://registry.npmjs.org/tsconfig-paths/-/tsconfig-paths-4.2.0.tgz" + resolved "https://registry.yarnpkg.com/tsconfig-paths/-/tsconfig-paths-4.2.0.tgz#ef78e19039133446d244beac0fd6a1632e2d107c" integrity sha512-NoZ4roiN7LnbKn9QqE1amc9DJfzvZXxF4xDavcOWt1BPkdx+m+0gJuPM+S0vCe7zTJMYUP0R8pO2XMr+Y8oLIg== dependencies: json5 "^2.2.2" @@ -3199,29 +3218,29 @@ tsconfig-paths@^4.0.0: tslib@^2.8.1: version "2.8.1" - resolved "https://registry.npmjs.org/tslib/-/tslib-2.8.1.tgz" + resolved "https://registry.yarnpkg.com/tslib/-/tslib-2.8.1.tgz#612efe4ed235d567e8aba5f2a5fab70280ade83f" integrity sha512-oJFu94HQb+KVduSUQL7wnpmqnfmLsOA/nAh6b6EH0wCEoK0/mPeXU6c3wKDV83MkOuHPRHtSXKKU99IBazS/2w== type-check@^0.4.0, type-check@~0.4.0: version "0.4.0" - resolved "https://registry.npmjs.org/type-check/-/type-check-0.4.0.tgz" + resolved "https://registry.yarnpkg.com/type-check/-/type-check-0.4.0.tgz#07b8203bfa7056c0657050e3ccd2c37730bab8f1" integrity sha512-XleUoc9uwGXqjWwXaUTZAmzMcFZ5858QA2vvx1Ur5xIcixXIP+8LnFDgRplU30us6teqdlskFfu+ae4K79Ooew== dependencies: prelude-ls "^1.2.1" type-detect@4.0.8: version "4.0.8" - resolved "https://registry.npmjs.org/type-detect/-/type-detect-4.0.8.tgz" + resolved "https://registry.yarnpkg.com/type-detect/-/type-detect-4.0.8.tgz#7646fb5f18871cfbb7749e69bd39a6388eb7450c" integrity sha512-0fr/mIH1dlO+x7TlcMy+bIDqKPsw/70tVyeHW787goQjhmqaZe10uwLujubK9q9Lg6Fiho1KUKDYz0Z7k7g5/g== type-fest@^0.21.3: version "0.21.3" - resolved "https://registry.npmjs.org/type-fest/-/type-fest-0.21.3.tgz" + resolved "https://registry.yarnpkg.com/type-fest/-/type-fest-0.21.3.tgz#d260a24b0198436e133fa26a524a6d65fa3b2e37" integrity sha512-t0rzBq87m3fVcduHDUFhKmyyX+9eo6WQjZvf51Ea/M0Q7+T374Jp1aUiyUl0GKxp8M/OETVHSDvmkyPgvX+X2w== typescript-eslint@8.31.1: version "8.31.1" - resolved "https://registry.npmjs.org/typescript-eslint/-/typescript-eslint-8.31.1.tgz" + resolved "https://registry.yarnpkg.com/typescript-eslint/-/typescript-eslint-8.31.1.tgz#b77ab1e48ced2daab9225ff94bab54391a4af69b" integrity sha512-j6DsEotD/fH39qKzXTQRwYYWlt7D+0HmfpOK+DVhwJOFLcdmn92hq3mBb7HlKJHbjjI/gTOqEcc9d6JfpFf/VA== dependencies: "@typescript-eslint/eslint-plugin" "8.31.1" @@ -3230,52 +3249,57 @@ typescript-eslint@8.31.1: typescript@5.6.1-rc: version "5.6.1-rc" - resolved "https://registry.npmjs.org/typescript/-/typescript-5.6.1-rc.tgz" + resolved "https://registry.yarnpkg.com/typescript/-/typescript-5.6.1-rc.tgz#d5e4d7d8170174fed607b74cc32aba3d77018e02" integrity sha512-E3b2+1zEFu84jB0YQi9BORDjz9+jGbwwy1Zi3G0LUNw7a7cePUrHMRNy8aPh53nXpkFGVHSxIZo5vKTfYaFiBQ== typescript@5.8.3: version "5.8.3" - resolved "https://registry.npmjs.org/typescript/-/typescript-5.8.3.tgz" + resolved "https://registry.yarnpkg.com/typescript/-/typescript-5.8.3.tgz#92f8a3e5e3cf497356f4178c34cd65a7f5e8440e" integrity sha512-p1diW6TqL9L07nNxvRMM7hMMw4c5XOo/1ibL4aAIGmSAt9slTE1Xgw5KWuof2uTOvCg9BY7ZRi+GaF+7sfgPeQ== +undici-types@~5.26.4: + version "5.26.5" + resolved "https://registry.yarnpkg.com/undici-types/-/undici-types-5.26.5.tgz#bcd539893d00b56e964fd2657a4866b221a65617" + integrity sha512-JlCMO+ehdEIKqlFxk6IfVoAUVmgz7cU7zD/h9XZ0qzeosSHmUJVOzSQvvYSYWXkFXC+IfLKSIffhv0sVZup6pA== + undici-types@~6.21.0: version "6.21.0" - resolved "https://registry.npmjs.org/undici-types/-/undici-types-6.21.0.tgz" + resolved "https://registry.yarnpkg.com/undici-types/-/undici-types-6.21.0.tgz#691d00af3909be93a7faa13be61b3a5b50ef12cb" integrity sha512-iwDZqg0QAGrg9Rav5H4n0M64c3mkR59cJ6wQp+7C4nI0gsmExaedaYLNO44eT4AtBBwjbTiGPMlt2Md0T9H9JQ== unicode-emoji-modifier-base@^1.0.0: version "1.0.0" - resolved "https://registry.npmjs.org/unicode-emoji-modifier-base/-/unicode-emoji-modifier-base-1.0.0.tgz" + resolved "https://registry.yarnpkg.com/unicode-emoji-modifier-base/-/unicode-emoji-modifier-base-1.0.0.tgz#dbbd5b54ba30f287e2a8d5a249da6c0cef369459" integrity sha512-yLSH4py7oFH3oG/9K+XWrz1pSi3dfUrWEnInbxMfArOfc1+33BlGPQtLsOYwvdMy11AwUBetYuaRxSPqgkq+8g== -update-browserslist-db@^1.0.13: - version "1.0.13" - resolved "https://registry.npmjs.org/update-browserslist-db/-/update-browserslist-db-1.0.13.tgz" - integrity sha512-xebP81SNcPuNpPP3uzeW1NYXxI3rxyJzF3pD6sH4jE7o/IX+WtSpwnVU+qIsDPyk0d3hmFQ7mjqc6AtV604hbg== +update-browserslist-db@^1.2.0: + version "1.2.3" + resolved "https://registry.yarnpkg.com/update-browserslist-db/-/update-browserslist-db-1.2.3.tgz#64d76db58713136acbeb4c49114366cc6cc2e80d" + integrity sha512-Js0m9cx+qOgDxo0eMiFGEueWztz+d4+M3rGlmKPT+T4IS/jP4ylw3Nwpu6cpTTP8R1MAC1kF4VbdLt3ARf209w== dependencies: - escalade "^3.1.1" - picocolors "^1.0.0" + escalade "^3.2.0" + picocolors "^1.1.1" uri-js@^4.2.2: version "4.4.1" - resolved "https://registry.npmjs.org/uri-js/-/uri-js-4.4.1.tgz" + resolved "https://registry.yarnpkg.com/uri-js/-/uri-js-4.4.1.tgz#9b1a52595225859e55f669d928f88c6c57f2a77e" integrity sha512-7rKUyy33Q1yc98pQ1DAmLtwX109F7TIfWlW1Ydo8Wl1ii1SeHieeh0HHfPeL2fMXK6z0s8ecKs9frCuLJvndBg== dependencies: punycode "^2.1.0" util-deprecate@^1.0.1: version "1.0.2" - resolved "https://registry.npmjs.org/util-deprecate/-/util-deprecate-1.0.2.tgz" + resolved "https://registry.yarnpkg.com/util-deprecate/-/util-deprecate-1.0.2.tgz#450d4dc9fa70de732762fbd2d4a28981419a0ccf" integrity sha512-EPD5q1uXyFxJpCrLnCc1nHnq3gOa6DZBocAIiI2TaSCA7VCJ1UJDMagCzIkXNsUYfD1daK//LTEQ8xiIbrHtcw== v8-compile-cache-lib@^3.0.0: version "3.0.0" - resolved "https://registry.npmjs.org/v8-compile-cache-lib/-/v8-compile-cache-lib-3.0.0.tgz" + resolved "https://registry.yarnpkg.com/v8-compile-cache-lib/-/v8-compile-cache-lib-3.0.0.tgz#0582bcb1c74f3a2ee46487ceecf372e46bce53e8" integrity sha512-mpSYqfsFvASnSn5qMiwrr4VKfumbPyONLCOPmsR3A6pTY/r0+tSaVbgPWSAIuzbk3lCTa+FForeTiO+wBQGkjA== v8-to-istanbul@^9.0.1: version "9.2.0" - resolved "https://registry.npmjs.org/v8-to-istanbul/-/v8-to-istanbul-9.2.0.tgz" + resolved "https://registry.yarnpkg.com/v8-to-istanbul/-/v8-to-istanbul-9.2.0.tgz#2ed7644a245cddd83d4e087b9b33b3e62dfd10ad" integrity sha512-/EH/sDgxU2eGxajKdwLCDmQ4FWq+kpi3uCmBGpw1xJtnAxEjlD8j8PEiGWpCIMIs3ciNAgH0d3TTJiUkYzyZjA== dependencies: "@jridgewell/trace-mapping" "^0.3.12" @@ -3284,26 +3308,26 @@ v8-to-istanbul@^9.0.1: validate-npm-package-name@^5.0.0: version "5.0.1" - resolved "https://registry.npmjs.org/validate-npm-package-name/-/validate-npm-package-name-5.0.1.tgz" + resolved "https://registry.yarnpkg.com/validate-npm-package-name/-/validate-npm-package-name-5.0.1.tgz#a316573e9b49f3ccd90dbb6eb52b3f06c6d604e8" integrity sha512-OljLrQ9SQdOUqTaQxqL5dEfZWrXExyyWsozYlAWFawPVNuD83igl7uJD2RTkNMbniIYgt8l81eCJGIdQF7avLQ== walker@^1.0.8: version "1.0.8" - resolved "https://registry.npmjs.org/walker/-/walker-1.0.8.tgz" + resolved "https://registry.yarnpkg.com/walker/-/walker-1.0.8.tgz#bd498db477afe573dc04185f011d3ab8a8d7653f" integrity sha512-ts/8E8l5b7kY0vlWLewOkDXMmPdLcVV4GmOQLyxuSswIJsweeFZtAsMF7k1Nszz+TYBQrlYRmzOnr398y1JemQ== dependencies: makeerror "1.0.12" which@^2.0.1: version "2.0.2" - resolved "https://registry.npmjs.org/which/-/which-2.0.2.tgz" + resolved "https://registry.yarnpkg.com/which/-/which-2.0.2.tgz#7c6a8dd0a636a0327e10b59c9286eee93f3f51b1" integrity sha512-BLI3Tl1TW3Pvl70l3yq3Y64i+awpwXqsGBYWkkqMtnbXgrMD+yj7rhW0kuEDxzJaYXGjEW5ogapKNMEKNMjibA== dependencies: isexe "^2.0.0" wrap-ansi@^7.0.0: version "7.0.0" - resolved "https://registry.npmjs.org/wrap-ansi/-/wrap-ansi-7.0.0.tgz" + resolved "https://registry.yarnpkg.com/wrap-ansi/-/wrap-ansi-7.0.0.tgz#67e145cff510a6a6984bdf1152911d69d2eb9e43" integrity sha512-YVGIj2kamLSTxw6NsZjoBxfSwsn0ycdesmc4p+Q21c5zPuZ1pl+NfxVdxPtdHvmNVOQ6XSYG4AUtyt/Fi7D16Q== dependencies: ansi-styles "^4.0.0" @@ -3312,12 +3336,12 @@ wrap-ansi@^7.0.0: wrappy@1: version "1.0.2" - resolved "https://registry.npmjs.org/wrappy/-/wrappy-1.0.2.tgz" + resolved "https://registry.yarnpkg.com/wrappy/-/wrappy-1.0.2.tgz#b5243d8f3ec1aa35f1364605bc0d1036e30ab69f" integrity sha512-l4Sp/DRseor9wL6EvV2+TuQn63dMkPjZ/sp9XkghTEbV9KlPS1xUsZ3u7/IQO4wxtcFB4bgpQPRcR3QCvezPcQ== write-file-atomic@^4.0.2: version "4.0.2" - resolved "https://registry.npmjs.org/write-file-atomic/-/write-file-atomic-4.0.2.tgz" + resolved "https://registry.yarnpkg.com/write-file-atomic/-/write-file-atomic-4.0.2.tgz#a9df01ae5b77858a027fd2e80768ee433555fcfd" integrity sha512-7KxauUdBmSdWnmpaGFg+ppNjKF8uNLry8LyzjauQDOVONfFLNKrKvQOxZ/VuTIcS/gge/YNahf5RIIQWTSarlg== dependencies: imurmurhash "^0.1.4" @@ -3325,27 +3349,32 @@ write-file-atomic@^4.0.2: y18n@^5.0.5: version "5.0.8" - resolved "https://registry.npmjs.org/y18n/-/y18n-5.0.8.tgz" + resolved "https://registry.yarnpkg.com/y18n/-/y18n-5.0.8.tgz#7f4934d0f7ca8c56f95314939ddcd2dd91ce1d55" integrity sha512-0pfFzegeDWJHJIAmTLRP2DwHjdF5s7jo9tuztdQxAhINCdvS+3nGINqPd00AphqJR/0LhANUS6/+7SCb98YOfA== yallist@^3.0.2: version "3.1.1" - resolved "https://registry.npmjs.org/yallist/-/yallist-3.1.1.tgz" + resolved "https://registry.yarnpkg.com/yallist/-/yallist-3.1.1.tgz#dbb7daf9bfd8bac9ab45ebf602b8cbad0d5d08fd" integrity sha512-a4UGQaWPH59mOXUYnAG2ewncQS4i4F43Tv3JoAM+s2VDAmS9NsK8GpDMLrCHPksFT7h3K6TOoUNn2pb7RoXx4g== +yallist@^4.0.0: + version "4.0.0" + resolved "https://registry.yarnpkg.com/yallist/-/yallist-4.0.0.tgz#9bb92790d9c0effec63be73519e11a35019a3a72" + integrity sha512-3wdGidZyq5PB084XLES5TpOSRA3wjXAlIWMhum2kRcv/41Sn2emQ0dycQW4uZXLejwKvg6EsvbdlVL+FYEct7A== + yargs-parser@^20.2.2: version "20.2.9" - resolved "https://registry.npmjs.org/yargs-parser/-/yargs-parser-20.2.9.tgz" + resolved "https://registry.yarnpkg.com/yargs-parser/-/yargs-parser-20.2.9.tgz#2eb7dc3b0289718fc295f362753845c41a0c94ee" integrity sha512-y11nGElTIV+CT3Zv9t7VKl+Q3hTQoT9a1Qzezhhl6Rp21gJ/IVTW7Z3y9EWXhuUBC2Shnf+DX0antecpAwSP8w== yargs-parser@^21.0.1, yargs-parser@^21.1.1: version "21.1.1" - resolved "https://registry.npmjs.org/yargs-parser/-/yargs-parser-21.1.1.tgz" + resolved "https://registry.yarnpkg.com/yargs-parser/-/yargs-parser-21.1.1.tgz#9096bceebf990d21bb31fa9516e0ede294a77d35" integrity sha512-tVpsJW7DdjecAiFpbIB1e3qxIQsE6NoPc5/eTdrbbIC4h0LVsWhnoa3g+m2HclBIujHzsxZ4VJVA+GUuc2/LBw== yargs@^16.0.0: version "16.2.0" - resolved "https://registry.npmjs.org/yargs/-/yargs-16.2.0.tgz" + resolved "https://registry.yarnpkg.com/yargs/-/yargs-16.2.0.tgz#1c82bf0f6b6a66eafce7ef30e376f49a12477f66" integrity sha512-D1mvvtDG0L5ft/jGWkLpG1+m0eQxOfaBvTNELraWj22wSVUMWxZUvYgJYcKh6jGGIkJFhH4IZPQhR4TKpc8mBw== dependencies: cliui "^7.0.2" @@ -3358,7 +3387,7 @@ yargs@^16.0.0: yargs@^17.3.1, yargs@^17.7.2: version "17.7.2" - resolved "https://registry.npmjs.org/yargs/-/yargs-17.7.2.tgz" + resolved "https://registry.yarnpkg.com/yargs/-/yargs-17.7.2.tgz#991df39aca675a192b816e1e0363f9d75d2aa269" integrity sha512-7dSzzRQ++CKnNI/krKnYRV7JKKPUXMEh61soaHKg9mrWEhzFWhFnxPxGl+69cD1Ou63C13NUPCnmIcrvqCuM6w== dependencies: cliui "^8.0.1" @@ -3371,10 +3400,10 @@ yargs@^17.3.1, yargs@^17.7.2: yn@3.1.1: version "3.1.1" - resolved "https://registry.npmjs.org/yn/-/yn-3.1.1.tgz" + resolved "https://registry.yarnpkg.com/yn/-/yn-3.1.1.tgz#1e87401a09d767c1d5eab26a6e4c185182d2eb50" integrity sha512-Ux4ygGWsu2c7isFWe8Yu1YluJmqVhxqK2cLXNQA5AcC3QfbGNpM7fu0Y8b/z16pXLnFxZYvWhd3fhBY9DLmC6Q== yocto-queue@^0.1.0: version "0.1.0" - resolved "https://registry.npmjs.org/yocto-queue/-/yocto-queue-0.1.0.tgz" + resolved "https://registry.yarnpkg.com/yocto-queue/-/yocto-queue-0.1.0.tgz#0294eb3dee05028d31ee1a5fa2c556a6aaf10a1b" integrity sha512-rVksvsnNCdJ/ohGc6xgPwyN8eheCxsiLM8mxuE/t/mOVqJewPuO1miLpTHQiRgTKCLexL4MeAFVagts7HmNZ2Q==