import { AptlyWebhookEventStatus, AptlyWebhookType } from '../enums/index.js'; import { AptlyBaseSchema } from './extends.js'; type ServerKeys = 'run' | 'status' | 'url' | 'headers' | 'responses'; export type AptlyWebhookEvent = Omit, ServerKeys>; export interface AptlyWebhookEventSchema extends Omit, 'name' | 'archived'> { specversion: string; type: AptlyWebhookType; source: string; subject: string; time: DATE; datacontenttype: 'application/json'; data?: DATA; state?: string; secret?: string; run: DATE; webhook: ID; organization: ID; project?: ID; unit?: ID; order?: ID; app?: ID; appWebhook?: ID; status: AptlyWebhookEventStatus; url: string; headers: AptlyWebhookEventHeaders; responses: AptlyWebhookEventResponseSchema[]; created: DATE; } export type AptlyWebhookEventResponse = AptlyWebhookEventResponseSchema; export interface AptlyWebhookEventResponseSchema { _id: ID; time: DATE; data: DATA; headers: object; status: number; statusText: string; } export interface AptlyWebhookEventHeaders { 'x-aptly-url-sha256'?: string; 'x-aptly-content-sha256'?: string; 'x-aptly-organization': string; 'webhook-request-origin': string; 'content-type': 'application/json;charset=UTF-8'; } export {};