UNPKG

@coze/api

Version:

Official Coze Node.js SDK for seamless AI integration into your applications | 扣子官方 Node.js SDK,助您轻松集成 AI 能力到应用中

25 lines (24 loc) 1.11 kB
import { APIResource } from '../resource'; import { type RequestOptions } from '../../core'; export declare class Templates extends APIResource { /** * Duplicate a template. | 复制一个模板。 * @param templateId - Required. The ID of the template to duplicate. | 要复制的模板的 ID。 * @param params - Optional. The parameters for the duplicate operation. | 可选参数,用于复制操作。 * @param params.workspace_id - Required. The ID of the workspace to duplicate the template into. | 要复制到的目标工作空间的 ID。 * @param params.name - Optional. The name of the new template. | 新模板的名称。 * @returns TemplateDuplicateRes | 复制模板结果 */ duplicate(templateId: string, params: TemplateDuplicateReq, options?: RequestOptions): Promise<TemplateDuplicateData>; } export interface TemplateDuplicateReq { workspace_id: string; name?: string; } export declare enum TemplateEntityType { AGENT = "agent" } export interface TemplateDuplicateData { entity_id: string; entity_type: TemplateEntityType; }