/** * This enum represent all possible webhook lifecycle events */ export declare enum WebhookLifecycleEvents { PublishToLive = "publish_to_live", PublishToStage = "publish_to_stage" } /** * This type represent the model of a webhook */ export type Webhook = { /** * The space di where the webhook belong */ spaceId: string; /** * The webhook name */ name: string; /** * The webhook unique id */ id: string; /** * The webhook url to call */ url: string; /** * The webhook event type */ webhookType: WebhookLifecycleEvents; /** * The webhook creator username */ creator: string; /** * The webhook creator unique id */ creatorId: string; /** * The webhook creation date */ creationDate: string; /** * The webhook latest editor username */ latestEditor: string; /** * The webhook latest editor unique id */ latestEditorId: string; /** * The webhook latest editing date */ lastModifiedDate: string; }; /** * Thi type represent the data needed to make a list of webhook API request */ export type ListWebhookRequest = { /** * This filter is used to search webhooks only for the inserted event type */ webhooksType?: WebhookLifecycleEvents; }; /** * This type represent the response of the list of webhook API request */ export type ListWebhookResponse = Webhook[]; /** * This type represent the data needed to make a get webhook API request */ export type GetWebhookRequest = { /** * The webhook unique id */ id: string; }; /** * This data represent the response of a get webhook API request */ export type GetWebhookResponse = Webhook; /** * This data represent the data needed to make a save webhook API request */ export type SaveWebhookRequest = { /** * The webhook url to call */ url: string; /** * The webhook name */ name: string; /** * The webhook event type */ webhookType: WebhookLifecycleEvents; }; /** * This type represent the response of the save webhook API request */ export type SaveWebhookResponse = Webhook; /** * This type represent the data needed to make an update webhook request */ export type UpdateWebhookRequest = { /** * The webhook url to call */ url: string; /** * The unique webhook id to update */ id: string; /** * The webhook name */ name: string; }; /** * This type represent the response of the update webhook API request */ export type UpdateWebhookResponse = Webhook; /** * This type represent the data needed to make a delete webhook API request */ export type DeleteWebhookRequest = { id: string; }; /** * This type represent the response of a delete webhook API request */ export type DeleteWebhookResponse = boolean; export type GetWebhookPublicKeyResponse = { key: string; };