@inneropen/marvin-sdk 2.0.0-next.23 → 2.0.0-next.24

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,9 +1,9 @@
1
- import { M as MarvinConfig, a as MarvinClient } from './marvin-B6kWCfmU.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-B6kWCfmU.js';
1
+ import { M as MarvinConfig, a as MarvinClient } from './marvin-KVTEthgH.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-KVTEthgH.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
5
  import { AuthToken as AuthToken$1 } from './types/index.js';
6
- export { GetAssetsOptions, GetEntriesOptions, GetResourcesOptions, MarvinAsset, MarvinCollection, MarvinEntry, MarvinEntryType, MarvinPublishResponse, MarvinResource, MarvinSite, PublishedAssetRead, PublishedCollectionSummary, PublishedEntryType, PublishedResourceRead } from './types/index.js';
6
+ export { GetAssetsOptions, GetEntriesOptions, GetResourcesOptions, MarvinAsset, MarvinCollection, MarvinEntry, MarvinEntryListItem, MarvinEntryType, MarvinPublishResponse, MarvinResource, MarvinSite, PublishedAssetRead, PublishedCollectionSummary, PublishedEntryType, PublishedResourceRead } from './types/index.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-CIFRKLJS.js";
16
+ } from "./chunk-DCTX4NSF.js";
17
17
  import {
18
18
  BearerTokenAuth,
19
19
  HttpClient,
@@ -1,4 +1,4 @@
1
- import { PublishedEntryType, MarvinResource, MarvinEntry, MarvinAsset, MarvinCollection, PublishedAssetRead, PublishedCollectionSummary, PublishedResourceRead, MarvinSite, GetResourcesOptions as GetResourcesOptions$1 } from './types/index.cjs';
1
+ import { PublishedEntryType, MarvinResource, MarvinAsset, MarvinCollection, MarvinEntryListItem, PublishedCollectionSummary, MarvinEntry, PublishedAssetRead, PublishedResourceRead, MarvinSite, GetResourcesOptions as GetResourcesOptions$1 } from './types/index.cjs';
2
2
  import { H as HttpClient } from './HttpClient-CdF3IHM1.cjs';
3
3
 
4
4
  /**
@@ -212,30 +212,15 @@ declare class RenderersModule {
212
212
 
213
213
  declare class Resource {
214
214
  private data;
215
- private http;
216
- private workspaceSlug;
217
- constructor(data: MarvinResource, http: MarvinHttpClient, workspaceSlug: string);
218
- get id(): string;
215
+ constructor(data: MarvinResource);
219
216
  get name(): string;
220
217
  get slug(): string;
221
- get resourceType(): string | undefined;
222
- get description(): string | undefined;
223
- get externalId(): string | undefined;
224
- get url(): string | undefined;
225
- get metadata(): Record<string, unknown> | undefined;
226
- get createdAt(): string;
227
- get updatedAt(): string;
228
- /**
229
- * Get all entries that reference this resource
230
- */
231
- entries(): Promise<MarvinEntry[]>;
232
- /**
233
- * Get assets related to this resource (future)
234
- */
235
- assets(): Promise<MarvinAsset[]>;
236
- /**
237
- * Get raw resource data
238
- */
218
+ get resourceType(): string;
219
+ get description(): string | null | undefined;
220
+ get externalId(): string | null | undefined;
221
+ get url(): string | null | undefined;
222
+ get metadataJson(): Record<string, unknown> | null | undefined;
223
+ get entries(): string[];
239
224
  toJSON(): MarvinResource;
240
225
  }
241
226
 
@@ -261,9 +246,9 @@ declare class ResourcesModule {
261
246
  */
262
247
  get(slug: string): Promise<Resource>;
263
248
  /**
264
- * Get entries that reference this resource
249
+ * Get entry slugs that reference this resource
265
250
  */
266
- entries(slug: string): Promise<MarvinEntry[]>;
251
+ entries(slug: string): Promise<string[]>;
267
252
  }
268
253
 
269
254
  /**
@@ -307,35 +292,15 @@ declare class AssetsModule {
307
292
 
308
293
  declare class Collection {
309
294
  private data;
310
- private http;
311
- private workspaceSlug;
312
- constructor(data: MarvinCollection, http: MarvinHttpClient, workspaceSlug: string);
313
- get id(): string;
295
+ constructor(data: MarvinCollection);
314
296
  get name(): string;
315
297
  get slug(): string;
316
- get description(): string | undefined;
317
- get icon(): string | undefined;
318
- get color(): string | undefined;
319
- get sortOrder(): number;
298
+ get description(): string | null | undefined;
320
299
  get isSmart(): boolean;
321
- get smartRules(): Record<string, unknown> | undefined;
322
- get createdAt(): string;
323
- get updatedAt(): string;
324
- /**
325
- * Get all entries in this collection
326
- */
327
- entries(): Promise<MarvinEntry[]>;
328
- /**
329
- * Get assets in this collection (future)
330
- */
331
- assets(): Promise<MarvinAsset[]>;
332
- /**
333
- * Get collection metadata (future)
334
- */
335
- metadata(): Promise<any>;
336
- /**
337
- * Get raw collection data
338
- */
300
+ get smartRules(): Record<string, unknown> | null | undefined;
301
+ get metadataJson(): Record<string, unknown> | null | undefined;
302
+ get entryCount(): number;
303
+ get entries(): MarvinEntryListItem[];
339
304
  toJSON(): MarvinCollection;
340
305
  }
341
306
 
@@ -350,7 +315,7 @@ declare class CollectionsModule {
350
315
  /**
351
316
  * Get all collections
352
317
  */
353
- list(): Promise<MarvinCollection[]>;
318
+ list(): Promise<PublishedCollectionSummary[]>;
354
319
  /**
355
320
  * Get a single collection by slug
356
321
  * Returns null if collection is not found (404)
@@ -360,24 +325,14 @@ declare class CollectionsModule {
360
325
  * Get entries in a collection
361
326
  * Returns empty array if collection is not found
362
327
  */
363
- entries(slug: string): Promise<MarvinEntry[]>;
328
+ entries(slug: string): Promise<MarvinEntryListItem[]>;
364
329
  /**
365
330
  * Try multiple collection slugs in fallback order
366
331
  * Returns the first collection that exists and has entries
367
- *
368
- * @param slugs - Collection slugs to try in order
369
- * @param options - Options for fallback behavior
370
- * @returns Entries from the first matching collection, or empty array
371
- *
372
- * @example
373
- * ```ts
374
- * // Try bench-notes, then journal, then blog
375
- * const entries = await collections.fallback(['bench-notes', 'journal', 'blog']);
376
- * ```
377
332
  */
378
333
  fallback(slugs: string[], options?: {
379
334
  requireEntries?: boolean;
380
- }): Promise<MarvinEntry[]>;
335
+ }): Promise<MarvinEntryListItem[]>;
381
336
  }
382
337
 
383
338
  /**
@@ -386,9 +341,7 @@ declare class CollectionsModule {
386
341
 
387
342
  declare class Entry {
388
343
  private raw;
389
- private http;
390
- private workspaceSlug;
391
- constructor(raw: MarvinEntry, http: MarvinHttpClient, workspaceSlug: string);
344
+ constructor(raw: MarvinEntry);
392
345
  get title(): string;
393
346
  get slug(): string;
394
347
  get summary(): string | null | undefined;
@@ -412,7 +365,6 @@ declare class Entry {
412
365
  get resources(): PublishedResourceRead[];
413
366
  field<T = unknown>(key: string): T | undefined;
414
367
  get fields(): Record<string, unknown>;
415
- relatedEntries(): Promise<MarvinEntry[]>;
416
368
  toJSON(): MarvinEntry;
417
369
  }
418
370
 
@@ -434,7 +386,7 @@ declare class EntriesModule {
434
386
  /**
435
387
  * Get all published entries
436
388
  */
437
- list(options?: GetEntriesOptions): Promise<MarvinEntry[]>;
389
+ list(options?: GetEntriesOptions): Promise<MarvinEntryListItem[]>;
438
390
  /**
439
391
  * Get a single entry by slug
440
392
  * Returns null if entry is not found (404)
@@ -443,15 +395,15 @@ declare class EntriesModule {
443
395
  /**
444
396
  * Convenience: Get all pages
445
397
  */
446
- pages(options?: Omit<GetEntriesOptions, 'entryType'>): Promise<MarvinEntry[]>;
398
+ pages(options?: Omit<GetEntriesOptions, 'entryType'>): Promise<MarvinEntryListItem[]>;
447
399
  /**
448
400
  * Convenience: Get all blog posts
449
401
  */
450
- posts(options?: Omit<GetEntriesOptions, 'entryType'>): Promise<MarvinEntry[]>;
402
+ posts(options?: Omit<GetEntriesOptions, 'entryType'>): Promise<MarvinEntryListItem[]>;
451
403
  /**
452
404
  * Convenience: Get all projects
453
405
  */
454
- projects(options?: Omit<GetEntriesOptions, 'entryType'>): Promise<MarvinEntry[]>;
406
+ projects(options?: Omit<GetEntriesOptions, 'entryType'>): Promise<MarvinEntryListItem[]>;
455
407
  }
456
408
 
457
409
  /**
@@ -494,7 +446,6 @@ declare class Workspace {
494
446
  }
495
447
 
496
448
  declare class MarvinClient {
497
- private config;
498
449
  private http;
499
450
  private cache;
500
451
  private workspace;
@@ -551,15 +502,15 @@ declare class MarvinClient {
551
502
  /**
552
503
  * Get all pages
553
504
  */
554
- pages(options?: GetEntriesOptions): Promise<MarvinEntry[]>;
505
+ pages(options?: GetEntriesOptions): Promise<MarvinEntryListItem[]>;
555
506
  /**
556
507
  * Get all blog posts
557
508
  */
558
- posts(options?: GetEntriesOptions): Promise<MarvinEntry[]>;
509
+ posts(options?: GetEntriesOptions): Promise<MarvinEntryListItem[]>;
559
510
  /**
560
511
  * Get all projects
561
512
  */
562
- projects(options?: GetEntriesOptions): Promise<MarvinEntry[]>;
513
+ projects(options?: GetEntriesOptions): Promise<MarvinEntryListItem[]>;
563
514
  /**
564
515
  * Get a single resource by slug
565
516
  */
@@ -567,70 +518,50 @@ declare class MarvinClient {
567
518
  /**
568
519
  * Try multiple collection slugs in fallback order
569
520
  * Returns entries from the first collection that exists and has content
570
- *
571
- * @param slugs - Collection slugs to try in order
572
- * @param options - Options for fallback behavior
573
- * @returns Entries from the first matching collection, or empty array
574
- *
575
- * @example
576
- * ```ts
577
- * // Try bench-notes, then journal, then blog
578
- * const entries = await client.collectionFallback(['bench-notes', 'journal', 'blog']);
579
- * ```
580
521
  */
581
522
  collectionFallback(slugs: string[], options?: {
582
523
  requireEntries?: boolean;
583
- }): Promise<MarvinEntry[]>;
524
+ }): Promise<MarvinEntryListItem[]>;
584
525
  /**
585
526
  * @deprecated Use workspace.site or marvin.site instead
586
- * Get site configuration
587
527
  */
588
528
  getSite(): Promise<MarvinSite>;
589
529
  /**
590
530
  * @deprecated Use workspace.entries.list() instead
591
- * Get all published entries
592
531
  */
593
- getEntries(options?: GetEntriesOptions): Promise<MarvinEntry[]>;
532
+ getEntries(options?: GetEntriesOptions): Promise<MarvinEntryListItem[]>;
594
533
  /**
595
534
  * @deprecated Use workspace.entries.get() instead
596
- * Get a single published entry by slug
597
535
  */
598
536
  getEntry(slug: string): Promise<MarvinEntry | null>;
599
537
  /**
600
538
  * @deprecated Use workspace.collections.list() instead
601
- * Get all collections
602
539
  */
603
- getCollections(): Promise<MarvinCollection[]>;
540
+ getCollections(): Promise<PublishedCollectionSummary[]>;
604
541
  /**
605
542
  * @deprecated Use workspace.collections.get() instead
606
- * Get a single collection by slug
607
543
  */
608
544
  getCollection(slug: string): Promise<MarvinCollection | null>;
609
545
  /**
610
546
  * @deprecated Use workspace.collections.entries() instead
611
- * Get all entries in a collection
612
547
  */
613
- getCollectionEntries(slug: string): Promise<MarvinEntry[]>;
548
+ getCollectionEntries(slug: string): Promise<MarvinEntryListItem[]>;
614
549
  /**
615
550
  * @deprecated Use workspace.assets.list() instead
616
- * Get all published assets
617
551
  */
618
552
  getAssets(options?: GetAssetsOptions): Promise<MarvinAsset[]>;
619
553
  /**
620
554
  * @deprecated Use workspace.resources.list() instead
621
- * Get all published resources
622
555
  */
623
556
  getResources(options?: GetResourcesOptions$1): Promise<MarvinResource[]>;
624
557
  /**
625
558
  * @deprecated Use workspace.resources.get() instead
626
- * Get a single resource by slug
627
559
  */
628
560
  getResource(slug: string): Promise<MarvinResource>;
629
561
  /**
630
562
  * @deprecated Use workspace.resources.entries() instead
631
- * Get entries that reference a resource
632
563
  */
633
- getResourceEntries(slug: string): Promise<MarvinEntry[]>;
564
+ getResourceEntries(slug: string): Promise<string[]>;
634
565
  }
635
566
 
636
567
  export { Collection as C, Entry as E, type MarvinConfig as M, type PaginatedResponse as P, Resource as R, Workspace as W, MarvinClient as a, MarvinApiError as b, MarvinAuthError as c, MarvinCache as d, MarvinConfigError as e, MarvinError as f, MarvinNetworkError as g, MarvinNotFoundError as h, MarvinServerError as i, MarvinValidationError as j, type PaginationMeta as k, type PaginationParams as l, createConfigFromEnv as m, createPaginatedResponse as n, extractData as o, isPaginatedResponse as p, offsetToPage as q, pageToOffset as r };
@@ -1,4 +1,4 @@
1
- import { PublishedEntryType, MarvinResource, MarvinEntry, MarvinAsset, MarvinCollection, PublishedAssetRead, PublishedCollectionSummary, PublishedResourceRead, MarvinSite, GetResourcesOptions as GetResourcesOptions$1 } from './types/index.js';
1
+ import { PublishedEntryType, MarvinResource, MarvinAsset, MarvinCollection, MarvinEntryListItem, PublishedCollectionSummary, MarvinEntry, PublishedAssetRead, PublishedResourceRead, MarvinSite, GetResourcesOptions as GetResourcesOptions$1 } from './types/index.js';
2
2
  import { H as HttpClient } from './HttpClient-CdF3IHM1.js';
3
3
 
4
4
  /**
@@ -212,30 +212,15 @@ declare class RenderersModule {
212
212
 
213
213
  declare class Resource {
214
214
  private data;
215
- private http;
216
- private workspaceSlug;
217
- constructor(data: MarvinResource, http: MarvinHttpClient, workspaceSlug: string);
218
- get id(): string;
215
+ constructor(data: MarvinResource);
219
216
  get name(): string;
220
217
  get slug(): string;
221
- get resourceType(): string | undefined;
222
- get description(): string | undefined;
223
- get externalId(): string | undefined;
224
- get url(): string | undefined;
225
- get metadata(): Record<string, unknown> | undefined;
226
- get createdAt(): string;
227
- get updatedAt(): string;
228
- /**
229
- * Get all entries that reference this resource
230
- */
231
- entries(): Promise<MarvinEntry[]>;
232
- /**
233
- * Get assets related to this resource (future)
234
- */
235
- assets(): Promise<MarvinAsset[]>;
236
- /**
237
- * Get raw resource data
238
- */
218
+ get resourceType(): string;
219
+ get description(): string | null | undefined;
220
+ get externalId(): string | null | undefined;
221
+ get url(): string | null | undefined;
222
+ get metadataJson(): Record<string, unknown> | null | undefined;
223
+ get entries(): string[];
239
224
  toJSON(): MarvinResource;
240
225
  }
241
226
 
@@ -261,9 +246,9 @@ declare class ResourcesModule {
261
246
  */
262
247
  get(slug: string): Promise<Resource>;
263
248
  /**
264
- * Get entries that reference this resource
249
+ * Get entry slugs that reference this resource
265
250
  */
266
- entries(slug: string): Promise<MarvinEntry[]>;
251
+ entries(slug: string): Promise<string[]>;
267
252
  }
268
253
 
269
254
  /**
@@ -307,35 +292,15 @@ declare class AssetsModule {
307
292
 
308
293
  declare class Collection {
309
294
  private data;
310
- private http;
311
- private workspaceSlug;
312
- constructor(data: MarvinCollection, http: MarvinHttpClient, workspaceSlug: string);
313
- get id(): string;
295
+ constructor(data: MarvinCollection);
314
296
  get name(): string;
315
297
  get slug(): string;
316
- get description(): string | undefined;
317
- get icon(): string | undefined;
318
- get color(): string | undefined;
319
- get sortOrder(): number;
298
+ get description(): string | null | undefined;
320
299
  get isSmart(): boolean;
321
- get smartRules(): Record<string, unknown> | undefined;
322
- get createdAt(): string;
323
- get updatedAt(): string;
324
- /**
325
- * Get all entries in this collection
326
- */
327
- entries(): Promise<MarvinEntry[]>;
328
- /**
329
- * Get assets in this collection (future)
330
- */
331
- assets(): Promise<MarvinAsset[]>;
332
- /**
333
- * Get collection metadata (future)
334
- */
335
- metadata(): Promise<any>;
336
- /**
337
- * Get raw collection data
338
- */
300
+ get smartRules(): Record<string, unknown> | null | undefined;
301
+ get metadataJson(): Record<string, unknown> | null | undefined;
302
+ get entryCount(): number;
303
+ get entries(): MarvinEntryListItem[];
339
304
  toJSON(): MarvinCollection;
340
305
  }
341
306
 
@@ -350,7 +315,7 @@ declare class CollectionsModule {
350
315
  /**
351
316
  * Get all collections
352
317
  */
353
- list(): Promise<MarvinCollection[]>;
318
+ list(): Promise<PublishedCollectionSummary[]>;
354
319
  /**
355
320
  * Get a single collection by slug
356
321
  * Returns null if collection is not found (404)
@@ -360,24 +325,14 @@ declare class CollectionsModule {
360
325
  * Get entries in a collection
361
326
  * Returns empty array if collection is not found
362
327
  */
363
- entries(slug: string): Promise<MarvinEntry[]>;
328
+ entries(slug: string): Promise<MarvinEntryListItem[]>;
364
329
  /**
365
330
  * Try multiple collection slugs in fallback order
366
331
  * Returns the first collection that exists and has entries
367
- *
368
- * @param slugs - Collection slugs to try in order
369
- * @param options - Options for fallback behavior
370
- * @returns Entries from the first matching collection, or empty array
371
- *
372
- * @example
373
- * ```ts
374
- * // Try bench-notes, then journal, then blog
375
- * const entries = await collections.fallback(['bench-notes', 'journal', 'blog']);
376
- * ```
377
332
  */
378
333
  fallback(slugs: string[], options?: {
379
334
  requireEntries?: boolean;
380
- }): Promise<MarvinEntry[]>;
335
+ }): Promise<MarvinEntryListItem[]>;
381
336
  }
382
337
 
383
338
  /**
@@ -386,9 +341,7 @@ declare class CollectionsModule {
386
341
 
387
342
  declare class Entry {
388
343
  private raw;
389
- private http;
390
- private workspaceSlug;
391
- constructor(raw: MarvinEntry, http: MarvinHttpClient, workspaceSlug: string);
344
+ constructor(raw: MarvinEntry);
392
345
  get title(): string;
393
346
  get slug(): string;
394
347
  get summary(): string | null | undefined;
@@ -412,7 +365,6 @@ declare class Entry {
412
365
  get resources(): PublishedResourceRead[];
413
366
  field<T = unknown>(key: string): T | undefined;
414
367
  get fields(): Record<string, unknown>;
415
- relatedEntries(): Promise<MarvinEntry[]>;
416
368
  toJSON(): MarvinEntry;
417
369
  }
418
370
 
@@ -434,7 +386,7 @@ declare class EntriesModule {
434
386
  /**
435
387
  * Get all published entries
436
388
  */
437
- list(options?: GetEntriesOptions): Promise<MarvinEntry[]>;
389
+ list(options?: GetEntriesOptions): Promise<MarvinEntryListItem[]>;
438
390
  /**
439
391
  * Get a single entry by slug
440
392
  * Returns null if entry is not found (404)
@@ -443,15 +395,15 @@ declare class EntriesModule {
443
395
  /**
444
396
  * Convenience: Get all pages
445
397
  */
446
- pages(options?: Omit<GetEntriesOptions, 'entryType'>): Promise<MarvinEntry[]>;
398
+ pages(options?: Omit<GetEntriesOptions, 'entryType'>): Promise<MarvinEntryListItem[]>;
447
399
  /**
448
400
  * Convenience: Get all blog posts
449
401
  */
450
- posts(options?: Omit<GetEntriesOptions, 'entryType'>): Promise<MarvinEntry[]>;
402
+ posts(options?: Omit<GetEntriesOptions, 'entryType'>): Promise<MarvinEntryListItem[]>;
451
403
  /**
452
404
  * Convenience: Get all projects
453
405
  */
454
- projects(options?: Omit<GetEntriesOptions, 'entryType'>): Promise<MarvinEntry[]>;
406
+ projects(options?: Omit<GetEntriesOptions, 'entryType'>): Promise<MarvinEntryListItem[]>;
455
407
  }
456
408
 
457
409
  /**
@@ -494,7 +446,6 @@ declare class Workspace {
494
446
  }
495
447
 
496
448
  declare class MarvinClient {
497
- private config;
498
449
  private http;
499
450
  private cache;
500
451
  private workspace;
@@ -551,15 +502,15 @@ declare class MarvinClient {
551
502
  /**
552
503
  * Get all pages
553
504
  */
554
- pages(options?: GetEntriesOptions): Promise<MarvinEntry[]>;
505
+ pages(options?: GetEntriesOptions): Promise<MarvinEntryListItem[]>;
555
506
  /**
556
507
  * Get all blog posts
557
508
  */
558
- posts(options?: GetEntriesOptions): Promise<MarvinEntry[]>;
509
+ posts(options?: GetEntriesOptions): Promise<MarvinEntryListItem[]>;
559
510
  /**
560
511
  * Get all projects
561
512
  */
562
- projects(options?: GetEntriesOptions): Promise<MarvinEntry[]>;
513
+ projects(options?: GetEntriesOptions): Promise<MarvinEntryListItem[]>;
563
514
  /**
564
515
  * Get a single resource by slug
565
516
  */
@@ -567,70 +518,50 @@ declare class MarvinClient {
567
518
  /**
568
519
  * Try multiple collection slugs in fallback order
569
520
  * Returns entries from the first collection that exists and has content
570
- *
571
- * @param slugs - Collection slugs to try in order
572
- * @param options - Options for fallback behavior
573
- * @returns Entries from the first matching collection, or empty array
574
- *
575
- * @example
576
- * ```ts
577
- * // Try bench-notes, then journal, then blog
578
- * const entries = await client.collectionFallback(['bench-notes', 'journal', 'blog']);
579
- * ```
580
521
  */
581
522
  collectionFallback(slugs: string[], options?: {
582
523
  requireEntries?: boolean;
583
- }): Promise<MarvinEntry[]>;
524
+ }): Promise<MarvinEntryListItem[]>;
584
525
  /**
585
526
  * @deprecated Use workspace.site or marvin.site instead
586
- * Get site configuration
587
527
  */
588
528
  getSite(): Promise<MarvinSite>;
589
529
  /**
590
530
  * @deprecated Use workspace.entries.list() instead
591
- * Get all published entries
592
531
  */
593
- getEntries(options?: GetEntriesOptions): Promise<MarvinEntry[]>;
532
+ getEntries(options?: GetEntriesOptions): Promise<MarvinEntryListItem[]>;
594
533
  /**
595
534
  * @deprecated Use workspace.entries.get() instead
596
- * Get a single published entry by slug
597
535
  */
598
536
  getEntry(slug: string): Promise<MarvinEntry | null>;
599
537
  /**
600
538
  * @deprecated Use workspace.collections.list() instead
601
- * Get all collections
602
539
  */
603
- getCollections(): Promise<MarvinCollection[]>;
540
+ getCollections(): Promise<PublishedCollectionSummary[]>;
604
541
  /**
605
542
  * @deprecated Use workspace.collections.get() instead
606
- * Get a single collection by slug
607
543
  */
608
544
  getCollection(slug: string): Promise<MarvinCollection | null>;
609
545
  /**
610
546
  * @deprecated Use workspace.collections.entries() instead
611
- * Get all entries in a collection
612
547
  */
613
- getCollectionEntries(slug: string): Promise<MarvinEntry[]>;
548
+ getCollectionEntries(slug: string): Promise<MarvinEntryListItem[]>;
614
549
  /**
615
550
  * @deprecated Use workspace.assets.list() instead
616
- * Get all published assets
617
551
  */
618
552
  getAssets(options?: GetAssetsOptions): Promise<MarvinAsset[]>;
619
553
  /**
620
554
  * @deprecated Use workspace.resources.list() instead
621
- * Get all published resources
622
555
  */
623
556
  getResources(options?: GetResourcesOptions$1): Promise<MarvinResource[]>;
624
557
  /**
625
558
  * @deprecated Use workspace.resources.get() instead
626
- * Get a single resource by slug
627
559
  */
628
560
  getResource(slug: string): Promise<MarvinResource>;
629
561
  /**
630
562
  * @deprecated Use workspace.resources.entries() instead
631
- * Get entries that reference a resource
632
563
  */
633
- getResourceEntries(slug: string): Promise<MarvinEntry[]>;
564
+ getResourceEntries(slug: string): Promise<string[]>;
634
565
  }
635
566
 
636
567
  export { Collection as C, Entry as E, type MarvinConfig as M, type PaginatedResponse as P, Resource as R, Workspace as W, MarvinClient as a, MarvinApiError as b, MarvinAuthError as c, MarvinCache as d, MarvinConfigError as e, MarvinError as f, MarvinNetworkError as g, MarvinNotFoundError as h, MarvinServerError as i, MarvinValidationError as j, type PaginationMeta as k, type PaginationParams as l, createConfigFromEnv as m, createPaginatedResponse as n, extractData as o, isPaginatedResponse as p, offsetToPage as q, pageToOffset as r };
package/dist/platform.cjs CHANGED
@@ -1568,53 +1568,40 @@ var EmailTemplatesClient = class {
1568
1568
  http;
1569
1569
  /**
1570
1570
  * List all email templates for the workspace
1571
- * @param groupId - Workspace ID
1572
1571
  */
1573
1572
  async list(groupId) {
1574
1573
  return this.http.get(`/api/platform/workspaces/${groupId}/email-templates`);
1575
1574
  }
1576
1575
  /**
1577
1576
  * Get a specific email template
1578
- * @param groupId - Workspace ID
1579
- * @param templateId - Template ID
1580
1577
  */
1581
1578
  async get(groupId, templateId) {
1582
1579
  return this.http.get(`/api/platform/workspaces/${groupId}/email-templates/${templateId}`);
1583
1580
  }
1584
1581
  /**
1585
1582
  * Create a new email template
1586
- * @param groupId - Workspace ID
1587
- * @param data - Template data
1588
1583
  */
1589
1584
  async create(groupId, data) {
1590
1585
  return this.http.post(`/api/platform/workspaces/${groupId}/email-templates`, data);
1591
1586
  }
1592
1587
  /**
1593
1588
  * Update an email template
1594
- * @param groupId - Workspace ID
1595
- * @param templateId - Template ID
1596
- * @param data - Updated template data
1597
1589
  */
1598
1590
  async update(groupId, templateId, data) {
1599
1591
  return this.http.patch(`/api/platform/workspaces/${groupId}/email-templates/${templateId}`, data);
1600
1592
  }
1601
1593
  /**
1602
1594
  * Delete an email template
1603
- * @param groupId - Workspace ID
1604
- * @param templateId - Template ID
1605
1595
  */
1606
1596
  async delete(groupId, templateId) {
1607
1597
  await this.http.delete(`/api/platform/workspaces/${groupId}/email-templates/${templateId}`);
1608
1598
  }
1609
1599
  /**
1610
1600
  * Send a test email using a template
1611
- * @param groupId - Workspace ID
1612
- * @param templateId - Template ID
1613
- * @param recipientEmail - Test recipient email address
1614
1601
  */
1615
1602
  async sendTest(groupId, templateId, recipientEmail) {
1616
1603
  return this.http.post(`/api/platform/workspaces/${groupId}/email-templates/${templateId}/test`, {
1617
- recipient_email: recipientEmail
1604
+ email: recipientEmail
1618
1605
  });
1619
1606
  }
1620
1607
  };