UNPKG

@campusiq/sdk

Version:

Official JavaScript/TypeScript SDK for CampusIQ - A comprehensive school management system API

35 lines 1.25 kB
import { BaseResource } from './base'; import { Webhook, ListResponse, PaginationParams } from '../types'; export interface CreateWebhookData { url: string; events: string[]; secret?: string; } export interface UpdateWebhookData extends Partial<CreateWebhookData> { status?: 'active' | 'inactive'; } export interface WebhookFilters extends PaginationParams { status?: 'active' | 'inactive'; event?: string; } export declare class WebhooksResource extends BaseResource { list(filters?: WebhookFilters): Promise<ListResponse<Webhook>>; get(webhookId: string): Promise<Webhook>; create(data: CreateWebhookData): Promise<Webhook>; update(webhookId: string, data: UpdateWebhookData): Promise<Webhook>; delete(webhookId: string): Promise<{ success: boolean; message: string; }>; test(webhookId: string): Promise<{ success: boolean; response: any; }>; getLogs(webhookId: string, filters?: PaginationParams & { startDate?: string; endDate?: string; status?: 'success' | 'failed'; }): Promise<ListResponse<any>>; verifySignature(payload: string, signature: string, secret: string): boolean; } //# sourceMappingURL=webhooks.d.ts.map