@purpleschool/gptbot 0.3.5 → 0.3.7
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/user.ts +1 -0
- package/api/routes.ts +1 -0
- package/build/api/controllers/user.js +1 -0
- package/build/api/routes.js +1 -0
- package/build/commands/user/check-email.command.js +10 -0
- package/build/commands/user/index.js +1 -0
- package/build/constants/email/email-endpoint.js +4 -0
- package/commands/blog/find-post-by-uuid.command.ts +2 -0
- package/commands/chat/create-chat.command.ts +1 -2
- package/commands/subscription/buy-subscription.command.ts +1 -2
- package/commands/user/check-email.command.ts +7 -0
- package/commands/user/index.ts +1 -0
- package/constants/email/email-endpoint.ts +1 -0
- package/constants/errors/errors.ts +3 -3
- package/constants/user/user-public.ts +1 -1
- package/package.json +1 -1
package/api/controllers/user.ts
CHANGED
package/api/routes.ts
CHANGED
|
@@ -14,6 +14,7 @@ export const REST_API = {
|
|
|
14
14
|
USERS: {
|
|
15
15
|
GET: `${ROOT}/${CONTROLLERS.USER_CONTROLLER}/${CONTROLLERS.USER_ROUTES.GET}`,
|
|
16
16
|
POST: `${ROOT}/${CONTROLLERS.USER_CONTROLLER}/${CONTROLLERS.USER_ROUTES.POST}`,
|
|
17
|
+
CHECK_EMAIL: `${ROOT}/${CONTROLLERS.USER_CONTROLLER}/${CONTROLLERS.USER_ROUTES.CHECK_EMAIL}`,
|
|
17
18
|
},
|
|
18
19
|
PAGE: {
|
|
19
20
|
GET: `${ROOT}/${CONTROLLERS.PAGE_CONTROLLER}/${CONTROLLERS.PAGE_ROUTES.GET_ALL}`,
|
package/build/api/routes.js
CHANGED
|
@@ -38,6 +38,7 @@ exports.REST_API = {
|
|
|
38
38
|
USERS: {
|
|
39
39
|
GET: `${exports.ROOT}/${CONTROLLERS.USER_CONTROLLER}/${CONTROLLERS.USER_ROUTES.GET}`,
|
|
40
40
|
POST: `${exports.ROOT}/${CONTROLLERS.USER_CONTROLLER}/${CONTROLLERS.USER_ROUTES.POST}`,
|
|
41
|
+
CHECK_EMAIL: `${exports.ROOT}/${CONTROLLERS.USER_CONTROLLER}/${CONTROLLERS.USER_ROUTES.CHECK_EMAIL}`,
|
|
41
42
|
},
|
|
42
43
|
PAGE: {
|
|
43
44
|
GET: `${exports.ROOT}/${CONTROLLERS.PAGE_CONTROLLER}/${CONTROLLERS.PAGE_ROUTES.GET_ALL}`,
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.CheckEmailCommand = void 0;
|
|
4
|
+
const zod_1 = require("zod");
|
|
5
|
+
var CheckEmailCommand;
|
|
6
|
+
(function (CheckEmailCommand) {
|
|
7
|
+
CheckEmailCommand.RequestSchema = zod_1.z.object({
|
|
8
|
+
email: zod_1.z.string().email(),
|
|
9
|
+
});
|
|
10
|
+
})(CheckEmailCommand || (exports.CheckEmailCommand = CheckEmailCommand = {}));
|
|
@@ -16,3 +16,4 @@ var __exportStar = (this && this.__exportStar) || function(m, exports) {
|
|
|
16
16
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
17
17
|
__exportStar(require("./find-user.command"), exports);
|
|
18
18
|
__exportStar(require("./up-token-bonus-balance.command"), exports);
|
|
19
|
+
__exportStar(require("./check-email.command"), exports);
|
|
@@ -8,10 +8,9 @@ export namespace CreateChatCommand {
|
|
|
8
8
|
|
|
9
9
|
export type RequestByParam = z.infer<typeof RequestSchemaByParam>;
|
|
10
10
|
|
|
11
|
-
|
|
12
11
|
export const RequestSchema = z.object({
|
|
13
12
|
aiModelUUID: z.string(),
|
|
14
|
-
})
|
|
13
|
+
});
|
|
15
14
|
export const ResponseSchema = z.object({
|
|
16
15
|
data: ChatSchema.extend({
|
|
17
16
|
messages: z.array(MessageSchema),
|
|
@@ -8,7 +8,7 @@ export namespace BuySubscriptionCommand {
|
|
|
8
8
|
|
|
9
9
|
export const RequestSchema = z.object({
|
|
10
10
|
useDiscount: z.boolean(),
|
|
11
|
-
})
|
|
11
|
+
});
|
|
12
12
|
|
|
13
13
|
export type Request = z.infer<typeof RequestSchema>;
|
|
14
14
|
export const RequestFastSchema = z.object({
|
|
@@ -67,5 +67,4 @@ export namespace BuySubscriptionCommand {
|
|
|
67
67
|
});
|
|
68
68
|
|
|
69
69
|
export type ResponseFast = z.infer<typeof ResponseFastSchema>;
|
|
70
|
-
|
|
71
70
|
}
|
package/commands/user/index.ts
CHANGED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export const EmailEndpoint = 'https://api.beta.rusender.ru/api/v1/external-mails/send';
|
|
@@ -229,9 +229,9 @@ export const ERRORS = {
|
|
|
229
229
|
httpCode: 404,
|
|
230
230
|
},
|
|
231
231
|
SUBSCRIPTION_BUY_ERROR: {
|
|
232
|
-
|
|
233
|
-
|
|
234
|
-
|
|
232
|
+
code: 'A097',
|
|
233
|
+
message: 'Подписка не была куплена',
|
|
234
|
+
httpCode: 500,
|
|
235
235
|
},
|
|
236
236
|
SUBSCRIPTION_UPDATE_ERROR: {
|
|
237
237
|
code: 'A055',
|
|
@@ -1 +1 @@
|
|
|
1
|
-
export const USER_PUBLIC = 'public'
|
|
1
|
+
export const USER_PUBLIC = 'public';
|