UNPKG

casdoor-nodejs-sdk

Version:
36 lines (35 loc) 1.16 kB
import { AxiosResponse } from 'axios'; import { Config } from './config'; import Request from './request'; export interface Webhook { owner: string; name: string; createdTime?: string; organization?: string; url?: string; method?: string; contentType?: string; headers?: { name?: string; value?: string; }[]; events?: string[]; isUserExtended?: boolean; singleOrgOnly?: boolean; isEnabled?: boolean; } export declare class WebhookSDK { private config; private readonly request; constructor(config: Config, request: Request); getWebhooks(): Promise<AxiosResponse<{ data: Webhook[]; }, any>>; getWebhook(id: string): Promise<AxiosResponse<{ data: Webhook; }, any>>; modifyWebhook(method: string, webhook: Webhook): Promise<AxiosResponse<Record<string, unknown>, any>>; addWebhook(webhook: Webhook): Promise<AxiosResponse<Record<string, unknown>, any>>; updateWebhook(webhook: Webhook): Promise<AxiosResponse<Record<string, unknown>, any>>; deleteWebhook(webhook: Webhook): Promise<AxiosResponse<Record<string, unknown>, any>>; }