@grapadigital/shared-schemas 1.0.148 → 1.0.150
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/action.schema.d.ts +2 -1
- package/dist/schemas/action.schema.js +6 -1
- package/dist/schemas/content.schema.d.ts +2 -2
- package/dist/schemas/content.schema.js +2 -2
- package/dist/schemas/sale.schema.d.ts +12 -1
- package/dist/schemas/sale.schema.js +44 -1
- package/package.json +1 -1
- package/src/schemas/action.schema.ts +5 -1
- package/src/schemas/content.schema.ts +4 -4
- package/src/schemas/sale.schema.ts +16 -0
|
@@ -246,7 +246,12 @@ __decorate([
|
|
|
246
246
|
(0, swagger_1.ApiProperty)({ example: ['@influencer', '@brand'], required: false }),
|
|
247
247
|
(0, mongoose_1.Prop)({ type: [String], required: false }),
|
|
248
248
|
__metadata("design:type", Array)
|
|
249
|
-
], Action.prototype, "
|
|
249
|
+
], Action.prototype, "instagramMentions", void 0);
|
|
250
|
+
__decorate([
|
|
251
|
+
(0, swagger_1.ApiProperty)({ example: ['@influencer', '@brand'], required: false }),
|
|
252
|
+
(0, mongoose_1.Prop)({ type: [String], required: false }),
|
|
253
|
+
__metadata("design:type", Array)
|
|
254
|
+
], Action.prototype, "tiktokMentions", void 0);
|
|
250
255
|
__decorate([
|
|
251
256
|
(0, swagger_1.ApiProperty)({ example: ['produto', 'categoria'], required: false }),
|
|
252
257
|
(0, mongoose_1.Prop)({ type: [String], required: false }),
|
|
@@ -129,9 +129,9 @@ export declare class Content {
|
|
|
129
129
|
_id?: Types.ObjectId;
|
|
130
130
|
caption?: string;
|
|
131
131
|
link: string;
|
|
132
|
-
type: 'reel' | 'carousel' | 'image' | 'story' | 'video' | 'post' | 'pin';
|
|
132
|
+
type: 'reel' | 'carousel' | 'image' | 'story' | 'video' | 'post' | 'pin' | 'tweet';
|
|
133
133
|
tagType: 'withTag' | 'withoutTag' | 'brandExposure';
|
|
134
|
-
socialnetwork: 'instagram' | 'tiktok' | 'youtube' | 'pinterest' | 'linkedin';
|
|
134
|
+
socialnetwork: 'instagram' | 'tiktok' | 'youtube' | 'pinterest' | 'linkedin' | 'twitter';
|
|
135
135
|
status: 'approved' | 'repproved' | 'deleted';
|
|
136
136
|
profile: Types.ObjectId | Profile;
|
|
137
137
|
action: Types.ObjectId | Action;
|
|
@@ -199,7 +199,7 @@ __decorate([
|
|
|
199
199
|
__decorate([
|
|
200
200
|
(0, mongoose_1.Prop)({
|
|
201
201
|
type: String,
|
|
202
|
-
enum: ['reel', 'image', 'carousel', 'story', 'video', 'post', 'pin'],
|
|
202
|
+
enum: ['reel', 'image', 'carousel', 'story', 'video', 'post', 'pin', 'tweet'],
|
|
203
203
|
required: true,
|
|
204
204
|
}),
|
|
205
205
|
__metadata("design:type", String)
|
|
@@ -215,7 +215,7 @@ __decorate([
|
|
|
215
215
|
__decorate([
|
|
216
216
|
(0, mongoose_1.Prop)({
|
|
217
217
|
type: String,
|
|
218
|
-
enum: ['instagram', 'tiktok', 'youtube', 'pinterest', 'linkedin'],
|
|
218
|
+
enum: ['instagram', 'tiktok', 'youtube', 'pinterest', 'linkedin', 'twitter'],
|
|
219
219
|
required: true,
|
|
220
220
|
}),
|
|
221
221
|
__metadata("design:type", String)
|
|
@@ -110,16 +110,27 @@ export declare class CommissionInfo {
|
|
|
110
110
|
totalCommissionValue: number;
|
|
111
111
|
participants: CommissionParticipant[];
|
|
112
112
|
}
|
|
113
|
+
export declare class Inbox {
|
|
114
|
+
gmailMessageId: string;
|
|
115
|
+
gmailThreadId: string;
|
|
116
|
+
from: string;
|
|
117
|
+
to: string;
|
|
118
|
+
subject: string;
|
|
119
|
+
bodyText: string;
|
|
120
|
+
bodyHtml?: string;
|
|
121
|
+
receivedAt: Date;
|
|
122
|
+
}
|
|
113
123
|
export declare class Sale {
|
|
114
124
|
_id?: Types.ObjectId;
|
|
115
125
|
title: string;
|
|
116
|
-
phase: 'screening' | 'proposal' | 'negotiation' | 'commission' | 'formalization' | 'closed' | 'lost';
|
|
126
|
+
phase: 'inbox' | 'screening' | 'proposal' | 'negotiation' | 'commission' | 'formalization' | 'closed' | 'lost';
|
|
117
127
|
type: "new" | "organic_expansion" | "strategic_expansion" | "renewal" | "comercial_winback" | "organic_winback";
|
|
118
128
|
screening?: Screening;
|
|
119
129
|
proposal?: Proposal;
|
|
120
130
|
negotiation?: Negotiation;
|
|
121
131
|
formalization?: Formalization;
|
|
122
132
|
commission?: CommissionInfo;
|
|
133
|
+
inbox?: Inbox;
|
|
123
134
|
lost?: Lost;
|
|
124
135
|
notes?: Note[];
|
|
125
136
|
organization: Types.ObjectId;
|
|
@@ -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.SaleModel = exports.SaleSchema = exports.Sale = exports.CommissionInfo = exports.CommissionParticipant = exports.TimelineEntry = exports.Lost = exports.Formalization = exports.Negotiation = exports.Proposal = exports.Screening = void 0;
|
|
12
|
+
exports.SaleModel = exports.SaleSchema = exports.Sale = exports.Inbox = exports.CommissionInfo = exports.CommissionParticipant = exports.TimelineEntry = exports.Lost = exports.Formalization = exports.Negotiation = exports.Proposal = exports.Screening = void 0;
|
|
13
13
|
const mongoose_1 = require("@nestjs/mongoose");
|
|
14
14
|
const mongoose_2 = require("mongoose");
|
|
15
15
|
let Screening = class Screening {
|
|
@@ -325,6 +325,44 @@ CommissionInfo = __decorate([
|
|
|
325
325
|
(0, mongoose_1.Schema)({ _id: false })
|
|
326
326
|
], CommissionInfo);
|
|
327
327
|
exports.CommissionInfo = CommissionInfo;
|
|
328
|
+
let Inbox = class Inbox {
|
|
329
|
+
};
|
|
330
|
+
__decorate([
|
|
331
|
+
(0, mongoose_1.Prop)({ required: true }),
|
|
332
|
+
__metadata("design:type", String)
|
|
333
|
+
], Inbox.prototype, "gmailMessageId", void 0);
|
|
334
|
+
__decorate([
|
|
335
|
+
(0, mongoose_1.Prop)({ required: true }),
|
|
336
|
+
__metadata("design:type", String)
|
|
337
|
+
], Inbox.prototype, "gmailThreadId", void 0);
|
|
338
|
+
__decorate([
|
|
339
|
+
(0, mongoose_1.Prop)({ required: true }),
|
|
340
|
+
__metadata("design:type", String)
|
|
341
|
+
], Inbox.prototype, "from", void 0);
|
|
342
|
+
__decorate([
|
|
343
|
+
(0, mongoose_1.Prop)({ required: true }),
|
|
344
|
+
__metadata("design:type", String)
|
|
345
|
+
], Inbox.prototype, "to", void 0);
|
|
346
|
+
__decorate([
|
|
347
|
+
(0, mongoose_1.Prop)({ required: true }),
|
|
348
|
+
__metadata("design:type", String)
|
|
349
|
+
], Inbox.prototype, "subject", void 0);
|
|
350
|
+
__decorate([
|
|
351
|
+
(0, mongoose_1.Prop)({ required: true }),
|
|
352
|
+
__metadata("design:type", String)
|
|
353
|
+
], Inbox.prototype, "bodyText", void 0);
|
|
354
|
+
__decorate([
|
|
355
|
+
(0, mongoose_1.Prop)({ required: false }),
|
|
356
|
+
__metadata("design:type", String)
|
|
357
|
+
], Inbox.prototype, "bodyHtml", void 0);
|
|
358
|
+
__decorate([
|
|
359
|
+
(0, mongoose_1.Prop)({ required: true }),
|
|
360
|
+
__metadata("design:type", Date)
|
|
361
|
+
], Inbox.prototype, "receivedAt", void 0);
|
|
362
|
+
Inbox = __decorate([
|
|
363
|
+
(0, mongoose_1.Schema)({ _id: false })
|
|
364
|
+
], Inbox);
|
|
365
|
+
exports.Inbox = Inbox;
|
|
328
366
|
let Sale = class Sale {
|
|
329
367
|
};
|
|
330
368
|
__decorate([
|
|
@@ -339,6 +377,7 @@ __decorate([
|
|
|
339
377
|
(0, mongoose_1.Prop)({
|
|
340
378
|
required: true,
|
|
341
379
|
enum: [
|
|
380
|
+
'inbox',
|
|
342
381
|
'screening',
|
|
343
382
|
'proposal',
|
|
344
383
|
'negotiation',
|
|
@@ -378,6 +417,10 @@ __decorate([
|
|
|
378
417
|
(0, mongoose_1.Prop)({ type: CommissionInfo, required: false }),
|
|
379
418
|
__metadata("design:type", CommissionInfo)
|
|
380
419
|
], Sale.prototype, "commission", void 0);
|
|
420
|
+
__decorate([
|
|
421
|
+
(0, mongoose_1.Prop)({ type: Inbox }),
|
|
422
|
+
__metadata("design:type", Inbox)
|
|
423
|
+
], Sale.prototype, "inbox", void 0);
|
|
381
424
|
__decorate([
|
|
382
425
|
(0, mongoose_1.Prop)({ type: Lost }),
|
|
383
426
|
__metadata("design:type", Lost)
|
package/package.json
CHANGED
|
@@ -194,7 +194,11 @@ export class Action {
|
|
|
194
194
|
|
|
195
195
|
@ApiProperty({ example: ['@influencer', '@brand'], required: false })
|
|
196
196
|
@Prop({ type: [String], required: false })
|
|
197
|
-
|
|
197
|
+
instagramMentions?: string[];
|
|
198
|
+
|
|
199
|
+
@ApiProperty({ example: ['@influencer', '@brand'], required: false })
|
|
200
|
+
@Prop({ type: [String], required: false })
|
|
201
|
+
tiktokMentions?: string[];
|
|
198
202
|
|
|
199
203
|
@ApiProperty({ example: ['produto', 'categoria'], required: false })
|
|
200
204
|
@Prop({ type: [String], required: false })
|
|
@@ -149,10 +149,10 @@ export class Content {
|
|
|
149
149
|
|
|
150
150
|
@Prop({
|
|
151
151
|
type: String,
|
|
152
|
-
enum: ['reel', 'image', 'carousel', 'story', 'video', 'post', 'pin'],
|
|
152
|
+
enum: ['reel', 'image', 'carousel', 'story', 'video', 'post', 'pin', 'tweet'],
|
|
153
153
|
required: true,
|
|
154
154
|
})
|
|
155
|
-
type: 'reel' | 'carousel' | 'image' | 'story' | 'video' | 'post' | 'pin';
|
|
155
|
+
type: 'reel' | 'carousel' | 'image' | 'story' | 'video' | 'post' | 'pin' | 'tweet';
|
|
156
156
|
|
|
157
157
|
@Prop({
|
|
158
158
|
type: String,
|
|
@@ -163,10 +163,10 @@ export class Content {
|
|
|
163
163
|
|
|
164
164
|
@Prop({
|
|
165
165
|
type: String,
|
|
166
|
-
enum: ['instagram', 'tiktok', 'youtube', 'pinterest', 'linkedin'],
|
|
166
|
+
enum: ['instagram', 'tiktok', 'youtube', 'pinterest', 'linkedin', 'twitter'],
|
|
167
167
|
required: true,
|
|
168
168
|
})
|
|
169
|
-
socialnetwork: 'instagram' | 'tiktok' | 'youtube' | 'pinterest' | 'linkedin';
|
|
169
|
+
socialnetwork: 'instagram' | 'tiktok' | 'youtube' | 'pinterest' | 'linkedin' | 'twitter';
|
|
170
170
|
|
|
171
171
|
@Prop({
|
|
172
172
|
type: String,
|
|
@@ -154,6 +154,18 @@ export class CommissionInfo {
|
|
|
154
154
|
participants: CommissionParticipant[];
|
|
155
155
|
}
|
|
156
156
|
|
|
157
|
+
@Schema({ _id: false })
|
|
158
|
+
export class Inbox {
|
|
159
|
+
@Prop({ required: true }) gmailMessageId: string;
|
|
160
|
+
@Prop({ required: true }) gmailThreadId: string;
|
|
161
|
+
@Prop({ required: true }) from: string;
|
|
162
|
+
@Prop({ required: true }) to: string;
|
|
163
|
+
@Prop({ required: true }) subject: string;
|
|
164
|
+
@Prop({ required: true }) bodyText: string;
|
|
165
|
+
@Prop({ required: false }) bodyHtml?: string;
|
|
166
|
+
@Prop({ required: true }) receivedAt: Date;
|
|
167
|
+
}
|
|
168
|
+
|
|
157
169
|
@Schema({ timestamps: true })
|
|
158
170
|
export class Sale {
|
|
159
171
|
@Prop({ type: MongooseSchema.Types.ObjectId, auto: true, required: false })
|
|
@@ -164,6 +176,7 @@ export class Sale {
|
|
|
164
176
|
@Prop({
|
|
165
177
|
required: true,
|
|
166
178
|
enum: [
|
|
179
|
+
'inbox',
|
|
167
180
|
'screening',
|
|
168
181
|
'proposal',
|
|
169
182
|
'negotiation',
|
|
@@ -174,6 +187,7 @@ export class Sale {
|
|
|
174
187
|
],
|
|
175
188
|
})
|
|
176
189
|
phase:
|
|
190
|
+
| 'inbox'
|
|
177
191
|
| 'screening'
|
|
178
192
|
| 'proposal'
|
|
179
193
|
| 'negotiation'
|
|
@@ -195,6 +209,8 @@ export class Sale {
|
|
|
195
209
|
@Prop({ type: Formalization }) formalization?: Formalization;
|
|
196
210
|
@Prop({ type: CommissionInfo, required: false }) commission?: CommissionInfo;
|
|
197
211
|
|
|
212
|
+
@Prop({ type: Inbox }) inbox?: Inbox;
|
|
213
|
+
|
|
198
214
|
@Prop({ type: Lost }) lost?: Lost;
|
|
199
215
|
|
|
200
216
|
@Prop([{ type: Note, required: false }])
|