@shotstack/schemas 1.11.0-html5.1 → 1.12.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.
@@ -419,13 +419,7 @@ export const html5AssetHtml5AssetSchema = z.object({
419
419
  type: z.enum(['html5']),
420
420
  html: z.string(),
421
421
  css: z.optional(z.string()),
422
- js: z.optional(z.string()),
423
- libraries: z.optional(z.array(z.enum([
424
- 'gsap',
425
- 'd3',
426
- 'anime',
427
- 'lottie'
428
- ])).max(4))
422
+ js: z.optional(z.string())
429
423
  }).strict();
430
424
  export const html5AssetSchema = html5AssetHtml5AssetSchema;
431
425
  /**
@@ -2386,6 +2380,7 @@ export const assetSchema = assetAssetSchema;
2386
2380
  * A clip is a container for a specific type of asset, i.e. a title, image, video, audio or html. You use a Clip to define when an asset will display on the timeline, how long it will play for and transitions, filters and effects to apply to it.
2387
2381
  */
2388
2382
  export const clipClipSchema = z.object({
2383
+ id: z.optional(z.string()),
2389
2384
  asset: assetAssetSchema,
2390
2385
  start: z.union([
2391
2386
  z.union([z.preprocess(((v) => { if (v === '' || v === null || v === undefined)
@@ -375,13 +375,7 @@ export const html5AssetHtml5AssetSchema = z.object({
375
375
  type: z.enum(['html5']),
376
376
  html: z.string(),
377
377
  css: z.optional(z.string()),
378
- js: z.optional(z.string()),
379
- libraries: z.optional(z.array(z.enum([
380
- 'gsap',
381
- 'd3',
382
- 'anime',
383
- 'lottie'
384
- ])).max(4))
378
+ js: z.optional(z.string())
385
379
  }).strict();
386
380
 
387
381
  export const html5AssetSchema = html5AssetHtml5AssetSchema;
@@ -1942,6 +1936,7 @@ export const assetSchema = assetAssetSchema;
1942
1936
  * A clip is a container for a specific type of asset, i.e. a title, image, video, audio or html. You use a Clip to define when an asset will display on the timeline, how long it will play for and transitions, filters and effects to apply to it.
1943
1937
  */
1944
1938
  export const clipClipSchema = z.object({
1939
+ id: z.optional(z.string()),
1945
1940
  asset: assetAssetSchema,
1946
1941
  start: z.union([
1947
1942
  z.union([z.preprocess(((v: unknown) => { if (v === '' || v === null || v === undefined) return undefined; if (Array.isArray(v)) return v; if (typeof v === 'string') { if (/^\{\{\s*[A-Za-z0-9_]+\s*\}\}$/.test(v)) return v; return Number(v); } return v; }), z.number().gte(0)), z.string().regex(/^\{\{\s*[A-Za-z0-9_]+\s*\}\}$/)]),
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@shotstack/schemas",
3
- "version": "1.11.0-html5.1",
3
+ "version": "1.12.0",
4
4
  "description": "Centralized OpenAPI schemas and TypeScript types for Shotstack API",
5
5
  "type": "module",
6
6
  "main": "dist/index.js",
@@ -24,6 +24,26 @@
24
24
  "files": [
25
25
  "dist"
26
26
  ],
27
+ "scripts": {
28
+ "test": "tsc --noEmit --skipLibCheck",
29
+ "clean": "node -e \"fs=require('fs');if(fs.existsSync('dist'))fs.rmSync('dist',{recursive:true})\"",
30
+ "bundle": "swagger-cli bundle api.oas3.yaml -o dist/api.bundled.json -t json",
31
+ "generate:types": "openapi-typescript dist/api.bundled.json -o dist/schema.d.ts --default-non-nullable=false",
32
+ "generate:zod": "openapi-ts",
33
+ "compile:zod:cjs": "tsc --declaration false --module commonjs --moduleResolution node --target ES2022 --outDir dist/zod --skipLibCheck dist/zod/zod.gen.ts && node -e \"require('fs').renameSync('dist/zod/zod.gen.js','dist/zod/zod.gen.cjs')\"",
34
+ "compile:zod:esm": "tsc --declaration --module nodenext --moduleResolution nodenext --target ES2022 --outDir dist/zod --skipLibCheck dist/zod/zod.gen.ts",
35
+ "compile:zod": "pnpm compile:zod:cjs && pnpm compile:zod:esm",
36
+ "generate:json-schema": "node scripts/generate-json-schema.cjs",
37
+ "fix:discriminator": "node scripts/fix-discriminator.cjs",
38
+ "copy:index": "node -e \"require('fs').writeFileSync('dist/index.d.ts','export type * from \\\"./schema\\\";');require('fs').writeFileSync('dist/index.js','// Type-only package\\nexport {};');\"",
39
+ "build": "pnpm clean && node -e \"require('fs').mkdirSync('dist',{recursive:true})\" && pnpm bundle && pnpm generate:types && pnpm generate:zod && pnpm fix:discriminator && pnpm compile:zod && pnpm generate:json-schema && pnpm copy:index",
40
+ "build:docs": "cross-env ./build-docs.sh",
41
+ "build:sdks": "cross-env ./build-sdks.sh",
42
+ "start": "cross-env ./build-docs.sh && http-server build/docs/ -o -c-1",
43
+ "deploy:docs": "aws s3 sync build/docs/ s3://shotstack.io/docs/api",
44
+ "prepublishOnly": "node scripts/publish-guard.cjs && pnpm build && pnpm test",
45
+ "test:smoke": "node tests/smoke.cjs"
46
+ },
27
47
  "repository": {
28
48
  "type": "git",
29
49
  "url": "https://github.com/shotstack/oas-api-definition.git"
@@ -71,24 +91,5 @@
71
91
  },
72
92
  "engines": {
73
93
  "node": ">=20"
74
- },
75
- "scripts": {
76
- "test": "tsc --noEmit --skipLibCheck",
77
- "clean": "node -e \"fs=require('fs');if(fs.existsSync('dist'))fs.rmSync('dist',{recursive:true})\"",
78
- "bundle": "swagger-cli bundle api.oas3.yaml -o dist/api.bundled.json -t json",
79
- "generate:types": "openapi-typescript dist/api.bundled.json -o dist/schema.d.ts --default-non-nullable=false",
80
- "generate:zod": "openapi-ts",
81
- "compile:zod:cjs": "tsc --declaration false --module commonjs --moduleResolution node --target ES2022 --outDir dist/zod --skipLibCheck dist/zod/zod.gen.ts && node -e \"require('fs').renameSync('dist/zod/zod.gen.js','dist/zod/zod.gen.cjs')\"",
82
- "compile:zod:esm": "tsc --declaration --module nodenext --moduleResolution nodenext --target ES2022 --outDir dist/zod --skipLibCheck dist/zod/zod.gen.ts",
83
- "compile:zod": "pnpm compile:zod:cjs && pnpm compile:zod:esm",
84
- "generate:json-schema": "node scripts/generate-json-schema.cjs",
85
- "fix:discriminator": "node scripts/fix-discriminator.cjs",
86
- "copy:index": "node -e \"require('fs').writeFileSync('dist/index.d.ts','export type * from \\\"./schema\\\";');require('fs').writeFileSync('dist/index.js','// Type-only package\\nexport {};');\"",
87
- "build": "pnpm clean && node -e \"require('fs').mkdirSync('dist',{recursive:true})\" && pnpm bundle && pnpm generate:types && pnpm generate:zod && pnpm fix:discriminator && pnpm compile:zod && pnpm generate:json-schema && pnpm copy:index",
88
- "build:docs": "cross-env ./build-docs.sh",
89
- "build:sdks": "cross-env ./build-sdks.sh",
90
- "start": "cross-env ./build-docs.sh && http-server build/docs/ -o -c-1",
91
- "deploy:docs": "aws s3 sync build/docs/ s3://shotstack.io/docs/api",
92
- "test:smoke": "node tests/smoke.cjs"
93
94
  }
94
- }
95
+ }