@grapadigital/shared-schemas 1.0.235 → 1.0.236

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.
@@ -106,8 +106,6 @@ export declare class Metrics {
106
106
  * manda; `tapBackCount` é o "voltar o story". Peso 1 no Real E/R. 2026-10-24.
107
107
  */
108
108
  stickerTapCount?: number | null;
109
- /** Reposts do post (Primetag `private_metrics.reposts`, perfil conectado). 2026-10-24. */
110
- repostCount?: number | null;
111
109
  replyCount?: number | null;
112
110
  tapForwardCount?: number | null;
113
111
  swipeForwardCount?: number | null;
@@ -147,10 +147,6 @@ __decorate([
147
147
  (0, mongoose_1.Prop)({ type: Number, required: false, default: null }),
148
148
  __metadata("design:type", Object)
149
149
  ], Metrics.prototype, "stickerTapCount", void 0);
150
- __decorate([
151
- (0, mongoose_1.Prop)({ type: Number, required: false, default: null }),
152
- __metadata("design:type", Object)
153
- ], Metrics.prototype, "repostCount", void 0);
154
150
  __decorate([
155
151
  (0, mongoose_1.Prop)({ type: Number, required: false, default: null }),
156
152
  __metadata("design:type", Object)
@@ -30,6 +30,8 @@ export declare const LEAD_PRESENTATION_FORMAT_VALUES: readonly ["online", "in_pe
30
30
  export type LeadPresentationFormat = (typeof LEAD_PRESENTATION_FORMAT_VALUES)[number];
31
31
  export declare const LEAD_PAYMENT_TERM_VALUES: readonly [30, 60, 90, 120];
32
32
  export type LeadPaymentTerm = (typeof LEAD_PAYMENT_TERM_VALUES)[number];
33
+ export declare const LEAD_BILLING_MODEL_VALUES: readonly ["transfer", "double_taxation", "direct_payment"];
34
+ export type LeadBillingModel = (typeof LEAD_BILLING_MODEL_VALUES)[number];
33
35
  export declare const LEAD_DELIVERABLE_VALUES: readonly ["content_strategy", "ppt_presentation", "curation_sheet", "production_sheet"];
34
36
  export type LeadDeliverable = (typeof LEAD_DELIVERABLE_VALUES)[number];
35
37
  export declare const LEAD_GOAL_VALUES: readonly ["awareness", "consideration", "intent"];
@@ -81,6 +83,7 @@ export declare class LeadBudget {
81
83
  totalBudget?: number;
82
84
  creatorsBudget?: number;
83
85
  paymentTerm?: LeadPaymentTerm;
86
+ billingModel?: LeadBillingModel;
84
87
  campaignDurationMonths?: number;
85
88
  }
86
89
  export declare const LeadBudgetSchema: import("mongoose").Schema<LeadBudget, import("mongoose").Model<LeadBudget, any, any, any, import("mongoose").Document<unknown, any, LeadBudget, any, {}> & LeadBudget & {
@@ -242,6 +245,12 @@ export declare class Lead {
242
245
  organization: Types.ObjectId;
243
246
  submittedAt?: Date;
244
247
  lastEditedAt?: Date;
248
+ /**
249
+ * Data de exclusão lógica (soft delete).
250
+ * Mantém o registro no banco de dados para fins de auditoria/histórico,
251
+ * mas deve ser desconsiderado nas consultas padrão (`deletedAt: null`).
252
+ */
253
+ deletedAt?: Date;
245
254
  general: LeadGeneral;
246
255
  confidentiality: LeadConfidentiality;
247
256
  budget: LeadBudget;
@@ -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.LeadModel = exports.LeadSchema = exports.Lead = exports.LeadContentGuidelinesSchema = exports.LeadContentGuidelines = exports.LeadLogisticsSchema = exports.LeadLogistics = exports.LeadCurationSchema = exports.LeadCuration = exports.LeadAudienceSchema = exports.LeadAudience = exports.LeadDeliveryScopeSchema = exports.LeadDeliveryScope = exports.LeadObjectivesSchema = exports.LeadObjectives = exports.LeadStrategicContextSchema = exports.LeadStrategicContext = exports.LeadDeliverablesSchema = exports.LeadDeliverables = exports.LeadCompetitionSchema = exports.LeadCompetition = exports.LeadBudgetSchema = exports.LeadBudget = exports.LeadConfidentialitySchema = exports.LeadConfidentiality = exports.LeadGeneralSchema = exports.LeadGeneral = exports.LEAD_SECTION_KEYS = exports.LEAD_FOLLOWER_TIER_VALUES = exports.LEAD_RIGHT_VALUES = exports.LEAD_CHANNEL_VALUES = exports.LEAD_GOAL_VALUES = exports.LEAD_DELIVERABLE_VALUES = exports.LEAD_PAYMENT_TERM_VALUES = exports.LEAD_PRESENTATION_FORMAT_VALUES = exports.LEAD_STATUS_VALUES = void 0;
12
+ exports.LeadModel = exports.LeadSchema = exports.Lead = exports.LeadContentGuidelinesSchema = exports.LeadContentGuidelines = exports.LeadLogisticsSchema = exports.LeadLogistics = exports.LeadCurationSchema = exports.LeadCuration = exports.LeadAudienceSchema = exports.LeadAudience = exports.LeadDeliveryScopeSchema = exports.LeadDeliveryScope = exports.LeadObjectivesSchema = exports.LeadObjectives = exports.LeadStrategicContextSchema = exports.LeadStrategicContext = exports.LeadDeliverablesSchema = exports.LeadDeliverables = exports.LeadCompetitionSchema = exports.LeadCompetition = exports.LeadBudgetSchema = exports.LeadBudget = exports.LeadConfidentialitySchema = exports.LeadConfidentiality = exports.LeadGeneralSchema = exports.LeadGeneral = exports.LEAD_SECTION_KEYS = exports.LEAD_FOLLOWER_TIER_VALUES = exports.LEAD_RIGHT_VALUES = exports.LEAD_CHANNEL_VALUES = exports.LEAD_GOAL_VALUES = exports.LEAD_DELIVERABLE_VALUES = exports.LEAD_BILLING_MODEL_VALUES = exports.LEAD_PAYMENT_TERM_VALUES = exports.LEAD_PRESENTATION_FORMAT_VALUES = exports.LEAD_STATUS_VALUES = void 0;
13
13
  const mongoose_1 = require("@nestjs/mongoose");
14
14
  const mongoose_2 = require("mongoose");
15
15
  // Lead = briefing de campanha preenchido pelo cliente numa página pública (GD-616).
@@ -17,6 +17,11 @@ const mongoose_2 = require("mongoose");
17
17
  exports.LEAD_STATUS_VALUES = ['draft', 'submitted'];
18
18
  exports.LEAD_PRESENTATION_FORMAT_VALUES = ['online', 'in_person', 'email_only'];
19
19
  exports.LEAD_PAYMENT_TERM_VALUES = [30, 60, 90, 120];
20
+ exports.LEAD_BILLING_MODEL_VALUES = [
21
+ 'transfer',
22
+ 'double_taxation',
23
+ 'direct_payment',
24
+ ];
20
25
  exports.LEAD_DELIVERABLE_VALUES = [
21
26
  'content_strategy',
22
27
  'ppt_presentation',
@@ -130,6 +135,10 @@ __decorate([
130
135
  (0, mongoose_1.Prop)({ type: Number, enum: exports.LEAD_PAYMENT_TERM_VALUES }),
131
136
  __metadata("design:type", Number)
132
137
  ], LeadBudget.prototype, "paymentTerm", void 0);
138
+ __decorate([
139
+ (0, mongoose_1.Prop)({ type: String, enum: exports.LEAD_BILLING_MODEL_VALUES }),
140
+ __metadata("design:type", String)
141
+ ], LeadBudget.prototype, "billingModel", void 0);
133
142
  __decorate([
134
143
  (0, mongoose_1.Prop)(),
135
144
  __metadata("design:type", Number)
@@ -400,6 +409,10 @@ __decorate([
400
409
  (0, mongoose_1.Prop)({ index: true }),
401
410
  __metadata("design:type", Date)
402
411
  ], Lead.prototype, "lastEditedAt", void 0);
412
+ __decorate([
413
+ (0, mongoose_1.Prop)({ index: true }),
414
+ __metadata("design:type", Date)
415
+ ], Lead.prototype, "deletedAt", void 0);
403
416
  __decorate([
404
417
  (0, mongoose_1.Prop)({ type: exports.LeadGeneralSchema, default: {} }),
405
418
  __metadata("design:type", LeadGeneral)
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@grapadigital/shared-schemas",
3
- "version": "1.0.235",
3
+ "version": "1.0.236",
4
4
  "description": "Shared Mongoose Schemas",
5
5
  "main": "dist/index.js",
6
6
  "types": "dist/index.d.ts",
@@ -119,10 +119,6 @@ export class Metrics {
119
119
  @Prop({ type: Number, required: false, default: null })
120
120
  stickerTapCount?: number | null;
121
121
 
122
- /** Reposts do post (Primetag `private_metrics.reposts`, perfil conectado). 2026-10-24. */
123
- @Prop({ type: Number, required: false, default: null })
124
- repostCount?: number | null;
125
-
126
122
  @Prop({ type: Number, required: false, default: null })
127
123
  replyCount?: number | null;
128
124
 
@@ -13,6 +13,13 @@ export type LeadPresentationFormat = (typeof LEAD_PRESENTATION_FORMAT_VALUES)[nu
13
13
  export const LEAD_PAYMENT_TERM_VALUES = [30, 60, 90, 120] as const;
14
14
  export type LeadPaymentTerm = (typeof LEAD_PAYMENT_TERM_VALUES)[number];
15
15
 
16
+ export const LEAD_BILLING_MODEL_VALUES = [
17
+ 'transfer',
18
+ 'double_taxation',
19
+ 'direct_payment',
20
+ ] as const;
21
+ export type LeadBillingModel = (typeof LEAD_BILLING_MODEL_VALUES)[number];
22
+
16
23
  export const LEAD_DELIVERABLE_VALUES = [
17
24
  'content_strategy',
18
25
  'ppt_presentation',
@@ -116,6 +123,9 @@ export class LeadBudget {
116
123
  @Prop({ type: Number, enum: LEAD_PAYMENT_TERM_VALUES })
117
124
  paymentTerm?: LeadPaymentTerm;
118
125
 
126
+ @Prop({ type: String, enum: LEAD_BILLING_MODEL_VALUES })
127
+ billingModel?: LeadBillingModel;
128
+
119
129
  @Prop()
120
130
  campaignDurationMonths?: number;
121
131
  }
@@ -309,6 +319,14 @@ export class Lead {
309
319
  @Prop({ index: true })
310
320
  lastEditedAt?: Date;
311
321
 
322
+ /**
323
+ * Data de exclusão lógica (soft delete).
324
+ * Mantém o registro no banco de dados para fins de auditoria/histórico,
325
+ * mas deve ser desconsiderado nas consultas padrão (`deletedAt: null`).
326
+ */
327
+ @Prop({ index: true })
328
+ deletedAt?: Date;
329
+
312
330
  @Prop({ type: LeadGeneralSchema, default: {} })
313
331
  general: LeadGeneral;
314
332