@pixerate/schemas 1.0.0 → 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/dist/index.cjs +95 -0
- package/dist/index.d.cts +86 -0
- package/package.json +8 -5
package/dist/index.cjs
ADDED
|
@@ -0,0 +1,95 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __defProp = Object.defineProperty;
|
|
3
|
+
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
|
|
4
|
+
var __getOwnPropNames = Object.getOwnPropertyNames;
|
|
5
|
+
var __hasOwnProp = Object.prototype.hasOwnProperty;
|
|
6
|
+
var __export = (target, all) => {
|
|
7
|
+
for (var name in all)
|
|
8
|
+
__defProp(target, name, { get: all[name], enumerable: true });
|
|
9
|
+
};
|
|
10
|
+
var __copyProps = (to, from, except, desc) => {
|
|
11
|
+
if (from && typeof from === "object" || typeof from === "function") {
|
|
12
|
+
for (let key of __getOwnPropNames(from))
|
|
13
|
+
if (!__hasOwnProp.call(to, key) && key !== except)
|
|
14
|
+
__defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
|
|
15
|
+
}
|
|
16
|
+
return to;
|
|
17
|
+
};
|
|
18
|
+
var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
|
|
19
|
+
|
|
20
|
+
// src/index.ts
|
|
21
|
+
var index_exports = {};
|
|
22
|
+
__export(index_exports, {
|
|
23
|
+
AspectRatioSchema: () => AspectRatioSchema,
|
|
24
|
+
FidelitySchema: () => FidelitySchema,
|
|
25
|
+
ImageGenerationSchema: () => ImageGenerationSchema,
|
|
26
|
+
ImageTransformationSchema: () => ImageTransformationSchema,
|
|
27
|
+
QueueJobSchema: () => QueueJobSchema,
|
|
28
|
+
VideoAnalysisCategorySchema: () => VideoAnalysisCategorySchema,
|
|
29
|
+
VideoAnalysisSchema: () => VideoAnalysisSchema,
|
|
30
|
+
VideoAspectRatioSchema: () => VideoAspectRatioSchema
|
|
31
|
+
});
|
|
32
|
+
module.exports = __toCommonJS(index_exports);
|
|
33
|
+
var import_zod = require("zod");
|
|
34
|
+
var FidelitySchema = import_zod.z.enum(["outline", "blocked", "shaded", "polished"]);
|
|
35
|
+
var AspectRatioSchema = import_zod.z.enum([
|
|
36
|
+
"1:1",
|
|
37
|
+
"2:3",
|
|
38
|
+
"3:2",
|
|
39
|
+
"3:4",
|
|
40
|
+
"4:3",
|
|
41
|
+
"4:5",
|
|
42
|
+
"5:4",
|
|
43
|
+
"9:16",
|
|
44
|
+
"16:9",
|
|
45
|
+
"21:9"
|
|
46
|
+
]);
|
|
47
|
+
var VideoAspectRatioSchema = import_zod.z.enum(["9:16", "16:9"]);
|
|
48
|
+
var ImageGenerationSchema = import_zod.z.object({
|
|
49
|
+
prompt: import_zod.z.string(),
|
|
50
|
+
aspectRatio: AspectRatioSchema.optional(),
|
|
51
|
+
seed: import_zod.z.number().int().optional(),
|
|
52
|
+
fidelity: FidelitySchema.optional()
|
|
53
|
+
});
|
|
54
|
+
var ImageTransformationSchema = import_zod.z.object({
|
|
55
|
+
prompt: import_zod.z.string(),
|
|
56
|
+
changes: import_zod.z.string(),
|
|
57
|
+
aspectRatio: AspectRatioSchema.optional(),
|
|
58
|
+
seed: import_zod.z.number().int().optional()
|
|
59
|
+
});
|
|
60
|
+
var VideoAnalysisCategorySchema = import_zod.z.enum([
|
|
61
|
+
"Scenes",
|
|
62
|
+
"Environments",
|
|
63
|
+
"Things",
|
|
64
|
+
"Creatures",
|
|
65
|
+
"People",
|
|
66
|
+
"Clothes",
|
|
67
|
+
"Shapes",
|
|
68
|
+
"Effects",
|
|
69
|
+
"Uploads"
|
|
70
|
+
]);
|
|
71
|
+
var VideoAnalysisSchema = import_zod.z.object({
|
|
72
|
+
title: import_zod.z.string(),
|
|
73
|
+
prompt: import_zod.z.string(),
|
|
74
|
+
category: VideoAnalysisCategorySchema,
|
|
75
|
+
fidelity: FidelitySchema
|
|
76
|
+
});
|
|
77
|
+
var QueueJobSchema = import_zod.z.object({
|
|
78
|
+
id: import_zod.z.string(),
|
|
79
|
+
type: import_zod.z.enum(["text", "image", "video", "analysis"]),
|
|
80
|
+
status: import_zod.z.enum(["queued", "processing", "completed", "failed"]),
|
|
81
|
+
payload: import_zod.z.record(import_zod.z.any()).optional(),
|
|
82
|
+
createdAt: import_zod.z.any().optional(),
|
|
83
|
+
updatedAt: import_zod.z.any().optional()
|
|
84
|
+
});
|
|
85
|
+
// Annotate the CommonJS export names for ESM import in node:
|
|
86
|
+
0 && (module.exports = {
|
|
87
|
+
AspectRatioSchema,
|
|
88
|
+
FidelitySchema,
|
|
89
|
+
ImageGenerationSchema,
|
|
90
|
+
ImageTransformationSchema,
|
|
91
|
+
QueueJobSchema,
|
|
92
|
+
VideoAnalysisCategorySchema,
|
|
93
|
+
VideoAnalysisSchema,
|
|
94
|
+
VideoAspectRatioSchema
|
|
95
|
+
});
|
package/dist/index.d.cts
ADDED
|
@@ -0,0 +1,86 @@
|
|
|
1
|
+
import { z } from 'zod';
|
|
2
|
+
|
|
3
|
+
declare const FidelitySchema: z.ZodEnum<["outline", "blocked", "shaded", "polished"]>;
|
|
4
|
+
type Fidelity = z.infer<typeof FidelitySchema>;
|
|
5
|
+
declare const AspectRatioSchema: z.ZodEnum<["1:1", "2:3", "3:2", "3:4", "4:3", "4:5", "5:4", "9:16", "16:9", "21:9"]>;
|
|
6
|
+
type AspectRatio = z.infer<typeof AspectRatioSchema>;
|
|
7
|
+
declare const VideoAspectRatioSchema: z.ZodEnum<["9:16", "16:9"]>;
|
|
8
|
+
type VideoAspectRatio = z.infer<typeof VideoAspectRatioSchema>;
|
|
9
|
+
declare const ImageGenerationSchema: z.ZodObject<{
|
|
10
|
+
prompt: z.ZodString;
|
|
11
|
+
aspectRatio: z.ZodOptional<z.ZodEnum<["1:1", "2:3", "3:2", "3:4", "4:3", "4:5", "5:4", "9:16", "16:9", "21:9"]>>;
|
|
12
|
+
seed: z.ZodOptional<z.ZodNumber>;
|
|
13
|
+
fidelity: z.ZodOptional<z.ZodEnum<["outline", "blocked", "shaded", "polished"]>>;
|
|
14
|
+
}, "strip", z.ZodTypeAny, {
|
|
15
|
+
prompt: string;
|
|
16
|
+
aspectRatio?: "1:1" | "2:3" | "3:2" | "3:4" | "4:3" | "4:5" | "5:4" | "9:16" | "16:9" | "21:9" | undefined;
|
|
17
|
+
seed?: number | undefined;
|
|
18
|
+
fidelity?: "outline" | "blocked" | "shaded" | "polished" | undefined;
|
|
19
|
+
}, {
|
|
20
|
+
prompt: string;
|
|
21
|
+
aspectRatio?: "1:1" | "2:3" | "3:2" | "3:4" | "4:3" | "4:5" | "5:4" | "9:16" | "16:9" | "21:9" | undefined;
|
|
22
|
+
seed?: number | undefined;
|
|
23
|
+
fidelity?: "outline" | "blocked" | "shaded" | "polished" | undefined;
|
|
24
|
+
}>;
|
|
25
|
+
type ImageGenerationPayload = z.infer<typeof ImageGenerationSchema>;
|
|
26
|
+
declare const ImageTransformationSchema: z.ZodObject<{
|
|
27
|
+
prompt: z.ZodString;
|
|
28
|
+
changes: z.ZodString;
|
|
29
|
+
aspectRatio: z.ZodOptional<z.ZodEnum<["1:1", "2:3", "3:2", "3:4", "4:3", "4:5", "5:4", "9:16", "16:9", "21:9"]>>;
|
|
30
|
+
seed: z.ZodOptional<z.ZodNumber>;
|
|
31
|
+
}, "strip", z.ZodTypeAny, {
|
|
32
|
+
prompt: string;
|
|
33
|
+
changes: string;
|
|
34
|
+
aspectRatio?: "1:1" | "2:3" | "3:2" | "3:4" | "4:3" | "4:5" | "5:4" | "9:16" | "16:9" | "21:9" | undefined;
|
|
35
|
+
seed?: number | undefined;
|
|
36
|
+
}, {
|
|
37
|
+
prompt: string;
|
|
38
|
+
changes: string;
|
|
39
|
+
aspectRatio?: "1:1" | "2:3" | "3:2" | "3:4" | "4:3" | "4:5" | "5:4" | "9:16" | "16:9" | "21:9" | undefined;
|
|
40
|
+
seed?: number | undefined;
|
|
41
|
+
}>;
|
|
42
|
+
type ImageTransformationPayload = z.infer<typeof ImageTransformationSchema>;
|
|
43
|
+
declare const VideoAnalysisCategorySchema: z.ZodEnum<["Scenes", "Environments", "Things", "Creatures", "People", "Clothes", "Shapes", "Effects", "Uploads"]>;
|
|
44
|
+
type VideoAnalysisCategory = z.infer<typeof VideoAnalysisCategorySchema>;
|
|
45
|
+
declare const VideoAnalysisSchema: z.ZodObject<{
|
|
46
|
+
title: z.ZodString;
|
|
47
|
+
prompt: z.ZodString;
|
|
48
|
+
category: z.ZodEnum<["Scenes", "Environments", "Things", "Creatures", "People", "Clothes", "Shapes", "Effects", "Uploads"]>;
|
|
49
|
+
fidelity: z.ZodEnum<["outline", "blocked", "shaded", "polished"]>;
|
|
50
|
+
}, "strip", z.ZodTypeAny, {
|
|
51
|
+
prompt: string;
|
|
52
|
+
fidelity: "outline" | "blocked" | "shaded" | "polished";
|
|
53
|
+
title: string;
|
|
54
|
+
category: "Scenes" | "Environments" | "Things" | "Creatures" | "People" | "Clothes" | "Shapes" | "Effects" | "Uploads";
|
|
55
|
+
}, {
|
|
56
|
+
prompt: string;
|
|
57
|
+
fidelity: "outline" | "blocked" | "shaded" | "polished";
|
|
58
|
+
title: string;
|
|
59
|
+
category: "Scenes" | "Environments" | "Things" | "Creatures" | "People" | "Clothes" | "Shapes" | "Effects" | "Uploads";
|
|
60
|
+
}>;
|
|
61
|
+
type VideoAnalysisPayload = z.infer<typeof VideoAnalysisSchema>;
|
|
62
|
+
declare const QueueJobSchema: z.ZodObject<{
|
|
63
|
+
id: z.ZodString;
|
|
64
|
+
type: z.ZodEnum<["text", "image", "video", "analysis"]>;
|
|
65
|
+
status: z.ZodEnum<["queued", "processing", "completed", "failed"]>;
|
|
66
|
+
payload: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodAny>>;
|
|
67
|
+
createdAt: z.ZodOptional<z.ZodAny>;
|
|
68
|
+
updatedAt: z.ZodOptional<z.ZodAny>;
|
|
69
|
+
}, "strip", z.ZodTypeAny, {
|
|
70
|
+
type: "text" | "image" | "video" | "analysis";
|
|
71
|
+
status: "queued" | "processing" | "completed" | "failed";
|
|
72
|
+
id: string;
|
|
73
|
+
payload?: Record<string, any> | undefined;
|
|
74
|
+
createdAt?: any;
|
|
75
|
+
updatedAt?: any;
|
|
76
|
+
}, {
|
|
77
|
+
type: "text" | "image" | "video" | "analysis";
|
|
78
|
+
status: "queued" | "processing" | "completed" | "failed";
|
|
79
|
+
id: string;
|
|
80
|
+
payload?: Record<string, any> | undefined;
|
|
81
|
+
createdAt?: any;
|
|
82
|
+
updatedAt?: any;
|
|
83
|
+
}>;
|
|
84
|
+
type QueueJob = z.infer<typeof QueueJobSchema>;
|
|
85
|
+
|
|
86
|
+
export { type AspectRatio, AspectRatioSchema, type Fidelity, FidelitySchema, type ImageGenerationPayload, ImageGenerationSchema, type ImageTransformationPayload, ImageTransformationSchema, type QueueJob, QueueJobSchema, type VideoAnalysisCategory, VideoAnalysisCategorySchema, type VideoAnalysisPayload, VideoAnalysisSchema, type VideoAspectRatio, VideoAspectRatioSchema };
|
package/package.json
CHANGED
|
@@ -1,17 +1,20 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@pixerate/schemas",
|
|
3
|
-
"version": "1.0.
|
|
3
|
+
"version": "1.0.1",
|
|
4
4
|
"type": "module",
|
|
5
|
-
"main": "./dist/index.
|
|
5
|
+
"main": "./dist/index.cjs",
|
|
6
|
+
"module": "./dist/index.js",
|
|
6
7
|
"types": "./dist/index.d.ts",
|
|
7
8
|
"exports": {
|
|
8
9
|
".": {
|
|
10
|
+
"types": "./dist/index.d.ts",
|
|
9
11
|
"import": "./dist/index.js",
|
|
10
|
-
"
|
|
12
|
+
"require": "./dist/index.cjs"
|
|
11
13
|
}
|
|
12
14
|
},
|
|
13
15
|
"scripts": {
|
|
14
|
-
"build": "tsup src/index.ts --format esm --dts --clean"
|
|
16
|
+
"build": "tsup src/index.ts --format esm,cjs --dts --clean",
|
|
17
|
+
"prepare": "npm run build"
|
|
15
18
|
},
|
|
16
19
|
"repository": {
|
|
17
20
|
"type": "git",
|
|
@@ -36,4 +39,4 @@
|
|
|
36
39
|
"typescript": "^5.4.5",
|
|
37
40
|
"tsup": "^8.0.2"
|
|
38
41
|
}
|
|
39
|
-
}
|
|
42
|
+
}
|