UNPKG

@allma/core-sdk

Version:

Core SDK with shared utilities (logging, auth, S3 utils) for building on the Allma serverless AI orchestration platform.

22 lines 1.04 kB
import { z } from 'zod'; import { PromptTemplateSchema, PromptTemplateVersionStorageItem } from '@allma/core-types'; /** * Converts a DynamoDB storage item to its corresponding API type by stripping storage-specific keys. * This is a generic helper for the application's data access layer. * @param item The storage item from DynamoDB. * @returns The item formatted as its API type. */ export declare function fromStorageItem<T extends { PK: string; SK: string; itemType: string; }, U>(item: T): U; /** * Converts a PromptTemplate API object to its DynamoDB storage representation. * This helper is specific to the application's data access layer for prompt templates. * @param apiItem The PromptTemplate object. * @returns The validated storage item for a prompt version. * @throws An error if the constructed item fails validation. */ export declare function toPromptTemplateVersionStorageItem(apiItem: z.infer<typeof PromptTemplateSchema>): PromptTemplateVersionStorageItem; //# sourceMappingURL=storageUtils.d.ts.map