@grapadigital/shared-schemas 1.0.157 → 1.0.159
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/commission.schema.d.ts +1 -0
- package/dist/schemas/commission.schema.js +4 -0
- package/dist/schemas/payment.schema.d.ts +2 -1
- package/dist/schemas/payment.schema.js +6 -1
- package/dist/schemas/sale.schema.d.ts +8 -1
- package/dist/schemas/sale.schema.js +27 -1
- package/package.json +1 -1
- package/src/schemas/commission.schema.ts +3 -0
- package/src/schemas/payment.schema.ts +9 -4
- package/src/schemas/sale.schema.ts +12 -1
|
@@ -46,6 +46,7 @@ export declare class Commission {
|
|
|
46
46
|
createdAt?: Date;
|
|
47
47
|
updatedAt?: Date;
|
|
48
48
|
organization?: Types.ObjectId;
|
|
49
|
+
payment?: Types.ObjectId;
|
|
49
50
|
}
|
|
50
51
|
export declare const CommissionSchema: MongooseSchema<Commission, import("mongoose").Model<Commission, any, any, any, import("mongoose").Document<unknown, any, Commission, any, {}> & Commission & Required<{
|
|
51
52
|
_id: Types.ObjectId;
|
|
@@ -104,6 +104,10 @@ __decorate([
|
|
|
104
104
|
(0, mongoose_1.Prop)({ type: mongoose_2.Schema.Types.ObjectId, required: false }),
|
|
105
105
|
__metadata("design:type", mongoose_2.Types.ObjectId)
|
|
106
106
|
], Commission.prototype, "organization", void 0);
|
|
107
|
+
__decorate([
|
|
108
|
+
(0, mongoose_1.Prop)({ type: mongoose_2.Schema.Types.ObjectId, ref: 'Payment', required: false }),
|
|
109
|
+
__metadata("design:type", mongoose_2.Types.ObjectId)
|
|
110
|
+
], Commission.prototype, "payment", void 0);
|
|
107
111
|
Commission = __decorate([
|
|
108
112
|
(0, mongoose_1.Schema)({ timestamps: true })
|
|
109
113
|
], Commission);
|
|
@@ -50,7 +50,7 @@ export declare const ReviewSchema: MongooseSchema<Review, import("mongoose").Mod
|
|
|
50
50
|
}>;
|
|
51
51
|
export declare class Pending {
|
|
52
52
|
requester: Requester;
|
|
53
|
-
type: "influencer" | "advisor" | "employee_refund" | "influencer_extra" | "influencer_refund" | "partlog" | "airplane_ticket" | "hotel_ticket" | "supplier" | "rumo_certo" | "correios" | "conta_simples" | "motoboy_bruno" | "motoboy_others";
|
|
53
|
+
type: "influencer" | "advisor" | "employee_refund" | "influencer_extra" | "influencer_refund" | "partlog" | "airplane_ticket" | "hotel_ticket" | "supplier" | "rumo_certo" | "correios" | "conta_simples" | "motoboy_bruno" | "motoboy_others" | "commission";
|
|
54
54
|
purpose?: 'Envio SP' | 'Envio Outros' | 'Passagem' | 'Hospedagem' | 'Compras' | 'Logistica Time' | 'Outros';
|
|
55
55
|
adidasCategory?: 'Originals' | 'Running' | 'Football' | 'Training' | 'Omni';
|
|
56
56
|
influencer?: Types.ObjectId | Influencer;
|
|
@@ -61,6 +61,7 @@ export declare class Pending {
|
|
|
61
61
|
installmentNumber: number;
|
|
62
62
|
sale: Types.ObjectId | Sale;
|
|
63
63
|
action?: Types.ObjectId | Action;
|
|
64
|
+
commissions?: Types.ObjectId[];
|
|
64
65
|
}
|
|
65
66
|
export declare const PendingSchema: MongooseSchema<Pending, import("mongoose").Model<Pending, any, any, any, import("mongoose").Document<unknown, any, Pending, any, {}> & Pending & {
|
|
66
67
|
_id: Types.ObjectId;
|
|
@@ -68,7 +68,8 @@ __decorate([
|
|
|
68
68
|
"correios",
|
|
69
69
|
"conta_simples",
|
|
70
70
|
"motoboy_bruno",
|
|
71
|
-
"motoboy_others"
|
|
71
|
+
"motoboy_others",
|
|
72
|
+
"commission"
|
|
72
73
|
]
|
|
73
74
|
}),
|
|
74
75
|
__metadata("design:type", String)
|
|
@@ -135,6 +136,10 @@ __decorate([
|
|
|
135
136
|
(0, mongoose_1.Prop)({ type: mongoose_2.Schema.Types.ObjectId, ref: 'Action' }),
|
|
136
137
|
__metadata("design:type", Object)
|
|
137
138
|
], Pending.prototype, "action", void 0);
|
|
139
|
+
__decorate([
|
|
140
|
+
(0, mongoose_1.Prop)({ type: [mongoose_2.Schema.Types.ObjectId], ref: 'Commission', required: false, default: [] }),
|
|
141
|
+
__metadata("design:type", Array)
|
|
142
|
+
], Pending.prototype, "commissions", void 0);
|
|
138
143
|
Pending = __decorate([
|
|
139
144
|
(0, mongoose_1.Schema)({ _id: false })
|
|
140
145
|
], Pending);
|
|
@@ -86,7 +86,7 @@ export declare class Formalization {
|
|
|
86
86
|
totalInstallments: number;
|
|
87
87
|
}
|
|
88
88
|
export declare class Lost {
|
|
89
|
-
reason: 'declined' | 'other';
|
|
89
|
+
reason: 'declined' | 'other' | 'spam' | 'no_response' | 'no_budget' | 'no_profile_fit' | 'invite_exchange';
|
|
90
90
|
details?: string;
|
|
91
91
|
}
|
|
92
92
|
declare class Note {
|
|
@@ -94,6 +94,12 @@ declare class Note {
|
|
|
94
94
|
owner: string;
|
|
95
95
|
createdAt: Date;
|
|
96
96
|
}
|
|
97
|
+
export declare class Activity {
|
|
98
|
+
type: 'email' | 'whatsapp' | 'meeting' | 'call' | 'linkedin' | 'instagram_dm';
|
|
99
|
+
description?: string;
|
|
100
|
+
owner: string;
|
|
101
|
+
createdAt: Date;
|
|
102
|
+
}
|
|
97
103
|
export declare class TimelineEntry {
|
|
98
104
|
phase: string;
|
|
99
105
|
date: Date;
|
|
@@ -135,6 +141,7 @@ export declare class Sale {
|
|
|
135
141
|
inbox?: Inbox;
|
|
136
142
|
lost?: Lost;
|
|
137
143
|
notes?: Note[];
|
|
144
|
+
activities?: Activity[];
|
|
138
145
|
organization: Types.ObjectId;
|
|
139
146
|
tags?: string[];
|
|
140
147
|
timeline?: TimelineEntry[];
|
|
@@ -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.Inbox = 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.Activity = 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 {
|
|
@@ -267,6 +267,28 @@ __decorate([
|
|
|
267
267
|
Note = __decorate([
|
|
268
268
|
(0, mongoose_1.Schema)({ _id: false })
|
|
269
269
|
], Note);
|
|
270
|
+
let Activity = class Activity {
|
|
271
|
+
};
|
|
272
|
+
__decorate([
|
|
273
|
+
(0, mongoose_1.Prop)({ required: true }),
|
|
274
|
+
__metadata("design:type", String)
|
|
275
|
+
], Activity.prototype, "type", void 0);
|
|
276
|
+
__decorate([
|
|
277
|
+
(0, mongoose_1.Prop)({ required: false }),
|
|
278
|
+
__metadata("design:type", String)
|
|
279
|
+
], Activity.prototype, "description", void 0);
|
|
280
|
+
__decorate([
|
|
281
|
+
(0, mongoose_1.Prop)({ required: true }),
|
|
282
|
+
__metadata("design:type", String)
|
|
283
|
+
], Activity.prototype, "owner", void 0);
|
|
284
|
+
__decorate([
|
|
285
|
+
(0, mongoose_1.Prop)({ required: true }),
|
|
286
|
+
__metadata("design:type", Date)
|
|
287
|
+
], Activity.prototype, "createdAt", void 0);
|
|
288
|
+
Activity = __decorate([
|
|
289
|
+
(0, mongoose_1.Schema)({ _id: false })
|
|
290
|
+
], Activity);
|
|
291
|
+
exports.Activity = Activity;
|
|
270
292
|
let TimelineEntry = class TimelineEntry {
|
|
271
293
|
};
|
|
272
294
|
__decorate([
|
|
@@ -444,6 +466,10 @@ __decorate([
|
|
|
444
466
|
(0, mongoose_1.Prop)([{ type: Note, required: false }]),
|
|
445
467
|
__metadata("design:type", Array)
|
|
446
468
|
], Sale.prototype, "notes", void 0);
|
|
469
|
+
__decorate([
|
|
470
|
+
(0, mongoose_1.Prop)([{ type: Activity, required: false }]),
|
|
471
|
+
__metadata("design:type", Array)
|
|
472
|
+
], Sale.prototype, "activities", void 0);
|
|
447
473
|
__decorate([
|
|
448
474
|
(0, mongoose_1.Prop)({ type: mongoose_2.Schema.Types.ObjectId }),
|
|
449
475
|
__metadata("design:type", mongoose_2.Types.ObjectId)
|
package/package.json
CHANGED
|
@@ -83,6 +83,9 @@ export class Commission {
|
|
|
83
83
|
|
|
84
84
|
@Prop({ type: MongooseSchema.Types.ObjectId, required: false })
|
|
85
85
|
organization?: Types.ObjectId;
|
|
86
|
+
|
|
87
|
+
@Prop({ type: MongooseSchema.Types.ObjectId, ref: 'Payment', required: false })
|
|
88
|
+
payment?: Types.ObjectId;
|
|
86
89
|
}
|
|
87
90
|
|
|
88
91
|
export const CommissionSchema = SchemaFactory.createForClass(Commission);
|
|
@@ -48,7 +48,7 @@ export class Pending {
|
|
|
48
48
|
enum: [
|
|
49
49
|
"influencer",
|
|
50
50
|
"advisor",
|
|
51
|
-
"employee_refund",
|
|
51
|
+
"employee_refund",
|
|
52
52
|
"influencer_extra",
|
|
53
53
|
"influencer_refund",
|
|
54
54
|
"partlog",
|
|
@@ -59,7 +59,8 @@ export class Pending {
|
|
|
59
59
|
"correios",
|
|
60
60
|
"conta_simples",
|
|
61
61
|
"motoboy_bruno",
|
|
62
|
-
"motoboy_others"
|
|
62
|
+
"motoboy_others",
|
|
63
|
+
"commission"
|
|
63
64
|
]
|
|
64
65
|
})
|
|
65
66
|
type:
|
|
@@ -69,14 +70,15 @@ export class Pending {
|
|
|
69
70
|
"influencer_extra" |
|
|
70
71
|
"influencer_refund" |
|
|
71
72
|
"partlog" |
|
|
72
|
-
"airplane_ticket" |
|
|
73
|
+
"airplane_ticket" |
|
|
73
74
|
"hotel_ticket" |
|
|
74
75
|
"supplier" |
|
|
75
76
|
"rumo_certo" |
|
|
76
77
|
"correios" |
|
|
77
78
|
"conta_simples" |
|
|
78
79
|
"motoboy_bruno" |
|
|
79
|
-
"motoboy_others"
|
|
80
|
+
"motoboy_others" |
|
|
81
|
+
"commission";
|
|
80
82
|
|
|
81
83
|
@Prop({
|
|
82
84
|
type: String,
|
|
@@ -126,6 +128,9 @@ export class Pending {
|
|
|
126
128
|
|
|
127
129
|
@Prop({ type: MongooseSchema.Types.ObjectId, ref: 'Action' })
|
|
128
130
|
action?: Types.ObjectId | Action;
|
|
131
|
+
|
|
132
|
+
@Prop({ type: [MongooseSchema.Types.ObjectId], ref: 'Commission', required: false, default: [] })
|
|
133
|
+
commissions?: Types.ObjectId[];
|
|
129
134
|
}
|
|
130
135
|
export const PendingSchema = SchemaFactory.createForClass(Pending);
|
|
131
136
|
|
|
@@ -125,7 +125,7 @@ export class Formalization {
|
|
|
125
125
|
|
|
126
126
|
@Schema({ _id: false })
|
|
127
127
|
export class Lost {
|
|
128
|
-
@Prop({ required: true }) reason: 'declined' | 'other';
|
|
128
|
+
@Prop({ required: true }) reason: 'declined' | 'other' | 'spam' | 'no_response' | 'no_budget' | 'no_profile_fit' | 'invite_exchange';
|
|
129
129
|
@Prop() details?: string;
|
|
130
130
|
}
|
|
131
131
|
|
|
@@ -136,6 +136,14 @@ class Note {
|
|
|
136
136
|
@Prop({ required: true }) createdAt: Date;
|
|
137
137
|
}
|
|
138
138
|
|
|
139
|
+
@Schema({ _id: false })
|
|
140
|
+
export class Activity {
|
|
141
|
+
@Prop({ required: true }) type: 'email' | 'whatsapp' | 'meeting' | 'call' | 'linkedin' | 'instagram_dm';
|
|
142
|
+
@Prop({ required: false }) description?: string;
|
|
143
|
+
@Prop({ required: true }) owner: string;
|
|
144
|
+
@Prop({ required: true }) createdAt: Date;
|
|
145
|
+
}
|
|
146
|
+
|
|
139
147
|
@Schema({ _id: false })
|
|
140
148
|
export class TimelineEntry {
|
|
141
149
|
@Prop({ required: true }) phase: string;
|
|
@@ -237,6 +245,9 @@ export class Sale {
|
|
|
237
245
|
@Prop([{ type: Note, required: false }])
|
|
238
246
|
notes?: Note[];
|
|
239
247
|
|
|
248
|
+
@Prop([{ type: Activity, required: false }])
|
|
249
|
+
activities?: Activity[];
|
|
250
|
+
|
|
240
251
|
@Prop({ type: MongooseSchema.Types.ObjectId })
|
|
241
252
|
organization: Types.ObjectId;
|
|
242
253
|
|