@grapadigital/shared-schemas 1.0.179 → 1.0.180

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.
@@ -99,7 +99,7 @@ export declare class Action {
99
99
  keywords?: string[];
100
100
  objective?: string;
101
101
  description?: string;
102
- tags?: string[];
102
+ tags?: Types.ObjectId[];
103
103
  businessUnit?: ActionBusinessUnit;
104
104
  campaign?: Types.ObjectId | Campaign;
105
105
  }
@@ -270,7 +270,7 @@ __decorate([
270
270
  __metadata("design:type", String)
271
271
  ], Action.prototype, "description", void 0);
272
272
  __decorate([
273
- (0, mongoose_1.Prop)({ type: [String], required: false }),
273
+ (0, mongoose_1.Prop)({ type: [{ type: mongoose_2.Schema.Types.ObjectId }], required: false }),
274
274
  __metadata("design:type", Array)
275
275
  ], Action.prototype, "tags", void 0);
276
276
  __decorate([
@@ -75,7 +75,7 @@ export declare class Invoice {
75
75
  received?: Received;
76
76
  canceled?: Canceled;
77
77
  notes?: Note[];
78
- tags?: string[];
78
+ tags?: Types.ObjectId[];
79
79
  createdAt?: Date;
80
80
  updatedAt?: Date;
81
81
  }
@@ -225,7 +225,7 @@ __decorate([
225
225
  ], Invoice.prototype, "notes", void 0);
226
226
  __decorate([
227
227
  (0, swagger_1.ApiProperty)({ example: ['Aguardando Faturamento', 'Janeiro'] }),
228
- (0, mongoose_1.Prop)({ type: [String], default: [] }),
228
+ (0, mongoose_1.Prop)({ type: [{ type: mongoose_2.Schema.Types.ObjectId }], default: [] }),
229
229
  __metadata("design:type", Array)
230
230
  ], Invoice.prototype, "tags", void 0);
231
231
  __decorate([
@@ -171,7 +171,7 @@ export declare class Payment {
171
171
  paid?: Paid;
172
172
  canceled?: Canceled;
173
173
  notes?: Note[];
174
- tags?: string[];
174
+ tags?: Types.ObjectId[];
175
175
  omieId?: string;
176
176
  createdAt?: Date;
177
177
  updatedAt?: Date;
@@ -320,7 +320,7 @@ __decorate([
320
320
  __metadata("design:type", Array)
321
321
  ], Payment.prototype, "notes", void 0);
322
322
  __decorate([
323
- (0, mongoose_1.Prop)({ type: [String], required: false, default: [] }),
323
+ (0, mongoose_1.Prop)({ type: [{ type: mongoose_2.Schema.Types.ObjectId }], required: false, default: [] }),
324
324
  __metadata("design:type", Array)
325
325
  ], Payment.prototype, "tags", void 0);
326
326
  __decorate([
@@ -131,7 +131,7 @@ export declare class Sale {
131
131
  notes?: Note[];
132
132
  activities?: Activity[];
133
133
  organization: Types.ObjectId;
134
- tags?: string[];
134
+ tags?: Types.ObjectId[];
135
135
  timeline?: TimelineEntry[];
136
136
  profiles?: Types.ObjectId[] | Profile[];
137
137
  closedAt?: Date;
@@ -428,7 +428,7 @@ __decorate([
428
428
  __metadata("design:type", mongoose_2.Types.ObjectId)
429
429
  ], Sale.prototype, "organization", void 0);
430
430
  __decorate([
431
- (0, mongoose_1.Prop)({ type: [String], required: false, default: [] }),
431
+ (0, mongoose_1.Prop)({ type: [{ type: mongoose_2.Schema.Types.ObjectId }], required: false, default: [] }),
432
432
  __metadata("design:type", Array)
433
433
  ], Sale.prototype, "tags", void 0);
434
434
  __decorate([
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@grapadigital/shared-schemas",
3
- "version": "1.0.179",
3
+ "version": "1.0.180",
4
4
  "description": "Shared Mongoose Schemas",
5
5
  "main": "dist/index.js",
6
6
  "types": "dist/index.d.ts",
@@ -226,8 +226,8 @@ export class Action {
226
226
  @Prop({ type: String, required: false })
227
227
  description?: string;
228
228
 
229
- @Prop({ type: [String], required: false})
230
- tags?: string[];
229
+ @Prop({ type: [{ type: MongooseSchema.Types.ObjectId }], required: false })
230
+ tags?: Types.ObjectId[];
231
231
 
232
232
  @ApiProperty({ enum: ACTION_BUSINESS_UNIT_VALUES, required: false })
233
233
  @Prop({ type: String, enum: ACTION_BUSINESS_UNIT_VALUES, required: false })
@@ -144,7 +144,7 @@ export class Invoice {
144
144
  @Prop({ type: [Note], default: [] }) notes?: Note[];
145
145
 
146
146
  @ApiProperty({ example: ['Aguardando Faturamento', 'Janeiro'] })
147
- @Prop({ type: [String], default: [] }) tags?: string[];
147
+ @Prop({ type: [{ type: MongooseSchema.Types.ObjectId }], default: [] }) tags?: Types.ObjectId[];
148
148
 
149
149
  @ApiProperty({ example: '2025-08-28T15:00:00.000Z' })
150
150
  @Prop({ default: Date.now }) createdAt?: Date;
@@ -245,8 +245,8 @@ export class Payment {
245
245
  @Prop({ type: [Note], required: false, default: [] })
246
246
  notes?: Note[];
247
247
 
248
- @Prop({ type: [String], required: false, default: [] })
249
- tags?: string[];
248
+ @Prop({ type: [{ type: MongooseSchema.Types.ObjectId }], required: false, default: [] })
249
+ tags?: Types.ObjectId[];
250
250
 
251
251
  @Prop()
252
252
  omieId?: string;
@@ -234,8 +234,8 @@ export class Sale {
234
234
  @Prop({ type: MongooseSchema.Types.ObjectId })
235
235
  organization: Types.ObjectId;
236
236
 
237
- @Prop({ type: [String], required: false, default: [] })
238
- tags?: string[];
237
+ @Prop({ type: [{ type: MongooseSchema.Types.ObjectId }], required: false, default: [] })
238
+ tags?: Types.ObjectId[];
239
239
 
240
240
  @Prop([{ type: TimelineEntry, required: false }])
241
241
  timeline?: TimelineEntry[];