@grapadigital/shared-schemas 1.0.242 → 1.1.1
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 +42 -42
- package/dist/schemas/action.schema.d.ts +9 -34
- package/dist/schemas/action.schema.js +81 -64
- package/dist/schemas/assignment.schema.d.ts +3 -28
- package/dist/schemas/assignment.schema.js +44 -44
- package/dist/schemas/attachment.schema.d.ts +13 -0
- package/dist/schemas/attachment.schema.js +28 -0
- package/dist/schemas/benchmark.schema.d.ts +3 -28
- package/dist/schemas/benchmark.schema.js +11 -6
- package/dist/schemas/campaign.schema.d.ts +2 -27
- package/dist/schemas/campaign.schema.js +4 -4
- package/dist/schemas/client.schema.d.ts +18 -79
- package/dist/schemas/client.schema.js +73 -71
- package/dist/schemas/comment.schema.d.ts +5 -30
- package/dist/schemas/comment.schema.js +42 -37
- package/dist/schemas/commission.schema.d.ts +5 -30
- package/dist/schemas/commission.schema.js +10 -10
- package/dist/schemas/content-capture-process.schema.d.ts +6 -31
- package/dist/schemas/content-capture-process.schema.js +24 -17
- package/dist/schemas/content-draft.schema.d.ts +2 -27
- package/dist/schemas/content-draft.schema.js +5 -5
- package/dist/schemas/content.schema.d.ts +6 -31
- package/dist/schemas/content.schema.js +84 -74
- package/dist/schemas/contract.schema.d.ts +3 -28
- package/dist/schemas/contract.schema.js +5 -5
- package/dist/schemas/creative.schema.d.ts +6 -31
- package/dist/schemas/creative.schema.js +22 -31
- package/dist/schemas/export-comments-job.schema.d.ts +2 -27
- package/dist/schemas/export-comments-job.schema.js +6 -6
- package/dist/schemas/group.schema.d.ts +1 -26
- package/dist/schemas/group.schema.js +5 -5
- package/dist/schemas/influencer.schema.d.ts +6 -31
- package/dist/schemas/influencer.schema.js +16 -18
- package/dist/schemas/invoice.schema.d.ts +4 -29
- package/dist/schemas/invoice.schema.js +42 -32
- package/dist/schemas/job.schema.d.ts +2 -27
- package/dist/schemas/job.schema.js +14 -14
- package/dist/schemas/lead.schema.d.ts +1 -26
- package/dist/schemas/lead.schema.js +67 -64
- package/dist/schemas/log.schema.d.ts +1 -26
- package/dist/schemas/log.schema.js +24 -24
- package/dist/schemas/note.schema.d.ts +1 -26
- package/dist/schemas/note.schema.js +9 -9
- package/dist/schemas/notifications.schema.d.ts +1 -26
- package/dist/schemas/notifications.schema.js +8 -8
- package/dist/schemas/organization.schema.d.ts +2 -26
- package/dist/schemas/organization.schema.js +8 -4
- package/dist/schemas/party.schema.d.ts +1 -26
- package/dist/schemas/party.schema.js +11 -11
- package/dist/schemas/payment.schema.d.ts +12 -49
- package/dist/schemas/payment.schema.js +66 -69
- package/dist/schemas/profile.schema.d.ts +3 -28
- package/dist/schemas/profile.schema.js +6 -6
- package/dist/schemas/project.schema.d.ts +4 -29
- package/dist/schemas/project.schema.js +13 -13
- package/dist/schemas/prospect.schema.d.ts +3 -28
- package/dist/schemas/prospect.schema.js +9 -9
- package/dist/schemas/recruitment.schema.d.ts +5 -30
- package/dist/schemas/recruitment.schema.js +36 -36
- package/dist/schemas/responsible.schema.d.ts +0 -26
- package/dist/schemas/responsible.schema.js +6 -6
- package/dist/schemas/sale.schema.d.ts +31 -46
- package/dist/schemas/sale.schema.js +66 -62
- package/dist/schemas/script.schema.d.ts +6 -31
- package/dist/schemas/script.schema.js +21 -30
- package/dist/schemas/snapshot.schema.d.ts +3 -28
- package/dist/schemas/snapshot.schema.js +6 -6
- package/dist/schemas/store-visit.schema.d.ts +2 -27
- package/dist/schemas/store-visit.schema.js +21 -17
- package/dist/schemas/store.schema.d.ts +3 -28
- package/dist/schemas/store.schema.js +8 -8
- package/dist/schemas/supplier.schema.d.ts +2 -27
- package/dist/schemas/supplier.schema.js +3 -3
- package/dist/schemas/tag.schema.d.ts +1 -26
- package/dist/schemas/tag.schema.js +5 -5
- package/dist/schemas/task.schema.d.ts +9 -34
- package/dist/schemas/task.schema.js +67 -67
- package/dist/schemas/token.schema.d.ts +1 -26
- package/dist/schemas/token.schema.js +3 -3
- package/dist/schemas/trigger.schema.d.ts +2 -27
- package/dist/schemas/trigger.schema.js +5 -5
- package/dist/schemas/user.schema.d.ts +2 -27
- package/dist/schemas/user.schema.js +7 -7
- package/dist/schemas/webhook.schema.d.ts +1 -26
- package/dist/schemas/webhook.schema.js +10 -10
- package/dist/utils/merge-metrics-breakdown.util.d.ts +1 -1
- package/dist/utils/merge-metrics-breakdown.util.js +7 -2
- package/dist/utils/normalize-content-link.util.js +7 -7
- package/package.json +22 -10
- package/.eslintrc.json +0 -28
- package/.prettierrc +0 -4
- package/dist/schemas/profile-followers-snapshot.schema.d.ts +0 -67
- package/dist/schemas/profile-followers-snapshot.schema.js +0 -65
- package/dist/schemas/schedule.schema.d.ts +0 -73
- package/dist/schemas/schedule.schema.js +0 -116
- package/dist/utils/cost-per-impact.util.d.ts +0 -37
- package/dist/utils/cost-per-impact.util.js +0 -72
- package/dist/utils/influencer-contract.util.d.ts +0 -32
- package/dist/utils/influencer-contract.util.js +0 -77
- package/docs/code-review.md +0 -27
- package/docs/constitution.md +0 -75
- package/docs/specs/GD-692.md +0 -112
- package/docs/specs/GD-761.md +0 -94
- package/index.d.ts +0 -3
- package/src/index.ts +0 -42
- package/src/schemas/action.schema.ts +0 -328
- package/src/schemas/assignment.schema.ts +0 -154
- package/src/schemas/benchmark.schema.ts +0 -39
- package/src/schemas/campaign.schema.ts +0 -38
- package/src/schemas/client.schema.ts +0 -319
- package/src/schemas/comment.schema.ts +0 -216
- package/src/schemas/commission.schema.ts +0 -108
- package/src/schemas/content-capture-process.schema.ts +0 -195
- package/src/schemas/content-draft.schema.ts +0 -49
- package/src/schemas/content.schema.ts +0 -688
- package/src/schemas/contract.schema.ts +0 -44
- package/src/schemas/creative.schema.ts +0 -256
- package/src/schemas/export-comments-job.schema.ts +0 -59
- package/src/schemas/group.schema.ts +0 -23
- package/src/schemas/influencer.schema.ts +0 -184
- package/src/schemas/invoice.schema.ts +0 -164
- package/src/schemas/job.schema.ts +0 -111
- package/src/schemas/lead.schema.ts +0 -372
- package/src/schemas/log.schema.ts +0 -91
- package/src/schemas/note.schema.ts +0 -34
- package/src/schemas/notifications.schema.ts +0 -61
- package/src/schemas/organization.schema.ts +0 -29
- package/src/schemas/party.schema.ts +0 -65
- package/src/schemas/payment.schema.ts +0 -275
- package/src/schemas/profile.schema.ts +0 -77
- package/src/schemas/project.schema.ts +0 -116
- package/src/schemas/prospect.schema.ts +0 -62
- package/src/schemas/recruitment.schema.ts +0 -277
- package/src/schemas/responsible.schema.ts +0 -27
- package/src/schemas/sale.schema.ts +0 -297
- package/src/schemas/script.schema.ts +0 -235
- package/src/schemas/snapshot.schema.ts +0 -55
- package/src/schemas/store-visit.schema.ts +0 -68
- package/src/schemas/store.schema.ts +0 -52
- package/src/schemas/supplier.schema.ts +0 -12
- package/src/schemas/tag.schema.ts +0 -26
- package/src/schemas/task.schema.ts +0 -205
- package/src/schemas/token.schema.ts +0 -42
- package/src/schemas/trigger.schema.ts +0 -48
- package/src/schemas/user.schema.ts +0 -59
- package/src/schemas/webhook.schema.ts +0 -81
- package/src/utils/merge-metrics-breakdown.util.ts +0 -51
- package/src/utils/normalize-content-link.util.ts +0 -31
- package/tsconfig.build.json +0 -5
- package/tsconfig.json +0 -29
package/dist/index.d.ts
CHANGED
|
@@ -1,42 +1,42 @@
|
|
|
1
|
-
export * from
|
|
2
|
-
export * from
|
|
3
|
-
export * from
|
|
4
|
-
export * from
|
|
5
|
-
export * from
|
|
6
|
-
export * from
|
|
7
|
-
export * from
|
|
8
|
-
export * from
|
|
9
|
-
export * from
|
|
10
|
-
export * from
|
|
11
|
-
export * from
|
|
12
|
-
export * from
|
|
13
|
-
export * from
|
|
14
|
-
export * from
|
|
15
|
-
export * from
|
|
16
|
-
export * from
|
|
17
|
-
export * from
|
|
18
|
-
export * from
|
|
19
|
-
export * from
|
|
20
|
-
export * from
|
|
21
|
-
export * from
|
|
22
|
-
export * from
|
|
23
|
-
export * from
|
|
24
|
-
export * from
|
|
25
|
-
export * from
|
|
26
|
-
export * from
|
|
27
|
-
export * from
|
|
28
|
-
export * from
|
|
29
|
-
export * from
|
|
30
|
-
export * from
|
|
31
|
-
export * from
|
|
32
|
-
export { Note, NoteSchema, NoteMention, NoteMentionSchema } from
|
|
33
|
-
export * from
|
|
34
|
-
export * from
|
|
35
|
-
export * from
|
|
36
|
-
export * from
|
|
37
|
-
export * from
|
|
38
|
-
export * from
|
|
39
|
-
export * from
|
|
40
|
-
export * from
|
|
41
|
-
export * from
|
|
42
|
-
export * from
|
|
1
|
+
export * from "./schemas/responsible.schema";
|
|
2
|
+
export * from "./schemas/action.schema";
|
|
3
|
+
export * from "./schemas/prospect.schema";
|
|
4
|
+
export * from "./schemas/client.schema";
|
|
5
|
+
export * from "./schemas/content.schema";
|
|
6
|
+
export * from "./schemas/comment.schema";
|
|
7
|
+
export * from "./schemas/influencer.schema";
|
|
8
|
+
export * from "./schemas/supplier.schema";
|
|
9
|
+
export * from "./schemas/campaign.schema";
|
|
10
|
+
export * from "./schemas/payment.schema";
|
|
11
|
+
export * from "./schemas/profile.schema";
|
|
12
|
+
export * from "./schemas/recruitment.schema";
|
|
13
|
+
export * from "./schemas/task.schema";
|
|
14
|
+
export * from "./schemas/script.schema";
|
|
15
|
+
export * from "./schemas/creative.schema";
|
|
16
|
+
export * from "./schemas/assignment.schema";
|
|
17
|
+
export * from "./schemas/token.schema";
|
|
18
|
+
export * from "./schemas/webhook.schema";
|
|
19
|
+
export * from "./schemas/sale.schema";
|
|
20
|
+
export * from "./schemas/invoice.schema";
|
|
21
|
+
export * from "./schemas/log.schema";
|
|
22
|
+
export * from "./schemas/project.schema";
|
|
23
|
+
export * from "./schemas/commission.schema";
|
|
24
|
+
export * from "./schemas/contract.schema";
|
|
25
|
+
export * from "./schemas/benchmark.schema";
|
|
26
|
+
export * from "./schemas/notifications.schema";
|
|
27
|
+
export * from "./schemas/organization.schema";
|
|
28
|
+
export * from "./schemas/user.schema";
|
|
29
|
+
export * from "./schemas/group.schema";
|
|
30
|
+
export * from "./schemas/tag.schema";
|
|
31
|
+
export * from "./schemas/trigger.schema";
|
|
32
|
+
export { Note, NoteSchema, NoteMention, NoteMentionSchema } from "./schemas/note.schema";
|
|
33
|
+
export * from "./schemas/content-capture-process.schema";
|
|
34
|
+
export * from "./schemas/content-draft.schema";
|
|
35
|
+
export * from "./schemas/export-comments-job.schema";
|
|
36
|
+
export * from "./schemas/job.schema";
|
|
37
|
+
export * from "./schemas/snapshot.schema";
|
|
38
|
+
export * from "./schemas/lead.schema";
|
|
39
|
+
export * from "./schemas/store.schema";
|
|
40
|
+
export * from "./schemas/store-visit.schema";
|
|
41
|
+
export * from "./utils/normalize-content-link.util";
|
|
42
|
+
export * from "./utils/merge-metrics-breakdown.util";
|
|
@@ -1,36 +1,11 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
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/session" />
|
|
19
|
-
/// <reference types="mongoose/types/types" />
|
|
20
|
-
/// <reference types="mongoose/types/utility" />
|
|
21
|
-
/// <reference types="mongoose/types/validation" />
|
|
22
|
-
/// <reference types="mongoose/types/virtuals" />
|
|
23
|
-
/// <reference types="mongoose/types/schematypes" />
|
|
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, ClientMetricGoal } from './client.schema';
|
|
30
|
-
import { Sale } from './sale.schema';
|
|
31
|
-
import { Campaign } from './campaign.schema';
|
|
32
|
-
import { Note } from './note.schema';
|
|
33
|
-
import { Responsible } from './responsible.schema';
|
|
1
|
+
import { HydratedDocument, Schema as MongooseSchema, Types } from "mongoose";
|
|
2
|
+
import { Recruitment } from "./recruitment.schema";
|
|
3
|
+
import { Content } from "./content.schema";
|
|
4
|
+
import { Client, ClientMetricGoal } from "./client.schema";
|
|
5
|
+
import { Sale } from "./sale.schema";
|
|
6
|
+
import { Campaign } from "./campaign.schema";
|
|
7
|
+
import { Note } from "./note.schema";
|
|
8
|
+
import { Responsible } from "./responsible.schema";
|
|
34
9
|
export type ActionDocument = HydratedDocument<Action>;
|
|
35
10
|
export declare const ACTION_BUSINESS_UNIT_VALUES: readonly ["service", "comercial", "squad_a", "squad_b"];
|
|
36
11
|
export type ActionBusinessUnit = (typeof ACTION_BUSINESS_UNIT_VALUES)[number];
|
|
@@ -100,7 +75,7 @@ export declare class Action {
|
|
|
100
75
|
endDate: Date;
|
|
101
76
|
nps?: number;
|
|
102
77
|
status: ActionStatus;
|
|
103
|
-
partnership:
|
|
78
|
+
partnership: "partner" | "exclusive";
|
|
104
79
|
/** Ver ACTION_KIND_VALUES. organic: post aprovado numa Ação de produto sai dela (GD-699). */
|
|
105
80
|
type: ActionKind;
|
|
106
81
|
socialnetworks?: string[];
|
|
@@ -20,16 +20,15 @@ const sale_schema_1 = require("./sale.schema");
|
|
|
20
20
|
const campaign_schema_1 = require("./campaign.schema");
|
|
21
21
|
const note_schema_1 = require("./note.schema");
|
|
22
22
|
const responsible_schema_1 = require("./responsible.schema");
|
|
23
|
-
exports.ACTION_BUSINESS_UNIT_VALUES = [
|
|
24
|
-
'service',
|
|
25
|
-
'comercial',
|
|
26
|
-
'squad_a',
|
|
27
|
-
'squad_b',
|
|
28
|
-
];
|
|
23
|
+
exports.ACTION_BUSINESS_UNIT_VALUES = ["service", "comercial", "squad_a", "squad_b"];
|
|
29
24
|
let ActionPromptConfig = class ActionPromptConfig {
|
|
30
25
|
};
|
|
26
|
+
exports.ActionPromptConfig = ActionPromptConfig;
|
|
31
27
|
__decorate([
|
|
32
|
-
(0, swagger_1.ApiProperty)({
|
|
28
|
+
(0, swagger_1.ApiProperty)({
|
|
29
|
+
required: false,
|
|
30
|
+
description: "Contexto da campanha (cliente, influencer, produto) para os prompts de classificação de comentário por IA",
|
|
31
|
+
}),
|
|
33
32
|
(0, mongoose_1.Prop)({ type: String, required: false }),
|
|
34
33
|
__metadata("design:type", String)
|
|
35
34
|
], ActionPromptConfig.prototype, "context", void 0);
|
|
@@ -39,22 +38,34 @@ __decorate([
|
|
|
39
38
|
__metadata("design:type", String)
|
|
40
39
|
], ActionPromptConfig.prototype, "targetPrompt", void 0);
|
|
41
40
|
__decorate([
|
|
42
|
-
(0, swagger_1.ApiProperty)({
|
|
41
|
+
(0, swagger_1.ApiProperty)({
|
|
42
|
+
required: false,
|
|
43
|
+
description: 'Prompt customizado do estágio "assunto" (subject) para o grupo Influencer',
|
|
44
|
+
}),
|
|
43
45
|
(0, mongoose_1.Prop)({ type: String, required: false }),
|
|
44
46
|
__metadata("design:type", String)
|
|
45
47
|
], ActionPromptConfig.prototype, "influencerPrompt", void 0);
|
|
46
48
|
__decorate([
|
|
47
|
-
(0, swagger_1.ApiProperty)({
|
|
49
|
+
(0, swagger_1.ApiProperty)({
|
|
50
|
+
required: false,
|
|
51
|
+
description: 'Prompt customizado do estágio "assunto" (subject) para o grupo Marca',
|
|
52
|
+
}),
|
|
48
53
|
(0, mongoose_1.Prop)({ type: String, required: false }),
|
|
49
54
|
__metadata("design:type", String)
|
|
50
55
|
], ActionPromptConfig.prototype, "brandPrompt", void 0);
|
|
51
56
|
__decorate([
|
|
52
|
-
(0, swagger_1.ApiProperty)({
|
|
57
|
+
(0, swagger_1.ApiProperty)({
|
|
58
|
+
required: false,
|
|
59
|
+
description: 'Prompt customizado do estágio "assunto" (subject) para o grupo Conteúdo',
|
|
60
|
+
}),
|
|
53
61
|
(0, mongoose_1.Prop)({ type: String, required: false }),
|
|
54
62
|
__metadata("design:type", String)
|
|
55
63
|
], ActionPromptConfig.prototype, "contentPrompt", void 0);
|
|
56
64
|
__decorate([
|
|
57
|
-
(0, swagger_1.ApiProperty)({
|
|
65
|
+
(0, swagger_1.ApiProperty)({
|
|
66
|
+
required: false,
|
|
67
|
+
description: 'Prompt customizado do estágio "polaridade" (polarity)',
|
|
68
|
+
}),
|
|
58
69
|
(0, mongoose_1.Prop)({ type: String, required: false }),
|
|
59
70
|
__metadata("design:type", String)
|
|
60
71
|
], ActionPromptConfig.prototype, "polarityPrompt", void 0);
|
|
@@ -63,17 +74,16 @@ __decorate([
|
|
|
63
74
|
(0, mongoose_1.Prop)({ type: String, required: false }),
|
|
64
75
|
__metadata("design:type", String)
|
|
65
76
|
], ActionPromptConfig.prototype, "funnelPrompt", void 0);
|
|
66
|
-
ActionPromptConfig = __decorate([
|
|
77
|
+
exports.ActionPromptConfig = ActionPromptConfig = __decorate([
|
|
67
78
|
(0, mongoose_1.Schema)({ _id: false })
|
|
68
79
|
], ActionPromptConfig);
|
|
69
|
-
exports.ActionPromptConfig = ActionPromptConfig;
|
|
70
80
|
exports.ActionPromptConfigSchema = mongoose_1.SchemaFactory.createForClass(ActionPromptConfig);
|
|
71
81
|
exports.ACTION_STATUS_VALUES = [
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
82
|
+
"config",
|
|
83
|
+
"inProgress",
|
|
84
|
+
"finished",
|
|
85
|
+
"archived",
|
|
86
|
+
"cancelled",
|
|
77
87
|
];
|
|
78
88
|
/**
|
|
79
89
|
* Tipo da Ação (Action.type). O nome evita confusão com o ACTION_TYPE_VALUES
|
|
@@ -83,7 +93,7 @@ exports.ACTION_STATUS_VALUES = [
|
|
|
83
93
|
* - annual: Ação anual da Samsung, fora da captura diária, atualizada só pelo
|
|
84
94
|
* modo metrics-only do content-capture-worker.
|
|
85
95
|
*/
|
|
86
|
-
exports.ACTION_KIND_VALUES = [
|
|
96
|
+
exports.ACTION_KIND_VALUES = ["seeding", "ugc", "influency", "organic", "annual"];
|
|
87
97
|
/**
|
|
88
98
|
* Fase da Ação (antigo briefing do genc). Com `_id` porque o Conteúdo aponta
|
|
89
99
|
* para ela (`Content.phase`). Período e hashtags opcionais fazem a captura
|
|
@@ -92,22 +102,26 @@ exports.ACTION_KIND_VALUES = ['seeding', 'ugc', 'influency', 'organic', 'annual'
|
|
|
92
102
|
*/
|
|
93
103
|
let ActionPhase = class ActionPhase {
|
|
94
104
|
};
|
|
105
|
+
exports.ActionPhase = ActionPhase;
|
|
95
106
|
__decorate([
|
|
96
|
-
(0, swagger_1.ApiProperty)({ example:
|
|
107
|
+
(0, swagger_1.ApiProperty)({ example: "6710a1b2c3d4e5f601234567" }),
|
|
97
108
|
__metadata("design:type", mongoose_2.Types.ObjectId)
|
|
98
109
|
], ActionPhase.prototype, "_id", void 0);
|
|
99
110
|
__decorate([
|
|
100
|
-
(0, swagger_1.ApiProperty)({ example:
|
|
111
|
+
(0, swagger_1.ApiProperty)({ example: "Lançamento" }),
|
|
101
112
|
(0, mongoose_1.Prop)({ type: String, required: true }),
|
|
102
113
|
__metadata("design:type", String)
|
|
103
114
|
], ActionPhase.prototype, "name", void 0);
|
|
104
115
|
__decorate([
|
|
105
|
-
(0, swagger_1.ApiProperty)({ example:
|
|
116
|
+
(0, swagger_1.ApiProperty)({ example: "#2563eb" }),
|
|
106
117
|
(0, mongoose_1.Prop)({ type: String, required: true }),
|
|
107
118
|
__metadata("design:type", String)
|
|
108
119
|
], ActionPhase.prototype, "color", void 0);
|
|
109
120
|
__decorate([
|
|
110
|
-
(0, swagger_1.ApiProperty)({
|
|
121
|
+
(0, swagger_1.ApiProperty)({
|
|
122
|
+
example: 0,
|
|
123
|
+
description: "Prioridade quando Fases se sobrepõem (menor vale primeiro)",
|
|
124
|
+
}),
|
|
111
125
|
(0, mongoose_1.Prop)({ type: Number, required: true }),
|
|
112
126
|
__metadata("design:type", Number)
|
|
113
127
|
], ActionPhase.prototype, "order", void 0);
|
|
@@ -122,95 +136,95 @@ __decorate([
|
|
|
122
136
|
__metadata("design:type", Object)
|
|
123
137
|
], ActionPhase.prototype, "endDate", void 0);
|
|
124
138
|
__decorate([
|
|
125
|
-
(0, swagger_1.ApiProperty)({ type: [String], example: [
|
|
139
|
+
(0, swagger_1.ApiProperty)({ type: [String], example: ["galaxys26"] }),
|
|
126
140
|
(0, mongoose_1.Prop)({ type: [String], default: [] }),
|
|
127
141
|
__metadata("design:type", Array)
|
|
128
142
|
], ActionPhase.prototype, "hashtags", void 0);
|
|
129
|
-
ActionPhase = __decorate([
|
|
143
|
+
exports.ActionPhase = ActionPhase = __decorate([
|
|
130
144
|
(0, mongoose_1.Schema)()
|
|
131
145
|
], ActionPhase);
|
|
132
|
-
exports.ActionPhase = ActionPhase;
|
|
133
146
|
exports.ActionPhaseSchema = mongoose_1.SchemaFactory.createForClass(ActionPhase);
|
|
134
147
|
let Action = class Action {
|
|
135
148
|
};
|
|
149
|
+
exports.Action = Action;
|
|
136
150
|
__decorate([
|
|
137
|
-
(0, swagger_1.ApiProperty)({ example:
|
|
151
|
+
(0, swagger_1.ApiProperty)({ example: "64bfc3a78d3f1e2a12345678" }),
|
|
138
152
|
(0, mongoose_1.Prop)({ type: mongoose_2.Schema.Types.ObjectId, auto: true, required: false }),
|
|
139
153
|
__metadata("design:type", mongoose_2.Types.ObjectId)
|
|
140
154
|
], Action.prototype, "_id", void 0);
|
|
141
155
|
__decorate([
|
|
142
|
-
(0, swagger_1.ApiProperty)({ example:
|
|
156
|
+
(0, swagger_1.ApiProperty)({ example: "Campanha Black Friday" }),
|
|
143
157
|
(0, mongoose_1.Prop)({ type: String, required: true }),
|
|
144
158
|
__metadata("design:type", String)
|
|
145
159
|
], Action.prototype, "title", void 0);
|
|
146
160
|
__decorate([
|
|
147
|
-
(0, swagger_1.ApiProperty)({ example:
|
|
161
|
+
(0, swagger_1.ApiProperty)({ example: "https://image.url/thumb.png", required: false }),
|
|
148
162
|
(0, mongoose_1.Prop)({ type: String, required: false }),
|
|
149
163
|
__metadata("design:type", String)
|
|
150
164
|
], Action.prototype, "thumbnail", void 0);
|
|
151
165
|
__decorate([
|
|
152
|
-
(0, swagger_1.ApiProperty)({ example:
|
|
166
|
+
(0, swagger_1.ApiProperty)({ example: "2025-11-01T00:00:00.000Z" }),
|
|
153
167
|
(0, mongoose_1.Prop)({ type: Date, required: true }),
|
|
154
168
|
__metadata("design:type", Date)
|
|
155
169
|
], Action.prototype, "startDate", void 0);
|
|
156
170
|
__decorate([
|
|
157
|
-
(0, swagger_1.ApiProperty)({ example:
|
|
171
|
+
(0, swagger_1.ApiProperty)({ example: "2025-11-30T23:59:59.000Z" }),
|
|
158
172
|
(0, mongoose_1.Prop)({ type: Date, required: true }),
|
|
159
173
|
__metadata("design:type", Date)
|
|
160
174
|
], Action.prototype, "endDate", void 0);
|
|
161
175
|
__decorate([
|
|
162
|
-
(0, swagger_1.ApiProperty)({ example: 8, description:
|
|
176
|
+
(0, swagger_1.ApiProperty)({ example: 8, description: "NPS da campanha" }),
|
|
163
177
|
(0, mongoose_1.Prop)({ type: Number, required: false }),
|
|
164
178
|
__metadata("design:type", Number)
|
|
165
179
|
], Action.prototype, "nps", void 0);
|
|
166
180
|
__decorate([
|
|
167
|
-
(0, swagger_1.ApiProperty)({ enum: exports.ACTION_STATUS_VALUES, example:
|
|
181
|
+
(0, swagger_1.ApiProperty)({ enum: exports.ACTION_STATUS_VALUES, example: "config" }),
|
|
168
182
|
(0, mongoose_1.Prop)({
|
|
169
183
|
type: String,
|
|
170
184
|
enum: exports.ACTION_STATUS_VALUES,
|
|
171
|
-
default:
|
|
185
|
+
default: "config",
|
|
172
186
|
required: true,
|
|
173
187
|
}),
|
|
174
188
|
__metadata("design:type", String)
|
|
175
189
|
], Action.prototype, "status", void 0);
|
|
176
190
|
__decorate([
|
|
177
|
-
(0, swagger_1.ApiProperty)({ enum: [
|
|
178
|
-
(0, mongoose_1.Prop)({ type: String, enum: [
|
|
191
|
+
(0, swagger_1.ApiProperty)({ enum: ["partner", "exclusive"], example: "partner" }),
|
|
192
|
+
(0, mongoose_1.Prop)({ type: String, enum: ["partner", "exclusive"], required: true }),
|
|
179
193
|
__metadata("design:type", String)
|
|
180
194
|
], Action.prototype, "partnership", void 0);
|
|
181
195
|
__decorate([
|
|
182
|
-
(0, swagger_1.ApiProperty)({ enum: exports.ACTION_KIND_VALUES, example:
|
|
196
|
+
(0, swagger_1.ApiProperty)({ enum: exports.ACTION_KIND_VALUES, example: "seeding" }),
|
|
183
197
|
(0, mongoose_1.Prop)({ type: String, enum: exports.ACTION_KIND_VALUES, required: true }),
|
|
184
198
|
__metadata("design:type", String)
|
|
185
199
|
], Action.prototype, "type", void 0);
|
|
186
200
|
__decorate([
|
|
187
|
-
(0, swagger_1.ApiProperty)({ example: [
|
|
201
|
+
(0, swagger_1.ApiProperty)({ example: ["instagram", "tiktok"], required: false }),
|
|
188
202
|
(0, mongoose_1.Prop)({ type: [String], required: false }),
|
|
189
203
|
__metadata("design:type", Array)
|
|
190
204
|
], Action.prototype, "socialnetworks", void 0);
|
|
191
205
|
__decorate([
|
|
192
|
-
(0, swagger_1.ApiProperty)({ example: 50, description:
|
|
206
|
+
(0, swagger_1.ApiProperty)({ example: 50, description: "Número de influenciadores recrutados" }),
|
|
193
207
|
(0, mongoose_1.Prop)({ type: Number, default: 0, required: false }),
|
|
194
208
|
__metadata("design:type", Number)
|
|
195
209
|
], Action.prototype, "recruitedInfluencers", void 0);
|
|
196
210
|
__decorate([
|
|
197
|
-
(0, swagger_1.ApiProperty)({ example: 40, description:
|
|
211
|
+
(0, swagger_1.ApiProperty)({ example: 40, description: "Número de influenciadores contratados" }),
|
|
198
212
|
(0, mongoose_1.Prop)({ type: Number, default: 0, required: false }),
|
|
199
213
|
__metadata("design:type", Number)
|
|
200
214
|
], Action.prototype, "hiredInfluencers", void 0);
|
|
201
215
|
__decorate([
|
|
202
|
-
(0, swagger_1.ApiProperty)({ example: 100, description:
|
|
216
|
+
(0, swagger_1.ApiProperty)({ example: 100, description: "Número de conteúdos produzidos" }),
|
|
203
217
|
(0, mongoose_1.Prop)({ type: Number, default: 0, required: false }),
|
|
204
218
|
__metadata("design:type", Number)
|
|
205
219
|
], Action.prototype, "producedContent", void 0);
|
|
206
220
|
__decorate([
|
|
207
|
-
(0, swagger_1.ApiProperty)({ example: 80, description:
|
|
221
|
+
(0, swagger_1.ApiProperty)({ example: 80, description: "Número de conteúdos contratados" }),
|
|
208
222
|
(0, mongoose_1.Prop)({ type: Number, default: 0, required: false }),
|
|
209
223
|
__metadata("design:type", Number)
|
|
210
224
|
], Action.prototype, "hiredContent", void 0);
|
|
211
225
|
__decorate([
|
|
212
226
|
(0, swagger_1.ApiProperty)({ type: () => client_schema_1.Client }),
|
|
213
|
-
(0, mongoose_1.Prop)({ type: mongoose_2.Schema.Types.ObjectId, ref:
|
|
227
|
+
(0, mongoose_1.Prop)({ type: mongoose_2.Schema.Types.ObjectId, ref: "Client", required: true }),
|
|
214
228
|
__metadata("design:type", Object)
|
|
215
229
|
], Action.prototype, "client", void 0);
|
|
216
230
|
__decorate([
|
|
@@ -218,7 +232,7 @@ __decorate([
|
|
|
218
232
|
(0, mongoose_1.Prop)([
|
|
219
233
|
{
|
|
220
234
|
type: mongoose_2.Schema.Types.ObjectId,
|
|
221
|
-
ref:
|
|
235
|
+
ref: "Recruitment",
|
|
222
236
|
required: false,
|
|
223
237
|
},
|
|
224
238
|
]),
|
|
@@ -229,30 +243,30 @@ __decorate([
|
|
|
229
243
|
(0, mongoose_1.Prop)([
|
|
230
244
|
{
|
|
231
245
|
type: mongoose_2.Schema.Types.ObjectId,
|
|
232
|
-
ref:
|
|
246
|
+
ref: "Content",
|
|
233
247
|
required: false,
|
|
234
248
|
},
|
|
235
249
|
]),
|
|
236
250
|
__metadata("design:type", Array)
|
|
237
251
|
], Action.prototype, "contents", void 0);
|
|
238
252
|
__decorate([
|
|
239
|
-
(0, swagger_1.ApiProperty)({ example:
|
|
253
|
+
(0, swagger_1.ApiProperty)({ example: "Cluster A" }),
|
|
240
254
|
(0, mongoose_1.Prop)({ type: String, required: true }),
|
|
241
255
|
__metadata("design:type", String)
|
|
242
256
|
], Action.prototype, "cluster", void 0);
|
|
243
257
|
__decorate([
|
|
244
|
-
(0, swagger_1.ApiProperty)({ example:
|
|
258
|
+
(0, swagger_1.ApiProperty)({ example: "Shopping Center Norte", required: false }),
|
|
245
259
|
(0, mongoose_1.Prop)({ type: String, required: false }),
|
|
246
260
|
__metadata("design:type", String)
|
|
247
261
|
], Action.prototype, "shopping", void 0);
|
|
248
262
|
__decorate([
|
|
249
|
-
(0, swagger_1.ApiProperty)({ example:
|
|
263
|
+
(0, swagger_1.ApiProperty)({ example: "Projeto Verão 2025", required: false }),
|
|
250
264
|
(0, mongoose_1.Prop)({ type: String, required: false }),
|
|
251
265
|
__metadata("design:type", String)
|
|
252
266
|
], Action.prototype, "project", void 0);
|
|
253
267
|
__decorate([
|
|
254
268
|
(0, swagger_1.ApiProperty)({ type: () => sale_schema_1.Sale }),
|
|
255
|
-
(0, mongoose_1.Prop)({ type: mongoose_2.Schema.Types.ObjectId, ref:
|
|
269
|
+
(0, mongoose_1.Prop)({ type: mongoose_2.Schema.Types.ObjectId, ref: "Sale" }),
|
|
256
270
|
__metadata("design:type", Object)
|
|
257
271
|
], Action.prototype, "sale", void 0);
|
|
258
272
|
__decorate([
|
|
@@ -265,17 +279,17 @@ __decorate([
|
|
|
265
279
|
__metadata("design:type", Array)
|
|
266
280
|
], Action.prototype, "responsible", void 0);
|
|
267
281
|
__decorate([
|
|
268
|
-
(0, swagger_1.ApiProperty)({ example:
|
|
282
|
+
(0, swagger_1.ApiProperty)({ example: "@brand", required: false }),
|
|
269
283
|
(0, mongoose_1.Prop)({ type: String, required: false }),
|
|
270
284
|
__metadata("design:type", String)
|
|
271
285
|
], Action.prototype, "brandUsername", void 0);
|
|
272
286
|
__decorate([
|
|
273
|
-
(0, swagger_1.ApiProperty)({ example:
|
|
287
|
+
(0, swagger_1.ApiProperty)({ example: "2025-08-29T15:00:00.000Z" }),
|
|
274
288
|
(0, mongoose_1.Prop)({ type: Date, default: Date.now, required: false }),
|
|
275
289
|
__metadata("design:type", Date)
|
|
276
290
|
], Action.prototype, "createdAt", void 0);
|
|
277
291
|
__decorate([
|
|
278
|
-
(0, swagger_1.ApiProperty)({ example:
|
|
292
|
+
(0, swagger_1.ApiProperty)({ example: "2025-08-29T15:00:00.000Z" }),
|
|
279
293
|
(0, mongoose_1.Prop)({ type: Date, default: Date.now, required: false }),
|
|
280
294
|
__metadata("design:type", Date)
|
|
281
295
|
], Action.prototype, "updatedAt", void 0);
|
|
@@ -285,7 +299,7 @@ __decorate([
|
|
|
285
299
|
__metadata("design:type", Array)
|
|
286
300
|
], Action.prototype, "notes", void 0);
|
|
287
301
|
__decorate([
|
|
288
|
-
(0, swagger_1.ApiProperty)({ example:
|
|
302
|
+
(0, swagger_1.ApiProperty)({ example: "12345", required: false }),
|
|
289
303
|
(0, mongoose_1.Prop)({ type: String, required: false }),
|
|
290
304
|
__metadata("design:type", String)
|
|
291
305
|
], Action.prototype, "primetagId", void 0);
|
|
@@ -295,22 +309,22 @@ __decorate([
|
|
|
295
309
|
__metadata("design:type", Boolean)
|
|
296
310
|
], Action.prototype, "hasGenIAAnalysis", void 0);
|
|
297
311
|
__decorate([
|
|
298
|
-
(0, swagger_1.ApiProperty)({ example: [
|
|
312
|
+
(0, swagger_1.ApiProperty)({ example: ["#trending", "#viral"], required: false }),
|
|
299
313
|
(0, mongoose_1.Prop)({ type: [String], required: false }),
|
|
300
314
|
__metadata("design:type", Array)
|
|
301
315
|
], Action.prototype, "hashtags", void 0);
|
|
302
316
|
__decorate([
|
|
303
|
-
(0, swagger_1.ApiProperty)({ example: [
|
|
317
|
+
(0, swagger_1.ApiProperty)({ example: ["@influencer", "@brand"], required: false }),
|
|
304
318
|
(0, mongoose_1.Prop)({ type: [String], required: false }),
|
|
305
319
|
__metadata("design:type", Array)
|
|
306
320
|
], Action.prototype, "instagramMentions", void 0);
|
|
307
321
|
__decorate([
|
|
308
|
-
(0, swagger_1.ApiProperty)({ example: [
|
|
322
|
+
(0, swagger_1.ApiProperty)({ example: ["@influencer", "@brand"], required: false }),
|
|
309
323
|
(0, mongoose_1.Prop)({ type: [String], required: false }),
|
|
310
324
|
__metadata("design:type", Array)
|
|
311
325
|
], Action.prototype, "tiktokMentions", void 0);
|
|
312
326
|
__decorate([
|
|
313
|
-
(0, swagger_1.ApiProperty)({ example: [
|
|
327
|
+
(0, swagger_1.ApiProperty)({ example: ["produto", "categoria"], required: false }),
|
|
314
328
|
(0, mongoose_1.Prop)({ type: [String], required: false }),
|
|
315
329
|
__metadata("design:type", Array)
|
|
316
330
|
], Action.prototype, "keywords", void 0);
|
|
@@ -325,16 +339,20 @@ __decorate([
|
|
|
325
339
|
], Action.prototype, "businessUnit", void 0);
|
|
326
340
|
__decorate([
|
|
327
341
|
(0, swagger_1.ApiProperty)({ type: () => campaign_schema_1.Campaign, required: false }),
|
|
328
|
-
(0, mongoose_1.Prop)({ type: mongoose_2.Schema.Types.ObjectId, ref:
|
|
342
|
+
(0, mongoose_1.Prop)({ type: mongoose_2.Schema.Types.ObjectId, ref: "Campaign", required: false }),
|
|
329
343
|
__metadata("design:type", Object)
|
|
330
344
|
], Action.prototype, "campaign", void 0);
|
|
331
345
|
__decorate([
|
|
332
|
-
(0, swagger_1.ApiProperty)({
|
|
346
|
+
(0, swagger_1.ApiProperty)({
|
|
347
|
+
type: () => ActionPromptConfig,
|
|
348
|
+
required: false,
|
|
349
|
+
description: "Customização de prompts de classificação de comentário por IA para esta action — campos ausentes caem no prompt genérico default",
|
|
350
|
+
}),
|
|
333
351
|
(0, mongoose_1.Prop)({ type: exports.ActionPromptConfigSchema, required: false, default: null }),
|
|
334
352
|
__metadata("design:type", Object)
|
|
335
353
|
], Action.prototype, "promptConfig", void 0);
|
|
336
354
|
__decorate([
|
|
337
|
-
(0, swagger_1.ApiProperty)({ type: [String], required: false, example: [
|
|
355
|
+
(0, swagger_1.ApiProperty)({ type: [String], required: false, example: ["galaxymoments"] }),
|
|
338
356
|
(0, mongoose_1.Prop)({ type: [String], default: [] }),
|
|
339
357
|
__metadata("design:type", Array)
|
|
340
358
|
], Action.prototype, "organicHashtags", void 0);
|
|
@@ -353,16 +371,15 @@ __decorate([
|
|
|
353
371
|
(0, mongoose_1.Prop)({ type: Boolean, default: false }),
|
|
354
372
|
__metadata("design:type", Boolean)
|
|
355
373
|
], Action.prototype, "hideFromReports", void 0);
|
|
356
|
-
Action = __decorate([
|
|
374
|
+
exports.Action = Action = __decorate([
|
|
357
375
|
(0, mongoose_1.Schema)({ timestamps: true })
|
|
358
376
|
], Action);
|
|
359
|
-
exports.Action = Action;
|
|
360
377
|
exports.ActionSchema = mongoose_1.SchemaFactory.createForClass(Action);
|
|
361
378
|
exports.ActionSchema.index({ organization: 1, status: 1 });
|
|
362
379
|
exports.ActionSchema.index({ organization: 1, client: 1 });
|
|
363
380
|
exports.ActionSchema.index({ organization: 1, sale: 1 });
|
|
364
381
|
exports.ActionSchema.index({ sale: 1 });
|
|
365
382
|
exports.ActionSchema.index({ organization: 1, startDate: 1, endDate: 1 });
|
|
366
|
-
exports.ActionSchema.index({
|
|
383
|
+
exports.ActionSchema.index({ "responsible.email": 1 });
|
|
367
384
|
exports.ActionSchema.index({ campaign: 1 });
|
|
368
|
-
exports.ActionModel = (0, mongoose_2.model)(
|
|
385
|
+
exports.ActionModel = (0, mongoose_2.model)("Action", exports.ActionSchema);
|
|
@@ -1,31 +1,6 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
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/session" />
|
|
19
|
-
/// <reference types="mongoose/types/types" />
|
|
20
|
-
/// <reference types="mongoose/types/utility" />
|
|
21
|
-
/// <reference types="mongoose/types/validation" />
|
|
22
|
-
/// <reference types="mongoose/types/virtuals" />
|
|
23
|
-
/// <reference types="mongoose/types/schematypes" />
|
|
24
|
-
/// <reference types="mongoose/types/inferschematype" />
|
|
25
|
-
/// <reference types="mongoose/types/inferrawdoctype" />
|
|
26
|
-
import { HydratedDocument, Schema as MongooseSchema, Types } from 'mongoose';
|
|
27
|
-
import { Action } from './action.schema';
|
|
28
|
-
import { Responsible } from './responsible.schema';
|
|
1
|
+
import { HydratedDocument, Schema as MongooseSchema, Types } from "mongoose";
|
|
2
|
+
import { Action } from "./action.schema";
|
|
3
|
+
import { Responsible } from "./responsible.schema";
|
|
29
4
|
export type AssignmentDocument = HydratedDocument<Assignment>;
|
|
30
5
|
export declare const ASSIGNMENT_TYPE_VALUES: readonly ["report", "curation", "opt-in", "metrics-monitoring", "data-update", "study"];
|
|
31
6
|
export type AssignmentType = (typeof ASSIGNMENT_TYPE_VALUES)[number];
|