@inneropen/marvin-sdk 2.0.0-next.22 → 2.0.0-next.23
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/{chunk-SGZG7U7V.js → chunk-CIFRKLJS.js} +25 -77
- package/dist/index.cjs +25 -77
- package/dist/index.d.cts +3 -3
- package/dist/index.d.ts +3 -3
- package/dist/index.js +1 -1
- package/dist/{marvin-BmbMUJXh.d.ts → marvin-B6kWCfmU.d.ts} +26 -56
- package/dist/{marvin-BAslemIz.d.cts → marvin-ixVRMtIS.d.cts} +26 -56
- package/dist/platform.d.cts +1 -0
- package/dist/platform.d.ts +1 -0
- package/dist/publish.cjs +25 -77
- package/dist/publish.d.cts +3 -3
- package/dist/publish.d.ts +3 -3
- package/dist/publish.js +1 -1
- package/dist/types/index.d.cts +66 -61
- package/dist/types/index.d.ts +66 -61
- package/package.json +1 -1
|
@@ -141,113 +141,61 @@ var init_entry = __esm({
|
|
|
141
141
|
"src/entries/entry.ts"() {
|
|
142
142
|
"use strict";
|
|
143
143
|
Entry = class {
|
|
144
|
-
constructor(
|
|
145
|
-
this.
|
|
144
|
+
constructor(raw, http, workspaceSlug) {
|
|
145
|
+
this.raw = raw;
|
|
146
146
|
this.http = http;
|
|
147
147
|
this.workspaceSlug = workspaceSlug;
|
|
148
148
|
}
|
|
149
|
-
|
|
149
|
+
raw;
|
|
150
150
|
http;
|
|
151
151
|
workspaceSlug;
|
|
152
|
-
// Expose all entry data as properties
|
|
153
|
-
get id() {
|
|
154
|
-
return this.data.id;
|
|
155
|
-
}
|
|
156
152
|
get title() {
|
|
157
|
-
return this.
|
|
153
|
+
return this.raw.title;
|
|
158
154
|
}
|
|
159
155
|
get slug() {
|
|
160
|
-
return this.
|
|
156
|
+
return this.raw.slug;
|
|
161
157
|
}
|
|
162
158
|
get summary() {
|
|
163
|
-
return this.
|
|
159
|
+
return this.raw.summary;
|
|
164
160
|
}
|
|
165
|
-
get
|
|
166
|
-
return this.
|
|
167
|
-
}
|
|
168
|
-
/**
|
|
169
|
-
* @deprecated Use field('body') or dataJson instead. Will be removed in v3.0.0
|
|
170
|
-
*/
|
|
171
|
-
get contentMarkdown() {
|
|
172
|
-
return this.data.contentMarkdown;
|
|
161
|
+
get entryType() {
|
|
162
|
+
return this.raw.entryType;
|
|
173
163
|
}
|
|
174
|
-
|
|
175
|
-
|
|
176
|
-
* Access specific fields using the field() helper method.
|
|
177
|
-
* @since 2.0.0
|
|
178
|
-
*/
|
|
179
|
-
get dataJson() {
|
|
180
|
-
return this.data.dataJson;
|
|
164
|
+
get entryTypeInfo() {
|
|
165
|
+
return this.raw.entryTypeInfo;
|
|
181
166
|
}
|
|
182
|
-
get
|
|
183
|
-
return this.data
|
|
167
|
+
get data() {
|
|
168
|
+
return this.raw.data;
|
|
184
169
|
}
|
|
185
|
-
get
|
|
186
|
-
return this.
|
|
170
|
+
get metadataJson() {
|
|
171
|
+
return this.raw.metadataJson;
|
|
187
172
|
}
|
|
188
173
|
get publishedAt() {
|
|
189
|
-
return this.
|
|
190
|
-
}
|
|
191
|
-
get createdAt() {
|
|
192
|
-
return this.data.createdAt;
|
|
193
|
-
}
|
|
194
|
-
get updatedAt() {
|
|
195
|
-
return this.data.updatedAt;
|
|
196
|
-
}
|
|
197
|
-
get entryTypeId() {
|
|
198
|
-
return this.data.entryTypeId;
|
|
174
|
+
return this.raw.publishedAt;
|
|
199
175
|
}
|
|
200
|
-
get
|
|
201
|
-
return this.
|
|
176
|
+
get order() {
|
|
177
|
+
return this.raw.order;
|
|
202
178
|
}
|
|
203
|
-
/**
|
|
204
|
-
* Get entry assets
|
|
205
|
-
*/
|
|
206
179
|
get assets() {
|
|
207
|
-
return this.
|
|
180
|
+
return this.raw.assets;
|
|
208
181
|
}
|
|
209
|
-
/**
|
|
210
|
-
* Get entry collections
|
|
211
|
-
*/
|
|
212
182
|
get collections() {
|
|
213
|
-
return this.
|
|
183
|
+
return this.raw.collections;
|
|
184
|
+
}
|
|
185
|
+
get resources() {
|
|
186
|
+
return this.raw.resources;
|
|
214
187
|
}
|
|
215
|
-
/**
|
|
216
|
-
* Get a specific field value from the entry's schema-driven content (dataJson).
|
|
217
|
-
*
|
|
218
|
-
* @param key - Field key as defined in the entry type's schema
|
|
219
|
-
* @returns The field value, or undefined if not present
|
|
220
|
-
* @since 2.0.0
|
|
221
|
-
*
|
|
222
|
-
* @example
|
|
223
|
-
* ```typescript
|
|
224
|
-
* const entry = await client.entries.get('my-entry');
|
|
225
|
-
* const body = entry.field('body'); // Get markdown body
|
|
226
|
-
* const difficulty = entry.field('difficulty'); // Get difficulty level
|
|
227
|
-
* const heroImage = entry.field('heroImage'); // Get hero image UUID
|
|
228
|
-
* ```
|
|
229
|
-
*/
|
|
230
188
|
field(key) {
|
|
231
|
-
return this.data
|
|
189
|
+
return this.raw.data[key];
|
|
232
190
|
}
|
|
233
|
-
/**
|
|
234
|
-
* Get all fields from the entry's schema-driven content.
|
|
235
|
-
* @since 2.0.0
|
|
236
|
-
*/
|
|
237
191
|
get fields() {
|
|
238
|
-
return this.data
|
|
192
|
+
return this.raw.data;
|
|
239
193
|
}
|
|
240
|
-
/**
|
|
241
|
-
* Get related entries (future)
|
|
242
|
-
*/
|
|
243
194
|
async relatedEntries() {
|
|
244
195
|
throw new Error("Related entries not yet implemented");
|
|
245
196
|
}
|
|
246
|
-
/**
|
|
247
|
-
* Get raw entry data
|
|
248
|
-
*/
|
|
249
197
|
toJSON() {
|
|
250
|
-
return this.
|
|
198
|
+
return this.raw;
|
|
251
199
|
}
|
|
252
200
|
};
|
|
253
201
|
}
|
package/dist/index.cjs
CHANGED
|
@@ -869,113 +869,61 @@ var init_entry = __esm({
|
|
|
869
869
|
"src/entries/entry.ts"() {
|
|
870
870
|
"use strict";
|
|
871
871
|
Entry = class {
|
|
872
|
-
constructor(
|
|
873
|
-
this.
|
|
872
|
+
constructor(raw, http, workspaceSlug) {
|
|
873
|
+
this.raw = raw;
|
|
874
874
|
this.http = http;
|
|
875
875
|
this.workspaceSlug = workspaceSlug;
|
|
876
876
|
}
|
|
877
|
-
|
|
877
|
+
raw;
|
|
878
878
|
http;
|
|
879
879
|
workspaceSlug;
|
|
880
|
-
// Expose all entry data as properties
|
|
881
|
-
get id() {
|
|
882
|
-
return this.data.id;
|
|
883
|
-
}
|
|
884
880
|
get title() {
|
|
885
|
-
return this.
|
|
881
|
+
return this.raw.title;
|
|
886
882
|
}
|
|
887
883
|
get slug() {
|
|
888
|
-
return this.
|
|
884
|
+
return this.raw.slug;
|
|
889
885
|
}
|
|
890
886
|
get summary() {
|
|
891
|
-
return this.
|
|
892
|
-
}
|
|
893
|
-
get description() {
|
|
894
|
-
return this.data.description;
|
|
887
|
+
return this.raw.summary;
|
|
895
888
|
}
|
|
896
|
-
|
|
897
|
-
|
|
898
|
-
*/
|
|
899
|
-
get contentMarkdown() {
|
|
900
|
-
return this.data.contentMarkdown;
|
|
889
|
+
get entryType() {
|
|
890
|
+
return this.raw.entryType;
|
|
901
891
|
}
|
|
902
|
-
|
|
903
|
-
|
|
904
|
-
* Access specific fields using the field() helper method.
|
|
905
|
-
* @since 2.0.0
|
|
906
|
-
*/
|
|
907
|
-
get dataJson() {
|
|
908
|
-
return this.data.dataJson;
|
|
892
|
+
get entryTypeInfo() {
|
|
893
|
+
return this.raw.entryTypeInfo;
|
|
909
894
|
}
|
|
910
|
-
get
|
|
911
|
-
return this.data
|
|
895
|
+
get data() {
|
|
896
|
+
return this.raw.data;
|
|
912
897
|
}
|
|
913
|
-
get
|
|
914
|
-
return this.
|
|
898
|
+
get metadataJson() {
|
|
899
|
+
return this.raw.metadataJson;
|
|
915
900
|
}
|
|
916
901
|
get publishedAt() {
|
|
917
|
-
return this.
|
|
918
|
-
}
|
|
919
|
-
get createdAt() {
|
|
920
|
-
return this.data.createdAt;
|
|
921
|
-
}
|
|
922
|
-
get updatedAt() {
|
|
923
|
-
return this.data.updatedAt;
|
|
902
|
+
return this.raw.publishedAt;
|
|
924
903
|
}
|
|
925
|
-
get
|
|
926
|
-
return this.
|
|
904
|
+
get order() {
|
|
905
|
+
return this.raw.order;
|
|
927
906
|
}
|
|
928
|
-
get entryType() {
|
|
929
|
-
return this.data.entryType;
|
|
930
|
-
}
|
|
931
|
-
/**
|
|
932
|
-
* Get entry assets
|
|
933
|
-
*/
|
|
934
907
|
get assets() {
|
|
935
|
-
return this.
|
|
908
|
+
return this.raw.assets;
|
|
936
909
|
}
|
|
937
|
-
/**
|
|
938
|
-
* Get entry collections
|
|
939
|
-
*/
|
|
940
910
|
get collections() {
|
|
941
|
-
return this.
|
|
911
|
+
return this.raw.collections;
|
|
912
|
+
}
|
|
913
|
+
get resources() {
|
|
914
|
+
return this.raw.resources;
|
|
942
915
|
}
|
|
943
|
-
/**
|
|
944
|
-
* Get a specific field value from the entry's schema-driven content (dataJson).
|
|
945
|
-
*
|
|
946
|
-
* @param key - Field key as defined in the entry type's schema
|
|
947
|
-
* @returns The field value, or undefined if not present
|
|
948
|
-
* @since 2.0.0
|
|
949
|
-
*
|
|
950
|
-
* @example
|
|
951
|
-
* ```typescript
|
|
952
|
-
* const entry = await client.entries.get('my-entry');
|
|
953
|
-
* const body = entry.field('body'); // Get markdown body
|
|
954
|
-
* const difficulty = entry.field('difficulty'); // Get difficulty level
|
|
955
|
-
* const heroImage = entry.field('heroImage'); // Get hero image UUID
|
|
956
|
-
* ```
|
|
957
|
-
*/
|
|
958
916
|
field(key) {
|
|
959
|
-
return this.data
|
|
917
|
+
return this.raw.data[key];
|
|
960
918
|
}
|
|
961
|
-
/**
|
|
962
|
-
* Get all fields from the entry's schema-driven content.
|
|
963
|
-
* @since 2.0.0
|
|
964
|
-
*/
|
|
965
919
|
get fields() {
|
|
966
|
-
return this.data
|
|
920
|
+
return this.raw.data;
|
|
967
921
|
}
|
|
968
|
-
/**
|
|
969
|
-
* Get related entries (future)
|
|
970
|
-
*/
|
|
971
922
|
async relatedEntries() {
|
|
972
923
|
throw new Error("Related entries not yet implemented");
|
|
973
924
|
}
|
|
974
|
-
/**
|
|
975
|
-
* Get raw entry data
|
|
976
|
-
*/
|
|
977
925
|
toJSON() {
|
|
978
|
-
return this.
|
|
926
|
+
return this.raw;
|
|
979
927
|
}
|
|
980
928
|
};
|
|
981
929
|
}
|
package/dist/index.d.cts
CHANGED
|
@@ -1,9 +1,9 @@
|
|
|
1
|
-
import { M as MarvinConfig, a as MarvinClient } from './marvin-
|
|
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-
|
|
1
|
+
import { M as MarvinConfig, a as MarvinClient } from './marvin-ixVRMtIS.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-ixVRMtIS.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
5
|
import { AuthToken as AuthToken$1 } from './types/index.cjs';
|
|
6
|
-
export { GetAssetsOptions, GetEntriesOptions, GetResourcesOptions, MarvinAsset, MarvinCollection, MarvinEntry, MarvinEntryType, MarvinPublishResponse, MarvinResource, MarvinSite, PublishedEntryType } from './types/index.cjs';
|
|
6
|
+
export { GetAssetsOptions, GetEntriesOptions, GetResourcesOptions, MarvinAsset, MarvinCollection, MarvinEntry, MarvinEntryType, MarvinPublishResponse, MarvinResource, MarvinSite, PublishedAssetRead, PublishedCollectionSummary, PublishedEntryType, PublishedResourceRead } from './types/index.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-
|
|
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-
|
|
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';
|
|
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, PublishedEntryType } from './types/index.js';
|
|
6
|
+
export { GetAssetsOptions, GetEntriesOptions, GetResourcesOptions, MarvinAsset, MarvinCollection, MarvinEntry, 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
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { PublishedEntryType, MarvinResource, MarvinEntry, MarvinAsset, MarvinCollection,
|
|
1
|
+
import { PublishedEntryType, MarvinResource, MarvinEntry, MarvinAsset, MarvinCollection, PublishedAssetRead, PublishedCollectionSummary, PublishedResourceRead, MarvinSite, GetResourcesOptions as GetResourcesOptions$1 } from './types/index.js';
|
|
2
2
|
import { H as HttpClient } from './HttpClient-CdF3IHM1.js';
|
|
3
3
|
|
|
4
4
|
/**
|
|
@@ -380,69 +380,39 @@ declare class CollectionsModule {
|
|
|
380
380
|
}): Promise<MarvinEntry[]>;
|
|
381
381
|
}
|
|
382
382
|
|
|
383
|
+
/**
|
|
384
|
+
* Entry - Rich object representing a single entry
|
|
385
|
+
*/
|
|
386
|
+
|
|
383
387
|
declare class Entry {
|
|
384
|
-
private
|
|
388
|
+
private raw;
|
|
385
389
|
private http;
|
|
386
390
|
private workspaceSlug;
|
|
387
|
-
constructor(
|
|
388
|
-
get id(): string;
|
|
391
|
+
constructor(raw: MarvinEntry, http: MarvinHttpClient, workspaceSlug: string);
|
|
389
392
|
get title(): string;
|
|
390
393
|
get slug(): string;
|
|
391
|
-
get summary(): string | undefined;
|
|
392
|
-
get
|
|
393
|
-
|
|
394
|
-
|
|
395
|
-
|
|
396
|
-
|
|
397
|
-
|
|
398
|
-
|
|
399
|
-
|
|
400
|
-
|
|
401
|
-
|
|
402
|
-
|
|
403
|
-
get
|
|
404
|
-
get
|
|
405
|
-
get publishedAt(): string | undefined;
|
|
406
|
-
get
|
|
407
|
-
get
|
|
408
|
-
get
|
|
409
|
-
get
|
|
410
|
-
/**
|
|
411
|
-
* Get entry assets
|
|
412
|
-
*/
|
|
413
|
-
get assets(): MarvinAsset[];
|
|
414
|
-
/**
|
|
415
|
-
* Get entry collections
|
|
416
|
-
*/
|
|
417
|
-
get collections(): MarvinCollection[];
|
|
418
|
-
/**
|
|
419
|
-
* Get a specific field value from the entry's schema-driven content (dataJson).
|
|
420
|
-
*
|
|
421
|
-
* @param key - Field key as defined in the entry type's schema
|
|
422
|
-
* @returns The field value, or undefined if not present
|
|
423
|
-
* @since 2.0.0
|
|
424
|
-
*
|
|
425
|
-
* @example
|
|
426
|
-
* ```typescript
|
|
427
|
-
* const entry = await client.entries.get('my-entry');
|
|
428
|
-
* const body = entry.field('body'); // Get markdown body
|
|
429
|
-
* const difficulty = entry.field('difficulty'); // Get difficulty level
|
|
430
|
-
* const heroImage = entry.field('heroImage'); // Get hero image UUID
|
|
431
|
-
* ```
|
|
432
|
-
*/
|
|
394
|
+
get summary(): string | null | undefined;
|
|
395
|
+
get entryType(): string;
|
|
396
|
+
get entryTypeInfo(): {
|
|
397
|
+
slug: string;
|
|
398
|
+
renderer?: string | null;
|
|
399
|
+
package?: string | null;
|
|
400
|
+
version?: string | null;
|
|
401
|
+
config?: Record<string, unknown> | null;
|
|
402
|
+
publishable: boolean;
|
|
403
|
+
submittable: boolean;
|
|
404
|
+
routable: boolean;
|
|
405
|
+
} | null | undefined;
|
|
406
|
+
get data(): Record<string, unknown>;
|
|
407
|
+
get metadataJson(): Record<string, unknown> | null | undefined;
|
|
408
|
+
get publishedAt(): string | null | undefined;
|
|
409
|
+
get order(): number | null | undefined;
|
|
410
|
+
get assets(): PublishedAssetRead[];
|
|
411
|
+
get collections(): PublishedCollectionSummary[];
|
|
412
|
+
get resources(): PublishedResourceRead[];
|
|
433
413
|
field<T = unknown>(key: string): T | undefined;
|
|
434
|
-
/**
|
|
435
|
-
* Get all fields from the entry's schema-driven content.
|
|
436
|
-
* @since 2.0.0
|
|
437
|
-
*/
|
|
438
414
|
get fields(): Record<string, unknown>;
|
|
439
|
-
/**
|
|
440
|
-
* Get related entries (future)
|
|
441
|
-
*/
|
|
442
415
|
relatedEntries(): Promise<MarvinEntry[]>;
|
|
443
|
-
/**
|
|
444
|
-
* Get raw entry data
|
|
445
|
-
*/
|
|
446
416
|
toJSON(): MarvinEntry;
|
|
447
417
|
}
|
|
448
418
|
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { PublishedEntryType, MarvinResource, MarvinEntry, MarvinAsset, MarvinCollection,
|
|
1
|
+
import { PublishedEntryType, MarvinResource, MarvinEntry, MarvinAsset, MarvinCollection, PublishedAssetRead, PublishedCollectionSummary, PublishedResourceRead, MarvinSite, GetResourcesOptions as GetResourcesOptions$1 } from './types/index.cjs';
|
|
2
2
|
import { H as HttpClient } from './HttpClient-CdF3IHM1.cjs';
|
|
3
3
|
|
|
4
4
|
/**
|
|
@@ -380,69 +380,39 @@ declare class CollectionsModule {
|
|
|
380
380
|
}): Promise<MarvinEntry[]>;
|
|
381
381
|
}
|
|
382
382
|
|
|
383
|
+
/**
|
|
384
|
+
* Entry - Rich object representing a single entry
|
|
385
|
+
*/
|
|
386
|
+
|
|
383
387
|
declare class Entry {
|
|
384
|
-
private
|
|
388
|
+
private raw;
|
|
385
389
|
private http;
|
|
386
390
|
private workspaceSlug;
|
|
387
|
-
constructor(
|
|
388
|
-
get id(): string;
|
|
391
|
+
constructor(raw: MarvinEntry, http: MarvinHttpClient, workspaceSlug: string);
|
|
389
392
|
get title(): string;
|
|
390
393
|
get slug(): string;
|
|
391
|
-
get summary(): string | undefined;
|
|
392
|
-
get
|
|
393
|
-
|
|
394
|
-
|
|
395
|
-
|
|
396
|
-
|
|
397
|
-
|
|
398
|
-
|
|
399
|
-
|
|
400
|
-
|
|
401
|
-
|
|
402
|
-
|
|
403
|
-
get
|
|
404
|
-
get
|
|
405
|
-
get publishedAt(): string | undefined;
|
|
406
|
-
get
|
|
407
|
-
get
|
|
408
|
-
get
|
|
409
|
-
get
|
|
410
|
-
/**
|
|
411
|
-
* Get entry assets
|
|
412
|
-
*/
|
|
413
|
-
get assets(): MarvinAsset[];
|
|
414
|
-
/**
|
|
415
|
-
* Get entry collections
|
|
416
|
-
*/
|
|
417
|
-
get collections(): MarvinCollection[];
|
|
418
|
-
/**
|
|
419
|
-
* Get a specific field value from the entry's schema-driven content (dataJson).
|
|
420
|
-
*
|
|
421
|
-
* @param key - Field key as defined in the entry type's schema
|
|
422
|
-
* @returns The field value, or undefined if not present
|
|
423
|
-
* @since 2.0.0
|
|
424
|
-
*
|
|
425
|
-
* @example
|
|
426
|
-
* ```typescript
|
|
427
|
-
* const entry = await client.entries.get('my-entry');
|
|
428
|
-
* const body = entry.field('body'); // Get markdown body
|
|
429
|
-
* const difficulty = entry.field('difficulty'); // Get difficulty level
|
|
430
|
-
* const heroImage = entry.field('heroImage'); // Get hero image UUID
|
|
431
|
-
* ```
|
|
432
|
-
*/
|
|
394
|
+
get summary(): string | null | undefined;
|
|
395
|
+
get entryType(): string;
|
|
396
|
+
get entryTypeInfo(): {
|
|
397
|
+
slug: string;
|
|
398
|
+
renderer?: string | null;
|
|
399
|
+
package?: string | null;
|
|
400
|
+
version?: string | null;
|
|
401
|
+
config?: Record<string, unknown> | null;
|
|
402
|
+
publishable: boolean;
|
|
403
|
+
submittable: boolean;
|
|
404
|
+
routable: boolean;
|
|
405
|
+
} | null | undefined;
|
|
406
|
+
get data(): Record<string, unknown>;
|
|
407
|
+
get metadataJson(): Record<string, unknown> | null | undefined;
|
|
408
|
+
get publishedAt(): string | null | undefined;
|
|
409
|
+
get order(): number | null | undefined;
|
|
410
|
+
get assets(): PublishedAssetRead[];
|
|
411
|
+
get collections(): PublishedCollectionSummary[];
|
|
412
|
+
get resources(): PublishedResourceRead[];
|
|
433
413
|
field<T = unknown>(key: string): T | undefined;
|
|
434
|
-
/**
|
|
435
|
-
* Get all fields from the entry's schema-driven content.
|
|
436
|
-
* @since 2.0.0
|
|
437
|
-
*/
|
|
438
414
|
get fields(): Record<string, unknown>;
|
|
439
|
-
/**
|
|
440
|
-
* Get related entries (future)
|
|
441
|
-
*/
|
|
442
415
|
relatedEntries(): Promise<MarvinEntry[]>;
|
|
443
|
-
/**
|
|
444
|
-
* Get raw entry data
|
|
445
|
-
*/
|
|
446
416
|
toJSON(): MarvinEntry;
|
|
447
417
|
}
|
|
448
418
|
|
package/dist/platform.d.cts
CHANGED
package/dist/platform.d.ts
CHANGED
package/dist/publish.cjs
CHANGED
|
@@ -724,113 +724,61 @@ var MarvinHttpClient = class extends HttpClient {
|
|
|
724
724
|
|
|
725
725
|
// src/entries/entry.ts
|
|
726
726
|
var Entry = class {
|
|
727
|
-
constructor(
|
|
728
|
-
this.
|
|
727
|
+
constructor(raw, http, workspaceSlug) {
|
|
728
|
+
this.raw = raw;
|
|
729
729
|
this.http = http;
|
|
730
730
|
this.workspaceSlug = workspaceSlug;
|
|
731
731
|
}
|
|
732
|
-
|
|
732
|
+
raw;
|
|
733
733
|
http;
|
|
734
734
|
workspaceSlug;
|
|
735
|
-
// Expose all entry data as properties
|
|
736
|
-
get id() {
|
|
737
|
-
return this.data.id;
|
|
738
|
-
}
|
|
739
735
|
get title() {
|
|
740
|
-
return this.
|
|
736
|
+
return this.raw.title;
|
|
741
737
|
}
|
|
742
738
|
get slug() {
|
|
743
|
-
return this.
|
|
739
|
+
return this.raw.slug;
|
|
744
740
|
}
|
|
745
741
|
get summary() {
|
|
746
|
-
return this.
|
|
747
|
-
}
|
|
748
|
-
get description() {
|
|
749
|
-
return this.data.description;
|
|
742
|
+
return this.raw.summary;
|
|
750
743
|
}
|
|
751
|
-
|
|
752
|
-
|
|
753
|
-
*/
|
|
754
|
-
get contentMarkdown() {
|
|
755
|
-
return this.data.contentMarkdown;
|
|
744
|
+
get entryType() {
|
|
745
|
+
return this.raw.entryType;
|
|
756
746
|
}
|
|
757
|
-
|
|
758
|
-
|
|
759
|
-
* Access specific fields using the field() helper method.
|
|
760
|
-
* @since 2.0.0
|
|
761
|
-
*/
|
|
762
|
-
get dataJson() {
|
|
763
|
-
return this.data.dataJson;
|
|
747
|
+
get entryTypeInfo() {
|
|
748
|
+
return this.raw.entryTypeInfo;
|
|
764
749
|
}
|
|
765
|
-
get
|
|
766
|
-
return this.data
|
|
750
|
+
get data() {
|
|
751
|
+
return this.raw.data;
|
|
767
752
|
}
|
|
768
|
-
get
|
|
769
|
-
return this.
|
|
753
|
+
get metadataJson() {
|
|
754
|
+
return this.raw.metadataJson;
|
|
770
755
|
}
|
|
771
756
|
get publishedAt() {
|
|
772
|
-
return this.
|
|
773
|
-
}
|
|
774
|
-
get createdAt() {
|
|
775
|
-
return this.data.createdAt;
|
|
776
|
-
}
|
|
777
|
-
get updatedAt() {
|
|
778
|
-
return this.data.updatedAt;
|
|
757
|
+
return this.raw.publishedAt;
|
|
779
758
|
}
|
|
780
|
-
get
|
|
781
|
-
return this.
|
|
759
|
+
get order() {
|
|
760
|
+
return this.raw.order;
|
|
782
761
|
}
|
|
783
|
-
get entryType() {
|
|
784
|
-
return this.data.entryType;
|
|
785
|
-
}
|
|
786
|
-
/**
|
|
787
|
-
* Get entry assets
|
|
788
|
-
*/
|
|
789
762
|
get assets() {
|
|
790
|
-
return this.
|
|
763
|
+
return this.raw.assets;
|
|
791
764
|
}
|
|
792
|
-
/**
|
|
793
|
-
* Get entry collections
|
|
794
|
-
*/
|
|
795
765
|
get collections() {
|
|
796
|
-
return this.
|
|
766
|
+
return this.raw.collections;
|
|
767
|
+
}
|
|
768
|
+
get resources() {
|
|
769
|
+
return this.raw.resources;
|
|
797
770
|
}
|
|
798
|
-
/**
|
|
799
|
-
* Get a specific field value from the entry's schema-driven content (dataJson).
|
|
800
|
-
*
|
|
801
|
-
* @param key - Field key as defined in the entry type's schema
|
|
802
|
-
* @returns The field value, or undefined if not present
|
|
803
|
-
* @since 2.0.0
|
|
804
|
-
*
|
|
805
|
-
* @example
|
|
806
|
-
* ```typescript
|
|
807
|
-
* const entry = await client.entries.get('my-entry');
|
|
808
|
-
* const body = entry.field('body'); // Get markdown body
|
|
809
|
-
* const difficulty = entry.field('difficulty'); // Get difficulty level
|
|
810
|
-
* const heroImage = entry.field('heroImage'); // Get hero image UUID
|
|
811
|
-
* ```
|
|
812
|
-
*/
|
|
813
771
|
field(key) {
|
|
814
|
-
return this.data
|
|
772
|
+
return this.raw.data[key];
|
|
815
773
|
}
|
|
816
|
-
/**
|
|
817
|
-
* Get all fields from the entry's schema-driven content.
|
|
818
|
-
* @since 2.0.0
|
|
819
|
-
*/
|
|
820
774
|
get fields() {
|
|
821
|
-
return this.data
|
|
775
|
+
return this.raw.data;
|
|
822
776
|
}
|
|
823
|
-
/**
|
|
824
|
-
* Get related entries (future)
|
|
825
|
-
*/
|
|
826
777
|
async relatedEntries() {
|
|
827
778
|
throw new Error("Related entries not yet implemented");
|
|
828
779
|
}
|
|
829
|
-
/**
|
|
830
|
-
* Get raw entry data
|
|
831
|
-
*/
|
|
832
780
|
toJSON() {
|
|
833
|
-
return this.
|
|
781
|
+
return this.raw;
|
|
834
782
|
}
|
|
835
783
|
};
|
|
836
784
|
|
package/dist/publish.d.cts
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import { M as MarvinConfig, a as MarvinClient } from './marvin-
|
|
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-
|
|
3
|
-
export { GetAssetsOptions, GetEntriesOptions, GetResourcesOptions, MarvinAsset, MarvinCollection, MarvinEntry, MarvinEntryType, MarvinPublishResponse, MarvinResource, MarvinSite } from './types/index.cjs';
|
|
1
|
+
import { M as MarvinConfig, a as MarvinClient } from './marvin-ixVRMtIS.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-ixVRMtIS.cjs';
|
|
3
|
+
export { GetAssetsOptions, GetEntriesOptions, GetResourcesOptions, MarvinAsset, MarvinCollection, MarvinEntry, MarvinEntryType, MarvinPublishResponse, MarvinResource, MarvinSite, PublishedAssetRead, PublishedCollectionSummary, PublishedResourceRead } from './types/index.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-
|
|
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-
|
|
3
|
-
export { GetAssetsOptions, GetEntriesOptions, GetResourcesOptions, MarvinAsset, MarvinCollection, MarvinEntry, MarvinEntryType, MarvinPublishResponse, MarvinResource, MarvinSite } from './types/index.js';
|
|
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';
|
|
3
|
+
export { GetAssetsOptions, GetEntriesOptions, GetResourcesOptions, MarvinAsset, MarvinCollection, MarvinEntry, MarvinEntryType, MarvinPublishResponse, MarvinResource, MarvinSite, PublishedAssetRead, PublishedCollectionSummary, PublishedResourceRead } from './types/index.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
package/dist/types/index.d.cts
CHANGED
|
@@ -19,30 +19,21 @@ interface MarvinSite {
|
|
|
19
19
|
}
|
|
20
20
|
interface MarvinEntryType {
|
|
21
21
|
id: string;
|
|
22
|
+
groupId: string | null;
|
|
22
23
|
name: string;
|
|
23
24
|
slug: string;
|
|
24
|
-
icon?: string;
|
|
25
|
-
color?: string;
|
|
26
|
-
description?: string;
|
|
25
|
+
icon?: string | null;
|
|
26
|
+
color?: string | null;
|
|
27
|
+
description?: string | null;
|
|
27
28
|
sortOrder: number;
|
|
28
29
|
isSystem: boolean;
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
renderer?: string;
|
|
37
|
-
package?: string;
|
|
38
|
-
version?: string;
|
|
39
|
-
config?: Record<string, unknown>;
|
|
40
|
-
};
|
|
41
|
-
capabilities?: {
|
|
42
|
-
publishable?: boolean;
|
|
43
|
-
submittable?: boolean;
|
|
44
|
-
routable?: boolean;
|
|
45
|
-
};
|
|
30
|
+
isRendered: boolean;
|
|
31
|
+
schemaJson?: Record<string, unknown> | null;
|
|
32
|
+
renderingJson?: Record<string, unknown> | null;
|
|
33
|
+
capabilitiesJson?: Record<string, unknown> | null;
|
|
34
|
+
createdAt?: string | null;
|
|
35
|
+
updateAt?: string | null;
|
|
36
|
+
warnings?: string[] | null;
|
|
46
37
|
}
|
|
47
38
|
interface MarvinAsset {
|
|
48
39
|
id: string;
|
|
@@ -114,46 +105,60 @@ interface MarvinResource {
|
|
|
114
105
|
createdAt: string;
|
|
115
106
|
updatedAt: string;
|
|
116
107
|
}
|
|
108
|
+
interface PublishedCollectionSummary {
|
|
109
|
+
slug: string;
|
|
110
|
+
name: string;
|
|
111
|
+
metadataJson?: Record<string, unknown> | null;
|
|
112
|
+
sortOrder: number;
|
|
113
|
+
}
|
|
114
|
+
interface PublishedResourceRead {
|
|
115
|
+
slug: string;
|
|
116
|
+
name: string;
|
|
117
|
+
resourceType: string;
|
|
118
|
+
description?: string | null;
|
|
119
|
+
url?: string | null;
|
|
120
|
+
externalId?: string | null;
|
|
121
|
+
metadataJson?: Record<string, unknown> | null;
|
|
122
|
+
role?: string | null;
|
|
123
|
+
quantity?: string | null;
|
|
124
|
+
unit?: string | null;
|
|
125
|
+
position: number;
|
|
126
|
+
}
|
|
127
|
+
interface PublishedAssetRead {
|
|
128
|
+
slug: string;
|
|
129
|
+
name: string;
|
|
130
|
+
mimeType: string;
|
|
131
|
+
assetType: string;
|
|
132
|
+
fileSize: number;
|
|
133
|
+
width?: number | null;
|
|
134
|
+
height?: number | null;
|
|
135
|
+
altText?: string | null;
|
|
136
|
+
description?: string | null;
|
|
137
|
+
publicUrl: string;
|
|
138
|
+
metadataJson?: Record<string, unknown> | null;
|
|
139
|
+
}
|
|
117
140
|
interface MarvinEntry {
|
|
118
|
-
id: string;
|
|
119
|
-
title: string;
|
|
120
141
|
slug: string;
|
|
121
|
-
|
|
122
|
-
|
|
123
|
-
/**
|
|
124
|
-
* Schema-driven content data structured according to entry type's schemaJson.
|
|
125
|
-
* @since 2.0.0
|
|
126
|
-
*/
|
|
127
|
-
dataJson?: Record<string, unknown>;
|
|
128
|
-
/**
|
|
129
|
-
* @deprecated Use dataJson instead. Will be removed in v3.0.0
|
|
130
|
-
* @since 1.x
|
|
131
|
-
*/
|
|
132
|
-
contentMarkdown?: string;
|
|
133
|
-
/**
|
|
134
|
-
* Custom non-schema metadata (API keys, external IDs, CMS-specific config).
|
|
135
|
-
* For content fields, use dataJson instead.
|
|
136
|
-
*/
|
|
137
|
-
metadata?: Record<string, unknown>;
|
|
138
|
-
status: string;
|
|
139
|
-
publishedAt?: string;
|
|
140
|
-
createdAt: string;
|
|
141
|
-
updatedAt: string;
|
|
142
|
+
title: string;
|
|
143
|
+
entryType: string;
|
|
142
144
|
entryTypeInfo?: {
|
|
143
145
|
slug: string;
|
|
144
|
-
renderer?: string;
|
|
145
|
-
package?: string;
|
|
146
|
-
version?: string;
|
|
147
|
-
config?: Record<string, unknown
|
|
148
|
-
publishable
|
|
149
|
-
submittable
|
|
150
|
-
routable
|
|
151
|
-
};
|
|
152
|
-
|
|
153
|
-
|
|
154
|
-
|
|
155
|
-
|
|
156
|
-
|
|
146
|
+
renderer?: string | null;
|
|
147
|
+
package?: string | null;
|
|
148
|
+
version?: string | null;
|
|
149
|
+
config?: Record<string, unknown> | null;
|
|
150
|
+
publishable: boolean;
|
|
151
|
+
submittable: boolean;
|
|
152
|
+
routable: boolean;
|
|
153
|
+
} | null;
|
|
154
|
+
summary?: string | null;
|
|
155
|
+
data: Record<string, unknown>;
|
|
156
|
+
publishedAt?: string | null;
|
|
157
|
+
metadataJson?: Record<string, unknown> | null;
|
|
158
|
+
collections: PublishedCollectionSummary[];
|
|
159
|
+
resources: PublishedResourceRead[];
|
|
160
|
+
assets: PublishedAssetRead[];
|
|
161
|
+
order?: number | null;
|
|
157
162
|
}
|
|
158
163
|
interface MarvinPublishResponse<T> {
|
|
159
164
|
data: T;
|
|
@@ -191,10 +196,10 @@ interface PublishedEntryType {
|
|
|
191
196
|
config?: Record<string, unknown>;
|
|
192
197
|
};
|
|
193
198
|
capabilities?: {
|
|
194
|
-
publishable
|
|
195
|
-
submittable
|
|
196
|
-
routable
|
|
197
|
-
};
|
|
199
|
+
publishable: boolean;
|
|
200
|
+
submittable: boolean;
|
|
201
|
+
routable: boolean;
|
|
202
|
+
} | null;
|
|
198
203
|
}
|
|
199
204
|
interface GetResourcesOptions {
|
|
200
205
|
resourceType?: string;
|
|
@@ -210,4 +215,4 @@ interface AuthToken {
|
|
|
210
215
|
tokenType: string;
|
|
211
216
|
}
|
|
212
217
|
|
|
213
|
-
export type { AssetUploadRequest, AuthToken, GetAssetsOptions, GetEntriesOptions, GetResourcesOptions, MarvinAsset, MarvinClientConfig, MarvinCollection, MarvinEntry, MarvinEntryType, MarvinPublishResponse, MarvinResource, MarvinSite, PublishedAsset, PublishedEntryType };
|
|
218
|
+
export type { AssetUploadRequest, AuthToken, GetAssetsOptions, GetEntriesOptions, GetResourcesOptions, MarvinAsset, MarvinClientConfig, MarvinCollection, MarvinEntry, MarvinEntryType, MarvinPublishResponse, MarvinResource, MarvinSite, PublishedAsset, PublishedAssetRead, PublishedCollectionSummary, PublishedEntryType, PublishedResourceRead };
|
package/dist/types/index.d.ts
CHANGED
|
@@ -19,30 +19,21 @@ interface MarvinSite {
|
|
|
19
19
|
}
|
|
20
20
|
interface MarvinEntryType {
|
|
21
21
|
id: string;
|
|
22
|
+
groupId: string | null;
|
|
22
23
|
name: string;
|
|
23
24
|
slug: string;
|
|
24
|
-
icon?: string;
|
|
25
|
-
color?: string;
|
|
26
|
-
description?: string;
|
|
25
|
+
icon?: string | null;
|
|
26
|
+
color?: string | null;
|
|
27
|
+
description?: string | null;
|
|
27
28
|
sortOrder: number;
|
|
28
29
|
isSystem: boolean;
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
renderer?: string;
|
|
37
|
-
package?: string;
|
|
38
|
-
version?: string;
|
|
39
|
-
config?: Record<string, unknown>;
|
|
40
|
-
};
|
|
41
|
-
capabilities?: {
|
|
42
|
-
publishable?: boolean;
|
|
43
|
-
submittable?: boolean;
|
|
44
|
-
routable?: boolean;
|
|
45
|
-
};
|
|
30
|
+
isRendered: boolean;
|
|
31
|
+
schemaJson?: Record<string, unknown> | null;
|
|
32
|
+
renderingJson?: Record<string, unknown> | null;
|
|
33
|
+
capabilitiesJson?: Record<string, unknown> | null;
|
|
34
|
+
createdAt?: string | null;
|
|
35
|
+
updateAt?: string | null;
|
|
36
|
+
warnings?: string[] | null;
|
|
46
37
|
}
|
|
47
38
|
interface MarvinAsset {
|
|
48
39
|
id: string;
|
|
@@ -114,46 +105,60 @@ interface MarvinResource {
|
|
|
114
105
|
createdAt: string;
|
|
115
106
|
updatedAt: string;
|
|
116
107
|
}
|
|
108
|
+
interface PublishedCollectionSummary {
|
|
109
|
+
slug: string;
|
|
110
|
+
name: string;
|
|
111
|
+
metadataJson?: Record<string, unknown> | null;
|
|
112
|
+
sortOrder: number;
|
|
113
|
+
}
|
|
114
|
+
interface PublishedResourceRead {
|
|
115
|
+
slug: string;
|
|
116
|
+
name: string;
|
|
117
|
+
resourceType: string;
|
|
118
|
+
description?: string | null;
|
|
119
|
+
url?: string | null;
|
|
120
|
+
externalId?: string | null;
|
|
121
|
+
metadataJson?: Record<string, unknown> | null;
|
|
122
|
+
role?: string | null;
|
|
123
|
+
quantity?: string | null;
|
|
124
|
+
unit?: string | null;
|
|
125
|
+
position: number;
|
|
126
|
+
}
|
|
127
|
+
interface PublishedAssetRead {
|
|
128
|
+
slug: string;
|
|
129
|
+
name: string;
|
|
130
|
+
mimeType: string;
|
|
131
|
+
assetType: string;
|
|
132
|
+
fileSize: number;
|
|
133
|
+
width?: number | null;
|
|
134
|
+
height?: number | null;
|
|
135
|
+
altText?: string | null;
|
|
136
|
+
description?: string | null;
|
|
137
|
+
publicUrl: string;
|
|
138
|
+
metadataJson?: Record<string, unknown> | null;
|
|
139
|
+
}
|
|
117
140
|
interface MarvinEntry {
|
|
118
|
-
id: string;
|
|
119
|
-
title: string;
|
|
120
141
|
slug: string;
|
|
121
|
-
|
|
122
|
-
|
|
123
|
-
/**
|
|
124
|
-
* Schema-driven content data structured according to entry type's schemaJson.
|
|
125
|
-
* @since 2.0.0
|
|
126
|
-
*/
|
|
127
|
-
dataJson?: Record<string, unknown>;
|
|
128
|
-
/**
|
|
129
|
-
* @deprecated Use dataJson instead. Will be removed in v3.0.0
|
|
130
|
-
* @since 1.x
|
|
131
|
-
*/
|
|
132
|
-
contentMarkdown?: string;
|
|
133
|
-
/**
|
|
134
|
-
* Custom non-schema metadata (API keys, external IDs, CMS-specific config).
|
|
135
|
-
* For content fields, use dataJson instead.
|
|
136
|
-
*/
|
|
137
|
-
metadata?: Record<string, unknown>;
|
|
138
|
-
status: string;
|
|
139
|
-
publishedAt?: string;
|
|
140
|
-
createdAt: string;
|
|
141
|
-
updatedAt: string;
|
|
142
|
+
title: string;
|
|
143
|
+
entryType: string;
|
|
142
144
|
entryTypeInfo?: {
|
|
143
145
|
slug: string;
|
|
144
|
-
renderer?: string;
|
|
145
|
-
package?: string;
|
|
146
|
-
version?: string;
|
|
147
|
-
config?: Record<string, unknown
|
|
148
|
-
publishable
|
|
149
|
-
submittable
|
|
150
|
-
routable
|
|
151
|
-
};
|
|
152
|
-
|
|
153
|
-
|
|
154
|
-
|
|
155
|
-
|
|
156
|
-
|
|
146
|
+
renderer?: string | null;
|
|
147
|
+
package?: string | null;
|
|
148
|
+
version?: string | null;
|
|
149
|
+
config?: Record<string, unknown> | null;
|
|
150
|
+
publishable: boolean;
|
|
151
|
+
submittable: boolean;
|
|
152
|
+
routable: boolean;
|
|
153
|
+
} | null;
|
|
154
|
+
summary?: string | null;
|
|
155
|
+
data: Record<string, unknown>;
|
|
156
|
+
publishedAt?: string | null;
|
|
157
|
+
metadataJson?: Record<string, unknown> | null;
|
|
158
|
+
collections: PublishedCollectionSummary[];
|
|
159
|
+
resources: PublishedResourceRead[];
|
|
160
|
+
assets: PublishedAssetRead[];
|
|
161
|
+
order?: number | null;
|
|
157
162
|
}
|
|
158
163
|
interface MarvinPublishResponse<T> {
|
|
159
164
|
data: T;
|
|
@@ -191,10 +196,10 @@ interface PublishedEntryType {
|
|
|
191
196
|
config?: Record<string, unknown>;
|
|
192
197
|
};
|
|
193
198
|
capabilities?: {
|
|
194
|
-
publishable
|
|
195
|
-
submittable
|
|
196
|
-
routable
|
|
197
|
-
};
|
|
199
|
+
publishable: boolean;
|
|
200
|
+
submittable: boolean;
|
|
201
|
+
routable: boolean;
|
|
202
|
+
} | null;
|
|
198
203
|
}
|
|
199
204
|
interface GetResourcesOptions {
|
|
200
205
|
resourceType?: string;
|
|
@@ -210,4 +215,4 @@ interface AuthToken {
|
|
|
210
215
|
tokenType: string;
|
|
211
216
|
}
|
|
212
217
|
|
|
213
|
-
export type { AssetUploadRequest, AuthToken, GetAssetsOptions, GetEntriesOptions, GetResourcesOptions, MarvinAsset, MarvinClientConfig, MarvinCollection, MarvinEntry, MarvinEntryType, MarvinPublishResponse, MarvinResource, MarvinSite, PublishedAsset, PublishedEntryType };
|
|
218
|
+
export type { AssetUploadRequest, AuthToken, GetAssetsOptions, GetEntriesOptions, GetResourcesOptions, MarvinAsset, MarvinClientConfig, MarvinCollection, MarvinEntry, MarvinEntryType, MarvinPublishResponse, MarvinResource, MarvinSite, PublishedAsset, PublishedAssetRead, PublishedCollectionSummary, PublishedEntryType, PublishedResourceRead };
|