@contentchef/contentchef-types 11.2.0-alpha.1 → 11.2.0-alpha.2

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.
@@ -396,18 +396,25 @@ export type ListMediaRequest = {
396
396
  */
397
397
  export type ListMediaResponse = PagedMediaResponse<Media>;
398
398
  /**
399
- * This type represent the data needed to make a get media API request
399
+ * This type represent the data needed to make a get media API request: the media by its id, or by its full
400
+ * public id, looked up in the space
400
401
  */
401
402
  export type GetMediaRequest = {
402
403
  /**
403
- * The media gallery unique id
404
+ * The media gallery unique id, only needed for a `mediaPublicId` relative to the gallery root
404
405
  */
405
- mediaGalleryId: MediaGalleryId;
406
+ mediaGalleryId?: MediaGalleryId;
407
+ } & ({
406
408
  /**
407
409
  * The media entity unique id
408
410
  */
409
411
  mediaId: MediaId;
410
- };
412
+ } | {
413
+ /**
414
+ * The media full public id, as [[Media.mediaPublicId]] holds it
415
+ */
416
+ mediaPublicId: MediaPublicId;
417
+ });
411
418
  /**
412
419
  * This type represent the response of a get media API request
413
420
  */
@@ -421,18 +421,28 @@ export type ListMediaRequest = {
421
421
  export type ListMediaResponse = PagedMediaResponse<Media>;
422
422
 
423
423
  /**
424
- * This type represent the data needed to make a get media API request
424
+ * This type represent the data needed to make a get media API request: the media by its id, or by its full
425
+ * public id, looked up in the space
425
426
  */
426
427
  export type GetMediaRequest = {
427
428
  /**
428
- * The media gallery unique id
429
- */
430
- mediaGalleryId: MediaGalleryId;
431
- /**
432
- * The media entity unique id
433
- */
434
- mediaId: MediaId;
435
- };
429
+ * The media gallery unique id, only needed for a `mediaPublicId` relative to the gallery root
430
+ */
431
+ mediaGalleryId?: MediaGalleryId;
432
+ } & (
433
+ | {
434
+ /**
435
+ * The media entity unique id
436
+ */
437
+ mediaId: MediaId;
438
+ }
439
+ | {
440
+ /**
441
+ * The media full public id, as [[Media.mediaPublicId]] holds it
442
+ */
443
+ mediaPublicId: MediaPublicId;
444
+ }
445
+ );
436
446
 
437
447
  /**
438
448
  * This type represent the response of a get media API request
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@contentchef/contentchef-types",
3
- "version": "11.2.0-alpha.1",
3
+ "version": "11.2.0-alpha.2",
4
4
  "description": "ContentChef types",
5
5
  "author": "PierpaoloIannone <piannone@byte-code.com>",
6
6
  "homepage": "https://github.com/ContentChef/contentchef-management-js-client#readme",
@@ -34,5 +34,5 @@
34
34
  "devDependencies": {
35
35
  "typescript": "^5.9.3"
36
36
  },
37
- "gitHead": "411c20107357815791bd9bfaa1af348f40e88aa5"
37
+ "gitHead": "d5eafaf4b1b7a4d7add4d6c1153e3391e713c712"
38
38
  }