@shotstack/schemas 1.4.6 → 1.4.8

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.
@@ -1381,8 +1381,6 @@
1381
1381
  "text": {
1382
1382
  "description": "The text string to display.",
1383
1383
  "type": "string",
1384
- "minLength": 1,
1385
- "pattern": "\\S",
1386
1384
  "example": "Hello World"
1387
1385
  },
1388
1386
  "width": {
@@ -1476,9 +1474,7 @@
1476
1474
  "text": {
1477
1475
  "description": "The text string to display. Maximum 5000 characters.",
1478
1476
  "type": "string",
1479
- "minLength": 1,
1480
1477
  "maxLength": 5000,
1481
- "pattern": "\\S",
1482
1478
  "example": "Hello World"
1483
1479
  },
1484
1480
  "font": {
@@ -1970,8 +1966,6 @@
1970
1966
  "html": {
1971
1967
  "description": "The HTML text string. See list of [supported HTML tags](https://shotstack.io/docs/guide/architecting-an-application/html-support/#supported-html-tags).",
1972
1968
  "type": "string",
1973
- "minLength": 1,
1974
- "pattern": "\\S",
1975
1969
  "example": "<p>Hello <b>World</b></p>"
1976
1970
  },
1977
1971
  "css": {
@@ -894,7 +894,7 @@ exports.fontSchema = exports.fontFontSchema;
894
894
  */
895
895
  exports.htmlassetHtmlAssetSchema = zod_1.z.object({
896
896
  type: zod_1.z.enum(["html"]),
897
- html: zod_1.z.string().min(1).regex(/\S/),
897
+ html: zod_1.z.string(),
898
898
  css: zod_1.z.optional(zod_1.z.string()),
899
899
  width: zod_1.z.optional(zod_1.z.preprocess(((v) => { if (v === '' || v === null || v === undefined)
900
900
  return undefined; if (Array.isArray(v))
@@ -1395,7 +1395,7 @@ exports.richTextStyleSchema = exports.richtextpropertiesRichTextStyleSchema;
1395
1395
  */
1396
1396
  exports.richtextassetRichTextAssetSchema = zod_1.z.object({
1397
1397
  type: zod_1.z.enum(["rich-text"]),
1398
- text: zod_1.z.string().min(1).max(5000).regex(/\S/),
1398
+ text: zod_1.z.string().max(5000),
1399
1399
  font: zod_1.z.optional(exports.richtextpropertiesRichTextFontSchema),
1400
1400
  style: zod_1.z.optional(exports.richtextpropertiesRichTextStyleSchema),
1401
1401
  shadow: zod_1.z.optional(exports.richtextpropertiesRichTextShadowSchema),
@@ -2274,7 +2274,7 @@ exports.textpropertiesTextStrokeSchema = zod_1.z.object({
2274
2274
  */
2275
2275
  exports.textassetTextAssetSchema = zod_1.z.object({
2276
2276
  type: zod_1.z.enum(["text"]),
2277
- text: zod_1.z.string().min(1).regex(/\S/),
2277
+ text: zod_1.z.string(),
2278
2278
  width: zod_1.z.optional(zod_1.z.preprocess(((v) => { if (v === '' || v === null || v === undefined)
2279
2279
  return undefined; if (Array.isArray(v))
2280
2280
  return v; if (typeof v === 'string')
@@ -2707,15 +2707,13 @@ exports.clipClipSchema = zod_1.z.object({
2707
2707
  asset: exports.assetAssetSchema,
2708
2708
  start: zod_1.z.union([
2709
2709
  zod_1.z.preprocess(((v) => { if (v === '' || v === null || v === undefined)
2710
- return undefined; if (Array.isArray(v))
2711
- return v; if (typeof v === 'string')
2710
+ return undefined; if (typeof v === 'string' && /^-?\d+(\.\d+)?$/.test(v))
2712
2711
  return Number(v); return v; }), zod_1.z.number().gte(0)),
2713
2712
  zod_1.z.string().regex(/^(auto|alias:\/\/[A-Za-z0-9_-]+)$/),
2714
2713
  ]),
2715
2714
  length: zod_1.z.union([
2716
2715
  zod_1.z.preprocess(((v) => { if (v === '' || v === null || v === undefined)
2717
- return undefined; if (Array.isArray(v))
2718
- return v; if (typeof v === 'string')
2716
+ return undefined; if (typeof v === 'string' && /^-?\d+(\.\d+)?$/.test(v))
2719
2717
  return Number(v); return v; }), zod_1.z.number().gte(0)),
2720
2718
  zod_1.z.string().regex(/^(auto|end|alias:\/\/[A-Za-z0-9_-]+)$/),
2721
2719
  ]),
@@ -884,7 +884,7 @@ export const fontSchema = fontFontSchema;
884
884
  */
885
885
  export const htmlassetHtmlAssetSchema = z.object({
886
886
  type: z.enum(["html"]),
887
- html: z.string().min(1).regex(/\S/),
887
+ html: z.string(),
888
888
  css: z.optional(z.string()),
889
889
  width: z.optional(z.preprocess(((v) => { if (v === '' || v === null || v === undefined)
890
890
  return undefined; if (Array.isArray(v))
@@ -1385,7 +1385,7 @@ export const richTextStyleSchema = richtextpropertiesRichTextStyleSchema;
1385
1385
  */
1386
1386
  export const richtextassetRichTextAssetSchema = z.object({
1387
1387
  type: z.enum(["rich-text"]),
1388
- text: z.string().min(1).max(5000).regex(/\S/),
1388
+ text: z.string().max(5000),
1389
1389
  font: z.optional(richtextpropertiesRichTextFontSchema),
1390
1390
  style: z.optional(richtextpropertiesRichTextStyleSchema),
1391
1391
  shadow: z.optional(richtextpropertiesRichTextShadowSchema),
@@ -2264,7 +2264,7 @@ export const textpropertiesTextStrokeSchema = z.object({
2264
2264
  */
2265
2265
  export const textassetTextAssetSchema = z.object({
2266
2266
  type: z.enum(["text"]),
2267
- text: z.string().min(1).regex(/\S/),
2267
+ text: z.string(),
2268
2268
  width: z.optional(z.preprocess(((v) => { if (v === '' || v === null || v === undefined)
2269
2269
  return undefined; if (Array.isArray(v))
2270
2270
  return v; if (typeof v === 'string')
@@ -2697,15 +2697,13 @@ export const clipClipSchema = z.object({
2697
2697
  asset: assetAssetSchema,
2698
2698
  start: z.union([
2699
2699
  z.preprocess(((v) => { if (v === '' || v === null || v === undefined)
2700
- return undefined; if (Array.isArray(v))
2701
- return v; if (typeof v === 'string')
2700
+ return undefined; if (typeof v === 'string' && /^-?\d+(\.\d+)?$/.test(v))
2702
2701
  return Number(v); return v; }), z.number().gte(0)),
2703
2702
  z.string().regex(/^(auto|alias:\/\/[A-Za-z0-9_-]+)$/),
2704
2703
  ]),
2705
2704
  length: z.union([
2706
2705
  z.preprocess(((v) => { if (v === '' || v === null || v === undefined)
2707
- return undefined; if (Array.isArray(v))
2708
- return v; if (typeof v === 'string')
2706
+ return undefined; if (typeof v === 'string' && /^-?\d+(\.\d+)?$/.test(v))
2709
2707
  return Number(v); return v; }), z.number().gte(0)),
2710
2708
  z.string().regex(/^(auto|end|alias:\/\/[A-Za-z0-9_-]+)$/),
2711
2709
  ]),
@@ -1004,7 +1004,7 @@ export const fontSchema = fontFontSchema;
1004
1004
  */
1005
1005
  export const htmlassetHtmlAssetSchema = z.object({
1006
1006
  type: z.enum(["html"]),
1007
- html: z.string().min(1).regex(/\S/),
1007
+ html: z.string(),
1008
1008
  css: z.optional(z.string()),
1009
1009
  width: z.optional(z.preprocess(((v: unknown) => { if (v === '' || v === null || v === undefined) return undefined; if (Array.isArray(v)) return v; if (typeof v === 'string') return Number(v); return v; }), z.number().int())),
1010
1010
  height: z.optional(z.preprocess(((v: unknown) => { if (v === '' || v === null || v === undefined) return undefined; if (Array.isArray(v)) return v; if (typeof v === 'string') return Number(v); return v; }), z.number().int())),
@@ -1522,7 +1522,7 @@ export const richTextStyleSchema = richtextpropertiesRichTextStyleSchema;
1522
1522
  */
1523
1523
  export const richtextassetRichTextAssetSchema = z.object({
1524
1524
  type: z.enum(["rich-text"]),
1525
- text: z.string().min(1).max(5000).regex(/\S/),
1525
+ text: z.string().max(5000),
1526
1526
  font: z.optional(richtextpropertiesRichTextFontSchema),
1527
1527
  style: z.optional(richtextpropertiesRichTextStyleSchema),
1528
1528
  shadow: z.optional(richtextpropertiesRichTextShadowSchema),
@@ -2278,7 +2278,7 @@ export const textpropertiesTextStrokeSchema = z.object({
2278
2278
  */
2279
2279
  export const textassetTextAssetSchema = z.object({
2280
2280
  type: z.enum(["text"]),
2281
- text: z.string().min(1).regex(/\S/),
2281
+ text: z.string(),
2282
2282
  width: z.optional(z.preprocess(((v: unknown) => { if (v === '' || v === null || v === undefined) return undefined; if (Array.isArray(v)) return v; if (typeof v === 'string') return Number(v); return v; }), z.number().int())),
2283
2283
  height: z.optional(z.preprocess(((v: unknown) => { if (v === '' || v === null || v === undefined) return undefined; if (Array.isArray(v)) return v; if (typeof v === 'string') return Number(v); return v; }), z.number().int())),
2284
2284
  font: z.optional(textpropertiesTextFontSchema),
@@ -2715,11 +2715,11 @@ export const assetSchema = assetAssetSchema;
2715
2715
  export const clipClipSchema = z.object({
2716
2716
  asset: assetAssetSchema,
2717
2717
  start: z.union([
2718
- z.preprocess(((v: unknown) => { if (v === '' || v === null || v === undefined) return undefined; if (Array.isArray(v)) return v; if (typeof v === 'string') return Number(v); return v; }), z.number().gte(0)),
2718
+ z.preprocess(((v: unknown) => { if (v === '' || v === null || v === undefined) return undefined; if (typeof v === 'string' && /^-?\d+(\.\d+)?$/.test(v)) return Number(v); return v; }), z.number().gte(0)),
2719
2719
  z.string().regex(/^(auto|alias:\/\/[A-Za-z0-9_-]+)$/),
2720
2720
  ]),
2721
2721
  length: z.union([
2722
- z.preprocess(((v: unknown) => { if (v === '' || v === null || v === undefined) return undefined; if (Array.isArray(v)) return v; if (typeof v === 'string') return Number(v); return v; }), z.number().gte(0)),
2722
+ z.preprocess(((v: unknown) => { if (v === '' || v === null || v === undefined) return undefined; if (typeof v === 'string' && /^-?\d+(\.\d+)?$/.test(v)) return Number(v); return v; }), z.number().gte(0)),
2723
2723
  z.string().regex(/^(auto|end|alias:\/\/[A-Za-z0-9_-]+)$/),
2724
2724
  ]),
2725
2725
  fit: z.optional(z.enum(["cover", "contain", "crop", "none"])),
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@shotstack/schemas",
3
- "version": "1.4.6",
3
+ "version": "1.4.8",
4
4
  "description": "Centralized OpenAPI schemas and TypeScript types for Shotstack API",
5
5
  "type": "module",
6
6
  "main": "dist/index.js",