@anuragpal02/zcl-contracts 0.10.0 → 0.12.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/dist/assets.d.ts +5 -0
- package/dist/assets.d.ts.map +1 -1
- package/dist/assets.js +1 -1
- package/dist/client.d.ts +2 -1
- package/dist/client.d.ts.map +1 -1
- package/dist/client.js +5 -1
- package/dist/generation.d.ts +45 -0
- package/dist/generation.d.ts.map +1 -1
- package/dist/generation.js +23 -1
- package/package.json +1 -1
package/dist/assets.d.ts
CHANGED
|
@@ -21,6 +21,7 @@ export declare const assetContentTypeSchema: z.ZodEnum<{
|
|
|
21
21
|
"image/png": "image/png";
|
|
22
22
|
"image/jpeg": "image/jpeg";
|
|
23
23
|
"image/webp": "image/webp";
|
|
24
|
+
"video/mp4": "video/mp4";
|
|
24
25
|
}>;
|
|
25
26
|
export declare const assetSchema: z.ZodObject<{
|
|
26
27
|
id: z.ZodString;
|
|
@@ -46,6 +47,7 @@ export declare const assetSchema: z.ZodObject<{
|
|
|
46
47
|
"image/png": "image/png";
|
|
47
48
|
"image/jpeg": "image/jpeg";
|
|
48
49
|
"image/webp": "image/webp";
|
|
50
|
+
"video/mp4": "video/mp4";
|
|
49
51
|
}>;
|
|
50
52
|
byteSize: z.ZodNullable<z.ZodNumber>;
|
|
51
53
|
checksumSha256: z.ZodNullable<z.ZodString>;
|
|
@@ -63,6 +65,7 @@ export declare const createAssetUploadRequestSchema: z.ZodObject<{
|
|
|
63
65
|
"image/png": "image/png";
|
|
64
66
|
"image/jpeg": "image/jpeg";
|
|
65
67
|
"image/webp": "image/webp";
|
|
68
|
+
"video/mp4": "video/mp4";
|
|
66
69
|
}>;
|
|
67
70
|
byteSize: z.ZodNumber;
|
|
68
71
|
}, z.core.$strip>;
|
|
@@ -97,6 +100,7 @@ export declare const createAssetUploadResponseSchema: z.ZodObject<{
|
|
|
97
100
|
"image/png": "image/png";
|
|
98
101
|
"image/jpeg": "image/jpeg";
|
|
99
102
|
"image/webp": "image/webp";
|
|
103
|
+
"video/mp4": "video/mp4";
|
|
100
104
|
}>;
|
|
101
105
|
byteSize: z.ZodNullable<z.ZodNumber>;
|
|
102
106
|
checksumSha256: z.ZodNullable<z.ZodString>;
|
|
@@ -141,6 +145,7 @@ export declare const listAssetsResponseSchema: z.ZodObject<{
|
|
|
141
145
|
"image/png": "image/png";
|
|
142
146
|
"image/jpeg": "image/jpeg";
|
|
143
147
|
"image/webp": "image/webp";
|
|
148
|
+
"video/mp4": "video/mp4";
|
|
144
149
|
}>;
|
|
145
150
|
byteSize: z.ZodNullable<z.ZodNumber>;
|
|
146
151
|
checksumSha256: z.ZodNullable<z.ZodString>;
|
package/dist/assets.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"assets.d.ts","sourceRoot":"","sources":["../src/assets.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAA;AAGvB,eAAO,MAAM,eAAe;;;;;;;;EAQ1B,CAAA;AAEF,eAAO,MAAM,iBAAiB;;;;;EAA+D,CAAA;AAC7F,eAAO,MAAM,yBAAyB;;EAAwB,CAAA;AAC9D,eAAO,MAAM,sBAAsB
|
|
1
|
+
{"version":3,"file":"assets.d.ts","sourceRoot":"","sources":["../src/assets.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAA;AAGvB,eAAO,MAAM,eAAe;;;;;;;;EAQ1B,CAAA;AAEF,eAAO,MAAM,iBAAiB;;;;;EAA+D,CAAA;AAC7F,eAAO,MAAM,yBAAyB;;EAAwB,CAAA;AAC9D,eAAO,MAAM,sBAAsB;;;;;EAAiE,CAAA;AAEpG,eAAO,MAAM,WAAW;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;iBAiBtB,CAAA;AAEF,eAAO,MAAM,8BAA8B;;;;;;;;;;;;iBAKzC,CAAA;AAEF,eAAO,MAAM,iBAAiB;;;;;iBAK5B,CAAA;AAEF,eAAO,MAAM,+BAA+B;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;iBAG1C,CAAA;AAEF,eAAO,MAAM,gCAAgC;;;iBAO3C,CAAA;AAEF,eAAO,MAAM,wBAAwB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;iBAEnC,CAAA;AAEF,MAAM,MAAM,KAAK,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,WAAW,CAAC,CAAA;AAC/C,MAAM,MAAM,SAAS,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,eAAe,CAAC,CAAA;AACvD,MAAM,MAAM,WAAW,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,iBAAiB,CAAC,CAAA;AAC3D,MAAM,MAAM,WAAW,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,iBAAiB,CAAC,CAAA;AAC3D,MAAM,MAAM,wBAAwB,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,8BAA8B,CAAC,CAAA;AACrF,MAAM,MAAM,yBAAyB,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,+BAA+B,CAAC,CAAA;AACvF,MAAM,MAAM,0BAA0B,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,gCAAgC,CAAC,CAAA;AACzF,MAAM,MAAM,kBAAkB,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,wBAAwB,CAAC,CAAA"}
|
package/dist/assets.js
CHANGED
|
@@ -11,7 +11,7 @@ export const assetKindSchema = z.enum([
|
|
|
11
11
|
]);
|
|
12
12
|
export const assetStatusSchema = z.enum(['pending_upload', 'available', 'failed', 'deleted']);
|
|
13
13
|
export const uploadableAssetKindSchema = z.enum(['reference']);
|
|
14
|
-
export const assetContentTypeSchema = z.enum(['image/png', 'image/jpeg', 'image/webp']);
|
|
14
|
+
export const assetContentTypeSchema = z.enum(['image/png', 'image/jpeg', 'image/webp', 'video/mp4']);
|
|
15
15
|
export const assetSchema = z.object({
|
|
16
16
|
id: idSchema,
|
|
17
17
|
workspaceId: idSchema,
|
package/dist/client.d.ts
CHANGED
|
@@ -4,7 +4,7 @@ import { type CreditBalanceResponse } from './credits.js';
|
|
|
4
4
|
import { type CreateWorkspaceRequest, type Workspace, type WorkspaceMembership } from './workspaces.js';
|
|
5
5
|
import { type Asset, type AssetUpload, type CreateAssetUploadRequest, type CreateAssetUploadResponse, type FinalizeAssetUploadRequest, type ListAssetsResponse } from './assets.js';
|
|
6
6
|
import { type CreateProjectRequest, type LedMapResponse, type Project, type UpdateLedMapRequest, type UpdateProjectRequest } from './projects.js';
|
|
7
|
-
import { type CreateGenerationJobRequest, type CreatePanelSetRequest, type CreatePanelSetResponse, type EditGenerationJobRequest, type GenerationJobResponse, type GenerationJobStatus, type ListGenerationJobsResponse } from './generation.js';
|
|
7
|
+
import { type CreateGenerationJobRequest, type CreatePanelSetRequest, type CreatePanelSetResponse, type CreateVideoLoopRequest, type EditGenerationJobRequest, type GenerationJobResponse, type GenerationJobStatus, type ListGenerationJobsResponse } from './generation.js';
|
|
8
8
|
import { type DescribeImageRequest, type DescribeImageResponse } from './assistant.js';
|
|
9
9
|
type FetchLike = (request: Request) => Promise<Response>;
|
|
10
10
|
export type ZclApiClientOptions = {
|
|
@@ -80,6 +80,7 @@ export declare function createZclApiClient(options: ZclApiClientOptions): {
|
|
|
80
80
|
create(workspaceId: string, projectId: string, input: CreateGenerationJobRequest): Promise<GenerationJobResponse>;
|
|
81
81
|
edit(workspaceId: string, projectId: string, input: EditGenerationJobRequest): Promise<GenerationJobResponse>;
|
|
82
82
|
createPanelSet(workspaceId: string, projectId: string, input: CreatePanelSetRequest): Promise<CreatePanelSetResponse>;
|
|
83
|
+
createVideoLoop(workspaceId: string, projectId: string, input: CreateVideoLoopRequest): Promise<GenerationJobResponse>;
|
|
83
84
|
get(workspaceId: string, projectId: string, jobId: string): Promise<GenerationJobResponse>;
|
|
84
85
|
list(workspaceId: string, projectId: string, options?: {
|
|
85
86
|
status?: GenerationJobStatus;
|
package/dist/client.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"client.d.ts","sourceRoot":"","sources":["../src/client.ts"],"names":[],"mappings":"AACA,OAAO,EASL,KAAK,mBAAmB,EACxB,KAAK,2BAA2B,EAChC,KAAK,YAAY,EACjB,KAAK,cAAc,EACnB,KAAK,qBAAqB,EAC1B,KAAK,2BAA2B,EAChC,KAAK,eAAe,EACpB,KAAK,aAAa,EACnB,MAAM,WAAW,CAAA;AAClB,OAAO,EAA2C,KAAK,YAAY,EAAE,MAAM,aAAa,CAAA;AACxF,OAAO,EAA+B,KAAK,qBAAqB,EAAE,MAAM,cAAc,CAAA;AACtF,OAAO,EAIL,KAAK,sBAAsB,EAC3B,KAAK,SAAS,EACd,KAAK,mBAAmB,EACzB,MAAM,iBAAiB,CAAA;AACxB,OAAO,EAML,KAAK,KAAK,EACV,KAAK,WAAW,EAChB,KAAK,wBAAwB,EAC7B,KAAK,yBAAyB,EAC9B,KAAK,0BAA0B,EAC/B,KAAK,kBAAkB,EACxB,MAAM,aAAa,CAAA;AACpB,OAAO,EAML,KAAK,oBAAoB,EACzB,KAAK,cAAc,EACnB,KAAK,OAAO,EACZ,KAAK,mBAAmB,EACxB,KAAK,oBAAoB,EAC1B,MAAM,eAAe,CAAA;AACtB,OAAO,
|
|
1
|
+
{"version":3,"file":"client.d.ts","sourceRoot":"","sources":["../src/client.ts"],"names":[],"mappings":"AACA,OAAO,EASL,KAAK,mBAAmB,EACxB,KAAK,2BAA2B,EAChC,KAAK,YAAY,EACjB,KAAK,cAAc,EACnB,KAAK,qBAAqB,EAC1B,KAAK,2BAA2B,EAChC,KAAK,eAAe,EACpB,KAAK,aAAa,EACnB,MAAM,WAAW,CAAA;AAClB,OAAO,EAA2C,KAAK,YAAY,EAAE,MAAM,aAAa,CAAA;AACxF,OAAO,EAA+B,KAAK,qBAAqB,EAAE,MAAM,cAAc,CAAA;AACtF,OAAO,EAIL,KAAK,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AAG,OAAO,CAAC,IAAI,CAAC;8BAWvD,MAAM,aACR,MAAM,WACR,MAAM,SACR,0BAA0B,GAChC,OAAO,CAAC,KAAK,CAAC;0BAMC,MAAM,aAAa,MAAM,GAAG,OAAO,CAAC,kBAAkB,CAAC;gCAKjD,MAAM,aAAa,MAAM,WAAW,MAAM,GAAG,MAAM;;;yBAK1D,MAAM,GAAG,OAAO,CAAC,qBAAqB,CAAC;;;4BAMzC,MAAM,aACR,MAAM,SACV,0BAA0B,GAChC,OAAO,CAAC,qBAAqB,CAAC;0BAWlB,MAAM,aACR,MAAM,SACV,wBAAwB,GAC9B,OAAO,CAAC,qBAAqB,CAAC;oCAYlB,MAAM,aACR,MAAM,SACV,qBAAqB,GAC3B,OAAO,CAAC,sBAAsB,CAAC;qCAYnB,MAAM,aACR,MAAM,SACV,sBAAsB,GAC5B,OAAO,CAAC,qBAAqB,CAAC;yBAQhB,MAAM,aAAa,MAAM,SAAS,MAAM,GAAG,OAAO,CAAC,qBAAqB,CAAC;0BAO3E,MAAM,aACR,MAAM,YACR;YAAE,MAAM,CAAC,EAAE,mBAAmB,CAAC;YAAC,cAAc,CAAC,EAAE,MAAM,CAAA;SAAE,GACjE,OAAO,CAAC,0BAA0B,CAAC;;;mCAiBvB,MAAM,aACR,MAAM,SACV,oBAAoB,GAC1B,OAAO,CAAC,qBAAqB,CAAC;;EAYtC;AAED,MAAM,MAAM,YAAY,GAAG,UAAU,CAAC,OAAO,kBAAkB,CAAC,CAAA"}
|
package/dist/client.js
CHANGED
|
@@ -5,7 +5,7 @@ import { creditBalanceResponseSchema } from './credits.js';
|
|
|
5
5
|
import { createWorkspaceRequestSchema, workspaceMembershipSchema, workspaceSchema } from './workspaces.js';
|
|
6
6
|
import { assetSchema, createAssetUploadRequestSchema, createAssetUploadResponseSchema, finalizeAssetUploadRequestSchema, listAssetsResponseSchema } from './assets.js';
|
|
7
7
|
import { createProjectRequestSchema, ledMapResponseSchema, projectSchema, updateLedMapRequestSchema, updateProjectRequestSchema } from './projects.js';
|
|
8
|
-
import { createGenerationJobRequestSchema, createPanelSetRequestSchema, createPanelSetResponseSchema, editGenerationJobRequestSchema, generationJobResponseSchema, listGenerationJobsResponseSchema } from './generation.js';
|
|
8
|
+
import { createGenerationJobRequestSchema, createPanelSetRequestSchema, createPanelSetResponseSchema, createVideoLoopRequestSchema, editGenerationJobRequestSchema, generationJobResponseSchema, listGenerationJobsResponseSchema } from './generation.js';
|
|
9
9
|
import { describeImageRequestSchema, describeImageResponseSchema } from './assistant.js';
|
|
10
10
|
const workspaceListResponseSchema = listResponseSchema(workspaceSchema.extend({
|
|
11
11
|
membership: workspaceMembershipSchema
|
|
@@ -211,6 +211,10 @@ export function createZclApiClient(options) {
|
|
|
211
211
|
body
|
|
212
212
|
});
|
|
213
213
|
},
|
|
214
|
+
createVideoLoop(workspaceId, projectId, input) {
|
|
215
|
+
const body = createVideoLoopRequestSchema.parse(input);
|
|
216
|
+
return request(`/workspaces/${workspaceId}/projects/${projectId}/video-loops`, generationJobResponseSchema, { method: 'POST', body });
|
|
217
|
+
},
|
|
214
218
|
get(workspaceId, projectId, jobId) {
|
|
215
219
|
return request(`/workspaces/${workspaceId}/projects/${projectId}/generation-jobs/${jobId}`, generationJobResponseSchema);
|
|
216
220
|
},
|
package/dist/generation.d.ts
CHANGED
|
@@ -13,12 +13,22 @@ export declare const generationJobTypeSchema: z.ZodEnum<{
|
|
|
13
13
|
"image.mask": "image.mask";
|
|
14
14
|
"image.export": "image.export";
|
|
15
15
|
"image.panel": "image.panel";
|
|
16
|
+
"video.loop": "video.loop";
|
|
17
|
+
"video.upscale": "video.upscale";
|
|
18
|
+
}>;
|
|
19
|
+
export declare const imageAspectSchema: z.ZodEnum<{
|
|
20
|
+
"16:9": "16:9";
|
|
21
|
+
"9:16": "9:16";
|
|
16
22
|
}>;
|
|
17
23
|
export declare const imageGenerateParamsSchema: z.ZodObject<{
|
|
18
24
|
prompt: z.ZodString;
|
|
19
25
|
sourceAssetIds: z.ZodOptional<z.ZodArray<z.ZodString>>;
|
|
20
26
|
ledMapVersion: z.ZodOptional<z.ZodNumber>;
|
|
21
27
|
size: z.ZodOptional<z.ZodString>;
|
|
28
|
+
aspect: z.ZodOptional<z.ZodEnum<{
|
|
29
|
+
"16:9": "16:9";
|
|
30
|
+
"9:16": "9:16";
|
|
31
|
+
}>>;
|
|
22
32
|
enhance: z.ZodOptional<z.ZodBoolean>;
|
|
23
33
|
count: z.ZodDefault<z.ZodNumber>;
|
|
24
34
|
}, z.core.$strip>;
|
|
@@ -31,6 +41,26 @@ export declare const createPanelSetRequestSchema: z.ZodObject<{
|
|
|
31
41
|
masterJobId: z.ZodString;
|
|
32
42
|
panelBorders: z.ZodDefault<z.ZodOptional<z.ZodBoolean>>;
|
|
33
43
|
}, z.core.$strip>;
|
|
44
|
+
export declare const cropFractionsSchema: z.ZodObject<{
|
|
45
|
+
x: z.ZodNumber;
|
|
46
|
+
y: z.ZodNumber;
|
|
47
|
+
w: z.ZodNumber;
|
|
48
|
+
h: z.ZodNumber;
|
|
49
|
+
}, z.core.$strip>;
|
|
50
|
+
export declare const createVideoLoopRequestSchema: z.ZodObject<{
|
|
51
|
+
sourceAssetId: z.ZodString;
|
|
52
|
+
cropFractions: z.ZodOptional<z.ZodObject<{
|
|
53
|
+
x: z.ZodNumber;
|
|
54
|
+
y: z.ZodNumber;
|
|
55
|
+
w: z.ZodNumber;
|
|
56
|
+
h: z.ZodNumber;
|
|
57
|
+
}, z.core.$strip>>;
|
|
58
|
+
intensity: z.ZodDefault<z.ZodEnum<{
|
|
59
|
+
subtle: "subtle";
|
|
60
|
+
medium: "medium";
|
|
61
|
+
dynamic: "dynamic";
|
|
62
|
+
}>>;
|
|
63
|
+
}, z.core.$strip>;
|
|
34
64
|
export declare const generationJobSchema: z.ZodObject<{
|
|
35
65
|
id: z.ZodString;
|
|
36
66
|
workspaceId: z.ZodString;
|
|
@@ -42,6 +72,8 @@ export declare const generationJobSchema: z.ZodObject<{
|
|
|
42
72
|
"image.mask": "image.mask";
|
|
43
73
|
"image.export": "image.export";
|
|
44
74
|
"image.panel": "image.panel";
|
|
75
|
+
"video.loop": "video.loop";
|
|
76
|
+
"video.upscale": "video.upscale";
|
|
45
77
|
}>;
|
|
46
78
|
status: z.ZodEnum<{
|
|
47
79
|
failed: "failed";
|
|
@@ -67,6 +99,10 @@ export declare const createGenerationJobRequestSchema: z.ZodObject<{
|
|
|
67
99
|
sourceAssetIds: z.ZodOptional<z.ZodArray<z.ZodString>>;
|
|
68
100
|
ledMapVersion: z.ZodOptional<z.ZodNumber>;
|
|
69
101
|
size: z.ZodOptional<z.ZodString>;
|
|
102
|
+
aspect: z.ZodOptional<z.ZodEnum<{
|
|
103
|
+
"16:9": "16:9";
|
|
104
|
+
"9:16": "9:16";
|
|
105
|
+
}>>;
|
|
70
106
|
enhance: z.ZodOptional<z.ZodBoolean>;
|
|
71
107
|
count: z.ZodDefault<z.ZodNumber>;
|
|
72
108
|
}, z.core.$strip>;
|
|
@@ -82,6 +118,8 @@ export declare const generationJobResponseSchema: z.ZodObject<{
|
|
|
82
118
|
"image.mask": "image.mask";
|
|
83
119
|
"image.export": "image.export";
|
|
84
120
|
"image.panel": "image.panel";
|
|
121
|
+
"video.loop": "video.loop";
|
|
122
|
+
"video.upscale": "video.upscale";
|
|
85
123
|
}>;
|
|
86
124
|
status: z.ZodEnum<{
|
|
87
125
|
failed: "failed";
|
|
@@ -140,6 +178,8 @@ export declare const createPanelSetResponseSchema: z.ZodObject<{
|
|
|
140
178
|
"image.mask": "image.mask";
|
|
141
179
|
"image.export": "image.export";
|
|
142
180
|
"image.panel": "image.panel";
|
|
181
|
+
"video.loop": "video.loop";
|
|
182
|
+
"video.upscale": "video.upscale";
|
|
143
183
|
}>;
|
|
144
184
|
status: z.ZodEnum<{
|
|
145
185
|
failed: "failed";
|
|
@@ -208,6 +248,8 @@ export declare const listGenerationJobsResponseSchema: z.ZodObject<{
|
|
|
208
248
|
"image.mask": "image.mask";
|
|
209
249
|
"image.export": "image.export";
|
|
210
250
|
"image.panel": "image.panel";
|
|
251
|
+
"video.loop": "video.loop";
|
|
252
|
+
"video.upscale": "video.upscale";
|
|
211
253
|
}>;
|
|
212
254
|
status: z.ZodEnum<{
|
|
213
255
|
failed: "failed";
|
|
@@ -231,9 +273,12 @@ export declare const listGenerationJobsResponseSchema: z.ZodObject<{
|
|
|
231
273
|
}, z.core.$strip>;
|
|
232
274
|
export type GenerationJobStatus = z.infer<typeof generationJobStatusSchema>;
|
|
233
275
|
export type GenerationJobType = z.infer<typeof generationJobTypeSchema>;
|
|
276
|
+
export type ImageAspect = z.infer<typeof imageAspectSchema>;
|
|
234
277
|
export type ImageGenerateParams = z.infer<typeof imageGenerateParamsSchema>;
|
|
235
278
|
export type EditGenerationJobRequest = z.input<typeof editGenerationJobRequestSchema>;
|
|
236
279
|
export type CreatePanelSetRequest = z.input<typeof createPanelSetRequestSchema>;
|
|
280
|
+
export type CropFractions = z.infer<typeof cropFractionsSchema>;
|
|
281
|
+
export type CreateVideoLoopRequest = z.input<typeof createVideoLoopRequestSchema>;
|
|
237
282
|
export type GenerationJob = z.infer<typeof generationJobSchema>;
|
|
238
283
|
export type CreateGenerationJobRequest = z.input<typeof createGenerationJobRequestSchema>;
|
|
239
284
|
export type ListGenerationJobsQuery = z.input<typeof listGenerationJobsQuerySchema>;
|
package/dist/generation.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"generation.d.ts","sourceRoot":"","sources":["../src/generation.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAA;AAIvB,eAAO,MAAM,yBAAyB;;;;;;EAAmE,CAAA;AAEzG,eAAO,MAAM,uBAAuB
|
|
1
|
+
{"version":3,"file":"generation.d.ts","sourceRoot":"","sources":["../src/generation.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAA;AAIvB,eAAO,MAAM,yBAAyB;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AAwB,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,8BAA8B,CAAC,CAAA;AACrF,MAAM,MAAM,qBAAqB,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,2BAA2B,CAAC,CAAA;AAC/E,MAAM,MAAM,aAAa,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,mBAAmB,CAAC,CAAA;AAC/D,MAAM,MAAM,sBAAsB,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,4BAA4B,CAAC,CAAA;AACjF,MAAM,MAAM,aAAa,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,mBAAmB,CAAC,CAAA;AAC/D,MAAM,MAAM,0BAA0B,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,gCAAgC,CAAC,CAAA;AACzF,MAAM,MAAM,uBAAuB,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,6BAA6B,CAAC,CAAA;AACnF,MAAM,MAAM,qBAAqB,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,2BAA2B,CAAC,CAAA;AAC/E,MAAM,MAAM,0BAA0B,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,gCAAgC,CAAC,CAAA;AACzF,MAAM,MAAM,eAAe,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,qBAAqB,CAAC,CAAA;AACnE,MAAM,MAAM,sBAAsB,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,4BAA4B,CAAC,CAAA"}
|
package/dist/generation.js
CHANGED
|
@@ -8,13 +8,22 @@ export const generationJobTypeSchema = z.enum([
|
|
|
8
8
|
'image.edit',
|
|
9
9
|
'image.mask',
|
|
10
10
|
'image.export',
|
|
11
|
-
'image.panel'
|
|
11
|
+
'image.panel',
|
|
12
|
+
'video.loop',
|
|
13
|
+
'video.upscale'
|
|
12
14
|
]);
|
|
15
|
+
// Explicit output aspect for the concept-first "master" generation. The two ratios the
|
|
16
|
+
// image model supports for a free concept; the LED MAP step later fits the chosen master
|
|
17
|
+
// onto panels (per-panel companion generation), so a master is generated map-independently.
|
|
18
|
+
export const imageAspectSchema = z.enum(['16:9', '9:16']);
|
|
13
19
|
export const imageGenerateParamsSchema = z.object({
|
|
14
20
|
prompt: z.string().trim().min(1).max(4000),
|
|
15
21
|
sourceAssetIds: z.array(idSchema).max(16).optional(),
|
|
16
22
|
ledMapVersion: z.number().int().nonnegative().optional(),
|
|
17
23
|
size: z.string().trim().min(1).max(32).optional(), // server may override from the LED map
|
|
24
|
+
// Concept-first master aspect. When set, the server uses THIS instead of deriving the
|
|
25
|
+
// aspect from the LED map; omitted = LED-derived (the existing whole-wall generate path).
|
|
26
|
+
aspect: imageAspectSchema.optional(),
|
|
18
27
|
enhance: z.boolean().optional(),
|
|
19
28
|
count: z.number().int().min(1).max(4).default(1)
|
|
20
29
|
});
|
|
@@ -27,6 +36,19 @@ export const createPanelSetRequestSchema = z.object({
|
|
|
27
36
|
masterJobId: idSchema,
|
|
28
37
|
panelBorders: z.boolean().optional().default(false)
|
|
29
38
|
});
|
|
39
|
+
export const cropFractionsSchema = z.object({
|
|
40
|
+
x: z.number().min(0).max(1),
|
|
41
|
+
y: z.number().min(0).max(1),
|
|
42
|
+
w: z.number().min(0).max(1),
|
|
43
|
+
h: z.number().min(0).max(1)
|
|
44
|
+
});
|
|
45
|
+
export const createVideoLoopRequestSchema = z.object({
|
|
46
|
+
sourceAssetId: idSchema,
|
|
47
|
+
// Content-rect crop fractions within the 1920×1080 letterboxed source (the client computes
|
|
48
|
+
// them when it letterbox-fits the composite). Omitted = no crop (source already 16:9).
|
|
49
|
+
cropFractions: cropFractionsSchema.optional(),
|
|
50
|
+
intensity: z.enum(['subtle', 'medium', 'dynamic']).default('medium')
|
|
51
|
+
});
|
|
30
52
|
export const generationJobSchema = z.object({
|
|
31
53
|
id: idSchema,
|
|
32
54
|
workspaceId: idSchema,
|