| 615 | |
| 616 | // fallow-ignore-next-line complexity |
| 617 | function buildRenderBody(opts: SubmitOptions): CreateHyperframesRenderRequest { |
| 618 | const body: CreateHyperframesRenderRequest = { project: opts.projectInput }; |
| 619 | if (opts.fps !== undefined) body.fps = opts.fps; |
| 620 | if (opts.quality !== undefined) body.quality = opts.quality; |
| 621 | if (opts.format !== undefined) body.format = opts.format; |
| 622 | if (opts.resolution !== undefined) body.resolution = opts.resolution; |
| 623 | if (opts.aspectRatio !== undefined) body.aspect_ratio = opts.aspectRatio; |
| 624 | if (opts.composition !== undefined) body.composition = opts.composition; |
| 625 | if (opts.variables !== undefined) body.variables = opts.variables; |
| 626 | if (opts.title !== undefined) body.title = opts.title; |
| 627 | if (opts.callbackUrl !== undefined) body.callback_url = opts.callbackUrl; |
| 628 | if (opts.callbackId !== undefined) body.callback_id = opts.callbackId; |
| 629 | return body; |
| 630 | } |
| 631 | |
| 632 | // --------------------------------------------------------------------------- |
| 633 | // Poll + progress |