@grapadigital/shared-schemas 2.0.0 → 2.2.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.
- package/dist/schemas/action.schema.d.ts +2 -1
- package/dist/schemas/action.schema.js +6 -0
- package/dist/schemas/assignment.schema.d.ts +1 -0
- package/dist/schemas/assignment.schema.js +5 -0
- package/dist/schemas/comment.schema.d.ts +1 -0
- package/dist/schemas/comment.schema.js +4 -0
- package/dist/schemas/content.schema.d.ts +1 -0
- package/dist/schemas/content.schema.js +4 -0
- package/dist/schemas/contract.schema.d.ts +2 -1
- package/dist/schemas/contract.schema.js +5 -1
- package/dist/schemas/creative.schema.d.ts +1 -0
- package/dist/schemas/creative.schema.js +5 -0
- package/dist/schemas/influencer.schema.d.ts +5 -0
- package/dist/schemas/influencer.schema.js +7 -1
- package/dist/schemas/recruitment.schema.d.ts +2 -1
- package/dist/schemas/recruitment.schema.js +5 -1
- package/dist/schemas/script.schema.d.ts +1 -0
- package/dist/schemas/script.schema.js +5 -0
- package/dist/schemas/task.schema.d.ts +1 -0
- package/dist/schemas/task.schema.js +5 -0
- package/package.json +1 -1
|
@@ -27,7 +27,7 @@ export declare const ActionPromptConfigSchema: MongooseSchema<ActionPromptConfig
|
|
|
27
27
|
} & {
|
|
28
28
|
__v: number;
|
|
29
29
|
}>;
|
|
30
|
-
export declare const ACTION_STATUS_VALUES: readonly ["config", "inProgress", "finished", "archived", "cancelled"];
|
|
30
|
+
export declare const ACTION_STATUS_VALUES: readonly ["config", "inProgress", "finished", "archived", "cancelled", "deleted"];
|
|
31
31
|
export type ActionStatus = (typeof ACTION_STATUS_VALUES)[number];
|
|
32
32
|
/**
|
|
33
33
|
* Tipo da Ação (Action.type). O nome evita confusão com o ACTION_TYPE_VALUES
|
|
@@ -121,6 +121,7 @@ export declare class Action {
|
|
|
121
121
|
goals?: ClientMetricGoal[];
|
|
122
122
|
/** Fora dos relatórios do cliente no Hub (total de campanhas, lista e métricas). */
|
|
123
123
|
hideFromReports?: boolean;
|
|
124
|
+
deletedAt?: Date | null;
|
|
124
125
|
}
|
|
125
126
|
export declare const ActionSchema: MongooseSchema<Action, import("mongoose").Model<Action, any, any, any, import("mongoose").Document<unknown, any, Action, any, {}> & Action & Required<{
|
|
126
127
|
_id: Types.ObjectId;
|
|
@@ -84,6 +84,7 @@ exports.ACTION_STATUS_VALUES = [
|
|
|
84
84
|
"finished",
|
|
85
85
|
"archived",
|
|
86
86
|
"cancelled",
|
|
87
|
+
"deleted",
|
|
87
88
|
];
|
|
88
89
|
/**
|
|
89
90
|
* Tipo da Ação (Action.type). O nome evita confusão com o ACTION_TYPE_VALUES
|
|
@@ -371,6 +372,11 @@ __decorate([
|
|
|
371
372
|
(0, mongoose_1.Prop)({ type: Boolean, default: false }),
|
|
372
373
|
__metadata("design:type", Boolean)
|
|
373
374
|
], Action.prototype, "hideFromReports", void 0);
|
|
375
|
+
__decorate([
|
|
376
|
+
(0, swagger_1.ApiProperty)({ type: Date, required: false, nullable: true }),
|
|
377
|
+
(0, mongoose_1.Prop)({ type: Date, default: null }),
|
|
378
|
+
__metadata("design:type", Object)
|
|
379
|
+
], Action.prototype, "deletedAt", void 0);
|
|
374
380
|
exports.Action = Action = __decorate([
|
|
375
381
|
(0, mongoose_1.Schema)({ timestamps: true })
|
|
376
382
|
], Action);
|
|
@@ -39,6 +39,7 @@ export declare class Assignment {
|
|
|
39
39
|
notes?: string;
|
|
40
40
|
createdAt?: Date;
|
|
41
41
|
updatedAt?: Date;
|
|
42
|
+
deletedAt?: Date | null;
|
|
42
43
|
}
|
|
43
44
|
export declare const AssignmentSchema: MongooseSchema<Assignment, import("mongoose").Model<Assignment, any, any, any, import("mongoose").Document<unknown, any, Assignment, any, {}> & Assignment & Required<{
|
|
44
45
|
_id: Types.ObjectId;
|
|
@@ -156,6 +156,11 @@ __decorate([
|
|
|
156
156
|
(0, mongoose_1.Prop)({ type: Date, default: Date.now, required: false }),
|
|
157
157
|
__metadata("design:type", Date)
|
|
158
158
|
], Assignment.prototype, "updatedAt", void 0);
|
|
159
|
+
__decorate([
|
|
160
|
+
(0, swagger_1.ApiProperty)({ type: Date, required: false, nullable: true }),
|
|
161
|
+
(0, mongoose_1.Prop)({ type: Date, default: null }),
|
|
162
|
+
__metadata("design:type", Object)
|
|
163
|
+
], Assignment.prototype, "deletedAt", void 0);
|
|
159
164
|
exports.Assignment = Assignment = __decorate([
|
|
160
165
|
(0, mongoose_1.Schema)({ timestamps: true })
|
|
161
166
|
], Assignment);
|
|
@@ -69,6 +69,7 @@ export declare class Comment {
|
|
|
69
69
|
sourceCommentId?: Types.ObjectId | Comment | null;
|
|
70
70
|
createdAt?: Date;
|
|
71
71
|
updatedAt?: Date;
|
|
72
|
+
deletedAt?: Date | null;
|
|
72
73
|
}
|
|
73
74
|
export declare const CommentSchema: MongooseSchema<Comment, import("mongoose").Model<Comment, any, any, any, import("mongoose").Document<unknown, any, Comment, any, {}> & Comment & Required<{
|
|
74
75
|
_id: Types.ObjectId;
|
|
@@ -232,6 +232,10 @@ __decorate([
|
|
|
232
232
|
(0, mongoose_1.Prop)({ default: Date.now, required: false }),
|
|
233
233
|
__metadata("design:type", Date)
|
|
234
234
|
], Comment.prototype, "updatedAt", void 0);
|
|
235
|
+
__decorate([
|
|
236
|
+
(0, mongoose_1.Prop)({ type: Date, default: null }),
|
|
237
|
+
__metadata("design:type", Object)
|
|
238
|
+
], Comment.prototype, "deletedAt", void 0);
|
|
235
239
|
exports.Comment = Comment = __decorate([
|
|
236
240
|
(0, mongoose_1.Schema)({ timestamps: true })
|
|
237
241
|
], Comment);
|
|
@@ -356,6 +356,7 @@ export declare class Content {
|
|
|
356
356
|
* cálculo continua pendente). Ver GD-705.
|
|
357
357
|
*/
|
|
358
358
|
metricsCalculatedAt?: Date | null;
|
|
359
|
+
deletedAt?: Date | null;
|
|
359
360
|
}
|
|
360
361
|
export declare const ContentSchema: MongooseSchema<Content, import("mongoose").Model<Content, any, any, any, import("mongoose").Document<unknown, any, Content, any, {}> & Content & Required<{
|
|
361
362
|
_id: Types.ObjectId;
|
|
@@ -698,6 +698,10 @@ __decorate([
|
|
|
698
698
|
(0, mongoose_1.Prop)({ type: Date, required: false, default: null }),
|
|
699
699
|
__metadata("design:type", Object)
|
|
700
700
|
], Content.prototype, "metricsCalculatedAt", void 0);
|
|
701
|
+
__decorate([
|
|
702
|
+
(0, mongoose_1.Prop)({ type: Date, default: null }),
|
|
703
|
+
__metadata("design:type", Object)
|
|
704
|
+
], Content.prototype, "deletedAt", void 0);
|
|
701
705
|
exports.Content = Content = __decorate([
|
|
702
706
|
(0, mongoose_1.Schema)({ timestamps: true })
|
|
703
707
|
], Content);
|
|
@@ -4,7 +4,7 @@ export type ContractDocument = HydratedDocument<Contract>;
|
|
|
4
4
|
export declare class Contract {
|
|
5
5
|
_id?: Types.ObjectId;
|
|
6
6
|
variables: MongooseSchema.Types.Mixed;
|
|
7
|
-
status: "none" | "signed";
|
|
7
|
+
status: "none" | "signed" | "deleted";
|
|
8
8
|
ip: string;
|
|
9
9
|
userAgent: string;
|
|
10
10
|
signedAt: Date;
|
|
@@ -13,6 +13,7 @@ export declare class Contract {
|
|
|
13
13
|
recruitment: Types.ObjectId | Recruitment;
|
|
14
14
|
createdAt?: Date;
|
|
15
15
|
updatedAt?: Date;
|
|
16
|
+
deletedAt?: Date | null;
|
|
16
17
|
}
|
|
17
18
|
export declare const ContractSchema: MongooseSchema<Contract, import("mongoose").Model<Contract, any, any, any, import("mongoose").Document<unknown, any, Contract, any, {}> & Contract & Required<{
|
|
18
19
|
_id: Types.ObjectId;
|
|
@@ -24,7 +24,7 @@ __decorate([
|
|
|
24
24
|
__metadata("design:type", mongoose_2.Schema.Types.Mixed)
|
|
25
25
|
], Contract.prototype, "variables", void 0);
|
|
26
26
|
__decorate([
|
|
27
|
-
(0, mongoose_1.Prop)({ type: String, default: "none", enum: ["none", "signed"] }),
|
|
27
|
+
(0, mongoose_1.Prop)({ type: String, default: "none", enum: ["none", "signed", "deleted"] }),
|
|
28
28
|
__metadata("design:type", String)
|
|
29
29
|
], Contract.prototype, "status", void 0);
|
|
30
30
|
__decorate([
|
|
@@ -59,6 +59,10 @@ __decorate([
|
|
|
59
59
|
(0, mongoose_1.Prop)({ default: Date.now, required: false }),
|
|
60
60
|
__metadata("design:type", Date)
|
|
61
61
|
], Contract.prototype, "updatedAt", void 0);
|
|
62
|
+
__decorate([
|
|
63
|
+
(0, mongoose_1.Prop)({ type: Date, default: null }),
|
|
64
|
+
__metadata("design:type", Object)
|
|
65
|
+
], Contract.prototype, "deletedAt", void 0);
|
|
62
66
|
exports.Contract = Contract = __decorate([
|
|
63
67
|
(0, mongoose_1.Schema)({ timestamps: true })
|
|
64
68
|
], Contract);
|
|
@@ -91,6 +91,7 @@ export declare class Creative {
|
|
|
91
91
|
organization?: Types.ObjectId;
|
|
92
92
|
createdAt?: Date;
|
|
93
93
|
updatedAt?: Date;
|
|
94
|
+
deletedAt?: Date | null;
|
|
94
95
|
}
|
|
95
96
|
export declare const CreativeSchema: MongooseSchema<Creative, import("mongoose").Model<Creative, any, any, any, import("mongoose").Document<unknown, any, Creative, any, {}> & Creative & Required<{
|
|
96
97
|
_id: Types.ObjectId;
|
|
@@ -273,6 +273,11 @@ __decorate([
|
|
|
273
273
|
(0, mongoose_1.Prop)({ default: Date.now, required: false }),
|
|
274
274
|
__metadata("design:type", Date)
|
|
275
275
|
], Creative.prototype, "updatedAt", void 0);
|
|
276
|
+
__decorate([
|
|
277
|
+
(0, swagger_1.ApiProperty)({ type: Date, required: false, nullable: true }),
|
|
278
|
+
(0, mongoose_1.Prop)({ type: Date, default: null }),
|
|
279
|
+
__metadata("design:type", Object)
|
|
280
|
+
], Creative.prototype, "deletedAt", void 0);
|
|
276
281
|
exports.Creative = Creative = __decorate([
|
|
277
282
|
(0, mongoose_1.Schema)({ timestamps: true })
|
|
278
283
|
], Creative);
|
|
@@ -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);
|
|
@@ -199,7 +199,7 @@ export declare class Recruitment {
|
|
|
199
199
|
_id?: Types.ObjectId;
|
|
200
200
|
username: string;
|
|
201
201
|
picture: string;
|
|
202
|
-
status: "selected" | "inContact" | "inApproval" | "recruited" | "removed";
|
|
202
|
+
status: "selected" | "inContact" | "inApproval" | "recruited" | "removed" | "deleted";
|
|
203
203
|
action: Types.ObjectId | Action;
|
|
204
204
|
influencer: Types.ObjectId | Influencer;
|
|
205
205
|
profiles: RecruitmentProfile[];
|
|
@@ -207,6 +207,7 @@ export declare class Recruitment {
|
|
|
207
207
|
createdAt?: Date;
|
|
208
208
|
updatedAt?: Date;
|
|
209
209
|
useAmbassadorContract?: boolean;
|
|
210
|
+
deletedAt?: Date | null;
|
|
210
211
|
}
|
|
211
212
|
export declare const RecruitmentSchema: MongooseSchema<Recruitment, import("mongoose").Model<Recruitment, any, any, any, import("mongoose").Document<unknown, any, Recruitment, any, {}> & Recruitment & Required<{
|
|
212
213
|
_id: Types.ObjectId;
|
|
@@ -338,7 +338,7 @@ __decorate([
|
|
|
338
338
|
(0, mongoose_1.Prop)({
|
|
339
339
|
type: String,
|
|
340
340
|
default: "selected",
|
|
341
|
-
enum: ["selected", "inContact", "inApproval", "recruited", "removed"],
|
|
341
|
+
enum: ["selected", "inContact", "inApproval", "recruited", "removed", "deleted"],
|
|
342
342
|
}),
|
|
343
343
|
__metadata("design:type", String)
|
|
344
344
|
], Recruitment.prototype, "status", void 0);
|
|
@@ -370,6 +370,10 @@ __decorate([
|
|
|
370
370
|
(0, mongoose_1.Prop)({ type: Boolean, required: false, default: false }),
|
|
371
371
|
__metadata("design:type", Boolean)
|
|
372
372
|
], Recruitment.prototype, "useAmbassadorContract", void 0);
|
|
373
|
+
__decorate([
|
|
374
|
+
(0, mongoose_1.Prop)({ type: Date, default: null }),
|
|
375
|
+
__metadata("design:type", Object)
|
|
376
|
+
], Recruitment.prototype, "deletedAt", void 0);
|
|
373
377
|
exports.Recruitment = Recruitment = __decorate([
|
|
374
378
|
(0, mongoose_1.Schema)({ timestamps: true })
|
|
375
379
|
], Recruitment);
|
|
@@ -86,6 +86,7 @@ export declare class Script {
|
|
|
86
86
|
organization?: Types.ObjectId;
|
|
87
87
|
createdAt?: Date;
|
|
88
88
|
updatedAt?: Date;
|
|
89
|
+
deletedAt?: Date | null;
|
|
89
90
|
}
|
|
90
91
|
export declare const ScriptSchema: MongooseSchema<Script, import("mongoose").Model<Script, any, any, any, import("mongoose").Document<unknown, any, Script, any, {}> & Script & Required<{
|
|
91
92
|
_id: Types.ObjectId;
|
|
@@ -254,6 +254,11 @@ __decorate([
|
|
|
254
254
|
(0, mongoose_1.Prop)({ default: Date.now, required: false }),
|
|
255
255
|
__metadata("design:type", Date)
|
|
256
256
|
], Script.prototype, "updatedAt", void 0);
|
|
257
|
+
__decorate([
|
|
258
|
+
(0, swagger_1.ApiProperty)({ type: Date, required: false, nullable: true }),
|
|
259
|
+
(0, mongoose_1.Prop)({ type: Date, default: null }),
|
|
260
|
+
__metadata("design:type", Object)
|
|
261
|
+
], Script.prototype, "deletedAt", void 0);
|
|
257
262
|
exports.Script = Script = __decorate([
|
|
258
263
|
(0, mongoose_1.Schema)({ timestamps: true })
|
|
259
264
|
], Script);
|
|
@@ -35,6 +35,7 @@ export declare class Task {
|
|
|
35
35
|
organization: Types.ObjectId;
|
|
36
36
|
businessUnit?: ActionBusinessUnit;
|
|
37
37
|
storeVisit?: StoreVisitData;
|
|
38
|
+
deletedAt?: Date | null;
|
|
38
39
|
}
|
|
39
40
|
export declare const TaskSchema: MongooseSchema<Task, import("mongoose").Model<Task, any, any, any, import("mongoose").Document<unknown, any, Task, any, {}> & Task & Required<{
|
|
40
41
|
_id: Types.ObjectId;
|
|
@@ -181,6 +181,11 @@ __decorate([
|
|
|
181
181
|
(0, mongoose_1.Prop)({ type: store_visit_schema_1.StoreVisitDataSchema, required: false }),
|
|
182
182
|
__metadata("design:type", store_visit_schema_1.StoreVisitData)
|
|
183
183
|
], Task.prototype, "storeVisit", void 0);
|
|
184
|
+
__decorate([
|
|
185
|
+
(0, swagger_1.ApiProperty)({ type: Date, required: false, nullable: true }),
|
|
186
|
+
(0, mongoose_1.Prop)({ type: Date, default: null }),
|
|
187
|
+
__metadata("design:type", Object)
|
|
188
|
+
], Task.prototype, "deletedAt", void 0);
|
|
184
189
|
exports.Task = Task = __decorate([
|
|
185
190
|
(0, mongoose_1.Schema)({ timestamps: true })
|
|
186
191
|
], Task);
|