@grapadigital/shared-schemas 1.0.199 → 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.
@@ -154,6 +154,8 @@ export declare const EstimatesSchema: MongooseSchema<Estimates, import("mongoose
154
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 {
@@ -271,6 +271,7 @@ exports.CONTENT_REPORTABLE_STATUS_VALUES = [
271
271
  'error',
272
272
  'partial_error',
273
273
  ];
274
+ exports.CONTENT_COMMENT_COUNT_SOURCE_VALUES = ['primetag', 'exportcomments'];
274
275
  exports.CONTENT_METRICS_SOURCE_VALUES = ['real', 'organic', 'estimated'];
275
276
  let ContentStatusChangedBy = class ContentStatusChangedBy {
276
277
  };
@@ -346,6 +347,14 @@ __decorate([
346
347
  (0, mongoose_1.Prop)({ type: Number, required: false, default: null }),
347
348
  __metadata("design:type", Object)
348
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);
349
358
  __decorate([
350
359
  (0, mongoose_1.Prop)({ type: Date, required: false, default: null }),
351
360
  __metadata("design:type", Object)
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@grapadigital/shared-schemas",
3
- "version": "1.0.199",
3
+ "version": "1.0.200",
4
4
  "description": "Shared Mongoose Schemas",
5
5
  "main": "dist/index.js",
6
6
  "types": "dist/index.d.ts",
@@ -213,6 +213,9 @@ export const CONTENT_REPORTABLE_STATUS_VALUES: ContentStatus[] = [
213
213
  'partial_error',
214
214
  ];
215
215
 
216
+ export const CONTENT_COMMENT_COUNT_SOURCE_VALUES = ['primetag', 'exportcomments'] as const;
217
+ export type ContentCommentCountSource = (typeof CONTENT_COMMENT_COUNT_SOURCE_VALUES)[number];
218
+
216
219
  export const CONTENT_METRICS_SOURCE_VALUES = ['real', 'organic', 'estimated'] as const;
217
220
  export type ContentMetricsSource = (typeof CONTENT_METRICS_SOURCE_VALUES)[number];
218
221
 
@@ -286,6 +289,18 @@ export class Content {
286
289
  @Prop({ type: Number, required: false, default: null })
287
290
  processedCommentCount?: number | null;
288
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
+
289
304
  @Prop({ type: Date, required: false, default: null })
290
305
  approvedAt?: Date | null;
291
306