@purpleschool/gptbot-tools 0.0.96 → 0.0.97

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.
@@ -16,6 +16,7 @@ var ImageEditorCommand;
16
16
  imageUrls: zod_1.z.array(zod_1.z.string()),
17
17
  systemPromptId: zod_1.z.string().optional(),
18
18
  }),
19
+ userHasActiveSubscriptionOrProduct: zod_1.z.boolean(),
19
20
  });
20
21
  ImageEditorCommand.ResponseSchema = (0, command_response_schema_1.ICommandResponseSchema)(models_1.ImageEditorJobSchema);
21
22
  })(ImageEditorCommand || (exports.ImageEditorCommand = ImageEditorCommand = {}));
@@ -1,6 +1,6 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.ImageEditorModelSchema = exports.ImageEditorModelParamsSchema = void 0;
3
+ exports.ImageEditorModelSchema = exports.ImageEditorModelPricingRulesSchema = exports.ImageEditorModelPricingRuleConditionSchema = exports.ImageEditorModelParamsSchema = void 0;
4
4
  const zod_1 = require("zod");
5
5
  const common_1 = require("../../common");
6
6
  const enums_1 = require("../enums");
@@ -11,6 +11,13 @@ exports.ImageEditorModelParamsSchema = zod_1.z.object({
11
11
  acceptedTypes: zod_1.z.array(zod_1.z.string()),
12
12
  }),
13
13
  });
14
+ exports.ImageEditorModelPricingRuleConditionSchema = zod_1.z.object({
15
+ withoutSub: zod_1.z.boolean().optional(),
16
+ });
17
+ exports.ImageEditorModelPricingRulesSchema = zod_1.z.array(zod_1.z.object({
18
+ condition: exports.ImageEditorModelPricingRuleConditionSchema,
19
+ value: zod_1.z.number(),
20
+ }));
14
21
  exports.ImageEditorModelSchema = zod_1.z.object({
15
22
  uuid: zod_1.z.string(),
16
23
  title: zod_1.z.string(),
@@ -23,6 +30,7 @@ exports.ImageEditorModelSchema = zod_1.z.object({
23
30
  strategy: zod_1.z.nativeEnum(enums_1.IMAGE_EDITING_STRATEGY),
24
31
  maxInputLength: zod_1.z.number(),
25
32
  params: exports.ImageEditorModelParamsSchema,
33
+ pricingRules: exports.ImageEditorModelPricingRulesSchema,
26
34
  createdAt: zod_1.z.date(),
27
35
  updatedAt: zod_1.z.date(),
28
36
  });
@@ -14,6 +14,7 @@ var ExecuteImageGenerationCommand;
14
14
  modelId: zod_1.z.string().uuid(),
15
15
  params: models_1.ImageGenerationRequestParamsSchema,
16
16
  presetId: zod_1.z.string().uuid().nullable().optional(),
17
+ userHasActiveSubscriptionOrProduct: zod_1.z.boolean(),
17
18
  });
18
19
  ExecuteImageGenerationCommand.ResponseSchema = (0, command_response_schema_1.ICommandResponseSchema)(models_1.ImageGenerationJobSchema);
19
20
  })(ExecuteImageGenerationCommand || (exports.ExecuteImageGenerationCommand = ExecuteImageGenerationCommand = {}));
@@ -23,6 +23,7 @@ exports.ImageGenerationModelParamsSchema = zod_1.z.object({
23
23
  });
24
24
  exports.ImageModelPricingRuleConditionSchema = zod_1.z.object({
25
25
  resolution: zod_1.z.string().optional(),
26
+ withoutSub: zod_1.z.boolean().optional(),
26
27
  });
27
28
  exports.ImageModelPricingRulesSchema = zod_1.z.array(zod_1.z.object({
28
29
  condition: exports.ImageModelPricingRuleConditionSchema,
@@ -13,6 +13,7 @@ export namespace ImageEditorCommand {
13
13
  imageUrls: z.array(z.string()),
14
14
  systemPromptId: z.string().optional(),
15
15
  }),
16
+ userHasActiveSubscriptionOrProduct: z.boolean(),
16
17
  });
17
18
  export type Request = z.infer<typeof RequestSchema>;
18
19
 
@@ -12,6 +12,21 @@ export const ImageEditorModelParamsSchema = z.object({
12
12
 
13
13
  export type ImageEditorModelParams = z.infer<typeof ImageEditorModelParamsSchema>;
14
14
 
15
+ export const ImageEditorModelPricingRuleConditionSchema = z.object({
16
+ withoutSub: z.boolean().optional(),
17
+ });
18
+ export type ImageEditorModelPricingRuleCondition = z.infer<
19
+ typeof ImageEditorModelPricingRuleConditionSchema
20
+ >;
21
+
22
+ export const ImageEditorModelPricingRulesSchema = z.array(
23
+ z.object({
24
+ condition: ImageEditorModelPricingRuleConditionSchema,
25
+ value: z.number(),
26
+ }),
27
+ );
28
+ export type ImageEditorModelPricingRules = z.infer<typeof ImageEditorModelPricingRulesSchema>;
29
+
15
30
  export const ImageEditorModelSchema = z.object({
16
31
  uuid: z.string(),
17
32
  title: z.string(),
@@ -24,6 +39,7 @@ export const ImageEditorModelSchema = z.object({
24
39
  strategy: z.nativeEnum(IMAGE_EDITING_STRATEGY),
25
40
  maxInputLength: z.number(),
26
41
  params: ImageEditorModelParamsSchema,
42
+ pricingRules: ImageEditorModelPricingRulesSchema,
27
43
  createdAt: z.date(),
28
44
  updatedAt: z.date(),
29
45
  });
@@ -11,6 +11,7 @@ export namespace ExecuteImageGenerationCommand {
11
11
  modelId: z.string().uuid(),
12
12
  params: ImageGenerationRequestParamsSchema,
13
13
  presetId: z.string().uuid().nullable().optional(),
14
+ userHasActiveSubscriptionOrProduct: z.boolean(),
14
15
  });
15
16
  export type Request = z.infer<typeof RequestSchema>;
16
17
 
@@ -28,6 +28,7 @@ export type ImageGenerationModelParams = z.infer<typeof ImageGenerationModelPara
28
28
 
29
29
  export const ImageModelPricingRuleConditionSchema = z.object({
30
30
  resolution: z.string().optional(),
31
+ withoutSub: z.boolean().optional(),
31
32
  });
32
33
  export type ImageModelPricingRuleCondition = z.infer<typeof ImageModelPricingRuleConditionSchema>;
33
34
 
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@purpleschool/gptbot-tools",
3
- "version": "0.0.96",
3
+ "version": "0.0.97",
4
4
  "main": "build/index.js",
5
5
  "types": "build/index.d.ts",
6
6
  "scripts": {