import { VersionInfo } from 'contensis-core-api'; import { Entry, EntrySys, EventSubscription } from 'contensis-management-api'; export type EntryWithPublishScheduleSys = EntrySys & { schedules?: { publish?: { dateTime: string; }; }; }; export type EntryWithPublishSchedule = Entry & { sys: EntryWithPublishScheduleSys; }; export type ApiKey = { id: string; name: string; description: string; enabled: boolean; sharedSecret: string; allowedScopes: string[]; createdBy: string; modifiedBy: string; dateCreated: Date; dateModified: Date; clientType: string; systemDefined: boolean; }; export type CreateApiKeyParams = { name: string; description?: string; enabled: boolean; }; export type Block = { id: string; description: string; liveVersion: number; versionsSinceLive: number; madeLive: Date; projectId: string; branches: [ { id: string; status: string; } ]; }; export type BlockActionType = 'release' | 'makeLive' | 'rollback' | 'markAsBroken'; export type BlockWorkflowStatus = 'created' | 'discovering' | 'discoveryFailure' | 'draft' | 'released'; export type BlockDeploymentStatus = 'none' | 'deployed' | 'live' | 'deprecated'; export type BlockRunningStatus = 'none' | 'pending' | 'starting' | 'available' | 'stopped' | 'degraded' | 'faulted'; export type BlockVersion = Omit & { staticPaths: string[]; endpoints: { id: string; path: string; type: string; }[]; port: number; version: { pushedBy: string; pushed: Date; releasedBy: string | null; released: Date | null; markedBrokenBy: string | null; markedBroken: Date | null; versionNo: number; madeLiveBy: string | null; madeLive: Date | null; }; status: { broken: boolean; deployment: BlockDeploymentStatus; running: { global: BlockRunningStatus; dataCenters: { hq: BlockRunningStatus; london: BlockRunningStatus; manchester: BlockRunningStatus; }; }; workflow: BlockWorkflowStatus; }; stagingUrl: string; previewUrl: string; }; export type PushBlockParams = { release?: boolean; makeLive?: boolean; id: string; projectId: string; image: { uri: string; tag: string; }; source: { branch: string; provider: string; repositoryUrl: string; commit: { id: string; message: string; authorEmail: string; committerEmail: string; dateTime: Date; commitUrl?: string; comparisonUrl?: string; }; }; }; export type GetBlockLogsParams = { blockId: string; projectId?: string; branchId: string; version: string | number; dataCenter?: 'hq' | 'manchester' | 'london'; includeTimestamps?: boolean; previous?: boolean; lines?: number; sinceSeconds?: number; }; export type ProxyEndpointHeaders = { [header: string]: string; }; export type ProxyEndpoint = { server: string; ssl: boolean; headers: ProxyEndpointHeaders; }; export type ProxyEndpoints = { [proxyPath: string]: ProxyEndpoint; }; export type Proxy = { id: string; projectId: string; name: string; description: string; endpoints: ProxyEndpoints; version: VersionInfo; }; type PartialExcept = Partial & Pick; export type CreateProxyParams = PartialExcept; export type Renderer = { uuid: string; id: string; projectId: string; name: string; description: string; assignedContentTypes: string[]; rules: [ { return: { blockId: string; endpointId: null; }; } ]; version: VersionInfo; }; export type WebhookSubscription = { id: string; name: string; description: string; url: string; enabled: boolean; method: string; version: VersionInfo; } & EventSubscription & { headers: { [key: string]: { value: string; secret: boolean; }; }; }; export {};