@purpleschool/gptbot-tools 0.0.103 → 0.0.105
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/models/image-generation-config.schema.js +3 -5
- package/build/image-generation/models/image-generation-model.schema.js +1 -0
- package/build/image-generation/queries/get-image-generation-config.query.js +1 -9
- package/build/presentation/commands/index.js +1 -0
- package/build/presentation/commands/set-reaction-to-presentation.command.js +16 -0
- package/build/presentation/routes/presentation.routes.js +1 -0
- package/image-generation/models/image-generation-config.schema.ts +2 -8
- package/image-generation/models/image-generation-model.schema.ts +1 -0
- package/image-generation/queries/get-image-generation-config.query.ts +1 -11
- package/package.json +1 -1
- package/presentation/commands/index.ts +1 -0
- package/presentation/commands/set-reaction-to-presentation.command.ts +16 -0
- package/presentation/routes/presentation.routes.ts +1 -0
|
@@ -1,14 +1,12 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.ImageGenerationConfigSchema =
|
|
3
|
+
exports.ImageGenerationConfigSchema = void 0;
|
|
4
4
|
const zod_1 = require("zod");
|
|
5
5
|
const image_generation_model_schema_1 = require("./image-generation-model.schema");
|
|
6
6
|
const image_generation_preset_schema_1 = require("./image-generation-preset.schema");
|
|
7
7
|
const ai_vendor_1 = require("../../ai-vendor");
|
|
8
|
-
exports.AiVendorWithImageGenerationModelsSchema = ai_vendor_1.AiVendorSchema.extend({
|
|
9
|
-
models: zod_1.z.array(image_generation_model_schema_1.ImageGenerationModelSchema),
|
|
10
|
-
});
|
|
11
8
|
exports.ImageGenerationConfigSchema = zod_1.z.object({
|
|
12
|
-
vendors: zod_1.z.array(
|
|
9
|
+
vendors: zod_1.z.array(ai_vendor_1.AiVendorSchema),
|
|
10
|
+
models: zod_1.z.array(image_generation_model_schema_1.ImageGenerationModelSchema),
|
|
13
11
|
presets: zod_1.z.array(image_generation_preset_schema_1.ImageGenerationPresetSchema),
|
|
14
12
|
});
|
|
@@ -44,6 +44,7 @@ exports.ImageGenerationModelSchema = zod_1.z.object({
|
|
|
44
44
|
iconVariants: common_1.IconVariantsSchema,
|
|
45
45
|
supportsImageAttachment: zod_1.z.boolean(),
|
|
46
46
|
maxAttachedImages: zod_1.z.number(),
|
|
47
|
+
vendorId: zod_1.z.string().uuid(),
|
|
47
48
|
pricingRules: exports.ImageModelPricingRulesSchema,
|
|
48
49
|
createdAt: zod_1.z.date(),
|
|
49
50
|
updatedAt: zod_1.z.date(),
|
|
@@ -4,16 +4,8 @@ exports.GetImageGenerationConfigQuery = 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 ai_vendor_1 = require("../../ai-vendor");
|
|
8
|
-
const VendorWithModelsSchema = ai_vendor_1.AiVendorSchema.extend({
|
|
9
|
-
models: zod_1.z.array(models_1.ImageGenerationModelSchema),
|
|
10
|
-
});
|
|
11
|
-
const ImageGenerationConfigSchema = zod_1.z.object({
|
|
12
|
-
vendors: zod_1.z.array(VendorWithModelsSchema),
|
|
13
|
-
presets: zod_1.z.array(models_1.ImageGenerationPresetSchema),
|
|
14
|
-
});
|
|
15
7
|
var GetImageGenerationConfigQuery;
|
|
16
8
|
(function (GetImageGenerationConfigQuery) {
|
|
17
9
|
GetImageGenerationConfigQuery.RequestSchema = zod_1.z.object({});
|
|
18
|
-
GetImageGenerationConfigQuery.ResponseSchema = (0, command_response_schema_1.ICommandResponseSchema)(ImageGenerationConfigSchema);
|
|
10
|
+
GetImageGenerationConfigQuery.ResponseSchema = (0, command_response_schema_1.ICommandResponseSchema)(models_1.ImageGenerationConfigSchema);
|
|
19
11
|
})(GetImageGenerationConfigQuery || (exports.GetImageGenerationConfigQuery = GetImageGenerationConfigQuery = {}));
|
|
@@ -32,3 +32,4 @@ __exportStar(require("./update-slide-image-slot.command"), exports);
|
|
|
32
32
|
__exportStar(require("./update-slide.command"), exports);
|
|
33
33
|
__exportStar(require("./presentation-paraphrase.command"), exports);
|
|
34
34
|
__exportStar(require("./presentation-generate-report.command"), exports);
|
|
35
|
+
__exportStar(require("./set-reaction-to-presentation.command"), exports);
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.SetReactionToPresentationCommand = void 0;
|
|
4
|
+
const zod_1 = require("zod");
|
|
5
|
+
const common_1 = require("../../common");
|
|
6
|
+
const models_1 = require("../models");
|
|
7
|
+
var SetReactionToPresentationCommand;
|
|
8
|
+
(function (SetReactionToPresentationCommand) {
|
|
9
|
+
SetReactionToPresentationCommand.RequestSchema = zod_1.z.object({
|
|
10
|
+
userId: zod_1.z.string().uuid().nullable().optional(),
|
|
11
|
+
unregisteredUserId: zod_1.z.string().uuid().nullable().optional(),
|
|
12
|
+
uuid: zod_1.z.string(),
|
|
13
|
+
reaction: zod_1.z.nativeEnum(common_1.USER_REACTION).nullable(),
|
|
14
|
+
});
|
|
15
|
+
SetReactionToPresentationCommand.ResponseSchema = (0, common_1.ICommandResponseSchema)(models_1.PresentationSchema);
|
|
16
|
+
})(SetReactionToPresentationCommand || (exports.SetReactionToPresentationCommand = SetReactionToPresentationCommand = {}));
|
|
@@ -21,6 +21,7 @@ exports.PRESENTATION_AMQP_ROUTES = {
|
|
|
21
21
|
UPDATE_SLIDE: 'tools.presentation.update-slide.rpc',
|
|
22
22
|
PARAPHRASE: 'tools.presentation.actions.paraphrase.rpc',
|
|
23
23
|
GENERATE_REPORT: 'tools.presentation.actions.generate-report.rpc',
|
|
24
|
+
SET_REACTION: 'tools.presentation.set-reaction.rpc',
|
|
24
25
|
};
|
|
25
26
|
exports.PRESENTATION_SLIDE_OUTLINE_AMQP_ROUTES = {
|
|
26
27
|
REPOSITION: 'tools.presentation.slide-outline.reposition-slide-outline.rpc',
|
|
@@ -3,15 +3,9 @@ import { ImageGenerationModelSchema } from './image-generation-model.schema';
|
|
|
3
3
|
import { ImageGenerationPresetSchema } from './image-generation-preset.schema';
|
|
4
4
|
import { AiVendorSchema } from '../../ai-vendor';
|
|
5
5
|
|
|
6
|
-
export const AiVendorWithImageGenerationModelsSchema = AiVendorSchema.extend({
|
|
7
|
-
models: z.array(ImageGenerationModelSchema),
|
|
8
|
-
});
|
|
9
|
-
export type AiVendorWithImageGenerationModels = z.infer<
|
|
10
|
-
typeof AiVendorWithImageGenerationModelsSchema
|
|
11
|
-
>;
|
|
12
|
-
|
|
13
6
|
export const ImageGenerationConfigSchema = z.object({
|
|
14
|
-
vendors: z.array(
|
|
7
|
+
vendors: z.array(AiVendorSchema),
|
|
8
|
+
models: z.array(ImageGenerationModelSchema),
|
|
15
9
|
presets: z.array(ImageGenerationPresetSchema),
|
|
16
10
|
});
|
|
17
11
|
export type ImageGenerationConfig = z.infer<typeof ImageGenerationConfigSchema>;
|
|
@@ -55,6 +55,7 @@ export const ImageGenerationModelSchema = z.object({
|
|
|
55
55
|
iconVariants: IconVariantsSchema,
|
|
56
56
|
supportsImageAttachment: z.boolean(),
|
|
57
57
|
maxAttachedImages: z.number(),
|
|
58
|
+
vendorId: z.string().uuid(),
|
|
58
59
|
pricingRules: ImageModelPricingRulesSchema,
|
|
59
60
|
createdAt: z.date(),
|
|
60
61
|
updatedAt: z.date(),
|
|
@@ -1,16 +1,6 @@
|
|
|
1
1
|
import { z } from 'zod';
|
|
2
2
|
import { ICommandResponseSchema } from '../../common/models/command-response.schema';
|
|
3
|
-
import {
|
|
4
|
-
import { AiVendorSchema } from '../../ai-vendor';
|
|
5
|
-
|
|
6
|
-
const VendorWithModelsSchema = AiVendorSchema.extend({
|
|
7
|
-
models: z.array(ImageGenerationModelSchema),
|
|
8
|
-
});
|
|
9
|
-
|
|
10
|
-
const ImageGenerationConfigSchema = z.object({
|
|
11
|
-
vendors: z.array(VendorWithModelsSchema),
|
|
12
|
-
presets: z.array(ImageGenerationPresetSchema),
|
|
13
|
-
});
|
|
3
|
+
import { ImageGenerationConfigSchema } from '../models';
|
|
14
4
|
|
|
15
5
|
export namespace GetImageGenerationConfigQuery {
|
|
16
6
|
export const RequestSchema = z.object({});
|
package/package.json
CHANGED
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
import { z } from 'zod';
|
|
2
|
+
import { ICommandResponseSchema, USER_REACTION } from '../../common';
|
|
3
|
+
import { PresentationSchema } from '../models';
|
|
4
|
+
|
|
5
|
+
export namespace SetReactionToPresentationCommand {
|
|
6
|
+
export const RequestSchema = z.object({
|
|
7
|
+
userId: z.string().uuid().nullable().optional(),
|
|
8
|
+
unregisteredUserId: z.string().uuid().nullable().optional(),
|
|
9
|
+
uuid: z.string(),
|
|
10
|
+
reaction: z.nativeEnum(USER_REACTION).nullable(),
|
|
11
|
+
});
|
|
12
|
+
export type Request = z.infer<typeof RequestSchema>;
|
|
13
|
+
|
|
14
|
+
export const ResponseSchema = ICommandResponseSchema(PresentationSchema);
|
|
15
|
+
export type Response = z.infer<typeof ResponseSchema>;
|
|
16
|
+
}
|
|
@@ -18,6 +18,7 @@ export const PRESENTATION_AMQP_ROUTES = {
|
|
|
18
18
|
UPDATE_SLIDE: 'tools.presentation.update-slide.rpc',
|
|
19
19
|
PARAPHRASE: 'tools.presentation.actions.paraphrase.rpc',
|
|
20
20
|
GENERATE_REPORT: 'tools.presentation.actions.generate-report.rpc',
|
|
21
|
+
SET_REACTION: 'tools.presentation.set-reaction.rpc',
|
|
21
22
|
} as const;
|
|
22
23
|
|
|
23
24
|
export const PRESENTATION_SLIDE_OUTLINE_AMQP_ROUTES = {
|