@btst/stack 2.1.0 → 2.3.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 (229) hide show
  1. package/dist/api/index.cjs +9 -1
  2. package/dist/api/index.d.cts +4 -4
  3. package/dist/api/index.d.mts +4 -4
  4. package/dist/api/index.d.ts +4 -4
  5. package/dist/api/index.mjs +9 -1
  6. package/dist/client/index.d.cts +2 -2
  7. package/dist/client/index.d.mts +2 -2
  8. package/dist/client/index.d.ts +2 -2
  9. package/dist/index.d.cts +1 -1
  10. package/dist/index.d.mts +1 -1
  11. package/dist/index.d.ts +1 -1
  12. package/dist/packages/stack/src/plugins/ai-chat/api/getters.cjs +42 -0
  13. package/dist/packages/stack/src/plugins/ai-chat/api/getters.mjs +39 -0
  14. package/dist/packages/stack/src/plugins/ai-chat/api/plugin.cjs +5 -0
  15. package/dist/packages/stack/src/plugins/ai-chat/api/plugin.mjs +5 -0
  16. package/dist/packages/stack/src/plugins/blog/api/getters.cjs +131 -0
  17. package/dist/packages/stack/src/plugins/blog/api/getters.mjs +127 -0
  18. package/dist/packages/stack/src/plugins/blog/api/plugin.cjs +60 -107
  19. package/dist/packages/stack/src/plugins/blog/api/plugin.mjs +60 -107
  20. package/dist/packages/stack/src/plugins/blog/api/query-key-defs.cjs +18 -0
  21. package/dist/packages/stack/src/plugins/blog/api/query-key-defs.mjs +15 -0
  22. package/dist/packages/stack/src/plugins/blog/api/serializers.cjs +21 -0
  23. package/dist/packages/stack/src/plugins/blog/api/serializers.mjs +18 -0
  24. package/dist/packages/stack/src/plugins/blog/client/plugin.cjs +16 -1
  25. package/dist/packages/stack/src/plugins/blog/client/plugin.mjs +17 -2
  26. package/dist/packages/stack/src/plugins/cms/api/getters.cjs +156 -0
  27. package/dist/packages/stack/src/plugins/cms/api/getters.mjs +147 -0
  28. package/dist/packages/stack/src/plugins/cms/api/plugin.cjs +624 -617
  29. package/dist/packages/stack/src/plugins/cms/api/plugin.mjs +623 -616
  30. package/dist/packages/stack/src/plugins/cms/api/query-key-defs.cjs +29 -0
  31. package/dist/packages/stack/src/plugins/cms/api/query-key-defs.mjs +26 -0
  32. package/dist/packages/stack/src/plugins/cms/client/components/pages/content-editor-page.internal.cjs +1 -1
  33. package/dist/packages/stack/src/plugins/cms/client/components/pages/content-editor-page.internal.mjs +1 -1
  34. package/dist/packages/stack/src/plugins/cms/client/hooks/cms-hooks.cjs +6 -3
  35. package/dist/packages/stack/src/plugins/cms/client/hooks/cms-hooks.mjs +6 -3
  36. package/dist/packages/stack/src/plugins/cms/client/plugin.cjs +15 -0
  37. package/dist/packages/stack/src/plugins/cms/client/plugin.mjs +16 -1
  38. package/dist/packages/stack/src/plugins/form-builder/api/getters.cjs +120 -0
  39. package/dist/packages/stack/src/plugins/form-builder/api/getters.mjs +112 -0
  40. package/dist/packages/stack/src/plugins/form-builder/api/plugin.cjs +75 -86
  41. package/dist/packages/stack/src/plugins/form-builder/api/plugin.mjs +71 -82
  42. package/dist/packages/stack/src/plugins/form-builder/api/query-key-defs.cjs +37 -0
  43. package/dist/packages/stack/src/plugins/form-builder/api/query-key-defs.mjs +33 -0
  44. package/dist/packages/stack/src/plugins/form-builder/client/components/pages/submissions-page.internal.cjs +1 -1
  45. package/dist/packages/stack/src/plugins/form-builder/client/components/pages/submissions-page.internal.mjs +1 -1
  46. package/dist/packages/stack/src/plugins/form-builder/client/plugin.cjs +15 -0
  47. package/dist/packages/stack/src/plugins/form-builder/client/plugin.mjs +16 -1
  48. package/dist/packages/stack/src/plugins/kanban/api/getters.cjs +84 -0
  49. package/dist/packages/stack/src/plugins/kanban/api/getters.mjs +81 -0
  50. package/dist/packages/stack/src/plugins/kanban/api/plugin.cjs +37 -123
  51. package/dist/packages/stack/src/plugins/kanban/api/plugin.mjs +37 -123
  52. package/dist/packages/stack/src/plugins/kanban/api/query-key-defs.cjs +26 -0
  53. package/dist/packages/stack/src/plugins/kanban/api/query-key-defs.mjs +23 -0
  54. package/dist/packages/stack/src/plugins/kanban/api/serializers.cjs +30 -0
  55. package/dist/packages/stack/src/plugins/kanban/api/serializers.mjs +26 -0
  56. package/dist/packages/stack/src/plugins/kanban/client/plugin.cjs +11 -1
  57. package/dist/packages/stack/src/plugins/kanban/client/plugin.mjs +12 -2
  58. package/dist/packages/stack/src/plugins/utils.cjs +6 -0
  59. package/dist/packages/stack/src/plugins/utils.mjs +6 -1
  60. package/dist/plugins/ai-chat/api/index.cjs +3 -0
  61. package/dist/plugins/ai-chat/api/index.d.cts +27 -4
  62. package/dist/plugins/ai-chat/api/index.d.mts +27 -4
  63. package/dist/plugins/ai-chat/api/index.d.ts +27 -4
  64. package/dist/plugins/ai-chat/api/index.mjs +1 -0
  65. package/dist/plugins/ai-chat/client/hooks/index.d.cts +2 -2
  66. package/dist/plugins/ai-chat/client/hooks/index.d.mts +2 -2
  67. package/dist/plugins/ai-chat/client/hooks/index.d.ts +2 -2
  68. package/dist/plugins/ai-chat/query-keys.d.cts +9 -284
  69. package/dist/plugins/ai-chat/query-keys.d.mts +9 -284
  70. package/dist/plugins/ai-chat/query-keys.d.ts +9 -284
  71. package/dist/plugins/api/index.d.cts +4 -3
  72. package/dist/plugins/api/index.d.mts +4 -3
  73. package/dist/plugins/api/index.d.ts +4 -3
  74. package/dist/plugins/blog/api/index.cjs +9 -0
  75. package/dist/plugins/blog/api/index.d.cts +20 -4
  76. package/dist/plugins/blog/api/index.d.mts +20 -4
  77. package/dist/plugins/blog/api/index.d.ts +20 -4
  78. package/dist/plugins/blog/api/index.mjs +3 -0
  79. package/dist/plugins/blog/client/hooks/index.d.cts +5 -5
  80. package/dist/plugins/blog/client/hooks/index.d.mts +5 -5
  81. package/dist/plugins/blog/client/hooks/index.d.ts +5 -5
  82. package/dist/plugins/blog/client/index.d.cts +1 -1
  83. package/dist/plugins/blog/client/index.d.mts +1 -1
  84. package/dist/plugins/blog/client/index.d.ts +1 -1
  85. package/dist/plugins/blog/query-keys.cjs +13 -9
  86. package/dist/plugins/blog/query-keys.d.cts +8 -333
  87. package/dist/plugins/blog/query-keys.d.mts +8 -333
  88. package/dist/plugins/blog/query-keys.d.ts +8 -333
  89. package/dist/plugins/blog/query-keys.mjs +13 -9
  90. package/dist/plugins/client/index.cjs +1 -0
  91. package/dist/plugins/client/index.d.cts +10 -3
  92. package/dist/plugins/client/index.d.mts +10 -3
  93. package/dist/plugins/client/index.d.ts +10 -3
  94. package/dist/plugins/client/index.mjs +1 -1
  95. package/dist/plugins/cms/api/index.cjs +10 -0
  96. package/dist/plugins/cms/api/index.d.cts +7 -163
  97. package/dist/plugins/cms/api/index.d.mts +7 -163
  98. package/dist/plugins/cms/api/index.d.ts +7 -163
  99. package/dist/plugins/cms/api/index.mjs +2 -0
  100. package/dist/plugins/cms/client/hooks/index.d.cts +1 -1
  101. package/dist/plugins/cms/client/hooks/index.d.mts +1 -1
  102. package/dist/plugins/cms/client/hooks/index.d.ts +1 -1
  103. package/dist/plugins/cms/query-keys.cjs +2 -1
  104. package/dist/plugins/cms/query-keys.d.cts +6 -9
  105. package/dist/plugins/cms/query-keys.d.mts +6 -9
  106. package/dist/plugins/cms/query-keys.d.ts +6 -9
  107. package/dist/plugins/cms/query-keys.mjs +2 -1
  108. package/dist/plugins/form-builder/api/index.cjs +10 -0
  109. package/dist/plugins/form-builder/api/index.d.cts +7 -141
  110. package/dist/plugins/form-builder/api/index.d.mts +7 -141
  111. package/dist/plugins/form-builder/api/index.d.ts +7 -141
  112. package/dist/plugins/form-builder/api/index.mjs +2 -0
  113. package/dist/plugins/form-builder/client/components/index.d.cts +1 -1
  114. package/dist/plugins/form-builder/client/components/index.d.mts +1 -1
  115. package/dist/plugins/form-builder/client/components/index.d.ts +1 -1
  116. package/dist/plugins/form-builder/client/hooks/index.d.cts +1 -1
  117. package/dist/plugins/form-builder/client/hooks/index.d.mts +1 -1
  118. package/dist/plugins/form-builder/client/hooks/index.d.ts +1 -1
  119. package/dist/plugins/form-builder/query-keys.cjs +3 -2
  120. package/dist/plugins/form-builder/query-keys.d.cts +7 -6
  121. package/dist/plugins/form-builder/query-keys.d.mts +7 -6
  122. package/dist/plugins/form-builder/query-keys.d.ts +7 -6
  123. package/dist/plugins/form-builder/query-keys.mjs +3 -2
  124. package/dist/plugins/kanban/api/index.cjs +9 -0
  125. package/dist/plugins/kanban/api/index.d.cts +17 -395
  126. package/dist/plugins/kanban/api/index.d.mts +17 -395
  127. package/dist/plugins/kanban/api/index.d.ts +17 -395
  128. package/dist/plugins/kanban/api/index.mjs +3 -0
  129. package/dist/plugins/kanban/client/components/index.d.cts +1 -1
  130. package/dist/plugins/kanban/client/components/index.d.mts +1 -1
  131. package/dist/plugins/kanban/client/components/index.d.ts +1 -1
  132. package/dist/plugins/kanban/client/hooks/index.d.cts +1 -1
  133. package/dist/plugins/kanban/client/hooks/index.d.mts +1 -1
  134. package/dist/plugins/kanban/client/hooks/index.d.ts +1 -1
  135. package/dist/plugins/kanban/client/index.d.cts +1 -1
  136. package/dist/plugins/kanban/client/index.d.mts +1 -1
  137. package/dist/plugins/kanban/client/index.d.ts +1 -1
  138. package/dist/plugins/kanban/query-keys.cjs +6 -12
  139. package/dist/plugins/kanban/query-keys.d.cts +5 -16
  140. package/dist/plugins/kanban/query-keys.d.mts +5 -16
  141. package/dist/plugins/kanban/query-keys.d.ts +5 -16
  142. package/dist/plugins/kanban/query-keys.mjs +6 -12
  143. package/dist/plugins/open-api/api/index.d.cts +2 -2
  144. package/dist/plugins/open-api/api/index.d.mts +2 -2
  145. package/dist/plugins/open-api/api/index.d.ts +2 -2
  146. package/dist/plugins/route-docs/client/index.d.cts +1 -1
  147. package/dist/plugins/route-docs/client/index.d.mts +1 -1
  148. package/dist/plugins/route-docs/client/index.d.ts +1 -1
  149. package/dist/plugins/ui-builder/index.d.cts +1 -1
  150. package/dist/plugins/ui-builder/index.d.mts +1 -1
  151. package/dist/plugins/ui-builder/index.d.ts +1 -1
  152. package/dist/shared/{stack.BoA0xkJv.d.cts → stack.7n9Y_u7N.d.cts} +33 -7
  153. package/dist/shared/{stack.BoA0xkJv.d.mts → stack.7n9Y_u7N.d.mts} +33 -7
  154. package/dist/shared/{stack.BoA0xkJv.d.ts → stack.7n9Y_u7N.d.ts} +33 -7
  155. package/dist/shared/stack.B1EeBt1b.d.ts +297 -0
  156. package/dist/shared/stack.BIXEI6v_.d.mts +419 -0
  157. package/dist/shared/stack.BKfolAyK.d.ts +419 -0
  158. package/dist/shared/stack.BeSm90va.d.ts +289 -0
  159. package/dist/shared/stack.BpolpQpf.d.cts +445 -0
  160. package/dist/shared/stack.C5dtIncc.d.mts +293 -0
  161. package/dist/shared/stack.CIP6QS9l.d.ts +293 -0
  162. package/dist/shared/stack.CMh_EdxW.d.cts +289 -0
  163. package/dist/shared/stack.CP68pFEH.d.mts +297 -0
  164. package/dist/shared/{stack.BsXokfNh.d.mts → stack.CVDTkMoO.d.cts} +8 -2
  165. package/dist/shared/{stack.BsXokfNh.d.ts → stack.CVDTkMoO.d.mts} +8 -2
  166. package/dist/shared/{stack.BsXokfNh.d.cts → stack.CVDTkMoO.d.ts} +8 -2
  167. package/dist/shared/{stack.DKDMI-QO.d.mts → stack.DJaKVY7v.d.cts} +7 -1
  168. package/dist/shared/{stack.DKDMI-QO.d.ts → stack.DJaKVY7v.d.mts} +7 -1
  169. package/dist/shared/{stack.DKDMI-QO.d.cts → stack.DJaKVY7v.d.ts} +7 -1
  170. package/dist/shared/{stack.DzH_wcvr.d.mts → stack.DdI5W6MB.d.cts} +9 -3
  171. package/dist/shared/{stack.DzH_wcvr.d.ts → stack.DdI5W6MB.d.mts} +9 -3
  172. package/dist/shared/{stack.DzH_wcvr.d.cts → stack.DdI5W6MB.d.ts} +9 -3
  173. package/dist/shared/stack.Dg09R0oB.d.mts +289 -0
  174. package/dist/shared/stack.Dw0Ly2TM.d.cts +293 -0
  175. package/dist/shared/stack.IdtKDRka.d.cts +297 -0
  176. package/dist/shared/stack.TIBF2AOx.d.ts +445 -0
  177. package/dist/shared/stack.rTy7-wQU.d.mts +445 -0
  178. package/dist/shared/stack.snB1EDP7.d.cts +419 -0
  179. package/package.json +3 -3
  180. package/src/__tests__/stack-api.test.ts +118 -0
  181. package/src/api/index.ts +15 -1
  182. package/src/plugins/ai-chat/__tests__/getters.test.ts +109 -0
  183. package/src/plugins/ai-chat/api/getters.ts +71 -0
  184. package/src/plugins/ai-chat/api/index.ts +1 -0
  185. package/src/plugins/ai-chat/api/plugin.ts +8 -0
  186. package/src/plugins/api/index.ts +3 -1
  187. package/src/plugins/blog/__tests__/getters.test.ts +540 -0
  188. package/src/plugins/blog/api/getters.ts +243 -0
  189. package/src/plugins/blog/api/index.ts +9 -0
  190. package/src/plugins/blog/api/plugin.ts +98 -141
  191. package/src/plugins/blog/api/query-key-defs.ts +46 -0
  192. package/src/plugins/blog/api/serializers.ts +27 -0
  193. package/src/plugins/blog/client/plugin.tsx +21 -1
  194. package/src/plugins/blog/query-keys.ts +21 -20
  195. package/src/plugins/client/index.ts +1 -1
  196. package/src/plugins/cms/__tests__/getters.test.ts +206 -0
  197. package/src/plugins/cms/api/getters.ts +268 -0
  198. package/src/plugins/cms/api/index.ts +15 -1
  199. package/src/plugins/cms/api/plugin.ts +151 -150
  200. package/src/plugins/cms/api/query-key-defs.ts +53 -0
  201. package/src/plugins/cms/api/serializers.ts +12 -0
  202. package/src/plugins/cms/client/components/pages/content-editor-page.internal.tsx +1 -1
  203. package/src/plugins/cms/client/hooks/cms-hooks.tsx +3 -0
  204. package/src/plugins/cms/client/plugin.tsx +19 -0
  205. package/src/plugins/cms/query-keys.ts +2 -1
  206. package/src/plugins/cms/types.ts +1 -1
  207. package/src/plugins/form-builder/__tests__/getters.test.ts +159 -0
  208. package/src/plugins/form-builder/api/getters.ts +226 -0
  209. package/src/plugins/form-builder/api/index.ts +15 -1
  210. package/src/plugins/form-builder/api/plugin.ts +107 -109
  211. package/src/plugins/form-builder/api/query-key-defs.ts +79 -0
  212. package/src/plugins/form-builder/api/serializers.ts +12 -0
  213. package/src/plugins/form-builder/client/components/pages/submissions-page.internal.tsx +1 -1
  214. package/src/plugins/form-builder/client/plugin.tsx +19 -0
  215. package/src/plugins/form-builder/query-keys.ts +6 -2
  216. package/src/plugins/form-builder/types.ts +2 -2
  217. package/src/plugins/kanban/__tests__/getters.test.ts +172 -0
  218. package/src/plugins/kanban/api/getters.ts +149 -0
  219. package/src/plugins/kanban/api/index.ts +4 -0
  220. package/src/plugins/kanban/api/plugin.ts +65 -146
  221. package/src/plugins/kanban/api/query-key-defs.ts +54 -0
  222. package/src/plugins/kanban/api/serializers.ts +49 -0
  223. package/src/plugins/kanban/client/plugin.tsx +15 -1
  224. package/src/plugins/kanban/query-keys.ts +10 -14
  225. package/src/plugins/utils.ts +19 -0
  226. package/src/types.ts +44 -5
  227. package/dist/shared/{stack.CbuN2zVV.d.cts → stack.CBON0dWL.d.cts} +7 -7
  228. package/dist/shared/{stack.CbuN2zVV.d.mts → stack.CBON0dWL.d.mts} +7 -7
  229. package/dist/shared/{stack.CbuN2zVV.d.ts → stack.CBON0dWL.d.ts} +7 -7
@@ -1,163 +1,7 @@
1
- import * as _btst_stack_plugins_api from '@btst/stack/plugins/api';
2
- import * as better_call from 'better-call';
3
- import { z } from 'zod';
4
- import { b as CMSBackendConfig, S as SerializedContentType, a as SerializedContentItemWithType, I as InverseRelation } from '../../../shared/stack.BsXokfNh.cjs';
5
-
6
- /**
7
- * CMS backend plugin
8
- * Provides API endpoints for managing content types and content items
9
- *
10
- * @param config - Configuration with content types and optional hooks
11
- */
12
- declare const cmsBackendPlugin: (config: CMSBackendConfig) => _btst_stack_plugins_api.BackendPlugin<{
13
- listContentTypes: better_call.StrictEndpoint<"/content-types", {
14
- method: "GET";
15
- }, {
16
- itemCount: number;
17
- createdAt: string;
18
- updatedAt: string;
19
- name: string;
20
- id: string;
21
- slug: string;
22
- description?: string | undefined;
23
- jsonSchema: string;
24
- fieldConfig?: string | undefined;
25
- autoFormVersion?: number | undefined;
26
- }[]>;
27
- getContentTypeBySlug: better_call.StrictEndpoint<"/content-types/:slug", {
28
- method: "GET";
29
- params: z.ZodObject<{
30
- slug: z.ZodString;
31
- }, z.core.$strip>;
32
- }, SerializedContentType>;
33
- listContentItems: better_call.StrictEndpoint<"/content/:typeSlug", {
34
- method: "GET";
35
- params: z.ZodObject<{
36
- typeSlug: z.ZodString;
37
- }, z.core.$strip>;
38
- query: z.ZodObject<{
39
- slug: z.ZodOptional<z.ZodString>;
40
- limit: z.ZodDefault<z.ZodOptional<z.ZodCoercedNumber<unknown>>>;
41
- offset: z.ZodDefault<z.ZodOptional<z.ZodCoercedNumber<unknown>>>;
42
- }, z.core.$strip>;
43
- }, {
44
- items: SerializedContentItemWithType<Record<string, unknown>>[];
45
- total: number;
46
- limit: number;
47
- offset: number;
48
- }>;
49
- getContentItem: better_call.StrictEndpoint<"/content/:typeSlug/:id", {
50
- method: "GET";
51
- params: z.ZodObject<{
52
- typeSlug: z.ZodString;
53
- id: z.ZodString;
54
- }, z.core.$strip>;
55
- }, SerializedContentItemWithType<Record<string, unknown>>>;
56
- createContentItem: better_call.StrictEndpoint<"/content/:typeSlug", {
57
- method: "POST";
58
- params: z.ZodObject<{
59
- typeSlug: z.ZodString;
60
- }, z.core.$strip>;
61
- body: z.ZodObject<{
62
- slug: z.ZodString;
63
- data: z.ZodObject<{}, z.core.$loose>;
64
- }, z.core.$strip>;
65
- }, {
66
- parsedData: Record<string, unknown>;
67
- createdAt: string;
68
- updatedAt: string;
69
- id: string;
70
- slug: string;
71
- contentTypeId: string;
72
- data: string;
73
- authorId?: string | undefined;
74
- }>;
75
- updateContentItem: better_call.StrictEndpoint<"/content/:typeSlug/:id", {
76
- method: "PUT";
77
- params: z.ZodObject<{
78
- typeSlug: z.ZodString;
79
- id: z.ZodString;
80
- }, z.core.$strip>;
81
- body: z.ZodObject<{
82
- slug: z.ZodOptional<z.ZodString>;
83
- data: z.ZodOptional<z.ZodObject<{}, z.core.$loose>>;
84
- }, z.core.$strip>;
85
- }, SerializedContentItemWithType<Record<string, unknown>>>;
86
- deleteContentItem: better_call.StrictEndpoint<"/content/:typeSlug/:id", {
87
- method: "DELETE";
88
- params: z.ZodObject<{
89
- typeSlug: z.ZodString;
90
- id: z.ZodString;
91
- }, z.core.$strip>;
92
- }, {
93
- success: boolean;
94
- }>;
95
- getContentItemPopulated: better_call.StrictEndpoint<"/content/:typeSlug/:id/populated", {
96
- method: "GET";
97
- params: z.ZodObject<{
98
- typeSlug: z.ZodString;
99
- id: z.ZodString;
100
- }, z.core.$strip>;
101
- }, {
102
- _relations: Record<string, SerializedContentItemWithType<Record<string, unknown>>[]>;
103
- parsedData: Record<string, unknown>;
104
- contentType?: SerializedContentType;
105
- createdAt: string;
106
- updatedAt: string;
107
- id: string;
108
- slug: string;
109
- contentTypeId: string;
110
- data: string;
111
- authorId?: string | undefined;
112
- }>;
113
- listContentByRelation: better_call.StrictEndpoint<"/content/:typeSlug/by-relation", {
114
- method: "GET";
115
- params: z.ZodObject<{
116
- typeSlug: z.ZodString;
117
- }, z.core.$strip>;
118
- query: z.ZodObject<{
119
- field: z.ZodString;
120
- targetId: z.ZodString;
121
- limit: z.ZodDefault<z.ZodOptional<z.ZodCoercedNumber<unknown>>>;
122
- offset: z.ZodDefault<z.ZodOptional<z.ZodCoercedNumber<unknown>>>;
123
- }, z.core.$strip>;
124
- }, {
125
- items: SerializedContentItemWithType<Record<string, unknown>>[];
126
- total: number;
127
- limit: number;
128
- offset: number;
129
- }>;
130
- getInverseRelations: better_call.StrictEndpoint<"/content-types/:slug/inverse-relations", {
131
- method: "GET";
132
- params: z.ZodObject<{
133
- slug: z.ZodString;
134
- }, z.core.$strip>;
135
- query: z.ZodObject<{
136
- itemId: z.ZodOptional<z.ZodString>;
137
- }, z.core.$strip>;
138
- }, {
139
- inverseRelations: InverseRelation[];
140
- }>;
141
- listInverseRelationItems: better_call.StrictEndpoint<"/content-types/:slug/inverse-relations/:sourceType", {
142
- method: "GET";
143
- params: z.ZodObject<{
144
- slug: z.ZodString;
145
- sourceType: z.ZodString;
146
- }, z.core.$strip>;
147
- query: z.ZodObject<{
148
- itemId: z.ZodString;
149
- fieldName: z.ZodString;
150
- limit: z.ZodDefault<z.ZodOptional<z.ZodCoercedNumber<unknown>>>;
151
- offset: z.ZodDefault<z.ZodOptional<z.ZodCoercedNumber<unknown>>>;
152
- }, z.core.$strip>;
153
- }, {
154
- items: SerializedContentItemWithType<Record<string, unknown>>[];
155
- total: number;
156
- limit: number;
157
- offset: number;
158
- }>;
159
- }>;
160
- type CMSApiRouter = ReturnType<ReturnType<typeof cmsBackendPlugin>["routes"]>;
161
-
162
- export { cmsBackendPlugin };
163
- export type { CMSApiRouter };
1
+ export { C as CMSApiRouter, b as CMSRouteKey, j as CMS_QUERY_KEYS, c as cmsBackendPlugin, d as getAllContentItems, g as getAllContentTypes, f as getContentItemById, e as getContentItemBySlug, h as serializeContentItem, i as serializeContentItemWithType, s as serializeContentType } from '../../../shared/stack.IdtKDRka.cjs';
2
+ import '@btst/stack/plugins/api';
3
+ import '../../../shared/stack.CVDTkMoO.cjs';
4
+ import 'zod';
5
+ import 'better-call';
6
+ import '@btst/db';
7
+ import '@tanstack/react-query';
@@ -1,163 +1,7 @@
1
- import * as _btst_stack_plugins_api from '@btst/stack/plugins/api';
2
- import * as better_call from 'better-call';
3
- import { z } from 'zod';
4
- import { b as CMSBackendConfig, S as SerializedContentType, a as SerializedContentItemWithType, I as InverseRelation } from '../../../shared/stack.BsXokfNh.mjs';
5
-
6
- /**
7
- * CMS backend plugin
8
- * Provides API endpoints for managing content types and content items
9
- *
10
- * @param config - Configuration with content types and optional hooks
11
- */
12
- declare const cmsBackendPlugin: (config: CMSBackendConfig) => _btst_stack_plugins_api.BackendPlugin<{
13
- listContentTypes: better_call.StrictEndpoint<"/content-types", {
14
- method: "GET";
15
- }, {
16
- itemCount: number;
17
- createdAt: string;
18
- updatedAt: string;
19
- name: string;
20
- id: string;
21
- slug: string;
22
- description?: string | undefined;
23
- jsonSchema: string;
24
- fieldConfig?: string | undefined;
25
- autoFormVersion?: number | undefined;
26
- }[]>;
27
- getContentTypeBySlug: better_call.StrictEndpoint<"/content-types/:slug", {
28
- method: "GET";
29
- params: z.ZodObject<{
30
- slug: z.ZodString;
31
- }, z.core.$strip>;
32
- }, SerializedContentType>;
33
- listContentItems: better_call.StrictEndpoint<"/content/:typeSlug", {
34
- method: "GET";
35
- params: z.ZodObject<{
36
- typeSlug: z.ZodString;
37
- }, z.core.$strip>;
38
- query: z.ZodObject<{
39
- slug: z.ZodOptional<z.ZodString>;
40
- limit: z.ZodDefault<z.ZodOptional<z.ZodCoercedNumber<unknown>>>;
41
- offset: z.ZodDefault<z.ZodOptional<z.ZodCoercedNumber<unknown>>>;
42
- }, z.core.$strip>;
43
- }, {
44
- items: SerializedContentItemWithType<Record<string, unknown>>[];
45
- total: number;
46
- limit: number;
47
- offset: number;
48
- }>;
49
- getContentItem: better_call.StrictEndpoint<"/content/:typeSlug/:id", {
50
- method: "GET";
51
- params: z.ZodObject<{
52
- typeSlug: z.ZodString;
53
- id: z.ZodString;
54
- }, z.core.$strip>;
55
- }, SerializedContentItemWithType<Record<string, unknown>>>;
56
- createContentItem: better_call.StrictEndpoint<"/content/:typeSlug", {
57
- method: "POST";
58
- params: z.ZodObject<{
59
- typeSlug: z.ZodString;
60
- }, z.core.$strip>;
61
- body: z.ZodObject<{
62
- slug: z.ZodString;
63
- data: z.ZodObject<{}, z.core.$loose>;
64
- }, z.core.$strip>;
65
- }, {
66
- parsedData: Record<string, unknown>;
67
- createdAt: string;
68
- updatedAt: string;
69
- id: string;
70
- slug: string;
71
- contentTypeId: string;
72
- data: string;
73
- authorId?: string | undefined;
74
- }>;
75
- updateContentItem: better_call.StrictEndpoint<"/content/:typeSlug/:id", {
76
- method: "PUT";
77
- params: z.ZodObject<{
78
- typeSlug: z.ZodString;
79
- id: z.ZodString;
80
- }, z.core.$strip>;
81
- body: z.ZodObject<{
82
- slug: z.ZodOptional<z.ZodString>;
83
- data: z.ZodOptional<z.ZodObject<{}, z.core.$loose>>;
84
- }, z.core.$strip>;
85
- }, SerializedContentItemWithType<Record<string, unknown>>>;
86
- deleteContentItem: better_call.StrictEndpoint<"/content/:typeSlug/:id", {
87
- method: "DELETE";
88
- params: z.ZodObject<{
89
- typeSlug: z.ZodString;
90
- id: z.ZodString;
91
- }, z.core.$strip>;
92
- }, {
93
- success: boolean;
94
- }>;
95
- getContentItemPopulated: better_call.StrictEndpoint<"/content/:typeSlug/:id/populated", {
96
- method: "GET";
97
- params: z.ZodObject<{
98
- typeSlug: z.ZodString;
99
- id: z.ZodString;
100
- }, z.core.$strip>;
101
- }, {
102
- _relations: Record<string, SerializedContentItemWithType<Record<string, unknown>>[]>;
103
- parsedData: Record<string, unknown>;
104
- contentType?: SerializedContentType;
105
- createdAt: string;
106
- updatedAt: string;
107
- id: string;
108
- slug: string;
109
- contentTypeId: string;
110
- data: string;
111
- authorId?: string | undefined;
112
- }>;
113
- listContentByRelation: better_call.StrictEndpoint<"/content/:typeSlug/by-relation", {
114
- method: "GET";
115
- params: z.ZodObject<{
116
- typeSlug: z.ZodString;
117
- }, z.core.$strip>;
118
- query: z.ZodObject<{
119
- field: z.ZodString;
120
- targetId: z.ZodString;
121
- limit: z.ZodDefault<z.ZodOptional<z.ZodCoercedNumber<unknown>>>;
122
- offset: z.ZodDefault<z.ZodOptional<z.ZodCoercedNumber<unknown>>>;
123
- }, z.core.$strip>;
124
- }, {
125
- items: SerializedContentItemWithType<Record<string, unknown>>[];
126
- total: number;
127
- limit: number;
128
- offset: number;
129
- }>;
130
- getInverseRelations: better_call.StrictEndpoint<"/content-types/:slug/inverse-relations", {
131
- method: "GET";
132
- params: z.ZodObject<{
133
- slug: z.ZodString;
134
- }, z.core.$strip>;
135
- query: z.ZodObject<{
136
- itemId: z.ZodOptional<z.ZodString>;
137
- }, z.core.$strip>;
138
- }, {
139
- inverseRelations: InverseRelation[];
140
- }>;
141
- listInverseRelationItems: better_call.StrictEndpoint<"/content-types/:slug/inverse-relations/:sourceType", {
142
- method: "GET";
143
- params: z.ZodObject<{
144
- slug: z.ZodString;
145
- sourceType: z.ZodString;
146
- }, z.core.$strip>;
147
- query: z.ZodObject<{
148
- itemId: z.ZodString;
149
- fieldName: z.ZodString;
150
- limit: z.ZodDefault<z.ZodOptional<z.ZodCoercedNumber<unknown>>>;
151
- offset: z.ZodDefault<z.ZodOptional<z.ZodCoercedNumber<unknown>>>;
152
- }, z.core.$strip>;
153
- }, {
154
- items: SerializedContentItemWithType<Record<string, unknown>>[];
155
- total: number;
156
- limit: number;
157
- offset: number;
158
- }>;
159
- }>;
160
- type CMSApiRouter = ReturnType<ReturnType<typeof cmsBackendPlugin>["routes"]>;
161
-
162
- export { cmsBackendPlugin };
163
- export type { CMSApiRouter };
1
+ export { C as CMSApiRouter, b as CMSRouteKey, j as CMS_QUERY_KEYS, c as cmsBackendPlugin, d as getAllContentItems, g as getAllContentTypes, f as getContentItemById, e as getContentItemBySlug, h as serializeContentItem, i as serializeContentItemWithType, s as serializeContentType } from '../../../shared/stack.CP68pFEH.mjs';
2
+ import '@btst/stack/plugins/api';
3
+ import '../../../shared/stack.CVDTkMoO.mjs';
4
+ import 'zod';
5
+ import 'better-call';
6
+ import '@btst/db';
7
+ import '@tanstack/react-query';
@@ -1,163 +1,7 @@
1
- import * as _btst_stack_plugins_api from '@btst/stack/plugins/api';
2
- import * as better_call from 'better-call';
3
- import { z } from 'zod';
4
- import { b as CMSBackendConfig, S as SerializedContentType, a as SerializedContentItemWithType, I as InverseRelation } from '../../../shared/stack.BsXokfNh.js';
5
-
6
- /**
7
- * CMS backend plugin
8
- * Provides API endpoints for managing content types and content items
9
- *
10
- * @param config - Configuration with content types and optional hooks
11
- */
12
- declare const cmsBackendPlugin: (config: CMSBackendConfig) => _btst_stack_plugins_api.BackendPlugin<{
13
- listContentTypes: better_call.StrictEndpoint<"/content-types", {
14
- method: "GET";
15
- }, {
16
- itemCount: number;
17
- createdAt: string;
18
- updatedAt: string;
19
- name: string;
20
- id: string;
21
- slug: string;
22
- description?: string | undefined;
23
- jsonSchema: string;
24
- fieldConfig?: string | undefined;
25
- autoFormVersion?: number | undefined;
26
- }[]>;
27
- getContentTypeBySlug: better_call.StrictEndpoint<"/content-types/:slug", {
28
- method: "GET";
29
- params: z.ZodObject<{
30
- slug: z.ZodString;
31
- }, z.core.$strip>;
32
- }, SerializedContentType>;
33
- listContentItems: better_call.StrictEndpoint<"/content/:typeSlug", {
34
- method: "GET";
35
- params: z.ZodObject<{
36
- typeSlug: z.ZodString;
37
- }, z.core.$strip>;
38
- query: z.ZodObject<{
39
- slug: z.ZodOptional<z.ZodString>;
40
- limit: z.ZodDefault<z.ZodOptional<z.ZodCoercedNumber<unknown>>>;
41
- offset: z.ZodDefault<z.ZodOptional<z.ZodCoercedNumber<unknown>>>;
42
- }, z.core.$strip>;
43
- }, {
44
- items: SerializedContentItemWithType<Record<string, unknown>>[];
45
- total: number;
46
- limit: number;
47
- offset: number;
48
- }>;
49
- getContentItem: better_call.StrictEndpoint<"/content/:typeSlug/:id", {
50
- method: "GET";
51
- params: z.ZodObject<{
52
- typeSlug: z.ZodString;
53
- id: z.ZodString;
54
- }, z.core.$strip>;
55
- }, SerializedContentItemWithType<Record<string, unknown>>>;
56
- createContentItem: better_call.StrictEndpoint<"/content/:typeSlug", {
57
- method: "POST";
58
- params: z.ZodObject<{
59
- typeSlug: z.ZodString;
60
- }, z.core.$strip>;
61
- body: z.ZodObject<{
62
- slug: z.ZodString;
63
- data: z.ZodObject<{}, z.core.$loose>;
64
- }, z.core.$strip>;
65
- }, {
66
- parsedData: Record<string, unknown>;
67
- createdAt: string;
68
- updatedAt: string;
69
- id: string;
70
- slug: string;
71
- contentTypeId: string;
72
- data: string;
73
- authorId?: string | undefined;
74
- }>;
75
- updateContentItem: better_call.StrictEndpoint<"/content/:typeSlug/:id", {
76
- method: "PUT";
77
- params: z.ZodObject<{
78
- typeSlug: z.ZodString;
79
- id: z.ZodString;
80
- }, z.core.$strip>;
81
- body: z.ZodObject<{
82
- slug: z.ZodOptional<z.ZodString>;
83
- data: z.ZodOptional<z.ZodObject<{}, z.core.$loose>>;
84
- }, z.core.$strip>;
85
- }, SerializedContentItemWithType<Record<string, unknown>>>;
86
- deleteContentItem: better_call.StrictEndpoint<"/content/:typeSlug/:id", {
87
- method: "DELETE";
88
- params: z.ZodObject<{
89
- typeSlug: z.ZodString;
90
- id: z.ZodString;
91
- }, z.core.$strip>;
92
- }, {
93
- success: boolean;
94
- }>;
95
- getContentItemPopulated: better_call.StrictEndpoint<"/content/:typeSlug/:id/populated", {
96
- method: "GET";
97
- params: z.ZodObject<{
98
- typeSlug: z.ZodString;
99
- id: z.ZodString;
100
- }, z.core.$strip>;
101
- }, {
102
- _relations: Record<string, SerializedContentItemWithType<Record<string, unknown>>[]>;
103
- parsedData: Record<string, unknown>;
104
- contentType?: SerializedContentType;
105
- createdAt: string;
106
- updatedAt: string;
107
- id: string;
108
- slug: string;
109
- contentTypeId: string;
110
- data: string;
111
- authorId?: string | undefined;
112
- }>;
113
- listContentByRelation: better_call.StrictEndpoint<"/content/:typeSlug/by-relation", {
114
- method: "GET";
115
- params: z.ZodObject<{
116
- typeSlug: z.ZodString;
117
- }, z.core.$strip>;
118
- query: z.ZodObject<{
119
- field: z.ZodString;
120
- targetId: z.ZodString;
121
- limit: z.ZodDefault<z.ZodOptional<z.ZodCoercedNumber<unknown>>>;
122
- offset: z.ZodDefault<z.ZodOptional<z.ZodCoercedNumber<unknown>>>;
123
- }, z.core.$strip>;
124
- }, {
125
- items: SerializedContentItemWithType<Record<string, unknown>>[];
126
- total: number;
127
- limit: number;
128
- offset: number;
129
- }>;
130
- getInverseRelations: better_call.StrictEndpoint<"/content-types/:slug/inverse-relations", {
131
- method: "GET";
132
- params: z.ZodObject<{
133
- slug: z.ZodString;
134
- }, z.core.$strip>;
135
- query: z.ZodObject<{
136
- itemId: z.ZodOptional<z.ZodString>;
137
- }, z.core.$strip>;
138
- }, {
139
- inverseRelations: InverseRelation[];
140
- }>;
141
- listInverseRelationItems: better_call.StrictEndpoint<"/content-types/:slug/inverse-relations/:sourceType", {
142
- method: "GET";
143
- params: z.ZodObject<{
144
- slug: z.ZodString;
145
- sourceType: z.ZodString;
146
- }, z.core.$strip>;
147
- query: z.ZodObject<{
148
- itemId: z.ZodString;
149
- fieldName: z.ZodString;
150
- limit: z.ZodDefault<z.ZodOptional<z.ZodCoercedNumber<unknown>>>;
151
- offset: z.ZodDefault<z.ZodOptional<z.ZodCoercedNumber<unknown>>>;
152
- }, z.core.$strip>;
153
- }, {
154
- items: SerializedContentItemWithType<Record<string, unknown>>[];
155
- total: number;
156
- limit: number;
157
- offset: number;
158
- }>;
159
- }>;
160
- type CMSApiRouter = ReturnType<ReturnType<typeof cmsBackendPlugin>["routes"]>;
161
-
162
- export { cmsBackendPlugin };
163
- export type { CMSApiRouter };
1
+ export { C as CMSApiRouter, b as CMSRouteKey, j as CMS_QUERY_KEYS, c as cmsBackendPlugin, d as getAllContentItems, g as getAllContentTypes, f as getContentItemById, e as getContentItemBySlug, h as serializeContentItem, i as serializeContentItemWithType, s as serializeContentType } from '../../../shared/stack.B1EeBt1b.js';
2
+ import '@btst/stack/plugins/api';
3
+ import '../../../shared/stack.CVDTkMoO.js';
4
+ import 'zod';
5
+ import 'better-call';
6
+ import '@btst/db';
7
+ import '@tanstack/react-query';
@@ -1 +1,3 @@
1
1
  export { cmsBackendPlugin } from '../../../packages/stack/src/plugins/cms/api/plugin.mjs';
2
+ export { getAllContentItems, getAllContentTypes, getContentItemById, getContentItemBySlug, serializeContentItem, serializeContentItemWithType, serializeContentType } from '../../../packages/stack/src/plugins/cms/api/getters.mjs';
3
+ export { CMS_QUERY_KEYS } from '../../../packages/stack/src/plugins/cms/api/query-key-defs.mjs';
@@ -1,5 +1,5 @@
1
1
  import * as _tanstack_react_query from '@tanstack/react-query';
2
- import { S as SerializedContentType, a as SerializedContentItemWithType } from '../../../../shared/stack.BsXokfNh.cjs';
2
+ import { S as SerializedContentType, a as SerializedContentItemWithType } from '../../../../shared/stack.CVDTkMoO.cjs';
3
3
  import 'zod';
4
4
 
5
5
  interface UseContentTypesResult {
@@ -1,5 +1,5 @@
1
1
  import * as _tanstack_react_query from '@tanstack/react-query';
2
- import { S as SerializedContentType, a as SerializedContentItemWithType } from '../../../../shared/stack.BsXokfNh.mjs';
2
+ import { S as SerializedContentType, a as SerializedContentItemWithType } from '../../../../shared/stack.CVDTkMoO.mjs';
3
3
  import 'zod';
4
4
 
5
5
  interface UseContentTypesResult {
@@ -1,5 +1,5 @@
1
1
  import * as _tanstack_react_query from '@tanstack/react-query';
2
- import { S as SerializedContentType, a as SerializedContentItemWithType } from '../../../../shared/stack.BsXokfNh.js';
2
+ import { S as SerializedContentType, a as SerializedContentItemWithType } from '../../../../shared/stack.CVDTkMoO.js';
3
3
  import 'zod';
4
4
 
5
5
  interface UseContentTypesResult {
@@ -1,6 +1,7 @@
1
1
  'use strict';
2
2
 
3
3
  const queryKeyFactory = require('@lukemorales/query-key-factory');
4
+ const queryKeyDefs = require('../../packages/stack/src/plugins/cms/api/query-key-defs.cjs');
4
5
 
5
6
  function isErrorResponse(response) {
6
7
  if (typeof response !== "object" || response === null) {
@@ -70,7 +71,7 @@ function createContentTypesQueries(client, headers) {
70
71
  function createContentQueries(client, headers) {
71
72
  return queryKeyFactory.createQueryKeys("cmsContent", {
72
73
  list: (params) => ({
73
- queryKey: [params],
74
+ queryKey: [queryKeyDefs.contentListDiscriminator(params)],
74
75
  queryFn: async () => {
75
76
  try {
76
77
  const response = await client("/content/:typeSlug", {
@@ -1,10 +1,11 @@
1
+ import { C as CMSApiRouter, a as ContentListDiscriminator } from '../../shared/stack.IdtKDRka.cjs';
1
2
  import * as _tanstack_react_query from '@tanstack/react-query';
2
3
  import { createApiClient } from '@btst/stack/plugins/client';
3
- import { S as SerializedContentType, P as PaginatedContentItems, a as SerializedContentItemWithType } from '../../shared/stack.BsXokfNh.cjs';
4
- import { CMSApiRouter } from './api/index.cjs';
5
- import 'zod';
4
+ import { S as SerializedContentType, P as PaginatedContentItems, a as SerializedContentItemWithType } from '../../shared/stack.CVDTkMoO.cjs';
6
5
  import '@btst/stack/plugins/api';
7
6
  import 'better-call';
7
+ import 'zod';
8
+ import '@btst/db';
8
9
 
9
10
  interface ContentListParams {
10
11
  limit?: number;
@@ -43,12 +44,8 @@ declare function createCMSQueryKeys(client: ReturnType<typeof createApiClient<CM
43
44
  list: ((params: {
44
45
  typeSlug: string;
45
46
  } & ContentListParams) => Omit<{
46
- queryKey: readonly ["cmsContent", "list", {
47
- typeSlug: string;
48
- } & ContentListParams];
49
- queryFn: _tanstack_react_query.QueryFunction<PaginatedContentItems<Record<string, unknown>>, readonly ["cmsContent", "list", {
50
- typeSlug: string;
51
- } & ContentListParams]>;
47
+ queryKey: readonly ["cmsContent", "list", ContentListDiscriminator];
48
+ queryFn: _tanstack_react_query.QueryFunction<PaginatedContentItems<Record<string, unknown>>, readonly ["cmsContent", "list", ContentListDiscriminator]>;
52
49
  } & {
53
50
  _def: readonly ["cmsContent", "list"];
54
51
  }, "_def">) & {
@@ -1,10 +1,11 @@
1
+ import { C as CMSApiRouter, a as ContentListDiscriminator } from '../../shared/stack.CP68pFEH.mjs';
1
2
  import * as _tanstack_react_query from '@tanstack/react-query';
2
3
  import { createApiClient } from '@btst/stack/plugins/client';
3
- import { S as SerializedContentType, P as PaginatedContentItems, a as SerializedContentItemWithType } from '../../shared/stack.BsXokfNh.mjs';
4
- import { CMSApiRouter } from './api/index.mjs';
5
- import 'zod';
4
+ import { S as SerializedContentType, P as PaginatedContentItems, a as SerializedContentItemWithType } from '../../shared/stack.CVDTkMoO.mjs';
6
5
  import '@btst/stack/plugins/api';
7
6
  import 'better-call';
7
+ import 'zod';
8
+ import '@btst/db';
8
9
 
9
10
  interface ContentListParams {
10
11
  limit?: number;
@@ -43,12 +44,8 @@ declare function createCMSQueryKeys(client: ReturnType<typeof createApiClient<CM
43
44
  list: ((params: {
44
45
  typeSlug: string;
45
46
  } & ContentListParams) => Omit<{
46
- queryKey: readonly ["cmsContent", "list", {
47
- typeSlug: string;
48
- } & ContentListParams];
49
- queryFn: _tanstack_react_query.QueryFunction<PaginatedContentItems<Record<string, unknown>>, readonly ["cmsContent", "list", {
50
- typeSlug: string;
51
- } & ContentListParams]>;
47
+ queryKey: readonly ["cmsContent", "list", ContentListDiscriminator];
48
+ queryFn: _tanstack_react_query.QueryFunction<PaginatedContentItems<Record<string, unknown>>, readonly ["cmsContent", "list", ContentListDiscriminator]>;
52
49
  } & {
53
50
  _def: readonly ["cmsContent", "list"];
54
51
  }, "_def">) & {
@@ -1,10 +1,11 @@
1
+ import { C as CMSApiRouter, a as ContentListDiscriminator } from '../../shared/stack.B1EeBt1b.js';
1
2
  import * as _tanstack_react_query from '@tanstack/react-query';
2
3
  import { createApiClient } from '@btst/stack/plugins/client';
3
- import { S as SerializedContentType, P as PaginatedContentItems, a as SerializedContentItemWithType } from '../../shared/stack.BsXokfNh.js';
4
- import { CMSApiRouter } from './api/index.js';
5
- import 'zod';
4
+ import { S as SerializedContentType, P as PaginatedContentItems, a as SerializedContentItemWithType } from '../../shared/stack.CVDTkMoO.js';
6
5
  import '@btst/stack/plugins/api';
7
6
  import 'better-call';
7
+ import 'zod';
8
+ import '@btst/db';
8
9
 
9
10
  interface ContentListParams {
10
11
  limit?: number;
@@ -43,12 +44,8 @@ declare function createCMSQueryKeys(client: ReturnType<typeof createApiClient<CM
43
44
  list: ((params: {
44
45
  typeSlug: string;
45
46
  } & ContentListParams) => Omit<{
46
- queryKey: readonly ["cmsContent", "list", {
47
- typeSlug: string;
48
- } & ContentListParams];
49
- queryFn: _tanstack_react_query.QueryFunction<PaginatedContentItems<Record<string, unknown>>, readonly ["cmsContent", "list", {
50
- typeSlug: string;
51
- } & ContentListParams]>;
47
+ queryKey: readonly ["cmsContent", "list", ContentListDiscriminator];
48
+ queryFn: _tanstack_react_query.QueryFunction<PaginatedContentItems<Record<string, unknown>>, readonly ["cmsContent", "list", ContentListDiscriminator]>;
52
49
  } & {
53
50
  _def: readonly ["cmsContent", "list"];
54
51
  }, "_def">) & {
@@ -1,4 +1,5 @@
1
1
  import { mergeQueryKeys, createQueryKeys } from '@lukemorales/query-key-factory';
2
+ import { contentListDiscriminator } from '../../packages/stack/src/plugins/cms/api/query-key-defs.mjs';
2
3
 
3
4
  function isErrorResponse(response) {
4
5
  if (typeof response !== "object" || response === null) {
@@ -68,7 +69,7 @@ function createContentTypesQueries(client, headers) {
68
69
  function createContentQueries(client, headers) {
69
70
  return createQueryKeys("cmsContent", {
70
71
  list: (params) => ({
71
- queryKey: [params],
72
+ queryKey: [contentListDiscriminator(params)],
72
73
  queryFn: async () => {
73
74
  try {
74
75
  const response = await client("/content/:typeSlug", {