@purpleschool/gptbot 0.8.96 → 0.9.97
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/http/product.ts +1 -0
- package/api/controllers/http/subscription.ts +1 -0
- package/api/routes.ts +4 -0
- package/build/api/controllers/http/product.js +1 -0
- package/build/api/controllers/http/subscription.js +1 -0
- package/build/api/routes.js +2 -0
- package/build/commands/product/index.js +1 -0
- package/build/commands/product/refund-product.command.js +15 -0
- package/build/commands/subscription/index.js +1 -0
- package/build/commands/subscription/refund-subscription.command.js +15 -0
- package/build/constants/errors/errors.js +4370 -2779
- package/build/constants/errors/index.js +1 -1
- package/build/constants/product/enums/product-status.enum.js +1 -0
- package/build/constants/subscription/enums/subscription-status.enum.js +1 -0
- package/commands/product/index.ts +1 -0
- package/commands/product/refund-product.command.ts +17 -0
- package/commands/subscription/index.ts +1 -0
- package/commands/subscription/refund-subscription.command.ts +17 -0
- package/constants/errors/errors.ts +4413 -2790
- package/constants/errors/index.ts +1 -1
- package/constants/product/enums/product-status.enum.ts +1 -0
- package/constants/subscription/enums/subscription-status.enum.ts +1 -0
- package/package.json +1 -1
package/api/routes.ts
CHANGED
|
@@ -144,6 +144,8 @@ export const REST_API = {
|
|
|
144
144
|
BUY: (uuid: string) =>
|
|
145
145
|
`${ROOT}/${CONTROLLERS.PRODUCT_PRIVATE_CONTROLLER}/${CONTROLLERS.PRODUCT_ROUTES.BUY(uuid)}`,
|
|
146
146
|
MY: `${ROOT}/${CONTROLLERS.PRODUCT_PRIVATE_CONTROLLER}/${CONTROLLERS.PRODUCT_ROUTES.MY}`,
|
|
147
|
+
REFUND: (uuid: string) =>
|
|
148
|
+
`${ROOT}/${CONTROLLERS.PRODUCT_PRIVATE_CONTROLLER}/${CONTROLLERS.PRODUCT_ROUTES.REFUND(uuid)}`,
|
|
147
149
|
},
|
|
148
150
|
SUBSCRIPTION_PUBLIC: {
|
|
149
151
|
GET: `${ROOT}/${CONTROLLERS.SUBSCRIPTION_PUBLIC_CONTROLLER}/${CONTROLLERS.SUBSCRIPTION_ROUTES.GET_ALL}`,
|
|
@@ -176,6 +178,8 @@ export const REST_API = {
|
|
|
176
178
|
SUMMARY: `${ROOT}/${CONTROLLERS.SUBSCRIPTION_PRIVATE_CONTROLLER}/${CONTROLLERS.SUBSCRIPTION_ROUTES.SUMMARY}`,
|
|
177
179
|
RECOVER_PAST_DUE: (uuid: string) =>
|
|
178
180
|
`${ROOT}/${CONTROLLERS.SUBSCRIPTION_PRIVATE_CONTROLLER}/${CONTROLLERS.SUBSCRIPTION_ROUTES.RECOVER_PAST_DUE(uuid)}`,
|
|
181
|
+
REFUND: (uuid: string) =>
|
|
182
|
+
`${ROOT}/${CONTROLLERS.SUBSCRIPTION_PRIVATE_CONTROLLER}/${CONTROLLERS.SUBSCRIPTION_ROUTES.REFUND(uuid)}`,
|
|
179
183
|
},
|
|
180
184
|
FILES: {
|
|
181
185
|
UPLOAD_FILE: `${ROOT}/${CONTROLLERS.FILE_CONTROLLER}/${CONTROLLERS.FILE_ROUTES.UPLOAD_FILE}`,
|
package/build/api/routes.js
CHANGED
|
@@ -153,6 +153,7 @@ exports.REST_API = {
|
|
|
153
153
|
CREATE: `${exports.ROOT}/${CONTROLLERS.PRODUCT_PRIVATE_CONTROLLER}`,
|
|
154
154
|
BUY: (uuid) => `${exports.ROOT}/${CONTROLLERS.PRODUCT_PRIVATE_CONTROLLER}/${CONTROLLERS.PRODUCT_ROUTES.BUY(uuid)}`,
|
|
155
155
|
MY: `${exports.ROOT}/${CONTROLLERS.PRODUCT_PRIVATE_CONTROLLER}/${CONTROLLERS.PRODUCT_ROUTES.MY}`,
|
|
156
|
+
REFUND: (uuid) => `${exports.ROOT}/${CONTROLLERS.PRODUCT_PRIVATE_CONTROLLER}/${CONTROLLERS.PRODUCT_ROUTES.REFUND(uuid)}`,
|
|
156
157
|
},
|
|
157
158
|
SUBSCRIPTION_PUBLIC: {
|
|
158
159
|
GET: `${exports.ROOT}/${CONTROLLERS.SUBSCRIPTION_PUBLIC_CONTROLLER}/${CONTROLLERS.SUBSCRIPTION_ROUTES.GET_ALL}`,
|
|
@@ -177,6 +178,7 @@ exports.REST_API = {
|
|
|
177
178
|
CREATE_CUSTOM: `${exports.ROOT}/${CONTROLLERS.SUBSCRIPTION_PRIVATE_CONTROLLER}/${CONTROLLERS.SUBSCRIPTION_ROUTES.CREATE_CUSTOM}`,
|
|
178
179
|
SUMMARY: `${exports.ROOT}/${CONTROLLERS.SUBSCRIPTION_PRIVATE_CONTROLLER}/${CONTROLLERS.SUBSCRIPTION_ROUTES.SUMMARY}`,
|
|
179
180
|
RECOVER_PAST_DUE: (uuid) => `${exports.ROOT}/${CONTROLLERS.SUBSCRIPTION_PRIVATE_CONTROLLER}/${CONTROLLERS.SUBSCRIPTION_ROUTES.RECOVER_PAST_DUE(uuid)}`,
|
|
181
|
+
REFUND: (uuid) => `${exports.ROOT}/${CONTROLLERS.SUBSCRIPTION_PRIVATE_CONTROLLER}/${CONTROLLERS.SUBSCRIPTION_ROUTES.REFUND(uuid)}`,
|
|
180
182
|
},
|
|
181
183
|
FILES: {
|
|
182
184
|
UPLOAD_FILE: `${exports.ROOT}/${CONTROLLERS.FILE_CONTROLLER}/${CONTROLLERS.FILE_ROUTES.UPLOAD_FILE}`,
|
|
@@ -20,3 +20,4 @@ __exportStar(require("./delete-product.command"), exports);
|
|
|
20
20
|
__exportStar(require("./find-product.command"), exports);
|
|
21
21
|
__exportStar(require("./get-my-products.command"), exports);
|
|
22
22
|
__exportStar(require("./update-product.command"), exports);
|
|
23
|
+
__exportStar(require("./refund-product.command"), exports);
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.RefundProductCommand = void 0;
|
|
4
|
+
const zod_1 = require("zod");
|
|
5
|
+
var RefundProductCommand;
|
|
6
|
+
(function (RefundProductCommand) {
|
|
7
|
+
RefundProductCommand.RequestSchema = zod_1.z.object({
|
|
8
|
+
uuid: zod_1.z.string().uuid(),
|
|
9
|
+
});
|
|
10
|
+
RefundProductCommand.ResponseSchema = zod_1.z.object({
|
|
11
|
+
data: zod_1.z.object({
|
|
12
|
+
isSuccess: zod_1.z.boolean(),
|
|
13
|
+
}),
|
|
14
|
+
});
|
|
15
|
+
})(RefundProductCommand || (exports.RefundProductCommand = RefundProductCommand = {}));
|
|
@@ -28,3 +28,4 @@ __exportStar(require("./recover-subscription.command"), exports);
|
|
|
28
28
|
__exportStar(require("./update-subscription.command"), exports);
|
|
29
29
|
__exportStar(require("./upgrade-subscription.command"), exports);
|
|
30
30
|
__exportStar(require("./downgrade-subscription.command"), exports);
|
|
31
|
+
__exportStar(require("./refund-subscription.command"), exports);
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.RefundSubscriptionCommand = void 0;
|
|
4
|
+
const zod_1 = require("zod");
|
|
5
|
+
var RefundSubscriptionCommand;
|
|
6
|
+
(function (RefundSubscriptionCommand) {
|
|
7
|
+
RefundSubscriptionCommand.RequestSchema = zod_1.z.object({
|
|
8
|
+
uuid: zod_1.z.string().uuid(),
|
|
9
|
+
});
|
|
10
|
+
RefundSubscriptionCommand.ResponseSchema = zod_1.z.object({
|
|
11
|
+
data: zod_1.z.object({
|
|
12
|
+
isSuccess: zod_1.z.boolean(),
|
|
13
|
+
}),
|
|
14
|
+
});
|
|
15
|
+
})(RefundSubscriptionCommand || (exports.RefundSubscriptionCommand = RefundSubscriptionCommand = {}));
|