@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.
@@ -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 = {}));
@@ -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("./page-type.enum"), exports);
18
+ __exportStar(require("./page-sort-by.enum"), exports);
@@ -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 { AiModelSchema, CategorySchema, PageSchema, QuestionSchema, ToolSchema } from '../../models';
2
- import { PageType } from '../../constants';
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
-
@@ -15,4 +15,5 @@ export enum UNIFIED_MODEL_CONTENT_TYPE {
15
15
  NONE = 'NONE',
16
16
  IMAGE_GENERATION = 'IMAGE_GENERATION',
17
17
  INTERIOR_DESIGN = 'INTERIOR_DESIGN',
18
+ MARKETPLACE_CARD = 'MARKETPLACE_CARD',
18
19
  }
@@ -1 +1,2 @@
1
1
  export * from './page-type.enum';
2
+ export * from './page-sort-by.enum';
@@ -0,0 +1,4 @@
1
+ export enum PAGE_SORT_BY {
2
+ CREATED_AT = 'createdAt',
3
+ UPDATED_AT = 'updatedAt',
4
+ }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@purpleschool/gptbot",
3
- "version": "0.9.9",
3
+ "version": "0.9.11",
4
4
  "description": "",
5
5
  "main": "build/index.js",
6
6
  "types": "build/index.d.ts",