@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
|
@@ -14,6 +14,7 @@ const mongoose_1 = require("@nestjs/mongoose");
|
|
|
14
14
|
const mongoose_2 = require("mongoose");
|
|
15
15
|
let Commission = class Commission {
|
|
16
16
|
};
|
|
17
|
+
exports.Commission = Commission;
|
|
17
18
|
__decorate([
|
|
18
19
|
(0, mongoose_1.Prop)({ type: mongoose_2.Schema.Types.ObjectId, auto: true, required: false }),
|
|
19
20
|
__metadata("design:type", mongoose_2.Types.ObjectId)
|
|
@@ -33,8 +34,8 @@ __decorate([
|
|
|
33
34
|
__decorate([
|
|
34
35
|
(0, mongoose_1.Prop)({
|
|
35
36
|
type: String,
|
|
36
|
-
enum: [
|
|
37
|
-
default:
|
|
37
|
+
enum: ["origination", "commercial", "planning", "curation"],
|
|
38
|
+
default: "origination",
|
|
38
39
|
required: true,
|
|
39
40
|
}),
|
|
40
41
|
__metadata("design:type", String)
|
|
@@ -50,8 +51,8 @@ __decorate([
|
|
|
50
51
|
__decorate([
|
|
51
52
|
(0, mongoose_1.Prop)({
|
|
52
53
|
type: String,
|
|
53
|
-
enum: [
|
|
54
|
-
default:
|
|
54
|
+
enum: ["pending", "approved", "ready", "received", "paid", "cancelled", "disputed", "reproved"],
|
|
55
|
+
default: "pending",
|
|
55
56
|
required: true,
|
|
56
57
|
}),
|
|
57
58
|
__metadata("design:type", String)
|
|
@@ -59,13 +60,13 @@ __decorate([
|
|
|
59
60
|
__decorate([
|
|
60
61
|
(0, mongoose_1.Prop)({
|
|
61
62
|
type: String,
|
|
62
|
-
enum: [
|
|
63
|
+
enum: ["collaborator", "agency", "bonus"],
|
|
63
64
|
required: true,
|
|
64
65
|
}),
|
|
65
66
|
__metadata("design:type", String)
|
|
66
67
|
], Commission.prototype, "type", void 0);
|
|
67
68
|
__decorate([
|
|
68
|
-
(0, mongoose_1.Prop)({ type: mongoose_2.Schema.Types.ObjectId, ref:
|
|
69
|
+
(0, mongoose_1.Prop)({ type: mongoose_2.Schema.Types.ObjectId, ref: "Sale", required: false }),
|
|
69
70
|
__metadata("design:type", Object)
|
|
70
71
|
], Commission.prototype, "sale", void 0);
|
|
71
72
|
__decorate([
|
|
@@ -117,17 +118,16 @@ __decorate([
|
|
|
117
118
|
__metadata("design:type", mongoose_2.Types.ObjectId)
|
|
118
119
|
], Commission.prototype, "organization", void 0);
|
|
119
120
|
__decorate([
|
|
120
|
-
(0, mongoose_1.Prop)({ type: mongoose_2.Schema.Types.ObjectId, ref:
|
|
121
|
+
(0, mongoose_1.Prop)({ type: mongoose_2.Schema.Types.ObjectId, ref: "Payment", required: false }),
|
|
121
122
|
__metadata("design:type", mongoose_2.Types.ObjectId)
|
|
122
123
|
], Commission.prototype, "payment", void 0);
|
|
123
|
-
Commission = __decorate([
|
|
124
|
+
exports.Commission = Commission = __decorate([
|
|
124
125
|
(0, mongoose_1.Schema)({ timestamps: true })
|
|
125
126
|
], Commission);
|
|
126
|
-
exports.Commission = Commission;
|
|
127
127
|
exports.CommissionSchema = mongoose_1.SchemaFactory.createForClass(Commission);
|
|
128
128
|
exports.CommissionSchema.index({ email: 1, organization: 1 });
|
|
129
129
|
exports.CommissionSchema.index({ email: 1, status: 1 });
|
|
130
130
|
exports.CommissionSchema.index({ email: 1, createdAt: -1 });
|
|
131
131
|
exports.CommissionSchema.index({ organization: 1, status: 1 });
|
|
132
132
|
exports.CommissionSchema.index({ sale: 1, installmentNumber: 1, status: 1 });
|
|
133
|
-
exports.CommissionModel = (0, mongoose_2.model)(
|
|
133
|
+
exports.CommissionModel = (0, mongoose_2.model)("Commission", exports.CommissionSchema);
|
|
@@ -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 ContentCaptureProcessDocument = HydratedDocument<ContentCaptureProcess>;
|
|
30
5
|
export declare class ContentCaptureProcessMetrics {
|
|
31
6
|
impressionCount?: number | null;
|
|
@@ -61,7 +36,7 @@ export declare const ContentCaptureProcessInfluencerSchema: MongooseSchema<Conte
|
|
|
61
36
|
__v: number;
|
|
62
37
|
}>;
|
|
63
38
|
export declare class ContentCaptureProcessCommentCaptureStatus {
|
|
64
|
-
status:
|
|
39
|
+
status: "captured" | "skipped_cooldown" | "skipped_network" | "skipped_no_comments" | "out_of_scope" | "failed";
|
|
65
40
|
commentsCaptured?: number;
|
|
66
41
|
error?: string;
|
|
67
42
|
}
|
|
@@ -80,7 +55,7 @@ export declare class ContentCaptureProcessItem {
|
|
|
80
55
|
link?: string;
|
|
81
56
|
type?: string;
|
|
82
57
|
socialnetwork?: string;
|
|
83
|
-
status?:
|
|
58
|
+
status?: "created" | "updated";
|
|
84
59
|
metrics?: ContentCaptureProcessMetrics;
|
|
85
60
|
previousMetrics?: ContentCaptureProcessMetrics;
|
|
86
61
|
influencer?: ContentCaptureProcessInfluencer;
|
|
@@ -102,7 +77,7 @@ export declare class ContentCaptureProcess {
|
|
|
102
77
|
actionTitle: string;
|
|
103
78
|
primetagId?: string;
|
|
104
79
|
responsible?: Responsible[];
|
|
105
|
-
status:
|
|
80
|
+
status: "fetching" | "awaiting_comments" | "reported" | "failed";
|
|
106
81
|
publicationsFetched: number;
|
|
107
82
|
contentsMapped: number;
|
|
108
83
|
contentsCreated: number;
|
|
@@ -15,6 +15,7 @@ const mongoose_2 = require("mongoose");
|
|
|
15
15
|
const responsible_schema_1 = require("./responsible.schema");
|
|
16
16
|
let ContentCaptureProcessMetrics = class ContentCaptureProcessMetrics {
|
|
17
17
|
};
|
|
18
|
+
exports.ContentCaptureProcessMetrics = ContentCaptureProcessMetrics;
|
|
18
19
|
__decorate([
|
|
19
20
|
(0, mongoose_1.Prop)({ type: Number, required: false, default: null }),
|
|
20
21
|
__metadata("design:type", Object)
|
|
@@ -47,13 +48,13 @@ __decorate([
|
|
|
47
48
|
(0, mongoose_1.Prop)({ type: Number, required: false, default: null }),
|
|
48
49
|
__metadata("design:type", Object)
|
|
49
50
|
], ContentCaptureProcessMetrics.prototype, "earnedMediaValue", void 0);
|
|
50
|
-
ContentCaptureProcessMetrics = __decorate([
|
|
51
|
+
exports.ContentCaptureProcessMetrics = ContentCaptureProcessMetrics = __decorate([
|
|
51
52
|
(0, mongoose_1.Schema)({ _id: false })
|
|
52
53
|
], ContentCaptureProcessMetrics);
|
|
53
|
-
exports.ContentCaptureProcessMetrics = ContentCaptureProcessMetrics;
|
|
54
54
|
exports.ContentCaptureProcessMetricsSchema = mongoose_1.SchemaFactory.createForClass(ContentCaptureProcessMetrics);
|
|
55
55
|
let ContentCaptureProcessInfluencer = class ContentCaptureProcessInfluencer {
|
|
56
56
|
};
|
|
57
|
+
exports.ContentCaptureProcessInfluencer = ContentCaptureProcessInfluencer;
|
|
57
58
|
__decorate([
|
|
58
59
|
(0, mongoose_1.Prop)({ type: String, required: false }),
|
|
59
60
|
__metadata("design:type", String)
|
|
@@ -66,17 +67,24 @@ __decorate([
|
|
|
66
67
|
(0, mongoose_1.Prop)({ type: String, required: false }),
|
|
67
68
|
__metadata("design:type", String)
|
|
68
69
|
], ContentCaptureProcessInfluencer.prototype, "platform", void 0);
|
|
69
|
-
ContentCaptureProcessInfluencer = __decorate([
|
|
70
|
+
exports.ContentCaptureProcessInfluencer = ContentCaptureProcessInfluencer = __decorate([
|
|
70
71
|
(0, mongoose_1.Schema)({ _id: false })
|
|
71
72
|
], ContentCaptureProcessInfluencer);
|
|
72
|
-
exports.ContentCaptureProcessInfluencer = ContentCaptureProcessInfluencer;
|
|
73
73
|
exports.ContentCaptureProcessInfluencerSchema = mongoose_1.SchemaFactory.createForClass(ContentCaptureProcessInfluencer);
|
|
74
74
|
let ContentCaptureProcessCommentCaptureStatus = class ContentCaptureProcessCommentCaptureStatus {
|
|
75
75
|
};
|
|
76
|
+
exports.ContentCaptureProcessCommentCaptureStatus = ContentCaptureProcessCommentCaptureStatus;
|
|
76
77
|
__decorate([
|
|
77
78
|
(0, mongoose_1.Prop)({
|
|
78
79
|
type: String,
|
|
79
|
-
enum: [
|
|
80
|
+
enum: [
|
|
81
|
+
"captured",
|
|
82
|
+
"skipped_cooldown",
|
|
83
|
+
"skipped_network",
|
|
84
|
+
"skipped_no_comments",
|
|
85
|
+
"out_of_scope",
|
|
86
|
+
"failed",
|
|
87
|
+
],
|
|
80
88
|
required: true,
|
|
81
89
|
}),
|
|
82
90
|
__metadata("design:type", String)
|
|
@@ -89,13 +97,13 @@ __decorate([
|
|
|
89
97
|
(0, mongoose_1.Prop)({ type: String, required: false }),
|
|
90
98
|
__metadata("design:type", String)
|
|
91
99
|
], ContentCaptureProcessCommentCaptureStatus.prototype, "error", void 0);
|
|
92
|
-
ContentCaptureProcessCommentCaptureStatus = __decorate([
|
|
100
|
+
exports.ContentCaptureProcessCommentCaptureStatus = ContentCaptureProcessCommentCaptureStatus = __decorate([
|
|
93
101
|
(0, mongoose_1.Schema)({ _id: false })
|
|
94
102
|
], ContentCaptureProcessCommentCaptureStatus);
|
|
95
|
-
exports.ContentCaptureProcessCommentCaptureStatus = ContentCaptureProcessCommentCaptureStatus;
|
|
96
103
|
exports.ContentCaptureProcessCommentCaptureStatusSchema = mongoose_1.SchemaFactory.createForClass(ContentCaptureProcessCommentCaptureStatus);
|
|
97
104
|
let ContentCaptureProcessItem = class ContentCaptureProcessItem {
|
|
98
105
|
};
|
|
106
|
+
exports.ContentCaptureProcessItem = ContentCaptureProcessItem;
|
|
99
107
|
__decorate([
|
|
100
108
|
(0, mongoose_1.Prop)({ type: String, required: false }),
|
|
101
109
|
__metadata("design:type", String)
|
|
@@ -117,7 +125,7 @@ __decorate([
|
|
|
117
125
|
__metadata("design:type", String)
|
|
118
126
|
], ContentCaptureProcessItem.prototype, "socialnetwork", void 0);
|
|
119
127
|
__decorate([
|
|
120
|
-
(0, mongoose_1.Prop)({ type: String, enum: [
|
|
128
|
+
(0, mongoose_1.Prop)({ type: String, enum: ["created", "updated"], required: false }),
|
|
121
129
|
__metadata("design:type", String)
|
|
122
130
|
], ContentCaptureProcessItem.prototype, "status", void 0);
|
|
123
131
|
__decorate([
|
|
@@ -136,19 +144,19 @@ __decorate([
|
|
|
136
144
|
(0, mongoose_1.Prop)({ type: exports.ContentCaptureProcessCommentCaptureStatusSchema, required: false }),
|
|
137
145
|
__metadata("design:type", ContentCaptureProcessCommentCaptureStatus)
|
|
138
146
|
], ContentCaptureProcessItem.prototype, "commentCapture", void 0);
|
|
139
|
-
ContentCaptureProcessItem = __decorate([
|
|
147
|
+
exports.ContentCaptureProcessItem = ContentCaptureProcessItem = __decorate([
|
|
140
148
|
(0, mongoose_1.Schema)({ _id: false })
|
|
141
149
|
], ContentCaptureProcessItem);
|
|
142
|
-
exports.ContentCaptureProcessItem = ContentCaptureProcessItem;
|
|
143
150
|
exports.ContentCaptureProcessItemSchema = mongoose_1.SchemaFactory.createForClass(ContentCaptureProcessItem);
|
|
144
151
|
let ContentCaptureProcess = class ContentCaptureProcess {
|
|
145
152
|
};
|
|
153
|
+
exports.ContentCaptureProcess = ContentCaptureProcess;
|
|
146
154
|
__decorate([
|
|
147
155
|
(0, mongoose_1.Prop)({ type: mongoose_2.Schema.Types.ObjectId, auto: true, required: false }),
|
|
148
156
|
__metadata("design:type", mongoose_2.Types.ObjectId)
|
|
149
157
|
], ContentCaptureProcess.prototype, "_id", void 0);
|
|
150
158
|
__decorate([
|
|
151
|
-
(0, mongoose_1.Prop)({ type: mongoose_2.Schema.Types.ObjectId, ref:
|
|
159
|
+
(0, mongoose_1.Prop)({ type: mongoose_2.Schema.Types.ObjectId, ref: "Action", required: true }),
|
|
152
160
|
__metadata("design:type", Object)
|
|
153
161
|
], ContentCaptureProcess.prototype, "actionId", void 0);
|
|
154
162
|
__decorate([
|
|
@@ -170,9 +178,9 @@ __decorate([
|
|
|
170
178
|
__decorate([
|
|
171
179
|
(0, mongoose_1.Prop)({
|
|
172
180
|
type: String,
|
|
173
|
-
enum: [
|
|
181
|
+
enum: ["fetching", "awaiting_comments", "reported", "failed"],
|
|
174
182
|
required: true,
|
|
175
|
-
default:
|
|
183
|
+
default: "fetching",
|
|
176
184
|
}),
|
|
177
185
|
__metadata("design:type", String)
|
|
178
186
|
], ContentCaptureProcess.prototype, "status", void 0);
|
|
@@ -232,11 +240,10 @@ __decorate([
|
|
|
232
240
|
(0, mongoose_1.Prop)({ default: Date.now, required: false }),
|
|
233
241
|
__metadata("design:type", Date)
|
|
234
242
|
], ContentCaptureProcess.prototype, "updatedAt", void 0);
|
|
235
|
-
ContentCaptureProcess = __decorate([
|
|
236
|
-
(0, mongoose_1.Schema)({ collection:
|
|
243
|
+
exports.ContentCaptureProcess = ContentCaptureProcess = __decorate([
|
|
244
|
+
(0, mongoose_1.Schema)({ collection: "content-capture-processes", timestamps: true })
|
|
237
245
|
], ContentCaptureProcess);
|
|
238
|
-
exports.ContentCaptureProcess = ContentCaptureProcess;
|
|
239
246
|
exports.ContentCaptureProcessSchema = mongoose_1.SchemaFactory.createForClass(ContentCaptureProcess);
|
|
240
247
|
exports.ContentCaptureProcessSchema.index({ actionId: 1, runId: 1 }, { unique: true });
|
|
241
248
|
exports.ContentCaptureProcessSchema.index({ status: 1 });
|
|
242
|
-
exports.ContentCaptureProcessModel = (0, mongoose_2.model)(
|
|
249
|
+
exports.ContentCaptureProcessModel = (0, mongoose_2.model)("ContentCaptureProcess", exports.ContentCaptureProcessSchema);
|
|
@@ -1,30 +1,5 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
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/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';
|
|
1
|
+
import { HydratedDocument, Schema as MongooseSchema, Types } from "mongoose";
|
|
2
|
+
import { Action } from "./action.schema";
|
|
28
3
|
export type ContentDraftDocument = HydratedDocument<ContentDraft>;
|
|
29
4
|
/**
|
|
30
5
|
* Registro bruto de auditoria de uma publication devolvida pela Primetag —
|
|
@@ -26,12 +26,13 @@ const mongoose_2 = require("mongoose");
|
|
|
26
26
|
*/
|
|
27
27
|
let ContentDraft = class ContentDraft {
|
|
28
28
|
};
|
|
29
|
+
exports.ContentDraft = ContentDraft;
|
|
29
30
|
__decorate([
|
|
30
31
|
(0, mongoose_1.Prop)({ type: mongoose_2.Schema.Types.ObjectId, auto: true, required: false }),
|
|
31
32
|
__metadata("design:type", mongoose_2.Types.ObjectId)
|
|
32
33
|
], ContentDraft.prototype, "_id", void 0);
|
|
33
34
|
__decorate([
|
|
34
|
-
(0, mongoose_1.Prop)({ type: mongoose_2.Schema.Types.ObjectId, ref:
|
|
35
|
+
(0, mongoose_1.Prop)({ type: mongoose_2.Schema.Types.ObjectId, ref: "Action", required: true }),
|
|
35
36
|
__metadata("design:type", Object)
|
|
36
37
|
], ContentDraft.prototype, "action", void 0);
|
|
37
38
|
__decorate([
|
|
@@ -50,10 +51,9 @@ __decorate([
|
|
|
50
51
|
(0, mongoose_1.Prop)({ default: Date.now, required: false }),
|
|
51
52
|
__metadata("design:type", Date)
|
|
52
53
|
], ContentDraft.prototype, "updatedAt", void 0);
|
|
53
|
-
ContentDraft = __decorate([
|
|
54
|
-
(0, mongoose_1.Schema)({ collection:
|
|
54
|
+
exports.ContentDraft = ContentDraft = __decorate([
|
|
55
|
+
(0, mongoose_1.Schema)({ collection: "content-drafts", timestamps: true })
|
|
55
56
|
], ContentDraft);
|
|
56
|
-
exports.ContentDraft = ContentDraft;
|
|
57
57
|
exports.ContentDraftSchema = mongoose_1.SchemaFactory.createForClass(ContentDraft);
|
|
58
58
|
exports.ContentDraftSchema.index({ action: 1, primetagId: 1 }, { unique: true });
|
|
59
|
-
exports.ContentDraftModel = (0, mongoose_2.model)(
|
|
59
|
+
exports.ContentDraftModel = (0, mongoose_2.model)("ContentDraft", exports.ContentDraftSchema);
|
|
@@ -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 { Profile } from './profile.schema';
|
|
28
|
-
import { Action } from './action.schema';
|
|
1
|
+
import { HydratedDocument, Schema as MongooseSchema, Types } from "mongoose";
|
|
2
|
+
import { Profile } from "./profile.schema";
|
|
3
|
+
import { Action } from "./action.schema";
|
|
29
4
|
export type ContentDocument = HydratedDocument<Content>;
|
|
30
5
|
export declare class SentimentComment {
|
|
31
6
|
sentiment?: string;
|
|
@@ -302,9 +277,9 @@ export declare class Content {
|
|
|
302
277
|
_id?: Types.ObjectId;
|
|
303
278
|
caption?: string;
|
|
304
279
|
link: string;
|
|
305
|
-
type:
|
|
306
|
-
tagType:
|
|
307
|
-
socialnetwork:
|
|
280
|
+
type: "reel" | "carousel" | "image" | "story" | "video" | "post" | "pin" | "tweet";
|
|
281
|
+
tagType: "withTag" | "withoutTag" | "brandExposure";
|
|
282
|
+
socialnetwork: "instagram" | "tiktok" | "youtube" | "pinterest" | "linkedin" | "twitter" | "facebook";
|
|
308
283
|
status: ContentStatus;
|
|
309
284
|
metricsSource?: ContentMetricsSource | null;
|
|
310
285
|
processedCommentCount?: number | null;
|