@norskvideo/ctl-product-template-schema 0.1.66 → 0.1.68

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/index.d.ts CHANGED
@@ -45,7 +45,7 @@ export declare const ProductTemplateAdvancedSchema: z.ZodObject<{
45
45
  default: z.ZodOptional<z.ZodString>;
46
46
  }, z.core.$strip>>;
47
47
  }, z.core.$strip>;
48
- export declare const LISTENER_KINDS: readonly ["http", "webrtc", "moq", "srt", "rist", "udp-ts", "rtmp", "tcp", "udp"];
48
+ export declare const LISTENER_KINDS: readonly ["http", "webrtc", "moq", "srt", "rist", "udp-ts", "rtmp", "tcp", "udp", "grpc"];
49
49
  export declare const ProductTemplateListenerSchema: z.ZodObject<{
50
50
  kind: z.ZodEnum<{
51
51
  tcp: "tcp";
@@ -57,6 +57,7 @@ export declare const ProductTemplateListenerSchema: z.ZodObject<{
57
57
  rist: "rist";
58
58
  "udp-ts": "udp-ts";
59
59
  rtmp: "rtmp";
60
+ grpc: "grpc";
60
61
  }>;
61
62
  id: z.ZodOptional<z.ZodString>;
62
63
  }, z.core.$strip>;
@@ -81,6 +82,7 @@ export declare const ProductTemplateAllocatedPortSchema: z.ZodObject<{
81
82
  rist: "rist";
82
83
  "udp-ts": "udp-ts";
83
84
  rtmp: "rtmp";
85
+ grpc: "grpc";
84
86
  }>;
85
87
  id: z.ZodOptional<z.ZodString>;
86
88
  }, z.core.$strip>>;
@@ -383,6 +385,7 @@ export declare const ProductTemplateManifestSchema: z.ZodObject<{
383
385
  rist: "rist";
384
386
  "udp-ts": "udp-ts";
385
387
  rtmp: "rtmp";
388
+ grpc: "grpc";
386
389
  }>;
387
390
  id: z.ZodOptional<z.ZodString>;
388
391
  }, z.core.$strip>>;
@@ -673,6 +676,7 @@ export declare const ProductTemplateMaterialsSchema: z.ZodObject<{
673
676
  rist: "rist";
674
677
  "udp-ts": "udp-ts";
675
678
  rtmp: "rtmp";
679
+ grpc: "grpc";
676
680
  }>;
677
681
  id: z.ZodOptional<z.ZodString>;
678
682
  }, z.core.$strip>>;
package/index.js CHANGED
@@ -268,7 +268,7 @@ export const ProductTemplateAdvancedSchema = z
268
268
  // parameter linkage).
269
269
  // The listener kinds of the addressing document (norsk-contracts, src/addressing/schema.ts
270
270
  // ListenerKind). Kept in step by a test in the backend, which has the contract's copy.
271
- export const LISTENER_KINDS = ["http", "webrtc", "moq", "srt", "rist", "udp-ts", "rtmp", "tcp", "udp"];
271
+ export const LISTENER_KINDS = ["http", "webrtc", "moq", "srt", "rist", "udp-ts", "rtmp", "tcp", "udp", "grpc"];
272
272
  export const ProductTemplateListenerSchema = z
273
273
  .object({
274
274
  kind: z.enum(LISTENER_KINDS),
package/interfaces.d.ts CHANGED
@@ -42,6 +42,11 @@ export declare const MediaConversionSchema: z.ZodObject<{
42
42
  description: z.ZodOptional<z.ZodString>;
43
43
  target: z.ZodRecord<z.ZodString, z.ZodUnknown>;
44
44
  }, z.core.$strip>>>;
45
+ control: z.ZodOptional<z.ZodObject<{
46
+ route: z.ZodString;
47
+ protocol: z.ZodString;
48
+ version: z.ZodNumber;
49
+ }, z.core.$strip>>;
45
50
  bindings: z.ZodObject<{
46
51
  sourceUrl: z.ZodString;
47
52
  returnName: z.ZodString;
@@ -54,7 +59,7 @@ export type MediaConversion = z.infer<typeof MediaConversionSchema>;
54
59
  /** Everything wrong with a template's interface declarations, given the
55
60
  * parameters it declares. Only known interfaces are checked. Empty = fine. */
56
61
  export declare function interfaceDeclarationProblems(template: {
57
- manifest: Pick<ProductTemplateManifest, "interfaces">;
62
+ manifest: Pick<ProductTemplateManifest, "interfaces"> & Partial<Pick<ProductTemplateManifest, "proxy">>;
58
63
  parameters: Pick<ProductTemplateParameter, "name">[];
59
64
  }): string[];
60
65
  /** The template's norsk.io/media-conversion declaration, typed, if it
package/interfaces.js CHANGED
@@ -69,6 +69,13 @@ export const MediaConversionSchema = z.object({
69
69
  target: z.record(z.string(), z.unknown()),
70
70
  }))
71
71
  .optional(),
72
+ // The converter's own control API (live adjustments, preview, stills,
73
+ // levels), when it serves one: the declared route it is on and the protocol
74
+ // it speaks there. Whoever launched it calls it through the node's proxy
75
+ // with the production's launch credential. Optional, so additive in v2.
76
+ control: z
77
+ .object({ route: z.string().min(1), protocol: z.string().min(1), version: z.number().int().min(1) })
78
+ .optional(),
72
79
  // The template's own parameters the client fills, by role.
73
80
  bindings: z.object({
74
81
  sourceUrl: parameterName,
@@ -105,6 +112,10 @@ export function interfaceDeclarationProblems(template) {
105
112
  problems.push(`${at}: binding ${role} names ${param}, which is not a declared parameter`);
106
113
  }
107
114
  }
115
+ const control = parsed.data.control;
116
+ if (control && !(template.manifest.proxy?.routes ?? []).some((r) => r.segment === control.route)) {
117
+ problems.push(`${at}: control names route ${control.route}, which the template does not declare (proxy.routes)`);
118
+ }
108
119
  });
109
120
  return problems;
110
121
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@norskvideo/ctl-product-template-schema",
3
- "version": "0.1.66",
3
+ "version": "0.1.68",
4
4
  "type": "module",
5
5
  "repository": {
6
6
  "type": "git",