@purpleschool/gptbot 0.5.25 → 0.5.26
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 +1 -0
- package/api/controllers/task.ts +5 -0
- package/build/api/controllers/index.js +1 -0
- package/build/api/controllers/task.js +7 -0
- package/build/commands/index.js +1 -0
- package/build/commands/task/find-all-active-tasks.command.js +11 -0
- package/build/commands/task/index.js +17 -0
- package/build/models/index.js +1 -0
- package/build/models/task.schema.js +16 -0
- package/commands/index.ts +1 -0
- package/commands/task/find-all-active-tasks.command.ts +10 -0
- package/commands/task/index.ts +1 -0
- package/models/index.ts +1 -0
- package/models/task.schema.ts +14 -0
- package/package.json +1 -1
package/api/controllers/index.ts
CHANGED
|
@@ -31,6 +31,7 @@ __exportStar(require("./payment"), exports);
|
|
|
31
31
|
__exportStar(require("./product"), exports);
|
|
32
32
|
__exportStar(require("./question"), exports);
|
|
33
33
|
__exportStar(require("./subscription"), exports);
|
|
34
|
+
__exportStar(require("./task"), exports);
|
|
34
35
|
__exportStar(require("./unregistered-user"), exports);
|
|
35
36
|
__exportStar(require("./user-to-task"), exports);
|
|
36
37
|
__exportStar(require("./user"), exports);
|
package/build/commands/index.js
CHANGED
|
@@ -28,6 +28,7 @@ __exportStar(require("./product"), exports);
|
|
|
28
28
|
__exportStar(require("./question"), exports);
|
|
29
29
|
__exportStar(require("./referral"), exports);
|
|
30
30
|
__exportStar(require("./subscription"), exports);
|
|
31
|
+
__exportStar(require("./task"), exports);
|
|
31
32
|
__exportStar(require("./unregistered-user"), exports);
|
|
32
33
|
__exportStar(require("./user"), exports);
|
|
33
34
|
__exportStar(require("./user-to-subscription"), exports);
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.FindAllActiveTasksCommand = void 0;
|
|
4
|
+
const models_1 = require("../../models");
|
|
5
|
+
const zod_1 = require("zod");
|
|
6
|
+
var FindAllActiveTasksCommand;
|
|
7
|
+
(function (FindAllActiveTasksCommand) {
|
|
8
|
+
FindAllActiveTasksCommand.ResponseSchema = zod_1.z.object({
|
|
9
|
+
data: zod_1.z.array(models_1.TaskSchema),
|
|
10
|
+
});
|
|
11
|
+
})(FindAllActiveTasksCommand || (exports.FindAllActiveTasksCommand = FindAllActiveTasksCommand = {}));
|
|
@@ -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("./find-all-active-tasks.command"), exports);
|
package/build/models/index.js
CHANGED
|
@@ -34,6 +34,7 @@ __exportStar(require("./referral-bonus.schema"), exports);
|
|
|
34
34
|
__exportStar(require("./section.schema"), exports);
|
|
35
35
|
__exportStar(require("./subscription-upgrade-schema"), exports);
|
|
36
36
|
__exportStar(require("./subscription.schema"), exports);
|
|
37
|
+
__exportStar(require("./task.schema"), exports);
|
|
37
38
|
__exportStar(require("./unregistered-user.schema"), exports);
|
|
38
39
|
__exportStar(require("./user-task.schema"), exports);
|
|
39
40
|
__exportStar(require("./user-to-subscription.schema"), exports);
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.TaskSchema = void 0;
|
|
4
|
+
const zod_1 = require("zod");
|
|
5
|
+
const constants_1 = require("../constants");
|
|
6
|
+
exports.TaskSchema = zod_1.z.object({
|
|
7
|
+
uuid: zod_1.z.string().uuid(),
|
|
8
|
+
title: zod_1.z.string(),
|
|
9
|
+
icon: zod_1.z.string(),
|
|
10
|
+
reward: zod_1.z.number(),
|
|
11
|
+
type: zod_1.z.nativeEnum(constants_1.TASK_TYPE),
|
|
12
|
+
status: zod_1.z.nativeEnum(constants_1.TASK_STATUS),
|
|
13
|
+
description: zod_1.z.string(),
|
|
14
|
+
startAt: zod_1.z.date(),
|
|
15
|
+
endAt: zod_1.z.date().nullable().optional(),
|
|
16
|
+
});
|
package/commands/index.ts
CHANGED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export * from './find-all-active-tasks.command';
|
package/models/index.ts
CHANGED
|
@@ -18,6 +18,7 @@ export * from './referral-bonus.schema';
|
|
|
18
18
|
export * from './section.schema';
|
|
19
19
|
export * from './subscription-upgrade-schema';
|
|
20
20
|
export * from './subscription.schema';
|
|
21
|
+
export * from './task.schema';
|
|
21
22
|
export * from './unregistered-user.schema';
|
|
22
23
|
export * from './user-task.schema';
|
|
23
24
|
export * from './user-to-subscription.schema';
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
import { z } from 'zod';
|
|
2
|
+
import { TASK_STATUS, TASK_TYPE } from '../constants';
|
|
3
|
+
|
|
4
|
+
export const TaskSchema = z.object({
|
|
5
|
+
uuid: z.string().uuid(),
|
|
6
|
+
title: z.string(),
|
|
7
|
+
icon: z.string(),
|
|
8
|
+
reward: z.number(),
|
|
9
|
+
type: z.nativeEnum(TASK_TYPE),
|
|
10
|
+
status: z.nativeEnum(TASK_STATUS),
|
|
11
|
+
description: z.string(),
|
|
12
|
+
startAt: z.date(),
|
|
13
|
+
endAt: z.date().nullable().optional(),
|
|
14
|
+
});
|