@purpleschool/gptbot 0.5.6 → 0.5.8
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/auth.ts +1 -0
- package/build/api/controllers/auth.js +1 -0
- package/build/commands/auth/index.js +1 -1
- package/build/commands/auth/{reset-paasword.command.js → reset-password.command.js} +1 -5
- package/build/commands/auth/verify-email-retry.command.js +9 -0
- package/build/commands/auth/verify-email.command.js +1 -5
- package/build/commands/blog/delete-post.command.js +1 -3
- package/build/commands/category/delete-category.command.js +1 -3
- package/build/commands/chat/archive-all.command.js +1 -5
- package/build/commands/chat/delete-chat.command.js +1 -3
- package/build/commands/chat/delete-chat.command.v2.js +1 -3
- package/build/commands/page/delete-page.command.js +1 -3
- package/build/commands/product/delete-product.command.js +1 -3
- package/build/commands/subscription/cancel-subscription.command.js +1 -3
- package/build/commands/subscription/recover-subscription.command.js +1 -3
- package/build/constants/email/subjects.js +10 -0
- package/build/constants/errors/errors.js +5 -0
- package/build/models/ai-model.schema.js +1 -0
- package/commands/auth/index.ts +1 -1
- package/commands/auth/{reset-paasword.command.ts → reset-password.command.ts} +1 -5
- package/commands/auth/verify-email-retry.command.ts +10 -0
- package/commands/auth/verify-email.command.ts +1 -5
- package/commands/blog/delete-post.command.ts +1 -3
- package/commands/category/delete-category.command.ts +1 -3
- package/commands/chat/archive-all.command.ts +1 -6
- package/commands/chat/delete-chat.command.ts +1 -3
- package/commands/chat/delete-chat.command.v2.ts +1 -3
- package/commands/page/delete-page.command.ts +1 -3
- package/commands/product/delete-product.command.ts +1 -3
- package/commands/subscription/cancel-subscription.command.ts +1 -3
- package/commands/subscription/recover-subscription.command.ts +1 -3
- package/constants/email/subjects.ts +7 -0
- package/constants/errors/errors.ts +5 -0
- package/models/ai-model.schema.ts +1 -0
- package/package.json +1 -1
package/api/controllers/auth.ts
CHANGED
|
@@ -14,7 +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("./reset-
|
|
17
|
+
__exportStar(require("./reset-password.command"), exports);
|
|
18
18
|
__exportStar(require("./restore-password.command"), exports);
|
|
19
19
|
__exportStar(require("./login.command"), exports);
|
|
20
20
|
__exportStar(require("./register-user.command"), exports);
|
|
@@ -9,9 +9,5 @@ var ResetPasswordCommand;
|
|
|
9
9
|
newPassword: zod_1.z.string(),
|
|
10
10
|
userId: zod_1.z.string().uuid(),
|
|
11
11
|
});
|
|
12
|
-
ResetPasswordCommand.ResponseSchema = zod_1.z.
|
|
13
|
-
data: zod_1.z.object({
|
|
14
|
-
isSuccess: zod_1.z.boolean(),
|
|
15
|
-
}),
|
|
16
|
-
});
|
|
12
|
+
ResetPasswordCommand.ResponseSchema = zod_1.z.void();
|
|
17
13
|
})(ResetPasswordCommand || (exports.ResetPasswordCommand = ResetPasswordCommand = {}));
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.VerifyEmailRetryCommand = void 0;
|
|
4
|
+
const zod_1 = require("zod");
|
|
5
|
+
var VerifyEmailRetryCommand;
|
|
6
|
+
(function (VerifyEmailRetryCommand) {
|
|
7
|
+
VerifyEmailRetryCommand.RequestSchema = zod_1.z.object({});
|
|
8
|
+
VerifyEmailRetryCommand.ResponseSchema = zod_1.z.void();
|
|
9
|
+
})(VerifyEmailRetryCommand || (exports.VerifyEmailRetryCommand = VerifyEmailRetryCommand = {}));
|
|
@@ -9,9 +9,5 @@ var VerifyEmailCommand;
|
|
|
9
9
|
verifyTokenHash: true,
|
|
10
10
|
email: true,
|
|
11
11
|
});
|
|
12
|
-
VerifyEmailCommand.ResponseSchema = zod_1.z.
|
|
13
|
-
data: zod_1.z.object({
|
|
14
|
-
isSuccess: zod_1.z.boolean(),
|
|
15
|
-
}),
|
|
16
|
-
});
|
|
12
|
+
VerifyEmailCommand.ResponseSchema = zod_1.z.void();
|
|
17
13
|
})(VerifyEmailCommand || (exports.VerifyEmailCommand = VerifyEmailCommand = {}));
|
|
@@ -8,7 +8,5 @@ var DeletePostCommand;
|
|
|
8
8
|
DeletePostCommand.RequestSchema = models_1.PostSchema.pick({
|
|
9
9
|
uuid: true,
|
|
10
10
|
});
|
|
11
|
-
DeletePostCommand.ResponseSchema = zod_1.z.
|
|
12
|
-
isDeleted: zod_1.z.boolean(),
|
|
13
|
-
});
|
|
11
|
+
DeletePostCommand.ResponseSchema = zod_1.z.void();
|
|
14
12
|
})(DeletePostCommand || (exports.DeletePostCommand = DeletePostCommand = {}));
|
|
@@ -8,7 +8,5 @@ var DeleteCategoryCommand;
|
|
|
8
8
|
DeleteCategoryCommand.RequestSchema = category_schema_1.CategorySchema.pick({
|
|
9
9
|
uuid: true,
|
|
10
10
|
});
|
|
11
|
-
DeleteCategoryCommand.ResponseSchema = zod_1.z.
|
|
12
|
-
isDeleted: zod_1.z.boolean(),
|
|
13
|
-
});
|
|
11
|
+
DeleteCategoryCommand.ResponseSchema = zod_1.z.void();
|
|
14
12
|
})(DeleteCategoryCommand || (exports.DeleteCategoryCommand = DeleteCategoryCommand = {}));
|
|
@@ -4,9 +4,5 @@ exports.ArchiveAllCommand = void 0;
|
|
|
4
4
|
const zod_1 = require("zod");
|
|
5
5
|
var ArchiveAllCommand;
|
|
6
6
|
(function (ArchiveAllCommand) {
|
|
7
|
-
ArchiveAllCommand.ResponseSchema = zod_1.z.
|
|
8
|
-
data: zod_1.z.object({
|
|
9
|
-
isArchived: zod_1.z.boolean(),
|
|
10
|
-
}),
|
|
11
|
-
});
|
|
7
|
+
ArchiveAllCommand.ResponseSchema = zod_1.z.void();
|
|
12
8
|
})(ArchiveAllCommand || (exports.ArchiveAllCommand = ArchiveAllCommand = {}));
|
|
@@ -9,7 +9,5 @@ var DeleteChatCommand;
|
|
|
9
9
|
uuid: true,
|
|
10
10
|
categoryId: true,
|
|
11
11
|
});
|
|
12
|
-
DeleteChatCommand.ResponseSchema = zod_1.z.
|
|
13
|
-
isDeleted: zod_1.z.boolean(),
|
|
14
|
-
});
|
|
12
|
+
DeleteChatCommand.ResponseSchema = zod_1.z.void();
|
|
15
13
|
})(DeleteChatCommand || (exports.DeleteChatCommand = DeleteChatCommand = {}));
|
|
@@ -8,7 +8,5 @@ var DeleteChatV2Command;
|
|
|
8
8
|
DeleteChatV2Command.RequestSchema = models_1.ChatSchema.pick({
|
|
9
9
|
uuid: true,
|
|
10
10
|
});
|
|
11
|
-
DeleteChatV2Command.ResponseSchema = zod_1.z.
|
|
12
|
-
isDeleted: zod_1.z.boolean(),
|
|
13
|
-
});
|
|
11
|
+
DeleteChatV2Command.ResponseSchema = zod_1.z.void();
|
|
14
12
|
})(DeleteChatV2Command || (exports.DeleteChatV2Command = DeleteChatV2Command = {}));
|
|
@@ -8,7 +8,5 @@ var DeletePageCommand;
|
|
|
8
8
|
DeletePageCommand.RequestSchema = models_1.PageSchema.pick({
|
|
9
9
|
uuid: true,
|
|
10
10
|
});
|
|
11
|
-
DeletePageCommand.ResponseSchema = zod_1.z.
|
|
12
|
-
isDeleted: zod_1.z.boolean(),
|
|
13
|
-
});
|
|
11
|
+
DeletePageCommand.ResponseSchema = zod_1.z.void();
|
|
14
12
|
})(DeletePageCommand || (exports.DeletePageCommand = DeletePageCommand = {}));
|
|
@@ -8,7 +8,5 @@ var DeleteProductCommand;
|
|
|
8
8
|
DeleteProductCommand.RequestSchema = models_1.ProductSchema.pick({
|
|
9
9
|
uuid: true,
|
|
10
10
|
});
|
|
11
|
-
DeleteProductCommand.ResponseSchema = zod_1.z.
|
|
12
|
-
isDeleted: zod_1.z.boolean(),
|
|
13
|
-
});
|
|
11
|
+
DeleteProductCommand.ResponseSchema = zod_1.z.void();
|
|
14
12
|
})(DeleteProductCommand || (exports.DeleteProductCommand = DeleteProductCommand = {}));
|
|
@@ -10,7 +10,5 @@ var CancelSubscriptionCommand;
|
|
|
10
10
|
CancelSubscriptionCommand.RequestSchema = zod_1.z.object({
|
|
11
11
|
text: zod_1.z.string(),
|
|
12
12
|
});
|
|
13
|
-
CancelSubscriptionCommand.ResponseSchema = zod_1.z.
|
|
14
|
-
isSuccess: zod_1.z.boolean(),
|
|
15
|
-
});
|
|
13
|
+
CancelSubscriptionCommand.ResponseSchema = zod_1.z.void();
|
|
16
14
|
})(CancelSubscriptionCommand || (exports.CancelSubscriptionCommand = CancelSubscriptionCommand = {}));
|
|
@@ -7,7 +7,5 @@ var RecoverSubscriptionCommand;
|
|
|
7
7
|
RecoverSubscriptionCommand.RequestParamSchema = zod_1.z.object({
|
|
8
8
|
uuidSiteUserToSubscription: zod_1.z.string(),
|
|
9
9
|
});
|
|
10
|
-
RecoverSubscriptionCommand.ResponseSchema = zod_1.z.
|
|
11
|
-
isSuccess: zod_1.z.boolean(),
|
|
12
|
-
});
|
|
10
|
+
RecoverSubscriptionCommand.ResponseSchema = zod_1.z.void();
|
|
13
11
|
})(RecoverSubscriptionCommand || (exports.RecoverSubscriptionCommand = RecoverSubscriptionCommand = {}));
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.EMAIL_SUBJECTS = void 0;
|
|
4
|
+
exports.EMAIL_SUBJECTS = {
|
|
5
|
+
WELCOME: 'Добро пожаловать на сервис ruGPT!',
|
|
6
|
+
EMAIL_VERIFICATION: 'Подтверждение почты',
|
|
7
|
+
SUBSCRIPTION_PURCHASE: 'Спасибо за покупку подписки',
|
|
8
|
+
SUBSCRIPTION_CANCEL: 'Нам жаль, что вы от нас уходите(',
|
|
9
|
+
PRODUCT_PURCHASE: 'Спасибо за покупку тарифа',
|
|
10
|
+
};
|
|
@@ -12,6 +12,7 @@ exports.AiModelSchema = zod_1.z.object({
|
|
|
12
12
|
tokenMultiplicator: zod_1.z.number(),
|
|
13
13
|
order: zod_1.z.number(),
|
|
14
14
|
canUse: zod_1.z.optional(zod_1.z.boolean()),
|
|
15
|
+
icon: zod_1.z.nullable(zod_1.z.string()),
|
|
15
16
|
contentType: zod_1.z.enum(Object.values(constants_1.AI_MODEL_CONTENT_TYPE)),
|
|
16
17
|
createdAt: zod_1.z.date(),
|
|
17
18
|
updatedAt: zod_1.z.date(),
|
package/commands/auth/index.ts
CHANGED
|
@@ -9,10 +9,6 @@ export namespace ResetPasswordCommand {
|
|
|
9
9
|
|
|
10
10
|
export type Request = z.infer<typeof RequestSchema>;
|
|
11
11
|
|
|
12
|
-
export const ResponseSchema = z.
|
|
13
|
-
data: z.object({
|
|
14
|
-
isSuccess: z.boolean(),
|
|
15
|
-
}),
|
|
16
|
-
});
|
|
12
|
+
export const ResponseSchema = z.void();
|
|
17
13
|
export type Response = z.infer<typeof ResponseSchema>;
|
|
18
14
|
}
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import { z } from 'zod';
|
|
2
|
+
|
|
3
|
+
export namespace VerifyEmailRetryCommand {
|
|
4
|
+
export const RequestSchema = z.object({});
|
|
5
|
+
|
|
6
|
+
export type Request = z.infer<typeof RequestSchema>;
|
|
7
|
+
|
|
8
|
+
export const ResponseSchema = z.void();
|
|
9
|
+
export type Response = z.infer<typeof ResponseSchema>;
|
|
10
|
+
}
|
|
@@ -9,10 +9,6 @@ export namespace VerifyEmailCommand {
|
|
|
9
9
|
|
|
10
10
|
export type Request = z.infer<typeof RequestSchema>;
|
|
11
11
|
|
|
12
|
-
export const ResponseSchema = z.
|
|
13
|
-
data: z.object({
|
|
14
|
-
isSuccess: z.boolean(),
|
|
15
|
-
}),
|
|
16
|
-
});
|
|
12
|
+
export const ResponseSchema = z.void();
|
|
17
13
|
export type Response = z.infer<typeof ResponseSchema>;
|
|
18
14
|
}
|
|
@@ -8,8 +8,6 @@ export namespace DeletePostCommand {
|
|
|
8
8
|
|
|
9
9
|
export type Request = z.infer<typeof RequestSchema>;
|
|
10
10
|
|
|
11
|
-
export const ResponseSchema = z.
|
|
12
|
-
isDeleted: z.boolean(),
|
|
13
|
-
});
|
|
11
|
+
export const ResponseSchema = z.void();
|
|
14
12
|
export type Response = z.infer<typeof ResponseSchema>;
|
|
15
13
|
}
|
|
@@ -8,8 +8,6 @@ export namespace DeleteCategoryCommand {
|
|
|
8
8
|
|
|
9
9
|
export type Request = z.infer<typeof RequestSchema>;
|
|
10
10
|
|
|
11
|
-
export const ResponseSchema = z.
|
|
12
|
-
isDeleted: z.boolean(),
|
|
13
|
-
});
|
|
11
|
+
export const ResponseSchema = z.void();
|
|
14
12
|
export type Response = z.infer<typeof ResponseSchema>;
|
|
15
13
|
}
|
|
@@ -1,11 +1,6 @@
|
|
|
1
1
|
import { z } from 'zod';
|
|
2
2
|
|
|
3
3
|
export namespace ArchiveAllCommand {
|
|
4
|
-
export const ResponseSchema = z.
|
|
5
|
-
data: z.object({
|
|
6
|
-
isArchived: z.boolean(),
|
|
7
|
-
}),
|
|
8
|
-
});
|
|
9
|
-
|
|
4
|
+
export const ResponseSchema = z.void();
|
|
10
5
|
export type Response = z.infer<typeof ResponseSchema>;
|
|
11
6
|
}
|
|
@@ -9,8 +9,6 @@ export namespace DeleteChatCommand {
|
|
|
9
9
|
|
|
10
10
|
export type Request = z.infer<typeof RequestSchema>;
|
|
11
11
|
|
|
12
|
-
export const ResponseSchema = z.
|
|
13
|
-
isDeleted: z.boolean(),
|
|
14
|
-
});
|
|
12
|
+
export const ResponseSchema = z.void();
|
|
15
13
|
export type Response = z.infer<typeof ResponseSchema>;
|
|
16
14
|
}
|
|
@@ -8,8 +8,6 @@ export namespace DeleteChatV2Command {
|
|
|
8
8
|
|
|
9
9
|
export type Request = z.infer<typeof RequestSchema>;
|
|
10
10
|
|
|
11
|
-
export const ResponseSchema = z.
|
|
12
|
-
isDeleted: z.boolean(),
|
|
13
|
-
});
|
|
11
|
+
export const ResponseSchema = z.void();
|
|
14
12
|
export type Response = z.infer<typeof ResponseSchema>;
|
|
15
13
|
}
|
|
@@ -8,8 +8,6 @@ export namespace DeletePageCommand {
|
|
|
8
8
|
|
|
9
9
|
export type Request = z.infer<typeof RequestSchema>;
|
|
10
10
|
|
|
11
|
-
export const ResponseSchema = z.
|
|
12
|
-
isDeleted: z.boolean(),
|
|
13
|
-
});
|
|
11
|
+
export const ResponseSchema = z.void();
|
|
14
12
|
export type Response = z.infer<typeof ResponseSchema>;
|
|
15
13
|
}
|
|
@@ -8,8 +8,6 @@ export namespace DeleteProductCommand {
|
|
|
8
8
|
|
|
9
9
|
export type Request = z.infer<typeof RequestSchema>;
|
|
10
10
|
|
|
11
|
-
export const ResponseSchema = z.
|
|
12
|
-
isDeleted: z.boolean(),
|
|
13
|
-
});
|
|
11
|
+
export const ResponseSchema = z.void();
|
|
14
12
|
export type Response = z.infer<typeof ResponseSchema>;
|
|
15
13
|
}
|
|
@@ -13,9 +13,7 @@ export namespace CancelSubscriptionCommand {
|
|
|
13
13
|
|
|
14
14
|
export type Request = z.infer<typeof RequestSchema>;
|
|
15
15
|
|
|
16
|
-
export const ResponseSchema = z.
|
|
17
|
-
isSuccess: z.boolean(),
|
|
18
|
-
});
|
|
16
|
+
export const ResponseSchema = z.void();
|
|
19
17
|
|
|
20
18
|
export type Response = z.infer<typeof ResponseSchema>;
|
|
21
19
|
}
|
|
@@ -7,9 +7,7 @@ export namespace RecoverSubscriptionCommand {
|
|
|
7
7
|
|
|
8
8
|
export type RequestParam = z.infer<typeof RequestParamSchema>;
|
|
9
9
|
|
|
10
|
-
export const ResponseSchema = z.
|
|
11
|
-
isSuccess: z.boolean(),
|
|
12
|
-
});
|
|
10
|
+
export const ResponseSchema = z.void();
|
|
13
11
|
|
|
14
12
|
export type Response = z.infer<typeof ResponseSchema>;
|
|
15
13
|
}
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
export const EMAIL_SUBJECTS = {
|
|
2
|
+
WELCOME: 'Добро пожаловать на сервис ruGPT!',
|
|
3
|
+
EMAIL_VERIFICATION: 'Подтверждение почты',
|
|
4
|
+
SUBSCRIPTION_PURCHASE: 'Спасибо за покупку подписки',
|
|
5
|
+
SUBSCRIPTION_CANCEL: 'Нам жаль, что вы от нас уходите(',
|
|
6
|
+
PRODUCT_PURCHASE: 'Спасибо за покупку тарифа',
|
|
7
|
+
};
|
|
@@ -10,6 +10,7 @@ export const AiModelSchema = z.object({
|
|
|
10
10
|
tokenMultiplicator: z.number(),
|
|
11
11
|
order: z.number(),
|
|
12
12
|
canUse: z.optional(z.boolean()),
|
|
13
|
+
icon: z.nullable(z.string()),
|
|
13
14
|
contentType: z.enum(Object.values(AI_MODEL_CONTENT_TYPE) as [TAIModelContentTypeEnum]),
|
|
14
15
|
createdAt: z.date(),
|
|
15
16
|
updatedAt: z.date(),
|