@common_ch/common 1.0.313 → 1.0.315

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.
@@ -18,7 +18,7 @@ interface IPart {
18
18
  export type ContentGemini = {
19
19
  role: ContentRoleGeminiEnum;
20
20
  parts: IPart[];
21
- aiOptionId: string | AiOptionDoc;
21
+ aiOption: string | AiOptionDoc;
22
22
  attachments?: Attachment[];
23
23
  createdAt: string;
24
24
  };
@@ -0,0 +1,14 @@
1
+ import { PromptTypeEnum } from "../../../enums/prompt";
2
+ import { Subjects } from "../../subjects";
3
+ export interface PromptCreatedEvent {
4
+ subject: Subjects.PromptCreated;
5
+ data: {
6
+ id: string;
7
+ userId: string;
8
+ aiId: string;
9
+ promptType: PromptTypeEnum;
10
+ prompt: string;
11
+ description: string;
12
+ version: number;
13
+ };
14
+ }
@@ -0,0 +1,2 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
@@ -0,0 +1,14 @@
1
+ import { PromptTypeEnum } from "../../../enums/prompt";
2
+ import { Subjects } from "../../subjects";
3
+ export interface PromptUpdateEvent {
4
+ subject: Subjects.PromptUpdated;
5
+ data: {
6
+ id: string;
7
+ userId: string;
8
+ aiId: string;
9
+ promptType: PromptTypeEnum;
10
+ prompt: string;
11
+ description: string;
12
+ version: number;
13
+ };
14
+ }
@@ -0,0 +1,2 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
@@ -34,6 +34,8 @@ export declare enum Subjects {
34
34
  BlogCategoryCreated = "blog-category:created",
35
35
  BlogCategoryUpdated = "blog-category:updated",
36
36
  BlogCategoryChangeStatus = "blog-category:change-status",
37
+ PromptCreated = "prompt:created",
38
+ PromptUpdated = "prompt:updated",
37
39
  DiscountCreated = "discount:created",
38
40
  DiscountUpdated = "discount:updated",
39
41
  DiscountChangeCode = "discount:change-code",
@@ -38,6 +38,8 @@ var Subjects;
38
38
  Subjects["BlogCategoryCreated"] = "blog-category:created";
39
39
  Subjects["BlogCategoryUpdated"] = "blog-category:updated";
40
40
  Subjects["BlogCategoryChangeStatus"] = "blog-category:change-status";
41
+ Subjects["PromptCreated"] = "prompt:created";
42
+ Subjects["PromptUpdated"] = "prompt:updated";
41
43
  Subjects["DiscountCreated"] = "discount:created";
42
44
  Subjects["DiscountUpdated"] = "discount:updated";
43
45
  Subjects["DiscountChangeCode"] = "discount:change-code";
package/build/index.d.ts CHANGED
@@ -76,3 +76,5 @@ export * from './events/app/transaction/create-transaction';
76
76
  export * from './events/order/transaction/transaction-verify-event';
77
77
  export * from './events/order/transaction/transaction-expired-event';
78
78
  export * from './events/app/transaction/transaction-successful';
79
+ export * from './events/portal/prompt/prompt-create-event';
80
+ export * from './events/portal/prompt/prompt-update-event';
package/build/index.js CHANGED
@@ -102,3 +102,5 @@ __exportStar(require("./events/app/transaction/create-transaction"), exports);
102
102
  __exportStar(require("./events/order/transaction/transaction-verify-event"), exports);
103
103
  __exportStar(require("./events/order/transaction/transaction-expired-event"), exports);
104
104
  __exportStar(require("./events/app/transaction/transaction-successful"), exports);
105
+ __exportStar(require("./events/portal/prompt/prompt-create-event"), exports);
106
+ __exportStar(require("./events/portal/prompt/prompt-update-event"), exports);
@@ -78,7 +78,7 @@ const messageSchema = new mongoose_1.default.Schema({
78
78
  },
79
79
  messagesGemini: [
80
80
  {
81
- aiOptionId: {
81
+ aiOption: {
82
82
  type: mongoose_1.default.Schema.Types.ObjectId,
83
83
  ref: 'AiOption',
84
84
  },
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@common_ch/common",
3
- "version": "1.0.313",
3
+ "version": "1.0.315",
4
4
  "main": "./build/index.js",
5
5
  "types": "./build/index.d.ts",
6
6
  "files": [