@grapadigital/shared-schemas 1.0.166 → 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.
@@ -39,11 +39,15 @@ export declare class Schedule {
39
39
  socialnetwork: string;
40
40
  type: 'post' | 'task';
41
41
  format?: string;
42
+ briefing?: string;
43
+ requiredTags?: string;
44
+ referenceLink?: string;
45
+ observation?: string;
42
46
  scheduledAt: Date;
43
47
  status: 'scheduled' | 'published' | 'late' | 'cancelled';
44
48
  contentId?: Types.ObjectId | Content;
45
- actionId: Types.ObjectId | Action;
46
- clientId: Types.ObjectId | Client;
49
+ action: Types.ObjectId | Action;
50
+ client: Types.ObjectId | Client;
47
51
  }
48
52
  export declare const ScheduleSchema: MongooseSchema<Schedule, import("mongoose").Model<Schedule, any, any, any, import("mongoose").Document<unknown, any, Schedule, any, {}> & Schedule & Required<{
49
53
  _id: Types.ObjectId;
@@ -55,6 +55,26 @@ __decorate([
55
55
  }),
56
56
  __metadata("design:type", String)
57
57
  ], Schedule.prototype, "format", void 0);
58
+ __decorate([
59
+ (0, swagger_1.ApiProperty)({ example: 'Mostrar o produto em uso, destacar a promoção', required: false }),
60
+ (0, mongoose_1.Prop)({ type: String, required: false }),
61
+ __metadata("design:type", String)
62
+ ], Schedule.prototype, "briefing", void 0);
63
+ __decorate([
64
+ (0, swagger_1.ApiProperty)({ example: '@marca, #publi, #ad', required: false }),
65
+ (0, mongoose_1.Prop)({ type: String, required: false }),
66
+ __metadata("design:type", String)
67
+ ], Schedule.prototype, "requiredTags", void 0);
68
+ __decorate([
69
+ (0, swagger_1.ApiProperty)({ example: 'https://drive.google.com/...', required: false }),
70
+ (0, mongoose_1.Prop)({ type: String, required: false }),
71
+ __metadata("design:type", String)
72
+ ], Schedule.prototype, "referenceLink", void 0);
73
+ __decorate([
74
+ (0, swagger_1.ApiProperty)({ example: 'Confirmar com o cliente antes de publicar', required: false }),
75
+ (0, mongoose_1.Prop)({ type: String, required: false }),
76
+ __metadata("design:type", String)
77
+ ], Schedule.prototype, "observation", void 0);
58
78
  __decorate([
59
79
  (0, swagger_1.ApiProperty)({ example: '2025-11-05T14:00:00.000Z' }),
60
80
  (0, mongoose_1.Prop)({ type: Date, required: true }),
@@ -78,19 +98,19 @@ __decorate([
78
98
  (0, swagger_1.ApiProperty)({ example: '64bfc3a78d3f1e2a12345681' }),
79
99
  (0, mongoose_1.Prop)({ type: mongoose_2.Schema.Types.ObjectId, ref: 'Action', required: true }),
80
100
  __metadata("design:type", Object)
81
- ], Schedule.prototype, "actionId", void 0);
101
+ ], Schedule.prototype, "action", void 0);
82
102
  __decorate([
83
103
  (0, swagger_1.ApiProperty)({ example: '64bfc3a78d3f1e2a12345682' }),
84
104
  (0, mongoose_1.Prop)({ type: mongoose_2.Schema.Types.ObjectId, ref: 'Client', required: true }),
85
105
  __metadata("design:type", Object)
86
- ], Schedule.prototype, "clientId", void 0);
106
+ ], Schedule.prototype, "client", void 0);
87
107
  Schedule = __decorate([
88
108
  (0, mongoose_1.Schema)({ timestamps: true })
89
109
  ], Schedule);
90
110
  exports.Schedule = Schedule;
91
111
  exports.ScheduleSchema = mongoose_1.SchemaFactory.createForClass(Schedule);
92
- exports.ScheduleSchema.index({ actionId: 1, scheduledAt: 1 });
93
- exports.ScheduleSchema.index({ clientId: 1 });
112
+ exports.ScheduleSchema.index({ action: 1, scheduledAt: 1 });
113
+ exports.ScheduleSchema.index({ client: 1 });
94
114
  exports.ScheduleSchema.index({ recruitment: 1 });
95
115
  exports.ScheduleSchema.index({ influencer: 1 });
96
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.166",
3
+ "version": "1.0.168",
4
4
  "description": "Shared Mongoose Schemas",
5
5
  "main": "dist/index.js",
6
6
  "types": "dist/index.d.ts",
@@ -52,6 +52,22 @@ export class Schedule {
52
52
  })
53
53
  format?: string;
54
54
 
55
+ @ApiProperty({ example: 'Mostrar o produto em uso, destacar a promoção', required: false })
56
+ @Prop({ type: String, required: false })
57
+ briefing?: string;
58
+
59
+ @ApiProperty({ example: '@marca, #publi, #ad', required: false })
60
+ @Prop({ type: String, required: false })
61
+ requiredTags?: string;
62
+
63
+ @ApiProperty({ example: 'https://drive.google.com/...', required: false })
64
+ @Prop({ type: String, required: false })
65
+ referenceLink?: string;
66
+
67
+ @ApiProperty({ example: 'Confirmar com o cliente antes de publicar', required: false })
68
+ @Prop({ type: String, required: false })
69
+ observation?: string;
70
+
55
71
  @ApiProperty({ example: '2025-11-05T14:00:00.000Z' })
56
72
  @Prop({ type: Date, required: true })
57
73
  scheduledAt: Date;
@@ -70,17 +86,17 @@ export class Schedule {
70
86
 
71
87
  @ApiProperty({ example: '64bfc3a78d3f1e2a12345681' })
72
88
  @Prop({ type: MongooseSchema.Types.ObjectId, ref: 'Action', required: true })
73
- actionId: Types.ObjectId | Action;
89
+ action: Types.ObjectId | Action;
74
90
 
75
91
  @ApiProperty({ example: '64bfc3a78d3f1e2a12345682' })
76
92
  @Prop({ type: MongooseSchema.Types.ObjectId, ref: 'Client', required: true })
77
- clientId: Types.ObjectId | Client;
93
+ client: Types.ObjectId | Client;
78
94
  }
79
95
 
80
96
  export const ScheduleSchema = SchemaFactory.createForClass(Schedule);
81
97
 
82
- ScheduleSchema.index({ actionId: 1, scheduledAt: 1 });
83
- ScheduleSchema.index({ clientId: 1 });
98
+ ScheduleSchema.index({ action: 1, scheduledAt: 1 });
99
+ ScheduleSchema.index({ client: 1 });
84
100
  ScheduleSchema.index({ recruitment: 1 });
85
101
  ScheduleSchema.index({ influencer: 1 });
86
102