@purpleschool/gptbot 0.12.5 → 0.12.6

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.
@@ -28,6 +28,8 @@ export const PRESENTATION_ROUTES = {
28
28
  GENERATE_REPORT: (presentationId: string) => `${presentationId}/generate-report`,
29
29
  REPOSITION_SLIDE_OUTLINE: (presentationId: string, slideOutlineId: string) =>
30
30
  `${presentationId}/outline/${slideOutlineId}/move`,
31
+ REPOSITION_SLIDE: (presentationId: string, slideId: string) =>
32
+ `${presentationId}/slides/${slideId}/move`,
31
33
  DELETE_SLIDE_OUTLINE: (presentationId: string, slideOutlineId: string) =>
32
34
  `${presentationId}/outline/${slideOutlineId}`,
33
35
  CREATE_SLIDE_OUTLINE: (presentationId: string) => `${presentationId}/outline`,
package/api/routes.ts CHANGED
@@ -714,6 +714,8 @@ export const REST_API = {
714
714
  `${ROOT}/${CONTROLLERS.PRESENTATION_PUBLIC_CONTROLLER}/${CONTROLLERS.PRESENTATION_ROUTES.GENERATE_REPORT(presentationId)}`,
715
715
  REPOSITION_SLIDE_OUTLINE: (presentationId: string, slideOutlineId: string) =>
716
716
  `${ROOT}/${CONTROLLERS.PRESENTATION_PUBLIC_CONTROLLER}/${CONTROLLERS.PRESENTATION_ROUTES.REPOSITION_SLIDE_OUTLINE(presentationId, slideOutlineId)}`,
717
+ REPOSITION_SLIDE: (presentationId: string, slideId: string) =>
718
+ `${ROOT}/${CONTROLLERS.PRESENTATION_PUBLIC_CONTROLLER}/${CONTROLLERS.PRESENTATION_ROUTES.REPOSITION_SLIDE(presentationId, slideId)}`,
717
719
  DELETE_SLIDE_OUTLINE: (presentationId: string, slideOutlineId: string) =>
718
720
  `${ROOT}/${CONTROLLERS.PRESENTATION_PUBLIC_CONTROLLER}/${CONTROLLERS.PRESENTATION_ROUTES.DELETE_SLIDE_OUTLINE(presentationId, slideOutlineId)}`,
719
721
  CREATE_SLIDE_OUTLINE: (presentationId: string) =>
@@ -762,6 +764,8 @@ export const REST_API = {
762
764
  `${ROOT}/${CONTROLLERS.PRESENTATION_PRIVATE_CONTROLLER}/${CONTROLLERS.PRESENTATION_ROUTES.GENERATE_REPORT(presentationId)}`,
763
765
  REPOSITION_SLIDE_OUTLINE: (presentationId: string, slideOutlineId: string) =>
764
766
  `${ROOT}/${CONTROLLERS.PRESENTATION_PRIVATE_CONTROLLER}/${CONTROLLERS.PRESENTATION_ROUTES.REPOSITION_SLIDE_OUTLINE(presentationId, slideOutlineId)}`,
767
+ REPOSITION_SLIDE: (presentationId: string, slideId: string) =>
768
+ `${ROOT}/${CONTROLLERS.PRESENTATION_PRIVATE_CONTROLLER}/${CONTROLLERS.PRESENTATION_ROUTES.REPOSITION_SLIDE(presentationId, slideId)}`,
765
769
  DELETE_SLIDE_OUTLINE: (presentationId: string, slideOutlineId: string) =>
766
770
  `${ROOT}/${CONTROLLERS.PRESENTATION_PRIVATE_CONTROLLER}/${CONTROLLERS.PRESENTATION_ROUTES.DELETE_SLIDE_OUTLINE(presentationId, slideOutlineId)}`,
767
771
  CREATE_SLIDE_OUTLINE: (presentationId: string) =>
@@ -25,6 +25,7 @@ exports.PRESENTATION_ROUTES = {
25
25
  PARAPHRASE: (presentationId, slideId) => `${presentationId}/slides/${slideId}/paraphrase`,
26
26
  GENERATE_REPORT: (presentationId) => `${presentationId}/generate-report`,
27
27
  REPOSITION_SLIDE_OUTLINE: (presentationId, slideOutlineId) => `${presentationId}/outline/${slideOutlineId}/move`,
28
+ REPOSITION_SLIDE: (presentationId, slideId) => `${presentationId}/slides/${slideId}/move`,
28
29
  DELETE_SLIDE_OUTLINE: (presentationId, slideOutlineId) => `${presentationId}/outline/${slideOutlineId}`,
29
30
  CREATE_SLIDE_OUTLINE: (presentationId) => `${presentationId}/outline`,
30
31
  EXPORT_AS_PPTX: (uuid) => `${uuid}/export-as-pptx`,
@@ -556,6 +556,7 @@ exports.REST_API = {
556
556
  PARAPHRASE: (presentationId, slideId) => `${exports.ROOT}/${CONTROLLERS.PRESENTATION_PUBLIC_CONTROLLER}/${CONTROLLERS.PRESENTATION_ROUTES.PARAPHRASE(presentationId, slideId)}`,
557
557
  GENERATE_REPORT: (presentationId) => `${exports.ROOT}/${CONTROLLERS.PRESENTATION_PUBLIC_CONTROLLER}/${CONTROLLERS.PRESENTATION_ROUTES.GENERATE_REPORT(presentationId)}`,
558
558
  REPOSITION_SLIDE_OUTLINE: (presentationId, slideOutlineId) => `${exports.ROOT}/${CONTROLLERS.PRESENTATION_PUBLIC_CONTROLLER}/${CONTROLLERS.PRESENTATION_ROUTES.REPOSITION_SLIDE_OUTLINE(presentationId, slideOutlineId)}`,
559
+ REPOSITION_SLIDE: (presentationId, slideId) => `${exports.ROOT}/${CONTROLLERS.PRESENTATION_PUBLIC_CONTROLLER}/${CONTROLLERS.PRESENTATION_ROUTES.REPOSITION_SLIDE(presentationId, slideId)}`,
559
560
  DELETE_SLIDE_OUTLINE: (presentationId, slideOutlineId) => `${exports.ROOT}/${CONTROLLERS.PRESENTATION_PUBLIC_CONTROLLER}/${CONTROLLERS.PRESENTATION_ROUTES.DELETE_SLIDE_OUTLINE(presentationId, slideOutlineId)}`,
560
561
  CREATE_SLIDE_OUTLINE: (presentationId) => `${exports.ROOT}/${CONTROLLERS.PRESENTATION_PUBLIC_CONTROLLER}/${CONTROLLERS.PRESENTATION_ROUTES.CREATE_SLIDE_OUTLINE(presentationId)}`,
561
562
  EXPORT_AS_PPTX: (uuid) => `${exports.ROOT}/${CONTROLLERS.PRESENTATION_PUBLIC_CONTROLLER}/${CONTROLLERS.PRESENTATION_ROUTES.EXPORT_AS_PPTX(uuid)}`,
@@ -584,6 +585,7 @@ exports.REST_API = {
584
585
  PARAPHRASE: (presentationId, slideId) => `${exports.ROOT}/${CONTROLLERS.PRESENTATION_PRIVATE_CONTROLLER}/${CONTROLLERS.PRESENTATION_ROUTES.PARAPHRASE(presentationId, slideId)}`,
585
586
  GENERATE_REPORT: (presentationId) => `${exports.ROOT}/${CONTROLLERS.PRESENTATION_PRIVATE_CONTROLLER}/${CONTROLLERS.PRESENTATION_ROUTES.GENERATE_REPORT(presentationId)}`,
586
587
  REPOSITION_SLIDE_OUTLINE: (presentationId, slideOutlineId) => `${exports.ROOT}/${CONTROLLERS.PRESENTATION_PRIVATE_CONTROLLER}/${CONTROLLERS.PRESENTATION_ROUTES.REPOSITION_SLIDE_OUTLINE(presentationId, slideOutlineId)}`,
588
+ REPOSITION_SLIDE: (presentationId, slideId) => `${exports.ROOT}/${CONTROLLERS.PRESENTATION_PRIVATE_CONTROLLER}/${CONTROLLERS.PRESENTATION_ROUTES.REPOSITION_SLIDE(presentationId, slideId)}`,
587
589
  DELETE_SLIDE_OUTLINE: (presentationId, slideOutlineId) => `${exports.ROOT}/${CONTROLLERS.PRESENTATION_PRIVATE_CONTROLLER}/${CONTROLLERS.PRESENTATION_ROUTES.DELETE_SLIDE_OUTLINE(presentationId, slideOutlineId)}`,
588
590
  CREATE_SLIDE_OUTLINE: (presentationId) => `${exports.ROOT}/${CONTROLLERS.PRESENTATION_PRIVATE_CONTROLLER}/${CONTROLLERS.PRESENTATION_ROUTES.CREATE_SLIDE_OUTLINE(presentationId)}`,
589
591
  EXPORT_AS_PPTX: (uuid) => `${exports.ROOT}/${CONTROLLERS.PRESENTATION_PRIVATE_CONTROLLER}/${CONTROLLERS.PRESENTATION_ROUTES.EXPORT_AS_PPTX(uuid)}`,
@@ -27,6 +27,7 @@ __exportStar(require("./generate-presentation-slides.command"), exports);
27
27
  __exportStar(require("./generate-and-insert-slide.command"), exports);
28
28
  __exportStar(require("./get-presentation-config.command"), exports);
29
29
  __exportStar(require("./reposition-slide-outline.command"), exports);
30
+ __exportStar(require("./reposition-slide.command"), exports);
30
31
  __exportStar(require("./update-slide-outline.command"), exports);
31
32
  __exportStar(require("./update-presentation-outline.command"), exports);
32
33
  __exportStar(require("./update-presentation.command"), exports);
@@ -0,0 +1,15 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.RepositionSlideCommand = void 0;
4
+ const zod_1 = require("zod");
5
+ var RepositionSlideCommand;
6
+ (function (RepositionSlideCommand) {
7
+ RepositionSlideCommand.RequestParamsSchema = zod_1.z.object({
8
+ presentationId: zod_1.z.string().uuid(),
9
+ slideId: zod_1.z.string().uuid(),
10
+ });
11
+ RepositionSlideCommand.RequestBodySchema = zod_1.z.object({
12
+ newPosition: zod_1.z.number().min(0),
13
+ });
14
+ RepositionSlideCommand.ResponseSchema = zod_1.z.void();
15
+ })(RepositionSlideCommand || (exports.RepositionSlideCommand = RepositionSlideCommand = {}));
@@ -11,6 +11,7 @@ export * from './generate-presentation-slides.command';
11
11
  export * from './generate-and-insert-slide.command';
12
12
  export * from './get-presentation-config.command';
13
13
  export * from './reposition-slide-outline.command';
14
+ export * from './reposition-slide.command';
14
15
  export * from './update-slide-outline.command';
15
16
  export * from './update-presentation-outline.command';
16
17
  export * from './update-presentation.command';
@@ -0,0 +1,17 @@
1
+ import { z } from 'zod';
2
+
3
+ export namespace RepositionSlideCommand {
4
+ export const RequestParamsSchema = z.object({
5
+ presentationId: z.string().uuid(),
6
+ slideId: z.string().uuid(),
7
+ });
8
+ export type Params = z.infer<typeof RequestParamsSchema>;
9
+
10
+ export const RequestBodySchema = z.object({
11
+ newPosition: z.number().min(0),
12
+ });
13
+ export type Request = z.infer<typeof RequestBodySchema>;
14
+
15
+ export const ResponseSchema = z.void();
16
+ export type Response = z.infer<typeof ResponseSchema>;
17
+ }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@purpleschool/gptbot",
3
- "version": "0.12.5",
3
+ "version": "0.12.6",
4
4
  "description": "",
5
5
  "main": "build/index.js",
6
6
  "types": "build/index.d.ts",