woodwing-assets
Version:
TypeScript client for interacting with the WoodWing Assets Server API
29 lines (28 loc) • 1.45 kB
TypeScript
import { WebhookConfig } from './WebhookConfig';
import { WebhookPayload } from './interfaces/Payload';
type WebhookSuccessHandler = (request: WebhookPayload) => void;
type WebhookErrorHandler = (error: string) => void;
export declare class AssetsWebhook {
private readonly config;
private serverInstance;
static readonly ASSET_CHECKIN = "asset_checkin";
static readonly ASSET_CHECKOUT = "asset_checkout";
static readonly ASSET_CREATE = "asset_create";
static readonly ASSET_CREATE_BY_COPY = "asset_create_by_copy";
static readonly ASSET_CREATE_FROM_FILESTORE_RESCUE = "asset_create_from_filestore_rescue";
static readonly ASSET_MOVE = "asset_move";
static readonly ASSET_PROMOTE = "asset_promote";
static readonly ASSET_REMOVE = "asset_remove";
static readonly ASSET_RENAME = "asset_rename";
static readonly ASSET_UNDO_CHECKOUT = "asset_undo_checkout";
static readonly ASSET_UPDATE_METADATA = "asset_update_metadata";
static readonly AUTHKEY_CREATE = "authkey_create";
static readonly AUTHKEY_REMOVE = "authkey_remove";
static readonly FOLDER_CREATE = "folder_create";
static readonly FOLDER_REMOVE = "folder_remove";
constructor(config: WebhookConfig);
listen(successHandler: WebhookSuccessHandler, errorHandler: WebhookErrorHandler): void;
stop(): Promise<void>;
static validateSignature(signature: string, data: Buffer, secretToken: string): boolean;
}
export {};