-
Notifications
You must be signed in to change notification settings - Fork 3
Closed
Description
Bug
WebhookListResponse and WebhookInfo type definitions in @proofkit/fmodata don't match what the FM Data API actually returns, forcing consumers to use as unknown as double casts.
Issues
1. WebhookListResponse property casing is wrong
// Current type (wrong)
export interface WebhookListResponse {
Status: string; // actual API returns `status`
WebHook: WebhookInfo[]; // actual API returns `webhooks`
}Consumer workaround:
const result = await ctx.fm.webhook.list();
return result as unknown as { status: string; webhooks: WebhookInfo[] };2. Source vs dist .d.ts mismatch for WebhookInfo
Source (src/client/webhook-builder.ts):
export interface WebhookInfo {
webHookID: number; // camelCase 'H'
// no `webhook` property
url: string;
...
}Dist (dist/esm/client/webhook-builder.d.ts):
export interface WebhookInfo {
webhookID: number; // lowercase 'h' — different!
webhook: string; // extra property not in source
url: string;
...
}The built types don't match the source types — webHookID vs webhookID and an extra webhook field in dist only.
Expected
Types should match the actual FM Data API response shape so consumers don't need casts. Source and dist types should also be in sync.
Version
@proofkit/fmodata@0.1.0-beta.30
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
No labels