@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.
@@ -4,18 +4,23 @@
4
4
  * TypeScript types for the Marvin publishing API responses.
5
5
  */
6
6
  interface MarvinSite {
7
- id: string;
8
- name: string;
9
- slug: string;
10
- title?: string;
11
- tagline?: string;
12
- description?: string;
13
- canonicalUrl?: string;
14
- logo?: string;
15
- favicon?: string;
16
- locale?: string;
17
- timezone?: string;
18
- metadata?: Record<string, unknown>;
7
+ workspace: {
8
+ slug: string;
9
+ name: string;
10
+ };
11
+ site: {
12
+ title?: string | null;
13
+ tagline?: string | null;
14
+ description?: string | null;
15
+ canonicalUrl?: string | null;
16
+ logo?: string | null;
17
+ favicon?: string | null;
18
+ locale: string;
19
+ timezone: string;
20
+ contactEmail?: string | null;
21
+ social?: Record<string, unknown> | null;
22
+ metadataJson?: Record<string, unknown> | null;
23
+ };
19
24
  }
20
25
  interface MarvinEntryType {
21
26
  id: string;
@@ -36,40 +41,17 @@ interface MarvinEntryType {
36
41
  warnings?: string[] | null;
37
42
  }
38
43
  interface MarvinAsset {
39
- id: string;
40
- slug: string;
41
- name: string;
42
- originalFilename: string;
43
- filename: string;
44
- extension: string;
45
- mimeType: string;
46
- assetType: 'image' | 'document' | 'video' | 'audio' | 'archive' | 'svg' | 'other';
47
- fileSize: number;
48
- checksum: string;
49
- width?: number;
50
- height?: number;
51
- orientation?: number;
52
- storageProvider: string;
53
- storageKey: string;
54
- publicUrl?: string;
55
- altText?: string;
56
- description?: string;
57
- metadata?: Record<string, unknown>;
58
- uploadedBy: string;
59
- createdAt: string;
60
- updatedAt: string;
61
- }
62
- interface PublishedAsset {
63
44
  slug: string;
64
45
  name: string;
65
46
  mimeType: string;
66
47
  assetType: string;
67
48
  fileSize: number;
68
- width?: number;
69
- height?: number;
70
- altText?: string;
71
- description?: string;
49
+ width?: number | null;
50
+ height?: number | null;
51
+ altText?: string | null;
52
+ description?: string | null;
72
53
  publicUrl: string;
54
+ metadataJson?: Record<string, unknown> | null;
73
55
  }
74
56
  interface AssetUploadRequest {
75
57
  slug: string;
@@ -79,31 +61,24 @@ interface AssetUploadRequest {
79
61
  metadata?: Record<string, unknown>;
80
62
  }
81
63
  interface MarvinCollection {
82
- id: string;
83
- name: string;
84
64
  slug: string;
85
- description?: string;
86
- icon?: string;
87
- color?: string;
88
- sortOrder: number;
65
+ name: string;
66
+ description?: string | null;
89
67
  isSmart: boolean;
90
- smartRules?: Record<string, unknown>;
91
- createdAt: string;
92
- updatedAt: string;
93
- entryCount?: number;
94
- entries?: MarvinEntry[];
68
+ smartRules?: Record<string, unknown> | null;
69
+ metadataJson?: Record<string, unknown> | null;
70
+ entryCount: number;
71
+ entries: MarvinEntryListItem[];
95
72
  }
96
73
  interface MarvinResource {
97
- id: string;
98
- name: string;
99
74
  slug: string;
100
- resourceType?: string;
101
- description?: string;
102
- externalId?: string;
103
- url?: string;
104
- metadata?: Record<string, unknown>;
105
- createdAt: string;
106
- updatedAt: string;
75
+ name: string;
76
+ resourceType: string;
77
+ description?: string | null;
78
+ url?: string | null;
79
+ externalId?: string | null;
80
+ metadataJson?: Record<string, unknown> | null;
81
+ entries: string[];
107
82
  }
108
83
  interface PublishedCollectionSummary {
109
84
  slug: string;
@@ -137,6 +112,28 @@ interface PublishedAssetRead {
137
112
  publicUrl: string;
138
113
  metadataJson?: Record<string, unknown> | null;
139
114
  }
115
+ interface MarvinEntryListItem {
116
+ slug: string;
117
+ title: string;
118
+ entryType: string;
119
+ entryTypeInfo?: {
120
+ slug: string;
121
+ renderer?: string | null;
122
+ package?: string | null;
123
+ version?: string | null;
124
+ config?: Record<string, unknown> | null;
125
+ publishable: boolean;
126
+ submittable: boolean;
127
+ routable: boolean;
128
+ } | null;
129
+ summary?: string | null;
130
+ publishedAt?: string | null;
131
+ status: string;
132
+ collections: string[];
133
+ assetSlugs: string[];
134
+ resourceSlugs: string[];
135
+ order?: number | null;
136
+ }
140
137
  interface MarvinEntry {
141
138
  slug: string;
142
139
  title: string;
@@ -206,13 +203,9 @@ interface GetResourcesOptions {
206
203
  limit?: number;
207
204
  offset?: number;
208
205
  }
209
- /**
210
- * Authentication token response
211
- * Used by auth.login() and auth.refresh()
212
- */
213
206
  interface AuthToken {
214
207
  accessToken: string;
215
208
  tokenType: string;
216
209
  }
217
210
 
218
- export type { AssetUploadRequest, AuthToken, GetAssetsOptions, GetEntriesOptions, GetResourcesOptions, MarvinAsset, MarvinClientConfig, MarvinCollection, MarvinEntry, MarvinEntryType, MarvinPublishResponse, MarvinResource, MarvinSite, PublishedAsset, PublishedAssetRead, PublishedCollectionSummary, PublishedEntryType, PublishedResourceRead };
211
+ export type { AssetUploadRequest, AuthToken, GetAssetsOptions, GetEntriesOptions, GetResourcesOptions, MarvinAsset, MarvinClientConfig, MarvinCollection, MarvinEntry, MarvinEntryListItem, MarvinEntryType, MarvinPublishResponse, MarvinResource, MarvinSite, PublishedAssetRead, PublishedCollectionSummary, PublishedEntryType, PublishedResourceRead };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@inneropen/marvin-sdk",
3
- "version": "2.0.0-next.23",
3
+ "version": "2.0.0-next.24",
4
4
  "description": "Official TypeScript SDK for Marvin CMS",
5
5
  "type": "module",
6
6
  "main": "./dist/index.cjs",