@purpleschool/gptbot 0.12.25 → 0.12.27

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.
@@ -2,6 +2,7 @@ export const UI_NOTIFICATION_PRIVATE_CONTROLLER = 'private/ui-notification' as c
2
2
  export const UI_NOTIFICATION_PUBLIC_CONTROLLER = 'public/ui-notification' as const;
3
3
 
4
4
  export const UI_NOTIFICATION_ROUTES = {
5
+ ADMIN_BROADCAST: 'admin/broadcast',
5
6
  GET_ALL: 'all',
6
7
  READ_ALL: 'all/read',
7
8
  DELETE_ALL: 'all/delete',
package/api/routes.ts CHANGED
@@ -905,6 +905,7 @@ export const REST_API = {
905
905
  `${ROOT}/${CONTROLLERS.UI_NOTIFICATION_PUBLIC_CONTROLLER}/${CONTROLLERS.UI_NOTIFICATION_ROUTES.CANCEL(uuid)}`,
906
906
  },
907
907
  UI_NOTIFICATION_PRIVATE: {
908
+ ADMIN_BROADCAST: `${ROOT}/${CONTROLLERS.UI_NOTIFICATION_PRIVATE_CONTROLLER}/${CONTROLLERS.UI_NOTIFICATION_ROUTES.ADMIN_BROADCAST}`,
908
909
  GET_ALL: `${ROOT}/${CONTROLLERS.UI_NOTIFICATION_PRIVATE_CONTROLLER}/${CONTROLLERS.UI_NOTIFICATION_ROUTES.GET_ALL}`,
909
910
  GET_BY_PAGE: `${ROOT}/${CONTROLLERS.UI_NOTIFICATION_PRIVATE_CONTROLLER}/${CONTROLLERS.UI_NOTIFICATION_ROUTES.GET_BY_PAGE}`,
910
911
  READ: (uuid: string) =>
@@ -4,6 +4,7 @@ exports.UI_NOTIFICATION_ROUTES = exports.UI_NOTIFICATION_PUBLIC_CONTROLLER = exp
4
4
  exports.UI_NOTIFICATION_PRIVATE_CONTROLLER = 'private/ui-notification';
5
5
  exports.UI_NOTIFICATION_PUBLIC_CONTROLLER = 'public/ui-notification';
6
6
  exports.UI_NOTIFICATION_ROUTES = {
7
+ ADMIN_BROADCAST: 'admin/broadcast',
7
8
  GET_ALL: 'all',
8
9
  READ_ALL: 'all/read',
9
10
  DELETE_ALL: 'all/delete',
@@ -682,6 +682,7 @@ exports.REST_API = {
682
682
  CANCEL: (uuid) => `${exports.ROOT}/${CONTROLLERS.UI_NOTIFICATION_PUBLIC_CONTROLLER}/${CONTROLLERS.UI_NOTIFICATION_ROUTES.CANCEL(uuid)}`,
683
683
  },
684
684
  UI_NOTIFICATION_PRIVATE: {
685
+ ADMIN_BROADCAST: `${exports.ROOT}/${CONTROLLERS.UI_NOTIFICATION_PRIVATE_CONTROLLER}/${CONTROLLERS.UI_NOTIFICATION_ROUTES.ADMIN_BROADCAST}`,
685
686
  GET_ALL: `${exports.ROOT}/${CONTROLLERS.UI_NOTIFICATION_PRIVATE_CONTROLLER}/${CONTROLLERS.UI_NOTIFICATION_ROUTES.GET_ALL}`,
686
687
  GET_BY_PAGE: `${exports.ROOT}/${CONTROLLERS.UI_NOTIFICATION_PRIVATE_CONTROLLER}/${CONTROLLERS.UI_NOTIFICATION_ROUTES.GET_BY_PAGE}`,
687
688
  READ: (uuid) => `${exports.ROOT}/${CONTROLLERS.UI_NOTIFICATION_PRIVATE_CONTROLLER}/${CONTROLLERS.UI_NOTIFICATION_ROUTES.READ(uuid)}`,
@@ -0,0 +1,17 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.CreateAdminBroadcastUiNotificationCommand = void 0;
4
+ const zod_1 = require("zod");
5
+ var CreateAdminBroadcastUiNotificationCommand;
6
+ (function (CreateAdminBroadcastUiNotificationCommand) {
7
+ CreateAdminBroadcastUiNotificationCommand.RequestBodySchema = zod_1.z.object({
8
+ title: zod_1.z.string().trim().min(1),
9
+ message: zod_1.z.string().trim().min(1),
10
+ onlyRegistered: zod_1.z.boolean().optional(),
11
+ });
12
+ CreateAdminBroadcastUiNotificationCommand.ResponseSchema = zod_1.z.object({
13
+ data: zod_1.z.object({
14
+ insertedCount: zod_1.z.number().int().min(0),
15
+ }),
16
+ });
17
+ })(CreateAdminBroadcastUiNotificationCommand || (exports.CreateAdminBroadcastUiNotificationCommand = CreateAdminBroadcastUiNotificationCommand = {}));
@@ -16,6 +16,7 @@ var __exportStar = (this && this.__exportStar) || function(m, exports) {
16
16
  Object.defineProperty(exports, "__esModule", { value: true });
17
17
  __exportStar(require("./find-active-ui-notifications-by-page-and-user.command"), exports);
18
18
  __exportStar(require("./find-ui-notifications.command"), exports);
19
+ __exportStar(require("./create-admin-broadcast-ui-notification.command"), exports);
19
20
  __exportStar(require("./delete-ui-notification.command"), exports);
20
21
  __exportStar(require("./delete-many-ui-notifications.command"), exports);
21
22
  __exportStar(require("./delete-all-ui-notifications.command"), exports);
@@ -15,6 +15,7 @@ var AI_MODEL_STRATEGY;
15
15
  AI_MODEL_STRATEGY["LLAMA_TEXT_GENERATION"] = "llama_text_generation";
16
16
  AI_MODEL_STRATEGY["QWEN_TEXT_GENERATION"] = "qwen_text_generation";
17
17
  AI_MODEL_STRATEGY["KIE_OPENAI_TEXT_GENERATION"] = "kie_openai_text_generation";
18
+ AI_MODEL_STRATEGY["KIE_GEMINI_TEXT_GENERATION"] = "kie_gemini_text_generation";
18
19
  AI_MODEL_STRATEGY["GROK_IMAGE_GENERATION"] = "grok_image_generation";
19
20
  AI_MODEL_STRATEGY["GEMINI_TEXT_GENERATION"] = "gemini_text_generation";
20
21
  AI_MODEL_STRATEGY["GEMINI_IMAGE_GENERATION"] = "gemini_image_generation";
@@ -7,4 +7,5 @@ var UI_NOTIFICATION_TYPE;
7
7
  UI_NOTIFICATION_TYPE["SUBSCRIPTION_PAST_DUE"] = "SUBSCRIPTION_PAST_DUE";
8
8
  UI_NOTIFICATION_TYPE["FRAUD_DETECTED"] = "FRAUD_DETECTED";
9
9
  UI_NOTIFICATION_TYPE["PROMOCODE_OFFER"] = "PROMOCODE_OFFER";
10
+ UI_NOTIFICATION_TYPE["GENERIC"] = "GENERIC";
10
11
  })(UI_NOTIFICATION_TYPE || (exports.UI_NOTIFICATION_TYPE = UI_NOTIFICATION_TYPE = {}));
@@ -27,4 +27,5 @@ exports.ImageEditorJobSchema = tool_job_schema_1.ToolJobSchema.extend({
27
27
  isPublished: zod_1.z.boolean(),
28
28
  postId: zod_1.z.string().nullable(),
29
29
  modelId: zod_1.z.string(),
30
+ previewUrl: zod_1.z.string().nullable(),
30
31
  });
@@ -34,4 +34,5 @@ exports.ImageGenerationJobSchema = tool_job_schema_1.ToolJobSchema.extend({
34
34
  isPublished: zod_1.z.boolean(),
35
35
  postId: zod_1.z.string().nullable(),
36
36
  modelId: zod_1.z.string(),
37
+ previewUrl: zod_1.z.string().nullable(),
37
38
  });
@@ -25,4 +25,5 @@ exports.InteriorDesignJobSchema = tool_job_schema_1.ToolJobSchema.extend({
25
25
  .nullable(),
26
26
  params: exports.InteriorDesignJobParamsSchema,
27
27
  modelId: zod_1.z.string(),
28
+ previewUrl: zod_1.z.string().nullable(),
28
29
  });
@@ -31,4 +31,5 @@ exports.MarketplaceCardJobSchema = tool_job_schema_1.ToolJobSchema.extend({
31
31
  price: zod_1.z.number(),
32
32
  attachments: exports.MarketplaceCardJobAttachmentsSchema,
33
33
  workspaceId: zod_1.z.string().nullable(),
34
+ previewUrl: zod_1.z.string().nullable(),
34
35
  });
@@ -0,0 +1,19 @@
1
+ import { z } from 'zod';
2
+
3
+ export namespace CreateAdminBroadcastUiNotificationCommand {
4
+ export const RequestBodySchema = z.object({
5
+ title: z.string().trim().min(1),
6
+ message: z.string().trim().min(1),
7
+ onlyRegistered: z.boolean().optional(),
8
+ });
9
+
10
+ export type Request = z.infer<typeof RequestBodySchema>;
11
+
12
+ export const ResponseSchema = z.object({
13
+ data: z.object({
14
+ insertedCount: z.number().int().min(0),
15
+ }),
16
+ });
17
+
18
+ export type Response = z.infer<typeof ResponseSchema>;
19
+ }
@@ -1,5 +1,6 @@
1
1
  export * from './find-active-ui-notifications-by-page-and-user.command';
2
2
  export * from './find-ui-notifications.command';
3
+ export * from './create-admin-broadcast-ui-notification.command';
3
4
  export * from './delete-ui-notification.command';
4
5
  export * from './delete-many-ui-notifications.command';
5
6
  export * from './delete-all-ui-notifications.command';
@@ -11,6 +11,7 @@ export enum AI_MODEL_STRATEGY {
11
11
  LLAMA_TEXT_GENERATION = 'llama_text_generation',
12
12
  QWEN_TEXT_GENERATION = 'qwen_text_generation',
13
13
  KIE_OPENAI_TEXT_GENERATION = 'kie_openai_text_generation',
14
+ KIE_GEMINI_TEXT_GENERATION = 'kie_gemini_text_generation',
14
15
  GROK_IMAGE_GENERATION = 'grok_image_generation',
15
16
  GEMINI_TEXT_GENERATION = 'gemini_text_generation',
16
17
  GEMINI_IMAGE_GENERATION = 'gemini_image_generation',
@@ -3,4 +3,5 @@ export enum UI_NOTIFICATION_TYPE {
3
3
  SUBSCRIPTION_PAST_DUE = 'SUBSCRIPTION_PAST_DUE',
4
4
  FRAUD_DETECTED = 'FRAUD_DETECTED',
5
5
  PROMOCODE_OFFER = 'PROMOCODE_OFFER',
6
+ GENERIC = 'GENERIC',
6
7
  }
@@ -30,6 +30,7 @@ export const ImageEditorJobSchema = ToolJobSchema.extend({
30
30
  isPublished: z.boolean(),
31
31
  postId: z.string().nullable(),
32
32
  modelId: z.string(),
33
+ previewUrl: z.string().nullable(),
33
34
  });
34
35
 
35
36
  export type ImageEditorJob = z.infer<typeof ImageEditorJobSchema>;
@@ -39,6 +39,7 @@ export const ImageGenerationJobSchema = ToolJobSchema.extend({
39
39
  isPublished: z.boolean(),
40
40
  postId: z.string().nullable(),
41
41
  modelId: z.string(),
42
+ previewUrl: z.string().nullable(),
42
43
  });
43
44
 
44
45
  export type ImageGenerationJob = z.infer<typeof ImageGenerationJobSchema>;
@@ -28,6 +28,7 @@ export const InteriorDesignJobSchema = ToolJobSchema.extend({
28
28
  .nullable(),
29
29
  params: InteriorDesignJobParamsSchema,
30
30
  modelId: z.string(),
31
+ previewUrl: z.string().nullable(),
31
32
  });
32
33
 
33
34
  export type InteriorDesignJob = z.infer<typeof InteriorDesignJobSchema>;
@@ -32,5 +32,6 @@ export const MarketplaceCardJobSchema = ToolJobSchema.extend({
32
32
  price: z.number(),
33
33
  attachments: MarketplaceCardJobAttachmentsSchema,
34
34
  workspaceId: z.string().nullable(),
35
+ previewUrl: z.string().nullable(),
35
36
  });
36
37
  export type MarketplaceCardJob = z.infer<typeof MarketplaceCardJobSchema>;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@purpleschool/gptbot",
3
- "version": "0.12.25",
3
+ "version": "0.12.27",
4
4
  "description": "",
5
5
  "main": "build/index.js",
6
6
  "types": "build/index.d.ts",