@grapadigital/shared-schemas 1.0.167 → 1.0.168

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.
@@ -46,8 +46,8 @@ export declare class Schedule {
46
46
  scheduledAt: Date;
47
47
  status: 'scheduled' | 'published' | 'late' | 'cancelled';
48
48
  contentId?: Types.ObjectId | Content;
49
- actionId: Types.ObjectId | Action;
50
- clientId: Types.ObjectId | Client;
49
+ action: Types.ObjectId | Action;
50
+ client: Types.ObjectId | Client;
51
51
  }
52
52
  export declare const ScheduleSchema: MongooseSchema<Schedule, import("mongoose").Model<Schedule, any, any, any, import("mongoose").Document<unknown, any, Schedule, any, {}> & Schedule & Required<{
53
53
  _id: Types.ObjectId;
@@ -98,19 +98,19 @@ __decorate([
98
98
  (0, swagger_1.ApiProperty)({ example: '64bfc3a78d3f1e2a12345681' }),
99
99
  (0, mongoose_1.Prop)({ type: mongoose_2.Schema.Types.ObjectId, ref: 'Action', required: true }),
100
100
  __metadata("design:type", Object)
101
- ], Schedule.prototype, "actionId", void 0);
101
+ ], Schedule.prototype, "action", void 0);
102
102
  __decorate([
103
103
  (0, swagger_1.ApiProperty)({ example: '64bfc3a78d3f1e2a12345682' }),
104
104
  (0, mongoose_1.Prop)({ type: mongoose_2.Schema.Types.ObjectId, ref: 'Client', required: true }),
105
105
  __metadata("design:type", Object)
106
- ], Schedule.prototype, "clientId", void 0);
106
+ ], Schedule.prototype, "client", void 0);
107
107
  Schedule = __decorate([
108
108
  (0, mongoose_1.Schema)({ timestamps: true })
109
109
  ], Schedule);
110
110
  exports.Schedule = Schedule;
111
111
  exports.ScheduleSchema = mongoose_1.SchemaFactory.createForClass(Schedule);
112
- exports.ScheduleSchema.index({ actionId: 1, scheduledAt: 1 });
113
- exports.ScheduleSchema.index({ clientId: 1 });
112
+ exports.ScheduleSchema.index({ action: 1, scheduledAt: 1 });
113
+ exports.ScheduleSchema.index({ client: 1 });
114
114
  exports.ScheduleSchema.index({ recruitment: 1 });
115
115
  exports.ScheduleSchema.index({ influencer: 1 });
116
116
  exports.ScheduleModel = (0, mongoose_2.model)('Schedule', exports.ScheduleSchema);
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@grapadigital/shared-schemas",
3
- "version": "1.0.167",
3
+ "version": "1.0.168",
4
4
  "description": "Shared Mongoose Schemas",
5
5
  "main": "dist/index.js",
6
6
  "types": "dist/index.d.ts",
@@ -86,17 +86,17 @@ export class Schedule {
86
86
 
87
87
  @ApiProperty({ example: '64bfc3a78d3f1e2a12345681' })
88
88
  @Prop({ type: MongooseSchema.Types.ObjectId, ref: 'Action', required: true })
89
- actionId: Types.ObjectId | Action;
89
+ action: Types.ObjectId | Action;
90
90
 
91
91
  @ApiProperty({ example: '64bfc3a78d3f1e2a12345682' })
92
92
  @Prop({ type: MongooseSchema.Types.ObjectId, ref: 'Client', required: true })
93
- clientId: Types.ObjectId | Client;
93
+ client: Types.ObjectId | Client;
94
94
  }
95
95
 
96
96
  export const ScheduleSchema = SchemaFactory.createForClass(Schedule);
97
97
 
98
- ScheduleSchema.index({ actionId: 1, scheduledAt: 1 });
99
- ScheduleSchema.index({ clientId: 1 });
98
+ ScheduleSchema.index({ action: 1, scheduledAt: 1 });
99
+ ScheduleSchema.index({ client: 1 });
100
100
  ScheduleSchema.index({ recruitment: 1 });
101
101
  ScheduleSchema.index({ influencer: 1 });
102
102