@decocms/bindings 1.0.1-alpha.14 → 1.0.1-alpha.15
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/package.json
CHANGED
|
@@ -140,12 +140,14 @@ export function createCollectionGetOutputSchema<T extends z.ZodTypeAny>(
|
|
|
140
140
|
/**
|
|
141
141
|
* Factory function to create insert input schema
|
|
142
142
|
*/
|
|
143
|
-
export function createCollectionInsertInputSchema<
|
|
143
|
+
export function createCollectionInsertInputSchema<
|
|
144
|
+
T extends z.ZodObject<z.ZodRawShape>,
|
|
145
|
+
>(
|
|
144
146
|
entitySchema: T,
|
|
145
147
|
) {
|
|
146
148
|
// Remove id field since it may be auto-generated by the server
|
|
147
149
|
return z.object({
|
|
148
|
-
data: entitySchema.describe(
|
|
150
|
+
data: entitySchema.partial().describe(
|
|
149
151
|
"Data for the new entity (id may be auto-generated)",
|
|
150
152
|
),
|
|
151
153
|
});
|