@purpleschool/gptbot 0.9.10 → 0.9.12

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.
@@ -11,6 +11,7 @@ var ImageEditorCommand;
11
11
  params: zod_1.z.object({
12
12
  imageUrls: zod_1.z.array(zod_1.z.string()),
13
13
  systemPromptId: zod_1.z.string().optional(),
14
+ aspectRatio: zod_1.z.string().optional(),
14
15
  }),
15
16
  });
16
17
  ImageEditorCommand.ResponseSchema = zod_1.z.object({
@@ -15,6 +15,7 @@ var RetryImageEditorJobCommand;
15
15
  .object({
16
16
  attachedFiles: zod_1.z.string().array(),
17
17
  systemPromptId: zod_1.z.string().optional(),
18
+ aspectRatio: zod_1.z.string().optional(),
18
19
  })
19
20
  .optional(),
20
21
  });
@@ -19,4 +19,5 @@ var UNIFIED_MODEL_CONTENT_TYPE;
19
19
  UNIFIED_MODEL_CONTENT_TYPE["NONE"] = "NONE";
20
20
  UNIFIED_MODEL_CONTENT_TYPE["IMAGE_GENERATION"] = "IMAGE_GENERATION";
21
21
  UNIFIED_MODEL_CONTENT_TYPE["INTERIOR_DESIGN"] = "INTERIOR_DESIGN";
22
+ UNIFIED_MODEL_CONTENT_TYPE["MARKETPLACE_CARD"] = "MARKETPLACE_CARD";
22
23
  })(UNIFIED_MODEL_CONTENT_TYPE || (exports.UNIFIED_MODEL_CONTENT_TYPE = UNIFIED_MODEL_CONTENT_TYPE = {}));
@@ -10,6 +10,7 @@ exports.ImageEditorJobParamsSchema = zod_1.z.object({
10
10
  attachedFiles: zod_1.z.array(common_1.AttachedToolFileSchema),
11
11
  systemPromptId: zod_1.z.string().optional(),
12
12
  imageUrls: zod_1.z.string().array().optional(),
13
+ aspectRatio: zod_1.z.string().optional(),
13
14
  });
14
15
  exports.ImageEditorJobSchema = tool_job_schema_1.ToolJobSchema.extend({
15
16
  title: zod_1.z.string(),
@@ -10,6 +10,12 @@ exports.ImageEditorModelParamsSchema = zod_1.z.object({
10
10
  maxImages: zod_1.z.number(),
11
11
  acceptedTypes: zod_1.z.array(zod_1.z.string()),
12
12
  }),
13
+ aspectRatio: zod_1.z
14
+ .record(zod_1.z.string(), zod_1.z.object({
15
+ width: zod_1.z.number(),
16
+ height: zod_1.z.number(),
17
+ }))
18
+ .optional(),
13
19
  });
14
20
  exports.ImageEditorModelPricingRuleConditionSchema = zod_1.z.object({
15
21
  withoutSub: zod_1.z.boolean().optional(),
@@ -1,13 +1,30 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.MarketplaceCardConfigSchema = exports.MarketplaceCardStylePresetSchema = void 0;
3
+ exports.MarketplaceCardConfigSchema = exports.MarketplaceCardModelSchema = exports.MarketplaceCardStylePresetSchema = void 0;
4
4
  const zod_1 = require("zod");
5
+ const icon_variants_schema_1 = require("../../icon-variants.schema");
5
6
  exports.MarketplaceCardStylePresetSchema = zod_1.z.object({
6
7
  uuid: zod_1.z.string().uuid(),
7
8
  previewImageUrl: zod_1.z.string(),
8
9
  order: zod_1.z.number(),
9
10
  isActive: zod_1.z.boolean(),
10
11
  });
12
+ exports.MarketplaceCardModelSchema = zod_1.z.object({
13
+ uuid: zod_1.z.string().uuid(),
14
+ price: zod_1.z.number(),
15
+ params: zod_1.z.object({
16
+ imageAttachment: zod_1.z.object({
17
+ supported: zod_1.z.boolean(),
18
+ maxImages: zod_1.z.number(),
19
+ acceptedTypes: zod_1.z.array(zod_1.z.string()),
20
+ }),
21
+ }),
22
+ iconVariants: icon_variants_schema_1.IconVariantsSchema,
23
+ maxPromptLength: zod_1.z.number(),
24
+ supportsImageAttachment: zod_1.z.boolean(),
25
+ maxAttachedImages: zod_1.z.number(),
26
+ });
11
27
  exports.MarketplaceCardConfigSchema = zod_1.z.object({
12
28
  styles: zod_1.z.array(exports.MarketplaceCardStylePresetSchema),
29
+ models: zod_1.z.array(exports.MarketplaceCardModelSchema)
13
30
  });
@@ -1,4 +1,10 @@
1
- import { AiModelSchema, CategorySchema, PageSchema, QuestionSchema, ToolSchema } from '../../models';
1
+ import {
2
+ AiModelSchema,
3
+ CategorySchema,
4
+ PageSchema,
5
+ QuestionSchema,
6
+ ToolSchema,
7
+ } from '../../models';
2
8
  import { PAGE_SORT_BY, PageType, SORT_ORDER } from '../../constants';
3
9
  import { z } from 'zod';
4
10
 
@@ -8,6 +8,7 @@ export namespace ImageEditorCommand {
8
8
  params: z.object({
9
9
  imageUrls: z.array(z.string()),
10
10
  systemPromptId: z.string().optional(),
11
+ aspectRatio: z.string().optional(),
11
12
  }),
12
13
  });
13
14
  export type Request = z.infer<typeof RequestSchema>;
@@ -14,6 +14,7 @@ export namespace RetryImageEditorJobCommand {
14
14
  .object({
15
15
  attachedFiles: z.string().array(),
16
16
  systemPromptId: z.string().optional(),
17
+ aspectRatio: z.string().optional(),
17
18
  })
18
19
  .optional(),
19
20
  });
@@ -15,4 +15,5 @@ export enum UNIFIED_MODEL_CONTENT_TYPE {
15
15
  NONE = 'NONE',
16
16
  IMAGE_GENERATION = 'IMAGE_GENERATION',
17
17
  INTERIOR_DESIGN = 'INTERIOR_DESIGN',
18
+ MARKETPLACE_CARD = 'MARKETPLACE_CARD',
18
19
  }
@@ -8,6 +8,7 @@ export const ImageEditorJobParamsSchema = z.object({
8
8
  attachedFiles: z.array(AttachedToolFileSchema),
9
9
  systemPromptId: z.string().optional(),
10
10
  imageUrls: z.string().array().optional(),
11
+ aspectRatio: z.string().optional(),
11
12
  });
12
13
 
13
14
  export type ImageEditorJobParams = z.infer<typeof ImageEditorJobParamsSchema>;
@@ -8,6 +8,15 @@ export const ImageEditorModelParamsSchema = z.object({
8
8
  maxImages: z.number(),
9
9
  acceptedTypes: z.array(z.string()),
10
10
  }),
11
+ aspectRatio: z
12
+ .record(
13
+ z.string(),
14
+ z.object({
15
+ width: z.number(),
16
+ height: z.number(),
17
+ }),
18
+ )
19
+ .optional(),
11
20
  });
12
21
 
13
22
  export type ImageEditorModelParams = z.infer<typeof ImageEditorModelParamsSchema>;
@@ -1,4 +1,5 @@
1
1
  import { z } from 'zod';
2
+ import { IconVariantsSchema } from '../../icon-variants.schema';
2
3
 
3
4
  export const MarketplaceCardStylePresetSchema = z.object({
4
5
  uuid: z.string().uuid(),
@@ -8,7 +9,25 @@ export const MarketplaceCardStylePresetSchema = z.object({
8
9
  });
9
10
  export type MarketplaceCardStylePreset = z.infer<typeof MarketplaceCardStylePresetSchema>;
10
11
 
12
+ export const MarketplaceCardModelSchema = z.object({
13
+ uuid: z.string().uuid(),
14
+ price: z.number(),
15
+ params: z.object({
16
+ imageAttachment: z.object({
17
+ supported: z.boolean(),
18
+ maxImages: z.number(),
19
+ acceptedTypes: z.array(z.string()),
20
+ }),
21
+ }),
22
+ iconVariants: IconVariantsSchema,
23
+ maxPromptLength: z.number(),
24
+ supportsImageAttachment: z.boolean(),
25
+ maxAttachedImages: z.number(),
26
+ });
27
+ export type MarketplaceCardModel = z.infer<typeof MarketplaceCardModelSchema>;
28
+
11
29
  export const MarketplaceCardConfigSchema = z.object({
12
30
  styles: z.array(MarketplaceCardStylePresetSchema),
31
+ models: z.array(MarketplaceCardModelSchema)
13
32
  });
14
33
  export type MarketplaceCardConfigModel = z.infer<typeof MarketplaceCardConfigSchema>;
@@ -22,4 +22,4 @@ export const MarketplaceCardJobSchema = ToolJobSchema.extend({
22
22
  backgroundDescription: z.string().nullable(),
23
23
  price: z.number(),
24
24
  });
25
- export type MarketplaceCardModel = z.infer<typeof MarketplaceCardJobSchema>;
25
+ export type MarketplaceCardJob = z.infer<typeof MarketplaceCardJobSchema>;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@purpleschool/gptbot",
3
- "version": "0.9.10",
3
+ "version": "0.9.12",
4
4
  "description": "",
5
5
  "main": "build/index.js",
6
6
  "types": "build/index.d.ts",