@grapadigital/shared-schemas 1.0.159 → 1.0.161
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.
- package/dist/schemas/recruitment.schema.d.ts +49 -0
- package/dist/schemas/recruitment.schema.js +86 -1
- package/dist/schemas/sale.schema.d.ts +1 -9
- package/dist/schemas/sale.schema.js +1 -32
- package/package.json +1 -1
- package/src/schemas/recruitment.schema.ts +35 -0
- package/src/schemas/sale.schema.ts +0 -12
|
@@ -120,6 +120,54 @@ export declare const CollabSchema: MongooseSchema<Collab, import("mongoose").Mod
|
|
|
120
120
|
} & {
|
|
121
121
|
__v: number;
|
|
122
122
|
}>;
|
|
123
|
+
export declare class ScopeEstimateMetrics {
|
|
124
|
+
impressionCount: number;
|
|
125
|
+
reachCount: number;
|
|
126
|
+
engagementCount: number;
|
|
127
|
+
engagementRate: number;
|
|
128
|
+
}
|
|
129
|
+
export declare const ScopeEstimateMetricsSchema: MongooseSchema<ScopeEstimateMetrics, import("mongoose").Model<ScopeEstimateMetrics, any, any, any, import("mongoose").Document<unknown, any, ScopeEstimateMetrics, any, {}> & ScopeEstimateMetrics & {
|
|
130
|
+
_id: Types.ObjectId;
|
|
131
|
+
} & {
|
|
132
|
+
__v: number;
|
|
133
|
+
}, any>, {}, {}, {}, {}, import("mongoose").DefaultSchemaOptions, ScopeEstimateMetrics, import("mongoose").Document<unknown, {}, import("mongoose").FlatRecord<ScopeEstimateMetrics>, {}, import("mongoose").ResolveSchemaOptions<import("mongoose").DefaultSchemaOptions>> & import("mongoose").FlatRecord<ScopeEstimateMetrics> & {
|
|
134
|
+
_id: Types.ObjectId;
|
|
135
|
+
} & {
|
|
136
|
+
__v: number;
|
|
137
|
+
}>;
|
|
138
|
+
export declare class ScopeEstimateBreakdown {
|
|
139
|
+
formatId: string;
|
|
140
|
+
label: string;
|
|
141
|
+
platform: string;
|
|
142
|
+
quantity: number;
|
|
143
|
+
estimates: ScopeEstimateMetrics;
|
|
144
|
+
}
|
|
145
|
+
export declare const ScopeEstimateBreakdownSchema: MongooseSchema<ScopeEstimateBreakdown, import("mongoose").Model<ScopeEstimateBreakdown, any, any, any, import("mongoose").Document<unknown, any, ScopeEstimateBreakdown, any, {}> & ScopeEstimateBreakdown & {
|
|
146
|
+
_id: Types.ObjectId;
|
|
147
|
+
} & {
|
|
148
|
+
__v: number;
|
|
149
|
+
}, any>, {}, {}, {}, {}, import("mongoose").DefaultSchemaOptions, ScopeEstimateBreakdown, import("mongoose").Document<unknown, {}, import("mongoose").FlatRecord<ScopeEstimateBreakdown>, {}, import("mongoose").ResolveSchemaOptions<import("mongoose").DefaultSchemaOptions>> & import("mongoose").FlatRecord<ScopeEstimateBreakdown> & {
|
|
150
|
+
_id: Types.ObjectId;
|
|
151
|
+
} & {
|
|
152
|
+
__v: number;
|
|
153
|
+
}>;
|
|
154
|
+
export declare class ScopeEstimates {
|
|
155
|
+
impressionCount: number;
|
|
156
|
+
reachCount: number;
|
|
157
|
+
engagementCount: number;
|
|
158
|
+
engagementRate: number;
|
|
159
|
+
perPost?: ScopeEstimateMetrics | null;
|
|
160
|
+
breakdown: ScopeEstimateBreakdown[];
|
|
161
|
+
}
|
|
162
|
+
export declare const ScopeEstimatesSchema: MongooseSchema<ScopeEstimates, import("mongoose").Model<ScopeEstimates, any, any, any, import("mongoose").Document<unknown, any, ScopeEstimates, any, {}> & ScopeEstimates & {
|
|
163
|
+
_id: Types.ObjectId;
|
|
164
|
+
} & {
|
|
165
|
+
__v: number;
|
|
166
|
+
}, any>, {}, {}, {}, {}, import("mongoose").DefaultSchemaOptions, ScopeEstimates, import("mongoose").Document<unknown, {}, import("mongoose").FlatRecord<ScopeEstimates>, {}, import("mongoose").ResolveSchemaOptions<import("mongoose").DefaultSchemaOptions>> & import("mongoose").FlatRecord<ScopeEstimates> & {
|
|
167
|
+
_id: Types.ObjectId;
|
|
168
|
+
} & {
|
|
169
|
+
__v: number;
|
|
170
|
+
}>;
|
|
123
171
|
export declare class Scope {
|
|
124
172
|
delivery: Delivery;
|
|
125
173
|
rights?: Rights;
|
|
@@ -128,6 +176,7 @@ export declare class Scope {
|
|
|
128
176
|
collab?: Collab;
|
|
129
177
|
exchange?: Exchange;
|
|
130
178
|
exclusivity?: boolean;
|
|
179
|
+
estimates?: ScopeEstimates;
|
|
131
180
|
}
|
|
132
181
|
export declare const ScopeSchema: MongooseSchema<Scope, import("mongoose").Model<Scope, any, any, any, import("mongoose").Document<unknown, any, Scope, any, {}> & Scope & {
|
|
133
182
|
_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.RecruitmentModel = exports.RecruitmentSchema = exports.Recruitment = exports.ScopeSchema = exports.Scope = exports.CollabSchema = exports.Collab = exports.ExchangeSchema = exports.Exchange = exports.InstallmentInfoSchema = exports.InstallmentInfo = exports.RightsSchema = exports.Rights = exports.RightSchema = exports.Right = exports.DeliverySchema = exports.Delivery = void 0;
|
|
12
|
+
exports.RecruitmentModel = exports.RecruitmentSchema = exports.Recruitment = exports.ScopeSchema = exports.Scope = exports.ScopeEstimatesSchema = exports.ScopeEstimates = exports.ScopeEstimateBreakdownSchema = exports.ScopeEstimateBreakdown = exports.ScopeEstimateMetricsSchema = exports.ScopeEstimateMetrics = exports.CollabSchema = exports.Collab = exports.ExchangeSchema = exports.Exchange = exports.InstallmentInfoSchema = exports.InstallmentInfo = exports.RightsSchema = exports.Rights = exports.RightSchema = exports.Right = exports.DeliverySchema = exports.Delivery = void 0;
|
|
13
13
|
const mongoose_1 = require("@nestjs/mongoose");
|
|
14
14
|
const mongoose_2 = require("mongoose");
|
|
15
15
|
let Delivery = class Delivery {
|
|
@@ -160,6 +160,87 @@ Collab = __decorate([
|
|
|
160
160
|
], Collab);
|
|
161
161
|
exports.Collab = Collab;
|
|
162
162
|
exports.CollabSchema = mongoose_1.SchemaFactory.createForClass(Collab);
|
|
163
|
+
let ScopeEstimateMetrics = class ScopeEstimateMetrics {
|
|
164
|
+
};
|
|
165
|
+
__decorate([
|
|
166
|
+
(0, mongoose_1.Prop)(),
|
|
167
|
+
__metadata("design:type", Number)
|
|
168
|
+
], ScopeEstimateMetrics.prototype, "impressionCount", void 0);
|
|
169
|
+
__decorate([
|
|
170
|
+
(0, mongoose_1.Prop)(),
|
|
171
|
+
__metadata("design:type", Number)
|
|
172
|
+
], ScopeEstimateMetrics.prototype, "reachCount", void 0);
|
|
173
|
+
__decorate([
|
|
174
|
+
(0, mongoose_1.Prop)(),
|
|
175
|
+
__metadata("design:type", Number)
|
|
176
|
+
], ScopeEstimateMetrics.prototype, "engagementCount", void 0);
|
|
177
|
+
__decorate([
|
|
178
|
+
(0, mongoose_1.Prop)(),
|
|
179
|
+
__metadata("design:type", Number)
|
|
180
|
+
], ScopeEstimateMetrics.prototype, "engagementRate", void 0);
|
|
181
|
+
ScopeEstimateMetrics = __decorate([
|
|
182
|
+
(0, mongoose_1.Schema)({ _id: false })
|
|
183
|
+
], ScopeEstimateMetrics);
|
|
184
|
+
exports.ScopeEstimateMetrics = ScopeEstimateMetrics;
|
|
185
|
+
exports.ScopeEstimateMetricsSchema = mongoose_1.SchemaFactory.createForClass(ScopeEstimateMetrics);
|
|
186
|
+
let ScopeEstimateBreakdown = class ScopeEstimateBreakdown {
|
|
187
|
+
};
|
|
188
|
+
__decorate([
|
|
189
|
+
(0, mongoose_1.Prop)(),
|
|
190
|
+
__metadata("design:type", String)
|
|
191
|
+
], ScopeEstimateBreakdown.prototype, "formatId", void 0);
|
|
192
|
+
__decorate([
|
|
193
|
+
(0, mongoose_1.Prop)(),
|
|
194
|
+
__metadata("design:type", String)
|
|
195
|
+
], ScopeEstimateBreakdown.prototype, "label", void 0);
|
|
196
|
+
__decorate([
|
|
197
|
+
(0, mongoose_1.Prop)(),
|
|
198
|
+
__metadata("design:type", String)
|
|
199
|
+
], ScopeEstimateBreakdown.prototype, "platform", void 0);
|
|
200
|
+
__decorate([
|
|
201
|
+
(0, mongoose_1.Prop)(),
|
|
202
|
+
__metadata("design:type", Number)
|
|
203
|
+
], ScopeEstimateBreakdown.prototype, "quantity", void 0);
|
|
204
|
+
__decorate([
|
|
205
|
+
(0, mongoose_1.Prop)({ type: exports.ScopeEstimateMetricsSchema }),
|
|
206
|
+
__metadata("design:type", ScopeEstimateMetrics)
|
|
207
|
+
], ScopeEstimateBreakdown.prototype, "estimates", void 0);
|
|
208
|
+
ScopeEstimateBreakdown = __decorate([
|
|
209
|
+
(0, mongoose_1.Schema)({ _id: false })
|
|
210
|
+
], ScopeEstimateBreakdown);
|
|
211
|
+
exports.ScopeEstimateBreakdown = ScopeEstimateBreakdown;
|
|
212
|
+
exports.ScopeEstimateBreakdownSchema = mongoose_1.SchemaFactory.createForClass(ScopeEstimateBreakdown);
|
|
213
|
+
let ScopeEstimates = class ScopeEstimates {
|
|
214
|
+
};
|
|
215
|
+
__decorate([
|
|
216
|
+
(0, mongoose_1.Prop)(),
|
|
217
|
+
__metadata("design:type", Number)
|
|
218
|
+
], ScopeEstimates.prototype, "impressionCount", void 0);
|
|
219
|
+
__decorate([
|
|
220
|
+
(0, mongoose_1.Prop)(),
|
|
221
|
+
__metadata("design:type", Number)
|
|
222
|
+
], ScopeEstimates.prototype, "reachCount", void 0);
|
|
223
|
+
__decorate([
|
|
224
|
+
(0, mongoose_1.Prop)(),
|
|
225
|
+
__metadata("design:type", Number)
|
|
226
|
+
], ScopeEstimates.prototype, "engagementCount", void 0);
|
|
227
|
+
__decorate([
|
|
228
|
+
(0, mongoose_1.Prop)(),
|
|
229
|
+
__metadata("design:type", Number)
|
|
230
|
+
], ScopeEstimates.prototype, "engagementRate", void 0);
|
|
231
|
+
__decorate([
|
|
232
|
+
(0, mongoose_1.Prop)({ type: exports.ScopeEstimateMetricsSchema, required: false }),
|
|
233
|
+
__metadata("design:type", Object)
|
|
234
|
+
], ScopeEstimates.prototype, "perPost", void 0);
|
|
235
|
+
__decorate([
|
|
236
|
+
(0, mongoose_1.Prop)({ type: [exports.ScopeEstimateBreakdownSchema] }),
|
|
237
|
+
__metadata("design:type", Array)
|
|
238
|
+
], ScopeEstimates.prototype, "breakdown", void 0);
|
|
239
|
+
ScopeEstimates = __decorate([
|
|
240
|
+
(0, mongoose_1.Schema)({ _id: false })
|
|
241
|
+
], ScopeEstimates);
|
|
242
|
+
exports.ScopeEstimates = ScopeEstimates;
|
|
243
|
+
exports.ScopeEstimatesSchema = mongoose_1.SchemaFactory.createForClass(ScopeEstimates);
|
|
163
244
|
let Scope = class Scope {
|
|
164
245
|
};
|
|
165
246
|
__decorate([
|
|
@@ -190,6 +271,10 @@ __decorate([
|
|
|
190
271
|
(0, mongoose_1.Prop)({ required: false }),
|
|
191
272
|
__metadata("design:type", Boolean)
|
|
192
273
|
], Scope.prototype, "exclusivity", void 0);
|
|
274
|
+
__decorate([
|
|
275
|
+
(0, mongoose_1.Prop)({ type: exports.ScopeEstimatesSchema, required: false }),
|
|
276
|
+
__metadata("design:type", ScopeEstimates)
|
|
277
|
+
], Scope.prototype, "estimates", void 0);
|
|
193
278
|
Scope = __decorate([
|
|
194
279
|
(0, mongoose_1.Schema)({ _id: false })
|
|
195
280
|
], Scope);
|
|
@@ -28,13 +28,6 @@ import { Profile } from './profile.schema';
|
|
|
28
28
|
import { Client } from './client.schema';
|
|
29
29
|
import { Influencer } from './influencer.schema';
|
|
30
30
|
export type SaleDocument = HydratedDocument<Sale>;
|
|
31
|
-
export declare class Screening {
|
|
32
|
-
subject: string;
|
|
33
|
-
fromName: string;
|
|
34
|
-
fromAddress: string;
|
|
35
|
-
toAddress: string;
|
|
36
|
-
text: string;
|
|
37
|
-
}
|
|
38
31
|
export declare class Proposal {
|
|
39
32
|
businessUnit: 'service' | 'comercial';
|
|
40
33
|
contact: string;
|
|
@@ -131,9 +124,8 @@ export declare class Inbox {
|
|
|
131
124
|
export declare class Sale {
|
|
132
125
|
_id?: Types.ObjectId;
|
|
133
126
|
title: string;
|
|
134
|
-
phase: 'inbox' | '
|
|
127
|
+
phase: 'inbox' | 'proposal' | 'negotiation' | 'commission' | 'formalization' | 'closed' | 'lost';
|
|
135
128
|
type: 'new' | 'organic_expansion' | 'strategic_expansion' | 'renewal' | 'comercial_winback' | 'organic_winback';
|
|
136
|
-
screening?: Screening;
|
|
137
129
|
proposal?: Proposal;
|
|
138
130
|
negotiation?: Negotiation;
|
|
139
131
|
formalization?: Formalization;
|
|
@@ -9,35 +9,9 @@ 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 =
|
|
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;
|
|
13
13
|
const mongoose_1 = require("@nestjs/mongoose");
|
|
14
14
|
const mongoose_2 = require("mongoose");
|
|
15
|
-
let Screening = class Screening {
|
|
16
|
-
};
|
|
17
|
-
__decorate([
|
|
18
|
-
(0, mongoose_1.Prop)({ required: true }),
|
|
19
|
-
__metadata("design:type", String)
|
|
20
|
-
], Screening.prototype, "subject", void 0);
|
|
21
|
-
__decorate([
|
|
22
|
-
(0, mongoose_1.Prop)({ required: true }),
|
|
23
|
-
__metadata("design:type", String)
|
|
24
|
-
], Screening.prototype, "fromName", void 0);
|
|
25
|
-
__decorate([
|
|
26
|
-
(0, mongoose_1.Prop)({ required: true }),
|
|
27
|
-
__metadata("design:type", String)
|
|
28
|
-
], Screening.prototype, "fromAddress", void 0);
|
|
29
|
-
__decorate([
|
|
30
|
-
(0, mongoose_1.Prop)({ required: true }),
|
|
31
|
-
__metadata("design:type", String)
|
|
32
|
-
], Screening.prototype, "toAddress", void 0);
|
|
33
|
-
__decorate([
|
|
34
|
-
(0, mongoose_1.Prop)({ required: true }),
|
|
35
|
-
__metadata("design:type", String)
|
|
36
|
-
], Screening.prototype, "text", void 0);
|
|
37
|
-
Screening = __decorate([
|
|
38
|
-
(0, mongoose_1.Schema)({ _id: false })
|
|
39
|
-
], Screening);
|
|
40
|
-
exports.Screening = Screening;
|
|
41
15
|
let Proposal = class Proposal {
|
|
42
16
|
};
|
|
43
17
|
__decorate([
|
|
@@ -408,7 +382,6 @@ __decorate([
|
|
|
408
382
|
required: true,
|
|
409
383
|
enum: [
|
|
410
384
|
'inbox',
|
|
411
|
-
'screening',
|
|
412
385
|
'proposal',
|
|
413
386
|
'negotiation',
|
|
414
387
|
'commission',
|
|
@@ -434,10 +407,6 @@ __decorate([
|
|
|
434
407
|
}),
|
|
435
408
|
__metadata("design:type", String)
|
|
436
409
|
], Sale.prototype, "type", void 0);
|
|
437
|
-
__decorate([
|
|
438
|
-
(0, mongoose_1.Prop)({ type: Screening }),
|
|
439
|
-
__metadata("design:type", Screening)
|
|
440
|
-
], Sale.prototype, "screening", void 0);
|
|
441
410
|
__decorate([
|
|
442
411
|
(0, mongoose_1.Prop)({ type: Proposal }),
|
|
443
412
|
__metadata("design:type", Proposal)
|
package/package.json
CHANGED
|
@@ -117,6 +117,39 @@ export const CollabSchema = SchemaFactory.createForClass(Collab);
|
|
|
117
117
|
|
|
118
118
|
|
|
119
119
|
|
|
120
|
+
@Schema({ _id: false })
|
|
121
|
+
export class ScopeEstimateMetrics {
|
|
122
|
+
@Prop() impressionCount: number;
|
|
123
|
+
@Prop() reachCount: number;
|
|
124
|
+
@Prop() engagementCount: number;
|
|
125
|
+
@Prop() engagementRate: number;
|
|
126
|
+
}
|
|
127
|
+
|
|
128
|
+
export const ScopeEstimateMetricsSchema = SchemaFactory.createForClass(ScopeEstimateMetrics);
|
|
129
|
+
|
|
130
|
+
@Schema({ _id: false })
|
|
131
|
+
export class ScopeEstimateBreakdown {
|
|
132
|
+
@Prop() formatId: string;
|
|
133
|
+
@Prop() label: string;
|
|
134
|
+
@Prop() platform: string;
|
|
135
|
+
@Prop() quantity: number;
|
|
136
|
+
@Prop({ type: ScopeEstimateMetricsSchema }) estimates: ScopeEstimateMetrics;
|
|
137
|
+
}
|
|
138
|
+
|
|
139
|
+
export const ScopeEstimateBreakdownSchema = SchemaFactory.createForClass(ScopeEstimateBreakdown);
|
|
140
|
+
|
|
141
|
+
@Schema({ _id: false })
|
|
142
|
+
export class ScopeEstimates {
|
|
143
|
+
@Prop() impressionCount: number;
|
|
144
|
+
@Prop() reachCount: number;
|
|
145
|
+
@Prop() engagementCount: number;
|
|
146
|
+
@Prop() engagementRate: number;
|
|
147
|
+
@Prop({ type: ScopeEstimateMetricsSchema, required: false }) perPost?: ScopeEstimateMetrics | null;
|
|
148
|
+
@Prop({ type: [ScopeEstimateBreakdownSchema] }) breakdown: ScopeEstimateBreakdown[];
|
|
149
|
+
}
|
|
150
|
+
|
|
151
|
+
export const ScopeEstimatesSchema = SchemaFactory.createForClass(ScopeEstimates);
|
|
152
|
+
|
|
120
153
|
@Schema({ _id: false })
|
|
121
154
|
export class Scope {
|
|
122
155
|
@Prop({ type: DeliverySchema })
|
|
@@ -140,6 +173,8 @@ export class Scope {
|
|
|
140
173
|
@Prop({ required: false })
|
|
141
174
|
exclusivity?: boolean;
|
|
142
175
|
|
|
176
|
+
@Prop({ type: ScopeEstimatesSchema, required: false })
|
|
177
|
+
estimates?: ScopeEstimates;
|
|
143
178
|
}
|
|
144
179
|
|
|
145
180
|
export const ScopeSchema = SchemaFactory.createForClass(Scope);
|
|
@@ -11,15 +11,6 @@ import { Influencer } from './influencer.schema';
|
|
|
11
11
|
|
|
12
12
|
export type SaleDocument = HydratedDocument<Sale>;
|
|
13
13
|
|
|
14
|
-
@Schema({ _id: false })
|
|
15
|
-
export class Screening {
|
|
16
|
-
@Prop({ required: true }) subject: string;
|
|
17
|
-
@Prop({ required: true }) fromName: string;
|
|
18
|
-
@Prop({ required: true }) fromAddress: string;
|
|
19
|
-
@Prop({ required: true }) toAddress: string;
|
|
20
|
-
@Prop({ required: true }) text: string;
|
|
21
|
-
}
|
|
22
|
-
|
|
23
14
|
@Schema({ _id: false })
|
|
24
15
|
export class Proposal {
|
|
25
16
|
@Prop({ required: true }) businessUnit: 'service' | 'comercial';
|
|
@@ -193,7 +184,6 @@ export class Sale {
|
|
|
193
184
|
required: true,
|
|
194
185
|
enum: [
|
|
195
186
|
'inbox',
|
|
196
|
-
'screening',
|
|
197
187
|
'proposal',
|
|
198
188
|
'negotiation',
|
|
199
189
|
'commission',
|
|
@@ -204,7 +194,6 @@ export class Sale {
|
|
|
204
194
|
})
|
|
205
195
|
phase:
|
|
206
196
|
| 'inbox'
|
|
207
|
-
| 'screening'
|
|
208
197
|
| 'proposal'
|
|
209
198
|
| 'negotiation'
|
|
210
199
|
| 'commission'
|
|
@@ -232,7 +221,6 @@ export class Sale {
|
|
|
232
221
|
| 'comercial_winback'
|
|
233
222
|
| 'organic_winback';
|
|
234
223
|
|
|
235
|
-
@Prop({ type: Screening }) screening?: Screening;
|
|
236
224
|
@Prop({ type: Proposal }) proposal?: Proposal;
|
|
237
225
|
@Prop({ type: Negotiation }) negotiation?: Negotiation;
|
|
238
226
|
@Prop({ type: Formalization }) formalization?: Formalization;
|