@purpleschool/gptbot 0.8.46 → 0.8.48
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/commands/tools/image-editor/retry-image-editor-job.command.js +1 -1
- package/build/constants/subscription/enums/subscription-feature-type.enum.js +1 -0
- package/build/models/subscription-feature.schema.js +8 -1
- package/build/models/tools/common/attached-tool-file.schema.js +13 -0
- package/build/models/tools/common/index.js +17 -0
- package/build/models/tools/image-editor/image-editor-job.schema.js +2 -1
- package/build/models/tools/index.js +1 -0
- package/commands/tools/image-editor/retry-image-editor-job.command.ts +2 -2
- package/constants/subscription/enums/subscription-feature-type.enum.ts +1 -0
- package/models/subscription-feature.schema.ts +9 -0
- package/models/tools/common/attached-tool-file.schema.ts +13 -0
- package/models/tools/common/index.ts +1 -0
- package/models/tools/image-editor/image-editor-job.schema.ts +2 -1
- package/models/tools/index.ts +1 -0
- package/package.json +1 -1
|
@@ -13,7 +13,7 @@ var RetryImageEditorJobCommand;
|
|
|
13
13
|
prompt: zod_1.z.string().optional(),
|
|
14
14
|
params: zod_1.z
|
|
15
15
|
.object({
|
|
16
|
-
|
|
16
|
+
attachedFiles: zod_1.z.array(models_1.AttachedToolFileSchema).default([]),
|
|
17
17
|
systemPromptId: zod_1.z.string().optional(),
|
|
18
18
|
})
|
|
19
19
|
.optional(),
|
|
@@ -25,6 +25,7 @@ var SUBSCRIPTION_FEATURE_TYPE;
|
|
|
25
25
|
SUBSCRIPTION_FEATURE_TYPE["WRITER_QUOTA"] = "writer_quota";
|
|
26
26
|
SUBSCRIPTION_FEATURE_TYPE["WRITER_MODEL_ACCESS"] = "writer_model_access";
|
|
27
27
|
SUBSCRIPTION_FEATURE_TYPE["IMAGE_EDITOR_QUOTA"] = "image_editor_quota";
|
|
28
|
+
SUBSCRIPTION_FEATURE_TYPE["IMAGE_EDITOR_MODEL_ACCESS"] = "image_editor_model_access";
|
|
28
29
|
})(SUBSCRIPTION_FEATURE_TYPE || (exports.SUBSCRIPTION_FEATURE_TYPE = SUBSCRIPTION_FEATURE_TYPE = {}));
|
|
29
30
|
var SUBSCRIPTION_FEATURE_KIND;
|
|
30
31
|
(function (SUBSCRIPTION_FEATURE_KIND) {
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.SubscriptionFeatureSchema = exports.ImageEditorQuotaFeatureSchema = exports.WriterModelAccessFeatureSchema = exports.WriterQuotaFeatureSchema = exports.MusicModelAccessFeatureSchema = exports.MusicQuotaFeatureSchema = exports.PresentationQuotaFeatureSchema = exports.VideoModelAccessFeatureSchema = exports.VideoQuotaFeatureSchema = exports.STTQuotaFeatureSchema = exports.STTModelAccessFeatureSchema = exports.TTSQuotaFeatureSchema = exports.ImageGenerationQuotaFeatureSchema = exports.TtsModelAccessFeatureSchema = exports.AdvancedToolsAccessFeatureSchema = exports.WebSearchFeatureSchema = exports.ExtendedContextFeatureSchema = exports.MaxInputLengthFeatureSchema = exports.RequestsQuotaFeatureSchema = exports.AiModelAccessFeatureSchema = exports.CarryoverBalanceFeatureSchema = exports.TokensFeatureSchema = exports.SubscriptionFeatureBaseSchema = void 0;
|
|
3
|
+
exports.SubscriptionFeatureSchema = exports.ImageEditorModelAccessFeatureSchema = exports.ImageEditorQuotaFeatureSchema = exports.WriterModelAccessFeatureSchema = exports.WriterQuotaFeatureSchema = exports.MusicModelAccessFeatureSchema = exports.MusicQuotaFeatureSchema = exports.PresentationQuotaFeatureSchema = exports.VideoModelAccessFeatureSchema = exports.VideoQuotaFeatureSchema = exports.STTQuotaFeatureSchema = exports.STTModelAccessFeatureSchema = exports.TTSQuotaFeatureSchema = exports.ImageGenerationQuotaFeatureSchema = exports.TtsModelAccessFeatureSchema = exports.AdvancedToolsAccessFeatureSchema = exports.WebSearchFeatureSchema = exports.ExtendedContextFeatureSchema = exports.MaxInputLengthFeatureSchema = exports.RequestsQuotaFeatureSchema = exports.AiModelAccessFeatureSchema = exports.CarryoverBalanceFeatureSchema = exports.TokensFeatureSchema = exports.SubscriptionFeatureBaseSchema = void 0;
|
|
4
4
|
const constants_1 = require("../constants");
|
|
5
5
|
const zod_1 = require("zod");
|
|
6
6
|
exports.SubscriptionFeatureBaseSchema = zod_1.z.object({
|
|
@@ -137,6 +137,12 @@ exports.ImageEditorQuotaFeatureSchema = exports.SubscriptionFeatureBaseSchema.ex
|
|
|
137
137
|
type: zod_1.z.literal(constants_1.SUBSCRIPTION_FEATURE_TYPE.IMAGE_EDITOR_QUOTA),
|
|
138
138
|
value: zod_1.z.number(),
|
|
139
139
|
});
|
|
140
|
+
exports.ImageEditorModelAccessFeatureSchema = exports.SubscriptionFeatureBaseSchema.extend({
|
|
141
|
+
kind: zod_1.z.literal(constants_1.SUBSCRIPTION_FEATURE_KIND.IMAGE_EDITOR),
|
|
142
|
+
type: zod_1.z.literal(constants_1.SUBSCRIPTION_FEATURE_TYPE.IMAGE_EDITOR_MODEL_ACCESS),
|
|
143
|
+
isAvailable: zod_1.z.boolean(),
|
|
144
|
+
modelId: zod_1.z.string(),
|
|
145
|
+
});
|
|
140
146
|
exports.SubscriptionFeatureSchema = zod_1.z.union([
|
|
141
147
|
exports.AiModelAccessFeatureSchema,
|
|
142
148
|
exports.RequestsQuotaFeatureSchema,
|
|
@@ -159,4 +165,5 @@ exports.SubscriptionFeatureSchema = zod_1.z.union([
|
|
|
159
165
|
exports.WriterQuotaFeatureSchema,
|
|
160
166
|
exports.WriterModelAccessFeatureSchema,
|
|
161
167
|
exports.ImageEditorQuotaFeatureSchema,
|
|
168
|
+
exports.ImageEditorModelAccessFeatureSchema,
|
|
162
169
|
]);
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.AttachedToolFileSchema = void 0;
|
|
4
|
+
const zod_1 = require("zod");
|
|
5
|
+
exports.AttachedToolFileSchema = zod_1.z.object({
|
|
6
|
+
uuid: zod_1.z.string(),
|
|
7
|
+
url: zod_1.z.string(),
|
|
8
|
+
name: zod_1.z.string(),
|
|
9
|
+
mimeType: zod_1.z.string(),
|
|
10
|
+
type: zod_1.z.string(),
|
|
11
|
+
size: zod_1.z.number(),
|
|
12
|
+
duration: zod_1.z.number().optional().nullable(),
|
|
13
|
+
});
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
|
|
3
|
+
if (k2 === undefined) k2 = k;
|
|
4
|
+
var desc = Object.getOwnPropertyDescriptor(m, k);
|
|
5
|
+
if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
|
|
6
|
+
desc = { enumerable: true, get: function() { return m[k]; } };
|
|
7
|
+
}
|
|
8
|
+
Object.defineProperty(o, k2, desc);
|
|
9
|
+
}) : (function(o, m, k, k2) {
|
|
10
|
+
if (k2 === undefined) k2 = k;
|
|
11
|
+
o[k2] = m[k];
|
|
12
|
+
}));
|
|
13
|
+
var __exportStar = (this && this.__exportStar) || function(m, exports) {
|
|
14
|
+
for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
|
|
15
|
+
};
|
|
16
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
17
|
+
__exportStar(require("./attached-tool-file.schema"), exports);
|
|
@@ -5,8 +5,9 @@ const zod_1 = require("zod");
|
|
|
5
5
|
const constants_1 = require("../../../constants");
|
|
6
6
|
const tool_job_schema_1 = require("../../tool-job.schema");
|
|
7
7
|
const file_schema_1 = require("../../file.schema");
|
|
8
|
+
const common_1 = require("../common");
|
|
8
9
|
exports.ImageEditorJobParamsSchema = zod_1.z.object({
|
|
9
|
-
|
|
10
|
+
attachedFiles: zod_1.z.array(common_1.AttachedToolFileSchema),
|
|
10
11
|
systemPromptId: zod_1.z.string().optional(),
|
|
11
12
|
});
|
|
12
13
|
exports.ImageEditorJobSchema = tool_job_schema_1.ToolJobSchema.extend({
|
|
@@ -14,6 +14,7 @@ var __exportStar = (this && this.__exportStar) || function(m, exports) {
|
|
|
14
14
|
for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
|
|
15
15
|
};
|
|
16
16
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
17
|
+
__exportStar(require("./common"), exports);
|
|
17
18
|
__exportStar(require("./language"), exports);
|
|
18
19
|
__exportStar(require("./paraphrase"), exports);
|
|
19
20
|
__exportStar(require("./presentation"), exports);
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { z } from 'zod';
|
|
2
|
-
import { ImageEditorJobSchema } from '../../../models';
|
|
2
|
+
import { AttachedToolFileSchema, ImageEditorJobSchema } from '../../../models';
|
|
3
3
|
|
|
4
4
|
export namespace RetryImageEditorJobCommand {
|
|
5
5
|
export const RequestParamsSchema = z.object({
|
|
@@ -12,7 +12,7 @@ export namespace RetryImageEditorJobCommand {
|
|
|
12
12
|
prompt: z.string().optional(),
|
|
13
13
|
params: z
|
|
14
14
|
.object({
|
|
15
|
-
|
|
15
|
+
attachedFiles: z.array(AttachedToolFileSchema).default([]),
|
|
16
16
|
systemPromptId: z.string().optional(),
|
|
17
17
|
})
|
|
18
18
|
.optional(),
|
|
@@ -21,6 +21,7 @@ export enum SUBSCRIPTION_FEATURE_TYPE {
|
|
|
21
21
|
WRITER_QUOTA = 'writer_quota',
|
|
22
22
|
WRITER_MODEL_ACCESS = 'writer_model_access',
|
|
23
23
|
IMAGE_EDITOR_QUOTA = 'image_editor_quota',
|
|
24
|
+
IMAGE_EDITOR_MODEL_ACCESS = 'image_editor_model_access',
|
|
24
25
|
}
|
|
25
26
|
|
|
26
27
|
export enum SUBSCRIPTION_FEATURE_KIND {
|
|
@@ -184,6 +184,14 @@ export const ImageEditorQuotaFeatureSchema = SubscriptionFeatureBaseSchema.exten
|
|
|
184
184
|
});
|
|
185
185
|
export type ImageEditorQuotaFeature = z.infer<typeof ImageEditorQuotaFeatureSchema>;
|
|
186
186
|
|
|
187
|
+
export const ImageEditorModelAccessFeatureSchema = SubscriptionFeatureBaseSchema.extend({
|
|
188
|
+
kind: z.literal(SUBSCRIPTION_FEATURE_KIND.IMAGE_EDITOR),
|
|
189
|
+
type: z.literal(SUBSCRIPTION_FEATURE_TYPE.IMAGE_EDITOR_MODEL_ACCESS),
|
|
190
|
+
isAvailable: z.boolean(),
|
|
191
|
+
modelId: z.string(),
|
|
192
|
+
});
|
|
193
|
+
export type ImageEditorModelAccessFeature = z.infer<typeof ImageEditorModelAccessFeatureSchema>;
|
|
194
|
+
|
|
187
195
|
export const SubscriptionFeatureSchema = z.union([
|
|
188
196
|
AiModelAccessFeatureSchema,
|
|
189
197
|
RequestsQuotaFeatureSchema,
|
|
@@ -206,6 +214,7 @@ export const SubscriptionFeatureSchema = z.union([
|
|
|
206
214
|
WriterQuotaFeatureSchema,
|
|
207
215
|
WriterModelAccessFeatureSchema,
|
|
208
216
|
ImageEditorQuotaFeatureSchema,
|
|
217
|
+
ImageEditorModelAccessFeatureSchema,
|
|
209
218
|
]);
|
|
210
219
|
|
|
211
220
|
export type SubscriptionFeature = z.infer<typeof SubscriptionFeatureSchema>;
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
import { z } from 'zod';
|
|
2
|
+
|
|
3
|
+
export const AttachedToolFileSchema = z.object({
|
|
4
|
+
uuid: z.string(),
|
|
5
|
+
url: z.string(),
|
|
6
|
+
name: z.string(),
|
|
7
|
+
mimeType: z.string(),
|
|
8
|
+
type: z.string(),
|
|
9
|
+
size: z.number(),
|
|
10
|
+
duration: z.number().optional().nullable(),
|
|
11
|
+
});
|
|
12
|
+
|
|
13
|
+
export type AttachedToolFile = z.infer<typeof AttachedToolFileSchema>;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export * from './attached-tool-file.schema';
|
|
@@ -2,9 +2,10 @@ import { z } from 'zod';
|
|
|
2
2
|
import { USER_REACTION } from '../../../constants';
|
|
3
3
|
import { ToolJobSchema } from '../../tool-job.schema';
|
|
4
4
|
import { FileSchema } from '../../file.schema';
|
|
5
|
+
import { AttachedToolFileSchema } from '../common';
|
|
5
6
|
|
|
6
7
|
export const ImageEditorJobParamsSchema = z.object({
|
|
7
|
-
|
|
8
|
+
attachedFiles: z.array(AttachedToolFileSchema),
|
|
8
9
|
systemPromptId: z.string().optional(),
|
|
9
10
|
});
|
|
10
11
|
|
package/models/tools/index.ts
CHANGED