@purpleschool/gptbot 0.12.71-stage-2 → 0.12.72-stage-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.
|
@@ -2,12 +2,17 @@
|
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
3
|
exports.SendTelegramNotificationCommand = void 0;
|
|
4
4
|
const zod_1 = require("zod");
|
|
5
|
+
const rugpt_lib_common_1 = require("@purpleschool/rugpt-lib-common");
|
|
5
6
|
const models_1 = require("../../models");
|
|
6
7
|
var SendTelegramNotificationCommand;
|
|
7
8
|
(function (SendTelegramNotificationCommand) {
|
|
9
|
+
SendTelegramNotificationCommand.MessageMdSchema = zod_1.z.object({
|
|
10
|
+
[rugpt_lib_common_1.LOCALE.RU]: zod_1.z.string(),
|
|
11
|
+
[rugpt_lib_common_1.LOCALE.EN]: zod_1.z.string(),
|
|
12
|
+
});
|
|
8
13
|
SendTelegramNotificationCommand.RequestSchema = zod_1.z.object({
|
|
9
14
|
filters: models_1.UserFilterSchema,
|
|
10
|
-
messageMd:
|
|
15
|
+
messageMd: SendTelegramNotificationCommand.MessageMdSchema,
|
|
11
16
|
});
|
|
12
17
|
SendTelegramNotificationCommand.ResponseSchema = zod_1.z.object({
|
|
13
18
|
count: zod_1.z.number(),
|
|
@@ -1,10 +1,17 @@
|
|
|
1
1
|
import { z } from 'zod';
|
|
2
|
+
import { LOCALE } from '@purpleschool/rugpt-lib-common';
|
|
2
3
|
import { UserFilterSchema } from '../../models';
|
|
3
4
|
|
|
4
5
|
export namespace SendTelegramNotificationCommand {
|
|
6
|
+
export const MessageMdSchema = z.object({
|
|
7
|
+
[LOCALE.RU]: z.string(),
|
|
8
|
+
[LOCALE.EN]: z.string(),
|
|
9
|
+
});
|
|
10
|
+
export type MessageMd = z.infer<typeof MessageMdSchema>;
|
|
11
|
+
|
|
5
12
|
export const RequestSchema = z.object({
|
|
6
13
|
filters: UserFilterSchema,
|
|
7
|
-
messageMd:
|
|
14
|
+
messageMd: MessageMdSchema,
|
|
8
15
|
});
|
|
9
16
|
export type Request = z.infer<typeof RequestSchema>;
|
|
10
17
|
|