@purpleschool/gptbot 0.7.94-ai-proxy → 0.7.95
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/api/controllers/http/ai-model.ts +1 -0
- package/api/controllers/http/page.ts +1 -0
- package/build/api/controllers/http/ai-model.js +1 -0
- package/build/api/controllers/http/page.js +1 -0
- package/build/commands/ai-model/find-formatted-ai-model-v2.command.js +22 -0
- package/build/commands/ai-model/find-model-pages.command.js +31 -0
- package/build/commands/ai-model/index.js +2 -0
- package/build/constants/errors/errors.js +10 -0
- package/build/constants/model/enums/index.js +17 -0
- package/build/constants/model/enums/unified-model-content-type.enum.js +20 -0
- package/build/constants/model/index.js +17 -0
- package/build/constants/subscription/enums/subscription-feature-type.enum.js +3 -0
- package/build/constants/tool/enums/index.js +1 -0
- package/build/constants/tool/enums/tool-content-type.enum.js +16 -0
- package/build/models/page.schema.js +1 -0
- package/build/models/subscription-feature.schema.js +14 -1
- package/commands/ai-model/find-formatted-ai-model-v2.command.ts +22 -0
- package/commands/ai-model/find-model-pages.command.ts +34 -0
- package/commands/ai-model/index.ts +2 -0
- package/constants/errors/errors.ts +10 -0
- package/constants/model/enums/index.ts +1 -0
- package/constants/model/enums/unified-model-content-type.enum.ts +16 -0
- package/constants/model/index.ts +1 -0
- package/constants/subscription/enums/subscription-feature-type.enum.ts +3 -0
- package/constants/tool/enums/index.ts +1 -0
- package/constants/tool/enums/tool-content-type.enum.ts +12 -0
- package/models/page.schema.ts +1 -0
- package/models/subscription-feature.schema.ts +17 -0
- package/package.json +1 -1
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.FindFormattedAIModelV2Command = void 0;
|
|
4
|
+
const zod_1 = require("zod");
|
|
5
|
+
const unified_model_content_type_enum_1 = require("../../constants/model/enums/unified-model-content-type.enum");
|
|
6
|
+
const icon_variants_schema_1 = require("../../models/icon-variants.schema");
|
|
7
|
+
const FormattedModelSchema = zod_1.z.object({
|
|
8
|
+
uuid: zod_1.z.string().uuid(),
|
|
9
|
+
title: zod_1.z.string(),
|
|
10
|
+
description: zod_1.z.string().nullable(),
|
|
11
|
+
contentType: zod_1.z.nativeEnum(unified_model_content_type_enum_1.UNIFIED_MODEL_CONTENT_TYPE),
|
|
12
|
+
order: zod_1.z.number(),
|
|
13
|
+
icons: icon_variants_schema_1.IconVariantsSchema,
|
|
14
|
+
pageAlias: zod_1.z.string().nullable().optional(),
|
|
15
|
+
isToolModel: zod_1.z.boolean(),
|
|
16
|
+
});
|
|
17
|
+
var FindFormattedAIModelV2Command;
|
|
18
|
+
(function (FindFormattedAIModelV2Command) {
|
|
19
|
+
FindFormattedAIModelV2Command.ResponseSchema = zod_1.z.object({
|
|
20
|
+
data: zod_1.z.array(FormattedModelSchema),
|
|
21
|
+
});
|
|
22
|
+
})(FindFormattedAIModelV2Command || (exports.FindFormattedAIModelV2Command = FindFormattedAIModelV2Command = {}));
|
|
@@ -0,0 +1,31 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.FindModelPagesCommand = exports.PageWithModelSchema = void 0;
|
|
4
|
+
const zod_1 = require("zod");
|
|
5
|
+
const icon_variants_schema_1 = require("../../models/icon-variants.schema");
|
|
6
|
+
const unified_model_content_type_enum_1 = require("../../constants/model/enums/unified-model-content-type.enum");
|
|
7
|
+
const ModelSchema = zod_1.z.object({
|
|
8
|
+
uuid: zod_1.z.string().uuid(),
|
|
9
|
+
title: zod_1.z.string(),
|
|
10
|
+
description: zod_1.z.string().nullable(),
|
|
11
|
+
contentType: zod_1.z.nativeEnum(unified_model_content_type_enum_1.UNIFIED_MODEL_CONTENT_TYPE),
|
|
12
|
+
order: zod_1.z.number(),
|
|
13
|
+
icons: icon_variants_schema_1.IconVariantsSchema,
|
|
14
|
+
});
|
|
15
|
+
exports.PageWithModelSchema = zod_1.z.object({
|
|
16
|
+
uuid: zod_1.z.string().uuid(),
|
|
17
|
+
title: zod_1.z.string(),
|
|
18
|
+
alias: zod_1.z.string(),
|
|
19
|
+
type: zod_1.z.string(),
|
|
20
|
+
toolId: zod_1.z.string().uuid().nullable(),
|
|
21
|
+
toolModelId: zod_1.z.string().uuid().nullable(),
|
|
22
|
+
toolOptionId: zod_1.z.string().uuid().nullable(),
|
|
23
|
+
aIModelId: zod_1.z.string().uuid().nullable(),
|
|
24
|
+
model: ModelSchema,
|
|
25
|
+
});
|
|
26
|
+
var FindModelPagesCommand;
|
|
27
|
+
(function (FindModelPagesCommand) {
|
|
28
|
+
FindModelPagesCommand.ResponseSchema = zod_1.z.object({
|
|
29
|
+
data: zod_1.z.array(exports.PageWithModelSchema),
|
|
30
|
+
});
|
|
31
|
+
})(FindModelPagesCommand || (exports.FindModelPagesCommand = FindModelPagesCommand = {}));
|
|
@@ -19,4 +19,6 @@ __exportStar(require("./delete-ai-model.command"), exports);
|
|
|
19
19
|
__exportStar(require("./find-ai-model.command"), exports);
|
|
20
20
|
__exportStar(require("./find-ai-models-available-to-user.comand"), exports);
|
|
21
21
|
__exportStar(require("./find-formatted-ai-model.command"), exports);
|
|
22
|
+
__exportStar(require("./find-formatted-ai-model-v2.command"), exports);
|
|
23
|
+
__exportStar(require("./find-model-pages.command"), exports);
|
|
22
24
|
__exportStar(require("./update-ai-model.command"), exports);
|
|
@@ -2346,4 +2346,14 @@ exports.ERRORS = {
|
|
|
2346
2346
|
message: 'Ошибка при получении сводки записей о переходе по ссылке вебмастера',
|
|
2347
2347
|
httpCode: 409,
|
|
2348
2348
|
},
|
|
2349
|
+
TOOL_GET_GLOBAL_CONFIG_ERROR: {
|
|
2350
|
+
code: 'A480',
|
|
2351
|
+
message: 'Ошибка при получении глобальной конфигурации инструментов',
|
|
2352
|
+
httpCode: 500,
|
|
2353
|
+
},
|
|
2354
|
+
TOOL_GET_TOOLS_WITH_CONFIGS_ERROR: {
|
|
2355
|
+
code: 'A481',
|
|
2356
|
+
message: 'Ошибка при получении инструментов с конфигурациями',
|
|
2357
|
+
httpCode: 500,
|
|
2358
|
+
},
|
|
2349
2359
|
};
|
|
@@ -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("./unified-model-content-type.enum"), exports);
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.UNIFIED_MODEL_CONTENT_TYPE = void 0;
|
|
4
|
+
var UNIFIED_MODEL_CONTENT_TYPE;
|
|
5
|
+
(function (UNIFIED_MODEL_CONTENT_TYPE) {
|
|
6
|
+
// AI Model types
|
|
7
|
+
UNIFIED_MODEL_CONTENT_TYPE["TEXT"] = "TEXT";
|
|
8
|
+
UNIFIED_MODEL_CONTENT_TYPE["IMAGE"] = "IMAGE";
|
|
9
|
+
// Tool types
|
|
10
|
+
UNIFIED_MODEL_CONTENT_TYPE["IMAGE_EDITOR"] = "IMAGE_EDITOR";
|
|
11
|
+
UNIFIED_MODEL_CONTENT_TYPE["TEXT_TO_SPEECH"] = "TEXT_TO_SPEECH";
|
|
12
|
+
UNIFIED_MODEL_CONTENT_TYPE["SPEECH_TO_TEXT"] = "SPEECH_TO_TEXT";
|
|
13
|
+
UNIFIED_MODEL_CONTENT_TYPE["REPHRASE"] = "REPHRASE";
|
|
14
|
+
UNIFIED_MODEL_CONTENT_TYPE["VIDEO"] = "VIDEO";
|
|
15
|
+
UNIFIED_MODEL_CONTENT_TYPE["PRESENTATION"] = "PRESENTATION";
|
|
16
|
+
UNIFIED_MODEL_CONTENT_TYPE["WRITER"] = "WRITER";
|
|
17
|
+
UNIFIED_MODEL_CONTENT_TYPE["VIDEO_EDITOR"] = "VIDEO_EDITOR";
|
|
18
|
+
UNIFIED_MODEL_CONTENT_TYPE["MUSIC"] = "MUSIC";
|
|
19
|
+
UNIFIED_MODEL_CONTENT_TYPE["NONE"] = "NONE";
|
|
20
|
+
})(UNIFIED_MODEL_CONTENT_TYPE || (exports.UNIFIED_MODEL_CONTENT_TYPE = UNIFIED_MODEL_CONTENT_TYPE = {}));
|
|
@@ -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("./enums"), exports);
|
|
@@ -22,6 +22,8 @@ var SUBSCRIPTION_FEATURE_TYPE;
|
|
|
22
22
|
SUBSCRIPTION_FEATURE_TYPE["CARRYOVER_BALANCE"] = "carryover_balance";
|
|
23
23
|
SUBSCRIPTION_FEATURE_TYPE["MUSIC_MODEL_ACCESS"] = "music_model_access";
|
|
24
24
|
SUBSCRIPTION_FEATURE_TYPE["MUSIC_QUOTA"] = "music_quota";
|
|
25
|
+
SUBSCRIPTION_FEATURE_TYPE["WRITER_QUOTA"] = "writer_quota";
|
|
26
|
+
SUBSCRIPTION_FEATURE_TYPE["WRITER_MODEL_ACCESS"] = "writer_model_access";
|
|
25
27
|
})(SUBSCRIPTION_FEATURE_TYPE || (exports.SUBSCRIPTION_FEATURE_TYPE = SUBSCRIPTION_FEATURE_TYPE = {}));
|
|
26
28
|
var SUBSCRIPTION_FEATURE_KIND;
|
|
27
29
|
(function (SUBSCRIPTION_FEATURE_KIND) {
|
|
@@ -35,4 +37,5 @@ var SUBSCRIPTION_FEATURE_KIND;
|
|
|
35
37
|
SUBSCRIPTION_FEATURE_KIND["PRESENTATION"] = "presentation";
|
|
36
38
|
SUBSCRIPTION_FEATURE_KIND["BASE"] = "base";
|
|
37
39
|
SUBSCRIPTION_FEATURE_KIND["MUSIC"] = "music";
|
|
40
|
+
SUBSCRIPTION_FEATURE_KIND["WRITER"] = "writer";
|
|
38
41
|
})(SUBSCRIPTION_FEATURE_KIND || (exports.SUBSCRIPTION_FEATURE_KIND = SUBSCRIPTION_FEATURE_KIND = {}));
|
|
@@ -14,5 +14,6 @@ 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("./tool-content-type.enum"), exports);
|
|
17
18
|
__exportStar(require("./tool-job-status.enum"), exports);
|
|
18
19
|
__exportStar(require("./tool-type.enum"), exports);
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.TOOL_CONTENT_TYPE = void 0;
|
|
4
|
+
var TOOL_CONTENT_TYPE;
|
|
5
|
+
(function (TOOL_CONTENT_TYPE) {
|
|
6
|
+
TOOL_CONTENT_TYPE["IMAGE_EDITOR"] = "IMAGE_EDITOR";
|
|
7
|
+
TOOL_CONTENT_TYPE["TEXT_TO_SPEECH"] = "TEXT_TO_SPEECH";
|
|
8
|
+
TOOL_CONTENT_TYPE["SPEECH_TO_TEXT"] = "SPEECH_TO_TEXT";
|
|
9
|
+
TOOL_CONTENT_TYPE["REPHRASE"] = "REPHRASE";
|
|
10
|
+
TOOL_CONTENT_TYPE["VIDEO"] = "VIDEO";
|
|
11
|
+
TOOL_CONTENT_TYPE["PRESENTATION"] = "PRESENTATION";
|
|
12
|
+
TOOL_CONTENT_TYPE["WRITER"] = "WRITER";
|
|
13
|
+
TOOL_CONTENT_TYPE["VIDEO_EDITOR"] = "VIDEO_EDITOR";
|
|
14
|
+
TOOL_CONTENT_TYPE["MUSIC"] = "MUSIC";
|
|
15
|
+
TOOL_CONTENT_TYPE["NONE"] = "NONE";
|
|
16
|
+
})(TOOL_CONTENT_TYPE || (exports.TOOL_CONTENT_TYPE = TOOL_CONTENT_TYPE = {}));
|
|
@@ -15,6 +15,7 @@ exports.PageSchema = zod_1.z.object({
|
|
|
15
15
|
aIModelId: zod_1.z.string().uuid().nullable().optional(),
|
|
16
16
|
toolId: zod_1.z.string().uuid().nullable().optional(),
|
|
17
17
|
toolOptionId: zod_1.z.string().uuid().nullable().optional(),
|
|
18
|
+
toolModelId: zod_1.z.string().uuid().nullable().optional(),
|
|
18
19
|
toolTitle: zod_1.z.string().nullable(),
|
|
19
20
|
type: zod_1.z.nativeEnum(constants_1.PageType),
|
|
20
21
|
createdAt: zod_1.z.date(),
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.SubscriptionFeatureSchema = 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.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({
|
|
@@ -121,6 +121,17 @@ exports.MusicModelAccessFeatureSchema = exports.SubscriptionFeatureBaseSchema.ex
|
|
|
121
121
|
isAvailable: zod_1.z.boolean(),
|
|
122
122
|
modelId: zod_1.z.string(),
|
|
123
123
|
});
|
|
124
|
+
exports.WriterQuotaFeatureSchema = exports.SubscriptionFeatureBaseSchema.extend({
|
|
125
|
+
kind: zod_1.z.literal(constants_1.SUBSCRIPTION_FEATURE_KIND.WRITER),
|
|
126
|
+
type: zod_1.z.literal(constants_1.SUBSCRIPTION_FEATURE_TYPE.WRITER_QUOTA),
|
|
127
|
+
value: zod_1.z.number(),
|
|
128
|
+
});
|
|
129
|
+
exports.WriterModelAccessFeatureSchema = exports.SubscriptionFeatureBaseSchema.extend({
|
|
130
|
+
kind: zod_1.z.literal(constants_1.SUBSCRIPTION_FEATURE_KIND.WRITER),
|
|
131
|
+
type: zod_1.z.literal(constants_1.SUBSCRIPTION_FEATURE_TYPE.WRITER_MODEL_ACCESS),
|
|
132
|
+
isAvailable: zod_1.z.boolean(),
|
|
133
|
+
modelId: zod_1.z.string(),
|
|
134
|
+
});
|
|
124
135
|
exports.SubscriptionFeatureSchema = zod_1.z.union([
|
|
125
136
|
exports.AiModelAccessFeatureSchema,
|
|
126
137
|
exports.RequestsQuotaFeatureSchema,
|
|
@@ -140,4 +151,6 @@ exports.SubscriptionFeatureSchema = zod_1.z.union([
|
|
|
140
151
|
exports.CarryoverBalanceFeatureSchema,
|
|
141
152
|
exports.MusicQuotaFeatureSchema,
|
|
142
153
|
exports.MusicModelAccessFeatureSchema,
|
|
154
|
+
exports.WriterQuotaFeatureSchema,
|
|
155
|
+
exports.WriterModelAccessFeatureSchema,
|
|
143
156
|
]);
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
import { z } from 'zod';
|
|
2
|
+
import { UNIFIED_MODEL_CONTENT_TYPE } from '../../constants/model/enums/unified-model-content-type.enum';
|
|
3
|
+
import { IconVariantsSchema } from '../../models/icon-variants.schema';
|
|
4
|
+
|
|
5
|
+
const FormattedModelSchema = z.object({
|
|
6
|
+
uuid: z.string().uuid(),
|
|
7
|
+
title: z.string(),
|
|
8
|
+
description: z.string().nullable(),
|
|
9
|
+
contentType: z.nativeEnum(UNIFIED_MODEL_CONTENT_TYPE),
|
|
10
|
+
order: z.number(),
|
|
11
|
+
icons: IconVariantsSchema,
|
|
12
|
+
pageAlias: z.string().nullable().optional(),
|
|
13
|
+
isToolModel: z.boolean(),
|
|
14
|
+
});
|
|
15
|
+
|
|
16
|
+
export namespace FindFormattedAIModelV2Command {
|
|
17
|
+
export const ResponseSchema = z.object({
|
|
18
|
+
data: z.array(FormattedModelSchema),
|
|
19
|
+
});
|
|
20
|
+
|
|
21
|
+
export type Response = z.infer<typeof ResponseSchema>;
|
|
22
|
+
}
|
|
@@ -0,0 +1,34 @@
|
|
|
1
|
+
import { z } from 'zod';
|
|
2
|
+
import { IconVariantsSchema } from '../../models/icon-variants.schema';
|
|
3
|
+
import { UNIFIED_MODEL_CONTENT_TYPE } from '../../constants/model/enums/unified-model-content-type.enum';
|
|
4
|
+
|
|
5
|
+
const ModelSchema = z.object({
|
|
6
|
+
uuid: z.string().uuid(),
|
|
7
|
+
title: z.string(),
|
|
8
|
+
description: z.string().nullable(),
|
|
9
|
+
contentType: z.nativeEnum(UNIFIED_MODEL_CONTENT_TYPE),
|
|
10
|
+
order: z.number(),
|
|
11
|
+
icons: IconVariantsSchema,
|
|
12
|
+
});
|
|
13
|
+
|
|
14
|
+
export const PageWithModelSchema = z.object({
|
|
15
|
+
uuid: z.string().uuid(),
|
|
16
|
+
title: z.string(),
|
|
17
|
+
alias: z.string(),
|
|
18
|
+
type: z.string(),
|
|
19
|
+
toolId: z.string().uuid().nullable(),
|
|
20
|
+
toolModelId: z.string().uuid().nullable(),
|
|
21
|
+
toolOptionId: z.string().uuid().nullable(),
|
|
22
|
+
aIModelId: z.string().uuid().nullable(),
|
|
23
|
+
model: ModelSchema,
|
|
24
|
+
});
|
|
25
|
+
|
|
26
|
+
export type PageWithModel = z.infer<typeof PageWithModelSchema>;
|
|
27
|
+
|
|
28
|
+
export namespace FindModelPagesCommand {
|
|
29
|
+
export const ResponseSchema = z.object({
|
|
30
|
+
data: z.array(PageWithModelSchema),
|
|
31
|
+
});
|
|
32
|
+
|
|
33
|
+
export type Response = z.infer<typeof ResponseSchema>;
|
|
34
|
+
}
|
|
@@ -3,4 +3,6 @@ export * from './delete-ai-model.command';
|
|
|
3
3
|
export * from './find-ai-model.command';
|
|
4
4
|
export * from './find-ai-models-available-to-user.comand';
|
|
5
5
|
export * from './find-formatted-ai-model.command';
|
|
6
|
+
export * from './find-formatted-ai-model-v2.command';
|
|
7
|
+
export * from './find-model-pages.command';
|
|
6
8
|
export * from './update-ai-model.command';
|
|
@@ -2354,4 +2354,14 @@ export const ERRORS = {
|
|
|
2354
2354
|
message: 'Ошибка при получении сводки записей о переходе по ссылке вебмастера',
|
|
2355
2355
|
httpCode: 409,
|
|
2356
2356
|
},
|
|
2357
|
+
TOOL_GET_GLOBAL_CONFIG_ERROR: {
|
|
2358
|
+
code: 'A480',
|
|
2359
|
+
message: 'Ошибка при получении глобальной конфигурации инструментов',
|
|
2360
|
+
httpCode: 500,
|
|
2361
|
+
},
|
|
2362
|
+
TOOL_GET_TOOLS_WITH_CONFIGS_ERROR: {
|
|
2363
|
+
code: 'A481',
|
|
2364
|
+
message: 'Ошибка при получении инструментов с конфигурациями',
|
|
2365
|
+
httpCode: 500,
|
|
2366
|
+
},
|
|
2357
2367
|
};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export * from './unified-model-content-type.enum';
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
export enum UNIFIED_MODEL_CONTENT_TYPE {
|
|
2
|
+
// AI Model types
|
|
3
|
+
TEXT = 'TEXT',
|
|
4
|
+
IMAGE = 'IMAGE',
|
|
5
|
+
// Tool types
|
|
6
|
+
IMAGE_EDITOR = 'IMAGE_EDITOR',
|
|
7
|
+
TEXT_TO_SPEECH = 'TEXT_TO_SPEECH',
|
|
8
|
+
SPEECH_TO_TEXT = 'SPEECH_TO_TEXT',
|
|
9
|
+
REPHRASE = 'REPHRASE',
|
|
10
|
+
VIDEO = 'VIDEO',
|
|
11
|
+
PRESENTATION = 'PRESENTATION',
|
|
12
|
+
WRITER = 'WRITER',
|
|
13
|
+
VIDEO_EDITOR = 'VIDEO_EDITOR',
|
|
14
|
+
MUSIC = 'MUSIC',
|
|
15
|
+
NONE = 'NONE',
|
|
16
|
+
}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export * from './enums';
|
|
@@ -18,6 +18,8 @@ export enum SUBSCRIPTION_FEATURE_TYPE {
|
|
|
18
18
|
CARRYOVER_BALANCE = 'carryover_balance',
|
|
19
19
|
MUSIC_MODEL_ACCESS = 'music_model_access',
|
|
20
20
|
MUSIC_QUOTA = 'music_quota',
|
|
21
|
+
WRITER_QUOTA = 'writer_quota',
|
|
22
|
+
WRITER_MODEL_ACCESS = 'writer_model_access',
|
|
21
23
|
}
|
|
22
24
|
|
|
23
25
|
export enum SUBSCRIPTION_FEATURE_KIND {
|
|
@@ -31,4 +33,5 @@ export enum SUBSCRIPTION_FEATURE_KIND {
|
|
|
31
33
|
PRESENTATION = 'presentation',
|
|
32
34
|
BASE = 'base',
|
|
33
35
|
MUSIC = 'music',
|
|
36
|
+
WRITER = 'writer',
|
|
34
37
|
}
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
export enum TOOL_CONTENT_TYPE {
|
|
2
|
+
IMAGE_EDITOR = 'IMAGE_EDITOR',
|
|
3
|
+
TEXT_TO_SPEECH = 'TEXT_TO_SPEECH',
|
|
4
|
+
SPEECH_TO_TEXT = 'SPEECH_TO_TEXT',
|
|
5
|
+
REPHRASE = 'REPHRASE',
|
|
6
|
+
VIDEO = 'VIDEO',
|
|
7
|
+
PRESENTATION = 'PRESENTATION',
|
|
8
|
+
WRITER = 'WRITER',
|
|
9
|
+
VIDEO_EDITOR = 'VIDEO_EDITOR',
|
|
10
|
+
MUSIC = 'MUSIC',
|
|
11
|
+
NONE = 'NONE',
|
|
12
|
+
}
|
package/models/page.schema.ts
CHANGED
|
@@ -13,6 +13,7 @@ export const PageSchema = z.object({
|
|
|
13
13
|
aIModelId: z.string().uuid().nullable().optional(),
|
|
14
14
|
toolId: z.string().uuid().nullable().optional(),
|
|
15
15
|
toolOptionId: z.string().uuid().nullable().optional(),
|
|
16
|
+
toolModelId: z.string().uuid().nullable().optional(),
|
|
16
17
|
toolTitle: z.string().nullable(),
|
|
17
18
|
type: z.nativeEnum(PageType),
|
|
18
19
|
|
|
@@ -162,6 +162,21 @@ export const MusicModelAccessFeatureSchema = SubscriptionFeatureBaseSchema.exten
|
|
|
162
162
|
});
|
|
163
163
|
export type MusicModelAccessFeature = z.infer<typeof MusicModelAccessFeatureSchema>;
|
|
164
164
|
|
|
165
|
+
export const WriterQuotaFeatureSchema = SubscriptionFeatureBaseSchema.extend({
|
|
166
|
+
kind: z.literal(SUBSCRIPTION_FEATURE_KIND.WRITER),
|
|
167
|
+
type: z.literal(SUBSCRIPTION_FEATURE_TYPE.WRITER_QUOTA),
|
|
168
|
+
value: z.number(),
|
|
169
|
+
});
|
|
170
|
+
export type WriterQuotaFeature = z.infer<typeof WriterQuotaFeatureSchema>;
|
|
171
|
+
|
|
172
|
+
export const WriterModelAccessFeatureSchema = SubscriptionFeatureBaseSchema.extend({
|
|
173
|
+
kind: z.literal(SUBSCRIPTION_FEATURE_KIND.WRITER),
|
|
174
|
+
type: z.literal(SUBSCRIPTION_FEATURE_TYPE.WRITER_MODEL_ACCESS),
|
|
175
|
+
isAvailable: z.boolean(),
|
|
176
|
+
modelId: z.string(),
|
|
177
|
+
});
|
|
178
|
+
export type WriterModelAccessFeature = z.infer<typeof WriterModelAccessFeatureSchema>;
|
|
179
|
+
|
|
165
180
|
export const SubscriptionFeatureSchema = z.union([
|
|
166
181
|
AiModelAccessFeatureSchema,
|
|
167
182
|
RequestsQuotaFeatureSchema,
|
|
@@ -181,6 +196,8 @@ export const SubscriptionFeatureSchema = z.union([
|
|
|
181
196
|
CarryoverBalanceFeatureSchema,
|
|
182
197
|
MusicQuotaFeatureSchema,
|
|
183
198
|
MusicModelAccessFeatureSchema,
|
|
199
|
+
WriterQuotaFeatureSchema,
|
|
200
|
+
WriterModelAccessFeatureSchema,
|
|
184
201
|
]);
|
|
185
202
|
|
|
186
203
|
export type SubscriptionFeature = z.infer<typeof SubscriptionFeatureSchema>;
|