@grapadigital/shared-schemas 1.0.28 → 1.0.30
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 +2 -0
- package/dist/schemas/campaign.schema.js +12 -0
- package/dist/schemas/payment.schema.d.ts +11 -11
- package/dist/schemas/payment.schema.js +15 -15
- package/package.json +1 -1
- package/src/schemas/campaign.schema.ts +10 -0
- package/src/schemas/payment.schema.ts +22 -23
|
@@ -36,6 +36,18 @@ __decorate([
|
|
|
36
36
|
(0, mongoose_1.Prop)(),
|
|
37
37
|
__metadata("design:type", Number)
|
|
38
38
|
], ComercialCard.prototype, "internalCost", void 0);
|
|
39
|
+
__decorate([
|
|
40
|
+
(0, mongoose_1.Prop)({
|
|
41
|
+
type: String,
|
|
42
|
+
enum: ['yes_client', 'no_grapa', 'no_client'],
|
|
43
|
+
default: null,
|
|
44
|
+
}),
|
|
45
|
+
__metadata("design:type", String)
|
|
46
|
+
], ComercialCard.prototype, "passThrough", void 0);
|
|
47
|
+
__decorate([
|
|
48
|
+
(0, mongoose_1.Prop)(),
|
|
49
|
+
__metadata("design:type", Boolean)
|
|
50
|
+
], ComercialCard.prototype, "childPermit", void 0);
|
|
39
51
|
__decorate([
|
|
40
52
|
(0, mongoose_1.Prop)(),
|
|
41
53
|
__metadata("design:type", Number)
|
|
@@ -70,18 +70,18 @@ export declare const PendingChangesSchema: MongooseSchema<PendingChanges, import
|
|
|
70
70
|
__v: number;
|
|
71
71
|
}>;
|
|
72
72
|
export declare class Payment {
|
|
73
|
-
_id
|
|
74
|
-
requester
|
|
73
|
+
_id?: Types.ObjectId;
|
|
74
|
+
requester?: Requester;
|
|
75
75
|
value: number;
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
pendingChanges
|
|
83
|
-
additionalComments
|
|
84
|
-
googleSheetRow
|
|
76
|
+
installmentNumber: number;
|
|
77
|
+
dueDate?: Date | null;
|
|
78
|
+
invoiceIssueDate?: Date | null;
|
|
79
|
+
invoiceDueDate?: Date | null;
|
|
80
|
+
paymentDate?: Date | null;
|
|
81
|
+
financialCard?: PipefyCard;
|
|
82
|
+
pendingChanges?: PendingChanges;
|
|
83
|
+
additionalComments?: string;
|
|
84
|
+
googleSheetRow?: string;
|
|
85
85
|
status: 'pending' | 'review' | 'processing' | 'failed' | 'completed';
|
|
86
86
|
type: 'influencer' | 'advisor' | 'provider';
|
|
87
87
|
influencer: Types.ObjectId | Influencer;
|
|
@@ -68,11 +68,11 @@ exports.PendingChangesSchema = mongoose_1.SchemaFactory.createForClass(PendingCh
|
|
|
68
68
|
let Payment = class Payment {
|
|
69
69
|
};
|
|
70
70
|
__decorate([
|
|
71
|
-
(0, mongoose_1.Prop)({ type: mongoose_2.Schema.Types.ObjectId, auto: true }),
|
|
71
|
+
(0, mongoose_1.Prop)({ type: mongoose_2.Schema.Types.ObjectId, auto: true, required: false }),
|
|
72
72
|
__metadata("design:type", mongoose_2.Types.ObjectId)
|
|
73
73
|
], Payment.prototype, "_id", void 0);
|
|
74
74
|
__decorate([
|
|
75
|
-
(0, mongoose_1.Prop)({ type: exports.RequesterSchema }),
|
|
75
|
+
(0, mongoose_1.Prop)({ type: exports.RequesterSchema, required: false }),
|
|
76
76
|
__metadata("design:type", Requester)
|
|
77
77
|
], Payment.prototype, "requester", void 0);
|
|
78
78
|
__decorate([
|
|
@@ -80,39 +80,39 @@ __decorate([
|
|
|
80
80
|
__metadata("design:type", Number)
|
|
81
81
|
], Payment.prototype, "value", void 0);
|
|
82
82
|
__decorate([
|
|
83
|
-
(0, mongoose_1.Prop)(
|
|
83
|
+
(0, mongoose_1.Prop)(),
|
|
84
|
+
__metadata("design:type", Number)
|
|
85
|
+
], Payment.prototype, "installmentNumber", void 0);
|
|
86
|
+
__decorate([
|
|
87
|
+
(0, mongoose_1.Prop)({ type: Date, default: null, required: false }),
|
|
84
88
|
__metadata("design:type", Object)
|
|
85
89
|
], Payment.prototype, "dueDate", void 0);
|
|
86
90
|
__decorate([
|
|
87
|
-
(0, mongoose_1.Prop)({ type: Date, default: null }),
|
|
91
|
+
(0, mongoose_1.Prop)({ type: Date, default: null, required: false }),
|
|
88
92
|
__metadata("design:type", Object)
|
|
89
93
|
], Payment.prototype, "invoiceIssueDate", void 0);
|
|
90
94
|
__decorate([
|
|
91
|
-
(0, mongoose_1.Prop)({ type: Date, default: null }),
|
|
95
|
+
(0, mongoose_1.Prop)({ type: Date, default: null, required: false }),
|
|
92
96
|
__metadata("design:type", Object)
|
|
93
97
|
], Payment.prototype, "invoiceDueDate", void 0);
|
|
94
98
|
__decorate([
|
|
95
|
-
(0, mongoose_1.Prop)({ type: Date, default: null }),
|
|
99
|
+
(0, mongoose_1.Prop)({ type: Date, default: null, required: false }),
|
|
96
100
|
__metadata("design:type", Object)
|
|
97
101
|
], Payment.prototype, "paymentDate", void 0);
|
|
98
102
|
__decorate([
|
|
99
|
-
(0, mongoose_1.Prop)({ type: exports.PipefyCardSchema }),
|
|
103
|
+
(0, mongoose_1.Prop)({ type: exports.PipefyCardSchema, required: false }),
|
|
100
104
|
__metadata("design:type", PipefyCard)
|
|
101
|
-
], Payment.prototype, "
|
|
105
|
+
], Payment.prototype, "financialCard", void 0);
|
|
102
106
|
__decorate([
|
|
103
|
-
(0, mongoose_1.Prop)(
|
|
104
|
-
__metadata("design:type", Array)
|
|
105
|
-
], Payment.prototype, "financialCards", void 0);
|
|
106
|
-
__decorate([
|
|
107
|
-
(0, mongoose_1.Prop)({ type: exports.PendingChangesSchema }),
|
|
107
|
+
(0, mongoose_1.Prop)({ type: exports.PendingChangesSchema, required: false }),
|
|
108
108
|
__metadata("design:type", PendingChanges)
|
|
109
109
|
], Payment.prototype, "pendingChanges", void 0);
|
|
110
110
|
__decorate([
|
|
111
|
-
(0, mongoose_1.Prop)(),
|
|
111
|
+
(0, mongoose_1.Prop)({ required: false }),
|
|
112
112
|
__metadata("design:type", String)
|
|
113
113
|
], Payment.prototype, "additionalComments", void 0);
|
|
114
114
|
__decorate([
|
|
115
|
-
(0, mongoose_1.Prop)(),
|
|
115
|
+
(0, mongoose_1.Prop)({ required: false }),
|
|
116
116
|
__metadata("design:type", String)
|
|
117
117
|
], Payment.prototype, "googleSheetRow", void 0);
|
|
118
118
|
__decorate([
|
package/package.json
CHANGED
|
@@ -27,6 +27,16 @@ export class ComercialCard {
|
|
|
27
27
|
@Prop()
|
|
28
28
|
internalCost: number;
|
|
29
29
|
|
|
30
|
+
@Prop({
|
|
31
|
+
type: String,
|
|
32
|
+
enum: ['yes_client', 'no_grapa', 'no_client'],
|
|
33
|
+
default: null,
|
|
34
|
+
})
|
|
35
|
+
passThrough: 'yes_client' | 'no_grapa' | 'no_client';
|
|
36
|
+
|
|
37
|
+
@Prop()
|
|
38
|
+
childPermit: boolean;
|
|
39
|
+
|
|
30
40
|
@Prop()
|
|
31
41
|
feeValue: number;
|
|
32
42
|
|
|
@@ -5,7 +5,6 @@ import { Campaign } from './campaign.schema';
|
|
|
5
5
|
import { Recruitment } from './recruitment.schema';
|
|
6
6
|
|
|
7
7
|
export type PaymentDocument = HydratedDocument<Payment>;
|
|
8
|
-
|
|
9
8
|
@Schema({ _id: false })
|
|
10
9
|
export class Requester {
|
|
11
10
|
@Prop()
|
|
@@ -48,41 +47,41 @@ export const PendingChangesSchema =
|
|
|
48
47
|
|
|
49
48
|
@Schema({ timestamps: true })
|
|
50
49
|
export class Payment {
|
|
51
|
-
@Prop({ type: MongooseSchema.Types.ObjectId, auto: true })
|
|
52
|
-
_id
|
|
50
|
+
@Prop({ type: MongooseSchema.Types.ObjectId, auto: true, required: false })
|
|
51
|
+
_id?: Types.ObjectId;
|
|
53
52
|
|
|
54
|
-
@Prop({ type: RequesterSchema })
|
|
55
|
-
requester
|
|
53
|
+
@Prop({ type: RequesterSchema, required: false })
|
|
54
|
+
requester?: Requester;
|
|
56
55
|
|
|
57
56
|
@Prop()
|
|
58
57
|
value: number;
|
|
59
58
|
|
|
60
|
-
@Prop(
|
|
61
|
-
|
|
59
|
+
@Prop()
|
|
60
|
+
installmentNumber: number;
|
|
62
61
|
|
|
63
|
-
@Prop({ type: Date, default: null })
|
|
64
|
-
|
|
62
|
+
@Prop({ type: Date, default: null, required: false })
|
|
63
|
+
dueDate?: Date | null;
|
|
65
64
|
|
|
66
|
-
@Prop({ type: Date, default: null })
|
|
67
|
-
|
|
65
|
+
@Prop({ type: Date, default: null, required: false })
|
|
66
|
+
invoiceIssueDate?: Date | null;
|
|
68
67
|
|
|
69
|
-
@Prop({ type: Date, default: null })
|
|
70
|
-
|
|
68
|
+
@Prop({ type: Date, default: null, required: false })
|
|
69
|
+
invoiceDueDate?: Date | null;
|
|
71
70
|
|
|
72
|
-
@Prop({ type:
|
|
73
|
-
|
|
71
|
+
@Prop({ type: Date, default: null, required: false })
|
|
72
|
+
paymentDate?: Date | null;
|
|
74
73
|
|
|
75
|
-
@Prop(
|
|
76
|
-
|
|
74
|
+
@Prop({ type: PipefyCardSchema, required: false })
|
|
75
|
+
financialCard?: PipefyCard;
|
|
77
76
|
|
|
78
|
-
@Prop({ type: PendingChangesSchema })
|
|
79
|
-
pendingChanges
|
|
77
|
+
@Prop({ type: PendingChangesSchema, required: false })
|
|
78
|
+
pendingChanges?: PendingChanges;
|
|
80
79
|
|
|
81
|
-
@Prop()
|
|
82
|
-
additionalComments
|
|
80
|
+
@Prop({ required: false })
|
|
81
|
+
additionalComments?: string;
|
|
83
82
|
|
|
84
|
-
@Prop()
|
|
85
|
-
googleSheetRow
|
|
83
|
+
@Prop({ required: false })
|
|
84
|
+
googleSheetRow?: string;
|
|
86
85
|
|
|
87
86
|
@Prop({
|
|
88
87
|
type: String,
|