Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion .release-please-manifest.json
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
{
".": "0.1.0-alpha.2"
".": "0.1.0-alpha.3"
}
8 changes: 4 additions & 4 deletions .stats.yml
Original file line number Diff line number Diff line change
@@ -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: 188
openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/digitalocean%2Fgradient-f07d74847e620dfa26d8df40ea4680814af9bba381b3a57a7b6ed76ad49d85f8.yml
openapi_spec_hash: e3553dc2abf2afd4368b736bcc32a289
config_hash: b712366a70c9d33e22d40eb601ca972f
21 changes: 21 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,26 @@
# Changelog

## 0.1.0-alpha.3 (2025-11-03)

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 ([b283f6f](https://github.com/digitalocean/gradient-typescript/commit/b283f6f123067b864841df1eb21e5f1d6da51c93))
* 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))


### Chores

* formatting fixes ([b2388ec](https://github.com/digitalocean/gradient-typescript/commit/b2388ec757d21bdb00365969af5b083ae1e574b0))


### 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)
Expand Down
48 changes: 48 additions & 0 deletions api.md
Original file line number Diff line number Diff line change
Expand Up @@ -211,6 +211,20 @@ Methods:

- <code title="post /v2/gen-ai/oauth2/dropbox/tokens">client.agents.evaluationMetrics.oauth2.dropbox.<a href="./src/resources/agents/evaluation-metrics/oauth2/dropbox.ts">createTokens</a>({ ...params }) -> DropboxCreateTokensResponse</code>

### ScheduledIndexing

Types:

- <code><a href="./src/resources/agents/evaluation-metrics/scheduled-indexing.ts">ScheduledIndexingCreateResponse</a></code>
- <code><a href="./src/resources/agents/evaluation-metrics/scheduled-indexing.ts">ScheduledIndexingRetrieveResponse</a></code>
- <code><a href="./src/resources/agents/evaluation-metrics/scheduled-indexing.ts">ScheduledIndexingDeleteResponse</a></code>

Methods:

- <code title="post /v2/gen-ai/scheduled-indexing">client.agents.evaluationMetrics.scheduledIndexing.<a href="./src/resources/agents/evaluation-metrics/scheduled-indexing.ts">create</a>({ ...params }) -> ScheduledIndexingCreateResponse</code>
- <code title="get /v2/gen-ai/scheduled-indexing/knowledge-base/{knowledge_base_uuid}">client.agents.evaluationMetrics.scheduledIndexing.<a href="./src/resources/agents/evaluation-metrics/scheduled-indexing.ts">retrieve</a>(knowledgeBaseUuid) -> ScheduledIndexingRetrieveResponse</code>
- <code title="delete /v2/gen-ai/scheduled-indexing/{uuid}">client.agents.evaluationMetrics.scheduledIndexing.<a href="./src/resources/agents/evaluation-metrics/scheduled-indexing.ts">delete</a>(uuid) -> ScheduledIndexingDeleteResponse</code>

## EvaluationRuns

Types:
Expand Down Expand Up @@ -700,6 +714,7 @@ Types:
- <code><a href="./src/resources/knowledge-bases/knowledge-bases.ts">KnowledgeBaseUpdateResponse</a></code>
- <code><a href="./src/resources/knowledge-bases/knowledge-bases.ts">KnowledgeBaseListResponse</a></code>
- <code><a href="./src/resources/knowledge-bases/knowledge-bases.ts">KnowledgeBaseDeleteResponse</a></code>
- <code><a href="./src/resources/knowledge-bases/knowledge-bases.ts">KnowledgeBaseListIndexingJobsResponse</a></code>

Methods:

Expand All @@ -708,6 +723,7 @@ Methods:
- <code title="put /v2/gen-ai/knowledge_bases/{uuid}">client.knowledgeBases.<a href="./src/resources/knowledge-bases/knowledge-bases.ts">update</a>(pathUuid, { ...params }) -> KnowledgeBaseUpdateResponse</code>
- <code title="get /v2/gen-ai/knowledge_bases">client.knowledgeBases.<a href="./src/resources/knowledge-bases/knowledge-bases.ts">list</a>({ ...params }) -> KnowledgeBaseListResponse</code>
- <code title="delete /v2/gen-ai/knowledge_bases/{uuid}">client.knowledgeBases.<a href="./src/resources/knowledge-bases/knowledge-bases.ts">delete</a>(uuid) -> KnowledgeBaseDeleteResponse</code>
- <code title="get /v2/gen-ai/knowledge_bases/{knowledge_base_uuid}/indexing_jobs">client.knowledgeBases.<a href="./src/resources/knowledge-bases/knowledge-bases.ts">listIndexingJobs</a>(knowledgeBaseUuid) -> KnowledgeBaseListIndexingJobsResponse</code>

## DataSources

Expand Down Expand Up @@ -740,6 +756,7 @@ Types:
- <code><a href="./src/resources/knowledge-bases/indexing-jobs.ts">IndexingJobRetrieveResponse</a></code>
- <code><a href="./src/resources/knowledge-bases/indexing-jobs.ts">IndexingJobListResponse</a></code>
- <code><a href="./src/resources/knowledge-bases/indexing-jobs.ts">IndexingJobRetrieveDataSourcesResponse</a></code>
- <code><a href="./src/resources/knowledge-bases/indexing-jobs.ts">IndexingJobRetrieveSignedURLResponse</a></code>
- <code><a href="./src/resources/knowledge-bases/indexing-jobs.ts">IndexingJobUpdateCancelResponse</a></code>

Methods:
Expand All @@ -748,6 +765,7 @@ Methods:
- <code title="get /v2/gen-ai/indexing_jobs/{uuid}">client.knowledgeBases.indexingJobs.<a href="./src/resources/knowledge-bases/indexing-jobs.ts">retrieve</a>(uuid) -> IndexingJobRetrieveResponse</code>
- <code title="get /v2/gen-ai/indexing_jobs">client.knowledgeBases.indexingJobs.<a href="./src/resources/knowledge-bases/indexing-jobs.ts">list</a>({ ...params }) -> IndexingJobListResponse</code>
- <code title="get /v2/gen-ai/indexing_jobs/{indexing_job_uuid}/data_sources">client.knowledgeBases.indexingJobs.<a href="./src/resources/knowledge-bases/indexing-jobs.ts">retrieveDataSources</a>(indexingJobUuid) -> IndexingJobRetrieveDataSourcesResponse</code>
- <code title="get /v2/gen-ai/indexing_jobs/{indexing_job_uuid}/details_signed_url">client.knowledgeBases.indexingJobs.<a href="./src/resources/knowledge-bases/indexing-jobs.ts">retrieveSignedURL</a>(indexingJobUuid) -> IndexingJobRetrieveSignedURLResponse</code>
- <code title="put /v2/gen-ai/indexing_jobs/{uuid}/cancel">client.knowledgeBases.indexingJobs.<a href="./src/resources/knowledge-bases/indexing-jobs.ts">updateCancel</a>(pathUuid, { ...params }) -> IndexingJobUpdateCancelResponse</code>
- <code title="polling helper">client.knowledgeBases.indexingJobs.<a href="./src/resources/knowledge-bases/indexing-jobs.ts">waitForCompletion</a>(uuid, { ...options }) -> IndexingJobRetrieveResponse</code>

Expand Down Expand Up @@ -835,3 +853,33 @@ Methods:
- <code title="put /v2/databases/{database_cluster_uuid}/schema-registry/config">client.databases.schemaRegistry.config.<a href="./src/resources/databases/schema-registry/config.ts">update</a>(databaseClusterUuid, { ...params }) -> ConfigUpdateResponse</code>
- <code title="get /v2/databases/{database_cluster_uuid}/schema-registry/config/{subject_name}">client.databases.schemaRegistry.config.<a href="./src/resources/databases/schema-registry/config.ts">retrieveSubject</a>(subjectName, { ...params }) -> ConfigRetrieveSubjectResponse</code>
- <code title="put /v2/databases/{database_cluster_uuid}/schema-registry/config/{subject_name}">client.databases.schemaRegistry.config.<a href="./src/resources/databases/schema-registry/config.ts">updateSubject</a>(subjectName, { ...params }) -> ConfigUpdateSubjectResponse</code>

# Nfs

Types:

- <code><a href="./src/resources/nfs/nfs.ts">NfCreateResponse</a></code>
- <code><a href="./src/resources/nfs/nfs.ts">NfRetrieveResponse</a></code>
- <code><a href="./src/resources/nfs/nfs.ts">NfListResponse</a></code>
- <code><a href="./src/resources/nfs/nfs.ts">NfInitiateActionResponse</a></code>

Methods:

- <code title="post /v2/nfs">client.nfs.<a href="./src/resources/nfs/nfs.ts">create</a>({ ...params }) -> NfCreateResponse</code>
- <code title="get /v2/nfs/{nfs_id}">client.nfs.<a href="./src/resources/nfs/nfs.ts">retrieve</a>(nfsID, { ...params }) -> NfRetrieveResponse</code>
- <code title="get /v2/nfs">client.nfs.<a href="./src/resources/nfs/nfs.ts">list</a>({ ...params }) -> NfListResponse</code>
- <code title="delete /v2/nfs/{nfs_id}">client.nfs.<a href="./src/resources/nfs/nfs.ts">delete</a>(nfsID, { ...params }) -> void</code>
- <code title="post /v2/nfs/{nfs_id}/actions">client.nfs.<a href="./src/resources/nfs/nfs.ts">initiateAction</a>(nfsID, { ...params }) -> NfInitiateActionResponse</code>

## Snapshots

Types:

- <code><a href="./src/resources/nfs/snapshots.ts">SnapshotRetrieveResponse</a></code>
- <code><a href="./src/resources/nfs/snapshots.ts">SnapshotListResponse</a></code>

Methods:

- <code title="get /v2/nfs/snapshots/{nfs_snapshot_id}">client.nfs.snapshots.<a href="./src/resources/nfs/snapshots.ts">retrieve</a>(nfsSnapshotID, { ...params }) -> SnapshotRetrieveResponse</code>
- <code title="get /v2/nfs/snapshots">client.nfs.snapshots.<a href="./src/resources/nfs/snapshots.ts">list</a>({ ...params }) -> SnapshotListResponse</code>
- <code title="delete /v2/nfs/snapshots/{nfs_snapshot_id}">client.nfs.snapshots.<a href="./src/resources/nfs/snapshots.ts">delete</a>(nfsSnapshotID, { ...params }) -> void</code>
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -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 <dev@digitalocean.com>",
"types": "dist/index.d.ts",
Expand Down
29 changes: 29 additions & 0 deletions src/client.ts
Original file line number Diff line number Diff line change
Expand Up @@ -73,6 +73,7 @@ import {
KnowledgeBaseCreateParams,
KnowledgeBaseCreateResponse,
KnowledgeBaseDeleteResponse,
KnowledgeBaseListIndexingJobsResponse,
KnowledgeBaseListParams,
KnowledgeBaseListResponse,
KnowledgeBaseRetrieveResponse,
Expand All @@ -88,6 +89,18 @@ import {
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';
Expand Down Expand Up @@ -871,6 +884,7 @@ export class Gradient {
models: API.Models = new API.Models(this);
regions: API.Regions = new API.Regions(this);
databases: API.Databases = new API.Databases(this);
nfs: API.Nfs = new API.Nfs(this);
}

Gradient.Agents = Agents;
Expand All @@ -882,6 +896,7 @@ Gradient.KnowledgeBases = KnowledgeBases;
Gradient.Models = Models;
Gradient.Regions = Regions;
Gradient.Databases = Databases;
Gradient.Nfs = Nfs;

export declare namespace Gradient {
export type RequestOptions = Opts.RequestOptions;
Expand Down Expand Up @@ -948,6 +963,7 @@ export declare namespace Gradient {
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,
Expand All @@ -970,6 +986,19 @@ export declare namespace Gradient {

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 type Action = API.Action;
export type ActionLink = API.ActionLink;
export type APILinks = API.APILinks;
Expand Down
76 changes: 74 additions & 2 deletions src/resources/agents/agents.ts
Original file line number Diff line number Diff line change
Expand Up @@ -432,6 +432,8 @@ export interface APIAgent {
*/
model?: APIAgentModel;

model_provider_key?: APIAgent.ModelProviderKey;

/**
* Agent name
*/
Expand Down Expand Up @@ -521,6 +523,13 @@ export interface APIAgent {
*/
version_hash?: string;

/**
* VPC Egress IPs
*/
vpc_egress_ips?: Array<string>;

vpc_uuid?: string;

workspace?: APIWorkspace;
}

Expand All @@ -539,6 +548,8 @@ export namespace APIAgent {
* A Chatbot
*/
export interface Chatbot {
allowed_domains?: Array<string>;

button_background_color?: string;

logo?: string;
Expand Down Expand Up @@ -588,7 +599,8 @@ export namespace APIAgent {
| 'STATUS_WAITING_FOR_UNDEPLOYMENT'
| 'STATUS_UNDEPLOYING'
| 'STATUS_UNDEPLOYMENT_FAILED'
| 'STATUS_DELETED';
| 'STATUS_DELETED'
| 'STATUS_BUILDING';

/**
* Last modified
Expand Down Expand Up @@ -738,6 +750,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<AgentsAPI.APIAgentModel>;

/**
* 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
*/
Expand Down Expand Up @@ -1348,6 +1399,8 @@ export namespace AgentListResponse {
* A Chatbot
*/
export interface Chatbot {
allowed_domains?: Array<string>;

button_background_color?: string;

logo?: string;
Expand Down Expand Up @@ -1397,7 +1450,8 @@ export namespace AgentListResponse {
| 'STATUS_WAITING_FOR_UNDEPLOYMENT'
| 'STATUS_UNDEPLOYING'
| 'STATUS_UNDEPLOYMENT_FAILED'
| 'STATUS_DELETED';
| 'STATUS_DELETED'
| 'STATUS_BUILDING';

/**
* Last modified
Expand Down Expand Up @@ -1648,6 +1702,8 @@ export interface AgentCreateParams {
*/
knowledge_base_uuid?: Array<string>;

model_provider_key_uuid?: string;

/**
* Identifier for the foundation model.
*/
Expand Down Expand Up @@ -1677,11 +1733,22 @@ export interface AgentCreateParams {
* Agent tag to organize related resources
*/
tags?: Array<string>;

/**
* 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<string>;

/**
* Optional anthropic key uuid for use with anthropic models
*/
Expand Down Expand Up @@ -1717,6 +1784,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.
*/
Expand Down
Loading