@grapadigital/shared-schemas 1.0.32 → 1.0.35
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 -1
- package/dist/index.js +1 -1
- package/dist/schemas/action.schema.d.ts +128 -0
- package/dist/schemas/action.schema.js +260 -0
- package/dist/schemas/activation.schema.d.ts +228 -0
- package/dist/schemas/activation.schema.js +493 -0
- package/dist/schemas/campaign.schema.d.ts +0 -86
- package/dist/schemas/campaign.schema.js +1 -228
- package/dist/schemas/client.schema.d.ts +9 -11
- package/dist/schemas/client.schema.js +5 -20
- package/dist/schemas/content.schema.d.ts +3 -3
- package/dist/schemas/content.schema.js +3 -3
- package/dist/schemas/influencer.schema.d.ts +2 -55
- package/dist/schemas/influencer.schema.js +3 -144
- package/dist/schemas/payment.schema.d.ts +2 -2
- package/dist/schemas/payment.schema.js +2 -2
- package/dist/schemas/recruitment.schema.d.ts +2 -2
- package/dist/schemas/recruitment.schema.js +2 -2
- package/dist/schemas/supplier.schema.d.ts +39 -0
- package/dist/schemas/supplier.schema.js +18 -0
- package/dist/schemas/user.schema.d.ts +99 -0
- package/dist/schemas/user.schema.js +153 -0
- package/package.json +1 -1
- package/src/index.ts +1 -1
- package/src/schemas/action.schema.ts +202 -0
- package/src/schemas/campaign.schema.ts +0 -184
- package/src/schemas/client.schema.ts +13 -23
- package/src/schemas/content.schema.ts +4 -4
- package/src/schemas/influencer.schema.ts +2 -108
- package/src/schemas/payment.schema.ts +3 -3
- package/src/schemas/recruitment.schema.ts +3 -3
- package/src/schemas/supplier.schema.ts +10 -0
- package/src/schemas/user.schema.ts +108 -0
package/dist/index.d.ts
CHANGED
package/dist/index.js
CHANGED
|
@@ -14,7 +14,7 @@ var __exportStar = (this && this.__exportStar) || function(m, exports) {
|
|
|
14
14
|
for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
|
|
15
15
|
};
|
|
16
16
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
17
|
-
__exportStar(require("./schemas/
|
|
17
|
+
__exportStar(require("./schemas/action.schema"), exports);
|
|
18
18
|
__exportStar(require("./schemas/client.schema"), exports);
|
|
19
19
|
__exportStar(require("./schemas/content.schema"), exports);
|
|
20
20
|
__exportStar(require("./schemas/influencer.schema"), exports);
|
|
@@ -0,0 +1,128 @@
|
|
|
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<ComercialCard, import("mongoose").Model<ComercialCard, any, any, any, import("mongoose").Document<unknown, any, ComercialCard> & ComercialCard & {
|
|
56
|
+
_id: Types.ObjectId;
|
|
57
|
+
} & {
|
|
58
|
+
__v: number;
|
|
59
|
+
}, any>, {}, {}, {}, {}, import("mongoose").DefaultSchemaOptions, ComercialCard, import("mongoose").Document<unknown, {}, import("mongoose").FlatRecord<ComercialCard>> & import("mongoose").FlatRecord<ComercialCard> & {
|
|
60
|
+
_id: Types.ObjectId;
|
|
61
|
+
} & {
|
|
62
|
+
__v: number;
|
|
63
|
+
}>;
|
|
64
|
+
export declare class Responsible {
|
|
65
|
+
name: string;
|
|
66
|
+
team: string;
|
|
67
|
+
email: string;
|
|
68
|
+
}
|
|
69
|
+
export declare const ResponsibleSchema: MongooseSchema<Responsible, import("mongoose").Model<Responsible, any, any, any, import("mongoose").Document<unknown, any, Responsible> & Responsible & {
|
|
70
|
+
_id: Types.ObjectId;
|
|
71
|
+
} & {
|
|
72
|
+
__v: number;
|
|
73
|
+
}, any>, {}, {}, {}, {}, import("mongoose").DefaultSchemaOptions, Responsible, import("mongoose").Document<unknown, {}, import("mongoose").FlatRecord<Responsible>> & import("mongoose").FlatRecord<Responsible> & {
|
|
74
|
+
_id: Types.ObjectId;
|
|
75
|
+
} & {
|
|
76
|
+
__v: number;
|
|
77
|
+
}>;
|
|
78
|
+
export declare class Responsibles {
|
|
79
|
+
service: Responsible;
|
|
80
|
+
comercial?: Responsible;
|
|
81
|
+
}
|
|
82
|
+
export declare const ResponsiblesSchema: MongooseSchema<Responsibles, import("mongoose").Model<Responsibles, any, any, any, import("mongoose").Document<unknown, any, Responsibles> & Responsibles & {
|
|
83
|
+
_id: Types.ObjectId;
|
|
84
|
+
} & {
|
|
85
|
+
__v: number;
|
|
86
|
+
}, any>, {}, {}, {}, {}, import("mongoose").DefaultSchemaOptions, Responsibles, import("mongoose").Document<unknown, {}, import("mongoose").FlatRecord<Responsibles>> & import("mongoose").FlatRecord<Responsibles> & {
|
|
87
|
+
_id: Types.ObjectId;
|
|
88
|
+
} & {
|
|
89
|
+
__v: number;
|
|
90
|
+
}>;
|
|
91
|
+
export declare class Action {
|
|
92
|
+
_id?: Types.ObjectId;
|
|
93
|
+
title: string;
|
|
94
|
+
thumbnail?: string;
|
|
95
|
+
startDate: Date;
|
|
96
|
+
endDate: Date;
|
|
97
|
+
nps?: number;
|
|
98
|
+
status: 'config' | 'inProgress' | 'finished' | 'paused' | 'finished' | 'archived';
|
|
99
|
+
type: 'partner' | 'exclusive';
|
|
100
|
+
socialnetworks?: string[];
|
|
101
|
+
recruitedInfluencers?: number;
|
|
102
|
+
hiredInfluencers?: number;
|
|
103
|
+
producedContent?: number;
|
|
104
|
+
hiredContent?: number;
|
|
105
|
+
client: Types.ObjectId | Client;
|
|
106
|
+
recruitments?: Types.ObjectId[] | Recruitment[];
|
|
107
|
+
contents?: Types.ObjectId[] | Content[];
|
|
108
|
+
cluster: string;
|
|
109
|
+
shopping?: string;
|
|
110
|
+
project?: string;
|
|
111
|
+
comercialCard?: ComercialCard;
|
|
112
|
+
responsibles: Responsibles;
|
|
113
|
+
brandUsername?: string;
|
|
114
|
+
hashtag?: string;
|
|
115
|
+
BILink?: string;
|
|
116
|
+
BISheets?: string;
|
|
117
|
+
createdAt?: Date;
|
|
118
|
+
updatedAt?: Date;
|
|
119
|
+
}
|
|
120
|
+
export declare const ActionSchema: MongooseSchema<Action, import("mongoose").Model<Action, any, any, any, import("mongoose").Document<unknown, any, Action> & Action & Required<{
|
|
121
|
+
_id: Types.ObjectId;
|
|
122
|
+
}> & {
|
|
123
|
+
__v: number;
|
|
124
|
+
}, any>, {}, {}, {}, {}, import("mongoose").DefaultSchemaOptions, Action, import("mongoose").Document<unknown, {}, import("mongoose").FlatRecord<Action>> & import("mongoose").FlatRecord<Action> & Required<{
|
|
125
|
+
_id: Types.ObjectId;
|
|
126
|
+
}> & {
|
|
127
|
+
__v: number;
|
|
128
|
+
}>;
|
|
@@ -0,0 +1,260 @@
|
|
|
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.ActionSchema = exports.Action = exports.ResponsiblesSchema = exports.Responsibles = exports.ResponsibleSchema = exports.Responsible = exports.ComercialCardSchema = exports.ComercialCard = exports.Installment = void 0;
|
|
13
|
+
const mongoose_1 = require("@nestjs/mongoose");
|
|
14
|
+
const mongoose_2 = require("mongoose");
|
|
15
|
+
let Installment = class Installment {
|
|
16
|
+
};
|
|
17
|
+
Installment = __decorate([
|
|
18
|
+
(0, mongoose_1.Schema)({ _id: false })
|
|
19
|
+
], Installment);
|
|
20
|
+
exports.Installment = Installment;
|
|
21
|
+
let ComercialCard = class ComercialCard {
|
|
22
|
+
};
|
|
23
|
+
__decorate([
|
|
24
|
+
(0, mongoose_1.Prop)(),
|
|
25
|
+
__metadata("design:type", String)
|
|
26
|
+
], ComercialCard.prototype, "id", void 0);
|
|
27
|
+
__decorate([
|
|
28
|
+
(0, mongoose_1.Prop)(),
|
|
29
|
+
__metadata("design:type", String)
|
|
30
|
+
], ComercialCard.prototype, "title", void 0);
|
|
31
|
+
__decorate([
|
|
32
|
+
(0, mongoose_1.Prop)(),
|
|
33
|
+
__metadata("design:type", String)
|
|
34
|
+
], ComercialCard.prototype, "status", void 0);
|
|
35
|
+
__decorate([
|
|
36
|
+
(0, mongoose_1.Prop)({
|
|
37
|
+
type: String,
|
|
38
|
+
enum: ['yes_client', 'no_grapa', 'no_client'],
|
|
39
|
+
default: null,
|
|
40
|
+
}),
|
|
41
|
+
__metadata("design:type", String)
|
|
42
|
+
], ComercialCard.prototype, "passThrough", void 0);
|
|
43
|
+
__decorate([
|
|
44
|
+
(0, mongoose_1.Prop)(),
|
|
45
|
+
__metadata("design:type", Boolean)
|
|
46
|
+
], ComercialCard.prototype, "childPermit", void 0);
|
|
47
|
+
__decorate([
|
|
48
|
+
(0, mongoose_1.Prop)(),
|
|
49
|
+
__metadata("design:type", Number)
|
|
50
|
+
], ComercialCard.prototype, "internalCost", void 0);
|
|
51
|
+
__decorate([
|
|
52
|
+
(0, mongoose_1.Prop)(),
|
|
53
|
+
__metadata("design:type", Number)
|
|
54
|
+
], ComercialCard.prototype, "influencerValue", void 0);
|
|
55
|
+
__decorate([
|
|
56
|
+
(0, mongoose_1.Prop)(),
|
|
57
|
+
__metadata("design:type", Number)
|
|
58
|
+
], ComercialCard.prototype, "totalValue", void 0);
|
|
59
|
+
__decorate([
|
|
60
|
+
(0, mongoose_1.Prop)({ type: Date, default: null }),
|
|
61
|
+
__metadata("design:type", Object)
|
|
62
|
+
], ComercialCard.prototype, "expectedInvoiceIssueDate", void 0);
|
|
63
|
+
__decorate([
|
|
64
|
+
(0, mongoose_1.Prop)({ type: Date, default: null }),
|
|
65
|
+
__metadata("design:type", Object)
|
|
66
|
+
], ComercialCard.prototype, "expectedInvoiceDueDate", void 0);
|
|
67
|
+
__decorate([
|
|
68
|
+
(0, mongoose_1.Prop)({ type: Date, default: null }),
|
|
69
|
+
__metadata("design:type", Object)
|
|
70
|
+
], ComercialCard.prototype, "revisedInvoiceIssueDate", void 0);
|
|
71
|
+
__decorate([
|
|
72
|
+
(0, mongoose_1.Prop)({ type: Date, default: null }),
|
|
73
|
+
__metadata("design:type", Object)
|
|
74
|
+
], ComercialCard.prototype, "revisedInvoiceDueDate", void 0);
|
|
75
|
+
__decorate([
|
|
76
|
+
(0, mongoose_1.Prop)({ type: Date, default: null }),
|
|
77
|
+
__metadata("design:type", Object)
|
|
78
|
+
], ComercialCard.prototype, "invoiceIssueDate", void 0);
|
|
79
|
+
__decorate([
|
|
80
|
+
(0, mongoose_1.Prop)({ type: Date, default: null }),
|
|
81
|
+
__metadata("design:type", Object)
|
|
82
|
+
], ComercialCard.prototype, "invoiceDueDate", void 0);
|
|
83
|
+
__decorate([
|
|
84
|
+
(0, mongoose_1.Prop)({ type: Date, default: null }),
|
|
85
|
+
__metadata("design:type", Object)
|
|
86
|
+
], ComercialCard.prototype, "invoicePaymentDate", void 0);
|
|
87
|
+
__decorate([
|
|
88
|
+
(0, mongoose_1.Prop)({ type: Date, default: null }),
|
|
89
|
+
__metadata("design:type", Object)
|
|
90
|
+
], ComercialCard.prototype, "dueDate", void 0);
|
|
91
|
+
__decorate([
|
|
92
|
+
(0, mongoose_1.Prop)({ type: [Installment] }),
|
|
93
|
+
__metadata("design:type", Array)
|
|
94
|
+
], ComercialCard.prototype, "installments", void 0);
|
|
95
|
+
ComercialCard = __decorate([
|
|
96
|
+
(0, mongoose_1.Schema)({ _id: false })
|
|
97
|
+
], ComercialCard);
|
|
98
|
+
exports.ComercialCard = ComercialCard;
|
|
99
|
+
exports.ComercialCardSchema = mongoose_1.SchemaFactory.createForClass(ComercialCard);
|
|
100
|
+
let Responsible = class Responsible {
|
|
101
|
+
};
|
|
102
|
+
__decorate([
|
|
103
|
+
(0, mongoose_1.Prop)(),
|
|
104
|
+
__metadata("design:type", String)
|
|
105
|
+
], Responsible.prototype, "name", void 0);
|
|
106
|
+
__decorate([
|
|
107
|
+
(0, mongoose_1.Prop)(),
|
|
108
|
+
__metadata("design:type", String)
|
|
109
|
+
], Responsible.prototype, "team", void 0);
|
|
110
|
+
__decorate([
|
|
111
|
+
(0, mongoose_1.Prop)(),
|
|
112
|
+
__metadata("design:type", String)
|
|
113
|
+
], Responsible.prototype, "email", void 0);
|
|
114
|
+
Responsible = __decorate([
|
|
115
|
+
(0, mongoose_1.Schema)({ _id: false })
|
|
116
|
+
], Responsible);
|
|
117
|
+
exports.Responsible = Responsible;
|
|
118
|
+
exports.ResponsibleSchema = mongoose_1.SchemaFactory.createForClass(Responsible);
|
|
119
|
+
let Responsibles = class Responsibles {
|
|
120
|
+
};
|
|
121
|
+
__decorate([
|
|
122
|
+
(0, mongoose_1.Prop)({ type: exports.ResponsibleSchema }),
|
|
123
|
+
__metadata("design:type", Responsible)
|
|
124
|
+
], Responsibles.prototype, "service", void 0);
|
|
125
|
+
__decorate([
|
|
126
|
+
(0, mongoose_1.Prop)({ type: exports.ResponsibleSchema, required: false }),
|
|
127
|
+
__metadata("design:type", Responsible)
|
|
128
|
+
], Responsibles.prototype, "comercial", void 0);
|
|
129
|
+
Responsibles = __decorate([
|
|
130
|
+
(0, mongoose_1.Schema)({ _id: false })
|
|
131
|
+
], Responsibles);
|
|
132
|
+
exports.Responsibles = Responsibles;
|
|
133
|
+
exports.ResponsiblesSchema = mongoose_1.SchemaFactory.createForClass(Responsibles);
|
|
134
|
+
let Action = class Action {
|
|
135
|
+
};
|
|
136
|
+
__decorate([
|
|
137
|
+
(0, mongoose_1.Prop)({ type: mongoose_2.Schema.Types.ObjectId, auto: true, required: false }),
|
|
138
|
+
__metadata("design:type", mongoose_2.Types.ObjectId)
|
|
139
|
+
], Action.prototype, "_id", void 0);
|
|
140
|
+
__decorate([
|
|
141
|
+
(0, mongoose_1.Prop)(),
|
|
142
|
+
__metadata("design:type", String)
|
|
143
|
+
], Action.prototype, "title", void 0);
|
|
144
|
+
__decorate([
|
|
145
|
+
(0, mongoose_1.Prop)({ required: false }),
|
|
146
|
+
__metadata("design:type", String)
|
|
147
|
+
], Action.prototype, "thumbnail", void 0);
|
|
148
|
+
__decorate([
|
|
149
|
+
(0, mongoose_1.Prop)(),
|
|
150
|
+
__metadata("design:type", Date)
|
|
151
|
+
], Action.prototype, "startDate", void 0);
|
|
152
|
+
__decorate([
|
|
153
|
+
(0, mongoose_1.Prop)(),
|
|
154
|
+
__metadata("design:type", Date)
|
|
155
|
+
], Action.prototype, "endDate", void 0);
|
|
156
|
+
__decorate([
|
|
157
|
+
(0, mongoose_1.Prop)({ required: false }),
|
|
158
|
+
__metadata("design:type", Number)
|
|
159
|
+
], Action.prototype, "nps", void 0);
|
|
160
|
+
__decorate([
|
|
161
|
+
(0, mongoose_1.Prop)({
|
|
162
|
+
type: String,
|
|
163
|
+
enum: ['config', 'inProgress', 'paused', 'finished', 'archived'],
|
|
164
|
+
default: 'config',
|
|
165
|
+
}),
|
|
166
|
+
__metadata("design:type", String)
|
|
167
|
+
], Action.prototype, "status", void 0);
|
|
168
|
+
__decorate([
|
|
169
|
+
(0, mongoose_1.Prop)({ type: String, enum: ['partner', 'exclusive'] }),
|
|
170
|
+
__metadata("design:type", String)
|
|
171
|
+
], Action.prototype, "type", void 0);
|
|
172
|
+
__decorate([
|
|
173
|
+
(0, mongoose_1.Prop)({ required: false }),
|
|
174
|
+
__metadata("design:type", Array)
|
|
175
|
+
], Action.prototype, "socialnetworks", void 0);
|
|
176
|
+
__decorate([
|
|
177
|
+
(0, mongoose_1.Prop)({ default: 0, required: false }),
|
|
178
|
+
__metadata("design:type", Number)
|
|
179
|
+
], Action.prototype, "recruitedInfluencers", void 0);
|
|
180
|
+
__decorate([
|
|
181
|
+
(0, mongoose_1.Prop)({ default: 0, required: false }),
|
|
182
|
+
__metadata("design:type", Number)
|
|
183
|
+
], Action.prototype, "hiredInfluencers", void 0);
|
|
184
|
+
__decorate([
|
|
185
|
+
(0, mongoose_1.Prop)({ default: 0, required: false }),
|
|
186
|
+
__metadata("design:type", Number)
|
|
187
|
+
], Action.prototype, "producedContent", void 0);
|
|
188
|
+
__decorate([
|
|
189
|
+
(0, mongoose_1.Prop)({ default: 0, required: false }),
|
|
190
|
+
__metadata("design:type", Number)
|
|
191
|
+
], Action.prototype, "hiredContent", void 0);
|
|
192
|
+
__decorate([
|
|
193
|
+
(0, mongoose_1.Prop)({ type: mongoose_2.Schema.Types.ObjectId, ref: 'Client' }),
|
|
194
|
+
__metadata("design:type", Object)
|
|
195
|
+
], Action.prototype, "client", void 0);
|
|
196
|
+
__decorate([
|
|
197
|
+
(0, mongoose_1.Prop)([
|
|
198
|
+
{
|
|
199
|
+
type: mongoose_2.Schema.Types.ObjectId,
|
|
200
|
+
ref: 'Recruitment',
|
|
201
|
+
required: false,
|
|
202
|
+
},
|
|
203
|
+
]),
|
|
204
|
+
__metadata("design:type", Array)
|
|
205
|
+
], Action.prototype, "recruitments", void 0);
|
|
206
|
+
__decorate([
|
|
207
|
+
(0, mongoose_1.Prop)([
|
|
208
|
+
{ type: mongoose_2.Schema.Types.ObjectId, ref: 'Content', required: false },
|
|
209
|
+
]),
|
|
210
|
+
__metadata("design:type", Array)
|
|
211
|
+
], Action.prototype, "contents", void 0);
|
|
212
|
+
__decorate([
|
|
213
|
+
(0, mongoose_1.Prop)(),
|
|
214
|
+
__metadata("design:type", String)
|
|
215
|
+
], Action.prototype, "cluster", void 0);
|
|
216
|
+
__decorate([
|
|
217
|
+
(0, mongoose_1.Prop)({ required: false }),
|
|
218
|
+
__metadata("design:type", String)
|
|
219
|
+
], Action.prototype, "shopping", void 0);
|
|
220
|
+
__decorate([
|
|
221
|
+
(0, mongoose_1.Prop)({ required: false }),
|
|
222
|
+
__metadata("design:type", String)
|
|
223
|
+
], Action.prototype, "project", void 0);
|
|
224
|
+
__decorate([
|
|
225
|
+
(0, mongoose_1.Prop)({ type: exports.ComercialCardSchema, required: false }),
|
|
226
|
+
__metadata("design:type", ComercialCard)
|
|
227
|
+
], Action.prototype, "comercialCard", void 0);
|
|
228
|
+
__decorate([
|
|
229
|
+
(0, mongoose_1.Prop)({ type: exports.ResponsiblesSchema }),
|
|
230
|
+
__metadata("design:type", Responsibles)
|
|
231
|
+
], Action.prototype, "responsibles", void 0);
|
|
232
|
+
__decorate([
|
|
233
|
+
(0, mongoose_1.Prop)({ required: false }),
|
|
234
|
+
__metadata("design:type", String)
|
|
235
|
+
], Action.prototype, "brandUsername", void 0);
|
|
236
|
+
__decorate([
|
|
237
|
+
(0, mongoose_1.Prop)({ required: false }),
|
|
238
|
+
__metadata("design:type", String)
|
|
239
|
+
], Action.prototype, "hashtag", void 0);
|
|
240
|
+
__decorate([
|
|
241
|
+
(0, mongoose_1.Prop)({ required: false }),
|
|
242
|
+
__metadata("design:type", String)
|
|
243
|
+
], Action.prototype, "BILink", void 0);
|
|
244
|
+
__decorate([
|
|
245
|
+
(0, mongoose_1.Prop)({ required: false }),
|
|
246
|
+
__metadata("design:type", String)
|
|
247
|
+
], Action.prototype, "BISheets", void 0);
|
|
248
|
+
__decorate([
|
|
249
|
+
(0, mongoose_1.Prop)({ default: Date.now }),
|
|
250
|
+
__metadata("design:type", Date)
|
|
251
|
+
], Action.prototype, "createdAt", void 0);
|
|
252
|
+
__decorate([
|
|
253
|
+
(0, mongoose_1.Prop)({ default: Date.now }),
|
|
254
|
+
__metadata("design:type", Date)
|
|
255
|
+
], Action.prototype, "updatedAt", void 0);
|
|
256
|
+
Action = __decorate([
|
|
257
|
+
(0, mongoose_1.Schema)({ timestamps: true })
|
|
258
|
+
], Action);
|
|
259
|
+
exports.Action = Action;
|
|
260
|
+
exports.ActionSchema = mongoose_1.SchemaFactory.createForClass(Action);
|
|
@@ -0,0 +1,228 @@
|
|
|
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
|
+
>;
|