@govcraft/payload-cms-mcp 1.0.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +164 -0
- package/dist/config/index.d.ts +27 -0
- package/dist/config/index.js +31 -0
- package/dist/config/index.js.map +1 -0
- package/dist/controllers/mcp.controller.d.ts +7 -0
- package/dist/controllers/mcp.controller.js +328 -0
- package/dist/controllers/mcp.controller.js.map +1 -0
- package/dist/controllers/payload-mcp.controller.d.ts +4 -0
- package/dist/controllers/payload-mcp.controller.js +185 -0
- package/dist/controllers/payload-mcp.controller.js.map +1 -0
- package/dist/generate-tools.d.ts +1 -0
- package/dist/generate-tools.js +1417 -0
- package/dist/generate-tools.js.map +1 -0
- package/dist/index.d.ts +2 -0
- package/dist/index.js +16 -0
- package/dist/index.js.map +1 -0
- package/dist/mcp/anthropic-mcp.d.ts +3 -0
- package/dist/mcp/anthropic-mcp.js +332 -0
- package/dist/mcp/anthropic-mcp.js.map +1 -0
- package/dist/mcp/generated/index.d.ts +44 -0
- package/dist/mcp/generated/index.js +45 -0
- package/dist/mcp/generated/index.js.map +1 -0
- package/dist/mcp/generated/payload-tools.d.ts +7 -0
- package/dist/mcp/generated/payload-tools.js +69 -0
- package/dist/mcp/generated/payload-tools.js.map +1 -0
- package/dist/mcp/generated/payload-tools.json +13024 -0
- package/dist/mcp/generated/tools/create.json +9138 -0
- package/dist/mcp/generated/tools/createAccess.json +10 -0
- package/dist/mcp/generated/tools/createAfterChangeHook.json +9 -0
- package/dist/mcp/generated/tools/createAfterDeleteHook.json +9 -0
- package/dist/mcp/generated/tools/createAfterErrorHook.json +9 -0
- package/dist/mcp/generated/tools/createAfterForgotPasswordHook.json +9 -0
- package/dist/mcp/generated/tools/createAfterLoginHook.json +9 -0
- package/dist/mcp/generated/tools/createAfterLogoutHook.json +9 -0
- package/dist/mcp/generated/tools/createAfterMeHook.json +9 -0
- package/dist/mcp/generated/tools/createAfterOperationHook.json +9 -0
- package/dist/mcp/generated/tools/createAfterReadHook.json +9 -0
- package/dist/mcp/generated/tools/createAfterRefreshHook.json +9 -0
- package/dist/mcp/generated/tools/createArrayField.json +90 -0
- package/dist/mcp/generated/tools/createBeforeChangeHook.json +9 -0
- package/dist/mcp/generated/tools/createBeforeDeleteHook.json +9 -0
- package/dist/mcp/generated/tools/createBeforeLoginHook.json +9 -0
- package/dist/mcp/generated/tools/createBeforeOperationHook.json +9 -0
- package/dist/mcp/generated/tools/createBeforeReadHook.json +9 -0
- package/dist/mcp/generated/tools/createBeforeValidateHook.json +9 -0
- package/dist/mcp/generated/tools/createBlocksField.json +79 -0
- package/dist/mcp/generated/tools/createCodeField.json +79 -0
- package/dist/mcp/generated/tools/createCollection.json +422 -0
- package/dist/mcp/generated/tools/createCollectionAdminOptions.json +2789 -0
- package/dist/mcp/generated/tools/createDateField.json +84 -0
- package/dist/mcp/generated/tools/createEmailField.json +87 -0
- package/dist/mcp/generated/tools/createField.json +31 -0
- package/dist/mcp/generated/tools/createGlobal.json +220 -0
- package/dist/mcp/generated/tools/createGroupField.json +79 -0
- package/dist/mcp/generated/tools/createJSONField.json +79 -0
- package/dist/mcp/generated/tools/createJoinField.json +79 -0
- package/dist/mcp/generated/tools/createMeHook.json +9 -0
- package/dist/mcp/generated/tools/createNumberField.json +31 -0
- package/dist/mcp/generated/tools/createPointField.json +79 -0
- package/dist/mcp/generated/tools/createPolymorphicRelationshipField.json +31 -0
- package/dist/mcp/generated/tools/createRadioField.json +94 -0
- package/dist/mcp/generated/tools/createRefreshHook.json +9 -0
- package/dist/mcp/generated/tools/createRelationshipField.json +31 -0
- package/dist/mcp/generated/tools/createRichTextField.json +79 -0
- package/dist/mcp/generated/tools/createSelectField.json +31 -0
- package/dist/mcp/generated/tools/createSingleRelationshipField.json +31 -0
- package/dist/mcp/generated/tools/createTextField.json +31 -0
- package/dist/mcp/generated/tools/createTextareaField.json +87 -0
- package/dist/mcp/generated/tools/createUploadField.json +31 -0
- package/dist/mcp/handler.d.ts +6 -0
- package/dist/mcp/handler.js +147 -0
- package/dist/mcp/handler.js.map +1 -0
- package/dist/mcp/index.d.ts +1 -0
- package/dist/mcp/index.js +28 -0
- package/dist/mcp/index.js.map +1 -0
- package/dist/mcp/io/index.d.ts +2 -0
- package/dist/mcp/io/index.js +31 -0
- package/dist/mcp/io/index.js.map +1 -0
- package/dist/mcp/io/stdin.d.ts +2 -0
- package/dist/mcp/io/stdin.js +118 -0
- package/dist/mcp/io/stdin.js.map +1 -0
- package/dist/mcp/session.d.ts +16 -0
- package/dist/mcp/session.js +85 -0
- package/dist/mcp/session.js.map +1 -0
- package/dist/mcp/sse.d.ts +10 -0
- package/dist/mcp/sse.js +86 -0
- package/dist/mcp/sse.js.map +1 -0
- package/dist/mcp/tools/calculator.d.ts +2 -0
- package/dist/mcp/tools/calculator.js +68 -0
- package/dist/mcp/tools/calculator.js.map +1 -0
- package/dist/mcp/tools/index.d.ts +3 -0
- package/dist/mcp/tools/index.js +6 -0
- package/dist/mcp/tools/index.js.map +1 -0
- package/dist/mcp/tools/list-tools.d.ts +2 -0
- package/dist/mcp/tools/list-tools.js +47 -0
- package/dist/mcp/tools/list-tools.js.map +1 -0
- package/dist/mcp/tools/payload-tools-loader.d.ts +2 -0
- package/dist/mcp/tools/payload-tools-loader.js +21 -0
- package/dist/mcp/tools/payload-tools-loader.js.map +1 -0
- package/dist/mcp/types.d.ts +69 -0
- package/dist/mcp/types.js +2 -0
- package/dist/mcp/types.js.map +1 -0
- package/dist/middleware/errorHandler.d.ts +14 -0
- package/dist/middleware/errorHandler.js +25 -0
- package/dist/middleware/errorHandler.js.map +1 -0
- package/dist/middleware/notFoundHandler.d.ts +2 -0
- package/dist/middleware/notFoundHandler.js +8 -0
- package/dist/middleware/notFoundHandler.js.map +1 -0
- package/dist/routes/health.d.ts +2 -0
- package/dist/routes/health.js +18 -0
- package/dist/routes/health.js.map +1 -0
- package/dist/routes/mcp.d.ts +2 -0
- package/dist/routes/mcp.js +11 -0
- package/dist/routes/mcp.js.map +1 -0
- package/dist/routes/payload-mcp.routes.d.ts +3 -0
- package/dist/routes/payload-mcp.routes.js +8 -0
- package/dist/routes/payload-mcp.routes.js.map +1 -0
- package/dist/utils/logger.d.ts +2 -0
- package/dist/utils/logger.js +35 -0
- package/dist/utils/logger.js.map +1 -0
- package/package.json +64 -0
|
@@ -0,0 +1,422 @@
|
|
|
1
|
+
{
|
|
2
|
+
"name": "createCollection",
|
|
3
|
+
"description": "Creates a Payload CMS 3.0 CollectionConfig configuration\n\n@todo remove the `DeepRequired` in v4.\nWe don't actually guarantee that all properties are set when sanitizing configs.\n\nExample:\n```typescript\n// Collection for a basic blog post\nexport const Posts = {\n slug: 'posts',\n admin: {\n useAsTitle: 'title',\n },\n fields: [\n {\n name: 'title',\n type: 'text',\n required: true,\n },\n {\n name: 'content',\n type: 'richText',\n },\n {\n name: 'author',\n type: 'relationship',\n relationTo: 'users',\n },\n ],\n}\n```",
|
|
4
|
+
"inputSchema": {
|
|
5
|
+
"type": "object",
|
|
6
|
+
"properties": {
|
|
7
|
+
"auth": {
|
|
8
|
+
"type": "object",
|
|
9
|
+
"properties": {
|
|
10
|
+
"forgotPassword": {
|
|
11
|
+
"type": "object",
|
|
12
|
+
"properties": {
|
|
13
|
+
"expiration": {
|
|
14
|
+
"type": "number"
|
|
15
|
+
},
|
|
16
|
+
"generateEmailHTML": {
|
|
17
|
+
"type": "string",
|
|
18
|
+
"description": "Function expression (e.g., \"({ req }) => req.user.role === 'admin'\")"
|
|
19
|
+
},
|
|
20
|
+
"generateEmailSubject": {
|
|
21
|
+
"type": "string",
|
|
22
|
+
"description": "Function expression (e.g., \"({ req }) => req.user.role === 'admin'\")"
|
|
23
|
+
}
|
|
24
|
+
}
|
|
25
|
+
},
|
|
26
|
+
"loginWithUsername": {
|
|
27
|
+
"oneOf": [
|
|
28
|
+
{
|
|
29
|
+
"type": "object",
|
|
30
|
+
"description": "false configuration object"
|
|
31
|
+
},
|
|
32
|
+
{
|
|
33
|
+
"type": "object",
|
|
34
|
+
"properties": {
|
|
35
|
+
"allowEmailLogin": {
|
|
36
|
+
"type": "object",
|
|
37
|
+
"description": "false configuration object"
|
|
38
|
+
},
|
|
39
|
+
"requireEmail": {
|
|
40
|
+
"type": "boolean"
|
|
41
|
+
},
|
|
42
|
+
"requireUsername": {
|
|
43
|
+
"type": "object",
|
|
44
|
+
"description": "true configuration object"
|
|
45
|
+
}
|
|
46
|
+
}
|
|
47
|
+
},
|
|
48
|
+
{
|
|
49
|
+
"type": "object",
|
|
50
|
+
"properties": {
|
|
51
|
+
"allowEmailLogin": {
|
|
52
|
+
"type": "object",
|
|
53
|
+
"description": "true configuration object"
|
|
54
|
+
},
|
|
55
|
+
"requireEmail": {
|
|
56
|
+
"type": "boolean"
|
|
57
|
+
},
|
|
58
|
+
"requireUsername": {
|
|
59
|
+
"type": "boolean"
|
|
60
|
+
}
|
|
61
|
+
}
|
|
62
|
+
}
|
|
63
|
+
],
|
|
64
|
+
"description": "One of the allowed types"
|
|
65
|
+
},
|
|
66
|
+
"verify": {
|
|
67
|
+
"oneOf": [
|
|
68
|
+
{
|
|
69
|
+
"type": "object",
|
|
70
|
+
"description": "false configuration object"
|
|
71
|
+
},
|
|
72
|
+
{
|
|
73
|
+
"type": "object",
|
|
74
|
+
"description": "true configuration object"
|
|
75
|
+
},
|
|
76
|
+
{
|
|
77
|
+
"type": "object",
|
|
78
|
+
"properties": {
|
|
79
|
+
"generateEmailHTML": {
|
|
80
|
+
"type": "string",
|
|
81
|
+
"description": "Function expression (e.g., \"({ req }) => req.user.role === 'admin'\")"
|
|
82
|
+
},
|
|
83
|
+
"generateEmailSubject": {
|
|
84
|
+
"type": "string",
|
|
85
|
+
"description": "Function expression (e.g., \"({ req }) => req.user.role === 'admin'\")"
|
|
86
|
+
}
|
|
87
|
+
}
|
|
88
|
+
}
|
|
89
|
+
],
|
|
90
|
+
"description": "One of the allowed types"
|
|
91
|
+
}
|
|
92
|
+
},
|
|
93
|
+
"required": [
|
|
94
|
+
"loginWithUsername"
|
|
95
|
+
]
|
|
96
|
+
},
|
|
97
|
+
"endpoints": {
|
|
98
|
+
"oneOf": [
|
|
99
|
+
{
|
|
100
|
+
"type": "object",
|
|
101
|
+
"description": "false configuration object"
|
|
102
|
+
},
|
|
103
|
+
{
|
|
104
|
+
"type": "array",
|
|
105
|
+
"items": {
|
|
106
|
+
"type": "object",
|
|
107
|
+
"properties": {
|
|
108
|
+
"custom": {
|
|
109
|
+
"type": "object",
|
|
110
|
+
"properties": {}
|
|
111
|
+
},
|
|
112
|
+
"handler": {
|
|
113
|
+
"type": "string",
|
|
114
|
+
"description": "Function expression (e.g., \"({ req }) => req.user.role === 'admin'\")"
|
|
115
|
+
},
|
|
116
|
+
"method": {
|
|
117
|
+
"type": "string",
|
|
118
|
+
"enum": [
|
|
119
|
+
"connect",
|
|
120
|
+
"delete",
|
|
121
|
+
"get",
|
|
122
|
+
"head",
|
|
123
|
+
"options",
|
|
124
|
+
"patch",
|
|
125
|
+
"post",
|
|
126
|
+
"put"
|
|
127
|
+
],
|
|
128
|
+
"description": "One of the allowed string values"
|
|
129
|
+
},
|
|
130
|
+
"path": {
|
|
131
|
+
"type": "string"
|
|
132
|
+
},
|
|
133
|
+
"root": {
|
|
134
|
+
"type": "object",
|
|
135
|
+
"description": "never configuration object"
|
|
136
|
+
}
|
|
137
|
+
},
|
|
138
|
+
"required": [
|
|
139
|
+
"method",
|
|
140
|
+
"path"
|
|
141
|
+
]
|
|
142
|
+
}
|
|
143
|
+
}
|
|
144
|
+
],
|
|
145
|
+
"description": "One of the allowed types"
|
|
146
|
+
},
|
|
147
|
+
"fields": {
|
|
148
|
+
"type": "array",
|
|
149
|
+
"items": {
|
|
150
|
+
"type": "object",
|
|
151
|
+
"properties": {
|
|
152
|
+
"name": {
|
|
153
|
+
"type": "string",
|
|
154
|
+
"description": "The name of the field"
|
|
155
|
+
},
|
|
156
|
+
"type": {
|
|
157
|
+
"type": "string",
|
|
158
|
+
"description": "The type of field"
|
|
159
|
+
},
|
|
160
|
+
"label": {
|
|
161
|
+
"type": "string",
|
|
162
|
+
"description": "The label shown in the admin UI"
|
|
163
|
+
},
|
|
164
|
+
"required": {
|
|
165
|
+
"type": "boolean",
|
|
166
|
+
"description": "Whether this field is required"
|
|
167
|
+
},
|
|
168
|
+
"admin": {
|
|
169
|
+
"type": "object",
|
|
170
|
+
"description": "Admin panel configuration for this field",
|
|
171
|
+
"properties": {
|
|
172
|
+
"description": {
|
|
173
|
+
"type": "string",
|
|
174
|
+
"description": "Additional description shown in the admin UI"
|
|
175
|
+
},
|
|
176
|
+
"position": {
|
|
177
|
+
"type": "string",
|
|
178
|
+
"enum": [
|
|
179
|
+
"sidebar"
|
|
180
|
+
],
|
|
181
|
+
"description": "Position of the field in the admin UI"
|
|
182
|
+
},
|
|
183
|
+
"width": {
|
|
184
|
+
"type": "string",
|
|
185
|
+
"description": "Width of the field in the admin UI"
|
|
186
|
+
},
|
|
187
|
+
"style": {
|
|
188
|
+
"type": "object",
|
|
189
|
+
"description": "Custom CSS styles for the field"
|
|
190
|
+
},
|
|
191
|
+
"className": {
|
|
192
|
+
"type": "string",
|
|
193
|
+
"description": "CSS class name for the field"
|
|
194
|
+
},
|
|
195
|
+
"readOnly": {
|
|
196
|
+
"type": "boolean",
|
|
197
|
+
"description": "Whether the field is read-only in the admin UI"
|
|
198
|
+
},
|
|
199
|
+
"hidden": {
|
|
200
|
+
"type": "boolean",
|
|
201
|
+
"description": "Whether the field is hidden in the admin UI"
|
|
202
|
+
},
|
|
203
|
+
"condition": {
|
|
204
|
+
"type": "string",
|
|
205
|
+
"description": "Condition for showing/hiding the field"
|
|
206
|
+
},
|
|
207
|
+
"components": {
|
|
208
|
+
"type": "object",
|
|
209
|
+
"description": "Custom components for the field",
|
|
210
|
+
"properties": {
|
|
211
|
+
"Field": {
|
|
212
|
+
"type": "string",
|
|
213
|
+
"description": "Custom field component"
|
|
214
|
+
},
|
|
215
|
+
"Cell": {
|
|
216
|
+
"type": "string",
|
|
217
|
+
"description": "Custom cell component for list views"
|
|
218
|
+
},
|
|
219
|
+
"Filter": {
|
|
220
|
+
"type": "string",
|
|
221
|
+
"description": "Custom filter component"
|
|
222
|
+
}
|
|
223
|
+
}
|
|
224
|
+
}
|
|
225
|
+
}
|
|
226
|
+
}
|
|
227
|
+
},
|
|
228
|
+
"required": [
|
|
229
|
+
"name",
|
|
230
|
+
"type"
|
|
231
|
+
]
|
|
232
|
+
},
|
|
233
|
+
"description": "Array of field configurations"
|
|
234
|
+
},
|
|
235
|
+
"flattenedFields": {
|
|
236
|
+
"type": "array",
|
|
237
|
+
"items": {
|
|
238
|
+
"type": "object",
|
|
239
|
+
"description": "any configuration object"
|
|
240
|
+
},
|
|
241
|
+
"description": "Fields in the database schema structure\nRows / collapsible / tabs w/o name `fields` merged to top, UIs are excluded"
|
|
242
|
+
},
|
|
243
|
+
"joins": {
|
|
244
|
+
"type": "object",
|
|
245
|
+
"properties": {},
|
|
246
|
+
"description": "Object of collections to join 'Join Fields object keyed by collection"
|
|
247
|
+
},
|
|
248
|
+
"polymorphicJoins": {
|
|
249
|
+
"type": "array",
|
|
250
|
+
"items": {
|
|
251
|
+
"type": "object",
|
|
252
|
+
"properties": {
|
|
253
|
+
"field": {
|
|
254
|
+
"type": "object",
|
|
255
|
+
"description": "Payload.JoinField configuration object"
|
|
256
|
+
},
|
|
257
|
+
"getForeignPath": {
|
|
258
|
+
"type": "string",
|
|
259
|
+
"description": "Function expression (e.g., \"({ req }) => req.user.role === 'admin'\")"
|
|
260
|
+
},
|
|
261
|
+
"joinPath": {
|
|
262
|
+
"type": "string"
|
|
263
|
+
},
|
|
264
|
+
"parentIsLocalized": {
|
|
265
|
+
"type": "boolean"
|
|
266
|
+
},
|
|
267
|
+
"targetField": {
|
|
268
|
+
"type": "object",
|
|
269
|
+
"properties": {
|
|
270
|
+
"name": {
|
|
271
|
+
"type": "string",
|
|
272
|
+
"description": "The name of the field"
|
|
273
|
+
},
|
|
274
|
+
"type": {
|
|
275
|
+
"type": "string",
|
|
276
|
+
"description": "The type of field"
|
|
277
|
+
},
|
|
278
|
+
"label": {
|
|
279
|
+
"type": "string",
|
|
280
|
+
"description": "The label shown in the admin UI"
|
|
281
|
+
},
|
|
282
|
+
"required": {
|
|
283
|
+
"type": "boolean",
|
|
284
|
+
"description": "Whether this field is required"
|
|
285
|
+
}
|
|
286
|
+
},
|
|
287
|
+
"required": [
|
|
288
|
+
"name",
|
|
289
|
+
"type"
|
|
290
|
+
],
|
|
291
|
+
"description": "Field configuration"
|
|
292
|
+
}
|
|
293
|
+
},
|
|
294
|
+
"required": [
|
|
295
|
+
"field",
|
|
296
|
+
"joinPath",
|
|
297
|
+
"parentIsLocalized",
|
|
298
|
+
"targetField"
|
|
299
|
+
]
|
|
300
|
+
},
|
|
301
|
+
"description": "List of all polymorphic join fields"
|
|
302
|
+
},
|
|
303
|
+
"sanitizedIndexes": {
|
|
304
|
+
"type": "array",
|
|
305
|
+
"items": {
|
|
306
|
+
"type": "object",
|
|
307
|
+
"properties": {
|
|
308
|
+
"fields": {
|
|
309
|
+
"type": "array",
|
|
310
|
+
"items": {
|
|
311
|
+
"type": "object",
|
|
312
|
+
"properties": {
|
|
313
|
+
"field": {
|
|
314
|
+
"type": "object",
|
|
315
|
+
"description": "any configuration object"
|
|
316
|
+
},
|
|
317
|
+
"localizedPath": {
|
|
318
|
+
"type": "string"
|
|
319
|
+
},
|
|
320
|
+
"path": {
|
|
321
|
+
"type": "string"
|
|
322
|
+
},
|
|
323
|
+
"pathHasLocalized": {
|
|
324
|
+
"type": "boolean"
|
|
325
|
+
}
|
|
326
|
+
},
|
|
327
|
+
"required": [
|
|
328
|
+
"field",
|
|
329
|
+
"localizedPath",
|
|
330
|
+
"path",
|
|
331
|
+
"pathHasLocalized"
|
|
332
|
+
]
|
|
333
|
+
}
|
|
334
|
+
},
|
|
335
|
+
"unique": {
|
|
336
|
+
"type": "boolean"
|
|
337
|
+
}
|
|
338
|
+
},
|
|
339
|
+
"required": [
|
|
340
|
+
"fields",
|
|
341
|
+
"unique"
|
|
342
|
+
]
|
|
343
|
+
}
|
|
344
|
+
},
|
|
345
|
+
"slug": {
|
|
346
|
+
"type": "string"
|
|
347
|
+
},
|
|
348
|
+
"upload": {
|
|
349
|
+
"type": "object",
|
|
350
|
+
"description": "Payload.SanitizedUploadConfig configuration object"
|
|
351
|
+
},
|
|
352
|
+
"versions": {
|
|
353
|
+
"type": "object",
|
|
354
|
+
"properties": {
|
|
355
|
+
"drafts": {
|
|
356
|
+
"oneOf": [
|
|
357
|
+
{
|
|
358
|
+
"type": "object",
|
|
359
|
+
"description": "false configuration object"
|
|
360
|
+
},
|
|
361
|
+
{
|
|
362
|
+
"type": "object",
|
|
363
|
+
"properties": {
|
|
364
|
+
"autosave": {
|
|
365
|
+
"oneOf": [
|
|
366
|
+
{
|
|
367
|
+
"type": "object",
|
|
368
|
+
"description": "false configuration object"
|
|
369
|
+
},
|
|
370
|
+
{
|
|
371
|
+
"type": "object",
|
|
372
|
+
"properties": {
|
|
373
|
+
"interval": {
|
|
374
|
+
"type": "number"
|
|
375
|
+
}
|
|
376
|
+
}
|
|
377
|
+
}
|
|
378
|
+
],
|
|
379
|
+
"description": "One of the allowed types"
|
|
380
|
+
},
|
|
381
|
+
"schedulePublish": {
|
|
382
|
+
"type": "boolean"
|
|
383
|
+
},
|
|
384
|
+
"validate": {
|
|
385
|
+
"type": "boolean"
|
|
386
|
+
}
|
|
387
|
+
},
|
|
388
|
+
"required": [
|
|
389
|
+
"autosave",
|
|
390
|
+
"schedulePublish",
|
|
391
|
+
"validate"
|
|
392
|
+
]
|
|
393
|
+
}
|
|
394
|
+
],
|
|
395
|
+
"description": "One of the allowed types"
|
|
396
|
+
},
|
|
397
|
+
"maxPerDoc": {
|
|
398
|
+
"type": "number"
|
|
399
|
+
}
|
|
400
|
+
},
|
|
401
|
+
"required": [
|
|
402
|
+
"drafts",
|
|
403
|
+
"maxPerDoc"
|
|
404
|
+
]
|
|
405
|
+
}
|
|
406
|
+
},
|
|
407
|
+
"required": [
|
|
408
|
+
"auth",
|
|
409
|
+
"endpoints",
|
|
410
|
+
"fields",
|
|
411
|
+
"flattenedFields",
|
|
412
|
+
"joins",
|
|
413
|
+
"polymorphicJoins",
|
|
414
|
+
"sanitizedIndexes",
|
|
415
|
+
"slug",
|
|
416
|
+
"upload",
|
|
417
|
+
"versions"
|
|
418
|
+
],
|
|
419
|
+
"description": "@todo remove the `DeepRequired` in v4.\nWe don't actually guarantee that all properties are set when sanitizing configs."
|
|
420
|
+
},
|
|
421
|
+
"template": "// Collection configuration for Payload CMS\nexport const {slug} = {\n slug: '{slug}', // URL-friendly identifier for this collection\n admin: {\n useAsTitle: 'title', // Field to use as the title in the admin UI\n defaultColumns: ['title', 'createdAt'], // Default columns in the admin UI list view\n },\n // Define the fields for this collection\n fields: [\n {\n name: 'title',\n type: 'text',\n required: true,\n },\n // Add more fields as needed\n {fields}\n ],\n // Optional: Add hooks, access control, etc.\n ...{rest}\n};"
|
|
422
|
+
}
|