@clickraft/cli 0.8.9 → 0.10.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.
- package/CHANGELOG.md +7 -1
- package/dist/cli.js +6 -2
- package/dist/cli.js.map +1 -1
- package/dist/index.js +6 -2
- package/dist/index.js.map +1 -1
- package/package.json +1 -1
package/dist/index.js
CHANGED
|
@@ -123,12 +123,16 @@ var ProductReferenceSchema = z6.object({
|
|
|
123
123
|
id: z6.string().uuid(),
|
|
124
124
|
imageId: z6.string().uuid().optional()
|
|
125
125
|
}).strict();
|
|
126
|
+
var ReferenceImageSchema = z6.object({
|
|
127
|
+
url: z6.string().url(),
|
|
128
|
+
label: z6.string().max(80).optional()
|
|
129
|
+
}).strict();
|
|
126
130
|
var GenerateCreateRequestSchema = z6.object({
|
|
127
131
|
modelSlug: z6.string().min(1).max(100),
|
|
128
132
|
input: z6.object({
|
|
129
133
|
prompt: z6.string().max(1e4).optional(),
|
|
130
134
|
referenceImageUrl: z6.string().url().optional(),
|
|
131
|
-
referenceImages: z6.array(
|
|
135
|
+
referenceImages: z6.array(ReferenceImageSchema).max(8).optional(),
|
|
132
136
|
aspectRatio: z6.string().regex(/^\d+:\d+$/).optional(),
|
|
133
137
|
resolution: z6.string().regex(/^\d+x\d+$/).optional(),
|
|
134
138
|
durationSeconds: z6.number().int().min(1).max(60).optional(),
|
|
@@ -2094,7 +2098,7 @@ function buildRequestBody(args) {
|
|
|
2094
2098
|
if (args.referenceImages.length === 1) {
|
|
2095
2099
|
input.referenceImageUrl = args.referenceImages[0];
|
|
2096
2100
|
} else if (args.referenceImages.length > 1) {
|
|
2097
|
-
input.referenceImages = args.referenceImages;
|
|
2101
|
+
input.referenceImages = args.referenceImages.map((url) => ({ url }));
|
|
2098
2102
|
}
|
|
2099
2103
|
if (args.aspectRatio !== void 0) input.aspectRatio = args.aspectRatio;
|
|
2100
2104
|
if (args.resolution !== void 0) input.resolution = args.resolution;
|