@hookflo/tern
Version:
A robust, scalable webhook verification framework supporting multiple platforms and signature algorithms
14 lines (13 loc) • 579 B
TypeScript
import { BaseTemplate, UpdateSchemaInput, UserSchema } from '../types';
export interface StorageAdapter {
saveSchema(schema: UserSchema): Promise<void>;
getSchema(id: string): Promise<UserSchema | null>;
updateSchema(id: string, updates: UpdateSchemaInput): Promise<void>;
deleteSchema(id: string): Promise<void>;
listSchemas(userId: string): Promise<UserSchema[]>;
getBaseTemplate(id: string): Promise<BaseTemplate | null>;
listBaseTemplates(): Promise<BaseTemplate[]>;
}
export interface NormalizationStorageOptions {
adapter: StorageAdapter;
}