@inneropen/marvin-sdk 3.0.0 → 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.
@@ -1,213 +1 @@
1
- /**
2
- * Marvin Publishing Client Types
3
- *
4
- * TypeScript types for the Marvin publishing API responses.
5
- */
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>;
19
- }
20
- interface MarvinEntryType {
21
- id: string;
22
- name: string;
23
- slug: string;
24
- icon?: string;
25
- color?: string;
26
- description?: string;
27
- sortOrder: number;
28
- isSystem: boolean;
29
- /**
30
- * Schema definition for this entry type (schema-driven content model).
31
- * Defines what fields exist, their types, and validation rules.
32
- * @since 2.0.0
33
- */
34
- schemaJson?: Record<string, unknown>;
35
- rendering?: {
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
- };
46
- }
47
- interface MarvinAsset {
48
- id: string;
49
- slug: string;
50
- name: string;
51
- originalFilename: string;
52
- filename: string;
53
- extension: string;
54
- mimeType: string;
55
- assetType: 'image' | 'document' | 'video' | 'audio' | 'archive' | 'svg' | 'other';
56
- fileSize: number;
57
- checksum: string;
58
- width?: number;
59
- height?: number;
60
- orientation?: number;
61
- storageProvider: string;
62
- storageKey: string;
63
- publicUrl?: string;
64
- altText?: string;
65
- description?: string;
66
- metadata?: Record<string, unknown>;
67
- uploadedBy: string;
68
- createdAt: string;
69
- updatedAt: string;
70
- }
71
- interface PublishedAsset {
72
- slug: string;
73
- name: string;
74
- mimeType: string;
75
- assetType: string;
76
- fileSize: number;
77
- width?: number;
78
- height?: number;
79
- altText?: string;
80
- description?: string;
81
- publicUrl: string;
82
- }
83
- interface AssetUploadRequest {
84
- slug: string;
85
- name: string;
86
- altText?: string;
87
- description?: string;
88
- metadata?: Record<string, unknown>;
89
- }
90
- interface MarvinCollection {
91
- id: string;
92
- name: string;
93
- slug: string;
94
- description?: string;
95
- icon?: string;
96
- color?: string;
97
- sortOrder: number;
98
- isSmart: boolean;
99
- smartRules?: Record<string, unknown>;
100
- createdAt: string;
101
- updatedAt: string;
102
- entryCount?: number;
103
- entries?: MarvinEntry[];
104
- }
105
- interface MarvinResource {
106
- id: string;
107
- name: string;
108
- slug: string;
109
- resourceType?: string;
110
- description?: string;
111
- externalId?: string;
112
- url?: string;
113
- metadata?: Record<string, unknown>;
114
- createdAt: string;
115
- updatedAt: string;
116
- }
117
- interface MarvinEntry {
118
- id: string;
119
- title: string;
120
- slug: string;
121
- summary?: string;
122
- description?: string;
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
- entryTypeInfo?: {
143
- slug: string;
144
- renderer?: string;
145
- package?: string;
146
- version?: string;
147
- config?: Record<string, unknown>;
148
- publishable?: boolean;
149
- submittable?: boolean;
150
- routable?: boolean;
151
- };
152
- entryTypeId: string;
153
- entryType?: MarvinEntryType;
154
- collections?: MarvinCollection[];
155
- assets?: MarvinAsset[];
156
- resources?: MarvinResource[];
157
- }
158
- interface MarvinPublishResponse<T> {
159
- data: T;
160
- meta?: {
161
- total?: number;
162
- page?: number;
163
- limit?: number;
164
- };
165
- }
166
- interface MarvinClientConfig {
167
- apiUrl: string;
168
- siteClientToken: string;
169
- workspaceSlug: string;
170
- }
171
- interface GetEntriesOptions {
172
- entryType?: string;
173
- collection?: string;
174
- limit?: number;
175
- offset?: number;
176
- status?: string;
177
- }
178
- interface GetAssetsOptions {
179
- type?: string;
180
- limit?: number;
181
- offset?: number;
182
- }
183
- interface PublishedEntryType {
184
- slug: string;
185
- name: string;
186
- isRendered: boolean;
187
- rendering?: {
188
- renderer?: string;
189
- package?: string;
190
- version?: string;
191
- config?: Record<string, unknown>;
192
- };
193
- capabilities?: {
194
- publishable?: boolean;
195
- submittable?: boolean;
196
- routable?: boolean;
197
- };
198
- }
199
- interface GetResourcesOptions {
200
- resourceType?: string;
201
- limit?: number;
202
- offset?: number;
203
- }
204
- /**
205
- * Authentication token response
206
- * Used by auth.login() and auth.refresh()
207
- */
208
- interface AuthToken {
209
- accessToken: string;
210
- tokenType: string;
211
- }
212
-
213
- export type { AssetUploadRequest, AuthToken, GetAssetsOptions, GetEntriesOptions, GetResourcesOptions, MarvinAsset, MarvinClientConfig, MarvinCollection, MarvinEntry, MarvinEntryType, MarvinPublishResponse, MarvinResource, MarvinSite, PublishedAsset, PublishedEntryType };
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,213 +1 @@
1
- /**
2
- * Marvin Publishing Client Types
3
- *
4
- * TypeScript types for the Marvin publishing API responses.
5
- */
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>;
19
- }
20
- interface MarvinEntryType {
21
- id: string;
22
- name: string;
23
- slug: string;
24
- icon?: string;
25
- color?: string;
26
- description?: string;
27
- sortOrder: number;
28
- isSystem: boolean;
29
- /**
30
- * Schema definition for this entry type (schema-driven content model).
31
- * Defines what fields exist, their types, and validation rules.
32
- * @since 2.0.0
33
- */
34
- schemaJson?: Record<string, unknown>;
35
- rendering?: {
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
- };
46
- }
47
- interface MarvinAsset {
48
- id: string;
49
- slug: string;
50
- name: string;
51
- originalFilename: string;
52
- filename: string;
53
- extension: string;
54
- mimeType: string;
55
- assetType: 'image' | 'document' | 'video' | 'audio' | 'archive' | 'svg' | 'other';
56
- fileSize: number;
57
- checksum: string;
58
- width?: number;
59
- height?: number;
60
- orientation?: number;
61
- storageProvider: string;
62
- storageKey: string;
63
- publicUrl?: string;
64
- altText?: string;
65
- description?: string;
66
- metadata?: Record<string, unknown>;
67
- uploadedBy: string;
68
- createdAt: string;
69
- updatedAt: string;
70
- }
71
- interface PublishedAsset {
72
- slug: string;
73
- name: string;
74
- mimeType: string;
75
- assetType: string;
76
- fileSize: number;
77
- width?: number;
78
- height?: number;
79
- altText?: string;
80
- description?: string;
81
- publicUrl: string;
82
- }
83
- interface AssetUploadRequest {
84
- slug: string;
85
- name: string;
86
- altText?: string;
87
- description?: string;
88
- metadata?: Record<string, unknown>;
89
- }
90
- interface MarvinCollection {
91
- id: string;
92
- name: string;
93
- slug: string;
94
- description?: string;
95
- icon?: string;
96
- color?: string;
97
- sortOrder: number;
98
- isSmart: boolean;
99
- smartRules?: Record<string, unknown>;
100
- createdAt: string;
101
- updatedAt: string;
102
- entryCount?: number;
103
- entries?: MarvinEntry[];
104
- }
105
- interface MarvinResource {
106
- id: string;
107
- name: string;
108
- slug: string;
109
- resourceType?: string;
110
- description?: string;
111
- externalId?: string;
112
- url?: string;
113
- metadata?: Record<string, unknown>;
114
- createdAt: string;
115
- updatedAt: string;
116
- }
117
- interface MarvinEntry {
118
- id: string;
119
- title: string;
120
- slug: string;
121
- summary?: string;
122
- description?: string;
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
- entryTypeInfo?: {
143
- slug: string;
144
- renderer?: string;
145
- package?: string;
146
- version?: string;
147
- config?: Record<string, unknown>;
148
- publishable?: boolean;
149
- submittable?: boolean;
150
- routable?: boolean;
151
- };
152
- entryTypeId: string;
153
- entryType?: MarvinEntryType;
154
- collections?: MarvinCollection[];
155
- assets?: MarvinAsset[];
156
- resources?: MarvinResource[];
157
- }
158
- interface MarvinPublishResponse<T> {
159
- data: T;
160
- meta?: {
161
- total?: number;
162
- page?: number;
163
- limit?: number;
164
- };
165
- }
166
- interface MarvinClientConfig {
167
- apiUrl: string;
168
- siteClientToken: string;
169
- workspaceSlug: string;
170
- }
171
- interface GetEntriesOptions {
172
- entryType?: string;
173
- collection?: string;
174
- limit?: number;
175
- offset?: number;
176
- status?: string;
177
- }
178
- interface GetAssetsOptions {
179
- type?: string;
180
- limit?: number;
181
- offset?: number;
182
- }
183
- interface PublishedEntryType {
184
- slug: string;
185
- name: string;
186
- isRendered: boolean;
187
- rendering?: {
188
- renderer?: string;
189
- package?: string;
190
- version?: string;
191
- config?: Record<string, unknown>;
192
- };
193
- capabilities?: {
194
- publishable?: boolean;
195
- submittable?: boolean;
196
- routable?: boolean;
197
- };
198
- }
199
- interface GetResourcesOptions {
200
- resourceType?: string;
201
- limit?: number;
202
- offset?: number;
203
- }
204
- /**
205
- * Authentication token response
206
- * Used by auth.login() and auth.refresh()
207
- */
208
- interface AuthToken {
209
- accessToken: string;
210
- tokenType: string;
211
- }
212
-
213
- export type { AssetUploadRequest, AuthToken, GetAssetsOptions, GetEntriesOptions, GetResourcesOptions, MarvinAsset, MarvinClientConfig, MarvinCollection, MarvinEntry, MarvinEntryType, MarvinPublishResponse, MarvinResource, MarvinSite, PublishedAsset, PublishedEntryType };
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.0",
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",