@btst/stack 5.0.0 → 5.1.0

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.
Files changed (113) hide show
  1. package/dist/api/index.d.cts +2 -2
  2. package/dist/api/index.d.mts +2 -2
  3. package/dist/api/index.d.ts +2 -2
  4. package/dist/client/index.d.cts +2 -2
  5. package/dist/client/index.d.mts +2 -2
  6. package/dist/client/index.d.ts +2 -2
  7. package/dist/context/index.d.cts +1 -1
  8. package/dist/context/index.d.mts +1 -1
  9. package/dist/context/index.d.ts +1 -1
  10. package/dist/index.d.cts +1 -1
  11. package/dist/index.d.mts +1 -1
  12. package/dist/index.d.ts +1 -1
  13. package/dist/packages/stack/src/plugins/cms/api/getters.cjs +142 -6
  14. package/dist/packages/stack/src/plugins/cms/api/getters.mjs +139 -8
  15. package/dist/packages/stack/src/plugins/cms/api/operations.cjs +67 -61
  16. package/dist/packages/stack/src/plugins/cms/api/operations.mjs +69 -63
  17. package/dist/packages/stack/src/plugins/cms/api/plugin.cjs +26 -8
  18. package/dist/packages/stack/src/plugins/cms/api/plugin.mjs +27 -9
  19. package/dist/packages/stack/src/plugins/cms/api/query-key-defs.cjs +15 -1
  20. package/dist/packages/stack/src/plugins/cms/api/query-key-defs.mjs +14 -2
  21. package/dist/packages/stack/src/plugins/cms/client/hooks/cms-hooks.cjs +45 -24
  22. package/dist/packages/stack/src/plugins/cms/client/hooks/cms-hooks.mjs +45 -24
  23. package/dist/packages/stack/src/plugins/cms/schemas.cjs +22 -0
  24. package/dist/packages/stack/src/plugins/cms/schemas.mjs +20 -1
  25. package/dist/plugins/api/index.d.cts +2 -2
  26. package/dist/plugins/api/index.d.mts +2 -2
  27. package/dist/plugins/api/index.d.ts +2 -2
  28. package/dist/plugins/blog/api/index.d.cts +2 -2
  29. package/dist/plugins/blog/api/index.d.mts +2 -2
  30. package/dist/plugins/blog/api/index.d.ts +2 -2
  31. package/dist/plugins/blog/client/hooks/index.d.cts +2 -2
  32. package/dist/plugins/blog/client/hooks/index.d.mts +2 -2
  33. package/dist/plugins/blog/client/hooks/index.d.ts +2 -2
  34. package/dist/plugins/blog/client/index.d.cts +2 -2
  35. package/dist/plugins/blog/client/index.d.mts +2 -2
  36. package/dist/plugins/blog/client/index.d.ts +2 -2
  37. package/dist/plugins/blog/query-keys.d.cts +2 -2
  38. package/dist/plugins/blog/query-keys.d.mts +2 -2
  39. package/dist/plugins/blog/query-keys.d.ts +2 -2
  40. package/dist/plugins/client/index.d.cts +2 -2
  41. package/dist/plugins/client/index.d.mts +2 -2
  42. package/dist/plugins/client/index.d.ts +2 -2
  43. package/dist/plugins/cms/api/index.cjs +1 -0
  44. package/dist/plugins/cms/api/index.d.cts +43 -11
  45. package/dist/plugins/cms/api/index.d.mts +43 -11
  46. package/dist/plugins/cms/api/index.d.ts +43 -11
  47. package/dist/plugins/cms/api/index.mjs +1 -1
  48. package/dist/plugins/cms/client/hooks/index.d.cts +90 -45
  49. package/dist/plugins/cms/client/hooks/index.d.mts +90 -45
  50. package/dist/plugins/cms/client/hooks/index.d.ts +90 -45
  51. package/dist/plugins/cms/client/index.d.cts +2 -1
  52. package/dist/plugins/cms/client/index.d.mts +2 -1
  53. package/dist/plugins/cms/client/index.d.ts +2 -1
  54. package/dist/plugins/cms/query-keys.cjs +69 -13
  55. package/dist/plugins/cms/query-keys.d.cts +89 -212
  56. package/dist/plugins/cms/query-keys.d.mts +89 -212
  57. package/dist/plugins/cms/query-keys.d.ts +89 -212
  58. package/dist/plugins/cms/query-keys.mjs +70 -14
  59. package/dist/plugins/kanban/client/index.d.cts +1 -1
  60. package/dist/plugins/kanban/client/index.d.mts +1 -1
  61. package/dist/plugins/kanban/client/index.d.ts +1 -1
  62. package/dist/plugins/route-docs/client/index.d.cts +1 -1
  63. package/dist/plugins/route-docs/client/index.d.mts +1 -1
  64. package/dist/plugins/route-docs/client/index.d.ts +1 -1
  65. package/dist/plugins/ui-builder/client/hooks/index.d.cts +3 -3
  66. package/dist/plugins/ui-builder/client/hooks/index.d.mts +3 -3
  67. package/dist/plugins/ui-builder/client/hooks/index.d.ts +3 -3
  68. package/dist/plugins/ui-builder/client/index.d.cts +3 -3
  69. package/dist/plugins/ui-builder/client/index.d.mts +3 -3
  70. package/dist/plugins/ui-builder/client/index.d.ts +3 -3
  71. package/dist/plugins/ui-builder/query-keys.d.cts +4 -3
  72. package/dist/plugins/ui-builder/query-keys.d.mts +4 -3
  73. package/dist/plugins/ui-builder/query-keys.d.ts +4 -3
  74. package/dist/shared/{stack.DMj68qY0.d.mts → stack.B2jlVVhD.d.mts} +5 -5
  75. package/dist/shared/{stack.Cvnj99cs.d.ts → stack.BB9tubJJ.d.ts} +9 -3
  76. package/dist/shared/{stack.Bt3WG2yb.d.cts → stack.BWduIMKG.d.cts} +35 -35
  77. package/dist/shared/stack.Bw09Lg2z.d.ts +1420 -0
  78. package/dist/shared/{stack.CkEz7vSt.d.mts → stack.C2Pvl-RS.d.mts} +9 -3
  79. package/dist/shared/{stack.C2l2wd_X.d.ts → stack.Ch9-ppmQ.d.ts} +35 -35
  80. package/dist/shared/{stack.Ht8mhDj5.d.cts → stack.D17yFglU.d.cts} +5 -5
  81. package/dist/shared/{stack.CiD115Ov.d.mts → stack.D6fPBfYe.d.mts} +35 -35
  82. package/dist/shared/stack.DFGj0gb7.d.mts +1420 -0
  83. package/dist/shared/{stack.pi0FxoEa.d.ts → stack.Dcfg4GNN.d.ts} +5 -5
  84. package/dist/shared/{stack.3rxARhgS.d.cts → stack.DrB3L7Ih.d.cts} +52 -3
  85. package/dist/shared/{stack.3rxARhgS.d.mts → stack.DrB3L7Ih.d.mts} +52 -3
  86. package/dist/shared/{stack.3rxARhgS.d.ts → stack.DrB3L7Ih.d.ts} +52 -3
  87. package/dist/shared/stack.NNrBKBkM.d.cts +1420 -0
  88. package/dist/shared/{stack.mRRyZBUg.d.cts → stack.Rb87lHqK.d.cts} +9 -3
  89. package/package.json +1 -1
  90. package/src/__tests__/cms-query-keys.test.ts +57 -0
  91. package/src/plugins/api/index.ts +1 -0
  92. package/src/plugins/api/operation.ts +16 -3
  93. package/src/plugins/cms/__tests__/authorization.test.ts +652 -187
  94. package/src/plugins/cms/__tests__/client-runtime.browser.test.tsx +655 -0
  95. package/src/plugins/cms/__tests__/content-read.typecheck.ts +351 -0
  96. package/src/plugins/cms/__tests__/getters.test.ts +286 -0
  97. package/src/plugins/cms/api/getters.ts +270 -12
  98. package/src/plugins/cms/api/index.ts +10 -0
  99. package/src/plugins/cms/api/operations.ts +163 -75
  100. package/src/plugins/cms/api/plugin.ts +50 -12
  101. package/src/plugins/cms/api/query-key-defs.ts +29 -2
  102. package/src/plugins/cms/client/hooks/cms-hooks.tsx +400 -91
  103. package/src/plugins/cms/client/index.ts +9 -0
  104. package/src/plugins/cms/query-keys.ts +171 -16
  105. package/src/plugins/cms/schemas.ts +30 -0
  106. package/src/plugins/cms/types.ts +49 -2
  107. package/src/plugins/media/__tests__/identity-partition.test.tsx +26 -16
  108. package/dist/shared/stack.CAmVUwjV.d.cts +0 -764
  109. package/dist/shared/stack.CQK02ujt.d.ts +0 -764
  110. package/dist/shared/stack.D9x1fR5a.d.mts +0 -764
  111. package/dist/shared/{stack.CKc_Bais.d.cts → stack.Csi-4Mgz.d.cts} +7 -7
  112. package/dist/shared/{stack.CKc_Bais.d.mts → stack.Csi-4Mgz.d.mts} +7 -7
  113. package/dist/shared/{stack.CKc_Bais.d.ts → stack.Csi-4Mgz.d.ts} +7 -7
@@ -2,7 +2,7 @@ import * as _tanstack_react_query from '@tanstack/react-query';
2
2
  import { z } from 'zod';
3
3
  import { ResourceFormConfig, ResourceFormResult } from '@btst/stack/plugins/client/hooks';
4
4
  import { S as SerializedPost, a as SerializedTag } from './stack.Dsatjh0B.js';
5
- import { c as createPostSchema, u as updatePostSchema } from './stack.CKc_Bais.js';
5
+ import { c as createPostSchema, u as updatePostSchema } from './stack.Csi-4Mgz.js';
6
6
 
7
7
  /**
8
8
  * Options for the usePosts hook
@@ -136,10 +136,6 @@ declare function useSuspenseTags(): {
136
136
  declare function usePostForm<TValues>(config: ResourceFormConfig<TValues, SerializedPost | null, SerializedPost | null>): ResourceFormResult<TValues, SerializedPost | null, SerializedPost | null>;
137
137
  /** Create a new post */
138
138
  declare function useCreatePost(): _tanstack_react_query.UseMutationResult<SerializedPost | null, Error, {
139
- title: string;
140
- content: string;
141
- excerpt: string;
142
- published: boolean;
143
139
  tags: ({
144
140
  name: string;
145
141
  } | {
@@ -147,6 +143,10 @@ declare function useCreatePost(): _tanstack_react_query.UseMutationResult<Serial
147
143
  name: string;
148
144
  slug: string;
149
145
  })[];
146
+ title: string;
147
+ content: string;
148
+ excerpt: string;
149
+ published: boolean;
150
150
  slug?: string | undefined;
151
151
  publishedAt?: Date | undefined;
152
152
  createdAt?: Date | undefined;
@@ -106,16 +106,65 @@ interface SerializedContentItemWithType<TData = Record<string, unknown>> extends
106
106
  */
107
107
  _relations?: Record<string, SerializedContentItemWithType[]>;
108
108
  }
109
+ /** Output shape for CMS reads; omission retains the full editor envelope. */
110
+ type CMSReadView = "content" | undefined;
111
+ /** Literal top-level property names selected from parsed content. */
112
+ type CMSContentFields = readonly string[] | undefined;
113
+ /** Select known literal properties, or an honest partial shape for dynamic arrays. */
114
+ type CMSSelectedData<TData, TFields extends CMSContentFields = undefined> = TFields extends readonly string[] ? string extends TFields[number] ? Partial<TData> : Pick<TData, Extract<TFields[number], keyof TData>> : TData;
115
+ /** Optional output controls for CMS reads. These do not change access checks. */
116
+ interface CMSReadOptions<TView extends CMSReadView = CMSReadView, TFields extends CMSContentFields = CMSContentFields> {
117
+ /** Return identity, parsed content and timestamps without editor metadata. */
118
+ view?: TView;
119
+ /** Literal declared top-level content properties. Requires content view. */
120
+ fields?: TFields;
121
+ }
122
+ /** Serialized content envelope without raw JSON or editor metadata. */
123
+ type SerializedContentItemContent<TData = Record<string, unknown>> = Pick<SerializedContentItemWithType<TData>, "id" | "slug" | "parsedData" | "createdAt" | "updatedAt">;
124
+ /** Result envelope selected by a statically known read view. */
125
+ type CMSContentItemResult<TData = Record<string, unknown>, TView extends CMSReadView = undefined, TFields extends CMSContentFields = undefined> = TView extends "content" ? SerializedContentItemContent<CMSSelectedData<TData, TFields>> : SerializedContentItemWithType<TData>;
109
126
  /**
110
127
  * Paginated list response for content items
111
128
  * @template TData - The type of the parsed data (defaults to Record<string, unknown>)
112
129
  */
113
- interface PaginatedContentItems<TData = Record<string, unknown>> {
114
- items: SerializedContentItemWithType<TData>[];
130
+ interface PaginatedContentItems<TData = Record<string, unknown>, TView extends CMSReadView = undefined, TFields extends CMSContentFields = undefined> {
131
+ items: CMSContentItemResult<TData, TView, TFields>[];
115
132
  total: number;
116
133
  limit: number;
117
134
  offset: number;
118
135
  }
136
+ /**
137
+ * Type helper to define a map of content type slugs to their data types.
138
+ * Use with z.infer to get the type from your Zod schemas.
139
+ *
140
+ * @example
141
+ * ```typescript
142
+ * import { z } from "zod"
143
+ *
144
+ * // Define your schemas
145
+ * export const ProductSchema = z.object({
146
+ * name: z.string(),
147
+ * price: z.number(),
148
+ * })
149
+ *
150
+ * export const TestimonialSchema = z.object({
151
+ * author: z.string(),
152
+ * quote: z.string(),
153
+ * })
154
+ *
155
+ * // Create the type map
156
+ * export type MyCMSTypes = {
157
+ * product: z.infer<typeof ProductSchema>
158
+ * testimonial: z.infer<typeof TestimonialSchema>
159
+ * }
160
+ *
161
+ * // Use in hooks for type-safe parsedData
162
+ * const { items } = useContent<MyCMSTypes, "product">("product")
163
+ * // items[0].parsedData.name is typed as string
164
+ * // items[0].parsedData.price is typed as number
165
+ * ```
166
+ */
167
+ type CMSContentTypeMap = Record<string, Record<string, unknown>>;
119
168
  /** JSON-safe values accepted at the CMS operation boundary. */
120
169
  type CMSOperationData = string | number | boolean | null | readonly CMSOperationData[] | {
121
170
  readonly [key: string]: CMSOperationData;
@@ -278,4 +327,4 @@ interface CMSBackendConfig {
278
327
  maxPageSize?: number;
279
328
  }
280
329
 
281
- export type { CMSBackendConfig as C, InverseRelation as I, PaginatedContentItems as P, SerializedContentType as S, SerializedContentItemWithType as a, ContentItem as b, SerializedContentItem as c, ContentItemWithType as d, ContentType as e, CMSBackendHooks as f, CMSCreateOperationContext as g, CMSCreateResultContext as h, CMSDeleteOperationContext as i, CMSDeleteResultContext as j, CMSOperationErrorContext as k, CMSOperationLifecycleContext as l, CMSUpdateOperationContext as m, CMSUpdateResultContext as n, ContentTypeConfig as o };
330
+ export type { CMSReadOptions as C, InverseRelation as I, PaginatedContentItems as P, SerializedContentType as S, CMSReadView as a, SerializedContentItemWithType as b, CMSContentFields as c, CMSContentItemResult as d, CMSContentTypeMap as e, CMSBackendConfig as f, CMSSelectedData as g, ContentItem as h, SerializedContentItem as i, ContentItemWithType as j, ContentType as k, CMSBackendHooks as l, CMSCreateOperationContext as m, CMSCreateResultContext as n, CMSDeleteOperationContext as o, CMSDeleteResultContext as p, CMSOperationErrorContext as q, CMSOperationLifecycleContext as r, CMSUpdateOperationContext as s, CMSUpdateResultContext as t, ContentTypeConfig as u, SerializedContentItemContent as v };
@@ -106,16 +106,65 @@ interface SerializedContentItemWithType<TData = Record<string, unknown>> extends
106
106
  */
107
107
  _relations?: Record<string, SerializedContentItemWithType[]>;
108
108
  }
109
+ /** Output shape for CMS reads; omission retains the full editor envelope. */
110
+ type CMSReadView = "content" | undefined;
111
+ /** Literal top-level property names selected from parsed content. */
112
+ type CMSContentFields = readonly string[] | undefined;
113
+ /** Select known literal properties, or an honest partial shape for dynamic arrays. */
114
+ type CMSSelectedData<TData, TFields extends CMSContentFields = undefined> = TFields extends readonly string[] ? string extends TFields[number] ? Partial<TData> : Pick<TData, Extract<TFields[number], keyof TData>> : TData;
115
+ /** Optional output controls for CMS reads. These do not change access checks. */
116
+ interface CMSReadOptions<TView extends CMSReadView = CMSReadView, TFields extends CMSContentFields = CMSContentFields> {
117
+ /** Return identity, parsed content and timestamps without editor metadata. */
118
+ view?: TView;
119
+ /** Literal declared top-level content properties. Requires content view. */
120
+ fields?: TFields;
121
+ }
122
+ /** Serialized content envelope without raw JSON or editor metadata. */
123
+ type SerializedContentItemContent<TData = Record<string, unknown>> = Pick<SerializedContentItemWithType<TData>, "id" | "slug" | "parsedData" | "createdAt" | "updatedAt">;
124
+ /** Result envelope selected by a statically known read view. */
125
+ type CMSContentItemResult<TData = Record<string, unknown>, TView extends CMSReadView = undefined, TFields extends CMSContentFields = undefined> = TView extends "content" ? SerializedContentItemContent<CMSSelectedData<TData, TFields>> : SerializedContentItemWithType<TData>;
109
126
  /**
110
127
  * Paginated list response for content items
111
128
  * @template TData - The type of the parsed data (defaults to Record<string, unknown>)
112
129
  */
113
- interface PaginatedContentItems<TData = Record<string, unknown>> {
114
- items: SerializedContentItemWithType<TData>[];
130
+ interface PaginatedContentItems<TData = Record<string, unknown>, TView extends CMSReadView = undefined, TFields extends CMSContentFields = undefined> {
131
+ items: CMSContentItemResult<TData, TView, TFields>[];
115
132
  total: number;
116
133
  limit: number;
117
134
  offset: number;
118
135
  }
136
+ /**
137
+ * Type helper to define a map of content type slugs to their data types.
138
+ * Use with z.infer to get the type from your Zod schemas.
139
+ *
140
+ * @example
141
+ * ```typescript
142
+ * import { z } from "zod"
143
+ *
144
+ * // Define your schemas
145
+ * export const ProductSchema = z.object({
146
+ * name: z.string(),
147
+ * price: z.number(),
148
+ * })
149
+ *
150
+ * export const TestimonialSchema = z.object({
151
+ * author: z.string(),
152
+ * quote: z.string(),
153
+ * })
154
+ *
155
+ * // Create the type map
156
+ * export type MyCMSTypes = {
157
+ * product: z.infer<typeof ProductSchema>
158
+ * testimonial: z.infer<typeof TestimonialSchema>
159
+ * }
160
+ *
161
+ * // Use in hooks for type-safe parsedData
162
+ * const { items } = useContent<MyCMSTypes, "product">("product")
163
+ * // items[0].parsedData.name is typed as string
164
+ * // items[0].parsedData.price is typed as number
165
+ * ```
166
+ */
167
+ type CMSContentTypeMap = Record<string, Record<string, unknown>>;
119
168
  /** JSON-safe values accepted at the CMS operation boundary. */
120
169
  type CMSOperationData = string | number | boolean | null | readonly CMSOperationData[] | {
121
170
  readonly [key: string]: CMSOperationData;
@@ -278,4 +327,4 @@ interface CMSBackendConfig {
278
327
  maxPageSize?: number;
279
328
  }
280
329
 
281
- export type { CMSBackendConfig as C, InverseRelation as I, PaginatedContentItems as P, SerializedContentType as S, SerializedContentItemWithType as a, ContentItem as b, SerializedContentItem as c, ContentItemWithType as d, ContentType as e, CMSBackendHooks as f, CMSCreateOperationContext as g, CMSCreateResultContext as h, CMSDeleteOperationContext as i, CMSDeleteResultContext as j, CMSOperationErrorContext as k, CMSOperationLifecycleContext as l, CMSUpdateOperationContext as m, CMSUpdateResultContext as n, ContentTypeConfig as o };
330
+ export type { CMSReadOptions as C, InverseRelation as I, PaginatedContentItems as P, SerializedContentType as S, CMSReadView as a, SerializedContentItemWithType as b, CMSContentFields as c, CMSContentItemResult as d, CMSContentTypeMap as e, CMSBackendConfig as f, CMSSelectedData as g, ContentItem as h, SerializedContentItem as i, ContentItemWithType as j, ContentType as k, CMSBackendHooks as l, CMSCreateOperationContext as m, CMSCreateResultContext as n, CMSDeleteOperationContext as o, CMSDeleteResultContext as p, CMSOperationErrorContext as q, CMSOperationLifecycleContext as r, CMSUpdateOperationContext as s, CMSUpdateResultContext as t, ContentTypeConfig as u, SerializedContentItemContent as v };
@@ -106,16 +106,65 @@ interface SerializedContentItemWithType<TData = Record<string, unknown>> extends
106
106
  */
107
107
  _relations?: Record<string, SerializedContentItemWithType[]>;
108
108
  }
109
+ /** Output shape for CMS reads; omission retains the full editor envelope. */
110
+ type CMSReadView = "content" | undefined;
111
+ /** Literal top-level property names selected from parsed content. */
112
+ type CMSContentFields = readonly string[] | undefined;
113
+ /** Select known literal properties, or an honest partial shape for dynamic arrays. */
114
+ type CMSSelectedData<TData, TFields extends CMSContentFields = undefined> = TFields extends readonly string[] ? string extends TFields[number] ? Partial<TData> : Pick<TData, Extract<TFields[number], keyof TData>> : TData;
115
+ /** Optional output controls for CMS reads. These do not change access checks. */
116
+ interface CMSReadOptions<TView extends CMSReadView = CMSReadView, TFields extends CMSContentFields = CMSContentFields> {
117
+ /** Return identity, parsed content and timestamps without editor metadata. */
118
+ view?: TView;
119
+ /** Literal declared top-level content properties. Requires content view. */
120
+ fields?: TFields;
121
+ }
122
+ /** Serialized content envelope without raw JSON or editor metadata. */
123
+ type SerializedContentItemContent<TData = Record<string, unknown>> = Pick<SerializedContentItemWithType<TData>, "id" | "slug" | "parsedData" | "createdAt" | "updatedAt">;
124
+ /** Result envelope selected by a statically known read view. */
125
+ type CMSContentItemResult<TData = Record<string, unknown>, TView extends CMSReadView = undefined, TFields extends CMSContentFields = undefined> = TView extends "content" ? SerializedContentItemContent<CMSSelectedData<TData, TFields>> : SerializedContentItemWithType<TData>;
109
126
  /**
110
127
  * Paginated list response for content items
111
128
  * @template TData - The type of the parsed data (defaults to Record<string, unknown>)
112
129
  */
113
- interface PaginatedContentItems<TData = Record<string, unknown>> {
114
- items: SerializedContentItemWithType<TData>[];
130
+ interface PaginatedContentItems<TData = Record<string, unknown>, TView extends CMSReadView = undefined, TFields extends CMSContentFields = undefined> {
131
+ items: CMSContentItemResult<TData, TView, TFields>[];
115
132
  total: number;
116
133
  limit: number;
117
134
  offset: number;
118
135
  }
136
+ /**
137
+ * Type helper to define a map of content type slugs to their data types.
138
+ * Use with z.infer to get the type from your Zod schemas.
139
+ *
140
+ * @example
141
+ * ```typescript
142
+ * import { z } from "zod"
143
+ *
144
+ * // Define your schemas
145
+ * export const ProductSchema = z.object({
146
+ * name: z.string(),
147
+ * price: z.number(),
148
+ * })
149
+ *
150
+ * export const TestimonialSchema = z.object({
151
+ * author: z.string(),
152
+ * quote: z.string(),
153
+ * })
154
+ *
155
+ * // Create the type map
156
+ * export type MyCMSTypes = {
157
+ * product: z.infer<typeof ProductSchema>
158
+ * testimonial: z.infer<typeof TestimonialSchema>
159
+ * }
160
+ *
161
+ * // Use in hooks for type-safe parsedData
162
+ * const { items } = useContent<MyCMSTypes, "product">("product")
163
+ * // items[0].parsedData.name is typed as string
164
+ * // items[0].parsedData.price is typed as number
165
+ * ```
166
+ */
167
+ type CMSContentTypeMap = Record<string, Record<string, unknown>>;
119
168
  /** JSON-safe values accepted at the CMS operation boundary. */
120
169
  type CMSOperationData = string | number | boolean | null | readonly CMSOperationData[] | {
121
170
  readonly [key: string]: CMSOperationData;
@@ -278,4 +327,4 @@ interface CMSBackendConfig {
278
327
  maxPageSize?: number;
279
328
  }
280
329
 
281
- export type { CMSBackendConfig as C, InverseRelation as I, PaginatedContentItems as P, SerializedContentType as S, SerializedContentItemWithType as a, ContentItem as b, SerializedContentItem as c, ContentItemWithType as d, ContentType as e, CMSBackendHooks as f, CMSCreateOperationContext as g, CMSCreateResultContext as h, CMSDeleteOperationContext as i, CMSDeleteResultContext as j, CMSOperationErrorContext as k, CMSOperationLifecycleContext as l, CMSUpdateOperationContext as m, CMSUpdateResultContext as n, ContentTypeConfig as o };
330
+ export type { CMSReadOptions as C, InverseRelation as I, PaginatedContentItems as P, SerializedContentType as S, CMSReadView as a, SerializedContentItemWithType as b, CMSContentFields as c, CMSContentItemResult as d, CMSContentTypeMap as e, CMSBackendConfig as f, CMSSelectedData as g, ContentItem as h, SerializedContentItem as i, ContentItemWithType as j, ContentType as k, CMSBackendHooks as l, CMSCreateOperationContext as m, CMSCreateResultContext as n, CMSDeleteOperationContext as o, CMSDeleteResultContext as p, CMSOperationErrorContext as q, CMSOperationLifecycleContext as r, CMSUpdateOperationContext as s, CMSUpdateResultContext as t, ContentTypeConfig as u, SerializedContentItemContent as v };