UNPKG

@pinecone-database/pinecone

Version:

This is the official Node.js SDK for [Pinecone](https://www.pinecone.io), written in TypeScript.

254 lines (253 loc) • 14.4 kB
/** * Pinecone Control Plane API * Pinecone is a vector database that makes it easy to search and retrieve billions of high-dimensional vectors. * * The version of the OpenAPI document: 2025-04 * Contact: support@pinecone.io * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech * Do not edit the class manually. */ import * as runtime from '../runtime'; import type { BackupList, BackupModel, CollectionList, CollectionModel, ConfigureIndexRequest, CreateBackupRequest, CreateCollectionRequest, CreateIndexForModelRequest, CreateIndexFromBackupRequest, CreateIndexFromBackupResponse, CreateIndexRequest, IndexList, IndexModel, RestoreJobList, RestoreJobModel } from '../models/index'; export interface ConfigureIndexOperationRequest { indexName: string; configureIndexRequest: ConfigureIndexRequest; } export interface CreateBackupOperationRequest { indexName: string; createBackupRequest: CreateBackupRequest; } export interface CreateCollectionOperationRequest { createCollectionRequest: CreateCollectionRequest; } export interface CreateIndexOperationRequest { createIndexRequest: CreateIndexRequest; } export interface CreateIndexForModelOperationRequest { createIndexForModelRequest: CreateIndexForModelRequest; } export interface CreateIndexFromBackupOperationRequest { backupId: string; createIndexFromBackupRequest: CreateIndexFromBackupRequest; } export interface DeleteBackupRequest { backupId: string; } export interface DeleteCollectionRequest { collectionName: string; } export interface DeleteIndexRequest { indexName: string; } export interface DescribeBackupRequest { backupId: string; } export interface DescribeCollectionRequest { collectionName: string; } export interface DescribeIndexRequest { indexName: string; } export interface DescribeRestoreJobRequest { jobId: string; } export interface ListIndexBackupsRequest { indexName: string; limit?: number; paginationToken?: string; } export interface ListProjectBackupsRequest { limit?: number; paginationToken?: string; } export interface ListRestoreJobsRequest { limit?: number; paginationToken?: string; } /** * */ export declare class ManageIndexesApi extends runtime.BaseAPI { /** * Configure an existing index. For serverless indexes, you can configure index deletion protection, tags, and integrated inference embedding settings for the index. For pod-based indexes, you can configure the pod size, number of replicas, tags, and index deletion protection. It is not possible to change the pod type of a pod-based index. However, you can create a collection from a pod-based index and then [create a new pod-based index with a different pod type](http://docs.pinecone.io/guides/indexes/pods/create-a-pod-based-index#create-a-pod-index-from-a-collection) from the collection. For guidance and examples, see [Configure an index](http://docs.pinecone.io/guides/indexes/pods/manage-pod-based-indexes). * Configure an index */ configureIndexRaw(requestParameters: ConfigureIndexOperationRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<IndexModel>>; /** * Configure an existing index. For serverless indexes, you can configure index deletion protection, tags, and integrated inference embedding settings for the index. For pod-based indexes, you can configure the pod size, number of replicas, tags, and index deletion protection. It is not possible to change the pod type of a pod-based index. However, you can create a collection from a pod-based index and then [create a new pod-based index with a different pod type](http://docs.pinecone.io/guides/indexes/pods/create-a-pod-based-index#create-a-pod-index-from-a-collection) from the collection. For guidance and examples, see [Configure an index](http://docs.pinecone.io/guides/indexes/pods/manage-pod-based-indexes). * Configure an index */ configureIndex(requestParameters: ConfigureIndexOperationRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<IndexModel>; /** * Create a backup of an index. * Create a backup of an index */ createBackupRaw(requestParameters: CreateBackupOperationRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<BackupModel>>; /** * Create a backup of an index. * Create a backup of an index */ createBackup(requestParameters: CreateBackupOperationRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<BackupModel>; /** * Create a Pinecone collection. Serverless indexes do not support collections. * Create a collection */ createCollectionRaw(requestParameters: CreateCollectionOperationRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<CollectionModel>>; /** * Create a Pinecone collection. Serverless indexes do not support collections. * Create a collection */ createCollection(requestParameters: CreateCollectionOperationRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<CollectionModel>; /** * Create a Pinecone index. This is where you specify the measure of similarity, the dimension of vectors to be stored in the index, which cloud provider you would like to deploy with, and more. For guidance and examples, see [Create an index](https://docs.pinecone.io/guides/index-data/create-an-index). * Create an index */ createIndexRaw(requestParameters: CreateIndexOperationRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<IndexModel>>; /** * Create a Pinecone index. This is where you specify the measure of similarity, the dimension of vectors to be stored in the index, which cloud provider you would like to deploy with, and more. For guidance and examples, see [Create an index](https://docs.pinecone.io/guides/index-data/create-an-index). * Create an index */ createIndex(requestParameters: CreateIndexOperationRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<IndexModel>; /** * Create an index with integrated embedding. With this type of index, you provide source text, and Pinecone uses a [hosted embedding model](https://docs.pinecone.io/guides/index-data/create-an-index#embedding-models) to convert the text automatically during [upsert](https://docs.pinecone.io/reference/api/2025-01/data-plane/upsert_records) and [search](https://docs.pinecone.io/reference/api/2025-01/data-plane/search_records). For guidance and examples, see [Create an index](https://docs.pinecone.io/guides/index-data/create-an-index#integrated-embedding). * Create an index with integrated embedding */ createIndexForModelRaw(requestParameters: CreateIndexForModelOperationRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<IndexModel>>; /** * Create an index with integrated embedding. With this type of index, you provide source text, and Pinecone uses a [hosted embedding model](https://docs.pinecone.io/guides/index-data/create-an-index#embedding-models) to convert the text automatically during [upsert](https://docs.pinecone.io/reference/api/2025-01/data-plane/upsert_records) and [search](https://docs.pinecone.io/reference/api/2025-01/data-plane/search_records). For guidance and examples, see [Create an index](https://docs.pinecone.io/guides/index-data/create-an-index#integrated-embedding). * Create an index with integrated embedding */ createIndexForModel(requestParameters: CreateIndexForModelOperationRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<IndexModel>; /** * Create an index from a backup. * Create an index from a backup */ createIndexFromBackupOperationRaw(requestParameters: CreateIndexFromBackupOperationRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<CreateIndexFromBackupResponse>>; /** * Create an index from a backup. * Create an index from a backup */ createIndexFromBackupOperation(requestParameters: CreateIndexFromBackupOperationRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<CreateIndexFromBackupResponse>; /** * Delete a backup. * Delete a backup */ deleteBackupRaw(requestParameters: DeleteBackupRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<void>>; /** * Delete a backup. * Delete a backup */ deleteBackup(requestParameters: DeleteBackupRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<void>; /** * Delete an existing collection. Serverless indexes do not support collections. * Delete a collection */ deleteCollectionRaw(requestParameters: DeleteCollectionRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<void>>; /** * Delete an existing collection. Serverless indexes do not support collections. * Delete a collection */ deleteCollection(requestParameters: DeleteCollectionRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<void>; /** * Delete an existing index. * Delete an index */ deleteIndexRaw(requestParameters: DeleteIndexRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<void>>; /** * Delete an existing index. * Delete an index */ deleteIndex(requestParameters: DeleteIndexRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<void>; /** * Get a description of a backup. * Describe a backup */ describeBackupRaw(requestParameters: DescribeBackupRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<BackupModel>>; /** * Get a description of a backup. * Describe a backup */ describeBackup(requestParameters: DescribeBackupRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<BackupModel>; /** * Get a description of a collection. Serverless indexes do not support collections. * Describe a collection */ describeCollectionRaw(requestParameters: DescribeCollectionRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<CollectionModel>>; /** * Get a description of a collection. Serverless indexes do not support collections. * Describe a collection */ describeCollection(requestParameters: DescribeCollectionRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<CollectionModel>; /** * Get a description of an index. * Describe an index */ describeIndexRaw(requestParameters: DescribeIndexRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<IndexModel>>; /** * Get a description of an index. * Describe an index */ describeIndex(requestParameters: DescribeIndexRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<IndexModel>; /** * Get a description of a restore job. * Describe a restore job */ describeRestoreJobRaw(requestParameters: DescribeRestoreJobRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<RestoreJobModel>>; /** * Get a description of a restore job. * Describe a restore job */ describeRestoreJob(requestParameters: DescribeRestoreJobRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<RestoreJobModel>; /** * List all collections in a project. Serverless indexes do not support collections. * List collections */ listCollectionsRaw(initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<CollectionList>>; /** * List all collections in a project. Serverless indexes do not support collections. * List collections */ listCollections(initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<CollectionList>; /** * List all backups for an index. * List backups for an index */ listIndexBackupsRaw(requestParameters: ListIndexBackupsRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<BackupList>>; /** * List all backups for an index. * List backups for an index */ listIndexBackups(requestParameters: ListIndexBackupsRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<BackupList>; /** * List all indexes in a project. * List indexes */ listIndexesRaw(initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<IndexList>>; /** * List all indexes in a project. * List indexes */ listIndexes(initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<IndexList>; /** * List all backups for a project. * List backups for all indexes in a project */ listProjectBackupsRaw(requestParameters: ListProjectBackupsRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<BackupList>>; /** * List all backups for a project. * List backups for all indexes in a project */ listProjectBackups(requestParameters?: ListProjectBackupsRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<BackupList>; /** * List all restore jobs for a project. * List restore jobs */ listRestoreJobsRaw(requestParameters: ListRestoreJobsRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<RestoreJobList>>; /** * List all restore jobs for a project. * List restore jobs */ listRestoreJobs(requestParameters?: ListRestoreJobsRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<RestoreJobList>; }