Skip to content

Commit 982becd

Browse files
committed
Sync alphalib
1 parent e0f8a82 commit 982becd

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

63 files changed

+215
-94
lines changed

src/alphalib/types/robots/_index.ts

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -20,6 +20,7 @@ import { robotDocumentAutorotateInstructionsSchema } from './document-autorotate
2020
import { robotDocumentConvertInstructionsSchema } from './document-convert.ts'
2121
import { robotDocumentMergeInstructionsSchema } from './document-merge.ts'
2222
import { robotDocumentOcrInstructionsSchema } from './document-ocr.ts'
23+
import { robotDocumentSplitInstructionsSchema } from './document-split.ts'
2324
import { robotDocumentThumbsInstructionsSchema } from './document-thumbs.ts'
2425
import { robotDropboxImportInstructionsSchema } from './dropbox-import.ts'
2526
import { robotDropboxStoreInstructionsSchema } from './dropbox-store.ts'
@@ -101,6 +102,7 @@ const robotStepsInstructions = [
101102
robotDocumentMergeInstructionsSchema,
102103
robotDocumentOcrInstructionsSchema,
103104
robotFileReadInstructionsSchema,
105+
robotDocumentSplitInstructionsSchema,
104106
robotDocumentThumbsInstructionsSchema,
105107
robotDropboxImportInstructionsSchema,
106108
robotDropboxStoreInstructionsSchema,

src/alphalib/types/robots/_instructions-primitives.ts

Lines changed: 11 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -191,7 +191,7 @@ export const ffmpegParamSchema = z
191191
t: z.union([z.string(), z.number()]).optional(),
192192
to: z.union([z.string(), z.number()]).optional(),
193193
vendor: z.string().optional(),
194-
shortest: z.boolean().nullable().optional(),
194+
shortest: z.boolean().nullish(),
195195
filter_complex: z.union([z.string(), z.record(z.string())]).optional(),
196196
'level:v': z.union([z.string(), z.number()]).optional(),
197197
'profile:v': z.union([z.number(), z.enum(['baseline', 'main', 'high'])]).optional(),
@@ -280,8 +280,8 @@ export type FfmpegParams = z.infer<typeof ffmpegParamSchema>
280280
export const ffmpegPresetSchema = z
281281
.object({
282282
ffmpeg: ffmpegParamSchema,
283-
width: z.number().nullable().optional(),
284-
height: z.number().nullable().optional(),
283+
width: z.number().nullish(),
284+
height: z.number().nullish(),
285285
})
286286
.strict()
287287

@@ -295,8 +295,8 @@ export type FfmpegStackVersion = z.infer<typeof ffmpegStackVersionSchema>
295295

296296
export const ffmpegAudioInstructions = z
297297
.object({
298-
width: z.number().nullable().optional(),
299-
height: z.number().nullable().optional(),
298+
width: z.number().nullish(),
299+
height: z.number().nullish(),
300300
preset: z.string().optional(),
301301
ffmpeg: ffmpegParamSchema.optional(),
302302
ffmpeg_stack: ffmpegStackVersionSchema.optional(),
@@ -305,8 +305,8 @@ export const ffmpegAudioInstructions = z
305305
export type FfmpegAudioInstructions = z.infer<typeof ffmpegAudioInstructions>
306306
export const ffmpegVideoInstructions = z
307307
.object({
308-
width: z.number().nullable().optional(),
309-
height: z.number().nullable().optional(),
308+
width: z.number().nullish(),
309+
height: z.number().nullish(),
310310
preset: z.string().optional(),
311311
ffmpeg: ffmpegParamSchema.optional(),
312312
ffmpeg_stack: ffmpegStackVersionSchema.optional(),
@@ -317,10 +317,10 @@ export type FfmpegVideoInstructions = z.infer<typeof ffmpegVideoInstructions>
317317
export const unsafeCoordinatesSchema = z.union([
318318
z
319319
.object({
320-
x1: z.union([z.string(), z.number()]).nullable().optional(),
321-
y1: z.union([z.string(), z.number()]).nullable().optional(),
322-
x2: z.union([z.string(), z.number()]).nullable().optional(),
323-
y2: z.union([z.string(), z.number()]).nullable().optional(),
320+
x1: z.union([z.string(), z.number()]).nullish(),
321+
y1: z.union([z.string(), z.number()]).nullish(),
322+
x2: z.union([z.string(), z.number()]).nullish(),
323+
y2: z.union([z.string(), z.number()]).nullish(),
324324
})
325325
.strict(),
326326
z.string(),

src/alphalib/types/robots/audio-artwork.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -47,7 +47,7 @@ If you need the image in a different format, pipe the result of this <dfn>Robot<
4747
4848
The \`method\` parameter determines whether to extract or insert.
4949
`),
50-
use: useParamSchema,
50+
use: useParamSchema.optional(),
5151
method: z.enum(['extract', 'insert']).default('extract').describe(`
5252
What should be done with the audio file. A value of \`"extract"\` means audio artwork will be extracted. A value of \`"insert"\` means the provided image will be inserted as audio artwork.
5353
`),

src/alphalib/types/robots/audio-concat.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -57,7 +57,7 @@ export const robotAudioConcatInstructionsSchema = z
5757
robot: z.literal('/audio/concat').describe(`
5858
This Robot can concatenate an almost infinite number of audio files.
5959
`),
60-
use: useParamSchema,
60+
use: useParamSchema.optional(),
6161
output_meta: outputMetaParamSchema,
6262
preset: preset.optional().describe(`
6363
Performs conversion using pre-configured settings.

src/alphalib/types/robots/audio-encode.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -51,7 +51,7 @@ export const robotAudioEncodeInstructionsSchema = z
5151
.optional()
5252
.describe(`Whether the results of this Step should be present in the Assembly Status JSON`),
5353
robot: z.literal('/audio/encode'),
54-
use: useParamSchema,
54+
use: useParamSchema.optional(),
5555
output_meta: outputMetaParamSchema,
5656
preset: preset.default('mp3').describe(`
5757
Performs conversion using pre-configured settings.

src/alphalib/types/robots/audio-loop.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -51,7 +51,7 @@ export const robotAudioLoopInstructionsSchema = z
5151
.optional()
5252
.describe(`Whether the results of this Step should be present in the Assembly Status JSON`),
5353
robot: z.literal('/audio/loop'),
54-
use: useParamSchema,
54+
use: useParamSchema.optional(),
5555
output_meta: outputMetaParamSchema,
5656
preset: preset.describe(`
5757
Performs conversion using pre-configured settings.

src/alphalib/types/robots/audio-merge.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -56,7 +56,7 @@ export const robotAudioMergeInstructionsSchema = z
5656
.optional()
5757
.describe(`Whether the results of this Step should be present in the Assembly Status JSON`),
5858
robot: z.literal('/audio/merge'),
59-
use: useParamSchema,
59+
use: useParamSchema.optional(),
6060
output_meta: outputMetaParamSchema,
6161
preset: preset.describe(`
6262
Performs conversion using pre-configured settings.

src/alphalib/types/robots/audio-waveform.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -62,7 +62,7 @@ We recommend that you use an [🤖/audio/encode](/docs/transcoding/audio-encodin
6262
6363
Similarly, if you need the output image in a different format, please pipe the result of this <dfn>Robot</dfn> into [🤖/image/resize](/docs/transcoding/image-manipulation/image-resize/).
6464
`),
65-
use: useParamSchema,
65+
use: useParamSchema.optional(),
6666
output_meta: outputMetaParamSchema,
6767
format: z.enum(['image', 'json']).default('image').describe(`
6868
The format of the result file. Can be \`"image"\` or \`"json"\`. If \`"image"\` is supplied, a PNG image will be created, otherwise a JSON file.

src/alphalib/types/robots/azure-store.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -41,7 +41,7 @@ export const robotAzureStoreInstructionsSchema = z
4141
.optional()
4242
.describe(`Whether the results of this Step should be present in the Assembly Status JSON`),
4343
robot: z.literal('/azure/store'),
44-
use: useParamSchema,
44+
use: useParamSchema.optional(),
4545
credentials: z.string().describe(`
4646
Please create your associated <dfn>Template Credentials</dfn> in your Transloadit account and use the name of your [Template Credentials](/c/template-credentials/) as this parameter's value. They will contain the values for your Azure Container, Account and Key.
4747

src/alphalib/types/robots/backblaze-store.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -46,7 +46,7 @@ export const robotBackblazeStoreInstructionsSchema = z
4646
.optional()
4747
.describe(`Whether the results of this Step should be present in the Assembly Status JSON`),
4848
robot: z.literal('/backblaze/store'),
49-
use: useParamSchema,
49+
use: useParamSchema.optional(),
5050
credentials: z.string().describe(`
5151
Please create your associated <dfn>Template Credentials</dfn> in your Transloadit account and use the name of your <dfn>Template Credentials</dfn> as this parameter's value. They will contain the values for your Backblaze Bucket Name, App Key ID, and App Key.
5252

0 commit comments

Comments
 (0)