@grapadigital/shared-schemas 1.0.198 → 1.0.200
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/content-capture-process.schema.d.ts +1 -1
- package/dist/schemas/content-capture-process.schema.js +1 -1
- package/dist/schemas/content.schema.d.ts +5 -1
- package/dist/schemas/content.schema.js +32 -4
- package/package.json +1 -1
- package/src/schemas/content-capture-process.schema.ts +2 -2
- package/src/schemas/content.schema.ts +37 -3
|
@@ -60,7 +60,7 @@ export declare const ContentCaptureProcessInfluencerSchema: MongooseSchema<Conte
|
|
|
60
60
|
__v: number;
|
|
61
61
|
}>;
|
|
62
62
|
export declare class ContentCaptureProcessCommentCaptureStatus {
|
|
63
|
-
status: 'captured' | 'skipped_cooldown' | 'skipped_network' | 'out_of_scope' | 'failed';
|
|
63
|
+
status: 'captured' | 'skipped_cooldown' | 'skipped_network' | 'skipped_no_comments' | 'out_of_scope' | 'failed';
|
|
64
64
|
commentsCaptured?: number;
|
|
65
65
|
error?: string;
|
|
66
66
|
}
|
|
@@ -75,7 +75,7 @@ let ContentCaptureProcessCommentCaptureStatus = class ContentCaptureProcessComme
|
|
|
75
75
|
__decorate([
|
|
76
76
|
(0, mongoose_1.Prop)({
|
|
77
77
|
type: String,
|
|
78
|
-
enum: ['captured', 'skipped_cooldown', 'skipped_network', 'out_of_scope', 'failed'],
|
|
78
|
+
enum: ['captured', 'skipped_cooldown', 'skipped_network', 'skipped_no_comments', 'out_of_scope', 'failed'],
|
|
79
79
|
required: true,
|
|
80
80
|
}),
|
|
81
81
|
__metadata("design:type", String)
|
|
@@ -151,9 +151,11 @@ export declare const EstimatesSchema: MongooseSchema<Estimates, import("mongoose
|
|
|
151
151
|
} & {
|
|
152
152
|
__v: number;
|
|
153
153
|
}>;
|
|
154
|
-
export declare const CONTENT_STATUS_VALUES: readonly ["pending", "approved", "deleted", "processing", "classified"];
|
|
154
|
+
export declare const CONTENT_STATUS_VALUES: readonly ["pending", "approved", "deleted", "processing", "classified", "error", "partial_error"];
|
|
155
155
|
export type ContentStatus = (typeof CONTENT_STATUS_VALUES)[number];
|
|
156
156
|
export declare const CONTENT_REPORTABLE_STATUS_VALUES: ContentStatus[];
|
|
157
|
+
export declare const CONTENT_COMMENT_COUNT_SOURCE_VALUES: readonly ["primetag", "exportcomments"];
|
|
158
|
+
export type ContentCommentCountSource = (typeof CONTENT_COMMENT_COUNT_SOURCE_VALUES)[number];
|
|
157
159
|
export declare const CONTENT_METRICS_SOURCE_VALUES: readonly ["real", "organic", "estimated"];
|
|
158
160
|
export type ContentMetricsSource = (typeof CONTENT_METRICS_SOURCE_VALUES)[number];
|
|
159
161
|
export declare class ContentStatusChangedBy {
|
|
@@ -180,6 +182,8 @@ export declare class Content {
|
|
|
180
182
|
status: ContentStatus;
|
|
181
183
|
metricsSource?: ContentMetricsSource | null;
|
|
182
184
|
processedCommentCount?: number | null;
|
|
185
|
+
primetagCommentCount?: number | null;
|
|
186
|
+
commentCountSource?: ContentCommentCountSource | null;
|
|
183
187
|
approvedAt?: Date | null;
|
|
184
188
|
approvedBy?: ContentStatusChangedBy | null;
|
|
185
189
|
profile: Types.ObjectId | Profile;
|
|
@@ -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.ContentModel = exports.ContentSchema = exports.Content = exports.ContentStatusChangedBySchema = exports.ContentStatusChangedBy = exports.CONTENT_METRICS_SOURCE_VALUES = exports.CONTENT_REPORTABLE_STATUS_VALUES = exports.CONTENT_STATUS_VALUES = exports.EstimatesSchema = exports.Estimates = exports.ContentMetricsHistoryEntrySchema = exports.ContentMetricsHistoryEntry = exports.MetricsSchema = exports.Metrics = exports.SentimentAnalysisSchema = exports.SentimentAnalysis = exports.SentimentScoreSchema = exports.SentimentScore = exports.WordCloudSchema = exports.WordCloud = exports.SentimentCommentSchema = exports.SentimentComment = void 0;
|
|
12
|
+
exports.ContentModel = exports.ContentSchema = exports.Content = exports.ContentStatusChangedBySchema = exports.ContentStatusChangedBy = exports.CONTENT_METRICS_SOURCE_VALUES = exports.CONTENT_COMMENT_COUNT_SOURCE_VALUES = exports.CONTENT_REPORTABLE_STATUS_VALUES = exports.CONTENT_STATUS_VALUES = exports.EstimatesSchema = exports.Estimates = exports.ContentMetricsHistoryEntrySchema = exports.ContentMetricsHistoryEntry = exports.MetricsSchema = exports.Metrics = exports.SentimentAnalysisSchema = exports.SentimentAnalysis = exports.SentimentScoreSchema = exports.SentimentScore = exports.WordCloudSchema = exports.WordCloud = exports.SentimentCommentSchema = exports.SentimentComment = void 0;
|
|
13
13
|
const mongoose_1 = require("@nestjs/mongoose");
|
|
14
14
|
const mongoose_2 = require("mongoose");
|
|
15
15
|
let SentimentComment = class SentimentComment {
|
|
@@ -249,9 +249,29 @@ Estimates = __decorate([
|
|
|
249
249
|
], Estimates);
|
|
250
250
|
exports.Estimates = Estimates;
|
|
251
251
|
exports.EstimatesSchema = mongoose_1.SchemaFactory.createForClass(Estimates);
|
|
252
|
-
|
|
253
|
-
//
|
|
254
|
-
|
|
252
|
+
// error: captura de comentários falhou ou a classificação falhou por inteiro.
|
|
253
|
+
// partial_error: parte dos comentários não foi classificada. Nenhum dos dois
|
|
254
|
+
// volta sozinho pro pipeline — só por reenvio manual (aprovação).
|
|
255
|
+
exports.CONTENT_STATUS_VALUES = [
|
|
256
|
+
'pending',
|
|
257
|
+
'approved',
|
|
258
|
+
'deleted',
|
|
259
|
+
'processing',
|
|
260
|
+
'classified',
|
|
261
|
+
'error',
|
|
262
|
+
'partial_error',
|
|
263
|
+
];
|
|
264
|
+
// Status que entram em relatórios/KPIs (pending e deleted ficam de fora). error
|
|
265
|
+
// e partial_error entram: as métricas da Primetag são válidas, só os
|
|
266
|
+
// comentários ficaram incompletos.
|
|
267
|
+
exports.CONTENT_REPORTABLE_STATUS_VALUES = [
|
|
268
|
+
'approved',
|
|
269
|
+
'processing',
|
|
270
|
+
'classified',
|
|
271
|
+
'error',
|
|
272
|
+
'partial_error',
|
|
273
|
+
];
|
|
274
|
+
exports.CONTENT_COMMENT_COUNT_SOURCE_VALUES = ['primetag', 'exportcomments'];
|
|
255
275
|
exports.CONTENT_METRICS_SOURCE_VALUES = ['real', 'organic', 'estimated'];
|
|
256
276
|
let ContentStatusChangedBy = class ContentStatusChangedBy {
|
|
257
277
|
};
|
|
@@ -327,6 +347,14 @@ __decorate([
|
|
|
327
347
|
(0, mongoose_1.Prop)({ type: Number, required: false, default: null }),
|
|
328
348
|
__metadata("design:type", Object)
|
|
329
349
|
], Content.prototype, "processedCommentCount", void 0);
|
|
350
|
+
__decorate([
|
|
351
|
+
(0, mongoose_1.Prop)({ type: Number, required: false, default: null }),
|
|
352
|
+
__metadata("design:type", Object)
|
|
353
|
+
], Content.prototype, "primetagCommentCount", void 0);
|
|
354
|
+
__decorate([
|
|
355
|
+
(0, mongoose_1.Prop)({ type: String, enum: exports.CONTENT_COMMENT_COUNT_SOURCE_VALUES, required: false, default: null }),
|
|
356
|
+
__metadata("design:type", Object)
|
|
357
|
+
], Content.prototype, "commentCountSource", void 0);
|
|
330
358
|
__decorate([
|
|
331
359
|
(0, mongoose_1.Prop)({ type: Date, required: false, default: null }),
|
|
332
360
|
__metadata("design:type", Object)
|
package/package.json
CHANGED
|
@@ -60,10 +60,10 @@ export const ContentCaptureProcessInfluencerSchema = SchemaFactory.createForClas
|
|
|
60
60
|
export class ContentCaptureProcessCommentCaptureStatus {
|
|
61
61
|
@Prop({
|
|
62
62
|
type: String,
|
|
63
|
-
enum: ['captured', 'skipped_cooldown', 'skipped_network', 'out_of_scope', 'failed'],
|
|
63
|
+
enum: ['captured', 'skipped_cooldown', 'skipped_network', 'skipped_no_comments', 'out_of_scope', 'failed'],
|
|
64
64
|
required: true,
|
|
65
65
|
})
|
|
66
|
-
status: 'captured' | 'skipped_cooldown' | 'skipped_network' | 'out_of_scope' | 'failed';
|
|
66
|
+
status: 'captured' | 'skipped_cooldown' | 'skipped_network' | 'skipped_no_comments' | 'out_of_scope' | 'failed';
|
|
67
67
|
|
|
68
68
|
@Prop({ type: Number, required: false })
|
|
69
69
|
commentsCaptured?: number;
|
|
@@ -188,11 +188,33 @@ export class Estimates {
|
|
|
188
188
|
|
|
189
189
|
export const EstimatesSchema = SchemaFactory.createForClass(Estimates);
|
|
190
190
|
|
|
191
|
-
|
|
191
|
+
// error: captura de comentários falhou ou a classificação falhou por inteiro.
|
|
192
|
+
// partial_error: parte dos comentários não foi classificada. Nenhum dos dois
|
|
193
|
+
// volta sozinho pro pipeline — só por reenvio manual (aprovação).
|
|
194
|
+
export const CONTENT_STATUS_VALUES = [
|
|
195
|
+
'pending',
|
|
196
|
+
'approved',
|
|
197
|
+
'deleted',
|
|
198
|
+
'processing',
|
|
199
|
+
'classified',
|
|
200
|
+
'error',
|
|
201
|
+
'partial_error',
|
|
202
|
+
] as const;
|
|
192
203
|
export type ContentStatus = (typeof CONTENT_STATUS_VALUES)[number];
|
|
193
204
|
|
|
194
|
-
// Status que entram em relatórios/KPIs (pending e deleted ficam de fora).
|
|
195
|
-
|
|
205
|
+
// Status que entram em relatórios/KPIs (pending e deleted ficam de fora). error
|
|
206
|
+
// e partial_error entram: as métricas da Primetag são válidas, só os
|
|
207
|
+
// comentários ficaram incompletos.
|
|
208
|
+
export const CONTENT_REPORTABLE_STATUS_VALUES: ContentStatus[] = [
|
|
209
|
+
'approved',
|
|
210
|
+
'processing',
|
|
211
|
+
'classified',
|
|
212
|
+
'error',
|
|
213
|
+
'partial_error',
|
|
214
|
+
];
|
|
215
|
+
|
|
216
|
+
export const CONTENT_COMMENT_COUNT_SOURCE_VALUES = ['primetag', 'exportcomments'] as const;
|
|
217
|
+
export type ContentCommentCountSource = (typeof CONTENT_COMMENT_COUNT_SOURCE_VALUES)[number];
|
|
196
218
|
|
|
197
219
|
export const CONTENT_METRICS_SOURCE_VALUES = ['real', 'organic', 'estimated'] as const;
|
|
198
220
|
export type ContentMetricsSource = (typeof CONTENT_METRICS_SOURCE_VALUES)[number];
|
|
@@ -267,6 +289,18 @@ export class Content {
|
|
|
267
289
|
@Prop({ type: Number, required: false, default: null })
|
|
268
290
|
processedCommentCount?: number | null;
|
|
269
291
|
|
|
292
|
+
// Contagem bruta de comentários reportada pela Primetag, sempre atualizada
|
|
293
|
+
// na captura. É a base do roteamento (comparada com processedCommentCount),
|
|
294
|
+
// independente de metrics.commentCount.
|
|
295
|
+
@Prop({ type: Number, required: false, default: null })
|
|
296
|
+
primetagCommentCount?: number | null;
|
|
297
|
+
|
|
298
|
+
// De onde veio metrics.commentCount: 'primetag' até os comentários serem
|
|
299
|
+
// capturados; 'exportcomments' depois (total capturado, sem clones) — aí a
|
|
300
|
+
// captura da Primetag não sobrescreve mais o commentCount.
|
|
301
|
+
@Prop({ type: String, enum: CONTENT_COMMENT_COUNT_SOURCE_VALUES, required: false, default: null })
|
|
302
|
+
commentCountSource?: ContentCommentCountSource | null;
|
|
303
|
+
|
|
270
304
|
@Prop({ type: Date, required: false, default: null })
|
|
271
305
|
approvedAt?: Date | null;
|
|
272
306
|
|