@purpleschool/gptbot 0.3.7 → 0.3.8

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.
@@ -3,6 +3,7 @@ export const BLOG_CONTROLLER = 'blog' as const;
3
3
  export const BLOG_ROUTES = {
4
4
  CREATE: 'create',
5
5
  FIND: 'find',
6
+ FIND_ALL: 'find/all',
6
7
  FIND_BY_UUID: 'by/uuid',
7
8
  FIND_BY_ALIAS: 'by/alias',
8
9
  } as const;
package/api/routes.ts CHANGED
@@ -127,5 +127,6 @@ export const REST_API = {
127
127
  GET_BY_ALIAS: (alias: string) =>
128
128
  `${ROOT}/${CONTROLLERS.BLOG_CONTROLLER}/${CONTROLLERS.BLOG_ROUTES.FIND_BY_ALIAS}/${alias}`,
129
129
  GET: `${ROOT}/${CONTROLLERS.BLOG_CONTROLLER}/${CONTROLLERS.BLOG_ROUTES.FIND}`,
130
+ GET_ALL: `${ROOT}/${CONTROLLERS.BLOG_CONTROLLER}/${CONTROLLERS.BLOG_ROUTES.FIND_ALL}`,
130
131
  },
131
132
  } as const;
@@ -5,6 +5,7 @@ exports.BLOG_CONTROLLER = 'blog';
5
5
  exports.BLOG_ROUTES = {
6
6
  CREATE: 'create',
7
7
  FIND: 'find',
8
+ FIND_ALL: 'find/all',
8
9
  FIND_BY_UUID: 'by/uuid',
9
10
  FIND_BY_ALIAS: 'by/alias',
10
11
  };
@@ -130,5 +130,6 @@ exports.REST_API = {
130
130
  GET_BY_UUID: (uuid) => `${exports.ROOT}/${CONTROLLERS.BLOG_CONTROLLER}/${CONTROLLERS.BLOG_ROUTES.FIND_BY_UUID}/${uuid}`,
131
131
  GET_BY_ALIAS: (alias) => `${exports.ROOT}/${CONTROLLERS.BLOG_CONTROLLER}/${CONTROLLERS.BLOG_ROUTES.FIND_BY_ALIAS}/${alias}`,
132
132
  GET: `${exports.ROOT}/${CONTROLLERS.BLOG_CONTROLLER}/${CONTROLLERS.BLOG_ROUTES.FIND}`,
133
+ GET_ALL: `${exports.ROOT}/${CONTROLLERS.BLOG_CONTROLLER}/${CONTROLLERS.BLOG_ROUTES.FIND_ALL}`,
133
134
  },
134
135
  };
@@ -12,8 +12,12 @@ const FindPostResponseSchema = zod_1.z.object({
12
12
  totalPage: zod_1.z.number(),
13
13
  page: zod_1.z.number(),
14
14
  });
15
+ const FindAllPostResponseSchema = zod_1.z.object({
16
+ data: zod_1.z.array(models_1.PostSchema),
17
+ });
15
18
  var FindPostCommand;
16
19
  (function (FindPostCommand) {
17
20
  FindPostCommand.RequestSchema = FindPostRequestSchema;
18
21
  FindPostCommand.ResponseSchema = FindPostResponseSchema;
22
+ FindPostCommand.ResponseAllSchema = FindAllPostResponseSchema;
19
23
  })(FindPostCommand || (exports.FindPostCommand = FindPostCommand = {}));
@@ -12,10 +12,17 @@ const FindPostResponseSchema = z.object({
12
12
  page: z.number(),
13
13
  });
14
14
 
15
+ const FindAllPostResponseSchema = z.object({
16
+ data: z.array(PostSchema),
17
+ });
18
+
15
19
  export namespace FindPostCommand {
16
20
  export const RequestSchema = FindPostRequestSchema;
17
21
  export type Request = z.infer<typeof RequestSchema>;
18
22
 
19
23
  export const ResponseSchema = FindPostResponseSchema;
20
24
  export type Response = z.infer<typeof ResponseSchema>;
25
+
26
+ export const ResponseAllSchema = FindAllPostResponseSchema;
27
+ export type ResponseAll = z.infer<typeof ResponseAllSchema>;
21
28
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@purpleschool/gptbot",
3
- "version": "0.3.7",
3
+ "version": "0.3.8",
4
4
  "description": "",
5
5
  "main": "index.js",
6
6
  "scripts": {