@grapadigital/shared-schemas 1.0.161 → 1.0.163

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.
@@ -28,6 +28,7 @@ import { Recruitment } from './recruitment.schema';
28
28
  import { Content } from './content.schema';
29
29
  import { Client } from './client.schema';
30
30
  import { Sale } from './sale.schema';
31
+ import { Profile } from './profile.schema';
31
32
  export type ActionDocument = HydratedDocument<Action>;
32
33
  export declare class Responsible {
33
34
  name: string;
@@ -61,6 +62,15 @@ declare class Note {
61
62
  owner: string;
62
63
  createdAt: Date;
63
64
  }
65
+ declare class ScheduledPost {
66
+ recruitmentId: Types.ObjectId | Recruitment;
67
+ profileId: Types.ObjectId | Profile;
68
+ socialnetwork: string;
69
+ type: string;
70
+ scheduledAt: Date;
71
+ status: 'scheduled' | 'published' | 'late' | 'cancelled';
72
+ contentId?: Types.ObjectId | Content;
73
+ }
64
74
  export declare class Action {
65
75
  _id?: Types.ObjectId;
66
76
  title: string;
@@ -92,6 +102,7 @@ export declare class Action {
92
102
  updatedAt?: Date;
93
103
  notes?: Note[];
94
104
  primetagId?: string;
105
+ scheduledPosts?: ScheduledPost[];
95
106
  hashtags?: string[];
96
107
  instagramMentions?: string[];
97
108
  tiktokMentions?: string[];
@@ -74,6 +74,51 @@ Note = __decorate([
74
74
  (0, mongoose_1.Schema)({ _id: false })
75
75
  ], Note);
76
76
  const NoteSchema = mongoose_1.SchemaFactory.createForClass(Note);
77
+ let ScheduledPost = class ScheduledPost {
78
+ };
79
+ __decorate([
80
+ (0, swagger_1.ApiProperty)({ example: '64bfc3a78d3f1e2a12345678' }),
81
+ (0, mongoose_1.Prop)({ type: mongoose_2.Schema.Types.ObjectId, required: true }),
82
+ __metadata("design:type", Object)
83
+ ], ScheduledPost.prototype, "recruitmentId", void 0);
84
+ __decorate([
85
+ (0, swagger_1.ApiProperty)({ example: '64bfc3a78d3f1e2a12345679' }),
86
+ (0, mongoose_1.Prop)({ type: mongoose_2.Schema.Types.ObjectId, required: true }),
87
+ __metadata("design:type", Object)
88
+ ], ScheduledPost.prototype, "profileId", void 0);
89
+ __decorate([
90
+ (0, swagger_1.ApiProperty)({ example: 'instagram' }),
91
+ (0, mongoose_1.Prop)({ type: String, required: true }),
92
+ __metadata("design:type", String)
93
+ ], ScheduledPost.prototype, "socialnetwork", void 0);
94
+ __decorate([
95
+ (0, swagger_1.ApiProperty)({ example: 'reel' }),
96
+ (0, mongoose_1.Prop)({ type: String, required: true }),
97
+ __metadata("design:type", String)
98
+ ], ScheduledPost.prototype, "type", void 0);
99
+ __decorate([
100
+ (0, swagger_1.ApiProperty)({ example: '2025-11-05T14:00:00.000Z' }),
101
+ (0, mongoose_1.Prop)({ type: Date, required: true }),
102
+ __metadata("design:type", Date)
103
+ ], ScheduledPost.prototype, "scheduledAt", void 0);
104
+ __decorate([
105
+ (0, swagger_1.ApiProperty)({ enum: ['scheduled', 'published', 'late', 'cancelled'], example: 'scheduled' }),
106
+ (0, mongoose_1.Prop)({
107
+ type: String,
108
+ enum: ['scheduled', 'published', 'late', 'cancelled'],
109
+ required: true,
110
+ }),
111
+ __metadata("design:type", String)
112
+ ], ScheduledPost.prototype, "status", void 0);
113
+ __decorate([
114
+ (0, swagger_1.ApiProperty)({ example: '64bfc3a78d3f1e2a12345680', required: false }),
115
+ (0, mongoose_1.Prop)({ type: mongoose_2.Schema.Types.ObjectId, required: false }),
116
+ __metadata("design:type", Object)
117
+ ], ScheduledPost.prototype, "contentId", void 0);
118
+ ScheduledPost = __decorate([
119
+ (0, mongoose_1.Schema)({ _id: false })
120
+ ], ScheduledPost);
121
+ const ScheduledPostSchema = mongoose_1.SchemaFactory.createForClass(ScheduledPost);
77
122
  let Action = class Action {
78
123
  };
79
124
  __decorate([
@@ -242,6 +287,11 @@ __decorate([
242
287
  (0, mongoose_1.Prop)({ type: String, required: false }),
243
288
  __metadata("design:type", String)
244
289
  ], Action.prototype, "primetagId", void 0);
290
+ __decorate([
291
+ (0, swagger_1.ApiProperty)({ type: () => [ScheduledPost], required: false }),
292
+ (0, mongoose_1.Prop)({ type: [ScheduledPostSchema], required: false }),
293
+ __metadata("design:type", Array)
294
+ ], Action.prototype, "scheduledPosts", void 0);
245
295
  __decorate([
246
296
  (0, swagger_1.ApiProperty)({ example: ['#trending', '#viral'], required: false }),
247
297
  (0, mongoose_1.Prop)({ type: [String], required: false }),
@@ -42,7 +42,7 @@ export declare class Proposal {
42
42
  };
43
43
  }
44
44
  export declare class Negotiation {
45
- calculatorType: 'withPreDefinedBudget' | 'withoutPreDefinedBudget' | 'bourbon';
45
+ calculatorType: 'withPreDefinedBudget' | 'withoutPreDefinedBudget' | 'byCommission' | 'bourbon';
46
46
  childPermit?: boolean;
47
47
  childPermitValue?: number;
48
48
  childPermitMethod?: 'direct' | 'debit_note' | 'client';
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@grapadigital/shared-schemas",
3
- "version": "1.0.161",
3
+ "version": "1.0.163",
4
4
  "description": "Shared Mongoose Schemas",
5
5
  "main": "dist/index.js",
6
6
  "types": "dist/index.d.ts",
@@ -12,6 +12,7 @@ import { Recruitment } from './recruitment.schema';
12
12
  import { Content } from './content.schema';
13
13
  import { Client } from './client.schema';
14
14
  import { Sale } from './sale.schema';
15
+ import { Profile } from './profile.schema';
15
16
 
16
17
  export type ActionDocument = HydratedDocument<Action>;
17
18
 
@@ -54,6 +55,43 @@ class Note {
54
55
 
55
56
  const NoteSchema = SchemaFactory.createForClass(Note);
56
57
 
58
+ @Schema({ _id: false })
59
+ class ScheduledPost {
60
+ @ApiProperty({ example: '64bfc3a78d3f1e2a12345678' })
61
+ @Prop({ type: MongooseSchema.Types.ObjectId, required: true })
62
+ recruitmentId: Types.ObjectId | Recruitment;
63
+
64
+ @ApiProperty({ example: '64bfc3a78d3f1e2a12345679' })
65
+ @Prop({ type: MongooseSchema.Types.ObjectId, required: true })
66
+ profileId: Types.ObjectId | Profile;
67
+
68
+ @ApiProperty({ example: 'instagram' })
69
+ @Prop({ type: String, required: true })
70
+ socialnetwork: string;
71
+
72
+ @ApiProperty({ example: 'reel' })
73
+ @Prop({ type: String, required: true })
74
+ type: string;
75
+
76
+ @ApiProperty({ example: '2025-11-05T14:00:00.000Z' })
77
+ @Prop({ type: Date, required: true })
78
+ scheduledAt: Date;
79
+
80
+ @ApiProperty({ enum: ['scheduled', 'published', 'late', 'cancelled'], example: 'scheduled' })
81
+ @Prop({
82
+ type: String,
83
+ enum: ['scheduled', 'published', 'late', 'cancelled'],
84
+ required: true,
85
+ })
86
+ status: 'scheduled' | 'published' | 'late' | 'cancelled';
87
+
88
+ @ApiProperty({ example: '64bfc3a78d3f1e2a12345680', required: false })
89
+ @Prop({ type: MongooseSchema.Types.ObjectId, required: false })
90
+ contentId?: Types.ObjectId | Content;
91
+ }
92
+
93
+ const ScheduledPostSchema = SchemaFactory.createForClass(ScheduledPost);
94
+
57
95
  @Schema({ timestamps: true })
58
96
  export class Action {
59
97
  @ApiProperty({ example: '64bfc3a78d3f1e2a12345678' })
@@ -192,6 +230,10 @@ export class Action {
192
230
  @Prop({ type: String, required: false })
193
231
  primetagId?: string;
194
232
 
233
+ @ApiProperty({ type: () => [ScheduledPost], required: false })
234
+ @Prop({ type: [ScheduledPostSchema], required: false })
235
+ scheduledPosts?: ScheduledPost[];
236
+
195
237
  @ApiProperty({ example: ['#trending', '#viral'], required: false })
196
238
  @Prop({ type: [String], required: false })
197
239
  hashtags?: string[];
@@ -59,6 +59,7 @@ export class Negotiation {
59
59
  @Prop({ required: true }) calculatorType:
60
60
  | 'withPreDefinedBudget'
61
61
  | 'withoutPreDefinedBudget'
62
+ | 'byCommission'
62
63
  | 'bourbon';
63
64
  @Prop({ required: false }) childPermit?: boolean;
64
65
  @Prop({ required: false }) childPermitValue?: number;