@grapadigital/shared-schemas 1.0.24 → 1.0.26
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/campaign.schema.d.ts +12 -3
- package/dist/schemas/campaign.schema.js +30 -8
- package/dist/schemas/payment.schema.d.ts +5 -2
- package/dist/schemas/payment.schema.js +15 -3
- package/package.json +1 -1
- package/src/schemas/campaign.schema.ts +24 -7
- package/src/schemas/payment.schema.ts +13 -4
|
@@ -28,6 +28,11 @@ import { Recruitment } from './recruitment.schema';
|
|
|
28
28
|
import { Content } from './content.schema';
|
|
29
29
|
import { Client } from './client.schema';
|
|
30
30
|
export type CampaignDocument = HydratedDocument<Campaign>;
|
|
31
|
+
export declare class Installment {
|
|
32
|
+
number: number;
|
|
33
|
+
dueDate: Date;
|
|
34
|
+
value: number;
|
|
35
|
+
}
|
|
31
36
|
export declare class ComercialCard {
|
|
32
37
|
id: string;
|
|
33
38
|
title: string;
|
|
@@ -35,9 +40,13 @@ export declare class ComercialCard {
|
|
|
35
40
|
feeValue: number;
|
|
36
41
|
taxValue: number;
|
|
37
42
|
influencerValue: number;
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
43
|
+
expectedInvoiceIssueDate: Date | null;
|
|
44
|
+
expectedInvoiceDueDate: Date | null;
|
|
45
|
+
invoiceIssueDate: Date | null;
|
|
46
|
+
invoiceDueDate: Date | null;
|
|
47
|
+
invoicePaymentDate: Date | null;
|
|
48
|
+
dueDate: Date | null;
|
|
49
|
+
installments: Installment[];
|
|
41
50
|
}
|
|
42
51
|
export declare const ComercialCardSchema: MongooseSchema<ComercialCard, import("mongoose").Model<ComercialCard, any, any, any, import("mongoose").Document<unknown, any, ComercialCard> & ComercialCard & {
|
|
43
52
|
_id: Types.ObjectId;
|
|
@@ -9,9 +9,15 @@ 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.CampaignSchema = exports.Campaign = exports.ResponsiblesSchema = exports.Responsibles = exports.ResponsibleSchema = exports.Responsible = exports.ComercialCardSchema = exports.ComercialCard = void 0;
|
|
12
|
+
exports.CampaignSchema = exports.Campaign = exports.ResponsiblesSchema = exports.Responsibles = exports.ResponsibleSchema = exports.Responsible = exports.ComercialCardSchema = exports.ComercialCard = exports.Installment = void 0;
|
|
13
13
|
const mongoose_1 = require("@nestjs/mongoose");
|
|
14
14
|
const mongoose_2 = require("mongoose");
|
|
15
|
+
let Installment = class Installment {
|
|
16
|
+
};
|
|
17
|
+
Installment = __decorate([
|
|
18
|
+
(0, mongoose_1.Schema)({ _id: false })
|
|
19
|
+
], Installment);
|
|
20
|
+
exports.Installment = Installment;
|
|
15
21
|
let ComercialCard = class ComercialCard {
|
|
16
22
|
};
|
|
17
23
|
__decorate([
|
|
@@ -39,16 +45,32 @@ __decorate([
|
|
|
39
45
|
__metadata("design:type", Number)
|
|
40
46
|
], ComercialCard.prototype, "influencerValue", void 0);
|
|
41
47
|
__decorate([
|
|
42
|
-
(0, mongoose_1.Prop)(),
|
|
43
|
-
__metadata("design:type",
|
|
44
|
-
], ComercialCard.prototype, "
|
|
48
|
+
(0, mongoose_1.Prop)({ type: Date, default: null }),
|
|
49
|
+
__metadata("design:type", Object)
|
|
50
|
+
], ComercialCard.prototype, "expectedInvoiceIssueDate", void 0);
|
|
45
51
|
__decorate([
|
|
46
|
-
(0, mongoose_1.Prop)(),
|
|
47
|
-
__metadata("design:type",
|
|
52
|
+
(0, mongoose_1.Prop)({ type: Date, default: null }),
|
|
53
|
+
__metadata("design:type", Object)
|
|
54
|
+
], ComercialCard.prototype, "expectedInvoiceDueDate", void 0);
|
|
55
|
+
__decorate([
|
|
56
|
+
(0, mongoose_1.Prop)({ type: Date, default: null }),
|
|
57
|
+
__metadata("design:type", Object)
|
|
58
|
+
], ComercialCard.prototype, "invoiceIssueDate", void 0);
|
|
59
|
+
__decorate([
|
|
60
|
+
(0, mongoose_1.Prop)({ type: Date, default: null }),
|
|
61
|
+
__metadata("design:type", Object)
|
|
62
|
+
], ComercialCard.prototype, "invoiceDueDate", void 0);
|
|
63
|
+
__decorate([
|
|
64
|
+
(0, mongoose_1.Prop)({ type: Date, default: null }),
|
|
65
|
+
__metadata("design:type", Object)
|
|
66
|
+
], ComercialCard.prototype, "invoicePaymentDate", void 0);
|
|
67
|
+
__decorate([
|
|
68
|
+
(0, mongoose_1.Prop)({ type: Date, default: null }),
|
|
69
|
+
__metadata("design:type", Object)
|
|
48
70
|
], ComercialCard.prototype, "dueDate", void 0);
|
|
49
71
|
__decorate([
|
|
50
|
-
(0, mongoose_1.Prop)(),
|
|
51
|
-
__metadata("design:type",
|
|
72
|
+
(0, mongoose_1.Prop)({ type: [Installment] }),
|
|
73
|
+
__metadata("design:type", Array)
|
|
52
74
|
], ComercialCard.prototype, "installments", void 0);
|
|
53
75
|
ComercialCard = __decorate([
|
|
54
76
|
(0, mongoose_1.Schema)({ _id: false })
|
|
@@ -73,14 +73,17 @@ export declare class Payment {
|
|
|
73
73
|
_id: Types.ObjectId;
|
|
74
74
|
requester: Requester;
|
|
75
75
|
value: number;
|
|
76
|
-
dueDate: Date;
|
|
76
|
+
dueDate: Date | null;
|
|
77
|
+
invoiceIssueDate: Date | null;
|
|
78
|
+
invoiceDueDate: Date | null;
|
|
79
|
+
paymentDate: Date | null;
|
|
77
80
|
comercialCard: PipefyCard;
|
|
78
81
|
financialCards: PipefyCard[];
|
|
79
82
|
pendingChanges: PendingChanges;
|
|
80
83
|
additionalComments: string;
|
|
81
84
|
googleSheetRow: string;
|
|
82
85
|
status: 'pending' | 'review' | 'processing' | 'failed' | 'completed';
|
|
83
|
-
type: 'influencer' | 'advisor';
|
|
86
|
+
type: 'influencer' | 'advisor' | 'provider';
|
|
84
87
|
influencer: Types.ObjectId | Influencer;
|
|
85
88
|
campaign: Types.ObjectId | Campaign;
|
|
86
89
|
recruitment: Types.ObjectId | Recruitment;
|
|
@@ -80,9 +80,21 @@ __decorate([
|
|
|
80
80
|
__metadata("design:type", Number)
|
|
81
81
|
], Payment.prototype, "value", void 0);
|
|
82
82
|
__decorate([
|
|
83
|
-
(0, mongoose_1.Prop)(),
|
|
84
|
-
__metadata("design:type",
|
|
83
|
+
(0, mongoose_1.Prop)({ type: Date, default: null }),
|
|
84
|
+
__metadata("design:type", Object)
|
|
85
85
|
], Payment.prototype, "dueDate", void 0);
|
|
86
|
+
__decorate([
|
|
87
|
+
(0, mongoose_1.Prop)({ type: Date, default: null }),
|
|
88
|
+
__metadata("design:type", Object)
|
|
89
|
+
], Payment.prototype, "invoiceIssueDate", void 0);
|
|
90
|
+
__decorate([
|
|
91
|
+
(0, mongoose_1.Prop)({ type: Date, default: null }),
|
|
92
|
+
__metadata("design:type", Object)
|
|
93
|
+
], Payment.prototype, "invoiceDueDate", void 0);
|
|
94
|
+
__decorate([
|
|
95
|
+
(0, mongoose_1.Prop)({ type: Date, default: null }),
|
|
96
|
+
__metadata("design:type", Object)
|
|
97
|
+
], Payment.prototype, "paymentDate", void 0);
|
|
86
98
|
__decorate([
|
|
87
99
|
(0, mongoose_1.Prop)({ type: exports.PipefyCardSchema }),
|
|
88
100
|
__metadata("design:type", PipefyCard)
|
|
@@ -111,7 +123,7 @@ __decorate([
|
|
|
111
123
|
__metadata("design:type", String)
|
|
112
124
|
], Payment.prototype, "status", void 0);
|
|
113
125
|
__decorate([
|
|
114
|
-
(0, mongoose_1.Prop)({ type: String, enum: ['influencer', 'advisor'] }),
|
|
126
|
+
(0, mongoose_1.Prop)({ type: String, enum: ['influencer', 'advisor', 'provider'] }),
|
|
115
127
|
__metadata("design:type", String)
|
|
116
128
|
], Payment.prototype, "type", void 0);
|
|
117
129
|
__decorate([
|
package/package.json
CHANGED
|
@@ -7,6 +7,12 @@ import { Client } from './client.schema';
|
|
|
7
7
|
|
|
8
8
|
export type CampaignDocument = HydratedDocument<Campaign>;
|
|
9
9
|
|
|
10
|
+
@Schema({ _id: false })
|
|
11
|
+
export class Installment {
|
|
12
|
+
number: number;
|
|
13
|
+
dueDate: Date;
|
|
14
|
+
value: number;
|
|
15
|
+
}
|
|
10
16
|
@Schema({ _id: false })
|
|
11
17
|
export class ComercialCard {
|
|
12
18
|
@Prop()
|
|
@@ -27,18 +33,29 @@ export class ComercialCard {
|
|
|
27
33
|
@Prop()
|
|
28
34
|
influencerValue: number;
|
|
29
35
|
|
|
30
|
-
@Prop()
|
|
31
|
-
|
|
36
|
+
@Prop({ type: Date, default: null })
|
|
37
|
+
expectedInvoiceIssueDate: Date | null;
|
|
32
38
|
|
|
33
|
-
@Prop()
|
|
34
|
-
|
|
39
|
+
@Prop({ type: Date, default: null })
|
|
40
|
+
expectedInvoiceDueDate: Date | null;
|
|
35
41
|
|
|
36
|
-
@Prop()
|
|
37
|
-
|
|
42
|
+
@Prop({ type: Date, default: null })
|
|
43
|
+
invoiceIssueDate: Date | null;
|
|
44
|
+
|
|
45
|
+
@Prop({ type: Date, default: null })
|
|
46
|
+
invoiceDueDate: Date | null;
|
|
47
|
+
|
|
48
|
+
@Prop({ type: Date, default: null })
|
|
49
|
+
invoicePaymentDate: Date | null;
|
|
50
|
+
|
|
51
|
+
@Prop({ type: Date, default: null })
|
|
52
|
+
dueDate: Date | null;
|
|
53
|
+
|
|
54
|
+
@Prop({ type: [Installment] })
|
|
55
|
+
installments: Installment[];
|
|
38
56
|
}
|
|
39
57
|
|
|
40
58
|
export const ComercialCardSchema = SchemaFactory.createForClass(ComercialCard);
|
|
41
|
-
|
|
42
59
|
@Schema({ _id: false })
|
|
43
60
|
export class Responsible {
|
|
44
61
|
@Prop()
|
|
@@ -57,8 +57,17 @@ export class Payment {
|
|
|
57
57
|
@Prop()
|
|
58
58
|
value: number;
|
|
59
59
|
|
|
60
|
-
@Prop()
|
|
61
|
-
dueDate: Date;
|
|
60
|
+
@Prop({ type: Date, default: null })
|
|
61
|
+
dueDate: Date | null;
|
|
62
|
+
|
|
63
|
+
@Prop({ type: Date, default: null })
|
|
64
|
+
invoiceIssueDate: Date | null;
|
|
65
|
+
|
|
66
|
+
@Prop({ type: Date, default: null })
|
|
67
|
+
invoiceDueDate: Date | null;
|
|
68
|
+
|
|
69
|
+
@Prop({ type: Date, default: null })
|
|
70
|
+
paymentDate: Date | null;
|
|
62
71
|
|
|
63
72
|
@Prop({ type: PipefyCardSchema })
|
|
64
73
|
comercialCard: PipefyCard;
|
|
@@ -81,8 +90,8 @@ export class Payment {
|
|
|
81
90
|
})
|
|
82
91
|
status: 'pending' | 'review' | 'processing' | 'failed' | 'completed';
|
|
83
92
|
|
|
84
|
-
@Prop({ type: String, enum: ['influencer', 'advisor'] })
|
|
85
|
-
type: 'influencer' | 'advisor';
|
|
93
|
+
@Prop({ type: String, enum: ['influencer', 'advisor', 'provider'] })
|
|
94
|
+
type: 'influencer' | 'advisor' | 'provider';
|
|
86
95
|
|
|
87
96
|
@Prop({ type: MongooseSchema.Types.ObjectId, ref: 'Influencer' })
|
|
88
97
|
influencer: Types.ObjectId | Influencer;
|