@common_ch/common 1.0.318 → 1.0.319

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,13 @@ import mongoose from 'mongoose';
2
2
  import { UserDoc } from './user';
3
3
  import { PromptTypeEnum } from '../../enums/prompt';
4
4
  import { AiDoc } from './ai';
5
+ interface PersonalityPrompt {
6
+ prompt: string;
7
+ personalityId: string;
8
+ name: string;
9
+ job: string;
10
+ others: string;
11
+ }
5
12
  export interface PromptAttrs {
6
13
  _id?: string;
7
14
  prompt: string;
@@ -9,6 +16,7 @@ export interface PromptAttrs {
9
16
  promptType: PromptTypeEnum;
10
17
  personalityName?: string;
11
18
  aiId?: string | AiDoc;
19
+ personalityPrompt?: PersonalityPrompt;
12
20
  description?: string;
13
21
  version?: number;
14
22
  createdAt?: string;
@@ -23,6 +31,7 @@ export interface PromptDoc extends mongoose.Document {
23
31
  userId?: string | UserDoc;
24
32
  personalityName?: string;
25
33
  promptType: PromptTypeEnum;
34
+ personalityPrompt?: PersonalityPrompt;
26
35
  aiId?: string | AiDoc;
27
36
  description?: string;
28
37
  version?: number;
@@ -7,6 +7,29 @@ exports.Prompt = void 0;
7
7
  const mongoose_1 = __importDefault(require("mongoose"));
8
8
  const mongoose_update_if_current_1 = require("mongoose-update-if-current");
9
9
  const prompt_1 = require("../../enums/prompt");
10
+ const PersonalityPromptSchema = new mongoose_1.default.Schema({
11
+ personalityId: {
12
+ type: mongoose_1.default.Schema.Types.ObjectId,
13
+ ref: 'Prompt',
14
+ required: false,
15
+ },
16
+ prompt: {
17
+ type: String,
18
+ required: false,
19
+ },
20
+ name: {
21
+ type: String,
22
+ required: false,
23
+ },
24
+ job: {
25
+ type: String,
26
+ required: false,
27
+ },
28
+ others: {
29
+ type: String,
30
+ required: false,
31
+ }
32
+ }, { _id: false });
10
33
  const promptSchema = new mongoose_1.default.Schema({
11
34
  prompt: {
12
35
  type: String,
@@ -20,6 +43,10 @@ const promptSchema = new mongoose_1.default.Schema({
20
43
  type: String,
21
44
  required: false,
22
45
  },
46
+ personalityPrompt: {
47
+ type: PersonalityPromptSchema,
48
+ required: false,
49
+ },
23
50
  promptType: {
24
51
  type: String,
25
52
  enum: prompt_1.PromptTypeEnum,
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@common_ch/common",
3
- "version": "1.0.318",
3
+ "version": "1.0.319",
4
4
  "main": "./build/index.js",
5
5
  "types": "./build/index.d.ts",
6
6
  "files": [