@common_ch/common 1.0.433 → 1.0.437

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.
@@ -20,6 +20,8 @@ export interface PlanCreateEvent {
20
20
  deleteFile: boolean;
21
21
  type: PlanTypeEnum;
22
22
  numberOfUsers: number;
23
+ order?: number;
24
+ highlight?: boolean;
23
25
  typePay: TypePayEnum;
24
26
  tools: {
25
27
  chatgpt?: ToolsChatgpt[];
@@ -26,6 +26,8 @@ export interface PlanUpdateEvent {
26
26
  gemini?: ToolsGemini[];
27
27
  };
28
28
  models: AiOptionNamesEnum[];
29
+ order?: number;
30
+ highlight?: boolean;
29
31
  defaultAiOption: Types.ObjectId;
30
32
  defaultAi: Types.ObjectId;
31
33
  typePay: TypePayEnum;
@@ -26,6 +26,8 @@ export interface PlanAttrs {
26
26
  status?: PlanStatusEnum;
27
27
  typePay?: TypePayEnum;
28
28
  deleteFile?: boolean;
29
+ order?: number;
30
+ highlight?: boolean;
29
31
  version?: number;
30
32
  createdAt?: number;
31
33
  updatedAt?: number;
@@ -55,6 +57,8 @@ export interface PlanDoc extends mongoose.Document {
55
57
  status?: PlanStatusEnum;
56
58
  typePay?: TypePayEnum;
57
59
  deleteFile?: boolean;
60
+ order?: number;
61
+ highlight?: boolean;
58
62
  version: number;
59
63
  createdAt?: number;
60
64
  updatedAt?: number;
@@ -84,6 +84,14 @@ const planSchema = new mongoose_1.default.Schema({
84
84
  required: false,
85
85
  default: true,
86
86
  },
87
+ order: {
88
+ type: Number,
89
+ required: true,
90
+ },
91
+ highlight: {
92
+ type: Boolean,
93
+ required: true,
94
+ },
87
95
  status: {
88
96
  type: String,
89
97
  enum: plan_2.PlanStatusEnum,
@@ -112,6 +120,7 @@ const planSchema = new mongoose_1.default.Schema({
112
120
  planSchema.set('versionKey', 'version');
113
121
  planSchema.plugin(mongoose_update_if_current_1.updateIfCurrentPlugin);
114
122
  planSchema.index({ 'status': 1 });
123
+ planSchema.index({ 'order': 1 });
115
124
  planSchema.statics.build = (attrs) => {
116
125
  return new Plan(attrs);
117
126
  };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@common_ch/common",
3
- "version": "1.0.433",
3
+ "version": "1.0.437",
4
4
  "main": "./build/index.js",
5
5
  "types": "./build/index.d.ts",
6
6
  "files": [