@grapadigital/shared-schemas 1.0.90 → 1.0.92
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/invoice.schema.d.ts +4 -2
- package/dist/schemas/invoice.schema.js +11 -3
- package/dist/schemas/payment.schema.d.ts +6 -1
- package/dist/schemas/payment.schema.js +59 -1
- package/dist/schemas/sale.schema.d.ts +1 -0
- package/dist/schemas/sale.schema.js +4 -0
- package/package.json +1 -1
- package/src/schemas/invoice.schema.ts +6 -2
- package/src/schemas/payment.schema.ts +55 -2
- package/src/schemas/sale.schema.ts +3 -0
|
@@ -30,8 +30,10 @@ declare class Inbox {
|
|
|
30
30
|
invoiceDescription?: string;
|
|
31
31
|
invoiceEmail?: string;
|
|
32
32
|
emissionNotes?: string;
|
|
33
|
-
|
|
34
|
-
|
|
33
|
+
installmentGrossIncomeValue: number;
|
|
34
|
+
installmentRevenue: number;
|
|
35
|
+
installmentInfluencerBroadcastValue: number;
|
|
36
|
+
installmentProductionAndOthersValue: number;
|
|
35
37
|
estimatedIssueDate: Date;
|
|
36
38
|
estimatedDueDate: Date;
|
|
37
39
|
}
|
|
@@ -27,13 +27,21 @@ __decorate([
|
|
|
27
27
|
__metadata("design:type", String)
|
|
28
28
|
], Inbox.prototype, "emissionNotes", void 0);
|
|
29
29
|
__decorate([
|
|
30
|
-
(0, mongoose_1.Prop)({ required:
|
|
30
|
+
(0, mongoose_1.Prop)({ required: true }),
|
|
31
|
+
__metadata("design:type", Number)
|
|
32
|
+
], Inbox.prototype, "installmentGrossIncomeValue", void 0);
|
|
33
|
+
__decorate([
|
|
34
|
+
(0, mongoose_1.Prop)({ required: true }),
|
|
35
|
+
__metadata("design:type", Number)
|
|
36
|
+
], Inbox.prototype, "installmentRevenue", void 0);
|
|
37
|
+
__decorate([
|
|
38
|
+
(0, mongoose_1.Prop)({ required: true }),
|
|
31
39
|
__metadata("design:type", Number)
|
|
32
|
-
], Inbox.prototype, "
|
|
40
|
+
], Inbox.prototype, "installmentInfluencerBroadcastValue", void 0);
|
|
33
41
|
__decorate([
|
|
34
42
|
(0, mongoose_1.Prop)({ required: true }),
|
|
35
43
|
__metadata("design:type", Number)
|
|
36
|
-
], Inbox.prototype, "
|
|
44
|
+
], Inbox.prototype, "installmentProductionAndOthersValue", void 0);
|
|
37
45
|
__decorate([
|
|
38
46
|
(0, mongoose_1.Prop)({ required: true }),
|
|
39
47
|
__metadata("design:type", Date)
|
|
@@ -50,12 +50,17 @@ 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' | 'supplier' | '
|
|
53
|
+
type: 'influencer' | 'advisor' | 'supplier' | 'employee_refund' | 'influencer_refund' | 'logistics_control' | 'transfer_between_accounts';
|
|
54
|
+
purpose?: 'envio_sp' | 'envio_outros' | 'passagem' | 'hospedagem' | 'compras' | 'logistica_time';
|
|
55
|
+
adidasCategory?: 'originals' | 'runnning' | 'football' | 'omni';
|
|
54
56
|
influencer?: Types.ObjectId | Influencer;
|
|
55
57
|
supplier?: Types.ObjectId | Supplier;
|
|
58
|
+
beneficiary?: Types.ObjectId | Influencer | Supplier;
|
|
59
|
+
beneficiaryModel?: 'Influencer' | 'Supplier';
|
|
56
60
|
recruitment?: Types.ObjectId | Recruitment;
|
|
57
61
|
value: number;
|
|
58
62
|
description: string;
|
|
63
|
+
attachments?: string[];
|
|
59
64
|
installmentNumber: number;
|
|
60
65
|
sale?: Types.ObjectId | Sale;
|
|
61
66
|
action: Types.ObjectId | Action;
|
|
@@ -52,9 +52,48 @@ __decorate([
|
|
|
52
52
|
__metadata("design:type", Requester)
|
|
53
53
|
], Pending.prototype, "requester", void 0);
|
|
54
54
|
__decorate([
|
|
55
|
-
(0, mongoose_1.Prop)({
|
|
55
|
+
(0, mongoose_1.Prop)({
|
|
56
|
+
type: String,
|
|
57
|
+
enum: [
|
|
58
|
+
'influencer',
|
|
59
|
+
'advisor',
|
|
60
|
+
'supplier',
|
|
61
|
+
'employee_refund',
|
|
62
|
+
'influencer_refund',
|
|
63
|
+
'logistics_control',
|
|
64
|
+
'transfer_between_accounts'
|
|
65
|
+
]
|
|
66
|
+
}),
|
|
56
67
|
__metadata("design:type", String)
|
|
57
68
|
], Pending.prototype, "type", void 0);
|
|
69
|
+
__decorate([
|
|
70
|
+
(0, mongoose_1.Prop)({
|
|
71
|
+
type: String,
|
|
72
|
+
enum: [
|
|
73
|
+
'envio_sp',
|
|
74
|
+
'envio_outros',
|
|
75
|
+
'passagem',
|
|
76
|
+
'hospedagem',
|
|
77
|
+
'compras',
|
|
78
|
+
'logistica_time'
|
|
79
|
+
],
|
|
80
|
+
required: false
|
|
81
|
+
}),
|
|
82
|
+
__metadata("design:type", String)
|
|
83
|
+
], Pending.prototype, "purpose", void 0);
|
|
84
|
+
__decorate([
|
|
85
|
+
(0, mongoose_1.Prop)({
|
|
86
|
+
type: String,
|
|
87
|
+
enum: [
|
|
88
|
+
'originals',
|
|
89
|
+
'runnning',
|
|
90
|
+
'football',
|
|
91
|
+
'omni'
|
|
92
|
+
],
|
|
93
|
+
required: false
|
|
94
|
+
}),
|
|
95
|
+
__metadata("design:type", String)
|
|
96
|
+
], Pending.prototype, "adidasCategory", void 0);
|
|
58
97
|
__decorate([
|
|
59
98
|
(0, mongoose_1.Prop)({ type: mongoose_2.Schema.Types.ObjectId, ref: 'Influencer' }),
|
|
60
99
|
__metadata("design:type", Object)
|
|
@@ -63,6 +102,14 @@ __decorate([
|
|
|
63
102
|
(0, mongoose_1.Prop)({ type: mongoose_2.Schema.Types.ObjectId, ref: 'Supplier' }),
|
|
64
103
|
__metadata("design:type", Object)
|
|
65
104
|
], Pending.prototype, "supplier", void 0);
|
|
105
|
+
__decorate([
|
|
106
|
+
(0, mongoose_1.Prop)({ type: mongoose_2.Schema.Types.ObjectId, refPath: 'beneficiaryModel' }),
|
|
107
|
+
__metadata("design:type", Object)
|
|
108
|
+
], Pending.prototype, "beneficiary", void 0);
|
|
109
|
+
__decorate([
|
|
110
|
+
(0, mongoose_1.Prop)({ type: String, enum: ['Influencer', 'Supplier'], required: false }),
|
|
111
|
+
__metadata("design:type", String)
|
|
112
|
+
], Pending.prototype, "beneficiaryModel", void 0);
|
|
66
113
|
__decorate([
|
|
67
114
|
(0, mongoose_1.Prop)({ type: mongoose_2.Schema.Types.ObjectId, ref: 'Recruitment' }),
|
|
68
115
|
__metadata("design:type", Object)
|
|
@@ -75,6 +122,17 @@ __decorate([
|
|
|
75
122
|
(0, mongoose_1.Prop)(),
|
|
76
123
|
__metadata("design:type", String)
|
|
77
124
|
], Pending.prototype, "description", void 0);
|
|
125
|
+
__decorate([
|
|
126
|
+
(0, mongoose_1.Prop)({
|
|
127
|
+
type: [{
|
|
128
|
+
name: { type: String, required: true },
|
|
129
|
+
url: { type: String, required: true }
|
|
130
|
+
}],
|
|
131
|
+
required: false,
|
|
132
|
+
default: []
|
|
133
|
+
}),
|
|
134
|
+
__metadata("design:type", Array)
|
|
135
|
+
], Pending.prototype, "attachments", void 0);
|
|
78
136
|
__decorate([
|
|
79
137
|
(0, mongoose_1.Prop)(),
|
|
80
138
|
__metadata("design:type", Number)
|
|
@@ -287,6 +287,10 @@ __decorate([
|
|
|
287
287
|
(0, mongoose_1.Prop)([{ type: Note, required: false }]),
|
|
288
288
|
__metadata("design:type", Array)
|
|
289
289
|
], Sale.prototype, "notes", void 0);
|
|
290
|
+
__decorate([
|
|
291
|
+
(0, mongoose_1.Prop)({ type: [String], required: false, default: [] }),
|
|
292
|
+
__metadata("design:type", Array)
|
|
293
|
+
], Sale.prototype, "tags", void 0);
|
|
290
294
|
__decorate([
|
|
291
295
|
(0, mongoose_1.Prop)([
|
|
292
296
|
{
|
package/package.json
CHANGED
|
@@ -12,9 +12,13 @@ class Inbox {
|
|
|
12
12
|
|
|
13
13
|
@Prop({ required: false }) emissionNotes?: string;
|
|
14
14
|
|
|
15
|
-
@Prop({ required:
|
|
15
|
+
@Prop({ required: true }) installmentGrossIncomeValue: number;
|
|
16
16
|
|
|
17
|
-
@Prop({ required: true })
|
|
17
|
+
@Prop({ required: true }) installmentRevenue: number;
|
|
18
|
+
|
|
19
|
+
@Prop({ required: true }) installmentInfluencerBroadcastValue: number;
|
|
20
|
+
|
|
21
|
+
@Prop({ required: true }) installmentProductionAndOthersValue: number;
|
|
18
22
|
|
|
19
23
|
@Prop({ required: true }) estimatedIssueDate: Date;
|
|
20
24
|
|
|
@@ -28,8 +28,45 @@ export class Pending {
|
|
|
28
28
|
@Prop({ type: RequesterSchema, required: true })
|
|
29
29
|
requester: Requester;
|
|
30
30
|
|
|
31
|
-
@Prop({
|
|
32
|
-
|
|
31
|
+
@Prop({
|
|
32
|
+
type: String,
|
|
33
|
+
enum: [
|
|
34
|
+
'influencer',
|
|
35
|
+
'advisor',
|
|
36
|
+
'supplier',
|
|
37
|
+
'employee_refund',
|
|
38
|
+
'influencer_refund',
|
|
39
|
+
'logistics_control',
|
|
40
|
+
'transfer_between_accounts'
|
|
41
|
+
]
|
|
42
|
+
})
|
|
43
|
+
type: 'influencer' | 'advisor' | 'supplier' | 'employee_refund' | 'influencer_refund' | 'logistics_control' | 'transfer_between_accounts';
|
|
44
|
+
|
|
45
|
+
@Prop({
|
|
46
|
+
type: String,
|
|
47
|
+
enum: [
|
|
48
|
+
'envio_sp',
|
|
49
|
+
'envio_outros',
|
|
50
|
+
'passagem',
|
|
51
|
+
'hospedagem',
|
|
52
|
+
'compras',
|
|
53
|
+
'logistica_time'
|
|
54
|
+
],
|
|
55
|
+
required: false
|
|
56
|
+
})
|
|
57
|
+
purpose?: 'envio_sp' | 'envio_outros' | 'passagem' | 'hospedagem' | 'compras' | 'logistica_time';
|
|
58
|
+
|
|
59
|
+
@Prop({
|
|
60
|
+
type: String,
|
|
61
|
+
enum: [
|
|
62
|
+
'originals',
|
|
63
|
+
'runnning',
|
|
64
|
+
'football',
|
|
65
|
+
'omni'
|
|
66
|
+
],
|
|
67
|
+
required: false
|
|
68
|
+
})
|
|
69
|
+
adidasCategory?: 'originals' | 'runnning' | 'football' | 'omni';
|
|
33
70
|
|
|
34
71
|
@Prop({ type: MongooseSchema.Types.ObjectId, ref: 'Influencer'})
|
|
35
72
|
influencer?: Types.ObjectId | Influencer;
|
|
@@ -37,12 +74,28 @@ export class Pending {
|
|
|
37
74
|
@Prop({ type: MongooseSchema.Types.ObjectId, ref: 'Supplier'})
|
|
38
75
|
supplier?: Types.ObjectId | Supplier;
|
|
39
76
|
|
|
77
|
+
@Prop({ type: MongooseSchema.Types.ObjectId, refPath: 'beneficiaryModel' })
|
|
78
|
+
beneficiary?: Types.ObjectId | Influencer | Supplier;
|
|
79
|
+
|
|
80
|
+
@Prop({ type: String, enum: ['Influencer', 'Supplier'], required: false })
|
|
81
|
+
beneficiaryModel?: 'Influencer' | 'Supplier';
|
|
82
|
+
|
|
40
83
|
@Prop({ type: MongooseSchema.Types.ObjectId, ref: 'Recruitment' })
|
|
41
84
|
recruitment?: Types.ObjectId | Recruitment;
|
|
42
85
|
|
|
43
86
|
@Prop() value: number;
|
|
44
87
|
@Prop() description: string;
|
|
45
88
|
|
|
89
|
+
@Prop({
|
|
90
|
+
type: [{
|
|
91
|
+
name: { type: String, required: true },
|
|
92
|
+
url: { type: String, required: true }
|
|
93
|
+
}],
|
|
94
|
+
required: false,
|
|
95
|
+
default: []
|
|
96
|
+
})
|
|
97
|
+
attachments?: string[];
|
|
98
|
+
|
|
46
99
|
@Prop() installmentNumber: number;
|
|
47
100
|
|
|
48
101
|
@Prop({ type: MongooseSchema.Types.ObjectId, ref: 'Sale' })
|