codebase-models 2.1.0 → 2.1.2

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.
@@ -42,7 +42,6 @@ mongoose_1.default.plugin(mongoose_slug_updater_1.default);
42
42
  const UrltargetingsSchema = new mongoose_1.Schema({
43
43
  iid: {
44
44
  type: String,
45
- required: true,
46
45
  trim: true,
47
46
  },
48
47
  type: {
@@ -150,7 +149,7 @@ PageSchema.pre('save', function (next) {
150
149
  });
151
150
  PageSchema.index({ iid: 1 }, { unique: true });
152
151
  // Compound indexes for common query patterns
153
- PageSchema.index({ client: 1, name: 1 }, { unique: true });
152
+ PageSchema.index({ client: 1, api_name: 1 }, { unique: true });
154
153
  PageSchema.index({ client: 1, isActive: 1 });
155
154
  PageSchema.index({ organizationId: 1, client: 1 });
156
155
  PageSchema.index({ organizationId: 1, name: 1 });
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "codebase-models",
3
- "version": "2.1.0",
3
+ "version": "2.1.2",
4
4
  "description": "Common models for codebase",
5
5
  "main": "dist/index.js",
6
6
  "scripts": {
@@ -31,7 +31,6 @@ export interface IPage extends Document {
31
31
  const UrltargetingsSchema = new Schema<IUrltargetings>({
32
32
  iid: {
33
33
  type: String,
34
- required: true,
35
34
  trim: true,
36
35
  },
37
36
  type: {
@@ -143,7 +142,7 @@ PageSchema.pre('save', async function(next) {
143
142
 
144
143
  PageSchema.index({ iid: 1 }, { unique: true });
145
144
  // Compound indexes for common query patterns
146
- PageSchema.index({ client: 1, name: 1 }, { unique: true });
145
+ PageSchema.index({ client: 1, api_name: 1 }, { unique: true });
147
146
  PageSchema.index({ client: 1, isActive: 1 });
148
147
  PageSchema.index({ organizationId: 1, client: 1 });
149
148
  PageSchema.index({ organizationId: 1, name: 1 });