@purpleschool/gptbot 0.8.74 → 0.8.76
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/http/community.ts +1 -1
- package/api/routes.ts +2 -1
- package/build/api/controllers/http/community.js +1 -1
- package/build/api/routes.js +1 -1
- package/build/commands/community/get-count-of-likes-on-user-posts.command.js +13 -0
- package/build/commands/community/index.js +1 -1
- package/build/commands/tools/image-editor/retry-image-editor-job.command.js +1 -1
- package/build/commands/tools/image-generation/index.js +1 -0
- package/build/commands/tools/image-generation/retry-image-generation-job.command.js +28 -0
- package/commands/community/get-count-of-likes-on-user-posts.command.ts +14 -0
- package/commands/community/index.ts +1 -1
- package/commands/tools/image-editor/retry-image-editor-job.command.ts +2 -2
- package/commands/tools/image-generation/index.ts +1 -0
- package/commands/tools/image-generation/retry-image-generation-job.command.ts +30 -0
- package/package.json +1 -1
- package/build/commands/community/get-count-of-likes-on-my-posts.command.js +0 -10
- package/commands/community/get-count-of-likes-on-my-posts.command.ts +0 -9
|
@@ -16,7 +16,7 @@ export const COMMUNITY_ROUTES_PRIVATE = {
|
|
|
16
16
|
FAVORITE: (uuid: string) => `${uuid}/favorite`,
|
|
17
17
|
|
|
18
18
|
REPORT: (uuid: string) => `report/${uuid}`,
|
|
19
|
-
LIKES_COUNT:
|
|
19
|
+
LIKES_COUNT: (userId: string) => `${userId}/likes/count`,
|
|
20
20
|
} as const;
|
|
21
21
|
|
|
22
22
|
export const COMMUNITY_ROUTES_PUBLIC = {
|
package/api/routes.ts
CHANGED
|
@@ -883,7 +883,8 @@ export const REST_API = {
|
|
|
883
883
|
`${ROOT}/${CONTROLLERS.COMMUNITY_CONTROLLER_PRIVATE}/${CONTROLLERS.COMMUNITY_ROUTES_PRIVATE.FAVORITE(uuid)}`,
|
|
884
884
|
REPORT: (uuid: string) =>
|
|
885
885
|
`${ROOT}/${CONTROLLERS.COMMUNITY_CONTROLLER_PRIVATE}/${CONTROLLERS.COMMUNITY_ROUTES_PRIVATE.REPORT(uuid)}`,
|
|
886
|
-
LIKES_COUNT:
|
|
886
|
+
LIKES_COUNT: (userId: string) =>
|
|
887
|
+
`${ROOT}/${CONTROLLERS.COMMUNITY_CONTROLLER_PRIVATE}/${CONTROLLERS.COMMUNITY_ROUTES_PRIVATE.LIKES_COUNT(userId)}`,
|
|
887
888
|
},
|
|
888
889
|
COMMUNITY_PUBLIC: {
|
|
889
890
|
GET_ALL: `${ROOT}/${CONTROLLERS.COMMUNITY_CONTROLLER_PUBLIC}/${CONTROLLERS.COMMUNITY_ROUTES_PUBLIC.GET_ALL}`,
|
|
@@ -17,7 +17,7 @@ exports.COMMUNITY_ROUTES_PRIVATE = {
|
|
|
17
17
|
LIKE: (uuid) => `${uuid}/like`,
|
|
18
18
|
FAVORITE: (uuid) => `${uuid}/favorite`,
|
|
19
19
|
REPORT: (uuid) => `report/${uuid}`,
|
|
20
|
-
LIKES_COUNT:
|
|
20
|
+
LIKES_COUNT: (userId) => `${userId}/likes/count`,
|
|
21
21
|
};
|
|
22
22
|
exports.COMMUNITY_ROUTES_PUBLIC = {
|
|
23
23
|
GET_ALL: '',
|
package/build/api/routes.js
CHANGED
|
@@ -680,7 +680,7 @@ exports.REST_API = {
|
|
|
680
680
|
LIKE: (uuid) => `${exports.ROOT}/${CONTROLLERS.COMMUNITY_CONTROLLER_PRIVATE}/${CONTROLLERS.COMMUNITY_ROUTES_PRIVATE.LIKE(uuid)}`,
|
|
681
681
|
FAVORITE: (uuid) => `${exports.ROOT}/${CONTROLLERS.COMMUNITY_CONTROLLER_PRIVATE}/${CONTROLLERS.COMMUNITY_ROUTES_PRIVATE.FAVORITE(uuid)}`,
|
|
682
682
|
REPORT: (uuid) => `${exports.ROOT}/${CONTROLLERS.COMMUNITY_CONTROLLER_PRIVATE}/${CONTROLLERS.COMMUNITY_ROUTES_PRIVATE.REPORT(uuid)}`,
|
|
683
|
-
LIKES_COUNT: `${exports.ROOT}/${CONTROLLERS.COMMUNITY_CONTROLLER_PRIVATE}/${CONTROLLERS.COMMUNITY_ROUTES_PRIVATE.LIKES_COUNT}`,
|
|
683
|
+
LIKES_COUNT: (userId) => `${exports.ROOT}/${CONTROLLERS.COMMUNITY_CONTROLLER_PRIVATE}/${CONTROLLERS.COMMUNITY_ROUTES_PRIVATE.LIKES_COUNT(userId)}`,
|
|
684
684
|
},
|
|
685
685
|
COMMUNITY_PUBLIC: {
|
|
686
686
|
GET_ALL: `${exports.ROOT}/${CONTROLLERS.COMMUNITY_CONTROLLER_PUBLIC}/${CONTROLLERS.COMMUNITY_ROUTES_PUBLIC.GET_ALL}`,
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.GetCountOfLikesOnUserPostsCommand = void 0;
|
|
4
|
+
const zod_1 = require("zod");
|
|
5
|
+
var GetCountOfLikesOnUserPostsCommand;
|
|
6
|
+
(function (GetCountOfLikesOnUserPostsCommand) {
|
|
7
|
+
GetCountOfLikesOnUserPostsCommand.RequestSchema = zod_1.z.object({
|
|
8
|
+
userId: zod_1.z.string().uuid(),
|
|
9
|
+
});
|
|
10
|
+
GetCountOfLikesOnUserPostsCommand.ResponseSchema = zod_1.z.object({
|
|
11
|
+
data: zod_1.z.number(),
|
|
12
|
+
});
|
|
13
|
+
})(GetCountOfLikesOnUserPostsCommand || (exports.GetCountOfLikesOnUserPostsCommand = GetCountOfLikesOnUserPostsCommand = {}));
|
|
@@ -26,4 +26,4 @@ __exportStar(require("./share-my-community-post.command"), exports);
|
|
|
26
26
|
__exportStar(require("./get-my-likes-community-posts.command"), exports);
|
|
27
27
|
__exportStar(require("./get-my-favorite-community-posts.command"), exports);
|
|
28
28
|
__exportStar(require("./send-report-to-community-post.command"), exports);
|
|
29
|
-
__exportStar(require("./get-count-of-likes-on-
|
|
29
|
+
__exportStar(require("./get-count-of-likes-on-user-posts.command"), exports);
|
|
@@ -13,7 +13,7 @@ var RetryImageEditorJobCommand;
|
|
|
13
13
|
prompt: zod_1.z.string().optional(),
|
|
14
14
|
params: zod_1.z
|
|
15
15
|
.object({
|
|
16
|
-
attachedFiles: zod_1.z.
|
|
16
|
+
attachedFiles: zod_1.z.string().array(),
|
|
17
17
|
systemPromptId: zod_1.z.string().optional(),
|
|
18
18
|
})
|
|
19
19
|
.optional(),
|
|
@@ -22,3 +22,4 @@ __exportStar(require("./update-image-generation-job-title.command"), exports);
|
|
|
22
22
|
__exportStar(require("./delete-image-generation-job-by-uuid.command"), exports);
|
|
23
23
|
__exportStar(require("./delete-all-image-generation-jobs.command"), exports);
|
|
24
24
|
__exportStar(require("./get-image-generation-config.command"), exports);
|
|
25
|
+
__exportStar(require("./retry-image-generation-job.command"), exports);
|
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.RetryImageGenerationJobCommand = void 0;
|
|
4
|
+
const zod_1 = require("zod");
|
|
5
|
+
const constants_1 = require("../../../constants");
|
|
6
|
+
const models_1 = require("../../../models");
|
|
7
|
+
var RetryImageGenerationJobCommand;
|
|
8
|
+
(function (RetryImageGenerationJobCommand) {
|
|
9
|
+
RetryImageGenerationJobCommand.RequestParamsSchema = zod_1.z.object({
|
|
10
|
+
uuid: zod_1.z.string().uuid(),
|
|
11
|
+
});
|
|
12
|
+
RetryImageGenerationJobCommand.RequestBodySchema = zod_1.z.object({
|
|
13
|
+
modelId: zod_1.z.string().uuid(),
|
|
14
|
+
prompt: zod_1.z.string(),
|
|
15
|
+
params: zod_1.z
|
|
16
|
+
.object({
|
|
17
|
+
aspectRatio: zod_1.z.string(),
|
|
18
|
+
attachedFiles: zod_1.z.string().array(),
|
|
19
|
+
enhancePrompt: zod_1.z.boolean(),
|
|
20
|
+
resolution: zod_1.z.nativeEnum(constants_1.IMAGE_GENERATION_RESOLUTION).optional(),
|
|
21
|
+
})
|
|
22
|
+
.optional(),
|
|
23
|
+
presetId: zod_1.z.string().uuid().nullable().optional(),
|
|
24
|
+
});
|
|
25
|
+
RetryImageGenerationJobCommand.ResponseSchema = zod_1.z.object({
|
|
26
|
+
data: models_1.ImageGenerationJobSchema,
|
|
27
|
+
});
|
|
28
|
+
})(RetryImageGenerationJobCommand || (exports.RetryImageGenerationJobCommand = RetryImageGenerationJobCommand = {}));
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
import { z } from 'zod';
|
|
2
|
+
|
|
3
|
+
export namespace GetCountOfLikesOnUserPostsCommand {
|
|
4
|
+
export const RequestSchema = z.object({
|
|
5
|
+
userId: z.string().uuid(),
|
|
6
|
+
});
|
|
7
|
+
export type Request = z.infer<typeof RequestSchema>;
|
|
8
|
+
|
|
9
|
+
export const ResponseSchema = z.object({
|
|
10
|
+
data: z.number(),
|
|
11
|
+
});
|
|
12
|
+
|
|
13
|
+
export type Response = z.infer<typeof ResponseSchema>;
|
|
14
|
+
}
|
|
@@ -10,4 +10,4 @@ export * from './share-my-community-post.command';
|
|
|
10
10
|
export * from './get-my-likes-community-posts.command';
|
|
11
11
|
export * from './get-my-favorite-community-posts.command';
|
|
12
12
|
export * from './send-report-to-community-post.command';
|
|
13
|
-
export * from './get-count-of-likes-on-
|
|
13
|
+
export * from './get-count-of-likes-on-user-posts.command';
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { z } from 'zod';
|
|
2
|
-
import {
|
|
2
|
+
import { ImageEditorJobSchema } from '../../../models';
|
|
3
3
|
|
|
4
4
|
export namespace RetryImageEditorJobCommand {
|
|
5
5
|
export const RequestParamsSchema = z.object({
|
|
@@ -12,7 +12,7 @@ export namespace RetryImageEditorJobCommand {
|
|
|
12
12
|
prompt: z.string().optional(),
|
|
13
13
|
params: z
|
|
14
14
|
.object({
|
|
15
|
-
attachedFiles: z.
|
|
15
|
+
attachedFiles: z.string().array(),
|
|
16
16
|
systemPromptId: z.string().optional(),
|
|
17
17
|
})
|
|
18
18
|
.optional(),
|
|
@@ -6,3 +6,4 @@ export * from './update-image-generation-job-title.command';
|
|
|
6
6
|
export * from './delete-image-generation-job-by-uuid.command';
|
|
7
7
|
export * from './delete-all-image-generation-jobs.command';
|
|
8
8
|
export * from './get-image-generation-config.command';
|
|
9
|
+
export * from './retry-image-generation-job.command';
|
|
@@ -0,0 +1,30 @@
|
|
|
1
|
+
import { z } from 'zod';
|
|
2
|
+
import { IMAGE_GENERATION_RESOLUTION } from '../../../constants';
|
|
3
|
+
import { ImageGenerationJobSchema } from '../../../models';
|
|
4
|
+
|
|
5
|
+
export namespace RetryImageGenerationJobCommand {
|
|
6
|
+
export const RequestParamsSchema = z.object({
|
|
7
|
+
uuid: z.string().uuid(),
|
|
8
|
+
});
|
|
9
|
+
export type RequestParams = z.infer<typeof RequestParamsSchema>;
|
|
10
|
+
|
|
11
|
+
export const RequestBodySchema = z.object({
|
|
12
|
+
modelId: z.string().uuid(),
|
|
13
|
+
prompt: z.string(),
|
|
14
|
+
params: z
|
|
15
|
+
.object({
|
|
16
|
+
aspectRatio: z.string(),
|
|
17
|
+
attachedFiles: z.string().array(),
|
|
18
|
+
enhancePrompt: z.boolean(),
|
|
19
|
+
resolution: z.nativeEnum(IMAGE_GENERATION_RESOLUTION).optional(),
|
|
20
|
+
})
|
|
21
|
+
.optional(),
|
|
22
|
+
presetId: z.string().uuid().nullable().optional(),
|
|
23
|
+
});
|
|
24
|
+
export type RequestBody = z.infer<typeof RequestBodySchema>;
|
|
25
|
+
|
|
26
|
+
export const ResponseSchema = z.object({
|
|
27
|
+
data: ImageGenerationJobSchema,
|
|
28
|
+
});
|
|
29
|
+
export type Response = z.infer<typeof ResponseSchema>;
|
|
30
|
+
}
|
package/package.json
CHANGED
|
@@ -1,10 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.GetCountOfLikesOnMyPostsCommand = void 0;
|
|
4
|
-
const zod_1 = require("zod");
|
|
5
|
-
var GetCountOfLikesOnMyPostsCommand;
|
|
6
|
-
(function (GetCountOfLikesOnMyPostsCommand) {
|
|
7
|
-
GetCountOfLikesOnMyPostsCommand.ResponseSchema = zod_1.z.object({
|
|
8
|
-
data: zod_1.z.number(),
|
|
9
|
-
});
|
|
10
|
-
})(GetCountOfLikesOnMyPostsCommand || (exports.GetCountOfLikesOnMyPostsCommand = GetCountOfLikesOnMyPostsCommand = {}));
|