@purpleschool/gptbot-tools 0.1.1 → 0.1.2
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/index.js +3 -0
- package/build/spell-corrector/commands/delete-all-spell-corrector-jobs.command.js +13 -0
- package/build/spell-corrector/commands/delete-spell-corrector-job-by-uuid.command.js +14 -0
- package/build/spell-corrector/commands/get-spell-corrector-price.command.js +15 -0
- package/build/spell-corrector/commands/index.js +23 -0
- package/build/spell-corrector/commands/retry-spell-corrector-job.command.js +17 -0
- package/build/spell-corrector/commands/set-reaction-to-spell-corrector-job.command.js +27 -0
- package/build/spell-corrector/commands/spell-corrector.command.js +18 -0
- package/build/spell-corrector/commands/update-spell-corrector-job-title.command.js +16 -0
- package/build/spell-corrector/index.js +20 -0
- package/build/spell-corrector/models/index.js +19 -0
- package/build/spell-corrector/models/spell-corrector-job.schema.js +25 -0
- package/build/spell-corrector/models/spell-corrector-model.schema.js +16 -0
- package/build/spell-corrector/models/spell-corrector-tool-config.schema.js +9 -0
- package/build/spell-corrector/queries/find-spell-corrector-job-by-uuid.query.js +10 -0
- package/build/spell-corrector/queries/find-spell-corrector-jobs.query.js +28 -0
- package/build/spell-corrector/queries/get-spell-corrector-tool-config.query.js +9 -0
- package/build/spell-corrector/queries/index.js +19 -0
- package/build/spell-corrector/routes/index.js +17 -0
- package/build/spell-corrector/routes/spell-corrector.amqp.routes.js +15 -0
- package/build/tools/enums/tool-type.enum.js +1 -0
- package/index.ts +3 -0
- package/package.json +1 -1
- package/spell-corrector/commands/delete-all-spell-corrector-jobs.command.ts +13 -0
- package/spell-corrector/commands/delete-spell-corrector-job-by-uuid.command.ts +14 -0
- package/spell-corrector/commands/get-spell-corrector-price.command.ts +16 -0
- package/spell-corrector/commands/index.ts +7 -0
- package/spell-corrector/commands/retry-spell-corrector-job.command.ts +17 -0
- package/spell-corrector/commands/set-reaction-to-spell-corrector-job.command.ts +30 -0
- package/spell-corrector/commands/spell-corrector.command.ts +18 -0
- package/spell-corrector/commands/update-spell-corrector-job-title.command.ts +16 -0
- package/spell-corrector/index.ts +4 -0
- package/spell-corrector/models/index.ts +3 -0
- package/spell-corrector/models/spell-corrector-job.schema.ts +25 -0
- package/spell-corrector/models/spell-corrector-model.schema.ts +16 -0
- package/spell-corrector/models/spell-corrector-tool-config.schema.ts +9 -0
- package/spell-corrector/queries/find-spell-corrector-job-by-uuid.query.ts +11 -0
- package/spell-corrector/queries/find-spell-corrector-jobs.query.ts +33 -0
- package/spell-corrector/queries/get-spell-corrector-tool-config.query.ts +8 -0
- package/spell-corrector/queries/index.ts +3 -0
- package/spell-corrector/routes/index.ts +1 -0
- package/spell-corrector/routes/spell-corrector.amqp.routes.ts +12 -0
- package/tools/enums/tool-type.enum.ts +1 -0
package/build/index.js
CHANGED
|
@@ -55,6 +55,7 @@ __exportStar(require("./ai-vendor"), exports);
|
|
|
55
55
|
__exportStar(require("./marketplace-card"), exports);
|
|
56
56
|
__exportStar(require("./analytics"), exports);
|
|
57
57
|
__exportStar(require("./solving-edu-task"), exports);
|
|
58
|
+
__exportStar(require("./spell-corrector"), exports);
|
|
58
59
|
const common = __importStar(require("./common"));
|
|
59
60
|
const paraphrase = __importStar(require("./paraphrase"));
|
|
60
61
|
const tools = __importStar(require("./tools"));
|
|
@@ -73,6 +74,7 @@ const interiorDesign = __importStar(require("./interior-design"));
|
|
|
73
74
|
const marketplaceCard = __importStar(require("./marketplace-card"));
|
|
74
75
|
const analytics = __importStar(require("./analytics"));
|
|
75
76
|
const solvingEduTask = __importStar(require("./solving-edu-task"));
|
|
77
|
+
const spellCorrector = __importStar(require("./spell-corrector"));
|
|
76
78
|
var ToolService;
|
|
77
79
|
(function (ToolService) {
|
|
78
80
|
ToolService.Common = common;
|
|
@@ -93,4 +95,5 @@ var ToolService;
|
|
|
93
95
|
ToolService.MarketplaceCard = marketplaceCard;
|
|
94
96
|
ToolService.Analytics = analytics;
|
|
95
97
|
ToolService.SolvingEduTask = solvingEduTask;
|
|
98
|
+
ToolService.SpellCorrector = spellCorrector;
|
|
96
99
|
})(ToolService || (exports.ToolService = ToolService = {}));
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.DeleteAllSpellCorrectorJobsCommand = void 0;
|
|
4
|
+
const zod_1 = require("zod");
|
|
5
|
+
const command_response_schema_1 = require("../../common/models/command-response.schema");
|
|
6
|
+
var DeleteAllSpellCorrectorJobsCommand;
|
|
7
|
+
(function (DeleteAllSpellCorrectorJobsCommand) {
|
|
8
|
+
DeleteAllSpellCorrectorJobsCommand.RequestSchema = zod_1.z.object({
|
|
9
|
+
userId: zod_1.z.string().uuid().nullable().optional(),
|
|
10
|
+
unregisteredUserId: zod_1.z.string().uuid().nullable().optional(),
|
|
11
|
+
});
|
|
12
|
+
DeleteAllSpellCorrectorJobsCommand.ResponseSchema = (0, command_response_schema_1.ICommandResponseSchema)(zod_1.z.boolean());
|
|
13
|
+
})(DeleteAllSpellCorrectorJobsCommand || (exports.DeleteAllSpellCorrectorJobsCommand = DeleteAllSpellCorrectorJobsCommand = {}));
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.DeleteSpellCorrectorJobByUuidCommand = void 0;
|
|
4
|
+
const zod_1 = require("zod");
|
|
5
|
+
const command_response_schema_1 = require("../../common/models/command-response.schema");
|
|
6
|
+
var DeleteSpellCorrectorJobByUuidCommand;
|
|
7
|
+
(function (DeleteSpellCorrectorJobByUuidCommand) {
|
|
8
|
+
DeleteSpellCorrectorJobByUuidCommand.RequestSchema = zod_1.z.object({
|
|
9
|
+
userId: zod_1.z.string().uuid().nullable().optional(),
|
|
10
|
+
unregisteredUserId: zod_1.z.string().uuid().nullable().optional(),
|
|
11
|
+
uuid: zod_1.z.string(),
|
|
12
|
+
});
|
|
13
|
+
DeleteSpellCorrectorJobByUuidCommand.ResponseSchema = (0, command_response_schema_1.ICommandResponseSchema)(zod_1.z.boolean());
|
|
14
|
+
})(DeleteSpellCorrectorJobByUuidCommand || (exports.DeleteSpellCorrectorJobByUuidCommand = DeleteSpellCorrectorJobByUuidCommand = {}));
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.GetSpellCorrectorPriceCommand = void 0;
|
|
4
|
+
const zod_1 = require("zod");
|
|
5
|
+
const command_response_schema_1 = require("../../common/models/command-response.schema");
|
|
6
|
+
var GetSpellCorrectorPriceCommand;
|
|
7
|
+
(function (GetSpellCorrectorPriceCommand) {
|
|
8
|
+
GetSpellCorrectorPriceCommand.RequestSchema = zod_1.z.object({
|
|
9
|
+
modelId: zod_1.z.string().uuid(),
|
|
10
|
+
});
|
|
11
|
+
GetSpellCorrectorPriceCommand.ResponseDataSchema = zod_1.z.object({
|
|
12
|
+
price: zod_1.z.number(),
|
|
13
|
+
});
|
|
14
|
+
GetSpellCorrectorPriceCommand.ResponseSchema = (0, command_response_schema_1.ICommandResponseSchema)(GetSpellCorrectorPriceCommand.ResponseDataSchema);
|
|
15
|
+
})(GetSpellCorrectorPriceCommand || (exports.GetSpellCorrectorPriceCommand = GetSpellCorrectorPriceCommand = {}));
|
|
@@ -0,0 +1,23 @@
|
|
|
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("./spell-corrector.command"), exports);
|
|
18
|
+
__exportStar(require("./get-spell-corrector-price.command"), exports);
|
|
19
|
+
__exportStar(require("./retry-spell-corrector-job.command"), exports);
|
|
20
|
+
__exportStar(require("./set-reaction-to-spell-corrector-job.command"), exports);
|
|
21
|
+
__exportStar(require("./update-spell-corrector-job-title.command"), exports);
|
|
22
|
+
__exportStar(require("./delete-all-spell-corrector-jobs.command"), exports);
|
|
23
|
+
__exportStar(require("./delete-spell-corrector-job-by-uuid.command"), exports);
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.RetrySpellCorrectorJobCommand = void 0;
|
|
4
|
+
const zod_1 = require("zod");
|
|
5
|
+
const command_response_schema_1 = require("../../common/models/command-response.schema");
|
|
6
|
+
const models_1 = require("../models");
|
|
7
|
+
var RetrySpellCorrectorJobCommand;
|
|
8
|
+
(function (RetrySpellCorrectorJobCommand) {
|
|
9
|
+
RetrySpellCorrectorJobCommand.RequestSchema = zod_1.z.object({
|
|
10
|
+
uuid: zod_1.z.string().uuid(),
|
|
11
|
+
userId: zod_1.z.string().uuid().nullable().optional(),
|
|
12
|
+
unregisteredUserId: zod_1.z.string().uuid().nullable().optional(),
|
|
13
|
+
tokenReservationId: zod_1.z.string().uuid(),
|
|
14
|
+
precalculatedPrice: zod_1.z.number(),
|
|
15
|
+
});
|
|
16
|
+
RetrySpellCorrectorJobCommand.ResponseSchema = (0, command_response_schema_1.ICommandResponseSchema)(models_1.SpellCorrectorJobSchema);
|
|
17
|
+
})(RetrySpellCorrectorJobCommand || (exports.RetrySpellCorrectorJobCommand = RetrySpellCorrectorJobCommand = {}));
|
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.SetReactionToSpellCorrectorJobCommand = void 0;
|
|
4
|
+
const zod_1 = require("zod");
|
|
5
|
+
const command_response_schema_1 = require("../../common/models/command-response.schema");
|
|
6
|
+
const models_1 = require("../models");
|
|
7
|
+
const common_1 = require("../../common");
|
|
8
|
+
var SetReactionToSpellCorrectorJobCommand;
|
|
9
|
+
(function (SetReactionToSpellCorrectorJobCommand) {
|
|
10
|
+
SetReactionToSpellCorrectorJobCommand.RequestSchema = zod_1.z
|
|
11
|
+
.object({
|
|
12
|
+
userId: zod_1.z.string().uuid().nullable().optional(),
|
|
13
|
+
unregisteredUserId: zod_1.z.string().uuid().nullable().optional(),
|
|
14
|
+
uuid: zod_1.z.string().uuid(),
|
|
15
|
+
reaction: zod_1.z.nativeEnum(common_1.USER_REACTION).nullable(),
|
|
16
|
+
dislikeReason: zod_1.z.string().nullable().default(null),
|
|
17
|
+
})
|
|
18
|
+
.refine((data) => {
|
|
19
|
+
if (data.reaction !== common_1.USER_REACTION.DISLIKED && data.dislikeReason) {
|
|
20
|
+
return false;
|
|
21
|
+
}
|
|
22
|
+
return true;
|
|
23
|
+
}, {
|
|
24
|
+
message: 'Dislike reason is not allowed when reaction is not disliked',
|
|
25
|
+
});
|
|
26
|
+
SetReactionToSpellCorrectorJobCommand.ResponseSchema = (0, command_response_schema_1.ICommandResponseSchema)(models_1.SpellCorrectorJobSchema);
|
|
27
|
+
})(SetReactionToSpellCorrectorJobCommand || (exports.SetReactionToSpellCorrectorJobCommand = SetReactionToSpellCorrectorJobCommand = {}));
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.SpellCorrectorCommand = void 0;
|
|
4
|
+
const zod_1 = require("zod");
|
|
5
|
+
const command_response_schema_1 = require("../../common/models/command-response.schema");
|
|
6
|
+
const models_1 = require("../models");
|
|
7
|
+
var SpellCorrectorCommand;
|
|
8
|
+
(function (SpellCorrectorCommand) {
|
|
9
|
+
SpellCorrectorCommand.RequestSchema = zod_1.z.object({
|
|
10
|
+
userId: zod_1.z.string().uuid().nullable().optional(),
|
|
11
|
+
unregisteredUserId: zod_1.z.string().uuid().nullable().optional(),
|
|
12
|
+
prompt: zod_1.z.string(),
|
|
13
|
+
modelId: zod_1.z.string().uuid(),
|
|
14
|
+
tokenReservationId: zod_1.z.string().uuid(),
|
|
15
|
+
precalculatedPrice: zod_1.z.number(),
|
|
16
|
+
});
|
|
17
|
+
SpellCorrectorCommand.ResponseSchema = (0, command_response_schema_1.ICommandResponseSchema)(models_1.SpellCorrectorJobSchema);
|
|
18
|
+
})(SpellCorrectorCommand || (exports.SpellCorrectorCommand = SpellCorrectorCommand = {}));
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.UpdateSpellCorrectorJobTitleCommand = void 0;
|
|
4
|
+
const zod_1 = require("zod");
|
|
5
|
+
const command_response_schema_1 = require("../../common/models/command-response.schema");
|
|
6
|
+
const models_1 = require("../models");
|
|
7
|
+
var UpdateSpellCorrectorJobTitleCommand;
|
|
8
|
+
(function (UpdateSpellCorrectorJobTitleCommand) {
|
|
9
|
+
UpdateSpellCorrectorJobTitleCommand.RequestSchema = zod_1.z.object({
|
|
10
|
+
uuid: zod_1.z.string().uuid(),
|
|
11
|
+
userId: zod_1.z.string().uuid().nullable().optional(),
|
|
12
|
+
unregisteredUserId: zod_1.z.string().uuid().nullable().optional(),
|
|
13
|
+
title: zod_1.z.string().min(1).max(40),
|
|
14
|
+
});
|
|
15
|
+
UpdateSpellCorrectorJobTitleCommand.ResponseSchema = (0, command_response_schema_1.ICommandResponseSchema)(models_1.SpellCorrectorJobSchema);
|
|
16
|
+
})(UpdateSpellCorrectorJobTitleCommand || (exports.UpdateSpellCorrectorJobTitleCommand = UpdateSpellCorrectorJobTitleCommand = {}));
|
|
@@ -0,0 +1,20 @@
|
|
|
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("./routes"), exports);
|
|
18
|
+
__exportStar(require("./commands"), exports);
|
|
19
|
+
__exportStar(require("./models"), exports);
|
|
20
|
+
__exportStar(require("./queries"), exports);
|
|
@@ -0,0 +1,19 @@
|
|
|
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("./spell-corrector-model.schema"), exports);
|
|
18
|
+
__exportStar(require("./spell-corrector-job.schema"), exports);
|
|
19
|
+
__exportStar(require("./spell-corrector-tool-config.schema"), exports);
|
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.SpellCorrectorJobSchema = void 0;
|
|
4
|
+
const zod_1 = require("zod");
|
|
5
|
+
const tools_1 = require("../../tools");
|
|
6
|
+
const common_1 = require("../../common");
|
|
7
|
+
exports.SpellCorrectorJobSchema = zod_1.z.object({
|
|
8
|
+
uuid: zod_1.z.string(),
|
|
9
|
+
userId: zod_1.z.string().nullable(),
|
|
10
|
+
unregisteredUserId: zod_1.z.string().nullable(),
|
|
11
|
+
userInput: zod_1.z.string(),
|
|
12
|
+
aiOutput: zod_1.z.string().nullable(),
|
|
13
|
+
aiTokenUsage: zod_1.z.number().nullable(),
|
|
14
|
+
price: zod_1.z.number(),
|
|
15
|
+
status: zod_1.z.nativeEnum(tools_1.JOB_STATUS),
|
|
16
|
+
title: zod_1.z.string(),
|
|
17
|
+
error: zod_1.z.string().nullable(),
|
|
18
|
+
reaction: zod_1.z.nativeEnum(common_1.USER_REACTION).nullable(),
|
|
19
|
+
dislikeReason: zod_1.z.string().nullable(),
|
|
20
|
+
modelId: zod_1.z.string(),
|
|
21
|
+
tokenReservationId: zod_1.z.string().nullable().optional(),
|
|
22
|
+
createdAt: zod_1.z.date(),
|
|
23
|
+
updatedAt: zod_1.z.date(),
|
|
24
|
+
completedAt: zod_1.z.date().nullable(),
|
|
25
|
+
});
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.SpellCorrectorModelSchema = void 0;
|
|
4
|
+
const zod_1 = require("zod");
|
|
5
|
+
const common_1 = require("../../common");
|
|
6
|
+
exports.SpellCorrectorModelSchema = zod_1.z.object({
|
|
7
|
+
uuid: zod_1.z.string(),
|
|
8
|
+
title: zod_1.z.string(),
|
|
9
|
+
icon: zod_1.z.string(),
|
|
10
|
+
price: zod_1.z.number(),
|
|
11
|
+
aiModel: zod_1.z.string(),
|
|
12
|
+
reasoningEffort: zod_1.z.nativeEnum(common_1.REASONING_EFFORT).nullable().optional(),
|
|
13
|
+
order: zod_1.z.number(),
|
|
14
|
+
createdAt: zod_1.z.date(),
|
|
15
|
+
updatedAt: zod_1.z.date(),
|
|
16
|
+
});
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.SpellCorrectorToolConfigSchema = void 0;
|
|
4
|
+
const zod_1 = require("zod");
|
|
5
|
+
const spell_corrector_model_schema_1 = require("./spell-corrector-model.schema");
|
|
6
|
+
exports.SpellCorrectorToolConfigSchema = zod_1.z.object({
|
|
7
|
+
models: zod_1.z.array(spell_corrector_model_schema_1.SpellCorrectorModelSchema),
|
|
8
|
+
maxSymbols: zod_1.z.number(),
|
|
9
|
+
});
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.FindSpellCorrectorJobByUuidQuery = void 0;
|
|
4
|
+
const command_response_schema_1 = require("../../common/models/command-response.schema");
|
|
5
|
+
const models_1 = require("../models");
|
|
6
|
+
var FindSpellCorrectorJobByUuidQuery;
|
|
7
|
+
(function (FindSpellCorrectorJobByUuidQuery) {
|
|
8
|
+
FindSpellCorrectorJobByUuidQuery.RequestSchema = models_1.SpellCorrectorJobSchema.pick({ uuid: true });
|
|
9
|
+
FindSpellCorrectorJobByUuidQuery.ResponseSchema = (0, command_response_schema_1.ICommandResponseSchema)(models_1.SpellCorrectorJobSchema);
|
|
10
|
+
})(FindSpellCorrectorJobByUuidQuery || (exports.FindSpellCorrectorJobByUuidQuery = FindSpellCorrectorJobByUuidQuery = {}));
|
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.FindSpellCorrectorJobsQuery = void 0;
|
|
4
|
+
const zod_1 = require("zod");
|
|
5
|
+
const command_response_schema_1 = require("../../common/models/command-response.schema");
|
|
6
|
+
const models_1 = require("../models");
|
|
7
|
+
var FindSpellCorrectorJobsQuery;
|
|
8
|
+
(function (FindSpellCorrectorJobsQuery) {
|
|
9
|
+
FindSpellCorrectorJobsQuery.RequestSchema = zod_1.z
|
|
10
|
+
.object({
|
|
11
|
+
userId: zod_1.z.string().uuid().optional(),
|
|
12
|
+
unregisteredUserId: zod_1.z.string().uuid().optional(),
|
|
13
|
+
title: zod_1.z.string().optional(),
|
|
14
|
+
limit: zod_1.z.coerce.number().min(1).optional(),
|
|
15
|
+
offset: zod_1.z.coerce.number().min(0).default(0).optional(),
|
|
16
|
+
})
|
|
17
|
+
.refine((data) => {
|
|
18
|
+
return Boolean(data.userId) !== Boolean(data.unregisteredUserId);
|
|
19
|
+
}, {
|
|
20
|
+
message: 'At least userId or unregisteredUserId must be present',
|
|
21
|
+
path: ['userId', 'unregisteredUserId'],
|
|
22
|
+
});
|
|
23
|
+
FindSpellCorrectorJobsQuery.ResponseSchema = (0, command_response_schema_1.ICommandResponseSchema)(zod_1.z.object({
|
|
24
|
+
data: zod_1.z.array(models_1.SpellCorrectorJobSchema),
|
|
25
|
+
page: zod_1.z.number(),
|
|
26
|
+
totalPages: zod_1.z.number(),
|
|
27
|
+
}));
|
|
28
|
+
})(FindSpellCorrectorJobsQuery || (exports.FindSpellCorrectorJobsQuery = FindSpellCorrectorJobsQuery = {}));
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.GetSpellCorrectorToolConfigQuery = void 0;
|
|
4
|
+
const command_response_schema_1 = require("../../common/models/command-response.schema");
|
|
5
|
+
const models_1 = require("../models");
|
|
6
|
+
var GetSpellCorrectorToolConfigQuery;
|
|
7
|
+
(function (GetSpellCorrectorToolConfigQuery) {
|
|
8
|
+
GetSpellCorrectorToolConfigQuery.ResponseSchema = (0, command_response_schema_1.ICommandResponseSchema)(models_1.SpellCorrectorToolConfigSchema);
|
|
9
|
+
})(GetSpellCorrectorToolConfigQuery || (exports.GetSpellCorrectorToolConfigQuery = GetSpellCorrectorToolConfigQuery = {}));
|
|
@@ -0,0 +1,19 @@
|
|
|
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("./find-spell-corrector-job-by-uuid.query"), exports);
|
|
18
|
+
__exportStar(require("./get-spell-corrector-tool-config.query"), exports);
|
|
19
|
+
__exportStar(require("./find-spell-corrector-jobs.query"), exports);
|
|
@@ -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("./spell-corrector.amqp.routes"), exports);
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.SPELL_CORRECTOR_AMQP_ROUTES = void 0;
|
|
4
|
+
exports.SPELL_CORRECTOR_AMQP_ROUTES = {
|
|
5
|
+
EXECUTE: 'tools.spell_corrector.execute.rpc',
|
|
6
|
+
GET_PRICE: 'tools.spell_corrector.get-price.rpc',
|
|
7
|
+
CONFIG: 'tools.spell_corrector.config.rpc',
|
|
8
|
+
GET_JOB: 'tools.spell_corrector.jobs.get.rpc',
|
|
9
|
+
LIST_JOBS: 'tools.spell_corrector.jobs.list.rpc',
|
|
10
|
+
SET_REACTION: 'tools.spell_corrector.jobs.set-reaction.rpc',
|
|
11
|
+
UPDATE_TITLE: 'tools.spell_corrector.jobs.update-title.rpc',
|
|
12
|
+
SOFT_DELETE: 'tools.spell_corrector.jobs.soft-delete.rpc',
|
|
13
|
+
SOFT_DELETE_ALL: 'tools.spell_corrector.jobs.soft-delete-all.rpc',
|
|
14
|
+
RETRY: 'tools.spell_corrector.jobs.retry.rpc',
|
|
15
|
+
};
|
|
@@ -18,4 +18,5 @@ var TOOL_TYPE;
|
|
|
18
18
|
TOOL_TYPE["IMAGE_GENERATION"] = "IMAGE_GENERATION";
|
|
19
19
|
TOOL_TYPE["MARKETPLACE_CARD_GENERATION"] = "MARKETPLACE_CARD_GENERATION";
|
|
20
20
|
TOOL_TYPE["INTERIOR_DESIGN"] = "INTERIOR_DESIGN";
|
|
21
|
+
TOOL_TYPE["SPELL_CORRECTOR"] = "SPELL_CORRECTOR";
|
|
21
22
|
})(TOOL_TYPE || (exports.TOOL_TYPE = TOOL_TYPE = {}));
|
package/index.ts
CHANGED
|
@@ -16,6 +16,7 @@ export * from './ai-vendor';
|
|
|
16
16
|
export * from './marketplace-card';
|
|
17
17
|
export * from './analytics';
|
|
18
18
|
export * from './solving-edu-task';
|
|
19
|
+
export * from './spell-corrector';
|
|
19
20
|
|
|
20
21
|
import * as common from './common';
|
|
21
22
|
import * as paraphrase from './paraphrase';
|
|
@@ -35,6 +36,7 @@ import * as interiorDesign from './interior-design';
|
|
|
35
36
|
import * as marketplaceCard from './marketplace-card';
|
|
36
37
|
import * as analytics from './analytics';
|
|
37
38
|
import * as solvingEduTask from './solving-edu-task';
|
|
39
|
+
import * as spellCorrector from './spell-corrector';
|
|
38
40
|
|
|
39
41
|
export namespace ToolService {
|
|
40
42
|
export import Common = common;
|
|
@@ -55,4 +57,5 @@ export namespace ToolService {
|
|
|
55
57
|
export import MarketplaceCard = marketplaceCard;
|
|
56
58
|
export import Analytics = analytics;
|
|
57
59
|
export import SolvingEduTask = solvingEduTask;
|
|
60
|
+
export import SpellCorrector = spellCorrector;
|
|
58
61
|
}
|
package/package.json
CHANGED
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
import { z } from 'zod';
|
|
2
|
+
import { ICommandResponseSchema } from '../../common/models/command-response.schema';
|
|
3
|
+
|
|
4
|
+
export namespace DeleteAllSpellCorrectorJobsCommand {
|
|
5
|
+
export const RequestSchema = z.object({
|
|
6
|
+
userId: z.string().uuid().nullable().optional(),
|
|
7
|
+
unregisteredUserId: z.string().uuid().nullable().optional(),
|
|
8
|
+
});
|
|
9
|
+
export type Request = z.infer<typeof RequestSchema>;
|
|
10
|
+
|
|
11
|
+
export const ResponseSchema = ICommandResponseSchema(z.boolean());
|
|
12
|
+
export type Response = z.infer<typeof ResponseSchema>;
|
|
13
|
+
}
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
import { z } from 'zod';
|
|
2
|
+
import { ICommandResponseSchema } from '../../common/models/command-response.schema';
|
|
3
|
+
|
|
4
|
+
export namespace DeleteSpellCorrectorJobByUuidCommand {
|
|
5
|
+
export const RequestSchema = z.object({
|
|
6
|
+
userId: z.string().uuid().nullable().optional(),
|
|
7
|
+
unregisteredUserId: z.string().uuid().nullable().optional(),
|
|
8
|
+
uuid: z.string(),
|
|
9
|
+
});
|
|
10
|
+
export type Request = z.infer<typeof RequestSchema>;
|
|
11
|
+
|
|
12
|
+
export const ResponseSchema = ICommandResponseSchema(z.boolean());
|
|
13
|
+
export type Response = z.infer<typeof ResponseSchema>;
|
|
14
|
+
}
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
import { z } from 'zod';
|
|
2
|
+
import { ICommandResponseSchema } from '../../common/models/command-response.schema';
|
|
3
|
+
|
|
4
|
+
export namespace GetSpellCorrectorPriceCommand {
|
|
5
|
+
export const RequestSchema = z.object({
|
|
6
|
+
modelId: z.string().uuid(),
|
|
7
|
+
});
|
|
8
|
+
export type Request = z.infer<typeof RequestSchema>;
|
|
9
|
+
|
|
10
|
+
export const ResponseDataSchema = z.object({
|
|
11
|
+
price: z.number(),
|
|
12
|
+
});
|
|
13
|
+
|
|
14
|
+
export const ResponseSchema = ICommandResponseSchema(ResponseDataSchema);
|
|
15
|
+
export type Response = z.infer<typeof ResponseSchema>;
|
|
16
|
+
}
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
export * from './spell-corrector.command';
|
|
2
|
+
export * from './get-spell-corrector-price.command';
|
|
3
|
+
export * from './retry-spell-corrector-job.command';
|
|
4
|
+
export * from './set-reaction-to-spell-corrector-job.command';
|
|
5
|
+
export * from './update-spell-corrector-job-title.command';
|
|
6
|
+
export * from './delete-all-spell-corrector-jobs.command';
|
|
7
|
+
export * from './delete-spell-corrector-job-by-uuid.command';
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
import { z } from 'zod';
|
|
2
|
+
import { ICommandResponseSchema } from '../../common/models/command-response.schema';
|
|
3
|
+
import { SpellCorrectorJobSchema } from '../models';
|
|
4
|
+
|
|
5
|
+
export namespace RetrySpellCorrectorJobCommand {
|
|
6
|
+
export const RequestSchema = z.object({
|
|
7
|
+
uuid: z.string().uuid(),
|
|
8
|
+
userId: z.string().uuid().nullable().optional(),
|
|
9
|
+
unregisteredUserId: z.string().uuid().nullable().optional(),
|
|
10
|
+
tokenReservationId: z.string().uuid(),
|
|
11
|
+
precalculatedPrice: z.number(),
|
|
12
|
+
});
|
|
13
|
+
export type Request = z.infer<typeof RequestSchema>;
|
|
14
|
+
|
|
15
|
+
export const ResponseSchema = ICommandResponseSchema(SpellCorrectorJobSchema);
|
|
16
|
+
export type Response = z.infer<typeof ResponseSchema>;
|
|
17
|
+
}
|
|
@@ -0,0 +1,30 @@
|
|
|
1
|
+
import { z } from 'zod';
|
|
2
|
+
import { ICommandResponseSchema } from '../../common/models/command-response.schema';
|
|
3
|
+
import { SpellCorrectorJobSchema } from '../models';
|
|
4
|
+
import { USER_REACTION } from '../../common';
|
|
5
|
+
|
|
6
|
+
export namespace SetReactionToSpellCorrectorJobCommand {
|
|
7
|
+
export const RequestSchema = z
|
|
8
|
+
.object({
|
|
9
|
+
userId: z.string().uuid().nullable().optional(),
|
|
10
|
+
unregisteredUserId: z.string().uuid().nullable().optional(),
|
|
11
|
+
uuid: z.string().uuid(),
|
|
12
|
+
reaction: z.nativeEnum(USER_REACTION).nullable(),
|
|
13
|
+
dislikeReason: z.string().nullable().default(null),
|
|
14
|
+
})
|
|
15
|
+
.refine(
|
|
16
|
+
(data) => {
|
|
17
|
+
if (data.reaction !== USER_REACTION.DISLIKED && data.dislikeReason) {
|
|
18
|
+
return false;
|
|
19
|
+
}
|
|
20
|
+
return true;
|
|
21
|
+
},
|
|
22
|
+
{
|
|
23
|
+
message: 'Dislike reason is not allowed when reaction is not disliked',
|
|
24
|
+
},
|
|
25
|
+
);
|
|
26
|
+
export type Request = z.infer<typeof RequestSchema>;
|
|
27
|
+
|
|
28
|
+
export const ResponseSchema = ICommandResponseSchema(SpellCorrectorJobSchema);
|
|
29
|
+
export type Response = z.infer<typeof ResponseSchema>;
|
|
30
|
+
}
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
import { z } from 'zod';
|
|
2
|
+
import { ICommandResponseSchema } from '../../common/models/command-response.schema';
|
|
3
|
+
import { SpellCorrectorJobSchema } from '../models';
|
|
4
|
+
|
|
5
|
+
export namespace SpellCorrectorCommand {
|
|
6
|
+
export const RequestSchema = z.object({
|
|
7
|
+
userId: z.string().uuid().nullable().optional(),
|
|
8
|
+
unregisteredUserId: z.string().uuid().nullable().optional(),
|
|
9
|
+
prompt: z.string(),
|
|
10
|
+
modelId: z.string().uuid(),
|
|
11
|
+
tokenReservationId: z.string().uuid(),
|
|
12
|
+
precalculatedPrice: z.number(),
|
|
13
|
+
});
|
|
14
|
+
export type Request = z.infer<typeof RequestSchema>;
|
|
15
|
+
|
|
16
|
+
export const ResponseSchema = ICommandResponseSchema(SpellCorrectorJobSchema);
|
|
17
|
+
export type Response = z.infer<typeof ResponseSchema>;
|
|
18
|
+
}
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
import { z } from 'zod';
|
|
2
|
+
import { ICommandResponseSchema } from '../../common/models/command-response.schema';
|
|
3
|
+
import { SpellCorrectorJobSchema } from '../models';
|
|
4
|
+
|
|
5
|
+
export namespace UpdateSpellCorrectorJobTitleCommand {
|
|
6
|
+
export const RequestSchema = z.object({
|
|
7
|
+
uuid: z.string().uuid(),
|
|
8
|
+
userId: z.string().uuid().nullable().optional(),
|
|
9
|
+
unregisteredUserId: z.string().uuid().nullable().optional(),
|
|
10
|
+
title: z.string().min(1).max(40),
|
|
11
|
+
});
|
|
12
|
+
export type Request = z.infer<typeof RequestSchema>;
|
|
13
|
+
|
|
14
|
+
export const ResponseSchema = ICommandResponseSchema(SpellCorrectorJobSchema);
|
|
15
|
+
export type Response = z.infer<typeof ResponseSchema>;
|
|
16
|
+
}
|
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
import { z } from 'zod';
|
|
2
|
+
import { JOB_STATUS } from '../../tools';
|
|
3
|
+
import { USER_REACTION } from '../../common';
|
|
4
|
+
|
|
5
|
+
export const SpellCorrectorJobSchema = z.object({
|
|
6
|
+
uuid: z.string(),
|
|
7
|
+
userId: z.string().nullable(),
|
|
8
|
+
unregisteredUserId: z.string().nullable(),
|
|
9
|
+
userInput: z.string(),
|
|
10
|
+
aiOutput: z.string().nullable(),
|
|
11
|
+
aiTokenUsage: z.number().nullable(),
|
|
12
|
+
price: z.number(),
|
|
13
|
+
status: z.nativeEnum(JOB_STATUS),
|
|
14
|
+
title: z.string(),
|
|
15
|
+
error: z.string().nullable(),
|
|
16
|
+
reaction: z.nativeEnum(USER_REACTION).nullable(),
|
|
17
|
+
dislikeReason: z.string().nullable(),
|
|
18
|
+
modelId: z.string(),
|
|
19
|
+
tokenReservationId: z.string().nullable().optional(),
|
|
20
|
+
createdAt: z.date(),
|
|
21
|
+
updatedAt: z.date(),
|
|
22
|
+
completedAt: z.date().nullable(),
|
|
23
|
+
});
|
|
24
|
+
|
|
25
|
+
export type SpellCorrectorJob = z.infer<typeof SpellCorrectorJobSchema>;
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
import { z } from 'zod';
|
|
2
|
+
import { REASONING_EFFORT } from '../../common';
|
|
3
|
+
|
|
4
|
+
export const SpellCorrectorModelSchema = z.object({
|
|
5
|
+
uuid: z.string(),
|
|
6
|
+
title: z.string(),
|
|
7
|
+
icon: z.string(),
|
|
8
|
+
price: z.number(),
|
|
9
|
+
aiModel: z.string(),
|
|
10
|
+
reasoningEffort: z.nativeEnum(REASONING_EFFORT).nullable().optional(),
|
|
11
|
+
order: z.number(),
|
|
12
|
+
createdAt: z.date(),
|
|
13
|
+
updatedAt: z.date(),
|
|
14
|
+
});
|
|
15
|
+
|
|
16
|
+
export type SpellCorrectorModel = z.infer<typeof SpellCorrectorModelSchema>;
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import { z } from 'zod';
|
|
2
|
+
import { SpellCorrectorModelSchema } from './spell-corrector-model.schema';
|
|
3
|
+
|
|
4
|
+
export const SpellCorrectorToolConfigSchema = z.object({
|
|
5
|
+
models: z.array(SpellCorrectorModelSchema),
|
|
6
|
+
maxSymbols: z.number(),
|
|
7
|
+
});
|
|
8
|
+
|
|
9
|
+
export type SpellCorrectorTool = z.infer<typeof SpellCorrectorToolConfigSchema>;
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import { z } from 'zod';
|
|
2
|
+
import { ICommandResponseSchema } from '../../common/models/command-response.schema';
|
|
3
|
+
import { SpellCorrectorJobSchema } from '../models';
|
|
4
|
+
|
|
5
|
+
export namespace FindSpellCorrectorJobByUuidQuery {
|
|
6
|
+
export const RequestSchema = SpellCorrectorJobSchema.pick({ uuid: true });
|
|
7
|
+
export type Request = z.infer<typeof RequestSchema>;
|
|
8
|
+
|
|
9
|
+
export const ResponseSchema = ICommandResponseSchema(SpellCorrectorJobSchema);
|
|
10
|
+
export type Response = z.infer<typeof ResponseSchema>;
|
|
11
|
+
}
|
|
@@ -0,0 +1,33 @@
|
|
|
1
|
+
import { z } from 'zod';
|
|
2
|
+
import { ICommandResponseSchema } from '../../common/models/command-response.schema';
|
|
3
|
+
import { SpellCorrectorJobSchema } from '../models';
|
|
4
|
+
|
|
5
|
+
export namespace FindSpellCorrectorJobsQuery {
|
|
6
|
+
export const RequestSchema = z
|
|
7
|
+
.object({
|
|
8
|
+
userId: z.string().uuid().optional(),
|
|
9
|
+
unregisteredUserId: z.string().uuid().optional(),
|
|
10
|
+
title: z.string().optional(),
|
|
11
|
+
limit: z.coerce.number().min(1).optional(),
|
|
12
|
+
offset: z.coerce.number().min(0).default(0).optional(),
|
|
13
|
+
})
|
|
14
|
+
.refine(
|
|
15
|
+
(data) => {
|
|
16
|
+
return Boolean(data.userId) !== Boolean(data.unregisteredUserId);
|
|
17
|
+
},
|
|
18
|
+
{
|
|
19
|
+
message: 'At least userId or unregisteredUserId must be present',
|
|
20
|
+
path: ['userId', 'unregisteredUserId'],
|
|
21
|
+
},
|
|
22
|
+
);
|
|
23
|
+
export type Request = z.infer<typeof RequestSchema>;
|
|
24
|
+
|
|
25
|
+
export const ResponseSchema = ICommandResponseSchema(
|
|
26
|
+
z.object({
|
|
27
|
+
data: z.array(SpellCorrectorJobSchema),
|
|
28
|
+
page: z.number(),
|
|
29
|
+
totalPages: z.number(),
|
|
30
|
+
}),
|
|
31
|
+
);
|
|
32
|
+
export type Response = z.infer<typeof ResponseSchema>;
|
|
33
|
+
}
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
import { z } from 'zod';
|
|
2
|
+
import { ICommandResponseSchema } from '../../common/models/command-response.schema';
|
|
3
|
+
import { SpellCorrectorToolConfigSchema } from '../models';
|
|
4
|
+
|
|
5
|
+
export namespace GetSpellCorrectorToolConfigQuery {
|
|
6
|
+
export const ResponseSchema = ICommandResponseSchema(SpellCorrectorToolConfigSchema);
|
|
7
|
+
export type Response = z.infer<typeof ResponseSchema>;
|
|
8
|
+
}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export * from './spell-corrector.amqp.routes';
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
export const SPELL_CORRECTOR_AMQP_ROUTES = {
|
|
2
|
+
EXECUTE: 'tools.spell_corrector.execute.rpc',
|
|
3
|
+
GET_PRICE: 'tools.spell_corrector.get-price.rpc',
|
|
4
|
+
CONFIG: 'tools.spell_corrector.config.rpc',
|
|
5
|
+
GET_JOB: 'tools.spell_corrector.jobs.get.rpc',
|
|
6
|
+
LIST_JOBS: 'tools.spell_corrector.jobs.list.rpc',
|
|
7
|
+
SET_REACTION: 'tools.spell_corrector.jobs.set-reaction.rpc',
|
|
8
|
+
UPDATE_TITLE: 'tools.spell_corrector.jobs.update-title.rpc',
|
|
9
|
+
SOFT_DELETE: 'tools.spell_corrector.jobs.soft-delete.rpc',
|
|
10
|
+
SOFT_DELETE_ALL: 'tools.spell_corrector.jobs.soft-delete-all.rpc',
|
|
11
|
+
RETRY: 'tools.spell_corrector.jobs.retry.rpc',
|
|
12
|
+
} as const;
|