@transloadit/zod 4.1.4 → 4.1.6
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/v3/assemblyReplay.d.ts +1373 -1373
- package/dist/v3/assemblyReplayNotification.d.ts +1373 -1373
- package/dist/v3/assemblyStatus.d.ts +40 -4
- package/dist/v3/assemblyStatus.d.ts.map +1 -1
- package/dist/v3/assemblyStatus.js +59 -1
- package/dist/v3/robots/_index.d.ts +5223 -5223
- package/dist/v3/robots/meta-write.d.ts +114 -114
- package/dist/v3/template.d.ts +12401 -12401
- package/dist/v3/templateCredential.d.ts +2 -2
- package/dist/v4/assemblyStatus.d.ts +48 -8
- package/dist/v4/assemblyStatus.d.ts.map +1 -1
- package/dist/v4/assemblyStatus.js +59 -1
- package/dist/v4/robots/_index.d.ts +595 -595
- package/dist/v4/robots/meta-write.d.ts +8 -8
- package/dist/v4/template.d.ts +768 -768
- package/dist/v4/templateCredential.d.ts +3 -3
- package/package.json +7 -1
|
@@ -68,8 +68,8 @@ export declare const templateCredentialsSchema: z.ZodObject<{
|
|
|
68
68
|
type: z.ZodEnum<["ai", "azure", "backblaze", "cloudflare", "companion", "digitalocean", "dropbox", "ftp", "google", "http", "minio", "rackspace", "s3", "sftp", "supabase", "swift", "tigris", "vimeo", "wasabi", "youtube"]>;
|
|
69
69
|
content: z.ZodObject<{}, "strip", z.ZodTypeAny, {}, {}>;
|
|
70
70
|
}, "strict", z.ZodTypeAny, {
|
|
71
|
+
type: "http" | "cloudflare" | "ai" | "vimeo" | "azure" | "backblaze" | "companion" | "digitalocean" | "dropbox" | "ftp" | "google" | "minio" | "rackspace" | "s3" | "sftp" | "supabase" | "swift" | "tigris" | "wasabi" | "youtube";
|
|
71
72
|
name: string;
|
|
72
|
-
type: "ai" | "http" | "azure" | "backblaze" | "cloudflare" | "companion" | "digitalocean" | "dropbox" | "ftp" | "google" | "minio" | "rackspace" | "s3" | "sftp" | "supabase" | "swift" | "tigris" | "vimeo" | "wasabi" | "youtube";
|
|
73
73
|
content: {};
|
|
74
74
|
auth: {
|
|
75
75
|
key: string;
|
|
@@ -80,8 +80,8 @@ export declare const templateCredentialsSchema: z.ZodObject<{
|
|
|
80
80
|
referer?: string | undefined;
|
|
81
81
|
};
|
|
82
82
|
}, {
|
|
83
|
+
type: "http" | "cloudflare" | "ai" | "vimeo" | "azure" | "backblaze" | "companion" | "digitalocean" | "dropbox" | "ftp" | "google" | "minio" | "rackspace" | "s3" | "sftp" | "supabase" | "swift" | "tigris" | "wasabi" | "youtube";
|
|
83
84
|
name: string;
|
|
84
|
-
type: "ai" | "http" | "azure" | "backblaze" | "cloudflare" | "companion" | "digitalocean" | "dropbox" | "ftp" | "google" | "minio" | "rackspace" | "s3" | "sftp" | "supabase" | "swift" | "tigris" | "vimeo" | "wasabi" | "youtube";
|
|
85
85
|
content: {};
|
|
86
86
|
auth: {
|
|
87
87
|
key: string;
|
|
@@ -1,14 +1,16 @@
|
|
|
1
1
|
import { z } from 'zod/v4';
|
|
2
2
|
export declare const assemblyBusyCodeSchema: z.ZodEnum<{
|
|
3
3
|
ASSEMBLY_UPLOADING: "ASSEMBLY_UPLOADING";
|
|
4
|
+
ASSEMBLY_EXECUTING: "ASSEMBLY_EXECUTING";
|
|
5
|
+
ASSEMBLY_REPLAYING: "ASSEMBLY_REPLAYING";
|
|
4
6
|
}>;
|
|
5
7
|
export declare const assemblyStatusOkCodeSchema: z.ZodEnum<{
|
|
6
8
|
ASSEMBLY_UPLOADING: "ASSEMBLY_UPLOADING";
|
|
9
|
+
ASSEMBLY_EXECUTING: "ASSEMBLY_EXECUTING";
|
|
10
|
+
ASSEMBLY_REPLAYING: "ASSEMBLY_REPLAYING";
|
|
7
11
|
ASSEMBLY_CANCELED: "ASSEMBLY_CANCELED";
|
|
8
12
|
ASSEMBLY_COMPLETED: "ASSEMBLY_COMPLETED";
|
|
9
|
-
ASSEMBLY_EXECUTING: "ASSEMBLY_EXECUTING";
|
|
10
13
|
ASSEMBLY_EXPIRED: "ASSEMBLY_EXPIRED";
|
|
11
|
-
ASSEMBLY_REPLAYING: "ASSEMBLY_REPLAYING";
|
|
12
14
|
REQUEST_ABORTED: "REQUEST_ABORTED";
|
|
13
15
|
}>;
|
|
14
16
|
export declare const assemblyStatusErrCodeSchema: z.ZodEnum<{
|
|
@@ -1621,6 +1623,8 @@ export declare const assemblyStatusBaseSchema: z.ZodObject<{
|
|
|
1621
1623
|
export declare const assemblyStatusBusySchema: z.ZodObject<{
|
|
1622
1624
|
ok: z.ZodEnum<{
|
|
1623
1625
|
ASSEMBLY_UPLOADING: "ASSEMBLY_UPLOADING";
|
|
1626
|
+
ASSEMBLY_EXECUTING: "ASSEMBLY_EXECUTING";
|
|
1627
|
+
ASSEMBLY_REPLAYING: "ASSEMBLY_REPLAYING";
|
|
1624
1628
|
}>;
|
|
1625
1629
|
message: z.ZodOptional<z.ZodString>;
|
|
1626
1630
|
admin_cmd: z.ZodOptional<z.ZodUnknown>;
|
|
@@ -2610,11 +2614,11 @@ export declare const assemblyStatusOkSchema: z.ZodObject<{
|
|
|
2610
2614
|
}, z.core.$strip>>;
|
|
2611
2615
|
ok: z.ZodEnum<{
|
|
2612
2616
|
ASSEMBLY_UPLOADING: "ASSEMBLY_UPLOADING";
|
|
2617
|
+
ASSEMBLY_EXECUTING: "ASSEMBLY_EXECUTING";
|
|
2618
|
+
ASSEMBLY_REPLAYING: "ASSEMBLY_REPLAYING";
|
|
2613
2619
|
ASSEMBLY_CANCELED: "ASSEMBLY_CANCELED";
|
|
2614
2620
|
ASSEMBLY_COMPLETED: "ASSEMBLY_COMPLETED";
|
|
2615
|
-
ASSEMBLY_EXECUTING: "ASSEMBLY_EXECUTING";
|
|
2616
2621
|
ASSEMBLY_EXPIRED: "ASSEMBLY_EXPIRED";
|
|
2617
|
-
ASSEMBLY_REPLAYING: "ASSEMBLY_REPLAYING";
|
|
2618
2622
|
REQUEST_ABORTED: "REQUEST_ABORTED";
|
|
2619
2623
|
}>;
|
|
2620
2624
|
}, z.core.$catchall<z.ZodUnknown>>;
|
|
@@ -3791,6 +3795,42 @@ export declare function getError(assembly: AssemblyStatus | undefined | null): s
|
|
|
3791
3795
|
* Returns the ok value if it exists or undefined
|
|
3792
3796
|
*/
|
|
3793
3797
|
export declare function getOk(assembly: AssemblyStatus | undefined | null): string | undefined;
|
|
3798
|
+
/**
|
|
3799
|
+
* Type guard to check if a status string is a busy (in-progress) state.
|
|
3800
|
+
*/
|
|
3801
|
+
export declare function isAssemblyBusyStatus(status: string | undefined | null): status is z.infer<typeof assemblyBusyCodeSchema>;
|
|
3802
|
+
/**
|
|
3803
|
+
* Type guard to check if a status string is an ok (non-error) state.
|
|
3804
|
+
*/
|
|
3805
|
+
export declare function isAssemblyOkStatus(status: string | undefined | null): status is z.infer<typeof assemblyStatusOkCodeSchema>;
|
|
3806
|
+
/**
|
|
3807
|
+
* Type guard to check if a status string is an error state.
|
|
3808
|
+
*/
|
|
3809
|
+
export declare function isAssemblyErrorStatus(status: string | undefined | null): status is z.infer<typeof assemblyStatusErrCodeSchema>;
|
|
3810
|
+
/**
|
|
3811
|
+
* Type guard to check if an assembly matches the system error shape.
|
|
3812
|
+
*/
|
|
3813
|
+
export declare function isAssemblySysError(assembly: AssemblyStatus | undefined | null): assembly is z.infer<typeof assemblyStatusSysErrSchema>;
|
|
3814
|
+
/**
|
|
3815
|
+
* Type guard to check if a status string is terminal (ok, but not busy).
|
|
3816
|
+
*/
|
|
3817
|
+
export declare function isAssemblyTerminalOkStatus(status: string | undefined | null): status is z.infer<typeof assemblyStatusOkCodeSchema>;
|
|
3818
|
+
/**
|
|
3819
|
+
* Returns true if the assembly is in a busy (in-progress) state.
|
|
3820
|
+
*/
|
|
3821
|
+
export declare function isAssemblyBusy(assembly: AssemblyStatus | undefined | null): boolean;
|
|
3822
|
+
/**
|
|
3823
|
+
* Returns true if the assembly is in a terminal ok state.
|
|
3824
|
+
*/
|
|
3825
|
+
export declare function isAssemblyTerminalOk(assembly: AssemblyStatus | undefined | null): boolean;
|
|
3826
|
+
/**
|
|
3827
|
+
* Returns true if the assembly has a terminal error state.
|
|
3828
|
+
*/
|
|
3829
|
+
export declare function isAssemblyTerminalError(assembly: AssemblyStatus | undefined | null): boolean;
|
|
3830
|
+
/**
|
|
3831
|
+
* Returns true if the assembly is terminal (ok or error).
|
|
3832
|
+
*/
|
|
3833
|
+
export declare function isAssemblyTerminal(assembly: AssemblyStatus | undefined | null): boolean;
|
|
3794
3834
|
/**
|
|
3795
3835
|
* This type and these functions below are compatibility helpers for
|
|
3796
3836
|
* working with partial assembly status objects during the transition
|
|
@@ -3820,11 +3860,11 @@ export declare const assemblyIndexItemSchema: z.ZodObject<{
|
|
|
3820
3860
|
bytes_usage: z.ZodOptional<z.ZodOptional<z.ZodNumber>>;
|
|
3821
3861
|
ok: z.ZodOptional<z.ZodNullable<z.ZodEnum<{
|
|
3822
3862
|
ASSEMBLY_UPLOADING: "ASSEMBLY_UPLOADING";
|
|
3863
|
+
ASSEMBLY_EXECUTING: "ASSEMBLY_EXECUTING";
|
|
3864
|
+
ASSEMBLY_REPLAYING: "ASSEMBLY_REPLAYING";
|
|
3823
3865
|
ASSEMBLY_CANCELED: "ASSEMBLY_CANCELED";
|
|
3824
3866
|
ASSEMBLY_COMPLETED: "ASSEMBLY_COMPLETED";
|
|
3825
|
-
ASSEMBLY_EXECUTING: "ASSEMBLY_EXECUTING";
|
|
3826
3867
|
ASSEMBLY_EXPIRED: "ASSEMBLY_EXPIRED";
|
|
3827
|
-
ASSEMBLY_REPLAYING: "ASSEMBLY_REPLAYING";
|
|
3828
3868
|
REQUEST_ABORTED: "REQUEST_ABORTED";
|
|
3829
3869
|
}>>>;
|
|
3830
3870
|
error: z.ZodOptional<z.ZodNullable<z.ZodEnum<{
|
|
@@ -3990,11 +4030,11 @@ export declare const assemblyIndexSchema: z.ZodArray<z.ZodObject<{
|
|
|
3990
4030
|
bytes_usage: z.ZodOptional<z.ZodOptional<z.ZodNumber>>;
|
|
3991
4031
|
ok: z.ZodOptional<z.ZodNullable<z.ZodEnum<{
|
|
3992
4032
|
ASSEMBLY_UPLOADING: "ASSEMBLY_UPLOADING";
|
|
4033
|
+
ASSEMBLY_EXECUTING: "ASSEMBLY_EXECUTING";
|
|
4034
|
+
ASSEMBLY_REPLAYING: "ASSEMBLY_REPLAYING";
|
|
3993
4035
|
ASSEMBLY_CANCELED: "ASSEMBLY_CANCELED";
|
|
3994
4036
|
ASSEMBLY_COMPLETED: "ASSEMBLY_COMPLETED";
|
|
3995
|
-
ASSEMBLY_EXECUTING: "ASSEMBLY_EXECUTING";
|
|
3996
4037
|
ASSEMBLY_EXPIRED: "ASSEMBLY_EXPIRED";
|
|
3997
|
-
ASSEMBLY_REPLAYING: "ASSEMBLY_REPLAYING";
|
|
3998
4038
|
REQUEST_ABORTED: "REQUEST_ABORTED";
|
|
3999
4039
|
}>>>;
|
|
4000
4040
|
error: z.ZodOptional<z.ZodNullable<z.ZodEnum<{
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"assemblyStatus.d.ts","sourceRoot":"","sources":["../../src/v4/assemblyStatus.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,QAAQ,CAAA;AAE1B,eAAO,MAAM,sBAAsB
|
|
1
|
+
{"version":3,"file":"assemblyStatus.d.ts","sourceRoot":"","sources":["../../src/v4/assemblyStatus.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,QAAQ,CAAA;AAE1B,eAAO,MAAM,sBAAsB;;;;EAIjC,CAAA;AAEF,eAAO,MAAM,0BAA0B;;;;;;;;EAWrC,CAAA;AAEF,eAAO,MAAM,2BAA2B;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;E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EMBLY_UPLOADING',
|
|
4
|
+
'ASSEMBLY_EXECUTING',
|
|
5
|
+
'ASSEMBLY_REPLAYING',
|
|
6
|
+
]);
|
|
3
7
|
export const assemblyStatusOkCodeSchema = z.enum([
|
|
4
8
|
'ASSEMBLY_CANCELED',
|
|
5
9
|
'ASSEMBLY_COMPLETED',
|
|
@@ -668,6 +672,60 @@ export function getOk(assembly) {
|
|
|
668
672
|
? String(assembly.ok)
|
|
669
673
|
: undefined;
|
|
670
674
|
}
|
|
675
|
+
/**
|
|
676
|
+
* Type guard to check if a status string is a busy (in-progress) state.
|
|
677
|
+
*/
|
|
678
|
+
export function isAssemblyBusyStatus(status) {
|
|
679
|
+
return Boolean(status) && assemblyBusyCodeSchema.safeParse(status).success;
|
|
680
|
+
}
|
|
681
|
+
/**
|
|
682
|
+
* Type guard to check if a status string is an ok (non-error) state.
|
|
683
|
+
*/
|
|
684
|
+
export function isAssemblyOkStatus(status) {
|
|
685
|
+
return Boolean(status) && assemblyStatusOkCodeSchema.safeParse(status).success;
|
|
686
|
+
}
|
|
687
|
+
/**
|
|
688
|
+
* Type guard to check if a status string is an error state.
|
|
689
|
+
*/
|
|
690
|
+
export function isAssemblyErrorStatus(status) {
|
|
691
|
+
return Boolean(status) && assemblyStatusErrCodeSchema.safeParse(status).success;
|
|
692
|
+
}
|
|
693
|
+
/**
|
|
694
|
+
* Type guard to check if an assembly matches the system error shape.
|
|
695
|
+
*/
|
|
696
|
+
export function isAssemblySysError(assembly) {
|
|
697
|
+
return Boolean(assembly) && assemblyStatusSysErrSchema.safeParse(assembly).success;
|
|
698
|
+
}
|
|
699
|
+
/**
|
|
700
|
+
* Type guard to check if a status string is terminal (ok, but not busy).
|
|
701
|
+
*/
|
|
702
|
+
export function isAssemblyTerminalOkStatus(status) {
|
|
703
|
+
return isAssemblyOkStatus(status) && !isAssemblyBusyStatus(status);
|
|
704
|
+
}
|
|
705
|
+
/**
|
|
706
|
+
* Returns true if the assembly is in a busy (in-progress) state.
|
|
707
|
+
*/
|
|
708
|
+
export function isAssemblyBusy(assembly) {
|
|
709
|
+
return isAssemblyBusyStatus(getOk(assembly));
|
|
710
|
+
}
|
|
711
|
+
/**
|
|
712
|
+
* Returns true if the assembly is in a terminal ok state.
|
|
713
|
+
*/
|
|
714
|
+
export function isAssemblyTerminalOk(assembly) {
|
|
715
|
+
return isAssemblyTerminalOkStatus(getOk(assembly));
|
|
716
|
+
}
|
|
717
|
+
/**
|
|
718
|
+
* Returns true if the assembly has a terminal error state.
|
|
719
|
+
*/
|
|
720
|
+
export function isAssemblyTerminalError(assembly) {
|
|
721
|
+
return isAssemblyErrorStatus(getError(assembly)) || isAssemblySysError(assembly);
|
|
722
|
+
}
|
|
723
|
+
/**
|
|
724
|
+
* Returns true if the assembly is terminal (ok or error).
|
|
725
|
+
*/
|
|
726
|
+
export function isAssemblyTerminal(assembly) {
|
|
727
|
+
return isAssemblyTerminalOk(assembly) || isAssemblyTerminalError(assembly);
|
|
728
|
+
}
|
|
671
729
|
export function hasErrorPartial(assembly) {
|
|
672
730
|
return (Boolean(assembly) &&
|
|
673
731
|
assembly != null &&
|