@grapadigital/shared-schemas 1.0.49 → 1.0.51
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/index.d.ts +1 -0
- package/dist/index.js +1 -0
- package/dist/schemas/content.schema.d.ts +1 -1
- package/dist/schemas/content.schema.js +1 -1
- package/dist/schemas/sale.schema.d.ts +113 -0
- package/dist/schemas/sale.schema.js +292 -0
- package/package.json +1 -1
- package/src/index.ts +1 -0
- package/src/schemas/content.schema.ts +2 -2
- package/src/schemas/sale.schema.ts +122 -0
- package/dist/schemas/activation.schema.d.ts +0 -228
- package/dist/schemas/activation.schema.js +0 -493
package/dist/index.d.ts
CHANGED
package/dist/index.js
CHANGED
|
@@ -25,3 +25,4 @@ __exportStar(require("./schemas/profile.schema"), exports);
|
|
|
25
25
|
__exportStar(require("./schemas/recruitment.schema"), exports);
|
|
26
26
|
__exportStar(require("./schemas/token.schema"), exports);
|
|
27
27
|
__exportStar(require("./schemas/webhook.schema"), exports);
|
|
28
|
+
__exportStar(require("./schemas/sale.schema"), exports);
|
|
@@ -68,7 +68,7 @@ export declare const EstimatesSchema: MongooseSchema<Estimates, import("mongoose
|
|
|
68
68
|
}>;
|
|
69
69
|
export declare class Content {
|
|
70
70
|
_id?: Types.ObjectId;
|
|
71
|
-
caption
|
|
71
|
+
caption?: string;
|
|
72
72
|
link: string;
|
|
73
73
|
type: 'reel' | 'carousel' | 'image' | 'story' | 'video';
|
|
74
74
|
tagType: 'withTag' | 'withoutTag' | 'brandExposure';
|
|
@@ -103,7 +103,7 @@ __decorate([
|
|
|
103
103
|
__metadata("design:type", mongoose_2.Types.ObjectId)
|
|
104
104
|
], Content.prototype, "_id", void 0);
|
|
105
105
|
__decorate([
|
|
106
|
-
(0, mongoose_1.Prop)({ types: String, required:
|
|
106
|
+
(0, mongoose_1.Prop)({ types: String, required: false, default: '' }),
|
|
107
107
|
__metadata("design:type", String)
|
|
108
108
|
], Content.prototype, "caption", void 0);
|
|
109
109
|
__decorate([
|
|
@@ -0,0 +1,113 @@
|
|
|
1
|
+
/// <reference types="mongoose/types/aggregate" />
|
|
2
|
+
/// <reference types="mongoose/types/callback" />
|
|
3
|
+
/// <reference types="mongoose/types/collection" />
|
|
4
|
+
/// <reference types="mongoose/types/connection" />
|
|
5
|
+
/// <reference types="mongoose/types/cursor" />
|
|
6
|
+
/// <reference types="mongoose/types/document" />
|
|
7
|
+
/// <reference types="mongoose/types/error" />
|
|
8
|
+
/// <reference types="mongoose/types/expressions" />
|
|
9
|
+
/// <reference types="mongoose/types/helpers" />
|
|
10
|
+
/// <reference types="mongoose/types/middlewares" />
|
|
11
|
+
/// <reference types="mongoose/types/indexes" />
|
|
12
|
+
/// <reference types="mongoose/types/models" />
|
|
13
|
+
/// <reference types="mongoose/types/mongooseoptions" />
|
|
14
|
+
/// <reference types="mongoose/types/pipelinestage" />
|
|
15
|
+
/// <reference types="mongoose/types/populate" />
|
|
16
|
+
/// <reference types="mongoose/types/query" />
|
|
17
|
+
/// <reference types="mongoose/types/schemaoptions" />
|
|
18
|
+
/// <reference types="mongoose/types/schematypes" />
|
|
19
|
+
/// <reference types="mongoose/types/session" />
|
|
20
|
+
/// <reference types="mongoose/types/types" />
|
|
21
|
+
/// <reference types="mongoose/types/utility" />
|
|
22
|
+
/// <reference types="mongoose/types/validation" />
|
|
23
|
+
/// <reference types="mongoose/types/virtuals" />
|
|
24
|
+
/// <reference types="mongoose/types/inferschematype" />
|
|
25
|
+
/// <reference types="mongoose/types/inferrawdoctype" />
|
|
26
|
+
import { HydratedDocument, Schema as MongooseSchema, Types } from 'mongoose';
|
|
27
|
+
import { Profile } from './profile.schema';
|
|
28
|
+
import { Client } from './client.schema';
|
|
29
|
+
export type SaleDocument = HydratedDocument<Sale>;
|
|
30
|
+
export declare class Screening {
|
|
31
|
+
emailTitle: string;
|
|
32
|
+
senderName: string;
|
|
33
|
+
senderEmail: string;
|
|
34
|
+
receiverEmail: string;
|
|
35
|
+
emailBody: string;
|
|
36
|
+
}
|
|
37
|
+
export declare class Proposal {
|
|
38
|
+
businessUnit: 'enterprise' | 'artistic';
|
|
39
|
+
contact: string;
|
|
40
|
+
initialScope: string;
|
|
41
|
+
responsable: {
|
|
42
|
+
team: string;
|
|
43
|
+
name: string;
|
|
44
|
+
email: string;
|
|
45
|
+
};
|
|
46
|
+
}
|
|
47
|
+
export declare class Negotiation {
|
|
48
|
+
calculatorType: 'withPreDefinedBudget' | 'withoutPreDefinedBudget';
|
|
49
|
+
childPermit: boolean;
|
|
50
|
+
childPermitValue?: number;
|
|
51
|
+
childPermitMethod?: 'direct' | 'debit_note' | 'client';
|
|
52
|
+
influencerBroadcastValue: number;
|
|
53
|
+
influencerBroadcastMethod: 'transfer' | 'direct' | 'debit_note' | 'client';
|
|
54
|
+
productionAndOthersValue: number;
|
|
55
|
+
productionAndOthersMethod: 'direct' | 'debit_note' | 'client';
|
|
56
|
+
commissionRate: number;
|
|
57
|
+
broadcastBonusRate: number;
|
|
58
|
+
taxRate: number;
|
|
59
|
+
budget: number;
|
|
60
|
+
activationValue: number;
|
|
61
|
+
revenue: number;
|
|
62
|
+
transferValue: number;
|
|
63
|
+
taxValue: number;
|
|
64
|
+
broadcastBonusValue: number;
|
|
65
|
+
debitNoteValue: number;
|
|
66
|
+
freeValue: number;
|
|
67
|
+
grossProfitRate: number;
|
|
68
|
+
takeRate: number;
|
|
69
|
+
grossIncomeValue: number;
|
|
70
|
+
}
|
|
71
|
+
export declare class FormalizationInstallment {
|
|
72
|
+
number: number;
|
|
73
|
+
value: number;
|
|
74
|
+
estimatedInvoiceIssueDate: string;
|
|
75
|
+
estimatedInvoiceDueDate: string;
|
|
76
|
+
}
|
|
77
|
+
export declare class Formalization {
|
|
78
|
+
billingTriggerEvent: string;
|
|
79
|
+
estimatedInvoiceIssueDate: string;
|
|
80
|
+
estimatedInvoiceDueDate: string;
|
|
81
|
+
paymentTerms: string;
|
|
82
|
+
handlingInvoices: string;
|
|
83
|
+
finalScope: string;
|
|
84
|
+
client: Types.ObjectId | Client;
|
|
85
|
+
brand: Types.ObjectId | Client;
|
|
86
|
+
installment: FormalizationInstallment[];
|
|
87
|
+
}
|
|
88
|
+
export declare class Lost {
|
|
89
|
+
reason: 'declined' | 'other';
|
|
90
|
+
details?: string;
|
|
91
|
+
}
|
|
92
|
+
export declare class Sale {
|
|
93
|
+
_id?: Types.ObjectId;
|
|
94
|
+
title: string;
|
|
95
|
+
phase: 'screening' | 'proposal' | 'negotiation' | 'formalization' | 'closed' | 'lost';
|
|
96
|
+
screening?: Screening;
|
|
97
|
+
proposal?: Proposal;
|
|
98
|
+
negotiation?: Negotiation;
|
|
99
|
+
formalization?: Formalization;
|
|
100
|
+
lost?: Lost;
|
|
101
|
+
profile?: Types.ObjectId | Profile;
|
|
102
|
+
createdAt?: Date;
|
|
103
|
+
updatedAt?: Date;
|
|
104
|
+
}
|
|
105
|
+
export declare const SaleSchema: MongooseSchema<Sale, import("mongoose").Model<Sale, any, any, any, import("mongoose").Document<unknown, any, Sale> & Sale & Required<{
|
|
106
|
+
_id: Types.ObjectId;
|
|
107
|
+
}> & {
|
|
108
|
+
__v: number;
|
|
109
|
+
}, any>, {}, {}, {}, {}, import("mongoose").DefaultSchemaOptions, Sale, import("mongoose").Document<unknown, {}, import("mongoose").FlatRecord<Sale>> & import("mongoose").FlatRecord<Sale> & Required<{
|
|
110
|
+
_id: Types.ObjectId;
|
|
111
|
+
}> & {
|
|
112
|
+
__v: number;
|
|
113
|
+
}>;
|
|
@@ -0,0 +1,292 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __decorate = (this && this.__decorate) || function (decorators, target, key, desc) {
|
|
3
|
+
var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
|
|
4
|
+
if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
|
|
5
|
+
else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
|
|
6
|
+
return c > 3 && r && Object.defineProperty(target, key, r), r;
|
|
7
|
+
};
|
|
8
|
+
var __metadata = (this && this.__metadata) || function (k, v) {
|
|
9
|
+
if (typeof Reflect === "object" && typeof Reflect.metadata === "function") return Reflect.metadata(k, v);
|
|
10
|
+
};
|
|
11
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
12
|
+
exports.SaleSchema = exports.Sale = exports.Lost = exports.Formalization = exports.FormalizationInstallment = exports.Negotiation = exports.Proposal = exports.Screening = void 0;
|
|
13
|
+
const mongoose_1 = require("@nestjs/mongoose");
|
|
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, "emailTitle", void 0);
|
|
21
|
+
__decorate([
|
|
22
|
+
(0, mongoose_1.Prop)({ required: true }),
|
|
23
|
+
__metadata("design:type", String)
|
|
24
|
+
], Screening.prototype, "senderName", void 0);
|
|
25
|
+
__decorate([
|
|
26
|
+
(0, mongoose_1.Prop)({ required: true }),
|
|
27
|
+
__metadata("design:type", String)
|
|
28
|
+
], Screening.prototype, "senderEmail", void 0);
|
|
29
|
+
__decorate([
|
|
30
|
+
(0, mongoose_1.Prop)({ required: true }),
|
|
31
|
+
__metadata("design:type", String)
|
|
32
|
+
], Screening.prototype, "receiverEmail", void 0);
|
|
33
|
+
__decorate([
|
|
34
|
+
(0, mongoose_1.Prop)({ required: true }),
|
|
35
|
+
__metadata("design:type", String)
|
|
36
|
+
], Screening.prototype, "emailBody", void 0);
|
|
37
|
+
Screening = __decorate([
|
|
38
|
+
(0, mongoose_1.Schema)({ _id: false })
|
|
39
|
+
], Screening);
|
|
40
|
+
exports.Screening = Screening;
|
|
41
|
+
let Proposal = class Proposal {
|
|
42
|
+
};
|
|
43
|
+
__decorate([
|
|
44
|
+
(0, mongoose_1.Prop)({ required: true }),
|
|
45
|
+
__metadata("design:type", String)
|
|
46
|
+
], Proposal.prototype, "businessUnit", void 0);
|
|
47
|
+
__decorate([
|
|
48
|
+
(0, mongoose_1.Prop)({ required: true }),
|
|
49
|
+
__metadata("design:type", String)
|
|
50
|
+
], Proposal.prototype, "contact", void 0);
|
|
51
|
+
__decorate([
|
|
52
|
+
(0, mongoose_1.Prop)({ required: true }),
|
|
53
|
+
__metadata("design:type", String)
|
|
54
|
+
], Proposal.prototype, "initialScope", void 0);
|
|
55
|
+
__decorate([
|
|
56
|
+
(0, mongoose_1.Prop)({
|
|
57
|
+
required: true,
|
|
58
|
+
type: {
|
|
59
|
+
team: String,
|
|
60
|
+
name: String,
|
|
61
|
+
email: String,
|
|
62
|
+
},
|
|
63
|
+
}),
|
|
64
|
+
__metadata("design:type", Object)
|
|
65
|
+
], Proposal.prototype, "responsable", void 0);
|
|
66
|
+
Proposal = __decorate([
|
|
67
|
+
(0, mongoose_1.Schema)({ _id: false })
|
|
68
|
+
], Proposal);
|
|
69
|
+
exports.Proposal = Proposal;
|
|
70
|
+
let Negotiation = class Negotiation {
|
|
71
|
+
};
|
|
72
|
+
__decorate([
|
|
73
|
+
(0, mongoose_1.Prop)({ required: true }),
|
|
74
|
+
__metadata("design:type", String)
|
|
75
|
+
], Negotiation.prototype, "calculatorType", void 0);
|
|
76
|
+
__decorate([
|
|
77
|
+
(0, mongoose_1.Prop)({ required: true }),
|
|
78
|
+
__metadata("design:type", Boolean)
|
|
79
|
+
], Negotiation.prototype, "childPermit", void 0);
|
|
80
|
+
__decorate([
|
|
81
|
+
(0, mongoose_1.Prop)(),
|
|
82
|
+
__metadata("design:type", Number)
|
|
83
|
+
], Negotiation.prototype, "childPermitValue", void 0);
|
|
84
|
+
__decorate([
|
|
85
|
+
(0, mongoose_1.Prop)(),
|
|
86
|
+
__metadata("design:type", String)
|
|
87
|
+
], Negotiation.prototype, "childPermitMethod", void 0);
|
|
88
|
+
__decorate([
|
|
89
|
+
(0, mongoose_1.Prop)({ required: true }),
|
|
90
|
+
__metadata("design:type", Number)
|
|
91
|
+
], Negotiation.prototype, "influencerBroadcastValue", void 0);
|
|
92
|
+
__decorate([
|
|
93
|
+
(0, mongoose_1.Prop)({ required: true }),
|
|
94
|
+
__metadata("design:type", String)
|
|
95
|
+
], Negotiation.prototype, "influencerBroadcastMethod", void 0);
|
|
96
|
+
__decorate([
|
|
97
|
+
(0, mongoose_1.Prop)({ required: true }),
|
|
98
|
+
__metadata("design:type", Number)
|
|
99
|
+
], Negotiation.prototype, "productionAndOthersValue", void 0);
|
|
100
|
+
__decorate([
|
|
101
|
+
(0, mongoose_1.Prop)({ required: true }),
|
|
102
|
+
__metadata("design:type", String)
|
|
103
|
+
], Negotiation.prototype, "productionAndOthersMethod", void 0);
|
|
104
|
+
__decorate([
|
|
105
|
+
(0, mongoose_1.Prop)({ required: true }),
|
|
106
|
+
__metadata("design:type", Number)
|
|
107
|
+
], Negotiation.prototype, "commissionRate", void 0);
|
|
108
|
+
__decorate([
|
|
109
|
+
(0, mongoose_1.Prop)({ required: true }),
|
|
110
|
+
__metadata("design:type", Number)
|
|
111
|
+
], Negotiation.prototype, "broadcastBonusRate", void 0);
|
|
112
|
+
__decorate([
|
|
113
|
+
(0, mongoose_1.Prop)({ required: true }),
|
|
114
|
+
__metadata("design:type", Number)
|
|
115
|
+
], Negotiation.prototype, "taxRate", void 0);
|
|
116
|
+
__decorate([
|
|
117
|
+
(0, mongoose_1.Prop)({ required: true }),
|
|
118
|
+
__metadata("design:type", Number)
|
|
119
|
+
], Negotiation.prototype, "budget", void 0);
|
|
120
|
+
__decorate([
|
|
121
|
+
(0, mongoose_1.Prop)({ required: true }),
|
|
122
|
+
__metadata("design:type", Number)
|
|
123
|
+
], Negotiation.prototype, "activationValue", void 0);
|
|
124
|
+
__decorate([
|
|
125
|
+
(0, mongoose_1.Prop)({ required: true }),
|
|
126
|
+
__metadata("design:type", Number)
|
|
127
|
+
], Negotiation.prototype, "revenue", void 0);
|
|
128
|
+
__decorate([
|
|
129
|
+
(0, mongoose_1.Prop)({ required: true }),
|
|
130
|
+
__metadata("design:type", Number)
|
|
131
|
+
], Negotiation.prototype, "transferValue", void 0);
|
|
132
|
+
__decorate([
|
|
133
|
+
(0, mongoose_1.Prop)({ required: true }),
|
|
134
|
+
__metadata("design:type", Number)
|
|
135
|
+
], Negotiation.prototype, "taxValue", void 0);
|
|
136
|
+
__decorate([
|
|
137
|
+
(0, mongoose_1.Prop)({ required: true }),
|
|
138
|
+
__metadata("design:type", Number)
|
|
139
|
+
], Negotiation.prototype, "broadcastBonusValue", void 0);
|
|
140
|
+
__decorate([
|
|
141
|
+
(0, mongoose_1.Prop)({ required: true }),
|
|
142
|
+
__metadata("design:type", Number)
|
|
143
|
+
], Negotiation.prototype, "debitNoteValue", void 0);
|
|
144
|
+
__decorate([
|
|
145
|
+
(0, mongoose_1.Prop)({ required: true }),
|
|
146
|
+
__metadata("design:type", Number)
|
|
147
|
+
], Negotiation.prototype, "freeValue", void 0);
|
|
148
|
+
__decorate([
|
|
149
|
+
(0, mongoose_1.Prop)({ required: true }),
|
|
150
|
+
__metadata("design:type", Number)
|
|
151
|
+
], Negotiation.prototype, "grossProfitRate", void 0);
|
|
152
|
+
__decorate([
|
|
153
|
+
(0, mongoose_1.Prop)({ required: true }),
|
|
154
|
+
__metadata("design:type", Number)
|
|
155
|
+
], Negotiation.prototype, "takeRate", void 0);
|
|
156
|
+
__decorate([
|
|
157
|
+
(0, mongoose_1.Prop)({ required: true }),
|
|
158
|
+
__metadata("design:type", Number)
|
|
159
|
+
], Negotiation.prototype, "grossIncomeValue", void 0);
|
|
160
|
+
Negotiation = __decorate([
|
|
161
|
+
(0, mongoose_1.Schema)({ _id: false })
|
|
162
|
+
], Negotiation);
|
|
163
|
+
exports.Negotiation = Negotiation;
|
|
164
|
+
let FormalizationInstallment = class FormalizationInstallment {
|
|
165
|
+
};
|
|
166
|
+
__decorate([
|
|
167
|
+
(0, mongoose_1.Prop)({ required: true }),
|
|
168
|
+
__metadata("design:type", Number)
|
|
169
|
+
], FormalizationInstallment.prototype, "number", void 0);
|
|
170
|
+
__decorate([
|
|
171
|
+
(0, mongoose_1.Prop)({ required: true }),
|
|
172
|
+
__metadata("design:type", Number)
|
|
173
|
+
], FormalizationInstallment.prototype, "value", void 0);
|
|
174
|
+
__decorate([
|
|
175
|
+
(0, mongoose_1.Prop)({ required: true }),
|
|
176
|
+
__metadata("design:type", String)
|
|
177
|
+
], FormalizationInstallment.prototype, "estimatedInvoiceIssueDate", void 0);
|
|
178
|
+
__decorate([
|
|
179
|
+
(0, mongoose_1.Prop)({ required: true }),
|
|
180
|
+
__metadata("design:type", String)
|
|
181
|
+
], FormalizationInstallment.prototype, "estimatedInvoiceDueDate", void 0);
|
|
182
|
+
FormalizationInstallment = __decorate([
|
|
183
|
+
(0, mongoose_1.Schema)({ _id: false })
|
|
184
|
+
], FormalizationInstallment);
|
|
185
|
+
exports.FormalizationInstallment = FormalizationInstallment;
|
|
186
|
+
let Formalization = class Formalization {
|
|
187
|
+
};
|
|
188
|
+
__decorate([
|
|
189
|
+
(0, mongoose_1.Prop)({ required: true }),
|
|
190
|
+
__metadata("design:type", String)
|
|
191
|
+
], Formalization.prototype, "billingTriggerEvent", void 0);
|
|
192
|
+
__decorate([
|
|
193
|
+
(0, mongoose_1.Prop)({ required: true }),
|
|
194
|
+
__metadata("design:type", String)
|
|
195
|
+
], Formalization.prototype, "estimatedInvoiceIssueDate", void 0);
|
|
196
|
+
__decorate([
|
|
197
|
+
(0, mongoose_1.Prop)({ required: true }),
|
|
198
|
+
__metadata("design:type", String)
|
|
199
|
+
], Formalization.prototype, "estimatedInvoiceDueDate", void 0);
|
|
200
|
+
__decorate([
|
|
201
|
+
(0, mongoose_1.Prop)({ required: true }),
|
|
202
|
+
__metadata("design:type", String)
|
|
203
|
+
], Formalization.prototype, "paymentTerms", void 0);
|
|
204
|
+
__decorate([
|
|
205
|
+
(0, mongoose_1.Prop)({ required: true }),
|
|
206
|
+
__metadata("design:type", String)
|
|
207
|
+
], Formalization.prototype, "handlingInvoices", void 0);
|
|
208
|
+
__decorate([
|
|
209
|
+
(0, mongoose_1.Prop)({ required: true }),
|
|
210
|
+
__metadata("design:type", String)
|
|
211
|
+
], Formalization.prototype, "finalScope", void 0);
|
|
212
|
+
__decorate([
|
|
213
|
+
(0, mongoose_1.Prop)({ type: mongoose_2.Schema.Types.ObjectId, ref: 'Client' }),
|
|
214
|
+
__metadata("design:type", Object)
|
|
215
|
+
], Formalization.prototype, "client", void 0);
|
|
216
|
+
__decorate([
|
|
217
|
+
(0, mongoose_1.Prop)({ type: mongoose_2.Schema.Types.ObjectId, ref: 'Client' }),
|
|
218
|
+
__metadata("design:type", Object)
|
|
219
|
+
], Formalization.prototype, "brand", void 0);
|
|
220
|
+
__decorate([
|
|
221
|
+
(0, mongoose_1.Prop)({ type: [FormalizationInstallment], required: true }),
|
|
222
|
+
__metadata("design:type", Array)
|
|
223
|
+
], Formalization.prototype, "installment", void 0);
|
|
224
|
+
Formalization = __decorate([
|
|
225
|
+
(0, mongoose_1.Schema)({ _id: false })
|
|
226
|
+
], Formalization);
|
|
227
|
+
exports.Formalization = Formalization;
|
|
228
|
+
let Lost = class Lost {
|
|
229
|
+
};
|
|
230
|
+
__decorate([
|
|
231
|
+
(0, mongoose_1.Prop)({ required: true }),
|
|
232
|
+
__metadata("design:type", String)
|
|
233
|
+
], Lost.prototype, "reason", void 0);
|
|
234
|
+
__decorate([
|
|
235
|
+
(0, mongoose_1.Prop)(),
|
|
236
|
+
__metadata("design:type", String)
|
|
237
|
+
], Lost.prototype, "details", void 0);
|
|
238
|
+
Lost = __decorate([
|
|
239
|
+
(0, mongoose_1.Schema)({ _id: false })
|
|
240
|
+
], Lost);
|
|
241
|
+
exports.Lost = Lost;
|
|
242
|
+
let Sale = class Sale {
|
|
243
|
+
};
|
|
244
|
+
__decorate([
|
|
245
|
+
(0, mongoose_1.Prop)({ type: mongoose_2.Schema.Types.ObjectId, auto: true, required: false }),
|
|
246
|
+
__metadata("design:type", mongoose_2.Types.ObjectId)
|
|
247
|
+
], Sale.prototype, "_id", void 0);
|
|
248
|
+
__decorate([
|
|
249
|
+
(0, mongoose_1.Prop)({ required: true }),
|
|
250
|
+
__metadata("design:type", String)
|
|
251
|
+
], Sale.prototype, "title", void 0);
|
|
252
|
+
__decorate([
|
|
253
|
+
(0, mongoose_1.Prop)({ required: true }),
|
|
254
|
+
__metadata("design:type", String)
|
|
255
|
+
], Sale.prototype, "phase", void 0);
|
|
256
|
+
__decorate([
|
|
257
|
+
(0, mongoose_1.Prop)({ type: Screening }),
|
|
258
|
+
__metadata("design:type", Screening)
|
|
259
|
+
], Sale.prototype, "screening", void 0);
|
|
260
|
+
__decorate([
|
|
261
|
+
(0, mongoose_1.Prop)({ type: Proposal }),
|
|
262
|
+
__metadata("design:type", Proposal)
|
|
263
|
+
], Sale.prototype, "proposal", void 0);
|
|
264
|
+
__decorate([
|
|
265
|
+
(0, mongoose_1.Prop)({ type: Negotiation }),
|
|
266
|
+
__metadata("design:type", Negotiation)
|
|
267
|
+
], Sale.prototype, "negotiation", void 0);
|
|
268
|
+
__decorate([
|
|
269
|
+
(0, mongoose_1.Prop)({ type: Formalization }),
|
|
270
|
+
__metadata("design:type", Formalization)
|
|
271
|
+
], Sale.prototype, "formalization", void 0);
|
|
272
|
+
__decorate([
|
|
273
|
+
(0, mongoose_1.Prop)({ type: Lost }),
|
|
274
|
+
__metadata("design:type", Lost)
|
|
275
|
+
], Sale.prototype, "lost", void 0);
|
|
276
|
+
__decorate([
|
|
277
|
+
(0, mongoose_1.Prop)({ type: mongoose_2.Schema.Types.ObjectId, ref: 'Profile', required: false }),
|
|
278
|
+
__metadata("design:type", Object)
|
|
279
|
+
], Sale.prototype, "profile", void 0);
|
|
280
|
+
__decorate([
|
|
281
|
+
(0, mongoose_1.Prop)({ default: Date.now, required: false }),
|
|
282
|
+
__metadata("design:type", Date)
|
|
283
|
+
], Sale.prototype, "createdAt", void 0);
|
|
284
|
+
__decorate([
|
|
285
|
+
(0, mongoose_1.Prop)({ default: Date.now, required: false }),
|
|
286
|
+
__metadata("design:type", Date)
|
|
287
|
+
], Sale.prototype, "updatedAt", void 0);
|
|
288
|
+
Sale = __decorate([
|
|
289
|
+
(0, mongoose_1.Schema)({ timestamps: true })
|
|
290
|
+
], Sale);
|
|
291
|
+
exports.Sale = Sale;
|
|
292
|
+
exports.SaleSchema = mongoose_1.SchemaFactory.createForClass(Sale);
|
package/package.json
CHANGED
package/src/index.ts
CHANGED
|
@@ -73,8 +73,8 @@ export class Content {
|
|
|
73
73
|
@Prop({ type: MongooseSchema.Types.ObjectId, auto: true, required: false })
|
|
74
74
|
_id?: Types.ObjectId;
|
|
75
75
|
|
|
76
|
-
@Prop({ types: String, required:
|
|
77
|
-
caption
|
|
76
|
+
@Prop({ types: String, required: false, default: ''})
|
|
77
|
+
caption?: string;
|
|
78
78
|
|
|
79
79
|
@Prop({ types: String, required: true })
|
|
80
80
|
link: string;
|
|
@@ -0,0 +1,122 @@
|
|
|
1
|
+
import { Prop, Schema, SchemaFactory } from '@nestjs/mongoose';
|
|
2
|
+
import { HydratedDocument, Schema as MongooseSchema, Types } from 'mongoose';
|
|
3
|
+
import { Profile } from './profile.schema';
|
|
4
|
+
import { Client } from './client.schema';
|
|
5
|
+
|
|
6
|
+
export type SaleDocument = HydratedDocument<Sale>;
|
|
7
|
+
|
|
8
|
+
@Schema({ _id: false })
|
|
9
|
+
export class Screening {
|
|
10
|
+
@Prop({ required: true }) emailTitle: string;
|
|
11
|
+
@Prop({ required: true }) senderName: string;
|
|
12
|
+
@Prop({ required: true }) senderEmail: string;
|
|
13
|
+
@Prop({ required: true }) receiverEmail: string;
|
|
14
|
+
@Prop({ required: true }) emailBody: string;
|
|
15
|
+
}
|
|
16
|
+
|
|
17
|
+
@Schema({ _id: false })
|
|
18
|
+
export class Proposal {
|
|
19
|
+
@Prop({ required: true }) businessUnit: 'enterprise' | 'artistic';
|
|
20
|
+
@Prop({ required: true }) contact: string;
|
|
21
|
+
@Prop({ required: true }) initialScope: string;
|
|
22
|
+
@Prop({
|
|
23
|
+
required: true,
|
|
24
|
+
type: {
|
|
25
|
+
team: String,
|
|
26
|
+
name: String,
|
|
27
|
+
email: String,
|
|
28
|
+
},
|
|
29
|
+
})
|
|
30
|
+
responsable: {
|
|
31
|
+
team: string;
|
|
32
|
+
name: string;
|
|
33
|
+
email: string;
|
|
34
|
+
};
|
|
35
|
+
}
|
|
36
|
+
|
|
37
|
+
@Schema({ _id: false })
|
|
38
|
+
export class Negotiation {
|
|
39
|
+
@Prop({ required: true }) calculatorType: 'withPreDefinedBudget' | 'withoutPreDefinedBudget';
|
|
40
|
+
@Prop({ required: true }) childPermit: boolean;
|
|
41
|
+
@Prop() childPermitValue?: number;
|
|
42
|
+
@Prop() childPermitMethod?: 'direct' | 'debit_note' | 'client';
|
|
43
|
+
@Prop({ required: true }) influencerBroadcastValue: number;
|
|
44
|
+
@Prop({ required: true }) influencerBroadcastMethod: 'transfer' | 'direct' | 'debit_note' | 'client';
|
|
45
|
+
@Prop({ required: true }) productionAndOthersValue: number;
|
|
46
|
+
@Prop({ required: true }) productionAndOthersMethod: 'direct' | 'debit_note' | 'client';
|
|
47
|
+
@Prop({ required: true }) commissionRate: number;
|
|
48
|
+
@Prop({ required: true }) broadcastBonusRate: number;
|
|
49
|
+
@Prop({ required: true }) taxRate: number;
|
|
50
|
+
@Prop({ required: true }) budget: number;
|
|
51
|
+
@Prop({ required: true }) activationValue: number;
|
|
52
|
+
@Prop({ required: true }) revenue: number;
|
|
53
|
+
@Prop({ required: true }) transferValue: number;
|
|
54
|
+
@Prop({ required: true }) taxValue: number;
|
|
55
|
+
@Prop({ required: true }) broadcastBonusValue: number;
|
|
56
|
+
@Prop({ required: true }) debitNoteValue: number;
|
|
57
|
+
@Prop({ required: true }) freeValue: number;
|
|
58
|
+
@Prop({ required: true }) grossProfitRate: number;
|
|
59
|
+
@Prop({ required: true }) takeRate: number;
|
|
60
|
+
@Prop({ required: true }) grossIncomeValue: number;
|
|
61
|
+
}
|
|
62
|
+
|
|
63
|
+
@Schema({ _id: false })
|
|
64
|
+
export class FormalizationInstallment {
|
|
65
|
+
@Prop({ required: true }) number: number;
|
|
66
|
+
@Prop({ required: true }) value: number;
|
|
67
|
+
@Prop({ required: true }) estimatedInvoiceIssueDate: string;
|
|
68
|
+
@Prop({ required: true }) estimatedInvoiceDueDate: string;
|
|
69
|
+
}
|
|
70
|
+
|
|
71
|
+
@Schema({ _id: false })
|
|
72
|
+
export class Formalization {
|
|
73
|
+
@Prop({ required: true }) billingTriggerEvent: string;
|
|
74
|
+
@Prop({ required: true }) estimatedInvoiceIssueDate: string;
|
|
75
|
+
@Prop({ required: true }) estimatedInvoiceDueDate: string;
|
|
76
|
+
@Prop({ required: true }) paymentTerms: string;
|
|
77
|
+
@Prop({ required: true }) handlingInvoices: string;
|
|
78
|
+
@Prop({ required: true }) finalScope: string;
|
|
79
|
+
|
|
80
|
+
@Prop({ type: MongooseSchema.Types.ObjectId, ref: 'Client' })
|
|
81
|
+
client: Types.ObjectId | Client;
|
|
82
|
+
|
|
83
|
+
@Prop({ type: MongooseSchema.Types.ObjectId, ref: 'Client' })
|
|
84
|
+
brand: Types.ObjectId | Client;
|
|
85
|
+
|
|
86
|
+
@Prop({ type: [FormalizationInstallment], required: true })
|
|
87
|
+
installment: FormalizationInstallment[];
|
|
88
|
+
}
|
|
89
|
+
|
|
90
|
+
@Schema({ _id: false })
|
|
91
|
+
export class Lost {
|
|
92
|
+
@Prop({ required: true }) reason: 'declined' | 'other';
|
|
93
|
+
@Prop() details?: string;
|
|
94
|
+
}
|
|
95
|
+
|
|
96
|
+
@Schema({ timestamps: true })
|
|
97
|
+
export class Sale {
|
|
98
|
+
@Prop({ type: MongooseSchema.Types.ObjectId, auto: true, required: false })
|
|
99
|
+
_id?: Types.ObjectId;
|
|
100
|
+
|
|
101
|
+
@Prop({ required: true }) title: string;
|
|
102
|
+
|
|
103
|
+
@Prop({ required: true })
|
|
104
|
+
phase: 'screening' | 'proposal' | 'negotiation' | 'formalization' | 'closed' | 'lost';
|
|
105
|
+
|
|
106
|
+
@Prop({ type: Screening }) screening?: Screening;
|
|
107
|
+
@Prop({ type: Proposal }) proposal?: Proposal;
|
|
108
|
+
@Prop({ type: Negotiation }) negotiation?: Negotiation;
|
|
109
|
+
@Prop({ type: Formalization }) formalization?: Formalization;
|
|
110
|
+
@Prop({ type: Lost }) lost?: Lost;
|
|
111
|
+
|
|
112
|
+
@Prop({ type: MongooseSchema.Types.ObjectId, ref: 'Profile', required: false })
|
|
113
|
+
profile?: Types.ObjectId | Profile;
|
|
114
|
+
|
|
115
|
+
@Prop({ default: Date.now, required: false })
|
|
116
|
+
createdAt?: Date;
|
|
117
|
+
|
|
118
|
+
@Prop({ default: Date.now, required: false })
|
|
119
|
+
updatedAt?: Date;
|
|
120
|
+
}
|
|
121
|
+
|
|
122
|
+
export const SaleSchema = SchemaFactory.createForClass(Sale);
|
|
@@ -1,228 +0,0 @@
|
|
|
1
|
-
/// <reference types="mongoose/types/aggregate" />
|
|
2
|
-
/// <reference types="mongoose/types/callback" />
|
|
3
|
-
/// <reference types="mongoose/types/collection" />
|
|
4
|
-
/// <reference types="mongoose/types/connection" />
|
|
5
|
-
/// <reference types="mongoose/types/cursor" />
|
|
6
|
-
/// <reference types="mongoose/types/document" />
|
|
7
|
-
/// <reference types="mongoose/types/error" />
|
|
8
|
-
/// <reference types="mongoose/types/expressions" />
|
|
9
|
-
/// <reference types="mongoose/types/helpers" />
|
|
10
|
-
/// <reference types="mongoose/types/middlewares" />
|
|
11
|
-
/// <reference types="mongoose/types/indexes" />
|
|
12
|
-
/// <reference types="mongoose/types/models" />
|
|
13
|
-
/// <reference types="mongoose/types/mongooseoptions" />
|
|
14
|
-
/// <reference types="mongoose/types/pipelinestage" />
|
|
15
|
-
/// <reference types="mongoose/types/populate" />
|
|
16
|
-
/// <reference types="mongoose/types/query" />
|
|
17
|
-
/// <reference types="mongoose/types/schemaoptions" />
|
|
18
|
-
/// <reference types="mongoose/types/schematypes" />
|
|
19
|
-
/// <reference types="mongoose/types/session" />
|
|
20
|
-
/// <reference types="mongoose/types/types" />
|
|
21
|
-
/// <reference types="mongoose/types/utility" />
|
|
22
|
-
/// <reference types="mongoose/types/validation" />
|
|
23
|
-
/// <reference types="mongoose/types/virtuals" />
|
|
24
|
-
/// <reference types="mongoose/types/inferschematype" />
|
|
25
|
-
/// <reference types="mongoose/types/inferrawdoctype" />
|
|
26
|
-
import { HydratedDocument, Schema as MongooseSchema, Types } from 'mongoose';
|
|
27
|
-
import { Recruitment } from './recruitment.schema';
|
|
28
|
-
import { Content } from './content.schema';
|
|
29
|
-
import { Client } from './client.schema';
|
|
30
|
-
export type ActionDocument = HydratedDocument<Action>;
|
|
31
|
-
export declare class Installment {
|
|
32
|
-
number: number;
|
|
33
|
-
dueDate: Date;
|
|
34
|
-
value: number;
|
|
35
|
-
}
|
|
36
|
-
export declare class ComercialCard {
|
|
37
|
-
id: string;
|
|
38
|
-
title: string;
|
|
39
|
-
status: string;
|
|
40
|
-
passThrough: 'yes_client' | 'no_grapa' | 'no_client';
|
|
41
|
-
childPermit: boolean;
|
|
42
|
-
internalCost: number;
|
|
43
|
-
influencerValue: number;
|
|
44
|
-
totalValue: number;
|
|
45
|
-
expectedInvoiceIssueDate: Date | null;
|
|
46
|
-
expectedInvoiceDueDate: Date | null;
|
|
47
|
-
revisedInvoiceIssueDate: Date | null;
|
|
48
|
-
revisedInvoiceDueDate: Date | null;
|
|
49
|
-
invoiceIssueDate: Date | null;
|
|
50
|
-
invoiceDueDate: Date | null;
|
|
51
|
-
invoicePaymentDate: Date | null;
|
|
52
|
-
dueDate: Date | null;
|
|
53
|
-
installments: Installment[];
|
|
54
|
-
}
|
|
55
|
-
export declare const ComercialCardSchema: MongooseSchema<
|
|
56
|
-
ComercialCard,
|
|
57
|
-
import('mongoose').Model<
|
|
58
|
-
ComercialCard,
|
|
59
|
-
any,
|
|
60
|
-
any,
|
|
61
|
-
any,
|
|
62
|
-
import('mongoose').Document<unknown, any, ComercialCard> &
|
|
63
|
-
ComercialCard & {
|
|
64
|
-
_id: Types.ObjectId;
|
|
65
|
-
} & {
|
|
66
|
-
__v: number;
|
|
67
|
-
},
|
|
68
|
-
any
|
|
69
|
-
>,
|
|
70
|
-
{},
|
|
71
|
-
{},
|
|
72
|
-
{},
|
|
73
|
-
{},
|
|
74
|
-
import('mongoose').DefaultSchemaOptions,
|
|
75
|
-
ComercialCard,
|
|
76
|
-
import('mongoose').Document<
|
|
77
|
-
unknown,
|
|
78
|
-
{},
|
|
79
|
-
import('mongoose').FlatRecord<ComercialCard>
|
|
80
|
-
> &
|
|
81
|
-
import('mongoose').FlatRecord<ComercialCard> & {
|
|
82
|
-
_id: Types.ObjectId;
|
|
83
|
-
} & {
|
|
84
|
-
__v: number;
|
|
85
|
-
}
|
|
86
|
-
>;
|
|
87
|
-
export declare class Responsible {
|
|
88
|
-
name: string;
|
|
89
|
-
team: string;
|
|
90
|
-
email: string;
|
|
91
|
-
}
|
|
92
|
-
export declare const ResponsibleSchema: MongooseSchema<
|
|
93
|
-
Responsible,
|
|
94
|
-
import('mongoose').Model<
|
|
95
|
-
Responsible,
|
|
96
|
-
any,
|
|
97
|
-
any,
|
|
98
|
-
any,
|
|
99
|
-
import('mongoose').Document<unknown, any, Responsible> &
|
|
100
|
-
Responsible & {
|
|
101
|
-
_id: Types.ObjectId;
|
|
102
|
-
} & {
|
|
103
|
-
__v: number;
|
|
104
|
-
},
|
|
105
|
-
any
|
|
106
|
-
>,
|
|
107
|
-
{},
|
|
108
|
-
{},
|
|
109
|
-
{},
|
|
110
|
-
{},
|
|
111
|
-
import('mongoose').DefaultSchemaOptions,
|
|
112
|
-
Responsible,
|
|
113
|
-
import('mongoose').Document<
|
|
114
|
-
unknown,
|
|
115
|
-
{},
|
|
116
|
-
import('mongoose').FlatRecord<Responsible>
|
|
117
|
-
> &
|
|
118
|
-
import('mongoose').FlatRecord<Responsible> & {
|
|
119
|
-
_id: Types.ObjectId;
|
|
120
|
-
} & {
|
|
121
|
-
__v: number;
|
|
122
|
-
}
|
|
123
|
-
>;
|
|
124
|
-
export declare class Responsibles {
|
|
125
|
-
service: Responsible;
|
|
126
|
-
comercial?: Responsible;
|
|
127
|
-
}
|
|
128
|
-
export declare const ResponsiblesSchema: MongooseSchema<
|
|
129
|
-
Responsibles,
|
|
130
|
-
import('mongoose').Model<
|
|
131
|
-
Responsibles,
|
|
132
|
-
any,
|
|
133
|
-
any,
|
|
134
|
-
any,
|
|
135
|
-
import('mongoose').Document<unknown, any, Responsibles> &
|
|
136
|
-
Responsibles & {
|
|
137
|
-
_id: Types.ObjectId;
|
|
138
|
-
} & {
|
|
139
|
-
__v: number;
|
|
140
|
-
},
|
|
141
|
-
any
|
|
142
|
-
>,
|
|
143
|
-
{},
|
|
144
|
-
{},
|
|
145
|
-
{},
|
|
146
|
-
{},
|
|
147
|
-
import('mongoose').DefaultSchemaOptions,
|
|
148
|
-
Responsibles,
|
|
149
|
-
import('mongoose').Document<
|
|
150
|
-
unknown,
|
|
151
|
-
{},
|
|
152
|
-
import('mongoose').FlatRecord<Responsibles>
|
|
153
|
-
> &
|
|
154
|
-
import('mongoose').FlatRecord<Responsibles> & {
|
|
155
|
-
_id: Types.ObjectId;
|
|
156
|
-
} & {
|
|
157
|
-
__v: number;
|
|
158
|
-
}
|
|
159
|
-
>;
|
|
160
|
-
export declare class Action {
|
|
161
|
-
_id?: Types.ObjectId;
|
|
162
|
-
title: string;
|
|
163
|
-
thumbnail?: string;
|
|
164
|
-
startDate: Date;
|
|
165
|
-
endDate: Date;
|
|
166
|
-
nps?: number;
|
|
167
|
-
status:
|
|
168
|
-
| 'config'
|
|
169
|
-
| 'inProgress'
|
|
170
|
-
| 'finished'
|
|
171
|
-
| 'paused'
|
|
172
|
-
| 'finished'
|
|
173
|
-
| 'archived';
|
|
174
|
-
type: 'partner' | 'exclusive';
|
|
175
|
-
socialnetworks?: string[];
|
|
176
|
-
recruitedInfluencers?: number;
|
|
177
|
-
hiredInfluencers?: number;
|
|
178
|
-
producedContent?: number;
|
|
179
|
-
hiredContent?: number;
|
|
180
|
-
client: Types.ObjectId | Client;
|
|
181
|
-
recruitments?: Types.ObjectId[] | Recruitment[];
|
|
182
|
-
contents?: Types.ObjectId[] | Content[];
|
|
183
|
-
cluster: string;
|
|
184
|
-
shopping?: string;
|
|
185
|
-
project?: string;
|
|
186
|
-
comercialCard?: ComercialCard;
|
|
187
|
-
responsibles: Responsibles;
|
|
188
|
-
brandUsername?: string;
|
|
189
|
-
hashtag?: string;
|
|
190
|
-
BILink?: string;
|
|
191
|
-
BISheets?: string;
|
|
192
|
-
createdAt?: Date;
|
|
193
|
-
updatedAt?: Date;
|
|
194
|
-
}
|
|
195
|
-
export declare const ActionSchema: MongooseSchema<
|
|
196
|
-
Action,
|
|
197
|
-
import('mongoose').Model<
|
|
198
|
-
Action,
|
|
199
|
-
any,
|
|
200
|
-
any,
|
|
201
|
-
any,
|
|
202
|
-
import('mongoose').Document<unknown, any, Action> &
|
|
203
|
-
Action &
|
|
204
|
-
Required<{
|
|
205
|
-
_id: Types.ObjectId;
|
|
206
|
-
}> & {
|
|
207
|
-
__v: number;
|
|
208
|
-
},
|
|
209
|
-
any
|
|
210
|
-
>,
|
|
211
|
-
{},
|
|
212
|
-
{},
|
|
213
|
-
{},
|
|
214
|
-
{},
|
|
215
|
-
import('mongoose').DefaultSchemaOptions,
|
|
216
|
-
Action,
|
|
217
|
-
import('mongoose').Document<
|
|
218
|
-
unknown,
|
|
219
|
-
{},
|
|
220
|
-
import('mongoose').FlatRecord<Action>
|
|
221
|
-
> &
|
|
222
|
-
import('mongoose').FlatRecord<Action> &
|
|
223
|
-
Required<{
|
|
224
|
-
_id: Types.ObjectId;
|
|
225
|
-
}> & {
|
|
226
|
-
__v: number;
|
|
227
|
-
}
|
|
228
|
-
>;
|
|
@@ -1,493 +0,0 @@
|
|
|
1
|
-
'use strict';
|
|
2
|
-
var __decorate =
|
|
3
|
-
(this && this.__decorate) ||
|
|
4
|
-
function (decorators, target, key, desc) {
|
|
5
|
-
var c = arguments.length,
|
|
6
|
-
r =
|
|
7
|
-
c < 3
|
|
8
|
-
? target
|
|
9
|
-
: desc === null
|
|
10
|
-
? (desc = Object.getOwnPropertyDescriptor(target, key))
|
|
11
|
-
: desc,
|
|
12
|
-
d;
|
|
13
|
-
if (typeof Reflect === 'object' && typeof Reflect.decorate === 'function')
|
|
14
|
-
r = Reflect.decorate(decorators, target, key, desc);
|
|
15
|
-
else
|
|
16
|
-
for (var i = decorators.length - 1; i >= 0; i--)
|
|
17
|
-
if ((d = decorators[i]))
|
|
18
|
-
r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
|
|
19
|
-
return c > 3 && r && Object.defineProperty(target, key, r), r;
|
|
20
|
-
};
|
|
21
|
-
var __metadata =
|
|
22
|
-
(this && this.__metadata) ||
|
|
23
|
-
function (k, v) {
|
|
24
|
-
if (typeof Reflect === 'object' && typeof Reflect.metadata === 'function')
|
|
25
|
-
return Reflect.metadata(k, v);
|
|
26
|
-
};
|
|
27
|
-
Object.defineProperty(exports, '__esModule', { value: true });
|
|
28
|
-
exports.ActionSchema =
|
|
29
|
-
exports.Action =
|
|
30
|
-
exports.ResponsiblesSchema =
|
|
31
|
-
exports.Responsibles =
|
|
32
|
-
exports.ResponsibleSchema =
|
|
33
|
-
exports.Responsible =
|
|
34
|
-
exports.ComercialCardSchema =
|
|
35
|
-
exports.ComercialCard =
|
|
36
|
-
exports.Installment =
|
|
37
|
-
void 0;
|
|
38
|
-
const mongoose_1 = require('@nestjs/mongoose');
|
|
39
|
-
const mongoose_2 = require('mongoose');
|
|
40
|
-
let Installment = class Installment {};
|
|
41
|
-
Installment = __decorate([(0, mongoose_1.Schema)({ _id: false })], Installment);
|
|
42
|
-
exports.Installment = Installment;
|
|
43
|
-
let ComercialCard = class ComercialCard {};
|
|
44
|
-
__decorate(
|
|
45
|
-
[(0, mongoose_1.Prop)(), __metadata('design:type', String)],
|
|
46
|
-
ComercialCard.prototype,
|
|
47
|
-
'id',
|
|
48
|
-
void 0,
|
|
49
|
-
);
|
|
50
|
-
__decorate(
|
|
51
|
-
[(0, mongoose_1.Prop)(), __metadata('design:type', String)],
|
|
52
|
-
ComercialCard.prototype,
|
|
53
|
-
'title',
|
|
54
|
-
void 0,
|
|
55
|
-
);
|
|
56
|
-
__decorate(
|
|
57
|
-
[(0, mongoose_1.Prop)(), __metadata('design:type', String)],
|
|
58
|
-
ComercialCard.prototype,
|
|
59
|
-
'status',
|
|
60
|
-
void 0,
|
|
61
|
-
);
|
|
62
|
-
__decorate(
|
|
63
|
-
[
|
|
64
|
-
(0, mongoose_1.Prop)({
|
|
65
|
-
type: String,
|
|
66
|
-
enum: ['yes_client', 'no_grapa', 'no_client'],
|
|
67
|
-
default: null,
|
|
68
|
-
}),
|
|
69
|
-
__metadata('design:type', String),
|
|
70
|
-
],
|
|
71
|
-
ComercialCard.prototype,
|
|
72
|
-
'passThrough',
|
|
73
|
-
void 0,
|
|
74
|
-
);
|
|
75
|
-
__decorate(
|
|
76
|
-
[(0, mongoose_1.Prop)(), __metadata('design:type', Boolean)],
|
|
77
|
-
ComercialCard.prototype,
|
|
78
|
-
'childPermit',
|
|
79
|
-
void 0,
|
|
80
|
-
);
|
|
81
|
-
__decorate(
|
|
82
|
-
[(0, mongoose_1.Prop)(), __metadata('design:type', Number)],
|
|
83
|
-
ComercialCard.prototype,
|
|
84
|
-
'internalCost',
|
|
85
|
-
void 0,
|
|
86
|
-
);
|
|
87
|
-
__decorate(
|
|
88
|
-
[(0, mongoose_1.Prop)(), __metadata('design:type', Number)],
|
|
89
|
-
ComercialCard.prototype,
|
|
90
|
-
'influencerValue',
|
|
91
|
-
void 0,
|
|
92
|
-
);
|
|
93
|
-
__decorate(
|
|
94
|
-
[(0, mongoose_1.Prop)(), __metadata('design:type', Number)],
|
|
95
|
-
ComercialCard.prototype,
|
|
96
|
-
'totalValue',
|
|
97
|
-
void 0,
|
|
98
|
-
);
|
|
99
|
-
__decorate(
|
|
100
|
-
[
|
|
101
|
-
(0, mongoose_1.Prop)({ type: Date, default: null }),
|
|
102
|
-
__metadata('design:type', Object),
|
|
103
|
-
],
|
|
104
|
-
ComercialCard.prototype,
|
|
105
|
-
'expectedInvoiceIssueDate',
|
|
106
|
-
void 0,
|
|
107
|
-
);
|
|
108
|
-
__decorate(
|
|
109
|
-
[
|
|
110
|
-
(0, mongoose_1.Prop)({ type: Date, default: null }),
|
|
111
|
-
__metadata('design:type', Object),
|
|
112
|
-
],
|
|
113
|
-
ComercialCard.prototype,
|
|
114
|
-
'expectedInvoiceDueDate',
|
|
115
|
-
void 0,
|
|
116
|
-
);
|
|
117
|
-
__decorate(
|
|
118
|
-
[
|
|
119
|
-
(0, mongoose_1.Prop)({ type: Date, default: null }),
|
|
120
|
-
__metadata('design:type', Object),
|
|
121
|
-
],
|
|
122
|
-
ComercialCard.prototype,
|
|
123
|
-
'revisedInvoiceIssueDate',
|
|
124
|
-
void 0,
|
|
125
|
-
);
|
|
126
|
-
__decorate(
|
|
127
|
-
[
|
|
128
|
-
(0, mongoose_1.Prop)({ type: Date, default: null }),
|
|
129
|
-
__metadata('design:type', Object),
|
|
130
|
-
],
|
|
131
|
-
ComercialCard.prototype,
|
|
132
|
-
'revisedInvoiceDueDate',
|
|
133
|
-
void 0,
|
|
134
|
-
);
|
|
135
|
-
__decorate(
|
|
136
|
-
[
|
|
137
|
-
(0, mongoose_1.Prop)({ type: Date, default: null }),
|
|
138
|
-
__metadata('design:type', Object),
|
|
139
|
-
],
|
|
140
|
-
ComercialCard.prototype,
|
|
141
|
-
'invoiceIssueDate',
|
|
142
|
-
void 0,
|
|
143
|
-
);
|
|
144
|
-
__decorate(
|
|
145
|
-
[
|
|
146
|
-
(0, mongoose_1.Prop)({ type: Date, default: null }),
|
|
147
|
-
__metadata('design:type', Object),
|
|
148
|
-
],
|
|
149
|
-
ComercialCard.prototype,
|
|
150
|
-
'invoiceDueDate',
|
|
151
|
-
void 0,
|
|
152
|
-
);
|
|
153
|
-
__decorate(
|
|
154
|
-
[
|
|
155
|
-
(0, mongoose_1.Prop)({ type: Date, default: null }),
|
|
156
|
-
__metadata('design:type', Object),
|
|
157
|
-
],
|
|
158
|
-
ComercialCard.prototype,
|
|
159
|
-
'invoicePaymentDate',
|
|
160
|
-
void 0,
|
|
161
|
-
);
|
|
162
|
-
__decorate(
|
|
163
|
-
[
|
|
164
|
-
(0, mongoose_1.Prop)({ type: Date, default: null }),
|
|
165
|
-
__metadata('design:type', Object),
|
|
166
|
-
],
|
|
167
|
-
ComercialCard.prototype,
|
|
168
|
-
'dueDate',
|
|
169
|
-
void 0,
|
|
170
|
-
);
|
|
171
|
-
__decorate(
|
|
172
|
-
[
|
|
173
|
-
(0, mongoose_1.Prop)({ type: [Installment] }),
|
|
174
|
-
__metadata('design:type', Array),
|
|
175
|
-
],
|
|
176
|
-
ComercialCard.prototype,
|
|
177
|
-
'installments',
|
|
178
|
-
void 0,
|
|
179
|
-
);
|
|
180
|
-
ComercialCard = __decorate(
|
|
181
|
-
[(0, mongoose_1.Schema)({ _id: false })],
|
|
182
|
-
ComercialCard,
|
|
183
|
-
);
|
|
184
|
-
exports.ComercialCard = ComercialCard;
|
|
185
|
-
exports.ComercialCardSchema =
|
|
186
|
-
mongoose_1.SchemaFactory.createForClass(ComercialCard);
|
|
187
|
-
let Responsible = class Responsible {};
|
|
188
|
-
__decorate(
|
|
189
|
-
[(0, mongoose_1.Prop)(), __metadata('design:type', String)],
|
|
190
|
-
Responsible.prototype,
|
|
191
|
-
'name',
|
|
192
|
-
void 0,
|
|
193
|
-
);
|
|
194
|
-
__decorate(
|
|
195
|
-
[(0, mongoose_1.Prop)(), __metadata('design:type', String)],
|
|
196
|
-
Responsible.prototype,
|
|
197
|
-
'team',
|
|
198
|
-
void 0,
|
|
199
|
-
);
|
|
200
|
-
__decorate(
|
|
201
|
-
[(0, mongoose_1.Prop)(), __metadata('design:type', String)],
|
|
202
|
-
Responsible.prototype,
|
|
203
|
-
'email',
|
|
204
|
-
void 0,
|
|
205
|
-
);
|
|
206
|
-
Responsible = __decorate([(0, mongoose_1.Schema)({ _id: false })], Responsible);
|
|
207
|
-
exports.Responsible = Responsible;
|
|
208
|
-
exports.ResponsibleSchema =
|
|
209
|
-
mongoose_1.SchemaFactory.createForClass(Responsible);
|
|
210
|
-
let Responsibles = class Responsibles {};
|
|
211
|
-
__decorate(
|
|
212
|
-
[
|
|
213
|
-
(0, mongoose_1.Prop)({ type: exports.ResponsibleSchema }),
|
|
214
|
-
__metadata('design:type', Responsible),
|
|
215
|
-
],
|
|
216
|
-
Responsibles.prototype,
|
|
217
|
-
'service',
|
|
218
|
-
void 0,
|
|
219
|
-
);
|
|
220
|
-
__decorate(
|
|
221
|
-
[
|
|
222
|
-
(0, mongoose_1.Prop)({ type: exports.ResponsibleSchema, required: false }),
|
|
223
|
-
__metadata('design:type', Responsible),
|
|
224
|
-
],
|
|
225
|
-
Responsibles.prototype,
|
|
226
|
-
'comercial',
|
|
227
|
-
void 0,
|
|
228
|
-
);
|
|
229
|
-
Responsibles = __decorate(
|
|
230
|
-
[(0, mongoose_1.Schema)({ _id: false })],
|
|
231
|
-
Responsibles,
|
|
232
|
-
);
|
|
233
|
-
exports.Responsibles = Responsibles;
|
|
234
|
-
exports.ResponsiblesSchema =
|
|
235
|
-
mongoose_1.SchemaFactory.createForClass(Responsibles);
|
|
236
|
-
let Action = class Action {};
|
|
237
|
-
__decorate(
|
|
238
|
-
[
|
|
239
|
-
(0, mongoose_1.Prop)({
|
|
240
|
-
type: mongoose_2.Schema.Types.ObjectId,
|
|
241
|
-
auto: true,
|
|
242
|
-
required: false,
|
|
243
|
-
}),
|
|
244
|
-
__metadata('design:type', mongoose_2.Types.ObjectId),
|
|
245
|
-
],
|
|
246
|
-
Action.prototype,
|
|
247
|
-
'_id',
|
|
248
|
-
void 0,
|
|
249
|
-
);
|
|
250
|
-
__decorate(
|
|
251
|
-
[(0, mongoose_1.Prop)(), __metadata('design:type', String)],
|
|
252
|
-
Action.prototype,
|
|
253
|
-
'title',
|
|
254
|
-
void 0,
|
|
255
|
-
);
|
|
256
|
-
__decorate(
|
|
257
|
-
[
|
|
258
|
-
(0, mongoose_1.Prop)({ required: false }),
|
|
259
|
-
__metadata('design:type', String),
|
|
260
|
-
],
|
|
261
|
-
Action.prototype,
|
|
262
|
-
'thumbnail',
|
|
263
|
-
void 0,
|
|
264
|
-
);
|
|
265
|
-
__decorate(
|
|
266
|
-
[(0, mongoose_1.Prop)(), __metadata('design:type', Date)],
|
|
267
|
-
Action.prototype,
|
|
268
|
-
'startDate',
|
|
269
|
-
void 0,
|
|
270
|
-
);
|
|
271
|
-
__decorate(
|
|
272
|
-
[(0, mongoose_1.Prop)(), __metadata('design:type', Date)],
|
|
273
|
-
Action.prototype,
|
|
274
|
-
'endDate',
|
|
275
|
-
void 0,
|
|
276
|
-
);
|
|
277
|
-
__decorate(
|
|
278
|
-
[
|
|
279
|
-
(0, mongoose_1.Prop)({ required: false }),
|
|
280
|
-
__metadata('design:type', Number),
|
|
281
|
-
],
|
|
282
|
-
Action.prototype,
|
|
283
|
-
'nps',
|
|
284
|
-
void 0,
|
|
285
|
-
);
|
|
286
|
-
__decorate(
|
|
287
|
-
[
|
|
288
|
-
(0, mongoose_1.Prop)({
|
|
289
|
-
type: String,
|
|
290
|
-
enum: ['config', 'inProgress', 'paused', 'finished', 'archived'],
|
|
291
|
-
default: 'config',
|
|
292
|
-
}),
|
|
293
|
-
__metadata('design:type', String),
|
|
294
|
-
],
|
|
295
|
-
Action.prototype,
|
|
296
|
-
'status',
|
|
297
|
-
void 0,
|
|
298
|
-
);
|
|
299
|
-
__decorate(
|
|
300
|
-
[
|
|
301
|
-
(0, mongoose_1.Prop)({ type: String, enum: ['partner', 'exclusive'] }),
|
|
302
|
-
__metadata('design:type', String),
|
|
303
|
-
],
|
|
304
|
-
Action.prototype,
|
|
305
|
-
'type',
|
|
306
|
-
void 0,
|
|
307
|
-
);
|
|
308
|
-
__decorate(
|
|
309
|
-
[(0, mongoose_1.Prop)({ required: false }), __metadata('design:type', Array)],
|
|
310
|
-
Action.prototype,
|
|
311
|
-
'socialnetworks',
|
|
312
|
-
void 0,
|
|
313
|
-
);
|
|
314
|
-
__decorate(
|
|
315
|
-
[
|
|
316
|
-
(0, mongoose_1.Prop)({ default: 0, required: false }),
|
|
317
|
-
__metadata('design:type', Number),
|
|
318
|
-
],
|
|
319
|
-
Action.prototype,
|
|
320
|
-
'recruitedInfluencers',
|
|
321
|
-
void 0,
|
|
322
|
-
);
|
|
323
|
-
__decorate(
|
|
324
|
-
[
|
|
325
|
-
(0, mongoose_1.Prop)({ default: 0, required: false }),
|
|
326
|
-
__metadata('design:type', Number),
|
|
327
|
-
],
|
|
328
|
-
Action.prototype,
|
|
329
|
-
'hiredInfluencers',
|
|
330
|
-
void 0,
|
|
331
|
-
);
|
|
332
|
-
__decorate(
|
|
333
|
-
[
|
|
334
|
-
(0, mongoose_1.Prop)({ default: 0, required: false }),
|
|
335
|
-
__metadata('design:type', Number),
|
|
336
|
-
],
|
|
337
|
-
Action.prototype,
|
|
338
|
-
'producedContent',
|
|
339
|
-
void 0,
|
|
340
|
-
);
|
|
341
|
-
__decorate(
|
|
342
|
-
[
|
|
343
|
-
(0, mongoose_1.Prop)({ default: 0, required: false }),
|
|
344
|
-
__metadata('design:type', Number),
|
|
345
|
-
],
|
|
346
|
-
Action.prototype,
|
|
347
|
-
'hiredContent',
|
|
348
|
-
void 0,
|
|
349
|
-
);
|
|
350
|
-
__decorate(
|
|
351
|
-
[
|
|
352
|
-
(0, mongoose_1.Prop)({
|
|
353
|
-
type: mongoose_2.Schema.Types.ObjectId,
|
|
354
|
-
ref: 'Client',
|
|
355
|
-
}),
|
|
356
|
-
__metadata('design:type', Object),
|
|
357
|
-
],
|
|
358
|
-
Action.prototype,
|
|
359
|
-
'client',
|
|
360
|
-
void 0,
|
|
361
|
-
);
|
|
362
|
-
__decorate(
|
|
363
|
-
[
|
|
364
|
-
(0, mongoose_1.Prop)([
|
|
365
|
-
{
|
|
366
|
-
type: mongoose_2.Schema.Types.ObjectId,
|
|
367
|
-
ref: 'Recruitment',
|
|
368
|
-
required: false,
|
|
369
|
-
},
|
|
370
|
-
]),
|
|
371
|
-
__metadata('design:type', Array),
|
|
372
|
-
],
|
|
373
|
-
Action.prototype,
|
|
374
|
-
'recruitments',
|
|
375
|
-
void 0,
|
|
376
|
-
);
|
|
377
|
-
__decorate(
|
|
378
|
-
[
|
|
379
|
-
(0, mongoose_1.Prop)([
|
|
380
|
-
{
|
|
381
|
-
type: mongoose_2.Schema.Types.ObjectId,
|
|
382
|
-
ref: 'Content',
|
|
383
|
-
required: false,
|
|
384
|
-
},
|
|
385
|
-
]),
|
|
386
|
-
__metadata('design:type', Array),
|
|
387
|
-
],
|
|
388
|
-
Action.prototype,
|
|
389
|
-
'contents',
|
|
390
|
-
void 0,
|
|
391
|
-
);
|
|
392
|
-
__decorate(
|
|
393
|
-
[(0, mongoose_1.Prop)(), __metadata('design:type', String)],
|
|
394
|
-
Action.prototype,
|
|
395
|
-
'cluster',
|
|
396
|
-
void 0,
|
|
397
|
-
);
|
|
398
|
-
__decorate(
|
|
399
|
-
[
|
|
400
|
-
(0, mongoose_1.Prop)({ required: false }),
|
|
401
|
-
__metadata('design:type', String),
|
|
402
|
-
],
|
|
403
|
-
Action.prototype,
|
|
404
|
-
'shopping',
|
|
405
|
-
void 0,
|
|
406
|
-
);
|
|
407
|
-
__decorate(
|
|
408
|
-
[
|
|
409
|
-
(0, mongoose_1.Prop)({ required: false }),
|
|
410
|
-
__metadata('design:type', String),
|
|
411
|
-
],
|
|
412
|
-
Action.prototype,
|
|
413
|
-
'project',
|
|
414
|
-
void 0,
|
|
415
|
-
);
|
|
416
|
-
__decorate(
|
|
417
|
-
[
|
|
418
|
-
(0, mongoose_1.Prop)({
|
|
419
|
-
type: exports.ComercialCardSchema,
|
|
420
|
-
required: false,
|
|
421
|
-
}),
|
|
422
|
-
__metadata('design:type', ComercialCard),
|
|
423
|
-
],
|
|
424
|
-
Action.prototype,
|
|
425
|
-
'comercialCard',
|
|
426
|
-
void 0,
|
|
427
|
-
);
|
|
428
|
-
__decorate(
|
|
429
|
-
[
|
|
430
|
-
(0, mongoose_1.Prop)({ type: exports.ResponsiblesSchema }),
|
|
431
|
-
__metadata('design:type', Responsibles),
|
|
432
|
-
],
|
|
433
|
-
Action.prototype,
|
|
434
|
-
'responsibles',
|
|
435
|
-
void 0,
|
|
436
|
-
);
|
|
437
|
-
__decorate(
|
|
438
|
-
[
|
|
439
|
-
(0, mongoose_1.Prop)({ required: false }),
|
|
440
|
-
__metadata('design:type', String),
|
|
441
|
-
],
|
|
442
|
-
Action.prototype,
|
|
443
|
-
'brandUsername',
|
|
444
|
-
void 0,
|
|
445
|
-
);
|
|
446
|
-
__decorate(
|
|
447
|
-
[
|
|
448
|
-
(0, mongoose_1.Prop)({ required: false }),
|
|
449
|
-
__metadata('design:type', String),
|
|
450
|
-
],
|
|
451
|
-
Action.prototype,
|
|
452
|
-
'hashtag',
|
|
453
|
-
void 0,
|
|
454
|
-
);
|
|
455
|
-
__decorate(
|
|
456
|
-
[
|
|
457
|
-
(0, mongoose_1.Prop)({ required: false }),
|
|
458
|
-
__metadata('design:type', String),
|
|
459
|
-
],
|
|
460
|
-
Action.prototype,
|
|
461
|
-
'BILink',
|
|
462
|
-
void 0,
|
|
463
|
-
);
|
|
464
|
-
__decorate(
|
|
465
|
-
[
|
|
466
|
-
(0, mongoose_1.Prop)({ required: false }),
|
|
467
|
-
__metadata('design:type', String),
|
|
468
|
-
],
|
|
469
|
-
Action.prototype,
|
|
470
|
-
'BISheets',
|
|
471
|
-
void 0,
|
|
472
|
-
);
|
|
473
|
-
__decorate(
|
|
474
|
-
[
|
|
475
|
-
(0, mongoose_1.Prop)({ default: Date.now }),
|
|
476
|
-
__metadata('design:type', Date),
|
|
477
|
-
],
|
|
478
|
-
Action.prototype,
|
|
479
|
-
'createdAt',
|
|
480
|
-
void 0,
|
|
481
|
-
);
|
|
482
|
-
__decorate(
|
|
483
|
-
[
|
|
484
|
-
(0, mongoose_1.Prop)({ default: Date.now }),
|
|
485
|
-
__metadata('design:type', Date),
|
|
486
|
-
],
|
|
487
|
-
Action.prototype,
|
|
488
|
-
'updatedAt',
|
|
489
|
-
void 0,
|
|
490
|
-
);
|
|
491
|
-
Action = __decorate([(0, mongoose_1.Schema)({ timestamps: true })], Action);
|
|
492
|
-
exports.Action = Action;
|
|
493
|
-
exports.ActionSchema = mongoose_1.SchemaFactory.createForClass(Action);
|