@purpleschool/gptbot 0.6.18 → 0.6.19
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/build/commands/user-to-product/get-user-to-product-by-uuid.command.js +17 -0
- package/build/commands/user-to-product/index.js +1 -0
- package/build/commands/user-to-product/update-user-to-product.command.js +1 -1
- package/build/commands/user-to-subscription/get-user-to-subscription-by-uuid.command.js +17 -0
- package/build/commands/user-to-subscription/index.js +1 -0
- package/build/constants/errors/errors.js +5 -0
- package/commands/user-to-product/get-user-to-product-by-uuid.command.ts +16 -0
- package/commands/user-to-product/index.ts +1 -0
- package/commands/user-to-product/update-user-to-product.command.ts +3 -1
- package/commands/user-to-subscription/get-user-to-subscription-by-uuid.command.ts +16 -0
- package/commands/user-to-subscription/index.ts +1 -0
- package/commands/user-to-subscription/update-user-to-subscription.command.ts +2 -0
- package/constants/errors/errors.ts +5 -0
- package/package.json +1 -1
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
3
|
+
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
4
|
+
};
|
|
5
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
6
|
+
exports.GetUserToProductByUuidCommand = void 0;
|
|
7
|
+
const zod_1 = __importDefault(require("zod"));
|
|
8
|
+
const models_1 = require("../../models");
|
|
9
|
+
var GetUserToProductByUuidCommand;
|
|
10
|
+
(function (GetUserToProductByUuidCommand) {
|
|
11
|
+
GetUserToProductByUuidCommand.RequestSchema = models_1.UserToProductSchema.pick({
|
|
12
|
+
uuid: true,
|
|
13
|
+
});
|
|
14
|
+
GetUserToProductByUuidCommand.ResponseSchema = zod_1.default.object({
|
|
15
|
+
data: models_1.UserToProductSchema,
|
|
16
|
+
});
|
|
17
|
+
})(GetUserToProductByUuidCommand || (exports.GetUserToProductByUuidCommand = GetUserToProductByUuidCommand = {}));
|
|
@@ -15,3 +15,4 @@ var __exportStar = (this && this.__exportStar) || function(m, exports) {
|
|
|
15
15
|
};
|
|
16
16
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
17
17
|
__exportStar(require("./update-user-to-product.command"), exports);
|
|
18
|
+
__exportStar(require("./get-user-to-product-by-uuid.command"), exports);
|
|
@@ -14,6 +14,6 @@ var UpdateUserToProductCommand;
|
|
|
14
14
|
status: true,
|
|
15
15
|
}).partial();
|
|
16
16
|
UpdateUserToProductCommand.ResponseSchema = zod_1.z.object({
|
|
17
|
-
data:
|
|
17
|
+
data: models_1.UserToProductSchema,
|
|
18
18
|
});
|
|
19
19
|
})(UpdateUserToProductCommand || (exports.UpdateUserToProductCommand = UpdateUserToProductCommand = {}));
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
3
|
+
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
4
|
+
};
|
|
5
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
6
|
+
exports.GetUserToSubscriptionByUuidCommand = void 0;
|
|
7
|
+
const zod_1 = __importDefault(require("zod"));
|
|
8
|
+
const models_1 = require("../../models");
|
|
9
|
+
var GetUserToSubscriptionByUuidCommand;
|
|
10
|
+
(function (GetUserToSubscriptionByUuidCommand) {
|
|
11
|
+
GetUserToSubscriptionByUuidCommand.RequestSchema = models_1.UserToSubscriptionSchema.pick({
|
|
12
|
+
uuid: true,
|
|
13
|
+
});
|
|
14
|
+
GetUserToSubscriptionByUuidCommand.ResponseSchema = zod_1.default.object({
|
|
15
|
+
data: models_1.UserToSubscriptionSchema,
|
|
16
|
+
});
|
|
17
|
+
})(GetUserToSubscriptionByUuidCommand || (exports.GetUserToSubscriptionByUuidCommand = GetUserToSubscriptionByUuidCommand = {}));
|
|
@@ -16,3 +16,4 @@ var __exportStar = (this && this.__exportStar) || function(m, exports) {
|
|
|
16
16
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
17
17
|
__exportStar(require("./get-user-to-subscriptions.command"), exports);
|
|
18
18
|
__exportStar(require("./update-user-to-subscription.command"), exports);
|
|
19
|
+
__exportStar(require("./get-user-to-subscription-by-uuid.command"), exports);
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
import z from 'zod';
|
|
2
|
+
import { UserToProductSchema } from '../../models';
|
|
3
|
+
|
|
4
|
+
export namespace GetUserToProductByUuidCommand {
|
|
5
|
+
export const RequestSchema = UserToProductSchema.pick({
|
|
6
|
+
uuid: true,
|
|
7
|
+
});
|
|
8
|
+
|
|
9
|
+
export type Request = z.infer<typeof RequestSchema>;
|
|
10
|
+
|
|
11
|
+
export const ResponseSchema = z.object({
|
|
12
|
+
data: UserToProductSchema,
|
|
13
|
+
});
|
|
14
|
+
|
|
15
|
+
export type Response = z.infer<typeof ResponseSchema>;
|
|
16
|
+
}
|
|
@@ -14,8 +14,10 @@ export namespace UpdateUserToProductCommand {
|
|
|
14
14
|
status: true,
|
|
15
15
|
}).partial();
|
|
16
16
|
|
|
17
|
+
export type Request = z.infer<typeof RequestSchema>;
|
|
18
|
+
|
|
17
19
|
export const ResponseSchema = z.object({
|
|
18
|
-
data:
|
|
20
|
+
data: UserToProductSchema,
|
|
19
21
|
});
|
|
20
22
|
|
|
21
23
|
export type Response = z.infer<typeof ResponseSchema>;
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
import z from 'zod';
|
|
2
|
+
import { UserToSubscriptionSchema } from '../../models';
|
|
3
|
+
|
|
4
|
+
export namespace GetUserToSubscriptionByUuidCommand {
|
|
5
|
+
export const RequestSchema = UserToSubscriptionSchema.pick({
|
|
6
|
+
uuid: true,
|
|
7
|
+
});
|
|
8
|
+
|
|
9
|
+
export type Request = z.infer<typeof RequestSchema>;
|
|
10
|
+
|
|
11
|
+
export const ResponseSchema = z.object({
|
|
12
|
+
data: UserToSubscriptionSchema,
|
|
13
|
+
});
|
|
14
|
+
|
|
15
|
+
export type Response = z.infer<typeof ResponseSchema>;
|
|
16
|
+
}
|
|
@@ -1505,4 +1505,9 @@ export const ERRORS = {
|
|
|
1505
1505
|
message: 'Подписка не требует повторной оплаты',
|
|
1506
1506
|
httpCode: 400,
|
|
1507
1507
|
},
|
|
1508
|
+
USER_TO_PRODUCT_NOT_FOUND: {
|
|
1509
|
+
code: 'A321',
|
|
1510
|
+
message: 'Не удалось найти продукт у пользователя',
|
|
1511
|
+
httpCode: 404,
|
|
1512
|
+
},
|
|
1508
1513
|
};
|