UNPKG

@useapi/midjourney-api

Version:

TypeScript client library for Midjourney API by useapi.net

259 lines (250 loc) 6.8 kB
import { JobResponseAttachmentsInner } from '../models/JobResponseAttachmentsInner'; import { JobResponseChildrenInner } from '../models/JobResponseChildrenInner'; import { JobResponseEmbedsInner } from '../models/JobResponseEmbedsInner'; export class JobResponse { 'jobid': string; 'parentJobId'?: string; 'verb': JobResponseVerbEnum; /** * If value is created, started or progress wait in a loop for at least 10..30 seconds and retry again */ 'status': JobResponseStatusEnum; 'created': string; 'updated'?: string; 'prompt'?: string; 'blendUrls'?: Array<string>; 'blendDimensions'?: JobResponseBlendDimensionsEnum; 'describeUrl'?: string; 'button'?: JobResponseButtonEnum; 'children'?: Array<JobResponseChildrenInner>; 'buttons'?: Array<JobResponseButtonsEnum>; 'channel': string; 'server': string; 'maxJobs': number; 'messageId'?: string; /** * Message generated by Midjourney reflecting current generation parameters and progress */ 'content'?: string; 'timestamp'?: string; 'attachments'?: Array<JobResponseAttachmentsInner>; /** * Contains additional information */ 'embeds'?: Array<JobResponseEmbedsInner>; 'code': JobResponseCodeEnum; static readonly discriminator: string | undefined = undefined; static readonly attributeTypeMap: Array<{ name: string, baseName: string, type: string, format: string }> = [ { "name": "jobid", "baseName": "jobid", "type": "string", "format": "" }, { "name": "parentJobId", "baseName": "parentJobId", "type": "string", "format": "" }, { "name": "verb", "baseName": "verb", "type": "JobResponseVerbEnum", "format": "" }, { "name": "status", "baseName": "status", "type": "JobResponseStatusEnum", "format": "" }, { "name": "created", "baseName": "created", "type": "string", "format": "" }, { "name": "updated", "baseName": "updated", "type": "string", "format": "" }, { "name": "prompt", "baseName": "prompt", "type": "string", "format": "" }, { "name": "blendUrls", "baseName": "blendUrls", "type": "Array<string>", "format": "" }, { "name": "blendDimensions", "baseName": "blendDimensions", "type": "JobResponseBlendDimensionsEnum", "format": "" }, { "name": "describeUrl", "baseName": "describeUrl", "type": "string", "format": "" }, { "name": "button", "baseName": "button", "type": "JobResponseButtonEnum", "format": "" }, { "name": "children", "baseName": "children", "type": "Array<JobResponseChildrenInner>", "format": "" }, { "name": "buttons", "baseName": "buttons", "type": "Array<JobResponseButtonsEnum>", "format": "" }, { "name": "channel", "baseName": "channel", "type": "string", "format": "" }, { "name": "server", "baseName": "server", "type": "string", "format": "" }, { "name": "maxJobs", "baseName": "maxJobs", "type": "number", "format": "" }, { "name": "messageId", "baseName": "messageId", "type": "string", "format": "" }, { "name": "content", "baseName": "content", "type": "string", "format": "" }, { "name": "timestamp", "baseName": "timestamp", "type": "string", "format": "" }, { "name": "attachments", "baseName": "attachments", "type": "Array<JobResponseAttachmentsInner>", "format": "" }, { "name": "embeds", "baseName": "embeds", "type": "Array<JobResponseEmbedsInner>", "format": "" }, { "name": "code", "baseName": "code", "type": "JobResponseCodeEnum", "format": "" }]; static getAttributeTypeMap() { return JobResponse.attributeTypeMap; } public constructor() { } } export enum JobResponseVerbEnum { Imagine = 'imagine', Button = 'button', Blend = 'blend', Describe = 'describe' } export enum JobResponseStatusEnum { Created = 'created', Started = 'started', Moderated = 'moderated', Progress = 'progress', Completed = 'completed', Failed = 'failed', Cancelled = 'cancelled' } export enum JobResponseBlendDimensionsEnum { Portrait = 'Portrait', Square = 'Square', Landscape = 'Landscape' } export enum JobResponseButtonEnum { U1 = 'U1', U2 = 'U2', U3 = 'U3', U4 = 'U4', V1 = 'V1', V2 = 'V2', V3 = 'V3', V4 = 'V4', ButtonLeft = '⬅️', ButtonRight = '➡️', ButtonUp = '⬆️', ButtonDown = '⬇️', ButtonReroll = '🔄', VaryStrong = 'Vary (Strong)', VarySubtle = 'Vary (Subtle)', ZoomOut15x = 'Zoom Out 1.5x', ZoomOut2x = 'Zoom Out 2x', Upscale2x = 'Upscale (2x)', Upscale4x = 'Upscale (4x)', RedoUpscale2x = 'Redo Upscale (2x)', RedoUpscale4x = 'Redo Upscale (4x)', MakeSquare = 'Make Square', MakeVariations = 'Make Variations', Remaster = 'Remaster' } export enum JobResponseButtonsEnum { U1 = 'U1', U2 = 'U2', U3 = 'U3', U4 = 'U4', V1 = 'V1', V2 = 'V2', V3 = 'V3', V4 = 'V4', ButtonLeft = '⬅️', ButtonRight = '➡️', ButtonUp = '⬆️', ButtonDown = '⬇️', ButtonReroll = '🔄', VaryStrong = 'Vary (Strong)', VarySubtle = 'Vary (Subtle)', ZoomOut15x = 'Zoom Out 1.5x', Upscale2x = 'Upscale (2x)', Upscale4x = 'Upscale (4x)', RedoUpscale2x = 'Redo Upscale (2x)', RedoUpscale4x = 'Redo Upscale (4x)', ZoomOut2x = 'Zoom Out 2x', MakeSquare = 'Make Square', MakeVariations = 'Make Variations', Remaster = 'Remaster' } export enum JobResponseCodeEnum { NUMBER_200 = 200 }