@knkcs/mediahub-ui 0.5.0 → 0.5.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.
package/dist/index.js CHANGED
@@ -223,7 +223,7 @@ function Os(e) {
223
223
  collectionIds: a.collectionIds ?? []
224
224
  }), i = s.pagination;
225
225
  return {
226
- items: s.assets.map(we),
226
+ items: (s.assets ?? []).map(we),
227
227
  total: (i == null ? void 0 : i.total) ?? s.assets.length,
228
228
  page: (i == null ? void 0 : i.page) ?? 1,
229
229
  pageSize: (i == null ? void 0 : i.pageSize) ?? s.assets.length,
@@ -287,14 +287,14 @@ function Os(e) {
287
287
  return we((await e.enhanceAssetMetadata({ assetId: t })).asset);
288
288
  },
289
289
  async listProcessRuns(t) {
290
- return (await e.listAIProcessRuns({ assetId: t })).runs.map(Us);
290
+ return ((await e.listAIProcessRuns({ assetId: t })).runs ?? []).map(Us);
291
291
  }
292
292
  };
293
293
  }
294
294
  function Ks(e) {
295
295
  return {
296
296
  async list(t, a) {
297
- return (await e.listFolders({ workspaceId: t, parentId: a })).folders.map(Ue);
297
+ return ((await e.listFolders({ workspaceId: t, parentId: a })).folders ?? []).map(Ue);
298
298
  },
299
299
  async get(t) {
300
300
  return Ue((await e.getFolder({ id: t })).folder);
@@ -332,7 +332,7 @@ function Ks(e) {
332
332
  function Vs(e) {
333
333
  return {
334
334
  async list(t) {
335
- return (await e.listCollections({ workspaceId: t })).collections.map(Oe);
335
+ return ((await e.listCollections({ workspaceId: t })).collections ?? []).map(Oe);
336
336
  },
337
337
  async get(t) {
338
338
  return Oe((await e.getCollection({ id: t })).collection);
@@ -401,7 +401,7 @@ function Vs(e) {
401
401
  function Ws(e) {
402
402
  return {
403
403
  async list(t) {
404
- return (await e.listTags({ workspaceId: t })).tags.map(St);
404
+ return ((await e.listTags({ workspaceId: t })).tags ?? []).map(St);
405
405
  },
406
406
  async create(t) {
407
407
  return St(
@@ -429,7 +429,7 @@ function Ws(e) {
429
429
  function _s(e) {
430
430
  return {
431
431
  async list(t) {
432
- return (await e.listAssetTypes({ workspaceId: t })).assetTypes.map(Je);
432
+ return ((await e.listAssetTypes({ workspaceId: t })).assetTypes ?? []).map(Je);
433
433
  },
434
434
  async get(t) {
435
435
  return Je((await e.getAssetType({ id: t })).assetType);
@@ -568,14 +568,14 @@ function Zs(e) {
568
568
  return {
569
569
  totalAssets: Number(a.totalAssets),
570
570
  totalStorageBytes: Number(a.totalStorageBytes),
571
- statusCounts: a.statusCounts.map((s) => ({
571
+ statusCounts: (a.statusCounts ?? []).map((s) => ({
572
572
  statusSlug: s.statusSlug,
573
573
  name: s.name,
574
574
  color: s.color,
575
575
  behavior: s.behavior,
576
576
  count: Number(s.count)
577
577
  })),
578
- recentUploads: a.recentUploads.map((s) => ({
578
+ recentUploads: (a.recentUploads ?? []).map((s) => ({
579
579
  id: s.id,
580
580
  name: s.name,
581
581
  assetTypeName: s.assetTypeName,