@timesheet/sdk
Version:
Official TypeScript SDK for the Timesheet API
49 lines • 1.77 kB
TypeScript
import type { ListParams } from './common';
export type WebhookEventType = 'team.create' | 'team.update' | 'project.create' | 'project.update' | 'todo.create' | 'todo.update' | 'task.create' | 'task.update' | 'tag.create' | 'tag.update' | 'rate.create' | 'rate.update' | 'timer.start' | 'timer.stop' | 'timer.pause' | 'timer.resume';
export declare const WebhookEvents: {
readonly TEAM_CREATE: "team.create";
readonly TEAM_UPDATE: "team.update";
readonly PROJECT_CREATE: "project.create";
readonly PROJECT_UPDATE: "project.update";
readonly TODO_CREATE: "todo.create";
readonly TODO_UPDATE: "todo.update";
readonly TASK_CREATE: "task.create";
readonly TASK_UPDATE: "task.update";
readonly TAG_CREATE: "tag.create";
readonly TAG_UPDATE: "tag.update";
readonly RATE_CREATE: "rate.create";
readonly RATE_UPDATE: "rate.update";
readonly TIMER_START: "timer.start";
readonly TIMER_STOP: "timer.stop";
readonly TIMER_PAUSE: "timer.pause";
readonly TIMER_RESUME: "timer.resume";
};
export declare function combineWebhookEvents(...events: WebhookEventType[]): string;
export interface Webhook {
id: string;
target: string;
event: string;
user?: string;
deleted?: boolean;
created?: number;
lastUpdate?: number;
}
export interface WebhookList {
items: Webhook[];
params: WebhookListParams;
}
export interface WebhookCreateRequest {
target: string;
event: string;
}
export interface WebhookUpdateRequest {
target?: string;
event?: string;
deleted?: boolean;
}
export interface WebhookListParams extends ListParams {
sort?: 'created' | 'lastUpdate' | 'target' | 'event';
order?: 'asc' | 'desc';
event?: string;
}
//# sourceMappingURL=Webhook.d.ts.map