Skip to main content

duplicateType

client.persistentMemory.duplicateType(id: string, data?: DuplicatePersistentMemoryRequest): Promise<PersistentMemoryType>

Creates a copy of an existing persistent memory type.

Duplicates the type definition, optionally with modifications such as a new name. Useful for creating variations of working pipelines.

Parameters

ParameterTypeRequiredDescription
idstringYesThe unique identifier of the type to duplicate
dataDuplicatePersistentMemoryRequestNoOptional modifications to apply to the duplicated type

Returns

Promise<PersistentMemoryType> — A promise that resolves to the newly created duplicate type

Example

import { CodeBoltClient } from '@codebolt/clientsdk';

const client = new CodeBoltClient();

const result = await client.persistentMemory.duplicateType('id');
console.log(result);