transloadit 4.0.2 → 4.0.3
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/Transloadit.d.ts +1 -1
- package/dist/Transloadit.d.ts.map +1 -1
- package/dist/Transloadit.js.map +1 -1
- package/dist/alphalib/types/assemblyReplay.d.ts +32 -28
- package/dist/alphalib/types/assemblyReplay.d.ts.map +1 -1
- package/dist/alphalib/types/assemblyReplayNotification.d.ts +32 -28
- package/dist/alphalib/types/assemblyReplayNotification.d.ts.map +1 -1
- package/dist/alphalib/types/assemblyStatus.d.ts +1 -0
- package/dist/alphalib/types/assemblyStatus.d.ts.map +1 -1
- package/dist/alphalib/types/assemblyStatus.js +12 -0
- package/dist/alphalib/types/assemblyStatus.js.map +1 -1
- package/dist/alphalib/types/robots/_index.d.ts +312 -288
- package/dist/alphalib/types/robots/_index.d.ts.map +1 -1
- package/dist/alphalib/types/robots/_instructions-primitives.d.ts +22 -22
- package/dist/alphalib/types/robots/_instructions-primitives.d.ts.map +1 -1
- package/dist/alphalib/types/robots/_instructions-primitives.js +19 -10
- package/dist/alphalib/types/robots/_instructions-primitives.js.map +1 -1
- package/dist/alphalib/types/robots/assembly-savejson.d.ts +1 -1
- package/dist/alphalib/types/robots/assembly-savejson.d.ts.map +1 -1
- package/dist/alphalib/types/robots/assembly-savejson.js.map +1 -1
- package/dist/alphalib/types/robots/audio-artwork.d.ts +20 -20
- package/dist/alphalib/types/robots/audio-concat.d.ts +20 -20
- package/dist/alphalib/types/robots/audio-concat.d.ts.map +1 -1
- package/dist/alphalib/types/robots/audio-concat.js +2 -2
- package/dist/alphalib/types/robots/audio-concat.js.map +1 -1
- package/dist/alphalib/types/robots/audio-encode.d.ts +20 -20
- package/dist/alphalib/types/robots/audio-encode.js +1 -1
- package/dist/alphalib/types/robots/audio-loop.d.ts +20 -20
- package/dist/alphalib/types/robots/audio-merge.d.ts +20 -20
- package/dist/alphalib/types/robots/audio-merge.d.ts.map +1 -1
- package/dist/alphalib/types/robots/audio-merge.js +1 -1
- package/dist/alphalib/types/robots/audio-merge.js.map +1 -1
- package/dist/alphalib/types/robots/audio-waveform.d.ts +20 -20
- package/dist/alphalib/types/robots/audio-waveform.d.ts.map +1 -1
- package/dist/alphalib/types/robots/audio-waveform.js +1 -1
- package/dist/alphalib/types/robots/audio-waveform.js.map +1 -1
- package/dist/alphalib/types/robots/azure-import.d.ts.map +1 -1
- package/dist/alphalib/types/robots/azure-import.js +1 -1
- package/dist/alphalib/types/robots/azure-import.js.map +1 -1
- package/dist/alphalib/types/robots/azure-store.js +1 -1
- package/dist/alphalib/types/robots/azure-store.js.map +1 -1
- package/dist/alphalib/types/robots/backblaze-import.d.ts.map +1 -1
- package/dist/alphalib/types/robots/backblaze-import.js +1 -1
- package/dist/alphalib/types/robots/backblaze-import.js.map +1 -1
- package/dist/alphalib/types/robots/backblaze-store.js +1 -1
- package/dist/alphalib/types/robots/backblaze-store.js.map +1 -1
- package/dist/alphalib/types/robots/cloudfiles-import.d.ts.map +1 -1
- package/dist/alphalib/types/robots/cloudfiles-import.js +1 -1
- package/dist/alphalib/types/robots/cloudfiles-import.js.map +1 -1
- package/dist/alphalib/types/robots/cloudfiles-store.js +1 -1
- package/dist/alphalib/types/robots/cloudfiles-store.js.map +1 -1
- package/dist/alphalib/types/robots/cloudflare-import.d.ts.map +1 -1
- package/dist/alphalib/types/robots/cloudflare-import.js +1 -1
- package/dist/alphalib/types/robots/cloudflare-import.js.map +1 -1
- package/dist/alphalib/types/robots/cloudflare-store.js +1 -1
- package/dist/alphalib/types/robots/cloudflare-store.js.map +1 -1
- package/dist/alphalib/types/robots/digitalocean-import.d.ts.map +1 -1
- package/dist/alphalib/types/robots/digitalocean-import.js +1 -1
- package/dist/alphalib/types/robots/digitalocean-import.js.map +1 -1
- package/dist/alphalib/types/robots/digitalocean-store.js +1 -1
- package/dist/alphalib/types/robots/digitalocean-store.js.map +1 -1
- package/dist/alphalib/types/robots/document-thumbs.js +1 -1
- package/dist/alphalib/types/robots/dropbox-import.d.ts.map +1 -1
- package/dist/alphalib/types/robots/dropbox-import.js +1 -1
- package/dist/alphalib/types/robots/dropbox-import.js.map +1 -1
- package/dist/alphalib/types/robots/dropbox-store.js +1 -1
- package/dist/alphalib/types/robots/dropbox-store.js.map +1 -1
- package/dist/alphalib/types/robots/edgly-deliver.d.ts +1 -1
- package/dist/alphalib/types/robots/edgly-deliver.d.ts.map +1 -1
- package/dist/alphalib/types/robots/edgly-deliver.js.map +1 -1
- package/dist/alphalib/types/robots/file-decompress.d.ts +12 -0
- package/dist/alphalib/types/robots/file-decompress.d.ts.map +1 -1
- package/dist/alphalib/types/robots/file-decompress.js +9 -0
- package/dist/alphalib/types/robots/file-decompress.js.map +1 -1
- package/dist/alphalib/types/robots/file-serve.d.ts.map +1 -1
- package/dist/alphalib/types/robots/file-serve.js +33 -5
- package/dist/alphalib/types/robots/file-serve.js.map +1 -1
- package/dist/alphalib/types/robots/file-verify.d.ts.map +1 -1
- package/dist/alphalib/types/robots/file-verify.js +1 -1
- package/dist/alphalib/types/robots/file-verify.js.map +1 -1
- package/dist/alphalib/types/robots/ftp-import.d.ts.map +1 -1
- package/dist/alphalib/types/robots/ftp-import.js +1 -1
- package/dist/alphalib/types/robots/ftp-import.js.map +1 -1
- package/dist/alphalib/types/robots/ftp-store.js +1 -1
- package/dist/alphalib/types/robots/ftp-store.js.map +1 -1
- package/dist/alphalib/types/robots/google-import.d.ts.map +1 -1
- package/dist/alphalib/types/robots/google-import.js +1 -1
- package/dist/alphalib/types/robots/google-import.js.map +1 -1
- package/dist/alphalib/types/robots/google-store.js +2 -2
- package/dist/alphalib/types/robots/google-store.js.map +1 -1
- package/dist/alphalib/types/robots/meta-read.d.ts +1 -1
- package/dist/alphalib/types/robots/meta-read.d.ts.map +1 -1
- package/dist/alphalib/types/robots/meta-read.js +1 -1
- package/dist/alphalib/types/robots/meta-read.js.map +1 -1
- package/dist/alphalib/types/robots/meta-write.d.ts +20 -20
- package/dist/alphalib/types/robots/minio-import.d.ts.map +1 -1
- package/dist/alphalib/types/robots/minio-import.js +1 -1
- package/dist/alphalib/types/robots/minio-import.js.map +1 -1
- package/dist/alphalib/types/robots/minio-store.js +1 -1
- package/dist/alphalib/types/robots/minio-store.js.map +1 -1
- package/dist/alphalib/types/robots/s3-import.d.ts.map +1 -1
- package/dist/alphalib/types/robots/s3-import.js +1 -1
- package/dist/alphalib/types/robots/s3-import.js.map +1 -1
- package/dist/alphalib/types/robots/s3-store.d.ts +12 -0
- package/dist/alphalib/types/robots/s3-store.d.ts.map +1 -1
- package/dist/alphalib/types/robots/s3-store.js +7 -1
- package/dist/alphalib/types/robots/s3-store.js.map +1 -1
- package/dist/alphalib/types/robots/sftp-import.d.ts.map +1 -1
- package/dist/alphalib/types/robots/sftp-import.js +1 -1
- package/dist/alphalib/types/robots/sftp-import.js.map +1 -1
- package/dist/alphalib/types/robots/sftp-store.js +1 -1
- package/dist/alphalib/types/robots/sftp-store.js.map +1 -1
- package/dist/alphalib/types/robots/supabase-import.d.ts.map +1 -1
- package/dist/alphalib/types/robots/supabase-import.js +1 -1
- package/dist/alphalib/types/robots/supabase-import.js.map +1 -1
- package/dist/alphalib/types/robots/supabase-store.js +1 -1
- package/dist/alphalib/types/robots/supabase-store.js.map +1 -1
- package/dist/alphalib/types/robots/swift-import.d.ts.map +1 -1
- package/dist/alphalib/types/robots/swift-import.js +1 -1
- package/dist/alphalib/types/robots/swift-import.js.map +1 -1
- package/dist/alphalib/types/robots/swift-store.js +1 -1
- package/dist/alphalib/types/robots/swift-store.js.map +1 -1
- package/dist/alphalib/types/robots/tigris-import.d.ts.map +1 -1
- package/dist/alphalib/types/robots/tigris-import.js +2 -2
- package/dist/alphalib/types/robots/tigris-import.js.map +1 -1
- package/dist/alphalib/types/robots/tigris-store.js +2 -2
- package/dist/alphalib/types/robots/tigris-store.js.map +1 -1
- package/dist/alphalib/types/robots/tlcdn-deliver.d.ts +1 -1
- package/dist/alphalib/types/robots/tlcdn-deliver.d.ts.map +1 -1
- package/dist/alphalib/types/robots/tlcdn-deliver.js.map +1 -1
- package/dist/alphalib/types/robots/video-adaptive.d.ts +20 -20
- package/dist/alphalib/types/robots/video-concat.d.ts +20 -20
- package/dist/alphalib/types/robots/video-concat.d.ts.map +1 -1
- package/dist/alphalib/types/robots/video-concat.js +1 -1
- package/dist/alphalib/types/robots/video-concat.js.map +1 -1
- package/dist/alphalib/types/robots/video-encode.d.ts +20 -20
- package/dist/alphalib/types/robots/video-encode.d.ts.map +1 -1
- package/dist/alphalib/types/robots/video-encode.js +49 -1
- package/dist/alphalib/types/robots/video-encode.js.map +1 -1
- package/dist/alphalib/types/robots/video-merge.d.ts +20 -20
- package/dist/alphalib/types/robots/video-ondemand.d.ts +28 -28
- package/dist/alphalib/types/robots/video-subtitle.d.ts +20 -20
- package/dist/alphalib/types/robots/video-subtitle.d.ts.map +1 -1
- package/dist/alphalib/types/robots/video-subtitle.js +1 -1
- package/dist/alphalib/types/robots/video-subtitle.js.map +1 -1
- package/dist/alphalib/types/robots/video-thumbs.d.ts +20 -20
- package/dist/alphalib/types/robots/vimeo-import.js +1 -1
- package/dist/alphalib/types/robots/wasabi-import.d.ts.map +1 -1
- package/dist/alphalib/types/robots/wasabi-import.js +2 -2
- package/dist/alphalib/types/robots/wasabi-import.js.map +1 -1
- package/dist/alphalib/types/robots/wasabi-store.js +1 -1
- package/dist/alphalib/types/robots/wasabi-store.js.map +1 -1
- package/dist/alphalib/types/template.d.ts +564 -516
- package/dist/alphalib/types/template.d.ts.map +1 -1
- package/dist/alphalib/zodParseWithContext.d.ts.map +1 -1
- package/dist/alphalib/zodParseWithContext.js +14 -10
- package/dist/alphalib/zodParseWithContext.js.map +1 -1
- package/dist/apiTypes.d.ts +1 -1
- package/dist/apiTypes.d.ts.map +1 -1
- package/dist/apiTypes.js.map +1 -1
- package/package.json +2 -2
- package/src/Transloadit.ts +1 -8
- package/src/alphalib/types/assemblyStatus.ts +18 -0
- package/src/alphalib/types/robots/_instructions-primitives.ts +26 -10
- package/src/alphalib/types/robots/assembly-savejson.ts +2 -2
- package/src/alphalib/types/robots/audio-concat.ts +3 -2
- package/src/alphalib/types/robots/audio-encode.ts +1 -1
- package/src/alphalib/types/robots/audio-merge.ts +2 -1
- package/src/alphalib/types/robots/audio-waveform.ts +2 -1
- package/src/alphalib/types/robots/azure-import.ts +2 -1
- package/src/alphalib/types/robots/azure-store.ts +1 -1
- package/src/alphalib/types/robots/backblaze-import.ts +2 -1
- package/src/alphalib/types/robots/backblaze-store.ts +1 -1
- package/src/alphalib/types/robots/cloudfiles-import.ts +2 -1
- package/src/alphalib/types/robots/cloudfiles-store.ts +1 -1
- package/src/alphalib/types/robots/cloudflare-import.ts +2 -1
- package/src/alphalib/types/robots/cloudflare-store.ts +1 -1
- package/src/alphalib/types/robots/digitalocean-import.ts +2 -1
- package/src/alphalib/types/robots/digitalocean-store.ts +1 -1
- package/src/alphalib/types/robots/document-thumbs.ts +1 -1
- package/src/alphalib/types/robots/dropbox-import.ts +2 -1
- package/src/alphalib/types/robots/dropbox-store.ts +1 -1
- package/src/alphalib/types/robots/edgly-deliver.ts +2 -2
- package/src/alphalib/types/robots/file-decompress.ts +9 -0
- package/src/alphalib/types/robots/file-serve.ts +33 -5
- package/src/alphalib/types/robots/file-verify.ts +2 -1
- package/src/alphalib/types/robots/ftp-import.ts +2 -1
- package/src/alphalib/types/robots/ftp-store.ts +1 -1
- package/src/alphalib/types/robots/google-import.ts +2 -1
- package/src/alphalib/types/robots/google-store.ts +2 -2
- package/src/alphalib/types/robots/meta-read.ts +3 -3
- package/src/alphalib/types/robots/minio-import.ts +2 -1
- package/src/alphalib/types/robots/minio-store.ts +1 -1
- package/src/alphalib/types/robots/s3-import.ts +2 -1
- package/src/alphalib/types/robots/s3-store.ts +7 -1
- package/src/alphalib/types/robots/sftp-import.ts +2 -1
- package/src/alphalib/types/robots/sftp-store.ts +1 -1
- package/src/alphalib/types/robots/supabase-import.ts +2 -1
- package/src/alphalib/types/robots/supabase-store.ts +1 -1
- package/src/alphalib/types/robots/swift-import.ts +2 -1
- package/src/alphalib/types/robots/swift-store.ts +1 -1
- package/src/alphalib/types/robots/tigris-import.ts +3 -2
- package/src/alphalib/types/robots/tigris-store.ts +2 -2
- package/src/alphalib/types/robots/tlcdn-deliver.ts +2 -2
- package/src/alphalib/types/robots/video-concat.ts +2 -1
- package/src/alphalib/types/robots/video-encode.ts +49 -1
- package/src/alphalib/types/robots/video-subtitle.ts +2 -1
- package/src/alphalib/types/robots/vimeo-import.ts +1 -1
- package/src/alphalib/types/robots/wasabi-import.ts +3 -2
- package/src/alphalib/types/robots/wasabi-store.ts +1 -1
- package/src/alphalib/zodParseWithContext.ts +18 -14
- package/src/apiTypes.ts +0 -5
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { z } from 'zod'
|
|
2
|
-
|
|
3
|
-
import { interpolateRobot,
|
|
2
|
+
import type { RobotMetaInput } from './_instructions-primitives.ts'
|
|
3
|
+
import { interpolateRobot, robotBase } from './_instructions-primitives.ts'
|
|
4
4
|
|
|
5
5
|
// @ts-expect-error - MetaReadRobot is not ready yet @TODO please supply missing keys
|
|
6
6
|
export const meta: RobotMetaInput = {
|
|
@@ -15,7 +15,7 @@ export const meta: RobotMetaInput = {
|
|
|
15
15
|
|
|
16
16
|
export const robotMetaReadInstructionsSchema = robotBase
|
|
17
17
|
.extend({
|
|
18
|
-
robot: z.literal('/meta/read').describe(
|
|
18
|
+
robot: z.literal('/meta/read').describe('Reads metadata from a file.'),
|
|
19
19
|
})
|
|
20
20
|
.strict()
|
|
21
21
|
|
|
@@ -28,7 +28,8 @@ export const meta: RobotMetaInput = {
|
|
|
28
28
|
},
|
|
29
29
|
},
|
|
30
30
|
},
|
|
31
|
-
example_code_description:
|
|
31
|
+
example_code_description:
|
|
32
|
+
'Import files from the `path/to/files` directory and its subdirectories:',
|
|
32
33
|
has_small_icon: true,
|
|
33
34
|
minimum_charge: 0,
|
|
34
35
|
output_factor: 1,
|
|
@@ -18,7 +18,7 @@ export const meta: RobotMetaInput = {
|
|
|
18
18
|
},
|
|
19
19
|
},
|
|
20
20
|
},
|
|
21
|
-
example_code_description:
|
|
21
|
+
example_code_description: 'Export uploaded files to `my_target_folder` on MinIO:',
|
|
22
22
|
has_small_icon: true,
|
|
23
23
|
minimum_charge: 0,
|
|
24
24
|
output_factor: 1,
|
|
@@ -28,7 +28,8 @@ export const meta: RobotMetaInput = {
|
|
|
28
28
|
},
|
|
29
29
|
},
|
|
30
30
|
},
|
|
31
|
-
example_code_description:
|
|
31
|
+
example_code_description:
|
|
32
|
+
'Import files from the `path/to/files` directory and its subdirectories:',
|
|
32
33
|
has_small_icon: true,
|
|
33
34
|
minimum_charge: 0,
|
|
34
35
|
output_factor: 1,
|
|
@@ -18,7 +18,7 @@ export const meta: RobotMetaInput = {
|
|
|
18
18
|
},
|
|
19
19
|
},
|
|
20
20
|
},
|
|
21
|
-
example_code_description:
|
|
21
|
+
example_code_description: 'Export uploaded files to `my_target_folder` in an S3 bucket:',
|
|
22
22
|
has_small_icon: true,
|
|
23
23
|
minimum_charge: 0,
|
|
24
24
|
output_factor: 1,
|
|
@@ -149,6 +149,12 @@ Set to \`true\` if you use a custom host and run into access denied errors.
|
|
|
149
149
|
.optional()
|
|
150
150
|
.describe(`
|
|
151
151
|
This parameter provides signed URLs in the result JSON (in the \`signed_url\` and \`signed_ssl_url\` properties). The number that you set this parameter to is the URL expiry time in seconds. If this parameter is not used, no URL signing is done.
|
|
152
|
+
`),
|
|
153
|
+
session_token: z
|
|
154
|
+
.string()
|
|
155
|
+
.optional()
|
|
156
|
+
.describe(`
|
|
157
|
+
The session token to use for the S3 store. This is only used if the credentials are from an IAM user with the \`sts:AssumeRole\` permission.
|
|
152
158
|
`),
|
|
153
159
|
})
|
|
154
160
|
.strict()
|
|
@@ -17,7 +17,8 @@ export const meta: RobotMetaInput = {
|
|
|
17
17
|
},
|
|
18
18
|
},
|
|
19
19
|
},
|
|
20
|
-
example_code_description:
|
|
20
|
+
example_code_description:
|
|
21
|
+
'Import files from the `path/to/files` directory and its subdirectories:',
|
|
21
22
|
minimum_charge: 0,
|
|
22
23
|
output_factor: 1,
|
|
23
24
|
override_lvl1: 'File Importing',
|
|
@@ -18,7 +18,7 @@ export const meta: RobotMetaInput = {
|
|
|
18
18
|
},
|
|
19
19
|
},
|
|
20
20
|
},
|
|
21
|
-
example_code_description:
|
|
21
|
+
example_code_description: 'Export uploaded files to `my_target_folder` on an SFTP server:',
|
|
22
22
|
minimum_charge: 0,
|
|
23
23
|
output_factor: 1,
|
|
24
24
|
override_lvl1: 'File Exporting',
|
|
@@ -28,7 +28,8 @@ export const meta: RobotMetaInput = {
|
|
|
28
28
|
},
|
|
29
29
|
},
|
|
30
30
|
},
|
|
31
|
-
example_code_description:
|
|
31
|
+
example_code_description:
|
|
32
|
+
'Import files from the `path/to/files` directory and its subdirectories:',
|
|
32
33
|
has_small_icon: true,
|
|
33
34
|
minimum_charge: 0,
|
|
34
35
|
output_factor: 1,
|
|
@@ -18,7 +18,7 @@ export const meta: RobotMetaInput = {
|
|
|
18
18
|
},
|
|
19
19
|
},
|
|
20
20
|
},
|
|
21
|
-
example_code_description:
|
|
21
|
+
example_code_description: 'Export uploaded files to `my_target_folder` on supabase R2:',
|
|
22
22
|
has_small_icon: true,
|
|
23
23
|
minimum_charge: 0,
|
|
24
24
|
output_factor: 1,
|
|
@@ -28,7 +28,8 @@ export const meta: RobotMetaInput = {
|
|
|
28
28
|
},
|
|
29
29
|
},
|
|
30
30
|
},
|
|
31
|
-
example_code_description:
|
|
31
|
+
example_code_description:
|
|
32
|
+
'Import files from the `path/to/files` directory and its subdirectories:',
|
|
32
33
|
has_small_icon: true,
|
|
33
34
|
minimum_charge: 0,
|
|
34
35
|
output_factor: 1,
|
|
@@ -18,7 +18,7 @@ export const meta: RobotMetaInput = {
|
|
|
18
18
|
},
|
|
19
19
|
},
|
|
20
20
|
},
|
|
21
|
-
example_code_description:
|
|
21
|
+
example_code_description: 'Export uploaded files to `my_target_folder` on Swift:',
|
|
22
22
|
has_small_icon: true,
|
|
23
23
|
minimum_charge: 0,
|
|
24
24
|
output_factor: 1,
|
|
@@ -28,7 +28,8 @@ export const meta: RobotMetaInput = {
|
|
|
28
28
|
},
|
|
29
29
|
},
|
|
30
30
|
},
|
|
31
|
-
example_code_description:
|
|
31
|
+
example_code_description:
|
|
32
|
+
'Import files from the `path/to/files` directory and its subdirectories:',
|
|
32
33
|
has_small_icon: true,
|
|
33
34
|
minimum_charge: 0,
|
|
34
35
|
output_factor: 1,
|
|
@@ -85,7 +86,7 @@ The pagination page size. This only works when recursive is \`true\` for now, in
|
|
|
85
86
|
bucket_region: z
|
|
86
87
|
.string()
|
|
87
88
|
.optional()
|
|
88
|
-
.describe(
|
|
89
|
+
.describe('The region of your Tigris bucket. This is optional as it can often be derived.'),
|
|
89
90
|
})
|
|
90
91
|
.strict()
|
|
91
92
|
|
|
@@ -18,7 +18,7 @@ export const meta: RobotMetaInput = {
|
|
|
18
18
|
},
|
|
19
19
|
},
|
|
20
20
|
},
|
|
21
|
-
example_code_description:
|
|
21
|
+
example_code_description: 'Export uploaded files to `my_target_folder` on Tigris:',
|
|
22
22
|
has_small_icon: true,
|
|
23
23
|
minimum_charge: 0,
|
|
24
24
|
output_factor: 1,
|
|
@@ -81,7 +81,7 @@ If this parameter is not used, no URL signing is done.
|
|
|
81
81
|
bucket_region: z
|
|
82
82
|
.string()
|
|
83
83
|
.optional()
|
|
84
|
-
.describe(
|
|
84
|
+
.describe('The region of your Tigris bucket. This is optional as it can often be derived.'),
|
|
85
85
|
})
|
|
86
86
|
.strict()
|
|
87
87
|
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { z } from 'zod'
|
|
2
|
-
|
|
3
|
-
import { interpolateRobot,
|
|
2
|
+
import type { RobotMetaInput } from './_instructions-primitives.ts'
|
|
3
|
+
import { interpolateRobot, robotBase } from './_instructions-primitives.ts'
|
|
4
4
|
|
|
5
5
|
export const meta: RobotMetaInput = {
|
|
6
6
|
allowed_for_url_transform: false,
|
|
@@ -39,7 +39,8 @@ export const meta: RobotMetaInput = {
|
|
|
39
39
|
},
|
|
40
40
|
},
|
|
41
41
|
},
|
|
42
|
-
example_code_description:
|
|
42
|
+
example_code_description:
|
|
43
|
+
'If you have a form with 3 file input fields and want to concatenate the uploaded videos in a specific order, instruct Transloadit using the `name` attribute of each input field. Use this attribute as the value for the `fields` key in the JSON, and set `as` to `video_[[index]]`. Transloadit will concatenate the files based on the ascending index order:',
|
|
43
44
|
minimum_charge: 0,
|
|
44
45
|
output_factor: 0.6,
|
|
45
46
|
override_lvl1: 'Video Encoding',
|
|
@@ -50,7 +50,55 @@ export const robotVideoEncodeInstructionsSchema = robotBase
|
|
|
50
50
|
.merge(robotUse)
|
|
51
51
|
.merge(videoEncodeSpecificInstructionsSchema)
|
|
52
52
|
.extend({
|
|
53
|
-
robot: z.literal('/video/encode')
|
|
53
|
+
robot: z.literal('/video/encode').describe(`
|
|
54
|
+
The /video/encode Robot is a versatile tool for video processing that handles transcoding, resizing, and watermarking. It supports various formats including modern standards like HEVC (H.265), and provides features such as presets for common devices, custom FFmpeg parameters for powerusers, watermark positioning, and more.
|
|
55
|
+
|
|
56
|
+
## Adding text overlays with FFmpeg
|
|
57
|
+
|
|
58
|
+
You can add text overlays to videos using FFmpeg's \`drawtext\` filter through this <Definition term="Robot">Robot</Definition>'s \`ffmpeg\` parameter. Here are two examples — one with the default font and one with a custom font family name:
|
|
59
|
+
|
|
60
|
+
\`\`\`json
|
|
61
|
+
{
|
|
62
|
+
"steps": {
|
|
63
|
+
":original": {
|
|
64
|
+
"robot": "/upload/handle"
|
|
65
|
+
},
|
|
66
|
+
"text_overlay_default": {
|
|
67
|
+
"use": ":original",
|
|
68
|
+
"robot": "/video/encode",
|
|
69
|
+
"preset": "empty",
|
|
70
|
+
"ffmpeg_stack": "{{stacks.ffmpeg.recommended_version}}",
|
|
71
|
+
"ffmpeg": {
|
|
72
|
+
"codec:a": "copy",
|
|
73
|
+
"vf": "drawtext=text='My text overlay':fontcolor=white:fontsize=24:box=1:boxcolor=black@0.5:boxborderw=5:x=(w-text_w)/2:y=(h-text_h)/2"
|
|
74
|
+
},
|
|
75
|
+
"result": true
|
|
76
|
+
},
|
|
77
|
+
"text_overlay_custom": {
|
|
78
|
+
"use": ":original",
|
|
79
|
+
"robot": "/video/encode",
|
|
80
|
+
"preset": "empty",
|
|
81
|
+
"ffmpeg_stack": "{{stacks.ffmpeg.recommended_version}}",
|
|
82
|
+
"ffmpeg": {
|
|
83
|
+
"codec:a": "copy",
|
|
84
|
+
"vf": "drawtext=font='Times New Roman':text='My text overlay':fontcolor=white:fontsize=24:box=1:boxcolor=black@0.5:boxborderw=5:x=(w-text_w)/2:y=(h-text_h)/2"
|
|
85
|
+
},
|
|
86
|
+
"result": true
|
|
87
|
+
}
|
|
88
|
+
}
|
|
89
|
+
}
|
|
90
|
+
\`\`\`
|
|
91
|
+
|
|
92
|
+
**Notes:**
|
|
93
|
+
|
|
94
|
+
- Use the \`font\` attribute to reference a font by family name with FFmpeg's \`drawtext\`
|
|
95
|
+
- FFmpeg font family names typically do not contain dashes (e.g. \`Times New Roman\`), while
|
|
96
|
+
ImageMagick uses dashed names (e.g. \`Times-New-Roman\`).
|
|
97
|
+
- Preserve the source audio by setting \`"codec:a": "copy"\`.
|
|
98
|
+
- Position text with the \`x\` and \`y\` expressions. The example above centers the text.
|
|
99
|
+
|
|
100
|
+
See the live demo [here](/demos/video-encoding/add-text-overlay/).
|
|
101
|
+
`),
|
|
54
102
|
font_size: z.number().optional(),
|
|
55
103
|
font_color: z.string().optional(),
|
|
56
104
|
text_background_color: z.string().optional(),
|
|
@@ -39,7 +39,8 @@ export const meta: RobotMetaInput = {
|
|
|
39
39
|
},
|
|
40
40
|
},
|
|
41
41
|
},
|
|
42
|
-
example_code_description:
|
|
42
|
+
example_code_description:
|
|
43
|
+
'If you have two file input fields in a form — one for a video and another for an SRT or VTT subtitle, named `input_video` and `input_srt` respectively (with the HTML `name` attribute), hereʼs how to embed the subtitles into the video with Transloadit:',
|
|
43
44
|
minimum_charge: 0,
|
|
44
45
|
output_factor: 0.6,
|
|
45
46
|
override_lvl1: 'Video Encoding',
|
|
@@ -83,7 +83,7 @@ You can also use an array of path strings here to import multiple paths in the s
|
|
|
83
83
|
rendition: z
|
|
84
84
|
.enum(['240p', '360p', '540p', '720p', '1080p', 'source'])
|
|
85
85
|
.default('720p')
|
|
86
|
-
.describe(
|
|
86
|
+
.describe('The quality of the video to import.'),
|
|
87
87
|
})
|
|
88
88
|
.strict()
|
|
89
89
|
|
|
@@ -28,7 +28,8 @@ export const meta: RobotMetaInput = {
|
|
|
28
28
|
},
|
|
29
29
|
},
|
|
30
30
|
},
|
|
31
|
-
example_code_description:
|
|
31
|
+
example_code_description:
|
|
32
|
+
'Import files from the `path/to/files` directory and its subdirectories:',
|
|
32
33
|
has_small_icon: true,
|
|
33
34
|
minimum_charge: 0,
|
|
34
35
|
output_factor: 1,
|
|
@@ -59,7 +60,7 @@ export const robotWasabiImportInstructionsSchema = robotBase
|
|
|
59
60
|
result: z
|
|
60
61
|
.boolean()
|
|
61
62
|
.optional()
|
|
62
|
-
.describe(
|
|
63
|
+
.describe('Whether the results of this Step should be present in the Assembly Status JSON'),
|
|
63
64
|
robot: z.literal('/wasabi/import'),
|
|
64
65
|
path: path.describe(`
|
|
65
66
|
The path in your bucket to the specific file or directory. If the path points to a file, only this file will be imported. For example: \`images/avatar.jpg\`.
|
|
@@ -18,7 +18,7 @@ export const meta: RobotMetaInput = {
|
|
|
18
18
|
},
|
|
19
19
|
},
|
|
20
20
|
},
|
|
21
|
-
example_code_description:
|
|
21
|
+
example_code_description: 'Export uploaded files to `my_target_folder` on Wasabi:',
|
|
22
22
|
has_small_icon: true,
|
|
23
23
|
minimum_charge: 0,
|
|
24
24
|
output_factor: 1,
|
|
@@ -113,7 +113,7 @@ export function zodParseWithContext<T extends z.ZodType>(
|
|
|
113
113
|
else if ('unionErrors' in zodIssue && zodIssue.unionErrors) {
|
|
114
114
|
// --- Moved initialization out of the loop ---
|
|
115
115
|
const collectedLiterals: Record<string, (string | number | boolean)[]> = {}
|
|
116
|
-
const collectedMessages: Record<string, string
|
|
116
|
+
const collectedMessages: Record<string, Set<string>> = {}
|
|
117
117
|
|
|
118
118
|
// Process nested issues within the union
|
|
119
119
|
for (const unionError of zodIssue.unionErrors) {
|
|
@@ -123,8 +123,11 @@ export function zodParseWithContext<T extends z.ZodType>(
|
|
|
123
123
|
|
|
124
124
|
// Ensure paths exist in collection maps
|
|
125
125
|
if (!collectedLiterals[nestedPath]) collectedLiterals[nestedPath] = []
|
|
126
|
-
if (!collectedMessages[nestedPath]) collectedMessages[nestedPath] =
|
|
126
|
+
if (!collectedMessages[nestedPath]) collectedMessages[nestedPath] = new Set()
|
|
127
127
|
|
|
128
|
+
if (issue.code === 'custom' && issue.message.includes('interpolation string')) {
|
|
129
|
+
continue
|
|
130
|
+
}
|
|
128
131
|
if (issue.code === 'invalid_literal') {
|
|
129
132
|
const { expected } = issue
|
|
130
133
|
if (
|
|
@@ -137,7 +140,7 @@ export function zodParseWithContext<T extends z.ZodType>(
|
|
|
137
140
|
collectedLiterals[nestedPath].push(expected)
|
|
138
141
|
}
|
|
139
142
|
// Still add the raw message for fallback
|
|
140
|
-
collectedMessages[nestedPath].
|
|
143
|
+
collectedMessages[nestedPath].add(issue.message)
|
|
141
144
|
}
|
|
142
145
|
// Keep existing enum handling if needed, but literal should cover most cases
|
|
143
146
|
else if (issue.code === 'invalid_enum_value') {
|
|
@@ -145,7 +148,7 @@ export function zodParseWithContext<T extends z.ZodType>(
|
|
|
145
148
|
if (options && options.length > 0) {
|
|
146
149
|
collectedLiterals[nestedPath].push(...options.map(String)) // Assuming options are compatible
|
|
147
150
|
}
|
|
148
|
-
collectedMessages[nestedPath].
|
|
151
|
+
collectedMessages[nestedPath].add(issue.message)
|
|
149
152
|
}
|
|
150
153
|
// Keep existing unrecognized keys handling
|
|
151
154
|
else if (issue.code === 'unrecognized_keys') {
|
|
@@ -153,7 +156,7 @@ export function zodParseWithContext<T extends z.ZodType>(
|
|
|
153
156
|
const { keys } = issue
|
|
154
157
|
const truncatedKeys = keys.slice(0, maxKeysToShow)
|
|
155
158
|
const ellipsis = keys.length > maxKeysToShow ? '...' : ''
|
|
156
|
-
collectedMessages[nestedPath].
|
|
159
|
+
collectedMessages[nestedPath].add(
|
|
157
160
|
`has unrecognized keys: ${truncatedKeys.map((k) => `\`${k}\``).join(', ')}${ellipsis}`,
|
|
158
161
|
)
|
|
159
162
|
}
|
|
@@ -177,13 +180,13 @@ export function zodParseWithContext<T extends z.ZodType>(
|
|
|
177
180
|
}
|
|
178
181
|
}
|
|
179
182
|
|
|
180
|
-
collectedMessages[nestedPath].
|
|
183
|
+
collectedMessages[nestedPath].add(
|
|
181
184
|
`got invalid type: ${received} (value: \`${actualValueStr}\`, expected: ${expectedOutput})`,
|
|
182
185
|
)
|
|
183
186
|
}
|
|
184
187
|
// <-- End added handling -->
|
|
185
188
|
else {
|
|
186
|
-
collectedMessages[nestedPath].
|
|
189
|
+
collectedMessages[nestedPath].add(issue.message) // Handle other nested codes
|
|
187
190
|
}
|
|
188
191
|
}
|
|
189
192
|
}
|
|
@@ -194,13 +197,17 @@ export function zodParseWithContext<T extends z.ZodType>(
|
|
|
194
197
|
if (!badPaths.has(nestedPath)) {
|
|
195
198
|
badPaths.set(nestedPath, [])
|
|
196
199
|
}
|
|
197
|
-
|
|
200
|
+
|
|
201
|
+
const targetMessages = badPaths.get(nestedPath)
|
|
202
|
+
if (!targetMessages) {
|
|
203
|
+
continue
|
|
204
|
+
}
|
|
198
205
|
|
|
199
206
|
// Prioritize more specific messages (like invalid type with details)
|
|
200
|
-
const invalidTypeMessages = collectedMessages[nestedPath].filter((m) =>
|
|
207
|
+
const invalidTypeMessages = Array.from(collectedMessages[nestedPath]).filter((m) =>
|
|
201
208
|
m.startsWith('got invalid type:'),
|
|
202
209
|
)
|
|
203
|
-
const unrecognizedKeyMessages = collectedMessages[nestedPath].filter((m) =>
|
|
210
|
+
const unrecognizedKeyMessages = Array.from(collectedMessages[nestedPath]).filter((m) =>
|
|
204
211
|
m.startsWith('has unrecognized keys:'),
|
|
205
212
|
)
|
|
206
213
|
const literalMessages = collectedLiterals[nestedPath] ?? []
|
|
@@ -217,9 +224,6 @@ export function zodParseWithContext<T extends z.ZodType>(
|
|
|
217
224
|
targetMessages.push(...collectedMessages[nestedPath])
|
|
218
225
|
}
|
|
219
226
|
}
|
|
220
|
-
|
|
221
|
-
// Prevent the main `messages` array from being populated further for this union issue
|
|
222
|
-
continue // Skip adding messages directly from the top-level union issue itself
|
|
223
227
|
}
|
|
224
228
|
// Handle other specific error codes (only if not handled above)
|
|
225
229
|
else {
|
|
@@ -231,7 +235,7 @@ export function zodParseWithContext<T extends z.ZodType>(
|
|
|
231
235
|
switch (zodIssue.code) {
|
|
232
236
|
case 'invalid_type': {
|
|
233
237
|
received = zodIssue.received === 'undefined' ? 'missing' : zodIssue.received
|
|
234
|
-
const actualValue = getByPath(obj, path)
|
|
238
|
+
const actualValue = getByPath(obj, path)
|
|
235
239
|
const actualValueStr =
|
|
236
240
|
typeof actualValue === 'object' && actualValue !== null
|
|
237
241
|
? JSON.stringify(actualValue)
|
package/src/apiTypes.ts
CHANGED
|
@@ -2,11 +2,6 @@ import type { AssemblyInstructions, AssemblyInstructionsInput } from './alphalib
|
|
|
2
2
|
|
|
3
3
|
export {
|
|
4
4
|
type AssemblyIndexItem,
|
|
5
|
-
type AssemblyStatusMeta,
|
|
6
|
-
type AssemblyStatusResult,
|
|
7
|
-
type AssemblyStatusResults,
|
|
8
|
-
type AssemblyStatusUpload,
|
|
9
|
-
type AssemblyStatusUploads,
|
|
10
5
|
assemblyIndexItemSchema,
|
|
11
6
|
assemblyStatusSchema,
|
|
12
7
|
} from './alphalib/types/assemblyStatus.ts'
|