@shotstack/shotstack-studio 2.17.0 → 2.18.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.
package/dist/index.d.ts CHANGED
@@ -1,4 +1,5 @@
1
1
  import { components } from '@shotstack/schemas';
2
+ import { operations } from '@shotstack/schemas';
2
3
 
3
4
  /** Passed to the host handler for one generation. */
4
5
  export declare interface AssetGenerationRequest {
@@ -18,6 +19,11 @@ export declare type AssetGeneratorHandler = (request: AssetGenerationRequest) =>
18
19
  url: string;
19
20
  }>;
20
21
 
22
+ export declare interface AssetGeneratorOptions {
23
+ /** Model catalogue with each entry's option schema included. Entries without one are ignored. */
24
+ catalogue?: GenerationModelCatalogueResponse;
25
+ }
26
+
21
27
  /**
22
28
  * Payload passed to button click handlers.
23
29
  */
@@ -231,7 +237,7 @@ export declare class Edit {
231
237
  * URL back to the clip; the host owns how generation happens and what a failure
232
238
  * message says. Without a handler, no generate affordance is shown.
233
239
  */
234
- registerAssetGenerator(handler: AssetGeneratorHandler): void;
240
+ registerAssetGenerator(handler: AssetGeneratorHandler, options?: AssetGeneratorOptions): void;
235
241
  private applyGeneratedSrc;
236
242
  /**
237
243
  * Look up the (trackIndex, clipIndex) position of a clip by its stable ID.
@@ -601,6 +607,8 @@ declare type EditEventMap = {
601
607
 
602
608
  declare type EventPayloadMap<TPayload = any> = Record<string, TPayload>;
603
609
 
610
+ declare type GenerationModelCatalogueResponse = operations["getModels"]["responses"][200]["content"]["application/json"];
611
+
604
612
  declare type Listener<TPayload = any> = (payload: TPayload) => void;
605
613
 
606
614
  /**
@@ -1,4 +1,5 @@
1
1
  import { components } from '@shotstack/schemas';
2
+ import { operations } from '@shotstack/schemas';
2
3
 
3
4
  /** Passed to the host handler for one generation. */
4
5
  declare interface AssetGenerationRequest {
@@ -18,6 +19,11 @@ declare type AssetGeneratorHandler = (request: AssetGenerationRequest) => Promis
18
19
  url: string;
19
20
  }>;
20
21
 
22
+ declare interface AssetGeneratorOptions {
23
+ /** Model catalogue with each entry's option schema included. Entries without one are ignored. */
24
+ catalogue?: GenerationModelCatalogueResponse;
25
+ }
26
+
21
27
  declare type Clip = components["schemas"]["Clip"];
22
28
 
23
29
  declare type ClipLocation = {
@@ -120,7 +126,7 @@ export declare class Edit {
120
126
  * URL back to the clip; the host owns how generation happens and what a failure
121
127
  * message says. Without a handler, no generate affordance is shown.
122
128
  */
123
- registerAssetGenerator(handler: AssetGeneratorHandler): void;
129
+ registerAssetGenerator(handler: AssetGeneratorHandler, options?: AssetGeneratorOptions): void;
124
130
  private applyGeneratedSrc;
125
131
  /**
126
132
  * Look up the (trackIndex, clipIndex) position of a clip by its stable ID.
@@ -495,6 +501,8 @@ declare class EventEmitter<TEventPayloadMap extends EventPayloadMap = EventPaylo
495
501
 
496
502
  declare type EventPayloadMap<TPayload = any> = Record<string, TPayload>;
497
503
 
504
+ declare type GenerationModelCatalogueResponse = operations["getModels"]["responses"][200]["content"]["application/json"];
505
+
498
506
  /**
499
507
  * Thrown by mutation methods (addClip, addTrack, addFont, setFonts) when a
500
508
  * referenced asset/font URL fails preflight.