@grapadigital/shared-schemas 1.0.130 → 1.0.133

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.
@@ -80,11 +80,26 @@ export declare const AgencyCommissionPeriodSchema: import("mongoose").Schema<Age
80
80
  } & {
81
81
  __v: number;
82
82
  }>;
83
+ export declare class NicheItem {
84
+ id: string;
85
+ name: string;
86
+ parentId?: string;
87
+ }
88
+ export declare const NicheItemSchema: import("mongoose").Schema<NicheItem, import("mongoose").Model<NicheItem, any, any, any, import("mongoose").Document<unknown, any, NicheItem, any, {}> & NicheItem & {
89
+ _id: import("mongoose").Types.ObjectId;
90
+ } & {
91
+ __v: number;
92
+ }, any>, {}, {}, {}, {}, import("mongoose").DefaultSchemaOptions, NicheItem, import("mongoose").Document<unknown, {}, import("mongoose").FlatRecord<NicheItem>, {}, import("mongoose").ResolveSchemaOptions<import("mongoose").DefaultSchemaOptions>> & import("mongoose").FlatRecord<NicheItem> & {
93
+ _id: import("mongoose").Types.ObjectId;
94
+ } & {
95
+ __v: number;
96
+ }>;
83
97
  export declare class Client extends User {
84
98
  clusters: Cluster[];
85
99
  companies: Company[];
86
100
  type: string;
87
101
  categories: string[];
102
+ niches?: NicheItem[];
88
103
  hasAgencyCommission: boolean;
89
104
  agencyCommission: AgencyCommissionPeriod[];
90
105
  }
@@ -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.ClientModel = exports.ClientSchema = exports.Client = exports.AgencyCommissionPeriodSchema = exports.AgencyCommissionPeriod = exports.CommissionRangeSchema = exports.CommissionRange = exports.CompanySchema = exports.Company = exports.ClusterSchema = exports.Cluster = void 0;
12
+ exports.ClientModel = exports.ClientSchema = exports.Client = exports.NicheItemSchema = exports.NicheItem = exports.AgencyCommissionPeriodSchema = exports.AgencyCommissionPeriod = exports.CommissionRangeSchema = exports.CommissionRange = exports.CompanySchema = exports.Company = exports.ClusterSchema = exports.Cluster = void 0;
13
13
  const mongoose_1 = require("@nestjs/mongoose");
14
14
  const mongoose_2 = require("mongoose");
15
15
  const user_schema_1 = require("./user.schema");
@@ -81,6 +81,25 @@ AgencyCommissionPeriod = __decorate([
81
81
  ], AgencyCommissionPeriod);
82
82
  exports.AgencyCommissionPeriod = AgencyCommissionPeriod;
83
83
  exports.AgencyCommissionPeriodSchema = mongoose_1.SchemaFactory.createForClass(AgencyCommissionPeriod);
84
+ let NicheItem = class NicheItem {
85
+ };
86
+ __decorate([
87
+ (0, mongoose_1.Prop)({ required: true }),
88
+ __metadata("design:type", String)
89
+ ], NicheItem.prototype, "id", void 0);
90
+ __decorate([
91
+ (0, mongoose_1.Prop)({ required: true }),
92
+ __metadata("design:type", String)
93
+ ], NicheItem.prototype, "name", void 0);
94
+ __decorate([
95
+ (0, mongoose_1.Prop)({ default: null }),
96
+ __metadata("design:type", String)
97
+ ], NicheItem.prototype, "parentId", void 0);
98
+ NicheItem = __decorate([
99
+ (0, mongoose_1.Schema)({ _id: false })
100
+ ], NicheItem);
101
+ exports.NicheItem = NicheItem;
102
+ exports.NicheItemSchema = mongoose_1.SchemaFactory.createForClass(NicheItem);
84
103
  let Client = class Client extends user_schema_1.User {
85
104
  };
86
105
  __decorate([
@@ -99,6 +118,14 @@ __decorate([
99
118
  (0, mongoose_1.Prop)({ type: [String], default: [] }),
100
119
  __metadata("design:type", Array)
101
120
  ], Client.prototype, "categories", void 0);
121
+ __decorate([
122
+ (0, mongoose_1.Prop)({
123
+ type: [exports.NicheItemSchema],
124
+ default: [],
125
+ _id: false, required: false
126
+ }),
127
+ __metadata("design:type", Array)
128
+ ], Client.prototype, "niches", void 0);
102
129
  __decorate([
103
130
  (0, mongoose_1.Prop)({ required: true, default: false }),
104
131
  __metadata("design:type", Boolean)
@@ -70,9 +70,9 @@ export declare class Content {
70
70
  _id?: Types.ObjectId;
71
71
  caption?: string;
72
72
  link: string;
73
- type: 'reel' | 'carousel' | 'image' | 'story' | 'video';
73
+ type: 'reel' | 'carousel' | 'image' | 'story' | 'video' | 'post' | 'pin';
74
74
  tagType: 'withTag' | 'withoutTag' | 'brandExposure';
75
- socialnetwork: 'instagram' | 'tiktok' | 'youtube';
75
+ socialnetwork: 'instagram' | 'tiktok' | 'youtube' | 'pinterest' | 'linkedin';
76
76
  status: 'approved' | 'repproved' | 'deleted';
77
77
  profile: Types.ObjectId | Profile;
78
78
  action: Types.ObjectId | Action;
@@ -111,7 +111,7 @@ __decorate([
111
111
  __metadata("design:type", String)
112
112
  ], Content.prototype, "link", void 0);
113
113
  __decorate([
114
- (0, mongoose_1.Prop)({ type: String, enum: ['reel', 'image', 'carousel', 'story', 'video'], required: true }),
114
+ (0, mongoose_1.Prop)({ type: String, enum: ['reel', 'image', 'carousel', 'story', 'video', 'post', 'pin'], required: true }),
115
115
  __metadata("design:type", String)
116
116
  ], Content.prototype, "type", void 0);
117
117
  __decorate([
@@ -119,7 +119,7 @@ __decorate([
119
119
  __metadata("design:type", String)
120
120
  ], Content.prototype, "tagType", void 0);
121
121
  __decorate([
122
- (0, mongoose_1.Prop)({ type: String, enum: ['instagram', 'tiktok', 'youtube'], required: true }),
122
+ (0, mongoose_1.Prop)({ type: String, enum: ['instagram', 'tiktok', 'youtube', 'pinterest', 'linkedin'], required: true }),
123
123
  __metadata("design:type", String)
124
124
  ], Content.prototype, "socialnetwork", void 0);
125
125
  __decorate([
@@ -92,6 +92,10 @@ declare class Note {
92
92
  owner: string;
93
93
  createdAt: Date;
94
94
  }
95
+ export declare class TimelineEntry {
96
+ phase: string;
97
+ date: Date;
98
+ }
95
99
  export declare class CommissionParticipant {
96
100
  email: string;
97
101
  role: string;
@@ -116,6 +120,7 @@ export declare class Sale {
116
120
  notes?: Note[];
117
121
  commission?: CommissionInfo;
118
122
  tags?: string[];
123
+ timeline?: TimelineEntry[];
119
124
  profiles?: Types.ObjectId[] | Profile[];
120
125
  closedAt?: Date;
121
126
  createdAt?: Date;
@@ -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.CommissionInfo = exports.CommissionParticipant = exports.Lost = exports.Formalization = exports.Negotiation = exports.Proposal = exports.Screening = void 0;
12
+ exports.SaleModel = exports.SaleSchema = exports.Sale = exports.CommissionInfo = exports.CommissionParticipant = exports.TimelineEntry = exports.Lost = exports.Formalization = exports.Negotiation = exports.Proposal = exports.Screening = void 0;
13
13
  const mongoose_1 = require("@nestjs/mongoose");
14
14
  const mongoose_2 = require("mongoose");
15
15
  let Screening = class Screening {
@@ -259,6 +259,20 @@ __decorate([
259
259
  Note = __decorate([
260
260
  (0, mongoose_1.Schema)({ _id: false })
261
261
  ], Note);
262
+ let TimelineEntry = class TimelineEntry {
263
+ };
264
+ __decorate([
265
+ (0, mongoose_1.Prop)({ required: true }),
266
+ __metadata("design:type", String)
267
+ ], TimelineEntry.prototype, "phase", void 0);
268
+ __decorate([
269
+ (0, mongoose_1.Prop)({ required: true }),
270
+ __metadata("design:type", Date)
271
+ ], TimelineEntry.prototype, "date", void 0);
272
+ TimelineEntry = __decorate([
273
+ (0, mongoose_1.Schema)({ _id: false })
274
+ ], TimelineEntry);
275
+ exports.TimelineEntry = TimelineEntry;
262
276
  let CommissionParticipant = class CommissionParticipant {
263
277
  };
264
278
  __decorate([
@@ -360,6 +374,10 @@ __decorate([
360
374
  (0, mongoose_1.Prop)({ type: [String], required: false, default: [] }),
361
375
  __metadata("design:type", Array)
362
376
  ], Sale.prototype, "tags", void 0);
377
+ __decorate([
378
+ (0, mongoose_1.Prop)([{ type: TimelineEntry, required: false }]),
379
+ __metadata("design:type", Array)
380
+ ], Sale.prototype, "timeline", void 0);
363
381
  __decorate([
364
382
  (0, mongoose_1.Prop)([
365
383
  {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@grapadigital/shared-schemas",
3
- "version": "1.0.130",
3
+ "version": "1.0.133",
4
4
  "description": "Shared Mongoose Schemas",
5
5
  "main": "dist/index.js",
6
6
  "types": "dist/index.d.ts",
@@ -54,6 +54,20 @@ export class AgencyCommissionPeriod {
54
54
 
55
55
  export const AgencyCommissionPeriodSchema = SchemaFactory.createForClass(AgencyCommissionPeriod);
56
56
 
57
+ @Schema({ _id: false })
58
+ export class NicheItem {
59
+ @Prop({ required: true })
60
+ id: string;
61
+
62
+ @Prop({ required: true })
63
+ name: string;
64
+
65
+ @Prop({ default: null })
66
+ parentId?: string;
67
+ }
68
+
69
+ export const NicheItemSchema = SchemaFactory.createForClass(NicheItem);
70
+
57
71
  @Schema({ timestamps: true })
58
72
  export class Client extends User {
59
73
  @Prop({ type: [ClusterSchema], default: [] })
@@ -68,6 +82,13 @@ export class Client extends User {
68
82
  @Prop({ type: [String], default: [] })
69
83
  categories: string[];
70
84
 
85
+ @Prop({
86
+ type: [NicheItemSchema],
87
+ default: [],
88
+ _id: false, required: false
89
+ })
90
+ niches?: NicheItem[];
91
+
71
92
  @Prop({ required: true, default: false })
72
93
  hasAgencyCommission: boolean;
73
94
 
@@ -79,14 +79,14 @@ export class Content {
79
79
  @Prop({ types: String, required: true })
80
80
  link: string;
81
81
 
82
- @Prop({ type: String, enum: ['reel', 'image', 'carousel', 'story', 'video'], required: true })
83
- type: 'reel' | 'carousel' | 'image' | 'story' | 'video';
82
+ @Prop({ type: String, enum: ['reel', 'image', 'carousel', 'story', 'video', 'post', 'pin'], required: true })
83
+ type: 'reel' | 'carousel' | 'image' | 'story' | 'video' | 'post' | 'pin';
84
84
 
85
85
  @Prop({ type: String, enum: ['withTag', 'withoutTag', 'brandExposure'], required: true })
86
86
  tagType: 'withTag' | 'withoutTag' | 'brandExposure';
87
87
 
88
- @Prop({ type: String, enum: ['instagram', 'tiktok', 'youtube'], required: true })
89
- socialnetwork: 'instagram' | 'tiktok' | 'youtube';
88
+ @Prop({ type: String, enum: ['instagram', 'tiktok', 'youtube', 'pinterest', 'linkedin'], required: true })
89
+ socialnetwork: 'instagram' | 'tiktok' | 'youtube' | 'pinterest' | 'linkedin';
90
90
 
91
91
  @Prop({
92
92
  type: String,
@@ -128,6 +128,12 @@ class Note {
128
128
  @Prop({ required: true }) createdAt: Date;
129
129
  }
130
130
 
131
+ @Schema({ _id: false })
132
+ export class TimelineEntry {
133
+ @Prop({ required: true }) phase: string;
134
+ @Prop({ required: true }) date: Date;
135
+ }
136
+
131
137
  @Schema({ _id: false })
132
138
  export class CommissionParticipant {
133
139
  @Prop({ required: true }) email: string;
@@ -189,6 +195,9 @@ export class Sale {
189
195
  @Prop({ type: [String], required: false, default: [] })
190
196
  tags?: string[];
191
197
 
198
+ @Prop([{ type: TimelineEntry, required: false }])
199
+ timeline?: TimelineEntry[];
200
+
192
201
  @Prop([
193
202
  {
194
203
  type: MongooseSchema.Types.ObjectId,