UNPKG

@hookflo/tern

Version:

A robust, scalable webhook verification framework supporting multiple platforms and signature algorithms

21 lines (20 loc) 956 B
import { BaseTemplate, CreateSchemaInput, NormalizedResult, ProviderInfo, TemplateCategory, TransformParams, UpdateSchemaInput, UserSchema } from './types'; import { StorageAdapter } from './storage/interface'; export declare class Normalizer { private readonly storage; private engine; constructor(storage?: StorageAdapter); getBaseTemplates(): Promise<BaseTemplate[]>; getProviders(category?: TemplateCategory): Promise<ProviderInfo[]>; createSchema(input: CreateSchemaInput): Promise<UserSchema>; updateSchema(schemaId: string, updates: UpdateSchemaInput): Promise<void>; getSchema(id: string): Promise<UserSchema | null>; transform(params: TransformParams): Promise<NormalizedResult>; validateSchema(schema: UserSchema): Promise<{ valid: boolean; errors: string[]; }>; } export * from './types'; export * from './storage/interface'; export { InMemoryStorageAdapter } from './storage/memory';