@transloadit/zod 4.4.1 → 4.5.0

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.
@@ -76,14 +76,14 @@ Best practice:
76
76
  model: z
77
77
  .string()
78
78
  .optional()
79
- .describe('The AI model to use. Defaults to google/nano-banana. Supported models include flux-1.1-pro-ultra, flux-schnell, recraft-v3, google/nano-banana, google/nano-banana-2, google/nano-banana-pro, openai/gpt-image-2, and stability-ai/stable-diffusion-inpainting. The legacy alias gpt-image-2 is also accepted for backwards compatibility.'),
79
+ .describe('The AI model to use. Defaults to openai/gpt-image-2.5-flare. Supported models include flux-1.1-pro-ultra, flux-schnell, recraft-v3, google/nano-banana, google/nano-banana-2, google/nano-banana-pro, openai/gpt-image-2, openai/gpt-image-2.5-flare, openai/gpt-image-2.5-sunburst, and stability-ai/stable-diffusion-inpainting. The legacy alias gpt-image-2 is also accepted for backwards compatibility.'),
80
80
  prompt: z
81
81
  .string()
82
82
  .describe('Prompt describing the desired image. For inpainting, describe what should appear in the masked/transparent region and that the rest should stay unchanged.'),
83
83
  format: z
84
84
  .enum(['jpeg', 'jpg', 'png', 'gif', 'webp', 'svg'])
85
85
  .optional()
86
- .describe('Output format. Defaults depend on model: png for Google models and openai/gpt-image-2, svg for recraft-v3, jpeg for others. Google models currently return PNG only.'),
86
+ .describe('Output format. Defaults depend on model: png for Google and OpenAI models, svg for recraft-v3, jpeg for others. Google models currently return PNG only.'),
87
87
  seed: z.number().optional().describe('Seed for the random number generator.'),
88
88
  aspect_ratio: z
89
89
  .string()
@@ -92,11 +92,11 @@ Best practice:
92
92
  height: z
93
93
  .number()
94
94
  .optional()
95
- .describe('Requested output height in pixels (mainly used by Google image models and openai/gpt-image-2).'),
95
+ .describe('Requested output height in pixels (mainly used by Google and OpenAI image models).'),
96
96
  width: z
97
97
  .number()
98
98
  .optional()
99
- .describe('Requested output width in pixels (mainly used by Google image models and openai/gpt-image-2).'),
99
+ .describe('Requested output width in pixels (mainly used by Google and OpenAI image models).'),
100
100
  style: z.string().optional().describe('Style of the generated image.'),
101
101
  num_outputs: z
102
102
  .number()
@@ -17,8 +17,10 @@ export declare const storedAssetSchema: z.ZodObject<{
17
17
  sha256: z.ZodOptional<z.ZodString>;
18
18
  width: z.ZodOptional<z.ZodNumber>;
19
19
  height: z.ZodOptional<z.ZodNumber>;
20
+ thumbhash: z.ZodOptional<z.ZodString>;
21
+ has_alpha: z.ZodOptional<z.ZodBoolean>;
20
22
  }, z.core.$strip>;
21
- /** Store, read and recovery share this shape; image clients may enrich it with placeholders. */
23
+ /** Store, read and recovery share this version-pinned shape, including optional placeholders. */
22
24
  export type StoredAsset = z.infer<typeof storedAssetSchema>;
23
25
  /** Bounded metadata paging; cursors are the last returned, case-sensitive asset path. */
24
26
  export declare const damAssetsListOptionsSchema: z.ZodObject<{
@@ -51,6 +53,8 @@ export declare const damAssetFoundResponseSchema: z.ZodObject<{
51
53
  sha256: z.ZodOptional<z.ZodString>;
52
54
  width: z.ZodOptional<z.ZodNumber>;
53
55
  height: z.ZodOptional<z.ZodNumber>;
56
+ thumbhash: z.ZodOptional<z.ZodString>;
57
+ has_alpha: z.ZodOptional<z.ZodBoolean>;
54
58
  }, z.core.$strip>;
55
59
  }, z.core.$strict>;
56
60
  /** A bounded catalog page; null means there is no next page, even in an empty Workspace. */
@@ -69,6 +73,8 @@ export declare const damAssetsListedResponseSchema: z.ZodObject<{
69
73
  sha256: z.ZodOptional<z.ZodString>;
70
74
  width: z.ZodOptional<z.ZodNumber>;
71
75
  height: z.ZodOptional<z.ZodNumber>;
76
+ thumbhash: z.ZodOptional<z.ZodString>;
77
+ has_alpha: z.ZodOptional<z.ZodBoolean>;
72
78
  }, z.core.$strip>>;
73
79
  next_cursor: z.ZodNullable<z.ZodString>;
74
80
  }, z.core.$strict>;
@@ -1 +1 @@
1
- {"version":3,"file":"storageAsset.d.ts","sourceRoot":"","sources":["../../src/v4/storageAsset.ts"],"names":[],"mappings":"AAAA,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AC9E,eAAO,MAAM,YAAY,QAA+B,CAAA;AAExD,qEAAqE;AACrE,eAAO,MAAM,WAAW,aAG2D,CAAA;AAEnF,yFAAyF;AACzF,eAAO,MAAM,iBAAiB;;;;;;;;;;;;;iBAyB5B,CAAA;AAEF,iGAAiG;AACjG,MAAM,MAAM,WAAW,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,iBAAiB,CAAC,CAAA;AAE3D,yFAAyF;AACzF,eAAO,MAAM,0BAA0B;;;;iBAIrC,CAAA;AAEF,4FAA4F;AAC5F,eAAO,MAAM,wBAAwB;;iBAAmD,CAAA;AAExF,iFAAiF;AACjF,eAAO,MAAM,yBAAyB;;;iBAUpC,CAAA;AAEF,MAAM,MAAM,sBAAsB,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,yBAAyB,CAAC,CAAA;AAE9E,mFAAmF;AACnF,eAAO,MAAM,2BAA2B;;;;;;;;;;;;;;;;;kBAM7B,CAAA;AAEX,4FAA4F;AAC5F,eAAO,MAAM,6BAA6B;;;;;;;;;;;;;;;;;;;kBAQ/B,CAAA;AAEX,MAAM,MAAM,gBAAgB,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,6BAA6B,CAAC,CAAA;AAC5E,MAAM,MAAM,uBAAuB,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,0BAA0B,CAAC,CAAA;AAChF,MAAM,MAAM,qBAAqB,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,wBAAwB,CAAC,CAAA"}
@@ -28,6 +28,12 @@ export const storedAssetSchema = z.object({
28
28
  .optional(),
29
29
  width: z.number().int().positive().max(Number.MAX_SAFE_INTEGER).optional(),
30
30
  height: z.number().int().positive().max(Number.MAX_SAFE_INTEGER).optional(),
31
+ thumbhash: z
32
+ .string()
33
+ .regex(/^(?:[A-Za-z0-9+/]{4}){1,15}(?:[A-Za-z0-9+/]{4}|[A-Za-z0-9+/]{2}==|[A-Za-z0-9+/]{3}=)$/u)
34
+ .optional()
35
+ .describe('Base64-encoded ThumbHash of this version’s displayed pixels, when requested with output_meta.thumbhash on its producing Step. This is image data: apply the same access controls as the original.'),
36
+ has_alpha: z.boolean().optional().describe('Whether the image has an alpha channel, even if all its pixels are opaque. Present when ThumbHash extraction succeeds; absence means unknown.'),
31
37
  });
32
38
  /** Bounded metadata paging; cursors are the last returned, case-sensitive asset path. */
33
39
  export const damAssetsListOptionsSchema = z.object({
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@transloadit/zod",
3
- "version": "4.4.1",
3
+ "version": "4.5.0",
4
4
  "description": "Transloadit Zod schemas",
5
5
  "type": "module",
6
6
  "license": "MIT",
@@ -51,7 +51,7 @@
51
51
  "zod": "^4.4.3"
52
52
  },
53
53
  "devDependencies": {
54
- "@transloadit/types": "^4.4.1",
54
+ "@transloadit/types": "^4.5.0",
55
55
  "@types/node": "^25.8.0"
56
56
  }
57
57
  }