UNPKG

@promokit/js

Version:

JavaScript SDK for PromoKit marketing infrastructure

34 lines (33 loc) 1.03 kB
import { PromoConfig, ChangelogEntry, APIResponse } from '../types'; interface RequestClient { request<T>(endpoint: string, options?: RequestInit): Promise<T>; } export declare class ChangelogAPI { private config; private client; constructor(config: PromoConfig, client: RequestClient); create(data: { projectId: string; version: string; title: string; content: string; changes: string[]; publishedAt?: string; }): Promise<ChangelogEntry>; get(projectId: string, options?: { limit?: number; offset?: number; }): Promise<{ entries: ChangelogEntry[]; pagination: { total: number; limit: number; offset: number; hasMore: boolean; }; }>; subscribe(projectId: string, email: string): Promise<APIResponse>; update(entryId: string, data: Partial<ChangelogEntry>): Promise<ChangelogEntry>; delete(entryId: string): Promise<APIResponse>; } export {};