import type { RobotMetaInput } from './_instructions-primitives.ts' import { z } from 'zod' import { interpolateRobot, robotBase } from './_instructions-primitives.ts' export const meta: RobotMetaInput = { bytescount: 20, discount_factor: 0.05, discount_pct: 95, example_code: { steps: { deliver: { robot: '/edgly/deliver', }, }, }, example_code_description: 'Cache and deliver files over Smart CDN using the edgly.net domain:', minimum_charge: 102400, output_factor: 1, override_lvl1: 'Content Delivery', purpose_sentence: 'caches and delivers files globally', purpose_verb: 'cache & deliver', purpose_word: 'Cache and deliver files', purpose_words: 'Cache and deliver files globally', service_slug: 'content-delivery', slot_count: 0, title: 'Cache and deliver files globally', typical_file_size_mb: 1.2, typical_file_type: 'file', name: 'EdglyDeliverRobot', priceFactor: 20, queueSlotCount: 0, minimumCharge: 102400, downloadInputFiles: false, preserveInputFileUrls: true, isAllowedForUrlTransform: false, trackOutputFileSize: false, isInternal: true, stage: 'removed', removeJobResultFilesFromDiskRightAfterStoringOnS3: false, } export const robotEdglyDeliverInstructionsSchema = robotBase .extend({ robot: z.literal('/edgly/deliver').describe(` When you want Transloadit to tranform files on the fly, this Robot can cache and deliver the results close to your end-user, saving on latency and encoding volume. The use of this Robot is implicit when you use the edgly.net domain. `), }) .strict() export const robotEdglyDeliverInstructionsWithHiddenFieldsSchema = robotEdglyDeliverInstructionsSchema.extend({ result: z .union([z.literal('debug'), robotEdglyDeliverInstructionsSchema.shape.result]) .optional(), }) export type RobotEdglyDeliverInstructions = z.infer export type RobotEdglyDeliverInstructionsWithHiddenFields = z.infer< typeof robotEdglyDeliverInstructionsWithHiddenFieldsSchema > export const interpolatableRobotEdglyDeliverInstructionsSchema = interpolateRobot( robotEdglyDeliverInstructionsSchema, ) export type InterpolatableRobotEdglyDeliverInstructions = InterpolatableRobotEdglyDeliverInstructionsInput export type InterpolatableRobotEdglyDeliverInstructionsInput = z.input< typeof interpolatableRobotEdglyDeliverInstructionsSchema > export const interpolatableRobotEdglyDeliverInstructionsWithHiddenFieldsSchema = interpolateRobot( robotEdglyDeliverInstructionsWithHiddenFieldsSchema, ) export type InterpolatableRobotEdglyDeliverInstructionsWithHiddenFields = z.infer< typeof interpolatableRobotEdglyDeliverInstructionsWithHiddenFieldsSchema > export type InterpolatableRobotEdglyDeliverInstructionsWithHiddenFieldsInput = z.input< typeof interpolatableRobotEdglyDeliverInstructionsWithHiddenFieldsSchema >