Skip to main content

PersistentMemory API

Persistent Memory API

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

const client = new CodeBoltClient();

Quick Reference

MethodDescription
createTypeCreates a new persistent memory type with a defined processing pipeline.
deleteTypePermanently deletes a persistent memory type definition.
duplicateTypeCreates a copy of an existing persistent memory type.
executeTypeExecutes a persistent memory type's processing pipeline.
exportTypeExports a persistent memory type configuration as a portable format.
getStepSpecsRetrieves all available processing step specifications.
getTypeRetrieves a specific persistent memory type by its unique identifier.
getUserConfigurableStepSpecsRetrieves step specifications that are user-configurable.
importTypeImports a persistent memory type configuration from an exported format.
listTypesLists all persistent memory type definitions with optional filtering.
updateTypeUpdates an existing persistent memory type's configuration.
validateValidates a persistent memory type configuration without saving it.

Methods


createType

client.persistentMemory.createType(data: CreatePersistentMemoryTypeRequest): Promise<PersistentMemoryType>

Creates a new persistent memory type with a defined processing pipeline.

Registers a new memory type that describes how input data should be processed and stored. The type definition includes a sequence of steps that will be executed when the pipeline runs.

ParameterTypeRequiredDescription
dataCreatePersistentMemoryTypeRequestYesThe type creation payload

Returns: Promise<PersistentMemoryType> — A promise that resolves to the newly created persistent memory type

Full reference →


deleteType

client.persistentMemory.deleteType(id: string): Promise<unknown>

Permanently deletes a persistent memory type definition.

Removes the type and its pipeline configuration. Previously generated memory entries are not affected by the deletion.

ParameterTypeRequiredDescription
idstringYesThe unique identifier of the type to delete

Returns: Promise<unknown> — A promise that resolves when the type has been deleted

Full reference →


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.

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

Full reference →


executeType

client.persistentMemory.executeType(id: string, data?: ExecutePersistentMemoryRequest): Promise<unknown>

Executes a persistent memory type's processing pipeline.

Runs the defined processing steps against the provided input data or configured data source, generating new memory entries as output.

ParameterTypeRequiredDescription
idstringYesThe unique identifier of the type to execute
dataExecutePersistentMemoryRequestNoOptional execution parameters and input data

Returns: Promise<unknown> — A promise that resolves when the execution has been initiated

Full reference →


exportType

client.persistentMemory.exportType(id: string): Promise<unknown>

Exports a persistent memory type configuration as a portable format.

Serializes the type definition for sharing, backup, or migration to another workspace. The exported data can be imported using .

ParameterTypeRequiredDescription
idstringYesThe unique identifier of the type to export

Returns: Promise<unknown> — A promise that resolves to the exported type configuration

Full reference →


getStepSpecs

client.persistentMemory.getStepSpecs(): Promise<PersistentMemoryStepSpec[]>

Retrieves all available processing step specifications.

Returns the catalog of step types that can be used when building persistent memory pipelines. Each spec describes a step's inputs, outputs, and configurable parameters.

No parameters.

Returns: Promise<PersistentMemoryStepSpec[]> — A promise that resolves to an array of step specifications

Full reference →


getType

client.persistentMemory.getType(id: string): Promise<PersistentMemoryType>

Retrieves a specific persistent memory type by its unique identifier.

Returns the full type definition including its processing steps, configuration, and metadata.

ParameterTypeRequiredDescription
idstringYesThe unique identifier of the persistent memory type

Returns: Promise<PersistentMemoryType> — A promise that resolves to the persistent memory type definition

Full reference →


getUserConfigurableStepSpecs

client.persistentMemory.getUserConfigurableStepSpecs(): Promise<PersistentMemoryStepSpec[]>

Retrieves step specifications that are user-configurable.

Returns a subset of step specifications that expose user-facing configuration options, filtering out internal-only or system-managed steps.

No parameters.

Returns: Promise<PersistentMemoryStepSpec[]> — A promise that resolves to an array of user-configurable step specifications

Full reference →


importType

client.persistentMemory.importType(data: ImportPersistentMemoryRequest): Promise<PersistentMemoryType>

Imports a persistent memory type configuration from an exported format.

Creates a new persistent memory type from previously exported data. This enables sharing pipeline configurations between workspaces or restoring from backups.

ParameterTypeRequiredDescription
dataImportPersistentMemoryRequestYesThe import payload containing the exported type configuration

Returns: Promise<PersistentMemoryType> — A promise that resolves to the newly imported persistent memory type

Full reference →


listTypes

client.persistentMemory.listTypes(params?: Record<string, unknown>): Promise<PersistentMemoryType[]>

Lists all persistent memory type definitions with optional filtering.

Returns the collection of defined persistent memory types, each describing a reusable processing pipeline for generating memory entries.

ParameterTypeRequiredDescription
paramsRecord<string, unknown>NoOptional query parameters for filtering and pagination

Returns: Promise<PersistentMemoryType[]> — A promise that resolves to an array of persistent memory types

Full reference →


updateType

client.persistentMemory.updateType(id: string, data: UpdatePersistentMemoryTypeRequest): Promise<PersistentMemoryType>

Updates an existing persistent memory type's configuration.

Modifies the type's processing steps, name, or other settings. Changes affect subsequent executions but do not alter previously generated memories.

ParameterTypeRequiredDescription
idstringYesThe unique identifier of the type to update
dataUpdatePersistentMemoryTypeRequestYesThe fields to update

Returns: Promise<PersistentMemoryType> — A promise that resolves to the updated persistent memory type

Full reference →


validate

client.persistentMemory.validate(data: ValidatePersistentMemoryRequest): Promise<unknown>

Validates a persistent memory type configuration without saving it.

Checks that the type definition is well-formed, all referenced step types exist, and the processing chain is compatible. Use this before creating or updating a type to catch configuration errors early.

ParameterTypeRequiredDescription
dataValidatePersistentMemoryRequestYesThe type configuration to validate

Returns: Promise<unknown> — A promise that resolves to the validation result

Full reference →