@grapadigital/shared-schemas 1.0.29 → 1.0.31

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.
@@ -37,12 +37,11 @@ export declare class ComercialCard {
37
37
  id: string;
38
38
  title: string;
39
39
  status: string;
40
- internalCost: number;
41
40
  passThrough: 'yes_client' | 'no_grapa' | 'no_client';
42
41
  childPermit: boolean;
43
- feeValue: number;
44
- taxValue: number;
42
+ internalCost: number;
45
43
  influencerValue: number;
44
+ totalValue: number;
46
45
  expectedInvoiceIssueDate: Date | null;
47
46
  expectedInvoiceDueDate: Date | null;
48
47
  revisedInvoiceIssueDate: Date | null;
@@ -32,10 +32,6 @@ __decorate([
32
32
  (0, mongoose_1.Prop)(),
33
33
  __metadata("design:type", String)
34
34
  ], ComercialCard.prototype, "status", void 0);
35
- __decorate([
36
- (0, mongoose_1.Prop)(),
37
- __metadata("design:type", Number)
38
- ], ComercialCard.prototype, "internalCost", void 0);
39
35
  __decorate([
40
36
  (0, mongoose_1.Prop)({
41
37
  type: String,
@@ -51,15 +47,15 @@ __decorate([
51
47
  __decorate([
52
48
  (0, mongoose_1.Prop)(),
53
49
  __metadata("design:type", Number)
54
- ], ComercialCard.prototype, "feeValue", void 0);
50
+ ], ComercialCard.prototype, "internalCost", void 0);
55
51
  __decorate([
56
52
  (0, mongoose_1.Prop)(),
57
53
  __metadata("design:type", Number)
58
- ], ComercialCard.prototype, "taxValue", void 0);
54
+ ], ComercialCard.prototype, "influencerValue", void 0);
59
55
  __decorate([
60
56
  (0, mongoose_1.Prop)(),
61
57
  __metadata("design:type", Number)
62
- ], ComercialCard.prototype, "influencerValue", void 0);
58
+ ], ComercialCard.prototype, "totalValue", void 0);
63
59
  __decorate([
64
60
  (0, mongoose_1.Prop)({ type: Date, default: null }),
65
61
  __metadata("design:type", Object)
@@ -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: Types.ObjectId;
74
- requester: Requester;
73
+ _id?: Types.ObjectId;
74
+ requester?: Requester;
75
75
  value: number;
76
- dueDate: Date | null;
77
- invoiceIssueDate: Date | null;
78
- invoiceDueDate: Date | null;
79
- paymentDate: Date | null;
80
- comercialCard: PipefyCard;
81
- financialCards: PipefyCard[];
82
- pendingChanges: PendingChanges;
83
- additionalComments: string;
84
- googleSheetRow: string;
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)({ type: Date, default: null }),
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, "comercialCard", void 0);
105
+ ], Payment.prototype, "financialCard", void 0);
102
106
  __decorate([
103
- (0, mongoose_1.Prop)([{ type: exports.PipefyCardSchema }]),
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
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@grapadigital/shared-schemas",
3
- "version": "1.0.29",
3
+ "version": "1.0.31",
4
4
  "description": "Shared Mongoose Schemas",
5
5
  "main": "dist/index.js",
6
6
  "types": "dist/index.d.ts",
@@ -24,9 +24,6 @@ export class ComercialCard {
24
24
  @Prop()
25
25
  status: string;
26
26
 
27
- @Prop()
28
- internalCost: number;
29
-
30
27
  @Prop({
31
28
  type: String,
32
29
  enum: ['yes_client', 'no_grapa', 'no_client'],
@@ -38,13 +35,13 @@ export class ComercialCard {
38
35
  childPermit: boolean;
39
36
 
40
37
  @Prop()
41
- feeValue: number;
38
+ internalCost: number;
42
39
 
43
40
  @Prop()
44
- taxValue: number;
41
+ influencerValue: number;
45
42
 
46
43
  @Prop()
47
- influencerValue: number;
44
+ totalValue: number;
48
45
 
49
46
  @Prop({ type: Date, default: null })
50
47
  expectedInvoiceIssueDate: Date | null;
@@ -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: Types.ObjectId;
50
+ @Prop({ type: MongooseSchema.Types.ObjectId, auto: true, required: false })
51
+ _id?: Types.ObjectId;
53
52
 
54
- @Prop({ type: RequesterSchema })
55
- requester: Requester;
53
+ @Prop({ type: RequesterSchema, required: false })
54
+ requester?: Requester;
56
55
 
57
56
  @Prop()
58
57
  value: number;
59
58
 
60
- @Prop({ type: Date, default: null })
61
- dueDate: Date | null;
59
+ @Prop()
60
+ installmentNumber: number;
62
61
 
63
- @Prop({ type: Date, default: null })
64
- invoiceIssueDate: Date | null;
62
+ @Prop({ type: Date, default: null, required: false })
63
+ dueDate?: Date | null;
65
64
 
66
- @Prop({ type: Date, default: null })
67
- invoiceDueDate: Date | null;
65
+ @Prop({ type: Date, default: null, required: false })
66
+ invoiceIssueDate?: Date | null;
68
67
 
69
- @Prop({ type: Date, default: null })
70
- paymentDate: Date | null;
68
+ @Prop({ type: Date, default: null, required: false })
69
+ invoiceDueDate?: Date | null;
71
70
 
72
- @Prop({ type: PipefyCardSchema })
73
- comercialCard: PipefyCard;
71
+ @Prop({ type: Date, default: null, required: false })
72
+ paymentDate?: Date | null;
74
73
 
75
- @Prop([{ type: PipefyCardSchema }])
76
- financialCards: PipefyCard[];
74
+ @Prop({ type: PipefyCardSchema, required: false })
75
+ financialCard?: PipefyCard;
77
76
 
78
- @Prop({ type: PendingChangesSchema })
79
- pendingChanges: PendingChanges;
77
+ @Prop({ type: PendingChangesSchema, required: false })
78
+ pendingChanges?: PendingChanges;
80
79
 
81
- @Prop()
82
- additionalComments: string;
80
+ @Prop({ required: false })
81
+ additionalComments?: string;
83
82
 
84
- @Prop()
85
- googleSheetRow: string;
83
+ @Prop({ required: false })
84
+ googleSheetRow?: string;
86
85
 
87
86
  @Prop({
88
87
  type: String,