@kyro-cms/core 0.1.5 → 0.1.7

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 (170) hide show
  1. package/dist/WebhookService-BCgL1bLF.d.cts +112 -0
  2. package/dist/WebhookService-BPVJUgTl.d.ts +112 -0
  3. package/dist/{base-DlhVlwnN.d.cts → base-B0Y6isUJ.d.cts} +1 -1
  4. package/dist/{base-CQkFzqQl.d.ts → base-DaP-5PPG.d.ts} +1 -1
  5. package/dist/bootstrap-BMWVB2T6.cjs +31 -0
  6. package/dist/{bootstrap-X6TP3NKX.cjs.map → bootstrap-BMWVB2T6.cjs.map} +1 -1
  7. package/dist/bootstrap-LL6O7PWO.js +6 -0
  8. package/dist/{bootstrap-BDTTUGY2.js.map → bootstrap-LL6O7PWO.js.map} +1 -1
  9. package/dist/{chunk-3VZCX4DF.cjs → chunk-42JPONZU.cjs} +77 -14
  10. package/dist/chunk-42JPONZU.cjs.map +1 -0
  11. package/dist/{chunk-MHS6CPO5.cjs → chunk-4M5PHMUE.cjs} +66 -346
  12. package/dist/chunk-4M5PHMUE.cjs.map +1 -0
  13. package/dist/chunk-4PWRCMTQ.cjs +15 -0
  14. package/dist/chunk-4PWRCMTQ.cjs.map +1 -0
  15. package/dist/chunk-6COM32WF.js +47 -0
  16. package/dist/chunk-6COM32WF.js.map +1 -0
  17. package/dist/chunk-6MSSF46R.js +941 -0
  18. package/dist/chunk-6MSSF46R.js.map +1 -0
  19. package/dist/{chunk-TZFJMPCH.cjs → chunk-7YITG2US.cjs} +9 -18
  20. package/dist/chunk-7YITG2US.cjs.map +1 -0
  21. package/dist/{chunk-A3RQWHKD.cjs → chunk-BLMFBDBG.cjs} +56 -6
  22. package/dist/chunk-BLMFBDBG.cjs.map +1 -0
  23. package/dist/{chunk-EINVJPFM.js → chunk-BTOE3VUK.js} +65 -3
  24. package/dist/chunk-BTOE3VUK.js.map +1 -0
  25. package/dist/chunk-E5X75WNB.js +497 -0
  26. package/dist/chunk-E5X75WNB.js.map +1 -0
  27. package/dist/chunk-E63IF3MD.cjs +951 -0
  28. package/dist/chunk-E63IF3MD.cjs.map +1 -0
  29. package/dist/{chunk-K7QF2QCM.cjs → chunk-FTSSDDZQ.cjs} +7 -3
  30. package/dist/chunk-FTSSDDZQ.cjs.map +1 -0
  31. package/dist/chunk-G7VZBCD6.cjs +35 -0
  32. package/dist/{chunk-5BLDMQED.cjs.map → chunk-G7VZBCD6.cjs.map} +1 -1
  33. package/dist/{chunk-VMSRTAH7.js → chunk-GLCPGZPM.js} +56 -6
  34. package/dist/chunk-GLCPGZPM.js.map +1 -0
  35. package/dist/{chunk-V3B25QOK.cjs → chunk-GVFB5C6O.cjs} +74 -2
  36. package/dist/chunk-GVFB5C6O.cjs.map +1 -0
  37. package/dist/chunk-HVSQDZZJ.cjs +765 -0
  38. package/dist/chunk-HVSQDZZJ.cjs.map +1 -0
  39. package/dist/chunk-HYC4GNHX.js +758 -0
  40. package/dist/chunk-HYC4GNHX.js.map +1 -0
  41. package/dist/chunk-KDVDIZ4Y.cjs +3479 -0
  42. package/dist/chunk-KDVDIZ4Y.cjs.map +1 -0
  43. package/dist/{chunk-OG3KX56O.js → chunk-KWGNR4HM.js} +7 -3
  44. package/dist/chunk-KWGNR4HM.js.map +1 -0
  45. package/dist/chunk-LIJVWQKU.cjs +256 -0
  46. package/dist/chunk-LIJVWQKU.cjs.map +1 -0
  47. package/dist/{chunk-XTZSUDSI.js → chunk-LTRCYJAG.js} +3 -18
  48. package/dist/chunk-LTRCYJAG.js.map +1 -0
  49. package/dist/{chunk-UEYC46RL.js → chunk-OUGKLCYF.js} +71 -8
  50. package/dist/chunk-OUGKLCYF.js.map +1 -0
  51. package/dist/chunk-RONAX6UU.js +3456 -0
  52. package/dist/chunk-RONAX6UU.js.map +1 -0
  53. package/dist/{chunk-C74MQIRL.js → chunk-RRYXQMZG.js} +66 -344
  54. package/dist/chunk-RRYXQMZG.js.map +1 -0
  55. package/dist/{chunk-QUJ4OLSC.js → chunk-U74F3YZU.js} +87 -7
  56. package/dist/chunk-U74F3YZU.js.map +1 -0
  57. package/dist/chunk-VIONYQ2K.cjs +517 -0
  58. package/dist/chunk-VIONYQ2K.cjs.map +1 -0
  59. package/dist/chunk-VSTRLXMQ.cjs +50 -0
  60. package/dist/chunk-VSTRLXMQ.cjs.map +1 -0
  61. package/dist/chunk-YT7HXXVN.js +13 -0
  62. package/dist/chunk-YT7HXXVN.js.map +1 -0
  63. package/dist/chunk-Z6ZWNWWR.js +30 -0
  64. package/dist/{chunk-NSBPE2FW.js.map → chunk-Z6ZWNWWR.js.map} +1 -1
  65. package/dist/cli/index.cjs +11 -7
  66. package/dist/cli/index.cjs.map +1 -1
  67. package/dist/cli/index.js +11 -7
  68. package/dist/cli/index.js.map +1 -1
  69. package/dist/drizzle/index.cjs +20 -17
  70. package/dist/drizzle/index.d.cts +4 -4
  71. package/dist/drizzle/index.d.ts +4 -4
  72. package/dist/drizzle/index.js +4 -5
  73. package/dist/graphql/index.cjs +4 -4
  74. package/dist/graphql/index.d.cts +3 -2
  75. package/dist/graphql/index.d.ts +3 -2
  76. package/dist/graphql/index.js +2 -2
  77. package/dist/{index-DI0DRPNv.d.cts → index-BwE4NueJ.d.cts} +1 -1
  78. package/dist/{index-CMUNCIWQ.d.ts → index-DUKmDSeC.d.cts} +96 -24
  79. package/dist/{index-BMySjW6o.d.cts → index-DtBi3zP0.d.ts} +96 -24
  80. package/dist/{index-4fJKLFK2.d.ts → index-DupWTmW6.d.ts} +1 -1
  81. package/dist/index.cjs +3317 -352
  82. package/dist/index.cjs.map +1 -1
  83. package/dist/index.d.cts +379 -105
  84. package/dist/index.d.ts +379 -105
  85. package/dist/index.js +3211 -310
  86. package/dist/index.js.map +1 -1
  87. package/dist/media-HOT3O7RW.js +4 -0
  88. package/dist/media-HOT3O7RW.js.map +1 -0
  89. package/dist/media-WKP5AOX2.cjs +17 -0
  90. package/dist/media-WKP5AOX2.cjs.map +1 -0
  91. package/dist/mongodb/index.cjs +1 -1
  92. package/dist/mongodb/index.d.cts +2 -2
  93. package/dist/mongodb/index.d.ts +2 -2
  94. package/dist/mongodb/index.js +1 -1
  95. package/dist/mysql-media-AI6YK767.cjs +48 -0
  96. package/dist/mysql-media-AI6YK767.cjs.map +1 -0
  97. package/dist/mysql-media-CDZUS7YX.js +45 -0
  98. package/dist/mysql-media-CDZUS7YX.js.map +1 -0
  99. package/dist/postgres-auth-adapter-EVRPO7BQ.cjs +14 -0
  100. package/dist/{postgres-auth-adapter-VK6GY7LX.cjs.map → postgres-auth-adapter-EVRPO7BQ.cjs.map} +1 -1
  101. package/dist/postgres-auth-adapter-OTRWSTT5.js +5 -0
  102. package/dist/{postgres-auth-adapter-REJFUMP7.js.map → postgres-auth-adapter-OTRWSTT5.js.map} +1 -1
  103. package/dist/redis-adapter-2N6VA7BI.cjs +13 -0
  104. package/dist/{redis-adapter-LBLNKGNS.cjs.map → redis-adapter-2N6VA7BI.cjs.map} +1 -1
  105. package/dist/redis-adapter-RA24FNCX.js +4 -0
  106. package/dist/{redis-adapter-4YDY4LWE.js.map → redis-adapter-RA24FNCX.js.map} +1 -1
  107. package/dist/rest/index.cjs +7 -5
  108. package/dist/rest/index.d.cts +29 -3
  109. package/dist/rest/index.d.ts +29 -3
  110. package/dist/rest/index.js +5 -3
  111. package/dist/schema-CNB2DDTX.js +6 -0
  112. package/dist/schema-CNB2DDTX.js.map +1 -0
  113. package/dist/schema-Y777CQQS.cjs +67 -0
  114. package/dist/schema-Y777CQQS.cjs.map +1 -0
  115. package/dist/templates/index.cjs +24 -28
  116. package/dist/templates/index.d.cts +2 -4
  117. package/dist/templates/index.d.ts +2 -4
  118. package/dist/templates/index.js +2 -2
  119. package/dist/trpc/index.cjs +12 -12
  120. package/dist/trpc/index.d.cts +19 -14
  121. package/dist/trpc/index.d.ts +19 -14
  122. package/dist/trpc/index.js +3 -3
  123. package/dist/{types-BGM5MV_K.d.cts → types-BM0s_YOy.d.cts} +67 -35
  124. package/dist/{types-BGM5MV_K.d.ts → types-BM0s_YOy.d.ts} +67 -35
  125. package/dist/ws/index.cjs +1 -1
  126. package/dist/ws/index.js +1 -1
  127. package/package.json +11 -1
  128. package/dist/bootstrap-BDTTUGY2.js +0 -4
  129. package/dist/bootstrap-X6TP3NKX.cjs +0 -29
  130. package/dist/chunk-3QX6KG2S.js +0 -2125
  131. package/dist/chunk-3QX6KG2S.js.map +0 -1
  132. package/dist/chunk-3VZCX4DF.cjs.map +0 -1
  133. package/dist/chunk-5BLDMQED.cjs +0 -18
  134. package/dist/chunk-7G6EVYCU.cjs +0 -94
  135. package/dist/chunk-7G6EVYCU.cjs.map +0 -1
  136. package/dist/chunk-A3RQWHKD.cjs.map +0 -1
  137. package/dist/chunk-C74MQIRL.js.map +0 -1
  138. package/dist/chunk-EINVJPFM.js.map +0 -1
  139. package/dist/chunk-F5B64H5S.cjs +0 -2149
  140. package/dist/chunk-F5B64H5S.cjs.map +0 -1
  141. package/dist/chunk-K7QF2QCM.cjs.map +0 -1
  142. package/dist/chunk-LRTZJJPD.js +0 -86
  143. package/dist/chunk-LRTZJJPD.js.map +0 -1
  144. package/dist/chunk-MHS6CPO5.cjs.map +0 -1
  145. package/dist/chunk-NSBPE2FW.js +0 -15
  146. package/dist/chunk-OG3KX56O.js.map +0 -1
  147. package/dist/chunk-QUJ4OLSC.js.map +0 -1
  148. package/dist/chunk-R3XIBBAW.cjs +0 -34
  149. package/dist/chunk-R3XIBBAW.cjs.map +0 -1
  150. package/dist/chunk-SDMNUYVU.js +0 -30
  151. package/dist/chunk-SDMNUYVU.js.map +0 -1
  152. package/dist/chunk-TZFJMPCH.cjs.map +0 -1
  153. package/dist/chunk-UEG7KMKC.cjs +0 -228
  154. package/dist/chunk-UEG7KMKC.cjs.map +0 -1
  155. package/dist/chunk-UEYC46RL.js.map +0 -1
  156. package/dist/chunk-V3B25QOK.cjs.map +0 -1
  157. package/dist/chunk-VMSRTAH7.js.map +0 -1
  158. package/dist/chunk-XTZSUDSI.js.map +0 -1
  159. package/dist/chunk-YD7Y25W7.cjs +0 -176
  160. package/dist/chunk-YD7Y25W7.cjs.map +0 -1
  161. package/dist/chunk-YPAFJ7EV.js +0 -225
  162. package/dist/chunk-YPAFJ7EV.js.map +0 -1
  163. package/dist/database-7CJOXEZR.js +0 -5
  164. package/dist/database-7CJOXEZR.js.map +0 -1
  165. package/dist/database-QOIV44GT.cjs +0 -22
  166. package/dist/database-QOIV44GT.cjs.map +0 -1
  167. package/dist/postgres-auth-adapter-REJFUMP7.js +0 -5
  168. package/dist/postgres-auth-adapter-VK6GY7LX.cjs +0 -14
  169. package/dist/redis-adapter-4YDY4LWE.js +0 -4
  170. package/dist/redis-adapter-LBLNKGNS.cjs +0 -13
@@ -1,2149 +0,0 @@
1
- 'use strict';
2
-
3
- // src/templates/minimal.ts
4
- var minimalCollections = {
5
- posts: {
6
- slug: "posts",
7
- label: "Posts",
8
- labelPlural: "Posts",
9
- singularLabel: "Post",
10
- admin: {
11
- useAsTitle: "title",
12
- defaultColumns: ["title", "status", "createdAt"],
13
- description: "Blog posts and articles"
14
- },
15
- fields: [
16
- {
17
- name: "title",
18
- type: "text",
19
- required: true,
20
- label: "Title",
21
- admin: { description: "The post title" }
22
- },
23
- {
24
- name: "slug",
25
- type: "text",
26
- required: true,
27
- label: "Slug",
28
- admin: { description: "URL-friendly identifier" }
29
- },
30
- {
31
- name: "content",
32
- type: "richtext",
33
- label: "Content"
34
- },
35
- {
36
- name: "status",
37
- type: "select",
38
- label: "Status",
39
- options: [
40
- { label: "Draft", value: "draft" },
41
- { label: "Published", value: "published" }
42
- ],
43
- defaultValue: "draft",
44
- admin: {
45
- description: "Publication status"
46
- }
47
- },
48
- {
49
- name: "publishedAt",
50
- type: "date",
51
- label: "Published At",
52
- admin: { description: "When to publish this post" }
53
- }
54
- ],
55
- timestamps: true
56
- }
57
- };
58
-
59
- // src/templates/blog.ts
60
- var blogCollections = {
61
- posts: {
62
- slug: "posts",
63
- label: "Posts",
64
- labelPlural: "Posts",
65
- singularLabel: "Post",
66
- admin: {
67
- useAsTitle: "title",
68
- defaultColumns: ["title", "category", "status", "createdAt"],
69
- description: "Blog posts and articles"
70
- },
71
- fields: [
72
- {
73
- name: "title",
74
- type: "text",
75
- required: true,
76
- label: "Title",
77
- admin: {
78
- description: "The main title of the post as it will appear publicly."
79
- }
80
- },
81
- {
82
- name: "slug",
83
- type: "text",
84
- required: true,
85
- label: "Slug",
86
- admin: { description: "The URL-friendly identifier for the post." }
87
- },
88
- {
89
- name: "excerpt",
90
- type: "textarea",
91
- label: "Excerpt",
92
- admin: {
93
- description: "A brief summary of the post used in listings and SEO meta tags."
94
- }
95
- },
96
- {
97
- name: "content",
98
- type: "richtext",
99
- label: "Content",
100
- admin: {
101
- description: "The comprehensive body content of the blog post."
102
- }
103
- },
104
- {
105
- name: "featuredImage",
106
- type: "upload",
107
- label: "Featured Image",
108
- relationTo: "media",
109
- admin: {
110
- description: "The primary visual used to represent this post."
111
- }
112
- },
113
- {
114
- name: "category",
115
- type: "relationship",
116
- label: "Category",
117
- relationTo: "categories",
118
- admin: {
119
- description: "Select the primary category this post belongs to."
120
- }
121
- },
122
- {
123
- name: "tags",
124
- type: "array",
125
- label: "Tags",
126
- fields: [{ name: "tag", type: "text" }]
127
- },
128
- {
129
- name: "status",
130
- type: "select",
131
- label: "Status",
132
- options: [
133
- { label: "Draft", value: "draft" },
134
- { label: "Published", value: "published" }
135
- ],
136
- defaultValue: "draft"
137
- },
138
- {
139
- name: "publishedAt",
140
- type: "date",
141
- label: "Published At"
142
- }
143
- ],
144
- timestamps: true
145
- },
146
- categories: {
147
- slug: "categories",
148
- label: "Categories",
149
- labelPlural: "Categories",
150
- singularLabel: "Category",
151
- admin: {
152
- useAsTitle: "name",
153
- defaultColumns: ["name", "slug"],
154
- description: "Post categories"
155
- },
156
- fields: [
157
- {
158
- name: "name",
159
- type: "text",
160
- required: true,
161
- label: "Name"
162
- },
163
- {
164
- name: "slug",
165
- type: "text",
166
- required: true,
167
- label: "Slug"
168
- },
169
- {
170
- name: "description",
171
- type: "textarea",
172
- label: "Description"
173
- },
174
- {
175
- name: "parent",
176
- type: "relationship",
177
- label: "Parent Category",
178
- relationTo: "categories"
179
- }
180
- ],
181
- timestamps: true
182
- }
183
- };
184
- var blogGlobals = [];
185
-
186
- // src/templates/ecommerce.ts
187
- var ecommerceCollections = {
188
- products: {
189
- slug: "products",
190
- label: "Products",
191
- labelPlural: "Products",
192
- singularLabel: "Product",
193
- admin: {
194
- useAsTitle: "title",
195
- defaultColumns: ["title", "price", "status", "inventory"],
196
- description: "Product catalog"
197
- },
198
- fields: [
199
- {
200
- name: "title",
201
- type: "text",
202
- required: true,
203
- label: "Title"
204
- },
205
- {
206
- name: "slug",
207
- type: "text",
208
- required: true,
209
- label: "Slug"
210
- },
211
- {
212
- name: "description",
213
- type: "richtext",
214
- label: "Description"
215
- },
216
- {
217
- name: "price",
218
- type: "number",
219
- required: true,
220
- label: "Price"
221
- },
222
- {
223
- name: "compareAtPrice",
224
- type: "number",
225
- label: "Compare at Price",
226
- admin: { description: "Original price for sale display" }
227
- },
228
- {
229
- name: "costPrice",
230
- type: "number",
231
- label: "Cost Price",
232
- admin: { description: "For profit calculation" }
233
- },
234
- {
235
- name: "sku",
236
- type: "text",
237
- required: true,
238
- label: "SKU"
239
- },
240
- {
241
- name: "barcode",
242
- type: "text",
243
- label: "Barcode"
244
- },
245
- {
246
- name: "status",
247
- type: "select",
248
- label: "Status",
249
- options: [
250
- { label: "Draft", value: "draft" },
251
- { label: "Active", value: "active" },
252
- { label: "Archived", value: "archived" }
253
- ],
254
- defaultValue: "draft"
255
- },
256
- {
257
- name: "images",
258
- type: "array",
259
- label: "Images",
260
- fields: [
261
- { name: "url", type: "text", label: "URL" },
262
- { name: "alt", type: "text", label: "Alt Text" }
263
- ]
264
- },
265
- {
266
- name: "category",
267
- type: "relationship",
268
- label: "Category",
269
- relationTo: "categories"
270
- },
271
- {
272
- name: "inventory",
273
- type: "number",
274
- label: "Inventory",
275
- defaultValue: 0
276
- }
277
- ],
278
- timestamps: true
279
- },
280
- categories: {
281
- slug: "categories",
282
- label: "Categories",
283
- labelPlural: "Categories",
284
- singularLabel: "Category",
285
- admin: {
286
- useAsTitle: "name",
287
- defaultColumns: ["name", "slug", "productCount"],
288
- description: "Product categories"
289
- },
290
- fields: [
291
- { name: "name", type: "text", required: true, label: "Name" },
292
- { name: "slug", type: "text", required: true, label: "Slug" },
293
- { name: "description", type: "textarea", label: "Description" },
294
- { name: "image", type: "text", label: "Image URL" },
295
- {
296
- name: "parent",
297
- type: "relationship",
298
- label: "Parent Category",
299
- relationTo: "categories"
300
- }
301
- ],
302
- timestamps: true
303
- },
304
- customers: {
305
- slug: "customers",
306
- label: "Customers",
307
- labelPlural: "Customers",
308
- singularLabel: "Customer",
309
- admin: {
310
- useAsTitle: "email",
311
- defaultColumns: [
312
- "email",
313
- "firstName",
314
- "lastName",
315
- "orderCount",
316
- "createdAt"
317
- ],
318
- description: "Customer accounts"
319
- },
320
- fields: [
321
- { name: "email", type: "email", required: true, label: "Email" },
322
- { name: "firstName", type: "text", label: "First Name" },
323
- { name: "lastName", type: "text", label: "Last Name" },
324
- { name: "phone", type: "text", label: "Phone" },
325
- {
326
- name: "addresses",
327
- type: "array",
328
- label: "Addresses",
329
- fields: [
330
- { name: "type", type: "text", label: "Type" },
331
- { name: "line1", type: "text", label: "Address Line 1" },
332
- { name: "line2", type: "text", label: "Address Line 2" },
333
- { name: "city", type: "text", label: "City" },
334
- { name: "state", type: "text", label: "State" },
335
- { name: "postalCode", type: "text", label: "Postal Code" },
336
- { name: "country", type: "text", label: "Country" }
337
- ]
338
- },
339
- {
340
- name: "status",
341
- type: "select",
342
- label: "Status",
343
- options: [
344
- { label: "Active", value: "active" },
345
- { label: "Inactive", value: "inactive" },
346
- { label: "Banned", value: "banned" }
347
- ],
348
- defaultValue: "active"
349
- }
350
- ],
351
- timestamps: true
352
- },
353
- orders: {
354
- slug: "orders",
355
- label: "Orders",
356
- labelPlural: "Orders",
357
- singularLabel: "Order",
358
- admin: {
359
- useAsTitle: "orderNumber",
360
- defaultColumns: [
361
- "orderNumber",
362
- "customer",
363
- "status",
364
- "total",
365
- "createdAt"
366
- ],
367
- description: "Customer orders"
368
- },
369
- fields: [
370
- {
371
- name: "orderNumber",
372
- type: "text",
373
- required: true,
374
- label: "Order Number"
375
- },
376
- {
377
- name: "customer",
378
- type: "relationship",
379
- required: true,
380
- label: "Customer",
381
- relationTo: "customers"
382
- },
383
- {
384
- name: "status",
385
- type: "select",
386
- label: "Status",
387
- options: [
388
- { label: "Pending", value: "pending" },
389
- { label: "Confirmed", value: "confirmed" },
390
- { label: "Processing", value: "processing" },
391
- { label: "Shipped", value: "shipped" },
392
- { label: "Delivered", value: "delivered" },
393
- { label: "Cancelled", value: "cancelled" },
394
- { label: "Refunded", value: "refunded" }
395
- ],
396
- defaultValue: "pending"
397
- },
398
- {
399
- name: "paymentStatus",
400
- type: "select",
401
- label: "Payment Status",
402
- options: [
403
- { label: "Pending", value: "pending" },
404
- { label: "Paid", value: "paid" },
405
- { label: "Failed", value: "failed" },
406
- { label: "Refunded", value: "refunded" }
407
- ],
408
- defaultValue: "pending"
409
- },
410
- {
411
- name: "items",
412
- type: "array",
413
- label: "Items",
414
- fields: [
415
- { name: "product", type: "text", label: "Product" },
416
- { name: "quantity", type: "number", label: "Quantity" },
417
- { name: "unitPrice", type: "number", label: "Unit Price" },
418
- { name: "total", type: "number", label: "Total" }
419
- ]
420
- },
421
- { name: "subtotal", type: "number", required: true, label: "Subtotal" },
422
- { name: "tax", type: "number", label: "Tax" },
423
- { name: "shipping", type: "number", label: "Shipping" },
424
- { name: "discount", type: "number", label: "Discount" },
425
- { name: "total", type: "number", required: true, label: "Total" },
426
- { name: "notes", type: "textarea", label: "Notes" }
427
- ],
428
- timestamps: true
429
- },
430
- coupons: {
431
- slug: "coupons",
432
- label: "Coupons",
433
- labelPlural: "Coupons",
434
- singularLabel: "Coupon",
435
- admin: {
436
- useAsTitle: "code",
437
- defaultColumns: ["code", "type", "value", "active", "expiresAt"],
438
- description: "Discount codes and promotions"
439
- },
440
- fields: [
441
- { name: "code", type: "text", required: true, label: "Code" },
442
- {
443
- name: "type",
444
- type: "select",
445
- required: true,
446
- label: "Type",
447
- options: [
448
- { label: "Percentage", value: "percentage" },
449
- { label: "Fixed Amount", value: "fixed" },
450
- { label: "Free Shipping", value: "freeShipping" }
451
- ]
452
- },
453
- { name: "value", type: "number", label: "Value" },
454
- { name: "minPurchase", type: "number", label: "Minimum Purchase" },
455
- { name: "maxDiscount", type: "number", label: "Max Discount" },
456
- { name: "usageLimit", type: "number", label: "Usage Limit" },
457
- {
458
- name: "usedCount",
459
- type: "number",
460
- defaultValue: 0,
461
- label: "Used Count"
462
- },
463
- { name: "startsAt", type: "date", label: "Starts At" },
464
- { name: "expiresAt", type: "date", label: "Expires At" },
465
- { name: "active", type: "checkbox", defaultValue: true, label: "Active" }
466
- ],
467
- timestamps: true
468
- }
469
- };
470
- var ecommerceGlobals = [];
471
-
472
- // src/templates/kitchen-sink.ts
473
- var kitchenSinkCollections = {
474
- pages: {
475
- slug: "pages",
476
- label: "Pages",
477
- labelPlural: "Pages",
478
- singularLabel: "Page",
479
- admin: {
480
- useAsTitle: "title",
481
- defaultColumns: ["title", "slug", "status", "updatedAt"],
482
- description: "Static pages with custom layouts"
483
- },
484
- fields: [
485
- {
486
- name: "title",
487
- type: "text",
488
- required: true,
489
- label: "Title"
490
- },
491
- {
492
- name: "slug",
493
- type: "text",
494
- required: true,
495
- label: "Slug",
496
- admin: { description: "URL-friendly identifier" }
497
- },
498
- {
499
- name: "content",
500
- type: "blocks",
501
- label: "Content",
502
- blocks: [
503
- {
504
- slug: "hero",
505
- label: "Hero Section",
506
- fields: [
507
- { name: "heading", type: "text", label: "Heading" },
508
- { name: "subheading", type: "textarea", label: "Subheading" },
509
- { name: "ctaText", type: "text", label: "CTA Button Text" },
510
- { name: "ctaUrl", type: "text", label: "CTA Button URL" }
511
- ]
512
- },
513
- {
514
- slug: "text",
515
- label: "Text Block",
516
- fields: [{ name: "content", type: "richtext", label: "Content" }]
517
- },
518
- {
519
- slug: "image",
520
- label: "Image",
521
- fields: [
522
- {
523
- name: "image",
524
- type: "upload",
525
- label: "Image",
526
- relationTo: "media"
527
- },
528
- { name: "caption", type: "text", label: "Caption" },
529
- { name: "alt", type: "text", label: "Alt Text" }
530
- ]
531
- },
532
- {
533
- slug: "cta",
534
- label: "Call to Action",
535
- fields: [
536
- { name: "heading", type: "text", label: "Heading" },
537
- { name: "description", type: "textarea", label: "Description" },
538
- { name: "buttonText", type: "text", label: "Button Text" },
539
- { name: "buttonUrl", type: "text", label: "Button URL" }
540
- ]
541
- }
542
- ]
543
- },
544
- {
545
- name: "status",
546
- type: "select",
547
- label: "Status",
548
- options: [
549
- { label: "Draft", value: "draft" },
550
- { label: "Published", value: "published" }
551
- ],
552
- defaultValue: "draft"
553
- },
554
- {
555
- name: "publishedAt",
556
- type: "date",
557
- label: "Published At"
558
- }
559
- ],
560
- timestamps: true
561
- },
562
- navigation: {
563
- slug: "navigation",
564
- label: "Navigation",
565
- labelPlural: "Navigation",
566
- singularLabel: "Navigation Item",
567
- admin: {
568
- useAsTitle: "label",
569
- defaultColumns: ["label", "url", "location"],
570
- description: "Site navigation menus"
571
- },
572
- fields: [
573
- { name: "label", type: "text", required: true, label: "Label" },
574
- { name: "url", type: "text", required: true, label: "URL" },
575
- {
576
- name: "location",
577
- type: "select",
578
- label: "Location",
579
- options: [
580
- { label: "Header", value: "header" },
581
- { label: "Footer", value: "footer" },
582
- { label: "Mobile", value: "mobile" }
583
- ]
584
- },
585
- { name: "order", type: "number", label: "Sort Order", defaultValue: 0 },
586
- {
587
- name: "parent",
588
- type: "relationship",
589
- label: "Parent Item",
590
- relationTo: "navigation"
591
- },
592
- {
593
- name: "newTab",
594
- type: "checkbox",
595
- label: "Open in New Tab",
596
- defaultValue: false
597
- }
598
- ],
599
- timestamps: true
600
- }
601
- };
602
-
603
- // src/templates/media.ts
604
- var mediaCollection = {
605
- slug: "media",
606
- label: "Media Library",
607
- admin: {
608
- useAsTitle: "title",
609
- defaultColumns: ["thumbnailUrl", "title", "type", "fileSize", "createdAt"],
610
- group: "content"
611
- },
612
- access: {
613
- read: () => true,
614
- create: () => true,
615
- update: () => true,
616
- delete: () => true
617
- },
618
- fields: [
619
- {
620
- name: "title",
621
- type: "text",
622
- label: "Title",
623
- required: true,
624
- admin: {
625
- description: "Descriptive title for the file"
626
- }
627
- },
628
- {
629
- name: "filename",
630
- type: "text",
631
- label: "Filename",
632
- required: true,
633
- admin: {
634
- readOnly: true,
635
- description: "System filename (auto-generated)"
636
- }
637
- },
638
- {
639
- name: "originalName",
640
- type: "text",
641
- label: "Original Name",
642
- admin: {
643
- readOnly: true
644
- }
645
- },
646
- {
647
- name: "alt",
648
- type: "text",
649
- label: "Alt Text",
650
- admin: {
651
- description: "Alternative text for images (accessibility)"
652
- }
653
- },
654
- {
655
- name: "caption",
656
- type: "textarea",
657
- label: "Caption",
658
- admin: {
659
- description: "Optional caption or description"
660
- }
661
- },
662
- {
663
- name: "type",
664
- type: "select",
665
- label: "File Type",
666
- required: true,
667
- defaultValue: "document",
668
- options: [
669
- { label: "Image", value: "image" },
670
- { label: "Video", value: "video" },
671
- { label: "Audio", value: "audio" },
672
- { label: "Document", value: "document" },
673
- { label: "Archive", value: "archive" },
674
- { label: "Other", value: "other" }
675
- ],
676
- admin: {
677
- readOnly: true
678
- }
679
- },
680
- {
681
- name: "mimeType",
682
- type: "text",
683
- label: "MIME Type",
684
- admin: {
685
- readOnly: true
686
- }
687
- },
688
- {
689
- name: "url",
690
- type: "text",
691
- label: "URL",
692
- required: true,
693
- admin: {
694
- readOnly: true,
695
- description: "Public URL of the file"
696
- }
697
- },
698
- {
699
- name: "thumbnailUrl",
700
- type: "text",
701
- label: "Thumbnail URL",
702
- admin: {
703
- readOnly: true
704
- }
705
- },
706
- {
707
- name: "width",
708
- type: "number",
709
- label: "Width",
710
- admin: {
711
- readOnly: true,
712
- description: "Width in pixels (for images/videos)"
713
- }
714
- },
715
- {
716
- name: "height",
717
- type: "number",
718
- label: "Height",
719
- admin: {
720
- readOnly: true,
721
- description: "Height in pixels (for images/videos)"
722
- }
723
- },
724
- {
725
- name: "fileSize",
726
- type: "number",
727
- label: "File Size",
728
- admin: {
729
- readOnly: true,
730
- description: "Size in bytes"
731
- }
732
- },
733
- {
734
- name: "folder",
735
- type: "text",
736
- label: "Folder",
737
- admin: {
738
- description: "Folder path for organization (e.g., /products, /blog)"
739
- }
740
- },
741
- {
742
- name: "tags",
743
- type: "array",
744
- label: "Tags",
745
- fields: [
746
- {
747
- name: "tag",
748
- type: "text",
749
- label: "Tag"
750
- }
751
- ]
752
- },
753
- {
754
- name: "focalPoint",
755
- type: "group",
756
- label: "Focal Point",
757
- admin: {
758
- description: "Point of interest for cropping"
759
- },
760
- fields: [
761
- {
762
- name: "x",
763
- type: "number",
764
- label: "X",
765
- defaultValue: 50
766
- },
767
- {
768
- name: "y",
769
- type: "number",
770
- label: "Y",
771
- defaultValue: 50
772
- }
773
- ]
774
- },
775
- {
776
- name: "metadata",
777
- type: "json",
778
- label: "Metadata",
779
- admin: {
780
- readOnly: true,
781
- description: "Additional file metadata (EXIF, etc.)"
782
- }
783
- },
784
- {
785
- name: "provider",
786
- type: "select",
787
- label: "Storage Provider",
788
- defaultValue: "local",
789
- options: [
790
- { label: "Local", value: "local" },
791
- { label: "AWS S3", value: "s3" },
792
- { label: "Cloudinary", value: "cloudinary" },
793
- { label: "Imgix", value: "imgix" }
794
- ],
795
- admin: {
796
- readOnly: true
797
- }
798
- },
799
- {
800
- name: "status",
801
- type: "select",
802
- label: "Status",
803
- defaultValue: "active",
804
- options: [
805
- { label: "Active", value: "active" },
806
- { label: "Archived", value: "archived" }
807
- ]
808
- },
809
- {
810
- name: "createdAt",
811
- type: "date",
812
- label: "Created",
813
- admin: {
814
- readOnly: true
815
- }
816
- },
817
- {
818
- name: "updatedAt",
819
- type: "date",
820
- label: "Last Modified",
821
- admin: {
822
- readOnly: true
823
- }
824
- }
825
- ]
826
- };
827
- var mediaFoldersCollection = {
828
- slug: "media-folders",
829
- label: "Media Folders",
830
- admin: {
831
- useAsTitle: "name",
832
- hidden: true
833
- // Only accessible via API
834
- },
835
- access: {
836
- read: () => true,
837
- create: () => true,
838
- update: () => true,
839
- delete: () => true
840
- },
841
- fields: [
842
- {
843
- name: "name",
844
- type: "text",
845
- label: "Name",
846
- required: true
847
- },
848
- {
849
- name: "slug",
850
- type: "text",
851
- label: "Slug",
852
- required: true,
853
- admin: {
854
- description: "URL-friendly identifier"
855
- }
856
- },
857
- {
858
- name: "parent",
859
- type: "relationship",
860
- label: "Parent Folder",
861
- relationTo: "media-folders"
862
- },
863
- {
864
- name: "path",
865
- type: "text",
866
- label: "Full Path",
867
- admin: {
868
- readOnly: true,
869
- description: "Complete folder path"
870
- }
871
- },
872
- {
873
- name: "fileCount",
874
- type: "number",
875
- label: "File Count",
876
- admin: {
877
- readOnly: true
878
- }
879
- }
880
- ]
881
- };
882
- var mediaCollections = [mediaCollection, mediaFoldersCollection];
883
-
884
- // src/templates/settings/site.ts
885
- var siteSettingsGlobal = {
886
- slug: "site-settings",
887
- label: "Site Settings",
888
- admin: {
889
- group: "settings"
890
- },
891
- access: {
892
- read: () => true,
893
- update: () => true
894
- },
895
- fields: [
896
- {
897
- name: "siteName",
898
- type: "text",
899
- label: "Site Name",
900
- required: true,
901
- admin: {}
902
- },
903
- {
904
- name: "siteDescription",
905
- type: "textarea",
906
- label: "Site Description",
907
- admin: {}
908
- },
909
- {
910
- name: "siteLogo",
911
- type: "relationship",
912
- label: "Site Logo",
913
- relationTo: "media",
914
- admin: {}
915
- },
916
- {
917
- name: "siteFavicon",
918
- type: "relationship",
919
- label: "Favicon",
920
- relationTo: "media",
921
- admin: {}
922
- },
923
- {
924
- name: "siteOgImage",
925
- type: "relationship",
926
- label: "Default OG Image",
927
- relationTo: "media",
928
- admin: {}
929
- },
930
- {
931
- name: "siteUrl",
932
- type: "text",
933
- label: "Site URL",
934
- admin: {}
935
- },
936
- {
937
- name: "language",
938
- type: "select",
939
- label: "Default Language",
940
- defaultValue: "en",
941
- options: [
942
- { label: "English", value: "en" },
943
- { label: "Spanish", value: "es" },
944
- { label: "French", value: "fr" },
945
- { label: "German", value: "de" },
946
- { label: "Portuguese", value: "pt" },
947
- { label: "Italian", value: "it" },
948
- { label: "Dutch", value: "nl" },
949
- { label: "Russian", value: "ru" },
950
- { label: "Japanese", value: "ja" },
951
- { label: "Chinese", value: "zh" },
952
- { label: "Korean", value: "ko" },
953
- { label: "Arabic", value: "ar" }
954
- ]
955
- },
956
- {
957
- name: "timezone",
958
- type: "text",
959
- label: "Timezone",
960
- defaultValue: "UTC",
961
- admin: {}
962
- },
963
- {
964
- name: "logo",
965
- type: "group",
966
- label: "Logo Settings",
967
- fields: [
968
- {
969
- name: "width",
970
- type: "number",
971
- label: "Max Width (px)"
972
- },
973
- {
974
- name: "height",
975
- type: "number",
976
- label: "Max Height (px)"
977
- },
978
- {
979
- name: "altText",
980
- type: "text",
981
- label: "Alt Text"
982
- }
983
- ]
984
- },
985
- {
986
- name: "analytics",
987
- type: "group",
988
- label: "Analytics",
989
- fields: [
990
- {
991
- name: "googleAnalyticsId",
992
- type: "text",
993
- label: "Google Analytics ID",
994
- admin: {}
995
- },
996
- {
997
- name: "googleTagManagerId",
998
- type: "text",
999
- label: "Google Tag Manager ID",
1000
- admin: {}
1001
- },
1002
- {
1003
- name: "plausibleDomain",
1004
- type: "text",
1005
- label: "Plausible Domain",
1006
- admin: {}
1007
- },
1008
- {
1009
- name: "mixpanelToken",
1010
- type: "password",
1011
- label: "Mixpanel Token"
1012
- }
1013
- ]
1014
- }
1015
- ]
1016
- };
1017
-
1018
- // src/templates/settings/seo.ts
1019
- var seoSettingsGlobal = {
1020
- slug: "seo-settings",
1021
- label: "SEO Settings",
1022
- admin: {
1023
- group: "settings"
1024
- },
1025
- access: {
1026
- read: () => true,
1027
- update: () => true
1028
- },
1029
- fields: [
1030
- {
1031
- name: "defaultTitle",
1032
- type: "text",
1033
- label: "Default Title",
1034
- admin: {}
1035
- },
1036
- {
1037
- name: "defaultDescription",
1038
- type: "textarea",
1039
- label: "Default Description",
1040
- admin: {}
1041
- },
1042
- {
1043
- name: "titleTemplate",
1044
- type: "text",
1045
- label: "Title Template",
1046
- defaultValue: "{{title}} | {{siteName}}",
1047
- admin: {}
1048
- },
1049
- {
1050
- name: "siteNameInTitle",
1051
- type: "checkbox",
1052
- label: "Include Site Name in Title",
1053
- defaultValue: true
1054
- },
1055
- {
1056
- name: "separator",
1057
- type: "text",
1058
- label: "Title Separator",
1059
- defaultValue: " | ",
1060
- admin: {}
1061
- },
1062
- {
1063
- name: "meta",
1064
- type: "group",
1065
- label: "Meta Settings",
1066
- fields: [
1067
- {
1068
- name: "robots",
1069
- type: "text",
1070
- label: "Robots Meta",
1071
- defaultValue: "index, follow",
1072
- admin: {}
1073
- },
1074
- {
1075
- name: "canonicalUrl",
1076
- type: "text",
1077
- label: "Canonical URL",
1078
- admin: {}
1079
- },
1080
- {
1081
- name: "ogType",
1082
- type: "select",
1083
- label: "Default OG Type",
1084
- defaultValue: "website",
1085
- options: [
1086
- { label: "Website", value: "website" },
1087
- { label: "Article", value: "article" },
1088
- { label: "Product", value: "product" },
1089
- { label: "Book", value: "book" },
1090
- { label: "Music", value: "music" },
1091
- { label: "Video", value: "video" }
1092
- ]
1093
- }
1094
- ]
1095
- },
1096
- {
1097
- name: "sitemap",
1098
- type: "checkbox",
1099
- label: "Enable XML Sitemap",
1100
- defaultValue: true,
1101
- admin: {}
1102
- },
1103
- {
1104
- name: "sitemapUrls",
1105
- type: "number",
1106
- label: "Sitemap URL Limit",
1107
- defaultValue: 5e4,
1108
- admin: {}
1109
- },
1110
- {
1111
- name: "robotsTxt",
1112
- type: "textarea",
1113
- label: "Custom robots.txt",
1114
- admin: {}
1115
- },
1116
- {
1117
- name: "social",
1118
- type: "group",
1119
- label: "Social Media",
1120
- fields: [
1121
- {
1122
- name: "twitterHandle",
1123
- type: "text",
1124
- label: "Twitter/X Handle",
1125
- admin: {}
1126
- },
1127
- {
1128
- name: "twitterCardType",
1129
- type: "select",
1130
- label: "Twitter Card Type",
1131
- defaultValue: "summary_large_image",
1132
- options: [
1133
- { label: "Summary", value: "summary" },
1134
- { label: "Summary with Large Image", value: "summary_large_image" },
1135
- { label: "App", value: "app" },
1136
- { label: "Player", value: "player" }
1137
- ]
1138
- },
1139
- {
1140
- name: "fbAppId",
1141
- type: "text",
1142
- label: "Facebook App ID"
1143
- }
1144
- ]
1145
- },
1146
- {
1147
- name: "advanced",
1148
- type: "group",
1149
- label: "Advanced",
1150
- fields: [
1151
- {
1152
- name: "jsonLdEnabled",
1153
- type: "checkbox",
1154
- label: "Enable JSON-LD",
1155
- defaultValue: true,
1156
- admin: {}
1157
- },
1158
- {
1159
- name: "breadcrumbsEnabled",
1160
- type: "checkbox",
1161
- label: "Enable Breadcrumbs",
1162
- defaultValue: true
1163
- },
1164
- {
1165
- name: "paginationSize",
1166
- type: "number",
1167
- label: "Default Pagination Size",
1168
- defaultValue: 10
1169
- }
1170
- ]
1171
- }
1172
- ]
1173
- };
1174
-
1175
- // src/templates/settings/social.ts
1176
- var socialSettingsGlobal = {
1177
- slug: "social-settings",
1178
- label: "Social Media",
1179
- admin: {
1180
- group: "settings"
1181
- },
1182
- access: {
1183
- read: () => true,
1184
- update: () => true
1185
- },
1186
- fields: [
1187
- {
1188
- name: "facebook",
1189
- type: "text",
1190
- label: "Facebook",
1191
- admin: {}
1192
- },
1193
- {
1194
- name: "twitter",
1195
- type: "text",
1196
- label: "Twitter/X"
1197
- },
1198
- {
1199
- name: "instagram",
1200
- type: "text",
1201
- label: "Instagram"
1202
- },
1203
- {
1204
- name: "linkedin",
1205
- type: "text",
1206
- label: "LinkedIn"
1207
- },
1208
- {
1209
- name: "youtube",
1210
- type: "text",
1211
- label: "YouTube"
1212
- },
1213
- {
1214
- name: "tiktok",
1215
- type: "text",
1216
- label: "TikTok"
1217
- },
1218
- {
1219
- name: "pinterest",
1220
- type: "text",
1221
- label: "Pinterest"
1222
- },
1223
- {
1224
- name: "discord",
1225
- type: "text",
1226
- label: "Discord"
1227
- },
1228
- {
1229
- name: "twitch",
1230
- type: "text",
1231
- label: "Twitch"
1232
- },
1233
- {
1234
- name: "github",
1235
- type: "text",
1236
- label: "GitHub"
1237
- },
1238
- {
1239
- name: "mastodon",
1240
- type: "text",
1241
- label: "Mastodon"
1242
- }
1243
- ]
1244
- };
1245
-
1246
- // src/templates/settings/email.ts
1247
- var emailSettingsGlobal = {
1248
- slug: "email-settings",
1249
- label: "Email Settings",
1250
- admin: {
1251
- group: "settings"
1252
- },
1253
- access: {
1254
- read: () => true,
1255
- update: () => true
1256
- },
1257
- fields: [
1258
- {
1259
- name: "fromName",
1260
- type: "text",
1261
- label: "From Name",
1262
- admin: {}
1263
- },
1264
- {
1265
- name: "fromEmail",
1266
- type: "email",
1267
- label: "From Email",
1268
- required: true,
1269
- admin: {}
1270
- },
1271
- {
1272
- name: "replyTo",
1273
- type: "email",
1274
- label: "Reply-To Email",
1275
- admin: {}
1276
- },
1277
- {
1278
- name: "provider",
1279
- type: "select",
1280
- label: "Email Provider",
1281
- defaultValue: "smtp",
1282
- options: [
1283
- { label: "SMTP", value: "smtp" },
1284
- { label: "SendGrid", value: "sendgrid" },
1285
- { label: "Mailgun", value: "mailgun" },
1286
- { label: "AWS SES", value: "ses" },
1287
- { label: "Resend", value: "resend" }
1288
- ]
1289
- },
1290
- {
1291
- name: "smtp",
1292
- type: "group",
1293
- label: "SMTP Settings",
1294
- fields: [
1295
- {
1296
- name: "host",
1297
- type: "text",
1298
- label: "Host",
1299
- admin: {
1300
- placeholder: "smtp.example.com"
1301
- }
1302
- },
1303
- {
1304
- name: "port",
1305
- type: "number",
1306
- label: "Port",
1307
- defaultValue: 587
1308
- },
1309
- {
1310
- name: "secure",
1311
- type: "checkbox",
1312
- label: "Use TLS/SSL",
1313
- defaultValue: true
1314
- },
1315
- {
1316
- name: "username",
1317
- type: "text",
1318
- label: "Username"
1319
- },
1320
- {
1321
- name: "password",
1322
- type: "password",
1323
- label: "Password"
1324
- }
1325
- ]
1326
- },
1327
- {
1328
- name: "api",
1329
- type: "group",
1330
- label: "API Settings",
1331
- admin: {},
1332
- fields: [
1333
- {
1334
- name: "apiKey",
1335
- type: "password",
1336
- label: "API Key"
1337
- },
1338
- {
1339
- name: "domain",
1340
- type: "text",
1341
- label: "Domain",
1342
- admin: {}
1343
- },
1344
- {
1345
- name: "webhookSecret",
1346
- type: "password",
1347
- label: "Webhook Secret",
1348
- admin: {}
1349
- }
1350
- ]
1351
- },
1352
- {
1353
- name: "testEmail",
1354
- type: "email",
1355
- label: "Test Email",
1356
- admin: {}
1357
- }
1358
- ]
1359
- };
1360
-
1361
- // src/templates/settings/storage.ts
1362
- var storageSettingsGlobal = {
1363
- slug: "storage-settings",
1364
- label: "Storage Settings",
1365
- admin: {
1366
- group: "settings"
1367
- },
1368
- access: {
1369
- read: () => true,
1370
- update: () => true
1371
- },
1372
- fields: [
1373
- {
1374
- name: "provider",
1375
- type: "select",
1376
- label: "Storage Provider",
1377
- defaultValue: "local",
1378
- options: [
1379
- { label: "Local Server", value: "local" },
1380
- { label: "AWS S3", value: "s3" },
1381
- { label: "Cloudinary", value: "cloudinary" },
1382
- { label: "Imgix (Transforms Only)", value: "imgix" }
1383
- ]
1384
- },
1385
- {
1386
- name: "local",
1387
- type: "group",
1388
- label: "Local Storage",
1389
- fields: [
1390
- {
1391
- name: "uploadDir",
1392
- type: "text",
1393
- label: "Upload Directory",
1394
- defaultValue: "./public/uploads",
1395
- admin: {}
1396
- },
1397
- {
1398
- name: "baseUrl",
1399
- type: "text",
1400
- label: "Base URL",
1401
- defaultValue: "/uploads",
1402
- admin: {}
1403
- }
1404
- ]
1405
- },
1406
- {
1407
- name: "s3",
1408
- type: "group",
1409
- label: "AWS S3 Settings",
1410
- fields: [
1411
- {
1412
- name: "bucket",
1413
- type: "text",
1414
- label: "Bucket Name"
1415
- },
1416
- {
1417
- name: "region",
1418
- type: "text",
1419
- label: "Region",
1420
- admin: {
1421
- placeholder: "us-east-1"
1422
- }
1423
- },
1424
- {
1425
- name: "accessKeyId",
1426
- type: "password",
1427
- label: "Access Key ID"
1428
- },
1429
- {
1430
- name: "secretAccessKey",
1431
- type: "password",
1432
- label: "Secret Access Key"
1433
- },
1434
- {
1435
- name: "cdnUrl",
1436
- type: "text",
1437
- label: "CDN URL",
1438
- admin: {}
1439
- },
1440
- {
1441
- name: "prefix",
1442
- type: "text",
1443
- label: "Path Prefix",
1444
- admin: {}
1445
- }
1446
- ]
1447
- },
1448
- {
1449
- name: "cloudinary",
1450
- type: "group",
1451
- label: "Cloudinary Settings",
1452
- fields: [
1453
- {
1454
- name: "cloudName",
1455
- type: "text",
1456
- label: "Cloud Name"
1457
- },
1458
- {
1459
- name: "apiKey",
1460
- type: "password",
1461
- label: "API Key"
1462
- },
1463
- {
1464
- name: "apiSecret",
1465
- type: "password",
1466
- label: "API Secret"
1467
- },
1468
- {
1469
- name: "folder",
1470
- type: "text",
1471
- label: "Folder",
1472
- admin: {}
1473
- }
1474
- ]
1475
- },
1476
- {
1477
- name: "imgix",
1478
- type: "group",
1479
- label: "Imgix Settings",
1480
- fields: [
1481
- {
1482
- name: "domain",
1483
- type: "text",
1484
- label: "Imgix Domain",
1485
- admin: {
1486
- placeholder: "your-source.imgix.net"
1487
- }
1488
- },
1489
- {
1490
- name: "signKey",
1491
- type: "password",
1492
- label: "Signing Key",
1493
- admin: {}
1494
- }
1495
- ]
1496
- },
1497
- {
1498
- name: "limits",
1499
- type: "group",
1500
- label: "Upload Limits",
1501
- fields: [
1502
- {
1503
- name: "maxFileSize",
1504
- type: "number",
1505
- label: "Max File Size (bytes)",
1506
- defaultValue: 10485760,
1507
- admin: {}
1508
- },
1509
- {
1510
- name: "allowedTypes",
1511
- type: "json",
1512
- label: "Allowed MIME Types",
1513
- defaultValue: ["image/*", "video/*", "audio/*", "application/pdf"],
1514
- admin: {}
1515
- },
1516
- {
1517
- name: "maxFilesPerUpload",
1518
- type: "number",
1519
- label: "Max Files per Upload",
1520
- defaultValue: 10
1521
- }
1522
- ]
1523
- }
1524
- ]
1525
- };
1526
-
1527
- // src/templates/settings/access.ts
1528
- var accessSettingsGlobal = {
1529
- slug: "access-settings",
1530
- label: "Access Control",
1531
- admin: {
1532
- group: "settings"
1533
- },
1534
- access: {
1535
- read: () => true,
1536
- update: () => true
1537
- },
1538
- fields: [
1539
- {
1540
- name: "enablePublicAccess",
1541
- type: "checkbox",
1542
- label: "Enable Public Access",
1543
- defaultValue: true,
1544
- admin: {}
1545
- },
1546
- {
1547
- name: "defaultCollectionAccess",
1548
- type: "select",
1549
- label: "Default Collection Access",
1550
- defaultValue: "read",
1551
- options: [
1552
- { label: "Read Only", value: "read" },
1553
- { label: "Read & Create", value: "create" },
1554
- { label: "Read & Create & Update", value: "update" },
1555
- { label: "Full Access", value: "admin" },
1556
- { label: "No Access", value: "none" }
1557
- ],
1558
- admin: {}
1559
- },
1560
- {
1561
- name: "apiAccess",
1562
- type: "group",
1563
- label: "API Access",
1564
- fields: [
1565
- {
1566
- name: "restEnabled",
1567
- type: "checkbox",
1568
- label: "Enable REST API",
1569
- defaultValue: true
1570
- },
1571
- {
1572
- name: "graphqlEnabled",
1573
- type: "checkbox",
1574
- label: "Enable GraphQL",
1575
- defaultValue: false
1576
- },
1577
- {
1578
- name: "trpcEnabled",
1579
- type: "checkbox",
1580
- label: "Enable tRPC",
1581
- defaultValue: false
1582
- },
1583
- {
1584
- name: "wsEnabled",
1585
- type: "checkbox",
1586
- label: "Enable WebSocket",
1587
- defaultValue: false
1588
- },
1589
- {
1590
- name: "requireAuth",
1591
- type: "checkbox",
1592
- label: "Require Authentication",
1593
- defaultValue: false,
1594
- admin: {}
1595
- },
1596
- {
1597
- name: "allowedOrigins",
1598
- type: "json",
1599
- label: "CORS Allowed Origins",
1600
- admin: {}
1601
- }
1602
- ]
1603
- },
1604
- {
1605
- name: "rateLimiting",
1606
- type: "group",
1607
- label: "Rate Limiting",
1608
- fields: [
1609
- {
1610
- name: "enabled",
1611
- type: "checkbox",
1612
- label: "Enable Rate Limiting",
1613
- defaultValue: true
1614
- },
1615
- {
1616
- name: "maxRequests",
1617
- type: "number",
1618
- label: "Max Requests",
1619
- defaultValue: 100,
1620
- admin: {}
1621
- },
1622
- {
1623
- name: "windowMs",
1624
- type: "number",
1625
- label: "Window (ms)",
1626
- defaultValue: 6e4,
1627
- admin: {}
1628
- }
1629
- ]
1630
- }
1631
- ]
1632
- };
1633
-
1634
- // src/templates/settings/store.ts
1635
- var countryOptions = [
1636
- { label: "United States", value: "US" },
1637
- { label: "United Kingdom", value: "GB" },
1638
- { label: "Canada", value: "CA" },
1639
- { label: "Australia", value: "AU" },
1640
- { label: "Germany", value: "DE" },
1641
- { label: "France", value: "FR" },
1642
- { label: "Netherlands", value: "NL" },
1643
- { label: "Belgium", value: "BE" },
1644
- { label: "Spain", value: "ES" },
1645
- { label: "Italy", value: "IT" },
1646
- { label: "Portugal", value: "PT" },
1647
- { label: "Sweden", value: "SE" },
1648
- { label: "Norway", value: "NO" },
1649
- { label: "Denmark", value: "DK" },
1650
- { label: "Finland", value: "FI" },
1651
- { label: "Austria", value: "AT" },
1652
- { label: "Switzerland", value: "CH" },
1653
- { label: "Japan", value: "JP" },
1654
- { label: "South Korea", value: "KR" },
1655
- { label: "China", value: "CN" },
1656
- { label: "India", value: "IN" },
1657
- { label: "Brazil", value: "BR" },
1658
- { label: "Mexico", value: "MX" }
1659
- ];
1660
- var storeSettingsGlobal = {
1661
- slug: "store-settings",
1662
- label: "Store Settings",
1663
- admin: {
1664
- group: "settings"
1665
- },
1666
- access: {
1667
- read: () => true,
1668
- update: () => true
1669
- },
1670
- fields: [
1671
- {
1672
- name: "storeName",
1673
- type: "text",
1674
- label: "Store Name",
1675
- required: true
1676
- },
1677
- {
1678
- name: "storeEmail",
1679
- type: "email",
1680
- label: "Contact Email",
1681
- required: true
1682
- },
1683
- {
1684
- name: "storePhone",
1685
- type: "text",
1686
- label: "Phone Number"
1687
- },
1688
- {
1689
- name: "address",
1690
- type: "group",
1691
- label: "Store Address",
1692
- fields: [
1693
- {
1694
- name: "street",
1695
- type: "text",
1696
- label: "Street Address"
1697
- },
1698
- {
1699
- name: "city",
1700
- type: "text",
1701
- label: "City"
1702
- },
1703
- {
1704
- name: "state",
1705
- type: "text",
1706
- label: "State/Province"
1707
- },
1708
- {
1709
- name: "postalCode",
1710
- type: "text",
1711
- label: "Postal Code"
1712
- },
1713
- {
1714
- name: "country",
1715
- type: "select",
1716
- label: "Country",
1717
- options: countryOptions
1718
- }
1719
- ]
1720
- },
1721
- {
1722
- name: "currency",
1723
- type: "group",
1724
- label: "Currency",
1725
- fields: [
1726
- {
1727
- name: "code",
1728
- type: "select",
1729
- label: "Currency Code",
1730
- defaultValue: "USD",
1731
- options: [
1732
- { label: "USD - US Dollar", value: "USD" },
1733
- { label: "EUR - Euro", value: "EUR" },
1734
- { label: "GBP - British Pound", value: "GBP" },
1735
- { label: "CAD - Canadian Dollar", value: "CAD" },
1736
- { label: "AUD - Australian Dollar", value: "AUD" },
1737
- { label: "JPY - Japanese Yen", value: "JPY" },
1738
- { label: "CNY - Chinese Yuan", value: "CNY" },
1739
- { label: "INR - Indian Rupee", value: "INR" },
1740
- { label: "BRL - Brazilian Real", value: "BRL" },
1741
- { label: "MXN - Mexican Peso", value: "MXN" }
1742
- ]
1743
- },
1744
- {
1745
- name: "symbol",
1746
- type: "text",
1747
- label: "Symbol",
1748
- defaultValue: "$"
1749
- },
1750
- {
1751
- name: "position",
1752
- type: "select",
1753
- label: "Symbol Position",
1754
- defaultValue: "before",
1755
- options: [
1756
- { label: "Before amount", value: "before" },
1757
- { label: "After amount", value: "after" }
1758
- ]
1759
- },
1760
- {
1761
- name: "decimals",
1762
- type: "number",
1763
- label: "Decimal Places",
1764
- defaultValue: 2
1765
- }
1766
- ]
1767
- },
1768
- {
1769
- name: "tax",
1770
- type: "group",
1771
- label: "Tax Settings",
1772
- fields: [
1773
- {
1774
- name: "enabled",
1775
- type: "checkbox",
1776
- label: "Enable Tax",
1777
- defaultValue: true
1778
- },
1779
- {
1780
- name: "rate",
1781
- type: "number",
1782
- label: "Tax Rate (%)",
1783
- admin: {
1784
- placeholder: "10"
1785
- }
1786
- },
1787
- {
1788
- name: "includedInPrice",
1789
- type: "checkbox",
1790
- label: "Tax Included in Prices",
1791
- admin: {}
1792
- },
1793
- {
1794
- name: "taxId",
1795
- type: "text",
1796
- label: "Tax ID / VAT Number"
1797
- }
1798
- ]
1799
- },
1800
- {
1801
- name: "shipping",
1802
- type: "group",
1803
- label: "Shipping",
1804
- fields: [
1805
- {
1806
- name: "freeShippingThreshold",
1807
- type: "number",
1808
- label: "Free Shipping Minimum",
1809
- admin: {}
1810
- },
1811
- {
1812
- name: "flatRate",
1813
- type: "number",
1814
- label: "Flat Rate Shipping",
1815
- admin: {}
1816
- },
1817
- {
1818
- name: "enableLocalPickup",
1819
- type: "checkbox",
1820
- label: "Enable Local Pickup",
1821
- defaultValue: true
1822
- }
1823
- ]
1824
- },
1825
- {
1826
- name: "orders",
1827
- type: "group",
1828
- label: "Orders",
1829
- fields: [
1830
- {
1831
- name: "orderNumberPrefix",
1832
- type: "text",
1833
- label: "Order Number Prefix",
1834
- defaultValue: "ORD",
1835
- admin: {}
1836
- },
1837
- {
1838
- name: "allowGuestCheckout",
1839
- type: "checkbox",
1840
- label: "Allow Guest Checkout",
1841
- defaultValue: true
1842
- },
1843
- {
1844
- name: "requirePhone",
1845
- type: "checkbox",
1846
- label: "Require Phone Number",
1847
- defaultValue: true
1848
- }
1849
- ]
1850
- }
1851
- ]
1852
- };
1853
-
1854
- // src/templates/settings/payments.ts
1855
- var paymentSettingsGlobal = {
1856
- slug: "payment-settings",
1857
- label: "Payment Settings",
1858
- admin: {
1859
- group: "settings"
1860
- },
1861
- access: {
1862
- read: () => true,
1863
- update: () => true
1864
- },
1865
- fields: [
1866
- {
1867
- name: "testMode",
1868
- type: "checkbox",
1869
- label: "Test Mode",
1870
- defaultValue: true,
1871
- admin: {}
1872
- },
1873
- {
1874
- name: "stripe",
1875
- type: "group",
1876
- label: "Stripe",
1877
- fields: [
1878
- {
1879
- name: "enabled",
1880
- type: "checkbox",
1881
- label: "Enable Stripe",
1882
- defaultValue: false
1883
- },
1884
- {
1885
- name: "publishableKey",
1886
- type: "text",
1887
- label: "Publishable Key",
1888
- admin: {
1889
- placeholder: "pk_live_..."
1890
- }
1891
- },
1892
- {
1893
- name: "secretKey",
1894
- type: "password",
1895
- label: "Secret Key"
1896
- },
1897
- {
1898
- name: "webhookSecret",
1899
- type: "password",
1900
- label: "Webhook Secret",
1901
- admin: {}
1902
- }
1903
- ]
1904
- },
1905
- {
1906
- name: "paypal",
1907
- type: "group",
1908
- label: "PayPal",
1909
- fields: [
1910
- {
1911
- name: "enabled",
1912
- type: "checkbox",
1913
- label: "Enable PayPal",
1914
- defaultValue: false
1915
- },
1916
- {
1917
- name: "clientId",
1918
- type: "text",
1919
- label: "Client ID"
1920
- },
1921
- {
1922
- name: "clientSecret",
1923
- type: "password",
1924
- label: "Client Secret"
1925
- },
1926
- {
1927
- name: "mode",
1928
- type: "select",
1929
- label: "Mode",
1930
- defaultValue: "sandbox",
1931
- options: [
1932
- { label: "Sandbox (Test)", value: "sandbox" },
1933
- { label: "Live", value: "live" }
1934
- ]
1935
- }
1936
- ]
1937
- },
1938
- {
1939
- name: "square",
1940
- type: "group",
1941
- label: "Square",
1942
- fields: [
1943
- {
1944
- name: "enabled",
1945
- type: "checkbox",
1946
- label: "Enable Square",
1947
- defaultValue: false
1948
- },
1949
- {
1950
- name: "applicationId",
1951
- type: "text",
1952
- label: "Application ID"
1953
- },
1954
- {
1955
- name: "accessToken",
1956
- type: "password",
1957
- label: "Access Token"
1958
- },
1959
- {
1960
- name: "locationId",
1961
- type: "text",
1962
- label: "Location ID"
1963
- }
1964
- ]
1965
- },
1966
- {
1967
- name: "methods",
1968
- type: "group",
1969
- label: "Manual Payment Methods",
1970
- fields: [
1971
- {
1972
- name: "cod",
1973
- type: "checkbox",
1974
- label: "Cash on Delivery",
1975
- defaultValue: true
1976
- },
1977
- {
1978
- name: "bankTransfer",
1979
- type: "checkbox",
1980
- label: "Bank Transfer",
1981
- defaultValue: true
1982
- },
1983
- {
1984
- name: "cash",
1985
- type: "checkbox",
1986
- label: "Cash (Local Pickup)",
1987
- defaultValue: true
1988
- },
1989
- {
1990
- name: "check",
1991
- type: "checkbox",
1992
- label: "Check",
1993
- defaultValue: false
1994
- }
1995
- ]
1996
- },
1997
- {
1998
- name: "bankTransfer",
1999
- type: "group",
2000
- label: "Bank Transfer Details",
2001
- admin: {},
2002
- fields: [
2003
- {
2004
- name: "bankName",
2005
- type: "text",
2006
- label: "Bank Name"
2007
- },
2008
- {
2009
- name: "accountName",
2010
- type: "text",
2011
- label: "Account Name"
2012
- },
2013
- {
2014
- name: "accountNumber",
2015
- type: "text",
2016
- label: "Account Number"
2017
- },
2018
- {
2019
- name: "routingNumber",
2020
- type: "text",
2021
- label: "Routing/Sort Code"
2022
- },
2023
- {
2024
- name: "iban",
2025
- type: "text",
2026
- label: "IBAN"
2027
- },
2028
- {
2029
- name: "swift",
2030
- type: "text",
2031
- label: "SWIFT/BIC"
2032
- }
2033
- ]
2034
- }
2035
- ]
2036
- };
2037
-
2038
- // src/templates/settings/index.ts
2039
- var allSettingsGlobals = [
2040
- siteSettingsGlobal,
2041
- seoSettingsGlobal,
2042
- socialSettingsGlobal,
2043
- emailSettingsGlobal,
2044
- storageSettingsGlobal,
2045
- accessSettingsGlobal,
2046
- storeSettingsGlobal,
2047
- paymentSettingsGlobal
2048
- ];
2049
- var coreSettingsGlobals = [
2050
- siteSettingsGlobal,
2051
- seoSettingsGlobal,
2052
- socialSettingsGlobal,
2053
- emailSettingsGlobal,
2054
- storageSettingsGlobal,
2055
- accessSettingsGlobal
2056
- ];
2057
- var ecommerceSettingsGlobals = [
2058
- storeSettingsGlobal,
2059
- paymentSettingsGlobal
2060
- ];
2061
- var settingsBySlug = {
2062
- [siteSettingsGlobal.slug]: siteSettingsGlobal,
2063
- [seoSettingsGlobal.slug]: seoSettingsGlobal,
2064
- [socialSettingsGlobal.slug]: socialSettingsGlobal,
2065
- [emailSettingsGlobal.slug]: emailSettingsGlobal,
2066
- [storageSettingsGlobal.slug]: storageSettingsGlobal,
2067
- [accessSettingsGlobal.slug]: accessSettingsGlobal,
2068
- [storeSettingsGlobal.slug]: storeSettingsGlobal,
2069
- [paymentSettingsGlobal.slug]: paymentSettingsGlobal
2070
- };
2071
- function getSettingsForTemplate(template) {
2072
- switch (template) {
2073
- case "minimal":
2074
- case "blog":
2075
- return coreSettingsGlobals;
2076
- case "ecommerce":
2077
- return [...coreSettingsGlobals, ...ecommerceSettingsGlobals];
2078
- case "kitchen-sink":
2079
- return allSettingsGlobals;
2080
- default:
2081
- return coreSettingsGlobals;
2082
- }
2083
- }
2084
-
2085
- // src/templates/index.ts
2086
- function createTemplateConfig(options) {
2087
- const collections = options.collections ? [...options.collections] : [];
2088
- const globals = options.globals ? [...options.globals] : [];
2089
- if (options.includeMedia !== false) {
2090
- collections.push(...mediaCollections);
2091
- }
2092
- const templateSettings = options.template ? getSettingsForTemplate(options.template) : coreSettingsGlobals;
2093
- if (options.includeSettings) {
2094
- if (options.includeSettings === "all") {
2095
- globals.push(...allSettingsGlobals);
2096
- } else if (options.includeSettings === "core") {
2097
- globals.push(...coreSettingsGlobals);
2098
- } else if (options.includeSettings === "ecommerce") {
2099
- globals.push(...ecommerceSettingsGlobals);
2100
- } else if (Array.isArray(options.includeSettings)) {
2101
- for (const setting of options.includeSettings) {
2102
- const global = settingsBySlug[setting];
2103
- if (global) {
2104
- globals.push(global);
2105
- }
2106
- }
2107
- }
2108
- } else if (!options.globals || options.globals.length === 0) {
2109
- globals.push(...templateSettings);
2110
- }
2111
- if (options.excludeSettings && options.excludeSettings.length > 0) {
2112
- const excludeSet = new Set(options.excludeSettings);
2113
- const filtered = globals.filter(
2114
- (g) => !excludeSet.has(g.slug) && !excludeSet.has(g.label?.toLowerCase().replace(/\s+/g, "-") || "")
2115
- );
2116
- globals.length = 0;
2117
- globals.push(...filtered);
2118
- }
2119
- return {
2120
- collections: collections.length > 0 ? collections : void 0,
2121
- globals: globals.length > 0 ? globals : void 0
2122
- };
2123
- }
2124
-
2125
- exports.accessSettingsGlobal = accessSettingsGlobal;
2126
- exports.allSettingsGlobals = allSettingsGlobals;
2127
- exports.blogCollections = blogCollections;
2128
- exports.blogGlobals = blogGlobals;
2129
- exports.coreSettingsGlobals = coreSettingsGlobals;
2130
- exports.createTemplateConfig = createTemplateConfig;
2131
- exports.ecommerceCollections = ecommerceCollections;
2132
- exports.ecommerceGlobals = ecommerceGlobals;
2133
- exports.ecommerceSettingsGlobals = ecommerceSettingsGlobals;
2134
- exports.emailSettingsGlobal = emailSettingsGlobal;
2135
- exports.getSettingsForTemplate = getSettingsForTemplate;
2136
- exports.kitchenSinkCollections = kitchenSinkCollections;
2137
- exports.mediaCollection = mediaCollection;
2138
- exports.mediaCollections = mediaCollections;
2139
- exports.mediaFoldersCollection = mediaFoldersCollection;
2140
- exports.minimalCollections = minimalCollections;
2141
- exports.paymentSettingsGlobal = paymentSettingsGlobal;
2142
- exports.seoSettingsGlobal = seoSettingsGlobal;
2143
- exports.settingsBySlug = settingsBySlug;
2144
- exports.siteSettingsGlobal = siteSettingsGlobal;
2145
- exports.socialSettingsGlobal = socialSettingsGlobal;
2146
- exports.storageSettingsGlobal = storageSettingsGlobal;
2147
- exports.storeSettingsGlobal = storeSettingsGlobal;
2148
- //# sourceMappingURL=chunk-F5B64H5S.cjs.map
2149
- //# sourceMappingURL=chunk-F5B64H5S.cjs.map