UNPKG

@neynar/nodejs-sdk

Version:

SDK to interact with Neynar APIs (https://docs.neynar.com/reference/quickstart)

731 lines 158 kB
/** * Neynar API * The Neynar API allows you to interact with the Farcaster protocol among other things. See the [Neynar docs](https://docs.neynar.com/reference) for more details. * * The version of the OpenAPI document: 3.137.0 * Contact: team@neynar.com * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech * Do not edit the class manually. */ import type { Configuration } from '../configuration'; import type { AxiosPromise, AxiosInstance, RawAxiosRequestConfig } from 'axios'; import { type RequestArgs, BaseAPI } from '../base'; import type { AssociateDeployment200Response } from '../models'; import type { AssociateDeploymentRequest } from '../models'; import type { BuildRequest } from '../models'; import type { CreateDeploymentRequest } from '../models'; import type { DeleteDeployment200Response } from '../models'; import type { DeleteDeploymentRequest } from '../models'; import type { DeleteRows200Response } from '../models'; import type { DeleteRowsRequest } from '../models'; import type { DeleteSecretsRequest } from '../models'; import type { DeployToVercel200Response } from '../models'; import type { DeployToVercelRequest } from '../models'; import type { ExecuteSql200Response } from '../models'; import type { ExecuteSqlRequest } from '../models'; import type { GetAccountAssociation200Response } from '../models'; import type { GetConversationMessages200Response } from '../models'; import type { GetDeploymentFile200Response } from '../models'; import type { GetDevStatus200Response } from '../models'; import type { GetTableSchema200Response } from '../models'; import type { InsertRows200Response } from '../models'; import type { InsertRowsRequest } from '../models'; import type { ListConversations200Response } from '../models'; import type { ListDeploymentFiles200Response } from '../models'; import type { ListDeployments200ResponseInner } from '../models'; import type { ListSecrets200Response } from '../models'; import type { ListTables200Response } from '../models'; import type { PromptDeploymentStreamRequest } from '../models'; import type { QueryTable200Response } from '../models'; import type { QueryTableRequest } from '../models'; import type { RecoverRequest } from '../models'; import type { StartApp200Response } from '../models'; import type { StartAppRequest } from '../models'; import type { UpdateRows200Response } from '../models'; import type { UpdateRowsRequest } from '../models'; import type { UploadImage200Response } from '../models'; import type { UploadImageUrlRequest } from '../models'; import type { UpsertSecrets200Response } from '../models'; import type { UpsertSecretsRequest } from '../models'; import type { VercelDeploymentLogs200Response } from '../models'; import type { VercelDeploymentStatus200Response } from '../models'; /** * StudioApi - axios parameter creator * @export */ export declare const StudioApiAxiosParamCreator: (configuration?: Configuration) => { /** * Associates a generated miniapp with a Farcaster account using a JFS-signed domain association. Requires API key authentication. Note: Studio CU is tracked based on LLM token usage, not per API call. * @summary Set account association * @param {AssociateDeploymentRequest} associateDeploymentRequest * @param {*} [options] Override http request option. * @throws {RequiredError} * @returns {Promise<AssociateDeployment200Response>} A promise that resolves to a `AssociateDeployment200Response` object * * For more information, refer to the [API documentation](https://docs.neynar.com/reference/associate-deployment) * */ associateDeployment: (associateDeploymentRequest: AssociateDeploymentRequest, options?: RawAxiosRequestConfig) => Promise<RequestArgs>; /** * Runs Next.js build process for the generated app. If build fails, automatically calls a build-fixer agent to resolve errors. Streams build output and agent responses via Server-Sent Events. Requires API key authentication. Note: Studio CU is tracked based on LLM token usage, not per API call. * @summary Build generated app with automatic error fixing * @param {BuildRequest} buildRequest * @param {*} [options] Override http request option. * @throws {RequiredError} * @returns {Promise<>} A promise that resolves to a `` object * * For more information, refer to the [API documentation](https://docs.neynar.com/reference/build) * */ build: (buildRequest: BuildRequest, options?: RawAxiosRequestConfig) => Promise<RequestArgs>; /** * Creates and deploys an instance of the miniapp generator for a user. Requires authentication via API key in the request header. Note: Studio CU is tracked based on LLM token usage, not per API call. * @summary Create a miniapp generator deployment * @param {CreateDeploymentRequest} createDeploymentRequest * @param {*} [options] Override http request option. * @throws {RequiredError} * @returns {Promise<ListDeployments200ResponseInner>} A promise that resolves to a `ListDeployments200ResponseInner` object * * For more information, refer to the [API documentation](https://docs.neynar.com/reference/create-deployment) * */ createDeployment: (createDeploymentRequest: CreateDeploymentRequest, options?: RawAxiosRequestConfig) => Promise<RequestArgs>; /** * Deletes a specific miniapp generator deployment or all deployments for a FID. If deployment_id or name is provided, deletes single deployment. If only FID is provided, deletes all deployments for that FID. Requires API key authentication. Note: Studio CU is tracked based on LLM token usage, not per API call. * @summary Delete deployment(s) * @param {DeleteDeploymentRequest} deleteDeploymentRequest * @param {*} [options] Override http request option. * @throws {RequiredError} * @returns {Promise<DeleteDeployment200Response>} A promise that resolves to a `DeleteDeployment200Response` object * * For more information, refer to the [API documentation](https://docs.neynar.com/reference/delete-deployment) * */ deleteDeployment: (deleteDeploymentRequest: DeleteDeploymentRequest, options?: RawAxiosRequestConfig) => Promise<RequestArgs>; /** * Deletes rows matching the WHERE conditions. WHERE clause is required to prevent accidental bulk deletes. * @summary Delete rows from table * @param {string} tableName * @param {DeleteRowsRequest} deleteRowsRequest * @param {*} [options] Override http request option. * @throws {RequiredError} * @returns {Promise<DeleteRows200Response>} A promise that resolves to a `DeleteRows200Response` object * * For more information, refer to the [API documentation](https://docs.neynar.com/reference/delete-rows) * */ deleteRows: (tableName: string, deleteRowsRequest: DeleteRowsRequest, options?: RawAxiosRequestConfig) => Promise<RequestArgs>; /** * Deletes environment variables (secrets) from a deployment. * @summary Delete deployment secrets * @param {DeleteSecretsRequest} deleteSecretsRequest * @param {*} [options] Override http request option. * @throws {RequiredError} * @returns {Promise<UpsertSecrets200Response>} A promise that resolves to a `UpsertSecrets200Response` object * * For more information, refer to the [API documentation](https://docs.neynar.com/reference/delete-secrets) * */ deleteSecrets: (deleteSecretsRequest: DeleteSecretsRequest, options?: RawAxiosRequestConfig) => Promise<RequestArgs>; /** * Publishes the generated miniapp to Vercel via GitHub. Creates a GitHub repository, pushes code, creates a Vercel project linked to GitHub, and triggers deployment. Requires API key authentication. Note: Studio CU is tracked based on LLM token usage, not per API call. * @summary Deploy miniapp to Vercel * @param {DeployToVercelRequest} deployToVercelRequest * @param {*} [options] Override http request option. * @throws {RequiredError} * @returns {Promise<DeployToVercel200Response>} A promise that resolves to a `DeployToVercel200Response` object * * For more information, refer to the [API documentation](https://docs.neynar.com/reference/deploy-to-vercel) * */ deployToVercel: (deployToVercelRequest: DeployToVercelRequest, options?: RawAxiosRequestConfig) => Promise<RequestArgs>; /** * Executes a raw SQL query against the deployment database. Only SELECT, WITH, and EXPLAIN queries are allowed. Admin access required. * @summary Execute raw SQL query (admin only) * @param {ExecuteSqlRequest} executeSqlRequest * @param {*} [options] Override http request option. * @throws {RequiredError} * @returns {Promise<ExecuteSql200Response>} A promise that resolves to a `ExecuteSql200Response` object * * For more information, refer to the [API documentation](https://docs.neynar.com/reference/execute-sql) * */ executeSql: (executeSqlRequest: ExecuteSqlRequest, options?: RawAxiosRequestConfig) => Promise<RequestArgs>; /** * Retrieves the account-association.json file from a miniapp deployment, which contains the JFS-signed domain association. Requires API key authentication. * @summary Get account association of a miniapp * @param {string} [deploymentId] Deployment ID * @param {string} [namespace] Kubernetes namespace name * @param {string} [name] Kubernetes deployment name * @param {*} [options] Override http request option. * @throws {RequiredError} * @returns {Promise<GetAccountAssociation200Response>} A promise that resolves to a `GetAccountAssociation200Response` object * * For more information, refer to the [API documentation](https://docs.neynar.com/reference/get-account-association) * */ getAccountAssociation: (deploymentId?: string, namespace?: string, name?: string, options?: RawAxiosRequestConfig) => Promise<RequestArgs>; /** * Retrieves all messages in a specific conversation. Requires API key authentication. Note: Studio CU is tracked based on LLM token usage, not per API call. * @summary Get messages in a conversation * @param {string} conversationId Conversation ID * @param {string} [deploymentId] Deployment ID (UUID). Required if name not provided. * @param {number | null} [fid] Farcaster ID of the user; if not provided, namespace must be provided * @param {string} [name] Kubernetes deployment name. Required if deployment_id not provided. * @param {string} [namespace] Optional Kubernetes namespace. If not provided, will query for the active namespace for the given FID. * @param {boolean | null} [includeDeleted] Include deleted messages in the response. Defaults to false. * @param {*} [options] Override http request option. * @throws {RequiredError} * @returns {Promise<GetConversationMessages200Response>} A promise that resolves to a `GetConversationMessages200Response` object * * For more information, refer to the [API documentation](https://docs.neynar.com/reference/get-conversation-messages) * */ getConversationMessages: (conversationId: string, deploymentId?: string, fid?: number | null, name?: string, namespace?: string, includeDeleted?: boolean | null, options?: RawAxiosRequestConfig) => Promise<RequestArgs>; /** * Fetches info about a miniapp generator deployment by its deployment_id or name and creator\'s Farcaster ID. Requires API key authentication. Note: Studio CU is tracked based on LLM token usage, not per API call. * @summary Get deployment info * @param {string} [deploymentId] Deployment ID (UUID). Required if name not provided. * @param {number | null} [fid] Farcaster ID of the user; if not provided, namespace must be provided * @param {string} [name] Kubernetes deployment name. Required if deployment_id not provided. * @param {string} [namespace] Optional Kubernetes namespace. If not provided, will query for the active namespace for the given FID. * @param {*} [options] Override http request option. * @throws {RequiredError} * @returns {Promise<ListDeployments200ResponseInner>} A promise that resolves to a `ListDeployments200ResponseInner` object * * For more information, refer to the [API documentation](https://docs.neynar.com/reference/get-deployment) * */ getDeployment: (deploymentId?: string, fid?: number | null, name?: string, namespace?: string, options?: RawAxiosRequestConfig) => Promise<RequestArgs>; /** * Retrieves the contents of a specific file from the generated app. Requires Studio admin authentication or FID ownership validation. Note: Studio CU is tracked based on LLM token usage, not per API call. * @summary Get deployment file contents * @param {string} filePath File path relative to gen/ * @param {string} [deploymentId] Deployment ID (UUID). Required if name not provided. * @param {number | null} [fid] Farcaster ID of the user; if not provided, namespace must be provided * @param {string} [name] Kubernetes deployment name. Required if deployment_id not provided. * @param {string} [namespace] Optional Kubernetes namespace. If not provided, will query for the active namespace for the given FID. * @param {*} [options] Override http request option. * @throws {RequiredError} * @returns {Promise<GetDeploymentFile200Response>} A promise that resolves to a `GetDeploymentFile200Response` object * * For more information, refer to the [API documentation](https://docs.neynar.com/reference/get-deployment-file) * */ getDeploymentFile: (filePath: string, deploymentId?: string, fid?: number | null, name?: string, namespace?: string, options?: RawAxiosRequestConfig) => Promise<RequestArgs>; /** * Retrieves the dev-status.json file from a miniapp deployment, which tracks the progress of app development phases. Requires API key authentication. Note: Studio CU is tracked based on LLM token usage, not per API call. * @summary Get dev status of a miniapp * @param {string} [deploymentId] Deployment ID * @param {string} [namespace] Kubernetes namespace name * @param {string} [name] Kubernetes deployment name * @param {*} [options] Override http request option. * @throws {RequiredError} * @returns {Promise<GetDevStatus200Response>} A promise that resolves to a `GetDevStatus200Response` object * * For more information, refer to the [API documentation](https://docs.neynar.com/reference/get-dev-status) * */ getDevStatus: (deploymentId?: string, namespace?: string, name?: string, options?: RawAxiosRequestConfig) => Promise<RequestArgs>; /** * Retrieves the complete schema for a table including columns, indexes, and foreign keys. * @summary Get table schema * @param {string} tableName * @param {string} deploymentId Deployment ID (UUID) * @param {number | null} [fid] Farcaster ID of the user. Required for non-admin users. * @param {*} [options] Override http request option. * @throws {RequiredError} * @returns {Promise<GetTableSchema200Response>} A promise that resolves to a `GetTableSchema200Response` object * * For more information, refer to the [API documentation](https://docs.neynar.com/reference/get-table-schema) * */ getTableSchema: (tableName: string, deploymentId: string, fid?: number | null, options?: RawAxiosRequestConfig) => Promise<RequestArgs>; /** * Inserts one or more rows into the specified table. Returns the inserted rows with generated values. * @summary Insert rows into table * @param {string} tableName * @param {InsertRowsRequest} insertRowsRequest * @param {*} [options] Override http request option. * @throws {RequiredError} * @returns {Promise<InsertRows200Response>} A promise that resolves to a `InsertRows200Response` object * * For more information, refer to the [API documentation](https://docs.neynar.com/reference/insert-rows) * */ insertRows: (tableName: string, insertRowsRequest: InsertRowsRequest, options?: RawAxiosRequestConfig) => Promise<RequestArgs>; /** * Lists all conversations for a specific deployment. Requires API key authentication. Note: Studio CU is tracked based on LLM token usage, not per API call. * @summary List conversations for a deployment * @param {string} [deploymentId] Deployment ID (UUID). If provided, filters conversations to this deployment only. * @param {number | null} [fid] Farcaster ID of the user. Required for non-admin users. Studio admins can omit to query all conversations. * @param {string} [name] Kubernetes deployment name. If provided, filters conversations to this deployment only. * @param {boolean | null} [includeDeleted] Include deleted conversations in the response. Defaults to false. * @param {*} [options] Override http request option. * @throws {RequiredError} * @returns {Promise<ListConversations200Response>} A promise that resolves to a `ListConversations200Response` object * * For more information, refer to the [API documentation](https://docs.neynar.com/reference/list-conversations) * */ listConversations: (deploymentId?: string, fid?: number | null, name?: string, includeDeleted?: boolean | null, options?: RawAxiosRequestConfig) => Promise<RequestArgs>; /** * Lists files in a directory of the generated app. Requires Studio admin authentication or FID ownership validation. Note: Studio CU is tracked based on LLM token usage, not per API call. * @summary List deployment files * @param {string} [deploymentId] Deployment ID (UUID). Required if name not provided. * @param {number | null} [fid] Farcaster ID of the user; if not provided, namespace must be provided * @param {string} [name] Kubernetes deployment name. Required if deployment_id not provided. * @param {string} [namespace] Optional Kubernetes namespace. If not provided, will query for the active namespace for the given FID. * @param {string} [directory] Directory path relative to gen/ (defaults to root) * @param {*} [options] Override http request option. * @throws {RequiredError} * @returns {Promise<ListDeploymentFiles200Response>} A promise that resolves to a `ListDeploymentFiles200Response` object * * For more information, refer to the [API documentation](https://docs.neynar.com/reference/list-deployment-files) * */ listDeploymentFiles: (deploymentId?: string, fid?: number | null, name?: string, namespace?: string, directory?: string, options?: RawAxiosRequestConfig) => Promise<RequestArgs>; /** * Lists all miniapp generator deployments for a user. Requires API key authentication. Note: Studio CU is tracked based on LLM token usage, not per API call. * @summary List deployments * @param {number | null} [fid] Farcaster ID of the user. Required for non-admin users. Studio admins can omit to query all deployments. * @param {number} [limit] Maximum number of deployments to return. Defaults to 50, max 1000. (Default: 50, Maximum: 1000) * @param {number | null} [offset] Number of deployments to skip for pagination. Defaults to 0. * @param {boolean | null} [includeDeleted] Include deleted deployments in the response. Defaults to false. * @param {*} [options] Override http request option. * @throws {RequiredError} * @returns {Promise<Array<ListDeployments200ResponseInner>>} A promise that resolves to a `Array<ListDeployments200ResponseInner>` object * * For more information, refer to the [API documentation](https://docs.neynar.com/reference/list-deployments) * */ listDeployments: (fid?: number | null, limit?: number, offset?: number | null, includeDeleted?: boolean | null, options?: RawAxiosRequestConfig) => Promise<RequestArgs>; /** * Retrieves all secrets for a deployment. * @summary List deployment secrets * @param {string} deploymentId Deployment ID to list secrets for * @param {string} [key] Optional filter by environment variable name * @param {*} [options] Override http request option. * @throws {RequiredError} * @returns {Promise<ListSecrets200Response>} A promise that resolves to a `ListSecrets200Response` object * * For more information, refer to the [API documentation](https://docs.neynar.com/reference/list-secrets) * */ listSecrets: (deploymentId: string, key?: string, options?: RawAxiosRequestConfig) => Promise<RequestArgs>; /** * Lists all tables and views in the deployment database, excluding system tables. * @summary List all tables in deployment database * @param {string} deploymentId Deployment ID (UUID) * @param {number | null} [fid] Farcaster ID of the user. Required for non-admin users. * @param {*} [options] Override http request option. * @throws {RequiredError} * @returns {Promise<ListTables200Response>} A promise that resolves to a `ListTables200Response` object * * For more information, refer to the [API documentation](https://docs.neynar.com/reference/list-tables) * */ listTables: (deploymentId: string, fid?: number | null, options?: RawAxiosRequestConfig) => Promise<RequestArgs>; /** * Sends a prompt to a specific miniapp generator deployment and returns a streaming response using Server-Sent Events. The response is a continuous stream of Server-Sent Events, not a single JSON payload. Each event contains a JSON object with type, message, and other fields specific to the message type. Requires authentication via API key in the request header. Note: Studio CU is tracked based on LLM token usage, not per API call. * @summary Prompt a deployment with streaming response * @param {PromptDeploymentStreamRequest} promptDeploymentStreamRequest * @param {*} [options] Override http request option. * @throws {RequiredError} * @returns {Promise<>} A promise that resolves to a `` object * * For more information, refer to the [API documentation](https://docs.neynar.com/reference/prompt-deployment-stream) * */ promptDeploymentStream: (promptDeploymentStreamRequest: PromptDeploymentStreamRequest, options?: RawAxiosRequestConfig) => Promise<RequestArgs>; /** * Query data from a table with pagination and sorting. * @summary Query table data * @param {QueryTableRequest} queryTableRequest * @param {*} [options] Override http request option. * @throws {RequiredError} * @returns {Promise<QueryTable200Response>} A promise that resolves to a `QueryTable200Response` object * * For more information, refer to the [API documentation](https://docs.neynar.com/reference/query-table) * */ queryTable: (queryTableRequest: QueryTableRequest, options?: RawAxiosRequestConfig) => Promise<RequestArgs>; /** * Attempts to recover a broken dev server. Phase 1: reads dev server error logs and sends them to an AI agent for fixing, then waits for HMR to auto-rebuild. Phase 2: if HMR fails, falls back to a full npm build with AI retry loop. Streams progress events via Server-Sent Events. Requires API key authentication. Note: Studio CU is tracked based on LLM token usage, not per API call. * @summary Recover dev server with two-phase strategy * @param {RecoverRequest} recoverRequest * @param {*} [options] Override http request option. * @throws {RequiredError} * @returns {Promise<>} A promise that resolves to a `` object * * For more information, refer to the [API documentation](https://docs.neynar.com/reference/recover) * */ recover: (recoverRequest: RecoverRequest, options?: RawAxiosRequestConfig) => Promise<RequestArgs>; /** * Starts the Next.js development server for the generated miniapp. Requires Studio admin authentication. Note: Studio CU is tracked based on LLM token usage, not per API call. * @summary Start generated miniapp * @param {StartAppRequest} startAppRequest * @param {*} [options] Override http request option. * @throws {RequiredError} * @returns {Promise<StartApp200Response>} A promise that resolves to a `StartApp200Response` object * * For more information, refer to the [API documentation](https://docs.neynar.com/reference/start-app) * */ startApp: (startAppRequest: StartAppRequest, options?: RawAxiosRequestConfig) => Promise<RequestArgs>; /** * Stops the Next.js development server for the generated miniapp. Requires Studio admin authentication. Note: Studio CU is tracked based on LLM token usage, not per API call. * @summary Stop generated miniapp * @param {StartAppRequest} startAppRequest * @param {*} [options] Override http request option. * @throws {RequiredError} * @returns {Promise<StartApp200Response>} A promise that resolves to a `StartApp200Response` object * * For more information, refer to the [API documentation](https://docs.neynar.com/reference/stop-app) * */ stopApp: (startAppRequest: StartAppRequest, options?: RawAxiosRequestConfig) => Promise<RequestArgs>; /** * Updates rows matching the WHERE conditions. WHERE clause is required to prevent accidental bulk updates. * @summary Update rows in table * @param {string} tableName * @param {UpdateRowsRequest} updateRowsRequest * @param {*} [options] Override http request option. * @throws {RequiredError} * @returns {Promise<UpdateRows200Response>} A promise that resolves to a `UpdateRows200Response` object * * For more information, refer to the [API documentation](https://docs.neynar.com/reference/update-rows) * */ updateRows: (tableName: string, updateRowsRequest: UpdateRowsRequest, options?: RawAxiosRequestConfig) => Promise<RequestArgs>; /** * Uploads an image file to the generated miniapp public folder. The image will be accessible as a static asset on the deployed miniapp. Requires API key authentication. Note: Studio CU is tracked based on LLM token usage, not per API call. * @summary Upload image to deployment * @param {*} [options] Override http request option. * @throws {RequiredError} * @returns {Promise<UploadImage200Response>} A promise that resolves to a `UploadImage200Response` object * * For more information, refer to the [API documentation](https://docs.neynar.com/reference/upload-image) * */ uploadImage: (options?: RawAxiosRequestConfig) => Promise<RequestArgs>; /** * Downloads an image from the provided URL and saves it to the generated miniapp public folder. The image will be accessible as a static asset on the deployed miniapp. Requires API key authentication. Note: Studio CU is tracked based on LLM token usage, not per API call. * @summary Upload image from URL to deployment * @param {UploadImageUrlRequest} uploadImageUrlRequest * @param {*} [options] Override http request option. * @throws {RequiredError} * @returns {Promise<UploadImage200Response>} A promise that resolves to a `UploadImage200Response` object * * For more information, refer to the [API documentation](https://docs.neynar.com/reference/upload-image-url) * */ uploadImageUrl: (uploadImageUrlRequest: UploadImageUrlRequest, options?: RawAxiosRequestConfig) => Promise<RequestArgs>; /** * Upsert secrets for a deployment. * @summary Upsert deployment secrets * @param {UpsertSecretsRequest} upsertSecretsRequest * @param {*} [options] Override http request option. * @throws {RequiredError} * @returns {Promise<UpsertSecrets200Response>} A promise that resolves to a `UpsertSecrets200Response` object * * For more information, refer to the [API documentation](https://docs.neynar.com/reference/upsert-secrets) * */ upsertSecrets: (upsertSecretsRequest: UpsertSecretsRequest, options?: RawAxiosRequestConfig) => Promise<RequestArgs>; /** * Retrieves the build logs for a Vercel deployment. Useful for debugging failed deployments. Requires Studio admin authentication. Note: Studio CU is tracked based on LLM token usage, not per API call. * @summary Get Vercel deployment build logs * @param {string} [deploymentId] Deployment ID (UUID). Required if name not provided. * @param {number | null} [fid] Farcaster ID of the user * @param {string} [namespace] K8s Namespace name * @param {string} [name] Deployment name used to identify the Vercel project. Required if deployment_id not provided. * @param {number} [limit] Maximum number of log events to return. Defaults to 100. * @param {*} [options] Override http request option. * @throws {RequiredError} * @returns {Promise<VercelDeploymentLogs200Response>} A promise that resolves to a `VercelDeploymentLogs200Response` object * * For more information, refer to the [API documentation](https://docs.neynar.com/reference/vercel-deployment-logs) * */ vercelDeploymentLogs: (deploymentId?: string, fid?: number | null, namespace?: string, name?: string, limit?: number, options?: RawAxiosRequestConfig) => Promise<RequestArgs>; /** * Retrieves the status of a Vercel deployment for a miniapp. Looks up the Vercel project ID from the deployment and queries Vercel API for deployment status. Requires API key authentication. Note: Studio CU is tracked based on LLM token usage, not per API call. * @summary Get Vercel deployment status * @param {string} [deploymentId] Deployment ID (UUID). Required if name not provided. * @param {number | null} [fid] Farcaster ID of the user; if not provided, namespace must be provided * @param {string} [namespace] K8s Namespace name * @param {string} [name] Deployment name used to identify the Vercel project. Required if deployment_id not provided. * @param {*} [options] Override http request option. * @throws {RequiredError} * @returns {Promise<VercelDeploymentStatus200Response>} A promise that resolves to a `VercelDeploymentStatus200Response` object * * For more information, refer to the [API documentation](https://docs.neynar.com/reference/vercel-deployment-status) * */ vercelDeploymentStatus: (deploymentId?: string, fid?: number | null, namespace?: string, name?: string, options?: RawAxiosRequestConfig) => Promise<RequestArgs>; }; /** * StudioApi - functional programming interface * @export */ export declare const StudioApiFp: (configuration?: Configuration) => { /** * Associates a generated miniapp with a Farcaster account using a JFS-signed domain association. Requires API key authentication. Note: Studio CU is tracked based on LLM token usage, not per API call. * @summary Set account association * @param {AssociateDeploymentRequest} associateDeploymentRequest * @param {*} [options] Override http request option. * @throws {RequiredError} * @returns {Promise<AssociateDeployment200Response>} A promise that resolves to a `AssociateDeployment200Response` object * * For more information, refer to the [API documentation](https://docs.neynar.com/reference/associate-deployment) * */ associateDeployment(associateDeploymentRequest: AssociateDeploymentRequest, options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise<AssociateDeployment200Response>>; /** * Runs Next.js build process for the generated app. If build fails, automatically calls a build-fixer agent to resolve errors. Streams build output and agent responses via Server-Sent Events. Requires API key authentication. Note: Studio CU is tracked based on LLM token usage, not per API call. * @summary Build generated app with automatic error fixing * @param {BuildRequest} buildRequest * @param {*} [options] Override http request option. * @throws {RequiredError} * @returns {Promise<>} A promise that resolves to a `` object * * For more information, refer to the [API documentation](https://docs.neynar.com/reference/build) * */ build(buildRequest: BuildRequest, options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise<void>>; /** * Creates and deploys an instance of the miniapp generator for a user. Requires authentication via API key in the request header. Note: Studio CU is tracked based on LLM token usage, not per API call. * @summary Create a miniapp generator deployment * @param {CreateDeploymentRequest} createDeploymentRequest * @param {*} [options] Override http request option. * @throws {RequiredError} * @returns {Promise<ListDeployments200ResponseInner>} A promise that resolves to a `ListDeployments200ResponseInner` object * * For more information, refer to the [API documentation](https://docs.neynar.com/reference/create-deployment) * */ createDeployment(createDeploymentRequest: CreateDeploymentRequest, options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise<ListDeployments200ResponseInner>>; /** * Deletes a specific miniapp generator deployment or all deployments for a FID. If deployment_id or name is provided, deletes single deployment. If only FID is provided, deletes all deployments for that FID. Requires API key authentication. Note: Studio CU is tracked based on LLM token usage, not per API call. * @summary Delete deployment(s) * @param {DeleteDeploymentRequest} deleteDeploymentRequest * @param {*} [options] Override http request option. * @throws {RequiredError} * @returns {Promise<DeleteDeployment200Response>} A promise that resolves to a `DeleteDeployment200Response` object * * For more information, refer to the [API documentation](https://docs.neynar.com/reference/delete-deployment) * */ deleteDeployment(deleteDeploymentRequest: DeleteDeploymentRequest, options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise<DeleteDeployment200Response>>; /** * Deletes rows matching the WHERE conditions. WHERE clause is required to prevent accidental bulk deletes. * @summary Delete rows from table * @param {string} tableName * @param {DeleteRowsRequest} deleteRowsRequest * @param {*} [options] Override http request option. * @throws {RequiredError} * @returns {Promise<DeleteRows200Response>} A promise that resolves to a `DeleteRows200Response` object * * For more information, refer to the [API documentation](https://docs.neynar.com/reference/delete-rows) * */ deleteRows(tableName: string, deleteRowsRequest: DeleteRowsRequest, options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise<DeleteRows200Response>>; /** * Deletes environment variables (secrets) from a deployment. * @summary Delete deployment secrets * @param {DeleteSecretsRequest} deleteSecretsRequest * @param {*} [options] Override http request option. * @throws {RequiredError} * @returns {Promise<UpsertSecrets200Response>} A promise that resolves to a `UpsertSecrets200Response` object * * For more information, refer to the [API documentation](https://docs.neynar.com/reference/delete-secrets) * */ deleteSecrets(deleteSecretsRequest: DeleteSecretsRequest, options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise<UpsertSecrets200Response>>; /** * Publishes the generated miniapp to Vercel via GitHub. Creates a GitHub repository, pushes code, creates a Vercel project linked to GitHub, and triggers deployment. Requires API key authentication. Note: Studio CU is tracked based on LLM token usage, not per API call. * @summary Deploy miniapp to Vercel * @param {DeployToVercelRequest} deployToVercelRequest * @param {*} [options] Override http request option. * @throws {RequiredError} * @returns {Promise<DeployToVercel200Response>} A promise that resolves to a `DeployToVercel200Response` object * * For more information, refer to the [API documentation](https://docs.neynar.com/reference/deploy-to-vercel) * */ deployToVercel(deployToVercelRequest: DeployToVercelRequest, options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise<DeployToVercel200Response>>; /** * Executes a raw SQL query against the deployment database. Only SELECT, WITH, and EXPLAIN queries are allowed. Admin access required. * @summary Execute raw SQL query (admin only) * @param {ExecuteSqlRequest} executeSqlRequest * @param {*} [options] Override http request option. * @throws {RequiredError} * @returns {Promise<ExecuteSql200Response>} A promise that resolves to a `ExecuteSql200Response` object * * For more information, refer to the [API documentation](https://docs.neynar.com/reference/execute-sql) * */ executeSql(executeSqlRequest: ExecuteSqlRequest, options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise<ExecuteSql200Response>>; /** * Retrieves the account-association.json file from a miniapp deployment, which contains the JFS-signed domain association. Requires API key authentication. * @summary Get account association of a miniapp * @param {string} [deploymentId] Deployment ID * @param {string} [namespace] Kubernetes namespace name * @param {string} [name] Kubernetes deployment name * @param {*} [options] Override http request option. * @throws {RequiredError} * @returns {Promise<GetAccountAssociation200Response>} A promise that resolves to a `GetAccountAssociation200Response` object * * For more information, refer to the [API documentation](https://docs.neynar.com/reference/get-account-association) * */ getAccountAssociation(deploymentId?: string, namespace?: string, name?: string, options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise<GetAccountAssociation200Response>>; /** * Retrieves all messages in a specific conversation. Requires API key authentication. Note: Studio CU is tracked based on LLM token usage, not per API call. * @summary Get messages in a conversation * @param {string} conversationId Conversation ID * @param {string} [deploymentId] Deployment ID (UUID). Required if name not provided. * @param {number | null} [fid] Farcaster ID of the user; if not provided, namespace must be provided * @param {string} [name] Kubernetes deployment name. Required if deployment_id not provided. * @param {string} [namespace] Optional Kubernetes namespace. If not provided, will query for the active namespace for the given FID. * @param {boolean | null} [includeDeleted] Include deleted messages in the response. Defaults to false. * @param {*} [options] Override http request option. * @throws {RequiredError} * @returns {Promise<GetConversationMessages200Response>} A promise that resolves to a `GetConversationMessages200Response` object * * For more information, refer to the [API documentation](https://docs.neynar.com/reference/get-conversation-messages) * */ getConversationMessages(conversationId: string, deploymentId?: string, fid?: number | null, name?: string, namespace?: string, includeDeleted?: boolean | null, options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise<GetConversationMessages200Response>>; /** * Fetches info about a miniapp generator deployment by its deployment_id or name and creator\'s Farcaster ID. Requires API key authentication. Note: Studio CU is tracked based on LLM token usage, not per API call. * @summary Get deployment info * @param {string} [deploymentId] Deployment ID (UUID). Required if name not provided. * @param {number | null} [fid] Farcaster ID of the user; if not provided, namespace must be provided * @param {string} [name] Kubernetes deployment name. Required if deployment_id not provided. * @param {string} [namespace] Optional Kubernetes namespace. If not provided, will query for the active namespace for the given FID. * @param {*} [options] Override http request option. * @throws {RequiredError} * @returns {Promise<ListDeployments200ResponseInner>} A promise that resolves to a `ListDeployments200ResponseInner` object * * For more information, refer to the [API documentation](https://docs.neynar.com/reference/get-deployment) * */ getDeployment(deploymentId?: string, fid?: number | null, name?: string, namespace?: string, options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise<ListDeployments200ResponseInner>>; /** * Retrieves the contents of a specific file from the generated app. Requires Studio admin authentication or FID ownership validation. Note: Studio CU is tracked based on LLM token usage, not per API call. * @summary Get deployment file contents * @param {string} filePath File path relative to gen/ * @param {string} [deploymentId] Deployment ID (UUID). Required if name not provided. * @param {number | null} [fid] Farcaster ID of the user; if not provided, namespace must be provided * @param {string} [name] Kubernetes deployment name. Required if deployment_id not provided. * @param {string} [namespace] Optional Kubernetes namespace. If not provided, will query for the active namespace for the given FID. * @param {*} [options] Override http request option. * @throws {RequiredError} * @returns {Promise<GetDeploymentFile200Response>} A promise that resolves to a `GetDeploymentFile200Response` object * * For more information, refer to the [API documentation](https://docs.neynar.com/reference/get-deployment-file) * */ getDeploymentFile(filePath: string, deploymentId?: string, fid?: number | null, name?: string, namespace?: string, options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise<GetDeploymentFile200Response>>; /** * Retrieves the dev-status.json file from a miniapp deployment, which tracks the progress of app development phases. Requires API key authentication. Note: Studio CU is tracked based on LLM token usage, not per API call. * @summary Get dev status of a miniapp * @param {string} [deploymentId] Deployment ID * @param {string} [namespace] Kubernetes namespace name * @param {string} [name] Kubernetes deployment name * @param {*} [options] Override http request option. * @throws {RequiredError} * @returns {Promise<GetDevStatus200Response>} A promise that resolves to a `GetDevStatus200Response` object * * For more information, refer to the [API documentation](https://docs.neynar.com/reference/get-dev-status) * */ getDevStatus(deploymentId?: string, namespace?: string, name?: string, options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise<GetDevStatus200Response>>; /** * Retrieves the complete schema for a table including columns, indexes, and foreign keys. * @summary Get table schema * @param {string} tableName * @param {string} deploymentId Deployment ID (UUID) * @param {number | null} [fid] Farcaster ID of the user. Required for non-admin users. * @param {*} [options] Override http request option. * @throws {RequiredError} * @returns {Promise<GetTableSchema200Response>} A promise that resolves to a `GetTableSchema200Response` object * * For more information, refer to the [API documentation](https://docs.neynar.com/reference/get-table-schema) * */ getTableSchema(tableName: string, deploymentId: string, fid?: number | null, options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise<GetTableSchema200Response>>; /** * Inserts one or more rows into the specified table. Returns the inserted rows with generated values. * @summary Insert rows into table * @param {string} tableName * @param {InsertRowsRequest} insertRowsRequest * @param {*} [options] Override http request option. * @throws {RequiredError} * @returns {Promise<InsertRows200Response>} A promise that resolves to a `InsertRows200Response` object * * For more information, refer to the [API documentation](https://docs.neynar.com/reference/insert-rows) * */ insertRows(tableName: string, insertRowsRequest: InsertRowsRequest, options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise<InsertRows200Response>>; /** * Lists all conversations for a specific deployment. Requires API key authentication. Note: Studio CU is tracked based on LLM token usage, not per API call. * @summary List conversations for a deployment * @param {string} [deploymentId] Deployment ID (UUID). If provided, filters conversations to this deployment only. * @param {number | null} [fid] Farcaster ID of the user. Required for non-admin users. Studio admins can omit to query all conversations. * @param {string} [name] Kubernetes deployment name. If provided, filters conversations to this deployment only. * @param {boolean | null} [includeDeleted] Include deleted conversations in the response. Defaults to false. * @param {*} [options] Override http request option. * @throws {RequiredError} * @returns {Promise<ListConversations200Response>} A promise that resolves to a `ListConversations200Response` object * * For more information, refer to the [API documentation](https://docs.neynar.com/reference/list-conversations) * */ listConversations(deploymentId?: string, fid?: number | null, name?: string, includeDeleted?: boolean | null, options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise<ListConversations200Response>>; /** * Lists files in a directory of the generated app. Requires Studio admin authentication or FID ownership validation. Note: Studio CU is tracked based on LLM token usage, not per API call. * @summary List deployment files * @param {string} [deploymentId] Deployment ID (UUID). Required if name not provided. * @param {number | null} [fid] Farcaster ID of the user; if not provided, namespace must be provided * @param {string} [name] Kubernetes deployment name. Required if deployment_id not provided. * @param {string} [namespace] Optional Kubernetes namespace. If not provided, will query for the active namespace for the given FID. * @param {string} [directory] Directory path relative to gen/ (defaults to root) * @param {*} [options] Override http request option. * @throws {RequiredError} * @returns {Promise<ListDeploymentFiles200Response>} A promise that resolves to a `ListDeploymentFiles200Response` object * * For more information, refer to the [API documentation](https://docs.neynar.com/reference/list-deployment-files) * */ listDeploymentFiles(deploymentId?: string, fid?: number | null, name?: string, namespace?: string, directory?: string, options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise<ListDeploymentFiles200Response>>; /** * Lists all miniapp generator deployments for a user. Requires API key authentication. Note: Studio CU is tracked based on LLM token usage, not per API call. * @summary List deployments * @param {number | null} [fid] Farcaster ID of the user. Required for non-admin users. Studio admins can omit to query all deployments. * @param {number} [limit] Maximum number of deployments to return. Defaults to 50, max 1000. (Default: 50, Maximum: 1000) * @param {number | null} [offset] Number of deployments to skip for pagination. Defaults to 0. * @param {boolean | null} [includeDeleted] Include deleted deployments in the response. Defaults to false. * @param {*} [options] Override http request option. * @throws {RequiredError} * @returns {Promise<Array<ListDeployments200ResponseInner>>} A promise that resolves to a `Array<ListDeployments200ResponseInner>` object * * For more information, refer to the [API documentation](https://docs.neynar.com/reference/list-deployments) * */ listDeployments(fid?: number | null, limit?: number, offset?: number | null, includeDeleted?: boolean | null, options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise<Array<ListDeployments200ResponseInner>>>; /** * Retrieves all secrets for a deployment. * @summary List deployment secrets * @param {string} deploymentId Deployment ID to list secrets for * @param {string} [key] Optional filter by environment variable name * @param {*} [options] Override http request option. * @throws {RequiredError} * @returns {Promise<ListSecrets200Response>} A promise that resolves to a `ListSecrets200Response` object * * For more informatio