@grapadigital/shared-schemas 1.1.1 → 2.1.0
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.
|
@@ -101,6 +101,9 @@ export declare const InfluencerContractSchema: MongooseSchema<InfluencerContract
|
|
|
101
101
|
}> & {
|
|
102
102
|
__v: number;
|
|
103
103
|
}>;
|
|
104
|
+
/** Origem do cadastro: interno (web-entities) ou link de autocadastro. Ver GD-775. */
|
|
105
|
+
export declare const INFLUENCER_SOURCE_VALUES: readonly ["internal", "self-registration"];
|
|
106
|
+
export type InfluencerSource = (typeof INFLUENCER_SOURCE_VALUES)[number];
|
|
104
107
|
export declare class Influencer extends Party {
|
|
105
108
|
financialManagementSheet?: string;
|
|
106
109
|
isExclusive: boolean;
|
|
@@ -108,6 +111,8 @@ export declare class Influencer extends Party {
|
|
|
108
111
|
profiles?: Types.ObjectId[] | Profile[];
|
|
109
112
|
notes?: Note[];
|
|
110
113
|
contracts?: InfluencerContract[];
|
|
114
|
+
/** Ausente nos cadastros antigos: na leitura, vale como `internal`. */
|
|
115
|
+
source?: InfluencerSource;
|
|
111
116
|
}
|
|
112
117
|
export declare const InfluencerSchema: MongooseSchema<Influencer, import("mongoose").Model<Influencer, any, any, any, import("mongoose").Document<unknown, any, Influencer, any, {}> & Influencer & Required<{
|
|
113
118
|
_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.InfluencerModel = exports.InfluencerSchema = exports.Influencer = exports.InfluencerContractSchema = exports.InfluencerContract = exports.ContractAmendmentSchema = exports.ContractAmendment = exports.CONTRACT_STATUS_VALUES = exports.NoteSchema = exports.Note = exports.AdvisorSchema = exports.Advisor = void 0;
|
|
12
|
+
exports.InfluencerModel = exports.InfluencerSchema = exports.Influencer = exports.INFLUENCER_SOURCE_VALUES = exports.InfluencerContractSchema = exports.InfluencerContract = exports.ContractAmendmentSchema = exports.ContractAmendment = exports.CONTRACT_STATUS_VALUES = exports.NoteSchema = exports.Note = exports.AdvisorSchema = exports.Advisor = void 0;
|
|
13
13
|
const mongoose_1 = require("@nestjs/mongoose");
|
|
14
14
|
const mongoose_2 = require("mongoose");
|
|
15
15
|
const party_schema_1 = require("./party.schema");
|
|
@@ -189,6 +189,8 @@ exports.InfluencerContract = InfluencerContract = __decorate([
|
|
|
189
189
|
(0, mongoose_1.Schema)({ timestamps: true })
|
|
190
190
|
], InfluencerContract);
|
|
191
191
|
exports.InfluencerContractSchema = mongoose_1.SchemaFactory.createForClass(InfluencerContract);
|
|
192
|
+
/** Origem do cadastro: interno (web-entities) ou link de autocadastro. Ver GD-775. */
|
|
193
|
+
exports.INFLUENCER_SOURCE_VALUES = ["internal", "self-registration"];
|
|
192
194
|
let Influencer = class Influencer extends party_schema_1.Party {
|
|
193
195
|
};
|
|
194
196
|
exports.Influencer = Influencer;
|
|
@@ -216,6 +218,10 @@ __decorate([
|
|
|
216
218
|
(0, mongoose_1.Prop)({ type: [exports.InfluencerContractSchema], required: false }),
|
|
217
219
|
__metadata("design:type", Array)
|
|
218
220
|
], Influencer.prototype, "contracts", void 0);
|
|
221
|
+
__decorate([
|
|
222
|
+
(0, mongoose_1.Prop)({ type: String, enum: exports.INFLUENCER_SOURCE_VALUES, required: false, default: "internal" }),
|
|
223
|
+
__metadata("design:type", String)
|
|
224
|
+
], Influencer.prototype, "source", void 0);
|
|
219
225
|
exports.Influencer = Influencer = __decorate([
|
|
220
226
|
(0, mongoose_1.Schema)({ timestamps: true })
|
|
221
227
|
], Influencer);
|
|
@@ -13,6 +13,8 @@ export declare class Proposal {
|
|
|
13
13
|
origin: "inbound" | "outbound";
|
|
14
14
|
profile?: Types.ObjectId | Profile;
|
|
15
15
|
influencer?: Types.ObjectId | Influencer;
|
|
16
|
+
brand?: Types.ObjectId | Client;
|
|
17
|
+
agency?: Types.ObjectId | Client;
|
|
16
18
|
}
|
|
17
19
|
export declare class Negotiation {
|
|
18
20
|
calculatorType: "withPreDefinedBudget" | "withoutPreDefinedBudget" | "byCommission" | "bourbon";
|
|
@@ -47,8 +49,6 @@ export declare class Formalization {
|
|
|
47
49
|
paymentTerms: string;
|
|
48
50
|
handlingInvoices: string;
|
|
49
51
|
finalScope: string;
|
|
50
|
-
brand: Types.ObjectId | Client;
|
|
51
|
-
agency?: Types.ObjectId | Client;
|
|
52
52
|
totalInstallments: number;
|
|
53
53
|
}
|
|
54
54
|
export declare class Lost {
|
|
@@ -54,6 +54,14 @@ __decorate([
|
|
|
54
54
|
}),
|
|
55
55
|
__metadata("design:type", Object)
|
|
56
56
|
], Proposal.prototype, "influencer", void 0);
|
|
57
|
+
__decorate([
|
|
58
|
+
(0, mongoose_1.Prop)({ type: mongoose_2.Schema.Types.ObjectId, ref: "Client", required: false }),
|
|
59
|
+
__metadata("design:type", Object)
|
|
60
|
+
], Proposal.prototype, "brand", void 0);
|
|
61
|
+
__decorate([
|
|
62
|
+
(0, mongoose_1.Prop)({ type: mongoose_2.Schema.Types.ObjectId, ref: "Client", required: false }),
|
|
63
|
+
__metadata("design:type", Object)
|
|
64
|
+
], Proposal.prototype, "agency", void 0);
|
|
57
65
|
exports.Proposal = Proposal = __decorate([
|
|
58
66
|
(0, mongoose_1.Schema)({ _id: false })
|
|
59
67
|
], Proposal);
|
|
@@ -186,14 +194,6 @@ __decorate([
|
|
|
186
194
|
(0, mongoose_1.Prop)({ required: true }),
|
|
187
195
|
__metadata("design:type", String)
|
|
188
196
|
], Formalization.prototype, "finalScope", void 0);
|
|
189
|
-
__decorate([
|
|
190
|
-
(0, mongoose_1.Prop)({ type: mongoose_2.Schema.Types.ObjectId, ref: "Client" }),
|
|
191
|
-
__metadata("design:type", Object)
|
|
192
|
-
], Formalization.prototype, "brand", void 0);
|
|
193
|
-
__decorate([
|
|
194
|
-
(0, mongoose_1.Prop)({ type: mongoose_2.Schema.Types.ObjectId, ref: "Client", required: false }),
|
|
195
|
-
__metadata("design:type", Object)
|
|
196
|
-
], Formalization.prototype, "agency", void 0);
|
|
197
197
|
__decorate([
|
|
198
198
|
(0, mongoose_1.Prop)({ type: Number, required: true }),
|
|
199
199
|
__metadata("design:type", Number)
|
|
@@ -509,8 +509,8 @@ exports.Sale = Sale = __decorate([
|
|
|
509
509
|
exports.SaleSchema = mongoose_1.SchemaFactory.createForClass(Sale);
|
|
510
510
|
exports.SaleSchema.index({ organization: 1, phase: 1 });
|
|
511
511
|
exports.SaleSchema.index({ organization: 1, createdAt: -1 });
|
|
512
|
-
exports.SaleSchema.index({ organization: 1, "
|
|
513
|
-
exports.SaleSchema.index({ organization: 1, "
|
|
512
|
+
exports.SaleSchema.index({ organization: 1, "proposal.brand": 1 });
|
|
513
|
+
exports.SaleSchema.index({ organization: 1, "proposal.agency": 1 });
|
|
514
514
|
exports.SaleSchema.index({ organization: 1, closedAt: 1, phase: 1 });
|
|
515
515
|
exports.SaleSchema.index({ "proposal.influencer": 1 });
|
|
516
516
|
exports.SaleSchema.index({ "responsible.proposal.email": 1 });
|