@purpleschool/gptbot 0.5.13 → 0.5.15
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/subscription/upgrade-subscription.command.js +4 -1
- 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/email/subjects.js +1 -0
- package/build/constants/errors/errors.js +61 -1
- 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/subscription/upgrade-subscription.command.ts +6 -2
- 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/email/subjects.ts +1 -0
- package/constants/errors/errors.ts +61 -1
- 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);
|
|
@@ -5,7 +5,10 @@ const zod_1 = require("zod");
|
|
|
5
5
|
const models_1 = require("../../models");
|
|
6
6
|
var UpgradeSubscriptionCommand;
|
|
7
7
|
(function (UpgradeSubscriptionCommand) {
|
|
8
|
-
UpgradeSubscriptionCommand.RequestSchema =
|
|
8
|
+
UpgradeSubscriptionCommand.RequestSchema = zod_1.z.object({
|
|
9
|
+
upgradeSubscriptionId: zod_1.z.string().uuid(),
|
|
10
|
+
});
|
|
11
|
+
UpgradeSubscriptionCommand.RequestParamSchema = models_1.UserToSubscriptionSchema.pick({
|
|
9
12
|
uuid: true,
|
|
10
13
|
});
|
|
11
14
|
const IReceiptOrderSchema = zod_1.z.object({
|
|
@@ -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);
|
|
@@ -7,4 +7,5 @@ exports.EMAIL_SUBJECTS = {
|
|
|
7
7
|
SUBSCRIPTION_PURCHASE: 'Спасибо за покупку подписки',
|
|
8
8
|
SUBSCRIPTION_CANCEL: 'Нам жаль, что вы от нас уходите(',
|
|
9
9
|
PRODUCT_PURCHASE: 'Спасибо за покупку тарифа',
|
|
10
|
+
RECURRENT_PAYMENT_FAILED: 'Важно: Не удалось получить оплату по подписке',
|
|
10
11
|
};
|
|
@@ -552,7 +552,67 @@ exports.ERRORS = {
|
|
|
552
552
|
},
|
|
553
553
|
SUBSCRIPTION_UPGRADE_INVALID: {
|
|
554
554
|
code: 'A124',
|
|
555
|
-
message: 'Невозможно улучшить подписку
|
|
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
|
+
},
|
|
583
|
+
SUBSCRIPTION_OWNERSHIP_ERROR: {
|
|
584
|
+
code: 'A130',
|
|
585
|
+
message: 'Пользователь не является владельцем подписки или подписка неактивна',
|
|
586
|
+
httpCode: 400,
|
|
587
|
+
},
|
|
588
|
+
SUBSCRIPTION_NOT_FOUND: {
|
|
589
|
+
code: 'A131',
|
|
590
|
+
message: 'Подписка с данным идентификатором не найдена',
|
|
591
|
+
httpCode: 404,
|
|
592
|
+
},
|
|
593
|
+
SUBSCRIPTION_UPGRADE_NOT_FOUND: {
|
|
594
|
+
code: 'A132',
|
|
595
|
+
message: 'Улучшение подписки с данным идентификатором не найдено',
|
|
596
|
+
httpCode: 404,
|
|
597
|
+
},
|
|
598
|
+
SUBSCRIPTION_TOO_MANY: {
|
|
599
|
+
code: 'A133',
|
|
600
|
+
message: 'На данной учетной записи более одной активной подписки',
|
|
601
|
+
httpCode: 400,
|
|
602
|
+
},
|
|
603
|
+
SUBSCRIPTION_CANCEL_ERROR: {
|
|
604
|
+
code: 'A134',
|
|
605
|
+
message: 'Не удалось отменить подписку',
|
|
606
|
+
httpCode: 500,
|
|
607
|
+
},
|
|
608
|
+
SUBSCRIPTION_RECOVER_ERROR: {
|
|
609
|
+
code: 'A135',
|
|
610
|
+
message: 'Не удалось восстановить подписку',
|
|
611
|
+
httpCode: 500,
|
|
612
|
+
},
|
|
613
|
+
CLOUD_PAYMENTS_WIDGET_DATA_ERROR: {
|
|
614
|
+
code: 'A136',
|
|
615
|
+
message: 'Не удалось получить данные для создания платежа',
|
|
616
|
+
httpCode: 500,
|
|
617
|
+
},
|
|
558
618
|
};
|
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);
|