@grapadigital/shared-schemas 1.0.201 → 1.0.202

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.
@@ -131,6 +131,7 @@ export declare class Client extends Party {
131
131
  */
132
132
  hasGenIAAnalysis: boolean;
133
133
  reportResponsable?: Responsable;
134
+ brandResponsable?: string;
134
135
  }
135
136
  export declare const ClientSchema: import("mongoose").Schema<Client, import("mongoose").Model<Client, any, any, any, import("mongoose").Document<unknown, any, Client, any, {}> & Client & Required<{
136
137
  _id: import("mongoose").Types.ObjectId;
@@ -169,6 +169,10 @@ __decorate([
169
169
  (0, mongoose_1.Prop)({ type: exports.ResponsableSchema, required: false }),
170
170
  __metadata("design:type", Responsable)
171
171
  ], Client.prototype, "reportResponsable", void 0);
172
+ __decorate([
173
+ (0, mongoose_1.Prop)({ type: String, required: false }),
174
+ __metadata("design:type", String)
175
+ ], Client.prototype, "brandResponsable", void 0);
172
176
  Client = __decorate([
173
177
  (0, mongoose_1.Schema)({ timestamps: true })
174
178
  ], Client);
@@ -54,6 +54,7 @@ export declare class Commission {
54
54
  username: string;
55
55
  };
56
56
  description?: string;
57
+ reason?: string;
57
58
  createdAt?: Date;
58
59
  updatedAt?: Date;
59
60
  organization?: Types.ObjectId;
@@ -96,6 +96,10 @@ __decorate([
96
96
  (0, mongoose_1.Prop)({ type: String, required: false }),
97
97
  __metadata("design:type", String)
98
98
  ], Commission.prototype, "description", void 0);
99
+ __decorate([
100
+ (0, mongoose_1.Prop)({ type: String, required: false }),
101
+ __metadata("design:type", String)
102
+ ], Commission.prototype, "reason", void 0);
99
103
  __decorate([
100
104
  (0, mongoose_1.Prop)({ type: Date, default: Date.now, required: false }),
101
105
  __metadata("design:type", Date)
@@ -117,6 +117,23 @@ export declare class Inbox {
117
117
  bodyHtml?: string;
118
118
  receivedAt: Date;
119
119
  }
120
+ export declare class SaleResponsables {
121
+ curation?: {
122
+ team: string;
123
+ name: string;
124
+ email: string;
125
+ };
126
+ planning?: {
127
+ team: string;
128
+ name: string;
129
+ email: string;
130
+ };
131
+ }
132
+ export declare class SaleLinks {
133
+ contract?: string;
134
+ clientSheet?: string;
135
+ internalSheet?: string;
136
+ }
120
137
  export declare class Sale {
121
138
  _id?: Types.ObjectId;
122
139
  title: string;
@@ -138,6 +155,8 @@ export declare class Sale {
138
155
  createdAt?: Date;
139
156
  updatedAt?: Date;
140
157
  omieId?: string;
158
+ responsables?: SaleResponsables;
159
+ links?: SaleLinks;
141
160
  }
142
161
  export declare const SaleSchema: MongooseSchema<Sale, import("mongoose").Model<Sale, any, any, any, import("mongoose").Document<unknown, any, Sale, any, {}> & Sale & Required<{
143
162
  _id: Types.ObjectId;
@@ -9,7 +9,7 @@ var __metadata = (this && this.__metadata) || function (k, v) {
9
9
  if (typeof Reflect === "object" && typeof Reflect.metadata === "function") return Reflect.metadata(k, v);
10
10
  };
11
11
  Object.defineProperty(exports, "__esModule", { value: true });
12
- exports.SaleModel = exports.SaleSchema = exports.Sale = exports.Inbox = exports.CommissionInfo = exports.CommissionParticipant = exports.TimelineEntry = exports.Activity = exports.Lost = exports.Formalization = exports.Negotiation = exports.Proposal = void 0;
12
+ exports.SaleModel = exports.SaleSchema = exports.Sale = exports.SaleLinks = exports.SaleResponsables = exports.Inbox = exports.CommissionInfo = exports.CommissionParticipant = exports.TimelineEntry = exports.Activity = exports.Lost = exports.Formalization = exports.Negotiation = exports.Proposal = void 0;
13
13
  const mongoose_1 = require("@nestjs/mongoose");
14
14
  const mongoose_2 = require("mongoose");
15
15
  const note_schema_1 = require("./note.schema");
@@ -351,6 +351,54 @@ Inbox = __decorate([
351
351
  (0, mongoose_1.Schema)({ _id: false })
352
352
  ], Inbox);
353
353
  exports.Inbox = Inbox;
354
+ let SaleResponsables = class SaleResponsables {
355
+ };
356
+ __decorate([
357
+ (0, mongoose_1.Prop)({
358
+ _id: false,
359
+ required: false,
360
+ type: {
361
+ team: String,
362
+ name: String,
363
+ email: String,
364
+ },
365
+ }),
366
+ __metadata("design:type", Object)
367
+ ], SaleResponsables.prototype, "curation", void 0);
368
+ __decorate([
369
+ (0, mongoose_1.Prop)({
370
+ _id: false,
371
+ required: false,
372
+ type: {
373
+ team: String,
374
+ name: String,
375
+ email: String,
376
+ },
377
+ }),
378
+ __metadata("design:type", Object)
379
+ ], SaleResponsables.prototype, "planning", void 0);
380
+ SaleResponsables = __decorate([
381
+ (0, mongoose_1.Schema)({ _id: false })
382
+ ], SaleResponsables);
383
+ exports.SaleResponsables = SaleResponsables;
384
+ let SaleLinks = class SaleLinks {
385
+ };
386
+ __decorate([
387
+ (0, mongoose_1.Prop)({ required: false }),
388
+ __metadata("design:type", String)
389
+ ], SaleLinks.prototype, "contract", void 0);
390
+ __decorate([
391
+ (0, mongoose_1.Prop)({ required: false }),
392
+ __metadata("design:type", String)
393
+ ], SaleLinks.prototype, "clientSheet", void 0);
394
+ __decorate([
395
+ (0, mongoose_1.Prop)({ required: false }),
396
+ __metadata("design:type", String)
397
+ ], SaleLinks.prototype, "internalSheet", void 0);
398
+ SaleLinks = __decorate([
399
+ (0, mongoose_1.Schema)({ _id: false })
400
+ ], SaleLinks);
401
+ exports.SaleLinks = SaleLinks;
354
402
  let Sale = class Sale {
355
403
  };
356
404
  __decorate([
@@ -461,6 +509,14 @@ __decorate([
461
509
  (0, mongoose_1.Prop)({ type: String, required: false }),
462
510
  __metadata("design:type", String)
463
511
  ], Sale.prototype, "omieId", void 0);
512
+ __decorate([
513
+ (0, mongoose_1.Prop)({ type: SaleResponsables, required: false }),
514
+ __metadata("design:type", SaleResponsables)
515
+ ], Sale.prototype, "responsables", void 0);
516
+ __decorate([
517
+ (0, mongoose_1.Prop)({ type: SaleLinks, required: false }),
518
+ __metadata("design:type", SaleLinks)
519
+ ], Sale.prototype, "links", void 0);
464
520
  Sale = __decorate([
465
521
  (0, mongoose_1.Schema)({ timestamps: true })
466
522
  ], Sale);
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@grapadigital/shared-schemas",
3
- "version": "1.0.201",
3
+ "version": "1.0.202",
4
4
  "description": "Shared Mongoose Schemas",
5
5
  "main": "dist/index.js",
6
6
  "types": "dist/index.d.ts",
@@ -133,6 +133,9 @@ export class Client extends Party {
133
133
 
134
134
  @Prop({ type: ResponsableSchema, required: false })
135
135
  reportResponsable?: Responsable;
136
+
137
+ @Prop({ type: String, required: false })
138
+ brandResponsable?: string;
136
139
  }
137
140
 
138
141
  export const ClientSchema = SchemaFactory.createForClass(Client);
@@ -78,6 +78,9 @@ export class Commission {
78
78
  @Prop({ type: String, required: false })
79
79
  description?: string;
80
80
 
81
+ @Prop({ type: String, required: false })
82
+ reason?: string;
83
+
81
84
  @Prop({ type: Date, default: Date.now, required: false })
82
85
  createdAt?: Date;
83
86
 
@@ -168,6 +168,51 @@ export class Inbox {
168
168
  @Prop({ required: true }) receivedAt: Date;
169
169
  }
170
170
 
171
+ @Schema({ _id: false })
172
+ export class SaleResponsables {
173
+ @Prop({
174
+ _id: false,
175
+ required: false,
176
+ type: {
177
+ team: String,
178
+ name: String,
179
+ email: String,
180
+ },
181
+ })
182
+ curation?: {
183
+ team: string;
184
+ name: string;
185
+ email: string;
186
+ };
187
+
188
+ @Prop({
189
+ _id: false,
190
+ required: false,
191
+ type: {
192
+ team: String,
193
+ name: String,
194
+ email: String,
195
+ },
196
+ })
197
+ planning?: {
198
+ team: string;
199
+ name: string;
200
+ email: string;
201
+ };
202
+ }
203
+
204
+ @Schema({ _id: false })
205
+ export class SaleLinks {
206
+ @Prop({ required: false })
207
+ contract?: string;
208
+
209
+ @Prop({ required: false })
210
+ clientSheet?: string;
211
+
212
+ @Prop({ required: false })
213
+ internalSheet?: string;
214
+ }
215
+
171
216
  @Schema({ timestamps: true })
172
217
  export class Sale {
173
218
  @Prop({ type: MongooseSchema.Types.ObjectId, auto: true, required: false })
@@ -260,6 +305,12 @@ export class Sale {
260
305
 
261
306
  @Prop({ type: String, required: false })
262
307
  omieId?: string;
308
+
309
+ @Prop({ type: SaleResponsables, required: false })
310
+ responsables?: SaleResponsables;
311
+
312
+ @Prop({ type: SaleLinks, required: false })
313
+ links?: SaleLinks;
263
314
  }
264
315
 
265
316
  export const SaleSchema = SchemaFactory.createForClass(Sale);