@grapadigital/shared-schemas 1.0.242 → 1.1.0

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.
Files changed (148) hide show
  1. package/dist/index.d.ts +42 -42
  2. package/dist/schemas/action.schema.d.ts +9 -34
  3. package/dist/schemas/action.schema.js +81 -64
  4. package/dist/schemas/assignment.schema.d.ts +3 -28
  5. package/dist/schemas/assignment.schema.js +44 -44
  6. package/dist/schemas/benchmark.schema.d.ts +3 -28
  7. package/dist/schemas/benchmark.schema.js +11 -6
  8. package/dist/schemas/campaign.schema.d.ts +2 -27
  9. package/dist/schemas/campaign.schema.js +4 -4
  10. package/dist/schemas/client.schema.d.ts +18 -79
  11. package/dist/schemas/client.schema.js +73 -71
  12. package/dist/schemas/comment.schema.d.ts +5 -30
  13. package/dist/schemas/comment.schema.js +42 -37
  14. package/dist/schemas/commission.schema.d.ts +5 -30
  15. package/dist/schemas/commission.schema.js +10 -10
  16. package/dist/schemas/content-capture-process.schema.d.ts +6 -31
  17. package/dist/schemas/content-capture-process.schema.js +24 -17
  18. package/dist/schemas/content-draft.schema.d.ts +2 -27
  19. package/dist/schemas/content-draft.schema.js +5 -5
  20. package/dist/schemas/content.schema.d.ts +6 -31
  21. package/dist/schemas/content.schema.js +84 -74
  22. package/dist/schemas/contract.schema.d.ts +3 -28
  23. package/dist/schemas/contract.schema.js +5 -5
  24. package/dist/schemas/creative.schema.d.ts +6 -31
  25. package/dist/schemas/creative.schema.js +22 -31
  26. package/dist/schemas/export-comments-job.schema.d.ts +2 -27
  27. package/dist/schemas/export-comments-job.schema.js +6 -6
  28. package/dist/schemas/group.schema.d.ts +1 -26
  29. package/dist/schemas/group.schema.js +5 -5
  30. package/dist/schemas/influencer.schema.d.ts +6 -31
  31. package/dist/schemas/influencer.schema.js +16 -18
  32. package/dist/schemas/invoice.schema.d.ts +4 -29
  33. package/dist/schemas/invoice.schema.js +42 -32
  34. package/dist/schemas/job.schema.d.ts +2 -27
  35. package/dist/schemas/job.schema.js +14 -14
  36. package/dist/schemas/lead.schema.d.ts +1 -26
  37. package/dist/schemas/lead.schema.js +67 -64
  38. package/dist/schemas/log.schema.d.ts +1 -26
  39. package/dist/schemas/log.schema.js +24 -24
  40. package/dist/schemas/note.schema.d.ts +1 -26
  41. package/dist/schemas/note.schema.js +9 -9
  42. package/dist/schemas/notifications.schema.d.ts +1 -26
  43. package/dist/schemas/notifications.schema.js +8 -8
  44. package/dist/schemas/organization.schema.d.ts +1 -26
  45. package/dist/schemas/organization.schema.js +4 -4
  46. package/dist/schemas/party.schema.d.ts +1 -26
  47. package/dist/schemas/party.schema.js +11 -11
  48. package/dist/schemas/payment.schema.d.ts +10 -35
  49. package/dist/schemas/payment.schema.js +63 -54
  50. package/dist/schemas/profile.schema.d.ts +3 -28
  51. package/dist/schemas/profile.schema.js +6 -6
  52. package/dist/schemas/project.schema.d.ts +4 -29
  53. package/dist/schemas/project.schema.js +13 -13
  54. package/dist/schemas/prospect.schema.d.ts +3 -28
  55. package/dist/schemas/prospect.schema.js +9 -9
  56. package/dist/schemas/recruitment.schema.d.ts +5 -30
  57. package/dist/schemas/recruitment.schema.js +36 -36
  58. package/dist/schemas/responsible.schema.d.ts +0 -26
  59. package/dist/schemas/responsible.schema.js +6 -6
  60. package/dist/schemas/sale.schema.d.ts +16 -41
  61. package/dist/schemas/sale.schema.js +43 -51
  62. package/dist/schemas/script.schema.d.ts +6 -31
  63. package/dist/schemas/script.schema.js +21 -30
  64. package/dist/schemas/snapshot.schema.d.ts +3 -28
  65. package/dist/schemas/snapshot.schema.js +6 -6
  66. package/dist/schemas/store-visit.schema.d.ts +2 -27
  67. package/dist/schemas/store-visit.schema.js +21 -17
  68. package/dist/schemas/store.schema.d.ts +3 -28
  69. package/dist/schemas/store.schema.js +8 -8
  70. package/dist/schemas/supplier.schema.d.ts +2 -27
  71. package/dist/schemas/supplier.schema.js +3 -3
  72. package/dist/schemas/tag.schema.d.ts +1 -26
  73. package/dist/schemas/tag.schema.js +5 -5
  74. package/dist/schemas/task.schema.d.ts +9 -34
  75. package/dist/schemas/task.schema.js +67 -67
  76. package/dist/schemas/token.schema.d.ts +1 -26
  77. package/dist/schemas/token.schema.js +3 -3
  78. package/dist/schemas/trigger.schema.d.ts +2 -27
  79. package/dist/schemas/trigger.schema.js +5 -5
  80. package/dist/schemas/user.schema.d.ts +2 -27
  81. package/dist/schemas/user.schema.js +7 -7
  82. package/dist/schemas/webhook.schema.d.ts +1 -26
  83. package/dist/schemas/webhook.schema.js +10 -10
  84. package/dist/utils/merge-metrics-breakdown.util.d.ts +1 -1
  85. package/dist/utils/merge-metrics-breakdown.util.js +7 -2
  86. package/dist/utils/normalize-content-link.util.js +7 -7
  87. package/package.json +23 -13
  88. package/.eslintrc.json +0 -28
  89. package/.prettierrc +0 -4
  90. package/dist/schemas/profile-followers-snapshot.schema.d.ts +0 -67
  91. package/dist/schemas/profile-followers-snapshot.schema.js +0 -65
  92. package/dist/schemas/schedule.schema.d.ts +0 -73
  93. package/dist/schemas/schedule.schema.js +0 -116
  94. package/dist/utils/cost-per-impact.util.d.ts +0 -37
  95. package/dist/utils/cost-per-impact.util.js +0 -72
  96. package/dist/utils/influencer-contract.util.d.ts +0 -32
  97. package/dist/utils/influencer-contract.util.js +0 -77
  98. package/docs/code-review.md +0 -27
  99. package/docs/constitution.md +0 -75
  100. package/docs/specs/GD-692.md +0 -112
  101. package/docs/specs/GD-761.md +0 -94
  102. package/index.d.ts +0 -3
  103. package/src/index.ts +0 -42
  104. package/src/schemas/action.schema.ts +0 -328
  105. package/src/schemas/assignment.schema.ts +0 -154
  106. package/src/schemas/benchmark.schema.ts +0 -39
  107. package/src/schemas/campaign.schema.ts +0 -38
  108. package/src/schemas/client.schema.ts +0 -319
  109. package/src/schemas/comment.schema.ts +0 -216
  110. package/src/schemas/commission.schema.ts +0 -108
  111. package/src/schemas/content-capture-process.schema.ts +0 -195
  112. package/src/schemas/content-draft.schema.ts +0 -49
  113. package/src/schemas/content.schema.ts +0 -688
  114. package/src/schemas/contract.schema.ts +0 -44
  115. package/src/schemas/creative.schema.ts +0 -256
  116. package/src/schemas/export-comments-job.schema.ts +0 -59
  117. package/src/schemas/group.schema.ts +0 -23
  118. package/src/schemas/influencer.schema.ts +0 -184
  119. package/src/schemas/invoice.schema.ts +0 -164
  120. package/src/schemas/job.schema.ts +0 -111
  121. package/src/schemas/lead.schema.ts +0 -372
  122. package/src/schemas/log.schema.ts +0 -91
  123. package/src/schemas/note.schema.ts +0 -34
  124. package/src/schemas/notifications.schema.ts +0 -61
  125. package/src/schemas/organization.schema.ts +0 -29
  126. package/src/schemas/party.schema.ts +0 -65
  127. package/src/schemas/payment.schema.ts +0 -275
  128. package/src/schemas/profile.schema.ts +0 -77
  129. package/src/schemas/project.schema.ts +0 -116
  130. package/src/schemas/prospect.schema.ts +0 -62
  131. package/src/schemas/recruitment.schema.ts +0 -277
  132. package/src/schemas/responsible.schema.ts +0 -27
  133. package/src/schemas/sale.schema.ts +0 -297
  134. package/src/schemas/script.schema.ts +0 -235
  135. package/src/schemas/snapshot.schema.ts +0 -55
  136. package/src/schemas/store-visit.schema.ts +0 -68
  137. package/src/schemas/store.schema.ts +0 -52
  138. package/src/schemas/supplier.schema.ts +0 -12
  139. package/src/schemas/tag.schema.ts +0 -26
  140. package/src/schemas/task.schema.ts +0 -205
  141. package/src/schemas/token.schema.ts +0 -42
  142. package/src/schemas/trigger.schema.ts +0 -48
  143. package/src/schemas/user.schema.ts +0 -59
  144. package/src/schemas/webhook.schema.ts +0 -81
  145. package/src/utils/merge-metrics-breakdown.util.ts +0 -51
  146. package/src/utils/normalize-content-link.util.ts +0 -31
  147. package/tsconfig.build.json +0 -5
  148. 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 Delivery = class Delivery {
16
16
  };
17
+ exports.Delivery = Delivery;
17
18
  __decorate([
18
19
  (0, mongoose_1.Prop)({ required: false }),
19
20
  __metadata("design:type", Number)
@@ -50,13 +51,13 @@ __decorate([
50
51
  (0, mongoose_1.Prop)({ required: false }),
51
52
  __metadata("design:type", Number)
52
53
  ], Delivery.prototype, "dayAllocation", void 0);
53
- Delivery = __decorate([
54
+ exports.Delivery = Delivery = __decorate([
54
55
  (0, mongoose_1.Schema)({ _id: false })
55
56
  ], Delivery);
56
- exports.Delivery = Delivery;
57
57
  exports.DeliverySchema = mongoose_1.SchemaFactory.createForClass(Delivery);
58
58
  let Right = class Right {
59
59
  };
60
+ exports.Right = Right;
60
61
  __decorate([
61
62
  (0, mongoose_1.Prop)(),
62
63
  __metadata("design:type", Boolean)
@@ -65,13 +66,13 @@ __decorate([
65
66
  (0, mongoose_1.Prop)(),
66
67
  __metadata("design:type", String)
67
68
  ], Right.prototype, "period", void 0);
68
- Right = __decorate([
69
+ exports.Right = Right = __decorate([
69
70
  (0, mongoose_1.Schema)({ _id: false })
70
71
  ], Right);
71
- exports.Right = Right;
72
72
  exports.RightSchema = mongoose_1.SchemaFactory.createForClass(Right);
73
73
  let Rights = class Rights {
74
74
  };
75
+ exports.Rights = Rights;
75
76
  __decorate([
76
77
  (0, mongoose_1.Prop)({ type: exports.RightSchema }),
77
78
  __metadata("design:type", Right)
@@ -84,13 +85,13 @@ __decorate([
84
85
  (0, mongoose_1.Prop)({ type: exports.RightSchema }),
85
86
  __metadata("design:type", Right)
86
87
  ], Rights.prototype, "imageUsage", void 0);
87
- Rights = __decorate([
88
+ exports.Rights = Rights = __decorate([
88
89
  (0, mongoose_1.Schema)({ _id: false })
89
90
  ], Rights);
90
- exports.Rights = Rights;
91
91
  exports.RightsSchema = mongoose_1.SchemaFactory.createForClass(Rights);
92
92
  let InstallmentInfo = class InstallmentInfo {
93
93
  };
94
+ exports.InstallmentInfo = InstallmentInfo;
94
95
  __decorate([
95
96
  (0, mongoose_1.Prop)(),
96
97
  __metadata("design:type", Number)
@@ -99,10 +100,9 @@ __decorate([
99
100
  (0, mongoose_1.Prop)(),
100
101
  __metadata("design:type", Number)
101
102
  ], InstallmentInfo.prototype, "value", void 0);
102
- InstallmentInfo = __decorate([
103
+ exports.InstallmentInfo = InstallmentInfo = __decorate([
103
104
  (0, mongoose_1.Schema)({ _id: false })
104
105
  ], InstallmentInfo);
105
- exports.InstallmentInfo = InstallmentInfo;
106
106
  exports.InstallmentInfoSchema = mongoose_1.SchemaFactory.createForClass(InstallmentInfo);
107
107
  let Payment = class Payment {
108
108
  };
@@ -132,6 +132,7 @@ Payment = __decorate([
132
132
  const PaymentSchema = mongoose_1.SchemaFactory.createForClass(Payment);
133
133
  let Exchange = class Exchange {
134
134
  };
135
+ exports.Exchange = Exchange;
135
136
  __decorate([
136
137
  (0, mongoose_1.Prop)(),
137
138
  __metadata("design:type", Boolean)
@@ -140,13 +141,13 @@ __decorate([
140
141
  (0, mongoose_1.Prop)(),
141
142
  __metadata("design:type", String)
142
143
  ], Exchange.prototype, "description", void 0);
143
- Exchange = __decorate([
144
+ exports.Exchange = Exchange = __decorate([
144
145
  (0, mongoose_1.Schema)({ _id: false })
145
146
  ], Exchange);
146
- exports.Exchange = Exchange;
147
147
  exports.ExchangeSchema = mongoose_1.SchemaFactory.createForClass(Exchange);
148
148
  let Collab = class Collab {
149
149
  };
150
+ exports.Collab = Collab;
150
151
  __decorate([
151
152
  (0, mongoose_1.Prop)(),
152
153
  __metadata("design:type", Boolean)
@@ -155,24 +156,24 @@ __decorate([
155
156
  (0, mongoose_1.Prop)(),
156
157
  __metadata("design:type", String)
157
158
  ], Collab.prototype, "description", void 0);
158
- Collab = __decorate([
159
+ exports.Collab = Collab = __decorate([
159
160
  (0, mongoose_1.Schema)({ _id: false })
160
161
  ], Collab);
161
- exports.Collab = Collab;
162
162
  exports.CollabSchema = mongoose_1.SchemaFactory.createForClass(Collab);
163
163
  let OptIn = class OptIn {
164
164
  };
165
+ exports.OptIn = OptIn;
165
166
  __decorate([
166
167
  (0, mongoose_1.Prop)(),
167
168
  __metadata("design:type", Boolean)
168
169
  ], OptIn.prototype, "hasOptIn", void 0);
169
- OptIn = __decorate([
170
+ exports.OptIn = OptIn = __decorate([
170
171
  (0, mongoose_1.Schema)({ _id: false })
171
172
  ], OptIn);
172
- exports.OptIn = OptIn;
173
173
  exports.OptInSchema = mongoose_1.SchemaFactory.createForClass(OptIn);
174
174
  let ScopeEstimateMetrics = class ScopeEstimateMetrics {
175
175
  };
176
+ exports.ScopeEstimateMetrics = ScopeEstimateMetrics;
176
177
  __decorate([
177
178
  (0, mongoose_1.Prop)(),
178
179
  __metadata("design:type", Number)
@@ -189,13 +190,13 @@ __decorate([
189
190
  (0, mongoose_1.Prop)(),
190
191
  __metadata("design:type", Number)
191
192
  ], ScopeEstimateMetrics.prototype, "engagementRate", void 0);
192
- ScopeEstimateMetrics = __decorate([
193
+ exports.ScopeEstimateMetrics = ScopeEstimateMetrics = __decorate([
193
194
  (0, mongoose_1.Schema)({ _id: false })
194
195
  ], ScopeEstimateMetrics);
195
- exports.ScopeEstimateMetrics = ScopeEstimateMetrics;
196
196
  exports.ScopeEstimateMetricsSchema = mongoose_1.SchemaFactory.createForClass(ScopeEstimateMetrics);
197
197
  let ScopeEstimateBreakdown = class ScopeEstimateBreakdown {
198
198
  };
199
+ exports.ScopeEstimateBreakdown = ScopeEstimateBreakdown;
199
200
  __decorate([
200
201
  (0, mongoose_1.Prop)(),
201
202
  __metadata("design:type", String)
@@ -216,13 +217,13 @@ __decorate([
216
217
  (0, mongoose_1.Prop)({ type: exports.ScopeEstimateMetricsSchema }),
217
218
  __metadata("design:type", ScopeEstimateMetrics)
218
219
  ], ScopeEstimateBreakdown.prototype, "estimates", void 0);
219
- ScopeEstimateBreakdown = __decorate([
220
+ exports.ScopeEstimateBreakdown = ScopeEstimateBreakdown = __decorate([
220
221
  (0, mongoose_1.Schema)({ _id: false })
221
222
  ], ScopeEstimateBreakdown);
222
- exports.ScopeEstimateBreakdown = ScopeEstimateBreakdown;
223
223
  exports.ScopeEstimateBreakdownSchema = mongoose_1.SchemaFactory.createForClass(ScopeEstimateBreakdown);
224
224
  let ScopeEstimates = class ScopeEstimates {
225
225
  };
226
+ exports.ScopeEstimates = ScopeEstimates;
226
227
  __decorate([
227
228
  (0, mongoose_1.Prop)(),
228
229
  __metadata("design:type", Number)
@@ -247,13 +248,13 @@ __decorate([
247
248
  (0, mongoose_1.Prop)({ type: [exports.ScopeEstimateBreakdownSchema] }),
248
249
  __metadata("design:type", Array)
249
250
  ], ScopeEstimates.prototype, "breakdown", void 0);
250
- ScopeEstimates = __decorate([
251
+ exports.ScopeEstimates = ScopeEstimates = __decorate([
251
252
  (0, mongoose_1.Schema)({ _id: false })
252
253
  ], ScopeEstimates);
253
- exports.ScopeEstimates = ScopeEstimates;
254
254
  exports.ScopeEstimatesSchema = mongoose_1.SchemaFactory.createForClass(ScopeEstimates);
255
255
  let Scope = class Scope {
256
256
  };
257
+ exports.Scope = Scope;
257
258
  __decorate([
258
259
  (0, mongoose_1.Prop)({ type: exports.DeliverySchema }),
259
260
  __metadata("design:type", Delivery)
@@ -294,33 +295,33 @@ __decorate([
294
295
  (0, mongoose_1.Prop)({ type: exports.ScopeEstimatesSchema, required: false }),
295
296
  __metadata("design:type", ScopeEstimates)
296
297
  ], Scope.prototype, "estimates", void 0);
297
- Scope = __decorate([
298
+ exports.Scope = Scope = __decorate([
298
299
  (0, mongoose_1.Schema)({ _id: false })
299
300
  ], Scope);
300
- exports.Scope = Scope;
301
301
  exports.ScopeSchema = mongoose_1.SchemaFactory.createForClass(Scope);
302
302
  // Perfil participante do recrutamento — cada um tem a sua collaboration na
303
303
  // Primetag (primetagId = collaboration_id), criada quando o recrutamento vira
304
304
  // 'recruited'.
305
305
  let RecruitmentProfile = class RecruitmentProfile {
306
306
  };
307
+ exports.RecruitmentProfile = RecruitmentProfile;
307
308
  __decorate([
308
- (0, mongoose_1.Prop)({ type: mongoose_2.Schema.Types.ObjectId, ref: 'Profile', required: true }),
309
+ (0, mongoose_1.Prop)({ type: mongoose_2.Schema.Types.ObjectId, ref: "Profile", required: true }),
309
310
  __metadata("design:type", Object)
310
311
  ], RecruitmentProfile.prototype, "profile", void 0);
311
312
  __decorate([
312
313
  (0, mongoose_1.Prop)({ type: String, required: false }),
313
314
  __metadata("design:type", String)
314
315
  ], RecruitmentProfile.prototype, "primetagId", void 0);
315
- RecruitmentProfile = __decorate([
316
+ exports.RecruitmentProfile = RecruitmentProfile = __decorate([
316
317
  (0, mongoose_1.Schema)({ _id: false })
317
318
  ], RecruitmentProfile);
318
- exports.RecruitmentProfile = RecruitmentProfile;
319
319
  exports.RecruitmentProfileSchema = mongoose_1.SchemaFactory.createForClass(RecruitmentProfile);
320
320
  // 1 por (action, influencer): o scope (entregas + pagamento) é do influenciador
321
321
  // na campanha inteira, dividido entre todos os perfis de `profiles`.
322
322
  let Recruitment = class Recruitment {
323
323
  };
324
+ exports.Recruitment = Recruitment;
324
325
  __decorate([
325
326
  (0, mongoose_1.Prop)({ type: mongoose_2.Schema.Types.ObjectId, auto: true, required: false }),
326
327
  __metadata("design:type", mongoose_2.Types.ObjectId)
@@ -336,17 +337,17 @@ __decorate([
336
337
  __decorate([
337
338
  (0, mongoose_1.Prop)({
338
339
  type: String,
339
- default: 'selected',
340
- enum: ['selected', 'inContact', 'inApproval', 'recruited', 'removed'],
340
+ default: "selected",
341
+ enum: ["selected", "inContact", "inApproval", "recruited", "removed"],
341
342
  }),
342
343
  __metadata("design:type", String)
343
344
  ], Recruitment.prototype, "status", void 0);
344
345
  __decorate([
345
- (0, mongoose_1.Prop)({ type: mongoose_2.Schema.Types.ObjectId, ref: 'Action' }),
346
+ (0, mongoose_1.Prop)({ type: mongoose_2.Schema.Types.ObjectId, ref: "Action" }),
346
347
  __metadata("design:type", Object)
347
348
  ], Recruitment.prototype, "action", void 0);
348
349
  __decorate([
349
- (0, mongoose_1.Prop)({ type: mongoose_2.Schema.Types.ObjectId, ref: 'Influencer', required: true }),
350
+ (0, mongoose_1.Prop)({ type: mongoose_2.Schema.Types.ObjectId, ref: "Influencer", required: true }),
350
351
  __metadata("design:type", Object)
351
352
  ], Recruitment.prototype, "influencer", void 0);
352
353
  __decorate([
@@ -369,18 +370,17 @@ __decorate([
369
370
  (0, mongoose_1.Prop)({ type: Boolean, required: false, default: false }),
370
371
  __metadata("design:type", Boolean)
371
372
  ], Recruitment.prototype, "useAmbassadorContract", void 0);
372
- Recruitment = __decorate([
373
+ exports.Recruitment = Recruitment = __decorate([
373
374
  (0, mongoose_1.Schema)({ timestamps: true })
374
375
  ], Recruitment);
375
- exports.Recruitment = Recruitment;
376
376
  exports.RecruitmentSchema = mongoose_1.SchemaFactory.createForClass(Recruitment);
377
377
  exports.RecruitmentSchema.index({ action: 1, status: 1 });
378
378
  exports.RecruitmentSchema.index({ action: 1 });
379
379
  // Parcial: recrutamentos legados cujo perfil não tem influenciador ficaram no
380
380
  // formato antigo (sem `influencer`) e não entram na unicidade.
381
- exports.RecruitmentSchema.index({ action: 1, influencer: 1 }, { unique: true, partialFilterExpression: { influencer: { $type: 'objectId' } } });
382
- exports.RecruitmentSchema.index({ 'profiles.profile': 1, status: 1 });
383
- exports.RecruitmentSchema.index({ influencer: 1, status: 1, 'scope.exclusivity': 1 });
384
- exports.RecruitmentSchema.index({ action: 1, 'profiles.primetagId': 1 });
381
+ exports.RecruitmentSchema.index({ action: 1, influencer: 1 }, { unique: true, partialFilterExpression: { influencer: { $type: "objectId" } } });
382
+ exports.RecruitmentSchema.index({ "profiles.profile": 1, status: 1 });
383
+ exports.RecruitmentSchema.index({ influencer: 1, status: 1, "scope.exclusivity": 1 });
384
+ exports.RecruitmentSchema.index({ action: 1, "profiles.primetagId": 1 });
385
385
  exports.RecruitmentSchema.index({ username: 1, _id: 1 });
386
- exports.RecruitmentModel = (0, mongoose_2.model)('Recruitment', exports.RecruitmentSchema);
386
+ exports.RecruitmentModel = (0, mongoose_2.model)("Recruitment", exports.RecruitmentSchema);
@@ -1,29 +1,3 @@
1
- /// <reference types="mongoose/types/aggregate" />
2
- /// <reference types="mongoose/types/callback" />
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" />
24
- /// <reference types="mongoose/types/schematypes" />
25
- /// <reference types="mongoose/types/inferschematype" />
26
- /// <reference types="mongoose/types/inferrawdoctype" />
27
1
  /**
28
2
  * Formato único de responsável em todas as entidades (`responsible`).
29
3
  * `username` vem de `User.username` (api-admin).
@@ -18,28 +18,28 @@ const swagger_1 = require("@nestjs/swagger");
18
18
  */
19
19
  let Responsible = class Responsible {
20
20
  };
21
+ exports.Responsible = Responsible;
21
22
  __decorate([
22
- (0, swagger_1.ApiProperty)({ example: 'Maria Oliveira' }),
23
+ (0, swagger_1.ApiProperty)({ example: "Maria Oliveira" }),
23
24
  (0, mongoose_1.Prop)({ type: String, required: true }),
24
25
  __metadata("design:type", String)
25
26
  ], Responsible.prototype, "name", void 0);
26
27
  __decorate([
27
- (0, swagger_1.ApiProperty)({ example: 'maria@empresa.com' }),
28
+ (0, swagger_1.ApiProperty)({ example: "maria@empresa.com" }),
28
29
  (0, mongoose_1.Prop)({ type: String, required: true }),
29
30
  __metadata("design:type", String)
30
31
  ], Responsible.prototype, "email", void 0);
31
32
  __decorate([
32
- (0, swagger_1.ApiProperty)({ example: 'maria.oliveira' }),
33
+ (0, swagger_1.ApiProperty)({ example: "maria.oliveira" }),
33
34
  (0, mongoose_1.Prop)({ type: String, required: true }),
34
35
  __metadata("design:type", String)
35
36
  ], Responsible.prototype, "username", void 0);
36
37
  __decorate([
37
- (0, swagger_1.ApiProperty)({ example: 'service', required: false }),
38
+ (0, swagger_1.ApiProperty)({ example: "service", required: false }),
38
39
  (0, mongoose_1.Prop)({ type: String, required: false }),
39
40
  __metadata("design:type", String)
40
41
  ], Responsible.prototype, "team", void 0);
41
- Responsible = __decorate([
42
+ exports.Responsible = Responsible = __decorate([
42
43
  (0, mongoose_1.Schema)({ _id: false })
43
44
  ], Responsible);
44
- exports.Responsible = Responsible;
45
45
  exports.ResponsibleSchema = mongoose_1.SchemaFactory.createForClass(Responsible);
@@ -1,52 +1,27 @@
1
- /// <reference types="mongoose/types/aggregate" />
2
- /// <reference types="mongoose/types/callback" />
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 { Profile } from './profile.schema';
28
- import { Client } from './client.schema';
29
- import { Influencer } from './influencer.schema';
30
- import { Note } from './note.schema';
31
- import { Responsible } from './responsible.schema';
1
+ import { HydratedDocument, Schema as MongooseSchema, Types } from "mongoose";
2
+ import { Profile } from "./profile.schema";
3
+ import { Client } from "./client.schema";
4
+ import { Influencer } from "./influencer.schema";
5
+ import { Note } from "./note.schema";
6
+ import { Responsible } from "./responsible.schema";
32
7
  export type SaleDocument = HydratedDocument<Sale>;
33
8
  export declare class Proposal {
34
- businessUnit: 'service' | 'comercial';
9
+ businessUnit: "service" | "comercial";
35
10
  contact: string;
36
11
  initialScope: string;
37
- origin: 'inbound' | 'outbound';
12
+ origin: "inbound" | "outbound";
38
13
  profile?: Types.ObjectId | Profile;
39
14
  influencer?: Types.ObjectId | Influencer;
40
15
  }
41
16
  export declare class Negotiation {
42
- calculatorType: 'withPreDefinedBudget' | 'withoutPreDefinedBudget' | 'byCommission' | 'bourbon';
17
+ calculatorType: "withPreDefinedBudget" | "withoutPreDefinedBudget" | "byCommission" | "bourbon";
43
18
  childPermit?: boolean;
44
19
  childPermitValue?: number;
45
- childPermitMethod?: 'direct' | 'debit_note' | 'client';
20
+ childPermitMethod?: "direct" | "debit_note" | "client";
46
21
  influencerBroadcastValue: number;
47
- influencerBroadcastMethod: 'transfer' | 'direct' | 'debit_note' | 'client';
22
+ influencerBroadcastMethod: "transfer" | "direct" | "debit_note" | "client";
48
23
  productionAndOthersValue: number;
49
- productionAndOthersMethod: 'direct' | 'debit_note' | 'client';
24
+ productionAndOthersMethod: "direct" | "debit_note" | "client";
50
25
  commissionRate: number;
51
26
  broadcastBonusRate: number;
52
27
  taxRate: number;
@@ -76,11 +51,11 @@ export declare class Formalization {
76
51
  totalInstallments: number;
77
52
  }
78
53
  export declare class Lost {
79
- reason: 'declined' | 'other' | 'spam' | 'no_response' | 'no_budget' | 'no_profile_fit' | 'invite_exchange';
54
+ reason: "declined" | "other" | "spam" | "no_response" | "no_budget" | "no_profile_fit" | "invite_exchange";
80
55
  details?: string;
81
56
  }
82
57
  export declare class Activity {
83
- type: 'email' | 'whatsapp' | 'meeting' | 'call' | 'linkedin' | 'instagram_dm';
58
+ type: "email" | "whatsapp" | "meeting" | "call" | "linkedin" | "instagram_dm";
84
59
  description?: string;
85
60
  owner: string;
86
61
  createdAt: Date;
@@ -138,8 +113,8 @@ export declare class SaleLinks {
138
113
  export declare class Sale {
139
114
  _id?: Types.ObjectId;
140
115
  title: string;
141
- phase: 'inbox' | 'proposal' | 'negotiation' | 'commission' | 'formalization' | 'closed' | 'lost';
142
- type: 'new' | 'organic_expansion' | 'strategic_expansion' | 'renewal' | 'comercial_winback' | 'organic_winback';
116
+ phase: "inbox" | "proposal" | "negotiation" | "commission" | "formalization" | "closed" | "lost";
117
+ type: "new" | "organic_expansion" | "strategic_expansion" | "renewal" | "comercial_winback" | "organic_winback";
143
118
  proposal?: Proposal;
144
119
  negotiation?: Negotiation;
145
120
  formalization?: Formalization;