@purpleschool/gptbot-tools 0.0.117 → 0.0.118
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/build/image-generation/commands/execute-image-generation.command.js +2 -0
- package/build/tools/enums/index.js +1 -0
- package/build/tools/enums/job-request-origin.enum.js +8 -0
- package/image-generation/commands/execute-image-generation.command.ts +2 -0
- package/package.json +1 -1
- package/tools/enums/index.ts +1 -0
- package/tools/enums/job-request-origin.enum.ts +4 -0
|
@@ -4,6 +4,7 @@ exports.ExecuteImageGenerationCommand = void 0;
|
|
|
4
4
|
const zod_1 = require("zod");
|
|
5
5
|
const command_response_schema_1 = require("../../common/models/command-response.schema");
|
|
6
6
|
const models_1 = require("../models");
|
|
7
|
+
const tools_1 = require("../../tools");
|
|
7
8
|
var ExecuteImageGenerationCommand;
|
|
8
9
|
(function (ExecuteImageGenerationCommand) {
|
|
9
10
|
ExecuteImageGenerationCommand.RequestSchema = zod_1.z.object({
|
|
@@ -14,6 +15,7 @@ var ExecuteImageGenerationCommand;
|
|
|
14
15
|
modelId: zod_1.z.string().uuid(),
|
|
15
16
|
params: models_1.ImageGenerationRequestParamsSchema,
|
|
16
17
|
presetId: zod_1.z.string().uuid().nullable().optional(),
|
|
18
|
+
origin: zod_1.z.nativeEnum(tools_1.JOB_REQUEST_ORIGIN).default(tools_1.JOB_REQUEST_ORIGIN.API),
|
|
17
19
|
userHasActiveSubscriptionOrProduct: zod_1.z.boolean(),
|
|
18
20
|
});
|
|
19
21
|
ExecuteImageGenerationCommand.ResponseSchema = (0, command_response_schema_1.ICommandResponseSchema)(models_1.ImageGenerationJobSchema);
|
|
@@ -17,3 +17,4 @@ Object.defineProperty(exports, "__esModule", { value: true });
|
|
|
17
17
|
__exportStar(require("./job-status.enum"), exports);
|
|
18
18
|
__exportStar(require("./tool-type.enum"), exports);
|
|
19
19
|
__exportStar(require("./tool-content-type.enum"), exports);
|
|
20
|
+
__exportStar(require("./job-request-origin.enum"), exports);
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.JOB_REQUEST_ORIGIN = void 0;
|
|
4
|
+
var JOB_REQUEST_ORIGIN;
|
|
5
|
+
(function (JOB_REQUEST_ORIGIN) {
|
|
6
|
+
JOB_REQUEST_ORIGIN["API"] = "api";
|
|
7
|
+
JOB_REQUEST_ORIGIN["B2B"] = "b2b";
|
|
8
|
+
})(JOB_REQUEST_ORIGIN || (exports.JOB_REQUEST_ORIGIN = JOB_REQUEST_ORIGIN = {}));
|
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
import { z } from 'zod';
|
|
2
2
|
import { ICommandResponseSchema } from '../../common/models/command-response.schema';
|
|
3
3
|
import { ImageGenerationJobSchema, ImageGenerationRequestParamsSchema } from '../models';
|
|
4
|
+
import { JOB_REQUEST_ORIGIN } from '../../tools';
|
|
4
5
|
|
|
5
6
|
export namespace ExecuteImageGenerationCommand {
|
|
6
7
|
export const RequestSchema = z.object({
|
|
@@ -11,6 +12,7 @@ export namespace ExecuteImageGenerationCommand {
|
|
|
11
12
|
modelId: z.string().uuid(),
|
|
12
13
|
params: ImageGenerationRequestParamsSchema,
|
|
13
14
|
presetId: z.string().uuid().nullable().optional(),
|
|
15
|
+
origin: z.nativeEnum(JOB_REQUEST_ORIGIN).default(JOB_REQUEST_ORIGIN.API),
|
|
14
16
|
userHasActiveSubscriptionOrProduct: z.boolean(),
|
|
15
17
|
});
|
|
16
18
|
export type Request = z.infer<typeof RequestSchema>;
|
package/package.json
CHANGED
package/tools/enums/index.ts
CHANGED