@purpleschool/gptbot 0.9.9 → 0.9.11
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/page/find-pages-by-criteria.command.js +2 -0
- package/build/constants/model/enums/unified-model-content-type.enum.js +1 -0
- package/build/constants/page/enums/index.js +1 -0
- package/build/constants/page/enums/page-sort-by.enum.js +8 -0
- package/commands/page/find-pages-by-criteria.command.ts +12 -3
- package/constants/model/enums/unified-model-content-type.enum.ts +1 -0
- package/constants/page/enums/index.ts +1 -0
- package/constants/page/enums/page-sort-by.enum.ts +4 -0
- package/package.json +1 -1
|
@@ -12,6 +12,8 @@ var FindPagesByCriteriaCommand;
|
|
|
12
12
|
toolId: zod_1.z.string().uuid().optional(),
|
|
13
13
|
toolModelId: zod_1.z.string().uuid().optional(),
|
|
14
14
|
toolTitle: zod_1.z.string().optional(),
|
|
15
|
+
sortBy: zod_1.z.nativeEnum(constants_1.PAGE_SORT_BY).optional(),
|
|
16
|
+
sortOrder: zod_1.z.nativeEnum(constants_1.SORT_ORDER).default(constants_1.SORT_ORDER.DESC).optional(),
|
|
15
17
|
limit: zod_1.z.coerce.number().min(1),
|
|
16
18
|
offset: zod_1.z.coerce.number().min(0).default(0),
|
|
17
19
|
});
|
|
@@ -19,4 +19,5 @@ var UNIFIED_MODEL_CONTENT_TYPE;
|
|
|
19
19
|
UNIFIED_MODEL_CONTENT_TYPE["NONE"] = "NONE";
|
|
20
20
|
UNIFIED_MODEL_CONTENT_TYPE["IMAGE_GENERATION"] = "IMAGE_GENERATION";
|
|
21
21
|
UNIFIED_MODEL_CONTENT_TYPE["INTERIOR_DESIGN"] = "INTERIOR_DESIGN";
|
|
22
|
+
UNIFIED_MODEL_CONTENT_TYPE["MARKETPLACE_CARD"] = "MARKETPLACE_CARD";
|
|
22
23
|
})(UNIFIED_MODEL_CONTENT_TYPE || (exports.UNIFIED_MODEL_CONTENT_TYPE = UNIFIED_MODEL_CONTENT_TYPE = {}));
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.PAGE_SORT_BY = void 0;
|
|
4
|
+
var PAGE_SORT_BY;
|
|
5
|
+
(function (PAGE_SORT_BY) {
|
|
6
|
+
PAGE_SORT_BY["CREATED_AT"] = "createdAt";
|
|
7
|
+
PAGE_SORT_BY["UPDATED_AT"] = "updatedAt";
|
|
8
|
+
})(PAGE_SORT_BY || (exports.PAGE_SORT_BY = PAGE_SORT_BY = {}));
|
|
@@ -1,5 +1,11 @@
|
|
|
1
|
-
import {
|
|
2
|
-
|
|
1
|
+
import {
|
|
2
|
+
AiModelSchema,
|
|
3
|
+
CategorySchema,
|
|
4
|
+
PageSchema,
|
|
5
|
+
QuestionSchema,
|
|
6
|
+
ToolSchema,
|
|
7
|
+
} from '../../models';
|
|
8
|
+
import { PAGE_SORT_BY, PageType, SORT_ORDER } from '../../constants';
|
|
3
9
|
import { z } from 'zod';
|
|
4
10
|
|
|
5
11
|
export namespace FindPagesByCriteriaCommand {
|
|
@@ -9,6 +15,10 @@ export namespace FindPagesByCriteriaCommand {
|
|
|
9
15
|
toolId: z.string().uuid().optional(),
|
|
10
16
|
toolModelId: z.string().uuid().optional(),
|
|
11
17
|
toolTitle: z.string().optional(),
|
|
18
|
+
|
|
19
|
+
sortBy: z.nativeEnum(PAGE_SORT_BY).optional(),
|
|
20
|
+
sortOrder: z.nativeEnum(SORT_ORDER).default(SORT_ORDER.DESC).optional(),
|
|
21
|
+
|
|
12
22
|
limit: z.coerce.number().min(1),
|
|
13
23
|
offset: z.coerce.number().min(0).default(0),
|
|
14
24
|
});
|
|
@@ -38,4 +48,3 @@ export namespace FindPagesByCriteriaCommand {
|
|
|
38
48
|
|
|
39
49
|
export type ResponseWithRelations = z.infer<typeof ResponseWithRelationsSchema>;
|
|
40
50
|
}
|
|
41
|
-
|