@inneropen/marvin-sdk 3.0.1 → 3.1.0-next.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.
@@ -181,6 +181,18 @@ var init_entry = __esm({
181
181
  get resources() {
182
182
  return this.raw.resources;
183
183
  }
184
+ asset(role) {
185
+ return this.raw.assets.find((a) => a.role === role);
186
+ }
187
+ assetsByRole(role) {
188
+ return this.raw.assets.filter((a) => a.role === role);
189
+ }
190
+ resource(role) {
191
+ return this.raw.resources.find((r) => r.role === role);
192
+ }
193
+ resourcesByRole(role) {
194
+ return this.raw.resources.filter((r) => r.role === role);
195
+ }
184
196
  field(key) {
185
197
  return this.raw.data[key];
186
198
  }
@@ -2051,6 +2051,50 @@ interface components {
2051
2051
  * @enum {string}
2052
2052
  */
2053
2053
  PlatformRole: "NONE" | "SUPER_ADMIN";
2054
+ /**
2055
+ * PublishedEntryAsset
2056
+ * @description An asset as used by a specific entry — relationship context + asset data.
2057
+ */
2058
+ PublishedEntryAsset: {
2059
+ /** Role */
2060
+ role?: string | null;
2061
+ /**
2062
+ * Position
2063
+ * @default 0
2064
+ */
2065
+ position: number;
2066
+ /** Focalpoint */
2067
+ focalPoint?: string | null;
2068
+ /** Caption */
2069
+ caption?: string | null;
2070
+ /** Metadatajson */
2071
+ metadataJson?: {
2072
+ [key: string]: unknown;
2073
+ } | null;
2074
+ asset: components["schemas"]["PublishedAssetRead"];
2075
+ };
2076
+ /**
2077
+ * PublishedEntryResource
2078
+ * @description A resource as used by a specific entry — relationship context + resource data.
2079
+ */
2080
+ PublishedEntryResource: {
2081
+ /** Role */
2082
+ role?: string | null;
2083
+ /** Quantity */
2084
+ quantity?: string | null;
2085
+ /** Unit */
2086
+ unit?: string | null;
2087
+ /**
2088
+ * Position
2089
+ * @default 0
2090
+ */
2091
+ position: number;
2092
+ /** Metadatajson */
2093
+ metadataJson?: {
2094
+ [key: string]: unknown;
2095
+ } | null;
2096
+ resource: components["schemas"]["PublishedResourceSummary"];
2097
+ };
2054
2098
  /**
2055
2099
  * PublishedAssetRead
2056
2100
  * @description Schema for published assets in the publishing API.
@@ -2197,6 +2241,11 @@ interface components {
2197
2241
  * @default []
2198
2242
  */
2199
2243
  resourceSlugs: string[];
2244
+ /** Metadatajson */
2245
+ metadataJson?: {
2246
+ [key: string]: unknown;
2247
+ } | null;
2248
+ featuredAsset?: components["schemas"]["PublishedAssetRead"] | null;
2200
2249
  /** Order */
2201
2250
  order?: number | null;
2202
2251
  };
@@ -2239,12 +2288,12 @@ interface components {
2239
2288
  * Resources
2240
2289
  * @default []
2241
2290
  */
2242
- resources: components["schemas"]["PublishedResourceRead"][];
2291
+ resources: components["schemas"]["PublishedEntryResource"][];
2243
2292
  /**
2244
2293
  * Assets
2245
2294
  * @default []
2246
2295
  */
2247
- assets: components["schemas"]["PublishedAssetRead"][];
2296
+ assets: components["schemas"]["PublishedEntryAsset"][];
2248
2297
  /** Order */
2249
2298
  order?: number | null;
2250
2299
  };
@@ -2321,41 +2370,6 @@ interface components {
2321
2370
  [key: string]: unknown;
2322
2371
  } | null;
2323
2372
  };
2324
- /**
2325
- * PublishedResourceRead
2326
- * @description Schema for published resources in entry context.
2327
- *
2328
- * Combines resource metadata with entry-specific placement info.
2329
- */
2330
- PublishedResourceRead: {
2331
- /** Slug */
2332
- slug: string;
2333
- /** Name */
2334
- name: string;
2335
- /** Resourcetype */
2336
- resourceType: string;
2337
- /** Description */
2338
- description?: string | null;
2339
- /** Url */
2340
- url?: string | null;
2341
- /** Externalid */
2342
- externalId?: string | null;
2343
- /** Metadatajson */
2344
- metadataJson?: {
2345
- [key: string]: unknown;
2346
- } | null;
2347
- /** Role */
2348
- role?: string | null;
2349
- /** Quantity */
2350
- quantity?: string | null;
2351
- /** Unit */
2352
- unit?: string | null;
2353
- /**
2354
- * Position
2355
- * @default 0
2356
- */
2357
- position: number;
2358
- };
2359
2373
  /**
2360
2374
  * PublishedResourceSummary
2361
2375
  * @description Schema for published resources in standalone context.
@@ -3346,8 +3360,9 @@ type MarvinCollection = components['schemas']['PublishedCollectionRead'];
3346
3360
  type PublishedCollectionSummary = components['schemas']['PublishedCollectionSummary'];
3347
3361
  type MarvinAsset = components['schemas']['PublishedAssetRead'];
3348
3362
  type PublishedAssetRead = components['schemas']['PublishedAssetRead'];
3363
+ type PublishedEntryAsset = components['schemas']['PublishedEntryAsset'];
3349
3364
  type MarvinResource = components['schemas']['PublishedResourceSummary'];
3350
- type PublishedResourceRead = components['schemas']['PublishedResourceRead'];
3365
+ type PublishedEntryResource = components['schemas']['PublishedEntryResource'];
3351
3366
  type MarvinEntryType = components['schemas']['EntryTypeRead'];
3352
3367
  interface AssetUploadRequest {
3353
3368
  slug: string;
@@ -3391,4 +3406,4 @@ interface AuthToken {
3391
3406
  tokenType: string;
3392
3407
  }
3393
3408
 
3394
- export type { AuthToken as A, GetAssetsOptions as G, MarvinAsset as M, PublishedAssetRead as P, SiteConfiguration as S, WorkspaceInfo as W, GetEntriesOptions as a, GetResourcesOptions as b, MarvinCollection as c, MarvinEntry as d, MarvinEntryListItem as e, MarvinEntryType as f, MarvinPublishResponse as g, MarvinResource as h, MarvinSite as i, PublishedCollectionSummary as j, PublishedEntryType as k, PublishedResourceRead as l, components as m, AssetUploadRequest as n, MarvinClientConfig as o };
3409
+ export type { AuthToken as A, GetAssetsOptions as G, MarvinAsset as M, PublishedAssetRead as P, SiteConfiguration as S, WorkspaceInfo as W, GetEntriesOptions as a, GetResourcesOptions as b, MarvinCollection as c, MarvinEntry as d, MarvinEntryListItem as e, MarvinEntryType as f, MarvinPublishResponse as g, MarvinResource as h, MarvinSite as i, PublishedCollectionSummary as j, PublishedEntryAsset as k, PublishedEntryResource as l, PublishedEntryType as m, components as n, AssetUploadRequest as o, MarvinClientConfig as p };
@@ -2051,6 +2051,50 @@ interface components {
2051
2051
  * @enum {string}
2052
2052
  */
2053
2053
  PlatformRole: "NONE" | "SUPER_ADMIN";
2054
+ /**
2055
+ * PublishedEntryAsset
2056
+ * @description An asset as used by a specific entry — relationship context + asset data.
2057
+ */
2058
+ PublishedEntryAsset: {
2059
+ /** Role */
2060
+ role?: string | null;
2061
+ /**
2062
+ * Position
2063
+ * @default 0
2064
+ */
2065
+ position: number;
2066
+ /** Focalpoint */
2067
+ focalPoint?: string | null;
2068
+ /** Caption */
2069
+ caption?: string | null;
2070
+ /** Metadatajson */
2071
+ metadataJson?: {
2072
+ [key: string]: unknown;
2073
+ } | null;
2074
+ asset: components["schemas"]["PublishedAssetRead"];
2075
+ };
2076
+ /**
2077
+ * PublishedEntryResource
2078
+ * @description A resource as used by a specific entry — relationship context + resource data.
2079
+ */
2080
+ PublishedEntryResource: {
2081
+ /** Role */
2082
+ role?: string | null;
2083
+ /** Quantity */
2084
+ quantity?: string | null;
2085
+ /** Unit */
2086
+ unit?: string | null;
2087
+ /**
2088
+ * Position
2089
+ * @default 0
2090
+ */
2091
+ position: number;
2092
+ /** Metadatajson */
2093
+ metadataJson?: {
2094
+ [key: string]: unknown;
2095
+ } | null;
2096
+ resource: components["schemas"]["PublishedResourceSummary"];
2097
+ };
2054
2098
  /**
2055
2099
  * PublishedAssetRead
2056
2100
  * @description Schema for published assets in the publishing API.
@@ -2197,6 +2241,11 @@ interface components {
2197
2241
  * @default []
2198
2242
  */
2199
2243
  resourceSlugs: string[];
2244
+ /** Metadatajson */
2245
+ metadataJson?: {
2246
+ [key: string]: unknown;
2247
+ } | null;
2248
+ featuredAsset?: components["schemas"]["PublishedAssetRead"] | null;
2200
2249
  /** Order */
2201
2250
  order?: number | null;
2202
2251
  };
@@ -2239,12 +2288,12 @@ interface components {
2239
2288
  * Resources
2240
2289
  * @default []
2241
2290
  */
2242
- resources: components["schemas"]["PublishedResourceRead"][];
2291
+ resources: components["schemas"]["PublishedEntryResource"][];
2243
2292
  /**
2244
2293
  * Assets
2245
2294
  * @default []
2246
2295
  */
2247
- assets: components["schemas"]["PublishedAssetRead"][];
2296
+ assets: components["schemas"]["PublishedEntryAsset"][];
2248
2297
  /** Order */
2249
2298
  order?: number | null;
2250
2299
  };
@@ -2321,41 +2370,6 @@ interface components {
2321
2370
  [key: string]: unknown;
2322
2371
  } | null;
2323
2372
  };
2324
- /**
2325
- * PublishedResourceRead
2326
- * @description Schema for published resources in entry context.
2327
- *
2328
- * Combines resource metadata with entry-specific placement info.
2329
- */
2330
- PublishedResourceRead: {
2331
- /** Slug */
2332
- slug: string;
2333
- /** Name */
2334
- name: string;
2335
- /** Resourcetype */
2336
- resourceType: string;
2337
- /** Description */
2338
- description?: string | null;
2339
- /** Url */
2340
- url?: string | null;
2341
- /** Externalid */
2342
- externalId?: string | null;
2343
- /** Metadatajson */
2344
- metadataJson?: {
2345
- [key: string]: unknown;
2346
- } | null;
2347
- /** Role */
2348
- role?: string | null;
2349
- /** Quantity */
2350
- quantity?: string | null;
2351
- /** Unit */
2352
- unit?: string | null;
2353
- /**
2354
- * Position
2355
- * @default 0
2356
- */
2357
- position: number;
2358
- };
2359
2373
  /**
2360
2374
  * PublishedResourceSummary
2361
2375
  * @description Schema for published resources in standalone context.
@@ -3346,8 +3360,9 @@ type MarvinCollection = components['schemas']['PublishedCollectionRead'];
3346
3360
  type PublishedCollectionSummary = components['schemas']['PublishedCollectionSummary'];
3347
3361
  type MarvinAsset = components['schemas']['PublishedAssetRead'];
3348
3362
  type PublishedAssetRead = components['schemas']['PublishedAssetRead'];
3363
+ type PublishedEntryAsset = components['schemas']['PublishedEntryAsset'];
3349
3364
  type MarvinResource = components['schemas']['PublishedResourceSummary'];
3350
- type PublishedResourceRead = components['schemas']['PublishedResourceRead'];
3365
+ type PublishedEntryResource = components['schemas']['PublishedEntryResource'];
3351
3366
  type MarvinEntryType = components['schemas']['EntryTypeRead'];
3352
3367
  interface AssetUploadRequest {
3353
3368
  slug: string;
@@ -3391,4 +3406,4 @@ interface AuthToken {
3391
3406
  tokenType: string;
3392
3407
  }
3393
3408
 
3394
- export type { AuthToken as A, GetAssetsOptions as G, MarvinAsset as M, PublishedAssetRead as P, SiteConfiguration as S, WorkspaceInfo as W, GetEntriesOptions as a, GetResourcesOptions as b, MarvinCollection as c, MarvinEntry as d, MarvinEntryListItem as e, MarvinEntryType as f, MarvinPublishResponse as g, MarvinResource as h, MarvinSite as i, PublishedCollectionSummary as j, PublishedEntryType as k, PublishedResourceRead as l, components as m, AssetUploadRequest as n, MarvinClientConfig as o };
3409
+ export type { AuthToken as A, GetAssetsOptions as G, MarvinAsset as M, PublishedAssetRead as P, SiteConfiguration as S, WorkspaceInfo as W, GetEntriesOptions as a, GetResourcesOptions as b, MarvinCollection as c, MarvinEntry as d, MarvinEntryListItem as e, MarvinEntryType as f, MarvinPublishResponse as g, MarvinResource as h, MarvinSite as i, PublishedCollectionSummary as j, PublishedEntryAsset as k, PublishedEntryResource as l, PublishedEntryType as m, components as n, AssetUploadRequest as o, MarvinClientConfig as p };
package/dist/index.cjs CHANGED
@@ -909,6 +909,18 @@ var init_entry = __esm({
909
909
  get resources() {
910
910
  return this.raw.resources;
911
911
  }
912
+ asset(role) {
913
+ return this.raw.assets.find((a) => a.role === role);
914
+ }
915
+ assetsByRole(role) {
916
+ return this.raw.assets.filter((a) => a.role === role);
917
+ }
918
+ resource(role) {
919
+ return this.raw.resources.find((r) => r.role === role);
920
+ }
921
+ resourcesByRole(role) {
922
+ return this.raw.resources.filter((r) => r.role === role);
923
+ }
912
924
  field(key) {
913
925
  return this.raw.data[key];
914
926
  }
package/dist/index.d.cts CHANGED
@@ -1,9 +1,9 @@
1
- import { M as MarvinConfig, a as MarvinClient } from './marvin-B_gJRxHK.cjs';
2
- export { C as Collection, E as Entry, b as MarvinApiError, c as MarvinAuthError, d as MarvinCache, e as MarvinConfigError, f as MarvinError, g as MarvinNetworkError, h as MarvinNotFoundError, i as MarvinServerError, j as MarvinValidationError, P as PaginatedResponse, k as PaginationMeta, l as PaginationParams, R as Resource, W as Workspace, m as createConfigFromEnv, n as createPaginatedResponse, o as extractData, p as isPaginatedResponse, q as offsetToPage, r as pageToOffset } from './marvin-B_gJRxHK.cjs';
1
+ import { M as MarvinConfig, a as MarvinClient } from './marvin-BhI__9Cj.cjs';
2
+ export { C as Collection, E as Entry, b as MarvinApiError, c as MarvinAuthError, d as MarvinCache, e as MarvinConfigError, f as MarvinError, g as MarvinNetworkError, h as MarvinNotFoundError, i as MarvinServerError, j as MarvinValidationError, P as PaginatedResponse, k as PaginationMeta, l as PaginationParams, R as Resource, W as Workspace, m as createConfigFromEnv, n as createPaginatedResponse, o as extractData, p as isPaginatedResponse, q as offsetToPage, r as pageToOffset } from './marvin-BhI__9Cj.cjs';
3
3
  import { H as HttpClient } from './HttpClient-CdF3IHM1.cjs';
4
4
  export { A as AuthStrategy, B as BearerTokenAuth, a as HttpClientConfig, N as NoAuth, S as SessionAuth } from './HttpClient-CdF3IHM1.cjs';
5
- import { A as AuthToken$1 } from './index-D5zkKa4N.cjs';
6
- export { G as GetAssetsOptions, a as GetEntriesOptions, b as GetResourcesOptions, M as MarvinAsset, c as MarvinCollection, d as MarvinEntry, e as MarvinEntryListItem, f as MarvinEntryType, g as MarvinPublishResponse, h as MarvinResource, i as MarvinSite, P as PublishedAssetRead, j as PublishedCollectionSummary, k as PublishedEntryType, l as PublishedResourceRead, S as SiteConfiguration, W as WorkspaceInfo } from './index-D5zkKa4N.cjs';
5
+ import { A as AuthToken$1 } from './index-BLIrbIHf.cjs';
6
+ export { G as GetAssetsOptions, a as GetEntriesOptions, b as GetResourcesOptions, M as MarvinAsset, c as MarvinCollection, d as MarvinEntry, e as MarvinEntryListItem, f as MarvinEntryType, g as MarvinPublishResponse, h as MarvinResource, i as MarvinSite, P as PublishedAssetRead, j as PublishedCollectionSummary, k as PublishedEntryAsset, l as PublishedEntryResource, m as PublishedEntryType, S as SiteConfiguration, W as WorkspaceInfo } from './index-BLIrbIHf.cjs';
7
7
 
8
8
  /**
9
9
  * Authentication & User Registration
package/dist/index.d.ts CHANGED
@@ -1,9 +1,9 @@
1
- import { M as MarvinConfig, a as MarvinClient } from './marvin-C5tRQ2nD.js';
2
- export { C as Collection, E as Entry, b as MarvinApiError, c as MarvinAuthError, d as MarvinCache, e as MarvinConfigError, f as MarvinError, g as MarvinNetworkError, h as MarvinNotFoundError, i as MarvinServerError, j as MarvinValidationError, P as PaginatedResponse, k as PaginationMeta, l as PaginationParams, R as Resource, W as Workspace, m as createConfigFromEnv, n as createPaginatedResponse, o as extractData, p as isPaginatedResponse, q as offsetToPage, r as pageToOffset } from './marvin-C5tRQ2nD.js';
1
+ import { M as MarvinConfig, a as MarvinClient } from './marvin-C_TihjE2.js';
2
+ export { C as Collection, E as Entry, b as MarvinApiError, c as MarvinAuthError, d as MarvinCache, e as MarvinConfigError, f as MarvinError, g as MarvinNetworkError, h as MarvinNotFoundError, i as MarvinServerError, j as MarvinValidationError, P as PaginatedResponse, k as PaginationMeta, l as PaginationParams, R as Resource, W as Workspace, m as createConfigFromEnv, n as createPaginatedResponse, o as extractData, p as isPaginatedResponse, q as offsetToPage, r as pageToOffset } from './marvin-C_TihjE2.js';
3
3
  import { H as HttpClient } from './HttpClient-CdF3IHM1.js';
4
4
  export { A as AuthStrategy, B as BearerTokenAuth, a as HttpClientConfig, N as NoAuth, S as SessionAuth } from './HttpClient-CdF3IHM1.js';
5
- import { A as AuthToken$1 } from './index-D5zkKa4N.js';
6
- export { G as GetAssetsOptions, a as GetEntriesOptions, b as GetResourcesOptions, M as MarvinAsset, c as MarvinCollection, d as MarvinEntry, e as MarvinEntryListItem, f as MarvinEntryType, g as MarvinPublishResponse, h as MarvinResource, i as MarvinSite, P as PublishedAssetRead, j as PublishedCollectionSummary, k as PublishedEntryType, l as PublishedResourceRead, S as SiteConfiguration, W as WorkspaceInfo } from './index-D5zkKa4N.js';
5
+ import { A as AuthToken$1 } from './index-BLIrbIHf.js';
6
+ export { G as GetAssetsOptions, a as GetEntriesOptions, b as GetResourcesOptions, M as MarvinAsset, c as MarvinCollection, d as MarvinEntry, e as MarvinEntryListItem, f as MarvinEntryType, g as MarvinPublishResponse, h as MarvinResource, i as MarvinSite, P as PublishedAssetRead, j as PublishedCollectionSummary, k as PublishedEntryAsset, l as PublishedEntryResource, m as PublishedEntryType, S as SiteConfiguration, W as WorkspaceInfo } from './index-BLIrbIHf.js';
7
7
 
8
8
  /**
9
9
  * Authentication & User Registration
package/dist/index.js CHANGED
@@ -13,7 +13,7 @@ import {
13
13
  init_resource,
14
14
  init_workspace,
15
15
  marvin_exports
16
- } from "./chunk-R3EZI43S.js";
16
+ } from "./chunk-L4LJWRA7.js";
17
17
  import {
18
18
  BearerTokenAuth,
19
19
  HttpClient,
@@ -1,4 +1,4 @@
1
- import { k as PublishedEntryType, h as MarvinResource, M as MarvinAsset, c as MarvinCollection, e as MarvinEntryListItem, j as PublishedCollectionSummary, d as MarvinEntry, P as PublishedAssetRead, l as PublishedResourceRead, i as MarvinSite, m as components, b as GetResourcesOptions$1 } from './index-D5zkKa4N.cjs';
1
+ import { m as PublishedEntryType, h as MarvinResource, M as MarvinAsset, c as MarvinCollection, e as MarvinEntryListItem, j as PublishedCollectionSummary, d as MarvinEntry, k as PublishedEntryAsset, l as PublishedEntryResource, i as MarvinSite, n as components, b as GetResourcesOptions$1 } from './index-BLIrbIHf.cjs';
2
2
  import { H as HttpClient } from './HttpClient-CdF3IHM1.cjs';
3
3
 
4
4
  /**
@@ -372,9 +372,13 @@ declare class Entry {
372
372
  } | null | undefined;
373
373
  get publishedAt(): string | null | undefined;
374
374
  get order(): number | null | undefined;
375
- get assets(): PublishedAssetRead[];
375
+ get assets(): PublishedEntryAsset[];
376
376
  get collections(): PublishedCollectionSummary[];
377
- get resources(): PublishedResourceRead[];
377
+ get resources(): PublishedEntryResource[];
378
+ asset(role: string): PublishedEntryAsset | undefined;
379
+ assetsByRole(role: string): PublishedEntryAsset[];
380
+ resource(role: string): PublishedEntryResource | undefined;
381
+ resourcesByRole(role: string): PublishedEntryResource[];
378
382
  field<T = unknown>(key: string): T | undefined;
379
383
  get fields(): Record<string, unknown>;
380
384
  toJSON(): MarvinEntry;
@@ -521,6 +525,10 @@ declare class MarvinClient {
521
525
  collections: string[];
522
526
  assetSlugs: string[];
523
527
  resourceSlugs: string[];
528
+ metadataJson?: {
529
+ [key: string]: unknown;
530
+ } | null;
531
+ featuredAsset?: components["schemas"]["PublishedAssetRead"] | null;
524
532
  order?: number | null;
525
533
  }[]>;
526
534
  /**
@@ -537,6 +545,10 @@ declare class MarvinClient {
537
545
  collections: string[];
538
546
  assetSlugs: string[];
539
547
  resourceSlugs: string[];
548
+ metadataJson?: {
549
+ [key: string]: unknown;
550
+ } | null;
551
+ featuredAsset?: components["schemas"]["PublishedAssetRead"] | null;
540
552
  order?: number | null;
541
553
  }[]>;
542
554
  /**
@@ -553,6 +565,10 @@ declare class MarvinClient {
553
565
  collections: string[];
554
566
  assetSlugs: string[];
555
567
  resourceSlugs: string[];
568
+ metadataJson?: {
569
+ [key: string]: unknown;
570
+ } | null;
571
+ featuredAsset?: components["schemas"]["PublishedAssetRead"] | null;
556
572
  order?: number | null;
557
573
  }[]>;
558
574
  /**
@@ -1,4 +1,4 @@
1
- import { k as PublishedEntryType, h as MarvinResource, M as MarvinAsset, c as MarvinCollection, e as MarvinEntryListItem, j as PublishedCollectionSummary, d as MarvinEntry, P as PublishedAssetRead, l as PublishedResourceRead, i as MarvinSite, m as components, b as GetResourcesOptions$1 } from './index-D5zkKa4N.js';
1
+ import { m as PublishedEntryType, h as MarvinResource, M as MarvinAsset, c as MarvinCollection, e as MarvinEntryListItem, j as PublishedCollectionSummary, d as MarvinEntry, k as PublishedEntryAsset, l as PublishedEntryResource, i as MarvinSite, n as components, b as GetResourcesOptions$1 } from './index-BLIrbIHf.js';
2
2
  import { H as HttpClient } from './HttpClient-CdF3IHM1.js';
3
3
 
4
4
  /**
@@ -372,9 +372,13 @@ declare class Entry {
372
372
  } | null | undefined;
373
373
  get publishedAt(): string | null | undefined;
374
374
  get order(): number | null | undefined;
375
- get assets(): PublishedAssetRead[];
375
+ get assets(): PublishedEntryAsset[];
376
376
  get collections(): PublishedCollectionSummary[];
377
- get resources(): PublishedResourceRead[];
377
+ get resources(): PublishedEntryResource[];
378
+ asset(role: string): PublishedEntryAsset | undefined;
379
+ assetsByRole(role: string): PublishedEntryAsset[];
380
+ resource(role: string): PublishedEntryResource | undefined;
381
+ resourcesByRole(role: string): PublishedEntryResource[];
378
382
  field<T = unknown>(key: string): T | undefined;
379
383
  get fields(): Record<string, unknown>;
380
384
  toJSON(): MarvinEntry;
@@ -521,6 +525,10 @@ declare class MarvinClient {
521
525
  collections: string[];
522
526
  assetSlugs: string[];
523
527
  resourceSlugs: string[];
528
+ metadataJson?: {
529
+ [key: string]: unknown;
530
+ } | null;
531
+ featuredAsset?: components["schemas"]["PublishedAssetRead"] | null;
524
532
  order?: number | null;
525
533
  }[]>;
526
534
  /**
@@ -537,6 +545,10 @@ declare class MarvinClient {
537
545
  collections: string[];
538
546
  assetSlugs: string[];
539
547
  resourceSlugs: string[];
548
+ metadataJson?: {
549
+ [key: string]: unknown;
550
+ } | null;
551
+ featuredAsset?: components["schemas"]["PublishedAssetRead"] | null;
540
552
  order?: number | null;
541
553
  }[]>;
542
554
  /**
@@ -553,6 +565,10 @@ declare class MarvinClient {
553
565
  collections: string[];
554
566
  assetSlugs: string[];
555
567
  resourceSlugs: string[];
568
+ metadataJson?: {
569
+ [key: string]: unknown;
570
+ } | null;
571
+ featuredAsset?: components["schemas"]["PublishedAssetRead"] | null;
556
572
  order?: number | null;
557
573
  }[]>;
558
574
  /**
@@ -1,5 +1,5 @@
1
1
  import { H as HttpClient } from './HttpClient-CdF3IHM1.cjs';
2
- import { m as components, A as AuthToken } from './index-D5zkKa4N.cjs';
2
+ import { n as components, A as AuthToken } from './index-BLIrbIHf.cjs';
3
3
 
4
4
  /**
5
5
  * Platform API Types
@@ -1,5 +1,5 @@
1
1
  import { H as HttpClient } from './HttpClient-CdF3IHM1.js';
2
- import { m as components, A as AuthToken } from './index-D5zkKa4N.js';
2
+ import { n as components, A as AuthToken } from './index-BLIrbIHf.js';
3
3
 
4
4
  /**
5
5
  * Platform API Types
package/dist/publish.cjs CHANGED
@@ -764,6 +764,18 @@ var Entry = class {
764
764
  get resources() {
765
765
  return this.raw.resources;
766
766
  }
767
+ asset(role) {
768
+ return this.raw.assets.find((a) => a.role === role);
769
+ }
770
+ assetsByRole(role) {
771
+ return this.raw.assets.filter((a) => a.role === role);
772
+ }
773
+ resource(role) {
774
+ return this.raw.resources.find((r) => r.role === role);
775
+ }
776
+ resourcesByRole(role) {
777
+ return this.raw.resources.filter((r) => r.role === role);
778
+ }
767
779
  field(key) {
768
780
  return this.raw.data[key];
769
781
  }
@@ -1,6 +1,6 @@
1
- import { M as MarvinConfig, a as MarvinClient } from './marvin-B_gJRxHK.cjs';
2
- export { C as Collection, E as Entry, b as MarvinApiError, c as MarvinAuthError, d as MarvinCache, e as MarvinConfigError, f as MarvinError, g as MarvinNetworkError, h as MarvinNotFoundError, i as MarvinServerError, j as MarvinValidationError, P as PaginatedResponse, k as PaginationMeta, l as PaginationParams, R as Resource, W as Workspace, m as createConfigFromEnv, n as createPaginatedResponse, o as extractData, p as isPaginatedResponse, q as offsetToPage, r as pageToOffset } from './marvin-B_gJRxHK.cjs';
3
- export { G as GetAssetsOptions, a as GetEntriesOptions, b as GetResourcesOptions, M as MarvinAsset, c as MarvinCollection, d as MarvinEntry, e as MarvinEntryListItem, f as MarvinEntryType, g as MarvinPublishResponse, h as MarvinResource, i as MarvinSite, P as PublishedAssetRead, j as PublishedCollectionSummary, l as PublishedResourceRead, S as SiteConfiguration, W as WorkspaceInfo } from './index-D5zkKa4N.cjs';
1
+ import { M as MarvinConfig, a as MarvinClient } from './marvin-BhI__9Cj.cjs';
2
+ export { C as Collection, E as Entry, b as MarvinApiError, c as MarvinAuthError, d as MarvinCache, e as MarvinConfigError, f as MarvinError, g as MarvinNetworkError, h as MarvinNotFoundError, i as MarvinServerError, j as MarvinValidationError, P as PaginatedResponse, k as PaginationMeta, l as PaginationParams, R as Resource, W as Workspace, m as createConfigFromEnv, n as createPaginatedResponse, o as extractData, p as isPaginatedResponse, q as offsetToPage, r as pageToOffset } from './marvin-BhI__9Cj.cjs';
3
+ export { G as GetAssetsOptions, a as GetEntriesOptions, b as GetResourcesOptions, M as MarvinAsset, c as MarvinCollection, d as MarvinEntry, e as MarvinEntryListItem, f as MarvinEntryType, g as MarvinPublishResponse, h as MarvinResource, i as MarvinSite, P as PublishedAssetRead, j as PublishedCollectionSummary, k as PublishedEntryAsset, l as PublishedEntryResource, S as SiteConfiguration, W as WorkspaceInfo } from './index-BLIrbIHf.cjs';
4
4
  export { A as AuthStrategy, B as BearerTokenAuth, H as HttpClient, a as HttpClientConfig } from './HttpClient-CdF3IHM1.cjs';
5
5
 
6
6
  /**
package/dist/publish.d.ts CHANGED
@@ -1,6 +1,6 @@
1
- import { M as MarvinConfig, a as MarvinClient } from './marvin-C5tRQ2nD.js';
2
- export { C as Collection, E as Entry, b as MarvinApiError, c as MarvinAuthError, d as MarvinCache, e as MarvinConfigError, f as MarvinError, g as MarvinNetworkError, h as MarvinNotFoundError, i as MarvinServerError, j as MarvinValidationError, P as PaginatedResponse, k as PaginationMeta, l as PaginationParams, R as Resource, W as Workspace, m as createConfigFromEnv, n as createPaginatedResponse, o as extractData, p as isPaginatedResponse, q as offsetToPage, r as pageToOffset } from './marvin-C5tRQ2nD.js';
3
- export { G as GetAssetsOptions, a as GetEntriesOptions, b as GetResourcesOptions, M as MarvinAsset, c as MarvinCollection, d as MarvinEntry, e as MarvinEntryListItem, f as MarvinEntryType, g as MarvinPublishResponse, h as MarvinResource, i as MarvinSite, P as PublishedAssetRead, j as PublishedCollectionSummary, l as PublishedResourceRead, S as SiteConfiguration, W as WorkspaceInfo } from './index-D5zkKa4N.js';
1
+ import { M as MarvinConfig, a as MarvinClient } from './marvin-C_TihjE2.js';
2
+ export { C as Collection, E as Entry, b as MarvinApiError, c as MarvinAuthError, d as MarvinCache, e as MarvinConfigError, f as MarvinError, g as MarvinNetworkError, h as MarvinNotFoundError, i as MarvinServerError, j as MarvinValidationError, P as PaginatedResponse, k as PaginationMeta, l as PaginationParams, R as Resource, W as Workspace, m as createConfigFromEnv, n as createPaginatedResponse, o as extractData, p as isPaginatedResponse, q as offsetToPage, r as pageToOffset } from './marvin-C_TihjE2.js';
3
+ export { G as GetAssetsOptions, a as GetEntriesOptions, b as GetResourcesOptions, M as MarvinAsset, c as MarvinCollection, d as MarvinEntry, e as MarvinEntryListItem, f as MarvinEntryType, g as MarvinPublishResponse, h as MarvinResource, i as MarvinSite, P as PublishedAssetRead, j as PublishedCollectionSummary, k as PublishedEntryAsset, l as PublishedEntryResource, S as SiteConfiguration, W as WorkspaceInfo } from './index-BLIrbIHf.js';
4
4
  export { A as AuthStrategy, B as BearerTokenAuth, H as HttpClient, a as HttpClientConfig } from './HttpClient-CdF3IHM1.js';
5
5
 
6
6
  /**
package/dist/publish.js CHANGED
@@ -12,7 +12,7 @@ import {
12
12
  init_marvin,
13
13
  init_resource,
14
14
  init_workspace
15
- } from "./chunk-R3EZI43S.js";
15
+ } from "./chunk-L4LJWRA7.js";
16
16
  import {
17
17
  BearerTokenAuth,
18
18
  HttpClient,
@@ -1 +1 @@
1
- export { n as AssetUploadRequest, A as AuthToken, G as GetAssetsOptions, a as GetEntriesOptions, b as GetResourcesOptions, M as MarvinAsset, o as MarvinClientConfig, c as MarvinCollection, d as MarvinEntry, e as MarvinEntryListItem, f as MarvinEntryType, g as MarvinPublishResponse, h as MarvinResource, i as MarvinSite, P as PublishedAssetRead, j as PublishedCollectionSummary, k as PublishedEntryType, l as PublishedResourceRead, S as SiteConfiguration, W as WorkspaceInfo } from '../index-D5zkKa4N.cjs';
1
+ export { o as AssetUploadRequest, A as AuthToken, G as GetAssetsOptions, a as GetEntriesOptions, b as GetResourcesOptions, M as MarvinAsset, p as MarvinClientConfig, c as MarvinCollection, d as MarvinEntry, e as MarvinEntryListItem, f as MarvinEntryType, g as MarvinPublishResponse, h as MarvinResource, i as MarvinSite, P as PublishedAssetRead, j as PublishedCollectionSummary, k as PublishedEntryAsset, l as PublishedEntryResource, m as PublishedEntryType, S as SiteConfiguration, W as WorkspaceInfo } from '../index-BLIrbIHf.cjs';
@@ -1 +1 @@
1
- export { n as AssetUploadRequest, A as AuthToken, G as GetAssetsOptions, a as GetEntriesOptions, b as GetResourcesOptions, M as MarvinAsset, o as MarvinClientConfig, c as MarvinCollection, d as MarvinEntry, e as MarvinEntryListItem, f as MarvinEntryType, g as MarvinPublishResponse, h as MarvinResource, i as MarvinSite, P as PublishedAssetRead, j as PublishedCollectionSummary, k as PublishedEntryType, l as PublishedResourceRead, S as SiteConfiguration, W as WorkspaceInfo } from '../index-D5zkKa4N.js';
1
+ export { o as AssetUploadRequest, A as AuthToken, G as GetAssetsOptions, a as GetEntriesOptions, b as GetResourcesOptions, M as MarvinAsset, p as MarvinClientConfig, c as MarvinCollection, d as MarvinEntry, e as MarvinEntryListItem, f as MarvinEntryType, g as MarvinPublishResponse, h as MarvinResource, i as MarvinSite, P as PublishedAssetRead, j as PublishedCollectionSummary, k as PublishedEntryAsset, l as PublishedEntryResource, m as PublishedEntryType, S as SiteConfiguration, W as WorkspaceInfo } from '../index-BLIrbIHf.js';
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@inneropen/marvin-sdk",
3
- "version": "3.0.1",
3
+ "version": "3.1.0-next.1",
4
4
  "description": "Official TypeScript SDK for Marvin CMS",
5
5
  "type": "module",
6
6
  "main": "./dist/index.cjs",