@purpleschool/gptbot 0.5.13 → 0.5.14
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/index.ts +10 -8
- package/api/controllers/referral.ts +5 -0
- package/build/api/controllers/index.js +10 -8
- package/build/api/controllers/referral.js +7 -0
- package/build/commands/ai-model/index.js +2 -2
- package/build/commands/auth/index.js +4 -3
- package/build/commands/auth/register-user.command.js +3 -4
- package/build/commands/blog/index.js +2 -2
- package/build/commands/category/index.js +2 -2
- package/build/commands/chat/index.js +9 -8
- package/build/commands/index.js +8 -7
- package/build/commands/message/index.js +1 -1
- package/build/commands/page/index.js +3 -3
- package/build/commands/product/buy-product.command.js +1 -0
- package/build/commands/product/index.js +3 -3
- package/build/commands/question/index.js +2 -2
- package/build/commands/referral/get-by-bonuses.command.js +15 -0
- package/build/commands/referral/index.js +17 -0
- package/build/commands/subscription/buy-subscription.command.js +1 -0
- package/build/commands/subscription/index.js +6 -5
- package/build/commands/user/index.js +1 -1
- package/build/constants/category/enums/index.js +1 -1
- package/build/constants/chat/enums/index.js +1 -1
- package/build/constants/domains/index.js +17 -0
- package/build/constants/email/index.js +18 -0
- package/build/constants/errors/errors.js +25 -0
- package/build/constants/index.js +13 -7
- package/build/constants/payment/enums/index.js +1 -1
- package/build/constants/referral/enums/index.js +17 -0
- package/build/constants/referral/enums/referral-bonus-type.enum.js +8 -0
- package/build/constants/referral/index.js +17 -0
- package/build/constants/subscription/enums/index.js +3 -3
- package/build/constants/transaction/enums/index.js +17 -0
- package/build/constants/transaction/enums/user-balance-status.enum.js +1 -0
- package/build/constants/transaction/index.js +17 -0
- package/build/constants/user/enums/index.js +17 -0
- package/build/constants/user/index.js +18 -0
- package/build/index.js +3 -3
- package/build/models/index.js +11 -7
- package/build/models/referral-bonus.schema.js +19 -0
- package/commands/ai-model/index.ts +2 -2
- package/commands/auth/index.ts +4 -3
- package/commands/auth/register-user.command.ts +6 -4
- package/commands/blog/index.ts +2 -2
- package/commands/category/index.ts +2 -2
- package/commands/chat/index.ts +9 -8
- package/commands/index.ts +8 -7
- package/commands/message/index.ts +1 -1
- package/commands/page/index.ts +3 -3
- package/commands/product/buy-product.command.ts +1 -0
- package/commands/product/index.ts +3 -3
- package/commands/question/index.ts +2 -2
- package/commands/referral/get-by-bonuses.command.ts +14 -0
- package/commands/referral/index.ts +1 -0
- package/commands/subscription/buy-subscription.command.ts +1 -0
- package/commands/subscription/index.ts +6 -5
- package/commands/user/index.ts +1 -1
- package/constants/category/enums/index.ts +1 -1
- package/constants/chat/enums/index.ts +1 -1
- package/constants/domains/index.ts +1 -0
- package/constants/email/index.ts +2 -0
- package/constants/errors/errors.ts +25 -0
- package/constants/index.ts +13 -7
- package/constants/payment/enums/index.ts +1 -1
- package/constants/referral/enums/index.ts +1 -0
- package/constants/referral/enums/referral-bonus-type.enum.ts +4 -0
- package/constants/referral/index.ts +1 -0
- package/constants/subscription/enums/index.ts +3 -3
- package/constants/transaction/enums/index.ts +2 -0
- package/constants/transaction/enums/user-balance-status.enum.ts +1 -0
- package/constants/transaction/index.ts +1 -0
- package/constants/user/enums/index.ts +1 -0
- package/constants/user/index.ts +2 -0
- package/index.ts +3 -3
- package/models/index.ts +11 -7
- package/models/referral-bonus.schema.ts +18 -0
- package/package.json +1 -1
package/api/controllers/index.ts
CHANGED
|
@@ -1,15 +1,17 @@
|
|
|
1
|
+
export * from './ai-model';
|
|
1
2
|
export * from './auth';
|
|
2
|
-
export * from './
|
|
3
|
-
export * from './page';
|
|
3
|
+
export * from './blog';
|
|
4
4
|
export * from './category';
|
|
5
|
-
export * from './question';
|
|
6
|
-
export * from './unregistered-user';
|
|
7
|
-
export * from './ai-model';
|
|
8
5
|
export * from './chat-private';
|
|
9
6
|
export * from './chat-public';
|
|
10
|
-
export * from './
|
|
11
|
-
export * from './subscription';
|
|
7
|
+
export * from './cloud-payments';
|
|
12
8
|
export * from './files';
|
|
13
|
-
export * from './
|
|
9
|
+
export * from './referral';
|
|
14
10
|
export * from './message';
|
|
11
|
+
export * from './page';
|
|
15
12
|
export * from './payment';
|
|
13
|
+
export * from './product';
|
|
14
|
+
export * from './question';
|
|
15
|
+
export * from './subscription';
|
|
16
|
+
export * from './unregistered-user';
|
|
17
|
+
export * from './user';
|
|
@@ -14,18 +14,20 @@ 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("./ai-model"), exports);
|
|
17
18
|
__exportStar(require("./auth"), exports);
|
|
18
|
-
__exportStar(require("./
|
|
19
|
-
__exportStar(require("./page"), exports);
|
|
19
|
+
__exportStar(require("./blog"), exports);
|
|
20
20
|
__exportStar(require("./category"), exports);
|
|
21
|
-
__exportStar(require("./question"), exports);
|
|
22
|
-
__exportStar(require("./unregistered-user"), exports);
|
|
23
|
-
__exportStar(require("./ai-model"), exports);
|
|
24
21
|
__exportStar(require("./chat-private"), exports);
|
|
25
22
|
__exportStar(require("./chat-public"), exports);
|
|
26
|
-
__exportStar(require("./
|
|
27
|
-
__exportStar(require("./subscription"), exports);
|
|
23
|
+
__exportStar(require("./cloud-payments"), exports);
|
|
28
24
|
__exportStar(require("./files"), exports);
|
|
29
|
-
__exportStar(require("./
|
|
25
|
+
__exportStar(require("./referral"), exports);
|
|
30
26
|
__exportStar(require("./message"), exports);
|
|
27
|
+
__exportStar(require("./page"), exports);
|
|
31
28
|
__exportStar(require("./payment"), exports);
|
|
29
|
+
__exportStar(require("./product"), exports);
|
|
30
|
+
__exportStar(require("./question"), exports);
|
|
31
|
+
__exportStar(require("./subscription"), exports);
|
|
32
|
+
__exportStar(require("./unregistered-user"), exports);
|
|
33
|
+
__exportStar(require("./user"), exports);
|
|
@@ -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("./update-ai-model.command"), exports);
|
|
18
|
-
__exportStar(require("./delete-ai-model.command"), exports);
|
|
19
17
|
__exportStar(require("./create-ai-model.command"), exports);
|
|
18
|
+
__exportStar(require("./delete-ai-model.command"), exports);
|
|
20
19
|
__exportStar(require("./find-ai-model.command"), exports);
|
|
20
|
+
__exportStar(require("./update-ai-model.command"), exports);
|
|
@@ -14,9 +14,10 @@ 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("./
|
|
18
|
-
__exportStar(require("./restore-password.command"), exports);
|
|
17
|
+
__exportStar(require("./create-user.command"), exports);
|
|
19
18
|
__exportStar(require("./login.command"), exports);
|
|
20
19
|
__exportStar(require("./register-user.command"), exports);
|
|
21
|
-
__exportStar(require("./
|
|
20
|
+
__exportStar(require("./reset-password.command"), exports);
|
|
21
|
+
__exportStar(require("./restore-password.command"), exports);
|
|
22
|
+
__exportStar(require("./verify-email-retry.command"), exports);
|
|
22
23
|
__exportStar(require("./verify-email.command"), exports);
|
|
@@ -5,10 +5,9 @@ const models_1 = require("../../models");
|
|
|
5
5
|
const zod_1 = require("zod");
|
|
6
6
|
var RegisterUserCommand;
|
|
7
7
|
(function (RegisterUserCommand) {
|
|
8
|
-
RegisterUserCommand.RequestSchema = models_1.UserSchema.pick({
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
});
|
|
8
|
+
RegisterUserCommand.RequestSchema = zod_1.z.intersection(models_1.UserSchema.pick({ email: true, password: true }), zod_1.z.object({
|
|
9
|
+
partnerId: zod_1.z.string().uuid().optional(),
|
|
10
|
+
}));
|
|
12
11
|
RegisterUserCommand.ResponseSchema = zod_1.z.object({
|
|
13
12
|
data: zod_1.z.object({
|
|
14
13
|
accessToken: zod_1.z.string(),
|
|
@@ -15,8 +15,8 @@ var __exportStar = (this && this.__exportStar) || function(m, exports) {
|
|
|
15
15
|
};
|
|
16
16
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
17
17
|
__exportStar(require("./create-post.command"), exports);
|
|
18
|
-
__exportStar(require("./update-post.command"), exports);
|
|
19
18
|
__exportStar(require("./delete-post.command"), exports);
|
|
20
|
-
__exportStar(require("./find-post-by-uuid.command"), exports);
|
|
21
19
|
__exportStar(require("./find-post-by-alias.command"), exports);
|
|
20
|
+
__exportStar(require("./find-post-by-uuid.command"), exports);
|
|
22
21
|
__exportStar(require("./find-post.command"), exports);
|
|
22
|
+
__exportStar(require("./update-post.command"), exports);
|
|
@@ -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("./update-category.command"), exports);
|
|
18
|
-
__exportStar(require("./delete-category.command"), exports);
|
|
19
17
|
__exportStar(require("./create-category.command"), exports);
|
|
18
|
+
__exportStar(require("./delete-category.command"), exports);
|
|
20
19
|
__exportStar(require("./find-category.command"), exports);
|
|
20
|
+
__exportStar(require("./update-category.command"), exports);
|
|
@@ -14,15 +14,16 @@ 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("./
|
|
18
|
-
__exportStar(require("./delete-chat.command"), exports);
|
|
19
|
-
__exportStar(require("./create-chat.command"), exports);
|
|
20
|
-
__exportStar(require("./find-chat.command"), exports);
|
|
21
|
-
__exportStar(require("./get-my-last-active-chat.command"), exports);
|
|
17
|
+
__exportStar(require("./archive-all.command"), exports);
|
|
22
18
|
__exportStar(require("./check-limit.command"), exports);
|
|
23
19
|
__exportStar(require("./check-limit.command.v2"), exports);
|
|
24
|
-
__exportStar(require("./
|
|
20
|
+
__exportStar(require("./create-chat.command"), exports);
|
|
25
21
|
__exportStar(require("./create-chat.command.v2"), exports);
|
|
26
|
-
__exportStar(require("./
|
|
27
|
-
__exportStar(require("./archive-all.command"), exports);
|
|
22
|
+
__exportStar(require("./delete-chat.command"), exports);
|
|
28
23
|
__exportStar(require("./delete-chat.command.v2"), exports);
|
|
24
|
+
__exportStar(require("./find-chat-by-uuid.command"), exports);
|
|
25
|
+
__exportStar(require("./find-chat.command"), exports);
|
|
26
|
+
__exportStar(require("./find-chats.command"), exports);
|
|
27
|
+
__exportStar(require("./get-my-last-active-chat-command.v2"), exports);
|
|
28
|
+
__exportStar(require("./get-my-last-active-chat.command"), exports);
|
|
29
|
+
__exportStar(require("./update-chat.command"), exports);
|
package/build/commands/index.js
CHANGED
|
@@ -14,17 +14,18 @@ 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("./ai-model"), exports);
|
|
17
18
|
__exportStar(require("./auth"), exports);
|
|
18
|
-
__exportStar(require("./
|
|
19
|
-
__exportStar(require("./page"), exports);
|
|
19
|
+
__exportStar(require("./blog"), exports);
|
|
20
20
|
__exportStar(require("./category"), exports);
|
|
21
|
-
__exportStar(require("./question"), exports);
|
|
22
|
-
__exportStar(require("./unregistered-user"), exports);
|
|
23
|
-
__exportStar(require("./ai-model"), exports);
|
|
24
21
|
__exportStar(require("./chat"), exports);
|
|
25
22
|
__exportStar(require("./message"), exports);
|
|
23
|
+
__exportStar(require("./page"), exports);
|
|
24
|
+
__exportStar(require("./payment"), exports);
|
|
26
25
|
__exportStar(require("./product"), exports);
|
|
26
|
+
__exportStar(require("./question"), exports);
|
|
27
|
+
__exportStar(require("./referral"), exports);
|
|
27
28
|
__exportStar(require("./subscription"), exports);
|
|
28
|
-
__exportStar(require("./
|
|
29
|
+
__exportStar(require("./unregistered-user"), exports);
|
|
30
|
+
__exportStar(require("./user"), exports);
|
|
29
31
|
__exportStar(require("./user-to-subscription"), exports);
|
|
30
|
-
__exportStar(require("./payment"), exports);
|
|
@@ -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("./create-image-message.command"), exports);
|
|
17
18
|
__exportStar(require("./create-message.command"), exports);
|
|
18
19
|
__exportStar(require("./create-text-message.command"), exports);
|
|
19
|
-
__exportStar(require("./create-image-message.command"), exports);
|
|
20
20
|
__exportStar(require("./rate-message.command"), exports);
|
|
@@ -14,8 +14,8 @@ 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("./update-page.command"), exports);
|
|
18
|
-
__exportStar(require("./delete-page.command"), exports);
|
|
19
17
|
__exportStar(require("./create-page.command"), exports);
|
|
20
|
-
__exportStar(require("./
|
|
18
|
+
__exportStar(require("./delete-page.command"), exports);
|
|
21
19
|
__exportStar(require("./find-page-by-alias.command"), exports);
|
|
20
|
+
__exportStar(require("./find-page.command"), exports);
|
|
21
|
+
__exportStar(require("./update-page.command"), exports);
|
|
@@ -27,6 +27,7 @@ var BuyProductCommand;
|
|
|
27
27
|
});
|
|
28
28
|
BuyProductCommand.RequestFastSchema = zod_1.z.object({
|
|
29
29
|
email: zod_1.z.string().email(),
|
|
30
|
+
partnerId: zod_1.z.string().uuid().optional(),
|
|
30
31
|
});
|
|
31
32
|
BuyProductCommand.ResponseSchema = zod_1.z.object({
|
|
32
33
|
publicId: zod_1.z.string(),
|
|
@@ -14,8 +14,8 @@ 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("./
|
|
18
|
-
__exportStar(require("./delete-product.command"), exports);
|
|
17
|
+
__exportStar(require("./buy-product.command"), exports);
|
|
19
18
|
__exportStar(require("./create-product.command"), exports);
|
|
19
|
+
__exportStar(require("./delete-product.command"), exports);
|
|
20
20
|
__exportStar(require("./find-product.command"), exports);
|
|
21
|
-
__exportStar(require("./
|
|
21
|
+
__exportStar(require("./update-product.command"), exports);
|
|
@@ -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("./update-question.command"), exports);
|
|
18
|
-
__exportStar(require("./delete-question.command"), exports);
|
|
19
17
|
__exportStar(require("./create-question.command"), exports);
|
|
18
|
+
__exportStar(require("./delete-question.command"), exports);
|
|
20
19
|
__exportStar(require("./find-question.command"), exports);
|
|
20
|
+
__exportStar(require("./update-question.command"), exports);
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.GetMyBonusesCommand = void 0;
|
|
4
|
+
const models_1 = require("../../models");
|
|
5
|
+
const zod_1 = require("zod");
|
|
6
|
+
var GetMyBonusesCommand;
|
|
7
|
+
(function (GetMyBonusesCommand) {
|
|
8
|
+
GetMyBonusesCommand.ResponseSchema = zod_1.z.object({
|
|
9
|
+
data: zod_1.z.object({
|
|
10
|
+
sumTotal: zod_1.z.number(),
|
|
11
|
+
sumInitial: zod_1.z.number(),
|
|
12
|
+
statistics: zod_1.z.array(models_1.ReferralBonusStatisticsSchema),
|
|
13
|
+
}),
|
|
14
|
+
});
|
|
15
|
+
})(GetMyBonusesCommand || (exports.GetMyBonusesCommand = GetMyBonusesCommand = {}));
|
|
@@ -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("./get-by-bonuses.command"), exports);
|
|
@@ -13,6 +13,7 @@ var BuySubscriptionCommand;
|
|
|
13
13
|
});
|
|
14
14
|
BuySubscriptionCommand.RequestFastSchema = zod_1.z.object({
|
|
15
15
|
email: zod_1.z.string().email(),
|
|
16
|
+
partnerId: zod_1.z.string().uuid().optional(),
|
|
16
17
|
});
|
|
17
18
|
const IReceiptOrderSchema = zod_1.z.object({
|
|
18
19
|
items: zod_1.z.array(zod_1.z.object({
|
|
@@ -14,12 +14,13 @@ 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("./
|
|
18
|
-
__exportStar(require("./
|
|
17
|
+
__exportStar(require("./buy-subscription.command"), exports);
|
|
18
|
+
__exportStar(require("./cancel-subscription.command"), exports);
|
|
19
|
+
__exportStar(require("./create-custom-subscription-plan.command"), exports);
|
|
19
20
|
__exportStar(require("./create-subscription.command"), exports);
|
|
21
|
+
__exportStar(require("./delete-subscription.command"), exports);
|
|
20
22
|
__exportStar(require("./find-subscription.command"), exports);
|
|
21
|
-
__exportStar(require("./cancel-subscription.command"), exports);
|
|
22
|
-
__exportStar(require("./recover-subscription.command"), exports);
|
|
23
23
|
__exportStar(require("./get-available-upgrades.command"), exports);
|
|
24
|
+
__exportStar(require("./recover-subscription.command"), exports);
|
|
24
25
|
__exportStar(require("./update-subscription.command"), exports);
|
|
25
|
-
__exportStar(require("./
|
|
26
|
+
__exportStar(require("./upgrade-subscription.command"), exports);
|
|
@@ -14,6 +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("./check-email.command"), exports);
|
|
17
18
|
__exportStar(require("./find-user.command"), exports);
|
|
18
19
|
__exportStar(require("./up-token-bonus-balance.command"), exports);
|
|
19
|
-
__exportStar(require("./check-email.command"), exports);
|
|
@@ -14,5 +14,5 @@ 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("./category-type.enum"), exports);
|
|
18
17
|
__exportStar(require("./category-content-type.enum"), exports);
|
|
18
|
+
__exportStar(require("./category-type.enum"), exports);
|
|
@@ -15,5 +15,5 @@ var __exportStar = (this && this.__exportStar) || function(m, exports) {
|
|
|
15
15
|
};
|
|
16
16
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
17
17
|
__exportStar(require("./chat-status.enum"), exports);
|
|
18
|
-
__exportStar(require("./dalle-image-size.enum"), exports);
|
|
19
18
|
__exportStar(require("./dalle-image-format.enum"), exports);
|
|
19
|
+
__exportStar(require("./dalle-image-size.enum"), 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("./white-list"), exports);
|
|
@@ -0,0 +1,18 @@
|
|
|
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("./email-endpoint"), exports);
|
|
18
|
+
__exportStar(require("./subjects"), exports);
|
|
@@ -555,4 +555,29 @@ exports.ERRORS = {
|
|
|
555
555
|
message: 'Невозможно улучшить подписку с данными параметрами',
|
|
556
556
|
httpCode: 400,
|
|
557
557
|
},
|
|
558
|
+
PARTNER_NOT_FOUND: {
|
|
559
|
+
code: 'A125',
|
|
560
|
+
message: 'Не удалось найти партнера по реферальной программе',
|
|
561
|
+
httpCode: 404,
|
|
562
|
+
},
|
|
563
|
+
REFERRAL_BONUSES_NOT_FOUND: {
|
|
564
|
+
code: 'A126',
|
|
565
|
+
message: 'Не удалось найти бонусы по реферальной программе',
|
|
566
|
+
httpCode: 404,
|
|
567
|
+
},
|
|
568
|
+
REFERRAL_BONUS_UPDATE_ERROR: {
|
|
569
|
+
code: 'A127',
|
|
570
|
+
message: 'Не удалось обновить бонусы по реферальной программе',
|
|
571
|
+
httpCode: 500,
|
|
572
|
+
},
|
|
573
|
+
REFERRAL_BONUS_STATS_ERROR: {
|
|
574
|
+
code: 'A128',
|
|
575
|
+
message: 'Не удалось получить статистику по бонусам по реферальной программе',
|
|
576
|
+
httpCode: 500,
|
|
577
|
+
},
|
|
578
|
+
REFERRAL_BONUS_APPLY_ERROR: {
|
|
579
|
+
code: 'A129',
|
|
580
|
+
message: 'Не удалось применить бонусы по реферальной программе',
|
|
581
|
+
httpCode: 500,
|
|
582
|
+
},
|
|
558
583
|
};
|
package/build/constants/index.js
CHANGED
|
@@ -14,13 +14,19 @@ 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("./ai-model"), exports);
|
|
18
|
+
__exportStar(require("./category"), exports);
|
|
19
|
+
__exportStar(require("./chat"), exports);
|
|
20
|
+
__exportStar(require("./cloud-payments"), exports);
|
|
21
|
+
__exportStar(require("./domains"), exports);
|
|
22
|
+
__exportStar(require("./email"), exports);
|
|
17
23
|
__exportStar(require("./errors"), exports);
|
|
18
|
-
__exportStar(require("./
|
|
19
|
-
__exportStar(require("./payment"), exports);
|
|
24
|
+
__exportStar(require("./message"), exports);
|
|
20
25
|
__exportStar(require("./order"), exports);
|
|
21
|
-
__exportStar(require("./
|
|
22
|
-
__exportStar(require("./subscription"), exports);
|
|
26
|
+
__exportStar(require("./payment"), exports);
|
|
23
27
|
__exportStar(require("./product"), exports);
|
|
24
|
-
__exportStar(require("./
|
|
25
|
-
__exportStar(require("./
|
|
26
|
-
__exportStar(require("./
|
|
28
|
+
__exportStar(require("./referral"), exports);
|
|
29
|
+
__exportStar(require("./roles"), exports);
|
|
30
|
+
__exportStar(require("./subscription"), exports);
|
|
31
|
+
__exportStar(require("./transaction"), exports);
|
|
32
|
+
__exportStar(require("./user"), exports);
|
|
@@ -14,5 +14,5 @@ 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("./payment-status.enum"), exports);
|
|
18
17
|
__exportStar(require("./payment-history-item-type.enum"), exports);
|
|
18
|
+
__exportStar(require("./payment-status.enum"), 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("./referral-bonus-type.enum"), exports);
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.ReferralBonusType = void 0;
|
|
4
|
+
var ReferralBonusType;
|
|
5
|
+
(function (ReferralBonusType) {
|
|
6
|
+
ReferralBonusType["PARTNER"] = "partner";
|
|
7
|
+
ReferralBonusType["REFERRAL"] = "referral";
|
|
8
|
+
})(ReferralBonusType || (exports.ReferralBonusType = ReferralBonusType = {}));
|
|
@@ -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);
|
|
@@ -14,8 +14,8 @@ 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("./subscription-
|
|
17
|
+
__exportStar(require("./subscription-action.enum"), exports);
|
|
18
18
|
__exportStar(require("./subscription-plan.enum"), exports);
|
|
19
|
-
__exportStar(require("./
|
|
19
|
+
__exportStar(require("./subscription-status.enum"), exports);
|
|
20
20
|
__exportStar(require("./subscription-type.enum"), exports);
|
|
21
|
-
__exportStar(require("./subscription-
|
|
21
|
+
__exportStar(require("./user-to-subscription-type.enum"), exports);
|
|
@@ -1 +1,18 @@
|
|
|
1
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("./transaction-status.enum"), exports);
|
|
18
|
+
__exportStar(require("./user-balance-status.enum"), exports);
|
|
@@ -6,4 +6,5 @@ var USER_BALANCE_STATUS;
|
|
|
6
6
|
USER_BALANCE_STATUS["bonus_balance"] = "bonus_balance";
|
|
7
7
|
USER_BALANCE_STATUS["subscription_balance"] = "subscription_balance";
|
|
8
8
|
USER_BALANCE_STATUS["product_balance"] = "product_balance";
|
|
9
|
+
USER_BALANCE_STATUS["referral_bonus_balance"] = "referral_bonus_balance";
|
|
9
10
|
})(USER_BALANCE_STATUS || (exports.USER_BALANCE_STATUS = USER_BALANCE_STATUS = {}));
|
|
@@ -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);
|
|
@@ -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("./user-status"), exports);
|
|
@@ -0,0 +1,18 @@
|
|
|
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);
|
|
18
|
+
__exportStar(require("./user-public"), exports);
|
package/build/index.js
CHANGED
|
@@ -14,8 +14,8 @@ 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("./constants"), exports);
|
|
18
|
-
__exportStar(require("./commands"), exports);
|
|
19
17
|
__exportStar(require("./api"), exports);
|
|
20
|
-
__exportStar(require("./
|
|
18
|
+
__exportStar(require("./commands"), exports);
|
|
19
|
+
__exportStar(require("./constants"), exports);
|
|
21
20
|
__exportStar(require("./helpers"), exports);
|
|
21
|
+
__exportStar(require("./models"), exports);
|
package/build/models/index.js
CHANGED
|
@@ -14,16 +14,20 @@ 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("./
|
|
18
|
-
__exportStar(require("./page.schema"), exports);
|
|
17
|
+
__exportStar(require("./ai-model.schema"), exports);
|
|
19
18
|
__exportStar(require("./category.schema"), exports);
|
|
20
|
-
__exportStar(require("./question.schema"), exports);
|
|
21
|
-
__exportStar(require("./unregistered-user.schema"), exports);
|
|
22
19
|
__exportStar(require("./chat.schema"), exports);
|
|
23
20
|
__exportStar(require("./message.schema"), exports);
|
|
24
|
-
__exportStar(require("./ai-model.schema"), exports);
|
|
25
|
-
__exportStar(require("./product.schema"), exports);
|
|
26
|
-
__exportStar(require("./subscription.schema"), exports);
|
|
27
21
|
__exportStar(require("./order.schema"), exports);
|
|
22
|
+
__exportStar(require("./page.schema"), exports);
|
|
23
|
+
__exportStar(require("./payment-history-item.schema"), exports);
|
|
24
|
+
__exportStar(require("./payment.schema"), exports);
|
|
28
25
|
__exportStar(require("./post.schema"), exports);
|
|
26
|
+
__exportStar(require("./product.schema"), exports);
|
|
27
|
+
__exportStar(require("./question.schema"), exports);
|
|
28
|
+
__exportStar(require("./referral-bonus.schema"), exports);
|
|
29
|
+
__exportStar(require("./subscription-upgrade-schema"), exports);
|
|
30
|
+
__exportStar(require("./subscription.schema"), exports);
|
|
31
|
+
__exportStar(require("./unregistered-user.schema"), exports);
|
|
29
32
|
__exportStar(require("./user-to-subscription.schema"), exports);
|
|
33
|
+
__exportStar(require("./user.schema"), exports);
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.ReferralBonusStatisticsSchema = exports.ReferralBonusSchema = void 0;
|
|
4
|
+
const zod_1 = require("zod");
|
|
5
|
+
const referral_1 = require("../constants/referral");
|
|
6
|
+
exports.ReferralBonusSchema = zod_1.z.object({
|
|
7
|
+
uuid: zod_1.z.string().uuid(),
|
|
8
|
+
partnerId: zod_1.z.string().uuid(),
|
|
9
|
+
referralId: zod_1.z.string().uuid(),
|
|
10
|
+
initial: zod_1.z.number(),
|
|
11
|
+
total: zod_1.z.number(),
|
|
12
|
+
type: zod_1.z.nativeEnum(referral_1.ReferralBonusType),
|
|
13
|
+
createdAt: zod_1.z.date(),
|
|
14
|
+
updatedAt: zod_1.z.date(),
|
|
15
|
+
});
|
|
16
|
+
exports.ReferralBonusStatisticsSchema = zod_1.z.object({
|
|
17
|
+
initial: zod_1.z.number(),
|
|
18
|
+
weekStart: zod_1.z.date(),
|
|
19
|
+
});
|
package/commands/auth/index.ts
CHANGED
|
@@ -1,6 +1,7 @@
|
|
|
1
|
-
export * from './
|
|
2
|
-
export * from './restore-password.command';
|
|
1
|
+
export * from './create-user.command';
|
|
3
2
|
export * from './login.command';
|
|
4
3
|
export * from './register-user.command';
|
|
5
|
-
export * from './
|
|
4
|
+
export * from './reset-password.command';
|
|
5
|
+
export * from './restore-password.command';
|
|
6
|
+
export * from './verify-email-retry.command';
|
|
6
7
|
export * from './verify-email.command';
|
|
@@ -2,10 +2,12 @@ import { UserSchema } from '../../models';
|
|
|
2
2
|
import { z } from 'zod';
|
|
3
3
|
|
|
4
4
|
export namespace RegisterUserCommand {
|
|
5
|
-
export const RequestSchema =
|
|
6
|
-
email: true,
|
|
7
|
-
|
|
8
|
-
|
|
5
|
+
export const RequestSchema = z.intersection(
|
|
6
|
+
UserSchema.pick({ email: true, password: true }),
|
|
7
|
+
z.object({
|
|
8
|
+
partnerId: z.string().uuid().optional(),
|
|
9
|
+
}),
|
|
10
|
+
);
|
|
9
11
|
|
|
10
12
|
export type Request = z.infer<typeof RequestSchema>;
|
|
11
13
|
|
package/commands/blog/index.ts
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
export * from './create-post.command';
|
|
2
|
-
export * from './update-post.command';
|
|
3
2
|
export * from './delete-post.command';
|
|
4
|
-
export * from './find-post-by-uuid.command';
|
|
5
3
|
export * from './find-post-by-alias.command';
|
|
4
|
+
export * from './find-post-by-uuid.command';
|
|
6
5
|
export * from './find-post.command';
|
|
6
|
+
export * from './update-post.command';
|
package/commands/chat/index.ts
CHANGED
|
@@ -1,12 +1,13 @@
|
|
|
1
|
-
export * from './
|
|
2
|
-
export * from './delete-chat.command';
|
|
3
|
-
export * from './create-chat.command';
|
|
4
|
-
export * from './find-chat.command';
|
|
5
|
-
export * from './get-my-last-active-chat.command';
|
|
1
|
+
export * from './archive-all.command';
|
|
6
2
|
export * from './check-limit.command';
|
|
7
3
|
export * from './check-limit.command.v2';
|
|
8
|
-
export * from './
|
|
4
|
+
export * from './create-chat.command';
|
|
9
5
|
export * from './create-chat.command.v2';
|
|
10
|
-
export * from './
|
|
11
|
-
export * from './archive-all.command';
|
|
6
|
+
export * from './delete-chat.command';
|
|
12
7
|
export * from './delete-chat.command.v2';
|
|
8
|
+
export * from './find-chat-by-uuid.command';
|
|
9
|
+
export * from './find-chat.command';
|
|
10
|
+
export * from './find-chats.command';
|
|
11
|
+
export * from './get-my-last-active-chat-command.v2';
|
|
12
|
+
export * from './get-my-last-active-chat.command';
|
|
13
|
+
export * from './update-chat.command';
|
package/commands/index.ts
CHANGED
|
@@ -1,14 +1,15 @@
|
|
|
1
|
+
export * from './ai-model';
|
|
1
2
|
export * from './auth';
|
|
2
|
-
export * from './
|
|
3
|
-
export * from './page';
|
|
3
|
+
export * from './blog';
|
|
4
4
|
export * from './category';
|
|
5
|
-
export * from './question';
|
|
6
|
-
export * from './unregistered-user';
|
|
7
|
-
export * from './ai-model';
|
|
8
5
|
export * from './chat';
|
|
9
6
|
export * from './message';
|
|
7
|
+
export * from './page';
|
|
8
|
+
export * from './payment';
|
|
10
9
|
export * from './product';
|
|
10
|
+
export * from './question';
|
|
11
|
+
export * from './referral';
|
|
11
12
|
export * from './subscription';
|
|
12
|
-
export * from './
|
|
13
|
+
export * from './unregistered-user';
|
|
14
|
+
export * from './user';
|
|
13
15
|
export * from './user-to-subscription';
|
|
14
|
-
export * from './payment';
|
package/commands/page/index.ts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
export * from './update-page.command';
|
|
2
|
-
export * from './delete-page.command';
|
|
3
1
|
export * from './create-page.command';
|
|
4
|
-
export * from './
|
|
2
|
+
export * from './delete-page.command';
|
|
5
3
|
export * from './find-page-by-alias.command';
|
|
4
|
+
export * from './find-page.command';
|
|
5
|
+
export * from './update-page.command';
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
export * from './
|
|
2
|
-
export * from './delete-product.command';
|
|
1
|
+
export * from './buy-product.command';
|
|
3
2
|
export * from './create-product.command';
|
|
3
|
+
export * from './delete-product.command';
|
|
4
4
|
export * from './find-product.command';
|
|
5
|
-
export * from './
|
|
5
|
+
export * from './update-product.command';
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
import { ReferralBonusStatisticsSchema } from '../../models';
|
|
2
|
+
import { z } from 'zod';
|
|
3
|
+
|
|
4
|
+
export namespace GetMyBonusesCommand {
|
|
5
|
+
export const ResponseSchema = z.object({
|
|
6
|
+
data: z.object({
|
|
7
|
+
sumTotal: z.number(),
|
|
8
|
+
sumInitial: z.number(),
|
|
9
|
+
statistics: z.array(ReferralBonusStatisticsSchema),
|
|
10
|
+
}),
|
|
11
|
+
});
|
|
12
|
+
|
|
13
|
+
export type Response = z.infer<typeof ResponseSchema>;
|
|
14
|
+
}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export * from './get-by-bonuses.command';
|
|
@@ -13,6 +13,7 @@ export namespace BuySubscriptionCommand {
|
|
|
13
13
|
export type Request = z.infer<typeof RequestSchema>;
|
|
14
14
|
export const RequestFastSchema = z.object({
|
|
15
15
|
email: z.string().email(),
|
|
16
|
+
partnerId: z.string().uuid().optional(),
|
|
16
17
|
});
|
|
17
18
|
|
|
18
19
|
export type RequestFast = z.infer<typeof RequestFastSchema>;
|
|
@@ -1,9 +1,10 @@
|
|
|
1
|
-
export * from './
|
|
2
|
-
export * from './
|
|
1
|
+
export * from './buy-subscription.command';
|
|
2
|
+
export * from './cancel-subscription.command';
|
|
3
|
+
export * from './create-custom-subscription-plan.command';
|
|
3
4
|
export * from './create-subscription.command';
|
|
5
|
+
export * from './delete-subscription.command';
|
|
4
6
|
export * from './find-subscription.command';
|
|
5
|
-
export * from './cancel-subscription.command';
|
|
6
|
-
export * from './recover-subscription.command';
|
|
7
7
|
export * from './get-available-upgrades.command';
|
|
8
|
+
export * from './recover-subscription.command';
|
|
8
9
|
export * from './update-subscription.command';
|
|
9
|
-
export * from './
|
|
10
|
+
export * from './upgrade-subscription.command';
|
package/commands/user/index.ts
CHANGED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export * from './white-list';
|
|
@@ -555,4 +555,29 @@ export const ERRORS = {
|
|
|
555
555
|
message: 'Невозможно улучшить подписку с данными параметрами',
|
|
556
556
|
httpCode: 400,
|
|
557
557
|
},
|
|
558
|
+
PARTNER_NOT_FOUND: {
|
|
559
|
+
code: 'A125',
|
|
560
|
+
message: 'Не удалось найти партнера по реферальной программе',
|
|
561
|
+
httpCode: 404,
|
|
562
|
+
},
|
|
563
|
+
REFERRAL_BONUSES_NOT_FOUND: {
|
|
564
|
+
code: 'A126',
|
|
565
|
+
message: 'Не удалось найти бонусы по реферальной программе',
|
|
566
|
+
httpCode: 404,
|
|
567
|
+
},
|
|
568
|
+
REFERRAL_BONUS_UPDATE_ERROR: {
|
|
569
|
+
code: 'A127',
|
|
570
|
+
message: 'Не удалось обновить бонусы по реферальной программе',
|
|
571
|
+
httpCode: 500,
|
|
572
|
+
},
|
|
573
|
+
REFERRAL_BONUS_STATS_ERROR: {
|
|
574
|
+
code: 'A128',
|
|
575
|
+
message: 'Не удалось получить статистику по бонусам по реферальной программе',
|
|
576
|
+
httpCode: 500,
|
|
577
|
+
},
|
|
578
|
+
REFERRAL_BONUS_APPLY_ERROR: {
|
|
579
|
+
code: 'A129',
|
|
580
|
+
message: 'Не удалось применить бонусы по реферальной программе',
|
|
581
|
+
httpCode: 500,
|
|
582
|
+
},
|
|
558
583
|
};
|
package/constants/index.ts
CHANGED
|
@@ -1,10 +1,16 @@
|
|
|
1
|
+
export * from './ai-model';
|
|
2
|
+
export * from './category';
|
|
3
|
+
export * from './chat';
|
|
4
|
+
export * from './cloud-payments';
|
|
5
|
+
export * from './domains';
|
|
6
|
+
export * from './email';
|
|
1
7
|
export * from './errors';
|
|
2
|
-
export * from './
|
|
3
|
-
export * from './payment';
|
|
8
|
+
export * from './message';
|
|
4
9
|
export * from './order';
|
|
5
|
-
export * from './
|
|
6
|
-
export * from './subscription';
|
|
10
|
+
export * from './payment';
|
|
7
11
|
export * from './product';
|
|
8
|
-
export * from './
|
|
9
|
-
export * from './
|
|
10
|
-
export * from './
|
|
12
|
+
export * from './referral';
|
|
13
|
+
export * from './roles';
|
|
14
|
+
export * from './subscription';
|
|
15
|
+
export * from './transaction';
|
|
16
|
+
export * from './user';
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export * from './referral-bonus-type.enum';
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export * from './enums';
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
export * from './subscription-
|
|
1
|
+
export * from './subscription-action.enum';
|
|
2
2
|
export * from './subscription-plan.enum';
|
|
3
|
-
export * from './
|
|
3
|
+
export * from './subscription-status.enum';
|
|
4
4
|
export * from './subscription-type.enum';
|
|
5
|
-
export * from './subscription-
|
|
5
|
+
export * from './user-to-subscription-type.enum';
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export * from './enums';
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export * from './user-status';
|
package/index.ts
CHANGED
package/models/index.ts
CHANGED
|
@@ -1,13 +1,17 @@
|
|
|
1
|
-
export * from './
|
|
2
|
-
export * from './page.schema';
|
|
1
|
+
export * from './ai-model.schema';
|
|
3
2
|
export * from './category.schema';
|
|
4
|
-
export * from './question.schema';
|
|
5
|
-
export * from './unregistered-user.schema';
|
|
6
3
|
export * from './chat.schema';
|
|
7
4
|
export * from './message.schema';
|
|
8
|
-
export * from './ai-model.schema';
|
|
9
|
-
export * from './product.schema';
|
|
10
|
-
export * from './subscription.schema';
|
|
11
5
|
export * from './order.schema';
|
|
6
|
+
export * from './page.schema';
|
|
7
|
+
export * from './payment-history-item.schema';
|
|
8
|
+
export * from './payment.schema';
|
|
12
9
|
export * from './post.schema';
|
|
10
|
+
export * from './product.schema';
|
|
11
|
+
export * from './question.schema';
|
|
12
|
+
export * from './referral-bonus.schema';
|
|
13
|
+
export * from './subscription-upgrade-schema';
|
|
14
|
+
export * from './subscription.schema';
|
|
15
|
+
export * from './unregistered-user.schema';
|
|
13
16
|
export * from './user-to-subscription.schema';
|
|
17
|
+
export * from './user.schema';
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
import { z } from 'zod';
|
|
2
|
+
import { ReferralBonusType } from '../constants/referral';
|
|
3
|
+
|
|
4
|
+
export const ReferralBonusSchema = z.object({
|
|
5
|
+
uuid: z.string().uuid(),
|
|
6
|
+
partnerId: z.string().uuid(),
|
|
7
|
+
referralId: z.string().uuid(),
|
|
8
|
+
initial: z.number(),
|
|
9
|
+
total: z.number(),
|
|
10
|
+
type: z.nativeEnum(ReferralBonusType),
|
|
11
|
+
createdAt: z.date(),
|
|
12
|
+
updatedAt: z.date(),
|
|
13
|
+
});
|
|
14
|
+
|
|
15
|
+
export const ReferralBonusStatisticsSchema = z.object({
|
|
16
|
+
initial: z.number(),
|
|
17
|
+
weekStart: z.date(),
|
|
18
|
+
});
|