@inneropen/marvin-sdk 1.11.0-next.2 → 2.0.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.
package/dist/index.cjs CHANGED
@@ -461,9 +461,20 @@ var init_entry = __esm({
461
461
  get description() {
462
462
  return this.data.description;
463
463
  }
464
+ /**
465
+ * @deprecated Use field('body') or dataJson instead. Will be removed in v3.0.0
466
+ */
464
467
  get contentMarkdown() {
465
468
  return this.data.contentMarkdown;
466
469
  }
470
+ /**
471
+ * Schema-driven content data (replaces contentMarkdown in v2.0.0).
472
+ * Access specific fields using the field() helper method.
473
+ * @since 2.0.0
474
+ */
475
+ get dataJson() {
476
+ return this.data.dataJson;
477
+ }
467
478
  get metadata() {
468
479
  return this.data.metadata;
469
480
  }
@@ -497,6 +508,31 @@ var init_entry = __esm({
497
508
  get collections() {
498
509
  return this.data.collections || [];
499
510
  }
511
+ /**
512
+ * Get a specific field value from the entry's schema-driven content (dataJson).
513
+ *
514
+ * @param key - Field key as defined in the entry type's schema
515
+ * @returns The field value, or undefined if not present
516
+ * @since 2.0.0
517
+ *
518
+ * @example
519
+ * ```typescript
520
+ * const entry = await client.entries.get('my-entry');
521
+ * const body = entry.field('body'); // Get markdown body
522
+ * const difficulty = entry.field('difficulty'); // Get difficulty level
523
+ * const heroImage = entry.field('heroImage'); // Get hero image UUID
524
+ * ```
525
+ */
526
+ field(key) {
527
+ return this.data.dataJson?.[key];
528
+ }
529
+ /**
530
+ * Get all fields from the entry's schema-driven content.
531
+ * @since 2.0.0
532
+ */
533
+ get fields() {
534
+ return this.data.dataJson || {};
535
+ }
500
536
  /**
501
537
  * Get related entries (future)
502
538
  */
package/dist/index.d.cts CHANGED
@@ -288,7 +288,16 @@ declare class Entry {
288
288
  get slug(): string;
289
289
  get summary(): string | undefined;
290
290
  get description(): string | undefined;
291
+ /**
292
+ * @deprecated Use field('body') or dataJson instead. Will be removed in v3.0.0
293
+ */
291
294
  get contentMarkdown(): string | undefined;
295
+ /**
296
+ * Schema-driven content data (replaces contentMarkdown in v2.0.0).
297
+ * Access specific fields using the field() helper method.
298
+ * @since 2.0.0
299
+ */
300
+ get dataJson(): Record<string, unknown> | undefined;
292
301
  get metadata(): Record<string, unknown> | undefined;
293
302
  get status(): string;
294
303
  get publishedAt(): string | undefined;
@@ -304,6 +313,27 @@ declare class Entry {
304
313
  * Get entry collections
305
314
  */
306
315
  get collections(): MarvinCollection[];
316
+ /**
317
+ * Get a specific field value from the entry's schema-driven content (dataJson).
318
+ *
319
+ * @param key - Field key as defined in the entry type's schema
320
+ * @returns The field value, or undefined if not present
321
+ * @since 2.0.0
322
+ *
323
+ * @example
324
+ * ```typescript
325
+ * const entry = await client.entries.get('my-entry');
326
+ * const body = entry.field('body'); // Get markdown body
327
+ * const difficulty = entry.field('difficulty'); // Get difficulty level
328
+ * const heroImage = entry.field('heroImage'); // Get hero image UUID
329
+ * ```
330
+ */
331
+ field<T = unknown>(key: string): T | undefined;
332
+ /**
333
+ * Get all fields from the entry's schema-driven content.
334
+ * @since 2.0.0
335
+ */
336
+ get fields(): Record<string, unknown>;
307
337
  /**
308
338
  * Get related entries (future)
309
339
  */
package/dist/index.d.ts CHANGED
@@ -288,7 +288,16 @@ declare class Entry {
288
288
  get slug(): string;
289
289
  get summary(): string | undefined;
290
290
  get description(): string | undefined;
291
+ /**
292
+ * @deprecated Use field('body') or dataJson instead. Will be removed in v3.0.0
293
+ */
291
294
  get contentMarkdown(): string | undefined;
295
+ /**
296
+ * Schema-driven content data (replaces contentMarkdown in v2.0.0).
297
+ * Access specific fields using the field() helper method.
298
+ * @since 2.0.0
299
+ */
300
+ get dataJson(): Record<string, unknown> | undefined;
292
301
  get metadata(): Record<string, unknown> | undefined;
293
302
  get status(): string;
294
303
  get publishedAt(): string | undefined;
@@ -304,6 +313,27 @@ declare class Entry {
304
313
  * Get entry collections
305
314
  */
306
315
  get collections(): MarvinCollection[];
316
+ /**
317
+ * Get a specific field value from the entry's schema-driven content (dataJson).
318
+ *
319
+ * @param key - Field key as defined in the entry type's schema
320
+ * @returns The field value, or undefined if not present
321
+ * @since 2.0.0
322
+ *
323
+ * @example
324
+ * ```typescript
325
+ * const entry = await client.entries.get('my-entry');
326
+ * const body = entry.field('body'); // Get markdown body
327
+ * const difficulty = entry.field('difficulty'); // Get difficulty level
328
+ * const heroImage = entry.field('heroImage'); // Get hero image UUID
329
+ * ```
330
+ */
331
+ field<T = unknown>(key: string): T | undefined;
332
+ /**
333
+ * Get all fields from the entry's schema-driven content.
334
+ * @since 2.0.0
335
+ */
336
+ get fields(): Record<string, unknown>;
307
337
  /**
308
338
  * Get related entries (future)
309
339
  */
package/dist/index.js CHANGED
@@ -107,9 +107,20 @@ var init_entry = __esm({
107
107
  get description() {
108
108
  return this.data.description;
109
109
  }
110
+ /**
111
+ * @deprecated Use field('body') or dataJson instead. Will be removed in v3.0.0
112
+ */
110
113
  get contentMarkdown() {
111
114
  return this.data.contentMarkdown;
112
115
  }
116
+ /**
117
+ * Schema-driven content data (replaces contentMarkdown in v2.0.0).
118
+ * Access specific fields using the field() helper method.
119
+ * @since 2.0.0
120
+ */
121
+ get dataJson() {
122
+ return this.data.dataJson;
123
+ }
113
124
  get metadata() {
114
125
  return this.data.metadata;
115
126
  }
@@ -143,6 +154,31 @@ var init_entry = __esm({
143
154
  get collections() {
144
155
  return this.data.collections || [];
145
156
  }
157
+ /**
158
+ * Get a specific field value from the entry's schema-driven content (dataJson).
159
+ *
160
+ * @param key - Field key as defined in the entry type's schema
161
+ * @returns The field value, or undefined if not present
162
+ * @since 2.0.0
163
+ *
164
+ * @example
165
+ * ```typescript
166
+ * const entry = await client.entries.get('my-entry');
167
+ * const body = entry.field('body'); // Get markdown body
168
+ * const difficulty = entry.field('difficulty'); // Get difficulty level
169
+ * const heroImage = entry.field('heroImage'); // Get hero image UUID
170
+ * ```
171
+ */
172
+ field(key) {
173
+ return this.data.dataJson?.[key];
174
+ }
175
+ /**
176
+ * Get all fields from the entry's schema-driven content.
177
+ * @since 2.0.0
178
+ */
179
+ get fields() {
180
+ return this.data.dataJson || {};
181
+ }
146
182
  /**
147
183
  * Get related entries (future)
148
184
  */
package/dist/platform.cjs CHANGED
@@ -329,6 +329,12 @@ var CollectionsModule = class {
329
329
  async getEntries(id) {
330
330
  return this.http.get(`/api/platform/collections/${id}/entries`);
331
331
  }
332
+ /**
333
+ * Reorder entries in a collection
334
+ */
335
+ async reorderEntries(id, entries) {
336
+ return this.http.patch(`/api/platform/collections/${id}/entries/order`, { entries });
337
+ }
332
338
  };
333
339
 
334
340
  // src/platform/resources.ts
@@ -681,6 +681,19 @@ interface components {
681
681
  /** Resourceids */
682
682
  resourceIds?: string[] | null;
683
683
  };
684
+ /**
685
+ * EntryOrderItem
686
+ * @description Schema for a single entry order update.
687
+ */
688
+ EntryOrderItem: {
689
+ /**
690
+ * Entryid
691
+ * Format: uuid4
692
+ */
693
+ entryId: string;
694
+ /** Sortorder */
695
+ sortOrder: number;
696
+ };
684
697
  /**
685
698
  * EntryRead
686
699
  * @description Schema for reading an entry.
@@ -740,6 +753,8 @@ interface components {
740
753
  * @default []
741
754
  */
742
755
  collections: string[];
756
+ /** Order */
757
+ order?: number | null;
743
758
  };
744
759
  /**
745
760
  * EntryTypeCreate
@@ -1732,6 +1747,8 @@ interface components {
1732
1747
  * @default []
1733
1748
  */
1734
1749
  assets: string[];
1750
+ /** Order */
1751
+ order?: number | null;
1735
1752
  /**
1736
1753
  * Resources
1737
1754
  * @default []
@@ -1777,6 +1794,8 @@ interface components {
1777
1794
  * @default []
1778
1795
  */
1779
1796
  assets: components["schemas"]["PublishedAssetRead"][];
1797
+ /** Order */
1798
+ order?: number | null;
1780
1799
  };
1781
1800
  /**
1782
1801
  * PublishedResourceRead
@@ -1852,6 +1871,14 @@ interface components {
1852
1871
  data: components["schemas"]["PublishedResourceSummary"][];
1853
1872
  meta: components["schemas"]["PaginationMeta"];
1854
1873
  };
1874
+ /**
1875
+ * ReorderEntriesRequest
1876
+ * @description Schema for bulk reordering entries in a collection.
1877
+ */
1878
+ ReorderEntriesRequest: {
1879
+ /** Entries */
1880
+ entries: components["schemas"]["EntryOrderItem"][];
1881
+ };
1855
1882
  /**
1856
1883
  * ResetPassword
1857
1884
  * @description Schema for the actual password reset operation.
@@ -1968,6 +1995,154 @@ interface components {
1968
1995
  [key: string]: unknown;
1969
1996
  } | null;
1970
1997
  };
1998
+ /**
1999
+ * ScheduledTaskCreate
2000
+ * @description Schema for creating a new scheduled task.
2001
+ */
2002
+ ScheduledTaskCreate: {
2003
+ /** Name */
2004
+ name: string;
2005
+ /** Slug */
2006
+ slug?: string | null;
2007
+ /** Description */
2008
+ description?: string | null;
2009
+ /**
2010
+ * Enabled
2011
+ * @default true
2012
+ */
2013
+ enabled: boolean;
2014
+ /**
2015
+ * Scheduletype
2016
+ * @enum {string}
2017
+ */
2018
+ scheduleType: "cron" | "interval" | "once";
2019
+ /** Scheduleconfig */
2020
+ scheduleConfig: {
2021
+ [key: string]: unknown;
2022
+ };
2023
+ /** Tasktype */
2024
+ taskType: string;
2025
+ /** Taskconfig */
2026
+ taskConfig?: {
2027
+ [key: string]: unknown;
2028
+ };
2029
+ /** Retrypolicy */
2030
+ retryPolicy?: {
2031
+ [key: string]: unknown;
2032
+ } | null;
2033
+ };
2034
+ /**
2035
+ * ScheduledTaskExecutionLogRead
2036
+ * @description Schema for reading a scheduled task execution log entry.
2037
+ */
2038
+ ScheduledTaskExecutionLogRead: {
2039
+ /**
2040
+ * Id
2041
+ * Format: uuid4
2042
+ */
2043
+ id: string;
2044
+ /**
2045
+ * Taskid
2046
+ * Format: uuid4
2047
+ */
2048
+ taskId: string;
2049
+ /** Groupid */
2050
+ groupId?: string | null;
2051
+ /**
2052
+ * Executedat
2053
+ * Format: date-time
2054
+ */
2055
+ executedAt: string;
2056
+ /** Status */
2057
+ status: string;
2058
+ /** Durationms */
2059
+ durationMs?: number | null;
2060
+ /** Errormessage */
2061
+ errorMessage?: string | null;
2062
+ /** Errortraceback */
2063
+ errorTraceback?: string | null;
2064
+ /** Retryattempt */
2065
+ retryAttempt: number;
2066
+ };
2067
+ /**
2068
+ * ScheduledTaskRead
2069
+ * @description Full schema for reading a scheduled task.
2070
+ */
2071
+ ScheduledTaskRead: {
2072
+ /**
2073
+ * Id
2074
+ * Format: uuid4
2075
+ */
2076
+ id: string;
2077
+ /** Name */
2078
+ name: string;
2079
+ /** Slug */
2080
+ slug: string;
2081
+ /** Description */
2082
+ description?: string | null;
2083
+ /** Enabled */
2084
+ enabled: boolean;
2085
+ /** Scheduletype */
2086
+ scheduleType: string;
2087
+ /** Tasktype */
2088
+ taskType: string;
2089
+ /** Lastrunat */
2090
+ lastRunAt?: string | null;
2091
+ /** Nextrunat */
2092
+ nextRunAt?: string | null;
2093
+ /** Laststatus */
2094
+ lastStatus?: string | null;
2095
+ /** Failurecount */
2096
+ failureCount: number;
2097
+ /** Createdat */
2098
+ createdAt?: string | null;
2099
+ /** Updateat */
2100
+ updateAt?: string | null;
2101
+ /** Groupid */
2102
+ groupId?: string | null;
2103
+ /** Scheduleconfig */
2104
+ scheduleConfig: {
2105
+ [key: string]: unknown;
2106
+ };
2107
+ /** Taskconfig */
2108
+ taskConfig: {
2109
+ [key: string]: unknown;
2110
+ };
2111
+ /** Retrypolicy */
2112
+ retryPolicy?: {
2113
+ [key: string]: unknown;
2114
+ } | null;
2115
+ /** Lastdurationms */
2116
+ lastDurationMs?: number | null;
2117
+ };
2118
+ /**
2119
+ * ScheduledTaskUpdate
2120
+ * @description Schema for updating a scheduled task.
2121
+ */
2122
+ ScheduledTaskUpdate: {
2123
+ /** Name */
2124
+ name?: string | null;
2125
+ /** Description */
2126
+ description?: string | null;
2127
+ /** Enabled */
2128
+ enabled?: boolean | null;
2129
+ /** Scheduletype */
2130
+ scheduleType?: ("cron" | "interval" | "once") | null;
2131
+ /** Scheduleconfig */
2132
+ scheduleConfig?: {
2133
+ [key: string]: unknown;
2134
+ } | null;
2135
+ /** Tasktype */
2136
+ taskType?: string | null;
2137
+ /** Taskconfig */
2138
+ taskConfig?: {
2139
+ [key: string]: unknown;
2140
+ } | null;
2141
+ /** Retrypolicy */
2142
+ retryPolicy?: {
2143
+ [key: string]: unknown;
2144
+ } | null;
2145
+ };
1971
2146
  /**
1972
2147
  * SiteConfiguration
1973
2148
  * @description Site configuration for publishing API.
@@ -2173,6 +2348,20 @@ interface components {
2173
2348
  /** Previous */
2174
2349
  previous?: string | null;
2175
2350
  };
2351
+ /**
2352
+ * UserProfileUpdate
2353
+ * @description Schema for updating a user's profile information (without password).
2354
+ * All fields are optional for partial updates.
2355
+ * Used by the /api/self endpoint for users updating their own profile.
2356
+ */
2357
+ UserProfileUpdate: {
2358
+ /** Username */
2359
+ username?: string | null;
2360
+ /** Email */
2361
+ email?: string | null;
2362
+ /** Fullname */
2363
+ fullName?: string | null;
2364
+ };
2176
2365
  /**
2177
2366
  * UserRead
2178
2367
  * @description Schema for representing a user when read from the system.
@@ -2743,6 +2932,13 @@ declare class CollectionsModule {
2743
2932
  * Get entries in a collection
2744
2933
  */
2745
2934
  getEntries(id: string): Promise<PlatformEntry[]>;
2935
+ /**
2936
+ * Reorder entries in a collection
2937
+ */
2938
+ reorderEntries(id: string, entries: Array<{
2939
+ entryId: string;
2940
+ sortOrder: number;
2941
+ }>): Promise<void>;
2746
2942
  }
2747
2943
 
2748
2944
  /**
@@ -2865,6 +3061,7 @@ interface EntryTypeCreate {
2865
3061
  icon?: string;
2866
3062
  color?: string;
2867
3063
  sortOrder?: number;
3064
+ schemaJson?: Record<string, unknown>;
2868
3065
  }
2869
3066
  interface EntryTypeUpdate {
2870
3067
  name?: string;
@@ -2873,6 +3070,7 @@ interface EntryTypeUpdate {
2873
3070
  icon?: string;
2874
3071
  color?: string;
2875
3072
  sortOrder?: number;
3073
+ schemaJson?: Record<string, unknown>;
2876
3074
  }
2877
3075
  declare class EntryTypesModule {
2878
3076
  private http;
@@ -681,6 +681,19 @@ interface components {
681
681
  /** Resourceids */
682
682
  resourceIds?: string[] | null;
683
683
  };
684
+ /**
685
+ * EntryOrderItem
686
+ * @description Schema for a single entry order update.
687
+ */
688
+ EntryOrderItem: {
689
+ /**
690
+ * Entryid
691
+ * Format: uuid4
692
+ */
693
+ entryId: string;
694
+ /** Sortorder */
695
+ sortOrder: number;
696
+ };
684
697
  /**
685
698
  * EntryRead
686
699
  * @description Schema for reading an entry.
@@ -740,6 +753,8 @@ interface components {
740
753
  * @default []
741
754
  */
742
755
  collections: string[];
756
+ /** Order */
757
+ order?: number | null;
743
758
  };
744
759
  /**
745
760
  * EntryTypeCreate
@@ -1732,6 +1747,8 @@ interface components {
1732
1747
  * @default []
1733
1748
  */
1734
1749
  assets: string[];
1750
+ /** Order */
1751
+ order?: number | null;
1735
1752
  /**
1736
1753
  * Resources
1737
1754
  * @default []
@@ -1777,6 +1794,8 @@ interface components {
1777
1794
  * @default []
1778
1795
  */
1779
1796
  assets: components["schemas"]["PublishedAssetRead"][];
1797
+ /** Order */
1798
+ order?: number | null;
1780
1799
  };
1781
1800
  /**
1782
1801
  * PublishedResourceRead
@@ -1852,6 +1871,14 @@ interface components {
1852
1871
  data: components["schemas"]["PublishedResourceSummary"][];
1853
1872
  meta: components["schemas"]["PaginationMeta"];
1854
1873
  };
1874
+ /**
1875
+ * ReorderEntriesRequest
1876
+ * @description Schema for bulk reordering entries in a collection.
1877
+ */
1878
+ ReorderEntriesRequest: {
1879
+ /** Entries */
1880
+ entries: components["schemas"]["EntryOrderItem"][];
1881
+ };
1855
1882
  /**
1856
1883
  * ResetPassword
1857
1884
  * @description Schema for the actual password reset operation.
@@ -1968,6 +1995,154 @@ interface components {
1968
1995
  [key: string]: unknown;
1969
1996
  } | null;
1970
1997
  };
1998
+ /**
1999
+ * ScheduledTaskCreate
2000
+ * @description Schema for creating a new scheduled task.
2001
+ */
2002
+ ScheduledTaskCreate: {
2003
+ /** Name */
2004
+ name: string;
2005
+ /** Slug */
2006
+ slug?: string | null;
2007
+ /** Description */
2008
+ description?: string | null;
2009
+ /**
2010
+ * Enabled
2011
+ * @default true
2012
+ */
2013
+ enabled: boolean;
2014
+ /**
2015
+ * Scheduletype
2016
+ * @enum {string}
2017
+ */
2018
+ scheduleType: "cron" | "interval" | "once";
2019
+ /** Scheduleconfig */
2020
+ scheduleConfig: {
2021
+ [key: string]: unknown;
2022
+ };
2023
+ /** Tasktype */
2024
+ taskType: string;
2025
+ /** Taskconfig */
2026
+ taskConfig?: {
2027
+ [key: string]: unknown;
2028
+ };
2029
+ /** Retrypolicy */
2030
+ retryPolicy?: {
2031
+ [key: string]: unknown;
2032
+ } | null;
2033
+ };
2034
+ /**
2035
+ * ScheduledTaskExecutionLogRead
2036
+ * @description Schema for reading a scheduled task execution log entry.
2037
+ */
2038
+ ScheduledTaskExecutionLogRead: {
2039
+ /**
2040
+ * Id
2041
+ * Format: uuid4
2042
+ */
2043
+ id: string;
2044
+ /**
2045
+ * Taskid
2046
+ * Format: uuid4
2047
+ */
2048
+ taskId: string;
2049
+ /** Groupid */
2050
+ groupId?: string | null;
2051
+ /**
2052
+ * Executedat
2053
+ * Format: date-time
2054
+ */
2055
+ executedAt: string;
2056
+ /** Status */
2057
+ status: string;
2058
+ /** Durationms */
2059
+ durationMs?: number | null;
2060
+ /** Errormessage */
2061
+ errorMessage?: string | null;
2062
+ /** Errortraceback */
2063
+ errorTraceback?: string | null;
2064
+ /** Retryattempt */
2065
+ retryAttempt: number;
2066
+ };
2067
+ /**
2068
+ * ScheduledTaskRead
2069
+ * @description Full schema for reading a scheduled task.
2070
+ */
2071
+ ScheduledTaskRead: {
2072
+ /**
2073
+ * Id
2074
+ * Format: uuid4
2075
+ */
2076
+ id: string;
2077
+ /** Name */
2078
+ name: string;
2079
+ /** Slug */
2080
+ slug: string;
2081
+ /** Description */
2082
+ description?: string | null;
2083
+ /** Enabled */
2084
+ enabled: boolean;
2085
+ /** Scheduletype */
2086
+ scheduleType: string;
2087
+ /** Tasktype */
2088
+ taskType: string;
2089
+ /** Lastrunat */
2090
+ lastRunAt?: string | null;
2091
+ /** Nextrunat */
2092
+ nextRunAt?: string | null;
2093
+ /** Laststatus */
2094
+ lastStatus?: string | null;
2095
+ /** Failurecount */
2096
+ failureCount: number;
2097
+ /** Createdat */
2098
+ createdAt?: string | null;
2099
+ /** Updateat */
2100
+ updateAt?: string | null;
2101
+ /** Groupid */
2102
+ groupId?: string | null;
2103
+ /** Scheduleconfig */
2104
+ scheduleConfig: {
2105
+ [key: string]: unknown;
2106
+ };
2107
+ /** Taskconfig */
2108
+ taskConfig: {
2109
+ [key: string]: unknown;
2110
+ };
2111
+ /** Retrypolicy */
2112
+ retryPolicy?: {
2113
+ [key: string]: unknown;
2114
+ } | null;
2115
+ /** Lastdurationms */
2116
+ lastDurationMs?: number | null;
2117
+ };
2118
+ /**
2119
+ * ScheduledTaskUpdate
2120
+ * @description Schema for updating a scheduled task.
2121
+ */
2122
+ ScheduledTaskUpdate: {
2123
+ /** Name */
2124
+ name?: string | null;
2125
+ /** Description */
2126
+ description?: string | null;
2127
+ /** Enabled */
2128
+ enabled?: boolean | null;
2129
+ /** Scheduletype */
2130
+ scheduleType?: ("cron" | "interval" | "once") | null;
2131
+ /** Scheduleconfig */
2132
+ scheduleConfig?: {
2133
+ [key: string]: unknown;
2134
+ } | null;
2135
+ /** Tasktype */
2136
+ taskType?: string | null;
2137
+ /** Taskconfig */
2138
+ taskConfig?: {
2139
+ [key: string]: unknown;
2140
+ } | null;
2141
+ /** Retrypolicy */
2142
+ retryPolicy?: {
2143
+ [key: string]: unknown;
2144
+ } | null;
2145
+ };
1971
2146
  /**
1972
2147
  * SiteConfiguration
1973
2148
  * @description Site configuration for publishing API.
@@ -2173,6 +2348,20 @@ interface components {
2173
2348
  /** Previous */
2174
2349
  previous?: string | null;
2175
2350
  };
2351
+ /**
2352
+ * UserProfileUpdate
2353
+ * @description Schema for updating a user's profile information (without password).
2354
+ * All fields are optional for partial updates.
2355
+ * Used by the /api/self endpoint for users updating their own profile.
2356
+ */
2357
+ UserProfileUpdate: {
2358
+ /** Username */
2359
+ username?: string | null;
2360
+ /** Email */
2361
+ email?: string | null;
2362
+ /** Fullname */
2363
+ fullName?: string | null;
2364
+ };
2176
2365
  /**
2177
2366
  * UserRead
2178
2367
  * @description Schema for representing a user when read from the system.
@@ -2743,6 +2932,13 @@ declare class CollectionsModule {
2743
2932
  * Get entries in a collection
2744
2933
  */
2745
2934
  getEntries(id: string): Promise<PlatformEntry[]>;
2935
+ /**
2936
+ * Reorder entries in a collection
2937
+ */
2938
+ reorderEntries(id: string, entries: Array<{
2939
+ entryId: string;
2940
+ sortOrder: number;
2941
+ }>): Promise<void>;
2746
2942
  }
2747
2943
 
2748
2944
  /**
@@ -2865,6 +3061,7 @@ interface EntryTypeCreate {
2865
3061
  icon?: string;
2866
3062
  color?: string;
2867
3063
  sortOrder?: number;
3064
+ schemaJson?: Record<string, unknown>;
2868
3065
  }
2869
3066
  interface EntryTypeUpdate {
2870
3067
  name?: string;
@@ -2873,6 +3070,7 @@ interface EntryTypeUpdate {
2873
3070
  icon?: string;
2874
3071
  color?: string;
2875
3072
  sortOrder?: number;
3073
+ schemaJson?: Record<string, unknown>;
2876
3074
  }
2877
3075
  declare class EntryTypesModule {
2878
3076
  private http;
package/dist/platform.js CHANGED
@@ -108,6 +108,12 @@ var CollectionsModule = class {
108
108
  async getEntries(id) {
109
109
  return this.http.get(`/api/platform/collections/${id}/entries`);
110
110
  }
111
+ /**
112
+ * Reorder entries in a collection
113
+ */
114
+ async reorderEntries(id, entries) {
115
+ return this.http.patch(`/api/platform/collections/${id}/entries/order`, { entries });
116
+ }
111
117
  };
112
118
 
113
119
  // src/platform/resources.ts
@@ -26,6 +26,12 @@ interface MarvinEntryType {
26
26
  description?: string;
27
27
  sortOrder: number;
28
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>;
29
35
  }
30
36
  interface MarvinAsset {
31
37
  id: string;
@@ -103,7 +109,20 @@ interface MarvinEntry {
103
109
  slug: string;
104
110
  summary?: string;
105
111
  description?: string;
112
+ /**
113
+ * Schema-driven content data structured according to entry type's schemaJson.
114
+ * @since 2.0.0
115
+ */
116
+ dataJson?: Record<string, unknown>;
117
+ /**
118
+ * @deprecated Use dataJson instead. Will be removed in v3.0.0
119
+ * @since 1.x
120
+ */
106
121
  contentMarkdown?: string;
122
+ /**
123
+ * Custom non-schema metadata (API keys, external IDs, CMS-specific config).
124
+ * For content fields, use dataJson instead.
125
+ */
107
126
  metadata?: Record<string, unknown>;
108
127
  status: string;
109
128
  publishedAt?: string;
@@ -26,6 +26,12 @@ interface MarvinEntryType {
26
26
  description?: string;
27
27
  sortOrder: number;
28
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>;
29
35
  }
30
36
  interface MarvinAsset {
31
37
  id: string;
@@ -103,7 +109,20 @@ interface MarvinEntry {
103
109
  slug: string;
104
110
  summary?: string;
105
111
  description?: string;
112
+ /**
113
+ * Schema-driven content data structured according to entry type's schemaJson.
114
+ * @since 2.0.0
115
+ */
116
+ dataJson?: Record<string, unknown>;
117
+ /**
118
+ * @deprecated Use dataJson instead. Will be removed in v3.0.0
119
+ * @since 1.x
120
+ */
106
121
  contentMarkdown?: string;
122
+ /**
123
+ * Custom non-schema metadata (API keys, external IDs, CMS-specific config).
124
+ * For content fields, use dataJson instead.
125
+ */
107
126
  metadata?: Record<string, unknown>;
108
127
  status: string;
109
128
  publishedAt?: string;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@inneropen/marvin-sdk",
3
- "version": "1.11.0-next.2",
3
+ "version": "2.0.0-next.1",
4
4
  "description": "Official TypeScript SDK for Marvin CMS",
5
5
  "type": "module",
6
6
  "main": "./dist/index.cjs",