@shotstack/schemas 1.10.10 → 1.11.0-html5.1

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.
@@ -411,6 +411,23 @@ export const fontFontSchema = z.object({
411
411
  src: z.string()
412
412
  }).strict();
413
413
  export const fontSchema = fontFontSchema;
414
+ /**
415
+ * The Html5Asset renders full HTML5/CSS3/JS.
416
+ *
417
+ */
418
+ export const html5AssetHtml5AssetSchema = z.object({
419
+ type: z.enum(['html5']),
420
+ html: z.string(),
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))
429
+ }).strict();
430
+ export const html5AssetSchema = html5AssetHtml5AssetSchema;
414
431
  /**
415
432
  * **Notice: The HtmlAsset is deprecated, use the [TextAsset](#tocs_textasset) instead.**
416
433
  *
@@ -2356,6 +2373,7 @@ export const assetAssetSchema = z.discriminatedUnion("type", [
2356
2373
  captionassetCaptionAssetSchema,
2357
2374
  richcaptionassetRichCaptionAssetSchema,
2358
2375
  htmlassetHtmlAssetSchema,
2376
+ html5AssetHtml5AssetSchema,
2359
2377
  titleassetTitleAssetSchema,
2360
2378
  shapeassetShapeAssetSchema,
2361
2379
  svgassetSvgAssetSchema,
@@ -367,6 +367,25 @@ export const fontFontSchema = z.object({
367
367
 
368
368
  export const fontSchema = fontFontSchema;
369
369
 
370
+ /**
371
+ * The Html5Asset renders full HTML5/CSS3/JS.
372
+ *
373
+ */
374
+ export const html5AssetHtml5AssetSchema = z.object({
375
+ type: z.enum(['html5']),
376
+ html: z.string(),
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))
385
+ }).strict();
386
+
387
+ export const html5AssetSchema = html5AssetHtml5AssetSchema;
388
+
370
389
  /**
371
390
  * **Notice: The HtmlAsset is deprecated, use the [TextAsset](#tocs_textasset) instead.**
372
391
  *
@@ -1908,6 +1927,7 @@ export const assetAssetSchema = z.discriminatedUnion("type", [
1908
1927
  captionassetCaptionAssetSchema,
1909
1928
  richcaptionassetRichCaptionAssetSchema,
1910
1929
  htmlassetHtmlAssetSchema,
1930
+ html5AssetHtml5AssetSchema,
1911
1931
  titleassetTitleAssetSchema,
1912
1932
  shapeassetShapeAssetSchema,
1913
1933
  svgassetSvgAssetSchema,
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@shotstack/schemas",
3
- "version": "1.10.10",
3
+ "version": "1.11.0-html5.1",
4
4
  "description": "Centralized OpenAPI schemas and TypeScript types for Shotstack API",
5
5
  "type": "module",
6
6
  "main": "dist/index.js",
@@ -24,26 +24,6 @@
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
- },
47
27
  "repository": {
48
28
  "type": "git",
49
29
  "url": "https://github.com/shotstack/oas-api-definition.git"
@@ -91,5 +71,24 @@
91
71
  },
92
72
  "engines": {
93
73
  "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"
94
93
  }
95
- }
94
+ }