@cesdk/engine 1.56.0-nightly.20250708 → 1.56.0-nightly.20250710

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
@@ -304,6 +304,15 @@ export declare class AssetAPI {
304
304
  * @returns Promise resolving to paginated search results.
305
305
  */
306
306
  findAssets(sourceId: string, query: AssetQueryData): Promise<AssetsQueryResult<CompleteAssetResult>>;
307
+ /**
308
+ * Fetch a specific asset by ID from an asset source.
309
+ *
310
+ * @category Asset Discovery
311
+ * @param sourceId - The ID of the asset source to search in.
312
+ * @param assetId - The ID of the asset to fetch.
313
+ * @returns Promise resolving to the complete asset result, or undefined if not found.
314
+ */
315
+ fetchAsset(sourceId: string, assetId: string): Promise<CompleteAssetResult | null>;
307
316
  /**
308
317
  * Get available asset groups from a source.
309
318
  *
@@ -871,6 +880,8 @@ export declare interface AssetSource {
871
880
  id: string;
872
881
  /** Find all asset for the given type and the provided query data. */
873
882
  findAssets(queryData: AssetQueryData): Promise<AssetsQueryResult | undefined>;
883
+ /** Fetch an asset by id. */
884
+ fetchAsset?: (id: string) => Promise<AssetResult | null>;
874
885
  /** Return every available group */
875
886
  getGroups?: () => Promise<string[]>;
876
887
  /** Credits for the source/api */
@@ -5250,7 +5261,7 @@ declare class CreativeEngine {
5250
5261
  * - `'ly.img.filter.duotone'` - Color effects of various kinds
5251
5262
  *
5252
5263
  * These assets are parsed from the IMG.LY CDN at `\{\{base_url\}\}/<id>/content.json`, where
5253
- * `base_url` defaults to 'https://cdn.img.ly/assets/v3'.
5264
+ * `base_url` defaults to 'https://cdn.img.ly/assets/v4'.
5254
5265
  * Each source is created via `addLocalSource` and populated with the parsed assets. To modify the available
5255
5266
  * assets, you may either exclude certain IDs via `excludeAssetSourceIds` or alter the sources after creation.
5256
5267
  *
@@ -5259,7 +5270,7 @@ declare class CreativeEngine {
5259
5270
  * @returns A promise that resolves when all asset sources are loaded.
5260
5271
  */
5261
5272
  addDefaultAssetSources({ baseURL, excludeAssetSourceIds }?: {
5262
- /** The source of the asset definitions, must be absolute. Defaults to `'https://cdn.img.ly/assets/v3'`. */
5273
+ /** The source of the asset definitions, must be absolute. Defaults to `'https://cdn.img.ly/assets/v4'`. */
5263
5274
  baseURL?: string;
5264
5275
  /** A list of IDs, that will be ignored during load. */
5265
5276
  excludeAssetSourceIds?: DefaultAssetSourceId[];