@grapadigital/shared-schemas 2.2.2 → 2.3.0

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.
@@ -67,4 +67,5 @@ exports.Contract = Contract = __decorate([
67
67
  (0, mongoose_1.Schema)({ timestamps: true })
68
68
  ], Contract);
69
69
  exports.ContractSchema = mongoose_1.SchemaFactory.createForClass(Contract);
70
+ exports.ContractSchema.index({ recruitment: 1 });
70
71
  exports.ContractModel = (0, mongoose_2.model)("Contract", exports.ContractSchema);
@@ -87,4 +87,5 @@ exports.Notification = Notification = __decorate([
87
87
  (0, mongoose_1.Schema)({ timestamps: true, collection: "notifications" })
88
88
  ], Notification);
89
89
  exports.NotificationSchema = mongoose_1.SchemaFactory.createForClass(Notification);
90
+ exports.NotificationSchema.index({ "recipient.username": 1, read: 1, createdAt: -1 });
90
91
  exports.NotificationModel = (0, mongoose_2.model)("Notification", exports.NotificationSchema);
@@ -123,7 +123,7 @@ export declare class Sale {
123
123
  _id?: Types.ObjectId;
124
124
  title: string;
125
125
  phase: "inbox" | "strategy" | "proposal" | "negotiation" | "commission" | "formalization" | "closed" | "lost";
126
- type: "new" | "organic_expansion" | "strategic_expansion" | "renewal" | "comercial_winback" | "organic_winback";
126
+ type: "campaign" | "fee" | "production" | "press_kit" | "renewal" | "new" | "organic_expansion" | "strategic_expansion" | "comercial_winback" | "organic_winback";
127
127
  proposal?: Proposal;
128
128
  negotiation?: Negotiation;
129
129
  formalization?: Formalization;
@@ -410,14 +410,19 @@ __decorate([
410
410
  (0, mongoose_1.Prop)({
411
411
  type: String,
412
412
  enum: [
413
+ "campaign",
414
+ "fee",
415
+ "production",
416
+ "press_kit",
417
+ "renewal",
418
+ // legado, sai depois da GD-826
413
419
  "new",
414
420
  "organic_expansion",
415
421
  "strategic_expansion",
416
- "renewal",
417
422
  "comercial_winback",
418
423
  "organic_winback",
419
424
  ],
420
- default: "new",
425
+ default: "campaign",
421
426
  }),
422
427
  __metadata("design:type", String)
423
428
  ], Sale.prototype, "type", void 0);
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@grapadigital/shared-schemas",
3
- "version": "2.2.2",
3
+ "version": "2.3.0",
4
4
  "description": "Shared Mongoose Schemas",
5
5
  "main": "dist/index.js",
6
6
  "types": "dist/index.d.ts",