@purpleschool/gptbot 0.12.42 → 0.12.43
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/index.ts +1 -0
- package/api/controllers/http/order.ts +7 -0
- package/api/routes.ts +8 -0
- package/build/api/controllers/http/index.js +1 -0
- package/build/api/controllers/http/order.js +8 -0
- package/build/api/routes.js +6 -0
- package/build/commands/index.js +1 -0
- package/build/commands/order/get-order-payment-status.command.js +16 -0
- package/build/commands/order/index.js +17 -0
- package/commands/index.ts +1 -0
- package/commands/order/get-order-payment-status.command.ts +18 -0
- package/commands/order/index.ts +1 -0
- package/models/tools/diagrams/diagrams-model.schema.ts +1 -1
- package/package.json +1 -1
package/api/routes.ts
CHANGED
|
@@ -984,6 +984,14 @@ export const REST_API = {
|
|
|
984
984
|
REFUND: `${ROOT}/${CONTROLLERS.PAYMENT_CONTROLLER}/${CONTROLLERS.PAYMENT_ROUTES.REFUND}`,
|
|
985
985
|
FIND_BY_CRITERIA: `${ROOT}/${CONTROLLERS.PAYMENT_CONTROLLER}/${CONTROLLERS.PAYMENT_ROUTES.FIND_BY_CRITERIA}`,
|
|
986
986
|
},
|
|
987
|
+
ORDER_PUBLIC: {
|
|
988
|
+
STATUS: (uuid: string) =>
|
|
989
|
+
`${ROOT}/${CONTROLLERS.ORDER_PUBLIC_CONTROLLER}/${CONTROLLERS.ORDER_ROUTES.STATUS(uuid)}`,
|
|
990
|
+
},
|
|
991
|
+
ORDER_PRIVATE: {
|
|
992
|
+
STATUS: (uuid: string) =>
|
|
993
|
+
`${ROOT}/${CONTROLLERS.ORDER_PRIVATE_CONTROLLER}/${CONTROLLERS.ORDER_ROUTES.STATUS(uuid)}`,
|
|
994
|
+
},
|
|
987
995
|
COURSE: {
|
|
988
996
|
FIND_BY_UUID: `${ROOT}/${CONTROLLERS.COURSE_CONTROLLER}/${CONTROLLERS.COURSE_ROUTES.FIND_BY_UUID}`,
|
|
989
997
|
FIND_BY_ALIAS: `${ROOT}/${CONTROLLERS.COURSE_CONTROLLER}/${CONTROLLERS.COURSE_ROUTES.FIND_BY_ALIAS}`,
|
|
@@ -68,6 +68,7 @@ __exportStar(require("./daily-streak"), exports);
|
|
|
68
68
|
__exportStar(require("./cabinet"), exports);
|
|
69
69
|
__exportStar(require("./webmaster"), exports);
|
|
70
70
|
__exportStar(require("./music"), exports);
|
|
71
|
+
__exportStar(require("./order"), exports);
|
|
71
72
|
__exportStar(require("./webmaster-click"), exports);
|
|
72
73
|
__exportStar(require("./b2b"), exports);
|
|
73
74
|
__exportStar(require("./community"), exports);
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.ORDER_ROUTES = exports.ORDER_PRIVATE_CONTROLLER = exports.ORDER_PUBLIC_CONTROLLER = void 0;
|
|
4
|
+
exports.ORDER_PUBLIC_CONTROLLER = 'public/order';
|
|
5
|
+
exports.ORDER_PRIVATE_CONTROLLER = 'private/order';
|
|
6
|
+
exports.ORDER_ROUTES = {
|
|
7
|
+
STATUS: (uuid) => `${uuid}/status`,
|
|
8
|
+
};
|
package/build/api/routes.js
CHANGED
|
@@ -748,6 +748,12 @@ exports.REST_API = {
|
|
|
748
748
|
REFUND: `${exports.ROOT}/${CONTROLLERS.PAYMENT_CONTROLLER}/${CONTROLLERS.PAYMENT_ROUTES.REFUND}`,
|
|
749
749
|
FIND_BY_CRITERIA: `${exports.ROOT}/${CONTROLLERS.PAYMENT_CONTROLLER}/${CONTROLLERS.PAYMENT_ROUTES.FIND_BY_CRITERIA}`,
|
|
750
750
|
},
|
|
751
|
+
ORDER_PUBLIC: {
|
|
752
|
+
STATUS: (uuid) => `${exports.ROOT}/${CONTROLLERS.ORDER_PUBLIC_CONTROLLER}/${CONTROLLERS.ORDER_ROUTES.STATUS(uuid)}`,
|
|
753
|
+
},
|
|
754
|
+
ORDER_PRIVATE: {
|
|
755
|
+
STATUS: (uuid) => `${exports.ROOT}/${CONTROLLERS.ORDER_PRIVATE_CONTROLLER}/${CONTROLLERS.ORDER_ROUTES.STATUS(uuid)}`,
|
|
756
|
+
},
|
|
751
757
|
COURSE: {
|
|
752
758
|
FIND_BY_UUID: `${exports.ROOT}/${CONTROLLERS.COURSE_CONTROLLER}/${CONTROLLERS.COURSE_ROUTES.FIND_BY_UUID}`,
|
|
753
759
|
FIND_BY_ALIAS: `${exports.ROOT}/${CONTROLLERS.COURSE_CONTROLLER}/${CONTROLLERS.COURSE_ROUTES.FIND_BY_ALIAS}`,
|
package/build/commands/index.js
CHANGED
|
@@ -29,6 +29,7 @@ __exportStar(require("./key-value"), exports);
|
|
|
29
29
|
__exportStar(require("./message"), exports);
|
|
30
30
|
__exportStar(require("./midjourney"), exports);
|
|
31
31
|
__exportStar(require("./page"), exports);
|
|
32
|
+
__exportStar(require("./order"), exports);
|
|
32
33
|
__exportStar(require("./payment"), exports);
|
|
33
34
|
__exportStar(require("./product"), exports);
|
|
34
35
|
__exportStar(require("./question"), exports);
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.GetOrderPaymentStatusCommand = void 0;
|
|
4
|
+
const zod_1 = require("zod");
|
|
5
|
+
const constants_1 = require("../../constants");
|
|
6
|
+
var GetOrderPaymentStatusCommand;
|
|
7
|
+
(function (GetOrderPaymentStatusCommand) {
|
|
8
|
+
GetOrderPaymentStatusCommand.RequestParamSchema = zod_1.z.object({
|
|
9
|
+
uuid: zod_1.z.string().uuid(),
|
|
10
|
+
});
|
|
11
|
+
GetOrderPaymentStatusCommand.ResponseSchema = zod_1.z.object({
|
|
12
|
+
data: zod_1.z.object({
|
|
13
|
+
status: zod_1.z.nativeEnum(constants_1.ORDER_STATUS),
|
|
14
|
+
}),
|
|
15
|
+
});
|
|
16
|
+
})(GetOrderPaymentStatusCommand || (exports.GetOrderPaymentStatusCommand = GetOrderPaymentStatusCommand = {}));
|
|
@@ -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-order-payment-status.command"), exports);
|
package/commands/index.ts
CHANGED
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
import { z } from 'zod';
|
|
2
|
+
import { ORDER_STATUS } from '../../constants';
|
|
3
|
+
|
|
4
|
+
export namespace GetOrderPaymentStatusCommand {
|
|
5
|
+
export const RequestParamSchema = z.object({
|
|
6
|
+
uuid: z.string().uuid(),
|
|
7
|
+
});
|
|
8
|
+
|
|
9
|
+
export type RequestParam = z.infer<typeof RequestParamSchema>;
|
|
10
|
+
|
|
11
|
+
export const ResponseSchema = z.object({
|
|
12
|
+
data: z.object({
|
|
13
|
+
status: z.nativeEnum(ORDER_STATUS),
|
|
14
|
+
}),
|
|
15
|
+
});
|
|
16
|
+
|
|
17
|
+
export type Response = z.infer<typeof ResponseSchema>;
|
|
18
|
+
}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export * from './get-order-payment-status.command';
|
|
@@ -44,4 +44,4 @@ export const DiagramsModelSchemaResponse = DiagramsModelSchema.omit({
|
|
|
44
44
|
maxContextCharacters: true,
|
|
45
45
|
});
|
|
46
46
|
|
|
47
|
-
export type DiagramsModelResponse = z.infer<typeof DiagramsModelSchemaResponse>;
|
|
47
|
+
export type DiagramsModelResponse = z.infer<typeof DiagramsModelSchemaResponse>;
|